@appsolutely-io/waypoint 0.0.0-stage → 0.1.1-next.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 (161) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +260 -2
  3. package/dist/block-reply-DN4RiLL0.d.cts +169 -0
  4. package/dist/block-reply-Dtof9ild.d.ts +169 -0
  5. package/dist/blocks-25YOJ5SS.cjs +1 -0
  6. package/dist/blocks-UJ7GUJHD.js +1 -0
  7. package/dist/chunk-3KV7TDDR.cjs +3 -0
  8. package/dist/chunk-4BWV3SEL.cjs +1 -0
  9. package/dist/chunk-4ZGW4HM4.cjs +1 -0
  10. package/dist/chunk-5TBO732O.js +1 -0
  11. package/dist/chunk-6OZSKCPT.cjs +1 -0
  12. package/dist/chunk-C3VS33WJ.js +1 -0
  13. package/dist/chunk-D2EGPBCX.cjs +1 -0
  14. package/dist/chunk-FBADWFRR.cjs +1 -0
  15. package/dist/chunk-FQSWQLRW.js +1 -0
  16. package/dist/chunk-GT6PI4CT.cjs +1 -0
  17. package/dist/chunk-II26UWZM.cjs +1 -0
  18. package/dist/chunk-JFMVVGGB.js +1 -0
  19. package/dist/chunk-K73VV7KA.js +1 -0
  20. package/dist/chunk-L4PFFRDE.js +3 -0
  21. package/dist/chunk-LLPGVQUT.cjs +1 -0
  22. package/dist/chunk-M3UENQ6L.cjs +1 -0
  23. package/dist/chunk-M63QOANE.js +1 -0
  24. package/dist/chunk-MEKDQDSV.js +1 -0
  25. package/dist/chunk-OEPKPDLD.js +1 -0
  26. package/dist/chunk-OWT55N6J.js +3 -0
  27. package/dist/chunk-PFR2J5BV.js +1 -0
  28. package/dist/chunk-Q6BD2YL3.cjs +1 -0
  29. package/dist/chunk-Q7BULGQG.cjs +1 -0
  30. package/dist/chunk-QS3MKZOY.cjs +3 -0
  31. package/dist/chunk-RHBDQGD4.js +1 -0
  32. package/dist/chunk-RZZDQWC2.js +1 -0
  33. package/dist/chunk-S73WZWDP.js +1 -0
  34. package/dist/chunk-SD2KAIVE.js +1 -0
  35. package/dist/chunk-T5XF2R74.js +1 -0
  36. package/dist/chunk-TCFCSGQ3.js +1 -0
  37. package/dist/chunk-TGL3DR2K.js +1 -0
  38. package/dist/chunk-TODYQ3SG.cjs +1 -0
  39. package/dist/chunk-TVSQHTK2.cjs +1 -0
  40. package/dist/chunk-UYR3UEIW.cjs +1 -0
  41. package/dist/chunk-VGGJGRNK.cjs +1 -0
  42. package/dist/chunk-W6Y7H56X.js +1 -0
  43. package/dist/chunk-XSHOLIC7.cjs +1 -0
  44. package/dist/chunk-XWDB2LS3.cjs +1 -0
  45. package/dist/cli.js +3 -0
  46. package/dist/confirmation-view-CICNJJIO.js +1 -0
  47. package/dist/confirmation-view-OMWHUYVC.cjs +1 -0
  48. package/dist/conformance.cjs +1 -0
  49. package/dist/conformance.d.cts +10 -0
  50. package/dist/conformance.d.ts +10 -0
  51. package/dist/conformance.js +1 -0
  52. package/dist/flow-parser.cjs +1 -0
  53. package/dist/flow-parser.d.cts +3 -0
  54. package/dist/flow-parser.d.ts +3 -0
  55. package/dist/flow-parser.js +1 -0
  56. package/dist/flows-panel-AIULKYOS.cjs +1 -0
  57. package/dist/flows-panel-YEJ36RTY.js +1 -0
  58. package/dist/form-extras-QYE32TUY.cjs +1 -0
  59. package/dist/form-extras-SBBOMJS2.js +1 -0
  60. package/dist/form-fill-C32AHxSr.d.cts +653 -0
  61. package/dist/form-fill-Dp3ut1_Y.d.ts +653 -0
  62. package/dist/form-session.cjs +1 -0
  63. package/dist/form-session.d.cts +7 -0
  64. package/dist/form-session.d.ts +7 -0
  65. package/dist/form-session.js +1 -0
  66. package/dist/frame-decoder.cjs +3 -0
  67. package/dist/frame-decoder.d.cts +5 -0
  68. package/dist/frame-decoder.d.ts +5 -0
  69. package/dist/frame-decoder.js +3 -0
  70. package/dist/generated-C9tbjwK0.d.cts +797 -0
  71. package/dist/generated-C9tbjwK0.d.ts +797 -0
  72. package/dist/hooks/index.cjs +1 -0
  73. package/dist/hooks/index.d.cts +48 -0
  74. package/dist/hooks/index.d.ts +48 -0
  75. package/dist/hooks/index.js +1 -0
  76. package/dist/i18n-DPNfYTMG.d.cts +148 -0
  77. package/dist/i18n-DPNfYTMG.d.ts +148 -0
  78. package/dist/index-B5idIFTx.d.cts +34 -0
  79. package/dist/index-DPzoKXCK.d.ts +34 -0
  80. package/dist/index.cjs +3 -0
  81. package/dist/index.d.cts +38 -0
  82. package/dist/index.d.ts +38 -0
  83. package/dist/index.js +3 -0
  84. package/dist/intent-BQPPows1.d.cts +154 -0
  85. package/dist/intent-BuvqEU3Q.d.ts +154 -0
  86. package/dist/intent.cjs +1 -0
  87. package/dist/intent.d.cts +2 -0
  88. package/dist/intent.d.ts +2 -0
  89. package/dist/intent.js +1 -0
  90. package/dist/markdown-BSRKJFFE.cjs +17 -0
  91. package/dist/markdown-ETLB66BK.js +17 -0
  92. package/dist/message-actions-3HGE6VTS.js +1 -0
  93. package/dist/message-actions-F6SPLTT7.cjs +1 -0
  94. package/dist/messages/en/index.cjs +1 -0
  95. package/dist/messages/en/index.d.cts +3 -0
  96. package/dist/messages/en/index.d.ts +3 -0
  97. package/dist/messages/en/index.js +1 -0
  98. package/dist/messages/index.cjs +1 -0
  99. package/dist/messages/index.d.cts +14 -0
  100. package/dist/messages/index.d.ts +14 -0
  101. package/dist/messages/index.js +1 -0
  102. package/dist/messages/zh-Hans/index.cjs +1 -0
  103. package/dist/messages/zh-Hans/index.d.cts +3 -0
  104. package/dist/messages/zh-Hans/index.d.ts +3 -0
  105. package/dist/messages/zh-Hans/index.js +1 -0
  106. package/dist/on-demand.cjs +1 -0
  107. package/dist/on-demand.d.cts +56 -0
  108. package/dist/on-demand.d.ts +56 -0
  109. package/dist/on-demand.js +1 -0
  110. package/dist/problem-messages-THONMXFZ.cjs +1 -0
  111. package/dist/problem-messages-Z5QGO6RE.js +1 -0
  112. package/dist/react/index.cjs +1 -0
  113. package/dist/react/index.d.cts +419 -0
  114. package/dist/react/index.d.ts +419 -0
  115. package/dist/react/index.js +1 -0
  116. package/dist/reads-Bk84x_rt.d.ts +38 -0
  117. package/dist/reads-DlpCt8dE.d.cts +38 -0
  118. package/dist/recovery-panel-OWY2CWOH.cjs +3 -0
  119. package/dist/recovery-panel-VOKVDDZD.js +3 -0
  120. package/dist/reply-controls-5CWIAKIG.js +1 -0
  121. package/dist/reply-controls-CPWB4VBK.cjs +1 -0
  122. package/dist/run-XBABOEXK.js +1 -0
  123. package/dist/schema.json +2900 -0
  124. package/dist/skin-antd/index.cjs +1 -0
  125. package/dist/skin-antd/index.d.cts +30 -0
  126. package/dist/skin-antd/index.d.ts +30 -0
  127. package/dist/skin-antd/index.js +1 -0
  128. package/dist/skin-default/index.cjs +1 -0
  129. package/dist/skin-default/index.d.cts +42 -0
  130. package/dist/skin-default/index.d.ts +42 -0
  131. package/dist/skin-default/index.js +1 -0
  132. package/dist/step-name-3hQ6CCGr.d.cts +19 -0
  133. package/dist/step-name-BdkYnb5g.d.ts +19 -0
  134. package/dist/storage-commit.cjs +1 -0
  135. package/dist/storage-commit.d.cts +17 -0
  136. package/dist/storage-commit.d.ts +17 -0
  137. package/dist/storage-commit.js +1 -0
  138. package/dist/stream-reads.cjs +1 -0
  139. package/dist/stream-reads.d.cts +22 -0
  140. package/dist/stream-reads.d.ts +22 -0
  141. package/dist/stream-reads.js +1 -0
  142. package/dist/styles.css +796 -0
  143. package/dist/testing/index.cjs +1 -0
  144. package/dist/testing/index.d.cts +57 -0
  145. package/dist/testing/index.d.ts +57 -0
  146. package/dist/testing/index.js +1 -0
  147. package/docs/examples/message-versions.tsx +74 -0
  148. package/docs/form-fill-protocol.md +83 -0
  149. package/docs/message-versions.md +64 -0
  150. package/docs/plan-protocol.md +83 -0
  151. package/docs/reply-protocol.md +75 -0
  152. package/etc/hooks.api.md +2385 -0
  153. package/etc/index.api.md +2159 -0
  154. package/etc/messages-en.api.md +13 -0
  155. package/etc/messages-zh-Hans.api.md +13 -0
  156. package/etc/messages.api.md +183 -0
  157. package/etc/react.api.md +2968 -0
  158. package/etc/skin-antd.api.md +2989 -0
  159. package/etc/skin-default.api.md +61 -0
  160. package/etc/testing.api.md +3034 -0
  161. package/package.json +168 -4
