@genesislcap/ai-assistant 15.61.0 → 15.63.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 (137) 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 +4759 -717
  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/genesis/write-commit.d.ts +17 -7
  53. package/dist/dts/genesis/write-commit.d.ts.map +1 -1
  54. package/dist/dts/index.d.ts +7 -3
  55. package/dist/dts/index.d.ts.map +1 -1
  56. package/dist/dts/main/main.d.ts +128 -5
  57. package/dist/dts/main/main.d.ts.map +1 -1
  58. package/dist/dts/main/main.styles.d.ts.map +1 -1
  59. package/dist/dts/main/main.template.d.ts +2 -2
  60. package/dist/dts/main/main.template.d.ts.map +1 -1
  61. package/dist/dts/react.d.ts +10 -0
  62. package/dist/dts/state/debug-event-log.d.ts +1 -1
  63. package/dist/dts/state/debug-event-log.d.ts.map +1 -1
  64. package/dist/dts/state/decision-surface.d.ts +46 -0
  65. package/dist/dts/state/decision-surface.d.ts.map +1 -0
  66. package/dist/dts/state/interaction-context.d.ts +21 -1
  67. package/dist/dts/state/interaction-context.d.ts.map +1 -1
  68. package/dist/dts/state/interaction-registry.d.ts +63 -0
  69. package/dist/dts/state/interaction-registry.d.ts.map +1 -0
  70. package/dist/dts/state/persistence/session-persister.d.ts.map +1 -1
  71. package/dist/dts/state/persistence/session-snapshot.d.ts +21 -0
  72. package/dist/dts/state/persistence/session-snapshot.d.ts.map +1 -1
  73. package/dist/dts/state/run-steps.d.ts +66 -0
  74. package/dist/dts/state/run-steps.d.ts.map +1 -0
  75. package/dist/dts/types/ai-chat-widget.d.ts +7 -1
  76. package/dist/dts/types/ai-chat-widget.d.ts.map +1 -1
  77. package/dist/dts/types/interaction-context.d.ts +66 -1
  78. package/dist/dts/types/interaction-context.d.ts.map +1 -1
  79. package/dist/dts/types/interaction-interceptor.d.ts +60 -2
  80. package/dist/dts/types/interaction-interceptor.d.ts.map +1 -1
  81. package/dist/dts/types/interaction-surface.d.ts +195 -0
  82. package/dist/dts/types/interaction-surface.d.ts.map +1 -0
  83. package/dist/dts/utils/context-tokens.d.ts +6 -0
  84. package/dist/dts/utils/context-tokens.d.ts.map +1 -1
  85. package/dist/dts/utils/delegated-message.d.ts +13 -0
  86. package/dist/dts/utils/delegated-message.d.ts.map +1 -1
  87. package/dist/dts/utils/history-transform.d.ts.map +1 -1
  88. package/dist/dts/utils/preserved-user-messages.d.ts +21 -0
  89. package/dist/dts/utils/preserved-user-messages.d.ts.map +1 -0
  90. package/dist/esm/autopilot/autopilot-driver.js +906 -0
  91. package/dist/esm/autopilot/autopilot-session.js +449 -0
  92. package/dist/esm/autopilot/autopilot-tools.js +68 -0
  93. package/dist/esm/autopilot/decision-message.js +206 -0
  94. package/dist/esm/autopilot/hand-back/hand-back.controller.js +47 -0
  95. package/dist/esm/autopilot/hand-back/hand-back.js +129 -0
  96. package/dist/esm/autopilot/index.js +4 -0
  97. package/dist/esm/channel/ai-activity-bus.js +7 -0
  98. package/dist/esm/channel/autopilot-needs-user.js +26 -0
  99. package/dist/esm/components/agent-picker/agent-picker.constants.js +10 -0
  100. package/dist/esm/components/agent-picker/agent-picker.js +11 -1
  101. package/dist/esm/components/agent-picker/agent-picker.template.js +2 -4
  102. package/dist/esm/components/ai-driver/ai-driver.js +2 -0
  103. package/dist/esm/components/ai-driver/base-driver-decorator.js +8 -0
  104. package/dist/esm/components/chat-bubble/chat-bubble.js +45 -0
  105. package/dist/esm/components/chat-bubble/chat-bubble.styles.js +26 -0
  106. package/dist/esm/components/chat-bubble/chat-bubble.template.js +13 -0
  107. package/dist/esm/components/chat-driver/chat-driver.js +53 -18
  108. package/dist/esm/components/chat-driver/interaction-controller.js +297 -12
  109. package/dist/esm/components/chat-interaction-wrapper/chat-interaction-wrapper.js +16 -2
  110. package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +28 -11
  111. package/dist/esm/config/define-stateful-agent.js +34 -29
  112. package/dist/esm/genesis/write-outcome.js +2 -2
  113. package/dist/esm/index.js +3 -0
  114. package/dist/esm/main/main.js +334 -15
  115. package/dist/esm/main/main.styles.js +126 -0
  116. package/dist/esm/main/main.template.js +116 -11
  117. package/dist/esm/state/debug-event-log.js +28 -1
  118. package/dist/esm/state/decision-surface.js +209 -0
  119. package/dist/esm/state/interaction-context.js +89 -1
  120. package/dist/esm/state/interaction-registry.js +33 -0
  121. package/dist/esm/state/persistence/session-persister.js +23 -11
  122. package/dist/esm/state/persistence/session-snapshot.js +1 -1
  123. package/dist/esm/state/run-steps.js +77 -0
  124. package/dist/esm/types/interaction-surface.js +1 -0
  125. package/dist/esm/utils/context-tokens.js +23 -9
  126. package/dist/esm/utils/delegated-message.js +15 -0
  127. package/dist/esm/utils/history-transform.js +18 -7
  128. package/dist/esm/utils/preserved-user-messages.js +31 -0
  129. package/dist/react.cjs +7 -0
  130. package/dist/react.mjs +6 -0
  131. package/docs/styling.md +1 -1
  132. package/package.json +17 -17
  133. package/sandbox/README.md +38 -2
  134. package/sandbox/autopilot.ts +358 -0
  135. package/sandbox/controls.ts +24 -1
  136. package/sandbox/fixtures.ts +2 -0
  137. package/sandbox/sandbox.ts +188 -1
