@appsolutely-io/waypoint 0.0.0-stage → 0.1.1-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +297 -2
  3. package/dist/block-reply-r8u-DNmZ.d.cts +181 -0
  4. package/dist/block-reply-z8El20nD.d.ts +181 -0
  5. package/dist/blocks-2ABWECKG.js +1 -0
  6. package/dist/blocks-7453YTYJ.cjs +1 -0
  7. package/dist/chunk-3KV7TDDR.cjs +3 -0
  8. package/dist/chunk-4BWV3SEL.cjs +1 -0
  9. package/dist/chunk-5Q3INHKA.js +1 -0
  10. package/dist/chunk-5TBO732O.js +1 -0
  11. package/dist/chunk-6OZSKCPT.cjs +1 -0
  12. package/dist/chunk-A3YOSFLE.cjs +1 -0
  13. package/dist/chunk-BRUQ75G3.cjs +1 -0
  14. package/dist/chunk-C3VS33WJ.js +1 -0
  15. package/dist/chunk-D2EGPBCX.cjs +1 -0
  16. package/dist/chunk-D4Q46KWA.js +1 -0
  17. package/dist/chunk-FBADWFRR.cjs +1 -0
  18. package/dist/chunk-FQSWQLRW.js +1 -0
  19. package/dist/chunk-GT6PI4CT.cjs +1 -0
  20. package/dist/chunk-II26UWZM.cjs +1 -0
  21. package/dist/chunk-IPI4O4LP.js +1 -0
  22. package/dist/chunk-JFMVVGGB.js +1 -0
  23. package/dist/chunk-K73VV7KA.js +1 -0
  24. package/dist/chunk-L4PFFRDE.js +3 -0
  25. package/dist/chunk-LLPGVQUT.cjs +1 -0
  26. package/dist/chunk-M63QOANE.js +1 -0
  27. package/dist/chunk-MEKDQDSV.js +1 -0
  28. package/dist/chunk-OEPKPDLD.js +1 -0
  29. package/dist/chunk-OWT55N6J.js +3 -0
  30. package/dist/chunk-PFR2J5BV.js +1 -0
  31. package/dist/chunk-Q7BULGQG.cjs +1 -0
  32. package/dist/chunk-QFBAOEPD.js +1 -0
  33. package/dist/chunk-QS3MKZOY.cjs +3 -0
  34. package/dist/chunk-RZ3AGK3U.cjs +1 -0
  35. package/dist/chunk-RZZDQWC2.js +1 -0
  36. package/dist/chunk-S73WZWDP.js +1 -0
  37. package/dist/chunk-T5XF2R74.js +1 -0
  38. package/dist/chunk-TCFCSGQ3.js +1 -0
  39. package/dist/chunk-TODYQ3SG.cjs +1 -0
  40. package/dist/chunk-TVSQHTK2.cjs +1 -0
  41. package/dist/chunk-VGGJGRNK.cjs +1 -0
  42. package/dist/chunk-XSHOLIC7.cjs +1 -0
  43. package/dist/chunk-XTKUDSDK.cjs +1 -0
  44. package/dist/chunk-XWDB2LS3.cjs +1 -0
  45. package/dist/cli.js +3 -0
  46. package/dist/confirmation-view-5BZ2PP7J.cjs +1 -0
  47. package/dist/confirmation-view-Z5JHY2F5.js +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-2SCPYZ3X.js +1 -0
  57. package/dist/flows-panel-HQYJMOP4.cjs +1 -0
  58. package/dist/form-extras-RNMBCYV7.cjs +1 -0
  59. package/dist/form-extras-X3B3JCMH.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-WC9f-h_q.d.cts +151 -0
  77. package/dist/i18n-WC9f-h_q.d.ts +151 -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-5NUOCOGY.js +23 -0
  91. package/dist/markdown-CG7NXI7X.cjs +23 -0
  92. package/dist/message-actions-ORBVYGNE.cjs +1 -0
  93. package/dist/message-actions-XNBBFHGW.js +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 +421 -0
  114. package/dist/react/index.d.ts +421 -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-6EBUMANX.js +3 -0
  119. package/dist/recovery-panel-EQIIV7TT.cjs +3 -0
  120. package/dist/reply-controls-HUYHUO3W.js +1 -0
  121. package/dist/reply-controls-LGY2RKRJ.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-BlgVvshf.d.ts +19 -0
  133. package/dist/step-name-CB3d3kkP.d.cts +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 +811 -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 +2394 -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 +186 -0
  157. package/etc/react.api.md +2977 -0
  158. package/etc/skin-antd.api.md +2998 -0
  159. package/etc/skin-default.api.md +61 -0
  160. package/etc/testing.api.md +3043 -0
  161. package/package.json +169 -4
