@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,204 @@
|
|
|
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) / shell/shell-module
|
|
8
|
+
|
|
9
|
+
# shell/shell-module
|
|
10
|
+
|
|
11
|
+
## Classes
|
|
12
|
+
|
|
13
|
+
### ShellModuleError
|
|
14
|
+
|
|
15
|
+
The picked shell's module could not be loaded or does not fit the contract.
|
|
16
|
+
|
|
17
|
+
#### Extends
|
|
18
|
+
|
|
19
|
+
- `Error`
|
|
20
|
+
|
|
21
|
+
#### Constructors
|
|
22
|
+
|
|
23
|
+
##### Constructor
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
new ShellModuleError(message?): ShellModuleError;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
###### Parameters
|
|
30
|
+
|
|
31
|
+
| Parameter | Type |
|
|
32
|
+
| ---------- | -------- |
|
|
33
|
+
| `message?` | `string` |
|
|
34
|
+
|
|
35
|
+
###### Returns
|
|
36
|
+
|
|
37
|
+
[`ShellModuleError`](#shellmoduleerror)
|
|
38
|
+
|
|
39
|
+
###### Inherited from
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
Error.constructor;
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
##### Constructor
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
new ShellModuleError(message?, options?): ShellModuleError;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
###### Parameters
|
|
52
|
+
|
|
53
|
+
| Parameter | Type |
|
|
54
|
+
| ---------- | -------------- |
|
|
55
|
+
| `message?` | `string` |
|
|
56
|
+
| `options?` | `ErrorOptions` |
|
|
57
|
+
|
|
58
|
+
###### Returns
|
|
59
|
+
|
|
60
|
+
[`ShellModuleError`](#shellmoduleerror)
|
|
61
|
+
|
|
62
|
+
###### Inherited from
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
Error.constructor;
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
#### Properties
|
|
69
|
+
|
|
70
|
+
##### name
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
readonly name: "ShellModuleError" = "ShellModuleError";
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
###### Overrides
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
Error.name;
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Type Aliases
|
|
83
|
+
|
|
84
|
+
### ShellMountInput
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
type ShellMountInput = Readonly<{
|
|
88
|
+
workbench: TeamWorkbenchHostHandle;
|
|
89
|
+
storage: AppStorage;
|
|
90
|
+
methods: Readonly<{
|
|
91
|
+
call: Promise<WhistleJsonValue>;
|
|
92
|
+
}>;
|
|
93
|
+
}>;
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
What a host hands the shell a Team picked. The host composes that shell into its
|
|
97
|
+
own top-level document, so it runs with the host's escalated permissions: the
|
|
98
|
+
workbench mounts each child App in its sandboxed frame, and `storage`/`methods`
|
|
99
|
+
are the shell installation's own desktop data.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### MountShell
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
type MountShell = (root, input) => Promise<() => void>;
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Render the shell into `root`; resolves once it is mounted, with the function
|
|
110
|
+
that removes it again. The shell loads its own code and styles.
|
|
111
|
+
|
|
112
|
+
#### Parameters
|
|
113
|
+
|
|
114
|
+
| Parameter | Type |
|
|
115
|
+
| --------- | ------------------------------------- |
|
|
116
|
+
| `root` | `HTMLElement` |
|
|
117
|
+
| `input` | [`ShellMountInput`](#shellmountinput) |
|
|
118
|
+
|
|
119
|
+
#### Returns
|
|
120
|
+
|
|
121
|
+
`Promise`\<() => `void`\>
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
### ShellPlatformControls
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
type ShellPlatformControls = Readonly<{
|
|
129
|
+
controls: WorkbenchHostControls;
|
|
130
|
+
suggestDesktopSettings: void;
|
|
131
|
+
dispose: void;
|
|
132
|
+
}>;
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Settings a shell renders for a host that has none of its own, such as a
|
|
136
|
+
standalone Oyster: the shell draws them into `root`, and the host hands
|
|
137
|
+
`controls` to its workbench so Apps and the dashboard can open them.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
### MountPlatformControls
|
|
142
|
+
|
|
143
|
+
```ts
|
|
144
|
+
type MountPlatformControls = (root, input) => Promise<ShellPlatformControls>;
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Render the shell's own Settings into `root` for the host at `teamId`.
|
|
148
|
+
|
|
149
|
+
#### Parameters
|
|
150
|
+
|
|
151
|
+
| Parameter | Type |
|
|
152
|
+
| --------- | --------------------------------------- |
|
|
153
|
+
| `root` | `HTMLElement` |
|
|
154
|
+
| `input` | `Readonly`\<\{ `teamId`: `string`; \}\> |
|
|
155
|
+
|
|
156
|
+
#### Returns
|
|
157
|
+
|
|
158
|
+
`Promise`\<[`ShellPlatformControls`](#shellplatformcontrols)\>
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### ShellModule
|
|
163
|
+
|
|
164
|
+
```ts
|
|
165
|
+
type ShellModule = Readonly<{
|
|
166
|
+
mountShell: MountShell;
|
|
167
|
+
mountPlatformControls: MountPlatformControls | null;
|
|
168
|
+
}>;
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
What a host gets from a picked shell Release's module.
|
|
172
|
+
|
|
173
|
+
## Functions
|
|
174
|
+
|
|
175
|
+
### importShellModule()
|
|
176
|
+
|
|
177
|
+
```ts
|
|
178
|
+
function importShellModule(
|
|
179
|
+
moduleUrl,
|
|
180
|
+
hostOrigin,
|
|
181
|
+
): Promise<
|
|
182
|
+
Readonly<{
|
|
183
|
+
mountShell: MountShell;
|
|
184
|
+
mountPlatformControls: MountPlatformControls | null;
|
|
185
|
+
}>
|
|
186
|
+
>;
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Import the picked shell Release's module from the host's own origin and check
|
|
190
|
+
that it exports `mountShell`, and `mountPlatformControls` when it offers its own
|
|
191
|
+
Settings. The host never bundles a shell.
|
|
192
|
+
|
|
193
|
+
#### Parameters
|
|
194
|
+
|
|
195
|
+
| Parameter | Type |
|
|
196
|
+
| ------------ | -------- |
|
|
197
|
+
| `moduleUrl` | `URL` |
|
|
198
|
+
| `hostOrigin` | `string` |
|
|
199
|
+
|
|
200
|
+
#### Returns
|
|
201
|
+
|
|
202
|
+
`Promise`\<`Readonly`\<\{ `mountShell`: [`MountShell`](#mountshell);
|
|
203
|
+
`mountPlatformControls`: [`MountPlatformControls`](#mountplatformcontrols) \|
|
|
204
|
+
`null`; \}\>\>
|
|
@@ -0,0 +1,267 @@
|
|
|
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) / shell/window-manager
|
|
8
|
+
|
|
9
|
+
# shell/window-manager
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### WindowLaunch
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type WindowLaunch = Readonly<{
|
|
17
|
+
windowId: string;
|
|
18
|
+
}>;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Minimum identity required to own a window across mount generations.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
### WindowStatus
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
type WindowStatus = "loading" | "ready" | "minimized" | "error";
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Current presentation state of a managed window.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### WindowHost
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
type WindowHost<Launch> = Readonly<{
|
|
39
|
+
setVisibility: (visibility) => void | Promise<void>;
|
|
40
|
+
reconfigure: (launch, signal?) => void | Promise<void>;
|
|
41
|
+
requestClose?: () => boolean | Promise<boolean>;
|
|
42
|
+
requestBack?: () => boolean | Promise<boolean>;
|
|
43
|
+
activateStatus?: (action) => boolean | Promise<boolean>;
|
|
44
|
+
dispose: () => void | Promise<void>;
|
|
45
|
+
}>;
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Mount operations supplied by the embedding host; selection and authority stay
|
|
49
|
+
with it.
|
|
50
|
+
|
|
51
|
+
#### Type Parameters
|
|
52
|
+
|
|
53
|
+
| Type Parameter |
|
|
54
|
+
| -------------------------------------------------- |
|
|
55
|
+
| `Launch` _extends_ [`WindowLaunch`](#windowlaunch) |
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### WindowEvents
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
type WindowEvents = Readonly<{
|
|
63
|
+
onComputerChoice: () => Promise<void>;
|
|
64
|
+
onNavigationState: (state) => void;
|
|
65
|
+
onStatusItems: (items) => void;
|
|
66
|
+
}>;
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
What a mounted App tells its window while it lives.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### WindowProjection
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
type WindowProjection<Launch, Container> = Readonly<{
|
|
77
|
+
windowId: string;
|
|
78
|
+
launch: Launch;
|
|
79
|
+
container: Container;
|
|
80
|
+
status: WindowStatus;
|
|
81
|
+
generation: number;
|
|
82
|
+
error?: unknown;
|
|
83
|
+
cleanupError?: unknown;
|
|
84
|
+
navigation: AppNavigationState | null;
|
|
85
|
+
statusItems: readonly AppStatusItem[];
|
|
86
|
+
}>;
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Immutable snapshot of one window and its mount generation.
|
|
90
|
+
|
|
91
|
+
#### Type Parameters
|
|
92
|
+
|
|
93
|
+
| Type Parameter |
|
|
94
|
+
| -------------------------------------------------- |
|
|
95
|
+
| `Launch` _extends_ [`WindowLaunch`](#windowlaunch) |
|
|
96
|
+
| `Container` |
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### WindowsProjection
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
type WindowsProjection<Launch, Container> = Readonly<{
|
|
104
|
+
windows: readonly WindowProjection<Launch, Container>[];
|
|
105
|
+
}>;
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Current ordered collection of managed window snapshots.
|
|
109
|
+
|
|
110
|
+
#### Type Parameters
|
|
111
|
+
|
|
112
|
+
| Type Parameter |
|
|
113
|
+
| -------------------------------------------------- |
|
|
114
|
+
| `Launch` _extends_ [`WindowLaunch`](#windowlaunch) |
|
|
115
|
+
| `Container` |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### WindowMount
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
type WindowMount<Launch, Container> = (
|
|
123
|
+
container,
|
|
124
|
+
launch,
|
|
125
|
+
signal,
|
|
126
|
+
events,
|
|
127
|
+
) => WindowHost<Launch> | Promise<WindowHost<Launch>>;
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Create a host-owned mount in a container, observing cancellation and navigation.
|
|
131
|
+
|
|
132
|
+
#### Type Parameters
|
|
133
|
+
|
|
134
|
+
| Type Parameter |
|
|
135
|
+
| -------------------------------------------------- |
|
|
136
|
+
| `Launch` _extends_ [`WindowLaunch`](#windowlaunch) |
|
|
137
|
+
| `Container` |
|
|
138
|
+
|
|
139
|
+
#### Parameters
|
|
140
|
+
|
|
141
|
+
| Parameter | Type |
|
|
142
|
+
| ----------- | ------------------------------- |
|
|
143
|
+
| `container` | `Container` |
|
|
144
|
+
| `launch` | `Launch` |
|
|
145
|
+
| `signal` | `AbortSignal` |
|
|
146
|
+
| `events` | [`WindowEvents`](#windowevents) |
|
|
147
|
+
|
|
148
|
+
#### Returns
|
|
149
|
+
|
|
150
|
+
\| [`WindowHost`](#windowhost)\<`Launch`\> \|
|
|
151
|
+
`Promise`\<[`WindowHost`](#windowhost)\<`Launch`\>\>
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
### WindowManager
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
type WindowManager<Launch, Container> = Readonly<{
|
|
159
|
+
open: (launch) => Promise<void>;
|
|
160
|
+
attach: (windowId) => void;
|
|
161
|
+
minimize: (windowId) => Promise<void>;
|
|
162
|
+
restore: (windowId) => Promise<void>;
|
|
163
|
+
hideAll: () => Promise<void>;
|
|
164
|
+
restoreHidden: () => Promise<void>;
|
|
165
|
+
close: (windowId) => Promise<void>;
|
|
166
|
+
reconfigure: (windowId, launch) => Promise<void>;
|
|
167
|
+
update: (windowId, derive) => Promise<void>;
|
|
168
|
+
replace: (windowId, launch) => Promise<void>;
|
|
169
|
+
back: (windowId) => Promise<boolean>;
|
|
170
|
+
activateStatus: (windowId, action) => Promise<boolean>;
|
|
171
|
+
registerComputerChoice: (windowId, handler) => () => void;
|
|
172
|
+
dispose: () => Promise<void>;
|
|
173
|
+
read: () => WindowsProjection<Launch, Container>;
|
|
174
|
+
subscribe: (listener) => () => void;
|
|
175
|
+
}>;
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Own window lifetimes, visibility and serialized host mutations.
|
|
179
|
+
|
|
180
|
+
#### Type Parameters
|
|
181
|
+
|
|
182
|
+
| Type Parameter |
|
|
183
|
+
| -------------------------------------------------- |
|
|
184
|
+
| `Launch` _extends_ [`WindowLaunch`](#windowlaunch) |
|
|
185
|
+
| `Container` |
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
### WindowManagerOptions
|
|
190
|
+
|
|
191
|
+
```ts
|
|
192
|
+
type WindowManagerOptions<Launch, Container> = Readonly<{
|
|
193
|
+
mount: WindowMount<Launch, Container>;
|
|
194
|
+
createContainer: (launch) => Container;
|
|
195
|
+
waitForAttachment?: boolean;
|
|
196
|
+
onFailure?: (failure) => void;
|
|
197
|
+
isAttached?: (container) => boolean;
|
|
198
|
+
validateReconfiguration?: (current, next) => void;
|
|
199
|
+
isChromeOnlyChange?: (current, next) => boolean;
|
|
200
|
+
}>;
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Host adapters used to create, attach and validate window mounts.
|
|
204
|
+
|
|
205
|
+
#### Type Parameters
|
|
206
|
+
|
|
207
|
+
| Type Parameter |
|
|
208
|
+
| -------------------------------------------------- |
|
|
209
|
+
| `Launch` _extends_ [`WindowLaunch`](#windowlaunch) |
|
|
210
|
+
| `Container` |
|
|
211
|
+
|
|
212
|
+
## Functions
|
|
213
|
+
|
|
214
|
+
### hasVisibleWindows()
|
|
215
|
+
|
|
216
|
+
```ts
|
|
217
|
+
function hasVisibleWindows<Launch, Container>(projection): boolean;
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Whether any projected App window is still visible in the workspace.
|
|
221
|
+
|
|
222
|
+
#### Type Parameters
|
|
223
|
+
|
|
224
|
+
| Type Parameter |
|
|
225
|
+
| ------------------------------------------------------------ |
|
|
226
|
+
| `Launch` _extends_ `Readonly`\<\{ `windowId`: `string`; \}\> |
|
|
227
|
+
| `Container` |
|
|
228
|
+
|
|
229
|
+
#### Parameters
|
|
230
|
+
|
|
231
|
+
| Parameter | Type |
|
|
232
|
+
| ------------ | ------------------------------------------------------------------ |
|
|
233
|
+
| `projection` | [`WindowsProjection`](#windowsprojection)\<`Launch`, `Container`\> |
|
|
234
|
+
|
|
235
|
+
#### Returns
|
|
236
|
+
|
|
237
|
+
`boolean`
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
### createWindowManager()
|
|
242
|
+
|
|
243
|
+
```ts
|
|
244
|
+
function createWindowManager<Launch, Container>(
|
|
245
|
+
options,
|
|
246
|
+
): WindowManager<Launch, Container>;
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Owns App-window generations while leaving selection and App authority to the
|
|
250
|
+
caller. A stale mount is always disposed when it eventually resolves.
|
|
251
|
+
|
|
252
|
+
#### Type Parameters
|
|
253
|
+
|
|
254
|
+
| Type Parameter |
|
|
255
|
+
| ------------------------------------------------------------ |
|
|
256
|
+
| `Launch` _extends_ `Readonly`\<\{ `windowId`: `string`; \}\> |
|
|
257
|
+
| `Container` |
|
|
258
|
+
|
|
259
|
+
#### Parameters
|
|
260
|
+
|
|
261
|
+
| Parameter | Type |
|
|
262
|
+
| --------- | ------------------------------------------------------------------------ |
|
|
263
|
+
| `options` | [`WindowManagerOptions`](#windowmanageroptions)\<`Launch`, `Container`\> |
|
|
264
|
+
|
|
265
|
+
#### Returns
|
|
266
|
+
|
|
267
|
+
[`WindowManager`](#windowmanager)\<`Launch`, `Container`\>
|
|
@@ -0,0 +1,119 @@
|
|
|
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) / shell/workbench-directory
|
|
8
|
+
|
|
9
|
+
# shell/workbench-directory
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### WorkbenchDirectory
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type WorkbenchDirectory = z.output<typeof workbenchDirectorySchema>;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
One host's current desktop rows and actual role selections.
|
|
20
|
+
|
|
21
|
+
## Variables
|
|
22
|
+
|
|
23
|
+
### workbenchDirectorySchema
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
const workbenchDirectorySchema: ZodPipe<ZodObject<{
|
|
27
|
+
apps: ZodArray<ZodObject<{
|
|
28
|
+
address: ZodUnion<readonly [ZodObject<{
|
|
29
|
+
kind: ZodLiteral<...>;
|
|
30
|
+
appId: ZodString;
|
|
31
|
+
}, $strict>, ZodObject<{
|
|
32
|
+
kind: ZodLiteral<...>;
|
|
33
|
+
installationId: ZodString;
|
|
34
|
+
}, $strict>]>;
|
|
35
|
+
installationId: ZodNullable<ZodString>;
|
|
36
|
+
surfaceId: ZodString;
|
|
37
|
+
appId: ZodString;
|
|
38
|
+
displayName: ZodOptional<ZodString>;
|
|
39
|
+
icon: ZodOptional<ZodNullable<ZodString>>;
|
|
40
|
+
releaseId: ZodNullable<ZodString>;
|
|
41
|
+
authorityVersion: ZodNumber;
|
|
42
|
+
enforcement: ZodNullable<ZodObject<{
|
|
43
|
+
requestId: ZodString;
|
|
44
|
+
address: ZodUnion<readonly [..., ...]>;
|
|
45
|
+
authorityVersion: ZodNumber;
|
|
46
|
+
state: ZodEnum<{
|
|
47
|
+
unaffected: ...;
|
|
48
|
+
pending: ...;
|
|
49
|
+
applied: ...;
|
|
50
|
+
expired: ...;
|
|
51
|
+
}>;
|
|
52
|
+
outstanding: ZodNumber;
|
|
53
|
+
}, $strict>>;
|
|
54
|
+
handlers: ZodArray<ZodLiteral<"file.open">>;
|
|
55
|
+
roles: ZodArray<ZodString>;
|
|
56
|
+
declaredCapabilities: ZodArray<ZodString>;
|
|
57
|
+
calls: ZodOptional<ZodPipe<ZodUnknown, ZodTransform<readonly object[], unknown>>>;
|
|
58
|
+
commands: ZodPipe<ZodArray<ZodUnknown>, ZodTransform<Readonly<{
|
|
59
|
+
id: ...;
|
|
60
|
+
title: ...;
|
|
61
|
+
category: ...;
|
|
62
|
+
description?: ...;
|
|
63
|
+
sigil?: ...;
|
|
64
|
+
projections?: ...;
|
|
65
|
+
}>[], unknown[]>>;
|
|
66
|
+
gills: ZodPipe<ZodArray<ZodUnknown>, ZodTransform<AppDirectoryGill[], unknown[]>>;
|
|
67
|
+
availability: ZodEnum<{
|
|
68
|
+
available: "available";
|
|
69
|
+
unavailable: "unavailable";
|
|
70
|
+
}>;
|
|
71
|
+
surface: ZodNullable<ZodObject<{
|
|
72
|
+
stableRoute: ZodString;
|
|
73
|
+
}, $strict>>;
|
|
74
|
+
surfacePath: ZodString;
|
|
75
|
+
computer: ZodOptional<ZodObject<{
|
|
76
|
+
computerId: ZodString;
|
|
77
|
+
name: ZodString;
|
|
78
|
+
}, $strip>>;
|
|
79
|
+
computerPermission: ZodOptional<ZodNullable<ZodDiscriminatedUnion<[ZodObject<..., ...>, ZodObject<..., ...>], "kind">>>;
|
|
80
|
+
}, $strip>>;
|
|
81
|
+
computer: ZodOptional<ZodObject<{
|
|
82
|
+
computerId: ZodString;
|
|
83
|
+
name: ZodString;
|
|
84
|
+
}, $strip>>;
|
|
85
|
+
roles: ZodRecord<ZodString, ZodObject<{
|
|
86
|
+
surfaceId: ZodNullable<ZodString>;
|
|
87
|
+
chosen: ZodBoolean;
|
|
88
|
+
}, $strict>>;
|
|
89
|
+
needsUpdate: ZodOptional<ZodArray<ZodObject<{
|
|
90
|
+
installationId: ZodNullable<ZodString>;
|
|
91
|
+
appId: ZodNullable<ZodString>;
|
|
92
|
+
displayName: ZodString;
|
|
93
|
+
}, $strict>>>;
|
|
94
|
+
}, $strip>, ZodTransform<{
|
|
95
|
+
apps: object[];
|
|
96
|
+
computer?: {
|
|
97
|
+
computerId: string;
|
|
98
|
+
name: string;
|
|
99
|
+
};
|
|
100
|
+
roles: Record<string, {
|
|
101
|
+
surfaceId: string | null;
|
|
102
|
+
chosen: boolean;
|
|
103
|
+
}>;
|
|
104
|
+
needsUpdate?: object[];
|
|
105
|
+
}, {
|
|
106
|
+
apps: object[];
|
|
107
|
+
computer?: {
|
|
108
|
+
computerId: string;
|
|
109
|
+
name: string;
|
|
110
|
+
};
|
|
111
|
+
roles: Record<string, {
|
|
112
|
+
surfaceId: string | null;
|
|
113
|
+
chosen: boolean;
|
|
114
|
+
}>;
|
|
115
|
+
needsUpdate?: object[];
|
|
116
|
+
}>>;
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Desktop metadata shared by hosts; hosted administration stays in Settings.
|