@genesislcap/ai-assistant 15.82.0 → 15.83.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/ai-assistant.api.json +2811 -233
  2. package/dist/ai-assistant.d.ts +835 -93
  3. package/dist/chat-driver.cjs +452 -99
  4. package/dist/chat-driver.cjs.map +4 -4
  5. package/dist/chat-driver.mjs +452 -99
  6. package/dist/chat-driver.mjs.map +4 -4
  7. package/dist/custom-elements.json +1038 -42
  8. package/dist/dts/autopilot/autopilot-driver.d.ts +117 -11
  9. package/dist/dts/autopilot/autopilot-driver.d.ts.map +1 -1
  10. package/dist/dts/autopilot/autopilot-session.d.ts +55 -7
  11. package/dist/dts/autopilot/autopilot-session.d.ts.map +1 -1
  12. package/dist/dts/autopilot/autopilot-tools.d.ts +3 -2
  13. package/dist/dts/autopilot/autopilot-tools.d.ts.map +1 -1
  14. package/dist/dts/autopilot/decision-message.d.ts +35 -3
  15. package/dist/dts/autopilot/decision-message.d.ts.map +1 -1
  16. package/dist/dts/autopilot/hand-back/hand-back.controller.d.ts +2 -2
  17. package/dist/dts/autopilot/hand-back/hand-back.controller.d.ts.map +1 -1
  18. package/dist/dts/autopilot/hand-back/hand-back.d.ts +2 -2
  19. package/dist/dts/autopilot/hand-back/hand-back.d.ts.map +1 -1
  20. package/dist/dts/autopilot/index.d.ts +1 -0
  21. package/dist/dts/autopilot/index.d.ts.map +1 -1
  22. package/dist/dts/autopilot/widget-tools.d.ts +95 -0
  23. package/dist/dts/autopilot/widget-tools.d.ts.map +1 -0
  24. package/dist/dts/channel/ai-activity-channel.d.ts +10 -0
  25. package/dist/dts/channel/ai-activity-channel.d.ts.map +1 -1
  26. package/dist/dts/components/ai-driver/ai-driver.d.ts +25 -6
  27. package/dist/dts/components/ai-driver/ai-driver.d.ts.map +1 -1
  28. package/dist/dts/components/ai-driver/base-driver-decorator.d.ts +2 -0
  29. package/dist/dts/components/ai-driver/base-driver-decorator.d.ts.map +1 -1
  30. package/dist/dts/components/chat-driver/chat-driver.d.ts +14 -2
  31. package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
  32. package/dist/dts/components/chat-driver/interaction-controller.d.ts +61 -17
  33. package/dist/dts/components/chat-driver/interaction-controller.d.ts.map +1 -1
  34. package/dist/dts/config/config.d.ts +31 -6
  35. package/dist/dts/config/config.d.ts.map +1 -1
  36. package/dist/dts/config/define-stateful-agent.d.ts +5 -1
  37. package/dist/dts/config/define-stateful-agent.d.ts.map +1 -1
  38. package/dist/dts/index.d.ts +4 -2
  39. package/dist/dts/index.d.ts.map +1 -1
  40. package/dist/dts/main/main.d.ts +11 -0
  41. package/dist/dts/main/main.d.ts.map +1 -1
  42. package/dist/dts/main/main.template.d.ts.map +1 -1
  43. package/dist/dts/notifications/agent-notifications.d.ts +6 -2
  44. package/dist/dts/notifications/agent-notifications.d.ts.map +1 -1
  45. package/dist/dts/notifications/agent-notifier.d.ts +26 -4
  46. package/dist/dts/notifications/agent-notifier.d.ts.map +1 -1
  47. package/dist/dts/state/decision-surface.d.ts +22 -4
  48. package/dist/dts/state/decision-surface.d.ts.map +1 -1
  49. package/dist/dts/state/interaction-context.d.ts +23 -4
  50. package/dist/dts/state/interaction-context.d.ts.map +1 -1
  51. package/dist/dts/state/interaction-registry.d.ts +55 -6
  52. package/dist/dts/state/interaction-registry.d.ts.map +1 -1
  53. package/dist/dts/state/live-interactions.d.ts +28 -0
  54. package/dist/dts/state/live-interactions.d.ts.map +1 -0
  55. package/dist/dts/state/persistence/session-persister.d.ts.map +1 -1
  56. package/dist/dts/state/persistence/session-snapshot.d.ts +16 -5
  57. package/dist/dts/state/persistence/session-snapshot.d.ts.map +1 -1
  58. package/dist/dts/state/test-interaction-context.d.ts +93 -0
  59. package/dist/dts/state/test-interaction-context.d.ts.map +1 -0
  60. package/dist/dts/types/ai-chat-widget.d.ts +7 -6
  61. package/dist/dts/types/ai-chat-widget.d.ts.map +1 -1
  62. package/dist/dts/types/interaction-context.d.ts +128 -17
  63. package/dist/dts/types/interaction-context.d.ts.map +1 -1
  64. package/dist/dts/types/interaction-interceptor.d.ts +48 -6
  65. package/dist/dts/types/interaction-interceptor.d.ts.map +1 -1
  66. package/dist/dts/types/interaction-surface.d.ts +145 -23
  67. package/dist/dts/types/interaction-surface.d.ts.map +1 -1
  68. package/dist/esm/autopilot/autopilot-driver.js +313 -60
  69. package/dist/esm/autopilot/autopilot-session.js +219 -40
  70. package/dist/esm/autopilot/autopilot-tools.js +11 -7
  71. package/dist/esm/autopilot/decision-message.js +105 -26
  72. package/dist/esm/autopilot/hand-back/hand-back.controller.js +2 -1
  73. package/dist/esm/autopilot/index.js +1 -0
  74. package/dist/esm/autopilot/widget-tools.js +39 -0
  75. package/dist/esm/components/ai-driver/base-driver-decorator.js +17 -0
  76. package/dist/esm/components/chat-driver/chat-driver.js +18 -2
  77. package/dist/esm/components/chat-driver/interaction-controller.js +232 -71
  78. package/dist/esm/components/settings-modal/settings-modal.template.js +2 -2
  79. package/dist/esm/config/define-stateful-agent.js +22 -1
  80. package/dist/esm/index.js +2 -0
  81. package/dist/esm/main/main.js +39 -3
  82. package/dist/esm/main/main.template.js +4 -1
  83. package/dist/esm/notifications/agent-notifications.js +11 -1
  84. package/dist/esm/notifications/agent-notifier.js +41 -7
  85. package/dist/esm/state/debug-event-log.js +5 -5
  86. package/dist/esm/state/decision-surface.js +137 -54
  87. package/dist/esm/state/interaction-context.js +41 -8
  88. package/dist/esm/state/interaction-registry.js +11 -0
  89. package/dist/esm/state/live-interactions.js +36 -0
  90. package/dist/esm/state/persistence/session-persister.js +44 -17
  91. package/dist/esm/state/persistence/session-snapshot.js +2 -2
  92. package/dist/esm/state/test-interaction-context.js +99 -0
  93. package/docs/notifications.md +55 -5
  94. package/docs/styling.md +33 -0
  95. package/package.json +19 -19
  96. package/sandbox/README.md +3 -2
  97. package/sandbox/autopilot.ts +26 -6
  98. package/sandbox/sandbox.ts +2 -0
  99. /package/dist/{tsdoc-metadata.json → dts/tsdoc-metadata.json} +0 -0
