@fungi.computer/oyster 0.1.0 → 0.3.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/README.md +376 -72
- package/dist/agent-avatars.d.ts +103 -0
- package/dist/agent-avatars.js +66 -0
- package/dist/agents.d.ts +15 -4
- package/dist/agents.js +43 -4
- package/dist/app-builds.d.ts +81 -8
- package/dist/app-builds.js +210 -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 +26 -12
- package/dist/apps/gate.js +48 -22
- package/dist/apps/index.d.ts +3 -1
- package/dist/apps/index.js +3 -1
- package/dist/apps/installation.d.ts +147 -66
- package/dist/apps/installation.js +193 -86
- 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 +8428 -337
- 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-egress.js +4 -4
- 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 +106 -8
- package/dist/frame-binding-wire-script.js +1 -1
- package/dist/frame-binding-wire.d.ts +1 -1
- package/dist/frame-binding-wire.js +5 -3
- package/dist/git-auth.d.ts +0 -2
- package/dist/git-auth.js +0 -2
- package/dist/git-journal.js +4 -4
- 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 +26 -15
- package/dist/index.js +40 -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/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 -7
- 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 +78 -12
- package/dist/standalone/agents.js +470 -59
- package/dist/standalone/app-builds-binding.d.ts +20 -2
- package/dist/standalone/app-builds-binding.js +151 -27
- package/dist/standalone/app-set.d.ts +5 -2
- package/dist/standalone/app-set.js +174 -143
- 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 +132 -25
- 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 +39 -12
- package/dist/standalone/registry.d.ts +149 -9
- package/dist/standalone/registry.js +299 -8
- package/dist/standalone/worker.d.ts +19 -5
- package/dist/standalone/worker.js +90 -54
- package/dist/standalone/workflow-binding.d.ts +28 -32
- package/dist/standalone/workflow-binding.js +20 -20
- 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 +177 -152
- package/dist/standalone/workflow-host.js +137 -30
- 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 +88 -6
- 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 +203 -50
- 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 +60 -55
- package/dist/workers.d.ts +224 -13
- package/dist/workers.js +351 -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 +1581 -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 -69
- package/dist/installation-consent.d.ts +0 -79
- package/dist/installation-consent.js +0 -82
- package/dist/shell/app-directory.d.ts +0 -542
- package/dist/shell/app-directory.js +0 -199
- 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 -124
- package/dist/shell/window-manager.js +0 -711
- 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 -347
- package/dist/shell/workbench-model.d.ts +0 -192
- 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
|
@@ -1,224 +0,0 @@
|
|
|
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)
|
|
@@ -1,197 +0,0 @@
|
|
|
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`; \}\>[]
|
package/docs/api/shell/keys.md
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
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`
|