@fungi.computer/oyster 0.56.1 → 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.
Files changed (50) hide show
  1. package/dist/agent-computer-source.js +4 -1
  2. package/dist/auth.d.ts +12 -4
  3. package/dist/auth.js +85 -24
  4. package/dist/boot-capability-route.js +5 -1
  5. package/dist/boot-gate.d.ts +5 -0
  6. package/dist/boot-gate.js +12 -2
  7. package/dist/boot-host-script.js +1 -1
  8. package/dist/boot-mount.d.ts +7 -1
  9. package/dist/boot-mount.js +11 -5
  10. package/dist/computer-api.d.ts +2 -0
  11. package/dist/embed-metafiles.js +2 -2
  12. package/dist/embed-scripts.js +1 -1
  13. package/dist/hello-app-script.js +1 -1
  14. package/dist/host-page-assets.js +1 -1
  15. package/dist/host-page-lazy.d.ts +2 -0
  16. package/dist/host-page-lazy.js +8 -0
  17. package/dist/host-page.d.ts +19 -1
  18. package/dist/host-page.js +61 -11
  19. package/dist/host.d.ts +2 -0
  20. package/dist/host.js +4 -1
  21. package/dist/owner-sessions.d.ts +25 -0
  22. package/dist/owner-sessions.js +50 -0
  23. package/dist/page/boot-host.js +20 -2
  24. package/dist/page-script.js +1 -1
  25. package/dist/platform-skills.generated.d.ts +1 -1
  26. package/dist/platform-skills.generated.js +1 -1
  27. package/dist/standalone/agent-computers.js +1 -1
  28. package/dist/standalone/agents.js +1 -0
  29. package/dist/standalone/builds.js +5 -0
  30. package/dist/standalone/candidate-preview.d.ts +25 -0
  31. package/dist/standalone/candidate-preview.js +265 -0
  32. package/dist/standalone/computer-api.js +4 -1
  33. package/dist/standalone/computer-fleet.js +3 -1
  34. package/dist/standalone/tenancy.d.ts +1 -1
  35. package/dist/standalone/tenancy.js +9 -1
  36. package/dist/standalone/worker.js +12 -2
  37. package/dist/starter-agent.js +5 -2
  38. package/dist/tenancy/owner-key.d.ts +4 -1
  39. package/dist/tenancy/owner-key.js +27 -2
  40. package/dist/upgrade/old-worker-http.js +2 -6
  41. package/dist/workers-git.js +10 -2
  42. package/dist/workers.d.ts +11 -0
  43. package/dist/workers.js +33 -1
  44. package/docs/api/README.md +5 -3
  45. package/docs/api/auth.md +96 -8
  46. package/docs/api/computer-api.md +9 -6
  47. package/docs/api/host.md +1 -0
  48. package/docs/api/tenancy/owner-key.md +1 -0
  49. package/docs/api/workers.md +81 -0
  50. package/package.json +17 -17
@@ -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: BootUi["identity"], entry: string, bridge?: string): string;
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;
@@ -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, bridge = "./bridge.js") {
13
- const config = JSON.stringify({ identity, entry }).replaceAll("<", "\\u003c");
14
- return `<!doctype html><html><body>
15
- <iframe id="candidate" sandbox="allow-scripts" style="width:100vw;height:100vh;border:0"></iframe>
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) {
@@ -137,6 +137,7 @@ export declare const computerApiOperations: readonly [{
137
137
  totalBytes: z.ZodNumber;
138
138
  }, z.core.$strict>>]>;
139
139
  }, z.core.$strict>>;
140
+ cause: z.ZodExactOptional<z.ZodString>;
140
141
  }, z.core.$strict>;
141
142
  }, {
142
143
  readonly operation: "start";
@@ -306,6 +307,7 @@ export declare function computerApiOutputDocument(operation: (typeof computerApi
306
307
  totalBytes: z.ZodNumber;
307
308
  }, z.core.$strict>>]>;
308
309
  }, z.core.$strict>>;
310
+ cause: z.ZodExactOptional<z.ZodString>;
309
311
  }, z.core.$strict> | z.ZodObject<{
310
312
  id: z.ZodLazy<z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>>;
311
313
  port: z.ZodNullable<z.ZodLazy<z.ZodNumber>>;