@@ -580,6 +580,189 @@ interface BaseAgentConfig {
580
580
  * @beta
581
581
  */
582
582
  contextReserve?: ContextReserveInput;
583
+ /**
584
+ * The autopilot that may answer this agent's interactions on the user's behalf (GENC-1660). Set by
585
+ * `defineStatefulAgent`'s `autopilot` option, which binds the config to the agent's live state;
586
+ * consumed by `AutopilotDriver`. Never routed to or pinned: it is not an agent in the array.
587
+ *
588
+ * @beta
589
+ */
590
+ autopilot?: AutopilotBinding;
591
+ }
592
+ /**
593
+ * Whether an autopilot may answer a widget (GENC-1660). `'human-first'` hands it straight to the
594
+ * person; `'allowed'` lets the autopilot decide. Anything unlisted is `'human-first'`.
595
+ *
596
+ * @beta
597
+ */
598
+ export type AutopilotWidgetPolicy = 'human-first' | 'allowed';
599
+ /**
600
+ * The words the autopilot UI shows (GENC-1660). Supplied by the autopilot's config, because the
601
+ * host is platform code and must not carry any one app's wording; every field has a default.
602
+ *
603
+ * @beta
604
+ */
605
+ export interface AutopilotCopy {
606
+ /** The slim bar's status while running, e.g. "Building from your plan…". */
607
+ running: string;
608
+ /** While paused by the user. */
609
+ paused: string;
610
+ /** While the autopilot waits on one answer it handed back. */
611
+ selfPaused: string;
612
+ /** In front of a hand-back reason, in the widget's banner, e.g. "I need your input on this one:". */
613
+ handBackLead: string;
614
+ /** The toggle pill's label and its accessible name, e.g. "Autopilot". */
615
+ toggleLabel: string;
616
+ /**
617
+ * What the autopilot does, in a sentence: in the toggle's tooltip, after what clicking does.
618
+ * The place to name what it decides from, e.g. "…from your plan".
619
+ */
620
+ description: string;
621
+ /**
622
+ * What clicking the toggle does while it is on, at the head of its tooltip, e.g. "Pause
623
+ * autopilot"; also the turn-level hand-back's pause button. The toggle's accessible name is
624
+ * always `toggleLabel`: it is a pressed/not-pressed toggle, so its name does not change with it.
625
+ */
626
+ pauseLabel: string;
627
+ /** What clicking the toggle does while it is off, at the head of its tooltip, e.g. "Resume autopilot". */
628
+ resumeLabel: string;
629
+ /**
630
+ * What clicking the toggle does while the autopilot waits on a question it handed back, at the
631
+ * head of its tooltip, e.g. "Resume autopilot and force it to decide this one": resuming forces it
632
+ * to take the question back and decide it, with no way to hand it back again, so say so.
633
+ */
634
+ resumeDecideLabel: string;
635
+ /** The hand-back banner's button that keeps the autopilot paused after the answer. */
636
+ keepPausedLabel: string;
637
+ /** The tooltip on the autopilot mark, beside anything done in autopilot mode. */
638
+ markLabel: string;
639
+ /**
640
+ * The turn-level hand-back's message when the working agent stopped at its call limit, e.g. "I've
641
+ * done a lot in one go, so I've stopped to check in. Shall I carry on?".
642
+ */
643
+ checkInMessage: string;
644
+ /** The turn-level hand-back's button that carries the working agent on, e.g. "Carry on". */
645
+ carryOnLabel: string;
646
+ /** The turn-level hand-back's message when the conversation has grown too long to carry on. */
647
+ tooLongMessage: string;
648
+ /** The turn-level hand-back's button that compacts the conversation, then carries on. */
649
+ compactLabel: string;
650
+ /** The turn-level hand-back's message when the working agent's turn failed. */
651
+ failedMessage: string;
652
+ /** The turn-level hand-back's button that runs the failed step again, e.g. "Try again". */
653
+ tryAgainLabel: string;
654
+ /** The turn-level hand-back's button that sends the person's own written answer, e.g. "Send". */
655
+ sendLabel: string;
656
+ /** The hand-back reason when a decision passed its spend cap (`maxDecisionCostUsd`). */
657
+ budgetReason: string;
658
+ /** The hand-back reason when a decision failed with an error. */
659
+ errorReason: string;
660
+ /** The hand-back reason when a decision ended without acting or handing back. */
661
+ noDecisionReason: string;
662
+ /** The hand-back reason when the watchdog found the autopilot's work gone quiet (`watchdogMs`). */
663
+ watchdogReason: string;
664
+ }
665
+ /**
666
+ * An autopilot definition, generic over the state `S` of the agent it serves (GENC-1660). An
667
+ * ordinary agent definition run the other way round: it is sent each decision the agent asks of
668
+ * the user, and answers it, or hands it back.
669
+ *
670
+ * `S` appears only as a resolver parameter, so a definition whose resolvers take `unknown` (a
671
+ * shared const) is assignable to every agent's `AutopilotConfig<S>`. Keep no mutable state in a
672
+ * shared definition or its closures: one is used by every agent that references it.
673
+ *
674
+ * @beta
675
+ */
676
+ export interface AutopilotConfig<S = unknown> {
677
+ /**
678
+ * Whether the autopilot can be switched on right now, given the agent's live state — e.g. "the
679
+ * brief is approved", for an autopilot grounded in a brief. Default: whenever the agent's flow is
680
+ * active.
681
+ */
682
+ availableWhen?: (ctx: {
683
+ state: S;
684
+ }) => boolean;
685
+ /** Per widget component name; unlisted widgets are `'human-first'`. */
686
+ widgetPolicy?: Readonly<Record<string, AutopilotWidgetPolicy>>;
687
+ /** The autopilot's grounding. Keep it byte-stable for the run, so its cache prefix holds. */
688
+ systemPrompt: string | ((ctx: SystemPromptContext & {
689
+ state: S;
690
+ }) => string | Promise<string>);
691
+ /** What is true now (step guidance, a project snapshot). Rebuilt every call, never stored. */
692
+ tailContext?: string | ((ctx: SystemPromptContext & {
693
+ state: S;
694
+ }) => string | Promise<string>);
695
+ /** Which registered provider it uses. Defaults to the registry default. */
696
+ provider?: string | ((ctx: SystemPromptContext & {
697
+ state: S;
698
+ }) => string | Promise<string>);
699
+ /** Read-only tools it may use to check a fact, beside the three the platform adds. */
700
+ tools?: {
701
+ definitions: ChatToolDefinition[];
702
+ handlers: ChatToolHandlers;
703
+ };
704
+ /**
705
+ * How the working agent is told a decision was made for the user, e.g. "Decided on the user's
706
+ * behalf, from their brief". Must not name the autopilot.
707
+ */
708
+ decisionFraming?: string;
709
+ /**
710
+ * How the working agent is told that the user finished a widget the autopilot had already
711
+ * changed, e.g. "Changed on the user's behalf from their brief, before the user answered; the user
712
+ * then finished it, confirming the changes". Must say the changes came first and that finishing
713
+ * confirmed them; must not name the autopilot. Defaults to the platform's wording.
714
+ */
715
+ editFraming?: string;
716
+ /** Overrides for the UI's words. */
717
+ copy?: Partial<AutopilotCopy>;
718
+ /** Model calls per decision before it is handed back; `> 0`, or the default is used. Default 6. */
719
+ maxIterationsPerDecision?: number;
720
+ /**
721
+ * Written answers (`reply`) allowed per step before `reply` is withdrawn, so refining a proposal
722
+ * cannot loop with the working agent re-proposing it. `>= 0` (0 never offers one), or the
723
+ * default is used. Default 2. Enforced by the platform, not asked of the model: past the limit it
724
+ * can only accept or hand back.
725
+ */
726
+ maxRefinements?: number;
727
+ /**
728
+ * What counts as one step for {@link AutopilotConfig.maxRefinements}, e.g. the machine's phase
729
+ * and substate. The count resets when it changes. Default: the widget's component name, which is
730
+ * coarser but never unsafe.
731
+ */
732
+ stepKey?: (ctx: {
733
+ state: S;
734
+ }) => string;
735
+ /**
736
+ * What one decision may cost, in USD, before it is handed back; `> 0`. Unset (or not `> 0`): no
737
+ * cap (the session's budget wall still stops everything). Set it from measured decision costs,
738
+ * e.g. 3x the p95.
739
+ */
740
+ maxDecisionCostUsd?: number;
741
+ /**
742
+ * How long the autopilot's work on a claimed interaction may go quiet before it is handed back,
743
+ * in ms; `> 0`, or the default is used. Quiet means either no ready surface and no heartbeat
744
+ * (`ctx.notify()`), or a decision of its own still running with no model call landing and no
745
+ * heartbeat — a stalled model call, which has no timeout of its own. A decision handed back this
746
+ * way is stopped. Must outlast the slowest honest wait, such as a compile. Default 10 minutes.
747
+ */
748
+ watchdogMs?: number;
749
+ /**
750
+ * How large the autopilot's own history may grow, in characters, before it is rebuilt from a
751
+ * short-form digest of what the person saw (recent entries verbatim, older answered widgets as
752
+ * one line, and only the newest entries that fit in half of this). `> 0`, or the default is used.
753
+ * A safety net, not expected to fire on an ordinary run. Default 120,000 (roughly 30k tokens).
754
+ */
755
+ historyBudgetChars?: number;
756
+ }
757
+ /**
758
+ * An {@link AutopilotConfig} bound to its agent's live state — what `AgentConfig.autopilot` holds
759
+ * (GENC-1660). `state()` is `undefined` while the agent is not active.
760
+ *
761
+ * @beta
762
+ */
763
+ export interface AutopilotBinding {
764
+ readonly config: AutopilotConfig<unknown>;
765
+ state(): unknown;
583
766
  }
