@genesislcap/ai-assistant 15.60.0 → 15.62.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 (134) hide show
  1. package/dist/ai-assistant.api.json +18231 -11171
  2. package/dist/ai-assistant.d.ts +1235 -9
  3. package/dist/chat-driver.cjs +658 -50
  4. package/dist/chat-driver.cjs.map +4 -4
  5. package/dist/chat-driver.mjs +657 -50
  6. package/dist/chat-driver.mjs.map +4 -4
  7. package/dist/custom-elements.json +4419 -377
  8. package/dist/dts/autopilot/autopilot-driver.d.ts +278 -0
  9. package/dist/dts/autopilot/autopilot-driver.d.ts.map +1 -0
  10. package/dist/dts/autopilot/autopilot-session.d.ts +163 -0
  11. package/dist/dts/autopilot/autopilot-session.d.ts.map +1 -0
  12. package/dist/dts/autopilot/autopilot-tools.d.ts +15 -0
  13. package/dist/dts/autopilot/autopilot-tools.d.ts.map +1 -0
  14. package/dist/dts/autopilot/decision-message.d.ts +62 -0
  15. package/dist/dts/autopilot/decision-message.d.ts.map +1 -0
  16. package/dist/dts/autopilot/hand-back/hand-back.controller.d.ts +69 -0
  17. package/dist/dts/autopilot/hand-back/hand-back.controller.d.ts.map +1 -0
  18. package/dist/dts/autopilot/hand-back/hand-back.d.ts +22 -0
  19. package/dist/dts/autopilot/hand-back/hand-back.d.ts.map +1 -0
  20. package/dist/dts/autopilot/index.d.ts +4 -0
  21. package/dist/dts/autopilot/index.d.ts.map +1 -0
  22. package/dist/dts/channel/ai-activity-bus.d.ts.map +1 -1
  23. package/dist/dts/channel/ai-activity-channel.d.ts +17 -0
  24. package/dist/dts/channel/ai-activity-channel.d.ts.map +1 -1
  25. package/dist/dts/channel/autopilot-needs-user.d.ts +8 -0
  26. package/dist/dts/channel/autopilot-needs-user.d.ts.map +1 -0
  27. package/dist/dts/components/agent-picker/agent-picker.constants.d.ts +10 -0
  28. package/dist/dts/components/agent-picker/agent-picker.constants.d.ts.map +1 -1
  29. package/dist/dts/components/agent-picker/agent-picker.d.ts +4 -0
  30. package/dist/dts/components/agent-picker/agent-picker.d.ts.map +1 -1
  31. package/dist/dts/components/agent-picker/agent-picker.template.d.ts.map +1 -1
  32. package/dist/dts/components/ai-driver/ai-driver.d.ts +34 -1
  33. package/dist/dts/components/ai-driver/ai-driver.d.ts.map +1 -1
  34. package/dist/dts/components/ai-driver/base-driver-decorator.d.ts +3 -1
  35. package/dist/dts/components/ai-driver/base-driver-decorator.d.ts.map +1 -1
  36. package/dist/dts/components/chat-bubble/chat-bubble.d.ts +21 -0
  37. package/dist/dts/components/chat-bubble/chat-bubble.d.ts.map +1 -1
  38. package/dist/dts/components/chat-bubble/chat-bubble.styles.d.ts.map +1 -1
  39. package/dist/dts/components/chat-bubble/chat-bubble.template.d.ts.map +1 -1
  40. package/dist/dts/components/chat-driver/chat-driver.d.ts +5 -1
  41. package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
  42. package/dist/dts/components/chat-driver/interaction-controller.d.ts +27 -3
  43. package/dist/dts/components/chat-driver/interaction-controller.d.ts.map +1 -1
  44. package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.d.ts +10 -2
  45. package/dist/dts/components/chat-interaction-wrapper/chat-interaction-wrapper.d.ts.map +1 -1
  46. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +9 -1
  47. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
  48. package/dist/dts/config/config.d.ts +183 -0
  49. package/dist/dts/config/config.d.ts.map +1 -1
  50. package/dist/dts/config/define-stateful-agent.d.ts +31 -1
  51. package/dist/dts/config/define-stateful-agent.d.ts.map +1 -1
  52. package/dist/dts/index.d.ts +7 -3
  53. package/dist/dts/index.d.ts.map +1 -1
  54. package/dist/dts/main/main.d.ts +128 -5
  55. package/dist/dts/main/main.d.ts.map +1 -1
  56. package/dist/dts/main/main.styles.d.ts.map +1 -1
  57. package/dist/dts/main/main.template.d.ts +2 -2
  58. package/dist/dts/main/main.template.d.ts.map +1 -1
  59. package/dist/dts/react.d.ts +10 -0
  60. package/dist/dts/state/debug-event-log.d.ts +1 -1
  61. package/dist/dts/state/debug-event-log.d.ts.map +1 -1
  62. package/dist/dts/state/decision-surface.d.ts +46 -0
  63. package/dist/dts/state/decision-surface.d.ts.map +1 -0
  64. package/dist/dts/state/interaction-context.d.ts +21 -1
  65. package/dist/dts/state/interaction-context.d.ts.map +1 -1
  66. package/dist/dts/state/interaction-registry.d.ts +63 -0
  67. package/dist/dts/state/interaction-registry.d.ts.map +1 -0
  68. package/dist/dts/state/persistence/session-persister.d.ts.map +1 -1
  69. package/dist/dts/state/persistence/session-snapshot.d.ts +21 -0
  70. package/dist/dts/state/persistence/session-snapshot.d.ts.map +1 -1
  71. package/dist/dts/state/run-steps.d.ts +66 -0
  72. package/dist/dts/state/run-steps.d.ts.map +1 -0
  73. package/dist/dts/types/ai-chat-widget.d.ts +7 -1
  74. package/dist/dts/types/ai-chat-widget.d.ts.map +1 -1
  75. package/dist/dts/types/interaction-context.d.ts +66 -1
  76. package/dist/dts/types/interaction-context.d.ts.map +1 -1
  77. package/dist/dts/types/interaction-interceptor.d.ts +60 -2
  78. package/dist/dts/types/interaction-interceptor.d.ts.map +1 -1
  79. package/dist/dts/types/interaction-surface.d.ts +195 -0
  80. package/dist/dts/types/interaction-surface.d.ts.map +1 -0
  81. package/dist/dts/utils/context-tokens.d.ts +6 -0
  82. package/dist/dts/utils/context-tokens.d.ts.map +1 -1
  83. package/dist/dts/utils/delegated-message.d.ts +13 -0
  84. package/dist/dts/utils/delegated-message.d.ts.map +1 -1
  85. package/dist/dts/utils/history-transform.d.ts.map +1 -1
  86. package/dist/dts/utils/preserved-user-messages.d.ts +21 -0
  87. package/dist/dts/utils/preserved-user-messages.d.ts.map +1 -0
  88. package/dist/esm/autopilot/autopilot-driver.js +906 -0
  89. package/dist/esm/autopilot/autopilot-session.js +449 -0
  90. package/dist/esm/autopilot/autopilot-tools.js +68 -0
  91. package/dist/esm/autopilot/decision-message.js +206 -0
  92. package/dist/esm/autopilot/hand-back/hand-back.controller.js +47 -0
  93. package/dist/esm/autopilot/hand-back/hand-back.js +129 -0
  94. package/dist/esm/autopilot/index.js +4 -0
  95. package/dist/esm/channel/ai-activity-bus.js +7 -0
  96. package/dist/esm/channel/autopilot-needs-user.js +26 -0
  97. package/dist/esm/components/agent-picker/agent-picker.constants.js +10 -0
  98. package/dist/esm/components/agent-picker/agent-picker.js +11 -1
  99. package/dist/esm/components/agent-picker/agent-picker.template.js +2 -4
  100. package/dist/esm/components/ai-driver/ai-driver.js +2 -0
  101. package/dist/esm/components/ai-driver/base-driver-decorator.js +8 -0
  102. package/dist/esm/components/chat-bubble/chat-bubble.js +45 -0
  103. package/dist/esm/components/chat-bubble/chat-bubble.styles.js +26 -0
  104. package/dist/esm/components/chat-bubble/chat-bubble.template.js +13 -0
  105. package/dist/esm/components/chat-driver/chat-driver.js +53 -18
  106. package/dist/esm/components/chat-driver/interaction-controller.js +297 -12
  107. package/dist/esm/components/chat-interaction-wrapper/chat-interaction-wrapper.js +16 -2
  108. package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +28 -11
  109. package/dist/esm/config/define-stateful-agent.js +34 -29
  110. package/dist/esm/index.js +3 -0
  111. package/dist/esm/main/main.js +334 -15
  112. package/dist/esm/main/main.styles.js +126 -0
  113. package/dist/esm/main/main.template.js +116 -11
  114. package/dist/esm/state/debug-event-log.js +28 -1
  115. package/dist/esm/state/decision-surface.js +209 -0
  116. package/dist/esm/state/interaction-context.js +89 -1
  117. package/dist/esm/state/interaction-registry.js +33 -0
  118. package/dist/esm/state/persistence/session-persister.js +23 -11
  119. package/dist/esm/state/persistence/session-snapshot.js +1 -1
  120. package/dist/esm/state/run-steps.js +77 -0
  121. package/dist/esm/types/interaction-surface.js +1 -0
  122. package/dist/esm/utils/context-tokens.js +23 -9
  123. package/dist/esm/utils/delegated-message.js +15 -0
  124. package/dist/esm/utils/history-transform.js +18 -7
  125. package/dist/esm/utils/preserved-user-messages.js +31 -0
  126. package/dist/react.cjs +7 -0
  127. package/dist/react.mjs +6 -0
  128. package/docs/styling.md +1 -1
  129. package/package.json +17 -17
  130. package/sandbox/README.md +38 -2
  131. package/sandbox/autopilot.ts +358 -0
  132. package/sandbox/controls.ts +24 -1
  133. package/sandbox/fixtures.ts +2 -0
  134. package/sandbox/sandbox.ts +188 -1
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  import type React from 'react';
7
+ import type { AutopilotHandBack as AutopilotHandBackWC } from './autopilot/hand-back/hand-back';
7
8
  import type { AiActivityHalo as AiActivityHaloWC } from './components/activity-halo/activity-halo';
