@fungi.computer/parakeet 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.
Files changed (115) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +186 -2
  3. package/dist/account-commands.d.ts +102 -0
  4. package/dist/account-commands.js +239 -0
  5. package/dist/agent-head.d.ts +4 -0
  6. package/dist/agent-head.js +2 -0
  7. package/dist/client-contributions.d.ts +20 -0
  8. package/dist/client-contributions.js +41 -0
  9. package/dist/commands/advertised.d.ts +23 -0
  10. package/dist/commands/advertised.js +72 -0
  11. package/dist/commands/builtins.d.ts +14 -0
  12. package/dist/commands/builtins.js +91 -0
  13. package/dist/commands/hints.d.ts +36 -0
  14. package/dist/commands/hints.js +64 -0
  15. package/dist/commands/interactions.d.ts +55 -0
  16. package/dist/commands/interactions.js +101 -0
  17. package/dist/commands/run.d.ts +12 -0
  18. package/dist/commands/run.js +64 -0
  19. package/dist/commands/slash.d.ts +126 -0
  20. package/dist/commands/slash.js +190 -0
  21. package/dist/commands/use-slash-commands.d.ts +57 -0
  22. package/dist/commands/use-slash-commands.js +207 -0
  23. package/dist/components/AgentHead.d.ts +22 -0
  24. package/dist/components/AgentHead.js +20 -0
  25. package/dist/components/ChatComposer.d.ts +43 -0
  26. package/dist/components/ChatComposer.js +209 -0
  27. package/dist/components/ChatMessage.d.ts +8 -0
  28. package/dist/components/ChatMessage.js +16 -0
  29. package/dist/components/ClientRows.d.ts +11 -0
  30. package/dist/components/ClientRows.js +46 -0
  31. package/dist/components/CodeBlock.d.ts +11 -0
  32. package/dist/components/CodeBlock.js +38 -0
  33. package/dist/components/InteractionPanel.d.ts +15 -0
  34. package/dist/components/InteractionPanel.js +42 -0
  35. package/dist/components/MarkdownRenderer.d.ts +6 -0
  36. package/dist/components/MarkdownRenderer.js +48 -0
  37. package/dist/components/RunFailureNotice.d.ts +7 -0
  38. package/dist/components/RunFailureNotice.js +13 -0
  39. package/dist/components/ShiitakeAvatar.d.ts +21 -0
  40. package/dist/components/ShiitakeAvatar.js +22 -0
  41. package/dist/components/SlashMenu.d.ts +8 -0
  42. package/dist/components/SlashMenu.js +50 -0
  43. package/dist/components/ThinkingBlock.d.ts +3 -0
  44. package/dist/components/ThinkingBlock.js +18 -0
  45. package/dist/components/TimelineItem.d.ts +15 -0
  46. package/dist/components/TimelineItem.js +35 -0
  47. package/dist/components/ToolGroup.d.ts +12 -0
  48. package/dist/components/ToolGroup.js +90 -0
  49. package/dist/components/WaitingNotice.d.ts +7 -0
  50. package/dist/components/WaitingNotice.js +8 -0
  51. package/dist/components/avatar-presentation.d.ts +16 -0
  52. package/dist/components/avatar-presentation.js +9 -0
  53. package/dist/components/sprite-service.d.ts +2 -0
  54. package/dist/components/sprite-service.js +9 -0
  55. package/dist/conversation.d.ts +165 -0
  56. package/dist/conversation.js +762 -0
  57. package/dist/core/assistant-visibility.d.ts +3 -0
  58. package/dist/core/assistant-visibility.js +4 -0
  59. package/dist/core/author-labels.d.ts +16 -0
  60. package/dist/core/author-labels.js +16 -0
  61. package/dist/core/build-timeline.d.ts +36 -0
  62. package/dist/core/build-timeline.js +328 -0
  63. package/dist/core/client-actions.d.ts +35 -0
  64. package/dist/core/client-actions.js +128 -0
  65. package/dist/core/client-contributions.d.ts +24 -0
  66. package/dist/core/client-contributions.js +115 -0
  67. package/dist/core/client-timeline.d.ts +33 -0
  68. package/dist/core/client-timeline.js +72 -0
  69. package/dist/core/format-context.d.ts +11 -0
  70. package/dist/core/format-context.js +20 -0
  71. package/dist/core/format-tokens.d.ts +2 -0
  72. package/dist/core/format-tokens.js +6 -0
  73. package/dist/core/model-identity.d.ts +3 -0
  74. package/dist/core/model-identity.js +7 -0
  75. package/dist/core/session-projection.d.ts +11 -0
  76. package/dist/core/session-projection.js +191 -0
  77. package/dist/core/session-query.d.ts +118 -0
  78. package/dist/core/session-query.js +187 -0
  79. package/dist/core/session-view-state.d.ts +66 -0
  80. package/dist/core/session-view-state.js +114 -0
  81. package/dist/core/tool-contract.d.ts +15 -0
  82. package/dist/core/tool-contract.js +3 -0
  83. package/dist/core/tool-groups.d.ts +36 -0
  84. package/dist/core/tool-groups.js +151 -0
  85. package/dist/core/tool-view.d.ts +182 -0
  86. package/dist/core/tool-view.js +618 -0
  87. package/dist/headless.d.ts +28 -0
  88. package/dist/headless.js +24 -0
  89. package/dist/index.d.ts +9 -0
  90. package/dist/index.js +4 -0
  91. package/dist/lib/failure.d.ts +2 -0
  92. package/dist/lib/failure.js +9 -0
  93. package/dist/markdown.d.ts +3 -0
  94. package/dist/markdown.js +6 -0
  95. package/dist/model-commands.d.ts +44 -0
  96. package/dist/model-commands.js +232 -0
  97. package/dist/parakeet.d.ts +77 -0
  98. package/dist/parakeet.js +276 -0
  99. package/dist/provider-choices.d.ts +8 -0
  100. package/dist/provider-choices.js +46 -0
  101. package/dist/reload-command.d.ts +43 -0
  102. package/dist/reload-command.js +72 -0
  103. package/dist/session-commands.d.ts +53 -0
  104. package/dist/session-commands.js +259 -0
  105. package/dist/session.d.ts +24 -0
  106. package/dist/session.js +1 -0
  107. package/dist/store/types.d.ts +163 -0
  108. package/dist/store/types.js +1 -0
  109. package/dist/styles.css +19129 -0
  110. package/docs/api/README.md +15 -0
  111. package/docs/api/commands/slash.md +321 -0
  112. package/docs/api/headless.md +2510 -0
  113. package/docs/api/index.md +1249 -0
  114. package/package.json +79 -3
  115. package/src/styles.css +272 -0