584
767
  /**
585
768
  * Configuration for a specialist agent.
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,4BAA4B,EAC5B,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EACV,WAAW,EACX,YAAY,EACZ,4BAA4B,EAC5B,kBAAkB,EAClB,cAAc,GACf,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,UAAU,EAAE,MAAM,CAAC;IACnB,+FAA+F;IAC/F,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yDAAyD;IACzD,MAAM,EAAE,WAAW,CAAC;IACpB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,KAAK,EAAE,OAAO,CAAC;IACf,iDAAiD;IACjD,QAAQ,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACrC,2FAA2F;IAC3F,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,uFAAuF;IACvF,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- import type { AgentConfig, AgentLifecycleContext, AgentPersistenceContext, ChatInputDuringExecutionMode, ContextReserveInput, ManualSelectionConfig, SystemPromptContext, UnresolvedToolContext } from './config';
2
+ import type { AgentConfig, AgentLifecycleContext, AutopilotConfig, AgentPersistenceContext, ChatInputDuringExecutionMode, ContextReserveInput, ManualSelectionConfig, SystemPromptContext, UnresolvedToolContext } from './config';
3
3
  /**
4
4
  * Context passed to per-turn resolvers on a stateful agent — the standard
5
5
  * {@link SystemPromptContext} plus the live `state` value. Used by
@@ -114,6 +114,15 @@ export interface StatefulAgentInit<S> {
114
114
  * reached.
115
115
  */