8
9
  import type { AgentPicker as AgentPickerWC } from './components/agent-picker/agent-picker';
9
10
  import type { AiChatBubble as AiChatBubbleWC } from './components/chat-bubble/chat-bubble';
@@ -106,6 +107,15 @@ export declare const ChatSuggestions: React.ForwardRefExoticComponent<
106
107
  >;
107
108
  export type ChatSuggestionsRef = ChatSuggestionsWC;
108
109
 
110
+ export declare const AutopilotHandBack: React.ForwardRefExoticComponent<
111
+ React.PropsWithChildren<
112
+ Omit<PublicOf<AutopilotHandBackWC>, 'children' | 'style'> &
113
+ HTMLWCProps & {
114
+ }
115
+ > & React.RefAttributes<AutopilotHandBackWC>
116
+ >;
117
+ export type AutopilotHandBackRef = AutopilotHandBackWC;
118
+
109
119
  export declare const AiActivityHalo: React.ForwardRefExoticComponent<
110
120
  React.PropsWithChildren<
111
121
  Omit<PublicOf<AiActivityHaloWC>, 'children' | 'style'> &
@@ -28,7 +28,7 @@ import type { TurnFailureReason } from '@genesislcap/foundation-ai';
28
28
  * Catalogue of meta event names. This is the documented surface — extend it as
29
29
  * new events are wired in (Tier 2/3 lifecycle, interaction, provider events).
30
30
  */