@@ -0,0 +1,15 @@
1
+ <!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
2
+
3
+ **@fungi.computer/parakeet**
4
+
5
+ ---
6
+
7
+ # @fungi.computer/parakeet
8
+
9
+ ## Modules
10
+
11
+ | Module | Description |
12
+ | ----------------------------------- | ----------- |
13
+ | [commands/slash](commands/slash.md) | - |
14
+ | [headless](headless.md) | - |
15
+ | [index](index.md) | - |
@@ -0,0 +1,321 @@
1
+ <!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
2
+
3
+ [**@fungi.computer/parakeet**](../README.md)
4
+
5
+ ---
6
+
7
+ [@fungi.computer/parakeet](../README.md) / commands/slash
8
+
9
+ # commands/slash
10
+
11
+ ## Type Aliases
12
+
13
+ ### SlashCommand
14
+
15
+ ```ts
16
+ type SlashCommand = Readonly<{
17
+ alias: string;
18
+ commandId: string;
19
+ title: string;
20
+ description?: string;
21
+ category: string;
22
+ order: number;
23
+ grammar?: WhistleSlashArguments;
24
+ keys: readonly string[];
25
+ availability: WhistleAvailability;
26
+ }>;
27
+ ```
28
+
29
+ One slash command as every Parakeet renderer lists it.
30
+
31
+ ---
32
+
33
+ ### KeyBindingRow
34
+
35
+ ```ts
36
+ type KeyBindingRow = Readonly<{
37
+ commandId: string;
38
+ keys: string;
39
+ title: string;
40
+ order: number;
41
+ }>;
42
+ ```
43
+
44
+ One key binding as help and hint surfaces list it.
45
+
46
+ ---
47
+
48
+ ### SlashParse
49
+
50
+ ```ts
51
+ type SlashParse =
52
+ | Readonly<{
53
+ kind: "prompt";
54
+ }>
55
+ | Readonly<{
56
+ kind: "command";
57
+ command: SlashCommand;
58
+ arguments?: WhistleJsonObject;
59
+ requestIdField?: string;
60
+ }>
61
+ | Readonly<{
62
+ kind: "invalid";
63
+ message: string;
64
+ }>;
65
+ ```
66
+
67
+ How one composer draft maps to a command.
68
+
69
+ ---
70
+
71
+ ### SlashCommandItem
72
+
73
+ ```ts
74
+ type SlashCommandItem = Readonly<{
75
+ command: SlashCommand;
76
+ label: string;
77
+ matches: readonly number[];
78
+ insert: string;
79
+ }>;
80
+ ```
81
+
82
+ One command offered while the alias is being typed.
83
+
84
+ ---
85
+
86
+ ### SlashWordItem
87
+
88
+ ```ts
89
+ type SlashWordItem = Readonly<{
90
+ word: WhistleSlashWord;
91
+ label: string;
92
+ matches: readonly number[];
93
+ insert: string;
94
+ }>;
95
+ ```
96
+
97
+ One argument word offered after the alias.
98
+
99
+ ---
100
+
101
+ ### SlashCompletion
102
+
103
+ ```ts
104
+ type SlashCompletion =
105
+ | Readonly<{
106
+ kind: "none";
107
+ }>
108
+ | Readonly<{
109
+ kind: "commands";
110
+ query: string;
111
+ items: readonly SlashCommandItem[];
112
+ }>
113
+ | Readonly<{
114
+ kind: "arguments";
115
+ command: SlashCommand;
116
+ query: string;
117
+ hint: string;
118
+ items: readonly SlashWordItem[];
119
+ }>;
120
+ ```
121
+
122
+ What a composer shows for the current draft.
123
+
124
+ ---
125
+
126
+ ### FuzzyMatch
127
+
128
+ ```ts
129
+ type FuzzyMatch = Readonly<{
130
+ tier: number;
131
+ spread: number;
132
+ indices: number[];
133
+ }>;
134
+ ```
135
+
136
+ How well one candidate matched a query; lower tiers and spreads rank first.
137
+
138
+ ## Functions
139
+
140
+ ### keyLabel()
141
+
142
+ ```ts
143
+ function keyLabel(binding, mac?): string;
144
+ ```
145
+
146
+ Human key labels from Whistle bindings, with the platform's modifier name.
147
+
148
+ #### Parameters
149
+
150
+ | Parameter | Type |
151
+ | --------- | --------- |
152
+ | `binding` | `string` |
153
+ | `mac` | `boolean` |
154
+
155
+ #### Returns
156
+
157
+ `string`
158
+
159
+ ---
160
+
161
+ ### slashRegistry()
162
+
163
+ ```ts
164
+ function slashRegistry(snapshot): readonly Readonly<{
165
+ alias: string;
166
+ commandId: string;
167
+ title: string;
168
+ description?: string;
169
+ category: string;
170
+ order: number;
171
+ grammar?: {
172
+ hint: string;
173
+ words?: readonly object[];
174
+ text?: {
175
+ field: string;
176
+ arguments: {
177
+ [key: string]:
178
+ | string
179
+ | number
180
+ | boolean
181
+ | 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)[] | { ...; } | ...[]
182
+ | {
183
+ [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)[] | { ...; } | ...;
184
+ }
185
+ | null;
186
+ };
187
+ requestIdField?: string;
188
+ };
189
+ };
190
+ keys: readonly string[];
191
+ availability: WhistleAvailability;
192
+ }>[];
193
+ ```
194
+
195
+ Every slash alias in the live graph, with the keys bound to its command.
196
+
197
+ #### Parameters
198
+
199
+ | Parameter | Type |
200
+ | ---------- | ----------------- |
201
+ | `snapshot` | `WhistleSnapshot` |
202
+
203
+ #### Returns
204
+
205
+ readonly `Readonly`\<\{ `alias`: `string`; `commandId`: `string`; `title`:
206
+ `string`; `description?`: `string`; `category`: `string`; `order`: `number`;
207
+ `grammar?`: \{ `hint`: `string`; `words?`: readonly `object`[]; `text?`: \{
208
+ `field`: `string`; `arguments`: \{ \[`key`: `string`\]: \| `string` \| `number`
209
+ \| `boolean` \| readonly string \| number \| boolean \| readonly (string \|
210
+ number \| boolean \| readonly (string \| number \| boolean \| readonly (string
211
+ \| number \| boolean \| readonly (string \| number \| boolean \| readonly
212
+ (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\]
213
+ \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \|
214
+ \{ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \|
215
+ number \| boolean \| readonly (string \| number \| boolean \| readonly (string
216
+ \| number \| boolean \| readonly (string \| number \| boolean \| readonly
217
+ (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\]
218
+ \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \}
219
+ \| `null`; \}; `requestIdField?`: `string`; \}; \}; `keys`: readonly `string`[];
220
+ `availability`: `WhistleAvailability`; \}\>[]
221
+
222
+ ---
223
+
224
+ ### keyBindings()
225
+
226
+ ```ts
227
+ function keyBindings(snapshot): readonly Readonly<{
228
+ commandId: string;
229
+ keys: string;
230
+ title: string;
231
+ order: number;
232
+ }>[];
233
+ ```
234
+
235
+ Every bound key in the live graph, grouped by command.
236
+
237
+ #### Parameters
238
+
239
+ | Parameter | Type |
240
+ | ---------- | ----------------- |
241
+ | `snapshot` | `WhistleSnapshot` |
242
+
243
+ #### Returns
244
+
245
+ readonly `Readonly`\<\{ `commandId`: `string`; `keys`: `string`; `title`:
246
+ `string`; `order`: `number`; \}\>[]
247
+
248
+ ---
249
+
250
+ ### parseSlashDraft()
251
+
252
+ ```ts
253
+ function parseSlashDraft(registry, draft): SlashParse;
254
+ ```
255
+
256
+ Parse one draft against the registry; only a leading `/` names a command.
257
+
258
+ #### Parameters
259
+
260
+ | Parameter | Type |
261
+ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
262
+ | `registry` | readonly `Readonly`\<\{ `alias`: `string`; `commandId`: `string`; `title`: `string`; `description?`: `string`; `category`: `string`; `order`: `number`; `grammar?`: \{ `hint`: `string`; `words?`: readonly `object`[]; `text?`: \{ `field`: `string`; `arguments`: \{ \[`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 \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`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)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `requestIdField?`: `string`; \}; \}; `keys`: readonly `string`[]; `availability`: `WhistleAvailability`; \}\>[] |
263
+ | `draft` | `string` |
264
+
265
+ #### Returns
266
+
267
+ [`SlashParse`](#slashparse)
268
+
269
+ ---
270
+
271
+ ### fuzzyMatch()
272
+
273
+ ```ts
274
+ function fuzzyMatch(
275
+ candidate,
276
+ query,
277
+ ):
278
+ | Readonly<{
279
+ tier: number;
280
+ spread: number;
281
+ indices: number[];
282
+ }>
283
+ | undefined;
284
+ ```
285
+
286
+ Fuzzy match: a prefix beats a word start beats a substring beats an in-order
287
+ subsequence; tighter subsequences rank first.
288
+
289
+ #### Parameters
290
+
291
+ | Parameter | Type |
292
+ | ----------- | -------- |
293
+ | `candidate` | `string` |
294
+ | `query` | `string` |
295
+
296
+ #### Returns
297
+
298
+ \| `Readonly`\<\{ `tier`: `number`; `spread`: `number`; `indices`: `number`[];
299
+ \}\> \| `undefined`
300
+
301
+ ---
302
+
303
+ ### completeSlash()
304
+
305
+ ```ts
306
+ function completeSlash(registry, draft, options?): SlashCompletion;
307
+ ```
308
+
309
+ Rank completions for one draft; renderers draw exactly these rows.
310
+
311
+ #### Parameters
312
+
313
+ | Parameter | Type |
314
+ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
315
+ | `registry` | readonly `Readonly`\<\{ `alias`: `string`; `commandId`: `string`; `title`: `string`; `description?`: `string`; `category`: `string`; `order`: `number`; `grammar?`: \{ `hint`: `string`; `words?`: readonly `object`[]; `text?`: \{ `field`: `string`; `arguments`: \{ \[`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 \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`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)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `requestIdField?`: `string`; \}; \}; `keys`: readonly `string`[]; `availability`: `WhistleAvailability`; \}\>[] |
316
+ | `draft` | `string` |
317
+ | `options` | `Readonly`\<\{ `idleCategory?`: `string`; \}\> |
318
+
319
+ #### Returns
320
+
321
+ [`SlashCompletion`](#slashcompletion)