@fungi.computer/oyster 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +1134 -2
- package/dist/agents.d.ts +114 -0
- package/dist/agents.js +322 -0
- package/dist/app-builds.d.ts +210 -0
- package/dist/app-builds.js +499 -0
- package/dist/app-sandbox.d.ts +2 -0
- package/dist/app-sandbox.js +2 -0
- package/dist/app-sources.d.ts +31 -0
- package/dist/app-sources.js +370 -0
- package/dist/app-storage.d.ts +141 -0
- package/dist/app-storage.js +281 -0
- package/dist/apps/gate.d.ts +105 -0
- package/dist/apps/gate.js +273 -0
- package/dist/apps/index.d.ts +5 -0
- package/dist/apps/index.js +5 -0
- package/dist/apps/installation.d.ts +248 -0
- package/dist/apps/installation.js +307 -0
- package/dist/apps/operations.d.ts +8 -0
- package/dist/apps/operations.js +98 -0
- package/dist/apps/tools.d.ts +33 -0
- package/dist/apps/tools.js +17 -0
- package/dist/auth.d.ts +11 -0
- package/dist/auth.js +93 -0
- package/dist/backend-request.d.ts +3 -0
- package/dist/backend-request.js +53 -0
- package/dist/build/artifact-writer.d.ts +40 -0
- package/dist/build/artifact-writer.js +181 -0
- package/dist/build/build-jobs.d.ts +128 -0
- package/dist/build/build-jobs.js +203 -0
- package/dist/build/build-policy.d.ts +10 -0
- package/dist/build/build-policy.js +10 -0
- package/dist/build/build-step.d.ts +37 -0
- package/dist/build/build-step.js +28 -0
- package/dist/build/bundled-html.d.ts +7 -0
- package/dist/build/bundled-html.js +64 -0
- package/dist/build/candidate-builder.d.ts +68 -0
- package/dist/build/candidate-builder.js +91 -0
- package/dist/build/candidate-cli.d.ts +1 -0
- package/dist/build/candidate-cli.js +119 -0
- package/dist/build/candidate-cli.mjs +28170 -0
- package/dist/build/content-objects.d.ts +37 -0
- package/dist/build/content-objects.js +53 -0
- package/dist/build/definition-emission.d.ts +34 -0
- package/dist/build/definition-emission.js +201 -0
- package/dist/build/effect.d.ts +249 -0
- package/dist/build/effect.js +436 -0
- package/dist/build/git-environment.d.ts +9 -0
- package/dist/build/git-environment.js +60 -0
- package/dist/build/html-recipe.d.ts +20 -0
- package/dist/build/html-recipe.js +51 -0
- package/dist/build/local-build.d.ts +67 -0
- package/dist/build/local-build.js +1128 -0
- package/dist/build/snapshot-package-store.d.ts +12 -0
- package/dist/build/snapshot-package-store.js +36 -0
- package/dist/build/snapshot-program-scripts.d.ts +6 -0
- package/dist/build/snapshot-program-scripts.js +2 -0
- package/dist/build/snapshot-programs/snapshot-path.d.ts +2 -0
- package/dist/build/snapshot-programs/snapshot-path.js +6 -0
- package/dist/build/submission-contract.d.ts +828 -0
- package/dist/build/submission-contract.js +180 -0
- package/dist/build/workspace-build.d.ts +55 -0
- package/dist/build/workspace-build.js +200 -0
- package/dist/build-contract.d.ts +7 -0
- package/dist/build-contract.js +7 -0
- package/dist/build-egress.d.ts +62 -0
- package/dist/build-egress.js +148 -0
- package/dist/build-jobs.d.ts +2 -0
- package/dist/build-jobs.js +2 -0
- package/dist/build.d.ts +12 -0
- package/dist/build.js +14 -0
- package/dist/capability-descriptor.d.ts +46 -0
- package/dist/capability-descriptor.js +51 -0
- package/dist/catalog-frame.d.ts +39 -0
- package/dist/catalog-frame.js +72 -0
- package/dist/cause-class.d.ts +19 -0
- package/dist/cause-class.js +54 -0
- package/dist/cloudflare.d.ts +123 -0
- package/dist/cloudflare.js +391 -0
- package/dist/computer-terminal.d.ts +38 -0
- package/dist/computer-terminal.js +410 -0
- package/dist/computer.d.ts +60 -0
- package/dist/computer.js +33 -0
- package/dist/event-recipients.d.ts +57 -0
- package/dist/event-recipients.js +144 -0
- package/dist/facet-invocation.d.ts +4 -0
- package/dist/facet-invocation.js +45 -0
- package/dist/files.d.ts +42 -0
- package/dist/files.js +123 -0
- package/dist/frame-binding-wire-script.d.ts +2 -0
- package/dist/frame-binding-wire-script.js +1 -0
- package/dist/frame-binding-wire.d.ts +28 -0
- package/dist/frame-binding-wire.js +54 -0
- package/dist/git-admission.d.ts +52 -0
- package/dist/git-admission.js +188 -0
- package/dist/git-auth.d.ts +11 -0
- package/dist/git-auth.js +27 -0
- package/dist/git-door.d.ts +35 -0
- package/dist/git-door.js +108 -0
- package/dist/git-journal.d.ts +31 -0
- package/dist/git-journal.js +188 -0
- package/dist/git.d.ts +31 -0
- package/dist/git.js +64 -0
- package/dist/guest-policy.d.ts +9 -0
- package/dist/guest-policy.js +13 -0
- package/dist/host.d.ts +244 -0
- package/dist/host.js +1043 -0
- package/dist/index.d.ts +166 -0
- package/dist/index.js +320 -0
- package/dist/installation-consent.d.ts +79 -0
- package/dist/installation-consent.js +82 -0
- package/dist/internal/background-origins.d.ts +3 -0
- package/dist/internal/background-origins.js +8 -0
- package/dist/internal/delivery.d.ts +12 -0
- package/dist/internal/delivery.js +167 -0
- package/dist/internal/host-gate.d.ts +14 -0
- package/dist/internal/host-gate.js +62 -0
- package/dist/internal/registry-installations.d.ts +6 -0
- package/dist/internal/registry-installations.js +12 -0
- package/dist/invocation.d.ts +251 -0
- package/dist/invocation.js +377 -0
- package/dist/keys.d.ts +48 -0
- package/dist/keys.js +52 -0
- package/dist/mcp-owner.d.ts +27 -0
- package/dist/mcp-owner.js +155 -0
- package/dist/mcp.d.ts +89 -0
- package/dist/mcp.js +429 -0
- package/dist/media.d.ts +23 -0
- package/dist/media.js +12 -0
- package/dist/pack.d.ts +79 -0
- package/dist/pack.js +151 -0
- package/dist/page/capabilities.d.ts +23 -0
- package/dist/page/capabilities.js +256 -0
- package/dist/page/computer-handles.d.ts +79 -0
- package/dist/page/computer-handles.js +44 -0
- package/dist/page/gill-observation.d.ts +4 -0
- package/dist/page/gill-observation.js +31 -0
- package/dist/page/lifetime.d.ts +6 -0
- package/dist/page/lifetime.js +19 -0
- package/dist/page/mount.d.ts +163 -0
- package/dist/page/mount.js +390 -0
- package/dist/page/storage.d.ts +3 -0
- package/dist/page/storage.js +82 -0
- package/dist/page/terminal.d.ts +5 -0
- package/dist/page/terminal.js +7 -0
- package/dist/page/window-launch.d.ts +18 -0
- package/dist/page/window-launch.js +11 -0
- package/dist/page-script.d.ts +14 -0
- package/dist/page-script.js +5 -0
- package/dist/r2-files.d.ts +3 -0
- package/dist/r2-files.js +79 -0
- package/dist/release.d.ts +83 -0
- package/dist/release.js +167 -0
- package/dist/root-data.d.ts +86 -0
- package/dist/root-data.js +69 -0
- package/dist/shell/app-directory.d.ts +542 -0
- package/dist/shell/app-directory.js +199 -0
- package/dist/shell/browser-actions.d.ts +7 -0
- package/dist/shell/browser-actions.js +56 -0
- package/dist/shell/command-host.d.ts +112 -0
- package/dist/shell/command-host.js +502 -0
- package/dist/shell/commands.d.ts +25 -0
- package/dist/shell/commands.js +78 -0
- package/dist/shell/index.d.ts +8 -0
- package/dist/shell/index.js +8 -0
- package/dist/shell/keys.d.ts +41 -0
- package/dist/shell/keys.js +134 -0
- package/dist/shell/shell-module.d.ts +55 -0
- package/dist/shell/shell-module.js +86 -0
- package/dist/shell/window-manager.d.ts +124 -0
- package/dist/shell/window-manager.js +711 -0
- package/dist/shell/workbench-contract.d.ts +68 -0
- package/dist/shell/workbench-contract.js +1 -0
- package/dist/shell/workbench-directory.d.ts +332 -0
- package/dist/shell/workbench-directory.js +35 -0
- package/dist/shell/workbench-host-types.d.ts +96 -0
- package/dist/shell/workbench-host-types.js +1 -0
- package/dist/shell/workbench-host.d.ts +34 -0
- package/dist/shell/workbench-host.js +347 -0
- package/dist/shell/workbench-model.d.ts +192 -0
- package/dist/shell/workbench-model.js +53 -0
- package/dist/shell/workbench.d.ts +4 -0
- package/dist/shell/workbench.js +2 -0
- package/dist/source/fork.d.ts +27 -0
- package/dist/source/fork.js +46 -0
- package/dist/source/index.d.ts +10 -0
- package/dist/source/index.js +10 -0
- package/dist/source/seed-receipt.d.ts +53 -0
- package/dist/source/seed-receipt.js +18 -0
- package/dist/source/team-source.d.ts +32 -0
- package/dist/source/team-source.js +42 -0
- package/dist/source/template-push.d.ts +33 -0
- package/dist/source/template-push.js +223 -0
- package/dist/source/template-repository.d.ts +4 -0
- package/dist/source/template-repository.js +21 -0
- package/dist/source/template-seed.d.ts +68 -0
- package/dist/source/template-seed.js +80 -0
- package/dist/standalone/agent-directory.d.ts +4 -0
- package/dist/standalone/agent-directory.js +4 -0
- package/dist/standalone/agents.d.ts +220 -0
- package/dist/standalone/agents.js +795 -0
- package/dist/standalone/app-builds-binding.d.ts +36 -0
- package/dist/standalone/app-builds-binding.js +119 -0
- package/dist/standalone/app-set.d.ts +91 -0
- package/dist/standalone/app-set.js +395 -0
- package/dist/standalone/app-source.d.ts +41 -0
- package/dist/standalone/app-source.js +59 -0
- package/dist/standalone/builds.d.ts +18 -0
- package/dist/standalone/builds.js +101 -0
- package/dist/standalone/computer-egress.d.ts +37 -0
- package/dist/standalone/computer-egress.js +111 -0
- package/dist/standalone/computer.d.ts +122 -0
- package/dist/standalone/computer.js +714 -0
- package/dist/standalone/install-apps-cli.d.ts +2 -0
- package/dist/standalone/install-apps-cli.js +126 -0
- package/dist/standalone/instance.d.ts +35 -0
- package/dist/standalone/instance.js +74 -0
- package/dist/standalone/media.d.ts +76 -0
- package/dist/standalone/media.js +227 -0
- package/dist/standalone/preview.d.ts +51 -0
- package/dist/standalone/preview.js +167 -0
- package/dist/standalone/registry.d.ts +102 -0
- package/dist/standalone/registry.js +193 -0
- package/dist/standalone/tenancy.d.ts +42 -0
- package/dist/standalone/tenancy.js +241 -0
- package/dist/standalone/worker.d.ts +55 -0
- package/dist/standalone/worker.js +147 -0
- package/dist/standalone/workflow-authority-readers.d.ts +16 -0
- package/dist/standalone/workflow-authority-readers.js +35 -0
- package/dist/standalone/workflow-binding.d.ts +216 -0
- package/dist/standalone/workflow-binding.js +217 -0
- package/dist/standalone/workflow-events.d.ts +46 -0
- package/dist/standalone/workflow-events.js +39 -0
- package/dist/standalone/workflow-git-capture.d.ts +7 -0
- package/dist/standalone/workflow-git-capture.js +62 -0
- package/dist/standalone/workflow-host.d.ts +931 -0
- package/dist/standalone/workflow-host.js +751 -0
- package/dist/standalone/workflow-node-capture.d.ts +13 -0
- package/dist/standalone/workflow-node-capture.js +72 -0
- package/dist/standalone/workflow-root-authority.d.ts +27 -0
- package/dist/standalone/workflow-root-authority.js +87 -0
- package/dist/standalone/workflow-schedules.d.ts +52 -0
- package/dist/standalone/workflow-schedules.js +40 -0
- package/dist/standalone/workflow-trigger-host.d.ts +1694 -0
- package/dist/standalone/workflow-trigger-host.js +52 -0
- package/dist/standalone/workflows.d.ts +657 -0
- package/dist/standalone/workflows.js +554 -0
- package/dist/storage-frame.d.ts +64 -0
- package/dist/storage-frame.js +28 -0
- package/dist/tenancy/auth0.d.ts +64 -0
- package/dist/tenancy/auth0.js +198 -0
- package/dist/tenancy/cloudflare/rate-limit.d.ts +8 -0
- package/dist/tenancy/cloudflare/rate-limit.js +19 -0
- package/dist/tenancy/cloudflare/registry.d.ts +50 -0
- package/dist/tenancy/cloudflare/registry.js +301 -0
- package/dist/tenancy/cloudflare.d.ts +2 -0
- package/dist/tenancy/cloudflare.js +2 -0
- package/dist/tenancy/cold-directory.d.ts +13 -0
- package/dist/tenancy/cold-directory.js +43 -0
- package/dist/tenancy/contracts.d.ts +195 -0
- package/dist/tenancy/contracts.js +1 -0
- package/dist/tenancy/index.d.ts +19 -0
- package/dist/tenancy/index.js +156 -0
- package/dist/tenancy/owner-key.d.ts +26 -0
- package/dist/tenancy/owner-key.js +63 -0
- package/dist/tenancy/oyster.d.ts +4 -0
- package/dist/tenancy/oyster.js +25 -0
- package/dist/tenancy/registry-record.d.ts +7 -0
- package/dist/tenancy/registry-record.js +44 -0
- package/dist/tenancy/registry.d.ts +27 -0
- package/dist/tenancy/registry.js +138 -0
- package/dist/tenancy/resolve.d.ts +7 -0
- package/dist/tenancy/resolve.js +64 -0
- package/dist/tenant.d.ts +81 -0
- package/dist/tenant.js +71 -0
- package/dist/testing/capabilities.d.ts +29 -0
- package/dist/testing/capabilities.js +130 -0
- package/dist/testing/catalog.d.ts +3 -0
- package/dist/testing/catalog.js +53 -0
- package/dist/testing/index.d.ts +10 -0
- package/dist/testing/index.js +10 -0
- package/dist/testing/installation.d.ts +11 -0
- package/dist/testing/installation.js +25 -0
- package/dist/testing/native-worker.d.ts +21 -0
- package/dist/testing/native-worker.js +106 -0
- package/dist/testing/worker.d.ts +18 -0
- package/dist/testing/worker.js +67 -0
- package/dist/testing/workers-runtime.d.ts +24 -0
- package/dist/testing/workers-runtime.js +33 -0
- package/dist/webhook-delivery.d.ts +14 -0
- package/dist/webhook-delivery.js +17 -0
- package/dist/workers-git.d.ts +285 -0
- package/dist/workers-git.js +1174 -0
- package/dist/workers.d.ts +352 -0
- package/dist/workers.js +868 -0
- package/docs/api/README.md +82 -0
- package/docs/api/agents.md +332 -0
- package/docs/api/app-storage.md +209 -0
- package/docs/api/apps.md +1375 -0
- package/docs/api/auth.md +63 -0
- package/docs/api/build-contract.md +1304 -0
- package/docs/api/build.md +1712 -0
- package/docs/api/cloudflare.md +421 -0
- package/docs/api/computer.md +203 -0
- package/docs/api/files.md +117 -0
- package/docs/api/git.md +470 -0
- package/docs/api/host.md +1328 -0
- package/docs/api/index.md +430 -0
- package/docs/api/invocation.md +738 -0
- package/docs/api/keys.md +175 -0
- package/docs/api/mcp.md +301 -0
- package/docs/api/media.md +40 -0
- package/docs/api/modules.md +50 -0
- package/docs/api/pack.md +141 -0
- package/docs/api/page/mount.md +298 -0
- package/docs/api/root-data.md +111 -0
- package/docs/api/shell/app-directory.md +599 -0
- package/docs/api/shell/command-host.md +224 -0
- package/docs/api/shell/commands.md +197 -0
- package/docs/api/shell/keys.md +183 -0
- package/docs/api/shell/shell-module.md +204 -0
- package/docs/api/shell/window-manager.md +267 -0
- package/docs/api/shell/workbench-directory.md +119 -0
- package/docs/api/shell/workbench.md +205 -0
- package/docs/api/shell.md +1915 -0
- package/docs/api/tenancy/auth0.md +110 -0
- package/docs/api/tenancy/cloudflare.md +221 -0
- package/docs/api/tenancy/cold-directory.md +46 -0
- package/docs/api/tenancy/owner-key.md +63 -0
- package/docs/api/tenancy/registry.md +77 -0
- package/docs/api/tenancy/resolve.md +69 -0
- package/docs/api/tenancy.md +430 -0
- package/docs/api/tenant.md +194 -0
- package/docs/api/workers-git.md +1646 -0
- package/docs/api/workers.md +1691 -0
- package/docs/site/agent-quickstart.mdx +346 -0
- package/examples/standalone/worker.ts +7 -0
- package/examples/standalone/wrangler.jsonc +82 -0
- package/package.json +300 -3
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
**@fungi.computer/oyster**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Oyster API overview
|
|
8
|
+
|
|
9
|
+
| Import | Export | Purpose |
|
|
10
|
+
| --------------------------------------------- | -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
11
|
+
| `@fungi.computer/oyster` | `createAppInstance` | Run one App Instance's lifecycle and admission over host-supplied ports. |
|
|
12
|
+
| `@fungi.computer/oyster` | `InstancePorts` | The storage, artifact resolution, abort, purge and connection ports a host supplies. |
|
|
13
|
+
| `@fungi.computer/oyster` | `selectionSchema` | Decode the owner-issued selection that authorizes a request. |
|
|
14
|
+
| `@fungi.computer/oyster` | `ownerStateSchema` | Decode a complete owner state: `enabled`, `disabled` or `deleted`. |
|
|
15
|
+
| `@fungi.computer/oyster` | `AppInstanceError` | Typed rejection with a stable `code` from `appInstanceErrorCodeSchema`. |
|
|
16
|
+
| `@fungi.computer/oyster` | `instanceIds` | Mint and recognize App Instance IDs. |
|
|
17
|
+
| `@fungi.computer/oyster/invocation` | `createInvocationGate`, `invocationFacts`, `InvocationFrame` | Run each request in one frame of host-admitted caller facts, with its deadline and abort signal. |
|
|
18
|
+
| `@fungi.computer/oyster/cloudflare` | `createCloudflareAppInstance` | Run an Instance in a SQLite Durable Object with a Worker Loader facet (workerd or celld). |
|
|
19
|
+
| `@fungi.computer/oyster/apps` | `Installation`, `applyInstallationCommand`, `admits`, `approvedBindingGrants` | Pure installation approvals and admission; host-owned commits and tenant freshness. |
|
|
20
|
+
| `@fungi.computer/oyster/host` | `createOyster` | The Oyster App server: a Hono app over host adapters for sign-in, Releases, installations and Instances. |
|
|
21
|
+
| `@fungi.computer/oyster/auth` | `ownerKeyAuth`, `ownerOrKeyAuth` | Owner-key sign-in (a Bearer key or the login cookie, compared in constant time) and named agent keys as Team-key principals. |
|
|
22
|
+
| `@fungi.computer/oyster/tenant` | `TenantScope`, `tenantScope`, `singleTenant`, `OysterTenancy` | Host-resolved tenant identity and the scope that prefixes registry, key and repository names. |
|
|
23
|
+
| `@fungi.computer/oyster/workers` | `createOysterWorker` | A standalone single-owner Oyster on Workers or celld: R2 Releases, a registry and one Durable Object per Instance. |
|
|
24
|
+
| `@fungi.computer/oyster/pack` | `packRelease`, `installRelease`, `installFromSource`, `publishSource` | Build a committed App through the canonical recipe compiler and install its Release on an Oyster over HTTP. |
|
|
25
|
+
| `@fungi.computer/oyster/build` | `createAppCandidatePreparer`, `createLocalBuildExecutor` | Node-only source capture, pinned compilation and local artifact writing. |
|
|
26
|
+
| `@fungi.computer/oyster/build-contract` | Recipe schemas and candidate orchestration | The Worker-safe half of `./build`, without the executor. |
|
|
27
|
+
| `@fungi.computer/oyster/app-storage` | `AppStorageBinding` | `env.APP_STORAGE` for methods and lifecycle handlers: lifecycle writes go to the team layer and reach `appStorage.watch`. |
|
|
28
|
+
| `@fungi.computer/oyster/app-storage` | `createAppStorage`, `appStorageSchemaStatements` | SQLite owner for declared keys, live member/lifecycle admission, revision checks and watch invalidations. |
|
|
29
|
+
| `@fungi.computer/oyster/mcp` | `oysterAppMethods`, `oysterComputerTools`, `oysterMcpCatalogLoad` | Installed App methods and the host's Computer as Mycelium modules for the shared MCP endpoint, scoped to the caller. |
|
|
30
|
+
| `@fungi.computer/oyster/agents` | `OysterAgents`, `agentCapabilities`, `agentApprovalRoutes` | The host's Agent slot, its App capabilities and the owner-only approval routes. |
|
|
31
|
+
| `@fungi.computer/oyster/computer` | `computerSlots`, `ComputerTerminalHost` | Computer ports, processes and terminal routes supplied by the host; execution stays in the Computer runtime. |
|
|
32
|
+
| `@fungi.computer/oyster/media` | `mediaSlot` | The media capability slot a host fills; Oyster owns routing, never generation. |
|
|
33
|
+
| `@fungi.computer/oyster/files` | `FileSource` | Files Apps reach through Agar's `computer.*` file contracts, with a compare-and-swap replace. |
|
|
34
|
+
| `@fungi.computer/oyster/root-data` | `createOysterRootData` | Installation and verified Release owners as shared workbench metadata for a standalone root. |
|
|
35
|
+
| `@fungi.computer/oyster/page` | `mountOysterPage`, `connectOysterApp`, `readOysterPageConfig` | Mount one installed App's sandboxed frame and connect its admitted slots. |
|
|
36
|
+
| `@fungi.computer/oyster/shell` | Shell client exports | Build a browser or terminal host from the focused entries below. |
|
|
37
|
+
| `@fungi.computer/oyster/shell/workbench` | Workbench types and schemas | Describe child mounts, geometry and Gill arrangers without platform policy. |
|
|
38
|
+
| `@fungi.computer/oyster/shell/command-host` | `createAppSurfaceCommandHost` | Admit declared commands and own focus and contribution lifetimes. |
|
|
39
|
+
| `@fungi.computer/oyster/shell/keys` | `installShellKeys`, `parseChord` | Match chords and optionally install DOM key dispatch. |
|
|
40
|
+
| `@fungi.computer/oyster/shell/commands` | `shellCommands` | Declare shell commands over embedding-host callbacks. |
|
|
41
|
+
| `@fungi.computer/oyster/shell/window-manager` | `createWindowManager` | Own window generations, visibility and disposal over a mount adapter. |
|
|
42
|
+
| `@fungi.computer/oyster/shell/app-directory` | Directory schemas | Decode host-neutral addresses and App metadata before permissions. |
|
|
43
|
+
| `@fungi.computer/oyster/shell/shell-module` | `importShellModule`, `ShellMountInput`, `MountShell` | Load the picked shell Release's `mountShell` module from the host's own origin and hand it the workbench, storage and methods. |
|
|
44
|
+
| `@fungi.computer/oyster/git` | `EventSink`, `createGitDoor`, `signStandardWebhook` | The EVENTS binding contract, the git smart-HTTP door and Standard Webhooks signing. `GitBinding` comes from `@fungi.computer/agar/git`. |
|
|
45
|
+
| `@fungi.computer/oyster/workers-git` | `oysterGitRoot`, `createOysterGitWorker`, `ownerOrKeyTenancy`, `oysterWorkerGit`, `gitAdminRoutes` | One Git root whose `hostFor` serves HTTP, MCP and Instances, or `host.git` and key/webhook routes for your own host. |
|
|
46
|
+
|
|
47
|
+
The host owns admission: it decides who may apply owner state and which
|
|
48
|
+
selection a request carries. Oyster owns what happens to one Instance once the
|
|
49
|
+
host has that authority: owner-state replay and conflict rules, Release
|
|
50
|
+
resolution, state-schema compatibility, fencing on disable and purge on delete.
|
|
51
|
+
The generated module pages below include every port and record type.
|
|
52
|
+
|
|
53
|
+
## Guest execution policy
|
|
54
|
+
|
|
55
|
+
`createOyster({ ...host, guestLimits: { cpuMs: 250, subRequests: 10 } })`
|
|
56
|
+
configures per-invocation budgets. Omitted fields default to 1,000 milliseconds
|
|
57
|
+
of CPU and 50 subrequests. CPU must be a positive integer; subrequests may be
|
|
58
|
+
zero to forbid them. Both must fit a signed 32-bit integer. Invalid
|
|
59
|
+
configuration fails before accepting requests.
|
|
60
|
+
|
|
61
|
+
The host's `InstanceDirectory.get(id, limits)` adapter must carry those budgets
|
|
62
|
+
to guest execution.
|
|
63
|
+
`createOysterWorker({ guestLimits: { cpuMs: 250, subRequests: 10 } })` supplies
|
|
64
|
+
this wiring for the standalone Worker. Direct `createCloudflareAppInstance`
|
|
65
|
+
callers can supply the same policy in its final argument; otherwise the same
|
|
66
|
+
defaults apply. The loader code carries limits for both HTTP and method calls,
|
|
67
|
+
without granting ambient outbound access. Changing an Instance's budgets
|
|
68
|
+
invalidates its running facet while preserving its SQLite state. Runtime
|
|
69
|
+
enforcement uses the
|
|
70
|
+
[Worker Loader resource limits](https://developers.cloudflare.com/dynamic-workers/usage/limits/).
|
|
71
|
+
|
|
72
|
+
Guest HTTP responses retain only content metadata: content type, language,
|
|
73
|
+
encoding, length, disposition and range, accepted ranges, ETag and
|
|
74
|
+
last-modified. Oyster supplies `Cache-Control: no-store`,
|
|
75
|
+
`X-Content-Type-Options: nosniff`, and a sandboxed, deny-by-default Content
|
|
76
|
+
Security Policy. Cookies, redirects, origin policy, service-worker scope and
|
|
77
|
+
unrecognized headers cannot come from guests. Host-issued login responses retain
|
|
78
|
+
their cookies.
|
|
79
|
+
|
|
80
|
+
The Node-only `@fungi.computer/oyster/build` entry owns captured App
|
|
81
|
+
compilation; `@fungi.computer/oyster/build-contract` provides its Worker-safe
|
|
82
|
+
recipe and candidate orchestration without loading the executor.
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/oyster**](README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/oyster](modules.md) / agents
|
|
8
|
+
|
|
9
|
+
# agents
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### OysterAgent
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type OysterAgent = Readonly<{
|
|
17
|
+
agentId: string;
|
|
18
|
+
name: string;
|
|
19
|
+
sessionOperations: readonly ("agent.read" | "agent.send" | "agent.manage")[];
|
|
20
|
+
}>;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
One agent as Apps see it, in Agar's `appAgentSchema` shape.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### OysterSessionRow
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
type OysterSessionRow =
|
|
31
|
+
| Omit<
|
|
32
|
+
Extract<
|
|
33
|
+
MemberInboxSession,
|
|
34
|
+
{
|
|
35
|
+
title: string;
|
|
36
|
+
}
|
|
37
|
+
>,
|
|
38
|
+
"agentId" | "visitedAt"
|
|
39
|
+
>
|
|
40
|
+
| Omit<
|
|
41
|
+
Extract<
|
|
42
|
+
MemberInboxSession,
|
|
43
|
+
{
|
|
44
|
+
state: "unavailable";
|
|
45
|
+
}
|
|
46
|
+
>,
|
|
47
|
+
"agentId"
|
|
48
|
+
>;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
An Agent owner's Session facts before the member identity and visit are added.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
### OysterInboxItem
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
type OysterInboxItem = MemberInboxItem;
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Both hosts expose the same Inbox item vocabulary.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### OysterInbox
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
type OysterInbox = Readonly<{
|
|
69
|
+
items: readonly OysterInboxItem[];
|
|
70
|
+
revision: number;
|
|
71
|
+
}>;
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The whole inbox at one revision; the revision only grows.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### AgentPolicyActor
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
type AgentPolicyActor =
|
|
82
|
+
| "owner-direct"
|
|
83
|
+
| Readonly<{
|
|
84
|
+
installationId: string;
|
|
85
|
+
}>;
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Host-attested source of a policy request; request headers are not this fact.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
### PendingAgentPolicy
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
type PendingAgentPolicy = Readonly<{
|
|
96
|
+
status: "pending";
|
|
97
|
+
revision: string;
|
|
98
|
+
}>;
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
An App's requested tools await the owner's direct approval.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### AgentMcpServer
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
type AgentMcpServer = Readonly<{
|
|
109
|
+
serverId: string;
|
|
110
|
+
name: string;
|
|
111
|
+
url: string;
|
|
112
|
+
hasBearer: boolean;
|
|
113
|
+
}>;
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
One remote MCP server connected to an Agent; its bearer token is never returned.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
### AgentMcpServerInput
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
type AgentMcpServerInput = typeof agentMcpServerInputSchema.Type;
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
An owner's request to connect one remote MCP server to an Agent.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### AgentMcpServerRefusal
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
type AgentMcpServerRefusal = Readonly<{
|
|
134
|
+
error: "not_found" | "duplicate_name" | "limit";
|
|
135
|
+
}>;
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Why connecting an MCP server was refused.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
### AgentToolPolicyStatus
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
type AgentToolPolicyStatus = Readonly<{
|
|
146
|
+
status: "pending" | "approved";
|
|
147
|
+
revision: string;
|
|
148
|
+
}>;
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
This Agent's App-tool policy, in the shape Apps read it.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
### OysterAgents
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
type OysterAgents = Readonly<{
|
|
159
|
+
list: Promise<
|
|
160
|
+
readonly Readonly<{
|
|
161
|
+
agentId: string;
|
|
162
|
+
name: string;
|
|
163
|
+
sessionOperations: readonly (
|
|
164
|
+
"agent.read" | "agent.send" | "agent.manage"
|
|
165
|
+
)[];
|
|
166
|
+
}>[]
|
|
167
|
+
>;
|
|
168
|
+
create: Promise<
|
|
169
|
+
Readonly<{
|
|
170
|
+
agentId: string;
|
|
171
|
+
name: string;
|
|
172
|
+
sessionOperations: readonly (
|
|
173
|
+
"agent.read" | "agent.send" | "agent.manage"
|
|
174
|
+
)[];
|
|
175
|
+
}>
|
|
176
|
+
>;
|
|
177
|
+
rename: Promise<
|
|
178
|
+
| Readonly<{
|
|
179
|
+
agentId: string;
|
|
180
|
+
name: string;
|
|
181
|
+
sessionOperations: readonly (
|
|
182
|
+
"agent.read" | "agent.send" | "agent.manage"
|
|
183
|
+
)[];
|
|
184
|
+
}>
|
|
185
|
+
| Readonly<{
|
|
186
|
+
error: "not_found" | "name_taken" | "not_granted";
|
|
187
|
+
}>
|
|
188
|
+
>;
|
|
189
|
+
policyStatus: Promise<Readonly<{
|
|
190
|
+
status: "pending" | "approved";
|
|
191
|
+
revision: string;
|
|
192
|
+
}> | null>;
|
|
193
|
+
appToolPolicy: Promise<{
|
|
194
|
+
level: "read" | "write";
|
|
195
|
+
revision: string;
|
|
196
|
+
grantedBy: string;
|
|
197
|
+
} | null>;
|
|
198
|
+
policyRevision: Promise<string | null>;
|
|
199
|
+
approveAppToolPolicy: Promise<
|
|
200
|
+
| {
|
|
201
|
+
level: "read" | "write";
|
|
202
|
+
revision: string;
|
|
203
|
+
grantedBy: string;
|
|
204
|
+
}
|
|
205
|
+
| Readonly<{
|
|
206
|
+
status: "pending";
|
|
207
|
+
revision: string;
|
|
208
|
+
}>
|
|
209
|
+
| Readonly<{
|
|
210
|
+
error: "not_found" | "revision_conflict" | "not_granted";
|
|
211
|
+
}>
|
|
212
|
+
>;
|
|
213
|
+
mcpServers: Promise<
|
|
214
|
+
| readonly Readonly<{
|
|
215
|
+
serverId: string;
|
|
216
|
+
name: string;
|
|
217
|
+
url: string;
|
|
218
|
+
hasBearer: boolean;
|
|
219
|
+
}>[]
|
|
220
|
+
| null
|
|
221
|
+
>;
|
|
222
|
+
addMcpServer: Promise<
|
|
223
|
+
| Readonly<{
|
|
224
|
+
serverId: string;
|
|
225
|
+
name: string;
|
|
226
|
+
url: string;
|
|
227
|
+
hasBearer: boolean;
|
|
228
|
+
}>
|
|
229
|
+
| Readonly<{
|
|
230
|
+
error: "not_found" | "duplicate_name" | "limit";
|
|
231
|
+
}>
|
|
232
|
+
>;
|
|
233
|
+
removeMcpServer: Promise<boolean>;
|
|
234
|
+
fetch: Promise<Response | null>;
|
|
235
|
+
inbox: Promise<
|
|
236
|
+
Readonly<{
|
|
237
|
+
items: readonly OysterInboxItem[];
|
|
238
|
+
revision: number;
|
|
239
|
+
}>
|
|
240
|
+
>;
|
|
241
|
+
revision: Promise<number>;
|
|
242
|
+
visit: Promise<boolean>;
|
|
243
|
+
}>;
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Where an Oyster's agents live and run.
|
|
247
|
+
|
|
248
|
+
## Variables
|
|
249
|
+
|
|
250
|
+
### maxAgentMcpServers
|
|
251
|
+
|
|
252
|
+
```ts
|
|
253
|
+
const maxAgentMcpServers: 16 = 16;
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
At most this many MCP servers per Agent.
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
### agentMcpServerInputSchema
|
|
261
|
+
|
|
262
|
+
```ts
|
|
263
|
+
const agentMcpServerInputSchema: Struct<{
|
|
264
|
+
name: String;
|
|
265
|
+
url: String;
|
|
266
|
+
bearer: NullOr<String>;
|
|
267
|
+
}>;
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Owner input for one MCP server: a guest identifier, an `https:` endpoint and an
|
|
271
|
+
optional bearer.
|
|
272
|
+
|
|
273
|
+
## Functions
|
|
274
|
+
|
|
275
|
+
### agentCapabilities()
|
|
276
|
+
|
|
277
|
+
```ts
|
|
278
|
+
function agentCapabilities(agents): readonly Readonly<object & object>[];
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Agent adapters admitted against each App's declared capabilities.
|
|
282
|
+
|
|
283
|
+
#### Parameters
|
|
284
|
+
|
|
285
|
+
| Parameter | Type |
|
|
286
|
+
| --------- | ------------------------------- |
|
|
287
|
+
| `agents` | [`OysterAgents`](#oysteragents) |
|
|
288
|
+
|
|
289
|
+
#### Returns
|
|
290
|
+
|
|
291
|
+
readonly `Readonly`\<`object` & `object`\>[]
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
### agentApprovalRoutes()
|
|
296
|
+
|
|
297
|
+
```ts
|
|
298
|
+
function agentApprovalRoutes(agents): Hono<OysterEnv>;
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
Host-owned direct approval under the admitted owner; never an App capability.
|
|
302
|
+
|
|
303
|
+
#### Parameters
|
|
304
|
+
|
|
305
|
+
| Parameter | Type |
|
|
306
|
+
| --------- | ------------------------------- |
|
|
307
|
+
| `agents` | [`OysterAgents`](#oysteragents) |
|
|
308
|
+
|
|
309
|
+
#### Returns
|
|
310
|
+
|
|
311
|
+
`Hono`\<[`OysterEnv`](host.md#oysterenv)\>
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
### agentMcpServerRoutes()
|
|
316
|
+
|
|
317
|
+
```ts
|
|
318
|
+
function agentMcpServerRoutes(agents): Hono<OysterEnv>;
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Host-owned Agent MCP server custody for the owner directly; never an App
|
|
322
|
+
capability. Bearer tokens go in and never come back out.
|
|
323
|
+
|
|
324
|
+
#### Parameters
|
|
325
|
+
|
|
326
|
+
| Parameter | Type |
|
|
327
|
+
| --------- | ------------------------------- |
|
|
328
|
+
| `agents` | [`OysterAgents`](#oysteragents) |
|
|
329
|
+
|
|
330
|
+
#### Returns
|
|
331
|
+
|
|
332
|
+
`Hono`\<[`OysterEnv`](host.md#oysterenv)\>
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/oyster**](README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/oyster](modules.md) / app-storage
|
|
8
|
+
|
|
9
|
+
# app-storage
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### AppStorageBinding
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type AppStorageBinding = Readonly<{
|
|
17
|
+
read: Promise<
|
|
18
|
+
AppStorageResult<{
|
|
19
|
+
value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
20
|
+
source: Schema.Literals<readonly ["member", "team", "none"]>;
|
|
21
|
+
team: Schema.NullOr<
|
|
22
|
+
Schema.Struct<{
|
|
23
|
+
value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
24
|
+
revision: Schema.Int;
|
|
25
|
+
}>
|
|
26
|
+
>;
|
|
27
|
+
member: Schema.NullOr<
|
|
28
|
+
Schema.Struct<{
|
|
29
|
+
value: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
30
|
+
revision: Schema.Int;
|
|
31
|
+
}>
|
|
32
|
+
>;
|
|
33
|
+
canWriteTeam: Schema.Boolean;
|
|
34
|
+
}>
|
|
35
|
+
>;
|
|
36
|
+
write: Promise<
|
|
37
|
+
AppStorageResult<{
|
|
38
|
+
revision: number;
|
|
39
|
+
}>
|
|
40
|
+
>;
|
|
41
|
+
reset: Promise<
|
|
42
|
+
AppStorageResult<{
|
|
43
|
+
revision: number;
|
|
44
|
+
}>
|
|
45
|
+
>;
|
|
46
|
+
}>;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The App storage handle in `env.APP_STORAGE`.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### AppStorageWriter
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
type AppStorageWriter =
|
|
57
|
+
| Readonly<{
|
|
58
|
+
kind: "member";
|
|
59
|
+
memberId: string;
|
|
60
|
+
isOwner: boolean;
|
|
61
|
+
}>
|
|
62
|
+
| Readonly<{
|
|
63
|
+
kind: "lifecycle";
|
|
64
|
+
handler: string;
|
|
65
|
+
}>;
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Trusted backend writer: owners may also edit the Team layer; lifecycle has no
|
|
69
|
+
member.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### AppStorageAdmission
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
type AppStorageAdmission = Readonly<{
|
|
77
|
+
address: string;
|
|
78
|
+
appId: string;
|
|
79
|
+
memberId: string;
|
|
80
|
+
membershipVersion: number;
|
|
81
|
+
isOwner: boolean;
|
|
82
|
+
keys: readonly AppStorageKey[];
|
|
83
|
+
assertCurrent: () => void;
|
|
84
|
+
}>;
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Trusted live App admission, never supplied by the App or an HTTP body.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### AppStorageInstallationAdmission
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
type AppStorageInstallationAdmission = Pick<
|
|
95
|
+
AppStorageAdmission,
|
|
96
|
+
"address" | "appId" | "keys" | "assertCurrent"
|
|
97
|
+
>;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Trusted installation lifecycle admission, with no member identity or private
|
|
101
|
+
layer.
|
|
102
|
+
|
|
103
|
+
## Variables
|
|
104
|
+
|
|
105
|
+
### appStorageSchemaStatements
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
const appStorageSchemaStatements: readonly [
|
|
109
|
+
"CREATE TABLE IF NOT EXISTS hub_app_storage (\n address TEXT NOT NULL, app_id TEXT NOT NULL, key TEXT NOT NULL,\n scope TEXT NOT NULL CHECK(scope IN ('team','member')), member_id TEXT NOT NULL, membership_version INTEGER NOT NULL,\n value TEXT NOT NULL, revision INTEGER NOT NULL, bytes INTEGER NOT NULL,\n PRIMARY KEY(address,app_id,key,scope,member_id,membership_version),\n CHECK((scope='team' AND member_id='' AND membership_version=0) OR (scope='member' AND member_id<>'' AND membership_version>0))) STRICT",
|
|
110
|
+
"CREATE INDEX IF NOT EXISTS hub_app_storage_member ON hub_app_storage(member_id) WHERE scope='member'",
|
|
111
|
+
"CREATE TABLE IF NOT EXISTS hub_app_storage_clock (id INTEGER PRIMARY KEY CHECK(id=1), revision INTEGER NOT NULL) STRICT",
|
|
112
|
+
"INSERT OR IGNORE INTO hub_app_storage_clock VALUES(1,0)",
|
|
113
|
+
"CREATE TABLE IF NOT EXISTS hub_app_storage_writes (address TEXT NOT NULL, member_id TEXT NOT NULL, membership_version INTEGER NOT NULL, started_at INTEGER NOT NULL, count INTEGER NOT NULL, PRIMARY KEY(address,member_id,membership_version)) STRICT",
|
|
114
|
+
];
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
SQLite tables, indexes and initial revision state used by the App storage owner.
|
|
118
|
+
|
|
119
|
+
## Functions
|
|
120
|
+
|
|
121
|
+
### appStorageWritable()
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
function appStorageWritable(writer, scope): boolean;
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Whether `writer` may mutate `scope`; anything else is `owner_required`.
|
|
128
|
+
|
|
129
|
+
#### Parameters
|
|
130
|
+
|
|
131
|
+
| Parameter | Type |
|
|
132
|
+
| --------- | --------------------------------------- |
|
|
133
|
+
| `writer` | [`AppStorageWriter`](#appstoragewriter) |
|
|
134
|
+
| `scope` | `"team"` \| `"member"` |
|
|
135
|
+
|
|
136
|
+
#### Returns
|
|
137
|
+
|
|
138
|
+
`boolean`
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
### purgeAppStorageInCommit()
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
function purgeAppStorageInCommit(sql, address): void;
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Called only inside the installation owner's delete transaction.
|
|
149
|
+
|
|
150
|
+
#### Parameters
|
|
151
|
+
|
|
152
|
+
| Parameter | Type |
|
|
153
|
+
| --------- | ----------------------------------------------------------------------------------- |
|
|
154
|
+
| `sql` | `Readonly`\<\{ `exec`: (`statement`, ...`bindings`) => `WatchdogSqliteCursor`; \}\> |
|
|
155
|
+
| `address` | `string` |
|
|
156
|
+
|
|
157
|
+
#### Returns
|
|
158
|
+
|
|
159
|
+
`void`
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
### purgeAppMemberStorageInCommit()
|
|
164
|
+
|
|
165
|
+
```ts
|
|
166
|
+
function purgeAppMemberStorageInCommit(sql, memberId, throughVersion): void;
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Called only inside the membership owner's removal transaction.
|
|
170
|
+
|
|
171
|
+
#### Parameters
|
|
172
|
+
|
|
173
|
+
| Parameter | Type |
|
|
174
|
+
| ---------------- | ----------------------------------------------------------------------------------- |
|
|
175
|
+
| `sql` | `Readonly`\<\{ `exec`: (`statement`, ...`bindings`) => `WatchdogSqliteCursor`; \}\> |
|
|
176
|
+
| `memberId` | `string` |
|
|
177
|
+
| `throughVersion` | `number` |
|
|
178
|
+
|
|
179
|
+
#### Returns
|
|
180
|
+
|
|
181
|
+
`void`
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
### createAppStorage()
|
|
186
|
+
|
|
187
|
+
```ts
|
|
188
|
+
function createAppStorage(options): object;
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
One SQLite owner for scoped App values; its views bind the admitted member.
|
|
192
|
+
|
|
193
|
+
#### Parameters
|
|
194
|
+
|
|
195
|
+
| Parameter | Type | Description |
|
|
196
|
+
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
197
|
+
| `options` | \{ `sql`: `Readonly`\<\{ `exec`: (`statement`, ...`bindings`) => `WatchdogSqliteCursor`; \}\>; `now?`: () => `number`; `commit`: \<`A`\>(`body`) => `Effect`\<`A`, `Error`\>; \} | - |
|
|
198
|
+
| `options.sql` | `Readonly`\<\{ `exec`: (`statement`, ...`bindings`) => `WatchdogSqliteCursor`; \}\> | The SQLite connection shared with installation and membership changes. |
|
|
199
|
+
| `options.now?` | () => `number` | Millisecond clock used for the existing per-principal write-rate limit. |
|
|
200
|
+
| `options.commit` | \<`A`\>(`body`) => `Effect`\<`A`, `Error`\> | Commit the supplied mutation atomically before publishing its invalidation. |
|
|
201
|
+
|
|
202
|
+
#### Returns
|
|
203
|
+
|
|
204
|
+
| Name | Type | Description |
|
|
205
|
+
| --------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
206
|
+
| `purgeInstallation()` | (`address`) => `void` | Remove an installation's values and write counters inside its delete transaction. |
|
|
207
|
+
| `purgeMember()` | (`memberId`, `throughVersion`) => `void` | Remove a member's private values and counters through the revoked membership version. |
|
|
208
|
+
| `openInstallation()` | (`authorize`) => `object` | Bind a lifecycle view to fresh installation admission; only declared team layers are accessible. |
|
|
209
|
+
| `open()` | (`authorize`) => `object` | Bind a member view to live admission, declared keys and the current membership version. |
|