31
- export type MetaEventType = 'assistant.connected' | 'assistant.disconnected' | 'assistant.popout' | 'assistant.popin' | 'driver.created' | 'driver.wired' | 'driver.unwired' | 'state.changed' | 'turn.start' | 'turn.end' | 'turn.retry' | 'turn.error' | 'tool.failed' | 'tool.unresolved' | 'subagent.started' | 'subagent.completed' | 'subagent.failed' | 'routing.decided' | 'agent.handoff' | 'agent.pinned' | 'agent.unpinned' | 'provider.selected' | 'interaction.requested' | 'interaction.resolved' | 'interaction.external-cost' | 'interaction.external-cost-dropped' | 'interaction.outcome' | 'interaction.outcome-dropped' | 'interaction.held' | 'interaction.claim-refused' | 'external-diagnostics.folded' | 'context.updated' | 'context.threshold-crossed' | 'context.compacted' | 'context.condensed' | 'panel.toggled' | 'attachment.added' | 'file.read-failed' | 'suggestions.failed' | 'session.cleared' | 'session.switched' | 'session.switch-deferred' | 'persistence.toggled' | 'persistence.saved' | 'persistence.save-failed' | 'persistence.suppressed' | 'persistence.not-resumable' | 'persistence.restored' | 'persistence.resume-planned' | 'persistence.resume-withdrawn' | 'persistence.restore-orphan';
31
+ export type MetaEventType = 'assistant.connected' | 'assistant.disconnected' | 'assistant.popout' | 'assistant.popin' | 'driver.created' | 'driver.wired' | 'driver.unwired' | 'state.changed' | 'turn.start' | 'turn.end' | 'turn.retry' | 'turn.error' | 'tool.failed' | 'tool.unresolved' | 'subagent.started' | 'subagent.completed' | 'subagent.failed' | 'routing.decided' | 'agent.handoff' | 'agent.pinned' | 'agent.unpinned' | 'provider.selected' | 'interaction.requested' | 'interaction.resolved' | 'interaction.external-cost' | 'interaction.external-cost-dropped' | 'interaction.outcome' | 'interaction.outcome-dropped' | 'interaction.step' | 'interaction.checkpoint' | 'interaction.held' | 'interaction.claim-refused' | 'interaction.invoked' | 'autopilot.claimed' | 'autopilot.declined' | 'autopilot.decision-sent' | 'autopilot.acted' | 'autopilot.handed-back' | 'autopilot.paused' | 'autopilot.resumed' | 'autopilot.error' | 'autopilot.refinement' | 'autopilot.handback-presented' | 'autopilot.catch-up' | 'autopilot.cost-dropped' | 'external-diagnostics.folded' | 'context.updated' | 'context.threshold-crossed' | 'context.compacted' | 'context.condensed' | 'panel.toggled' | 'attachment.added' | 'file.read-failed' | 'suggestions.failed' | 'session.cleared' | 'session.switched' | 'session.switch-deferred' | 'persistence.toggled' | 'persistence.saved' | 'persistence.save-failed' | 'persistence.suppressed' | 'persistence.not-resumable' | 'persistence.restored' | 'persistence.resume-planned' | 'persistence.resume-withdrawn' | 'persistence.restore-orphan';
32
32
  /**
33
33
  * How much a reader should care about an event — lets a consumer (or an AI
34
34
  * agent) filter the timeline: skip `low` UI/bookkeeping noise, skim `normal`
@@ -1 +1 @@
1
- {"version":3,"file":"debug-event-log.d.ts","sourceRoot":"","sources":["../../../src/state/debug-event-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAErB,qBAAqB,GACrB,wBAAwB,GACxB,kBAAkB,GAClB,iBAAiB,GAEjB,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAEhB,eAAe,GACf,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,iBAAiB,GAEjB,iBAAiB,GACjB,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,mBAAmB,GAEnB,uBAAuB,GACvB,sBAAsB,GACtB,2BAA2B,GAC3B,mCAAmC,GACnC,qBAAqB,GACrB,6BAA6B,GAE7B,kBAAkB,GAClB,2BAA2B,GAE3B,6BAA6B,GAE7B,iBAAiB,GACjB,2BAA2B,GAC3B,mBAAmB,GACnB,mBAAmB,GAEnB,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,oBAAoB,GAEpB,iBAAiB,GACjB,kBAAkB,GAClB,yBAAyB,GACzB,qBAAqB,GACrB,mBAAmB,GACnB,yBAAyB,GACzB,wBAAwB,GACxB,2BAA2B,GAC3B,sBAAsB,GACtB,4BAA4B,GAC5B,8BAA8B,GAC9B,4BAA4B,CAAC;AAEjC;;;;GAIG;AACH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I,CA0BrF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAsB7C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C"}
1
+ {"version":3,"file":"debug-event-log.d.ts","sourceRoot":"","sources":["../../../src/state/debug-event-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAErB,qBAAqB,GACrB,wBAAwB,GACxB,kBAAkB,GAClB,iBAAiB,GAEjB,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAEhB,eAAe,GACf,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,iBAAiB,GAEjB,iBAAiB,GACjB,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,mBAAmB,GAEnB,uBAAuB,GACvB,sBAAsB,GACtB,2BAA2B,GAC3B,mCAAmC,GACnC,qBAAqB,GACrB,6BAA6B,GAE7B,kBAAkB,GAClB,wBAAwB,GAExB,kBAAkB,GAClB,2BAA2B,GAC3B,qBAAqB,GAErB,mBAAmB,GACnB,oBAAoB,GACpB,yBAAyB,GACzB,iBAAiB,GACjB,uBAAuB,GACvB,kBAAkB,GAClB,mBAAmB,GACnB,iBAAiB,GACjB,sBAAsB,GACtB,8BAA8B,GAC9B,oBAAoB,GACpB,wBAAwB,GAExB,6BAA6B,GAE7B,iBAAiB,GACjB,2BAA2B,GAC3B,mBAAmB,GACnB,mBAAmB,GAEnB,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,oBAAoB,GAEpB,iBAAiB,GACjB,kB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AgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,CAEnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,SAAS,EAAE,GAAG,IAAI,CA0BrF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAuB7C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C"}
@@ -0,0 +1,46 @@
1
+ import type { DecisionSpec, InteractionSurface, SurfaceSpec } from '../types/interaction-surface';
2
+ /** The `select` action a multi-select adds. Platform-owned, so never an option's id. */
3
+ export declare const SELECT_ACTION = "select";
4
+ /** The `reply` action `freeText` adds. Platform-owned, so never an option's id. */
5
+ export declare const REPLY_ACTION = "reply";
6
+ /** Why an action could not run, before anything ran. */
7
+ export interface ActionRefusal {
8
+ readonly error: 'unknown-action' | 'disabled' | 'invalid-args';
9
+ readonly message: string;
10
+ }
11
+ /** An action ready to run: what to call, and how to describe the choice to the asking tool. */
12
+ export interface PreparedAction {
13
+ /** The choice as text, for `decidedOnUsersBehalf`: an option's label, the labels picked, or the reply. */
14
+ readonly choice: string;
15
+ /** Whether it is a finishing action: only one that finishes can be an answer. */
16
+ readonly finishes: boolean;
17
+ /** Runs it. An editing action may return what changed, which the claimant is shown. */
18
+ readonly run: () => unknown | Promise<unknown>;
19
+ }
20
+ /** A decision surface: what anyone may read, plus how the platform runs an action on it. */
21
+ export interface DecisionSurface extends InteractionSurface {
22
+ /** Check `name` and `args` against the surface as it stands now, without running anything. */
23
+ prepare(name: string, args: unknown): PreparedAction | ActionRefusal;
24
+ }
25
+ /**
26
+ * Build the surface for a short-form decision (GENC-1660). Its actions are its options (by id),
27
+ * plus `select` for a multi-select and `reply` for a written answer; all of them finish. Every
28
+ * read — facts, actions, enabled-ness — is taken fresh, so the surface always describes the
29
+ * widget as it is now.
30
+ *
31
+ * Throws if an option's id collides with another or with a platform-owned name, which is a bug in
32
+ * the widget rather than something to recover from.
33
+ */
34
+ export declare function buildDecisionSurface(spec: DecisionSpec): DecisionSurface;
35
+ /**
36
+ * Check `args` against an action's schema: an object, with its `required` properties present and
37
+ * each listed property of its declared top-level `type`. Deliberately shallow — enough to refuse a
38
+ * malformed call with a reason the model can act on, without a schema library in the browser.
39
+ */
40
+ export declare function checkArgs(args: unknown, schema: Readonly<Record<string, unknown>> | undefined): string | undefined;
41
+ /**
42
+ * Build the surface for a full-form spec (GENC-1660 §4.2): named actions, some editing and some
43
+ * finishing, each guarded and schema-checked; a description; views to read. Every read is fresh.
44
+ */
45
+ export declare function buildFullSurface(spec: SurfaceSpec): DecisionSurface;
46
+ //# sourceMappingURL=decision-surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decision-surface.d.ts","sourceRoot":"","sources":["../../../src/state/decision-surface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EACZ,kBAAkB,EAElB,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAEtC,wFAAwF;AACxF,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,mFAAmF;AACnF,eAAO,MAAM,YAAY,UAAU,CAAC;AAEpC,wDAAwD;AACxD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,gBAAgB,GAAG,UAAU,GAAG,cAAc,CAAC;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,+FAA+F;AAC/F,MAAM,WAAW,cAAc;IAC7B,0GAA0G;IAC1G,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,iFAAiF;IACjF,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,GAAG,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChD;AAED,4FAA4F;AAC5F,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACzD,8FAA8F;IAC9F,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,aAAa,CAAC;CACtE;AAsBD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,eAAe,CA+FxE;AAwBD;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,GACpD,MAAM,GAAG,SAAS,CAYpB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,CA4CnE"}
@@ -1,4 +1,5 @@
1
1
  import type { InteractionContext, InteractionHolder } from '../types/interaction-context';
