@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,2159 @@
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 function asProblem(error: unknown, id: string): Problem;
9
+
10
+ // @public (undocumented)
11
+ export interface AttachmentPort {
12
+ // (undocumented)
13
+ remove(id: string): MaybePromise<void>;
14
+ // (undocumented)
15
+ upload(data: Uint8Array, context: {
16
+ conversationId: string;
17
+ fileName: string;
18
+ contentType: string;
19
+ }): MaybePromise<{
20
+ id: string;
21
+ }>;
22
+ }
23
+
24
+ // @public (undocumented)
25
+ export function bindFlow(flow: Flow, values: Record<string, unknown>): {
26
+ operation: string;
27
+ arguments: Record<string, unknown>;
28
+ }[];
29
+
30
+ // @public (undocumented)
31
+ export type Block = BlockMarkdown | BlockCard | BlockDetails | BlockList | BlockTable | BlockForm | BlockChoice | BlockButtons | BlockDiff | BlockPlan | BlockRouteLink | BlockNotice | BlockFormFill | ExtensionBlock;
32
+
33
+ // @public (undocumented)
34
+ export interface BlockButtons {
35
+ // (undocumented)
36
+ answer?: CardAnswer;
37
+ answered?: boolean;
38
+ // (undocumented)
39
+ body: {
40
+ actions: {
41
+ id: string;
42
+ label: string;
43
+ }[];
44
+ };
45
+ // (undocumented)
46
+ fallback: string;
47
+ // (undocumented)
48
+ id: string;
49
+ // (undocumented)
50
+ type: 'buttons';
51
+ }
52
+
53
+ // @public (undocumented)
54
+ export interface BlockCard {
55
+ // (undocumented)
56
+ answer?: CardAnswer;
57
+ answered?: boolean;
58
+ // (undocumented)
59
+ body: {
60
+ title: string;
61
+ blocks: Block[];
62
+ };
63
+ // (undocumented)
64
+ fallback: string;
65
+ // (undocumented)
66
+ id: string;
67
+ // (undocumented)
68
+ type: 'card';
69
+ }
70
+
71
+ // @public (undocumented)
72
+ export interface BlockChoice {
73
+ // (undocumented)
74
+ answer?: CardAnswer;
75
+ answered?: boolean;
76
+ // (undocumented)
77
+ body: {
78
+ mode: 'single' | 'multi' | 'text';
79
+ options: string[];
80
+ };
81
+ // (undocumented)
82
+ fallback: string;
83
+ // (undocumented)
84
+ id: string;
85
+ // (undocumented)
86
+ type: 'choice';
87
+ }
88
+
89
+ // @public
90
+ export interface BlockDetails {
91
+ // (undocumented)
92
+ answer?: CardAnswer;
93
+ answered?: boolean;
94
+ body: {
95
+ summary: string;
96
+ blocks: Block[];
97
+ };
98
+ fallback: string;
99
+ id: string;
100
+ type: 'details';
101
+ }
102
+
103
+ // @public (undocumented)
104
+ export interface BlockDiff {
105
+ // (undocumented)
106
+ answer?: CardAnswer;
107
+ answered?: boolean;
108
+ // (undocumented)
109
+ body: {
110
+ before: unknown;
111
+ after: unknown;
112
+ };
113
+ // (undocumented)
114
+ fallback: string;
115
+ // (undocumented)
116
+ id: string;
117
+ // (undocumented)
118
+ type: 'diff';
119
+ }
120
+
121
+ // @public (undocumented)
122
+ export function blockFallback(block: {
123
+ type: string;
124
+ id?: string;
125
+ fallback: string;
126
+ }): {
127
+ text: string;
128
+ disabled: true;
129
+ update: true;
130
+ };
131
+
132
+ // @public (undocumented)
133
+ export interface BlockForm {
134
+ // (undocumented)
135
+ answer?: CardAnswer;
136
+ answered?: boolean;
137
+ // (undocumented)
138
+ body: {
139
+ fields: {
140
+ name: string;
141
+ label: string;
142
+ required?: boolean;
143
+ value?: string;
144
+ }[];
145
+ };
146
+ // (undocumented)
147
+ fallback: string;
148
+ // (undocumented)
149
+ id: string;
150
+ // (undocumented)
151
+ type: 'form';
152
+ }
153
+
154
+ // @public (undocumented)
155
+ export interface BlockFormFill {
156
+ // (undocumented)
157
+ answer?: CardAnswer;
158
+ answered?: boolean;
159
+ // (undocumented)
160
+ body: {
161
+ requestId: string;
162
+ values: {
163
+ [k: string]: FormFillValue;
164
+ };
165
+ };
166
+ // (undocumented)
167
+ fallback: string;
168
+ // (undocumented)
169
+ id: string;
170
+ // (undocumented)
171
+ type: 'form.fill';
172
+ }
173
+
174
+ // @public (undocumented)
175
+ export interface BlockList {
176
+ // (undocumented)
177
+ answer?: CardAnswer;
178
+ answered?: boolean;
179
+ // (undocumented)
180
+ body: {
181
+ items: string[];
182
+ };
183
+ // (undocumented)
184
+ fallback: string;
185
+ // (undocumented)
186
+ id: string;
187
+ // (undocumented)
188
+ type: 'list';
189
+ }
190
+
191
+ // @public (undocumented)
192
+ export interface BlockMarkdown {
193
+ // (undocumented)
194
+ answer?: CardAnswer;
195
+ answered?: boolean;
196
+ // (undocumented)
197
+ body: {
198
+ text: string;
199
+ };
200
+ // (undocumented)
201
+ fallback: string;
202
+ // (undocumented)
203
+ id: string;
204
+ // (undocumented)
205
+ type: 'markdown';
206
+ }
207
+
208
+ // @public (undocumented)
209
+ export interface BlockNotice {
210
+ // (undocumented)
211
+ answer?: CardAnswer;
212
+ answered?: boolean;
213
+ // (undocumented)
214
+ body: {
215
+ text: string;
216
+ tone?: 'info' | 'warning' | 'error';
217
+ };
218
+ // (undocumented)
219
+ fallback: string;
220
+ // (undocumented)
221
+ id: string;
222
+ // (undocumented)
223
+ type: 'notice';
224
+ }
225
+
226
+ // @public (undocumented)
227
+ export interface BlockPlan {
228
+ // (undocumented)
229
+ answer?: CardAnswer;
230
+ answered?: boolean;
231
+ // (undocumented)
232
+ body: {
233
+ planId: string;
234
+ };
235
+ // (undocumented)
236
+ fallback: string;
237
+ // (undocumented)
238
+ id: string;
239
+ // (undocumented)
240
+ type: 'plan';
241
+ }
242
+
243
+ // @public (undocumented)
244
+ export interface BlockRouteLink {
245
+ // (undocumented)
246
+ answer?: CardAnswer;
247
+ answered?: boolean;
248
+ // (undocumented)
249
+ body: {
250
+ label: string;
251
+ route: string;
252
+ };
253
+ // (undocumented)
254
+ fallback: string;
255
+ // (undocumented)
256
+ id: string;
257
+ // (undocumented)
258
+ type: 'route-link';
259
+ }
260
+
261
+ // @public (undocumented)
262
+ export interface BlockTable {
263
+ // (undocumented)
264
+ answer?: CardAnswer;
265
+ answered?: boolean;
266
+ // (undocumented)
267
+ body: {
268
+ columns: string[];
269
+ rows: unknown[][];
270
+ };
271
+ // (undocumented)
272
+ fallback: string;
273
+ // (undocumented)
274
+ id: string;
275
+ // (undocumented)
276
+ type: 'table';
277
+ }
278
+
279
+ // @public (undocumented)
280
+ export type BuiltinFlowTab = "favourites" | "most-used" | "recent" | "presets";
281
+
282
+ // @public (undocumented)
283
+ export interface CanonicalRequest {
284
+ // (undocumented)
285
+ body: string;
286
+ // (undocumented)
287
+ digest: string;
288
+ // (undocumented)
289
+ headers: {
290
+ [k: string]: string;
291
+ };
292
+ // (undocumented)
293
+ method: 'POST' | 'PUT' | 'PATCH' | 'GET';
294
+ // (undocumented)
295
+ path: string;
296
+ }
297
+
298
+ // @public (undocumented)
299
+ export function canTransition(from: PlanState, to: PlanState): boolean;
300
+
301
+ // @public (undocumented)
302
+ export const CAPABILITIES: readonly ["plans", "flows", "widgets", "step-up", "scheduled", "form-fill", "plan-recovery", "plan-leave", "plan-keep", "reply-stop"];
303
+
304
+ // @public (undocumented)
305
+ export type Capability = (typeof CAPABILITIES)[number];
306
+
307
+ // @public
308
+ export type CardAnswer = {
309
+ kind: 'action';
310
+ clientReplyId: string;
311
+ blockId: string;
312
+ actionId: string;
313
+ } | {
314
+ kind: 'form';
315
+ clientReplyId: string;
316
+ blockId: string;
317
+ values?: {};
318
+ };
319
+
320
+ // @public (undocumented)
321
+ export interface ClientConfig {
322
+ // (undocumented)
323
+ accountId: string;
324
+ // (undocumented)
325
+ beforeSend?: (reply: Reply) => MaybePromise<Reply | false | void>;
326
+ // (undocumented)
327
+ contributions?: readonly ComposerContribution[];
328
+ // (undocumented)
329
+ conversationId: string;
330
+ // (undocumented)
331
+ feedback?: FeedbackPort;
332
+ // (undocumented)
333
+ flowOperations?: readonly string[];
334
+ // (undocumented)
335
+ flowSource?: FlowSource;
336
+ // (undocumented)
337
+ formSession?: FormSession;
338
+ // (undocumented)
339
+ plans?: RunnerPorts & {
340
+ resume?(id: string): Promise<PlanRecord>;
341
+ retryUndo?(id: string): Promise<PlanRecord>;
342
+ };
343
+ // (undocumented)
344
+ platform: PlatformPorts;
345
+ // (undocumented)
346
+ reads?: ReadPorts;
347
+ // (undocumented)
348
+ storage?: StoragePort;
349
+ // (undocumented)
350
+ tabs?: readonly FlowTab[];
351
+ // (undocumented)
352
+ transport: TransportPort;
353
+ // (undocumented)
354
+ versions?: MessageVersionPort;
355
+ }
356
+
357
+ // @public (undocumented)
358
+ export interface ClientSnapshot {
359
+ // (undocumented)
360
+ announcement: number;
361
+ // (undocumented)
362
+ capabilities: readonly Capability[];
363
+ confirmationRefusal?: {
364
+ token: string;
365
+ problemId: string;
366
+ };
367
+ // (undocumented)
368
+ conversation: Conversation | null;
369
+ // (undocumented)
370
+ conversationId: string;
371
+ // (undocumented)
372
+ conversationUnavailable: boolean;
373
+ // (undocumented)
374
+ draft: string;
375
+ // (undocumented)
376
+ flows: Partial<Record<string, FlowSummary[]>>;
377
+ // (undocumented)
378
+ flowTab: string;
379
+ // (undocumented)
380
+ flowTabs: readonly FlowTab[];
381
+ // (undocumented)
382
+ hints: readonly string[];
383
+ // (undocumented)
384
+ intentAlert: IntentAlert | null;
385
+ intentNotice: IntentNotice | null;
386
+ intentOverlays: Readonly<Record<string, IntentOverlay>>;
387
+ // (undocumented)
388
+ observerFailures: number;
389
+ // (undocumented)
390
+ pending: readonly PendingSend[];
391
+ // (undocumented)
392
+ plan: PlanRecord | null;
393
+ planReadOnly?: boolean;
394
+ // (undocumented)
395
+ problem: Problem | null;
396
+ // (undocumented)
397
+ protocol: string | null;
398
+ // (undocumented)
399
+ replyState: ReplyState;
400
+ restored: readonly RestoredMessage[];
401
+ // (undocumented)
402
+ sending: boolean;
403
+ // (undocumented)
404
+ status: string;
405
+ streamUnavailable: boolean;
406
+ toolSteps: readonly ToolStep[];
407
+ withdrawing: readonly string[];
408
+ }
409
+
410
+ // @public (undocumented)
411
+ export interface ComposerContribution {
412
+ // (undocumented)
413
+ evaluate(context: {
414
+ draft: string;
415
+ conversationId: string;
416
+ }): MaybePromise<{
417
+ hold?: string;
418
+ hint?: string;
419
+ payload?: unknown;
420
+ }>;
421
+ // (undocumented)
422
+ id: string;
423
+ }
424
+
425
+ // @public (undocumented)
426
+ export interface ConfirmationItem {
427
+ // (undocumented)
428
+ after?: string;
429
+ // (undocumented)
430
+ before?: string;
431
+ // (undocumented)
432
+ label: string;
433
+ // (undocumented)
434
+ note?: string;
435
+ }
436
+
437
+ // @public
438
+ export function confirmationOf(plan: PlanRecord | null | undefined, conversationId: string | undefined): ConfirmationRecord | undefined;
439
+
440
+ // @public
441
+ export interface ConfirmationRecord {
442
+ // (undocumented)
443
+ actionLabel?: string;
444
+ // (undocumented)
445
+ conversationId: string;
446
+ // (undocumented)
447
+ expiresAt: string;
448
+ // (undocumented)
449
+ heading: string;
450
+ // (undocumented)
451
+ irreversible: boolean;
452
+ items: ConfirmationItem[];
453
+ // (undocumented)
454
+ planId: string;
455
+ // (undocumented)
456
+ revision: number;
457
+ // (undocumented)
458
+ schedule?: ConfirmationSchedule;
459
+ // (undocumented)
460
+ token: string;
461
+ // (undocumented)
462
+ undo: string;
463
+ // (undocumented)
464
+ verificationCount: number;
465
+ }
466
+
467
+ // @public (undocumented)
468
+ export interface ConfirmationSchedule {
469
+ // (undocumented)
470
+ end: string | null;
471
+ // (undocumented)
472
+ endText: string;
473
+ // (undocumented)
474
+ start: string | null;
475
+ // (undocumented)
476
+ startText: string;
477
+ }
478
+
479
+ // @public
480
+ export const CONFORMANCE_UNAVAILABLE: {
481
+ readonly code: "retryable";
482
+ readonly id: "conformance-load";
483
+ };
484
+
485
+ // @public (undocumented)
486
+ export type ConformanceBlock = Block;
487
+
488
+ // @public (undocumented)
489
+ export interface ConformanceConfig {
490
+ // (undocumented)
491
+ baseUrl: string;
492
+ // (undocumented)
493
+ noStepUp?: boolean;
494
+ // (undocumented)
495
+ profile: "admin-host" | "app-host";
496
+ // (undocumented)
497
+ request: HttpRequest;
498
+ }
499
+
500
+ // @public (undocumented)
501
+ export interface ConformanceResult {
502
+ // (undocumented)
503
+ failures: string[];
504
+ // (undocumented)
505
+ passed: boolean;
506
+ // (undocumented)
507
+ scenarios: string[];
508
+ }
509
+
510
+ // @public (undocumented)
511
+ export type Conversation = {
512
+ [k: string]: unknown;
513
+ } & {
514
+ protocol: string;
515
+ id: string;
516
+ title: string;
517
+ messages: Message[];
518
+ replyOverdueAt?: number | null;
519
+ replyStatus?: 'expected' | 'unavailable' | 'failed' | 'complete';
520
+ mode?: 'form-fill';
521
+ subject?: FormSubject;
522
+ parentConversationId?: string;
523
+ field?: string;
524
+ };
525
+
526
+ // @public (undocumented)
527
+ export class ConversationReadError extends Error {
528
+ constructor(conversationId: string, status: number, problem?: unknown);
529
+ // (undocumented)
530
+ readonly conversationId: string;
531
+ readonly problem?: Problem;
532
+ // (undocumented)
533
+ readonly status: number;
534
+ }
535
+
536
+ // @public (undocumented)
537
+ export type ConversationReadResult = {
538
+ kind: "loaded";
539
+ conversationId: string;
540
+ conversation: Conversation;
541
+ } | {
542
+ kind: "missing";
543
+ conversationId: string;
544
+ status: 404 | 410;
545
+ } | {
546
+ kind: "unavailable" | "superseded";
547
+ conversationId: string;
548
+ };
549
+
550
+ // @public (undocumented)
551
+ export interface ConversationSource {
552
+ // (undocumented)
553
+ create(input: CreateConversation): MaybePromise<Conversation>;
554
+ // (undocumented)
555
+ list(subjectKey?: string): MaybePromise<ConversationSummary[]>;
556
+ }
557
+
558
+ // @public (undocumented)
559
+ export interface ConversationSummary {
560
+ // (undocumented)
561
+ field?: string;
562
+ // (undocumented)
563
+ id: string;
564
+ // (undocumented)
565
+ mode?: "form-fill";
566
+ // (undocumented)
567
+ parentConversationId?: string;
568
+ // (undocumented)
569
+ subject?: FormSubject;
570
+ // (undocumented)
571
+ title: string;
572
+ }
573
+
574
+ // @public (undocumented)
575
+ export type CreateConversation = {
576
+ [k: string]: unknown;
577
+ } & {
578
+ protocol: string;
579
+ title: string;
580
+ mode?: 'form-fill';
581
+ subject?: FormSubject;
582
+ parentConversationId?: string;
583
+ field?: string;
584
+ clientCreationId?: string;
585
+ };
586
+
587
+ // @public (undocumented)
588
+ export function createFetchStreamTransport(request: HttpRequest, stream: StreamPort): TransportPort;
589
+
590
+ // @public (undocumented)
591
+ export function createHttpConversationSource(request: HttpRequest): ConversationSource;
592
+
593
+ // @public (undocumented)
594
+ export function createHttpTransport(request: HttpRequest, stream: StreamPort, format?: "sse" | "ndjson" | "signals"): TransportPort;
595
+
596
+ // @public (undocumented)
597
+ export function createMemoryStorage(asynchronous?: boolean): StoragePort;
598
+
599
+ // @public (undocumented)
600
+ export function createPlanRunner(ports: RunnerPorts): PlanRunner;
601
+
602
+ // @public (undocumented)
603
+ export function createSignalTransport(request: HttpRequest, stream: StreamPort): TransportPort;
604
+
605
+ // @public (undocumented)
606
+ export function createSseTransport(request: HttpRequest, stream: StreamPort): TransportPort;
607
+
608
+ // @public (undocumented)
609
+ export function createWaypointClient(config: ClientConfig): WaypointClient;
610
+
611
+ // @public (undocumented)
612
+ export interface DecisionVersions {
613
+ // (undocumented)
614
+ decisionResolution: number;
615
+ // (undocumented)
616
+ evidence: number;
617
+ // (undocumented)
618
+ winner: number;
619
+ }
620
+
621
+ // @public
622
+ export function decodeFrames(chunks: AsyncIterable<string>, format: "sse" | "ndjson"): AsyncGenerator<Frame>;
623
+
624
+ // @public (undocumented)
625
+ export const DEFAULT_FLOW_TABS: readonly BuiltinFlowTab[];
626
+
627
+ // @public (undocumented)
628
+ export interface ExecutionAcceptance {
629
+ // (undocumented)
630
+ executionId: string;
631
+ // (undocumented)
632
+ fence: number;
633
+ // (undocumented)
634
+ planId: string;
635
+ }
636
+
637
+ // @public (undocumented)
638
+ export interface ExtensionBlock {
639
+ // (undocumented)
640
+ answer?: CardAnswer;
641
+ answered?: boolean;
642
+ // (undocumented)
643
+ body: unknown;
644
+ // (undocumented)
645
+ fallback: string;
646
+ // (undocumented)
647
+ id: string;
648
+ // (undocumented)
649
+ type: string;
650
+ }
651
+
652
+ // @public
653
+ export interface FeedbackInput extends MessageVersionInput {
654
+ rating: "positive" | "negative";
655
+ }
656
+
657
+ // @public
658
+ export interface FeedbackPort {
659
+ send(input: FeedbackInput): MaybePromise<void>;
660
+ }
661
+
662
+ // @public (undocumented)
663
+ export interface FinalHistory {
664
+ contradictedAfterSeal?: string[];
665
+ // (undocumented)
666
+ keptFact: KeptFact;
667
+ // (undocumented)
668
+ relation?: 'keptElsewhere' | 'leaveCompletedByKeep' | 'leaveCoveredByKeep';
669
+ // (undocumented)
670
+ requestedTargetApplied?: boolean;
671
+ // (undocumented)
672
+ winner: IntentWinner;
673
+ }
674
+
675
+ // @public (undocumented)
676
+ export type Flow = {
677
+ [k: string]: unknown;
678
+ } & {
679
+ format: '1.0';
680
+ id: string;
681
+ title: string;
682
+ kind: 'structured' | 'prompt';
683
+ parameters: FlowParameter[];
684
+ steps?: {
685
+ operation: string;
686
+ arguments: {};
687
+ }[];
688
+ tags: string[];
689
+ body: string;
690
+ };
691
+
692
+ // @public (undocumented)
693
+ export interface FlowParameter {
694
+ // (undocumented)
695
+ default?: unknown;
696
+ // (undocumented)
697
+ label: string;
698
+ // (undocumented)
699
+ name: string;
700
+ // (undocumented)
701
+ required: boolean;
702
+ // (undocumented)
703
+ type: 'string' | 'number' | 'boolean';
704
+ }
705
+
706
+ // @public (undocumented)
707
+ export interface FlowSource {
708
+ // (undocumented)
709
+ list(tab: FlowTab): MaybePromise<FlowSummary[]>;
710
+ // (undocumented)
711
+ load?(id: string): MaybePromise<Flow>;
712
+ // (undocumented)
713
+ run(id: string, values: Record<string, unknown>, document?: Flow): MaybePromise<{
714
+ conversationId: string;
715
+ plan?: PlanRecord;
716
+ }>;
717
+ // (undocumented)
718
+ setFavourite(id: string, favourite: boolean): MaybePromise<void>;
719
+ }
720
+
721
+ // @public (undocumented)
722
+ export interface FlowSummary {
723
+ // (undocumented)
724
+ favourite?: boolean;
725
+ // (undocumented)
726
+ id: string;
727
+ // (undocumented)
728
+ lastRunAt?: number;
729
+ // (undocumented)
730
+ runCount?: number;
731
+ // (undocumented)
732
+ title: string;
733
+ }
734
+
735
+ // @public (undocumented)
736
+ export type FlowTab = BuiltinFlowTab | {
737
+ id: string;
738
+ labelKey: string;
739
+ };
740
+
741
+ // @public (undocumented)
742
+ export function flowTabId(tab: FlowTab): string;
743
+
744
+ // @public
745
+ export const FORM_SESSION_UNAVAILABLE: {
746
+ readonly code: "retryable";
747
+ readonly id: "form-session-load";
748
+ };
749
+
750
+ // @public (undocumented)
751
+ export interface FormDraft {
752
+ // (undocumented)
753
+ edited: boolean;
754
+ // (undocumented)
755
+ label: string;
756
+ localInvalid?: true;
757
+ // (undocumented)
758
+ localText?: string;
759
+ // (undocumented)
760
+ replacement?: {
761
+ value: unknown;
762
+ validation: FormValidation;
763
+ revision: number;
764
+ fill?: string;
765
+ };
766
+ // (undocumented)
767
+ revision: number;
768
+ // (undocumented)
769
+ validation?: FormValidation;
770
+ // (undocumented)
771
+ value: unknown;
772
+ }
773
+
774
+ // @public (undocumented)
775
+ export interface FormField {
776
+ // (undocumented)
777
+ label: string;
778
+ // (undocumented)
779
+ name: string;
780
+ // (undocumented)
781
+ tier: "low" | "sensitive" | "human-only";
782
+ // (undocumented)
783
+ value: unknown;
784
+ }
785
+
786
+ // @public (undocumented)
787
+ export interface FormFillField {
788
+ // (undocumented)
789
+ label: string;
790
+ // (undocumented)
791
+ name: string;
792
+ // (undocumented)
793
+ tier: 'low';
794
+ // (undocumented)
795
+ value: unknown;
796
+ }
797
+
798
+ // @public (undocumented)
799
+ export interface FormFillRequest {
800
+ // (undocumented)
801
+ attachments: string[];
802
+ // (undocumented)
803
+ field?: string;
804
+ // (undocumented)
805
+ fields: [FormFillField, ...FormFillField[]];
806
+ // (undocumented)
807
+ references: string[];
808
+ // (undocumented)
809
+ requestId: string;
810
+ // (undocumented)
811
+ text: string;
812
+ }
813
+
814
+ // @public (undocumented)
815
+ export interface FormFillValue {
816
+ // (undocumented)
817
+ label?: string;
818
+ // (undocumented)
819
+ validation: FormValidation;
820
+ // (undocumented)
821
+ value: unknown;
822
+ }
823
+
824
+ // @public (undocumented)
825
+ export interface FormMaterial {
826
+ // (undocumented)
827
+ attachments?: string[];
828
+ // (undocumented)
829
+ field?: string;
830
+ // (undocumented)
831
+ references?: string[];
832
+ // (undocumented)
833
+ text: string;
834
+ }
835
+
836
+ // @public (undocumented)
837
+ export interface FormSession {
838
+ // (undocumented)
839
+ begin(material: FormMaterial): FormFillRequest;
840
+ // (undocumented)
841
+ cancel(): void;
842
+ // (undocumented)
843
+ cancelReplacement(field: string): void;
844
+ // (undocumented)
845
+ dispose(): void;
846
+ // (undocumented)
847
+ edit(field: string, value: unknown): void;
848
+ failRequest(requestId: string): void;
849
+ // (undocumented)
850
+ getSnapshot(): FormSnapshot;
851
+ markEdited(field: string, text: string): void;
852
+ // (undocumented)
853
+ receive(body: unknown): boolean;
854
+ // (undocumented)
855
+ replace(field: string, revision: number): boolean;
856
+ revert(fill: string): boolean;
857
+ // (undocumented)
858
+ subscribe(listener: () => void): () => void;
859
+ }
860
+
861
+ // @public (undocumented)
862
+ export interface FormSessionConfig {
863
+ // (undocumented)
864
+ fields: readonly FormField[];
865
+ // (undocumented)
866
+ ids(): string;
867
+ }
868
+
869
+ // @public (undocumented)
870
+ export interface FormSnapshot {
871
+ // (undocumented)
872
+ fields: Readonly<Record<string, FormDraft>>;
873
+ fills?: readonly {
874
+ id: string;
875
+ fields: readonly string[];
876
+ }[];
877
+ // (undocumented)
878
+ pending: boolean;
879
+ }
880
+
881
+ // @public (undocumented)
882
+ export type FormSubject = {
883
+ [k: string]: unknown;
884
+ } & {
885
+ key: string;
886
+ resource: string;
887
+ label: string;
888
+ route: string;
889
+ state: 'pending' | 'bound' | 'unlinked';
890
+ record?: string;
891
+ };
892
+
893
+ // @public (undocumented)
894
+ export interface FormValidation {
895
+ // (undocumented)
896
+ guidance?: string;
897
+ // (undocumented)
898
+ messages: string[];
899
+ // (undocumented)
900
+ status: 'valid' | 'invalid';
901
+ }
902
+
903
+ // @public (undocumented)
904
+ export type Frame = FrameMessageStart | FrameTextDelta | FrameBlock | FramePlanDraft | FramePlanFinal | FramePlanStep | FrameToolCall | FramePlanningRead | FrameMessageEnd | FrameStale | FrameProblem;
905
+
906
+ // @public (undocumented)
907
+ export interface FrameBlock {
908
+ // (undocumented)
909
+ block: Block;
910
+ // (undocumented)
911
+ messageId: string;
912
+ // (undocumented)
913
+ protocol: string;
914
+ // (undocumented)
915
+ sequence: number;
916
+ // (undocumented)
917
+ type: 'block';
918
+ }
919
+
920
+ // @public (undocumented)
921
+ export interface FrameMessageEnd {
922
+ // (undocumented)
923
+ messageId: string;
924
+ // (undocumented)
925
+ protocol: string;
926
+ // (undocumented)
927
+ sequence: number;
928
+ // (undocumented)
929
+ status: 'completed' | 'failed' | 'unavailable' | 'stopped';
930
+ // (undocumented)
931
+ type: 'message.end';
932
+ }
933
+
934
+ // @public (undocumented)
935
+ export interface FrameMessageStart {
936
+ // (undocumented)
937
+ messageId: string;
938
+ // (undocumented)
939
+ protocol: string;
940
+ // (undocumented)
941
+ role: 'user' | 'assistant';
942
+ // (undocumented)
943
+ sequence: number;
944
+ // (undocumented)
945
+ type: 'message.start';
946
+ }
947
+
948
+ // @public (undocumented)
949
+ export interface FramePlanDraft {
950
+ // (undocumented)
951
+ messageId: string;
952
+ // (undocumented)
953
+ plan: ImmediateDraft;
954
+ // (undocumented)
955
+ protocol: string;
956
+ // (undocumented)
957
+ sequence: number;
958
+ // (undocumented)
959
+ type: 'plan.draft';
960
+ }
961
+
962
+ // @public (undocumented)
963
+ export interface FramePlanFinal {
964
+ // (undocumented)
965
+ messageId: string;
966
+ // (undocumented)
967
+ plan: ImmediatePlan | TimedPlan;
968
+ // (undocumented)
969
+ protocol: string;
970
+ // (undocumented)
971
+ sequence: number;
972
+ // (undocumented)
973
+ type: 'plan.final';
974
+ }
975
+
976
+ // @public (undocumented)
977
+ export interface FramePlanningRead {
978
+ // (undocumented)
979
+ planId: string;
980
+ // (undocumented)
981
+ protocol: string;
982
+ // (undocumented)
983
+ sequence: number;
984
+ // (undocumented)
985
+ stepId: string;
986
+ // (undocumented)
987
+ template: ReadTemplate;
988
+ // (undocumented)
989
+ type: 'planning-read';
990
+ }
991
+
992
+ // @public (undocumented)
993
+ export interface FramePlanStep {
994
+ // (undocumented)
995
+ outcome: Outcome;
996
+ // (undocumented)
997
+ planId: string;
998
+ // (undocumented)
999
+ protocol: string;
1000
+ // (undocumented)
1001
+ sequence: number;
1002
+ // (undocumented)
1003
+ type: 'plan.step';
1004
+ }
1005
+
1006
+ // @public (undocumented)
1007
+ export interface FrameProblem {
1008
+ // (undocumented)
1009
+ problem: Problem;
1010
+ // (undocumented)
1011
+ protocol: string;
1012
+ // (undocumented)
1013
+ sequence: number;
1014
+ // (undocumented)
1015
+ type: 'problem';
1016
+ }
1017
+
1018
+ // @public (undocumented)
1019
+ export interface FrameStale {
1020
+ // (undocumented)
1021
+ protocol: string;
1022
+ // (undocumented)
1023
+ reads: ('conversation' | 'conversations' | 'plans' | 'flows')[];
1024
+ // (undocumented)
1025
+ sequence: number;
1026
+ // (undocumented)
1027
+ type: 'stale';
1028
+ }
1029
+
1030
+ // @public (undocumented)
1031
+ export interface FrameTextDelta {
1032
+ // (undocumented)
1033
+ messageId: string;
1034
+ // (undocumented)
1035
+ protocol: string;
1036
+ // (undocumented)
1037
+ sequence: number;
1038
+ // (undocumented)
1039
+ text: string;
1040
+ // (undocumented)
1041
+ type: 'text.delta';
1042
+ }
1043
+
1044
+ // @public (undocumented)
1045
+ export interface FrameToolCall {
1046
+ // (undocumented)
1047
+ call: ToolCall;
1048
+ // (undocumented)
1049
+ protocol: string;
1050
+ // (undocumented)
1051
+ sequence: number;
1052
+ // (undocumented)
1053
+ type: 'tool.call';
1054
+ }
1055
+
1056
+ // @public
1057
+ export function handlePlanningRead(call: ReadTemplate, template: ReadTemplate, request: (call: ReadTemplate) => Promise<{
1058
+ rows: Record<string, unknown>;
1059
+ versions: Record<string, string>;
1060
+ }>): Promise<{
1061
+ kind: "refused";
1062
+ reason: string;
1063
+ } | {
1064
+ kind: "plan.values";
1065
+ rows: Record<string, Record<string, unknown>>;
1066
+ versions: Record<string, string>;
1067
+ }>;
1068
+
1069
+ // @public
1070
+ export function handleToolRead(call: ToolCall, manifest: readonly ManifestEntry[], request: (call: ToolCall) => Promise<unknown>): Promise<ReadResult>;
1071
+
1072
+ // @public (undocumented)
1073
+ export interface HttpInit {
1074
+ // (undocumented)
1075
+ body?: string;
1076
+ // (undocumented)
1077
+ headers?: Record<string, string>;
1078
+ // (undocumented)
1079
+ method?: string;
1080
+ }
1081
+
1082
+ // @public (undocumented)
1083
+ export type HttpRequest = (path: string, init?: HttpInit) => Promise<HttpResult>;
1084
+
1085
+ // @public (undocumented)
1086
+ export interface HttpResult {
1087
+ // (undocumented)
1088
+ body: unknown;
1089
+ // (undocumented)
1090
+ status: number;
1091
+ }
1092
+
1093
+ // @public (undocumented)
1094
+ export interface ImmediateDraft {
1095
+ // (undocumented)
1096
+ id: string;
1097
+ // (undocumented)
1098
+ kind: 'immediate';
1099
+ // (undocumented)
1100
+ stage: 'draft';
1101
+ // (undocumented)
1102
+ steps: (Step & {
1103
+ [k: string]: unknown;
1104
+ })[];
1105
+ }
1106
+
1107
+ // @public (undocumented)
1108
+ export interface ImmediatePlan {
1109
+ // (undocumented)
1110
+ digest: string;
1111
+ // (undocumented)
1112
+ id: string;
1113
+ // (undocumented)
1114
+ kind: 'immediate';
1115
+ // (undocumented)
1116
+ stage: 'final';
1117
+ // (undocumented)
1118
+ steps: (Step & {
1119
+ [k: string]: unknown;
1120
+ })[];
1121
+ // (undocumented)
1122
+ stepUpCount: number;
1123
+ }
1124
+
1125
+ // @public (undocumented)
1126
+ export type IntentAlert = {
1127
+ serial: number;
1128
+ action: "checkStatus" | "retry" | "signIn" | "hostGuidance" | "wait";
1129
+ } | {
1130
+ serial: number;
1131
+ restoreFocus: true;
1132
+ };
1133
+
1134
+ // @public (undocumented)
1135
+ export type IntentCause = 'user' | 'connection-lost' | 'renewal-refused' | 'step-failed' | 'step-up-failed' | 'identity-lost' | 'attribution-missing' | 'plan-changed' | 'adapter-configuration';
1136
+
1137
+ // @public (undocumented)
1138
+ export type IntentFailure = "offline" | "sign-in" | "forbidden" | "rate-limited" | "timeout" | "connection-lost";
1139
+
1140
+ // @public (undocumented)
1141
+ export type IntentKind = 'stop' | 'cancel-initial' | 'cancel-review' | 'leave' | 'keep';
1142
+
1143
+ // @public (undocumented)
1144
+ export type IntentNotice = Omit<PlanIntentReply, "slotVersion"> & {
1145
+ resolvedSlotVersion: number;
1146
+ };
1147
+
1148
+ // @public
1149
+ export interface IntentOverlay {
1150
+ // (undocumented)
1151
+ delivery: "sending" | "uncertain" | "not-sent";
1152
+ // (undocumented)
1153
+ kind: IntentKind;
1154
+ // (undocumented)
1155
+ lastProblem?: {
1156
+ key: string;
1157
+ cause: IntentFailure;
1158
+ };
1159
+ // (undocumented)
1160
+ ownRun: boolean;
1161
+ // (undocumented)
1162
+ planId: string;
1163
+ // (undocumented)
1164
+ producer: "user" | "automatic";
1165
+ // (undocumented)
1166
+ request: IntentRequest;
1167
+ // (undocumented)
1168
+ retryAt?: number;
1169
+ }
1170
+
1171
+ // @public (undocumented)
1172
+ export interface IntentRequest {
1173
+ // (undocumented)
1174
+ acknowledgment?: LeaveAcknowledgment;
1175
+ // (undocumented)
1176
+ capturedRound: number;
1177
+ // (undocumented)
1178
+ cause: IntentCause;
1179
+ // (undocumented)
1180
+ correlation: string;
1181
+ // (undocumented)
1182
+ expectedSlotVersion: number;
1183
+ // (undocumented)
1184
+ kind: IntentKind;
1185
+ // (undocumented)
1186
+ payload?: string;
1187
+ // (undocumented)
1188
+ planId: string;
1189
+ // (undocumented)
1190
+ review?: 'forward-only' | 'end-retention';
1191
+ // (undocumented)
1192
+ target: IntentTarget;
1193
+ }
1194
+
1195
+ // @public (undocumented)
1196
+ export interface IntentTarget {
1197
+ // (undocumented)
1198
+ id: string;
1199
+ // (undocumented)
1200
+ type: 'generation' | 'review' | 'execution';
1201
+ }
1202
+
1203
+ // @public (undocumented)
1204
+ export interface IntentWinner {
1205
+ // (undocumented)
1206
+ cause: IntentCause;
1207
+ // (undocumented)
1208
+ kind: WinnerKind;
1209
+ }
1210
+
1211
+ // @public (undocumented)
1212
+ export interface KeepChangesReview {
1213
+ // (undocumented)
1214
+ acknowledgment: LeaveAcknowledgment;
1215
+ // (undocumented)
1216
+ remaining: number;
1217
+ // (undocumented)
1218
+ review: "forward-only" | "end-retention";
1219
+ }
1220
+
1221
+ // @public (undocumented)
1222
+ export type KeepChangesReviewResult = KeepChangesReview | {
1223
+ disabled: KeepDisabledReason;
1224
+ };
1225
+
1226
+ // @public (undocumented)
1227
+ export type KeepDisabledReason = "loading" | "intentUnavailable" | "capabilityMissing" | "keepNoDecision" | "sealed" | "keepBlockedActive" | "keepBlockedUnknown";
1228
+
1229
+ // @public (undocumented)
1230
+ export interface KeptFact {
1231
+ // (undocumented)
1232
+ actorCause: IntentCause;
1233
+ // (undocumented)
1234
+ keepEffect: 'forward-closed' | 'decision-closed' | 'retention-ended' | 'leave-completed';
1235
+ // (undocumented)
1236
+ round: number;
1237
+ }
1238
+
1239
+ // @public (undocumented)
1240
+ export interface LeaveAcknowledgment {
1241
+ // (undocumented)
1242
+ decisionResolutionVersion: number;
1243
+ // (undocumented)
1244
+ evidenceDigest: string;
1245
+ // (undocumented)
1246
+ evidenceVersion: number;
1247
+ // (undocumented)
1248
+ sourceDecisionKey: string;
1249
+ // (undocumented)
1250
+ unknownCount: number;
1251
+ // (undocumented)
1252
+ winnerVersion: number;
1253
+ }
1254
+
1255
+ // @public
1256
+ export function loadFormSession(config: FormSessionConfig): Promise<FormSession>;
1257
+
1258
+ // @public
1259
+ export function loadReadHandlers(): Promise<void>;
1260
+
1261
+ // @public (undocumented)
1262
+ export interface ManifestEntry {
1263
+ // (undocumented)
1264
+ fields: {
1265
+ [k: string]: 'low' | 'sensitive' | 'human-only';
1266
+ };
1267
+ // (undocumented)
1268
+ filterable: string[];
1269
+ // (undocumented)
1270
+ id: string;
1271
+ // (undocumented)
1272
+ kind: 'read' | 'planning-read' | 'update' | 'create' | 'action' | 'bulk';
1273
+ // (undocumented)
1274
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH';
1275
+ // (undocumented)
1276
+ path: string;
1277
+ // (undocumented)
1278
+ permission: string;
1279
+ // (undocumented)
1280
+ resource: string;
1281
+ // (undocumented)
1282
+ returns: string[];
1283
+ // (undocumented)
1284
+ undo: string;
1285
+ // (undocumented)
1286
+ view: string;
1287
+ }
1288
+
1289
+ // @public (undocumented)
1290
+ export type MaybePromise<T> = T | Promise<T>;
1291
+
1292
+ // @public (undocumented)
1293
+ export interface Message {
1294
+ // (undocumented)
1295
+ blocks: Block[];
1296
+ // (undocumented)
1297
+ clientMessageId?: string;
1298
+ // (undocumented)
1299
+ content: string;
1300
+ // (undocumented)
1301
+ createdAt: number;
1302
+ // (undocumented)
1303
+ id: string;
1304
+ // (undocumented)
1305
+ role: 'user' | 'assistant';
1306
+ sources?: Source[];
1307
+ // (undocumented)
1308
+ status?: 'writing' | 'completed' | 'failed' | 'unavailable' | 'stopped';
1309
+ // (undocumented)
1310
+ versionCount?: number;
1311
+ // (undocumented)
1312
+ versionIndex?: number;
1313
+ }
1314
+
1315
+ // @public (undocumented)
1316
+ export interface MessageVersionInput {
1317
+ // (undocumented)
1318
+ clientReplyId: string;
1319
+ // (undocumented)
1320
+ conversationId: string;
1321
+ // (undocumented)
1322
+ messageId: string;
1323
+ }
1324
+
1325
+ // @public (undocumented)
1326
+ export interface MessageVersionPort {
1327
+ // (undocumented)
1328
+ edit(input: MessageVersionInput & {
1329
+ content: string;
1330
+ }): MaybePromise<void>;
1331
+ // (undocumented)
1332
+ regenerate(input: MessageVersionInput): MaybePromise<void>;
1333
+ // (undocumented)
1334
+ select(input: MessageVersionInput & {
1335
+ index: number;
1336
+ }): MaybePromise<void>;
1337
+ }
1338
+
1339
+ // @public
1340
+ export function negotiate(supported: readonly string[], capabilities?: readonly string[], offer?: NegotiationOffer): {
1341
+ protocol: string;
1342
+ capabilities: Capability[];
1343
+ };
1344
+
1345
+ // @public (undocumented)
1346
+ export interface Negotiated {
1347
+ // (undocumented)
1348
+ agreementId?: string;
1349
+ // (undocumented)
1350
+ capabilities: string[];
1351
+ // (undocumented)
1352
+ protocol: string;
1353
+ }
1354
+
1355
+ // @public (undocumented)
1356
+ export interface Negotiation {
1357
+ // (undocumented)
1358
+ offer?: NegotiationOfferWire;
1359
+ // (undocumented)
1360
+ protocol: string;
1361
+ // (undocumented)
1362
+ supported: string[];
1363
+ }
1364
+
1365
+ // @public
1366
+ export interface NegotiationOffer {
1367
+ // (undocumented)
1368
+ capabilities: readonly string[];
1369
+ }
1370
+
1371
+ // @public (undocumented)
1372
+ export interface NegotiationOfferWire {
1373
+ // (undocumented)
1374
+ capabilities: string[];
1375
+ }
1376
+
1377
+ // @public (undocumented)
1378
+ export interface Outcome {
1379
+ // (undocumented)
1380
+ attributed: boolean;
1381
+ reason?: string;
1382
+ retryable?: boolean;
1383
+ // (undocumented)
1384
+ status: number;
1385
+ // (undocumented)
1386
+ stepId: string;
1387
+ // (undocumented)
1388
+ version?: string;
1389
+ }
1390
+
1391
+ // @public (undocumented)
1392
+ export function parseFlow(source: string, operations: readonly string[]): Promise<Flow>;
1393
+
1394
+ // @public (undocumented)
1395
+ export interface PatchFlow {
1396
+ // (undocumented)
1397
+ favourite: boolean;
1398
+ // (undocumented)
1399
+ flowId: string;
1400
+ // (undocumented)
1401
+ protocol: string;
1402
+ // (undocumented)
1403
+ title: string;
1404
+ }
1405
+
1406
+ // @public (undocumented)
1407
+ export interface PendingSend {
1408
+ // (undocumented)
1409
+ content: string;
1410
+ // (undocumented)
1411
+ extensions?: Record<string, unknown>;
1412
+ // (undocumented)
1413
+ failure: Problem | null;
1414
+ // (undocumented)
1415
+ id: string;
1416
+ }
1417
+
1418
+ // @public (undocumented)
1419
+ export type Plan = ImmediateDraft | ImmediatePlan | TimedPlan;
1420
+
1421
+ // @public (undocumented)
1422
+ export interface PlanCommand {
1423
+ // (undocumented)
1424
+ action: 'stop' | 'heartbeat' | 'resume' | 'retry-undo';
1425
+ // (undocumented)
1426
+ planId: string;
1427
+ // (undocumented)
1428
+ protocol: string;
1429
+ }
1430
+
1431
+ // @public (undocumented)
1432
+ export interface PlanIntentReply {
1433
+ // (undocumented)
1434
+ capturedRound: number;
1435
+ // (undocumented)
1436
+ correlation: string;
1437
+ // (undocumented)
1438
+ count?: number;
1439
+ // (undocumented)
1440
+ dispositionApplied?: boolean;
1441
+ // (undocumented)
1442
+ effectiveRound: number;
1443
+ // (undocumented)
1444
+ finalHistory?: FinalHistory;
1445
+ // (undocumented)
1446
+ forwardClosed?: boolean;
1447
+ // (undocumented)
1448
+ keys: string[];
1449
+ // (undocumented)
1450
+ kind: IntentKind;
1451
+ // (undocumented)
1452
+ phase: RecoveryPhase;
1453
+ // (undocumented)
1454
+ planId: string;
1455
+ // (undocumented)
1456
+ replacement?: IntentTarget;
1457
+ // (undocumented)
1458
+ requestedTargetApplied?: boolean;
1459
+ // (undocumented)
1460
+ requestKey?: 'requestAlreadyStopped' | 'requestTargetStopped';
1461
+ // (undocumented)
1462
+ resolvedTarget?: string;
1463
+ // (undocumented)
1464
+ result: 'applied' | 'replaced' | 'already-closed' | 'already-stopped' | 'defeated' | 'superseded' | 'needs-review' | 'conflict' | 'unavailable' | 'invalid-target' | 'refused' | 'kept' | 'already-kept' | 'sealed';
1465
+ // (undocumented)
1466
+ safetyApplied?: boolean;
1467
+ // (undocumented)
1468
+ savedDisposition?: {
1469
+ phase: 'left-known' | 'left-unconfirmed';
1470
+ count: number;
1471
+ };
1472
+ // (undocumented)
1473
+ slotVersion: number;
1474
+ // (undocumented)
1475
+ winner?: IntentWinner;
1476
+ }
1477
+
1478
+ // @public
1479
+ export class PlanReadRefused extends Error {
1480
+ constructor();
1481
+ }
1482
+
1483
+ // @public (undocumented)
1484
+ export interface PlanRecord {
1485
+ // (undocumented)
1486
+ confirmation?: ConfirmationRecord;
1487
+ // (undocumented)
1488
+ id: string;
1489
+ // (undocumented)
1490
+ outcomes: Outcome[];
1491
+ // (undocumented)
1492
+ plan: Plan;
1493
+ // (undocumented)
1494
+ protocol: string;
1495
+ // (undocumented)
1496
+ reason?: string;
1497
+ // (undocumented)
1498
+ recovery?: RecoveryView;
1499
+ // (undocumented)
1500
+ state: PlanState;
1501
+ // (undocumented)
1502
+ undoPlanId?: string;
1503
+ }
1504
+
1505
+ // @public (undocumented)
1506
+ export interface PlanRunner {
1507
+ // (undocumented)
1508
+ dispose(): void;
1509
+ interrupt?(): void;
1510
+ // (undocumented)
1511
+ run(id: string, confirmedDigest: string, acceptance?: ExecutionAcceptance): Promise<void>;
1512
+ // (undocumented)
1513
+ stop(id?: string): void;
1514
+ }
1515
+
1516
+ // @public (undocumented)
1517
+ export type PlanState = 'proposed' | 'awaiting-confirmation' | 'running' | 'undoing' | 'completed' | 'submitted' | 'undone' | 'needs-attention' | 'cancelled';
1518
+
1519
+ // @public (undocumented)
1520
+ export interface PlatformPorts {
1521
+ // (undocumented)
1522
+ clock: {
1523
+ now(): number;
1524
+ setTimeout(fn: () => void, ms: number): unknown;
1525
+ clearTimeout(handle: unknown): void;
1526
+ };
1527
+ // (undocumented)
1528
+ ids(): string;
1529
+ // (undocumented)
1530
+ online(): boolean;
1531
+ subscribeOnline?(listener: (online: boolean) => void): () => void;
1532
+ subscribeVisibility?(listener: (visible: boolean) => void): () => void;
1533
+ // (undocumented)
1534
+ visibility(): boolean;
1535
+ }
1536
+
1537
+ // @public (undocumented)
1538
+ export interface Problem {
1539
+ // (undocumented)
1540
+ 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';
1541
+ confirmation?: {
1542
+ reason: 'expired' | 'used' | 'stale' | 'mismatch' | 'missing';
1543
+ };
1544
+ // (undocumented)
1545
+ id: string;
1546
+ // (undocumented)
1547
+ retryAfter?: number;
1548
+ }
1549
+
1550
+ // @public
1551
+ export interface ReaderRequestContext {
1552
+ // (undocumented)
1553
+ agreementId: string;
1554
+ }
1555
+
1556
+ // @public (undocumented)
1557
+ export interface ReadPorts {
1558
+ // (undocumented)
1559
+ manifest: readonly ManifestEntry[];
1560
+ // (undocumented)
1561
+ planning?: {
1562
+ template(planId: string, stepId: string): MaybePromise<ReadTemplate | null>;
1563
+ request(template: ReadTemplate): Promise<{
1564
+ rows: Record<string, unknown>;
1565
+ versions: Record<string, string>;
1566
+ }>;
1567
+ };
1568
+ // (undocumented)
1569
+ request(call: ToolCall): Promise<unknown>;
1570
+ }
1571
+
1572
+ // @public
1573
+ export function readProblem(error: unknown, id: string): Problem;
1574
+
1575
+ // @public (undocumented)
1576
+ export type ReadResult = {
1577
+ kind: "refused";
1578
+ reason: string;
1579
+ } | {
1580
+ kind: "result";
1581
+ callId: string;
1582
+ result: unknown;
1583
+ };
1584
+
1585
+ // @public (undocumented)
1586
+ export interface ReadTemplate {
1587
+ // (undocumented)
1588
+ fields: string[];
1589
+ // (undocumented)
1590
+ method: 'GET';
1591
+ // (undocumented)
1592
+ path: string;
1593
+ // (undocumented)
1594
+ rows: string[];
1595
+ }
1596
+
1597
+ // @public (undocumented)
1598
+ export type RecoveryPhase = 'proposal' | 'initial-review' | 'forward-active' | 'readback' | 'completed' | 'cancelled' | 'left-known' | 'left-unconfirmed' | 'left-reopened';
1599
+
1600
+ // @public (undocumented)
1601
+ export interface RecoveryView {
1602
+ contradictedAfterSeal?: string[];
1603
+ // (undocumented)
1604
+ conversationId: string;
1605
+ // (undocumented)
1606
+ decisionKey?: string;
1607
+ // (undocumented)
1608
+ evidenceDigest?: string;
1609
+ // (undocumented)
1610
+ executionId?: string;
1611
+ // (undocumented)
1612
+ generation: string;
1613
+ // (undocumented)
1614
+ phase: RecoveryPhase | (string & {});
1615
+ // (undocumented)
1616
+ profile: 'plan-recovery-v1' | (string & {});
1617
+ // (undocumented)
1618
+ remaining?: number;
1619
+ // (undocumented)
1620
+ reviewId?: string;
1621
+ // (undocumented)
1622
+ revision: number;
1623
+ // (undocumented)
1624
+ round: number;
1625
+ // (undocumented)
1626
+ sealed?: boolean;
1627
+ // (undocumented)
1628
+ slots: {
1629
+ stop: number;
1630
+ 'cancel-initial': number;
1631
+ 'cancel-review': number;
1632
+ leave: number;
1633
+ keep: number;
1634
+ };
1635
+ // (undocumented)
1636
+ steps?: {
1637
+ stepId: string;
1638
+ truth: 'done' | 'not-done' | 'unknown';
1639
+ }[];
1640
+ // (undocumented)
1641
+ unknownCount?: number;
1642
+ // (undocumented)
1643
+ versions: DecisionVersions;
1644
+ // (undocumented)
1645
+ winner?: IntentWinner;
1646
+ }
1647
+
1648
+ // @public (undocumented)
1649
+ export type Reply = ReplyMessage | ReplyConfirm | ReplyForm | ReplyAction | ReplyToolResult | ReplyPlanValues | ReplyFormFill | ReplyStop;
1650
+
1651
+ // @public (undocumented)
1652
+ export interface ReplyAction {
1653
+ // (undocumented)
1654
+ actionId: string;
1655
+ // (undocumented)
1656
+ blockId: string;
1657
+ // (undocumented)
1658
+ clientReplyId: string;
1659
+ // (undocumented)
1660
+ kind: 'action';
1661
+ // (undocumented)
1662
+ protocol: string;
1663
+ }
1664
+
1665
+ // @public (undocumented)
1666
+ export interface ReplyConfirm {
1667
+ // (undocumented)
1668
+ clientReplyId: string;
1669
+ // (undocumented)
1670
+ confirmationToken: string;
1671
+ // (undocumented)
1672
+ digest?: string;
1673
+ // (undocumented)
1674
+ kind: 'confirm';
1675
+ // (undocumented)
1676
+ planId: string;
1677
+ // (undocumented)
1678
+ protocol: string;
1679
+ }
1680
+
1681
+ // @public (undocumented)
1682
+ export interface ReplyDecline {
1683
+ // (undocumented)
1684
+ clientReplyId: string;
1685
+ // (undocumented)
1686
+ kind: 'decline';
1687
+ // (undocumented)
1688
+ planId: string;
1689
+ }
1690
+
1691
+ // @public
1692
+ export interface ReplyDelivery {
1693
+ // (undocumented)
1694
+ acceptance?: ExecutionAcceptance;
1695
+ // (undocumented)
1696
+ id: string;
1697
+ }
1698
+
1699
+ // @public (undocumented)
1700
+ export interface ReplyForm {
1701
+ // (undocumented)
1702
+ blockId: string;
1703
+ // (undocumented)
1704
+ clientReplyId: string;
1705
+ // (undocumented)
1706
+ kind: 'form';
1707
+ // (undocumented)
1708
+ protocol: string;
1709
+ // (undocumented)
1710
+ values: {};
1711
+ }
1712
+
1713
+ // @public (undocumented)
1714
+ export interface ReplyFormFill {
1715
+ // (undocumented)
1716
+ clientReplyId: string;
1717
+ // (undocumented)
1718
+ kind: 'form-fill';
1719
+ // (undocumented)
1720
+ protocol: string;
1721
+ // (undocumented)
1722
+ request: FormFillRequest;
1723
+ }
1724
+
1725
+ // @public (undocumented)
1726
+ export type ReplyInput = Reply extends infer R ? R extends {
1727
+ protocol: string;
1728
+ } ? Omit<R, "protocol"> & {
1729
+ protocol?: string;
1730
+ } : never : never;
1731
+
1732
+ // @public (undocumented)
1733
+ export interface ReplyMessage {
1734
+ // (undocumented)
1735
+ clientMessageId: string;
1736
+ // (undocumented)
1737
+ clientReplyId: string;
1738
+ // (undocumented)
1739
+ content: string;
1740
+ // (undocumented)
1741
+ kind: 'message';
1742
+ // (undocumented)
1743
+ protocol: string;
1744
+ }
1745
+
1746
+ // @public
1747
+ export type ReplyOutcome = {
1748
+ accepted: true;
1749
+ } | {
1750
+ accepted: false;
1751
+ problem?: Problem;
1752
+ };
1753
+
1754
+ // @public (undocumented)
1755
+ export interface ReplyPlanValues {
1756
+ // (undocumented)
1757
+ clientReplyId: string;
1758
+ // (undocumented)
1759
+ kind: 'plan.values';
1760
+ // (undocumented)
1761
+ planId: string;
1762
+ // (undocumented)
1763
+ protocol: string;
1764
+ // (undocumented)
1765
+ steps: {
1766
+ stepId: string;
1767
+ rows: {};
1768
+ versions: {
1769
+ [k: string]: string;
1770
+ };
1771
+ }[];
1772
+ }
1773
+
1774
+ // @public (undocumented)
1775
+ export function replyRow(input: {
1776
+ messages: readonly Message[];
1777
+ pending: readonly PendingSend[];
1778
+ now: number;
1779
+ askedAt?: number;
1780
+ overdueAt?: number;
1781
+ heldUntil?: number;
1782
+ unavailable?: boolean;
1783
+ failed?: boolean;
1784
+ streamLost?: boolean;
1785
+ activityAt?: number;
1786
+ }): ReplyState;
1787
+
1788
+ // @public (undocumented)
1789
+ export type ReplyState = "none" | "writing" | "unavailable" | "failed" | "overdue";
1790
+
1791
+ // @public
1792
+ export interface ReplyStop {
1793
+ // (undocumented)
1794
+ clientReplyId: string;
1795
+ // (undocumented)
1796
+ kind: 'stop';
1797
+ // (undocumented)
1798
+ messageId: string;
1799
+ // (undocumented)
1800
+ protocol: string;
1801
+ versionIndex?: number;
1802
+ }
1803
+
1804
+ // @public (undocumented)
1805
+ export interface ReplyToolResult {
1806
+ // (undocumented)
1807
+ callId: string;
1808
+ // (undocumented)
1809
+ clientReplyId: string;
1810
+ // (undocumented)
1811
+ kind: 'tool-result';
1812
+ // (undocumented)
1813
+ problem?: Problem;
1814
+ // (undocumented)
1815
+ protocol: string;
1816
+ // (undocumented)
1817
+ result: unknown;
1818
+ }
1819
+
1820
+ // @public (undocumented)
1821
+ export interface RestoredMessage {
1822
+ // (undocumented)
1823
+ content: string;
1824
+ // (undocumented)
1825
+ id: string;
1826
+ }
1827
+
1828
+ // @public (undocumented)
1829
+ export function runConformance(config: ConformanceConfig): Promise<ConformanceResult>;
1830
+
1831
+ // @public (undocumented)
1832
+ export interface RunFlow {
1833
+ // (undocumented)
1834
+ flowId: string;
1835
+ // (undocumented)
1836
+ protocol: string;
1837
+ // (undocumented)
1838
+ values: {};
1839
+ }
1840
+
1841
+ // @public (undocumented)
1842
+ export function runFormFillConformance(request: HttpRequest): Promise<ConformanceResult>;
1843
+
1844
+ // @public (undocumented)
1845
+ export interface RunnerPorts {
1846
+ // (undocumented)
1847
+ clock?: PlatformPorts["clock"];
1848
+ heartbeat(id: string, acceptance?: ExecutionAcceptance): Promise<void>;
1849
+ // (undocumented)
1850
+ heartbeatMs?: number;
1851
+ intent?(request: IntentRequest): Promise<PlanIntentReply>;
1852
+ interrupted?(id: string, cause: IntentCause): Promise<void>;
1853
+ // (undocumented)
1854
+ onRecord?(record: PlanRecord): void;
1855
+ read(id: string, context?: ReaderRequestContext): Promise<PlanRecord>;
1856
+ // (undocumented)
1857
+ request(request: CanonicalRequest, context: StepContext): Promise<void>;
1858
+ signal?: ScopeSignal;
1859
+ // (undocumented)
1860
+ stepUp?(planId: string, stepId: string): Promise<string | null>;
1861
+ // @deprecated (undocumented)
1862
+ stop?(id: string): Promise<PlanRecord>;
1863
+ }
1864
+
1865
+ // @public (undocumented)
1866
+ export function runPlanConformance(request: HttpRequest): Promise<ConformanceResult>;
1867
+
1868
+ // @public (undocumented)
1869
+ export interface ScopeSignal {
1870
+ // (undocumented)
1871
+ readonly aborted: boolean;
1872
+ // (undocumented)
1873
+ addEventListener(type: "abort", listener: () => void, options?: {
1874
+ once?: boolean;
1875
+ }): void;
1876
+ // (undocumented)
1877
+ removeEventListener(type: "abort", listener: () => void): void;
1878
+ }
1879
+
1880
+ // @public (undocumented)
1881
+ export interface Source {
1882
+ // (undocumented)
1883
+ id: string;
1884
+ // (undocumented)
1885
+ title: string;
1886
+ // (undocumented)
1887
+ url: string;
1888
+ }
1889
+
1890
+ // @public (undocumented)
1891
+ export interface Step {
1892
+ // (undocumented)
1893
+ after?: {};
1894
+ // (undocumented)
1895
+ before?: {};
1896
+ // (undocumented)
1897
+ fields: string[];
1898
+ // (undocumented)
1899
+ id: string;
1900
+ // (undocumented)
1901
+ operation: string;
1902
+ // (undocumented)
1903
+ planningRead?: ReadTemplate;
1904
+ // (undocumented)
1905
+ request?: CanonicalRequest;
1906
+ // (undocumented)
1907
+ resource: string;
1908
+ // (undocumented)
1909
+ rows: string[];
1910
+ // (undocumented)
1911
+ stepUp: boolean;
1912
+ // (undocumented)
1913
+ tier: 'low' | 'sensitive';
1914
+ // (undocumented)
1915
+ undo: string;
1916
+ // (undocumented)
1917
+ view: string;
1918
+ }
1919
+
1920
+ // @public (undocumented)
1921
+ export interface StepContext {
1922
+ // (undocumented)
1923
+ headers: Record<string, string>;
1924
+ // (undocumented)
1925
+ planId: string;
1926
+ signal?: ScopeSignal;
1927
+ // (undocumented)
1928
+ stepId: string;
1929
+ // (undocumented)
1930
+ stepUpCode?: string;
1931
+ }
1932
+
1933
+ // @public (undocumented)
1934
+ export interface StoragePort {
1935
+ compareAndSet?(key: string, expected: string | null, value: string): MaybePromise<boolean>;
1936
+ // (undocumented)
1937
+ get(key: string): MaybePromise<string | null>;
1938
+ // (undocumented)
1939
+ remove(key: string): MaybePromise<void>;
1940
+ // (undocumented)
1941
+ set(key: string, value: string): MaybePromise<void>;
1942
+ }
1943
+
1944
+ // @public
1945
+ export const STREAM_READS_UNAVAILABLE: {
1946
+ readonly code: "retryable";
1947
+ readonly id: "stream-reads-load";
1948
+ };
1949
+
1950
+ // @public (undocumented)
1951
+ export interface StreamPort {
1952
+ // (undocumented)
1953
+ subscribe(path: string, onChunk: (chunk: string) => void, onStatus: (status: "connecting" | "open" | "reconnecting" | "unavailable") => void): () => void;
1954
+ }
1955
+
1956
+ // @public (undocumented)
1957
+ export const SUPPORTED_PROTOCOLS: readonly ["1.1", "1.0"];
1958
+
1959
+ // @public (undocumented)
1960
+ export interface TimedPlan {
1961
+ // (undocumented)
1962
+ end: string | null;
1963
+ // (undocumented)
1964
+ id: string;
1965
+ // (undocumented)
1966
+ kind: 'timed';
1967
+ // (undocumented)
1968
+ start: string | null;
1969
+ // (undocumented)
1970
+ values: {
1971
+ [k: string]: {
1972
+ [k: string]: unknown;
1973
+ };
1974
+ };
1975
+ }
1976
+
1977
+ // @public (undocumented)
1978
+ export interface ToolCall {
1979
+ // (undocumented)
1980
+ id: string;
1981
+ label?: string;
1982
+ // (undocumented)
1983
+ method: string;
1984
+ // (undocumented)
1985
+ operation: string;
1986
+ // (undocumented)
1987
+ path: string;
1988
+ // (undocumented)
1989
+ query?: {
1990
+ [k: string]: string;
1991
+ };
1992
+ }
1993
+
1994
+ // @public
1995
+ export interface ToolStep {
1996
+ // (undocumented)
1997
+ id: string;
1998
+ label?: string;
1999
+ // (undocumented)
2000
+ status: "running" | "done" | "failed";
2001
+ }
2002
+
2003
+ // @public (undocumented)
2004
+ export type TransportEvent = {
2005
+ type: "status";
2006
+ status: "connecting" | "open" | "reconnecting" | "unavailable";
2007
+ } | {
2008
+ type: "frame";
2009
+ frame: Frame;
2010
+ }
2011
+ /** A hint that the conversation changed; it is never applied as content. */
2012
+ | {
2013
+ type: "invalidate";
2014
+ };
2015
+
2016
+ // @public (undocumented)
2017
+ export type TransportListener = (event: TransportEvent) => void;
2018
+
2019
+ // @public (undocumented)
2020
+ export interface TransportPort {
2021
+ negotiate(supported: readonly string[], offer?: NegotiationOffer): Promise<{
2022
+ protocol: string;
2023
+ capabilities: string[];
2024
+ agreementId?: string;
2025
+ }>;
2026
+ // (undocumented)
2027
+ read(conversationId: string, context?: ReaderRequestContext): Promise<Conversation>;
2028
+ // (undocumented)
2029
+ send(reply: Reply & {
2030
+ extensions?: Record<string, unknown>;
2031
+ }, conversationId: string, context?: ReaderRequestContext): Promise<ReplyDelivery>;
2032
+ // (undocumented)
2033
+ subscribe(conversationId: string, listener: (event: TransportEvent) => void, context?: ReaderRequestContext): () => void;
2034
+ }
2035
+
2036
+ // @public (undocumented)
2037
+ export function validateFlowDocument(value: unknown, operations: readonly string[]): Flow;
2038
+
2039
+ // @public (undocumented)
2040
+ export function versionWalk(message: {
2041
+ versionIndex?: number | null;
2042
+ versionCount?: number | null;
2043
+ }): {
2044
+ index: number;
2045
+ count: number;
2046
+ previous: number | null;
2047
+ next: number | null;
2048
+ } | null;
2049
+
2050
+ // @public (undocumented)
2051
+ export interface WaypointClient {
2052
+ canChangeVersions(): boolean;
2053
+ // (undocumented)
2054
+ canKeepChanges(id?: string): boolean;
2055
+ canPrepareFlow(): boolean;
2056
+ canRetryReply(): boolean;
2057
+ canSendFeedback(): boolean;
2058
+ canStopReply(): boolean;
2059
+ checkIntentStatus(id?: string): Promise<void>;
2060
+ checkKeepStatus(id?: string): Promise<void>;
2061
+ checkSavedChoice(id?: string): Promise<void>;
2062
+ // (undocumented)
2063
+ confirmPlan(): Promise<void>;
2064
+ declinePlan(): Promise<void>;
2065
+ discardRestored(id: string): Promise<void>;
2066
+ // (undocumented)
2067
+ dismiss(id: string): Promise<void>;
2068
+ // (undocumented)
2069
+ dispose(): void;
2070
+ // (undocumented)
2071
+ editMessage(messageId: string, content: string): Promise<void>;
2072
+ editRestored(id: string): Promise<void>;
2073
+ // (undocumented)
2074
+ getSnapshot(): ClientSnapshot;
2075
+ keepChanges(review: KeepChangesReviewResult): Promise<void>;
2076
+ keepChangesReview(id?: string): KeepChangesReviewResult;
2077
+ keepWaiting(): void;
2078
+ leavePlan(id?: string): Promise<void>;
2079
+ // (undocumented)
2080
+ loadFlows(): Promise<void>;
2081
+ // (undocumented)
2082
+ on(listener: (event: WaypointEvent) => void): () => void;
2083
+ prepareFlow(id?: string): Promise<Flow | void>;
2084
+ readPlan(id?: string): Promise<void>;
2085
+ // (undocumented)
2086
+ ready: Promise<void>;
2087
+ // (undocumented)
2088
+ refresh(): Promise<ConversationReadResult>;
2089
+ // (undocumented)
2090
+ regenerate(messageId: string): Promise<void>;
2091
+ // (undocumented)
2092
+ reply(reply: ReplyInput): Promise<boolean>;
2093
+ replyOutcome(reply: ReplyInput): Promise<ReplyOutcome>;
2094
+ // (undocumented)
2095
+ report(problem: Problem): void;
2096
+ // (undocumented)
2097
+ resumePlan(): Promise<void>;
2098
+ // (undocumented)
2099
+ retry(id: string): Promise<void>;
2100
+ // (undocumented)
2101
+ retryIntent(id?: string): Promise<void>;
2102
+ retryReply(): Promise<void>;
2103
+ // (undocumented)
2104
+ retryUndo(): Promise<void>;
2105
+ runFlow(id: string, values: Record<string, unknown>): Promise<string | void>;
2106
+ // (undocumented)
2107
+ runPlan(id: string, confirmedDigest: string): Promise<void>;
2108
+ // (undocumented)
2109
+ selectFlowTab(tab: FlowTab): void;
2110
+ // (undocumented)
2111
+ selectVersion(messageId: string, index: number): Promise<void>;
2112
+ // (undocumented)
2113
+ send(): Promise<void>;
2114
+ sendFeedback(messageId: string, rating: FeedbackInput["rating"]): Promise<boolean>;
2115
+ // (undocumented)
2116
+ setDraft(value: string): Promise<void>;
2117
+ // (undocumented)
2118
+ setFavourite(id: string, favourite: boolean): Promise<void>;
2119
+ // (undocumented)
2120
+ setPlan(plan: PlanRecord): void;
2121
+ // (undocumented)
2122
+ stopPlan(id?: string): void;
2123
+ stopReply(): Promise<void>;
2124
+ // (undocumented)
2125
+ subscribe(listener: () => void): () => void;
2126
+ // (undocumented)
2127
+ switchConversation(id: string): Promise<ConversationReadResult>;
2128
+ // (undocumented)
2129
+ withdraw(id: string): Promise<void>;
2130
+ }
2131
+
2132
+ // @public (undocumented)
2133
+ export type WaypointEvent = {
2134
+ type: "send" | "reply";
2135
+ conversationId: string;
2136
+ replyId: string;
2137
+ } | {
2138
+ type: "plan.state";
2139
+ planId: string;
2140
+ } | {
2141
+ type: "problem";
2142
+ problemId: string;
2143
+ } | {
2144
+ type: "transport.status";
2145
+ conversationId: string;
2146
+ };
2147
+
2148
+ // @public (undocumented)
2149
+ 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;
2150
+
2151
+ // @public (undocumented)
2152
+ export type WinnerKind = 'stop' | 'cancel-initial' | 'cancel-review' | 'leave' | 'keep';
2153
+
2154
+ // @public
2155
+ export function withPrerequisites(chosen: Capability[]): Capability[];
2156
+
2157
+ // (No @packageDocumentation comment for this package)
2158
+
2159
+ ```