@@ -12,6 +12,20 @@ import type { SendMessageOptions } from '../utils/delegated-message';
12
12
  * @beta
13
13
  */
14
14
  export declare const AUTOPILOT_CLAIMANT = "autopilot";
15
+ /**
16
+ * How long a widget the autopilot leaves with the person must go on waiting on them before that is
17
+ * reported as a hand-back (GENC-1660). Its message is appended after the interceptors are asked, and
18
+ * rendered on the next animation frame, so a widget that settles itself as it mounts does so a frame
19
+ * or more after the decline (11 ms in the session that found this): one task (`setTimeout(0)`) runs
20
+ * before that frame, so it is not enough. A quarter of a second covers several frames on a busy
21
+ * page, and is no delay for a notification. A hidden tab runs no frames at all, so there only
22
+ * registering such a widget `resolvesItself` keeps it from reporting (see `asksThePerson`). The
23
+ * same wait lets a widget that starts asking call `setWorking(false)` and `requestAttention` in
24
+ * either order: its message is read once both have landed.
25
+ *
26
+ * @internal
27
+ */
28
+ export declare const HAND_BACK_GRACE_MS = 250;
15
29
  /**
16
30
  * The autopilot's mode for the current flow (GENC-1660 §4.10). `'unavailable'`: no autopilot for
17
31
  * this flow, or not yet (e.g. no approved brief). `'paused'`: available but not answering.
@@ -36,9 +50,16 @@ export interface AutopilotHostState {
36
50
  readonly interactionId?: string;
37
51
  readonly reason?: string;
38
52
  };
39
- /** The slim bar's one-line status. */
53
+ /**
54
+ * The slim bar's one-line status, from `AutopilotCopy`: `running`, or `waitingForUser` while the
55
+ * working agent waits on a question the autopilot left with the person; `selfPaused` while it
56
+ * waits on one it handed back; `paused` otherwise.
57
+ */
40
58
  readonly status: string;
41
- /** Whether something waits on the person: drives the "needs you" badge. */
59
+ /**
60
+ * Whether the autopilot stopped and needs the person — its own hand-back of a widget or of a
61
+ * turn: drives the "needs you" badge. Not set for a question it never took (see `status`).
62
+ */
42
63
  readonly needsUser: boolean;
43
64
  /**
44
65
  * Whether something is happening: the working agent is busy, or the autopilot is deciding (a
@@ -63,7 +84,8 @@ export interface AutopilotHost {
63
84
  pause(): void;
64
85
  /**
65
86
  * Resume. Takes back an interaction that pausing handed over; during the autopilot's own
66
- * hand-back it means "decide it yourself".
87
+ * hand-back it means "decide it yourself". Takes an interaction that opened while paused and is
88
+ * still open, when it would have claimed it had it been running then.
67
89
  */
68
90
  resume(): void;
69
91
  /** The existing Stop, which also pauses, so what is shown stays honest. */
@@ -140,7 +162,18 @@ export declare class AutopilotDriver extends BaseDriverDecorator implements Auto
140
162
  private mode;
141
163
  private pauseState?;
142
164
  private held?;
143
- /** Written answers given on the current step, for the refinement limit. */
165
+ /**
166
+ * The interaction open right now, whoever holds it: claimed or not, it was offered here first.
167
+ * `held` covers only what the autopilot claimed, so this is how the status knows that the working
168
+ * agent is parked on a question left with the person (see `waitingOnUser`).
169
+ */
170
+ private open?;
171
+ /**
172
+ * The open interaction, when the autopilot declined it only for being paused as it opened: a live
173
+ * Resume may still take it (see `takeOpenOnResume`). Cleared when it is taken or settles.
174
+ */
175
+ private declinedWhilePaused?;
176
+ /** Refining actions taken on the current step (written answers among them), for the limit. */
144
177
  private refinements?;
145
178
  /** The watchdog's next check, while a claimed interaction is pending. */
146
179
  private watchdog?;