2
+ import { type DecisionSurface } from './decision-surface';
2
3
  /**
3
4
  * A created {@link InteractionContext} plus the host-only `dispose` handle. The
4
5
  * driver keeps the handle (so it can tear the context down on resolve/evict) and
@@ -20,6 +21,25 @@ export interface InteractionContextHandle {
20
21
  * returns `false` once the context is disposed, or when the holder is unchanged.
21
22
  */
22
23
  setHeldBy(holder: InteractionHolder): boolean;
24
+ /** Install the controller the platform built from the widget's registration (GENC-1660). */
25
+ setController(controller: unknown): void;
26
+ /**
27
+ * The surface with the platform's half — `prepare`, which checks and readies an action without
28
+ * running it. Host-only: a claimant runs actions through its `InteractionHold`, never directly.
29
+ */
30
+ readonly surface: DecisionSurface | undefined;
31
+ }
32
+ /** What the driver lends a context so it can settle itself. */
33
+ export interface InteractionContextDeps {
34
+ /**
35
+ * Settle the interaction, through the same path as a widget's `interaction-completed` (GENC-1660).
36
+ * Absent where nothing can settle it (a context built on its own in a test).
37
+ */
38
+ resolve?(result: unknown): void;
39
+ /** A checkpoint the platform handed over from work a reload cut (GENC-1660 §4.12). */
40
+ readonly checkpoint?: unknown;
41
+ /** Persist a checkpoint. Absent where nothing persists it (a context built on its own in a test). */
42
+ saveCheckpoint?(checkpoint: unknown): void;
23
43
  }
24
44
  /**
25
45
  * Create a live, per-interaction context (GENC-1390). Framework-agnostic: the
@@ -28,5 +48,5 @@ export interface InteractionContextHandle {
28
48
  *
29
49
  * @internal
30
50
  */
31
- export declare function createInteractionContext(interactionId: string): InteractionContextHandle;
51
+ export declare function createInteractionContext(interactionId: string, deps?: InteractionContextDeps): InteractionContextHandle;
32
52
  //# sourceMappingURL=interaction-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interaction-context.d.ts","sourceRoot":"","sources":["../../../src/state/interaction-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAG1F;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC;;;;OAIG;IACH,OAAO,IAAI,IAAI,CAAC;IAChB;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC;CAC/C;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,MAAM,GAAG,wBAAwB,CAmFxF"}