@@ -0,0 +1,2385 @@
1
+ ## API Report File for "@appsolutely-io/waypoint"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ // @public (undocumented)
8
+ export interface ActionEntry {
9
+ // (undocumented)
10
+ available: boolean;
11
+ // (undocumented)
12
+ busy?: boolean;
13
+ countedLabelKey?: MessageKey;
14
+ // (undocumented)
15
+ id: ActionId;
16
+ labelKey: MessageKey;
17
+ labelValues?: Record<string, number>;
18
+ // (undocumented)
19
+ reasonKey?: MessageKey;
20
+ // (undocumented)
21
+ reasonValues?: Record<string, number>;
22
+ // (undocumented)
23
+ schedule?: boolean;
24
+ }
25
+
26
+ // @public (undocumented)
27
+ export type ActionId = "confirm" | "stop" | "decline" | "leave" | "keep" | "status" | "undoSelected" | "continue";
28
+
29
+ // @public (undocumented)
30
+ export function asProblem(error: unknown, id: string): Problem;
31
+
32
+ // @public (undocumented)
33
+ export interface AttachmentPort {
34
+ // (undocumented)
35
+ remove(id: string): MaybePromise<void>;
36
+ // (undocumented)
37
+ upload(data: Uint8Array, context: {
38
+ conversationId: string;
39
+ fileName: string;
40
+ contentType: string;
41
+ }): MaybePromise<{
42
+ id: string;
43
+ }>;
44
+ }
45
+
46
+ // @public (undocumented)
47
+ export type Block = BlockMarkdown | BlockCard | BlockDetails | BlockList | BlockTable | BlockForm | BlockChoice | BlockButtons | BlockDiff | BlockPlan | BlockRouteLink | BlockNotice | BlockFormFill | ExtensionBlock;
48
+
49
+ // @public
50
+ export type BlockAnswer = Pick<Reply, "kind"> & Record<string, unknown>;
51
+
52
+ // @public (undocumented)
53
+ export interface BlockButtons {
54
+ // (undocumented)
55
+ answer?: CardAnswer;
56
+ answered?: boolean;
57
+ // (undocumented)
58
+ body: {
59
+ actions: {
60
+ id: string;
61
+ label: string;
62
+ }[];
63
+ };
64
+ // (undocumented)
65
+ fallback: string;
66
+ // (undocumented)
67
+ id: string;
68
+ // (undocumented)
69
+ type: 'buttons';
70
+ }
71
+
72
+ // @public (undocumented)
73
+ export interface BlockCard {
74
+ // (undocumented)
75
+ answer?: CardAnswer;
76
+ answered?: boolean;
77
+ // (undocumented)
78
+ body: {
79
+ title: string;
80
+ blocks: Block[];
81
+ };
82
+ // (undocumented)
83
+ fallback: string;
84
+ // (undocumented)
85
+ id: string;
86
+ // (undocumented)
87
+ type: 'card';
88
+ }
89
+
90
+ // @public (undocumented)
91
+ export type BlockCatalogue = Readonly<Record<BlockMessageKey, string>>;
92
+
93
+ // @public (undocumented)
94
+ export interface BlockChoice {
95
+ // (undocumented)
96
+ answer?: CardAnswer;
97
+ answered?: boolean;
98
+ // (undocumented)
99
+ body: {
100
+ mode: 'single' | 'multi' | 'text';
101
+ options: string[];
102
+ };
103
+ // (undocumented)
104
+ fallback: string;
105
+ // (undocumented)
106
+ id: string;
107
+ // (undocumented)
108
+ type: 'choice';
109
+ }
110
+
111
+ // @public
112
+ export interface BlockDetails {
113
+ // (undocumented)
114
+ answer?: CardAnswer;
115
+ answered?: boolean;
116
+ body: {
117
+ summary: string;
118
+ blocks: Block[];
119
+ };
120
+ fallback: string;
121
+ id: string;
122
+ type: 'details';
123
+ }
124
+
125
+ // @public (undocumented)
126
+ export interface BlockDiff {
127
+ // (undocumented)
128
+ answer?: CardAnswer;
129
+ answered?: boolean;
130
+ // (undocumented)
131
+ body: {
132
+ before: unknown;
133
+ after: unknown;
134
+ };
135
+ // (undocumented)
136
+ fallback: string;
137
+ // (undocumented)
138
+ id: string;
139
+ // (undocumented)
140
+ type: 'diff';
141
+ }
142
+
143
+ // @public (undocumented)
144
+ export interface BlockForm {
145
+ // (undocumented)
146
+ answer?: CardAnswer;
147
+ answered?: boolean;
148
+ // (undocumented)
149
+ body: {
150
+ fields: {
151
+ name: string;
152
+ label: string;
153
+ required?: boolean;
154
+ value?: string;
155
+ }[];
156
+ };
157
+ // (undocumented)
158
+ fallback: string;
159
+ // (undocumented)
160
+ id: string;
161
+ // (undocumented)
162
+ type: 'form';
163
+ }
164
+
165
+ // @public (undocumented)
166
+ export interface BlockFormFill {
167
+ // (undocumented)
168
+ answer?: CardAnswer;
169
+ answered?: boolean;
170
+ // (undocumented)
171
+ body: {
172
+ requestId: string;
173
+ values: {
174
+ [k: string]: FormFillValue;
175
+ };
176
+ };
177
+ // (undocumented)
178
+ fallback: string;
179
+ // (undocumented)
180
+ id: string;
181
+ // (undocumented)
182
+ type: 'form.fill';
183
+ }
184
+
185
+ // @public (undocumented)
186
+ export interface BlockList {
187
+ // (undocumented)
188
+ answer?: CardAnswer;
189
+ answered?: boolean;
190
+ // (undocumented)
191
+ body: {
192
+ items: string[];
193
+ };
194
+ // (undocumented)
195
+ fallback: string;
196
+ // (undocumented)
197
+ id: string;
198
+ // (undocumented)
199
+ type: 'list';
200
+ }
201
+
202
+ // @public (undocumented)
203
+ export interface BlockMarkdown {
204
+ // (undocumented)
205
+ answer?: CardAnswer;
206
+ answered?: boolean;
207
+ // (undocumented)
208
+ body: {
209
+ text: string;
210
+ };
211
+ // (undocumented)
212
+ fallback: string;
213
+ // (undocumented)
214
+ id: string;
215
+ // (undocumented)
216
+ type: 'markdown';
217
+ }
218
+
219
+ // @public (undocumented)
220
+ export type BlockMessageKey = "chat.block.required" | "chat.block.requiredMissing" | "chat.block.answerMissing" | "chat.block.empty" | "chat.block.tierLow" | "chat.block.tierSensitive" | "chat.block.undoCompareAndSet" | "chat.block.undoArchiveCreated" | "chat.block.undoInverse" | "chat.block.status" | "chat.block.outcomeDone" | "chat.block.outcomeFailed" | "chat.block.retryable" | "chat.block.notRetryable" | "chat.block.state.proposed" | "chat.block.state.awaiting-confirmation" | "chat.block.state.running" | "chat.block.state.undoing" | "chat.block.state.completed" | "chat.block.state.submitted" | "chat.block.state.undone" | "chat.block.state.needs-attention" | "chat.block.state.cancelled" | "chat.block.run" | "chat.block.runMissing" | "chat.block.favourite" | "chat.block.flowLoading" | "chat.block.flowsLoading" | "chat.block.flowsEmpty" | "chat.block.answered" | "chat.block.answeredWith";
221
+
222
+ // @public (undocumented)
223
+ export interface BlockNotice {
224
+ // (undocumented)
225
+ answer?: CardAnswer;
226
+ answered?: boolean;
227
+ // (undocumented)
228
+ body: {
229
+ text: string;
230
+ tone?: 'info' | 'warning' | 'error';
231
+ };
232
+ // (undocumented)
233
+ fallback: string;
234
+ // (undocumented)
235
+ id: string;
236
+ // (undocumented)
237
+ type: 'notice';
238
+ }
239
+
240
+ // @public (undocumented)
241
+ export interface BlockPlan {
242
+ // (undocumented)
243
+ answer?: CardAnswer;
244
+ answered?: boolean;
245
+ // (undocumented)
246
+ body: {
247
+ planId: string;
248
+ };
249
+ // (undocumented)
250
+ fallback: string;
251
+ // (undocumented)
252
+ id: string;
253
+ // (undocumented)
254
+ type: 'plan';
255
+ }
256
+
257
+ // @public (undocumented)
258
+ export interface BlockReply {
259
+ answered: ReadonlySet<string>;
260
+ isAnswered(block: Pick<Block, "id" | "answered">, messageId?: string): boolean;
261
+ reply(block: Pick<Block, "id">, answer: BlockAnswer, messageId?: string): Promise<ReplyOutcome | void>;
262
+ }
263
+
264
+ // @public (undocumented)
265
+ export interface BlockRouteLink {
266
+ // (undocumented)
267
+ answer?: CardAnswer;
268
+ answered?: boolean;
269
+ // (undocumented)
270
+ body: {
271
+ label: string;
272
+ route: string;
273
+ };
274
+ // (undocumented)
275
+ fallback: string;
276
+ // (undocumented)
277
+ id: string;
278
+ // (undocumented)
279
+ type: 'route-link';
280
+ }
281
+
282
+ // @public (undocumented)
283
+ export interface BlockTable {
284
+ // (undocumented)
285
+ answer?: CardAnswer;
286
+ answered?: boolean;
287
+ // (undocumented)
288
+ body: {
289
+ columns: string[];
290
+ rows: unknown[][];
291
+ };
292
+ // (undocumented)
293
+ fallback: string;
294
+ // (undocumented)
295
+ id: string;
296
+ // (undocumented)
297
+ type: 'table';
298
+ }
299
+
300
+ // @public (undocumented)
301
+ export type BuiltinFlowTab = "favourites" | "most-used" | "recent" | "presets";
302
+
303
+ // @public (undocumented)
304
+ export interface CanonicalRequest {
305
+ // (undocumented)
306
+ body: string;
307
+ // (undocumented)
308
+ digest: string;
309
+ // (undocumented)
310
+ headers: {
311
+ [k: string]: string;
312
+ };
313
+ // (undocumented)
314
+ method: 'POST' | 'PUT' | 'PATCH' | 'GET';
315
+ // (undocumented)
316
+ path: string;
317
+ }
318
+
319
+ // @public (undocumented)
320
+ export function canTransition(from: PlanState, to: PlanState): boolean;
321
+
322
+ // @public (undocumented)
323
+ export const CAPABILITIES: readonly ["plans", "flows", "widgets", "step-up", "scheduled", "form-fill", "plan-recovery", "plan-leave", "plan-keep", "reply-stop"];
324
+
325
+ // @public (undocumented)
326
+ export type Capability = (typeof CAPABILITIES)[number];
327
+
328
+ // @public
329
+ export type CardAnswer = {
330
+ kind: 'action';
331
+ clientReplyId: string;
332
+ blockId: string;
333
+ actionId: string;
334
+ } | {
335
+ kind: 'form';
336
+ clientReplyId: string;
337
+ blockId: string;
338
+ values?: {};
339
+ };
340
+
341
+ // @public
342
+ export function cardReplyId(conversationId: string, messageId: string, blockId: string, answer: BlockAnswer): string;
343
+
344
+ // @public (undocumented)
345
+ export interface ClientConfig {
346
+ // (undocumented)
347
+ accountId: string;
348
+ // (undocumented)
349
+ beforeSend?: (reply: Reply) => MaybePromise<Reply | false | void>;
350
+ // (undocumented)
351
+ contributions?: readonly ComposerContribution[];
352
+ // (undocumented)
353
+ conversationId: string;
354
+ // (undocumented)
355
+ feedback?: FeedbackPort;
356
+ // (undocumented)
357
+ flowOperations?: readonly string[];
358
+ // (undocumented)
359
+ flowSource?: FlowSource;
360
+ // (undocumented)
361
+ formSession?: FormSession;
362
+ // (undocumented)
363
+ plans?: RunnerPorts & {
364
+ resume?(id: string): Promise<PlanRecord>;
365
+ retryUndo?(id: string): Promise<PlanRecord>;
366
+ };
367
+ // (undocumented)
368
+ platform: PlatformPorts;
369
+ // (undocumented)
370
+ reads?: ReadPorts;
371
+ // (undocumented)
372
+ storage?: StoragePort;
373
+ // (undocumented)
374
+ tabs?: readonly FlowTab[];
375
+ // (undocumented)
376
+ transport: TransportPort;
377
+ // (undocumented)
378
+ versions?: MessageVersionPort;
379
+ }
380
+
381
+ // @public (undocumented)
382
+ export interface ClientSnapshot {
383
+ // (undocumented)
384
+ announcement: number;
385
+ // (undocumented)
386
+ capabilities: readonly Capability[];
387
+ confirmationRefusal?: {
388
+ token: string;
389
+ problemId: string;
390
+ };
391
+ // (undocumented)
392
+ conversation: Conversation | null;
393
+ // (undocumented)
394
+ conversationId: string;
395
+ // (undocumented)
396
+ conversationUnavailable: boolean;
397
+ // (undocumented)
398
+ draft: string;
399
+ // (undocumented)
400
+ flows: Partial<Record<string, FlowSummary[]>>;
401
+ // (undocumented)
402
+ flowTab: string;
403
+ // (undocumented)
404
+ flowTabs: readonly FlowTab[];
405
+ // (undocumented)
406
+ hints: readonly string[];
407
+ // (undocumented)
408
+ intentAlert: IntentAlert | null;
409
+ intentNotice: IntentNotice | null;
410
+ intentOverlays: Readonly<Record<string, IntentOverlay>>;
411
+ // (undocumented)
412
+ observerFailures: number;
413
+ // (undocumented)
414
+ pending: readonly PendingSend[];
415
+ // (undocumented)
416
+ plan: PlanRecord | null;
417
+ planReadOnly?: boolean;
418
+ // (undocumented)
419
+ problem: Problem | null;
420
+ // (undocumented)
421
+ protocol: string | null;
422
+ // (undocumented)
423
+ replyState: ReplyState;
424
+ restored: readonly RestoredMessage[];
425
+ // (undocumented)
426
+ sending: boolean;
427
+ // (undocumented)
428
+ status: string;
429
+ streamUnavailable: boolean;
430
+ toolSteps: readonly ToolStep[];
431
+ withdrawing: readonly string[];
432
+ }
433
+
434
+ // @public (undocumented)
435
+ export interface ComposerContribution {
436
+ // (undocumented)
437
+ evaluate(context: {
438
+ draft: string;
439
+ conversationId: string;
440
+ }): MaybePromise<{
441
+ hold?: string;
442
+ hint?: string;
443
+ payload?: unknown;
444
+ }>;
445
+ // (undocumented)
446
+ id: string;
447
+ }
448
+
449
+ // @public (undocumented)
450
+ export type ConfirmationCatalogue = Readonly<Record<ConfirmationMessageKey, string>>;
451
+
452
+ // @public (undocumented)
453
+ export interface ConfirmationItem {
454
+ // (undocumented)
455
+ after?: string;
456
+ // (undocumented)
457
+ before?: string;
458
+ // (undocumented)
459
+ label: string;
460
+ // (undocumented)
461
+ note?: string;
462
+ }
463
+
464
+ // @public (undocumented)
465
+ export type ConfirmationMessageKey = "chat.confirmation.heading" | "chat.confirmation.apply" | "chat.confirmation.schedule" | "chat.confirmation.applyCount" | "chat.confirmation.scheduleCount" | "chat.confirmation.unavailable" | "chat.confirmation.expired" | "chat.confirmation.used" | "chat.confirmation.changed" | "chat.confirmation.mismatch" | "chat.confirmation.irreversible" | "chat.confirmation.before" | "chat.confirmation.after" | "chat.confirmation.refresh" | "chat.confirmation.verifications" | "chat.confirmation.expires" | "chat.confirmation.showAll";
466
+
467
+ // @public
468
+ export function confirmationOf(plan: PlanRecord | null | undefined, conversationId: string | undefined): ConfirmationRecord | undefined;
469
+
470
+ // @public
471
+ export interface ConfirmationRecord {
472
+ // (undocumented)
473
+ actionLabel?: string;
474
+ // (undocumented)
475
+ conversationId: string;
476
+ // (undocumented)
477
+ expiresAt: string;
478
+ // (undocumented)
479
+ heading: string;
480
+ // (undocumented)
481
+ irreversible: boolean;
482
+ items: ConfirmationItem[];
483
+ // (undocumented)
484
+ planId: string;
485
+ // (undocumented)
486
+ revision: number;
487
+ // (undocumented)
488
+ schedule?: ConfirmationSchedule;
489
+ // (undocumented)
490
+ token: string;
491
+ // (undocumented)
492
+ undo: string;
493
+ // (undocumented)
494
+ verificationCount: number;
495
+ }
496
+
497
+ // @public (undocumented)
498
+ export interface ConfirmationSchedule {
499
+ // (undocumented)
500
+ end: string | null;
501
+ // (undocumented)
502
+ endText: string;
503
+ // (undocumented)
504
+ start: string | null;
505
+ // (undocumented)
506
+ startText: string;
507
+ }
508
+
509
+ // @public (undocumented)
510
+ export type Conversation = {
511
+ [k: string]: unknown;
512
+ } & {
513
+ protocol: string;
514
+ id: string;
515
+ title: string;
516
+ messages: Message[];
517
+ replyOverdueAt?: number | null;
518
+ replyStatus?: 'expected' | 'unavailable' | 'failed' | 'complete';
519
+ mode?: 'form-fill';
520
+ subject?: FormSubject;
521
+ parentConversationId?: string;
522
+ field?: string;
523
+ };
524
+
525
+ // @public (undocumented)
526
+ export class ConversationReadError extends Error {
527
+ constructor(conversationId: string, status: number, problem?: unknown);
528
+ // (undocumented)
529
+ readonly conversationId: string;
530
+ readonly problem?: Problem;
531
+ // (undocumented)
532
+ readonly status: number;
533
+ }
534
+
535
+ // @public (undocumented)
536
+ export type ConversationReadResult = {
537
+ kind: "loaded";
538
+ conversationId: string;
539
+ conversation: Conversation;
540
+ } | {
541
+ kind: "missing";
542
+ conversationId: string;
543
+ status: 404 | 410;
544
+ } | {
545
+ kind: "unavailable" | "superseded";
546
+ conversationId: string;
547
+ };
548
+
549
+ // @public (undocumented)
550
+ export interface ConversationSource {
551
+ // (undocumented)
552
+ create(input: CreateConversation): MaybePromise<Conversation>;
553
+ // (undocumented)
554
+ list(subjectKey?: string): MaybePromise<ConversationSummary[]>;
555
+ }
556
+
557
+ // @public (undocumented)
558
+ export interface ConversationSummary {
559
+ // (undocumented)
560
+ field?: string;
561
+ // (undocumented)
562
+ id: string;
563
+ // (undocumented)
564
+ mode?: "form-fill";
565
+ // (undocumented)
566
+ parentConversationId?: string;
567
+ // (undocumented)
568
+ subject?: FormSubject;
569
+ // (undocumented)
570
+ title: string;
571
+ }
572
+
573
+ // @public (undocumented)
574
+ export type CreateConversation = {
575
+ [k: string]: unknown;
576
+ } & {
577
+ protocol: string;
578
+ title: string;
579
+ mode?: 'form-fill';
580
+ subject?: FormSubject;
581
+ parentConversationId?: string;
582
+ field?: string;
583
+ clientCreationId?: string;
584
+ };
585
+
586
+ // @public (undocumented)
587
+ export function createMemoryStorage(asynchronous?: boolean): StoragePort;
588
+
589
+ // @public (undocumented)
590
+ export function createPlanRunner(ports: RunnerPorts): PlanRunner;
591
+
592
+ // @public (undocumented)
593
+ export function createWaypointClient(config: ClientConfig): WaypointClient;
594
+
595
+ // @public (undocumented)
596
+ export interface DecisionVersions {
597
+ // (undocumented)
598
+ decisionResolution: number;
599
+ // (undocumented)
600
+ evidence: number;
601
+ // (undocumented)
602
+ winner: number;
603
+ }
604
+
605
+ // @public (undocumented)
606
+ export const DEFAULT_FLOW_TABS: readonly BuiltinFlowTab[];
607
+
608
+ // @public (undocumented)
609
+ export const english: {
610
+ readonly "form.valid": "Valid";
611
+ readonly "form.invalid": "Invalid";
612
+ readonly "form.title": "Fill this form";
613
+ readonly "form.closeHint": "Closing discards this fill; the reply stays in the conversation.";
614
+ readonly "form.generate": "Generate draft";
615
+ readonly "form.references": "Reference links";
616
+ readonly "form.attachment": "Private attachment";
617
+ readonly "form.regenerate": "Regenerate {field}";
618
+ readonly "form.replace": "Replace your edit?";
619
+ readonly "form.marker": "Form";
620
+ readonly "form.filter": "Filter by topic";
621
+ readonly "form.all": "All topics";
622
+ readonly "form.threads": "Sub-threads";
623
+ readonly "form.return": "Back to form or record";
624
+ readonly "form.unlinked": "Saved, not linked";
625
+ readonly "form.toolsLoading": "Draft tools are still loading.";
626
+ readonly "form.toolsFailed": "Draft tools couldn't load. Retry first.";
627
+ readonly "form.fixFirst": "Fix the highlighted fields first.";
628
+ readonly "form.number": "Enter a number.";
629
+ readonly "form.editInForm": "Edit this value in the form.";
630
+ readonly "form.imagesNow": "Images can't be attached right now.";
631
+ readonly "form.imagesHere": "Images can't be attached here.";
632
+ readonly "chat.title": "Conversation";
633
+ readonly "chat.empty": "Start a conversation";
634
+ readonly "chat.message": "Message";
635
+ readonly "chat.send": "Send";
636
+ readonly "chat.sending": "Sending";
637
+ readonly "chat.pendingSending": "Sending…";
638
+ readonly "chat.pendingFailed": "Not sent";
639
+ readonly "chat.planUnavailable": "The plan's steps could not be loaded.";
640
+ readonly "chat.arrival": "New reply";
641
+ readonly "chat.arrivalExcerpt": "New reply: {excerpt}";
642
+ readonly "chat.arrivalFailed": "A reply could not be completed.";
643
+ readonly "chat.arrivalMany": "{count} new replies. Latest: {excerpt}";
644
+ readonly "chat.arrivalManyPlain": "{count} new replies";
645
+ readonly "chat.arrivalManyFailed": "{count} new replies; {failed} could not be completed.";
646
+ readonly "chat.arrivalAllFailed": "{count} replies could not be completed.";
647
+ readonly "chat.transcript": "Messages";
648
+ readonly "chat.outlineItem": "{role}, message {position}: {excerpt}";
649
+ readonly "chat.outlineItemPlain": "{role}, message {position}";
650
+ readonly "chat.roleUser": "You";
651
+ readonly "chat.roleAssistant": "Assistant";
652
+ readonly "chat.messageLoading": "Loading message…";
653
+ readonly "chat.messageUnavailable": "This message cannot be shown right now.";
654
+ readonly "chat.changesTo": "changes to";
655
+ readonly "chat.stepName": "Change {index}";
656
+ readonly "chat.stepNamed": "{name} {index}";
657
+ readonly "chat.fieldName": "Value {index}";
658
+ readonly "chat.scrollRegion": "Scrollable content";
659
+ readonly "chat.conversationReadFailed": "This conversation could not be loaded.";
660
+ readonly "chat.conversationsFailed": "Your conversations could not be loaded.";
661
+ readonly "chat.messagesUnavailable": "Some messages cannot be shown right now.";
662
+ readonly unsupportedContent: "Some content cannot be shown here. Contact the site administrator.";
663
+ readonly "chat.failure": "The request could not be completed.";
664
+ readonly "chat.update": "This chat needs an update.";
665
+ readonly "chat.conversationUnavailable": "This conversation is unavailable. Reload to continue; this does not stop a server turn.";
666
+ readonly "chat.reload": "Reload conversation";
667
+ readonly "chat.retry": "Retry";
668
+ readonly "chat.withdraw": "Withdraw";
669
+ readonly "chat.restored": "Withdrawn messages";
670
+ readonly "chat.restoredEdit": "Edit";
671
+ readonly "chat.restoredDiscard": "Discard";
672
+ readonly "chat.dismiss": "Dismiss";
673
+ readonly "chat.latest": "Back to latest";
674
+ readonly "chat.latestNew": "{count, plural, one {Back to latest, # new reply} other {Back to latest, # new replies}}";
675
+ readonly "chat.outline": "Message outline";
676
+ readonly "chat.rail": "Conversations";
677
+ readonly "chat.close": "Close";
678
+ readonly "chat.quota": "Usage";
679
+ readonly "chat.actions": "Actions";
680
+ readonly "chat.panels": "Extra panels";
681
+ readonly "chat.submit": "Submit";
682
+ readonly "chat.confirm": "Confirm";
683
+ readonly "chat.cancel": "Cancel";
684
+ readonly "chat.stop": "Stop";
685
+ readonly "chat.planChanged": "The plan changed; confirm again.";
686
+ readonly "chat.stopped": "The plan was stopped. Start a new plan to continue.";
687
+ readonly "chat.scheduleUnavailable": "Scheduling is unavailable in this chat.";
688
+ readonly "chat.start": "Start time";
689
+ readonly "chat.end": "End time";
690
+ readonly "chat.view": "View change";
691
+ readonly "chat.irreversible": "Cannot be undone";
692
+ readonly "chat.stepUp": "{count, plural, one {# verification prompt} other {# verification prompts}}";
693
+ readonly "chat.stepUpLabel": "Verification code";
694
+ readonly "chat.plan": "Plan";
695
+ readonly "chat.favourite": "Favourite";
696
+ readonly "chat.run": "Run";
697
+ readonly "chat.flows": "Saved requests";
698
+ readonly "flow.favourites": "Favourites";
699
+ readonly "flow.most-used": "Most used";
700
+ readonly "flow.recent": "Recent";
701
+ readonly "flow.presets": "Presets";
702
+ readonly "reply.writing": "Writing";
703
+ readonly "reply.stopped": "Stopped";
704
+ readonly "chat.sources": "Sources ({count})";
705
+ readonly "chat.source": "Source {index}: {title}";
706
+ readonly "reply.unavailable": "Reply unavailable";
707
+ readonly "reply.failed": "Reply failed";
708
+ readonly "reply.overdue": "Reply overdue";
709
+ readonly "chat.loading": "Loading";
710
+ readonly "chat.before": "Before";
711
+ readonly "chat.after": "After";
712
+ readonly "chat.undo": "Undo";
713
+ readonly "chat.verify": "Verification required";
714
+ readonly "chat.startupLoading": "Loading this conversation…";
715
+ };
716
+
717
+ // @public (undocumented)
718
+ export interface ExecutionAcceptance {
719
+ // (undocumented)
720
+ executionId: string;
721
+ // (undocumented)
722
+ fence: number;
723
+ // (undocumented)
724
+ planId: string;
725
+ }
726
+
727
+ // @public (undocumented)
728
+ export interface ExtensionBlock {
729
+ // (undocumented)
730
+ answer?: CardAnswer;
731
+ answered?: boolean;
732
+ // (undocumented)
733
+ body: unknown;
734
+ // (undocumented)
735
+ fallback: string;
736
+ // (undocumented)
737
+ id: string;
738
+ // (undocumented)
739
+ type: string;
740
+ }
741
+
742
+ // @public
743
+ export interface FeedbackInput extends MessageVersionInput {
744
+ rating: "positive" | "negative";
745
+ }
746
+
747
+ // @public
748
+ export interface FeedbackPort {
749
+ send(input: FeedbackInput): MaybePromise<void>;
750
+ }
751
+
752
+ // @public (undocumented)
753
+ export interface FinalHistory {
754
+ contradictedAfterSeal?: string[];
755
+ // (undocumented)
756
+ keptFact: KeptFact;
757
+ // (undocumented)
758
+ relation?: 'keptElsewhere' | 'leaveCompletedByKeep' | 'leaveCoveredByKeep';
759
+ // (undocumented)
760
+ requestedTargetApplied?: boolean;
761
+ // (undocumented)
762
+ winner: IntentWinner;
763
+ }
764
+
765
+ // @public (undocumented)
766
+ export type Flow = {
767
+ [k: string]: unknown;
768
+ } & {
769
+ format: '1.0';
770
+ id: string;
771
+ title: string;
772
+ kind: 'structured' | 'prompt';
773
+ parameters: FlowParameter[];
774
+ steps?: {
775
+ operation: string;
776
+ arguments: {};
777
+ }[];
778
+ tags: string[];
779
+ body: string;
780
+ };
781
+
782
+ // @public (undocumented)
783
+ export interface FlowParameter {
784
+ // (undocumented)
785
+ default?: unknown;
786
+ // (undocumented)
787
+ label: string;
788
+ // (undocumented)
789
+ name: string;
790
+ // (undocumented)
791
+ required: boolean;
792
+ // (undocumented)
793
+ type: 'string' | 'number' | 'boolean';
794
+ }
795
+
796
+ // @public (undocumented)
797
+ export interface FlowSource {
798
+ // (undocumented)
799
+ list(tab: FlowTab): MaybePromise<FlowSummary[]>;
800
+ // (undocumented)
801
+ load?(id: string): MaybePromise<Flow>;
802
+ // (undocumented)
803
+ run(id: string, values: Record<string, unknown>, document?: Flow): MaybePromise<{
804
+ conversationId: string;
805
+ plan?: PlanRecord;
806
+ }>;
807
+ // (undocumented)
808
+ setFavourite(id: string, favourite: boolean): MaybePromise<void>;
809
+ }
810
+
811
+ // @public (undocumented)
812
+ export interface FlowSummary {
813
+ // (undocumented)
814
+ favourite?: boolean;
815
+ // (undocumented)
816
+ id: string;
817
+ // (undocumented)
818
+ lastRunAt?: number;
819
+ // (undocumented)
820
+ runCount?: number;
821
+ // (undocumented)
822
+ title: string;
823
+ }
824
+
825
+ // @public (undocumented)
826
+ export type FlowTab = BuiltinFlowTab | {
827
+ id: string;
828
+ labelKey: string;
829
+ };
830
+
831
+ // @public (undocumented)
832
+ export function flowTabId(tab: FlowTab): string;
833
+
834
+ // @public
835
+ export const FORM_SESSION_UNAVAILABLE: {
836
+ readonly code: "retryable";
837
+ readonly id: "form-session-load";
838
+ };
839
+
840
+ // @public (undocumented)
841
+ export type FormatMessage = (key: MessageKey, values?: MessageValues) => string;
842
+
843
+ // @public (undocumented)
844
+ export type FormCatalogue = Readonly<Record<FormMessageKey, string>>;
845
+
846
+ // @public (undocumented)
847
+ export interface FormDraft {
848
+ // (undocumented)
849
+ edited: boolean;
850
+ // (undocumented)
851
+ label: string;
852
+ localInvalid?: true;
853
+ // (undocumented)
854
+ localText?: string;
855
+ // (undocumented)
856
+ replacement?: {
857
+ value: unknown;
858
+ validation: FormValidation;
859
+ revision: number;
860
+ fill?: string;
861
+ };
862
+ // (undocumented)
863
+ revision: number;
864
+ // (undocumented)
865
+ validation?: FormValidation;
866
+ // (undocumented)
867
+ value: unknown;
868
+ }
869
+
870
+ // @public (undocumented)
871
+ export interface FormField {
872
+ // (undocumented)
873
+ label: string;
874
+ // (undocumented)
875
+ name: string;
876
+ // (undocumented)
877
+ tier: "low" | "sensitive" | "human-only";
878
+ // (undocumented)
879
+ value: unknown;
880
+ }
881
+
882
+ // @public (undocumented)
883
+ export interface FormFillField {
884
+ // (undocumented)
885
+ label: string;
886
+ // (undocumented)
887
+ name: string;
888
+ // (undocumented)
889
+ tier: 'low';
890
+ // (undocumented)
891
+ value: unknown;
892
+ }
893
+
894
+ // @public (undocumented)
895
+ export interface FormFillRequest {
896
+ // (undocumented)
897
+ attachments: string[];
898
+ // (undocumented)
899
+ field?: string;
900
+ // (undocumented)
901
+ fields: [FormFillField, ...FormFillField[]];
902
+ // (undocumented)
903
+ references: string[];
904
+ // (undocumented)
905
+ requestId: string;
906
+ // (undocumented)
907
+ text: string;
908
+ }
909
+
910
+ // @public (undocumented)
911
+ export interface FormFillValue {
912
+ // (undocumented)
913
+ label?: string;
914
+ // (undocumented)
915
+ validation: FormValidation;
916
+ // (undocumented)
917
+ value: unknown;
918
+ }
919
+
920
+ // @public (undocumented)
921
+ export interface FormMaterial {
922
+ // (undocumented)
923
+ attachments?: string[];
924
+ // (undocumented)
925
+ field?: string;
926
+ // (undocumented)
927
+ references?: string[];
928
+ // (undocumented)
929
+ text: string;
930
+ }
931
+
932
+ // @public (undocumented)
933
+ export type FormMessageKey = "form.generating" | "form.ready" | "form.attention" | "form.reverted" | "form.revert" | "form.revertWait" | "form.suggested" | "form.replaceIt" | "form.keepMine" | "form.attach" | "form.remove" | "form.uploading" | "form.attached" | "form.attachFailed" | "form.removeFailed" | "form.onlyImages" | "form.busy" | "form.unusable";
934
+
935
+ // @public (undocumented)
936
+ export interface FormSession {
937
+ // (undocumented)
938
+ begin(material: FormMaterial): FormFillRequest;
939
+ // (undocumented)
940
+ cancel(): void;
941
+ // (undocumented)
942
+ cancelReplacement(field: string): void;
943
+ // (undocumented)
944
+ dispose(): void;
945
+ // (undocumented)
946
+ edit(field: string, value: unknown): void;
947
+ failRequest(requestId: string): void;
948
+ // (undocumented)
949
+ getSnapshot(): FormSnapshot;
950
+ markEdited(field: string, text: string): void;
951
+ // (undocumented)
952
+ receive(body: unknown): boolean;
953
+ // (undocumented)
954
+ replace(field: string, revision: number): boolean;
955
+ revert(fill: string): boolean;
956
+ // (undocumented)
957
+ subscribe(listener: () => void): () => void;
958
+ }
959
+
960
+ // @public (undocumented)
961
+ export interface FormSessionConfig {
962
+ // (undocumented)
963
+ fields: readonly FormField[];
964
+ // (undocumented)
965
+ ids(): string;
966
+ }
967
+
968
+ // @public (undocumented)
969
+ export interface FormSnapshot {
970
+ // (undocumented)
971
+ fields: Readonly<Record<string, FormDraft>>;
972
+ fills?: readonly {
973
+ id: string;
974
+ fields: readonly string[];
975
+ }[];
976
+ // (undocumented)
977
+ pending: boolean;
978
+ }
979
+
980
+ // @public (undocumented)
981
+ export type FormSubject = {
982
+ [k: string]: unknown;
983
+ } & {
984
+ key: string;
985
+ resource: string;
986
+ label: string;
987
+ route: string;
988
+ state: 'pending' | 'bound' | 'unlinked';
989
+ record?: string;
990
+ };
991
+
992
+ // @public (undocumented)
993
+ export interface FormValidation {
994
+ // (undocumented)
995
+ guidance?: string;
996
+ // (undocumented)
997
+ messages: string[];
998
+ // (undocumented)
999
+ status: 'valid' | 'invalid';
1000
+ }
1001
+
1002
+ // @public (undocumented)
1003
+ export type Frame = FrameMessageStart | FrameTextDelta | FrameBlock | FramePlanDraft | FramePlanFinal | FramePlanStep | FrameToolCall | FramePlanningRead | FrameMessageEnd | FrameStale | FrameProblem;
1004
+
1005
+ // @public (undocumented)
1006
+ export interface FrameBlock {
1007
+ // (undocumented)
1008
+ block: Block;
1009
+ // (undocumented)
1010
+ messageId: string;
1011
+ // (undocumented)
1012
+ protocol: string;
1013
+ // (undocumented)
1014
+ sequence: number;
1015
+ // (undocumented)
1016
+ type: 'block';
1017
+ }
1018
+
1019
+ // @public (undocumented)
1020
+ export interface FrameMessageEnd {
1021
+ // (undocumented)
1022
+ messageId: string;
1023
+ // (undocumented)
1024
+ protocol: string;
1025
+ // (undocumented)
1026
+ sequence: number;
1027
+ // (undocumented)
1028
+ status: 'completed' | 'failed' | 'unavailable' | 'stopped';
1029
+ // (undocumented)
1030
+ type: 'message.end';
1031
+ }
1032
+
1033
+ // @public (undocumented)
1034
+ export interface FrameMessageStart {
1035
+ // (undocumented)
1036
+ messageId: string;
1037
+ // (undocumented)
1038
+ protocol: string;
1039
+ // (undocumented)
1040
+ role: 'user' | 'assistant';
1041
+ // (undocumented)
1042
+ sequence: number;
1043
+ // (undocumented)
1044
+ type: 'message.start';
1045
+ }
1046
+
1047
+ // @public (undocumented)
1048
+ export interface FramePlanDraft {
1049
+ // (undocumented)
1050
+ messageId: string;
1051
+ // (undocumented)
1052
+ plan: ImmediateDraft;
1053
+ // (undocumented)
1054
+ protocol: string;
1055
+ // (undocumented)
1056
+ sequence: number;
1057
+ // (undocumented)
1058
+ type: 'plan.draft';
1059
+ }
1060
+
1061
+ // @public (undocumented)
1062
+ export interface FramePlanFinal {
1063
+ // (undocumented)
1064
+ messageId: string;
1065
+ // (undocumented)
1066
+ plan: ImmediatePlan | TimedPlan;
1067
+ // (undocumented)
1068
+ protocol: string;
1069
+ // (undocumented)
1070
+ sequence: number;
1071
+ // (undocumented)
1072
+ type: 'plan.final';
1073
+ }
1074
+
1075
+ // @public (undocumented)
1076
+ export interface FramePlanningRead {
1077
+ // (undocumented)
1078
+ planId: string;
1079
+ // (undocumented)
1080
+ protocol: string;
1081
+ // (undocumented)
1082
+ sequence: number;
1083
+ // (undocumented)
1084
+ stepId: string;
1085
+ // (undocumented)
1086
+ template: ReadTemplate;
1087
+ // (undocumented)
1088
+ type: 'planning-read';
1089
+ }
1090
+
1091
+ // @public (undocumented)
1092
+ export interface FramePlanStep {
1093
+ // (undocumented)
1094
+ outcome: Outcome;
1095
+ // (undocumented)
1096
+ planId: string;
1097
+ // (undocumented)
1098
+ protocol: string;
1099
+ // (undocumented)
1100
+ sequence: number;
1101
+ // (undocumented)
1102
+ type: 'plan.step';
1103
+ }
1104
+
1105
+ // @public (undocumented)
1106
+ export interface FrameProblem {
1107
+ // (undocumented)
1108
+ problem: Problem;
1109
+ // (undocumented)
1110
+ protocol: string;
1111
+ // (undocumented)
1112
+ sequence: number;
1113
+ // (undocumented)
1114
+ type: 'problem';
1115
+ }
1116
+
1117
+ // @public (undocumented)
1118
+ export interface FrameStale {
1119
+ // (undocumented)
1120
+ protocol: string;
1121
+ // (undocumented)
1122
+ reads: ('conversation' | 'conversations' | 'plans' | 'flows')[];
1123
+ // (undocumented)
1124
+ sequence: number;
1125
+ // (undocumented)
1126
+ type: 'stale';
1127
+ }
1128
+
1129
+ // @public (undocumented)
1130
+ export interface FrameTextDelta {
1131
+ // (undocumented)
1132
+ messageId: string;
1133
+ // (undocumented)
1134
+ protocol: string;
1135
+ // (undocumented)
1136
+ sequence: number;
1137
+ // (undocumented)
1138
+ text: string;
1139
+ // (undocumented)
1140
+ type: 'text.delta';
1141
+ }
1142
+
1143
+ // @public (undocumented)
1144
+ export interface FrameToolCall {
1145
+ // (undocumented)
1146
+ call: ToolCall;
1147
+ // (undocumented)
1148
+ protocol: string;
1149
+ // (undocumented)
1150
+ sequence: number;
1151
+ // (undocumented)
1152
+ type: 'tool.call';
1153
+ }
1154
+
1155
+ // @public (undocumented)
1156
+ export interface ImmediateDraft {
1157
+ // (undocumented)
1158
+ id: string;
1159
+ // (undocumented)
1160
+ kind: 'immediate';
1161
+ // (undocumented)
1162
+ stage: 'draft';
1163
+ // (undocumented)
1164
+ steps: (Step & {
1165
+ [k: string]: unknown;
1166
+ })[];
1167
+ }
1168
+
1169
+ // @public (undocumented)
1170
+ export interface ImmediatePlan {
1171
+ // (undocumented)
1172
+ digest: string;
1173
+ // (undocumented)
1174
+ id: string;
1175
+ // (undocumented)
1176
+ kind: 'immediate';
1177
+ // (undocumented)
1178
+ stage: 'final';
1179
+ // (undocumented)
1180
+ steps: (Step & {
1181
+ [k: string]: unknown;
1182
+ })[];
1183
+ // (undocumented)
1184
+ stepUpCount: number;
1185
+ }
1186
+
1187
+ // @public (undocumented)
1188
+ export type IntentAlert = {
1189
+ serial: number;
1190
+ action: "checkStatus" | "retry" | "signIn" | "hostGuidance" | "wait";
1191
+ } | {
1192
+ serial: number;
1193
+ restoreFocus: true;
1194
+ };
1195
+
1196
+ // @public (undocumented)
1197
+ export type IntentCause = 'user' | 'connection-lost' | 'renewal-refused' | 'step-failed' | 'step-up-failed' | 'identity-lost' | 'attribution-missing' | 'plan-changed' | 'adapter-configuration';
1198
+
1199
+ // @public (undocumented)
1200
+ export type IntentFailure = "offline" | "sign-in" | "forbidden" | "rate-limited" | "timeout" | "connection-lost";
1201
+
1202
+ // @public (undocumented)
1203
+ export type IntentKind = 'stop' | 'cancel-initial' | 'cancel-review' | 'leave' | 'keep';
1204
+
1205
+ // @public (undocumented)
1206
+ export type IntentNotice = Omit<PlanIntentReply, "slotVersion"> & {
1207
+ resolvedSlotVersion: number;
1208
+ };
1209
+
1210
+ // @public
1211
+ export interface IntentOverlay {
1212
+ // (undocumented)
1213
+ delivery: "sending" | "uncertain" | "not-sent";
1214
+ // (undocumented)
1215
+ kind: IntentKind;
1216
+ // (undocumented)
1217
+ lastProblem?: {
1218
+ key: string;
1219
+ cause: IntentFailure;
1220
+ };
1221
+ // (undocumented)
1222
+ ownRun: boolean;
1223
+ // (undocumented)
1224
+ planId: string;
1225
+ // (undocumented)
1226
+ producer: "user" | "automatic";
1227
+ // (undocumented)
1228
+ request: IntentRequest;
1229
+ // (undocumented)
1230
+ retryAt?: number;
1231
+ }
1232
+
1233
+ // @public (undocumented)
1234
+ export interface IntentRequest {
1235
+ // (undocumented)
1236
+ acknowledgment?: LeaveAcknowledgment;
1237
+ // (undocumented)
1238
+ capturedRound: number;
1239
+ // (undocumented)
1240
+ cause: IntentCause;
1241
+ // (undocumented)
1242
+ correlation: string;
1243
+ // (undocumented)
1244
+ expectedSlotVersion: number;
1245
+ // (undocumented)
1246
+ kind: IntentKind;
1247
+ // (undocumented)
1248
+ payload?: string;
1249
+ // (undocumented)
1250
+ planId: string;
1251
+ // (undocumented)
1252
+ review?: 'forward-only' | 'end-retention';
1253
+ // (undocumented)
1254
+ target: IntentTarget;
1255
+ }
1256
+
1257
+ // @public (undocumented)
1258
+ export interface IntentTarget {
1259
+ // (undocumented)
1260
+ id: string;
1261
+ // (undocumented)
1262
+ type: 'generation' | 'review' | 'execution';
1263
+ }
1264
+
1265
+ // @public (undocumented)
1266
+ export interface IntentWinner {
1267
+ // (undocumented)
1268
+ cause: IntentCause;
1269
+ // (undocumented)
1270
+ kind: WinnerKind;
1271
+ }
1272
+
1273
+ // @public (undocumented)
1274
+ export interface KeepChangesReview {
1275
+ // (undocumented)
1276
+ acknowledgment: LeaveAcknowledgment;
1277
+ // (undocumented)
1278
+ remaining: number;
1279
+ // (undocumented)
1280
+ review: "forward-only" | "end-retention";
1281
+ }
1282
+
1283
+ // @public (undocumented)
1284
+ export type KeepChangesReviewResult = KeepChangesReview | {
1285
+ disabled: KeepDisabledReason;
1286
+ };
1287
+
1288
+ // @public (undocumented)
1289
+ export type KeepDisabledReason = "loading" | "intentUnavailable" | "capabilityMissing" | "keepNoDecision" | "sealed" | "keepBlockedActive" | "keepBlockedUnknown";
1290
+
1291
+ // @public (undocumented)
1292
+ export interface KeepSheet {
1293
+ // (undocumented)
1294
+ messages: ViewMessage[];
1295
+ // (undocumented)
1296
+ onCancel(): void;
1297
+ // (undocumented)
1298
+ onProceed(): void;
1299
+ // (undocumented)
1300
+ proceed: {
1301
+ available: boolean;
1302
+ reasonKey?: ViewMessage["key"];
1303
+ };
1304
+ }
1305
+
1306
+ // @public
1307
+ export function keepSheet(review: {
1308
+ review: "forward-only" | "end-retention";
1309
+ remaining: number;
1310
+ }, view: PlanView): KeepSheetView;
1311
+
1312
+ // @public (undocumented)
1313
+ export interface KeepSheetView {
1314
+ // (undocumented)
1315
+ messages: ViewMessage[];
1316
+ // (undocumented)
1317
+ proceed: {
1318
+ available: boolean;
1319
+ reasonKey?: MessageKey;
1320
+ };
1321
+ }
1322
+
1323
+ // @public (undocumented)
1324
+ export interface KeptFact {
1325
+ // (undocumented)
1326
+ actorCause: IntentCause;
1327
+ // (undocumented)
1328
+ keepEffect: 'forward-closed' | 'decision-closed' | 'retention-ended' | 'leave-completed';
1329
+ // (undocumented)
1330
+ round: number;
1331
+ }
1332
+
1333
+ // @public (undocumented)
1334
+ export interface LeaveAcknowledgment {
1335
+ // (undocumented)
1336
+ decisionResolutionVersion: number;
1337
+ // (undocumented)
1338
+ evidenceDigest: string;
1339
+ // (undocumented)
1340
+ evidenceVersion: number;
1341
+ // (undocumented)
1342
+ sourceDecisionKey: string;
1343
+ // (undocumented)
1344
+ unknownCount: number;
1345
+ // (undocumented)
1346
+ winnerVersion: number;
1347
+ }
1348
+
1349
+ // @public
1350
+ export function loadFormSession(config: FormSessionConfig): Promise<FormSession>;
1351
+
1352
+ // @public (undocumented)
1353
+ export interface ManifestEntry {
1354
+ // (undocumented)
1355
+ fields: {
1356
+ [k: string]: 'low' | 'sensitive' | 'human-only';
1357
+ };
1358
+ // (undocumented)
1359
+ filterable: string[];
1360
+ // (undocumented)
1361
+ id: string;
1362
+ // (undocumented)
1363
+ kind: 'read' | 'planning-read' | 'update' | 'create' | 'action' | 'bulk';
1364
+ // (undocumented)
1365
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH';
1366
+ // (undocumented)
1367
+ path: string;
1368
+ // (undocumented)
1369
+ permission: string;
1370
+ // (undocumented)
1371
+ resource: string;
1372
+ // (undocumented)
1373
+ returns: string[];
1374
+ // (undocumented)
1375
+ undo: string;
1376
+ // (undocumented)
1377
+ view: string;
1378
+ }
1379
+
1380
+ // @public (undocumented)
1381
+ export type MaybePromise<T> = T | Promise<T>;
1382
+
1383
+ // @public (undocumented)
1384
+ export interface Message {
1385
+ // (undocumented)
1386
+ blocks: Block[];
1387
+ // (undocumented)
1388
+ clientMessageId?: string;
1389
+ // (undocumented)
1390
+ content: string;
1391
+ // (undocumented)
1392
+ createdAt: number;
1393
+ // (undocumented)
1394
+ id: string;
1395
+ // (undocumented)
1396
+ role: 'user' | 'assistant';
1397
+ sources?: Source[];
1398
+ // (undocumented)
1399
+ status?: 'writing' | 'completed' | 'failed' | 'unavailable' | 'stopped';
1400
+ // (undocumented)
1401
+ versionCount?: number;
1402
+ // (undocumented)
1403
+ versionIndex?: number;
1404
+ }
1405
+
1406
+ // @public (undocumented)
1407
+ export type MessageKey = keyof typeof english | keyof RecoveryCatalogue | keyof ConfirmationCatalogue | keyof BlockCatalogue | keyof ProblemCatalogue | keyof ReplyCatalogue | keyof FormCatalogue;
1408
+
1409
+ // @public (undocumented)
1410
+ export type MessageValues = Record<string, string | number | boolean>;
1411
+
1412
+ // @public (undocumented)
1413
+ export interface MessageVersionInput {
1414
+ // (undocumented)
1415
+ clientReplyId: string;
1416
+ // (undocumented)
1417
+ conversationId: string;
1418
+ // (undocumented)
1419
+ messageId: string;
1420
+ }
1421
+
1422
+ // @public (undocumented)
1423
+ export interface MessageVersionPort {
1424
+ // (undocumented)
1425
+ edit(input: MessageVersionInput & {
1426
+ content: string;
1427
+ }): MaybePromise<void>;
1428
+ // (undocumented)
1429
+ regenerate(input: MessageVersionInput): MaybePromise<void>;
1430
+ // (undocumented)
1431
+ select(input: MessageVersionInput & {
1432
+ index: number;
1433
+ }): MaybePromise<void>;
1434
+ }
1435
+
1436
+ // @public (undocumented)
1437
+ export interface Negotiated {
1438
+ // (undocumented)
1439
+ agreementId?: string;
1440
+ // (undocumented)
1441
+ capabilities: string[];
1442
+ // (undocumented)
1443
+ protocol: string;
1444
+ }
1445
+
1446
+ // @public (undocumented)
1447
+ export interface Negotiation {
1448
+ // (undocumented)
1449
+ offer?: NegotiationOfferWire;
1450
+ // (undocumented)
1451
+ protocol: string;
1452
+ // (undocumented)
1453
+ supported: string[];
1454
+ }
1455
+
1456
+ // @public
1457
+ export interface NegotiationOffer {
1458
+ // (undocumented)
1459
+ capabilities: readonly string[];
1460
+ }
1461
+
1462
+ // @public (undocumented)
1463
+ export interface NegotiationOfferWire {
1464
+ // (undocumented)
1465
+ capabilities: string[];
1466
+ }
1467
+
1468
+ // @public (undocumented)
1469
+ export interface Outcome {
1470
+ // (undocumented)
1471
+ attributed: boolean;
1472
+ reason?: string;
1473
+ retryable?: boolean;
1474
+ // (undocumented)
1475
+ status: number;
1476
+ // (undocumented)
1477
+ stepId: string;
1478
+ // (undocumented)
1479
+ version?: string;
1480
+ }
1481
+
1482
+ // @public (undocumented)
1483
+ export interface PatchFlow {
1484
+ // (undocumented)
1485
+ favourite: boolean;
1486
+ // (undocumented)
1487
+ flowId: string;
1488
+ // (undocumented)
1489
+ protocol: string;
1490
+ // (undocumented)
1491
+ title: string;
1492
+ }
1493
+
1494
+ // @public (undocumented)
1495
+ export interface PendingSend {
1496
+ // (undocumented)
1497
+ content: string;
1498
+ // (undocumented)
1499
+ extensions?: Record<string, unknown>;
1500
+ // (undocumented)
1501
+ failure: Problem | null;
1502
+ // (undocumented)
1503
+ id: string;
1504
+ }
1505
+
1506
+ // @public (undocumented)
1507
+ export type Plan = ImmediateDraft | ImmediatePlan | TimedPlan;
1508
+
1509
+ // @public (undocumented)
1510
+ export interface PlanCommand {
1511
+ // (undocumented)
1512
+ action: 'stop' | 'heartbeat' | 'resume' | 'retry-undo';
1513
+ // (undocumented)
1514
+ planId: string;
1515
+ // (undocumented)
1516
+ protocol: string;
1517
+ }
1518
+
1519
+ // @public (undocumented)
1520
+ export interface PlanIntentReply {
1521
+ // (undocumented)
1522
+ capturedRound: number;
1523
+ // (undocumented)
1524
+ correlation: string;
1525
+ // (undocumented)
1526
+ count?: number;
1527
+ // (undocumented)
1528
+ dispositionApplied?: boolean;
1529
+ // (undocumented)
1530
+ effectiveRound: number;
1531
+ // (undocumented)
1532
+ finalHistory?: FinalHistory;
1533
+ // (undocumented)
1534
+ forwardClosed?: boolean;
1535
+ // (undocumented)
1536
+ keys: string[];
1537
+ // (undocumented)
1538
+ kind: IntentKind;
1539
+ // (undocumented)
1540
+ phase: RecoveryPhase;
1541
+ // (undocumented)
1542
+ planId: string;
1543
+ // (undocumented)
1544
+ replacement?: IntentTarget;
1545
+ // (undocumented)
1546
+ requestedTargetApplied?: boolean;
1547
+ // (undocumented)
1548
+ requestKey?: 'requestAlreadyStopped' | 'requestTargetStopped';
1549
+ // (undocumented)
1550
+ resolvedTarget?: string;
1551
+ // (undocumented)
1552
+ result: 'applied' | 'replaced' | 'already-closed' | 'already-stopped' | 'defeated' | 'superseded' | 'needs-review' | 'conflict' | 'unavailable' | 'invalid-target' | 'refused' | 'kept' | 'already-kept' | 'sealed';
1553
+ // (undocumented)
1554
+ safetyApplied?: boolean;
1555
+ // (undocumented)
1556
+ savedDisposition?: {
1557
+ phase: 'left-known' | 'left-unconfirmed';
1558
+ count: number;
1559
+ };
1560
+ // (undocumented)
1561
+ slotVersion: number;
1562
+ // (undocumented)
1563
+ winner?: IntentWinner;
1564
+ }
1565
+
1566
+ // @public
1567
+ export class PlanReadRefused extends Error {
1568
+ constructor();
1569
+ }
1570
+
1571
+ // @public (undocumented)
1572
+ export interface PlanRecord {
1573
+ // (undocumented)
1574
+ confirmation?: ConfirmationRecord;
1575
+ // (undocumented)
1576
+ id: string;
1577
+ // (undocumented)
1578
+ outcomes: Outcome[];
1579
+ // (undocumented)
1580
+ plan: Plan;
1581
+ // (undocumented)
1582
+ protocol: string;
1583
+ // (undocumented)
1584
+ reason?: string;
1585
+ // (undocumented)
1586
+ recovery?: RecoveryView;
1587
+ // (undocumented)
1588
+ state: PlanState;
1589
+ // (undocumented)
1590
+ undoPlanId?: string;
1591
+ }
1592
+
1593
+ // @public (undocumented)
1594
+ export interface PlanRunner {
1595
+ // (undocumented)
1596
+ dispose(): void;
1597
+ interrupt?(): void;
1598
+ // (undocumented)
1599
+ run(id: string, confirmedDigest: string, acceptance?: ExecutionAcceptance): Promise<void>;
1600
+ // (undocumented)
1601
+ stop(id?: string): void;
1602
+ }
1603
+
1604
+ // @public (undocumented)
1605
+ export type PlanState = 'proposed' | 'awaiting-confirmation' | 'running' | 'undoing' | 'completed' | 'submitted' | 'undone' | 'needs-attention' | 'cancelled';
1606
+
1607
+ // @public (undocumented)
1608
+ export interface PlanView {
1609
+ // (undocumented)
1610
+ actions: ActionEntry[];
1611
+ // (undocumented)
1612
+ alert: PlanViewAlert | null;
1613
+ // (undocumented)
1614
+ conversationUnavailable: boolean;
1615
+ // (undocumented)
1616
+ intent: {
1617
+ kind: IntentKind;
1618
+ status: IntentOverlay["delivery"];
1619
+ } | null;
1620
+ // (undocumented)
1621
+ lines: ViewMessage[];
1622
+ // (undocumented)
1623
+ notice: ViewMessage[];
1624
+ // (undocumented)
1625
+ pending: readonly IntentKind[];
1626
+ // (undocumented)
1627
+ planId: string;
1628
+ readOnly?: true;
1629
+ status: PlanViewStatus | null;
1630
+ // (undocumented)
1631
+ steps: StepStatus[];
1632
+ }
1633
+
1634
+ // @public
1635
+ export function planView(input: PlanViewInput): PlanView | null;
1636
+
1637
+ // @public (undocumented)
1638
+ export interface PlanViewAlert {
1639
+ // (undocumented)
1640
+ action?: "checkStatus" | "retry" | "signIn" | "hostGuidance" | "wait";
1641
+ // (undocumented)
1642
+ message?: ViewMessage;
1643
+ // (undocumented)
1644
+ restoreFocus?: true;
1645
+ // (undocumented)
1646
+ retryAvailable: boolean;
1647
+ // (undocumented)
1648
+ retryReasonKey?: MessageKey;
1649
+ // (undocumented)
1650
+ retryValues?: Record<string, number>;
1651
+ // (undocumented)
1652
+ serial: number;
1653
+ }
1654
+
1655
+ // @public (undocumented)
1656
+ export interface PlanViewInput {
1657
+ // (undocumented)
1658
+ alert: IntentAlert | null;
1659
+ // (undocumented)
1660
+ capabilities: readonly string[];
1661
+ // (undocumented)
1662
+ conversationId: string;
1663
+ // (undocumented)
1664
+ conversationUnavailable: boolean;
1665
+ // (undocumented)
1666
+ keepReview: KeepChangesReviewResult;
1667
+ // (undocumented)
1668
+ notice: IntentNotice | null;
1669
+ // (undocumented)
1670
+ now: number;
1671
+ // (undocumented)
1672
+ overlay: IntentOverlay | undefined;
1673
+ // (undocumented)
1674
+ pending: readonly IntentKind[];
1675
+ // (undocumented)
1676
+ plan: PlanRecord | null;
1677
+ // (undocumented)
1678
+ readOnly?: boolean;
1679
+ }
1680
+
1681
+ // @public (undocumented)
1682
+ export interface PlanViewStatus {
1683
+ // (undocumented)
1684
+ attention: boolean;
1685
+ // (undocumented)
1686
+ dataStatus: string;
1687
+ // (undocumented)
1688
+ label: ViewMessage;
1689
+ // (undocumented)
1690
+ result?: "kept";
1691
+ // (undocumented)
1692
+ tone: Tone;
1693
+ // (undocumented)
1694
+ wireState: PlanState;
1695
+ }
1696
+
1697
+ // @public (undocumented)
1698
+ export interface PlatformPorts {
1699
+ // (undocumented)
1700
+ clock: {
1701
+ now(): number;
1702
+ setTimeout(fn: () => void, ms: number): unknown;
1703
+ clearTimeout(handle: unknown): void;
1704
+ };
1705
+ // (undocumented)
1706
+ ids(): string;
1707
+ // (undocumented)
1708
+ online(): boolean;
1709
+ subscribeOnline?(listener: (online: boolean) => void): () => void;
1710
+ subscribeVisibility?(listener: (visible: boolean) => void): () => void;
1711
+ // (undocumented)
1712
+ visibility(): boolean;
1713
+ }
1714
+
1715
+ // @public (undocumented)
1716
+ export interface Problem {
1717
+ // (undocumented)
1718
+ code: 'update-required' | 'in-doubt' | 'replaced' | 'retryable' | 'refused' | 'closed' | 'full' | 'declined' | 'unavailable' | 'sign-in' | 'rate-limited' | 'step-up-cancelled' | 'mismatch' | 'invalid-read' | 'invalid-plan' | 'needs-attention' | 'stopped' | 'plan-changed' | 'agreement-expired';
1719
+ confirmation?: {
1720
+ reason: 'expired' | 'used' | 'stale' | 'mismatch' | 'missing';
1721
+ };
1722
+ // (undocumented)
1723
+ id: string;
1724
+ // (undocumented)
1725
+ retryAfter?: number;
1726
+ }
1727
+
1728
+ // @public
1729
+ export const problemAction: (problem: Problem) => "retry" | "refresh" | undefined;
1730
+
1731
+ // @public (undocumented)
1732
+ export type ProblemCatalogue = Readonly<Record<ProblemMessageKey, string>>;
1733
+
1734
+ // @public (undocumented)
1735
+ export type ProblemMessageKey = "chat.problem.signIn" | "chat.problem.retryable" | "chat.problem.rateLimited" | "chat.problem.refused" | "chat.problem.closed" | "chat.problem.full" | "chat.problem.declined" | "chat.problem.unavailable" | "chat.problem.stepUp" | "chat.problem.invalid" | "chat.problem.mismatch" | "chat.problem.agreement" | "chat.problem.inDoubt" | "chat.problem.replaced" | "chat.problem.needsAttention" | "chat.problem.answered" | "chat.problem.details" | "chat.problem.code" | "chat.problem.reference" | "chat.problem.refresh";
1736
+
1737
+ // @public (undocumented)
1738
+ export interface ProblemView {
1739
+ action?: "retry" | "refresh";
1740
+ code: Problem["code"];
1741
+ // (undocumented)
1742
+ id: string;
1743
+ key: MessageKey;
1744
+ }
1745
+
1746
+ // @public
1747
+ export function problemView(problem: Problem, options?: {
1748
+ answeredElsewhere?: boolean;
1749
+ }): ProblemView;
1750
+
1751
+ // @public
1752
+ export interface ReaderRequestContext {
1753
+ // (undocumented)
1754
+ agreementId: string;
1755
+ }
1756
+
1757
+ // @public (undocumented)
1758
+ export interface ReadPorts {
1759
+ // (undocumented)
1760
+ manifest: readonly ManifestEntry[];
1761
+ // (undocumented)
1762
+ planning?: {
1763
+ template(planId: string, stepId: string): MaybePromise<ReadTemplate | null>;
1764
+ request(template: ReadTemplate): Promise<{
1765
+ rows: Record<string, unknown>;
1766
+ versions: Record<string, string>;
1767
+ }>;
1768
+ };
1769
+ // (undocumented)
1770
+ request(call: ToolCall): Promise<unknown>;
1771
+ }
1772
+
1773
+ // @public
1774
+ export function readProblem(error: unknown, id: string): Problem;
1775
+
1776
+ // @public (undocumented)
1777
+ export interface ReadTemplate {
1778
+ // (undocumented)
1779
+ fields: string[];
1780
+ // (undocumented)
1781
+ method: 'GET';
1782
+ // (undocumented)
1783
+ path: string;
1784
+ // (undocumented)
1785
+ rows: string[];
1786
+ }
1787
+
1788
+ // @public (undocumented)
1789
+ export type RecoveryCatalogue = Readonly<Record<RecoveryMessageKey, string>>;
1790
+
1791
+ // @public (undocumented)
1792
+ export type RecoveryMessageKey = "chat.recovery.heading" | "chat.recovery.updateToControl" | "chat.recovery.stopping" | "chat.recovery.cancelling" | "chat.recovery.leavePending" | "chat.recovery.currentRunning" | "chat.recovery.currentStopped" | "chat.recovery.cancelledNoChanges" | "chat.recovery.leftKnown" | "chat.recovery.leftUnconfirmed" | "chat.recovery.keptKnown" | "chat.recovery.done" | "chat.recovery.notDone" | "chat.recovery.unknown" | "chat.recovery.stopped" | "chat.recovery.capabilityMissing" | "chat.recovery.intentPendingReason" | "chat.recovery.refreshConversation" | "chat.recovery.hostGuidance" | "chat.recovery.checkIntentStatus" | "chat.recovery.checkSavedChoice" | "chat.recovery.checkKeepStatus" | "chat.recovery.keepChanges" | "chat.recovery.leave" | "chat.recovery.confirmKeepForwardOnly" | "chat.recovery.confirmEndRetention" | "chat.recovery.keepReasonActive" | "chat.recovery.keepReasonUnknown" | "chat.recovery.keepReasonUnavailable" | "chat.recovery.keepReasonChanged" | "chat.recovery.keepReasonPreview" | "chat.recovery.keepReasonNoSource" | "chat.recovery.alreadyKept" | "chat.recovery.stopNotSent" | "chat.recovery.stopNotSentElsewhere" | "chat.recovery.stopUnconfirmed" | "chat.recovery.cancelNotSent" | "chat.recovery.cancelUnconfirmed" | "chat.recovery.reviewCancelNotSent" | "chat.recovery.reviewCancelUnconfirmed" | "chat.recovery.leaveNotSent" | "chat.recovery.leaveUnconfirmed" | "chat.recovery.keepNotSent" | "chat.recovery.keepUnconfirmed" | "chat.recovery.requestAlreadyStopped" | "chat.recovery.requestTargetStopped" | "chat.recovery.requestedIntentApplied" | "chat.recovery.requestedIntentNotApplied" | "chat.recovery.intentSuperseded" | "chat.recovery.intentTargetChanged" | "chat.recovery.alreadyClosedByWinner" | "chat.recovery.alreadyStoppedNeedsDecision" | "chat.recovery.cancelStarted" | "chat.recovery.stoppedNoChanges" | "chat.recovery.initialTargetSettled" | "chat.recovery.initialTargetStopped" | "chat.recovery.reviewTargetSettled" | "chat.recovery.reviewTargetStopped" | "chat.recovery.planClosedKept" | "chat.recovery.keptForwardClosed" | "chat.recovery.keptAlready" | "chat.recovery.leaveCompletedByKeep" | "chat.recovery.leaveCoveredByKeep" | "chat.recovery.leaveNeedsReview" | "chat.recovery.leaveSafetyNeedsReview" | "chat.recovery.laterReceiptAfterKeep" | "chat.recovery.undoSelected" | "chat.recovery.continue" | "chat.recovery.statusProposal" | "chat.recovery.statusCompleted" | "chat.recovery.stepsNotKnownYet" | "chat.recovery.stepsUnknown" | "chat.recovery.stepsNotDone" | "chat.recovery.laterReportAfterKeep" | "chat.recovery.reportedDifferently" | "chat.recovery.notAvailableYet" | "chat.recovery.actionLoading" | "chat.recovery.retryAfterSeconds" | "chat.recovery.keepPending" | "chat.recovery.keepRemainingSteps" | "chat.recovery.signInRequired" | "chat.recovery.requestRefused" | "chat.recovery.acknowledgmentAhead" | "chat.recovery.cancelCoveredByLeaveSafety" | "chat.recovery.cancelCoveredByStopNoChanges" | "chat.recovery.cancelDefeatedByStop" | "chat.recovery.choiceReplacedByStop" | "chat.recovery.initialTargetClosed" | "chat.recovery.keepDefeatedByWinner" | "chat.recovery.leaveDefeatedByWinner" | "chat.recovery.leaveNoDecision" | "chat.recovery.leaveSafetyAlreadyStopped" | "chat.recovery.reopenedEvidence" | "chat.recovery.winnerStopUser" | "chat.recovery.winnerStopConnection" | "chat.recovery.winnerStopRenewal" | "chat.recovery.winnerStopStep" | "chat.recovery.winnerStopStepUp" | "chat.recovery.winnerStopIdentity" | "chat.recovery.winnerStopAttribution" | "chat.recovery.winnerStopChanged" | "chat.recovery.winnerStopAdapter" | "chat.recovery.winnerCancel" | "chat.recovery.winnerLeave" | "chat.recovery.winnerKeep" | "chat.recovery.stepStatusChanged" | "chat.recovery.stepNotKnownYet";
1793
+
1794
+ // @public (undocumented)
1795
+ export type RecoveryPhase = 'proposal' | 'initial-review' | 'forward-active' | 'readback' | 'completed' | 'cancelled' | 'left-known' | 'left-unconfirmed' | 'left-reopened';
1796
+
1797
+ // @public (undocumented)
1798
+ export interface RecoveryView {
1799
+ contradictedAfterSeal?: string[];
1800
+ // (undocumented)
1801
+ conversationId: string;
1802
+ // (undocumented)
1803
+ decisionKey?: string;
1804
+ // (undocumented)
1805
+ evidenceDigest?: string;
1806
+ // (undocumented)
1807
+ executionId?: string;
1808
+ // (undocumented)
1809
+ generation: string;
1810
+ // (undocumented)
1811
+ phase: RecoveryPhase | (string & {});
1812
+ // (undocumented)
1813
+ profile: 'plan-recovery-v1' | (string & {});
1814
+ // (undocumented)
1815
+ remaining?: number;
1816
+ // (undocumented)
1817
+ reviewId?: string;
1818
+ // (undocumented)
1819
+ revision: number;
1820
+ // (undocumented)
1821
+ round: number;
1822
+ // (undocumented)
1823
+ sealed?: boolean;
1824
+ // (undocumented)
1825
+ slots: {
1826
+ stop: number;
1827
+ 'cancel-initial': number;
1828
+ 'cancel-review': number;
1829
+ leave: number;
1830
+ keep: number;
1831
+ };
1832
+ // (undocumented)
1833
+ steps?: {
1834
+ stepId: string;
1835
+ truth: 'done' | 'not-done' | 'unknown';
1836
+ }[];
1837
+ // (undocumented)
1838
+ unknownCount?: number;
1839
+ // (undocumented)
1840
+ versions: DecisionVersions;
1841
+ // (undocumented)
1842
+ winner?: IntentWinner;
1843
+ }
1844
+
1845
+ // @public (undocumented)
1846
+ export type Reply = ReplyMessage | ReplyConfirm | ReplyForm | ReplyAction | ReplyToolResult | ReplyPlanValues | ReplyFormFill | ReplyStop;
1847
+
1848
+ // @public (undocumented)
1849
+ export interface ReplyAction {
1850
+ // (undocumented)
1851
+ actionId: string;
1852
+ // (undocumented)
1853
+ blockId: string;
1854
+ // (undocumented)
1855
+ clientReplyId: string;
1856
+ // (undocumented)
1857
+ kind: 'action';
1858
+ // (undocumented)
1859
+ protocol: string;
1860
+ }
1861
+
1862
+ // @public (undocumented)
1863
+ export type ReplyCatalogue = Readonly<Record<ReplyMessageKey, string>>;
1864
+
1865
+ // @public (undocumented)
1866
+ export interface ReplyConfirm {
1867
+ // (undocumented)
1868
+ clientReplyId: string;
1869
+ // (undocumented)
1870
+ confirmationToken: string;
1871
+ // (undocumented)
1872
+ digest?: string;
1873
+ // (undocumented)
1874
+ kind: 'confirm';
1875
+ // (undocumented)
1876
+ planId: string;
1877
+ // (undocumented)
1878
+ protocol: string;
1879
+ }
1880
+
1881
+ // @public (undocumented)
1882
+ export interface ReplyDecline {
1883
+ // (undocumented)
1884
+ clientReplyId: string;
1885
+ // (undocumented)
1886
+ kind: 'decline';
1887
+ // (undocumented)
1888
+ planId: string;
1889
+ }
1890
+
1891
+ // @public
1892
+ export interface ReplyDelivery {
1893
+ // (undocumented)
1894
+ acceptance?: ExecutionAcceptance;
1895
+ // (undocumented)
1896
+ id: string;
1897
+ }
1898
+
1899
+ // @public (undocumented)
1900
+ export interface ReplyForm {
1901
+ // (undocumented)
1902
+ blockId: string;
1903
+ // (undocumented)
1904
+ clientReplyId: string;
1905
+ // (undocumented)
1906
+ kind: 'form';
1907
+ // (undocumented)
1908
+ protocol: string;
1909
+ // (undocumented)
1910
+ values: {};
1911
+ }
1912
+
1913
+ // @public (undocumented)
1914
+ export interface ReplyFormFill {
1915
+ // (undocumented)
1916
+ clientReplyId: string;
1917
+ // (undocumented)
1918
+ kind: 'form-fill';
1919
+ // (undocumented)
1920
+ protocol: string;
1921
+ // (undocumented)
1922
+ request: FormFillRequest;
1923
+ }
1924
+
1925
+ // @public (undocumented)
1926
+ export type ReplyInput = Reply extends infer R ? R extends {
1927
+ protocol: string;
1928
+ } ? Omit<R, "protocol"> & {
1929
+ protocol?: string;
1930
+ } : never : never;
1931
+
1932
+ // @public (undocumented)
1933
+ export interface ReplyMessage {
1934
+ // (undocumented)
1935
+ clientMessageId: string;
1936
+ // (undocumented)
1937
+ clientReplyId: string;
1938
+ // (undocumented)
1939
+ content: string;
1940
+ // (undocumented)
1941
+ kind: 'message';
1942
+ // (undocumented)
1943
+ protocol: string;
1944
+ }
1945
+
1946
+ // @public (undocumented)
1947
+ export type ReplyMessageKey = "chat.reply.stop" | "chat.reply.keepWaiting" | "chat.tool.working" | "chat.tool.running" | "chat.tool.done" | "chat.tool.failed" | "chat.tool.show" | "chat.tool.hide" | "chat.message.actions" | "chat.message.copy" | "chat.message.copied" | "chat.message.copyFailed" | "chat.message.regenerate" | "chat.message.edit" | "chat.message.editLabel" | "chat.message.resend" | "chat.message.good" | "chat.message.bad" | "chat.message.previous" | "chat.message.next" | "chat.message.version";
1948
+
1949
+ // @public
1950
+ export type ReplyOutcome = {
1951
+ accepted: true;
1952
+ } | {
1953
+ accepted: false;
1954
+ problem?: Problem;
1955
+ };
1956
+
1957
+ // @public (undocumented)
1958
+ export interface ReplyPlanValues {
1959
+ // (undocumented)
1960
+ clientReplyId: string;
1961
+ // (undocumented)
1962
+ kind: 'plan.values';
1963
+ // (undocumented)
1964
+ planId: string;
1965
+ // (undocumented)
1966
+ protocol: string;
1967
+ // (undocumented)
1968
+ steps: {
1969
+ stepId: string;
1970
+ rows: {};
1971
+ versions: {
1972
+ [k: string]: string;
1973
+ };
1974
+ }[];
1975
+ }
1976
+
1977
+ // @public (undocumented)
1978
+ export function replyRow(input: {
1979
+ messages: readonly Message[];
1980
+ pending: readonly PendingSend[];
1981
+ now: number;
1982
+ askedAt?: number;
1983
+ overdueAt?: number;
1984
+ heldUntil?: number;
1985
+ unavailable?: boolean;
1986
+ failed?: boolean;
1987
+ streamLost?: boolean;
1988
+ activityAt?: number;
1989
+ }): ReplyState;
1990
+
1991
+ // @public (undocumented)
1992
+ export interface ReplyRowAction {
1993
+ // (undocumented)
1994
+ id: "keepWaiting" | "retry" | "stop";
1995
+ // (undocumented)
1996
+ labelKey: MessageKey;
1997
+ }
1998
+
1999
+ // @public
2000
+ export function replyRowView(state: ReplyState, options?: {
2001
+ canStop?: boolean;
2002
+ canRetry?: boolean;
2003
+ }): {
2004
+ key?: MessageKey;
2005
+ actions: ReplyRowAction[];
2006
+ };
2007
+
2008
+ // @public (undocumented)
2009
+ export type ReplyState = "none" | "writing" | "unavailable" | "failed" | "overdue";
2010
+
2011
+ // @public
2012
+ export interface ReplyStop {
2013
+ // (undocumented)
2014
+ clientReplyId: string;
2015
+ // (undocumented)
2016
+ kind: 'stop';
2017
+ // (undocumented)
2018
+ messageId: string;
2019
+ // (undocumented)
2020
+ protocol: string;
2021
+ versionIndex?: number;
2022
+ }
2023
+
2024
+ // @public (undocumented)
2025
+ export interface ReplyToolResult {
2026
+ // (undocumented)
2027
+ callId: string;
2028
+ // (undocumented)
2029
+ clientReplyId: string;
2030
+ // (undocumented)
2031
+ kind: 'tool-result';
2032
+ // (undocumented)
2033
+ problem?: Problem;
2034
+ // (undocumented)
2035
+ protocol: string;
2036
+ // (undocumented)
2037
+ result: unknown;
2038
+ }
2039
+
2040
+ // @public (undocumented)
2041
+ export interface RestoredMessage {
2042
+ // (undocumented)
2043
+ content: string;
2044
+ // (undocumented)
2045
+ id: string;
2046
+ }
2047
+
2048
+ // @public (undocumented)
2049
+ export interface RunFlow {
2050
+ // (undocumented)
2051
+ flowId: string;
2052
+ // (undocumented)
2053
+ protocol: string;
2054
+ // (undocumented)
2055
+ values: {};
2056
+ }
2057
+
2058
+ // @public (undocumented)
2059
+ export interface RunnerPorts {
2060
+ // (undocumented)
2061
+ clock?: PlatformPorts["clock"];
2062
+ heartbeat(id: string, acceptance?: ExecutionAcceptance): Promise<void>;
2063
+ // (undocumented)
2064
+ heartbeatMs?: number;
2065
+ intent?(request: IntentRequest): Promise<PlanIntentReply>;
2066
+ interrupted?(id: string, cause: IntentCause): Promise<void>;
2067
+ // (undocumented)
2068
+ onRecord?(record: PlanRecord): void;
2069
+ read(id: string, context?: ReaderRequestContext): Promise<PlanRecord>;
2070
+ // (undocumented)
2071
+ request(request: CanonicalRequest, context: StepContext): Promise<void>;
2072
+ signal?: ScopeSignal;
2073
+ // (undocumented)
2074
+ stepUp?(planId: string, stepId: string): Promise<string | null>;
2075
+ // @deprecated (undocumented)
2076
+ stop?(id: string): Promise<PlanRecord>;
2077
+ }
2078
+
2079
+ // @public (undocumented)
2080
+ export interface ScopeSignal {
2081
+ // (undocumented)
2082
+ readonly aborted: boolean;
2083
+ // (undocumented)
2084
+ addEventListener(type: "abort", listener: () => void, options?: {
2085
+ once?: boolean;
2086
+ }): void;
2087
+ // (undocumented)
2088
+ removeEventListener(type: "abort", listener: () => void): void;
2089
+ }
2090
+
2091
+ // @public (undocumented)
2092
+ export interface Source {
2093
+ // (undocumented)
2094
+ id: string;
2095
+ // (undocumented)
2096
+ title: string;
2097
+ // (undocumented)
2098
+ url: string;
2099
+ }
2100
+
2101
+ // @public (undocumented)
2102
+ export interface Step {
2103
+ // (undocumented)
2104
+ after?: {};
2105
+ // (undocumented)
2106
+ before?: {};
2107
+ // (undocumented)
2108
+ fields: string[];
2109
+ // (undocumented)
2110
+ id: string;
2111
+ // (undocumented)
2112
+ operation: string;
2113
+ // (undocumented)
2114
+ planningRead?: ReadTemplate;
2115
+ // (undocumented)
2116
+ request?: CanonicalRequest;
2117
+ // (undocumented)
2118
+ resource: string;
2119
+ // (undocumented)
2120
+ rows: string[];
2121
+ // (undocumented)
2122
+ stepUp: boolean;
2123
+ // (undocumented)
2124
+ tier: 'low' | 'sensitive';
2125
+ // (undocumented)
2126
+ undo: string;
2127
+ // (undocumented)
2128
+ view: string;
2129
+ }
2130
+
2131
+ // @public (undocumented)
2132
+ export interface StepContext {
2133
+ // (undocumented)
2134
+ headers: Record<string, string>;
2135
+ // (undocumented)
2136
+ planId: string;
2137
+ signal?: ScopeSignal;
2138
+ // (undocumented)
2139
+ stepId: string;
2140
+ // (undocumented)
2141
+ stepUpCode?: string;
2142
+ }
2143
+
2144
+ // @public (undocumented)
2145
+ export interface StepStatus {
2146
+ index: number;
2147
+ // (undocumented)
2148
+ lateReport?: "contradicted";
2149
+ // (undocumented)
2150
+ resource?: string;
2151
+ // (undocumented)
2152
+ stepId: string;
2153
+ // (undocumented)
2154
+ textKey: MessageKey;
2155
+ // (undocumented)
2156
+ truth: "done" | "not-done" | "unknown";
2157
+ }
2158
+
2159
+ // @public (undocumented)
2160
+ export interface StoragePort {
2161
+ compareAndSet?(key: string, expected: string | null, value: string): MaybePromise<boolean>;
2162
+ // (undocumented)
2163
+ get(key: string): MaybePromise<string | null>;
2164
+ // (undocumented)
2165
+ remove(key: string): MaybePromise<void>;
2166
+ // (undocumented)
2167
+ set(key: string, value: string): MaybePromise<void>;
2168
+ }
2169
+
2170
+ // @public (undocumented)
2171
+ export interface TimedPlan {
2172
+ // (undocumented)
2173
+ end: string | null;
2174
+ // (undocumented)
2175
+ id: string;
2176
+ // (undocumented)
2177
+ kind: 'timed';
2178
+ // (undocumented)
2179
+ start: string | null;
2180
+ // (undocumented)
2181
+ values: {
2182
+ [k: string]: {
2183
+ [k: string]: unknown;
2184
+ };
2185
+ };
2186
+ }
2187
+
2188
+ // @public (undocumented)
2189
+ export type Tone = "neutral" | "progress" | "warning" | "success";
2190
+
2191
+ // @public (undocumented)
2192
+ export interface ToolCall {
2193
+ // (undocumented)
2194
+ id: string;
2195
+ label?: string;
2196
+ // (undocumented)
2197
+ method: string;
2198
+ // (undocumented)
2199
+ operation: string;
2200
+ // (undocumented)
2201
+ path: string;
2202
+ // (undocumented)
2203
+ query?: {
2204
+ [k: string]: string;
2205
+ };
2206
+ }
2207
+
2208
+ // @public
2209
+ export interface ToolStep {
2210
+ // (undocumented)
2211
+ id: string;
2212
+ label?: string;
2213
+ // (undocumented)
2214
+ status: "running" | "done" | "failed";
2215
+ }
2216
+
2217
+ // @public (undocumented)
2218
+ export type TransportEvent = {
2219
+ type: "status";
2220
+ status: "connecting" | "open" | "reconnecting" | "unavailable";
2221
+ } | {
2222
+ type: "frame";
2223
+ frame: Frame;
2224
+ }
2225
+ /** A hint that the conversation changed; it is never applied as content. */
2226
+ | {
2227
+ type: "invalidate";
2228
+ };
2229
+
2230
+ // @public (undocumented)
2231
+ export interface TransportPort {
2232
+ negotiate(supported: readonly string[], offer?: NegotiationOffer): Promise<{
2233
+ protocol: string;
2234
+ capabilities: string[];
2235
+ agreementId?: string;
2236
+ }>;
2237
+ // (undocumented)
2238
+ read(conversationId: string, context?: ReaderRequestContext): Promise<Conversation>;
2239
+ // (undocumented)
2240
+ send(reply: Reply & {
2241
+ extensions?: Record<string, unknown>;
2242
+ }, conversationId: string, context?: ReaderRequestContext): Promise<ReplyDelivery>;
2243
+ // (undocumented)
2244
+ subscribe(conversationId: string, listener: (event: TransportEvent) => void, context?: ReaderRequestContext): () => void;
2245
+ }
2246
+
2247
+ // @public
2248
+ export function useBlockReply(client?: WaypointClient): BlockReply;
2249
+
2250
+ // @public
2251
+ export function usePlanView(client?: WaypointClient): {
2252
+ view: PlanView | null;
2253
+ press: (id: ActionId | "retry") => void;
2254
+ sheet: KeepSheet | null;
2255
+ };
2256
+
2257
+ // @public (undocumented)
2258
+ export function useWaypointSnapshot(client?: WaypointClient): ClientSnapshot;
2259
+
2260
+ // @public (undocumented)
2261
+ export function versionWalk(message: {
2262
+ versionIndex?: number | null;
2263
+ versionCount?: number | null;
2264
+ }): {
2265
+ index: number;
2266
+ count: number;
2267
+ previous: number | null;
2268
+ next: number | null;
2269
+ } | null;
2270
+
2271
+ // @public (undocumented)
2272
+ export interface ViewMessage {
2273
+ // (undocumented)
2274
+ key: MessageKey;
2275
+ // (undocumented)
2276
+ values?: Record<string, number>;
2277
+ }
2278
+
2279
+ // @public (undocumented)
2280
+ export interface WaypointClient {
2281
+ canChangeVersions(): boolean;
2282
+ // (undocumented)
2283
+ canKeepChanges(id?: string): boolean;
2284
+ canPrepareFlow(): boolean;
2285
+ canRetryReply(): boolean;
2286
+ canSendFeedback(): boolean;
2287
+ canStopReply(): boolean;
2288
+ checkIntentStatus(id?: string): Promise<void>;
2289
+ checkKeepStatus(id?: string): Promise<void>;
2290
+ checkSavedChoice(id?: string): Promise<void>;
2291
+ // (undocumented)
2292
+ confirmPlan(): Promise<void>;
2293
+ declinePlan(): Promise<void>;
2294
+ discardRestored(id: string): Promise<void>;
2295
+ // (undocumented)
2296
+ dismiss(id: string): Promise<void>;
2297
+ // (undocumented)
2298
+ dispose(): void;
2299
+ // (undocumented)
2300
+ editMessage(messageId: string, content: string): Promise<void>;
2301
+ editRestored(id: string): Promise<void>;
2302
+ // (undocumented)
2303
+ getSnapshot(): ClientSnapshot;
2304
+ keepChanges(review: KeepChangesReviewResult): Promise<void>;
2305
+ keepChangesReview(id?: string): KeepChangesReviewResult;
2306
+ keepWaiting(): void;
2307
+ leavePlan(id?: string): Promise<void>;
2308
+ // (undocumented)
2309
+ loadFlows(): Promise<void>;
2310
+ // (undocumented)
2311
+ on(listener: (event: WaypointEvent) => void): () => void;
2312
+ prepareFlow(id?: string): Promise<Flow | void>;
2313
+ readPlan(id?: string): Promise<void>;
2314
+ // (undocumented)
2315
+ ready: Promise<void>;
2316
+ // (undocumented)
2317
+ refresh(): Promise<ConversationReadResult>;
2318
+ // (undocumented)
2319
+ regenerate(messageId: string): Promise<void>;
2320
+ // (undocumented)
2321
+ reply(reply: ReplyInput): Promise<boolean>;
2322
+ replyOutcome(reply: ReplyInput): Promise<ReplyOutcome>;
2323
+ // (undocumented)
2324
+ report(problem: Problem): void;
2325
+ // (undocumented)
2326
+ resumePlan(): Promise<void>;
2327
+ // (undocumented)
2328
+ retry(id: string): Promise<void>;
2329
+ // (undocumented)
2330
+ retryIntent(id?: string): Promise<void>;
2331
+ retryReply(): Promise<void>;
2332
+ // (undocumented)
2333
+ retryUndo(): Promise<void>;
2334
+ runFlow(id: string, values: Record<string, unknown>): Promise<string | void>;
2335
+ // (undocumented)
2336
+ runPlan(id: string, confirmedDigest: string): Promise<void>;
2337
+ // (undocumented)
2338
+ selectFlowTab(tab: FlowTab): void;
2339
+ // (undocumented)
2340
+ selectVersion(messageId: string, index: number): Promise<void>;
2341
+ // (undocumented)
2342
+ send(): Promise<void>;
2343
+ sendFeedback(messageId: string, rating: FeedbackInput["rating"]): Promise<boolean>;
2344
+ // (undocumented)
2345
+ setDraft(value: string): Promise<void>;
2346
+ // (undocumented)
2347
+ setFavourite(id: string, favourite: boolean): Promise<void>;
2348
+ // (undocumented)
2349
+ setPlan(plan: PlanRecord): void;
2350
+ // (undocumented)
2351
+ stopPlan(id?: string): void;
2352
+ stopReply(): Promise<void>;
2353
+ // (undocumented)
2354
+ subscribe(listener: () => void): () => void;
2355
+ // (undocumented)
2356
+ switchConversation(id: string): Promise<ConversationReadResult>;
2357
+ // (undocumented)
2358
+ withdraw(id: string): Promise<void>;
2359
+ }
2360
+
2361
+ // @public (undocumented)
2362
+ export type WaypointEvent = {
2363
+ type: "send" | "reply";
2364
+ conversationId: string;
2365
+ replyId: string;
2366
+ } | {
2367
+ type: "plan.state";
2368
+ planId: string;
2369
+ } | {
2370
+ type: "problem";
2371
+ problemId: string;
2372
+ } | {
2373
+ type: "transport.status";
2374
+ conversationId: string;
2375
+ };
2376
+
2377
+ // @public (undocumented)
2378
+ export type WaypointProtocol = Problem | Negotiation | NegotiationOfferWire | Negotiated | CanonicalRequest | ReadTemplate | Step | ImmediateDraft | ImmediatePlan | TimedPlan | Plan | PlanState | Outcome | ConfirmationItem | ConfirmationSchedule | ConfirmationRecord | PlanRecord | RecoveryPhase | IntentKind | WinnerKind | IntentCause | IntentWinner | RecoveryView | IntentTarget | IntentRequest | PlanIntentReply | ExecutionAcceptance | ReplyDecline | CardAnswer | BlockMarkdown | BlockCard | BlockDetails | BlockList | BlockTable | BlockForm | BlockChoice | BlockButtons | BlockDiff | BlockPlan | BlockRouteLink | BlockNotice | ExtensionBlock | Block | Message | Source | Conversation | ReplyMessage | ReplyConfirm | ReplyForm | ReplyAction | ReplyToolResult | ReplyPlanValues | Reply | ReplyStop | ManifestEntry | ToolCall | FrameMessageStart | FrameTextDelta | FrameBlock | FramePlanDraft | FramePlanFinal | FramePlanStep | FrameToolCall | FramePlanningRead | FrameMessageEnd | FrameStale | FrameProblem | Frame | FlowParameter | Flow | CreateConversation | PlanCommand | RunFlow | PatchFlow | FormSubject | FormValidation | FormFillValue | FormFillField | FormFillRequest | BlockFormFill | ReplyFormFill | LeaveAcknowledgment | DecisionVersions | KeptFact | FinalHistory;
2379
+
2380
+ // @public (undocumented)
2381
+ export type WinnerKind = 'stop' | 'cancel-initial' | 'cancel-review' | 'leave' | 'keep';
2382
+
2383
+ // (No @packageDocumentation comment for this package)
2384
+
2385
+ ```