@@ -170,8 +203,23 @@ export declare class AutopilotDriver extends BaseDriverDecorator implements Auto
170
203
  private ranSinceStop;
171
204
  /** The check that confirms the autopilot stopped, once it looked like it had. */
172
205
  private stopCheck?;
206
+ /** Stops each wait for a widget left with the person to ask them; see `reportHandBackWhenAsking`. */
207
+ private readonly handBackWaits;
173
208
  constructor(inner: AiDriver, options: AutopilotDriverOptions);
174
209
  get state(): AutopilotHostState;
210
+ /**
211
+ * Whether the working agent is parked on a question the person holds, with the autopilot deciding
212
+ * nothing: one it never took — its policy keeps it for the person, it is `userOnly` (the turn-level
213
+ * hand-back among them), it has no controller, or it opened while paused and no Resume has taken
214
+ * it since (a restored mode takes nothing) — or one another interceptor took and then gave to the
215
+ * person. One the autopilot handed back reads `selfPaused`, and one a pause handed over reads
216
+ * `paused`; `state` settles both before asking this.
217
+ *
218
+ * Never one that asks them nothing (see `asksThePerson`): the person holds it, but it is work
219
+ * running, which settles by itself, so "waiting for your answer" would be untrue. A hand-back is
220
+ * reported by the same rule (see `reportHandBackWhenAsking`).
221
+ */
222
+ private waitingOnUser;
175
223
  get copy(): AutopilotCopy;
176
224
  subscribe(listener: () => void): () => void;
177
225
  pause(): void;
@@ -209,9 +257,9 @@ export declare class AutopilotDriver extends BaseDriverDecorator implements Auto
209
257
  *
210
258
  * Sent only if the question still stands when the answer lands: no pause or resume since it was