116
116
  toolHandlers?: (state: S) => ChatToolHandlers | Promise<ChatToolHandlers>;
117
+ /**
118
+ * The autopilot that may answer this agent's interactions on the user's behalf (GENC-1660). Its
119
+ * resolvers receive this agent's live state, typed. Build it with {@link defineAutopilot}; a
120
+ * shared definition (a const or a factory) works for any agent.
121
+ *
122
+ * Only stateful agents take one: an autopilot is scoped to a flow, and only a stateful agent
123
+ * owns one.
124
+ */
125
+ autopilot?: AutopilotConfig<S>;
117
126
  /**
118
127
  * Which registered AI provider this agent uses, by name. Either a static
119
128
  * string or a function resolved each tool-loop iteration with the current
@@ -293,4 +302,25 @@ export declare function restoreMachine(machine: {
293
302
  * @beta
294
303
  */
295
304
  export declare function defineStatefulAgent<S>(opts: StatefulAgentInit<S>): AgentConfig;
305
+ /**
306
+ * Define an autopilot for a stateful agent whose state is `S` (GENC-1660). An identity function
307
+ * that exists for its type: the resolvers get `S`, and the result goes on `defineStatefulAgent`'s
308
+ * `autopilot` option.
309
+ *
310
+ * @example
311
+ * ```ts
312
+ * defineStatefulAgent<BootstrapState>({
313
+ * name: 'bootstrap',
314
+ * …,
315
+ * autopilot: defineAutopilot<BootstrapState>({
316
+ * availableWhen: ({ state }) => briefApproved(state.machine),
317
+ * widgetPolicy: { 'planning-question': 'allowed' },
318
+ * systemPrompt: ({ state }) => `${AUTOPILOT_BASE}\n<brief>${frozenBrief(state)}</brief>`,
319
+ * }),
320
+ * });
321
+ * ```
322
+ *
323
+ * @beta
324
+ */
325
+ export declare function defineAutopilot<S = unknown>(config: AutopilotConfig<S>): AutopilotConfig<S>;
296
326
  //# sourceMappingURL=define-stateful-agent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"define-stateful-agent.d.ts","sourceRoot":"","sources":["../../../src/config/define-stateful-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACrB,uBAAuB,EAEvB,4BAA4B,EAC5B,mBAAmB,EACnB,qBAAqB,EAErB,mBAAmB,EAQnB,qBAAqB,EAEtB,MAAM,UAAU,CAAC;AAElB;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,mBAAmB,GAAG;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAEzE;;;;;;;GAOG;AACH,MAAM,MAAM,+BAA+B,CAAC,CAAC,IAAI,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,GAAG;IACxF,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,2GAA2G;IAC3G,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,+EAA+E;IAC/E,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;IAC9B,gFAAgF;IAChF,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1B,oDAAoD;IACpD,eAAe,CAAC,EAAE,qBAAqB,CAAC;IACxC,qEAAqE;IACrE,wBAAwB,CAAC,EAAE,4BAA4B,CAAC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;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AA+DD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;CAAE,EAC7E,QAAQ,EAAE,OAAO,EACjB,GAAG,SAAY,GACd,IAAI,CAON;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,WAAW,CA0P9E"}