@@ -0,0 +1,2977 @@
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
+ import { ComponentType } from 'react';
8
+ import * as react from 'react';
9
+ import { ReactNode } from 'react';
10
+ import { Ref } from 'react';
11
+
12
+ // @public (undocumented)
13
+ export interface ActionEntry {
14
+ // (undocumented)
15
+ available: boolean;
16
+ // (undocumented)
17
+ busy?: boolean;
18
+ countedLabelKey?: MessageKey;
19
+ // (undocumented)
20
+ id: ActionId;
21
+ labelKey: MessageKey;
22
+ labelValues?: Record<string, number>;
23
+ // (undocumented)
24
+ reasonKey?: MessageKey;
25
+ // (undocumented)
26
+ reasonValues?: Record<string, number>;
27
+ // (undocumented)
28
+ schedule?: boolean;
29
+ }
30
+
31
+ // @public (undocumented)
32
+ export type ActionId = "confirm" | "stop" | "decline" | "leave" | "keep" | "status" | "undoSelected" | "continue";
33
+
34
+ // @public (undocumented)
35
+ export function addMessages(en: Record<string, string>, zh: Record<string, string>): void;
36
+
37
+ // @public (undocumented)
38
+ export function asProblem(error: unknown, id: string): Problem;
39
+
40
+ // @public (undocumented)
41
+ export interface AttachmentPort {
42
+ // (undocumented)
43
+ remove(id: string): MaybePromise<void>;
44
+ // (undocumented)
45
+ upload(data: Uint8Array, context: {
46
+ conversationId: string;
47
+ fileName: string;
48
+ contentType: string;
49
+ }): MaybePromise<{
50
+ id: string;
51
+ }>;
52
+ }
53
+
54
+ // @public (undocumented)
55
+ export type Block = BlockMarkdown | BlockCard | BlockDetails | BlockList | BlockTable | BlockForm | BlockChoice | BlockButtons | BlockDiff | BlockPlan | BlockRouteLink | BlockNotice | BlockFormFill | ExtensionBlock;
56
+
57
+ // @public
58
+ export type BlockAnswer = Pick<Reply, "kind"> & Record<string, unknown>;
59
+
60
+ // @public (undocumented)
61
+ export interface BlockButtons {
62
+ // (undocumented)
63
+ answer?: CardAnswer;
64
+ answered?: boolean;
65
+ // (undocumented)
66
+ body: {
67
+ actions: {
68
+ id: string;
69
+ label: string;
70
+ }[];
71
+ };
72
+ // (undocumented)
73
+ fallback: string;
74
+ // (undocumented)
75
+ id: string;
76
+ // (undocumented)
77
+ type: 'buttons';
78
+ }
79
+
80
+ // @public (undocumented)
81
+ export interface BlockCard {
82
+ // (undocumented)
83
+ answer?: CardAnswer;
84
+ answered?: boolean;
85
+ // (undocumented)
86
+ body: {
87
+ title: string;
88
+ blocks: Block[];
89
+ };
90
+ // (undocumented)
91
+ fallback: string;
92
+ // (undocumented)
93
+ id: string;
94
+ // (undocumented)
95
+ type: 'card';
96
+ }
97
+
98
+ // @public (undocumented)
99
+ export type BlockCatalogue = Readonly<Record<BlockMessageKey, string>>;
100
+
101
+ // @public (undocumented)
102
+ export interface BlockChoice {
103
+ // (undocumented)
104
+ answer?: CardAnswer;
105
+ answered?: boolean;
106
+ // (undocumented)
107
+ body: {
108
+ mode: 'single' | 'multi' | 'text';
109
+ options: string[];
110
+ };
111
+ // (undocumented)
112
+ fallback: string;
113
+ // (undocumented)
114
+ id: string;
115
+ // (undocumented)
116
+ type: 'choice';
117
+ }
118
+
119
+ // @public
120
+ export interface BlockDetails {
121
+ // (undocumented)
122
+ answer?: CardAnswer;
123
+ answered?: boolean;
124
+ body: {
125
+ summary: string;
126
+ blocks: Block[];
127
+ };
128
+ fallback: string;
129
+ id: string;
130
+ type: 'details';
131
+ }
132
+
133
+ // @public (undocumented)
134
+ export interface BlockDiff {
135
+ // (undocumented)
136
+ answer?: CardAnswer;
137
+ answered?: boolean;
138
+ // (undocumented)
139
+ body: {
140
+ before: unknown;
141
+ after: unknown;
142
+ };
143
+ // (undocumented)
144
+ fallback: string;
145
+ // (undocumented)
146
+ id: string;
147
+ // (undocumented)
148
+ type: 'diff';
149
+ }
150
+
151
+ // @public (undocumented)
152
+ export interface BlockForm {
153
+ // (undocumented)
154
+ answer?: CardAnswer;
155
+ answered?: boolean;
156
+ // (undocumented)
157
+ body: {
158
+ fields: {
159
+ name: string;
160
+ label: string;
161
+ required?: boolean;
162
+ value?: string;
163
+ }[];
164
+ };
165
+ // (undocumented)
166
+ fallback: string;
167
+ // (undocumented)
168
+ id: string;
169
+ // (undocumented)
170
+ type: 'form';
171
+ }
172
+
173
+ // @public (undocumented)
174
+ export interface BlockFormFill {
175
+ // (undocumented)
176
+ answer?: CardAnswer;
177
+ answered?: boolean;
178
+ // (undocumented)
179
+ body: {
180
+ requestId: string;
181
+ values: {
182
+ [k: string]: FormFillValue;
183
+ };
184
+ };
185
+ // (undocumented)
186
+ fallback: string;
187
+ // (undocumented)
188
+ id: string;
189
+ // (undocumented)
190
+ type: 'form.fill';
191
+ }
192
+
193
+ // @public (undocumented)
194
+ export interface BlockList {
195
+ // (undocumented)
196
+ answer?: CardAnswer;
197
+ answered?: boolean;
198
+ // (undocumented)
199
+ body: {
200
+ items: string[];
201
+ };
202
+ // (undocumented)
203
+ fallback: string;
204
+ // (undocumented)
205
+ id: string;
206
+ // (undocumented)
207
+ type: 'list';
208
+ }
209
+
210
+ // @public (undocumented)
211
+ export interface BlockMarkdown {
212
+ // (undocumented)
213
+ answer?: CardAnswer;
214
+ answered?: boolean;
215
+ // (undocumented)
216
+ body: {
217
+ text: string;
218
+ };
219
+ // (undocumented)
220
+ fallback: string;
221
+ // (undocumented)
222
+ id: string;
223
+ // (undocumented)
224
+ type: 'markdown';
225
+ }
226
+
227
+ // @public (undocumented)
228
+ 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";
229
+
230
+ // @public (undocumented)
231
+ export interface BlockNotice {
232
+ // (undocumented)
233
+ answer?: CardAnswer;
234
+ answered?: boolean;
235
+ // (undocumented)
236
+ body: {
237
+ text: string;
238
+ tone?: 'info' | 'warning' | 'error';
239
+ };
240
+ // (undocumented)
241
+ fallback: string;
242
+ // (undocumented)
243
+ id: string;
244
+ // (undocumented)
245
+ type: 'notice';
246
+ }
247
+
248
+ // @public (undocumented)
249
+ export interface BlockPlan {
250
+ // (undocumented)
251
+ answer?: CardAnswer;
252
+ answered?: boolean;
253
+ // (undocumented)
254
+ body: {
255
+ planId: string;
256
+ };
257
+ // (undocumented)
258
+ fallback: string;
259
+ // (undocumented)
260
+ id: string;
261
+ // (undocumented)
262
+ type: 'plan';
263
+ }
264
+
265
+ // @public (undocumented)
266
+ export interface BlockReply {
267
+ answered: ReadonlySet<string>;
268
+ isAnswered(block: Pick<Block, "id" | "answered">, messageId?: string): boolean;
269
+ reply(block: Pick<Block, "id">, answer: BlockAnswer, messageId?: string): Promise<ReplyOutcome | void>;
270
+ }
271
+
272
+ // @public (undocumented)
273
+ export interface BlockRouteLink {
274
+ // (undocumented)
275
+ answer?: CardAnswer;
276
+ answered?: boolean;
277
+ // (undocumented)
278
+ body: {
279
+ label: string;
280
+ route: string;
281
+ };
282
+ // (undocumented)
283
+ fallback: string;
284
+ // (undocumented)
285
+ id: string;
286
+ // (undocumented)
287
+ type: 'route-link';
288
+ }
289
+
290
+ // @public
291
+ export interface BlockSummary {
292
+ // (undocumented)
293
+ answered: boolean;
294
+ // (undocumented)
295
+ id: string;
296
+ // (undocumented)
297
+ type: string;
298
+ }
299
+
300
+ // @public (undocumented)
301
+ export interface BlockTable {
302
+ // (undocumented)
303
+ answer?: CardAnswer;
304
+ answered?: boolean;
305
+ // (undocumented)
306
+ body: {
307
+ columns: string[];
308
+ rows: unknown[][];
309
+ };
310
+ // (undocumented)
311
+ fallback: string;
312
+ // (undocumented)
313
+ id: string;
314
+ // (undocumented)
315
+ type: 'table';
316
+ }
317
+
318
+ // @public (undocumented)
319
+ export type BuiltinFlowTab = "favourites" | "most-used" | "recent" | "presets";
320
+
321
+ // @public (undocumented)
322
+ export interface ButtonProps {
323
+ // (undocumented)
324
+ "aria-busy"?: boolean;
325
+ // (undocumented)
326
+ "aria-controls"?: string;
327
+ // (undocumented)
328
+ "aria-current"?: "page";
329
+ // (undocumented)
330
+ "aria-describedby"?: string;
331
+ // (undocumented)
332
+ "aria-disabled"?: boolean;
333
+ "aria-expanded"?: boolean;
334
+ "aria-pressed"?: boolean;
335
+ // (undocumented)
336
+ "aria-selected"?: boolean;
337
+ // (undocumented)
338
+ "data-action"?: string;
339
+ // (undocumented)
340
+ children?: ReactNode;
341
+ // (undocumented)
342
+ disabled?: boolean;
343
+ // (undocumented)
344
+ id?: string;
345
+ // (undocumented)
346
+ label?: string;
347
+ // (undocumented)
348
+ onPress?(): void;
349
+ // (undocumented)
350
+ role?: "tab";
351
+ // (undocumented)
352
+ tabIndex?: number;
353
+ }
354
+
355
+ // @public (undocumented)
356
+ export interface CanonicalRequest {
357
+ // (undocumented)
358
+ body: string;
359
+ // (undocumented)
360
+ digest: string;
361
+ // (undocumented)
362
+ headers: {
363
+ [k: string]: string;
364
+ };
365
+ // (undocumented)
366
+ method: 'POST' | 'PUT' | 'PATCH' | 'GET';
367
+ // (undocumented)
368
+ path: string;
369
+ }
370
+
371
+ // @public (undocumented)
372
+ export function canTransition(from: PlanState, to: PlanState): boolean;
373
+
374
+ // @public (undocumented)
375
+ export const CAPABILITIES: readonly ["plans", "flows", "widgets", "step-up", "scheduled", "form-fill", "plan-recovery", "plan-leave", "plan-keep", "reply-stop"];
376
+
377
+ // @public (undocumented)
378
+ export type Capability = (typeof CAPABILITIES)[number];
379
+
380
+ // @public
381
+ export type CardAnswer = {
382
+ kind: 'action';
383
+ clientReplyId: string;
384
+ blockId: string;
385
+ actionId: string;
386
+ } | {
387
+ kind: 'form';
388
+ clientReplyId: string;
389
+ blockId: string;
390
+ values?: {};
391
+ };
392
+
393
+ // @public
394
+ export function cardReplyId(conversationId: string, messageId: string, blockId: string, answer: BlockAnswer): string;
395
+
396
+ // @public
397
+ export function catalogueFor(locale?: string): {
398
+ catalogue: "en" | "zh";
399
+ lang: string;
400
+ };
401
+
402
+ // @public (undocumented)
403
+ export interface CheckboxProps {
404
+ // (undocumented)
405
+ checked: boolean;
406
+ // (undocumented)
407
+ describedBy?: string;
408
+ // (undocumented)
409
+ disabled?: boolean;
410
+ // (undocumented)
411
+ invalid?: boolean;
412
+ // (undocumented)
413
+ label: string;
414
+ // (undocumented)
415
+ onChange(checked: boolean): void;
416
+ }
417
+
418
+ // @public (undocumented)
419
+ export interface ClientConfig {
420
+ // (undocumented)
421
+ accountId: string;
422
+ // (undocumented)
423
+ beforeSend?: (reply: Reply) => MaybePromise<Reply | false | void>;
424
+ // (undocumented)
425
+ contributions?: readonly ComposerContribution[];
426
+ // (undocumented)
427
+ conversationId: string;
428
+ // (undocumented)
429
+ feedback?: FeedbackPort;
430
+ // (undocumented)
431
+ flowOperations?: readonly string[];
432
+ // (undocumented)
433
+ flowSource?: FlowSource;
434
+ // (undocumented)
435
+ formSession?: FormSession;
436
+ // (undocumented)
437
+ plans?: RunnerPorts & {
438
+ resume?(id: string): Promise<PlanRecord>;
439
+ retryUndo?(id: string): Promise<PlanRecord>;
440
+ };
441
+ // (undocumented)
442
+ platform: PlatformPorts;
443
+ // (undocumented)
444
+ reads?: ReadPorts;
445
+ // (undocumented)
446
+ storage?: StoragePort;
447
+ // (undocumented)
448
+ tabs?: readonly FlowTab[];
449
+ // (undocumented)
450
+ transport: TransportPort;
451
+ // (undocumented)
452
+ versions?: MessageVersionPort;
453
+ }
454
+
455
+ // @public (undocumented)
456
+ export interface ClientSnapshot {
457
+ // (undocumented)
458
+ announcement: number;
459
+ // (undocumented)
460
+ capabilities: readonly Capability[];
461
+ confirmationRefusal?: {
462
+ token: string;
463
+ problemId: string;
464
+ };
465
+ // (undocumented)
466
+ conversation: Conversation | null;
467
+ // (undocumented)
468
+ conversationId: string;
469
+ // (undocumented)
470
+ conversationUnavailable: boolean;
471
+ // (undocumented)
472
+ draft: string;
473
+ // (undocumented)
474
+ flows: Partial<Record<string, FlowSummary[]>>;
475
+ // (undocumented)
476
+ flowTab: string;
477
+ // (undocumented)
478
+ flowTabs: readonly FlowTab[];
479
+ // (undocumented)
480
+ hints: readonly string[];
481
+ // (undocumented)
482
+ intentAlert: IntentAlert | null;
483
+ intentNotice: IntentNotice | null;
484
+ intentOverlays: Readonly<Record<string, IntentOverlay>>;
485
+ // (undocumented)
486
+ observerFailures: number;
487
+ // (undocumented)
488
+ pending: readonly PendingSend[];
489
+ // (undocumented)
490
+ plan: PlanRecord | null;
491
+ planReadOnly?: boolean;
492
+ // (undocumented)
493
+ problem: Problem | null;
494
+ // (undocumented)
495
+ protocol: string | null;
496
+ // (undocumented)
497
+ replyState: ReplyState;
498
+ restored: readonly RestoredMessage[];
499
+ // (undocumented)
500
+ sending: boolean;
501
+ // (undocumented)
502
+ status: string;
503
+ streamUnavailable: boolean;
504
+ toolSteps: readonly ToolStep[];
505
+ withdrawing: readonly string[];
506
+ }
507
+
508
+ // @public (undocumented)
509
+ export interface ComposerContribution {
510
+ // (undocumented)
511
+ evaluate(context: {
512
+ draft: string;
513
+ conversationId: string;
514
+ }): MaybePromise<{
515
+ hold?: string;
516
+ hint?: string;
517
+ payload?: unknown;
518
+ }>;
519
+ // (undocumented)
520
+ id: string;
521
+ }
522
+
523
+ // @public (undocumented)
524
+ export type ConfirmationCatalogue = Readonly<Record<ConfirmationMessageKey, string>>;
525
+
526
+ // @public (undocumented)
527
+ export interface ConfirmationItem {
528
+ // (undocumented)
529
+ after?: string;
530
+ // (undocumented)
531
+ before?: string;
532
+ // (undocumented)
533
+ label: string;
534
+ // (undocumented)
535
+ note?: string;
536
+ }
537
+
538
+ // @public (undocumented)
539
+ 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";
540
+
541
+ // @public
542
+ export function confirmationOf(plan: PlanRecord | null | undefined, conversationId: string | undefined): ConfirmationRecord | undefined;
543
+
544
+ // @public
545
+ export interface ConfirmationRecord {
546
+ // (undocumented)
547
+ actionLabel?: string;
548
+ // (undocumented)
549
+ conversationId: string;
550
+ // (undocumented)
551
+ expiresAt: string;
552
+ // (undocumented)
553
+ heading: string;
554
+ // (undocumented)
555
+ irreversible: boolean;
556
+ items: ConfirmationItem[];
557
+ // (undocumented)
558
+ planId: string;
559
+ // (undocumented)
560
+ revision: number;
561
+ // (undocumented)
562
+ schedule?: ConfirmationSchedule;
563
+ // (undocumented)
564
+ token: string;
565
+ // (undocumented)
566
+ undo: string;
567
+ // (undocumented)
568
+ verificationCount: number;
569
+ }
570
+
571
+ // @public (undocumented)
572
+ export interface ConfirmationSchedule {
573
+ // (undocumented)
574
+ end: string | null;
575
+ // (undocumented)
576
+ endText: string;
577
+ // (undocumented)
578
+ start: string | null;
579
+ // (undocumented)
580
+ startText: string;
581
+ }
582
+
583
+ // @public (undocumented)
584
+ export function ConfirmSheet(input: {
585
+ title: string;
586
+ body: string;
587
+ busy?: boolean;
588
+ onProceed(): void;
589
+ onCancel(): void;
590
+ }): react.JSX.Element | null;
591
+
592
+ // @public (undocumented)
593
+ export type Conversation = {
594
+ [k: string]: unknown;
595
+ } & {
596
+ protocol: string;
597
+ id: string;
598
+ title: string;
599
+ messages: Message[];
600
+ replyOverdueAt?: number | null;
601
+ replyStatus?: 'expected' | 'unavailable' | 'failed' | 'complete';
602
+ mode?: 'form-fill';
603
+ subject?: FormSubject;
604
+ parentConversationId?: string;
605
+ field?: string;
606
+ };
607
+
608
+ // @public (undocumented)
609
+ export function ConversationRail(input: ConversationRailProps): react.JSX.Element;
610
+
611
+ // @public (undocumented)
612
+ export interface ConversationRailProps {
613
+ // (undocumented)
614
+ conversations: readonly ConversationSummary[];
615
+ onChoose?(): void;
616
+ // (undocumented)
617
+ source?: ConversationSource;
618
+ }
619
+
620
+ // @public (undocumented)
621
+ export class ConversationReadError extends Error {
622
+ constructor(conversationId: string, status: number, problem?: unknown);
623
+ // (undocumented)
624
+ readonly conversationId: string;
625
+ readonly problem?: Problem;
626
+ // (undocumented)
627
+ readonly status: number;
628
+ }
629
+
630
+ // @public (undocumented)
631
+ export type ConversationReadResult = {
632
+ kind: "loaded";
633
+ conversationId: string;
634
+ conversation: Conversation;
635
+ } | {
636
+ kind: "missing";
637
+ conversationId: string;
638
+ status: 404 | 410;
639
+ } | {
640
+ kind: "unavailable" | "superseded";
641
+ conversationId: string;
642
+ };
643
+
644
+ // @public (undocumented)
645
+ export interface ConversationSource {
646
+ // (undocumented)
647
+ create(input: CreateConversation): MaybePromise<Conversation>;
648
+ // (undocumented)
649
+ list(subjectKey?: string): MaybePromise<ConversationSummary[]>;
650
+ }
651
+
652
+ // @public (undocumented)
653
+ export interface ConversationSummary {
654
+ // (undocumented)
655
+ field?: string;
656
+ // (undocumented)
657
+ id: string;
658
+ // (undocumented)
659
+ mode?: "form-fill";
660
+ // (undocumented)
661
+ parentConversationId?: string;
662
+ // (undocumented)
663
+ subject?: FormSubject;
664
+ // (undocumented)
665
+ title: string;
666
+ }
667
+
668
+ // @public (undocumented)
669
+ export type CreateConversation = {
670
+ [k: string]: unknown;
671
+ } & {
672
+ protocol: string;
673
+ title: string;
674
+ mode?: 'form-fill';
675
+ subject?: FormSubject;
676
+ parentConversationId?: string;
677
+ field?: string;
678
+ clientCreationId?: string;
679
+ };
680
+
681
+ // @public (undocumented)
682
+ export function createFormatter(locale?: string): FormatMessage;
683
+
684
+ // @public (undocumented)
685
+ export function createMemoryStorage(asynchronous?: boolean): StoragePort;
686
+
687
+ // @public (undocumented)
688
+ export function createPlanRunner(ports: RunnerPorts): PlanRunner;
689
+
690
+ // @public (undocumented)
691
+ export function createWaypointClient(config: ClientConfig): WaypointClient;
692
+
693
+ // @public (undocumented)
694
+ export const darkTheme: ResolvedTheme;
695
+
696
+ // @public (undocumented)
697
+ export interface DecisionVersions {
698
+ // (undocumented)
699
+ decisionResolution: number;
700
+ // (undocumented)
701
+ evidence: number;
702
+ // (undocumented)
703
+ winner: number;
704
+ }
705
+
706
+ // @public (undocumented)
707
+ export const DEFAULT_FLOW_TABS: readonly BuiltinFlowTab[];
708
+
709
+ // @public (undocumented)
710
+ export function defaultProblemText(problem: Problem, format: FormatMessage): {
711
+ text: string;
712
+ action?: ReactNode;
713
+ };
714
+
715
+ // @public (undocumented)
716
+ export interface DrawerProps {
717
+ // (undocumented)
718
+ children?: ReactNode;
719
+ closeLabel?: string;
720
+ focusInto?(element: HTMLElement): void;
721
+ // (undocumented)
722
+ label: string;
723
+ // (undocumented)
724
+ onClose(): void;
725
+ // (undocumented)
726
+ open: boolean;
727
+ restoreFocus?(element: HTMLElement): void;
728
+ }
729
+
730
+ // @public (undocumented)
731
+ export const english: {
732
+ readonly "form.valid": "Valid";
733
+ readonly "form.invalid": "Invalid";
734
+ readonly "form.title": "Fill this form";
735
+ readonly "form.closeHint": "Closing discards this fill; the reply stays in the conversation.";
736
+ readonly "form.generate": "Generate draft";
737
+ readonly "form.references": "Reference links";
738
+ readonly "form.attachment": "Private attachment";
739
+ readonly "form.regenerate": "Regenerate {field}";
740
+ readonly "form.replace": "Replace your edit?";
741
+ readonly "form.marker": "Form";
742
+ readonly "form.filter": "Filter by topic";
743
+ readonly "form.all": "All topics";
744
+ readonly "form.threads": "Sub-threads";
745
+ readonly "form.return": "Back to form or record";
746
+ readonly "form.unlinked": "Saved, not linked";
747
+ readonly "form.toolsLoading": "Draft tools are still loading.";
748
+ readonly "form.toolsFailed": "Draft tools couldn't load. Retry first.";
749
+ readonly "form.fixFirst": "Fix the highlighted fields first.";
750
+ readonly "form.number": "Enter a number.";
751
+ readonly "form.editInForm": "Edit this value in the form.";
752
+ readonly "form.imagesNow": "Images can't be attached right now.";
753
+ readonly "form.imagesHere": "Images can't be attached here.";
754
+ readonly "chat.title": "Conversation";
755
+ readonly "chat.empty": "Start a conversation";
756
+ readonly "chat.message": "Message";
757
+ readonly "chat.send": "Send";
758
+ readonly "chat.sending": "Sending";
759
+ readonly "chat.pendingSending": "Sending…";
760
+ readonly "chat.pendingFailed": "Not sent";
761
+ readonly "chat.planUnavailable": "The plan's steps could not be loaded.";
762
+ readonly "chat.arrival": "New reply";
763
+ readonly "chat.arrivalExcerpt": "New reply: {excerpt}";
764
+ readonly "chat.arrivalFailed": "A reply could not be completed.";
765
+ readonly "chat.arrivalMany": "{count} new replies. Latest: {excerpt}";
766
+ readonly "chat.arrivalManyPlain": "{count} new replies";
767
+ readonly "chat.arrivalManyFailed": "{count} new replies; {failed} could not be completed.";
768
+ readonly "chat.arrivalAllFailed": "{count} replies could not be completed.";
769
+ readonly "chat.transcript": "Messages";
770
+ readonly "chat.outlineItem": "{role}, message {position}: {excerpt}";
771
+ readonly "chat.outlineItemPlain": "{role}, message {position}";
772
+ readonly "chat.roleUser": "You";
773
+ readonly "chat.roleAssistant": "Assistant";
774
+ readonly "chat.messageLoading": "Loading message…";
775
+ readonly "chat.messageUnavailable": "This message cannot be shown right now.";
776
+ readonly "chat.changesTo": "changes to";
777
+ readonly "chat.stepName": "Change {index}";
778
+ readonly "chat.stepNamed": "{name} {index}";
779
+ readonly "chat.fieldName": "Value {index}";
780
+ readonly "chat.scrollRegion": "Scrollable content";
781
+ readonly "chat.conversationReadFailed": "This conversation could not be loaded.";
782
+ readonly "chat.conversationsFailed": "Your conversations could not be loaded.";
783
+ readonly "chat.messagesUnavailable": "Some messages cannot be shown right now.";
784
+ readonly unsupportedContent: "Some content cannot be shown here. Contact the site administrator.";
785
+ readonly "chat.failure": "The request could not be completed.";
786
+ readonly "chat.update": "This chat needs an update.";
787
+ readonly "chat.conversationUnavailable": "This conversation is unavailable. Reload to continue; this does not stop a server turn.";
788
+ readonly "chat.reload": "Reload conversation";
789
+ readonly "chat.retry": "Retry";
790
+ readonly "chat.withdraw": "Withdraw";
791
+ readonly "chat.restored": "Withdrawn messages";
792
+ readonly "chat.restoredEdit": "Edit";
793
+ readonly "chat.restoredDiscard": "Discard";
794
+ readonly "chat.dismiss": "Dismiss";
795
+ readonly "chat.latest": "Back to latest";
796
+ readonly "chat.latestNew": "{count, plural, one {Back to latest, # new reply} other {Back to latest, # new replies}}";
797
+ readonly "chat.outline": "Message outline";
798
+ readonly "chat.outlineFilter": "Filter messages";
799
+ readonly "chat.outlineMatches": "{count, plural, =0 {No messages match} one {# message matches} other {# messages match}}";
800
+ readonly "chat.outlineSearching": "Searching…";
801
+ readonly "chat.rail": "Conversations";
802
+ readonly "chat.close": "Close";
803
+ readonly "chat.quota": "Usage";
804
+ readonly "chat.actions": "Actions";
805
+ readonly "chat.panels": "Extra panels";
806
+ readonly "chat.submit": "Submit";
807
+ readonly "chat.confirm": "Confirm";
808
+ readonly "chat.cancel": "Cancel";
809
+ readonly "chat.stop": "Stop";
810
+ readonly "chat.planChanged": "The plan changed; confirm again.";
811
+ readonly "chat.stopped": "The plan was stopped. Start a new plan to continue.";
812
+ readonly "chat.scheduleUnavailable": "Scheduling is unavailable in this chat.";
813
+ readonly "chat.start": "Start time";
814
+ readonly "chat.end": "End time";
815
+ readonly "chat.view": "View change";
816
+ readonly "chat.irreversible": "Cannot be undone";
817
+ readonly "chat.stepUp": "{count, plural, one {# verification prompt} other {# verification prompts}}";
818
+ readonly "chat.stepUpLabel": "Verification code";
819
+ readonly "chat.plan": "Plan";
820
+ readonly "chat.favourite": "Favourite";
821
+ readonly "chat.run": "Run";
822
+ readonly "chat.flows": "Saved requests";
823
+ readonly "flow.favourites": "Favourites";
824
+ readonly "flow.most-used": "Most used";
825
+ readonly "flow.recent": "Recent";
826
+ readonly "flow.presets": "Presets";
827
+ readonly "reply.writing": "Writing";
828
+ readonly "reply.stopped": "Stopped";
829
+ readonly "chat.sources": "Sources ({count})";
830
+ readonly "chat.source": "Source {index}: {title}";
831
+ readonly "reply.unavailable": "Reply unavailable";
832
+ readonly "reply.failed": "Reply failed";
833
+ readonly "reply.overdue": "Reply overdue";
834
+ readonly "chat.loading": "Loading";
835
+ readonly "chat.before": "Before";
836
+ readonly "chat.after": "After";
837
+ readonly "chat.undo": "Undo";
838
+ readonly "chat.verify": "Verification required";
839
+ readonly "chat.startupLoading": "Loading this conversation…";
840
+ };
841
+
842
+ // @public (undocumented)
843
+ export interface ExecutionAcceptance {
844
+ // (undocumented)
845
+ executionId: string;
846
+ // (undocumented)
847
+ fence: number;
848
+ // (undocumented)
849
+ planId: string;
850
+ }
851
+
852
+ // @public (undocumented)
853
+ export interface ExtensionBlock {
854
+ // (undocumented)
855
+ answer?: CardAnswer;
856
+ answered?: boolean;
857
+ // (undocumented)
858
+ body: unknown;
859
+ // (undocumented)
860
+ fallback: string;
861
+ // (undocumented)
862
+ id: string;
863
+ // (undocumented)
864
+ type: string;
865
+ }
866
+
867
+ // @public
868
+ export interface FeedbackInput extends MessageVersionInput {
869
+ rating: "positive" | "negative";
870
+ }
871
+
872
+ // @public
873
+ export interface FeedbackPort {
874
+ send(input: FeedbackInput): MaybePromise<void>;
875
+ }
876
+
877
+ // @public (undocumented)
878
+ export function FieldAdornment(input: FieldAdornmentProps): react.JSX.Element;
879
+
880
+ // @public (undocumented)
881
+ export interface FieldAdornmentProps {
882
+ // (undocumented)
883
+ children: ReactNode;
884
+ // (undocumented)
885
+ disabled?: boolean;
886
+ // (undocumented)
887
+ label: string;
888
+ // (undocumented)
889
+ onRegenerate(): void;
890
+ reason?: string;
891
+ // (undocumented)
892
+ slots?: Slots;
893
+ wrapper?: (element: HTMLDivElement | null) => void;
894
+ }
895
+
896
+ // @public (undocumented)
897
+ export interface FinalHistory {
898
+ contradictedAfterSeal?: string[];
899
+ // (undocumented)
900
+ keptFact: KeptFact;
901
+ // (undocumented)
902
+ relation?: 'keptElsewhere' | 'leaveCompletedByKeep' | 'leaveCoveredByKeep';
903
+ // (undocumented)
904
+ requestedTargetApplied?: boolean;
905
+ // (undocumented)
906
+ winner: IntentWinner;
907
+ }
908
+
909
+ // @public (undocumented)
910
+ export type Flow = {
911
+ [k: string]: unknown;
912
+ } & {
913
+ format: '1.0';
914
+ id: string;
915
+ title: string;
916
+ kind: 'structured' | 'prompt';
917
+ parameters: FlowParameter[];
918
+ steps?: {
919
+ operation: string;
920
+ arguments: {};
921
+ }[];
922
+ tags: string[];
923
+ body: string;
924
+ };
925
+
926
+ // @public (undocumented)
927
+ export interface FlowParameter {
928
+ // (undocumented)
929
+ default?: unknown;
930
+ // (undocumented)
931
+ label: string;
932
+ // (undocumented)
933
+ name: string;
934
+ // (undocumented)
935
+ required: boolean;
936
+ // (undocumented)
937
+ type: 'string' | 'number' | 'boolean';
938
+ }
939
+
940
+ // @public (undocumented)
941
+ export interface FlowSource {
942
+ // (undocumented)
943
+ list(tab: FlowTab): MaybePromise<FlowSummary[]>;
944
+ // (undocumented)
945
+ load?(id: string): MaybePromise<Flow>;
946
+ // (undocumented)
947
+ run(id: string, values: Record<string, unknown>, document?: Flow): MaybePromise<{
948
+ conversationId: string;
949
+ plan?: PlanRecord;
950
+ }>;
951
+ // (undocumented)
952
+ setFavourite(id: string, favourite: boolean): MaybePromise<void>;
953
+ }
954
+
955
+ // @public (undocumented)
956
+ export interface FlowSummary {
957
+ // (undocumented)
958
+ favourite?: boolean;
959
+ // (undocumented)
960
+ id: string;
961
+ // (undocumented)
962
+ lastRunAt?: number;
963
+ // (undocumented)
964
+ runCount?: number;
965
+ // (undocumented)
966
+ title: string;
967
+ }
968
+
969
+ // @public (undocumented)
970
+ export type FlowTab = BuiltinFlowTab | {
971
+ id: string;
972
+ labelKey: string;
973
+ };
974
+
975
+ // @public (undocumented)
976
+ export function flowTabId(tab: FlowTab): string;
977
+
978
+ // @public
979
+ export const FORM_SESSION_UNAVAILABLE: {
980
+ readonly code: "retryable";
981
+ readonly id: "form-session-load";
982
+ };
983
+
984
+ // @public (undocumented)
985
+ export type FormatMessage = (key: MessageKey, values?: MessageValues) => string;
986
+
987
+ // @public (undocumented)
988
+ export type FormCatalogue = Readonly<Record<FormMessageKey, string>>;
989
+
990
+ // @public (undocumented)
991
+ export interface FormDraft {
992
+ // (undocumented)
993
+ edited: boolean;
994
+ // (undocumented)
995
+ label: string;
996
+ localInvalid?: true;
997
+ // (undocumented)
998
+ localText?: string;
999
+ // (undocumented)
1000
+ replacement?: {
1001
+ value: unknown;
1002
+ validation: FormValidation;
1003
+ revision: number;
1004
+ fill?: string;
1005
+ };
1006
+ // (undocumented)
1007
+ revision: number;
1008
+ // (undocumented)
1009
+ validation?: FormValidation;
1010
+ // (undocumented)
1011
+ value: unknown;
1012
+ }
1013
+
1014
+ // @public (undocumented)
1015
+ export interface FormField {
1016
+ // (undocumented)
1017
+ label: string;
1018
+ // (undocumented)
1019
+ name: string;
1020
+ // (undocumented)
1021
+ tier: "low" | "sensitive" | "human-only";
1022
+ // (undocumented)
1023
+ value: unknown;
1024
+ }
1025
+
1026
+ // @public (undocumented)
1027
+ export interface FormFillField {
1028
+ // (undocumented)
1029
+ label: string;
1030
+ // (undocumented)
1031
+ name: string;
1032
+ // (undocumented)
1033
+ tier: 'low';
1034
+ // (undocumented)
1035
+ value: unknown;
1036
+ }
1037
+
1038
+ // @public (undocumented)
1039
+ export function FormFillFields(input: FormFillFieldsProps): react.JSX.Element;
1040
+
1041
+ // @public (undocumented)
1042
+ export interface FormFillFieldsProps {
1043
+ // (undocumented)
1044
+ onRegenerate(field: string): void;
1045
+ // (undocumented)
1046
+ renderField?: (props: {
1047
+ name: string;
1048
+ label: string;
1049
+ value: unknown;
1050
+ onChange(value: unknown): void;
1051
+ invalid: boolean;
1052
+ describedBy: string;
1053
+ }) => ReactNode;
1054
+ // (undocumented)
1055
+ session: FormSession;
1056
+ // (undocumented)
1057
+ slots?: Slots;
1058
+ }
1059
+
1060
+ // @public (undocumented)
1061
+ export function FormFillPopup(input: FormFillPopupProps): react.JSX.Element;
1062
+
1063
+ // @public (undocumented)
1064
+ export interface FormFillPopupProps {
1065
+ // (undocumented)
1066
+ attachments?: PrivateAttachmentPort;
1067
+ // (undocumented)
1068
+ field?: string;
1069
+ // (undocumented)
1070
+ onClose(): void;
1071
+ // (undocumented)
1072
+ open: boolean;
1073
+ // (undocumented)
1074
+ session: FormSession;
1075
+ // (undocumented)
1076
+ source?: ConversationSource;
1077
+ }
1078
+
1079
+ // @public (undocumented)
1080
+ export interface FormFillRequest {
1081
+ // (undocumented)
1082
+ attachments: string[];
1083
+ // (undocumented)
1084
+ field?: string;
1085
+ // (undocumented)
1086
+ fields: [FormFillField, ...FormFillField[]];
1087
+ // (undocumented)
1088
+ references: string[];
1089
+ // (undocumented)
1090
+ requestId: string;
1091
+ // (undocumented)
1092
+ text: string;
1093
+ }
1094
+
1095
+ // @public (undocumented)
1096
+ export interface FormFillValue {
1097
+ // (undocumented)
1098
+ label?: string;
1099
+ // (undocumented)
1100
+ validation: FormValidation;
1101
+ // (undocumented)
1102
+ value: unknown;
1103
+ }
1104
+
1105
+ // @public (undocumented)
1106
+ export interface FormMaterial {
1107
+ // (undocumented)
1108
+ attachments?: string[];
1109
+ // (undocumented)
1110
+ field?: string;
1111
+ // (undocumented)
1112
+ references?: string[];
1113
+ // (undocumented)
1114
+ text: string;
1115
+ }
1116
+
1117
+ // @public (undocumented)
1118
+ 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";
1119
+
1120
+ // @public (undocumented)
1121
+ export interface FormSession {
1122
+ // (undocumented)
1123
+ begin(material: FormMaterial): FormFillRequest;
1124
+ // (undocumented)
1125
+ cancel(): void;
1126
+ // (undocumented)
1127
+ cancelReplacement(field: string): void;
1128
+ // (undocumented)
1129
+ dispose(): void;
1130
+ // (undocumented)
1131
+ edit(field: string, value: unknown): void;
1132
+ failRequest(requestId: string): void;
1133
+ // (undocumented)
1134
+ getSnapshot(): FormSnapshot;
1135
+ markEdited(field: string, text: string): void;
1136
+ // (undocumented)
1137
+ receive(body: unknown): boolean;
1138
+ // (undocumented)
1139
+ replace(field: string, revision: number): boolean;
1140
+ revert(fill: string): boolean;
1141
+ // (undocumented)
1142
+ subscribe(listener: () => void): () => void;
1143
+ }
1144
+
1145
+ // @public (undocumented)
1146
+ export interface FormSessionConfig {
1147
+ // (undocumented)
1148
+ fields: readonly FormField[];
1149
+ // (undocumented)
1150
+ ids(): string;
1151
+ }
1152
+
1153
+ // @public (undocumented)
1154
+ export interface FormSnapshot {
1155
+ // (undocumented)
1156
+ fields: Readonly<Record<string, FormDraft>>;
1157
+ fills?: readonly {
1158
+ id: string;
1159
+ fields: readonly string[];
1160
+ }[];
1161
+ // (undocumented)
1162
+ pending: boolean;
1163
+ }
1164
+
1165
+ // @public (undocumented)
1166
+ export type FormSubject = {
1167
+ [k: string]: unknown;
1168
+ } & {
1169
+ key: string;
1170
+ resource: string;
1171
+ label: string;
1172
+ route: string;
1173
+ state: 'pending' | 'bound' | 'unlinked';
1174
+ record?: string;
1175
+ };
1176
+
1177
+ // @public (undocumented)
1178
+ export interface FormValidation {
1179
+ // (undocumented)
1180
+ guidance?: string;
1181
+ // (undocumented)
1182
+ messages: string[];
1183
+ // (undocumented)
1184
+ status: 'valid' | 'invalid';
1185
+ }
1186
+
1187
+ // @public (undocumented)
1188
+ export type Frame = FrameMessageStart | FrameTextDelta | FrameBlock | FramePlanDraft | FramePlanFinal | FramePlanStep | FrameToolCall | FramePlanningRead | FrameMessageEnd | FrameStale | FrameProblem;
1189
+
1190
+ // @public (undocumented)
1191
+ export interface FrameBlock {
1192
+ // (undocumented)
1193
+ block: Block;
1194
+ // (undocumented)
1195
+ messageId: string;
1196
+ // (undocumented)
1197
+ protocol: string;
1198
+ // (undocumented)
1199
+ sequence: number;
1200
+ // (undocumented)
1201
+ type: 'block';
1202
+ }
1203
+
1204
+ // @public (undocumented)
1205
+ export interface FrameMessageEnd {
1206
+ // (undocumented)
1207
+ messageId: string;
1208
+ // (undocumented)
1209
+ protocol: string;
1210
+ // (undocumented)
1211
+ sequence: number;
1212
+ // (undocumented)
1213
+ status: 'completed' | 'failed' | 'unavailable' | 'stopped';
1214
+ // (undocumented)
1215
+ type: 'message.end';
1216
+ }
1217
+
1218
+ // @public (undocumented)
1219
+ export interface FrameMessageStart {
1220
+ // (undocumented)
1221
+ messageId: string;
1222
+ // (undocumented)
1223
+ protocol: string;
1224
+ // (undocumented)
1225
+ role: 'user' | 'assistant';
1226
+ // (undocumented)
1227
+ sequence: number;
1228
+ // (undocumented)
1229
+ type: 'message.start';
1230
+ }
1231
+
1232
+ // @public (undocumented)
1233
+ export interface FramePlanDraft {
1234
+ // (undocumented)
1235
+ messageId: string;
1236
+ // (undocumented)
1237
+ plan: ImmediateDraft;
1238
+ // (undocumented)
1239
+ protocol: string;
1240
+ // (undocumented)
1241
+ sequence: number;
1242
+ // (undocumented)
1243
+ type: 'plan.draft';
1244
+ }
1245
+
1246
+ // @public (undocumented)
1247
+ export interface FramePlanFinal {
1248
+ // (undocumented)
1249
+ messageId: string;
1250
+ // (undocumented)
1251
+ plan: ImmediatePlan | TimedPlan;
1252
+ // (undocumented)
1253
+ protocol: string;
1254
+ // (undocumented)
1255
+ sequence: number;
1256
+ // (undocumented)
1257
+ type: 'plan.final';
1258
+ }
1259
+
1260
+ // @public (undocumented)
1261
+ export interface FramePlanningRead {
1262
+ // (undocumented)
1263
+ planId: string;
1264
+ // (undocumented)
1265
+ protocol: string;
1266
+ // (undocumented)
1267
+ sequence: number;
1268
+ // (undocumented)
1269
+ stepId: string;
1270
+ // (undocumented)
1271
+ template: ReadTemplate;
1272
+ // (undocumented)
1273
+ type: 'planning-read';
1274
+ }
1275
+
1276
+ // @public (undocumented)
1277
+ export interface FramePlanStep {
1278
+ // (undocumented)
1279
+ outcome: Outcome;
1280
+ // (undocumented)
1281
+ planId: string;
1282
+ // (undocumented)
1283
+ protocol: string;
1284
+ // (undocumented)
1285
+ sequence: number;
1286
+ // (undocumented)
1287
+ type: 'plan.step';
1288
+ }
1289
+
1290
+ // @public (undocumented)
1291
+ export interface FrameProblem {
1292
+ // (undocumented)
1293
+ problem: Problem;
1294
+ // (undocumented)
1295
+ protocol: string;
1296
+ // (undocumented)
1297
+ sequence: number;
1298
+ // (undocumented)
1299
+ type: 'problem';
1300
+ }
1301
+
1302
+ // @public (undocumented)
1303
+ export interface FrameStale {
1304
+ // (undocumented)
1305
+ protocol: string;
1306
+ // (undocumented)
1307
+ reads: ('conversation' | 'conversations' | 'plans' | 'flows')[];
1308
+ // (undocumented)
1309
+ sequence: number;
1310
+ // (undocumented)
1311
+ type: 'stale';
1312
+ }
1313
+
1314
+ // @public (undocumented)
1315
+ export interface FrameTextDelta {
1316
+ // (undocumented)
1317
+ messageId: string;
1318
+ // (undocumented)
1319
+ protocol: string;
1320
+ // (undocumented)
1321
+ sequence: number;
1322
+ // (undocumented)
1323
+ text: string;
1324
+ // (undocumented)
1325
+ type: 'text.delta';
1326
+ }
1327
+
1328
+ // @public (undocumented)
1329
+ export interface FrameToolCall {
1330
+ // (undocumented)
1331
+ call: ToolCall;
1332
+ // (undocumented)
1333
+ protocol: string;
1334
+ // (undocumented)
1335
+ sequence: number;
1336
+ // (undocumented)
1337
+ type: 'tool.call';
1338
+ }
1339
+
1340
+ // @public (undocumented)
1341
+ export interface ImmediateDraft {
1342
+ // (undocumented)
1343
+ id: string;
1344
+ // (undocumented)
1345
+ kind: 'immediate';
1346
+ // (undocumented)
1347
+ stage: 'draft';
1348
+ // (undocumented)
1349
+ steps: (Step & {
1350
+ [k: string]: unknown;
1351
+ })[];
1352
+ }
1353
+
1354
+ // @public (undocumented)
1355
+ export interface ImmediatePlan {
1356
+ // (undocumented)
1357
+ digest: string;
1358
+ // (undocumented)
1359
+ id: string;
1360
+ // (undocumented)
1361
+ kind: 'immediate';
1362
+ // (undocumented)
1363
+ stage: 'final';
1364
+ // (undocumented)
1365
+ steps: (Step & {
1366
+ [k: string]: unknown;
1367
+ })[];
1368
+ // (undocumented)
1369
+ stepUpCount: number;
1370
+ }
1371
+
1372
+ // @public (undocumented)
1373
+ export interface InputProps {
1374
+ // (undocumented)
1375
+ describedBy?: string;
1376
+ // (undocumented)
1377
+ disabled?: boolean;
1378
+ // (undocumented)
1379
+ invalid?: boolean;
1380
+ // (undocumented)
1381
+ label: string;
1382
+ // (undocumented)
1383
+ onChange(value: string): void;
1384
+ required?: boolean;
1385
+ // (undocumented)
1386
+ type?: string;
1387
+ // (undocumented)
1388
+ value: string;
1389
+ }
1390
+
1391
+ // @public (undocumented)
1392
+ export type IntentAlert = {
1393
+ serial: number;
1394
+ action: "checkStatus" | "retry" | "signIn" | "hostGuidance" | "wait";
1395
+ } | {
1396
+ serial: number;
1397
+ restoreFocus: true;
1398
+ };
1399
+
1400
+ // @public (undocumented)
1401
+ export type IntentCause = 'user' | 'connection-lost' | 'renewal-refused' | 'step-failed' | 'step-up-failed' | 'identity-lost' | 'attribution-missing' | 'plan-changed' | 'adapter-configuration';
1402
+
1403
+ // @public (undocumented)
1404
+ export type IntentFailure = "offline" | "sign-in" | "forbidden" | "rate-limited" | "timeout" | "connection-lost";
1405
+
1406
+ // @public (undocumented)
1407
+ export type IntentKind = 'stop' | 'cancel-initial' | 'cancel-review' | 'leave' | 'keep';
1408
+
1409
+ // @public (undocumented)
1410
+ export type IntentNotice = Omit<PlanIntentReply, "slotVersion"> & {
1411
+ resolvedSlotVersion: number;
1412
+ };
1413
+
1414
+ // @public
1415
+ export interface IntentOverlay {
1416
+ // (undocumented)
1417
+ delivery: "sending" | "uncertain" | "not-sent";
1418
+ // (undocumented)
1419
+ kind: IntentKind;
1420
+ // (undocumented)
1421
+ lastProblem?: {
1422
+ key: string;
1423
+ cause: IntentFailure;
1424
+ };
1425
+ // (undocumented)
1426
+ ownRun: boolean;
1427
+ // (undocumented)
1428
+ planId: string;
1429
+ // (undocumented)
1430
+ producer: "user" | "automatic";
1431
+ // (undocumented)
1432
+ request: IntentRequest;
1433
+ // (undocumented)
1434
+ retryAt?: number;
1435
+ }
1436
+
1437
+ // @public (undocumented)
1438
+ export interface IntentRequest {
1439
+ // (undocumented)
1440
+ acknowledgment?: LeaveAcknowledgment;
1441
+ // (undocumented)
1442
+ capturedRound: number;
1443
+ // (undocumented)
1444
+ cause: IntentCause;
1445
+ // (undocumented)
1446
+ correlation: string;
1447
+ // (undocumented)
1448
+ expectedSlotVersion: number;
1449
+ // (undocumented)
1450
+ kind: IntentKind;
1451
+ // (undocumented)
1452
+ payload?: string;
1453
+ // (undocumented)
1454
+ planId: string;
1455
+ // (undocumented)
1456
+ review?: 'forward-only' | 'end-retention';
1457
+ // (undocumented)
1458
+ target: IntentTarget;
1459
+ }
1460
+
1461
+ // @public (undocumented)
1462
+ export interface IntentTarget {
1463
+ // (undocumented)
1464
+ id: string;
1465
+ // (undocumented)
1466
+ type: 'generation' | 'review' | 'execution';
1467
+ }
1468
+
1469
+ // @public (undocumented)
1470
+ export interface IntentWinner {
1471
+ // (undocumented)
1472
+ cause: IntentCause;
1473
+ // (undocumented)
1474
+ kind: WinnerKind;
1475
+ }
1476
+
1477
+ // @public (undocumented)
1478
+ export function isSafeUrl(url: string | null | undefined, extraSchemes?: readonly string[]): boolean;
1479
+
1480
+ // @public (undocumented)
1481
+ export interface KeepChangesReview {
1482
+ // (undocumented)
1483
+ acknowledgment: LeaveAcknowledgment;
1484
+ // (undocumented)
1485
+ remaining: number;
1486
+ // (undocumented)
1487
+ review: "forward-only" | "end-retention";
1488
+ }
1489
+
1490
+ // @public (undocumented)
1491
+ export type KeepChangesReviewResult = KeepChangesReview | {
1492
+ disabled: KeepDisabledReason;
1493
+ };
1494
+
1495
+ // @public (undocumented)
1496
+ export type KeepDisabledReason = "loading" | "intentUnavailable" | "capabilityMissing" | "keepNoDecision" | "sealed" | "keepBlockedActive" | "keepBlockedUnknown";
1497
+
1498
+ // @public (undocumented)
1499
+ export interface KeepSheet {
1500
+ // (undocumented)
1501
+ messages: ViewMessage[];
1502
+ // (undocumented)
1503
+ onCancel(): void;
1504
+ // (undocumented)
1505
+ onProceed(): void;
1506
+ // (undocumented)
1507
+ proceed: {
1508
+ available: boolean;
1509
+ reasonKey?: ViewMessage["key"];
1510
+ };
1511
+ }
1512
+
1513
+ // @public
1514
+ export function keepSheet(review: {
1515
+ review: "forward-only" | "end-retention";
1516
+ remaining: number;
1517
+ }, view: PlanView): KeepSheetView;
1518
+
1519
+ // @public (undocumented)
1520
+ export interface KeepSheetView {
1521
+ // (undocumented)
1522
+ messages: ViewMessage[];
1523
+ // (undocumented)
1524
+ proceed: {
1525
+ available: boolean;
1526
+ reasonKey?: MessageKey;
1527
+ };
1528
+ }
1529
+
1530
+ // @public (undocumented)
1531
+ export interface KeptFact {
1532
+ // (undocumented)
1533
+ actorCause: IntentCause;
1534
+ // (undocumented)
1535
+ keepEffect: 'forward-closed' | 'decision-closed' | 'retention-ended' | 'leave-completed';
1536
+ // (undocumented)
1537
+ round: number;
1538
+ }
1539
+
1540
+ // @public (undocumented)
1541
+ export interface LeaveAcknowledgment {
1542
+ // (undocumented)
1543
+ decisionResolutionVersion: number;
1544
+ // (undocumented)
1545
+ evidenceDigest: string;
1546
+ // (undocumented)
1547
+ evidenceVersion: number;
1548
+ // (undocumented)
1549
+ sourceDecisionKey: string;
1550
+ // (undocumented)
1551
+ unknownCount: number;
1552
+ // (undocumented)
1553
+ winnerVersion: number;
1554
+ }
1555
+
1556
+ // @public (undocumented)
1557
+ export const lightTheme: {
1558
+ readonly background: "#ffffff";
1559
+ readonly foreground: "#18212f";
1560
+ readonly muted: "#526071";
1561
+ readonly accent: "#245ad1";
1562
+ readonly border: "#ccd4df";
1563
+ readonly surface: "#f2f5f9";
1564
+ readonly danger: "#b42318";
1565
+ readonly space: "0.75rem";
1566
+ readonly radius: "0.5rem";
1567
+ readonly fontSize: "1rem";
1568
+ readonly fontFamily: "system-ui, sans-serif";
1569
+ readonly shadow: "0 0.25rem 1rem #0002";
1570
+ readonly motion: "120ms";
1571
+ readonly space1: "0.25rem";
1572
+ readonly space2: "0.5rem";
1573
+ readonly fontSizeSm: "0.875rem";
1574
+ readonly fontSizeLg: "1.125rem";
1575
+ readonly motionFast: "80ms";
1576
+ readonly motionSlow: "200ms";
1577
+ readonly easing: "cubic-bezier(0.2, 0, 0, 1)";
1578
+ readonly focusRing: "#245ad1";
1579
+ readonly controlBorder: "#6b7889";
1580
+ readonly success: "#1a7f37";
1581
+ readonly warning: "#8a5c00";
1582
+ };
1583
+
1584
+ // @public
1585
+ export function loadFormSession(config: FormSessionConfig): Promise<FormSession>;
1586
+
1587
+ // @public (undocumented)
1588
+ export interface ManifestEntry {
1589
+ // (undocumented)
1590
+ fields: {
1591
+ [k: string]: 'low' | 'sensitive' | 'human-only';
1592
+ };
1593
+ // (undocumented)
1594
+ filterable: string[];
1595
+ // (undocumented)
1596
+ id: string;
1597
+ // (undocumented)
1598
+ kind: 'read' | 'planning-read' | 'update' | 'create' | 'action' | 'bulk';
1599
+ // (undocumented)
1600
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH';
1601
+ // (undocumented)
1602
+ path: string;
1603
+ // (undocumented)
1604
+ permission: string;
1605
+ // (undocumented)
1606
+ resource: string;
1607
+ // (undocumented)
1608
+ returns: string[];
1609
+ // (undocumented)
1610
+ undo: string;
1611
+ // (undocumented)
1612
+ view: string;
1613
+ }
1614
+
1615
+ // @public (undocumented)
1616
+ export interface MarkdownImagePolicy {
1617
+ // (undocumented)
1618
+ allow?: (url: string) => boolean;
1619
+ // (undocumented)
1620
+ origin?: string;
1621
+ }
1622
+
1623
+ // @public (undocumented)
1624
+ export type MaybePromise<T> = T | Promise<T>;
1625
+
1626
+ // @public (undocumented)
1627
+ export interface Message {
1628
+ // (undocumented)
1629
+ blocks: Block[];
1630
+ // (undocumented)
1631
+ clientMessageId?: string;
1632
+ // (undocumented)
1633
+ content: string;
1634
+ // (undocumented)
1635
+ createdAt: number;
1636
+ // (undocumented)
1637
+ id: string;
1638
+ // (undocumented)
1639
+ role: 'user' | 'assistant';
1640
+ sources?: Source[];
1641
+ // (undocumented)
1642
+ status?: 'writing' | 'completed' | 'failed' | 'unavailable' | 'stopped';
1643
+ // (undocumented)
1644
+ versionCount?: number;
1645
+ // (undocumented)
1646
+ versionIndex?: number;
1647
+ }
1648
+
1649
+ // @public (undocumented)
1650
+ export type MessageKey = keyof typeof english | keyof RecoveryCatalogue | keyof ConfirmationCatalogue | keyof BlockCatalogue | keyof ProblemCatalogue | keyof ReplyCatalogue | keyof FormCatalogue;
1651
+
1652
+ // @public (undocumented)
1653
+ export type MessageValues = Record<string, string | number | boolean>;
1654
+
1655
+ // @public (undocumented)
1656
+ export interface MessageVersionInput {
1657
+ // (undocumented)
1658
+ clientReplyId: string;
1659
+ // (undocumented)
1660
+ conversationId: string;
1661
+ // (undocumented)
1662
+ messageId: string;
1663
+ }
1664
+
1665
+ // @public (undocumented)
1666
+ export interface MessageVersionPort {
1667
+ // (undocumented)
1668
+ edit(input: MessageVersionInput & {
1669
+ content: string;
1670
+ }): MaybePromise<void>;
1671
+ // (undocumented)
1672
+ regenerate(input: MessageVersionInput): MaybePromise<void>;
1673
+ // (undocumented)
1674
+ select(input: MessageVersionInput & {
1675
+ index: number;
1676
+ }): MaybePromise<void>;
1677
+ }
1678
+
1679
+ // @public (undocumented)
1680
+ export interface Negotiated {
1681
+ // (undocumented)
1682
+ agreementId?: string;
1683
+ // (undocumented)
1684
+ capabilities: string[];
1685
+ // (undocumented)
1686
+ protocol: string;
1687
+ }
1688
+
1689
+ // @public (undocumented)
1690
+ export interface Negotiation {
1691
+ // (undocumented)
1692
+ offer?: NegotiationOfferWire;
1693
+ // (undocumented)
1694
+ protocol: string;
1695
+ // (undocumented)
1696
+ supported: string[];
1697
+ }
1698
+
1699
+ // @public
1700
+ export interface NegotiationOffer {
1701
+ // (undocumented)
1702
+ capabilities: readonly string[];
1703
+ }
1704
+
1705
+ // @public (undocumented)
1706
+ export interface NegotiationOfferWire {
1707
+ // (undocumented)
1708
+ capabilities: string[];
1709
+ }
1710
+
1711
+ // @public
1712
+ export function noticeMessages(notice: IntentNotice): ViewMessage[];
1713
+
1714
+ // @public (undocumented)
1715
+ export interface Outcome {
1716
+ // (undocumented)
1717
+ attributed: boolean;
1718
+ reason?: string;
1719
+ retryable?: boolean;
1720
+ // (undocumented)
1721
+ status: number;
1722
+ // (undocumented)
1723
+ stepId: string;
1724
+ // (undocumented)
1725
+ version?: string;
1726
+ }
1727
+
1728
+ // @public
1729
+ export type PartData = {
1730
+ [N in PartName]: N extends keyof PartDataMap ? PartDataMap[N] : undefined;
1731
+ };
1732
+
1733
+ // @public
1734
+ export interface PartDataMap {
1735
+ // (undocumented)
1736
+ bubble: {
1737
+ message: PartMessage & {
1738
+ content: string;
1739
+ blocks: BlockSummary[];
1740
+ };
1741
+ } | {
1742
+ pending: PartPending;
1743
+ };
1744
+ // (undocumented)
1745
+ composer: {
1746
+ sending: boolean;
1747
+ };
1748
+ // (undocumented)
1749
+ confirmation: {
1750
+ confirmation: ConfirmationRecord;
1751
+ };
1752
+ // (undocumented)
1753
+ confirmBar: {
1754
+ view: PlanView;
1755
+ actions: ActionEntry[];
1756
+ };
1757
+ // (undocumented)
1758
+ failedSendControls: {
1759
+ pending: PartPending;
1760
+ };
1761
+ // (undocumented)
1762
+ messageActions: {
1763
+ message: PartMessage;
1764
+ };
1765
+ // (undocumented)
1766
+ planNode: {
1767
+ view: PlanView;
1768
+ };
1769
+ // (undocumented)
1770
+ recoveryActions: {
1771
+ actions: ActionEntry[];
1772
+ };
1773
+ // (undocumented)
1774
+ recoveryPanel: {
1775
+ view: PlanView;
1776
+ };
1777
+ // (undocumented)
1778
+ stepRow: {
1779
+ step: PartStep;
1780
+ };
1781
+ // (undocumented)
1782
+ stepStatusRow: {
1783
+ step: StepStatus;
1784
+ };
1785
+ // (undocumented)
1786
+ stepUpPrompt: {
1787
+ stepUpCount: number;
1788
+ };
1789
+ // (undocumented)
1790
+ widgetFrame: {
1791
+ block: BlockSummary;
1792
+ };
1793
+ }
1794
+
1795
+ // @public
1796
+ export interface PartMessage {
1797
+ // (undocumented)
1798
+ id: string;
1799
+ // (undocumented)
1800
+ role: Message["role"];
1801
+ // (undocumented)
1802
+ status?: Message["status"];
1803
+ // (undocumented)
1804
+ versionCount?: number;
1805
+ // (undocumented)
1806
+ versionIndex?: number;
1807
+ }
1808
+
1809
+ // @public (undocumented)
1810
+ export type PartName = "bubble" | "composer" | "transcript" | "replyRow" | "stepRow" | "planNode" | "widgetFrame" | "confirmBar" | "confirmation" | "topBar" | "rail" | "flowTabs" | "quotaStrip" | "failedSendControls" | "emptyState" | "messageActions" | "extraPanels" | "actionBar" | "stepUpPrompt" | "fieldAdornment" | "recoveryPanel" | "stepStatusRow" | "recoveryActions";
1811
+
1812
+ // @public (undocumented)
1813
+ export const partNames: readonly PartName[];
1814
+
1815
+ // @public
1816
+ export interface PartPending {
1817
+ // (undocumented)
1818
+ content: string;
1819
+ // (undocumented)
1820
+ failure: {
1821
+ code: Problem["code"];
1822
+ } | null;
1823
+ // (undocumented)
1824
+ id: string;
1825
+ }
1826
+
1827
+ // @public (undocumented)
1828
+ export interface PartProps<N extends PartName = PartName> {
1829
+ "aria-disabled"?: boolean;
1830
+ // (undocumented)
1831
+ children?: ReactNode;
1832
+ data?: PartData[N];
1833
+ describedBy?: string;
1834
+ // (undocumented)
1835
+ disabled?: boolean;
1836
+ // (undocumented)
1837
+ inputRef?: Ref<HTMLTextAreaElement>;
1838
+ // (undocumented)
1839
+ label?: string;
1840
+ // (undocumented)
1841
+ onChange?: (value: string) => void;
1842
+ // (undocumented)
1843
+ onKeyDown?: React.KeyboardEventHandler<HTMLTextAreaElement>;
1844
+ // (undocumented)
1845
+ onPress?: () => void;
1846
+ // (undocumented)
1847
+ value?: string;
1848
+ }
1849
+
1850
+ // @public
1851
+ export type PartStep = Pick<Step, "id" | "operation" | "resource" | "view" | "tier" | "undo" | "stepUp">;
1852
+
1853
+ // @public (undocumented)
1854
+ export interface PatchFlow {
1855
+ // (undocumented)
1856
+ favourite: boolean;
1857
+ // (undocumented)
1858
+ flowId: string;
1859
+ // (undocumented)
1860
+ protocol: string;
1861
+ // (undocumented)
1862
+ title: string;
1863
+ }
1864
+
1865
+ // @public (undocumented)
1866
+ export interface PendingSend {
1867
+ // (undocumented)
1868
+ content: string;
1869
+ // (undocumented)
1870
+ extensions?: Record<string, unknown>;
1871
+ // (undocumented)
1872
+ failure: Problem | null;
1873
+ // (undocumented)
1874
+ id: string;
1875
+ }
1876
+
1877
+ // @public (undocumented)
1878
+ export type Plan = ImmediateDraft | ImmediatePlan | TimedPlan;
1879
+
1880
+ // @public (undocumented)
1881
+ export interface PlanCommand {
1882
+ // (undocumented)
1883
+ action: 'stop' | 'heartbeat' | 'resume' | 'retry-undo';
1884
+ // (undocumented)
1885
+ planId: string;
1886
+ // (undocumented)
1887
+ protocol: string;
1888
+ }
1889
+
1890
+ // @public
1891
+ export function PlanDiagram(props: PlanDiagramProps): react.JSX.Element;
1892
+
1893
+ // @public (undocumented)
1894
+ export interface PlanDiagramProps {
1895
+ changesShown?: boolean;
1896
+ // (undocumented)
1897
+ record: PlanRecord;
1898
+ // (undocumented)
1899
+ slots?: Slots;
1900
+ view?: PlanView | null;
1901
+ }
1902
+
1903
+ // @public (undocumented)
1904
+ export interface PlanIntentReply {
1905
+ // (undocumented)
1906
+ capturedRound: number;
1907
+ // (undocumented)
1908
+ correlation: string;
1909
+ // (undocumented)
1910
+ count?: number;
1911
+ // (undocumented)
1912
+ dispositionApplied?: boolean;
1913
+ // (undocumented)
1914
+ effectiveRound: number;
1915
+ // (undocumented)
1916
+ finalHistory?: FinalHistory;
1917
+ // (undocumented)
1918
+ forwardClosed?: boolean;
1919
+ // (undocumented)
1920
+ keys: string[];
1921
+ // (undocumented)
1922
+ kind: IntentKind;
1923
+ // (undocumented)
1924
+ phase: RecoveryPhase;
1925
+ // (undocumented)
1926
+ planId: string;
1927
+ // (undocumented)
1928
+ replacement?: IntentTarget;
1929
+ // (undocumented)
1930
+ requestedTargetApplied?: boolean;
1931
+ // (undocumented)
1932
+ requestKey?: 'requestAlreadyStopped' | 'requestTargetStopped';
1933
+ // (undocumented)
1934
+ resolvedTarget?: string;
1935
+ // (undocumented)
1936
+ result: 'applied' | 'replaced' | 'already-closed' | 'already-stopped' | 'defeated' | 'superseded' | 'needs-review' | 'conflict' | 'unavailable' | 'invalid-target' | 'refused' | 'kept' | 'already-kept' | 'sealed';
1937
+ // (undocumented)
1938
+ safetyApplied?: boolean;
1939
+ // (undocumented)
1940
+ savedDisposition?: {
1941
+ phase: 'left-known' | 'left-unconfirmed';
1942
+ count: number;
1943
+ };
1944
+ // (undocumented)
1945
+ slotVersion: number;
1946
+ // (undocumented)
1947
+ winner?: IntentWinner;
1948
+ }
1949
+
1950
+ // @public
1951
+ export interface PlanLabels {
1952
+ // (undocumented)
1953
+ field?(resource: string, field: string): string | undefined;
1954
+ // (undocumented)
1955
+ resource?(resource: string): string | undefined;
1956
+ }
1957
+
1958
+ // @public
1959
+ export class PlanReadRefused extends Error {
1960
+ constructor();
1961
+ }
1962
+
1963
+ // @public (undocumented)
1964
+ export interface PlanRecord {
1965
+ // (undocumented)
1966
+ confirmation?: ConfirmationRecord;
1967
+ // (undocumented)
1968
+ id: string;
1969
+ // (undocumented)
1970
+ outcomes: Outcome[];
1971
+ // (undocumented)
1972
+ plan: Plan;
1973
+ // (undocumented)
1974
+ protocol: string;
1975
+ // (undocumented)
1976
+ reason?: string;
1977
+ // (undocumented)
1978
+ recovery?: RecoveryView;
1979
+ // (undocumented)
1980
+ state: PlanState;
1981
+ // (undocumented)
1982
+ undoPlanId?: string;
1983
+ }
1984
+
1985
+ // @public (undocumented)
1986
+ export interface PlanRunner {
1987
+ // (undocumented)
1988
+ dispose(): void;
1989
+ interrupt?(): void;
1990
+ // (undocumented)
1991
+ run(id: string, confirmedDigest: string, acceptance?: ExecutionAcceptance): Promise<void>;
1992
+ // (undocumented)
1993
+ stop(id?: string): void;
1994
+ }
1995
+
1996
+ // @public (undocumented)
1997
+ export type PlanState = 'proposed' | 'awaiting-confirmation' | 'running' | 'undoing' | 'completed' | 'submitted' | 'undone' | 'needs-attention' | 'cancelled';
1998
+
1999
+ // @public (undocumented)
2000
+ export interface PlanView {
2001
+ // (undocumented)
2002
+ actions: ActionEntry[];
2003
+ // (undocumented)
2004
+ alert: PlanViewAlert | null;
2005
+ // (undocumented)
2006
+ conversationUnavailable: boolean;
2007
+ // (undocumented)
2008
+ intent: {
2009
+ kind: IntentKind;
2010
+ status: IntentOverlay["delivery"];
2011
+ } | null;
2012
+ // (undocumented)
2013
+ lines: ViewMessage[];
2014
+ // (undocumented)
2015
+ notice: ViewMessage[];
2016
+ // (undocumented)
2017
+ pending: readonly IntentKind[];
2018
+ // (undocumented)
2019
+ planId: string;
2020
+ readOnly?: true;
2021
+ status: PlanViewStatus | null;
2022
+ // (undocumented)
2023
+ steps: StepStatus[];
2024
+ }
2025
+
2026
+ // @public
2027
+ export function planView(input: PlanViewInput): PlanView | null;
2028
+
2029
+ // @public (undocumented)
2030
+ export interface PlanViewAlert {
2031
+ // (undocumented)
2032
+ action?: "checkStatus" | "retry" | "signIn" | "hostGuidance" | "wait";
2033
+ // (undocumented)
2034
+ message?: ViewMessage;
2035
+ // (undocumented)
2036
+ restoreFocus?: true;
2037
+ // (undocumented)
2038
+ retryAvailable: boolean;
2039
+ // (undocumented)
2040
+ retryReasonKey?: MessageKey;
2041
+ // (undocumented)
2042
+ retryValues?: Record<string, number>;
2043
+ // (undocumented)
2044
+ serial: number;
2045
+ }
2046
+
2047
+ // @public (undocumented)
2048
+ export interface PlanViewInput {
2049
+ // (undocumented)
2050
+ alert: IntentAlert | null;
2051
+ // (undocumented)
2052
+ capabilities: readonly string[];
2053
+ // (undocumented)
2054
+ conversationId: string;
2055
+ // (undocumented)
2056
+ conversationUnavailable: boolean;
2057
+ // (undocumented)
2058
+ keepReview: KeepChangesReviewResult;
2059
+ // (undocumented)
2060
+ notice: IntentNotice | null;
2061
+ // (undocumented)
2062
+ now: number;
2063
+ // (undocumented)
2064
+ overlay: IntentOverlay | undefined;
2065
+ // (undocumented)
2066
+ pending: readonly IntentKind[];
2067
+ // (undocumented)
2068
+ plan: PlanRecord | null;
2069
+ // (undocumented)
2070
+ readOnly?: boolean;
2071
+ }
2072
+
2073
+ // @public (undocumented)
2074
+ export interface PlanViewStatus {
2075
+ // (undocumented)
2076
+ attention: boolean;
2077
+ // (undocumented)
2078
+ dataStatus: string;
2079
+ // (undocumented)
2080
+ label: ViewMessage;
2081
+ // (undocumented)
2082
+ result?: "kept";
2083
+ // (undocumented)
2084
+ tone: Tone;
2085
+ // (undocumented)
2086
+ wireState: PlanState;
2087
+ }
2088
+
2089
+ // @public (undocumented)
2090
+ export interface PlatformPorts {
2091
+ // (undocumented)
2092
+ clock: {
2093
+ now(): number;
2094
+ setTimeout(fn: () => void, ms: number): unknown;
2095
+ clearTimeout(handle: unknown): void;
2096
+ };
2097
+ // (undocumented)
2098
+ ids(): string;
2099
+ // (undocumented)
2100
+ online(): boolean;
2101
+ subscribeOnline?(listener: (online: boolean) => void): () => void;
2102
+ subscribeVisibility?(listener: (visible: boolean) => void): () => void;
2103
+ // (undocumented)
2104
+ visibility(): boolean;
2105
+ }
2106
+
2107
+ // @public (undocumented)
2108
+ export interface PrimitiveComponents {
2109
+ // (undocumented)
2110
+ button: ComponentType<ButtonProps>;
2111
+ checkbox?: ComponentType<CheckboxProps>;
2112
+ // (undocumented)
2113
+ datePicker: ComponentType<InputProps>;
2114
+ // (undocumented)
2115
+ drawer: ComponentType<DrawerProps>;
2116
+ // (undocumented)
2117
+ input: ComponentType<InputProps>;
2118
+ // (undocumented)
2119
+ textarea: ComponentType<PartProps>;
2120
+ }
2121
+
2122
+ // @public (undocumented)
2123
+ export interface PrivateAttachmentPort {
2124
+ // (undocumented)
2125
+ remove(reference: string): Promise<void>;
2126
+ // (undocumented)
2127
+ upload(file: File): Promise<string>;
2128
+ }
2129
+
2130
+ // @public (undocumented)
2131
+ export interface Problem {
2132
+ // (undocumented)
2133
+ 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';
2134
+ confirmation?: {
2135
+ reason: 'expired' | 'used' | 'stale' | 'mismatch' | 'missing';
2136
+ };
2137
+ // (undocumented)
2138
+ id: string;
2139
+ // (undocumented)
2140
+ retryAfter?: number;
2141
+ }
2142
+
2143
+ // @public (undocumented)
2144
+ export type ProblemCatalogue = Readonly<Record<ProblemMessageKey, string>>;
2145
+
2146
+ // @public (undocumented)
2147
+ 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";
2148
+
2149
+ // @public
2150
+ export interface ReaderRequestContext {
2151
+ // (undocumented)
2152
+ agreementId: string;
2153
+ }
2154
+
2155
+ // @public (undocumented)
2156
+ export interface ReadPorts {
2157
+ // (undocumented)
2158
+ manifest: readonly ManifestEntry[];
2159
+ // (undocumented)
2160
+ planning?: {
2161
+ template(planId: string, stepId: string): MaybePromise<ReadTemplate | null>;
2162
+ request(template: ReadTemplate): Promise<{
2163
+ rows: Record<string, unknown>;
2164
+ versions: Record<string, string>;
2165
+ }>;
2166
+ };
2167
+ // (undocumented)
2168
+ request(call: ToolCall): Promise<unknown>;
2169
+ }
2170
+
2171
+ // @public
2172
+ export function readProblem(error: unknown, id: string): Problem;
2173
+
2174
+ // @public (undocumented)
2175
+ export interface ReadTemplate {
2176
+ // (undocumented)
2177
+ fields: string[];
2178
+ // (undocumented)
2179
+ method: 'GET';
2180
+ // (undocumented)
2181
+ path: string;
2182
+ // (undocumented)
2183
+ rows: string[];
2184
+ }
2185
+
2186
+ // @public (undocumented)
2187
+ export type RecoveryCatalogue = Readonly<Record<RecoveryMessageKey, string>>;
2188
+
2189
+ // @public (undocumented)
2190
+ 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";
2191
+
2192
+ // @public
2193
+ export function RecoveryPanel(props: {
2194
+ view: PlanView;
2195
+ onPress(id: ActionId | "retry"): void;
2196
+ slots?: Slots;
2197
+ sheet?: KeepSheet | null;
2198
+ hide?: readonly ActionId[];
2199
+ }): react.JSX.Element;
2200
+
2201
+ // @public (undocumented)
2202
+ export type RecoveryPhase = 'proposal' | 'initial-review' | 'forward-active' | 'readback' | 'completed' | 'cancelled' | 'left-known' | 'left-unconfirmed' | 'left-reopened';
2203
+
2204
+ // @public (undocumented)
2205
+ export interface RecoveryView {
2206
+ contradictedAfterSeal?: string[];
2207
+ // (undocumented)
2208
+ conversationId: string;
2209
+ // (undocumented)
2210
+ decisionKey?: string;
2211
+ // (undocumented)
2212
+ evidenceDigest?: string;
2213
+ // (undocumented)
2214
+ executionId?: string;
2215
+ // (undocumented)
2216
+ generation: string;
2217
+ // (undocumented)
2218
+ phase: RecoveryPhase | (string & {});
2219
+ // (undocumented)
2220
+ profile: 'plan-recovery-v1' | (string & {});
2221
+ // (undocumented)
2222
+ remaining?: number;
2223
+ // (undocumented)
2224
+ reviewId?: string;
2225
+ // (undocumented)
2226
+ revision: number;
2227
+ // (undocumented)
2228
+ round: number;
2229
+ // (undocumented)
2230
+ sealed?: boolean;
2231
+ // (undocumented)
2232
+ slots: {
2233
+ stop: number;
2234
+ 'cancel-initial': number;
2235
+ 'cancel-review': number;
2236
+ leave: number;
2237
+ keep: number;
2238
+ };
2239
+ // (undocumented)
2240
+ steps?: {
2241
+ stepId: string;
2242
+ truth: 'done' | 'not-done' | 'unknown';
2243
+ }[];
2244
+ // (undocumented)
2245
+ unknownCount?: number;
2246
+ // (undocumented)
2247
+ versions: DecisionVersions;
2248
+ // (undocumented)
2249
+ winner?: IntentWinner;
2250
+ }
2251
+
2252
+ // @public (undocumented)
2253
+ export type Reply = ReplyMessage | ReplyConfirm | ReplyForm | ReplyAction | ReplyToolResult | ReplyPlanValues | ReplyFormFill | ReplyStop;
2254
+
2255
+ // @public (undocumented)
2256
+ export interface ReplyAction {
2257
+ // (undocumented)
2258
+ actionId: string;
2259
+ // (undocumented)
2260
+ blockId: string;
2261
+ // (undocumented)
2262
+ clientReplyId: string;
2263
+ // (undocumented)
2264
+ kind: 'action';
2265
+ // (undocumented)
2266
+ protocol: string;
2267
+ }
2268
+
2269
+ // @public (undocumented)
2270
+ export type ReplyCatalogue = Readonly<Record<ReplyMessageKey, string>>;
2271
+
2272
+ // @public (undocumented)
2273
+ export interface ReplyConfirm {
2274
+ // (undocumented)
2275
+ clientReplyId: string;
2276
+ // (undocumented)
2277
+ confirmationToken: string;
2278
+ // (undocumented)
2279
+ digest?: string;
2280
+ // (undocumented)
2281
+ kind: 'confirm';
2282
+ // (undocumented)
2283
+ planId: string;
2284
+ // (undocumented)
2285
+ protocol: string;
2286
+ }
2287
+
2288
+ // @public (undocumented)
2289
+ export interface ReplyDecline {
2290
+ // (undocumented)
2291
+ clientReplyId: string;
2292
+ // (undocumented)
2293
+ kind: 'decline';
2294
+ // (undocumented)
2295
+ planId: string;
2296
+ }
2297
+
2298
+ // @public
2299
+ export interface ReplyDelivery {
2300
+ // (undocumented)
2301
+ acceptance?: ExecutionAcceptance;
2302
+ // (undocumented)
2303
+ id: string;
2304
+ }
2305
+
2306
+ // @public (undocumented)
2307
+ export interface ReplyForm {
2308
+ // (undocumented)
2309
+ blockId: string;
2310
+ // (undocumented)
2311
+ clientReplyId: string;
2312
+ // (undocumented)
2313
+ kind: 'form';
2314
+ // (undocumented)
2315
+ protocol: string;
2316
+ // (undocumented)
2317
+ values: {};
2318
+ }
2319
+
2320
+ // @public (undocumented)
2321
+ export interface ReplyFormFill {
2322
+ // (undocumented)
2323
+ clientReplyId: string;
2324
+ // (undocumented)
2325
+ kind: 'form-fill';
2326
+ // (undocumented)
2327
+ protocol: string;
2328
+ // (undocumented)
2329
+ request: FormFillRequest;
2330
+ }
2331
+
2332
+ // @public (undocumented)
2333
+ export type ReplyInput = Reply extends infer R ? R extends {
2334
+ protocol: string;
2335
+ } ? Omit<R, "protocol"> & {
2336
+ protocol?: string;
2337
+ } : never : never;
2338
+
2339
+ // @public (undocumented)
2340
+ export interface ReplyMessage {
2341
+ // (undocumented)
2342
+ clientMessageId: string;
2343
+ // (undocumented)
2344
+ clientReplyId: string;
2345
+ // (undocumented)
2346
+ content: string;
2347
+ // (undocumented)
2348
+ kind: 'message';
2349
+ // (undocumented)
2350
+ protocol: string;
2351
+ }
2352
+
2353
+ // @public (undocumented)
2354
+ 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";
2355
+
2356
+ // @public
2357
+ export type ReplyOutcome = {
2358
+ accepted: true;
2359
+ } | {
2360
+ accepted: false;
2361
+ problem?: Problem;
2362
+ };
2363
+
2364
+ // @public (undocumented)
2365
+ export interface ReplyPlanValues {
2366
+ // (undocumented)
2367
+ clientReplyId: string;
2368
+ // (undocumented)
2369
+ kind: 'plan.values';
2370
+ // (undocumented)
2371
+ planId: string;
2372
+ // (undocumented)
2373
+ protocol: string;
2374
+ // (undocumented)
2375
+ steps: {
2376
+ stepId: string;
2377
+ rows: {};
2378
+ versions: {
2379
+ [k: string]: string;
2380
+ };
2381
+ }[];
2382
+ }
2383
+
2384
+ // @public (undocumented)
2385
+ export function replyRow(input: {
2386
+ messages: readonly Message[];
2387
+ pending: readonly PendingSend[];
2388
+ now: number;
2389
+ askedAt?: number;
2390
+ overdueAt?: number;
2391
+ heldUntil?: number;
2392
+ unavailable?: boolean;
2393
+ failed?: boolean;
2394
+ streamLost?: boolean;
2395
+ activityAt?: number;
2396
+ }): ReplyState;
2397
+
2398
+ // @public (undocumented)
2399
+ export type ReplyState = "none" | "writing" | "unavailable" | "failed" | "overdue";
2400
+
2401
+ // @public
2402
+ export interface ReplyStop {
2403
+ // (undocumented)
2404
+ clientReplyId: string;
2405
+ // (undocumented)
2406
+ kind: 'stop';
2407
+ // (undocumented)
2408
+ messageId: string;
2409
+ // (undocumented)
2410
+ protocol: string;
2411
+ versionIndex?: number;
2412
+ }
2413
+
2414
+ // @public (undocumented)
2415
+ export interface ReplyToolResult {
2416
+ // (undocumented)
2417
+ callId: string;
2418
+ // (undocumented)
2419
+ clientReplyId: string;
2420
+ // (undocumented)
2421
+ kind: 'tool-result';
2422
+ // (undocumented)
2423
+ problem?: Problem;
2424
+ // (undocumented)
2425
+ protocol: string;
2426
+ // (undocumented)
2427
+ result: unknown;
2428
+ }
2429
+
2430
+ // @public (undocumented)
2431
+ export type RequiredThemeToken = "background" | "foreground" | "muted" | "accent" | "border" | "surface" | "danger" | "space" | "radius" | "fontSize" | "fontFamily" | "shadow" | "motion";
2432
+
2433
+ // @public
2434
+ export type ResolvedTheme = {
2435
+ [K in ThemeToken]: string;
2436
+ };
2437
+
2438
+ // @public (undocumented)
2439
+ export interface RestoredMessage {
2440
+ // (undocumented)
2441
+ content: string;
2442
+ // (undocumented)
2443
+ id: string;
2444
+ }
2445
+
2446
+ // @public (undocumented)
2447
+ export interface RunFlow {
2448
+ // (undocumented)
2449
+ flowId: string;
2450
+ // (undocumented)
2451
+ protocol: string;
2452
+ // (undocumented)
2453
+ values: {};
2454
+ }
2455
+
2456
+ // @public (undocumented)
2457
+ export interface RunnerPorts {
2458
+ // (undocumented)
2459
+ clock?: PlatformPorts["clock"];
2460
+ heartbeat(id: string, acceptance?: ExecutionAcceptance): Promise<void>;
2461
+ // (undocumented)
2462
+ heartbeatMs?: number;
2463
+ intent?(request: IntentRequest): Promise<PlanIntentReply>;
2464
+ interrupted?(id: string, cause: IntentCause): Promise<void>;
2465
+ // (undocumented)
2466
+ onRecord?(record: PlanRecord): void;
2467
+ read(id: string, context?: ReaderRequestContext): Promise<PlanRecord>;
2468
+ // (undocumented)
2469
+ request(request: CanonicalRequest, context: StepContext): Promise<void>;
2470
+ signal?: ScopeSignal;
2471
+ // (undocumented)
2472
+ stepUp?(planId: string, stepId: string): Promise<string | null>;
2473
+ // @deprecated (undocumented)
2474
+ stop?(id: string): Promise<PlanRecord>;
2475
+ }
2476
+
2477
+ // @public (undocumented)
2478
+ export interface ScopeSignal {
2479
+ // (undocumented)
2480
+ readonly aborted: boolean;
2481
+ // (undocumented)
2482
+ addEventListener(type: "abort", listener: () => void, options?: {
2483
+ once?: boolean;
2484
+ }): void;
2485
+ // (undocumented)
2486
+ removeEventListener(type: "abort", listener: () => void): void;
2487
+ }
2488
+
2489
+ // @public (undocumented)
2490
+ export const simplifiedChinese: Record<keyof typeof english, string>;
2491
+
2492
+ // @public (undocumented)
2493
+ export type Slots = {
2494
+ [N in PartName]?: (props: PartProps<N>) => ReactNode;
2495
+ };
2496
+
2497
+ // @public (undocumented)
2498
+ export interface Source {
2499
+ // (undocumented)
2500
+ id: string;
2501
+ // (undocumented)
2502
+ title: string;
2503
+ // (undocumented)
2504
+ url: string;
2505
+ }
2506
+
2507
+ // @public (undocumented)
2508
+ export const standardWidgets: readonly WidgetRegistration[];
2509
+
2510
+ // @public (undocumented)
2511
+ export interface Step {
2512
+ // (undocumented)
2513
+ after?: {};
2514
+ // (undocumented)
2515
+ before?: {};
2516
+ // (undocumented)
2517
+ fields: string[];
2518
+ // (undocumented)
2519
+ id: string;
2520
+ // (undocumented)
2521
+ operation: string;
2522
+ // (undocumented)
2523
+ planningRead?: ReadTemplate;
2524
+ // (undocumented)
2525
+ request?: CanonicalRequest;
2526
+ // (undocumented)
2527
+ resource: string;
2528
+ // (undocumented)
2529
+ rows: string[];
2530
+ // (undocumented)
2531
+ stepUp: boolean;
2532
+ // (undocumented)
2533
+ tier: 'low' | 'sensitive';
2534
+ // (undocumented)
2535
+ undo: string;
2536
+ // (undocumented)
2537
+ view: string;
2538
+ }
2539
+
2540
+ // @public (undocumented)
2541
+ export interface StepContext {
2542
+ // (undocumented)
2543
+ headers: Record<string, string>;
2544
+ // (undocumented)
2545
+ planId: string;
2546
+ signal?: ScopeSignal;
2547
+ // (undocumented)
2548
+ stepId: string;
2549
+ // (undocumented)
2550
+ stepUpCode?: string;
2551
+ }
2552
+
2553
+ // @public
2554
+ export function stepName(t: FormatMessage, labels: PlanLabels | undefined, step: {
2555
+ index: number;
2556
+ resource?: string;
2557
+ }): string;
2558
+
2559
+ // @public (undocumented)
2560
+ export interface StepStatus {
2561
+ index: number;
2562
+ // (undocumented)
2563
+ lateReport?: "contradicted";
2564
+ // (undocumented)
2565
+ resource?: string;
2566
+ // (undocumented)
2567
+ stepId: string;
2568
+ // (undocumented)
2569
+ textKey: MessageKey;
2570
+ // (undocumented)
2571
+ truth: "done" | "not-done" | "unknown";
2572
+ }
2573
+
2574
+ // @public (undocumented)
2575
+ export interface StoragePort {
2576
+ compareAndSet?(key: string, expected: string | null, value: string): MaybePromise<boolean>;
2577
+ // (undocumented)
2578
+ get(key: string): MaybePromise<string | null>;
2579
+ // (undocumented)
2580
+ remove(key: string): MaybePromise<void>;
2581
+ // (undocumented)
2582
+ set(key: string, value: string): MaybePromise<void>;
2583
+ }
2584
+
2585
+ // @public (undocumented)
2586
+ export type Theme = {
2587
+ [K in RequiredThemeToken]: string;
2588
+ } & {
2589
+ [K in Exclude<ThemeToken, RequiredThemeToken>]?: string;
2590
+ };
2591
+
2592
+ // @public (undocumented)
2593
+ export function themeProperties(theme: Partial<ResolvedTheme>): Record<string, string>;
2594
+
2595
+ // @public
2596
+ export type ThemeToken = keyof typeof lightTheme;
2597
+
2598
+ // @public
2599
+ export type ThemeTokensHook = () => {
2600
+ tokens: Partial<ResolvedTheme>;
2601
+ scheme: "light" | "dark";
2602
+ } | undefined;
2603
+
2604
+ // @public (undocumented)
2605
+ export interface TimedPlan {
2606
+ // (undocumented)
2607
+ end: string | null;
2608
+ // (undocumented)
2609
+ id: string;
2610
+ // (undocumented)
2611
+ kind: 'timed';
2612
+ // (undocumented)
2613
+ start: string | null;
2614
+ // (undocumented)
2615
+ values: {
2616
+ [k: string]: {
2617
+ [k: string]: unknown;
2618
+ };
2619
+ };
2620
+ }
2621
+
2622
+ // @public (undocumented)
2623
+ export type Tone = "neutral" | "progress" | "warning" | "success";
2624
+
2625
+ // @public (undocumented)
2626
+ export interface ToolCall {
2627
+ // (undocumented)
2628
+ id: string;
2629
+ label?: string;
2630
+ // (undocumented)
2631
+ method: string;
2632
+ // (undocumented)
2633
+ operation: string;
2634
+ // (undocumented)
2635
+ path: string;
2636
+ // (undocumented)
2637
+ query?: {
2638
+ [k: string]: string;
2639
+ };
2640
+ }
2641
+
2642
+ // @public
2643
+ export interface ToolStep {
2644
+ // (undocumented)
2645
+ id: string;
2646
+ label?: string;
2647
+ // (undocumented)
2648
+ status: "running" | "done" | "failed";
2649
+ }
2650
+
2651
+ // @public (undocumented)
2652
+ export type TransportEvent = {
2653
+ type: "status";
2654
+ status: "connecting" | "open" | "reconnecting" | "unavailable";
2655
+ } | {
2656
+ type: "frame";
2657
+ frame: Frame;
2658
+ }
2659
+ /** A hint that the conversation changed; it is never applied as content. */
2660
+ | {
2661
+ type: "invalidate";
2662
+ };
2663
+
2664
+ // @public (undocumented)
2665
+ export interface TransportPort {
2666
+ negotiate(supported: readonly string[], offer?: NegotiationOffer): Promise<{
2667
+ protocol: string;
2668
+ capabilities: string[];
2669
+ agreementId?: string;
2670
+ }>;
2671
+ // (undocumented)
2672
+ read(conversationId: string, context?: ReaderRequestContext): Promise<Conversation>;
2673
+ // (undocumented)
2674
+ send(reply: Reply & {
2675
+ extensions?: Record<string, unknown>;
2676
+ }, conversationId: string, context?: ReaderRequestContext): Promise<ReplyDelivery>;
2677
+ // (undocumented)
2678
+ subscribe(conversationId: string, listener: (event: TransportEvent) => void, context?: ReaderRequestContext): () => void;
2679
+ }
2680
+
2681
+ // @public
2682
+ export function useBlockReply(client?: WaypointClient): BlockReply;
2683
+
2684
+ // @public (undocumented)
2685
+ export function useComposer(client?: WaypointClient): {
2686
+ draft: string;
2687
+ sending: boolean;
2688
+ hints: readonly string[];
2689
+ setDraft: (value: string) => Promise<void>;
2690
+ send: () => Promise<void>;
2691
+ retry: (id: string) => Promise<void>;
2692
+ withdraw: (id: string) => Promise<void>;
2693
+ dismiss: (id: string) => Promise<void>;
2694
+ };
2695
+
2696
+ // @public (undocumented)
2697
+ export function useConversation(client?: WaypointClient): {
2698
+ conversationId: string;
2699
+ conversation: Conversation | null;
2700
+ refresh: () => Promise<ConversationReadResult>;
2701
+ editMessage: (messageId: string, content: string) => Promise<void>;
2702
+ regenerate: (messageId: string) => Promise<void>;
2703
+ selectVersion: (messageId: string, index: number) => Promise<void>;
2704
+ switchConversation: (id: string) => Promise<ConversationReadResult>;
2705
+ };
2706
+
2707
+ // @public (undocumented)
2708
+ export function useFlows(client?: WaypointClient): {
2709
+ flows: Partial<Record<string, FlowSummary[]>>;
2710
+ tab: string;
2711
+ load: () => Promise<void>;
2712
+ select: (tab: FlowTab) => void;
2713
+ setFavourite: (id: string, favourite: boolean) => Promise<void>;
2714
+ run: (id: string, values: Record<string, unknown>) => Promise<string | void>;
2715
+ };
2716
+
2717
+ // @public (undocumented)
2718
+ export function useFormFill(session: FormSession): FormSnapshot;
2719
+
2720
+ // @public (undocumented)
2721
+ export function usePlan(client?: WaypointClient): {
2722
+ plan: PlanRecord | null;
2723
+ setPlan: (plan: PlanRecord) => void;
2724
+ reply: (reply: ReplyInput) => Promise<boolean>;
2725
+ view: PlanView | null;
2726
+ };
2727
+
2728
+ // @public
2729
+ export function usePlanView(client?: WaypointClient): {
2730
+ view: PlanView | null;
2731
+ press: (id: ActionId | "retry") => void;
2732
+ sheet: KeepSheet | null;
2733
+ };
2734
+
2735
+ // @public (undocumented)
2736
+ export function useWaypointClient(): WaypointClient;
2737
+
2738
+ // @public
2739
+ export function useWaypointMessage(messageId: string, client?: WaypointClient): Message | undefined;
2740
+
2741
+ // @public
2742
+ export function useWaypointSelector<T>(selector: (snapshot: ClientSnapshot) => T, isEqual?: (a: T, b: T) => boolean, client?: WaypointClient): T;
2743
+
2744
+ // @public (undocumented)
2745
+ export function useWaypointSnapshot(client?: WaypointClient): ClientSnapshot;
2746
+
2747
+ // @public (undocumented)
2748
+ export function versionWalk(message: {
2749
+ versionIndex?: number | null;
2750
+ versionCount?: number | null;
2751
+ }): {
2752
+ index: number;
2753
+ count: number;
2754
+ previous: number | null;
2755
+ next: number | null;
2756
+ } | null;
2757
+
2758
+ // @public (undocumented)
2759
+ export interface ViewMessage {
2760
+ // (undocumented)
2761
+ key: MessageKey;
2762
+ // (undocumented)
2763
+ values?: Record<string, number>;
2764
+ }
2765
+
2766
+ // @public (undocumented)
2767
+ export function WaypointChat(props: WaypointChatProps): react.JSX.Element;
2768
+
2769
+ // @public (undocumented)
2770
+ export interface WaypointChatProps extends Partial<Omit<WaypointProviderProps, "children">> {
2771
+ // (undocumented)
2772
+ conversations?: readonly ConversationSummary[];
2773
+ // (undocumented)
2774
+ conversationSource?: ConversationSource;
2775
+ // (undocumented)
2776
+ features?: readonly Capability[];
2777
+ // (undocumented)
2778
+ layout?: "panel" | "page" | "floating" | "sheet";
2779
+ // (undocumented)
2780
+ onStop?: () => void;
2781
+ // (undocumented)
2782
+ quota?: ReactNode;
2783
+ // (undocumented)
2784
+ shortcuts?: {
2785
+ focusComposer?: string | false;
2786
+ send?: string | false;
2787
+ global?: boolean;
2788
+ };
2789
+ // (undocumented)
2790
+ slots?: Slots;
2791
+ // (undocumented)
2792
+ suggestions?: readonly string[];
2793
+ }
2794
+
2795
+ // @public (undocumented)
2796
+ export interface WaypointClient {
2797
+ canChangeVersions(): boolean;
2798
+ // (undocumented)
2799
+ canKeepChanges(id?: string): boolean;
2800
+ canPrepareFlow(): boolean;
2801
+ canRetryReply(): boolean;
2802
+ canSendFeedback(): boolean;
2803
+ canStopReply(): boolean;
2804
+ checkIntentStatus(id?: string): Promise<void>;
2805
+ checkKeepStatus(id?: string): Promise<void>;
2806
+ checkSavedChoice(id?: string): Promise<void>;
2807
+ // (undocumented)
2808
+ confirmPlan(): Promise<void>;
2809
+ declinePlan(): Promise<void>;
2810
+ discardRestored(id: string): Promise<void>;
2811
+ // (undocumented)
2812
+ dismiss(id: string): Promise<void>;
2813
+ // (undocumented)
2814
+ dispose(): void;
2815
+ // (undocumented)
2816
+ editMessage(messageId: string, content: string): Promise<void>;
2817
+ editRestored(id: string): Promise<void>;
2818
+ // (undocumented)
2819
+ getSnapshot(): ClientSnapshot;
2820
+ keepChanges(review: KeepChangesReviewResult): Promise<void>;
2821
+ keepChangesReview(id?: string): KeepChangesReviewResult;
2822
+ keepWaiting(): void;
2823
+ leavePlan(id?: string): Promise<void>;
2824
+ // (undocumented)
2825
+ loadFlows(): Promise<void>;
2826
+ // (undocumented)
2827
+ on(listener: (event: WaypointEvent) => void): () => void;
2828
+ prepareFlow(id?: string): Promise<Flow | void>;
2829
+ readPlan(id?: string): Promise<void>;
2830
+ // (undocumented)
2831
+ ready: Promise<void>;
2832
+ // (undocumented)
2833
+ refresh(): Promise<ConversationReadResult>;
2834
+ // (undocumented)
2835
+ regenerate(messageId: string): Promise<void>;
2836
+ // (undocumented)
2837
+ reply(reply: ReplyInput): Promise<boolean>;
2838
+ replyOutcome(reply: ReplyInput): Promise<ReplyOutcome>;
2839
+ // (undocumented)
2840
+ report(problem: Problem): void;
2841
+ // (undocumented)
2842
+ resumePlan(): Promise<void>;
2843
+ // (undocumented)
2844
+ retry(id: string): Promise<void>;
2845
+ // (undocumented)
2846
+ retryIntent(id?: string): Promise<void>;
2847
+ retryReply(): Promise<void>;
2848
+ // (undocumented)
2849
+ retryUndo(): Promise<void>;
2850
+ runFlow(id: string, values: Record<string, unknown>): Promise<string | void>;
2851
+ // (undocumented)
2852
+ runPlan(id: string, confirmedDigest: string): Promise<void>;
2853
+ // (undocumented)
2854
+ selectFlowTab(tab: FlowTab): void;
2855
+ // (undocumented)
2856
+ selectVersion(messageId: string, index: number): Promise<void>;
2857
+ // (undocumented)
2858
+ send(): Promise<void>;
2859
+ sendFeedback(messageId: string, rating: FeedbackInput["rating"]): Promise<boolean>;
2860
+ // (undocumented)
2861
+ setDraft(value: string): Promise<void>;
2862
+ // (undocumented)
2863
+ setFavourite(id: string, favourite: boolean): Promise<void>;
2864
+ // (undocumented)
2865
+ setPlan(plan: PlanRecord): void;
2866
+ // (undocumented)
2867
+ stopPlan(id?: string): void;
2868
+ stopReply(): Promise<void>;
2869
+ // (undocumented)
2870
+ subscribe(listener: () => void): () => void;
2871
+ // (undocumented)
2872
+ switchConversation(id: string): Promise<ConversationReadResult>;
2873
+ // (undocumented)
2874
+ withdraw(id: string): Promise<void>;
2875
+ }
2876
+
2877
+ // @public (undocumented)
2878
+ export type WaypointEvent = {
2879
+ type: "send" | "reply";
2880
+ conversationId: string;
2881
+ replyId: string;
2882
+ } | {
2883
+ type: "plan.state";
2884
+ planId: string;
2885
+ } | {
2886
+ type: "problem";
2887
+ problemId: string;
2888
+ } | {
2889
+ type: "transport.status";
2890
+ conversationId: string;
2891
+ };
2892
+
2893
+ // @public (undocumented)
2894
+ 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;
2895
+
2896
+ // @public (undocumented)
2897
+ export function WaypointProvider(props: WaypointProviderProps): react.JSX.Element;
2898
+
2899
+ // @public (undocumented)
2900
+ export interface WaypointProviderProps {
2901
+ // (undocumented)
2902
+ children?: ReactNode;
2903
+ // (undocumented)
2904
+ client: WaypointClient;
2905
+ colorScheme?: "light" | "dark";
2906
+ // (undocumented)
2907
+ dir?: "ltr" | "rtl";
2908
+ // (undocumented)
2909
+ extraUrlSchemes?: readonly string[];
2910
+ // (undocumented)
2911
+ flowTabLabel?: (labelKey: string) => string;
2912
+ // (undocumented)
2913
+ format?: FormatMessage;
2914
+ // (undocumented)
2915
+ locale?: string;
2916
+ // (undocumented)
2917
+ markdownImages?: MarkdownImagePolicy;
2918
+ messageExcerpt?: (message: Message) => string | undefined;
2919
+ // (undocumented)
2920
+ parts?: {
2921
+ [N in PartName]?: ComponentType<PartProps<N>>;
2922
+ };
2923
+ planLabels?: PlanLabels;
2924
+ // (undocumented)
2925
+ primitives?: Partial<PrimitiveComponents>;
2926
+ problemText?: (problem: Problem, context?: {
2927
+ answeredElsewhere: boolean;
2928
+ }) => {
2929
+ text: string;
2930
+ action?: ReactNode;
2931
+ };
2932
+ // (undocumented)
2933
+ renderers?: {
2934
+ markdown?: ComponentType<{
2935
+ text: string;
2936
+ }>;
2937
+ };
2938
+ theme?: Partial<Theme>;
2939
+ useThemeTokens?: ThemeTokensHook;
2940
+ // (undocumented)
2941
+ widgets?: readonly WidgetRegistration[];
2942
+ // (undocumented)
2943
+ wrapper?: ComponentType<{
2944
+ children?: ReactNode;
2945
+ colorScheme: "light" | "dark";
2946
+ tokens: Theme;
2947
+ tokenSource?: "host" | "waypoint";
2948
+ }>;
2949
+ }
2950
+
2951
+ // @public (undocumented)
2952
+ export function Widget(props: WidgetProps): react.JSX.Element;
2953
+
2954
+ // @public (undocumented)
2955
+ export interface WidgetProps {
2956
+ // (undocumented)
2957
+ block: Block;
2958
+ // (undocumented)
2959
+ disabled: boolean;
2960
+ // (undocumented)
2961
+ onReply: (reply: Pick<Reply, "kind"> & Record<string, unknown>) => void;
2962
+ }
2963
+
2964
+ // @public (undocumented)
2965
+ export interface WidgetRegistration {
2966
+ // (undocumented)
2967
+ render: ComponentType<WidgetProps>;
2968
+ // (undocumented)
2969
+ type: string;
2970
+ }
2971
+
2972
+ // @public (undocumented)
2973
+ export type WinnerKind = 'stop' | 'cancel-initial' | 'cancel-review' | 'leave' | 'keep';
2974
+
2975
+ // (No @packageDocumentation comment for this package)
2976
+
2977
+ ```