@fungi.computer/parakeet 0.1.0 → 0.2.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 (59) hide show
  1. package/README.md +45 -6
  2. package/dist/account-commands.js +3 -11
  3. package/dist/commands/advertised.d.ts +3 -1
  4. package/dist/commands/advertised.js +89 -4
  5. package/dist/commands/interactions.d.ts +22 -7
  6. package/dist/commands/interactions.js +41 -17
  7. package/dist/commands/slash.js +3 -5
  8. package/dist/commands/use-slash-commands.js +2 -2
  9. package/dist/components/AgentHead.d.ts +2 -0
  10. package/dist/components/AgentHead.js +5 -4
  11. package/dist/components/ChatComposer.d.ts +3 -1
  12. package/dist/components/ChatComposer.js +79 -15
  13. package/dist/components/ChatMessage.d.ts +4 -0
  14. package/dist/components/ChatMessage.js +6 -2
  15. package/dist/components/ClientRows.js +2 -2
  16. package/dist/components/InteractionPanel.d.ts +2 -4
  17. package/dist/components/InteractionPanel.js +2 -2
  18. package/dist/components/TimelineItem.d.ts +2 -0
  19. package/dist/components/TimelineItem.js +31 -7
  20. package/dist/conversation-opening.d.ts +47 -0
  21. package/dist/conversation-opening.js +173 -0
  22. package/dist/conversation.d.ts +47 -3
  23. package/dist/conversation.js +584 -86
  24. package/dist/core/author-labels.d.ts +2 -0
  25. package/dist/core/build-timeline.d.ts +4 -2
  26. package/dist/core/build-timeline.js +46 -7
  27. package/dist/core/client-actions.js +6 -3
  28. package/dist/core/client-timeline.d.ts +9 -2
  29. package/dist/core/client-timeline.js +15 -4
  30. package/dist/core/draft-storage.d.ts +63 -0
  31. package/dist/core/draft-storage.js +50 -0
  32. package/dist/core/model-identity.d.ts +2 -0
  33. package/dist/core/model-identity.js +6 -0
  34. package/dist/core/queued-recall.d.ts +35 -0
  35. package/dist/core/queued-recall.js +138 -0
  36. package/dist/core/session-projection.js +17 -0
  37. package/dist/core/session-query.d.ts +54 -11
  38. package/dist/core/session-query.js +38 -12
  39. package/dist/core/tool-groups.d.ts +1 -1
  40. package/dist/core/tool-groups.js +3 -1
  41. package/dist/core/tool-view.js +2 -1
  42. package/dist/core/use-timeline-item-key.d.ts +8 -0
  43. package/dist/core/use-timeline-item-key.js +29 -0
  44. package/dist/headless.d.ts +6 -4
  45. package/dist/headless.js +1 -1
  46. package/dist/index.d.ts +2 -2
  47. package/dist/index.js +1 -1
  48. package/dist/model-commands.js +64 -39
  49. package/dist/parakeet.js +17 -18
  50. package/dist/session-commands.d.ts +0 -9
  51. package/dist/session-commands.js +39 -68
  52. package/dist/session.d.ts +1 -1
  53. package/dist/store/types.d.ts +10 -4
  54. package/dist/styles.css +27 -12
  55. package/docs/api/commands/slash.md +24 -21
  56. package/docs/api/headless.md +375 -232
  57. package/docs/api/index.md +157 -45
  58. package/package.json +16 -10
  59. package/src/styles.css +0 -9
@@ -234,7 +234,6 @@ What the composer is doing right now.
234
234
  type ParakeetOpenInteraction = Readonly<{
235
235
  key: number;
236
236
  host: WhistleInteractionHost;
237
- retry: () => void;
238
237
  }>;
239
238
  ```
240
239
 
@@ -246,12 +245,27 @@ One interaction a renderer should draw as a dialog or panel.
246
245
 
247
246
  ```ts
248
247
  type ParakeetNotice = Readonly<{
249
- tone: "info" | "success" | "error";
248
+ tone: "info" | "error";
250
249
  message: string;
251
250
  }>;
252
251
  ```
253
252
 
254
- A one-line result shown beside the composer instead of a dialog.
253
+ An attention item shown beside the composer until it is resolved: something
254
+ failed or waits on the person. Everything else is a toast.
255
+
256
+ ---
257
+
258
+ ### ParakeetToast
259
+
260
+ ```ts
261
+ type ParakeetToast = Readonly<{
262
+ variant: "info" | "warning" | "error";
263
+ message: string;
264
+ }>;
265
+ ```
266
+
267
+ A transient message a renderer shows as a toast. A command's confirmation of
268
+ what the person just did is never one: it is an echo and is not announced.
255
269
 
256
270
  ---
257
271
 
@@ -281,6 +295,8 @@ type ParakeetInteractions = Readonly<{
281
295
  close: () => void;
282
296
  inspect: (inspection) => void;
283
297
  report: (notice) => void;
298
+ toast: (toast) => void;
299
+ subscribeToasts: (listener) => () => void;
284
300
  attach: (present) => () => void;
285
301
  lastEnd: () => WhistleInteractionEnd["status"] | undefined;
286
302
  }>;
@@ -439,6 +455,19 @@ A committed cell retains its producer namespace in every renderer.
439
455
 
440
456
  ---
441
457
 
458
+ ### SessionActivity
459
+
460
+ ```ts
461
+ type SessionActivity = Readonly<{
462
+ state: "idle" | "working" | "blocked" | "unknown";
463
+ header?: string;
464
+ }>;
465
+ ```
466
+
467
+ Observed Session activity; `header` is only an attention item's short heading.
468
+
469
+ ---
470
+
442
471
  ### ParakeetOwnerViewState
443
472
 
444
473
  ```ts
