@fungi.computer/oyster 0.56.2 → 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-computer-source.js +4 -1
- package/dist/auth.d.ts +12 -4
- package/dist/auth.js +85 -24
- package/dist/boot-capability-route.js +5 -1
- package/dist/boot-gate.d.ts +5 -0
- package/dist/boot-gate.js +12 -2
- package/dist/boot-host-script.js +1 -1
- package/dist/boot-mount.d.ts +7 -1
- package/dist/boot-mount.js +11 -5
- package/dist/embed-metafiles.js +2 -2
- package/dist/embed-scripts.js +1 -1
- package/dist/hello-app-script.js +1 -1
- package/dist/host-page-assets.js +1 -1
- package/dist/host-page-lazy.d.ts +2 -0
- package/dist/host-page-lazy.js +8 -0
- package/dist/host-page.d.ts +19 -1
- package/dist/host-page.js +61 -11
- package/dist/host.d.ts +2 -0
- package/dist/host.js +3 -0
- package/dist/owner-sessions.d.ts +25 -0
- package/dist/owner-sessions.js +50 -0
- package/dist/page/boot-host.js +20 -2
- package/dist/page-script.js +1 -1
- package/dist/platform-skills.generated.d.ts +1 -1
- package/dist/platform-skills.generated.js +1 -1
- package/dist/standalone/agents.js +1 -0
- package/dist/standalone/builds.js +5 -0
- package/dist/standalone/candidate-preview.d.ts +25 -0
- package/dist/standalone/candidate-preview.js +265 -0
- package/dist/standalone/tenancy.d.ts +1 -1
- package/dist/standalone/tenancy.js +9 -1
- package/dist/standalone/worker.js +12 -2
- package/dist/starter-agent.js +5 -2
- package/dist/tenancy/owner-key.d.ts +4 -1
- package/dist/tenancy/owner-key.js +27 -2
- package/dist/upgrade/old-worker-http.js +2 -6
- package/dist/workers-git.js +10 -2
- package/dist/workers.d.ts +11 -0
- package/dist/workers.js +33 -1
- package/docs/api/README.md +5 -3
- package/docs/api/auth.md +96 -8
- package/docs/api/host.md +1 -0
- package/docs/api/tenancy/owner-key.md +1 -0
- package/docs/api/workers.md +81 -0
- package/package.json +17 -17
package/dist/boot-mount.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import type { AppIdentity } from "@fungi.computer/agar";
|
|
2
|
+
import type { PreviewNotice } from "./host-page.js";
|
|
1
3
|
import type { BootUi } from "./boot-gate.js";
|
|
2
4
|
import { bootHostScript } from "#boot-host-script";
|
|
3
5
|
/** Resolve verified build paths with the browser's maintained URL semantics. */
|
|
4
6
|
export declare function bootAssetUrl(origin: string, base: string, path: string): string;
|
|
5
7
|
/** The trusted zero-grant parent and opaque candidate frame used by both hosts. */
|
|
6
|
-
export declare function bootParentDocument(identity:
|
|
8
|
+
export declare function bootParentDocument(identity: AppIdentity, entry: string, options: Readonly<{
|
|
9
|
+
bridge: string;
|
|
10
|
+
sandbox: string;
|
|
11
|
+
notice: PreviewNotice | null;
|
|
12
|
+
}>): Promise<string>;
|
|
7
13
|
/** CSP for the zero-grant candidate; all network-capable destinations remain denied. */
|
|
8
14
|
export declare function candidateSecurityHeaders(origin: string): {
|
|
9
15
|
"cache-control": string;
|
package/dist/boot-mount.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { renderPreviewChrome } from "./host-page-lazy.js";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
import { bootHostScript } from "#boot-host-script";
|
|
3
4
|
/** Resolve verified build paths with the browser's maintained URL semantics. */
|
|
@@ -9,12 +10,17 @@ export function bootAssetUrl(origin, base, path) {
|
|
|
9
10
|
return new URL(path.startsWith("/") ? path.slice(1) : path, baseUrl).href;
|
|
10
11
|
}
|
|
11
12
|
/** The trusted zero-grant parent and opaque candidate frame used by both hosts. */
|
|
12
|
-
export function bootParentDocument(identity, entry,
|
|
13
|
-
const config = JSON.stringify({
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
export async function bootParentDocument(identity, entry, options) {
|
|
14
|
+
const config = JSON.stringify({
|
|
15
|
+
identity,
|
|
16
|
+
entry,
|
|
17
|
+
expiresAt: options.notice?.expiresAt,
|
|
18
|
+
}).replaceAll("<", "\\u003c");
|
|
19
|
+
return `<!doctype html><html><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>App preview</title><body class="${options.notice === null ? "" : "preview-frame"}" style="margin:0;display:flex;flex-direction:column;height:100vh">
|
|
20
|
+
${options.notice === null ? "" : await renderPreviewChrome(options.notice)}
|
|
21
|
+
<iframe id="candidate" title="Candidate UI" sandbox="${options.sandbox}" style="width:100%;flex:1;min-height:0;border:0"></iframe>
|
|
16
22
|
<script id="boot-config" type="application/json">${config}</script>
|
|
17
|
-
<script type="module" src="${bridge}"></script></body></html>`;
|
|
23
|
+
<script type="module" src="${options.bridge}"></script></body></html>`;
|
|
18
24
|
}
|
|
19
25
|
/** CSP for the zero-grant candidate; all network-capable destinations remain denied. */
|
|
20
26
|
export function candidateSecurityHeaders(origin) {
|