1
+ {"version":3,"file":"interaction-context.d.ts","sourceRoot":"","sources":["../../../src/state/interaction-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAE1F,OAAO,EAA0C,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAElG;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC;;;;OAIG;IACH,OAAO,IAAI,IAAI,CAAC;IAChB;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC;IAC9C,4FAA4F;IAC5F,aAAa,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IACzC;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,CAAC;CAC/C;AAED,+DAA+D;AAC/D,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAChC,sFAAsF;IACtF,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,qGAAqG;IACrG,cAAc,CAAC,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;CAC5C;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,MAAM,EACrB,IAAI,GAAE,sBAA2B,GAChC,wBAAwB,CAiK1B"}
@@ -0,0 +1,63 @@
1
+ import type { InteractionContext } from '../types/interaction-context';
2
+ /**
3
+ * Builds a widget's controller when its interaction is requested (GENC-1660). DOM-free: it owns the
4
+ * interaction's state, its surface and resolving it; the view only renders.
5
+ *
6
+ * @beta
7
+ */
8
+ export type InteractionControllerFactory = (data: unknown, ctx: InteractionContext) => unknown;
9
+ /**
10
+ * How a widget is registered with the platform, once, at start-up (GENC-1660).
11
+ *
12
+ * @beta
13
+ */
14
+ export interface InteractionRegistration {
15
+ /**
16
+ * Builds the controller when the interaction is requested, before anything renders. Without
17
+ * one the widget works exactly as today and is never handed to a claimant.
18
+ */
19
+ readonly controller?: InteractionControllerFactory;
20
+ /** The custom element that renders it. Defaults to the registered name. */
21
+ readonly view?: string;
22
+ /**
23
+ * What the widget shows while a claimant holds it: `'visible'` (the default; it hides only the
24
+ * buttons the claimant owns) or `'hidden'` (the wrapper drops the bubble chrome too).
25
+ */
26
+ readonly whileAutopilot?: 'visible' | 'hidden';
27
+ /**
28
+ * The widget as text: what the person saw. Without `result` the pending widget, with it what the
29
+ * resolved view shows. Used for the visible transcript a claimant reads.
30
+ */
31
+ readonly asText?: (data: unknown, result?: unknown) => string;
32
+ /**
33
+ * Whether a checkpoint a reload cut (`saved`) is the same work as this new request (`next`, its
34
+ * data), so the new interaction may take it over and skip what is already done (GENC-1660 §4.12).
35
+ * Without it, the same widget type is enough. Compare identity only — the fields the work's
36
+ * output depends on, kept in the checkpoint itself — never the model's prose, which a resumed call
37
+ * rewrites.
38
+ */
39
+ readonly sameWork?: (saved: unknown, next: unknown) => boolean;
40
+ }
41
+ /**
42
+ * Register a widget with the platform (GENC-1660): its controller, the element that renders it, how
43
+ * it behaves while a claimant holds it, and its text form. Once per name, at start-up; a second
44
+ * registration under the same name replaces the first, with a warning.
45
+ *
46
+ * Registering is optional and additive: an unregistered widget works exactly as before.
47
+ *
48
+ * @beta
49
+ */
50
+ export declare function registerInteraction(name: string, registration: InteractionRegistration): void;
51
+ /**
52
+ * The registration for a component name, or `undefined` when it has none.
53
+ *
54
+ * @beta
55
+ */
56
+ export declare function getInteractionRegistration(name: string): InteractionRegistration | undefined;
57
+ /**
58
+ * Forget every registration. For tests.
59
+ *
60
+ * @internal
61
+ */
62
+ export declare function clearInteractionRegistry(): void;
63
+ //# sourceMappingURL=interaction-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction-registry.d.ts","sourceRoot":"","sources":["../../../src/state/interaction-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGvE;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,kBAAkB,KAAK,OAAO,CAAC;AAE/F;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,4BAA4B,CAAC;IACnD,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/C;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;IAC9D;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;CAChE;AAID;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,uBAAuB,GAAG,IAAI,CAK7F;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS,CAE5F;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"session-persister.d.ts","sourceRoot":"","sources":["../../../../src/state/persistence/session-persister.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAYrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAE5E,OAAO,KAAK,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AA+CnG;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,2FAA2F;IAC3F,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;I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B,sEAAsE;IACtE,OAAO,IAAI,IAAI;CAMhB"}
1
+ {"version":3,"file":"session-persister.d.ts","sourceRoot":"","sources":["../../../../src/state/persistence/session-persister.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAYrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAE5E,OAAO,KAAK,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AA6DnG;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,2FAA2F;IAC3F,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,cAAc,EAAE,MAAM,wBAAwB,CAAC;IAC/C,+EAA+E;IAC/E,aAAa,EAAE,MAAM,MAAM,EAAE,CAAC;IAC9B,oEAAoE;IACpE,SAAS,EAAE,MAAM,QAAQ,GAAG,SAAS,CAAC;IACtC,mEAAmE;IACnE,QAAQ,EAAE,MAAM,kBAAkB,GAAG,SAAS,CAAC;IAC/C;;;;OAIG;IACH,oBAAoB,EAAE,MAAM,eAAe,EAAE,CAAC;IAC9C;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE;QAC7B,oEAAoE;QACpE,eAAe,EAAE,MAAM,CAAC;QACxB,mEAAmE;QACnE,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,+DAA+D;QAC/D,MAAM,EAAE,MAAM,CAAC;KAChB,KAAK,IAAI,CAAC;IACX,uFAAuF;IACvF,sBAAsB,CAA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AsB9B;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,iBAAiB;IAQzB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,yBAAyB;IAiBjC;;;;OAIG;YACW,cAAc;IAmO5B;;;;;;;;;;OAUG;IACG,OAAO,IAAI,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAkNpD;;;;;OAKG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAkBpC;;;;;;;OAOG;IACH,OAAO,CAAC,uBAAuB;IAU/B;;;;OAIG;IACG,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAmBvC;;;;OAIG;IACG,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAatC;;;;;OAKG;IACH,eAAe,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI;IAchD;;;;;;OAMG;IACH,mBAAmB,IAAI,IAAI;IAiB3B;;;;;;OAMG;IACG,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAYvC;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,uBAAuB;IA6C/B,sEAAsE;IACtE,OAAO,IAAI,IAAI;CAMhB"}
@@ -64,6 +64,25 @@ export interface PersistedSession {
64
64
  * predates it ignores it. Omitted rather than written empty when there is nothing to carry.
65
65
  */
66
66
  condensePolicies?: PersistedCondensePolicy[];
67
+ /**
68
+ * The autopilot's mode for the flow it was set for (GENC-1660 §4.8), restored with the session.
69
+ * Optional and additive like `condensePolicies`: absent when no autopilot was switched for the
70
+ * current flow, and a snapshot from before it existed restores with the autopilot paused.
71
+ */
72
+ autopilot?: {
73
+ onFor: string;
74
+ mode: 'running' | 'paused';
75
+ };
76
+ /**
77
+ * The checkpoint of a long action (GENC-1660 §4.12): what a widget's work had already done, so a
78
+ * reload skips it. Kept here rather than on the interaction message, which a restore trims. On
79
+ * restore it waits for the first request of the same widget type. Optional and additive, like
80
+ * `condensePolicies`.
81
+ */
82
+ checkpoint?: {
83
+ componentName: string;
84
+ value: unknown;
85
+ };
67
86
  /**
68
87
  * Interrupted-flow marker (GENC-1351 §5.9). Present when the session was saved
69
88
  * while an agent declared its current state non-resumable (`resumable === false`).
@@ -100,6 +119,8 @@ export interface PersistedSessionInput {
100
119
  activeProviderName?: string;
101
120
  agentSnapshots?: Record<string, unknown>;
102
121
  condensePolicies?: PersistedCondensePolicy[];
122
+ autopilot?: PersistedSession['autopilot'];
123
+ checkpoint?: PersistedSession['checkpoint'];
103
124
  }
104
125
  /**
105
126
  * Assemble a versioned {@link PersistedSession}, stamping `version` and
@@ -1 +1 @@
1
- {"version":3,"file":"session-snapshot.d.ts","sourceRoot":"","sources":["../../../../src/state/persistence/session-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iEAAiE;IACjE,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,kEAAkE;IAClE,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,8CAA8C;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;IAC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,GAAG,IAAI,EAC5B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC;IAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAQxE"}
1
+ {"version":3,"file":"session-snapshot.d.ts","sourceRoot":"","sources":["../../../../src/state/persistence/session-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iEAAiE;IACjE,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,kEAAkE;IAClE,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,8CAA8C;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC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Ae,EAAE,QAAQ,CAAC,MAAM,CAAC,GAChC,MAAM,EAAE,CAIV;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC;IAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAQxE"}
@@ -0,0 +1,66 @@
1
+ import type { InteractionContext } from '../types/interaction-context';
2
+ /**
3
+ * A long action's checkpoint (GENC-1660 §4.12): the steps already done, the steps that started, and
4
+ * whatever the steps returned or saved. Keep it small, and storable as JSON.
5
+ *
6
+ * @beta
7
+ */
8
+ export type StepCheckpoint = {
9
+ /** Steps that finished: skipped when the work resumes after a reload. */
10
+ readonly done: readonly string[];
11
+ /** Steps that started. One started but not done was cut mid-way, and runs again. */
12
+ readonly started?: readonly string[];
13
+ } & Record<string, unknown>;
14
+ /**
15
+ * One named step of a long action. A step is either done-or-restart (its output is kept once it
16
+ * finishes, and a cut one simply runs again) or re-attachable (it saves a job id with `save` before
17
+ * waiting, and on a re-run finds that id in the checkpoint and reconnects to the job).
18
+ *
19
+ * @beta
20
+ */
21
+ export interface Step<C extends StepCheckpoint> {
22
+ readonly name: string;
23
+ /**
24
+ * Do the step. Returns its outputs, merged into the checkpoint. `save` persists part of an
25
+ * unfinished step, such as a job id, before a long wait.
26
+ */
27
+ run(checkpoint: C, io: {
28
+ readonly signal?: AbortSignal;
29
+ save(partial: Partial<C>): void;
30
+ }): Promise<Partial<C>>;
31
+ }
32
+ /**
33
+ * How a step went, for the debug log.
34
+ *
35
+ * @beta
36
+ */
37
+ export type StepOutcome = 'started' | 'resumed' | 'done' | 'skipped';
38
+ type StepRecorder = (step: string, outcome: StepOutcome) => void;
39
+ /** Records a handed-over checkpoint that `runSteps` could not use, and why. */
40
+ type CheckpointRefusalRecorder = (reason: string, saved: unknown) => void;
41
+ /**
42
+ * Bind the debug-log recorders for a context's steps: each step's outcome, and a handed-over
43
+ * checkpoint refused as malformed. Called by the platform when it creates the context, so
44
+ * `runSteps` records under the right session without the context carrying it.
45
+ *
46
+ * @internal
47
+ */
48
+ export declare function bindStepRecorder(ctx: object, record: StepRecorder, refused?: CheckpointRefusalRecorder): void;
49
+ /**
50
+ * Run a long action as named steps, checkpointing after each one (GENC-1660 §4.12), so a reload
51
+ * skips what is already done instead of starting again.
52
+ *
53
+ * Starts from the checkpoint the platform handed over, if any — it has already decided, by widget
54
+ * type and the registration's `sameWork`, that the checkpoint is this work's — or from `initial`, the
55
+ * identity `sameWork` compares, kept in the checkpoint because the request that cut it is gone.
56
+ * Each step that is already done is skipped; the rest run in order. `ctx.state.stage` names the step
57
+ * running, and every step notifies, which is also the watchdog's heartbeat.
58
+ *
59
+ * Exported beside the context rather than added to it, so the context's own API stays small.
60
+ * Throws if `signal` aborts, before or between steps.
61
+ *
62
+ * @beta
63
+ */
64
+ export declare function runSteps<C extends StepCheckpoint>(ctx: InteractionContext<object, C>, initial: Omit<C, 'done' | 'started'>, steps: readonly Step<C>[], signal?: AbortSignal): Promise<C>;
65
+ export {};
66
+ //# sourceMappingURL=run-steps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-steps.d.ts","sourceRoot":"","sources":["../../../src/state/run-steps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,yEAAyE;IACzE,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,oFAAoF;IACpF,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACt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ractionEdit, InteractionResult } from '@genesislcap/foundation-ai';
2
2
  import type { InteractionContext } from './interaction-context';
3
3
  /**
4
4
  * The two mutually-exclusive states an interaction widget is ever in (GENC-1390).
@@ -38,6 +38,12 @@ export type AiChatInteraction<TData = unknown, TResult = unknown> = {
38
38
  * Display-only: the widget shows it, and it is never sent to a model.
39
39
  */
40
40
  outcome?: unknown;
41
+ /**
42
+ * The edits a claimant (an autopilot, say) made to the widget before it was settled, in
43
+ * order, whoever settled it. Absent when there were none. Lets the resolved view mark what
44
+ * was changed for the person rather than by them; display-only.
45
+ */
46
+ edits?: readonly InteractionEdit[];
41
47
  };
42
48
  /**
43
49
  * Interface that AI inline interaction components implement. The
@@ -1 +1 @@
1
- {"version":3,"file":"ai-chat-widget.d.ts","sourceRoot":"","sources":["../../../src/types/ai-chat-widget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,CAAC,KAAK,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,IAC5D;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,4CAA4C;IAC5C,IAAI,EAAE,KAAK,CAAC;IACZ;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,kBAAkB,EAAE,kBAAkB,CAAC;CACxC,GACD;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,wDAAwD;IACxD,IAAI,EAAE,KAAK,CAAC;IACZ,+BAA+B;IAC/B,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEN;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,YAAY,CAAC,KAAK,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO;IAC9D,qFAAqF;IACrF,aAAa,EAAE,MAAM,CAAC;IAEtB,2DAA2D;IAC3D,WAAW,EAAE,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;CAChD"}
1
+ {"version":3,"file":"ai-chat-widget.d.ts","sourceRoot":"","sources":["../../../src/types/ai-chat-widget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,CAAC,KAAK,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,IAC5D;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,4CAA4C;IAC5C,IAAI,EAAE,KAAK,CAAC;IACZ;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,kBAAkB,EAAE,kBAAkB,CAAC;CACxC,GACD;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,wDAAwD;IACxD,IAAI,EAAE,KAAK,CAAC;IACZ,+BAA+B;IAC/B,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;CACpC,CAAC;AAEN;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,YAAY,CAAC,KAAK,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO;IAC9D,qFAAqF;IACrF,aAAa,EAAE,MAAM,CAAC;IAEtB,2DAA2D;IAC3D,WAAW,EAAE,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;CAChD"}
@@ -1,3 +1,4 @@
1
+ import type { DecisionSpec, InteractionSurface, SurfaceSpec } from './interaction-surface';
1
2
  /**
2
3
  * Who holds a pending interaction: the person, or the id of the interceptor that claimed it
3
4
  * (GENC-1660). See {@link InteractionContext.heldBy}.
@@ -5,6 +6,16 @@
5
6
  * @beta
6
7
  */
7
8
  export type InteractionHolder = 'user' | (string & {});
9
+ /**
10
+ * A long action's checkpoint as persisted with the session (GENC-1660 §4.12): the widget type it
11
+ * belongs to, and the value its controller saved.
12
+ *
13
+ * @beta
14
+ */
15
+ export interface PersistedInteractionCheckpoint {
16
+ readonly componentName: string;
17
+ readonly value: unknown;
18
+ }
8
19
  /**
9
20
  * A live, per-interaction scratch space owned by the chat host (keyed by
10
21
  * `interactionId`) and handed to a widget on every (re)mount.
@@ -34,7 +45,7 @@ export type InteractionHolder = 'user' | (string & {});
34
45
  *
35
46
  * @beta
36
47
  */
37
- export interface InteractionContext<TState extends object = Record<string, unknown>> {
48
+ export interface InteractionContext<TState extends object = Record<string, unknown>, TCheckpoint = unknown> {
38
49
  /** Stable id of the interaction this context belongs to. */
39
50
  readonly interactionId: string;
40
51
  /**
@@ -90,5 +101,59 @@ export interface InteractionContext<TState extends object = Record<string, unkno
90
101
  * has already been disposed runs `fn` immediately.
91
102
  */
92
103
  onDispose(fn: () => void): void;
104
+ /**
105
+ * The widget's controller, built by the platform from its registration when the interaction was
106
+ * requested, before anything rendered. `undefined` for an unregistered widget. One per
107
+ * interaction for its whole life, so a remounted view picks up the same one.
108
+ */
109
+ readonly controller: unknown;
110
+ /**
111
+ * Settle the interaction with `result` — the controller's way to resolve, in place of an element
112
+ * emitting `interaction-completed`, so resolving needs no mounted view. Goes through the same
113
+ * path, so cost and diagnostics fold in as before. Settles once: later calls do nothing.
114
+ */
115
+ resolve(result: unknown): void;
116
+ /**
117
+ * Expose what can be decided here (the short form). Called by the controller: in its constructor
118
+ * for a pure question, or when its gate opens for a widget that works first. Calling again
119
+ * replaces it.
120
+ */
121
+ exposeDecision(decision: DecisionSpec): void;
122
+ /**
123
+ * Expose the full form, for a rich widget: a description, views to read, and named actions —
124
+ * some only edit (and do not settle), some finish. Calling again replaces the surface, as
125
+ * `exposeDecision` does.
126
+ */
127
+ exposeSurface(surface: SurfaceSpec): void;
128
+ /** The surface the controller exposed, or `undefined` until it exposes one. */
129
+ readonly surface: InteractionSurface | undefined;
130
+ /**
131
+ * Run `fn` once the surface is ready (see `InteractionSurface.isReady`) — or now if
132
+ * it already is. Readiness is re-checked on every `notify()`, so a gate whose guard turns true
133
+ * later fires it then. Never runs after the interaction ends. Returns an unsubscribe.
134
+ */
135
+ onSurfaceReady(fn: () => void): () => void;
136
+ /**
137
+ * Whether a claimant holds the interaction AND `action` is one of its enabled actions right now.
138
+ * A view hides a button with this, never with `heldBy` alone: a button the controller did not
139
+ * expose — an error-state Retry, say — is then never hidden, so nothing can strand the journey.
140
+ */
141
+ claimantOwns(action: string): boolean;
142
+ /** When the controller last called `notify()` (or the interaction opened), in epoch ms. A heartbeat. */
143
+ readonly lastActivityAt: number;
144
+ /**
145
+ * What is already done, for long work that should survive a reload: the last checkpoint saved,
146
+ * or the one the platform handed over — after a restore, the first request for the same widget
147
+ * type takes over the checkpoint the reload cut, if the registration's `sameWork` agrees.
148
+ * `undefined` for fresh work. See `runSteps`, which reads and writes it for you.
149
+ */
150
+ readonly checkpoint: TCheckpoint | undefined;
151
+ /**
152
+ * Save a checkpoint into the session snapshot, so a reload does not lose it. Kept as JSON, so it
153
+ * must be storable as JSON; keep it small and hold anything large by reference (a job id, a store
154
+ * key). One per interaction: each save replaces the last. Cleared when the interaction settles,
155
+ * and when its flow ends.
156
+ */
157
+ saveCheckpoint(checkpoint: TCheckpoint): void;
93
158
  }
94
159
  //# sourceMappingURL=interaction-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interaction-context.d.ts","sourceRoot":"","sources":["../../../src/types/interaction-context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEvD;;;;;;;;;;;;;;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@
1
1
  import type { InteractionContext } from './interaction-context';
2
+ import type { InvokeResult } from './interaction-surface';
2
3
  /**
3
4
  * The handle an interceptor uses to move a pending interaction between the person and itself
4
5
  * (GENC-1660): to the person when it hands back or is paused, back to itself when resumed.
@@ -37,14 +38,36 @@ export interface InteractionHold {
37
38
  * `heldBy`. Returns `false`, settling nothing, unless this interceptor holds it right now.
38
39
  */
39
40
  resolve(result: unknown): boolean;
41
+ /**
42
+ * Run one of the surface's actions as the claimant (GENC-1660): an option by its id, `select`
43
+ * with `{ options }`, or `reply` with `{ text }`. It runs the same code the widget's own button
44
+ * runs, and records the decision for the asking tool — the choice as the person would read it,
45
+ * and `note`, verbatim, as what they were shown about it — so `recordDecision` is not needed.
46
+ *
47
+ * A finishing action settles the interaction AS the claimant, as {@link InteractionHold.resolve}
48
+ * does, so it is stamped `answeredBy` the claimant.
49
+ *
50
+ * Refused, with nothing run, unless this interceptor holds the interaction right now, the
51
+ * surface has that action, it is enabled and `args` fit it. One action runs at a time: a call
52
+ * made while an earlier one on the same interaction is still running is refused as `'busy'`, to
53
+ * be tried again once that one has returned. A refusal lists what is enabled, so the caller can
54
+ * correct itself. `finished` says whether the interaction settled.
55
+ *
56
+ * Handing the interaction to the person (`set('user')`) while a finishing action is still
57
+ * running does not take that action's credit away: if it settles the interaction, the answer is
58
+ * the claimant's. If it does not, the interaction is the person's like any other.
59
+ */
60
+ invoke(action: string, args?: unknown, options?: {
61
+ note?: string;
62
+ }): Promise<InvokeResult>;
40
63
  }
41
64
  /**
42
65
  * What the working agent is told about an interaction an interceptor answered (GENC-1660): added
43
66
  * to the result of the tool call that requested it, as `decidedOnUsersBehalf` on an object result
44
67
  * or as a line appended to a text one.
45
68
  *
46
- * Built only from what the platform already holds — the claimant's framing, and the choice and
47
- * narration it recorded — so the text the person saw and the text the agent is told about are the
69
+ * Built only from what the platform already holds — the claimant's framing, and the choice,
70
+ * narration and edits it recorded — so the text the person saw and the text the agent is told about are the
48
71
  * same string. It never names the claimant, so the agent has nothing to repeat about one.
49
72
  *
50
73
  * @beta
@@ -56,6 +79,33 @@ export interface DelegatedDecision {
56
79
  readonly choice?: string;
57
80
  /** What the person was shown about it, verbatim, as the assistant's own words. */
58
81
  readonly shownToUser?: string;
82
+ /**
83
+ * What the claimant changed in the widget before it decided, in order, each as the claimant
84
+ * reported it (`InteractionEdit.choice`): present only when it made edits. Lets the agent know
85
+ * the interaction was altered, not just answered.
86
+ */
87
+ readonly edits?: readonly string[];
88
+ }
89
+ /**
90
+ * What the working agent is told when the PERSON settled an interaction an interceptor had already
91
+ * changed (GENC-1660): added to the result of the tool call that requested it, as
92
+ * `editedOnUsersBehalf` on an object result or as a line appended to a text one. The edits were
93
+ * made on the user's behalf before they answered; the user then confirmed them by finishing it, so
94
+ * the answer itself is theirs and is not a {@link DelegatedDecision}.
95
+ *
96
+ * Built, like a decision, only from what the platform holds — the claimant's framing and the edits
97
+ * it reported — and never names the claimant.
98
+ *
99
+ * @beta
100
+ */
101
+ export interface DelegatedEdits {
102
+ /**
103
+ * The claimant's {@link InteractionInterceptor.editFraming}, e.g. "Changed on the user's behalf
104
+ * before they answered; the user then finished it, confirming the changes".
105
+ */
106
+ readonly framing: string;
107
+ /** What the claimant changed, in order, each as it reported it (`InteractionEdit.choice`). */
108
+ readonly edits: readonly string[];
59
109
  }
60
110
  /**
61
111
  * A new interaction, as offered to each installed interceptor (GENC-1660).
@@ -103,6 +153,14 @@ export interface InteractionInterceptor {
103
153
  * would say "Decided on the user's behalf, from their brief".
104
154
  */
105
155
  readonly decisionFraming?: string;
156
+ /**
157
+ * How {@link DelegatedEdits} open, as the working agent reads them: the person finished an
158
+ * interaction this interceptor had changed first. Must say the changes were made on the user's
159
+ * behalf before they answered, and that finishing it confirmed them; must not name the
160
+ * interceptor. Defaults to "Changed on the user's behalf before the user answered; the user then
161
+ * finished it, confirming the changes".
162
+ */
163
+ readonly editFraming?: string;
106
164
  /** Return `'claim'` to hold the interaction, or nothing to leave it with the person. */
107
165
  onInteractionOpened(opened: InteractionOpened): 'claim' | undefined | void;
108
166
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interaction-interceptor.d.ts","sourceRoot":"","sources":["../../../src/types/interaction-interceptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC;IAC1C;;;;;;;;OAQG;IACH,cAAc,CAAC,QAAQ,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;IAC7E;;;;;OAKG;IACH,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC;CACnC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAiB;IAChC,0GAA0G;IAC1G,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,kFAAkF;IAClF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,4EAA4E;IAC5E,QAAQ,CAAC,GAAG,EAAE,kBAAkB,CAAC;IACjC,2FAA2F;IAC3F,QAAQ,CAAC,IAAI,EAAE,eAA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