@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,224 @@
|
|
|
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/command-host
|
|
8
|
+
|
|
9
|
+
# shell/command-host
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### AppCommandOptional
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type AppCommandOptional<T> = T | undefined;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
An optional field a declaration may carry as explicitly undefined.
|
|
20
|
+
|
|
21
|
+
#### Type Parameters
|
|
22
|
+
|
|
23
|
+
| Type Parameter |
|
|
24
|
+
| -------------- |
|
|
25
|
+
| `T` |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### AppCommandDeclaration
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
type AppCommandDeclaration = Readonly<{
|
|
33
|
+
id: string;
|
|
34
|
+
title: string;
|
|
35
|
+
category: string;
|
|
36
|
+
description?: AppCommandOptional<string>;
|
|
37
|
+
projections?: AppCommandOptional<
|
|
38
|
+
Readonly<{
|
|
39
|
+
bindings?: AppCommandOptional<
|
|
40
|
+
Readonly<{
|
|
41
|
+
order?: AppCommandOptional<number>;
|
|
42
|
+
values: readonly string[];
|
|
43
|
+
}>
|
|
44
|
+
>;
|
|
45
|
+
agent?: AppCommandOptional<
|
|
46
|
+
Readonly<{
|
|
47
|
+
order?: AppCommandOptional<number>;
|
|
48
|
+
keybind?: AppCommandOptional<string>;
|
|
49
|
+
}>
|
|
50
|
+
>;
|
|
51
|
+
help?: AppCommandOptional<
|
|
52
|
+
Readonly<{
|
|
53
|
+
order?: AppCommandOptional<number>;
|
|
54
|
+
}>
|
|
55
|
+
>;
|
|
56
|
+
menu?: AppCommandOptional<
|
|
57
|
+
Readonly<{
|
|
58
|
+
order?: AppCommandOptional<number>;
|
|
59
|
+
}>
|
|
60
|
+
>;
|
|
61
|
+
palette?: AppCommandOptional<
|
|
62
|
+
Readonly<{
|
|
63
|
+
order?: AppCommandOptional<number>;
|
|
64
|
+
}>
|
|
65
|
+
>;
|
|
66
|
+
slash?: AppCommandOptional<
|
|
67
|
+
Readonly<{
|
|
68
|
+
order?: AppCommandOptional<number>;
|
|
69
|
+
aliases: readonly string[];
|
|
70
|
+
}>
|
|
71
|
+
>;
|
|
72
|
+
}>
|
|
73
|
+
>;
|
|
74
|
+
}>;
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The digest-covered command rows a mounted App's Release declares, as the host
|
|
78
|
+
receives them. Oyster compares and projects them; the Release declaration
|
|
79
|
+
grammar stays with its owner, which hands rows of this shape.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### AppSurfaceCommandMount
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
type AppSurfaceCommandMount = Readonly<{
|
|
87
|
+
handlers: Pick<AppHostHandlers, "registerCommands" | "invokeReservedChord">;
|
|
88
|
+
dispose: () => void;
|
|
89
|
+
}>;
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The command side of one mounted App's host handlers.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
### PaneCommands
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
type PaneCommands = Readonly<{
|
|
100
|
+
commandId: (id) => string;
|
|
101
|
+
contribute: (commands) => WhistleContributionLease;
|
|
102
|
+
execute: WhistleRuntime["execute"];
|
|
103
|
+
snapshot: WhistleRuntime["snapshot"];
|
|
104
|
+
subscribe: WhistleRuntime["subscribe"];
|
|
105
|
+
present: WhistleRuntime["present"];
|
|
106
|
+
}>;
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Commands owned by one pane, projected to globals plus its focus scope.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### PaneCommandMount
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
type PaneCommandMount = PaneCommands &
|
|
117
|
+
Readonly<{
|
|
118
|
+
dispose: () => void;
|
|
119
|
+
}>;
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Closing a pane withdraws all its leases, presenters and subscriptions.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
### AppSurfaceCommandHost
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
type AppSurfaceCommandHost = Readonly<{
|
|
130
|
+
mountPane: (paneId) => PaneCommandMount;
|
|
131
|
+
mount: (mountId, declarations) => AppSurfaceCommandMount;
|
|
132
|
+
focus: (mountId) => void;
|
|
133
|
+
registerShellCommands: (commands) => () => void;
|
|
134
|
+
registerDirectoryCommands: (commands, run) => () => void;
|
|
135
|
+
menu: () => readonly WhistleMenuProjection[];
|
|
136
|
+
active: () => WhistleSnapshot;
|
|
137
|
+
execute: (commandId, input) => Promise<WhistleExecutionOutcome>;
|
|
138
|
+
snapshot: () => WhistleSnapshot;
|
|
139
|
+
subscribe: (listener) => () => void;
|
|
140
|
+
dispose: () => void;
|
|
141
|
+
}>;
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The shell-owned Whistle graph and its focused menu projection.
|
|
145
|
+
|
|
146
|
+
## Variables
|
|
147
|
+
|
|
148
|
+
### appDirectorySourceId
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
const appDirectorySourceId: "app-directory" = "app-directory";
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Whistle source of Release-advertised rows for Apps not yet mounted.
|
|
155
|
+
|
|
156
|
+
## Functions
|
|
157
|
+
|
|
158
|
+
### commandPaletteReservedChordForPlatform()
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
function commandPaletteReservedChordForPlatform(mac): AppHostReservedChord;
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Select the shell command-palette chord for a Mac or non-Mac keyboard.
|
|
165
|
+
|
|
166
|
+
#### Parameters
|
|
167
|
+
|
|
168
|
+
| Parameter | Type |
|
|
169
|
+
| --------- | --------- |
|
|
170
|
+
| `mac` | `boolean` |
|
|
171
|
+
|
|
172
|
+
#### Returns
|
|
173
|
+
|
|
174
|
+
`AppHostReservedChord`
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
### commandPaletteReservedChordForUserAgent()
|
|
179
|
+
|
|
180
|
+
```ts
|
|
181
|
+
function commandPaletteReservedChordForUserAgent(
|
|
182
|
+
userAgent,
|
|
183
|
+
): AppHostReservedChord;
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Select the shell command-palette chord from the embedding browser user agent.
|
|
187
|
+
|
|
188
|
+
#### Parameters
|
|
189
|
+
|
|
190
|
+
| Parameter | Type |
|
|
191
|
+
| ----------- | -------- |
|
|
192
|
+
| `userAgent` | `string` |
|
|
193
|
+
|
|
194
|
+
#### Returns
|
|
195
|
+
|
|
196
|
+
`AppHostReservedChord`
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
### createAppSurfaceCommandHost()
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
function createAppSurfaceCommandHost(whistle?): AppSurfaceCommandHost;
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Own one shell's Whistle runtime for mounted Apps and local panes. The embedding
|
|
207
|
+
host supplies verified Release declarations and decides which App or pane has
|
|
208
|
+
focus.
|
|
209
|
+
|
|
210
|
+
Agar invokes `registerCommands` once for the aggregate command set of a mount.
|
|
211
|
+
The adapter keeps that aggregate as one Whistle generation, so an Agar update
|
|
212
|
+
replaces the generation atomically and disposal releases only that App. Command
|
|
213
|
+
handlers remain the App's callback; the shell only adds the Whistle identity and
|
|
214
|
+
routes focused menu execution to it.
|
|
215
|
+
|
|
216
|
+
#### Parameters
|
|
217
|
+
|
|
218
|
+
| Parameter | Type |
|
|
219
|
+
| --------- | ---------------- |
|
|
220
|
+
| `whistle` | `WhistleRuntime` |
|
|
221
|
+
|
|
222
|
+
#### Returns
|
|
223
|
+
|
|
224
|
+
[`AppSurfaceCommandHost`](#appsurfacecommandhost)
|
|
@@ -0,0 +1,197 @@
|
|
|
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/commands
|
|
8
|
+
|
|
9
|
+
# shell/commands
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### ShellActions
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type ShellActions = Readonly<{
|
|
17
|
+
openApp: () => void;
|
|
18
|
+
showKeys: () => void;
|
|
19
|
+
showCommandLine: () => void;
|
|
20
|
+
focusStep: (step) => void;
|
|
21
|
+
swapStep: (step) => void;
|
|
22
|
+
toggleZoom: () => void;
|
|
23
|
+
back?: () => void;
|
|
24
|
+
}>;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The behavior supplied by either a browser or terminal workspace shell.
|
|
28
|
+
|
|
29
|
+
## Variables
|
|
30
|
+
|
|
31
|
+
### backBinding
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
const backBinding: "<leader> [" = "<leader> [";
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The Back binding, also shown by the shell in window chrome.
|
|
38
|
+
|
|
39
|
+
## Functions
|
|
40
|
+
|
|
41
|
+
### shellCommands()
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
function shellCommands(actions): readonly Readonly<{
|
|
45
|
+
id: string;
|
|
46
|
+
title: string;
|
|
47
|
+
category: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
projections?: {
|
|
50
|
+
bindings?: {
|
|
51
|
+
order?: number;
|
|
52
|
+
values: readonly string[];
|
|
53
|
+
};
|
|
54
|
+
agent?: {
|
|
55
|
+
keybind?: string;
|
|
56
|
+
order?: number;
|
|
57
|
+
};
|
|
58
|
+
help?: {
|
|
59
|
+
order?: number;
|
|
60
|
+
};
|
|
61
|
+
menu?: {
|
|
62
|
+
order?: number;
|
|
63
|
+
};
|
|
64
|
+
palette?: {
|
|
65
|
+
order?: number;
|
|
66
|
+
};
|
|
67
|
+
slash?: {
|
|
68
|
+
aliases: readonly string[];
|
|
69
|
+
order?: number;
|
|
70
|
+
arguments?: {
|
|
71
|
+
hint: string;
|
|
72
|
+
words?: readonly ...[];
|
|
73
|
+
text?: {
|
|
74
|
+
field: ...;
|
|
75
|
+
arguments: ...;
|
|
76
|
+
requestIdField?: ...;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
action?: {
|
|
82
|
+
inputSchema?: {
|
|
83
|
+
[key: string]:
|
|
84
|
+
| string
|
|
85
|
+
| number
|
|
86
|
+
| boolean
|
|
87
|
+
| readonly string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | ... 4 more ... | null)[] | { ...; } | null)[] | { ...; } | null)[] | { ...; } | ...[]
|
|
88
|
+
| {
|
|
89
|
+
[key: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | ... 4 more ... | null)[] | { ...; } | null)[] | { ...; } | null)[] | { ...; } | ...;
|
|
90
|
+
}
|
|
91
|
+
| null;
|
|
92
|
+
};
|
|
93
|
+
outputSchema?: {
|
|
94
|
+
[key: string]:
|
|
95
|
+
| string
|
|
96
|
+
| number
|
|
97
|
+
| boolean
|
|
98
|
+
| readonly string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | ... 4 more ... | null)[] | { ...; } | null)[] | { ...; } | null)[] | { ...; } | ...[]
|
|
99
|
+
| {
|
|
100
|
+
[key: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | ... 4 more ... | null)[] | { ...; } | null)[] | { ...; } | null)[] | { ...; } | ...;
|
|
101
|
+
}
|
|
102
|
+
| null;
|
|
103
|
+
};
|
|
104
|
+
presentation?: | {
|
|
105
|
+
type: "action";
|
|
106
|
+
}
|
|
107
|
+
| {
|
|
108
|
+
type: "custom";
|
|
109
|
+
data: {
|
|
110
|
+
[key: string]:
|
|
111
|
+
| string
|
|
112
|
+
| number
|
|
113
|
+
| boolean
|
|
114
|
+
| readonly string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | ... 4 more ... | null)[] | { ...; } | null)[] | { ...; } | null)[] | { ...; } | ...[]
|
|
115
|
+
| {
|
|
116
|
+
[key: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | ... 4 more ... | null)[] | { ...; } | null)[] | { ...; } | null)[] | { ...; } | ...;
|
|
117
|
+
}
|
|
118
|
+
| null;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
| {
|
|
122
|
+
type: "choice";
|
|
123
|
+
options: readonly object[];
|
|
124
|
+
}
|
|
125
|
+
| {
|
|
126
|
+
type: "form";
|
|
127
|
+
submitLabel?: string;
|
|
128
|
+
}
|
|
129
|
+
| {
|
|
130
|
+
type: "confirmation";
|
|
131
|
+
message: string;
|
|
132
|
+
confirmLabel?: string;
|
|
133
|
+
cancelLabel?: string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
availability?: () => WhistleAvailability;
|
|
137
|
+
handler: (input) => unknown;
|
|
138
|
+
}>[];
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Shared workspace declarations. Window moves have direct Alt chords and leader
|
|
142
|
+
keys; global actions live behind the shell-owned leader.
|
|
143
|
+
|
|
144
|
+
#### Parameters
|
|
145
|
+
|
|
146
|
+
| Parameter | Type |
|
|
147
|
+
| --------- | ------------------------------- |
|
|
148
|
+
| `actions` | [`ShellActions`](#shellactions) |
|
|
149
|
+
|
|
150
|
+
#### Returns
|
|
151
|
+
|
|
152
|
+
readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`;
|
|
153
|
+
`description?`: `string`; `projections?`: \{ `bindings?`: \{ `order?`: `number`;
|
|
154
|
+
`values`: readonly `string`[]; \}; `agent?`: \{ `keybind?`: `string`; `order?`:
|
|
155
|
+
`number`; \}; `help?`: \{ `order?`: `number`; \}; `menu?`: \{ `order?`:
|
|
156
|
+
`number`; \}; `palette?`: \{ `order?`: `number`; \}; `slash?`: \{ `aliases`:
|
|
157
|
+
readonly `string`[]; `order?`: `number`; `arguments?`: \{ `hint`: `string`;
|
|
158
|
+
`words?`: readonly ...[]; `text?`: \{ `field`: ...; `arguments`: ...;
|
|
159
|
+
`requestIdField?`: ...; \}; \}; \}; \}; `action?`: \{ `inputSchema?`: \{
|
|
160
|
+
\[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \|
|
|
161
|
+
number \| boolean \| readonly (string \| number \| boolean \| readonly (string
|
|
162
|
+
\| number \| boolean \| readonly (string \| number \| boolean \| readonly
|
|
163
|
+
(string \| number \| boolean \| readonly (string \| number \| boolean \|
|
|
164
|
+
readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
|
|
165
|
+
...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \|
|
|
166
|
+
number \| boolean \| readonly (string \| number \| boolean \| readonly (string
|
|
167
|
+
\| number \| boolean \| readonly (string \| number \| boolean \| readonly
|
|
168
|
+
(string \| number \| boolean \| readonly (string \| number \| boolean \|
|
|
169
|
+
readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
|
|
170
|
+
...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `outputSchema?`: \{
|
|
171
|
+
\[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \|
|
|
172
|
+
number \| boolean \| readonly (string \| number \| boolean \| readonly (string
|
|
173
|
+
\| number \| boolean \| readonly (string \| number \| boolean \| readonly
|
|
174
|
+
(string \| number \| boolean \| readonly (string \| number \| boolean \|
|
|
175
|
+
readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
|
|
176
|
+
...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \|
|
|
177
|
+
number \| boolean \| readonly (string \| number \| boolean \| readonly (string
|
|
178
|
+
\| number \| boolean \| readonly (string \| number \| boolean \| readonly
|
|
179
|
+
(string \| number \| boolean \| readonly (string \| number \| boolean \|
|
|
180
|
+
readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
|
|
181
|
+
...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `presentation?`: \|
|
|
182
|
+
\{ `type`: `"action"`; \} \| \{ `type`: `"custom"`; `data`: \{ \[`key`:
|
|
183
|
+
`string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \|
|
|
184
|
+
boolean \| readonly (string \| number \| boolean \| readonly (string \| number
|
|
185
|
+
\| boolean \| readonly (string \| number \| boolean \| readonly (string \|
|
|
186
|
+
number \| boolean \| readonly (string \| number \| boolean \| readonly (string
|
|
187
|
+
\| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \|
|
|
188
|
+
null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \|
|
|
189
|
+
boolean \| readonly (string \| number \| boolean \| readonly (string \| number
|
|
190
|
+
\| boolean \| readonly (string \| number \| boolean \| readonly (string \|
|
|
191
|
+
number \| boolean \| readonly (string \| number \| boolean \| readonly (string
|
|
192
|
+
\| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \|
|
|
193
|
+
null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; \} \| \{ `type`: `"choice"`;
|
|
194
|
+
`options`: readonly `object`[]; \} \| \{ `type`: `"form"`; `submitLabel?`:
|
|
195
|
+
`string`; \} \| \{ `type`: `"confirmation"`; `message`: `string`;
|
|
196
|
+
`confirmLabel?`: `string`; `cancelLabel?`: `string`; \}; \}; `availability?`: ()
|
|
197
|
+
=> `WhistleAvailability`; `handler`: (`input`) => `unknown`; \}\>[]
|
|
@@ -0,0 +1,183 @@
|
|
|
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/keys
|
|
8
|
+
|
|
9
|
+
# shell/keys
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### ShellChord
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type ShellChord = Readonly<{
|
|
17
|
+
key: string;
|
|
18
|
+
alt: boolean;
|
|
19
|
+
ctrl: boolean;
|
|
20
|
+
meta: boolean;
|
|
21
|
+
shift: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
One physical chord parsed from a Whistle binding such as `alt+left`.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### KeyEventFacts
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
type KeyEventFacts = Pick<
|
|
33
|
+
KeyboardEvent,
|
|
34
|
+
"altKey" | "ctrlKey" | "key" | "metaKey" | "shiftKey"
|
|
35
|
+
>;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Keyboard facts shared by DOM events and terminal adapters.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
### LeaderKey
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
type LeaderKey = WhistleBindingProjection &
|
|
46
|
+
Readonly<{
|
|
47
|
+
key: string;
|
|
48
|
+
}>;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
One key offered after the leader chord, with the command it runs.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
### ShellKeyHost
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
type ShellKeyHost = Readonly<{
|
|
59
|
+
active: () => WhistleSnapshot;
|
|
60
|
+
subscribe: (listener) => () => void;
|
|
61
|
+
execute: (commandId, input) => Promise<WhistleExecutionOutcome>;
|
|
62
|
+
}>;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The shell host operations the key dispatcher reads.
|
|
66
|
+
|
|
67
|
+
## Functions
|
|
68
|
+
|
|
69
|
+
### parseChord()
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
function parseChord(
|
|
73
|
+
binding,
|
|
74
|
+
mac,
|
|
75
|
+
): Readonly<{
|
|
76
|
+
key: string;
|
|
77
|
+
alt: boolean;
|
|
78
|
+
ctrl: boolean;
|
|
79
|
+
meta: boolean;
|
|
80
|
+
shift: boolean;
|
|
81
|
+
}> | null;
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Parse one single-chord binding. Sequences (including `<leader> x`) and unknown
|
|
85
|
+
modifiers return `null`; they are never matched as one chord.
|
|
86
|
+
|
|
87
|
+
#### Parameters
|
|
88
|
+
|
|
89
|
+
| Parameter | Type |
|
|
90
|
+
| --------- | --------- |
|
|
91
|
+
| `binding` | `string` |
|
|
92
|
+
| `mac` | `boolean` |
|
|
93
|
+
|
|
94
|
+
#### Returns
|
|
95
|
+
|
|
96
|
+
\| `Readonly`\<\{ `key`: `string`; `alt`: `boolean`; `ctrl`: `boolean`; `meta`:
|
|
97
|
+
`boolean`; `shift`: `boolean`; \}\> \| `null`
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### chordMatches()
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
function chordMatches(event, chord): boolean;
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Whether one key event is exactly this chord.
|
|
108
|
+
|
|
109
|
+
#### Parameters
|
|
110
|
+
|
|
111
|
+
| Parameter | Type |
|
|
112
|
+
| --------- | --------------------------------- |
|
|
113
|
+
| `event` | [`KeyEventFacts`](#keyeventfacts) |
|
|
114
|
+
| `chord` | [`ShellChord`](#shellchord) |
|
|
115
|
+
|
|
116
|
+
#### Returns
|
|
117
|
+
|
|
118
|
+
`boolean`
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### leaderKeys()
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
function leaderKeys(active): readonly LeaderKey[];
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The `<leader> x` rows of the active view, first binding per key.
|
|
129
|
+
|
|
130
|
+
#### Parameters
|
|
131
|
+
|
|
132
|
+
| Parameter | Type |
|
|
133
|
+
| --------- | ----------------- |
|
|
134
|
+
| `active` | `WhistleSnapshot` |
|
|
135
|
+
|
|
136
|
+
#### Returns
|
|
137
|
+
|
|
138
|
+
readonly [`LeaderKey`](#leaderkey)[]
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
### leaderKeyMatches()
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
function leaderKeyMatches(event, key): boolean;
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Whether one key event (after the leader) selects this leader key.
|
|
149
|
+
|
|
150
|
+
#### Parameters
|
|
151
|
+
|
|
152
|
+
| Parameter | Type |
|
|
153
|
+
| --------- | ------------------------------------------------------------------------------ |
|
|
154
|
+
| `event` | `Pick`\<`KeyboardEvent`, `"altKey"` \| `"ctrlKey"` \| `"key"` \| `"metaKey"`\> |
|
|
155
|
+
| `key` | `string` |
|
|
156
|
+
|
|
157
|
+
#### Returns
|
|
158
|
+
|
|
159
|
+
`boolean`
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
### installShellKeys()
|
|
164
|
+
|
|
165
|
+
```ts
|
|
166
|
+
function installShellKeys(root, host, mac): () => void;
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Dispatch the active view's single-chord bindings from the shell document. Text
|
|
170
|
+
entry is a mode: while an input is focused only Ctrl/Cmd chords fire, so
|
|
171
|
+
Alt-arrows keep their word-navigation meaning.
|
|
172
|
+
|
|
173
|
+
#### Parameters
|
|
174
|
+
|
|
175
|
+
| Parameter | Type |
|
|
176
|
+
| --------- | ------------------------------- |
|
|
177
|
+
| `root` | `HTMLElement` |
|
|
178
|
+
| `host` | [`ShellKeyHost`](#shellkeyhost) |
|
|
179
|
+
| `mac` | `boolean` |
|
|
180
|
+
|
|
181
|
+
#### Returns
|
|
182
|
+
|
|
183
|
+
() => `void`
|