@fungi.computer/oyster 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/README.md +396 -72
  2. package/dist/agents.d.ts +3 -2
  3. package/dist/agents.js +4 -2
  4. package/dist/app-builds.d.ts +81 -8
  5. package/dist/app-builds.js +213 -60
  6. package/dist/app-storage.d.ts +3 -3
  7. package/dist/approval-capability.d.ts +5 -0
  8. package/dist/approval-capability.js +46 -0
  9. package/dist/approval-home.d.ts +51 -0
  10. package/dist/approval-home.js +226 -0
  11. package/dist/apps/catalog.d.ts +335 -0
  12. package/dist/apps/catalog.js +46 -0
  13. package/dist/apps/gate.d.ts +20 -6
  14. package/dist/apps/gate.js +42 -16
  15. package/dist/apps/index.d.ts +3 -1
  16. package/dist/apps/index.js +3 -1
  17. package/dist/apps/installation.d.ts +132 -51
  18. package/dist/apps/installation.js +176 -70
  19. package/dist/apps/permissions.d.ts +247 -0
  20. package/dist/apps/permissions.js +255 -0
  21. package/dist/boot-capability-route.d.ts +15 -0
  22. package/dist/boot-capability-route.js +196 -0
  23. package/dist/boot-capability.d.ts +103 -0
  24. package/dist/boot-capability.js +141 -0
  25. package/dist/boot-construction.d.ts +12 -0
  26. package/dist/boot-construction.js +175 -0
  27. package/dist/boot-gate.d.ts +267 -0
  28. package/dist/boot-gate.js +236 -0
  29. package/dist/boot-host-script.d.ts +2 -0
  30. package/dist/boot-host-script.js +1 -0
  31. package/dist/boot-mount.d.ts +21 -0
  32. package/dist/boot-mount.js +65 -0
  33. package/dist/browser/boot.d.ts +73 -0
  34. package/dist/browser/boot.js +502 -0
  35. package/dist/browser/browser.d.ts +104 -0
  36. package/dist/browser/browser.js +374 -0
  37. package/dist/browser/capability-source.d.ts +76 -0
  38. package/dist/browser/capability-source.js +338 -0
  39. package/dist/browser/cdp-client.d.ts +56 -0
  40. package/dist/browser/cdp-client.js +184 -0
  41. package/dist/browser/errors.d.ts +79 -0
  42. package/dist/browser/errors.js +32 -0
  43. package/dist/browser/index.d.ts +16 -0
  44. package/dist/browser/index.js +14 -0
  45. package/dist/browser/lease-registry.d.ts +61 -0
  46. package/dist/browser/lease-registry.js +101 -0
  47. package/dist/browser/operations.d.ts +225 -0
  48. package/dist/browser/operations.js +137 -0
  49. package/dist/browser/page.d.ts +25 -0
  50. package/dist/browser/page.js +172 -0
  51. package/dist/browser/quick-reads.d.ts +29 -0
  52. package/dist/browser/quick-reads.js +160 -0
  53. package/dist/browser/sessions.d.ts +52 -0
  54. package/dist/browser/sessions.js +118 -0
  55. package/dist/browser/url-policy.d.ts +18 -0
  56. package/dist/browser/url-policy.js +58 -0
  57. package/dist/build/app-imports.d.ts +12 -0
  58. package/dist/build/app-imports.js +105 -0
  59. package/dist/build/build-policy.d.ts +5 -3
  60. package/dist/build/build-policy.js +5 -3
  61. package/dist/build/candidate-builder.d.ts +1 -1
  62. package/dist/build/candidate-cli.mjs +8375 -334
  63. package/dist/build/local-build.d.ts +2 -0
  64. package/dist/build/local-build.js +28 -6
  65. package/dist/build/snapshot-package-store.d.ts +1 -1
  66. package/dist/build/snapshot-package-store.js +7 -2
  67. package/dist/build/workspace-build.d.ts +92 -5
  68. package/dist/build/workspace-build.js +93 -19
  69. package/dist/build.d.ts +1 -1
  70. package/dist/build.js +1 -1
  71. package/dist/catalog-frame.js +1 -1
  72. package/dist/cloudflare.d.ts +13 -3
  73. package/dist/cloudflare.js +102 -4
  74. package/dist/frame-binding-wire-script.js +1 -1
  75. package/dist/frame-binding-wire.js +4 -2
  76. package/dist/git-auth.d.ts +0 -2
  77. package/dist/git-auth.js +0 -2
  78. package/dist/git.d.ts +0 -1
  79. package/dist/git.js +0 -2
  80. package/dist/host.d.ts +39 -13
  81. package/dist/host.js +268 -142
  82. package/dist/index.d.ts +25 -15
  83. package/dist/index.js +39 -16
  84. package/dist/install-release-cli.d.ts +2 -0
  85. package/dist/install-release-cli.js +46 -0
  86. package/dist/installation-client.d.ts +43 -0
  87. package/dist/installation-client.js +178 -0
  88. package/dist/installation-execution.d.ts +11 -0
  89. package/dist/installation-execution.js +184 -0
  90. package/dist/installation-operations.d.ts +1437 -0
  91. package/dist/installation-operations.js +664 -0
  92. package/dist/installation-store-generation.d.ts +3 -0
  93. package/dist/installation-store-generation.js +16 -0
  94. package/dist/instance-id.d.ts +10 -0
  95. package/dist/instance-id.js +10 -0
  96. package/dist/instance-refusal.d.ts +11 -0
  97. package/dist/instance-refusal.js +21 -0
  98. package/dist/internal/delivery.js +4 -2
  99. package/dist/internal/host-gate.js +7 -1
  100. package/dist/internal/registry-installations.js +4 -4
  101. package/dist/keys.d.ts +5 -1
  102. package/dist/keys.js +10 -2
  103. package/dist/machine-link/authority.d.ts +89 -0
  104. package/dist/machine-link/authority.js +37 -0
  105. package/dist/machine-link/client.d.ts +66 -0
  106. package/dist/machine-link/client.js +94 -0
  107. package/dist/machine-link/delivery.d.ts +18 -0
  108. package/dist/machine-link/delivery.js +55 -0
  109. package/dist/machine-link/enrollment.d.ts +111 -0
  110. package/dist/machine-link/enrollment.js +286 -0
  111. package/dist/machine-link/fences.d.ts +37 -0
  112. package/dist/machine-link/fences.js +166 -0
  113. package/dist/machine-link/home.d.ts +20 -0
  114. package/dist/machine-link/home.js +24 -0
  115. package/dist/machine-link/host.d.ts +43 -0
  116. package/dist/machine-link/host.js +189 -0
  117. package/dist/machine-link/index.d.ts +15 -0
  118. package/dist/machine-link/index.js +15 -0
  119. package/dist/machine-link/link.d.ts +48 -0
  120. package/dist/machine-link/link.js +223 -0
  121. package/dist/machine-link/presence.d.ts +10 -0
  122. package/dist/machine-link/presence.js +25 -0
  123. package/dist/machine-link/workers.d.ts +6 -0
  124. package/dist/machine-link/workers.js +6 -0
  125. package/dist/mcp-owner.d.ts +2 -2
  126. package/dist/mcp-owner.js +41 -33
  127. package/dist/mcp.d.ts +15 -3
  128. package/dist/mcp.js +146 -25
  129. package/dist/older-oyster-store-refusal.d.ts +4 -0
  130. package/dist/older-oyster-store-refusal.js +18 -0
  131. package/dist/older-oyster-store.d.ts +21 -0
  132. package/dist/older-oyster-store.js +43 -0
  133. package/dist/pack.d.ts +14 -3
  134. package/dist/pack.js +44 -19
  135. package/dist/page/app-access.d.ts +7 -0
  136. package/dist/page/app-access.js +75 -0
  137. package/dist/page/boot-host.js +57 -0
  138. package/dist/page/capabilities.d.ts +3 -3
  139. package/dist/page/capabilities.js +16 -12
  140. package/dist/page/computer-handles.d.ts +3 -3
  141. package/dist/page/computer-target.d.ts +3 -0
  142. package/dist/page/computer-target.js +9 -0
  143. package/dist/page/mount.d.ts +23 -3
  144. package/dist/page/mount.js +152 -16
  145. package/dist/page-assets.d.ts +22 -0
  146. package/dist/page-assets.js +28 -0
  147. package/dist/page-script.d.ts +3 -0
  148. package/dist/page-script.js +5 -4
  149. package/dist/release.d.ts +13 -6
  150. package/dist/release.js +10 -7
  151. package/dist/root-data.d.ts +16 -6
  152. package/dist/root-data.js +2 -2
  153. package/dist/source/index.d.ts +1 -1
  154. package/dist/source/team-source.d.ts +20 -8
  155. package/dist/source/team-source.js +39 -10
  156. package/dist/source/template-seed.d.ts +2 -2
  157. package/dist/standalone/agent-mail.d.ts +24 -0
  158. package/dist/standalone/agent-mail.js +62 -0
  159. package/dist/standalone/agent-store.d.ts +9 -0
  160. package/dist/standalone/agent-store.js +30 -0
  161. package/dist/standalone/agents.d.ts +68 -9
  162. package/dist/standalone/agents.js +428 -56
  163. package/dist/standalone/app-builds-binding.d.ts +20 -2
  164. package/dist/standalone/app-builds-binding.js +147 -23
  165. package/dist/standalone/app-set.d.ts +5 -2
  166. package/dist/standalone/app-set.js +186 -144
  167. package/dist/standalone/browser.d.ts +11 -0
  168. package/dist/standalone/browser.js +72 -0
  169. package/dist/standalone/builds.d.ts +13 -4
  170. package/dist/standalone/builds.js +28 -44
  171. package/dist/standalone/computer-egress.d.ts +2 -0
  172. package/dist/standalone/computer-egress.js +13 -4
  173. package/dist/standalone/computer-fleet.d.ts +43 -0
  174. package/dist/standalone/computer-fleet.js +200 -0
  175. package/dist/standalone/computer.d.ts +44 -9
  176. package/dist/standalone/computer.js +129 -22
  177. package/dist/standalone/install-apps-cli.js +43 -6
  178. package/dist/standalone/instance.d.ts +2 -2
  179. package/dist/standalone/instance.js +8 -11
  180. package/dist/standalone/machine-link.d.ts +354 -0
  181. package/dist/standalone/machine-link.js +368 -0
  182. package/dist/standalone/media.d.ts +2 -2
  183. package/dist/standalone/media.js +19 -16
  184. package/dist/standalone/preview.d.ts +2 -2
  185. package/dist/standalone/preview.js +37 -10
  186. package/dist/standalone/registry.d.ts +151 -9
  187. package/dist/standalone/registry.js +305 -8
  188. package/dist/standalone/worker.d.ts +19 -5
  189. package/dist/standalone/worker.js +90 -54
  190. package/dist/standalone/workflow-binding.d.ts +18 -22
  191. package/dist/standalone/workflow-binding.js +18 -18
  192. package/dist/standalone/workflow-control.d.ts +4 -0
  193. package/dist/standalone/workflow-control.js +40 -0
  194. package/dist/standalone/workflow-events.d.ts +2 -2
  195. package/dist/standalone/workflow-events.js +9 -10
  196. package/dist/standalone/workflow-git-capture.js +4 -3
  197. package/dist/standalone/workflow-host.d.ts +162 -161
  198. package/dist/standalone/workflow-host.js +101 -21
  199. package/dist/standalone/workflow-node-capture.js +11 -4
  200. package/dist/standalone/workflow-schedules.d.ts +5 -2
  201. package/dist/standalone/workflow-schedules.js +9 -10
  202. package/dist/standalone/workflow-trigger-host.d.ts +65 -5
  203. package/dist/standalone/workflow-trigger-host.js +2 -2
  204. package/dist/standalone/workflow-webhooks.d.ts +22 -0
  205. package/dist/standalone/workflow-webhooks.js +39 -0
  206. package/dist/standalone/workflows.d.ts +140 -43
  207. package/dist/standalone/workflows.js +198 -39
  208. package/dist/storage-frame.d.ts +6 -6
  209. package/dist/testing/capabilities.js +14 -3
  210. package/dist/testing/installation.js +26 -2
  211. package/dist/testing/worker.js +1 -1
  212. package/dist/testing/workers-runtime.d.ts +8 -2
  213. package/dist/testing/workers-runtime.js +20 -2
  214. package/dist/webhook-abuse.d.ts +25 -0
  215. package/dist/webhook-abuse.js +54 -0
  216. package/dist/webhook-custody.d.ts +144 -0
  217. package/dist/webhook-custody.js +222 -0
  218. package/dist/webhook-ingress.d.ts +36 -0
  219. package/dist/webhook-ingress.js +146 -0
  220. package/dist/webhooks.d.ts +111 -0
  221. package/dist/webhooks.js +189 -0
  222. package/dist/workers-git.d.ts +12 -17
  223. package/dist/workers-git.js +64 -52
  224. package/dist/workers.d.ts +226 -13
  225. package/dist/workers.js +363 -51
  226. package/dist/workflow-agent-authority.d.ts +8 -0
  227. package/dist/workflow-agent-authority.js +42 -0
  228. package/dist/workflows.d.ts +66 -0
  229. package/dist/workflows.js +97 -0
  230. package/docs/api/README.md +63 -37
  231. package/docs/api/agents.md +17 -0
  232. package/docs/api/app-storage.md +1 -1
  233. package/docs/api/apps.md +1394 -543
  234. package/docs/api/browser/boot.md +132 -0
  235. package/docs/api/browser.md +1440 -0
  236. package/docs/api/build-contract.md +38 -25
  237. package/docs/api/build.md +263 -84
  238. package/docs/api/cloudflare.md +93 -7
  239. package/docs/api/git.md +3 -13
  240. package/docs/api/host.md +944 -118
  241. package/docs/api/index.md +320 -18
  242. package/docs/api/keys.md +24 -1
  243. package/docs/api/mcp.md +59 -12
  244. package/docs/api/modules.md +33 -40
  245. package/docs/api/pack.md +57 -8
  246. package/docs/api/page/mount.md +92 -4
  247. package/docs/api/workers-git.md +103 -24
  248. package/docs/api/workers.md +1594 -244
  249. package/docs/site/agent-quickstart.mdx +28 -14
  250. package/examples/standalone/worker.ts +3 -1
  251. package/examples/standalone/wrangler.jsonc +2 -0
  252. package/package.json +73 -71
  253. package/dist/installation-consent.d.ts +0 -81
  254. package/dist/installation-consent.js +0 -84
  255. package/dist/shell/app-directory.d.ts +0 -542
  256. package/dist/shell/app-directory.js +0 -196
  257. package/dist/shell/browser-actions.d.ts +0 -7
  258. package/dist/shell/browser-actions.js +0 -56
  259. package/dist/shell/command-host.d.ts +0 -112
  260. package/dist/shell/command-host.js +0 -502
  261. package/dist/shell/commands.d.ts +0 -25
  262. package/dist/shell/commands.js +0 -78
  263. package/dist/shell/index.d.ts +0 -8
  264. package/dist/shell/index.js +0 -8
  265. package/dist/shell/keys.d.ts +0 -41
  266. package/dist/shell/keys.js +0 -134
  267. package/dist/shell/shell-module.d.ts +0 -55
  268. package/dist/shell/shell-module.js +0 -86
  269. package/dist/shell/window-manager.d.ts +0 -128
  270. package/dist/shell/window-manager.js +0 -730
  271. package/dist/shell/workbench-contract.d.ts +0 -68
  272. package/dist/shell/workbench-directory.d.ts +0 -332
  273. package/dist/shell/workbench-directory.js +0 -35
  274. package/dist/shell/workbench-host-types.d.ts +0 -96
  275. package/dist/shell/workbench-host-types.js +0 -1
  276. package/dist/shell/workbench-host.d.ts +0 -34
  277. package/dist/shell/workbench-host.js +0 -352
  278. package/dist/shell/workbench-model.d.ts +0 -194
  279. package/dist/shell/workbench-model.js +0 -53
  280. package/dist/shell/workbench.d.ts +0 -4
  281. package/dist/shell/workbench.js +0 -2
  282. package/docs/api/shell/app-directory.md +0 -599
  283. package/docs/api/shell/command-host.md +0 -224
  284. package/docs/api/shell/commands.md +0 -197
  285. package/docs/api/shell/keys.md +0 -183
  286. package/docs/api/shell/shell-module.md +0 -204
  287. package/docs/api/shell/window-manager.md +0 -267
  288. package/docs/api/shell/workbench-directory.md +0 -119
  289. package/docs/api/shell/workbench.md +0 -205
  290. package/docs/api/shell.md +0 -1915
  291. /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`; \}\>[]
@@ -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`