@@ -584,8 +613,6 @@ type ParakeetSessionCommandOptions = Readonly<{
584
613
  namespace: string;
585
614
  sessionResume?: () => void | Promise<void>;
586
615
  sessionResumeAvailable: boolean;
587
- onEditQueued?: (text) => void;
588
- canEditQueued?: () => boolean;
589
616
  onForked?: (sessionId) => void | Promise<void>;
590
617
  forkAvailable: boolean;
591
618
  onTitled?: (title) => void | Promise<void>;
@@ -613,7 +640,7 @@ Shared artwork identity for browser and native tool rows.
613
640
  | <a id="property-edit"></a> `edit` | `"write"` | `"write"` | Artwork for file edits. |
614
641
  | <a id="property-other"></a> `other` | `"working"` | `"working"` | Artwork for other tool calls. |
615
642
  | <a id="property-read"></a> `read` | `"read"` | `"read"` | Artwork for file reads. |
616
- | <a id="property-search"></a> `search` | `"list"` | `"list"` | Artwork for search results. |
643
+ | <a id="property-search"></a> `search` | `"search"` | `"search"` | Artwork for search results. |
617
644
 
618
645
  ## Functions
619
646
 
@@ -678,6 +705,7 @@ function accountCommandDefinitions(owner, options): readonly Readonly<{
678
705
  };
679
706
  slash?: {
680
707
  aliases: readonly string[];
708
+ consumesDraft?: boolean;
681
709
  order?: number;
682
710
  arguments?: {
683
711
  hint: string;
@@ -767,47 +795,48 @@ readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`;
767
795
  `values`: readonly `string`[]; \}; `agent?`: \{ `keybind?`: `string`; `order?`:
768
796
  `number`; \}; `help?`: \{ `order?`: `number`; \}; `menu?`: \{ `order?`:
769
797
  `number`; \}; `palette?`: \{ `order?`: `number`; \}; `slash?`: \{ `aliases`:
770
- readonly `string`[]; `order?`: `number`; `arguments?`: \{ `hint`: `string`;
771
- `words?`: readonly ...[]; `text?`: \{ `field`: ...; `arguments`: ...;
772
- `requestIdField?`: ...; \}; \}; \}; \}; `action?`: \{ `inputSchema?`: \{
773
- \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \|
774
- number \| boolean \| readonly (string \| number \| boolean \| readonly (string
775
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
776
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
777
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
778
- ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \|
779
- number \| boolean \| readonly (string \| number \| boolean \| readonly (string
780
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
781
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
782
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
783
- ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `outputSchema?`: \{
784
- \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \|
798
+ readonly `string`[]; `consumesDraft?`: `boolean`; `order?`: `number`;
799
+ `arguments?`: \{ `hint`: `string`; `words?`: readonly ...[]; `text?`: \{
800
+ `field`: ...; `arguments`: ...; `requestIdField?`: ...; \}; \}; \}; \};
801
+ `action?`: \{ `inputSchema?`: \{ \[`key`: `string`\]: \| `string` \| `number` \|
802
+ `boolean` \| readonly string \| number \| boolean \| readonly (string \| number
803
+ \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
785
804
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
786
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
787
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
788
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
789
- ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \|
805
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
806
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{
807
+ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number
808
+ \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
790
809
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
791
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
792
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
793
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
794
- ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `presentation?`: \|
795
- \{ `type`: `"action"`; \} \| \{ `type`: `"custom"`; `data`: \{ \[`key`:
796
- `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \|
797
- boolean \| readonly (string \| number \| boolean \| readonly (string \| number
810
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
811
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \|
812
+ `null`; \}; `outputSchema?`: \{ \[`key`: `string`\]: \| `string` \| `number` \|
813
+ `boolean` \| readonly string \| number \| boolean \| readonly (string \| number
798
814
  \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
799
815
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
800
- \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \|
801
- null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \|
802
- boolean \| readonly (string \| number \| boolean \| readonly (string \| number
816
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
817
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{
818
+ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number
803
819
  \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
804
820
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
805
- \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \|
806
- null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; \} \| \{ `type`: `"choice"`;
807
- `options`: readonly `object`[]; \} \| \{ `type`: `"form"`; `submitLabel?`:
808
- `string`; \} \| \{ `type`: `"confirmation"`; `message`: `string`;
809
- `confirmLabel?`: `string`; `cancelLabel?`: `string`; \}; \}; `availability?`: ()
810
- => `WhistleAvailability`; `handler`: (`input`) => `unknown`; \}\>[]
821
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
822
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \|
823
+ `null`; \}; `presentation?`: \| \{ `type`: `"action"`; \} \| \{ `type`:
824
+ `"custom"`; `data`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean`
825
+ \| readonly string \| number \| boolean \| readonly (string \| number \| boolean
826
+ \| readonly (string \| number \| boolean \| readonly (string \| number \|
827
+ boolean \| readonly (string \| number \| boolean \| readonly (string \| number
828
+ \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \|
829
+ null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`:
830
+ `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean
831
+ \| readonly (string \| number \| boolean \| readonly (string \| number \|
832
+ boolean \| readonly (string \| number \| boolean \| readonly (string \| number
833
+ \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \|
834
+ null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; \}
835
+ \| \{ `type`: `"choice"`; `options`: readonly `object`[]; \} \| \{ `type`:
836
+ `"form"`; `submitLabel?`: `string`; \} \| \{ `type`: `"confirmation"`;
837
+ `message`: `string`; `confirmLabel?`: `string`; `cancelLabel?`: `string`; \};
838
+ \}; `availability?`: () => `WhistleAvailability`; `handler`: (`input`) =>
839
+ `unknown`; \}\>[]
811
840
 
812
841
  ---
813
842
 
@@ -864,7 +893,12 @@ Ordinary advertised actions over the current admitted rows and observation.
864
893
  ### advertisedCommands()
865
894
 
866
895
  ```ts
867
- function advertisedCommands(runtime, session, onInspect?): AdvertisedCommands;
896
+ function advertisedCommands(
897
+ runtime,
898
+ session,
899
+ contributions,
900
+ onInspect?,
901
+ ): AdvertisedCommands;
868
902
  ```
869
903
 
870
904
  Turn each running extension's advertised `whistle.catalog/v1` catalog into
@@ -873,11 +907,12 @@ command: a new extension's catalog appears as new commands.
873
907
 
874
908
  #### Parameters
875
909
 
876
- | Parameter | Type |
877
- | ------------ | ---------------------------------------------------------------------- |
878
- | `runtime` | `Pick`\<`WhistleRuntime`, `"contribute"`\> |
879
- | `session` | `Pick`\<[`ParakeetSession`](index.md#parakeetsession), `"extension"`\> |
880
- | `onInspect?` | (`entryId`, `commandId`) => `void` |
910
+ | Parameter | Type | Description |
911
+ | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
912
+ | `runtime` | `Pick`\<`WhistleRuntime`, `"contribute"`\> | - |
913
+ | `session` | `Pick`\<[`ParakeetSession`](index.md#parakeetsession), `"extension"`\> | - |
914
+ | `contributions` | () => readonly `Readonly`\<\{ `entryId`: `string`; `value`: \{ `chips`: readonly `object`[]; `panel`: readonly `object`[]; `timeline`: \{ `cells`: readonly `object`[]; `omitted`: `number`; \}; `waiting`: \| \{ `summary`: `string`; `cancel`: \{ `id`: `string`; `label`: `string`; `input?`: \{ \[`key`: `string`\]: `Json`; \}; \}; \} \| `null`; \}; \}\>[] | Current admitted panels that own unanswered prompts. |
915
+ | `onInspect?` | (`entryId`, `commandId`) => `void` | - |
881
916
 
882
917
  #### Returns
883
918
 
@@ -913,6 +948,7 @@ function parakeetBuiltinCommands(runtime, options): readonly Readonly<{
913
948
  };
914
949
  slash?: {
915
950
  aliases: readonly string[];
951
+ consumesDraft?: boolean;
916
952
  order?: number;
917
953
  arguments?: {
918
954
  hint: string;
@@ -1002,47 +1038,48 @@ readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`;
1002
1038
  `values`: readonly `string`[]; \}; `agent?`: \{ `keybind?`: `string`; `order?`:
1003
1039
  `number`; \}; `help?`: \{ `order?`: `number`; \}; `menu?`: \{ `order?`:
1004
1040
  `number`; \}; `palette?`: \{ `order?`: `number`; \}; `slash?`: \{ `aliases`:
1005
- readonly `string`[]; `order?`: `number`; `arguments?`: \{ `hint`: `string`;
1006
- `words?`: readonly ...[]; `text?`: \{ `field`: ...; `arguments`: ...;
1007
- `requestIdField?`: ...; \}; \}; \}; \}; `action?`: \{ `inputSchema?`: \{
1008
- \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \|
1009
- number \| boolean \| readonly (string \| number \| boolean \| readonly (string
1010
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
1011
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
1012
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
1013
- ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \|
1014
- number \| boolean \| readonly (string \| number \| boolean \| readonly (string
1015
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
1016
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
1017
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
1018
- ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `outputSchema?`: \{
1019
- \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \|
1041
+ readonly `string`[]; `consumesDraft?`: `boolean`; `order?`: `number`;
1042
+ `arguments?`: \{ `hint`: `string`; `words?`: readonly ...[]; `text?`: \{
1043
+ `field`: ...; `arguments`: ...; `requestIdField?`: ...; \}; \}; \}; \};
1044
+ `action?`: \{ `inputSchema?`: \{ \[`key`: `string`\]: \| `string` \| `number` \|
1045
+ `boolean` \| readonly string \| number \| boolean \| readonly (string \| number
1046
+ \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
1020
1047
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
1021
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
1022
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
1023
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
1024
- ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \|
1048
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
1049
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{
1050
+ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number
1051
+ \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
1025
1052
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
1026
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
1027
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
1028
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
1029
- ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `presentation?`: \|
1030
- \{ `type`: `"action"`; \} \| \{ `type`: `"custom"`; `data`: \{ \[`key`:
1031
- `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \|
1032
- boolean \| readonly (string \| number \| boolean \| readonly (string \| number
1053
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
1054
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \|
1055
+ `null`; \}; `outputSchema?`: \{ \[`key`: `string`\]: \| `string` \| `number` \|
1056
+ `boolean` \| readonly string \| number \| boolean \| readonly (string \| number
1033
1057
  \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
1034
1058
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
1035
- \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \|
1036
- null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \|
1037
- boolean \| readonly (string \| number \| boolean \| readonly (string \| number
1059
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
1060
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{
1061
+ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number
1038
1062
  \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
1039
1063
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
1040
- \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \|
1041
- null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; \} \| \{ `type`: `"choice"`;
1042
- `options`: readonly `object`[]; \} \| \{ `type`: `"form"`; `submitLabel?`:
1043
- `string`; \} \| \{ `type`: `"confirmation"`; `message`: `string`;
1044
- `confirmLabel?`: `string`; `cancelLabel?`: `string`; \}; \}; `availability?`: ()
1045
- => `WhistleAvailability`; `handler`: (`input`) => `unknown`; \}\>[]
1064
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
1065
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \|
1066
+ `null`; \}; `presentation?`: \| \{ `type`: `"action"`; \} \| \{ `type`:
1067
+ `"custom"`; `data`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean`
1068
+ \| readonly string \| number \| boolean \| readonly (string \| number \| boolean
1069
+ \| readonly (string \| number \| boolean \| readonly (string \| number \|
1070
+ boolean \| readonly (string \| number \| boolean \| readonly (string \| number
1071
+ \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \|
1072
+ null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`:
1073
+ `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean
1074
+ \| readonly (string \| number \| boolean \| readonly (string \| number \|
1075
+ boolean \| readonly (string \| number \| boolean \| readonly (string \| number
1076
+ \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \|
1077
+ null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; \}
1078
+ \| \{ `type`: `"choice"`; `options`: readonly `object`[]; \} \| \{ `type`:
1079
+ `"form"`; `submitLabel?`: `string`; \} \| \{ `type`: `"confirmation"`;
1080
+ `message`: `string`; `confirmLabel?`: `string`; `cancelLabel?`: `string`; \};
1081
+ \}; `availability?`: () => `WhistleAvailability`; `handler`: (`input`) =>
1082
+ `unknown`; \}\>[]
1046
1083
 
1047
1084
  ---
1048
1085
 
@@ -1127,8 +1164,8 @@ function createParakeetInteractions(): ParakeetInteractions;
1127
1164
  ```
1128
1165
 
1129
1166
  Own how commands talk to the human. An interaction opens only when it asks a
1130
- question, hands off to a URL or shows progress; a command that just reports a
1131
- result leaves a one-line notice instead of a dialog.
1167
+ question, hands off to a URL or shows progress; a command that just reports
1168
+ information emits a toast; ordinary success echoes are silent.
1132
1169
 
1133
1170
  #### Returns
1134
1171
 
@@ -1165,21 +1202,24 @@ function runSlashDraft(
1165
1202
  commands,
1166
1203
  send,
1167
1204
  origin,
1205
+ consumeDraft?,
1168
1206
  ): Promise<WhistleExecutionOutcome | undefined>;
1169
1207
  ```
1170
1208
 
1171
1209
  Run one composer draft: a prompt goes to `send`, a `/command` runs through
1172
1210
  Whistle. A grammar that asks for a request id keeps the same id across retries
1173
- of the same draft until the command is handled.
1211
+ of the same draft until the command is handled. A slash projection can request
1212
+ draft consumption before dispatch, including while a dialog is open.
1174
1213
 
1175
1214
  #### Parameters
1176
1215
 
1177
- | Parameter | Type |
1178
- | ---------- | ------------------------------- |
1179
- | `draft` | `string` |
1180
- | `commands` | [`SlashRuntime`](#slashruntime) |
1181
- | `send` | () => `void` |
1182
- | `origin` | `WhistleExecutionOrigin` |
1216
+ | Parameter | Type |
1217
+ | --------------- | ------------------------------- |
1218
+ | `draft` | `string` |
1219
+ | `commands` | [`SlashRuntime`](#slashruntime) |
1220
+ | `send` | () => `void` |
1221
+ | `origin` | `WhistleExecutionOrigin` |
1222
+ | `consumeDraft?` | () => `void` |
1183
1223
 
1184
1224
  #### Returns
1185
1225
 
@@ -1312,25 +1352,27 @@ One rule for whether an assistant row has content either renderer shows.
1312
1352
  ### placeClientTimeline()
1313
1353
 
1314
1354
  ```ts
1315
- function placeClientTimeline(entries, anchors): object;
1355
+ function placeClientTimeline(entries, anchors, positions?): object;
1316
1356
  ```
1317
1357
 
1318
- Page visibility follows real durable command anchors, never event time.
1358
+ Fixed positions and command anchors follow loaded history, never event time.
1319
1359
 
1320
1360
  #### Parameters
1321
1361
 
1322
- | Parameter | Type |
1323
- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1324
- | `entries` | readonly `Readonly`\<\{ `entryId`: `string`; `value`: \{ `chips`: readonly `object`[]; `panel`: readonly `object`[]; `timeline`: \{ `cells`: readonly `object`[]; `omitted`: `number`; \}; `waiting`: \| \{ `summary`: `string`; `cancel`: \{ `id`: `string`; `label`: `string`; `input?`: \{ \[`key`: `string`\]: `Json`; \}; \}; \} \| `null`; \}; \}\>[] |
1325
- | `anchors` | `ReadonlyMap`\<`string`, `string`\> |
1362
+ | Parameter | Type |
1363
+ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1364
+ | `entries` | readonly `Readonly`\<\{ `entryId`: `string`; `value`: \{ `chips`: readonly `object`[]; `panel`: readonly `object`[]; `timeline`: \{ `cells`: readonly `object`[]; `omitted`: `number`; \}; `waiting`: \| \{ `summary`: `string`; `cancel`: \{ `id`: `string`; `label`: `string`; `input?`: \{ \[`key`: `string`\]: `Json`; \}; \}; \} \| `null`; \}; \}\>[] |
1365
+ | `anchors` | `ReadonlyMap`\<`string`, `string`\> |
1366
+ | `positions` | `ReadonlyMap`\<`number`, `string` \| `null`\> |
1326
1367
 
1327
1368
  #### Returns
1328
1369
 
1329
- | Name | Type | Description |
1330
- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
1331
- | `after` | `Map`\<`string`, `Readonly`\<\{ `entryId`: `string`; `cell`: \{ `id`: `string`; `sequence`: `number`; `at`: `number`; `commandId`: `string` \| `null`; `rows`: readonly `object`[]; \}; \}\>[]\> | Loaded durable row IDs mapped to their following committed events. |
1332
- | `unanchored` | `Readonly`\<\{ `entryId`: `string`; `cell`: \{ `id`: `string`; `sequence`: `number`; `at`: `number`; `commandId`: `string` \| `null`; `rows`: readonly `object`[]; \}; \}\>[] | Null-anchor events for the separate Extension changes section. |
1333
- | `omitted` | `object`[] | Factual producer retention counts, independent of loaded message pages. |
1370
+ | Name | Type | Description |
1371
+ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
1372
+ | `before` | `Readonly`\<\{ `entryId`: `string`; `cell`: \{ `id`: `string`; `sequence`: `number`; `at`: `number`; `commandId`: `string` \| `null`; `afterSequence?`: `number`; `rows`: readonly `object`[]; \}; \}\>[] | Events before the first visible row of the root history page. |
1373
+ | `after` | `Map`\<`string`, `Readonly`\<\{ `entryId`: `string`; `cell`: \{ `id`: `string`; `sequence`: `number`; `at`: `number`; `commandId`: `string` \| `null`; `afterSequence?`: `number`; `rows`: readonly `object`[]; \}; \}\>[]\> | Loaded durable row IDs mapped to their following committed events. |
1374
+ | `unanchored` | `Readonly`\<\{ `entryId`: `string`; `cell`: \{ `id`: `string`; `sequence`: `number`; `at`: `number`; `commandId`: `string` \| `null`; `afterSequence?`: `number`; `rows`: readonly `object`[]; \}; \}\>[] | Null-anchor events for the separate Extension changes section. |
1375
+ | `omitted` | `object`[] | Factual producer retention counts, independent of loaded message pages. |
1334
1376
 
1335
1377
  ---
1336
1378
 
@@ -1342,7 +1384,7 @@ function mergeTerminals(
1342
1384
  incoming,
1343
1385
  ): readonly Readonly<{
1344
1386
  commandId: string;
1345
- outcome: "completed" | "failed" | "cancelled" | "interrupted";
1387
+ outcome: "failed" | "cancelled" | "completed" | "interrupted";
1346
1388
  sequence: number;
1347
1389
  diagnostic: string | null;
1348
1390
  meta?: Json;
@@ -1355,13 +1397,13 @@ Preserve the first terminal for each command, in observed order.
1355
1397
 
1356
1398
  | Parameter | Type |
1357
1399
  | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1358
- | `current` | readonly `Readonly`\<\{ `commandId`: `string`; `outcome`: `"completed"` \| `"failed"` \| `"cancelled"` \| `"interrupted"`; `sequence`: `number`; `diagnostic`: `string` \| `null`; `meta?`: `Json`; \}\>[] |
1359
- | `incoming` | readonly `Readonly`\<\{ `commandId`: `string`; `outcome`: `"completed"` \| `"failed"` \| `"cancelled"` \| `"interrupted"`; `sequence`: `number`; `diagnostic`: `string` \| `null`; `meta?`: `Json`; \}\>[] |
1400
+ | `current` | readonly `Readonly`\<\{ `commandId`: `string`; `outcome`: `"failed"` \| `"cancelled"` \| `"completed"` \| `"interrupted"`; `sequence`: `number`; `diagnostic`: `string` \| `null`; `meta?`: `Json`; \}\>[] |
1401
+ | `incoming` | readonly `Readonly`\<\{ `commandId`: `string`; `outcome`: `"failed"` \| `"cancelled"` \| `"completed"` \| `"interrupted"`; `sequence`: `number`; `diagnostic`: `string` \| `null`; `meta?`: `Json`; \}\>[] |
1360
1402
 
1361
1403
  #### Returns
1362
1404
 
1363
- readonly `Readonly`\<\{ `commandId`: `string`; `outcome`: `"completed"` \|
1364
- `"failed"` \| `"cancelled"` \| `"interrupted"`; `sequence`: `number`;
1405
+ readonly `Readonly`\<\{ `commandId`: `string`; `outcome`: `"failed"` \|
1406
+ `"cancelled"` \| `"completed"` \| `"interrupted"`; `sequence`: `number`;
1365
1407
  `diagnostic`: `string` \| `null`; `meta?`: `Json`; \}\>[]
1366
1408
 
1367
1409
  ---
@@ -1370,14 +1412,16 @@ readonly `Readonly`\<\{ `commandId`: `string`; `outcome`: `"completed"` \|
1370
1412
 
1371
1413
  ```ts
1372
1414
  function sessionQueryOptions(session): OmitKeyof<UseQueryOptions<Readonly<{
1373
- observation: "live" | "connecting";
1415
+ observation: "connecting" | "live";
1374
1416
  snapshot: | Readonly<{
1375
1417
  sessionId: string;
1376
1418
  cursor: string | null;
1377
1419
  hasMore: boolean;
1378
1420
  oldestCursor?: string | null;
1379
1421
  messages: readonly Readonly<{
1422
+ requestId?: ...;
1380
1423
  meta?: ...;
1424
+ data?: ...;
1381
1425
  origin?: ...;
1382
1426
  id: ...;
1383
1427
  sequence: ...;
@@ -1405,6 +1449,13 @@ function sessionQueryOptions(session): OmitKeyof<UseQueryOptions<Readonly<{
1405
1449
  thinkingTruncated: ...;
1406
1450
  }>
1407
1451
  | null;
1452
+ toolOutput: readonly Readonly<{
1453
+ toolCallId: ...;
1454
+ revision: ...;
1455
+ tail: ...;
1456
+ droppedBytes: ...;
1457
+ totalBytes: ...;
1458
+ }>[];
1408
1459
  extensions: SessionExtensionSlots;
1409
1460
  attention: readonly object[];
1410
1461
  context?: Readonly<{
@@ -1413,16 +1464,23 @@ function sessionQueryOptions(session): OmitKeyof<UseQueryOptions<Readonly<{
1413
1464
  }>;
1414
1465
  }>
1415
1466
  | undefined;
1416
- latestPrompt: readonly [string, string] | undefined;
1467
+ latestPrompt: | Readonly<{
1468
+ commandId: string;
1469
+ text: string;
1470
+ images: readonly object[] | undefined;
1471
+ }>
1472
+ | undefined;
1417
1473
  }>, Error, Readonly<{
1418
- observation: "live" | "connecting";
1474
+ observation: "connecting" | "live";
1419
1475
  snapshot: | Readonly<{
1420
1476
  sessionId: string;
1421
1477
  cursor: string | null;
1422
1478
  hasMore: boolean;
1423
1479
  oldestCursor?: string | null;
1424
1480
  messages: readonly Readonly<{
1481
+ requestId?: ...;
1425
1482
  meta?: ...;
1483
+ data?: ...;
1426
1484
  origin?: ...;
1427
1485
  id: ...;
1428
1486
  sequence: ...;
@@ -1450,6 +1508,13 @@ function sessionQueryOptions(session): OmitKeyof<UseQueryOptions<Readonly<{
1450
1508
  thinkingTruncated: ...;
1451
1509
  }>
1452
1510
  | null;
1511
+ toolOutput: readonly Readonly<{
1512
+ toolCallId: ...;
1513
+ revision: ...;
1514
+ tail: ...;
1515
+ droppedBytes: ...;
1516
+ totalBytes: ...;
1517
+ }>[];
1453
1518
  extensions: SessionExtensionSlots;
1454
1519
  attention: readonly object[];
1455
1520
  context?: Readonly<{
@@ -1458,21 +1523,28 @@ function sessionQueryOptions(session): OmitKeyof<UseQueryOptions<Readonly<{
1458
1523
  }>;
1459
1524
  }>
1460
1525
  | undefined;
1461
- latestPrompt: readonly [string, string] | undefined;
1526
+ latestPrompt: | Readonly<{
1527
+ commandId: string;
1528
+ text: string;
1529
+ images: readonly object[] | undefined;
1530
+ }>
1531
+ | undefined;
1462
1532
  }>, readonly ["shiitake-session", string]>, "queryFn"> & object & QueryKeyWithDataTag<readonly ["shiitake-session", string], Readonly<{
1463
- observation: "live" | "connecting";
1533
+ observation: "connecting" | "live";
1464
1534
  snapshot: | Readonly<{
1465
1535
  sessionId: string;
1466
1536
  cursor: string | null;
1467
1537
  hasMore: boolean;
1468
1538
  oldestCursor?: string | null;
1469
1539
  messages: readonly Readonly<{
1540
+ requestId?: ... | ...;
1470
1541
  meta?: ... | ...;
1542
+ data?: ... | ...;
1471
1543
  origin?: ... | ...;
1472
1544
  id: string;
1473
1545
  sequence: number;
1474
1546
  commandId: ... | ...;
1475
- value: Message;
1547
+ value: ModelMessage;
1476
1548
  }>[];
1477
1549
  terminals: readonly Readonly<{
1478
1550
  commandId: string;
@@ -1509,6 +1581,13 @@ function sessionQueryOptions(session): OmitKeyof<UseQueryOptions<Readonly<{
1509
1581
  thinkingTruncated: boolean;
1510
1582
  }>
1511
1583
  | null;
1584
+ toolOutput: readonly Readonly<{
1585
+ toolCallId: string;
1586
+ revision: number;
1587
+ tail: string;
1588
+ droppedBytes: number;
1589
+ totalBytes: number;
1590
+ }>[];
1512
1591
  extensions: SessionExtensionSlots;
1513
1592
  attention: readonly object[];
1514
1593
  context?: Readonly<{
@@ -1517,7 +1596,12 @@ function sessionQueryOptions(session): OmitKeyof<UseQueryOptions<Readonly<{
1517
1596
  }>;
1518
1597
  }>
1519
1598
  | undefined;
1520
- latestPrompt: readonly [string, string] | undefined;
1599
+ latestPrompt: | Readonly<{
1600
+ commandId: string;
1601
+ text: string;
1602
+ images: readonly object[] | undefined;
1603
+ }>
1604
+ | undefined;
1521
1605
  }>, Error>;
1522
1606
  ```
1523
1607
 
@@ -1531,54 +1615,65 @@ One shared TanStack observation keyed by Shiitake's logical Session address.
1531
1615
 
1532
1616
  #### Returns
1533
1617
 
1534
- `OmitKeyof`\<`UseQueryOptions`\<`Readonly`\<\{ `observation`: `"live"` \|
1535
- `"connecting"`; `snapshot`: \| `Readonly`\<\{ `sessionId`: `string`; `cursor`:
1618
+ `OmitKeyof`\<`UseQueryOptions`\<`Readonly`\<\{ `observation`: `"connecting"` \|
1619
+ `"live"`; `snapshot`: \| `Readonly`\<\{ `sessionId`: `string`; `cursor`:
1536
1620
  `string` \| `null`; `hasMore`: `boolean`; `oldestCursor?`: `string` \| `null`;
1537
- `messages`: readonly `Readonly`\<\{ `meta?`: ...; `origin?`: ...; `id`: ...;
1538
- `sequence`: ...; `commandId`: ...; `value`: ...; \}\>[]; `terminals`: readonly
1539
- `Readonly`\<\{ `commandId`: ...; `outcome`: ...; `sequence`: ...; `diagnostic`:
1540
- ...; `meta?`: ...; \}\>[]; `compactions?`: readonly `Readonly`\<...\>[];
1541
- `compactionNotices?`: readonly `Readonly`\<...\>[]; `sandboxFailures?`: readonly
1542
- `object`[]; `pending`: `SessionPendingPrompts`; `activity`: `SessionActivity`;
1543
- `progress`: \| `Readonly`\<\{ `messageId`: ...; `revision`: ...; `text`: ...;
1544
- `thinking`: ...; `textTruncated`: ...; `thinkingTruncated`: ...; \}\> \| `null`;
1545
- `extensions`: `SessionExtensionSlots`; `attention`: readonly `object`[];
1546
- `context?`: `Readonly`\<\{ `tokens`: ...; `window`: ...; \}\>; \}\> \|
1547
- `undefined`; `latestPrompt`: readonly \[`string`, `string`\] \| `undefined`;
1548
- \}\>, `Error`, `Readonly`\<\{ `observation`: `"live"` \| `"connecting"`;
1549
- `snapshot`: \| `Readonly`\<\{ `sessionId`: `string`; `cursor`: `string` \|
1550
- `null`; `hasMore`: `boolean`; `oldestCursor?`: `string` \| `null`; `messages`:
1551
- readonly `Readonly`\<\{ `meta?`: ...; `origin?`: ...; `id`: ...; `sequence`:
1552
- ...; `commandId`: ...; `value`: ...; \}\>[]; `terminals`: readonly
1553
- `Readonly`\<\{ `commandId`: ...; `outcome`: ...; `sequence`: ...; `diagnostic`:
1554
- ...; `meta?`: ...; \}\>[]; `compactions?`: readonly `Readonly`\<...\>[];
1555
- `compactionNotices?`: readonly `Readonly`\<...\>[]; `sandboxFailures?`: readonly
1556
- `object`[]; `pending`: `SessionPendingPrompts`; `activity`: `SessionActivity`;
1557
- `progress`: \| `Readonly`\<\{ `messageId`: ...; `revision`: ...; `text`: ...;
1558
- `thinking`: ...; `textTruncated`: ...; `thinkingTruncated`: ...; \}\> \| `null`;
1559
- `extensions`: `SessionExtensionSlots`; `attention`: readonly `object`[];
1560
- `context?`: `Readonly`\<\{ `tokens`: ...; `window`: ...; \}\>; \}\> \|
1561
- `undefined`; `latestPrompt`: readonly \[`string`, `string`\] \| `undefined`;
1562
- \}\>, readonly \[`"shiitake-session"`, `string`\]\>, `"queryFn"`\> & `object` &
1563
- `QueryKeyWithDataTag`\<readonly \[`"shiitake-session"`, `string`\],
1564
- `Readonly`\<\{ `observation`: `"live"` \| `"connecting"`; `snapshot`: \|
1565
- `Readonly`\<\{ `sessionId`: `string`; `cursor`: `string` \| `null`; `hasMore`:
1566
- `boolean`; `oldestCursor?`: `string` \| `null`; `messages`: readonly
1567
- `Readonly`\<\{ `meta?`: ... \| ...; `origin?`: ... \| ...; `id`: `string`;
1568
- `sequence`: `number`; `commandId`: ... \| ...; `value`: `Message`; \}\>[];
1569
- `terminals`: readonly `Readonly`\<\{ `commandId`: `string`; `outcome`: ... \|
1570
- ... \| ... \| ...; `sequence`: `number`; `diagnostic`: ... \| ...; `meta?`: ...
1571
- \| ...; \}\>[]; `compactions?`: readonly `Readonly`\<\{ `id`: ...; `sequence`:
1572
- ...; `at`: ...; `tokensBefore`: ...; `tokensAfter`: ...; `trigger`: ...; \}\>[];
1621
+ `messages`: readonly `Readonly`\<\{ `requestId?`: ...; `meta?`: ...; `data?`:
1622
+ ...; `origin?`: ...; `id`: ...; `sequence`: ...; `commandId`: ...; `value`: ...;
1623
+ \}\>[]; `terminals`: readonly `Readonly`\<\{ `commandId`: ...; `outcome`: ...;
1624
+ `sequence`: ...; `diagnostic`: ...; `meta?`: ...; \}\>[]; `compactions?`:
1625
+ readonly `Readonly`\<...\>[]; `compactionNotices?`: readonly
1626
+ `Readonly`\<...\>[]; `sandboxFailures?`: readonly `object`[]; `pending`:
1627
+ `SessionPendingPrompts`; `activity`: `SessionActivity`; `progress`: \|
1628
+ `Readonly`\<\{ `messageId`: ...; `revision`: ...; `text`: ...; `thinking`: ...;
1629
+ `textTruncated`: ...; `thinkingTruncated`: ...; \}\> \| `null`; `toolOutput`:
1630
+ readonly `Readonly`\<\{ `toolCallId`: ...; `revision`: ...; `tail`: ...;
1631
+ `droppedBytes`: ...; `totalBytes`: ...; \}\>[]; `extensions`:
1632
+ `SessionExtensionSlots`; `attention`: readonly `object`[]; `context?`:
1633
+ `Readonly`\<\{ `tokens`: ...; `window`: ...; \}\>; \}\> \| `undefined`;
1634
+ `latestPrompt`: \| `Readonly`\<\{ `commandId`: `string`; `text`: `string`;
1635
+ `images`: readonly `object`[] \| `undefined`; \}\> \| `undefined`; \}\>,
1636
+ `Error`, `Readonly`\<\{ `observation`: `"connecting"` \| `"live"`; `snapshot`:
1637
+ \| `Readonly`\<\{ `sessionId`: `string`; `cursor`: `string` \| `null`;
1638
+ `hasMore`: `boolean`; `oldestCursor?`: `string` \| `null`; `messages`: readonly
1639
+ `Readonly`\<\{ `requestId?`: ...; `meta?`: ...; `data?`: ...; `origin?`: ...;
1640
+ `id`: ...; `sequence`: ...; `commandId`: ...; `value`: ...; \}\>[]; `terminals`:
1641
+ readonly `Readonly`\<\{ `commandId`: ...; `outcome`: ...; `sequence`: ...;
1642
+ `diagnostic`: ...; `meta?`: ...; \}\>[]; `compactions?`: readonly
1643
+ `Readonly`\<...\>[]; `compactionNotices?`: readonly `Readonly`\<...\>[];
1644
+ `sandboxFailures?`: readonly `object`[]; `pending`: `SessionPendingPrompts`;
1645
+ `activity`: `SessionActivity`; `progress`: \| `Readonly`\<\{ `messageId`: ...;
1646
+ `revision`: ...; `text`: ...; `thinking`: ...; `textTruncated`: ...;
1647
+ `thinkingTruncated`: ...; \}\> \| `null`; `toolOutput`: readonly `Readonly`\<\{
1648
+ `toolCallId`: ...; `revision`: ...; `tail`: ...; `droppedBytes`: ...;
1649
+ `totalBytes`: ...; \}\>[]; `extensions`: `SessionExtensionSlots`; `attention`:
1650
+ readonly `object`[]; `context?`: `Readonly`\<\{ `tokens`: ...; `window`: ...;
1651
+ \}\>; \}\> \| `undefined`; `latestPrompt`: \| `Readonly`\<\{ `commandId`:
1652
+ `string`; `text`: `string`; `images`: readonly `object`[] \| `undefined`; \}\>
1653
+ \| `undefined`; \}\>, readonly \[`"shiitake-session"`, `string`\]\>,
1654
+ `"queryFn"`\> & `object` & `QueryKeyWithDataTag`\<readonly
1655
+ \[`"shiitake-session"`, `string`\], `Readonly`\<\{ `observation`: `"connecting"`
1656
+ \| `"live"`; `snapshot`: \| `Readonly`\<\{ `sessionId`: `string`; `cursor`:
1657
+ `string` \| `null`; `hasMore`: `boolean`; `oldestCursor?`: `string` \| `null`;
1658
+ `messages`: readonly `Readonly`\<\{ `requestId?`: ... \| ...; `meta?`: ... \|
1659
+ ...; `data?`: ... \| ...; `origin?`: ... \| ...; `id`: `string`; `sequence`:
1660
+ `number`; `commandId`: ... \| ...; `value`: `ModelMessage`; \}\>[]; `terminals`:
1661
+ readonly `Readonly`\<\{ `commandId`: `string`; `outcome`: ... \| ... \| ... \|
1662
+ ...; `sequence`: `number`; `diagnostic`: ... \| ...; `meta?`: ... \| ...;
1663
+ \}\>[]; `compactions?`: readonly `Readonly`\<\{ `id`: ...; `sequence`: ...;
1664
+ `at`: ...; `tokensBefore`: ...; `tokensAfter`: ...; `trigger`: ...; \}\>[];
1573
1665
  `compactionNotices?`: readonly `Readonly`\<\{ `id`: ...; `sequence`: ...; `at`:
1574
1666
  ...; `trigger`: ...; `result`: ...; `diagnostic`: ...; \}\>[];
1575
1667
  `sandboxFailures?`: readonly `object`[]; `pending`: `SessionPendingPrompts`;
1576
1668
  `activity`: `SessionActivity`; `progress`: \| `Readonly`\<\{ `messageId`:
1577
1669
  `string`; `revision`: `number`; `text`: `string`; `thinking`: `string`;
1578
1670
  `textTruncated`: `boolean`; `thinkingTruncated`: `boolean`; \}\> \| `null`;
1579
- `extensions`: `SessionExtensionSlots`; `attention`: readonly `object`[];
1671
+ `toolOutput`: readonly `Readonly`\<\{ `toolCallId`: `string`; `revision`:
1672
+ `number`; `tail`: `string`; `droppedBytes`: `number`; `totalBytes`: `number`;
1673
+ \}\>[]; `extensions`: `SessionExtensionSlots`; `attention`: readonly `object`[];
1580
1674
  `context?`: `Readonly`\<\{ `tokens`: `number`; `window`: ... \| ...; \}\>; \}\>
1581
- \| `undefined`; `latestPrompt`: readonly \[`string`, `string`\] \| `undefined`;
1675
+ \| `undefined`; `latestPrompt`: \| `Readonly`\<\{ `commandId`: `string`; `text`:
1676
+ `string`; `images`: readonly `object`[] \| `undefined`; \}\> \| `undefined`;
1582
1677
  \}\>, `Error`\>
1583
1678
 
1584
1679
  ---
@@ -1608,18 +1703,26 @@ Seed the shared observation with a bounded read before its watch mounts.
1608
1703
  ### subscribeSessionActivity()
1609
1704
 
1610
1705
  ```ts
1611
- function subscribeSessionActivity(queryClient, session, listener): () => void;
1706
+ function subscribeSessionActivity(
1707
+ queryClient,
1708
+ session,
1709
+ listener,
1710
+ questionExtensionId,
1711
+ ): () => void;
1612
1712
  ```
1613
1713
 
1614
- Borrow activity from the existing cache without starting another watch.
1714
+ Borrow activity from the existing cache without starting another watch. An open
1715
+ attention item (such as an unanswered question) reports `blocked` ahead of
1716
+ working and idle; the header comes only from the question extension.
1615
1717
 
1616
1718
  #### Parameters
1617
1719
 
1618
- | Parameter | Type |
1619
- | ------------- | --------------------------------------------- |
1620
- | `queryClient` | `QueryClient` |
1621
- | `session` | [`ParakeetSession`](index.md#parakeetsession) |
1622
- | `listener` | (`activity`) => `void` |
1720
+ | Parameter | Type |
1721
+ | --------------------- | --------------------------------------------- |
1722
+ | `queryClient` | `QueryClient` |
1723
+ | `session` | [`ParakeetSession`](index.md#parakeetsession) |
1724
+ | `listener` | (`activity`) => `void` |
1725
+ | `questionExtensionId` | `string` \| `undefined` |
1623
1726
 
1624
1727
  #### Returns
1625
1728
 
@@ -1699,7 +1802,7 @@ Shared tool status meaning, used by the browser and native presentations.
1699
1802
 
1700
1803
  | Parameter | Type |
1701
1804
  | --------- | -------------------------------------------------------- |
1702
- | `status` | `"error"` \| `"unknown"` \| `"completed"` \| `"running"` |
1805
+ | `status` | `"error"` \| `"unknown"` \| `"running"` \| `"completed"` |
1703
1806
 
1704
1807
  #### Returns
1705
1808
 
@@ -1755,6 +1858,7 @@ function sessionModelCommandDefinitions(session, options): readonly Readonly<{
1755
1858
  };
1756
1859
  slash?: {
1757
1860
  aliases: readonly string[];
1861
+ consumesDraft?: boolean;
1758
1862
  order?: number;
1759
1863
  arguments?: {
1760
1864
  hint: string;
@@ -1843,47 +1947,48 @@ readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`;
1843
1947
  `values`: readonly `string`[]; \}; `agent?`: \{ `keybind?`: `string`; `order?`:
1844
1948
  `number`; \}; `help?`: \{ `order?`: `number`; \}; `menu?`: \{ `order?`:
1845
1949
  `number`; \}; `palette?`: \{ `order?`: `number`; \}; `slash?`: \{ `aliases`:
1846
- readonly `string`[]; `order?`: `number`; `arguments?`: \{ `hint`: `string`;
1847
- `words?`: readonly ...[]; `text?`: \{ `field`: ...; `arguments`: ...;
1848
- `requestIdField?`: ...; \}; \}; \}; \}; `action?`: \{ `inputSchema?`: \{
1849
- \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \|
1850
- number \| boolean \| readonly (string \| number \| boolean \| readonly (string
1851
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
1852
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
1853
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
1854
- ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \|
1855
- number \| boolean \| readonly (string \| number \| boolean \| readonly (string
1856
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
1857
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
1858
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
1859
- ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `outputSchema?`: \{
1860
- \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \|
1950
+ readonly `string`[]; `consumesDraft?`: `boolean`; `order?`: `number`;
1951
+ `arguments?`: \{ `hint`: `string`; `words?`: readonly ...[]; `text?`: \{
1952
+ `field`: ...; `arguments`: ...; `requestIdField?`: ...; \}; \}; \}; \};
1953
+ `action?`: \{ `inputSchema?`: \{ \[`key`: `string`\]: \| `string` \| `number` \|
1954
+ `boolean` \| readonly string \| number \| boolean \| readonly (string \| number
1955
+ \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
1861
1956
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
1862
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
1863
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
1864
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
1865
- ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \|
1957
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
1958
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{
1959
+ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number
1960
+ \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
1866
1961
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
1867
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
1868
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
1869
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
1870
- ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `presentation?`: \|
1871
- \{ `type`: `"action"`; \} \| \{ `type`: `"custom"`; `data`: \{ \[`key`:
1872
- `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \|
1873
- boolean \| readonly (string \| number \| boolean \| readonly (string \| number
1962
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
1963
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \|
1964
+ `null`; \}; `outputSchema?`: \{ \[`key`: `string`\]: \| `string` \| `number` \|
1965
+ `boolean` \| readonly string \| number \| boolean \| readonly (string \| number
1874
1966
  \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
1875
1967
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
1876
- \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \|
1877
- null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \|
1878
- boolean \| readonly (string \| number \| boolean \| readonly (string \| number
1968
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
1969
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{
1970
+ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number
1879
1971
  \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
1880
1972
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
1881
- \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \|
1882
- null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; \} \| \{ `type`: `"choice"`;
1883
- `options`: readonly `object`[]; \} \| \{ `type`: `"form"`; `submitLabel?`:
1884
- `string`; \} \| \{ `type`: `"confirmation"`; `message`: `string`;
1885
- `confirmLabel?`: `string`; `cancelLabel?`: `string`; \}; \}; `availability?`: ()
1886
- => `WhistleAvailability`; `handler`: (`input`) => `unknown`; \}\>[]
1973
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
1974
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \|
1975
+ `null`; \}; `presentation?`: \| \{ `type`: `"action"`; \} \| \{ `type`:
1976
+ `"custom"`; `data`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean`
1977
+ \| readonly string \| number \| boolean \| readonly (string \| number \| boolean
1978
+ \| readonly (string \| number \| boolean \| readonly (string \| number \|
1979
+ boolean \| readonly (string \| number \| boolean \| readonly (string \| number
1980
+ \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \|
1981
+ null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`:
1982
+ `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean
1983
+ \| readonly (string \| number \| boolean \| readonly (string \| number \|
1984
+ boolean \| readonly (string \| number \| boolean \| readonly (string \| number
1985
+ \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \|
1986
+ null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; \}
1987
+ \| \{ `type`: `"choice"`; `options`: readonly `object`[]; \} \| \{ `type`:
1988
+ `"form"`; `submitLabel?`: `string`; \} \| \{ `type`: `"confirmation"`;
1989
+ `message`: `string`; `confirmLabel?`: `string`; `cancelLabel?`: `string`; \};
1990
+ \}; `availability?`: () => `WhistleAvailability`; `handler`: (`input`) =>
1991
+ `unknown`; \}\>[]
1887
1992
 
1888
1993
  ---
1889
1994
 
@@ -1994,6 +2099,7 @@ function reloadCommandDefinitions(options): readonly Readonly<{
1994
2099
  };
1995
2100
  slash?: {
1996
2101
  aliases: readonly string[];
2102
+ consumesDraft?: boolean;
1997
2103
  order?: number;
1998
2104
  arguments?: {
1999
2105
  hint: string;
@@ -2081,47 +2187,48 @@ readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`;
2081
2187
  `values`: readonly `string`[]; \}; `agent?`: \{ `keybind?`: `string`; `order?`:
2082
2188
  `number`; \}; `help?`: \{ `order?`: `number`; \}; `menu?`: \{ `order?`:
2083
2189
  `number`; \}; `palette?`: \{ `order?`: `number`; \}; `slash?`: \{ `aliases`:
2084
- readonly `string`[]; `order?`: `number`; `arguments?`: \{ `hint`: `string`;
2085
- `words?`: readonly ...[]; `text?`: \{ `field`: ...; `arguments`: ...;
2086
- `requestIdField?`: ...; \}; \}; \}; \}; `action?`: \{ `inputSchema?`: \{
2087
- \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \|
2088
- number \| boolean \| readonly (string \| number \| boolean \| readonly (string
2089
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
2090
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
2091
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
2092
- ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \|
2093
- number \| boolean \| readonly (string \| number \| boolean \| readonly (string
2094
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
2095
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
2096
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
2097
- ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `outputSchema?`: \{
2098
- \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \|
2190
+ readonly `string`[]; `consumesDraft?`: `boolean`; `order?`: `number`;
2191
+ `arguments?`: \{ `hint`: `string`; `words?`: readonly ...[]; `text?`: \{
2192
+ `field`: ...; `arguments`: ...; `requestIdField?`: ...; \}; \}; \}; \};
2193
+ `action?`: \{ `inputSchema?`: \{ \[`key`: `string`\]: \| `string` \| `number` \|
2194
+ `boolean` \| readonly string \| number \| boolean \| readonly (string \| number
2195
+ \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
2099
2196
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
2100
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
2101
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
2102
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
2103
- ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \|
2197
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
2198
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{
2199
+ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number
2200
+ \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
2104
2201
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
2105
- \| number \| boolean \| readonly (string \| number \| boolean \| readonly
2106
- (string \| number \| boolean \| readonly (string \| number \| boolean \|
2107
- readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
2108
- ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `presentation?`: \|
2109
- \{ `type`: `"action"`; \} \| \{ `type`: `"custom"`; `data`: \{ \[`key`:
2110
- `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \|
2111
- boolean \| readonly (string \| number \| boolean \| readonly (string \| number
2202
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
2203
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \|
2204
+ `null`; \}; `outputSchema?`: \{ \[`key`: `string`\]: \| `string` \| `number` \|
2205
+ `boolean` \| readonly string \| number \| boolean \| readonly (string \| number
2112
2206
  \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
2113
2207
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
2114
- \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \|
2115
- null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \|
2116
- boolean \| readonly (string \| number \| boolean \| readonly (string \| number
2208
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
2209
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{
2210
+ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number
2117
2211
  \| boolean \| readonly (string \| number \| boolean \| readonly (string \|
2118
2212
  number \| boolean \| readonly (string \| number \| boolean \| readonly (string
2119
- \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \|
2120
- null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; \} \| \{ `type`: `"choice"`;
2121
- `options`: readonly `object`[]; \} \| \{ `type`: `"form"`; `submitLabel?`:
2122
- `string`; \} \| \{ `type`: `"confirmation"`; `message`: `string`;
2123
- `confirmLabel?`: `string`; `cancelLabel?`: `string`; \}; \}; `availability?`: ()
2124
- => `WhistleAvailability`; `handler`: (`input`) => `unknown`; \}\>[]
2213
+ \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
2214
+ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \|
2215
+ `null`; \}; `presentation?`: \| \{ `type`: `"action"`; \} \| \{ `type`:
2216
+ `"custom"`; `data`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean`
2217
+ \| readonly string \| number \| boolean \| readonly (string \| number \| boolean
2218
+ \| readonly (string \| number \| boolean \| readonly (string \| number \|
2219
+ boolean \| readonly (string \| number \| boolean \| readonly (string \| number
2220
+ \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \|
2221
+ null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`:
2222
+ `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean
2223
+ \| readonly (string \| number \| boolean \| readonly (string \| number \|
2224
+ boolean \| readonly (string \| number \| boolean \| readonly (string \| number
2225
+ \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \|
2226
+ null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; \}
2227
+ \| \{ `type`: `"choice"`; `options`: readonly `object`[]; \} \| \{ `type`:
2228
+ `"form"`; `submitLabel?`: `string`; \} \| \{ `type`: `"confirmation"`;
2229
+ `message`: `string`; `confirmLabel?`: `string`; `cancelLabel?`: `string`; \};
2230
+ \}; `availability?`: () => `WhistleAvailability`; `handler`: (`input`) =>
2231
+ `unknown`; \}\>[]
2125
2232
 
2126
2233
  ---
2127
2234
 
@@ -2187,6 +2294,36 @@ Re-exports [formatModelIdentity](index.md#formatmodelidentity)
2187
2294
 
2188
2295
  ---
2189
2296
 
2297
+ ### formatModelWithLevel
2298
+
2299
+ Re-exports [formatModelWithLevel](index.md#formatmodelwithlevel)
2300
+
2301
+ ---
2302
+
2303
+ ### QueuedRecallState
2304
+
2305
+ Re-exports [QueuedRecallState](index.md#queuedrecallstate)
2306
+
2307
+ ---
2308
+
2309
+ ### QueuedRecallOutcome
2310
+
2311
+ Re-exports [QueuedRecallOutcome](index.md#queuedrecalloutcome)
2312
+
2313
+ ---
2314
+
2315
+ ### ParakeetDraftIdentity
2316
+
2317
+ Re-exports [ParakeetDraftIdentity](index.md#parakeetdraftidentity)
2318
+
2319
+ ---
2320
+
2321
+ ### ParakeetDraftStorage
2322
+
2323
+ Re-exports [ParakeetDraftStorage](index.md#parakeetdraftstorage)
2324
+
2325
+ ---
2326
+
2190
2327
  ### formatContextUsage
2191
2328
 
2192
2329
  Re-exports [formatContextUsage](index.md#formatcontextusage)
@@ -2229,6 +2366,12 @@ Re-exports [ComposerController](index.md#composercontroller)
2229
2366
 
2230
2367
  ---
2231
2368
 
2369
+ ### ParakeetDraftCheckpoint
2370
+
2371
+ Re-exports [ParakeetDraftCheckpoint](index.md#parakeetdraftcheckpoint)
2372
+
2373
+ ---
2374
+
2232
2375
  ### ParakeetModel
2233
2376
 
2234
2377
  Re-exports [ParakeetModel](index.md#parakeetmodel)