1
+ {"version":3,"file":"define-stateful-agent.d.ts","sourceRoot":"","sources":["../../../src/config/define-stateful-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACrB,eAAe,EACf,uBAAuB,EAEvB,4BAA4B,EAC5B,mBAAmB,EACnB,qBAAqB,EAErB,mBAAmB,EAQnB,qBAAqB,EAEtB,MAAM,UAAU,CAAC;AAElB;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,mBAAmB,GAAG;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAEzE;;;;;;;GAOG;AACH,MAAM,MAAM,+BAA+B,CAAC,CAAC,IAAI,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,GAAG;IACxF,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,2GAA2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AK,EAAE,CAAC,KAAK,OAAO,CAAC;IAEzC;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC;IAElC;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,+BAA+B,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpF;;;;;;;;;;;;;OAaG;IACH,cAAc,CAAC,EAAE,mBAAmB,CAAC;IAErC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AA+DD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;CAAE,EAC7E,QAAQ,EAAE,OAAO,EACjB,GAAG,SAAY,GACd,IAAI,CAON;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,WAAW,CAiQ9E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAE3F"}
@@ -10,13 +10,23 @@ import { type GenesisWriteOutcome } from './write-outcome';
10
10
  * reopen the gap the review exists to close: the user approves what they read, and anything
11
11
  * re-derived afterwards is something they did not.
12
12
  *
13
- * There is **no pre-write validation pass**. `VALIDATE: true` is accepted and ignored by a
14
- * Create-generated handler — it declares `onCommit` only, so the platform runs it as a plain
15
- * event handler and the row is COMMITTED. Asking for a dry run there would write every row the
16
- * user was still deciding about, then report it as merely checked. What the dry run was buying
17
- * is already done client-side, before anything is sent: required fields, types, enums, dates
18
- * and read-only fields are all checked against the same metadata the server's schema validation
19
- * reads.
13
+ * There is **no pre-write validation pass** — not because one would write, but because it would
14
+ * check nothing new. `VALIDATE: true` runs a handler's `onValidate` and stops there: `onCommit`
15
+ * runs only on a message that is not a validate, after `onValidate` acked (genesis-server
16
+ * 8.15.29, `TransactionalEventHandlerContainer`; the same from 7.2.28 to 10.0.0-beta4). A
17
+ * Create-generated handler declares `onCommit` alone, so its `onValidate` is the platform's
18
+ * default, which acks; on 10.0 a Spring `@EventCommit`-only handler acks a validate without
19
+ * running at all. Recorded on the showcase: `EVENT_COUNTERPARTY_INSERT`, which has no
20
+ * `onValidate`, ACKed a `VALIDATE` and wrote nothing.
21
+ *
22
+ * So on such a handler a dry run checks the payload's schema and nothing more, and that is
23
+ * already done client-side, before anything is sent: required fields, types, enums, dates and
24
+ * read-only fields are all checked against the same metadata the server's schema validation
25
+ * reads. Where a handler does declare an `onValidate`, the commit runs it first, and its refusal
26
+ * comes back as that row's answer; a dry run would only hear it before the user approves rather
27
+ * than after. A dry run is unsafe only on hand-written code that is handed the flag and ignores
28
+ * it — a class implementing a plain, non-validating `AsyncEventHandler` or `SyncEventHandler`, or
29
+ * a Spring method taking `@IsValidateOnly` — which nothing on the wire tells apart from the rest.
20
30
  */
21
31
  export interface GenesisWriteRow {
22
32
  /** Position in the model's original list, so an outcome can be matched back to its row. */
@@ -1 +1 @@
1
- {"version":3,"file":"write-commit.d.ts","sourceRoot":"","sources":["../../../src/genesis/write-commit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAG7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;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AS,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,EAAE,EAAE,UAAU,CAAC;IACf,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,gBAAgB;AAChB,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,KAAK,EAAE,MAAM,CAAC;CACf;AAmBD;;;;;;;;;;GAUG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,SAAS,eAAe,EAAE,EAChC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,SAA6B,EAAE,EAAE,aAAa,GAC/E,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAyD7B"}
@@ -3,6 +3,7 @@ export * from './main/main.types';
3
3
  export * from './main/main.template';
4
4
  export * from './components/agent-picker';
5
5
  export * from './components/agent-session';
6
+ export * from './autopilot';
6
7
  export * from './components/ai-driver';
7
8
  export * from './components/chat-driver';
8
9
  export type { InteractionCompletedEventDetail, InteractionCostEventDetail, } from './components/chat-interaction-wrapper/chat-interaction-wrapper';
@@ -26,11 +27,14 @@ export type { TurnFailureReason } from './state/debug-event-log';
26
27
  export type { TimelineMessage } from './utils/flatten-sub-agent-messages';
27
28
  export type { CostSessionModelEntry, CostSessionRecord } from './utils/cost-session-history';
28
29
  export type { ResolvedDebugLogNoteConfig } from './utils/resolve-debug-log-note';
29
- export type { ModelTagAppearance } from '@genesislcap/foundation-ai';
30
+ export type { InteractionEdit, ModelTagAppearance } from '@genesislcap/foundation-ai';
30
31
  export type { AiChatInteraction, AiChatWidget } from './types/ai-chat-widget';
31
- export type { InteractionContext, InteractionHolder } from './types/interaction-context';
32
- export type { DelegatedDecision, InteractionHold, InteractionInterceptor, InteractionOpened, } from './types/interaction-interceptor';
32
+ export type { InteractionContext, InteractionHolder, PersistedInteractionCheckpoint, } from './types/interaction-context';
33
+ export { runSteps, type Step, type StepCheckpoint, type StepOutcome } from './state/run-steps';
34
+ export type { DelegatedDecision, DelegatedEdits, InteractionHold, InteractionInterceptor, InteractionOpened, } from './types/interaction-interceptor';
33
35
  export type { HandlerCapabilityFactory, HandlerCapabilityScope } from './types/handler-capability';
36
+ export type { DecisionAnswer, DecisionOption, DecisionSpec, InteractionSurface, InvokeResult, SurfaceAction, SurfaceActionSpec, SurfaceSpec, } from './types/interaction-surface';
37
+ export { getInteractionRegistration, registerInteraction, type InteractionControllerFactory, type InteractionRegistration, } from './state/interaction-registry';
34
38
  export { AiChatMarkdown, MARKDOWN_EXPORTPARTS } from './components/chat-markdown/chat-markdown';
35
39
  export type { GenesisChangeRequest, GenesisReviewPayload, GenesisWriteReviewCompletedEventDetail, } from './genesis/review-payload';
36
40
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,YAAY,EACV,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,gEAAgE,CAAC;AACxE,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AAGpC,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAE3F,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,C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EACtB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACnG,YAAY,EACV,cAAc,EACd,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,WAAW,GACZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EACnB,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,GAC7B,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAIhG,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACpB,sCAAsC,GACvC,MAAM,0BAA0B,CAAC"}
@@ -2,13 +2,14 @@ import type { AggregateUsage, AIProviderRegistryStatusEntry, AIServiceRefusal, A
2
2
  import { AIProviderRegistry } from '@genesislcap/foundation-ai';
3
3
  import type { Modal } from '@genesislcap/rapid-design-system';
4
4
  import { GenesisElement } from '@genesislcap/web-core';
5
+ import { type AutopilotHost, type AutopilotHostState } from '../autopilot/autopilot-driver';
5
6
  import { type SettingsModalTab, type SettingsModalTabsElement } from '../components/settings-modal';
6
- import type { AgentConfig } from '../config/config';
7
+ import type { AgentConfig, AutopilotCopy } from '../config/config';
7
8
  import { AssistantAppSettingsProvider, type AssistantAppSettingsHeading, type AssistantAppSettingsToggle } from '../provider/assistant-app-settings';
8
9
  import type { BlockedCause, VendorBudgetFigures } from '../state/ai-assistant-slice';
9
10
  import type { DebugLog } from '../state/persistence/diagnostics';
10
11
  import type { SessionPersistenceConfig } from '../state/persistence/session-persistence-provider';
11
- import type { InteractionContext } from '../types/interaction-context';
12
+ import type { InteractionContext, InteractionHolder } from '../types/interaction-context';
12
13
  import { type CompactionProjection } from '../utils/context-tokens';
13
14
  import type { CostSessionModelEntry, CostSessionRecord } from '../utils/cost-session-history';
14
15
  import type { ResolvedContextBudget } from '../utils/resolve-context-budget';
@@ -651,7 +652,7 @@ export declare class FoundationAiAssistant extends GenesisElement {
651
652
  private get transcriptBudgetExhaustedMessage();
652
653
  /**
653
654
  * Name of the agent the user has pinned via the agent picker. `null` means
654
- * automatic routing (Auto). Persisted on the session store, so it survives
655
+ * orchestration: the assistant routes each message. Persisted on the session store, so it survives
655
656
  * pop-in/pop-out but resets on page refresh.
656
657
  *
657
658
  * Only changes on explicit user action (picker click or host's `setAgent`).
@@ -1048,6 +1049,110 @@ export declare class FoundationAiAssistant extends GenesisElement {
1048
1049
  private syncShowHalo;
1049
1050
  /** True when there is a pending (unresolved) interaction. */
1050
1051
  get hasActivePendingInteraction(): boolean;
1052
+ /**
1053
+ * True when the turn is parked on the person: a pending interaction they hold. One a claimant
1054
+ * holds (the autopilot deciding it) is the assistant still working, so the halo and the loading
1055
+ * indicator stay on (GENC-1660 §4.10).
1056
+ */
1057
+ get waitingOnUser(): boolean;
1058
+ /**
1059
+ * An autopilot host supplied from outside, in place of the one this element installs — the
1060
+ * sandbox's stub, or a test's. Without it, the element reads the `AutopilotDriver` it installed
1061
+ * when some agent declares `autopilot`.
1062
+ *
1063
+ * @beta
1064
+ */
1065
+ autopilotHostOverride?: AutopilotHost;
1066
+ /** The autopilot's state and copy, mirrored for the template. Absent with no autopilot. @internal */
1067
+ autopilotState?: AutopilotHostState;
1068
+ /** @internal */
1069
+ autopilotCopy?: AutopilotCopy;
1070
+ /**
1071
+ * A pending interaction being pointed out, after the person opened the collapsed assistant from
1072
+ * its "needs you" badge: its row pulses briefly. @internal
1073
+ */
1074
+ attentionInteractionId?: string;
1075
+ private attentionTimer?;
1076
+ /** Who holds the trailing pending interaction: `'user'` unless a claimant took it. @internal */
1077
+ activeHeldBy: InteractionHolder;
1078
+ private autopilotCleanup?;
1079
+ private heldCleanup?;
1080
+ private heldInteractionId?;
1081
+ /** The autopilot behind the slim bar and the banner, if there is one. */
1082
+ get autopilotHost(): AutopilotHost | undefined;
1083
+ /** Whether the autopilot is available for the current flow, running or paused. @internal */
1084
+ get autopilotAvailable(): boolean;
1085
+ /** Running and not waiting on an answer, so its control pauses it; otherwise it resumes. @internal */
1086
+ get autopilotCanPause(): boolean;
1087
+ /**
1088
+ * What clicking the toggle does, at the head of its tooltip. While it waits on a question it
1089
+ * handed back, Resume is not a plain resume: it takes that question back and decides it, with no
1090
+ * way to hand it back again. @internal
1091
+ */
1092
+ get autopilotToggleAction(): string | undefined;
1093
+ /**
1094
+ * The toggle's tooltip: what clicking does now, then what the autopilot does. The action is here
1095
+ * and not in its accessible name: the toggle is a toggle (`aria-pressed`), so its name stays
1096
+ * `toggleLabel` and its state is announced once, by the pressed state. @internal
1097
+ */
1098
+ get autopilotToggleTitle(): string | undefined;
1099
+ /** Waiting on one answer it handed back. @internal */
1100
+ get autopilotSelfPaused(): boolean;
1101
+ /**
1102
+ * The slim bar takes the composer's place while something is happening and the autopilot runs or
1103
+ * waits on one answer, and otherwise wherever the agent's own rules would hide the composer. Running
1104
+ * but idle — stopped at a wall such as the budget, or at the end of a turn it had nothing to
1105
+ * answer for — shows what those rules show, normally the composer, with the Autopilot pill on among
1106
+ * its pills. It never forces the composer open. A host that hides the built-in composer
1107
+ * (`chatConfig.ui.hideComposer`) has no pills to put it among, so there the slim bar stays up
1108
+ * whenever the autopilot is available, running or paused, idle or not: the person can always see
1109
+ * that it is on, and pause or resume it. @internal
1110
+ */
1111
+ get slimBarVisible(): boolean;
1112
+ /**
1113
+ * What the autopilot's status region announces (GENC-1660 §4.10): the hand-back, with its reason,
1114
+ * while the autopilot waits on an answer; otherwise the slim bar's status while that shows;
1115
+ * otherwise nothing. The region stays mounted and only this text changes, so each change is
1116
+ * announced. @internal
1117
+ */
1118
+ get autopilotAnnouncement(): string;
1119
+ /**
1120
+ * The Autopilot pill among the composer's pills: available, with the composer shown — paused, or
1121
+ * running with nothing happening. Where the host hides the composer, it is in the slim bar
1122
+ * instead (see `slimBarVisible`). @internal
1123
+ */
1124
+ get composerAutopilotVisible(): boolean;
1125
+ autopilotHostOverrideChanged(): void;
1126
+ /** Follow the autopilot host's state, publishing the "needs you" signal for the bubble. */
1127
+ private wireAutopilot;
1128
+ /**
1129
+ * Scroll to the pending interaction that waits on the person, and pulse it, so opening the chat
1130
+ * from the badge lands on it rather than wherever the transcript was left.
1131
+ */
1132
+ private showWaiting;
1133
+ /** How long a pointed-out interaction pulses for. */
1134
+ private static readonly ATTENTION_MS;
1135
+ /**
1136
+ * Follow who holds the trailing pending interaction. A claimant changes it on its context, which
1137
+ * notifies, so the view re-reads it on every notification rather than once (GENC-1660 §4.3).
1138
+ */
1139
+ private syncActiveHold;
1140
+ private readActiveHold;
1141
+ /**
1142
+ * Whether a pending interaction's bubble is drawn at all. A widget registered with
1143
+ * `whileAutopilot: 'hidden'` asks for no chrome while a claimant holds it: the view renders
1144
+ * nothing, so an empty bubble would be left behind. @internal
1145
+ */
1146
+ isHiddenWhileHeld(m: ChatMessage): boolean;
1147
+ /** The hand-back banner's reason, when this interaction is the one the autopilot handed back. @internal */
1148
+ handBackReasonFor(m: ChatMessage): string | undefined;
1149
+ /** Whether to mark a message as done in autopilot mode. @internal */
1150
+ showsDelegateMark(m: ChatMessage): boolean;
1151
+ /** The autopilot mark's tooltip. @internal */
1152
+ get delegateMarkLabel(): string;
1153
+ handleAutopilotPause(): void;
1154
+ handleAutopilotResume(): void;
1155
+ handleKeepPaused(interactionId: string): void;
1051
1156
  showHaloChanged(): void;
1052
1157
  private getActiveToolNames;
1053
1158
  /**
@@ -1217,6 +1322,15 @@ export declare class FoundationAiAssistant extends GenesisElement {
1217
1322
  private syncLoadingIndicator;
1218
1323
  /** Called when the user clicks the popout button. */
1219
1324
  handlePopout(): void;
1325
+ /**
1326
+ * The key this assistant's session is published under (on the activity bus, in the debug log,
1327
+ * in storage): the wired session's once one is active, else the one its attributes imply. Not
1328
+ * always the `session-key` attribute, which can run ahead of a deferred switch and is absent when
1329
+ * the key is derived from `id` and the header title. `undefined` when it has no identity.
1330
+ *
1331
+ * @beta
1332
+ */
1333
+ get stateKey(): string | undefined;
1220
1334
  /** Returns a cache key for this instance, or undefined if the component has no identity. */
1221
1335
  private getStateKey;
1222
1336
  /**
@@ -1596,12 +1710,21 @@ export declare class FoundationAiAssistant extends GenesisElement {
1596
1710
  */
1597
1711
  get pinnedAgentColour(): string | undefined;
1598
1712
  /**
1599
- * Label beside the composer's agent glyph: `AUTO` while the orchestrator is
1600
- * routing, otherwise the pinned agent's name. The name is NOT shortened here —
1713
+ * Label beside the composer's agent glyph: the orchestration label (`Orchestration` unless the
1714
+ * host renames it) while the orchestrator is routing, otherwise the pinned agent's name. The name is NOT shortened here —
1601
1715
  * the button truncates with an ellipsis in CSS, so the full name stays
1602
1716
  * available to a screen reader and to the `title` tooltip.
1603
1717
  */
1604
1718
  get agentButtonLabel(): string;
1719
+ /**
1720
+ * The picker's name for orchestration, from `chatConfig.picker.orchestrationLabel`. Not "Auto":
1721
+ * other tools use that for picking a model tier, and here it is the agent that is chosen.
1722
+ */
1723
+ get orchestrationLabel(): string;
1724
+ /** The same choice's name in the picker menu, from `chatConfig.picker.orchestrationMenuLabel`. */
1725
+ get orchestrationMenuLabel(): string;
1726
+ /** What orchestration does, from `chatConfig.picker.orchestrationDescription`. */
1727
+ get orchestrationDescription(): string;
1605
1728
  /**
1606
1729
  * Placeholder shown in the chat input. Substitutes the pinned agent's name
1607
1730
  * when one is selected so the user has a clearer signal of where their