@fungi.computer/oyster 0.2.0 → 0.3.1
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/README.md +396 -72
- package/dist/agents.d.ts +3 -2
- package/dist/agents.js +4 -2
- package/dist/app-builds.d.ts +81 -8
- package/dist/app-builds.js +213 -60
- package/dist/app-storage.d.ts +3 -3
- package/dist/approval-capability.d.ts +5 -0
- package/dist/approval-capability.js +46 -0
- package/dist/approval-home.d.ts +51 -0
- package/dist/approval-home.js +226 -0
- package/dist/apps/catalog.d.ts +335 -0
- package/dist/apps/catalog.js +46 -0
- package/dist/apps/gate.d.ts +20 -6
- package/dist/apps/gate.js +42 -16
- package/dist/apps/index.d.ts +3 -1
- package/dist/apps/index.js +3 -1
- package/dist/apps/installation.d.ts +132 -51
- package/dist/apps/installation.js +176 -70
- package/dist/apps/permissions.d.ts +247 -0
- package/dist/apps/permissions.js +255 -0
- package/dist/boot-capability-route.d.ts +15 -0
- package/dist/boot-capability-route.js +196 -0
- package/dist/boot-capability.d.ts +103 -0
- package/dist/boot-capability.js +141 -0
- package/dist/boot-construction.d.ts +12 -0
- package/dist/boot-construction.js +175 -0
- package/dist/boot-gate.d.ts +267 -0
- package/dist/boot-gate.js +236 -0
- package/dist/boot-host-script.d.ts +2 -0
- package/dist/boot-host-script.js +1 -0
- package/dist/boot-mount.d.ts +21 -0
- package/dist/boot-mount.js +65 -0
- package/dist/browser/boot.d.ts +73 -0
- package/dist/browser/boot.js +502 -0
- package/dist/browser/browser.d.ts +104 -0
- package/dist/browser/browser.js +374 -0
- package/dist/browser/capability-source.d.ts +76 -0
- package/dist/browser/capability-source.js +338 -0
- package/dist/browser/cdp-client.d.ts +56 -0
- package/dist/browser/cdp-client.js +184 -0
- package/dist/browser/errors.d.ts +79 -0
- package/dist/browser/errors.js +32 -0
- package/dist/browser/index.d.ts +16 -0
- package/dist/browser/index.js +14 -0
- package/dist/browser/lease-registry.d.ts +61 -0
- package/dist/browser/lease-registry.js +101 -0
- package/dist/browser/operations.d.ts +225 -0
- package/dist/browser/operations.js +137 -0
- package/dist/browser/page.d.ts +25 -0
- package/dist/browser/page.js +172 -0
- package/dist/browser/quick-reads.d.ts +29 -0
- package/dist/browser/quick-reads.js +160 -0
- package/dist/browser/sessions.d.ts +52 -0
- package/dist/browser/sessions.js +118 -0
- package/dist/browser/url-policy.d.ts +18 -0
- package/dist/browser/url-policy.js +58 -0
- package/dist/build/app-imports.d.ts +12 -0
- package/dist/build/app-imports.js +105 -0
- package/dist/build/build-policy.d.ts +5 -3
- package/dist/build/build-policy.js +5 -3
- package/dist/build/candidate-builder.d.ts +1 -1
- package/dist/build/candidate-cli.mjs +8375 -334
- package/dist/build/local-build.d.ts +2 -0
- package/dist/build/local-build.js +28 -6
- package/dist/build/snapshot-package-store.d.ts +1 -1
- package/dist/build/snapshot-package-store.js +7 -2
- package/dist/build/workspace-build.d.ts +92 -5
- package/dist/build/workspace-build.js +93 -19
- package/dist/build.d.ts +1 -1
- package/dist/build.js +1 -1
- package/dist/catalog-frame.js +1 -1
- package/dist/cloudflare.d.ts +13 -3
- package/dist/cloudflare.js +102 -4
- package/dist/frame-binding-wire-script.js +1 -1
- package/dist/frame-binding-wire.js +4 -2
- package/dist/git-auth.d.ts +0 -2
- package/dist/git-auth.js +0 -2
- package/dist/git.d.ts +0 -1
- package/dist/git.js +0 -2
- package/dist/host.d.ts +39 -13
- package/dist/host.js +268 -142
- package/dist/index.d.ts +25 -15
- package/dist/index.js +39 -16
- package/dist/install-release-cli.d.ts +2 -0
- package/dist/install-release-cli.js +46 -0
- package/dist/installation-client.d.ts +43 -0
- package/dist/installation-client.js +178 -0
- package/dist/installation-execution.d.ts +11 -0
- package/dist/installation-execution.js +184 -0
- package/dist/installation-operations.d.ts +1437 -0
- package/dist/installation-operations.js +664 -0
- package/dist/installation-store-generation.d.ts +3 -0
- package/dist/installation-store-generation.js +16 -0
- package/dist/instance-id.d.ts +10 -0
- package/dist/instance-id.js +10 -0
- package/dist/instance-refusal.d.ts +11 -0
- package/dist/instance-refusal.js +21 -0
- package/dist/internal/delivery.js +4 -2
- package/dist/internal/host-gate.js +7 -1
- package/dist/internal/registry-installations.js +4 -4
- package/dist/keys.d.ts +5 -1
- package/dist/keys.js +10 -2
- package/dist/machine-link/authority.d.ts +89 -0
- package/dist/machine-link/authority.js +37 -0
- package/dist/machine-link/client.d.ts +66 -0
- package/dist/machine-link/client.js +94 -0
- package/dist/machine-link/delivery.d.ts +18 -0
- package/dist/machine-link/delivery.js +55 -0
- package/dist/machine-link/enrollment.d.ts +111 -0
- package/dist/machine-link/enrollment.js +286 -0
- package/dist/machine-link/fences.d.ts +37 -0
- package/dist/machine-link/fences.js +166 -0
- package/dist/machine-link/home.d.ts +20 -0
- package/dist/machine-link/home.js +24 -0
- package/dist/machine-link/host.d.ts +43 -0
- package/dist/machine-link/host.js +189 -0
- package/dist/machine-link/index.d.ts +15 -0
- package/dist/machine-link/index.js +15 -0
- package/dist/machine-link/link.d.ts +48 -0
- package/dist/machine-link/link.js +223 -0
- package/dist/machine-link/presence.d.ts +10 -0
- package/dist/machine-link/presence.js +25 -0
- package/dist/machine-link/workers.d.ts +6 -0
- package/dist/machine-link/workers.js +6 -0
- package/dist/mcp-owner.d.ts +2 -2
- package/dist/mcp-owner.js +41 -33
- package/dist/mcp.d.ts +15 -3
- package/dist/mcp.js +146 -25
- package/dist/older-oyster-store-refusal.d.ts +4 -0
- package/dist/older-oyster-store-refusal.js +18 -0
- package/dist/older-oyster-store.d.ts +21 -0
- package/dist/older-oyster-store.js +43 -0
- package/dist/pack.d.ts +14 -3
- package/dist/pack.js +44 -19
- package/dist/page/app-access.d.ts +7 -0
- package/dist/page/app-access.js +75 -0
- package/dist/page/boot-host.js +57 -0
- package/dist/page/capabilities.d.ts +3 -3
- package/dist/page/capabilities.js +16 -12
- package/dist/page/computer-handles.d.ts +3 -3
- package/dist/page/computer-target.d.ts +3 -0
- package/dist/page/computer-target.js +9 -0
- package/dist/page/mount.d.ts +23 -3
- package/dist/page/mount.js +152 -16
- package/dist/page-assets.d.ts +22 -0
- package/dist/page-assets.js +28 -0
- package/dist/page-script.d.ts +3 -0
- package/dist/page-script.js +5 -4
- package/dist/release.d.ts +13 -6
- package/dist/release.js +10 -7
- package/dist/root-data.d.ts +16 -6
- package/dist/root-data.js +2 -2
- package/dist/source/index.d.ts +1 -1
- package/dist/source/team-source.d.ts +20 -8
- package/dist/source/team-source.js +39 -10
- package/dist/source/template-seed.d.ts +2 -2
- package/dist/standalone/agent-mail.d.ts +24 -0
- package/dist/standalone/agent-mail.js +62 -0
- package/dist/standalone/agent-store.d.ts +9 -0
- package/dist/standalone/agent-store.js +30 -0
- package/dist/standalone/agents.d.ts +68 -9
- package/dist/standalone/agents.js +428 -56
- package/dist/standalone/app-builds-binding.d.ts +20 -2
- package/dist/standalone/app-builds-binding.js +147 -23
- package/dist/standalone/app-set.d.ts +5 -2
- package/dist/standalone/app-set.js +186 -144
- package/dist/standalone/browser.d.ts +11 -0
- package/dist/standalone/browser.js +72 -0
- package/dist/standalone/builds.d.ts +13 -4
- package/dist/standalone/builds.js +28 -44
- package/dist/standalone/computer-egress.d.ts +2 -0
- package/dist/standalone/computer-egress.js +13 -4
- package/dist/standalone/computer-fleet.d.ts +43 -0
- package/dist/standalone/computer-fleet.js +200 -0
- package/dist/standalone/computer.d.ts +44 -9
- package/dist/standalone/computer.js +129 -22
- package/dist/standalone/install-apps-cli.js +43 -6
- package/dist/standalone/instance.d.ts +2 -2
- package/dist/standalone/instance.js +8 -11
- package/dist/standalone/machine-link.d.ts +354 -0
- package/dist/standalone/machine-link.js +368 -0
- package/dist/standalone/media.d.ts +2 -2
- package/dist/standalone/media.js +19 -16
- package/dist/standalone/preview.d.ts +2 -2
- package/dist/standalone/preview.js +37 -10
- package/dist/standalone/registry.d.ts +151 -9
- package/dist/standalone/registry.js +305 -8
- package/dist/standalone/worker.d.ts +19 -5
- package/dist/standalone/worker.js +90 -54
- package/dist/standalone/workflow-binding.d.ts +18 -22
- package/dist/standalone/workflow-binding.js +18 -18
- package/dist/standalone/workflow-control.d.ts +4 -0
- package/dist/standalone/workflow-control.js +40 -0
- package/dist/standalone/workflow-events.d.ts +2 -2
- package/dist/standalone/workflow-events.js +9 -10
- package/dist/standalone/workflow-git-capture.js +4 -3
- package/dist/standalone/workflow-host.d.ts +162 -161
- package/dist/standalone/workflow-host.js +101 -21
- package/dist/standalone/workflow-node-capture.js +11 -4
- package/dist/standalone/workflow-schedules.d.ts +5 -2
- package/dist/standalone/workflow-schedules.js +9 -10
- package/dist/standalone/workflow-trigger-host.d.ts +65 -5
- package/dist/standalone/workflow-trigger-host.js +2 -2
- package/dist/standalone/workflow-webhooks.d.ts +22 -0
- package/dist/standalone/workflow-webhooks.js +39 -0
- package/dist/standalone/workflows.d.ts +140 -43
- package/dist/standalone/workflows.js +198 -39
- package/dist/storage-frame.d.ts +6 -6
- package/dist/testing/capabilities.js +14 -3
- package/dist/testing/installation.js +26 -2
- package/dist/testing/worker.js +1 -1
- package/dist/testing/workers-runtime.d.ts +8 -2
- package/dist/testing/workers-runtime.js +20 -2
- package/dist/webhook-abuse.d.ts +25 -0
- package/dist/webhook-abuse.js +54 -0
- package/dist/webhook-custody.d.ts +144 -0
- package/dist/webhook-custody.js +222 -0
- package/dist/webhook-ingress.d.ts +36 -0
- package/dist/webhook-ingress.js +146 -0
- package/dist/webhooks.d.ts +111 -0
- package/dist/webhooks.js +189 -0
- package/dist/workers-git.d.ts +12 -17
- package/dist/workers-git.js +64 -52
- package/dist/workers.d.ts +226 -13
- package/dist/workers.js +363 -51
- package/dist/workflow-agent-authority.d.ts +8 -0
- package/dist/workflow-agent-authority.js +42 -0
- package/dist/workflows.d.ts +66 -0
- package/dist/workflows.js +97 -0
- package/docs/api/README.md +63 -37
- package/docs/api/agents.md +17 -0
- package/docs/api/app-storage.md +1 -1
- package/docs/api/apps.md +1394 -543
- package/docs/api/browser/boot.md +132 -0
- package/docs/api/browser.md +1440 -0
- package/docs/api/build-contract.md +38 -25
- package/docs/api/build.md +263 -84
- package/docs/api/cloudflare.md +93 -7
- package/docs/api/git.md +3 -13
- package/docs/api/host.md +944 -118
- package/docs/api/index.md +320 -18
- package/docs/api/keys.md +24 -1
- package/docs/api/mcp.md +59 -12
- package/docs/api/modules.md +33 -40
- package/docs/api/pack.md +57 -8
- package/docs/api/page/mount.md +92 -4
- package/docs/api/workers-git.md +103 -24
- package/docs/api/workers.md +1594 -244
- package/docs/site/agent-quickstart.mdx +28 -14
- package/examples/standalone/worker.ts +3 -1
- package/examples/standalone/wrangler.jsonc +2 -0
- package/package.json +73 -71
- package/dist/installation-consent.d.ts +0 -81
- package/dist/installation-consent.js +0 -84
- package/dist/shell/app-directory.d.ts +0 -542
- package/dist/shell/app-directory.js +0 -196
- package/dist/shell/browser-actions.d.ts +0 -7
- package/dist/shell/browser-actions.js +0 -56
- package/dist/shell/command-host.d.ts +0 -112
- package/dist/shell/command-host.js +0 -502
- package/dist/shell/commands.d.ts +0 -25
- package/dist/shell/commands.js +0 -78
- package/dist/shell/index.d.ts +0 -8
- package/dist/shell/index.js +0 -8
- package/dist/shell/keys.d.ts +0 -41
- package/dist/shell/keys.js +0 -134
- package/dist/shell/shell-module.d.ts +0 -55
- package/dist/shell/shell-module.js +0 -86
- package/dist/shell/window-manager.d.ts +0 -128
- package/dist/shell/window-manager.js +0 -730
- package/dist/shell/workbench-contract.d.ts +0 -68
- package/dist/shell/workbench-directory.d.ts +0 -332
- package/dist/shell/workbench-directory.js +0 -35
- package/dist/shell/workbench-host-types.d.ts +0 -96
- package/dist/shell/workbench-host-types.js +0 -1
- package/dist/shell/workbench-host.d.ts +0 -34
- package/dist/shell/workbench-host.js +0 -352
- package/dist/shell/workbench-model.d.ts +0 -194
- package/dist/shell/workbench-model.js +0 -53
- package/dist/shell/workbench.d.ts +0 -4
- package/dist/shell/workbench.js +0 -2
- package/docs/api/shell/app-directory.md +0 -599
- package/docs/api/shell/command-host.md +0 -224
- package/docs/api/shell/commands.md +0 -197
- package/docs/api/shell/keys.md +0 -183
- package/docs/api/shell/shell-module.md +0 -204
- package/docs/api/shell/window-manager.md +0 -267
- package/docs/api/shell/workbench-directory.md +0 -119
- package/docs/api/shell/workbench.md +0 -205
- package/docs/api/shell.md +0 -1915
- /package/dist/{shell/workbench-contract.js → page/boot-host.d.ts} +0 -0
package/docs/api/index.md
CHANGED
|
@@ -28,10 +28,10 @@ new AppInstanceError(code, options?): AppInstanceError;
|
|
|
28
28
|
|
|
29
29
|
###### Parameters
|
|
30
30
|
|
|
31
|
-
| Parameter | Type
|
|
32
|
-
| ---------- |
|
|
33
|
-
| `code` | \| `"stale_authority"` \| `"invalid_owner_state"` \| `"invalid_invocation_facts"` \| `"revoked"` \| `"binding_not_granted"` \| `"binding_unavailable"` \| `"expired"` \| `"reentrant"` \| `"instance_identity_mismatch"` \| `"instance_owner_mismatch"` \| `"conflicting_owner_state"` \| `"instance_deleted"` \| `"release_app_mismatch"` \| `"state_schema_migration_unsupported"` \| `"instance_inactive"` \| `"instance_authority_version_mismatch"` \| `"release_no_longer_matches_instance"` \| `"instance_release_mismatch"` \| `"installation_tenant_mismatch"` |
|
|
34
|
-
| `options?` | `ErrorOptions`
|
|
31
|
+
| Parameter | Type |
|
|
32
|
+
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
33
|
+
| `code` | \| `"disabled"` \| `"stale_authority"` \| `"invalid_owner_state"` \| `"invalid_invocation_facts"` \| `"revoked"` \| `"binding_not_granted"` \| `"binding_unavailable"` \| `"expired"` \| `"reentrant"` \| `"instance_identity_mismatch"` \| `"instance_owner_mismatch"` \| `"conflicting_owner_state"` \| `"instance_deleted"` \| `"release_app_mismatch"` \| `"state_schema_migration_unsupported"` \| `"instance_inactive"` \| `"instance_authority_version_mismatch"` \| `"release_no_longer_matches_instance"` \| `"instance_release_mismatch"` \| `"installation_tenant_mismatch"` \| `"backend_load_failed"` \| `"backend_construction_failed"` \| `"ui_mount_failed"` \| `"boot_runner_unavailable"` \| `"boot_browser_binding_missing"` \| `"boot_clone_unavailable"` \| `"boot_timeout"` \| `"boot_cleanup_failed"` |
|
|
34
|
+
| `options?` | `ErrorOptions` |
|
|
35
35
|
|
|
36
36
|
###### Returns
|
|
37
37
|
|
|
@@ -61,6 +61,7 @@ Error.name;
|
|
|
61
61
|
|
|
62
62
|
```ts
|
|
63
63
|
readonly code:
|
|
64
|
+
| "disabled"
|
|
64
65
|
| "stale_authority"
|
|
65
66
|
| "invalid_owner_state"
|
|
66
67
|
| "invalid_invocation_facts"
|
|
@@ -79,18 +80,63 @@ readonly code:
|
|
|
79
80
|
| "instance_authority_version_mismatch"
|
|
80
81
|
| "release_no_longer_matches_instance"
|
|
81
82
|
| "instance_release_mismatch"
|
|
82
|
-
| "installation_tenant_mismatch"
|
|
83
|
+
| "installation_tenant_mismatch"
|
|
84
|
+
| "backend_load_failed"
|
|
85
|
+
| "backend_construction_failed"
|
|
86
|
+
| "ui_mount_failed"
|
|
87
|
+
| "boot_runner_unavailable"
|
|
88
|
+
| "boot_browser_binding_missing"
|
|
89
|
+
| "boot_clone_unavailable"
|
|
90
|
+
| "boot_timeout"
|
|
91
|
+
| "boot_cleanup_failed";
|
|
83
92
|
```
|
|
84
93
|
|
|
85
94
|
## Type Aliases
|
|
86
95
|
|
|
87
|
-
###
|
|
96
|
+
### AgentAvatarStore
|
|
88
97
|
|
|
89
98
|
```ts
|
|
90
|
-
type
|
|
99
|
+
type AgentAvatarStore = Readonly<{
|
|
100
|
+
read: {
|
|
101
|
+
v: z.ZodLiteral<1>;
|
|
102
|
+
character: z.ZodEnum<{
|
|
103
|
+
mushroom: "mushroom";
|
|
104
|
+
cat: "cat";
|
|
105
|
+
burger: "burger";
|
|
106
|
+
}>;
|
|
107
|
+
appearance: z.ZodRecord<
|
|
108
|
+
z.ZodString,
|
|
109
|
+
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
|
|
110
|
+
>;
|
|
111
|
+
expression: z.ZodString;
|
|
112
|
+
renderStyle: z.ZodEnum<{
|
|
113
|
+
plain: "plain";
|
|
114
|
+
pencil: "pencil";
|
|
115
|
+
manga: "manga";
|
|
116
|
+
riso: "riso";
|
|
117
|
+
halftone: "halftone";
|
|
118
|
+
blueprint: "blueprint";
|
|
119
|
+
crt: "crt";
|
|
120
|
+
watercolor: "watercolor";
|
|
121
|
+
}>;
|
|
122
|
+
};
|
|
123
|
+
write: void;
|
|
124
|
+
remove: void;
|
|
125
|
+
}>;
|
|
91
126
|
```
|
|
92
127
|
|
|
93
|
-
|
|
128
|
+
One owner-local store of chosen Agent avatars.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### UiBootCheckOutcome
|
|
133
|
+
|
|
134
|
+
```ts
|
|
135
|
+
type UiBootCheckOutcome = z.output<typeof uiBootCheckOutcomeSchema>;
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
A UI check result recorded on an installation operation, never installation
|
|
139
|
+
authority.
|
|
94
140
|
|
|
95
141
|
---
|
|
96
142
|
|
|
@@ -182,7 +228,12 @@ type InstancePorts<Host> = Readonly<{
|
|
|
182
228
|
read: () => Effect.Effect<Instance | null, Error>;
|
|
183
229
|
write: (instance) => Effect.Effect<void, Error>;
|
|
184
230
|
resolve: (release, scope) => Effect.Effect<Backend, Error>;
|
|
185
|
-
|
|
231
|
+
boot: (
|
|
232
|
+
backend,
|
|
233
|
+
priorStateSchema,
|
|
234
|
+
uiCheck,
|
|
235
|
+
) => Effect.Effect<UiBootCheckOutcome | null, Error>;
|
|
236
|
+
abort: (reason) => Effect.Effect<void, Error>;
|
|
186
237
|
purge: () => Effect.Effect<void, Error>;
|
|
187
238
|
connect: (backend, frame) => Effect.Effect<AppBackendConnection, Error>;
|
|
188
239
|
}>;
|
|
@@ -220,6 +271,7 @@ One admitted connection to a running App backend.
|
|
|
220
271
|
```ts
|
|
221
272
|
type AppInstance<Host> = Readonly<{
|
|
222
273
|
apply: (input) => Effect.Effect<Instance, Error>;
|
|
274
|
+
prepare: (input) => Effect.Effect<UiBootCheckOutcome | null, Error>;
|
|
223
275
|
fetch: (frame, request) => Effect.Effect<Response, Error>;
|
|
224
276
|
call: (frame, api, name, input) => Effect.Effect<AppMethodReply, Error>;
|
|
225
277
|
gill: (frame, api, source, input) => Effect.Effect<GillReply, Error>;
|
|
@@ -238,28 +290,196 @@ The lifecycle and admission operations of one App Instance.
|
|
|
238
290
|
| -------------- |
|
|
239
291
|
| `Host` |
|
|
240
292
|
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
### InstanceId
|
|
296
|
+
|
|
297
|
+
```ts
|
|
298
|
+
type InstanceId = CairnId<"app-instance", "instance">;
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
A stable App Instance ID minted by [instanceIds](#instanceids).
|
|
302
|
+
|
|
241
303
|
## Variables
|
|
242
304
|
|
|
243
|
-
###
|
|
305
|
+
### agentAvatarSchema
|
|
244
306
|
|
|
245
307
|
```ts
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
308
|
+
const agentAvatarSchema: ZodObject<
|
|
309
|
+
{
|
|
310
|
+
v: ZodLiteral<1>;
|
|
311
|
+
character: ZodEnum<{
|
|
312
|
+
mushroom: "mushroom";
|
|
313
|
+
cat: "cat";
|
|
314
|
+
burger: "burger";
|
|
315
|
+
}>;
|
|
316
|
+
appearance: ZodRecord<
|
|
317
|
+
ZodString,
|
|
318
|
+
ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>
|
|
319
|
+
>;
|
|
320
|
+
expression: ZodString;
|
|
321
|
+
renderStyle: ZodEnum<{
|
|
322
|
+
plain: "plain";
|
|
323
|
+
pencil: "pencil";
|
|
324
|
+
manga: "manga";
|
|
325
|
+
riso: "riso";
|
|
326
|
+
halftone: "halftone";
|
|
327
|
+
blueprint: "blueprint";
|
|
328
|
+
crt: "crt";
|
|
329
|
+
watercolor: "watercolor";
|
|
330
|
+
}>;
|
|
331
|
+
},
|
|
332
|
+
$strict
|
|
333
|
+
> = avatarSchema;
|
|
249
334
|
```
|
|
250
335
|
|
|
251
|
-
The
|
|
336
|
+
The catalog-valid avatar an owner may choose for an Agent.
|
|
252
337
|
|
|
253
338
|
---
|
|
254
339
|
|
|
255
|
-
###
|
|
340
|
+
### agentAvatarProjectionSchema
|
|
256
341
|
|
|
257
342
|
```ts
|
|
258
|
-
const
|
|
343
|
+
const agentAvatarProjectionSchema: ZodDiscriminatedUnion<
|
|
344
|
+
[
|
|
345
|
+
ZodObject<
|
|
346
|
+
{
|
|
347
|
+
v: ZodLiteral<1>;
|
|
348
|
+
character: ZodLiteral<"mushroom">;
|
|
349
|
+
appearance: ZodObject<
|
|
350
|
+
{
|
|
351
|
+
[key: string]: ZodOptional<
|
|
352
|
+
ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>
|
|
353
|
+
>;
|
|
354
|
+
},
|
|
355
|
+
$strict
|
|
356
|
+
>;
|
|
357
|
+
expression: ZodString;
|
|
358
|
+
renderStyle: ZodEnum<{
|
|
359
|
+
plain: "plain";
|
|
360
|
+
pencil: "pencil";
|
|
361
|
+
manga: "manga";
|
|
362
|
+
riso: "riso";
|
|
363
|
+
halftone: "halftone";
|
|
364
|
+
blueprint: "blueprint";
|
|
365
|
+
crt: "crt";
|
|
366
|
+
watercolor: "watercolor";
|
|
367
|
+
}>;
|
|
368
|
+
},
|
|
369
|
+
$strict
|
|
370
|
+
>,
|
|
371
|
+
ZodObject<
|
|
372
|
+
{
|
|
373
|
+
v: ZodLiteral<1>;
|
|
374
|
+
character: ZodLiteral<"cat">;
|
|
375
|
+
appearance: ZodObject<
|
|
376
|
+
{
|
|
377
|
+
[key: string]: ZodOptional<
|
|
378
|
+
ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>
|
|
379
|
+
>;
|
|
380
|
+
},
|
|
381
|
+
$strict
|
|
382
|
+
>;
|
|
383
|
+
expression: ZodString;
|
|
384
|
+
renderStyle: ZodEnum<{
|
|
385
|
+
plain: "plain";
|
|
386
|
+
pencil: "pencil";
|
|
387
|
+
manga: "manga";
|
|
388
|
+
riso: "riso";
|
|
389
|
+
halftone: "halftone";
|
|
390
|
+
blueprint: "blueprint";
|
|
391
|
+
crt: "crt";
|
|
392
|
+
watercolor: "watercolor";
|
|
393
|
+
}>;
|
|
394
|
+
},
|
|
395
|
+
$strict
|
|
396
|
+
>,
|
|
397
|
+
ZodObject<
|
|
398
|
+
{
|
|
399
|
+
v: ZodLiteral<1>;
|
|
400
|
+
character: ZodLiteral<"burger">;
|
|
401
|
+
appearance: ZodObject<
|
|
402
|
+
{
|
|
403
|
+
[key: string]: ZodOptional<
|
|
404
|
+
ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>
|
|
405
|
+
>;
|
|
406
|
+
},
|
|
407
|
+
$strict
|
|
408
|
+
>;
|
|
409
|
+
expression: ZodString;
|
|
410
|
+
renderStyle: ZodEnum<{
|
|
411
|
+
plain: "plain";
|
|
412
|
+
pencil: "pencil";
|
|
413
|
+
manga: "manga";
|
|
414
|
+
riso: "riso";
|
|
415
|
+
halftone: "halftone";
|
|
416
|
+
blueprint: "blueprint";
|
|
417
|
+
crt: "crt";
|
|
418
|
+
watercolor: "watercolor";
|
|
419
|
+
}>;
|
|
420
|
+
},
|
|
421
|
+
$strict
|
|
422
|
+
>,
|
|
423
|
+
],
|
|
424
|
+
"character"
|
|
425
|
+
>;
|
|
259
426
|
```
|
|
260
427
|
|
|
261
|
-
|
|
262
|
-
|
|
428
|
+
The avatar as a closed record, for contracts that refuse open maps (Hub
|
|
429
|
+
projections): each character's appearance names only its own controls, then the
|
|
430
|
+
catalog refines it exactly as `agentAvatarSchema` does.
|
|
431
|
+
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
### uiBootCheckOutcomeSchema
|
|
435
|
+
|
|
436
|
+
```ts
|
|
437
|
+
const uiBootCheckOutcomeSchema: ZodDiscriminatedUnion<[ZodObject<{
|
|
438
|
+
kind: ZodLiteral<"passed">;
|
|
439
|
+
}, $strict>, ZodObject<{
|
|
440
|
+
kind: ZodLiteral<"failed">;
|
|
441
|
+
code: ZodLiteral<"ui_mount_failed">;
|
|
442
|
+
diagnostics: ZodOptional<ZodObject<{
|
|
443
|
+
failedPredicate: ZodEnum<{
|
|
444
|
+
unexpected_candidate_request: "unexpected_candidate_request";
|
|
445
|
+
response_status: "response_status";
|
|
446
|
+
request_failed: "request_failed";
|
|
447
|
+
page_error: "page_error";
|
|
448
|
+
candidate_not_mounted: "candidate_not_mounted";
|
|
449
|
+
}>;
|
|
450
|
+
errorName: ZodOptional<ZodEnum<{
|
|
451
|
+
TypeError: "TypeError";
|
|
452
|
+
RangeError: "RangeError";
|
|
453
|
+
SyntaxError: "SyntaxError";
|
|
454
|
+
AbortError: "AbortError";
|
|
455
|
+
TimeoutError: "TimeoutError";
|
|
456
|
+
Other: "Other";
|
|
457
|
+
Error: "Error";
|
|
458
|
+
}>>;
|
|
459
|
+
finalUrlPath: ZodString;
|
|
460
|
+
consoleErrors: ZodArray<ZodPipe<ZodPipe<ZodString, ZodTransform<..., ...>>, ZodString>>;
|
|
461
|
+
pageErrors: ZodArray<ZodPipe<ZodPipe<ZodString, ZodTransform<..., ...>>, ZodString>>;
|
|
462
|
+
failedRequests: ZodArray<ZodObject<{
|
|
463
|
+
path: ZodString;
|
|
464
|
+
status: ZodOptional<...>;
|
|
465
|
+
failureKind: ZodOptional<...>;
|
|
466
|
+
}, $strict>>;
|
|
467
|
+
droppedCount: ZodNumber;
|
|
468
|
+
}, $strict>>;
|
|
469
|
+
}, $strict>, ZodObject<{
|
|
470
|
+
kind: ZodLiteral<"not_checked">;
|
|
471
|
+
code: ZodEnum<{
|
|
472
|
+
boot_runner_unavailable: "boot_runner_unavailable";
|
|
473
|
+
boot_browser_binding_missing: "boot_browser_binding_missing";
|
|
474
|
+
boot_clone_unavailable: "boot_clone_unavailable";
|
|
475
|
+
boot_timeout: "boot_timeout";
|
|
476
|
+
boot_cleanup_failed: "boot_cleanup_failed";
|
|
477
|
+
ui_check_not_run_on_host: "ui_check_not_run_on_host";
|
|
478
|
+
}>;
|
|
479
|
+
}, $strict>], "kind">;
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
A UI check recorded on an installation operation, never installation authority.
|
|
263
483
|
|
|
264
484
|
---
|
|
265
485
|
|
|
@@ -349,6 +569,7 @@ const appInstanceErrorCodeSchema: Literals<
|
|
|
349
569
|
"invalid_owner_state",
|
|
350
570
|
"invalid_invocation_facts",
|
|
351
571
|
"revoked",
|
|
572
|
+
"disabled",
|
|
352
573
|
"binding_not_granted",
|
|
353
574
|
"binding_unavailable",
|
|
354
575
|
"expired",
|
|
@@ -365,14 +586,95 @@ const appInstanceErrorCodeSchema: Literals<
|
|
|
365
586
|
"release_no_longer_matches_instance",
|
|
366
587
|
"instance_release_mismatch",
|
|
367
588
|
"installation_tenant_mismatch",
|
|
589
|
+
(
|
|
590
|
+
| "backend_load_failed"
|
|
591
|
+
| "backend_construction_failed"
|
|
592
|
+
| "ui_mount_failed"
|
|
593
|
+
| "boot_runner_unavailable"
|
|
594
|
+
| "boot_browser_binding_missing"
|
|
595
|
+
| "boot_clone_unavailable"
|
|
596
|
+
| "boot_timeout"
|
|
597
|
+
| "boot_cleanup_failed"
|
|
598
|
+
),
|
|
368
599
|
]
|
|
369
600
|
>;
|
|
370
601
|
```
|
|
371
602
|
|
|
372
603
|
The runtime owns the bounded rejection grammar, including across RPC.
|
|
373
604
|
|
|
605
|
+
---
|
|
606
|
+
|
|
607
|
+
### instanceIds
|
|
608
|
+
|
|
609
|
+
```ts
|
|
610
|
+
const instanceIds: Readonly<{
|
|
611
|
+
instance: IdCodec<"app-instance", "instance", 1>;
|
|
612
|
+
}>;
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
The Cairn ID family that mints and recognizes App Instance IDs (`instance_…`).
|
|
616
|
+
|
|
617
|
+
---
|
|
618
|
+
|
|
619
|
+
### instanceIdSchema
|
|
620
|
+
|
|
621
|
+
```ts
|
|
622
|
+
const instanceIdSchema: Schema.Codec<InstanceId, string>;
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
Decodes a string into an [InstanceId](#instanceid), rejecting any other ID
|
|
626
|
+
family.
|
|
627
|
+
|
|
374
628
|
## Functions
|
|
375
629
|
|
|
630
|
+
### avatarFromProjection()
|
|
631
|
+
|
|
632
|
+
```ts
|
|
633
|
+
function avatarFromProjection(projected): object;
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
A projected avatar as the Avatar descriptor Sprite draws.
|
|
637
|
+
|
|
638
|
+
#### Parameters
|
|
639
|
+
|
|
640
|
+
| Parameter | Type |
|
|
641
|
+
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
642
|
+
| `projected` | \| \{ `v`: `1`; `character`: `"mushroom"`; `appearance`: `Record`\<`string`, `string` \| `number` \| `boolean` \| `undefined`\>; `expression`: `string`; `renderStyle`: \| `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \| `"blueprint"` \| `"crt"` \| `"watercolor"`; \} \| \{ `v`: `1`; `character`: `"cat"`; `appearance`: `Record`\<`string`, `string` \| `number` \| `boolean` \| `undefined`\>; `expression`: `string`; `renderStyle`: \| `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \| `"blueprint"` \| `"crt"` \| `"watercolor"`; \} \| \{ `v`: `1`; `character`: `"burger"`; `appearance`: `Record`\<`string`, `string` \| `number` \| `boolean` \| `undefined`\>; `expression`: `string`; `renderStyle`: \| `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \| `"blueprint"` \| `"crt"` \| `"watercolor"`; \} |
|
|
643
|
+
|
|
644
|
+
#### Returns
|
|
645
|
+
|
|
646
|
+
`object`
|
|
647
|
+
|
|
648
|
+
| Name | Type |
|
|
649
|
+
| ------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
650
|
+
| `v` | `1` |
|
|
651
|
+
| `character` | `"mushroom"` \| `"cat"` \| `"burger"` |
|
|
652
|
+
| `appearance` | `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[`z.ZodString`, `z.ZodNumber`, `z.ZodBoolean`\]\>\> |
|
|
653
|
+
| `expression` | `string` |
|
|
654
|
+
| `renderStyle` | \| `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \| `"blueprint"` \| `"crt"` \| `"watercolor"` |
|
|
655
|
+
|
|
656
|
+
---
|
|
657
|
+
|
|
658
|
+
### createAgentAvatarStore()
|
|
659
|
+
|
|
660
|
+
```ts
|
|
661
|
+
function createAgentAvatarStore(sql): AgentAvatarStore;
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
Open the chosen-avatar table in the Agent directory's own SQLite.
|
|
665
|
+
|
|
666
|
+
#### Parameters
|
|
667
|
+
|
|
668
|
+
| Parameter | Type |
|
|
669
|
+
| --------- | ----------------------------------------------------------------------------------- |
|
|
670
|
+
| `sql` | `Readonly`\<\{ `exec`: (`statement`, ...`bindings`) => `WatchdogSqliteCursor`; \}\> |
|
|
671
|
+
|
|
672
|
+
#### Returns
|
|
673
|
+
|
|
674
|
+
[`AgentAvatarStore`](#agentavatarstore)
|
|
675
|
+
|
|
676
|
+
---
|
|
677
|
+
|
|
376
678
|
### selectionOf()
|
|
377
679
|
|
|
378
680
|
```ts
|
package/docs/api/keys.md
CHANGED
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
### OysterKeyCapability
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
|
-
type OysterKeyCapability =
|
|
16
|
+
type OysterKeyCapability =
|
|
17
|
+
"apps.read" | "apps.use" | "computer.use" | "machine.enroll";
|
|
17
18
|
```
|
|
18
19
|
|
|
19
20
|
Every capability an Oyster key may carry.
|
|
@@ -87,6 +88,8 @@ const oysterKeyVocabulary: GrantVocabulary<OysterKeyCapability>;
|
|
|
87
88
|
`apps.use` also reaches `apps.read` (one level, per `defineGrants`'s own
|
|
88
89
|
`implies`): a key that may change an App's data may also read it. `computer.use`
|
|
89
90
|
has no narrower capability under it; the Computer is on or off, host-wide.
|
|
91
|
+
`machine.enroll` admits enrollment only; it implies no App or Computer access.
|
|
92
|
+
The enrollment owner, not this vocabulary, owns one-use consumption.
|
|
90
93
|
|
|
91
94
|
---
|
|
92
95
|
|
|
@@ -173,3 +176,23 @@ Whether a live key's own grants turn its Computer access on. Off by default.
|
|
|
173
176
|
#### Returns
|
|
174
177
|
|
|
175
178
|
`boolean`
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
### keyAllowsMachineEnroll()
|
|
183
|
+
|
|
184
|
+
```ts
|
|
185
|
+
function keyAllowsMachineEnroll(key): boolean;
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Whether a live key's grants permit a one-use device enrollment.
|
|
189
|
+
|
|
190
|
+
#### Parameters
|
|
191
|
+
|
|
192
|
+
| Parameter | Type |
|
|
193
|
+
| --------- | --------------------------------- |
|
|
194
|
+
| `key` | [`LiveOysterKey`](#liveoysterkey) |
|
|
195
|
+
|
|
196
|
+
#### Returns
|
|
197
|
+
|
|
198
|
+
`boolean`
|