Skip to content

Commit 55984e7

Browse files
committed
Merge branch 'feat/python-consent-prompt'
Interactive wasi:http consent prompt in the /python demo: top-layer ConsentDialog + requestConsent wiring, relinked to @actcore/web-runtime with re-vendored policy-gated shims.
2 parents 2858eca + 171736f commit 55984e7

13 files changed

Lines changed: 299 additions & 11 deletions

‎package-lock.json‎

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"astro": "astro"
1414
},
1515
"dependencies": {
16-
"@actcore/web-runtime": "file:../host-browser",
16+
"@actcore/web-runtime": "file:../web-runtime",
1717
"@astrojs/rss": "^4.0.19",
1818
"@astrojs/sitemap": "^3.7.3",
1919
"@astrojs/starlight": "^0.41.2",

‎public/host/shims/sockets.d.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
* `network.Network` share the identical class the generated glue checks
4444
* `instanceof` against.
4545
*/
46+
export interface SocketsPolicyPort {
47+
noteSocketsDenied(): void;
48+
}
49+
export declare function __setSocketsPolicy(p: SocketsPolicyPort | null): void;
4650
declare function denyAccess(): never;
4751
declare class Network {
4852
}

‎public/host/shims/sockets.d.ts.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎public/host/shims/sockets.js‎

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎public/host/shims/sockets.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎public/host/shims/wasi-http.d.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
import { type ErrorCode } from './wasi-http-internal.js';
22
import type { Duration, FieldName, FieldValue, Method, Scheme, StatusCode, Result } from '../generated/interfaces/wasi-http-types.js';
3+
import type { ResourceOp } from '../policy/types.js';
4+
/**
5+
* Minimal port the http PEP calls. Widened in the consent task to resolve
6+
* `ask`; `runComponent` installs the real engine before instantiation.
7+
* v1 limitation: a single module-level slot ⇒ one governed component per
8+
* page realm at a time (see the design spec).
9+
*/
10+
export interface HttpPolicyPort {
11+
decideHttp(op: ResourceOp): Promise<'allow' | 'deny'>;
12+
}
13+
export declare function __setActivePolicy(p: HttpPolicyPort | null): void;
314
type Headers = Fields;
415
type Trailers = Fields;
516
export declare class Fields {

‎public/host/shims/wasi-http.d.ts.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎public/host/shims/wasi-http.js‎

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)