211
259
  * asked (Pause stops it, and the question is the person's to answer by typing), the flow still
212
- * running, the working agent idle, and the question still the last thing it said. Otherwise the
213
- * answer goes nowhere — not sent, not counted, not recorded as acted — and its cost is recorded as
214
- * dropped, as it is whenever no reply is sent to carry it.
260
+ * running and the autopilot still available to it, the working agent idle, and the question still
261
+ * the last thing it said. Otherwise the answer goes nowhere — not sent, not counted, not recorded
262
+ * as acted — and its cost is recorded as dropped, as it is whenever no reply is sent to carry it.
215
263
  */
216
264
  private answer;
217
265
  /**
@@ -239,14 +287,69 @@ export declare class AutopilotDriver extends BaseDriverDecorator implements Auto
239
287
  private endSessions;
240
288
  dispose(): Promise<void>;
241
289
  private onInteractionOpened;
290
+ private decline;
291
+ /**
292
+ * Report a widget the autopilot declined, and so left with the person, as a hand-back (GENC-1660)
293
+ * — but only once it waits on them: by the rule the status reads (`asksThePerson`), or because the
294
+ * widget asked for their attention. Then only if it still does, and is still theirs, after
295
+ * `HAND_BACK_GRACE_MS`, so one that settles itself as it mounts never reports. One that is working
296
+ * reports when it starts asking, with the message it asked with. One that settles first, or that
297
+ * another interceptor claims first, never reports: that claimant reports its own hand-back.
298
+ *
299
+ * The report is the interaction's one notification. The widget's own request is taken over
300
+ * (`hold.takeAttention`), so it is not reported as well, before or after: it only counts as the
301
+ * widget asking. When its request has already counted — reported while the person held it, before
302
+ * a decline on Resume — the person was told then, so nothing more is reported.
303
+ */
304
+ private reportHandBackWhenAsking;
305
+ /**
306
+ * Whether the autopilot running for `owner` may take `opened`: the agent that answers for it, or
307
+ * why not, as `autopilot.declined` records it. The mode is the caller's to check — the open path
308
+ * asks this only while running, and a live Resume only for what opened while paused — so both ask
309
+ * the same questions in the same order.
310
+ */
311
+ private eligibility;
312
+ /**
313
+ * Hold an interaction the autopilot claimed, watch it, and decide it once its surface is ready.
314
+ * `deferred` when the claim is granted only after the caller returns (the open path), so the
315
+ * decision waits a microtask for it; a late claim through `hold.claim` is granted already.
316
+ *
317
+ * The decision starts only if the autopilot still holds it then, with no pause or resume in
318
+ * between: a pause hands it over, and the Resume after that decides it itself.
319
+ */
320
+ private take;
321
+ /**
322
+ * Decide `held` once a decision is due on it (`onSurfaceReady`): at once if one is, or when its
323
+ * controller next makes one due — exposes a surface, enables an action, or says it is asking.
324
+ * Only if, by then, the autopilot still holds it with no pause or resume in between: a pause hands
325
+ * it over, and the Resume after that decides it itself.
326
+ */
327
+ private decideWhenReady;
328
+ /**
329
+ * On a live Resume: take the open interaction if it was declined only because the autopilot was
330
+ * paused when it opened, and would be claimed if it opened now — the same checks as the open
331
+ * path. Returns whether it took it. A person may have started on it; it is taken as it stands, as
332
+ * Resume takes back one a pause handed over, and the autopilot reads it as it now is.
333
+ */
334
+ private takeOpenOnResume;
335
+ /**
336
+ * Follow every interaction while it is open, claimed or not, so the status can say when the
337
+ * person is the one being waited on (see `waitingOnUser`), and tell the host each time that
338
+ * changes: when it opens, when it moves between holders, and when it settles.
339
+ */
340
+ private trackOpen;
242
341
  /** Run one decision on the flow's session, and act on how it ended. */
243
342
  private decide;
244
343
  /** The step a decision belongs to, for the refinement limit (§4.4). */
245
344
  private stepKey;
246
- /** Whether a written answer is still allowed on this step. The count resets when the step changes. */
247
- private mayRefine;
345
+ /**
346
+ * How many refining actions (written answers, and full-form actions declared `refines`) are left
347
+ * on this step: none left withdraws them all. Read fresh, so a refinement taken mid-decision (a
348
+ * `refines` action that does not settle) counts at once. The count resets when the step changes.
349
+ */
350
+ private refinementsLeft;
248
351
  private countRefinement;
249
- /** Written answers allowed per step: the config's when it is a whole number `>= 0`. */
352
+ /** Refinements allowed per step: the config's when it is a whole number `>= 0`. */
250
353
  private refinementLimit;
251
354
  /**
252
355
  * The watchdog (§4.2, critique S5): a claimed interaction whose work has gone quiet for longer
@@ -281,7 +384,10 @@ export declare class AutopilotDriver extends BaseDriverDecorator implements Auto
281
384
  private copyFor;
282
385
  private sessionFor;
283
386
  private record;
284
- /** Report that something needs the person, for the assistant to notify them (GENC-1676). */
387
+ /**
388
+ * Report that something needs the person, for the assistant to notify them (GENC-1676), with the
389
+ * widget's own message when it gave one (GENC-1660).
390
+ */
285
391
  private attention;
286
392
  /**
287
393
  * Report the autopilot stopping work on its own (GENC-1676): after running and working, nothing
@@ -1 +1 @@
1
- {"version":3,"file":"autopilot-driver.d.ts","sourceRoot":"","sources":["../../../src/autopilot/autopilot-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,WAAW,EACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,4BAA4B,CAAC;AACjF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,KAAK,EAAE,WAAW,EAAoB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIrF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAGxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAWrE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,cAAc,CAAC;AA4E9C;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEjE;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACj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;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAavB;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IAoBxB;;;;OAIG;IACH,OAAO,CAAC,SAAS;IA2BjB,uEAAuE;IACvE,OAAO,CAAC,MAAM;IAqBd,uEAAuE;IACvE,OAAO,CAAC,OAAO;IAWf;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,eAAe;IAavB,mFAAmF;IACnF,OAAO,CAAC,eAAe;IAOvB;;;;;;OAMG;IACH,OAAO,CAAC,WAAW;IA+BnB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,SAAS;IAKjB;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ;IAyBhB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAYnB,yDAAyD;IACzD,OAAO,CAAC,SAAS;IAgBjB,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,aAAa;IAuBrB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,UAAU;IAkBlB,OAAO,CAAC,MAAM;IAId;;;OAGG;IACH,OAAO,CAAC,SAAS;IASjB;;;;;;;;;OASG;IACH,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,MAAM;CAUf;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,OAAO,KAAG,eAAe,GAAG,SACR,CAAC"}
@@ -5,15 +5,23 @@ import type { DiagnosticEntry } from '../state/persistence/diagnostics';
5
5
  import type { InteractionOpened } from '../types/interaction-interceptor';
6
6
  /** What a decision may do, set by the driver from the mode and the refinement count. */
7
7
  export interface DecisionOptions {
8
- /** `false` when the person said "decide it yourself". */
8
+ /**
9
+ * `false` when the person said "decide it yourself" — except that, whenever nothing on the
10
+ * widget can be done (every action unavailable), handing it back stays open: it is the only way
11
+ * out, and its reason tells the person why the autopilot could not decide.
12
+ */
9
13
  readonly allowHandBack: boolean;
10
- /** `false` past the refinement limit for this step. */
11
- readonly allowReply: boolean;
12
14
  /**
13
- * Called the moment a written answer is accepted — before the working agent can ask its next
14
- * question — so the refinement count is current when that question is decided.
15
+ * Refining actions (`reply`, and any full-form action declared `refines`) left on this step, read
16
+ * fresh each time; at none, every one is withdrawn. Shown on the decision. Absent: no limit.
15
17
  */
16
- readonly onReply?: () => void;
18
+ readonly refinementsLeft?: () => number;
19
+ /**
20
+ * Called the moment a refining action is accepted — before the working agent can ask its next
21
+ * question — so the refinement count is current when that question is decided. `action` is its
22
+ * name.
23
+ */
24
+ readonly onRefine?: (action: string) => void;
17
25
  }
18
26
  /**
19
27
  * A numeric guard from an autopilot's config: the value when it is a positive, finite number, the
@@ -53,6 +61,21 @@ export type DecisionOutcome =
53
61
  kind: 'aborted';
54
62
  costUsd?: number;
55
63
  };
64
+ /**
65
+ * `widget_act`'s `fields`, parsed leniently: an object is taken as it is (a model may send one
66
+ * despite the schema's string), and a Markdown code fence around the JSON is stripped.
67
+ */
68
+ export declare function parseFields(fields: unknown): {
69
+ ok: true;
70
+ value: unknown;
71
+ } | {
72
+ ok: false;
73
+ };
74
+ /**
75
+ * How to send `fields` for `action`, as a correctly escaped example: the whole `widget_act` call,
76
+ * with `fields` a JSON object inside a string, built from the action's schema where it has one.
77
+ */
78
+ export declare function fieldsExample(action: string, schema: Readonly<Record<string, unknown>> | undefined): string;
56
79
  /** What a session needs from the `AutopilotDriver` that owns it. */
57
80
  export interface AutopilotSessionDeps {
58
81
  /** The working agent this autopilot serves (its flow owner). */
@@ -155,8 +178,33 @@ export declare class AutopilotSession {
155
178
  * it on the outcome for the driver to book on its reply.
156
179
  */
157
180
  private runTurn;
158
- /** The autopilot as an agent: its config's resolvers bound to the working agent's state. */
181
+ /**
182
+ * The autopilot as an agent: its config's resolvers bound to the working agent's state. Its tools
183
+ * — the fixed three, the config's own, and its widget tools — are fixed here, once, sorted by
184
+ * name, so every decision sends the same list and the cached prefix holds.
185
+ */
159
186
  private agentConfig;
187
+ /** The widget tools, by component name; filled once, by `widgetTools`. */
188
+ private readonly toolsByWidget;
189
+ /**
190
+ * The config's widget tools as tools: their definitions and their handlers, each routed to the
191
+ * interaction of its widget type being decided. A name already `taken` (a fixed tool, one of the
192
+ * config's own, or an earlier widget tool) is skipped with a warning: `defineAutopilot` refuses
193
+ * such a config, so only one built by hand gets here.
194
+ */
195
+ private widgetTools;
196
+ /**
197
+ * The platform's line in the tail: the widget tools usable now — those of the widget the decision
198
+ * in progress is on, less any that say they are unavailable — and nothing when there are none.
199
+ */
200
+ private widgetToolsLine;
201
+ /**
202
+ * One widget tool's handler: routed to the interaction of `componentName` the autopilot is
203
+ * deciding and holds, its controller passed to `run`, its arguments checked first. Refused, with a
204
+ * reason, when no such interaction is in progress. Its result is capped, and leaves the history
205
+ * at the end of the decision, as a `widget_read` does.
206
+ */
207
+ private widgetToolHandler;
160
208
  /** `widget_read`, `widget_act` and `hand_back`, acting on the decision in progress. */
161
209
  private fixedHandlers;
162
210
  }
@@ -1 +1 @@
1
- {"version":3,"file":"autopilot-session.d.ts","sourceRoot":"","sources":["../../../src/autopilot/autopilot-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAiC,MAAM,4BAA4B,CAAC;AAEpG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,KAAK,EAEV,gBAAgB,EAChB,aAAa,EAEd,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAW1E,wFAAwF;AACxF,MAAM,WAAW,eAAe;IAC9B,yDAAyD;IACzD,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,uDAAuD;IACvD,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,QAAQ,C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KAAK,CAAuC;IACpD,+EAA+E;IAC/E,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,6DAA6D;IAC7D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC;;;;OAIG;IACH,OAAO,CAAC,UAAU,CAAC,CAAS;gBAEC,IAAI,EAAE,oBAAoB;IAoBvD;;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAyBrF;;;;;;;OAOG;IACH,cAAc,CACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE;QAAE,aAAa,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,OAAO,CAAA;KAAE,GAC/D,OAAO,CAAC,eAAe,CAAC;IAU3B;;;;;OAKG;IACH,WAAW,IAAI,eAAe,EAAE;IAShC;;;;;OAKG;IACH,OAAO,KAAK,aAAa,GAExB;IAED;;;OAGG;IACH,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI7D,uFAAuF;IACvF,KAAK,IAAI,IAAI;IAMb;;;OAGG;IACH,OAAO,IAAI,IAAI;IAOf,OAAO,CAAC,OAAO;IAMf;;;;;OAKG;YACW,OAAO;IA4GrB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IA+CnB,0EAA0E;IAC1E,OAAO,CAAC,QAAQ,CAAC,aAAa,CAG1B;IAEJ;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IAuBnB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAYvB;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IA0CzB,uFAAuF;IACvF,OAAO,CAAC,aAAa;CA0ItB"}
@@ -8,8 +8,9 @@ export declare const HAND_BACK = "hand_back";
8
8
  /**
9
9
  * The autopilot's three fixed tools (GENC-1660 §4.2, §4.6). Fixed for every decision, so the cached
10
10
  * prefix holds: what varies — the widget, its actions, their arguments — travels in the decision
11
- * message, not here. Plain string and string-array fields only, which every provider accepts
12
- * (critique round 2, N5: Gemini rejects a type-array union).
11
+ * message, not here. An autopilot's own tools and its widget tools join them, the whole list sorted
12
+ * by name and fixed for its session. Plain string and string-array fields only, which every
13
+ * provider accepts (critique round 2, N5: Gemini rejects a type-array union).
13
14
  */
14
15
  export declare const AUTOPILOT_TOOL_DEFINITIONS: ChatToolDefinition[];
15
16
  //# sourceMappingURL=autopilot-tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"autopilot-tools.d.ts","sourceRoot":"","sources":["../../../src/autopilot/autopilot-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,wCAAwC;AACxC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,uCAAuC;AACvC,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,4CAA4C;AAC5C,eAAO,MAAM,SAAS,cAAc,CAAC;AAErC;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,kBAAkB,EA4D1D,CAAC"}
1
+ {"version":3,"file":"autopilot-tools.d.ts","sourceRoot":"","sources":["../../../src/autopilot/autopilot-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,wCAAwC;AACxC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,uCAAuC;AACvC,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,4CAA4C;AAC5C,eAAO,MAAM,SAAS,cAAc,CAAC;AAErC;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,EAAE,kBAAkB,EAgE1D,CAAC"}
@@ -1,5 +1,12 @@
1
1
  import type { ChatMessage } from '@genesislcap/foundation-ai';
2
2
  import type { InteractionSurface, SurfaceAction } from '../types/interaction-surface';
3
+ /** How long one read may run, in characters: a view, a preview or a widget tool's result. */
4
+ export declare const READ_CAP_CHARS = 20000;
5
+ /**
6
+ * A read cut to {@link READ_CAP_CHARS}, with a note telling the model to ask for less. A safety
7
+ * net: each widget pages its own data, and this stops one that does not from flooding a decision.
8
+ */
9
+ export declare function capRead(text: string, max?: number): string;
3
10
  /**
4
11
  * A widget as text: what the person saw (GENC-1660 §4.7). From its registration's `asText` when it
5
12
  * has one; otherwise its name and a size-limited dump of its data — ugly, never wrong, and a nudge
@@ -11,15 +18,38 @@ export interface RenderedActions {
11
18
  readonly text: string;
12
19
  /** `numbering[n - 1]` is the action named by number `n`. */
13
20
  readonly numbering: readonly string[];
21
+ /**
22
+ * Whether any action offered can be taken now: one listed and enabled. When none can, the only
23
+ * way out is `hand_back`, which the list says.
24
+ */
25
+ readonly actionable: boolean;
14
26
  }
27
+ /** What a list of actions offers when none of them can be taken now. */
28
+ export declare const NOTHING_ENABLED_LINE = "Nothing here can be done right now: every action is unavailable. Hand it back with hand_back, saying in your reason what is unavailable and why, so the user knows what to do.";
29
+ /**
30
+ * Whether any of `actions` can be taken now, as {@link renderActions} offers them: enabled, and not
31
+ * a refining action withheld past the refinement limit.
32
+ */
33
+ export declare const anyActionable: (actions: readonly SurfaceAction[], withholdRefining?: boolean) => boolean;
15
34
  /**
16
35
  * List a surface's actions for the model (GENC-1660 §4.2). Options are numbered from 1, so they are
17
36
  * chosen by number rather than by retyping a label; platform-owned actions keep their names. An
18
37
  * unavailable action is listed, and marked, so the model knows it exists but cannot take it.
38
+ * Past the refinement limit (`withholdRefining`), a refining action is not listed at all.
39
+ *
40
+ * `refinementsLeft`, when the step has a limit, is said beneath the list wherever the surface has
41
+ * a refining action (listed or withheld), so the model can spend them knowingly. When nothing listed
42
+ * can be taken, the list ends by saying the only way out is to hand it back.
19
43
  */
20
44
  export declare function renderActions(actions: readonly SurfaceAction[], options?: {
21
- withholdReply?: boolean;
45
+ withholdRefining?: boolean;
46
+ refinementsLeft?: number;
22
47
  }): RenderedActions;
48
+ /**
49
+ * List a surface's views for the model, as lines (GENC-1660 §4.2): one view a line, with what it
50
+ * holds, and the preview marked as the one shown below. Nothing where it has no views.
51
+ */
52
+ export declare function renderViews(surface: InteractionSurface): string[];
23
53
  /** The current decision as one message for the autopilot (GENC-1660 §4.2). */
24
54
  export declare function renderDecision(opts: {
25
55
  interactionId: string;
@@ -28,8 +58,10 @@ export declare function renderDecision(opts: {
28
58
  surface: InteractionSurface;
29
59
  /** Set when the person clicked Resume to say "decide it yourself": no hand-back this time. */
30
60
  decideYourself?: boolean;
31
- /** Set past the refinement limit: `reply` is withdrawn. */
32
- withholdReply?: boolean;
61
+ /** Set past the refinement limit: every refining action (`reply`, a regenerate) is withdrawn. */
62
+ withholdRefining?: boolean;
63
+ /** Refining actions left on this step, when it has a limit: said beneath the actions. */
64
+ refinementsLeft?: number;
33
65
  }): RenderedActions;
34
66
  /**
35
67
  * A written question the working agent ended its turn on, as one message for the autopilot
@@ -1 +1 @@
1
- {"version":3,"file":"decision-message.d.ts","sourceRoot":"","sources":["../../../src/autopilot/decision-message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAMtF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAa3F;AAED,uFAAuF;AACvF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,aAAa,EAAE,EACjC,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO,GACxC,eAAe,CA2BjB;AAED,8EAA8E;AAC9E,wBAAg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,QAAQ,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GAC5F,MAAM,EAAE,CAkDV"}
@@ -1,4 +1,4 @@
1
- import type { InteractionContext } from '../../types/interaction-context';
1
+ import type { ControllerHost } from '../../types/interaction-context';
2
2
  import type { DecisionAnswer } from '../../types/interaction-surface';
3
3
  /**
4
4
  * The tag of the turn-level hand-back widget (GENC-1660 §4.10): what the autopilot shows when a
@@ -60,7 +60,7 @@ export interface HandBackResult {
60
60
  export declare class HandBackController {
61
61
  readonly data: HandBackData;
62
62
  private readonly ctx;
63
- constructor(data: HandBackData, ctx: InteractionContext);
63
+ constructor(data: HandBackData, ctx: ControllerHost<HandBackResult['payload']>);
64
64
  /** The person's choice, from the view's buttons or its text box. */
65
65
  choose(answer: DecisionAnswer): void;
66
66
  }
@@ -1 +1 @@
1
- {"version":3,"file":"hand-back.controller.d.ts","sourceRoot":"","sources":["../../../../src/autopilot/hand-back/hand-back.controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAE5D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtF;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gEAAgE;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G,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtF;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IAC5C,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,8EAA8E;IAC9E,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,cAAc,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7D;AAED;;;;GAIG;AACH,qBAAa,kBAAkB;IAE3B,QAAQ,CAAC,IAAI,EAAE,YAAY;IAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG;gBADX,IAAI,EAAE,YAAY,EACV,GAAG,EAAE,cAAc,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IASjE,oEAAoE;IACpE,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;CAWrC;AAED,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAUtE"}
@@ -1,6 +1,6 @@
1
1
  import { GenesisElement } from '@genesislcap/web-core';
2
2
  import type { AiChatInteraction } from '../../types/ai-chat-widget';
3
- import { type HandBackData, type HandBackResult } from './hand-back.controller';
3
+ import { type HandBackController, type HandBackData, type HandBackResult } from './hand-back.controller';
4
4
  /**
5
5
  * The turn-level hand-back's view (GENC-1660 §4.10): the message, the working agent's question if
6
6
  * there was one, and the choices. It only renders: choosing calls the controller, which resolves.
@@ -10,7 +10,7 @@ import { type HandBackData, type HandBackResult } from './hand-back.controller';
10
10
  */
11
11
  export declare class AutopilotHandBack extends GenesisElement {
12
12
  interactionId: string;
13
- interaction?: AiChatInteraction<HandBackData, HandBackResult['payload']>;
13
+ interaction?: AiChatInteraction<HandBackData, HandBackResult['payload'], HandBackController>;
14
14
  draft: string;
15
15
  get data(): HandBackData | undefined;
16
16
  /** What was chosen, once resolved. */
@@ -1 +1 @@
1
- {"version":3,"file":"hand-back.d.ts","sourceRoot":"","sources":["../../../../src/autopilot/hand-back/hand-back.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EAKf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAGL,KAAK,YAAY,EAEjB,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAyFhC;;;;;;GAMG;AACH,qBACa,iBAAkB,SAAQ,cAAc;IACnD,aAAa,SAAM;IACP,WAAW,CAAC,EAAE,iBAAiB,CAAC,YAAY,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;IACzE,KAAK,SAAM;IAEvB,IAAI,IAAI,IAAI,YAAY,GAAG,SAAS,CAEnC;IAED,sCAAsC;IACtC,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAM/B;IAED,OAAO,KAAK,UAAU,GAIrB;IAED,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI5B,KAAK,IAAI,IAAI;CAId"}
1
+ {"version":3,"file":"hand-back.d.ts","sourceRoot":"","sources":["../../../../src/autopilot/hand-back/hand-back.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EAKf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAEjB,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAyFhC;;;;;;GAMG;AACH,qBACa,iBAAkB,SAAQ,cAAc;IACnD,aAAa,SAAM;IACP,WAAW,CAAC,EAAE,iBAAiB,CACzC,YAAY,EACZ,cAAc,CAAC,SAAS,CAAC,EACzB,kBAAkB,CACnB,CAAC;IACU,KAAK,SAAM;IAEvB,IAAI,IAAI,IAAI,YAAY,GAAG,SAAS,CAEnC;IAED,sCAAsC;IACtC,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAM/B;IAED,OAAO,KAAK,UAAU,GAIrB;IAED,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI5B,KAAK,IAAI,IAAI;CAId"}
@@ -1,4 +1,5 @@
1
1
  export { AUTOPILOT_CLAIMANT, AutopilotDriver, type AutopilotCapability, type AutopilotDriverOptions, type AutopilotHost, type AutopilotHostState, type AutopilotMode, type PersistedAutopilotMode, } from './autopilot-driver';
2
2
  export { AUTOPILOT_HAND_BACK, type HandBackChoice, type HandBackData, type HandBackOption, type HandBackResult, } from './hand-back/hand-back.controller';
3
+ export { widgetTools, type WidgetTools, type WidgetToolSpec } from './widget-tools';
3
4
  export { AutopilotHandBack } from './hand-back/hand-back';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/autopilot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,sBAAsB,GAC5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/autopilot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,sBAAsB,GAC5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,95 @@
1
+ import type { ChatToolDefinition } from '@genesislcap/foundation-ai';
2
+ /**
3
+ * One widget tool (GENC-1660): an ordinary tool with native, typed parameters that reads from the
4
+ * widget open right now. `TController` is the widget's controller, as it was registered; `TArgs`
5
+ * the parameters, as the model sends them.
6
+ *
7
+ * @beta
8
+ */
9
+ export interface WidgetToolSpec<TController = unknown, TArgs = Record<string, unknown>> {
10
+ /**
11
+ * The tool as the model sees it, less its name (the key it is declared under). Design it to the
12
+ * same provider rules as any other tool: plain types, no type unions, no arrays of objects. Its
13
+ * description should say when it applies, e.g. "Only while a sample-data review is open.": the
14
+ * tool is offered on every decision, so the cached prefix never changes.
15
+ *
16
+ * Its `parameters`' `required` properties and their declared top-level types are checked before
17
+ * `run` is called; a mismatch is refused with the reason.
18
+ */
19
+ readonly definition: Omit<ChatToolDefinition, 'name'>;
20
+ /**
21
+ * Why it cannot be used right now, or `undefined` when it can, for a tool that applies only in
22
+ * some of its widget's states (the handler's code, once there is some). Read fresh: the tail lists
23
+ * the tool only while this is `undefined`, and a call otherwise is refused with this reason before
24
+ * `run`. Absent means whenever its widget is open; an empty string or a throw counts as
25
+ * unavailable, with a generic reason. The tool stays declared either way, so the cached prefix
26
+ * never changes.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * unavailable: (c) => (c.code ? undefined : 'No code has been generated yet.'),
31
+ * ```
32
+ */
33
+ unavailable?(controller: TController): string | undefined;
34
+ /**
35
+ * Read what was asked from the open widget's controller, and return it: JSON, or text. Reads
36
+ * only — it must never settle or change the widget; anything that does goes through a
37
+ * `widget_act` action, under the claimant's hold. A throw is reported to the model as the reason
38
+ * the read failed.
39
+ *
40
+ * What it returns is capped at about 20,000 characters, cut with a note telling the model to ask
41
+ * for less, so page anything that can grow (an `offset`, a `limit`).
42
+ */
43
+ run(controller: TController, args: TArgs): unknown | Promise<unknown>;
44
+ }
45
+ /**
46
+ * A widget's tools, bound to its component name: what {@link widgetTools} builds, and what an
47
+ * autopilot's `widgetTools` takes.
48
+ *
49
+ * @beta
50
+ */
51
+ export interface WidgetTools {
52
+ /** The widget type the tools read from: its registered component name. */
53
+ readonly componentName: string;
54
+ /** The tools, by name. */
55
+ readonly tools: Readonly<Record<string, WidgetToolSpec<unknown, Record<string, unknown>>>>;
56
+ }
57
+ /**
58
+ * Declare tools that read from one widget type (GENC-1660): parameterised reads that a view cannot
59
+ * express, such as one table's rows, or a page of them.
60
+ *
61
+ * Put them on the autopilot (`defineAutopilot({ widgetTools: [...] })`), never discovered from the
62
+ * registration. Its tool list is fixed when its session starts, sorted by name, and identical for
63
+ * every decision, so the cache never breaks. Each call is routed to the interaction of
64
+ * `componentName` the autopilot is deciding, and `run` gets its controller; with none open, it is
65
+ * refused with a reason. While one is open, the autopilot's tail says which tools are usable now.
66
+ *
67
+ * Reads only. Their results leave the autopilot's history at the end of the decision, as
68
+ * `widget_read`'s do.
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * export const SAMPLE_DATA_TOOLS = widgetTools('sample-data-review', {
73
+ * sample_data_rows: {
74
+ * definition: {
75
+ * description: "One table's rows. Only while a sample-data review is open.",
76
+ * parameters: {
77
+ * type: 'object',
78
+ * properties: { table: { type: 'string' }, offset: { type: 'integer' } },
79
+ * required: ['table'],
80
+ * },
81
+ * },
82
+ * run: (controller: SampleDataReviewController, args: { table: string; offset?: number }) =>
83
+ * controller.rows(args.table, args.offset ?? 0),
84
+ * },
85
+ * });
86
+ * ```
87
+ *
88
+ * @beta
89
+ */
90
+ export declare function widgetTools<TController, TArgs extends {
91
+ [name: string]: object;
92
+ }>(componentName: string, tools: {
93
+ [K in keyof TArgs]: WidgetToolSpec<TController, TArgs[K]>;
94
+ }): WidgetTools;
95
+ //# sourceMappingURL=widget-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-tools.d.ts","sourceRoot":"","sources":["../../../src/autopilot/widget-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE;;;;;;GAMG;AACH,MAAM,WAAW,cAAc,CAAC,WAAW,GAAG,OAAO,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACpF;;;;;;;;OAQG;IACH,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;IACtD;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,CAAC,UAAU,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;IAC1D;;;;;;;;OAQG;IACH,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACvE;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,0EAA0E;IAC1E,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,0BAA0B;IAC1B,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;CAC5F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,KAAK,SAAS;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAC/E,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE;KAAG,CAAC,IAAI,MAAM,KAAK,GAAG,cAAc,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CAAE,GACnE,WAAW,CAKb"}
@@ -169,6 +169,16 @@ export interface AgenticActivityEvents {
169
169
  * publishes it.
170
170
  */
171
171
  'agent-attention': AgentAttentionDetail;
172
+ /**
173
+ * An interaction no longer waits on the person (GENC-1660): it settled, or a claimant (such as
174
+ * the autopilot, on Resume) took it. A notification shown for it is stale, so the assistant for
175
+ * that session closes it if it is still showing. Published for every interaction, whether a
176
+ * notification was shown or not. Tab-local, like `agent-attention`.
177
+ */
178
+ 'agent-attention-ended': {
179
+ sessionKey: string;
180
+ interactionId: string;
181
+ };
172
182
  /**
173
183
  * A session's agent notification settings may have changed (GENC-1676): the person's level, what
174
184
  * the app offers, or which assistant on the page holds the session. A notification level picker
@@ -1 +1 @@
1
- {"version":3,"file":"ai-activity-channel.d.ts","sourceRoot":"","sources":["../../../src/channel/ai-activity-channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAEjF;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,qBAAqB;IACpC,2FAA2F;IAC3F,YAAY,EAAE;QAAE,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACtC,iFAAiF;IACjF,WAAW,EAAE,SAAS,CAAC;IACvB,mJAAmJ;IACnJ,aAAa,EAAE,SAAS,CAAC;IACzB,wJAAwJ;IACxJ,YAAY,EAAE,SAAS,CAAC;IACxB;;;;;OAKG;IACH,sBAAsB,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC;IACnE;;;;OAIG;IACH,wBAAwB,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAClD;;;;;;;;;;;;;;;;;;OAkBG;IACH,iBAAiB,EAAE,SAAS,CAAC;IAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,eAAe,EACX;QACE,aAAa,CAAC,EAAE,iBAAiB,CAAC;QAClC,MAAM,CAAC,EAAE,cAAc,CAAC;QACxB;;;;;;;;;WASG;QACH,MAAM,CAAC,EAAE;YACP,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,WAAW,EAAE,MAAM,CAAC;YACpB;;;;;;;;;;eAUG;YACH,MAAM,CAAC,EAAE,cAAc,CAAC;YACxB;;;;;;eAMG;YACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;SAChC,CAAC;KACH,GACD,SAAS,CAAC;IACd;;;;;;;;;;;OAWG;IACH,uBAAuB,EAAE,SAAS,CAAC;IACnC;;;;;OAKG;IACH,sBAAsB,EAAE,SAAS,CAAC;IAClC;;;;;;OAMG;IACH,iBAAiB,EAAE,oBAAoB,CAAC;IACxC;;;;OAIG;IACH,+BAA+B,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CACzD"}
1
+ {"version":3,"file":"ai-activity-channel.d.ts","sourceRoot":"","sources":["../../../src/channel/ai-activity-channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAEjF;;;;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