@genesislcap/ai-assistant 15.18.0 → 15.18.1-alpha-5b3362a.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.
- package/dist/custom-elements.json +1362 -1362
- package/package.json +17 -17
|
@@ -7528,1570 +7528,1591 @@
|
|
|
7528
7528
|
},
|
|
7529
7529
|
{
|
|
7530
7530
|
"kind": "javascript-module",
|
|
7531
|
-
"path": "src/components/chat-
|
|
7532
|
-
"declarations": [
|
|
7533
|
-
|
|
7534
|
-
"kind": "variable",
|
|
7535
|
-
"name": "styles",
|
|
7536
|
-
"default": "css`\n :host {\n position: fixed;\n inset: 0;\n pointer-events: none;\n z-index: 9999;\n overflow: visible;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .bubble {\n position: absolute;\n width: 62px;\n height: 62px;\n border-radius: 50%;\n cursor: grab;\n pointer-events: all;\n overflow: visible;\n display: flex;\n align-items: center;\n justify-content: center;\n user-select: none;\n transition:\n transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),\n box-shadow 0.25s ease;\n background: linear-gradient(135deg, #0e1628 0%, #192340 100%);\n box-shadow: 0 4px 20px rgb(0 0 0 / 45%);\n border: 2px solid rgb(255 255 255 / 15%);\n color: white;\n }\n\n .bubble img {\n width: 62px;\n height: 62px;\n border-radius: 50%;\n object-fit: cover;\n pointer-events: none;\n box-shadow: 0 4px 20px rgb(0 0 0 / 45%);\n border: 2px solid rgb(255 255 255 / 15%);\n }\n\n .bubble svg {\n pointer-events: none;\n }\n\n .bubble:hover,\n .bubble.hovered {\n transform: scale(1.18);\n }\n\n .bubble:hover img,\n .bubble.hovered img {\n box-shadow:\n 0 6px 32px rgb(0 100 255 / 55%),\n 0 0 0 3px rgb(0 120 255 / 35%);\n }\n\n .bubble:active {\n cursor: grabbing;\n }\n\n .tooltip {\n position: absolute;\n bottom: calc(100% + 10px);\n background: linear-gradient(135deg, #0078ff 0%, #0050d0 100%);\n color: #fff;\n font-size: 0.78em;\n font-weight: 600;\n letter-spacing: 0.03em;\n white-space: nowrap;\n padding: 5px 10px;\n border-radius: 8px;\n box-shadow: 0 4px 14px rgb(0 120 255 / 45%);\n pointer-events: none;\n opacity: 0%;\n translate: 0 4px;\n transition:\n opacity 0.18s ease,\n translate 0.18s ease;\n }\n\n .tooltip::after {\n content: '';\n position: absolute;\n top: 100%;\n left: var(--arrow-left, 50%);\n transform: translateX(-50%);\n border: 5px solid transparent;\n border-top-color: #0050d0;\n }\n\n .bubble:hover .tooltip,\n .bubble.hovered .tooltip {\n opacity: 100%;\n translate: 0 0;\n }\n\n .pulse-ring {\n position: absolute;\n width: 62px;\n height: 62px;\n border-radius: 50%;\n border: 2px solid rgb(0 120 255 / 50%);\n animation: pulse 2.5s ease-out infinite;\n pointer-events: none;\n }\n\n @keyframes pulse {\n 0% {\n transform: scale(1);\n opacity: 70%;\n }\n\n 70% {\n transform: scale(1.5);\n opacity: 0%;\n }\n\n 100% {\n transform: scale(1.5);\n opacity: 0%;\n }\n }\n\n .dialog {\n position: absolute;\n box-sizing: border-box;\n width: 400px;\n height: 520px;\n min-width: 300px;\n min-height: 300px;\n max-width: 50vw;\n max-height: calc(100vh - 40px);\n background: var(--neutral-layer-1);\n border-radius: 14px;\n box-shadow:\n 0 12px 50px rgb(0 0 0 / 55%),\n 0 0 0 1px rgb(255 255 255 / 6%);\n pointer-events: all;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n resize: both;\n border: 1px solid var(--neutral-stroke-rest);\n animation: dialog-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);\n }\n\n @keyframes dialog-in {\n from {\n opacity: 0%;\n transform: scale(0.85) translateY(12px);\n }\n\n to {\n opacity: 100%;\n transform: scale(1) translateY(0);\n }\n }\n\n @keyframes dialog-out {\n from {\n opacity: 100%;\n transform: scale(1) translateY(0);\n }\n\n to {\n opacity: 0%;\n transform: scale(0.85) translateY(12px);\n }\n }\n\n .dialog.closing {\n animation: dialog-out 0.2s cubic-bezier(0.4, 0, 0.6, 1) forwards;\n }\n\n .dialog-content {\n flex: 1;\n overflow: hidden;\n display: flex;\n min-height: 0;\n }\n\n .dialog-content ::slotted(*) {\n display: flex;\n flex: 1;\n width: 100%;\n min-height: 0;\n }\n`"
|
|
7537
|
-
}
|
|
7538
|
-
],
|
|
7539
|
-
"exports": [
|
|
7540
|
-
{
|
|
7541
|
-
"kind": "js",
|
|
7542
|
-
"name": "styles",
|
|
7543
|
-
"declaration": {
|
|
7544
|
-
"name": "styles",
|
|
7545
|
-
"module": "src/components/chat-bubble/chat-bubble.styles.ts"
|
|
7546
|
-
}
|
|
7547
|
-
}
|
|
7548
|
-
]
|
|
7531
|
+
"path": "src/components/chat-driver/align-event-globals.ts",
|
|
7532
|
+
"declarations": [],
|
|
7533
|
+
"exports": []
|
|
7549
7534
|
},
|
|
7550
7535
|
{
|
|
7551
7536
|
"kind": "javascript-module",
|
|
7552
|
-
"path": "src/components/chat-
|
|
7537
|
+
"path": "src/components/chat-driver/chat-driver.ts",
|
|
7553
7538
|
"declarations": [
|
|
7554
7539
|
{
|
|
7555
|
-
"kind": "
|
|
7556
|
-
"name": "
|
|
7557
|
-
"
|
|
7558
|
-
"
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
}
|
|
7563
|
-
],
|
|
7564
|
-
"exports": [
|
|
7565
|
-
{
|
|
7566
|
-
"kind": "js",
|
|
7567
|
-
"name": "AiChatBubbleTemplate",
|
|
7568
|
-
"declaration": {
|
|
7569
|
-
"name": "AiChatBubbleTemplate",
|
|
7570
|
-
"module": "src/components/chat-bubble/chat-bubble.template.ts"
|
|
7571
|
-
}
|
|
7572
|
-
}
|
|
7573
|
-
]
|
|
7574
|
-
},
|
|
7575
|
-
{
|
|
7576
|
-
"kind": "javascript-module",
|
|
7577
|
-
"path": "src/components/chat-bubble/chat-bubble.ts",
|
|
7578
|
-
"declarations": [
|
|
7540
|
+
"kind": "variable",
|
|
7541
|
+
"name": "REQUEST_CONTINUATION_TOOL",
|
|
7542
|
+
"type": {
|
|
7543
|
+
"text": "string"
|
|
7544
|
+
},
|
|
7545
|
+
"default": "'request_continuation'",
|
|
7546
|
+
"description": "Name reserved for the cross-agent handoff tool — injected by OrchestratingDriver."
|
|
7547
|
+
},
|
|
7579
7548
|
{
|
|
7580
7549
|
"kind": "class",
|
|
7581
|
-
"description": "
|
|
7582
|
-
"name": "
|
|
7550
|
+
"description": "Plain TS class that drives a multi-turn chat conversation, including the tool-call loop.\nOwned by `FoundationAiAssistant` — created in `connectedCallback`, torn down in `disconnectedCallback`.\n\nDispatches `'history-updated'` events on itself so the owning element can observe changes.",
|
|
7551
|
+
"name": "ChatDriver",
|
|
7583
7552
|
"members": [
|
|
7584
7553
|
{
|
|
7585
7554
|
"kind": "field",
|
|
7586
|
-
"name": "
|
|
7555
|
+
"name": "history",
|
|
7587
7556
|
"type": {
|
|
7588
|
-
"text": "
|
|
7557
|
+
"text": "ChatMessage[]"
|
|
7589
7558
|
},
|
|
7590
|
-
"
|
|
7591
|
-
|
|
7592
|
-
{
|
|
7593
|
-
"kind": "field",
|
|
7594
|
-
"name": "imageSrc",
|
|
7595
|
-
"type": {
|
|
7596
|
-
"text": "string | undefined"
|
|
7597
|
-
}
|
|
7559
|
+
"privacy": "private",
|
|
7560
|
+
"default": "[]"
|
|
7598
7561
|
},
|
|
7599
7562
|
{
|
|
7600
7563
|
"kind": "field",
|
|
7601
|
-
"name": "
|
|
7564
|
+
"name": "busy",
|
|
7602
7565
|
"type": {
|
|
7603
|
-
"text": "
|
|
7566
|
+
"text": "boolean"
|
|
7604
7567
|
},
|
|
7605
|
-
"
|
|
7568
|
+
"privacy": "private",
|
|
7569
|
+
"default": "false"
|
|
7606
7570
|
},
|
|
7607
7571
|
{
|
|
7608
7572
|
"kind": "field",
|
|
7609
|
-
"name": "
|
|
7573
|
+
"name": "turnStartedAt",
|
|
7610
7574
|
"type": {
|
|
7611
7575
|
"text": "number"
|
|
7612
7576
|
},
|
|
7577
|
+
"privacy": "private",
|
|
7613
7578
|
"default": "0",
|
|
7614
|
-
"description": "
|
|
7579
|
+
"description": "Epoch ms when the current turn loop began — drives the `turn.end` duration."
|
|
7615
7580
|
},
|
|
7616
7581
|
{
|
|
7617
7582
|
"kind": "field",
|
|
7618
|
-
"name": "
|
|
7619
|
-
"
|
|
7620
|
-
|
|
7621
|
-
},
|
|
7622
|
-
"default": "0",
|
|
7623
|
-
"description": "Current top position of the bubble orb (px from viewport top). @internal"
|
|
7583
|
+
"name": "pendingInteractions",
|
|
7584
|
+
"privacy": "private",
|
|
7585
|
+
"default": "new Map<\n string,\n {\n resolve: (value: any) => void;\n reject: (reason?: any) => void;\n /** Present when the call requested a chat-input override. */\n overrideId?: string;\n /** Present when the call set `timeoutMs`; cleared on resolution. */\n timeoutHandle?: ReturnType<typeof setTimeout>;\n }\n >()"
|
|
7624
7586
|
},
|
|
7625
7587
|
{
|
|
7626
7588
|
"kind": "field",
|
|
7627
|
-
"name": "
|
|
7589
|
+
"name": "interactionContexts",
|
|
7590
|
+
"privacy": "private",
|
|
7591
|
+
"default": "new Map<string, InteractionContextHandle>()",
|
|
7592
|
+
"description": "Live per-interaction contexts (GENC-1390), keyed by interactionId. Created in\n`requestInteraction` alongside the pending entry, disposed + removed in\n`resolveInteraction`. Non-serialisable (sockets, timers, subscriber sets), so\nthey live here on the driver — not on the DOM, not in the persisted store — and\ntherefore survive the element remounts (layout reflow/drag, transcript\nre-render) that this feature exists to make harmless. At most one is live at a\ntime (see the one-interaction-at-a-time guard in `requestInteraction`)."
|
|
7593
|
+
},
|
|
7594
|
+
{
|
|
7595
|
+
"kind": "field",
|
|
7596
|
+
"name": "systemPrompt",
|
|
7628
7597
|
"type": {
|
|
7629
|
-
"text": "
|
|
7598
|
+
"text": "SystemPromptInput | undefined"
|
|
7630
7599
|
},
|
|
7631
|
-
"
|
|
7632
|
-
"
|
|
7600
|
+
"privacy": "private",
|
|
7601
|
+
"default": "systemPrompt"
|
|
7633
7602
|
},
|
|
7634
7603
|
{
|
|
7635
7604
|
"kind": "field",
|
|
7636
|
-
"name": "
|
|
7605
|
+
"name": "toolDefinitions",
|
|
7637
7606
|
"type": {
|
|
7638
|
-
"text": "
|
|
7607
|
+
"text": "ChatToolDefinition[]"
|
|
7639
7608
|
},
|
|
7640
|
-
"
|
|
7641
|
-
"description": "
|
|
7609
|
+
"privacy": "private",
|
|
7610
|
+
"description": "Resolved tool definitions visible to the LLM. Folds mutate this in place\n(push/pop on open/close). When `toolDefinitionsFactory` is set, this is\noverwritten each tool-loop iteration with the factory's output."
|
|
7642
7611
|
},
|
|
7643
7612
|
{
|
|
7644
7613
|
"kind": "field",
|
|
7645
|
-
"name": "
|
|
7614
|
+
"name": "toolDefinitionsFactory",
|
|
7646
7615
|
"type": {
|
|
7647
|
-
"text": "
|
|
7616
|
+
"text": "(\n ctx: SystemPromptContext,\n ) => ChatToolDefinition[] | Promise<ChatToolDefinition[]> | undefined"
|
|
7648
7617
|
},
|
|
7649
|
-
"
|
|
7650
|
-
"description": "
|
|
7618
|
+
"privacy": "private",
|
|
7619
|
+
"description": "Optional dynamic-tools source. When set, called each tool-loop iteration\nto recompute `toolDefinitions` before the LLM call. `defineStatefulAgent`\nforbids folds when this is set, so the fold-mutation path is unreachable\nin that case."
|
|
7651
7620
|
},
|
|
7652
7621
|
{
|
|
7653
7622
|
"kind": "field",
|
|
7654
|
-
"name": "
|
|
7623
|
+
"name": "toolHandlers",
|
|
7655
7624
|
"type": {
|
|
7656
|
-
"text": "
|
|
7625
|
+
"text": "ChatToolHandlers"
|
|
7657
7626
|
},
|
|
7658
|
-
"
|
|
7659
|
-
"description": "
|
|
7627
|
+
"privacy": "private",
|
|
7628
|
+
"description": "Resolved tool handler map used for dispatch. When `toolHandlersFactory` is\nset, this is overwritten each tool-loop iteration with the factory's output\n— keeping it in lockstep with `toolDefinitions` so handlers don't have to\ndefend themselves against being dispatched in states where their tool\nisn't advertised. Folds mutate this in place; `defineStatefulAgent`\nforbids folds when a factory is set, so the fold-mutation path is\nunreachable in that case."
|
|
7660
7629
|
},
|
|
7661
7630
|
{
|
|
7662
7631
|
"kind": "field",
|
|
7663
|
-
"name": "
|
|
7632
|
+
"name": "toolHandlersFactory",
|
|
7664
7633
|
"type": {
|
|
7665
|
-
"text": "
|
|
7634
|
+
"text": "(\n ctx: SystemPromptContext,\n ) => ChatToolHandlers | Promise<ChatToolHandlers> | undefined"
|
|
7666
7635
|
},
|
|
7667
|
-
"
|
|
7668
|
-
"description": "
|
|
7636
|
+
"privacy": "private",
|
|
7637
|
+
"description": "Optional per-turn handler-map source. Mirrors `toolDefinitionsFactory` so\nthe LLM-visible tools and the dispatchable handlers can be narrowed in\nlockstep. Resolved each tool-loop iteration before the LLM call."
|
|
7669
7638
|
},
|
|
7670
7639
|
{
|
|
7671
7640
|
"kind": "field",
|
|
7672
|
-
"name": "
|
|
7641
|
+
"name": "primerHistory",
|
|
7673
7642
|
"type": {
|
|
7674
|
-
"text": "
|
|
7643
|
+
"text": "ChatMessage[] | undefined"
|
|
7675
7644
|
},
|
|
7676
|
-
"
|
|
7677
|
-
"
|
|
7645
|
+
"privacy": "private",
|
|
7646
|
+
"default": "primerHistory"
|
|
7678
7647
|
},
|
|
7679
7648
|
{
|
|
7680
7649
|
"kind": "field",
|
|
7681
|
-
"name": "
|
|
7650
|
+
"name": "activeAgentName",
|
|
7682
7651
|
"type": {
|
|
7683
|
-
"text": "
|
|
7652
|
+
"text": "string | undefined"
|
|
7684
7653
|
},
|
|
7685
7654
|
"privacy": "private"
|
|
7686
7655
|
},
|
|
7687
7656
|
{
|
|
7688
7657
|
"kind": "field",
|
|
7689
|
-
"name": "
|
|
7658
|
+
"name": "activeAgentLabel",
|
|
7690
7659
|
"type": {
|
|
7691
|
-
"text": "
|
|
7660
|
+
"text": "string | undefined"
|
|
7692
7661
|
},
|
|
7693
|
-
"privacy": "private"
|
|
7662
|
+
"privacy": "private",
|
|
7663
|
+
"description": "Per-turn display label resolved from the agent's `displayName`. Stamped\nonto outgoing messages and turn snapshots for UX; `activeAgentName` stays\nstable for routing/history-transform identity matching."
|
|
7694
7664
|
},
|
|
7695
7665
|
{
|
|
7696
7666
|
"kind": "field",
|
|
7697
|
-
"name": "
|
|
7667
|
+
"name": "displayName",
|
|
7698
7668
|
"type": {
|
|
7699
|
-
"text": "
|
|
7669
|
+
"text": "SystemPromptInput | undefined"
|
|
7700
7670
|
},
|
|
7701
7671
|
"privacy": "private"
|
|
7702
7672
|
},
|
|
7703
7673
|
{
|
|
7704
7674
|
"kind": "field",
|
|
7705
|
-
"name": "
|
|
7675
|
+
"name": "hostInteractionRequester",
|
|
7706
7676
|
"type": {
|
|
7707
|
-
"text": "
|
|
7677
|
+
"text": "<T>(\n componentName: string,\n data: any,\n options?: InteractionRequestOptions,\n ) => Promise<T> | undefined"
|
|
7708
7678
|
},
|
|
7709
7679
|
"privacy": "private",
|
|
7710
|
-
"
|
|
7680
|
+
"description": "When set, `requestInteraction` delegates to this callback instead of using\nthis driver's own pending map. Wired by `invokeSubAgent` so a sub-agent's\nwidget renders in — and resolves through — the parent (ultimately the\nroot) driver, where the main UI is listening."
|
|
7711
7681
|
},
|
|
7712
7682
|
{
|
|
7713
7683
|
"kind": "field",
|
|
7714
|
-
"name": "
|
|
7684
|
+
"name": "providerHistoryTransform",
|
|
7715
7685
|
"type": {
|
|
7716
|
-
"text": "
|
|
7686
|
+
"text": "(history: ChatMessage[]) => ChatMessage[] | undefined"
|
|
7717
7687
|
},
|
|
7718
7688
|
"privacy": "private",
|
|
7719
|
-
"
|
|
7689
|
+
"description": "When set (e.g. by OrchestratingDriver), applied only to the conversation slice\nsent to the model — stored `history` stays unchanged for UI and logging."
|
|
7720
7690
|
},
|
|
7721
7691
|
{
|
|
7722
7692
|
"kind": "field",
|
|
7723
|
-
"name": "
|
|
7724
|
-
"type": {
|
|
7725
|
-
"text": "number"
|
|
7726
|
-
},
|
|
7693
|
+
"name": "condensePolicies",
|
|
7727
7694
|
"privacy": "private",
|
|
7728
|
-
"
|
|
7695
|
+
"readonly": true,
|
|
7696
|
+
"default": "new Map<string, RegisteredCondensePolicy>()",
|
|
7697
|
+
"description": "Tool-declared condensation policies, keyed by tool-call id. Populated by\n`condenseWhen` (first-wins per call); read by `applyCondensation` before each\nprovider call to collapse stale payloads from the model-bound history only.\nAccumulates across agents on a shared driver (a superseded read collapses no\nmatter which agent made it) and is never cleared — it dies with the driver."
|
|
7729
7698
|
},
|
|
7730
7699
|
{
|
|
7731
7700
|
"kind": "field",
|
|
7732
|
-
"name": "
|
|
7701
|
+
"name": "modelCallSeq",
|
|
7733
7702
|
"type": {
|
|
7734
7703
|
"text": "number"
|
|
7735
7704
|
},
|
|
7736
7705
|
"privacy": "private",
|
|
7737
|
-
"default": "0"
|
|
7706
|
+
"default": "0",
|
|
7707
|
+
"description": "Monotonic model-call counter for the driver's whole lifetime — the age clock\nfor `condenseWhen({ on: { kind: 'age' } })`. The per-`sendMessage` `iterations`\nloop counter resets to 0 every turn, so it can only measure age WITHIN a\nsingle turn; this never resets, so `age` counts model-calls since the result\nappeared across turn boundaries (each short turn still advances it ≥ 1).\nBumped once per tool-loop iteration (provider call)."
|
|
7738
7708
|
},
|
|
7739
7709
|
{
|
|
7740
7710
|
"kind": "field",
|
|
7741
|
-
"name": "
|
|
7711
|
+
"name": "turnSeq",
|
|
7742
7712
|
"type": {
|
|
7743
7713
|
"text": "number"
|
|
7744
7714
|
},
|
|
7745
7715
|
"privacy": "private",
|
|
7746
|
-
"default": "0"
|
|
7716
|
+
"default": "0",
|
|
7717
|
+
"description": "Monotonic turn counter — the `turnEnd` clock. Bumped once per `sendMessage`\n(a user turn; NOT per handoff continuation, which is the same request), never\nreset. `turnEnd` collapses a payload once `turnSeq` exceeds the turn it was\ncreated in."
|
|
7747
7718
|
},
|
|
7748
7719
|
{
|
|
7749
7720
|
"kind": "field",
|
|
7750
|
-
"name": "
|
|
7721
|
+
"name": "currentActivation",
|
|
7751
7722
|
"type": {
|
|
7752
7723
|
"text": "number"
|
|
7753
7724
|
},
|
|
7754
7725
|
"privacy": "private",
|
|
7755
|
-
"default": "0"
|
|
7726
|
+
"default": "0",
|
|
7727
|
+
"description": "Monotonic agent-activation counter — the `agentEnd` clock. Advances when the\nactive flow ends: a swap to a different-named agent (`applyAgent`) OR an\nexplicit `releaseAgent` / `completeSubAgent`. A stateful agent re-resolving\nthe same name across turns keeps one activation. `agentEnd` fires for a\npayload once a LATER activation is current (`callActivation < currentActivation`)\n— so a re-run of a released agent gets a fresh activation and is NOT\ncollapsed until IT ends."
|
|
7756
7728
|
},
|
|
7757
7729
|
{
|
|
7758
7730
|
"kind": "field",
|
|
7759
|
-
"name": "
|
|
7731
|
+
"name": "currentPhaseEpoch",
|
|
7760
7732
|
"type": {
|
|
7761
|
-
"text": "
|
|
7733
|
+
"text": "number"
|
|
7762
7734
|
},
|
|
7763
7735
|
"privacy": "private",
|
|
7764
|
-
"default": "
|
|
7736
|
+
"default": "0",
|
|
7737
|
+
"description": "Monotonic phase-epoch counter — the `phaseEnd` clock. Advanced by the\nhandler-context `endPhase()` (an app-declared phase boundary within one\nactivation), never reset. Unlike `currentActivation` it is NOT tied to agent\nswaps or releases — it ticks only when the agent itself declares a phase\ndone. `phaseEnd` fires for a payload once a LATER epoch is current\n(`callPhaseEpoch < currentPhaseEpoch`), with an `agentEnd` backstop."
|
|
7765
7738
|
},
|
|
7766
7739
|
{
|
|
7767
7740
|
"kind": "field",
|
|
7768
|
-
"name": "
|
|
7741
|
+
"name": "foldStack",
|
|
7769
7742
|
"type": {
|
|
7770
|
-
"text": "
|
|
7743
|
+
"text": "FoldStackFrame[]"
|
|
7771
7744
|
},
|
|
7772
7745
|
"privacy": "private",
|
|
7773
|
-
"default": "
|
|
7746
|
+
"default": "[]",
|
|
7747
|
+
"description": "Stack of fold frames — grows when a fold opens, shrinks when it closes."
|
|
7774
7748
|
},
|
|
7775
7749
|
{
|
|
7776
7750
|
"kind": "field",
|
|
7777
|
-
"name": "
|
|
7751
|
+
"name": "consecutiveFoldOps",
|
|
7778
7752
|
"type": {
|
|
7779
7753
|
"text": "number"
|
|
7780
7754
|
},
|
|
7781
7755
|
"privacy": "private",
|
|
7782
|
-
"default": "0"
|
|
7756
|
+
"default": "0",
|
|
7757
|
+
"description": "Consecutive fold open/close ops without a real tool call. Reset on real tool execution."
|
|
7783
7758
|
},
|
|
7784
7759
|
{
|
|
7785
7760
|
"kind": "field",
|
|
7786
|
-
"name": "
|
|
7761
|
+
"name": "consecutiveUnknownToolCalls",
|
|
7787
7762
|
"type": {
|
|
7788
|
-
"text": "number
|
|
7763
|
+
"text": "number"
|
|
7789
7764
|
},
|
|
7790
|
-
"privacy": "private"
|
|
7765
|
+
"privacy": "private",
|
|
7766
|
+
"default": "0",
|
|
7767
|
+
"description": "Consecutive unknown-tool calls without a real tool call. Reset on real tool execution."
|
|
7791
7768
|
},
|
|
7792
7769
|
{
|
|
7793
7770
|
"kind": "field",
|
|
7794
|
-
"name": "
|
|
7795
|
-
"
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
"
|
|
7771
|
+
"name": "recentUnknownToolNames",
|
|
7772
|
+
"privacy": "private",
|
|
7773
|
+
"readonly": true,
|
|
7774
|
+
"default": "new Set<string>()",
|
|
7775
|
+
"description": "Distinct unknown-tool names seen in the current consecutive streak — stamped\nonto the `unknown-tool-limit` turn.error so a triager knows which tools were\nhallucinated. Reset alongside `consecutiveUnknownToolCalls`."
|
|
7799
7776
|
},
|
|
7800
7777
|
{
|
|
7801
|
-
"kind": "
|
|
7802
|
-
"name": "
|
|
7778
|
+
"kind": "field",
|
|
7779
|
+
"name": "everSeenToolNames",
|
|
7780
|
+
"privacy": "private",
|
|
7781
|
+
"readonly": true,
|
|
7782
|
+
"default": "new Set<string>()",
|
|
7783
|
+
"description": "Union of every tool name advertised at any point during the current agent\nactivation. Lets the unknown-tool path tell a *stale* call (a real tool from\nan earlier state, now retired — or one an open exclusive fold is hiding)\napart from a *hallucinated* one. Reset on agent swap in `applyAgent`."
|
|
7803
7784
|
},
|
|
7804
7785
|
{
|
|
7805
|
-
"kind": "
|
|
7806
|
-
"name": "
|
|
7786
|
+
"kind": "field",
|
|
7787
|
+
"name": "recentStaleToolNames",
|
|
7788
|
+
"privacy": "private",
|
|
7789
|
+
"readonly": true,
|
|
7790
|
+
"default": "new Set<string>()",
|
|
7791
|
+
"description": "Subset of the current unknown-tool streak that was stale (previously\navailable) rather than hallucinated — surfaced separately on the\n`unknown-tool-limit` turn.error so triage can tell a state/prompt-design\nproblem from a model that's inventing tools. Reset alongside\n`recentUnknownToolNames`."
|
|
7807
7792
|
},
|
|
7808
7793
|
{
|
|
7809
|
-
"kind": "
|
|
7810
|
-
"name": "
|
|
7811
|
-
"
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
"type": {
|
|
7815
|
-
"text": "boolean"
|
|
7816
|
-
}
|
|
7817
|
-
},
|
|
7818
|
-
{
|
|
7819
|
-
"name": "next",
|
|
7820
|
-
"type": {
|
|
7821
|
-
"text": "boolean"
|
|
7822
|
-
}
|
|
7823
|
-
}
|
|
7824
|
-
]
|
|
7825
|
-
},
|
|
7826
|
-
{
|
|
7827
|
-
"kind": "method",
|
|
7828
|
-
"name": "dialogContentChanged",
|
|
7829
|
-
"parameters": [
|
|
7830
|
-
{
|
|
7831
|
-
"name": "_",
|
|
7832
|
-
"type": {
|
|
7833
|
-
"text": "HTMLElement[]"
|
|
7834
|
-
}
|
|
7835
|
-
},
|
|
7836
|
-
{
|
|
7837
|
-
"name": "next",
|
|
7838
|
-
"type": {
|
|
7839
|
-
"text": "HTMLElement[]"
|
|
7840
|
-
}
|
|
7841
|
-
}
|
|
7842
|
-
]
|
|
7843
|
-
},
|
|
7844
|
-
{
|
|
7845
|
-
"kind": "method",
|
|
7846
|
-
"name": "injectCloseButton",
|
|
7794
|
+
"kind": "field",
|
|
7795
|
+
"name": "maxFoldOperations",
|
|
7796
|
+
"type": {
|
|
7797
|
+
"text": "number"
|
|
7798
|
+
},
|
|
7847
7799
|
"privacy": "private",
|
|
7848
|
-
"
|
|
7849
|
-
|
|
7850
|
-
"name": "assistant",
|
|
7851
|
-
"type": {
|
|
7852
|
-
"text": "Element"
|
|
7853
|
-
}
|
|
7854
|
-
}
|
|
7855
|
-
]
|
|
7856
|
-
},
|
|
7857
|
-
{
|
|
7858
|
-
"kind": "method",
|
|
7859
|
-
"name": "onBubbleMouseDown",
|
|
7860
|
-
"parameters": [
|
|
7861
|
-
{
|
|
7862
|
-
"name": "e",
|
|
7863
|
-
"type": {
|
|
7864
|
-
"text": "MouseEvent"
|
|
7865
|
-
}
|
|
7866
|
-
}
|
|
7867
|
-
]
|
|
7868
|
-
},
|
|
7869
|
-
{
|
|
7870
|
-
"kind": "method",
|
|
7871
|
-
"name": "onDialogHeaderMouseDown",
|
|
7872
|
-
"parameters": [
|
|
7873
|
-
{
|
|
7874
|
-
"name": "e",
|
|
7875
|
-
"type": {
|
|
7876
|
-
"text": "CustomEvent<{ clientX: number; clientY: number }>"
|
|
7877
|
-
}
|
|
7878
|
-
}
|
|
7879
|
-
]
|
|
7800
|
+
"readonly": true,
|
|
7801
|
+
"default": "maxFoldOperations"
|
|
7880
7802
|
},
|
|
7881
7803
|
{
|
|
7882
7804
|
"kind": "field",
|
|
7883
|
-
"name": "
|
|
7805
|
+
"name": "subAgentsMap",
|
|
7806
|
+
"type": {
|
|
7807
|
+
"text": "Map<string, AgentConfig>"
|
|
7808
|
+
},
|
|
7884
7809
|
"privacy": "private",
|
|
7885
|
-
"
|
|
7886
|
-
|
|
7887
|
-
{
|
|
7888
|
-
"kind": "method",
|
|
7889
|
-
"name": "cancelClose",
|
|
7890
|
-
"privacy": "private"
|
|
7891
|
-
},
|
|
7892
|
-
{
|
|
7893
|
-
"kind": "method",
|
|
7894
|
-
"name": "startCloseDialog",
|
|
7895
|
-
"privacy": "private"
|
|
7810
|
+
"default": "new Map()",
|
|
7811
|
+
"description": "Sub-agents declared on the active agent config, keyed by name."
|
|
7896
7812
|
},
|
|
7897
7813
|
{
|
|
7898
7814
|
"kind": "field",
|
|
7899
|
-
"name": "
|
|
7900
|
-
"
|
|
7815
|
+
"name": "subAgentCompletion",
|
|
7816
|
+
"type": {
|
|
7817
|
+
"text": "{ result: unknown } | undefined"
|
|
7818
|
+
},
|
|
7819
|
+
"privacy": "private",
|
|
7820
|
+
"description": "Set by `completeSubAgent` inside a sub-agent tool handler. Checked at the\nsame point in the loop as `REQUEST_CONTINUATION_TOOL` — after tool results\nare appended — so the exit path mirrors the system-call pattern.\n`undefined` means the loop has not been stopped early."
|
|
7901
7821
|
},
|
|
7902
7822
|
{
|
|
7903
7823
|
"kind": "field",
|
|
7904
|
-
"name": "
|
|
7905
|
-
"
|
|
7824
|
+
"name": "isSubAgent",
|
|
7825
|
+
"type": {
|
|
7826
|
+
"text": "boolean"
|
|
7827
|
+
},
|
|
7828
|
+
"privacy": "private",
|
|
7829
|
+
"default": "false",
|
|
7830
|
+
"description": "True when this driver runs as a child sub-agent (created by a parent\ndriver's `invokeSubAgent`). Sub-agents force tool use every turn so a turn\ncan only end via their completion tool, and on any non-completion exit they\nrecord a typed `SubAgentFailureReason` instead of appending a\nuser-facing message — the parent decides how to surface the failure."
|
|
7906
7831
|
},
|
|
7907
7832
|
{
|
|
7908
7833
|
"kind": "field",
|
|
7909
|
-
"name": "
|
|
7910
|
-
"
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
"
|
|
7914
|
-
"
|
|
7915
|
-
},
|
|
7916
|
-
{
|
|
7917
|
-
"kind": "method",
|
|
7918
|
-
"name": "onCloseDialog"
|
|
7834
|
+
"name": "subAgentFailure",
|
|
7835
|
+
"type": {
|
|
7836
|
+
"text": "| {\n reason: SubAgentFailureReason;\n budget?: BudgetDetail;\n /**\n * The refusing vendor and kind, when a child hit the PROVIDER wall (GENC-1506).\n *\n * Carried for the same reason `budget` is: the child is a **separate driver instance**, so\n * nothing it sets on itself is visible to the parent. Without this the parent could report\n * `provider-refused` but not say which vendor or which kind — losing the only signal that\n * distinguishes \"top up the account\" from \"rotate the key\", since the user copy is cause-free.\n */\n providerRefused?: ProviderRefusedDetail;\n }\n | undefined"
|
|
7837
|
+
},
|
|
7838
|
+
"privacy": "private",
|
|
7839
|
+
"description": "Set when a sub-agent's tool loop ends without `completeSubAgent` being\ncalled. Read by the parent's `invokeSubAgent` to build the `{ ok: false }`\nbranch of `requestSubAgent`. Only ever set when `isSubAgent` is true.\n\n`budget` rides along on a `'budget_exhausted'` failure so the parent inherits\nthe child's ATTRIBUTION, not just the fact of a wall — see\n`budgetWallDetail`."
|
|
7919
7840
|
},
|
|
7920
7841
|
{
|
|
7921
7842
|
"kind": "field",
|
|
7922
|
-
"name": "
|
|
7843
|
+
"name": "agentReleaseRequested",
|
|
7923
7844
|
"type": {
|
|
7924
|
-
"text": "
|
|
7845
|
+
"text": "boolean"
|
|
7925
7846
|
},
|
|
7926
|
-
"
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7847
|
+
"privacy": "private",
|
|
7848
|
+
"default": "false",
|
|
7849
|
+
"description": "Set by `releaseAgent` inside a top-level tool handler — typically a stateful\nagent's terminal-state handler signalling that its flow is complete and the\nauto-pin lock can release. Checked by the orchestrator after `sendMessage`\nreturns; the orchestrator fires `onDeactivate` and clears the pin.\n\nReset at the start of each `sendMessage` so a release from a previous turn\ndoesn't leak forward."
|
|
7850
|
+
},
|
|
7930
7851
|
{
|
|
7931
|
-
"
|
|
7852
|
+
"kind": "field",
|
|
7853
|
+
"name": "turnSnapshots",
|
|
7932
7854
|
"type": {
|
|
7933
|
-
"text": "
|
|
7855
|
+
"text": "TurnSnapshot[]"
|
|
7934
7856
|
},
|
|
7935
|
-
"
|
|
7936
|
-
"
|
|
7857
|
+
"privacy": "private",
|
|
7858
|
+
"default": "[]",
|
|
7859
|
+
"description": "Ring buffer of per-LLM-call snapshots. Cap is configurable via\n`chatConfig.agent.maxTurnSnapshots`; older entries drop off as new ones\narrive. See TurnSnapshot for the captured shape."
|
|
7937
7860
|
},
|
|
7938
7861
|
{
|
|
7939
|
-
"
|
|
7862
|
+
"kind": "field",
|
|
7863
|
+
"name": "externalDiagnostics",
|
|
7940
7864
|
"type": {
|
|
7941
|
-
"text": "
|
|
7865
|
+
"text": "DiagnosticEntry[]"
|
|
7942
7866
|
},
|
|
7943
|
-
"
|
|
7867
|
+
"privacy": "private",
|
|
7868
|
+
"readonly": true,
|
|
7869
|
+
"default": "[]",
|
|
7870
|
+
"description": "`turn` + `message` diagnostic-log entries harvested from an out-of-band source (a resolved\ninteraction whose widget returned `InteractionResult.diagnostics` — e.g. a server-side\nChatDriver's debug log). `event` entries are NOT kept here — they're folded into the session's\nmeta-event registry via `mergeMetaEvents` (see `resolveInteraction`) so they inherit fresh host\nindices, and reach the log through `getMetaEvents`. Append-only; the host folds these into its\ndebug log alongside this driver's own timeline. Not cleared here — it lives with the driver\ninstance, like `turnSnapshots`, so a new chat (fresh driver) starts empty while a compaction\n(same instance) keeps it. (GENC-1461.)"
|
|
7944
7871
|
},
|
|
7945
7872
|
{
|
|
7946
|
-
"
|
|
7873
|
+
"kind": "field",
|
|
7874
|
+
"name": "externalDiagnosticsBatches",
|
|
7947
7875
|
"type": {
|
|
7948
|
-
"text": "
|
|
7876
|
+
"text": "number"
|
|
7949
7877
|
},
|
|
7950
|
-
"
|
|
7951
|
-
"
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
"superclass": {
|
|
7955
|
-
"name": "GenesisElement",
|
|
7956
|
-
"package": "@genesislcap/web-core"
|
|
7957
|
-
},
|
|
7958
|
-
"tagName": "foundation-ai-chat-bubble",
|
|
7959
|
-
"customElement": true
|
|
7960
|
-
}
|
|
7961
|
-
],
|
|
7962
|
-
"exports": [
|
|
7963
|
-
{
|
|
7964
|
-
"kind": "js",
|
|
7965
|
-
"name": "AiChatBubble",
|
|
7966
|
-
"declaration": {
|
|
7967
|
-
"name": "AiChatBubble",
|
|
7968
|
-
"module": "src/components/chat-bubble/chat-bubble.ts"
|
|
7969
|
-
}
|
|
7970
|
-
},
|
|
7971
|
-
{
|
|
7972
|
-
"kind": "custom-element-definition",
|
|
7973
|
-
"name": "foundation-ai-chat-bubble",
|
|
7974
|
-
"declaration": {
|
|
7975
|
-
"name": "AiChatBubble",
|
|
7976
|
-
"module": "src/components/chat-bubble/chat-bubble.ts"
|
|
7977
|
-
}
|
|
7978
|
-
}
|
|
7979
|
-
]
|
|
7980
|
-
},
|
|
7981
|
-
{
|
|
7982
|
-
"kind": "javascript-module",
|
|
7983
|
-
"path": "src/components/chat-bubble/index.ts",
|
|
7984
|
-
"declarations": [],
|
|
7985
|
-
"exports": [
|
|
7986
|
-
{
|
|
7987
|
-
"kind": "js",
|
|
7988
|
-
"name": "*",
|
|
7989
|
-
"declaration": {
|
|
7990
|
-
"name": "*",
|
|
7991
|
-
"package": "./chat-bubble"
|
|
7992
|
-
}
|
|
7993
|
-
}
|
|
7994
|
-
]
|
|
7995
|
-
},
|
|
7996
|
-
{
|
|
7997
|
-
"kind": "javascript-module",
|
|
7998
|
-
"path": "src/components/chat-driver/align-event-globals.ts",
|
|
7999
|
-
"declarations": [],
|
|
8000
|
-
"exports": []
|
|
8001
|
-
},
|
|
8002
|
-
{
|
|
8003
|
-
"kind": "javascript-module",
|
|
8004
|
-
"path": "src/components/chat-driver/chat-driver.ts",
|
|
8005
|
-
"declarations": [
|
|
8006
|
-
{
|
|
8007
|
-
"kind": "variable",
|
|
8008
|
-
"name": "REQUEST_CONTINUATION_TOOL",
|
|
8009
|
-
"type": {
|
|
8010
|
-
"text": "string"
|
|
8011
|
-
},
|
|
8012
|
-
"default": "'request_continuation'",
|
|
8013
|
-
"description": "Name reserved for the cross-agent handoff tool — injected by OrchestratingDriver."
|
|
8014
|
-
},
|
|
8015
|
-
{
|
|
8016
|
-
"kind": "class",
|
|
8017
|
-
"description": "Plain TS class that drives a multi-turn chat conversation, including the tool-call loop.\nOwned by `FoundationAiAssistant` — created in `connectedCallback`, torn down in `disconnectedCallback`.\n\nDispatches `'history-updated'` events on itself so the owning element can observe changes.",
|
|
8018
|
-
"name": "ChatDriver",
|
|
8019
|
-
"members": [
|
|
7878
|
+
"privacy": "private",
|
|
7879
|
+
"default": "0",
|
|
7880
|
+
"description": "Monotonic count of external-diagnostics batches harvested this driver-lifetime. Namespaces each\nbatch's re-keyed `turn` entries so distinct server generations in one chat session can't collide\non `turnIndex` in the forward-capture persister (which dedups turns by that key). (GENC-1461.)"
|
|
7881
|
+
},
|
|
8020
7882
|
{
|
|
8021
7883
|
"kind": "field",
|
|
8022
|
-
"name": "
|
|
7884
|
+
"name": "globalTurnIndex",
|
|
8023
7885
|
"type": {
|
|
8024
|
-
"text": "
|
|
7886
|
+
"text": "number"
|
|
8025
7887
|
},
|
|
8026
7888
|
"privacy": "private",
|
|
8027
|
-
"default": "
|
|
7889
|
+
"default": "0",
|
|
7890
|
+
"description": "Monotonic counter that survives agent swaps — useful for cross-referencing with history."
|
|
8028
7891
|
},
|
|
8029
7892
|
{
|
|
8030
7893
|
"kind": "field",
|
|
8031
|
-
"name": "
|
|
7894
|
+
"name": "debugSnapshotter",
|
|
8032
7895
|
"type": {
|
|
8033
|
-
"text": "
|
|
7896
|
+
"text": "() => unknown | undefined"
|
|
8034
7897
|
},
|
|
8035
7898
|
"privacy": "private",
|
|
8036
|
-
"
|
|
7899
|
+
"description": "Captured from `applyAgent` so we don't store the whole `AgentConfig`."
|
|
8037
7900
|
},
|
|
8038
7901
|
{
|
|
8039
7902
|
"kind": "field",
|
|
8040
|
-
"name": "
|
|
7903
|
+
"name": "maxTurnSnapshots",
|
|
8041
7904
|
"type": {
|
|
8042
7905
|
"text": "number"
|
|
8043
7906
|
},
|
|
8044
7907
|
"privacy": "private",
|
|
8045
|
-
"
|
|
8046
|
-
"
|
|
7908
|
+
"readonly": true,
|
|
7909
|
+
"default": "maxTurnSnapshots"
|
|
8047
7910
|
},
|
|
8048
7911
|
{
|
|
8049
7912
|
"kind": "field",
|
|
8050
|
-
"name": "
|
|
7913
|
+
"name": "lifecycleController",
|
|
8051
7914
|
"privacy": "private",
|
|
8052
|
-
"
|
|
7915
|
+
"readonly": true,
|
|
7916
|
+
"default": "new AbortController()",
|
|
7917
|
+
"description": "Aborted by `dispose()` on driver teardown (e.g. an agent-config swap).\nThreaded into every provider call as `ChatRequestOptions.signal`, so a\ndisposed driver's in-flight LLM request is cancelled instead of running on\nto completion or the transport timeout. Also passed to prompt/tool\nfactories via `SystemPromptContext.signal`."
|
|
8053
7918
|
},
|
|
8054
7919
|
{
|
|
8055
7920
|
"kind": "field",
|
|
8056
|
-
"name": "
|
|
7921
|
+
"name": "turnController",
|
|
8057
7922
|
"privacy": "private",
|
|
8058
|
-
"default": "new
|
|
8059
|
-
"description": "
|
|
7923
|
+
"default": "new AbortController()",
|
|
7924
|
+
"description": "Per-turn abort controller, reset at the start of every turn by `beginTurn`.\nAborted by `cancel()` (user stop) and chained to `lifecycleController` so a\ndriver dispose also ends the current turn. Its signal — not the lifecycle\none — is what reaches the provider call, so a turn can be cancelled without\nbricking the driver for the next message."
|
|
8060
7925
|
},
|
|
8061
7926
|
{
|
|
8062
7927
|
"kind": "field",
|
|
8063
|
-
"name": "
|
|
7928
|
+
"name": "turnCancelled",
|
|
8064
7929
|
"type": {
|
|
8065
|
-
"text": "
|
|
7930
|
+
"text": "boolean"
|
|
8066
7931
|
},
|
|
8067
7932
|
"privacy": "private",
|
|
8068
|
-
"default": "
|
|
7933
|
+
"default": "false",
|
|
7934
|
+
"description": "True when the current turn was stopped via `cancel()` (vs a dispose). Drives the \"Stopped.\" marker."
|
|
8069
7935
|
},
|
|
8070
7936
|
{
|
|
8071
7937
|
"kind": "field",
|
|
8072
|
-
"name": "
|
|
7938
|
+
"name": "unlinkLifecycleFromTurn",
|
|
8073
7939
|
"type": {
|
|
8074
|
-
"text": "
|
|
7940
|
+
"text": "() => void | undefined"
|
|
8075
7941
|
},
|
|
8076
7942
|
"privacy": "private",
|
|
8077
|
-
"description": "
|
|
7943
|
+
"description": "Detaches the lifecycle→turn abort link at turn end; set by `beginTurn`."
|
|
8078
7944
|
},
|
|
8079
7945
|
{
|
|
8080
7946
|
"kind": "field",
|
|
8081
|
-
"name": "
|
|
7947
|
+
"name": "activeProviderInput",
|
|
8082
7948
|
"type": {
|
|
8083
|
-
"text": "
|
|
7949
|
+
"text": "ProviderInput | undefined"
|
|
8084
7950
|
},
|
|
8085
7951
|
"privacy": "private",
|
|
8086
|
-
"description": "
|
|
7952
|
+
"description": "Active agent's provider selector (static name or per-turn resolver).\n`undefined` means \"use the registry default\"."
|
|
8087
7953
|
},
|
|
8088
7954
|
{
|
|
8089
7955
|
"kind": "field",
|
|
8090
|
-
"name": "
|
|
7956
|
+
"name": "activeTemperatureInput",
|
|
8091
7957
|
"type": {
|
|
8092
|
-
"text": "
|
|
7958
|
+
"text": "TemperatureInput | undefined"
|
|
8093
7959
|
},
|
|
8094
7960
|
"privacy": "private",
|
|
8095
|
-
"description": "
|
|
7961
|
+
"description": "Active agent's temperature selector (static number or per-turn resolver),\nnormalized to `0`–`1`. `undefined` means \"use the provider/model default\"."
|
|
8096
7962
|
},
|
|
8097
7963
|
{
|
|
8098
7964
|
"kind": "field",
|
|
8099
|
-
"name": "
|
|
7965
|
+
"name": "activeToolChoiceInput",
|
|
8100
7966
|
"type": {
|
|
8101
|
-
"text": "
|
|
7967
|
+
"text": "ToolChoiceInput | undefined"
|
|
8102
7968
|
},
|
|
8103
7969
|
"privacy": "private",
|
|
8104
|
-
"description": "
|
|
7970
|
+
"description": "Active agent's tool-call mode selector (static value or per-turn resolver).\n`undefined` falls back to the per-turn default (sub-agents force a tool\ncall; top-level turns are `'auto'`)."
|
|
8105
7971
|
},
|
|
8106
7972
|
{
|
|
8107
7973
|
"kind": "field",
|
|
8108
|
-
"name": "
|
|
7974
|
+
"name": "activeCachePolicyInput",
|
|
8109
7975
|
"type": {
|
|
8110
|
-
"text": "
|
|
7976
|
+
"text": "CachePolicyInput | undefined"
|
|
8111
7977
|
},
|
|
8112
7978
|
"privacy": "private",
|
|
8113
|
-
"
|
|
7979
|
+
"description": "Active agent's prompt-cache policy selector (static value or per-turn resolver).\n`undefined` requests no caching (equivalent to `{ scope: 'default' }`)."
|
|
8114
7980
|
},
|
|
8115
7981
|
{
|
|
8116
7982
|
"kind": "field",
|
|
8117
|
-
"name": "
|
|
7983
|
+
"name": "activeThinkingPolicyInput",
|
|
8118
7984
|
"type": {
|
|
8119
|
-
"text": "
|
|
7985
|
+
"text": "ThinkingPolicyInput | undefined"
|
|
8120
7986
|
},
|
|
8121
|
-
"privacy": "private"
|
|
7987
|
+
"privacy": "private",
|
|
7988
|
+
"description": "Active agent's extended-thinking selector (static value or per-turn resolver). `undefined` —\nunset, or returned by the resolver — leaves the model on its own default posture, which is\nneither uniformly on nor off, so an agent that never sets this is unaffected by the option."
|
|
8122
7989
|
},
|
|
8123
7990
|
{
|
|
8124
7991
|
"kind": "field",
|
|
8125
|
-
"name": "
|
|
7992
|
+
"name": "activeTailContextInput",
|
|
8126
7993
|
"type": {
|
|
8127
|
-
"text": "
|
|
7994
|
+
"text": "TailContextInput | undefined"
|
|
8128
7995
|
},
|
|
8129
7996
|
"privacy": "private",
|
|
8130
|
-
"description": "
|
|
7997
|
+
"description": "Active agent's tail-context selector (static value or per-turn resolver). The driver frames\nthe resolved string in a `<system-reminder>` marker and injects it at the message tail."
|
|
8131
7998
|
},
|
|
8132
7999
|
{
|
|
8133
8000
|
"kind": "field",
|
|
8134
|
-
"name": "
|
|
8001
|
+
"name": "activeResponseSchemaInput",
|
|
8135
8002
|
"type": {
|
|
8136
|
-
"text": "
|
|
8003
|
+
"text": "ResponseSchemaInput | undefined"
|
|
8137
8004
|
},
|
|
8138
|
-
"privacy": "private"
|
|
8005
|
+
"privacy": "private",
|
|
8006
|
+
"description": "Active agent's structured-output schema selector (static value or per-turn resolver).\nWhen it resolves to a schema, the model's final answer is constrained to it this turn."
|
|
8139
8007
|
},
|
|
8140
8008
|
{
|
|
8141
8009
|
"kind": "field",
|
|
8142
|
-
"name": "
|
|
8010
|
+
"name": "activeFallbacks",
|
|
8143
8011
|
"type": {
|
|
8144
|
-
"text": "
|
|
8012
|
+
"text": "ChatFallback[] | undefined"
|
|
8145
8013
|
},
|
|
8146
8014
|
"privacy": "private",
|
|
8147
|
-
"description": "
|
|
8015
|
+
"description": "Active agent's refusal-fallback chain (static). Passed through to the provider so a refused\nturn (e.g. Fable 5) is re-run on the next model server-side."
|
|
8148
8016
|
},
|
|
8149
8017
|
{
|
|
8150
8018
|
"kind": "field",
|
|
8151
|
-
"name": "
|
|
8019
|
+
"name": "activeOnUnresolvedTool",
|
|
8152
8020
|
"type": {
|
|
8153
|
-
"text": "
|
|
8021
|
+
"text": "UnresolvedToolInput | undefined"
|
|
8154
8022
|
},
|
|
8155
8023
|
"privacy": "private",
|
|
8156
|
-
"description": "
|
|
8024
|
+
"description": "Active agent's unresolved-tool hook, captured from `applyAgent`. Consulted\nonly when a tool call cannot be dispatched (a stale or hallucinated name);\n`undefined` keeps the framework's default messages. See\n`resolveUnresolvedToolContent`."
|
|
8157
8025
|
},
|
|
8158
8026
|
{
|
|
8159
8027
|
"kind": "field",
|
|
8160
|
-
"name": "
|
|
8028
|
+
"name": "resolvedProviderCache",
|
|
8161
8029
|
"privacy": "private",
|
|
8162
|
-
"
|
|
8163
|
-
"
|
|
8164
|
-
"description": "Tool-declared condensation policies, keyed by tool-call id. Populated by\n`condenseWhen` (first-wins per call); read by `applyCondensation` before each\nprovider call to collapse stale payloads from the model-bound history only.\nAccumulates across agents on a shared driver (a superseded read collapses no\nmatter which agent made it) and is never cleared — it dies with the driver."
|
|
8030
|
+
"default": "new Map<string, AIProvider>()",
|
|
8031
|
+
"description": "Caches validated provider lookups per name within the current agent. Cleared\nby `applyAgent` so each new agent's static/function-resolved names are\nvalidated fresh."
|
|
8165
8032
|
},
|
|
8166
8033
|
{
|
|
8167
8034
|
"kind": "field",
|
|
8168
|
-
"name": "
|
|
8035
|
+
"name": "lastResolvedProviderName",
|
|
8169
8036
|
"type": {
|
|
8170
|
-
"text": "
|
|
8037
|
+
"text": "string | undefined"
|
|
8171
8038
|
},
|
|
8172
8039
|
"privacy": "private",
|
|
8173
|
-
"
|
|
8174
|
-
"description": "Monotonic model-call counter for the driver's whole lifetime — the age clock\nfor `condenseWhen({ on: { kind: 'age' } })`. The per-`sendMessage` `iterations`\nloop counter resets to 0 every turn, so it can only measure age WITHIN a\nsingle turn; this never resets, so `age` counts model-calls since the result\nappeared across turn boundaries (each short turn still advances it ≥ 1).\nBumped once per tool-loop iteration (provider call)."
|
|
8040
|
+
"description": "Last successfully resolved provider name — drives `getActiveProviderName`."
|
|
8175
8041
|
},
|
|
8176
8042
|
{
|
|
8177
8043
|
"kind": "field",
|
|
8178
|
-
"name": "
|
|
8044
|
+
"name": "lastDispatchedProviderName",
|
|
8179
8045
|
"type": {
|
|
8180
|
-
"text": "
|
|
8046
|
+
"text": "string | undefined"
|
|
8181
8047
|
},
|
|
8182
8048
|
"privacy": "private",
|
|
8183
|
-
"
|
|
8184
|
-
"description": "Monotonic turn counter — the `turnEnd` clock. Bumped once per `sendMessage`\n(a user turn; NOT per handoff continuation, which is the same request), never\nreset. `turnEnd` collapses a payload once `turnSeq` exceeds the turn it was\ncreated in."
|
|
8049
|
+
"description": "Last dispatched `provider-changed` name; avoids duplicate events on stable turns."
|
|
8185
8050
|
},
|
|
8186
8051
|
{
|
|
8187
8052
|
"kind": "field",
|
|
8188
|
-
"name": "
|
|
8053
|
+
"name": "lastResolvedModel",
|
|
8189
8054
|
"type": {
|
|
8190
|
-
"text": "
|
|
8055
|
+
"text": "string | undefined"
|
|
8191
8056
|
},
|
|
8192
8057
|
"privacy": "private",
|
|
8193
|
-
"
|
|
8194
|
-
"description": "Monotonic agent-activation counter — the `agentEnd` clock. Advances when the\nactive flow ends: a swap to a different-named agent (`applyAgent`) OR an\nexplicit `releaseAgent` / `completeSubAgent`. A stateful agent re-resolving\nthe same name across turns keeps one activation. `agentEnd` fires for a\npayload once a LATER activation is current (`callActivation < currentActivation`)\n— so a re-run of a released agent gets a fresh activation and is NOT\ncollapsed until IT ends."
|
|
8058
|
+
"description": "Concrete model id of the provider resolved for the current turn, read from\nits `getStatus()` and stamped onto the resulting assistant message so the\ndebug log carries per-message model lineage. Re-resolved each turn in\n`resolveProviderForTurn`."
|
|
8195
8059
|
},
|
|
8196
8060
|
{
|
|
8197
8061
|
"kind": "field",
|
|
8198
|
-
"name": "
|
|
8062
|
+
"name": "lastResolvedProvider",
|
|
8199
8063
|
"type": {
|
|
8200
|
-
"text": "
|
|
8064
|
+
"text": "AIProviderType | undefined"
|
|
8201
8065
|
},
|
|
8202
8066
|
"privacy": "private",
|
|
8203
|
-
"
|
|
8204
|
-
"description": "Monotonic phase-epoch counter — the `phaseEnd` clock. Advanced by the\nhandler-context `endPhase()` (an app-declared phase boundary within one\nactivation), never reset. Unlike `currentActivation` it is NOT tied to agent\nswaps or releases — it ticks only when the agent itself declares a phase\ndone. `phaseEnd` fires for a payload once a LATER epoch is current\n(`callPhaseEpoch < currentPhaseEpoch`), with an `agentEnd` backstop."
|
|
8067
|
+
"description": "Vendor id from the provider's `getStatus()` for the current turn (e.g.\n`'anthropic'`, `'gemini'`). Stamped onto assistant messages alongside\n`lastResolvedModel`."
|
|
8205
8068
|
},
|
|
8206
8069
|
{
|
|
8207
8070
|
"kind": "field",
|
|
8208
|
-
"name": "
|
|
8209
|
-
"type": {
|
|
8210
|
-
"text": "FoldStackFrame[]"
|
|
8211
|
-
},
|
|
8071
|
+
"name": "resolvedStatusCache",
|
|
8212
8072
|
"privacy": "private",
|
|
8213
|
-
"default": "
|
|
8214
|
-
"description": "
|
|
8073
|
+
"default": "new Map<string, { model?: string; provider?: AIProviderType }>()",
|
|
8074
|
+
"description": "Memoised `name → getStatus()` lookups, so per-turn resolution doesn't\nre-await `getStatus()` every turn. Cleared (with `resolvedProviderCache`) on\nan observable-registry change, so a model swapped behind a stable name is\npicked up on the next turn."
|
|
8215
8075
|
},
|
|
8216
8076
|
{
|
|
8217
8077
|
"kind": "field",
|
|
8218
|
-
"name": "
|
|
8078
|
+
"name": "unsubscribeRegistry",
|
|
8219
8079
|
"type": {
|
|
8220
|
-
"text": "
|
|
8080
|
+
"text": "() => void | undefined"
|
|
8221
8081
|
},
|
|
8222
8082
|
"privacy": "private",
|
|
8223
|
-
"
|
|
8224
|
-
"description": "Consecutive fold open/close ops without a real tool call. Reset on real tool execution."
|
|
8083
|
+
"description": "Unsubscribe handle for the provider-registry change listener (only set when\nthe injected registry is observable). Called in `dispose` so the long-lived\nregistry doesn't retain this driver — see the constructor and the sub-agent\nteardown in `runSubAgent`."
|
|
8225
8084
|
},
|
|
8226
8085
|
{
|
|
8227
8086
|
"kind": "field",
|
|
8228
|
-
"name": "
|
|
8087
|
+
"name": "maxToolIterations",
|
|
8229
8088
|
"type": {
|
|
8230
8089
|
"text": "number"
|
|
8231
8090
|
},
|
|
8232
8091
|
"privacy": "private",
|
|
8233
|
-
"default": "0",
|
|
8234
|
-
"description": "Consecutive unknown-tool calls without a real tool call. Reset on real tool execution."
|
|
8235
|
-
},
|
|
8236
|
-
{
|
|
8237
|
-
"kind": "field",
|
|
8238
|
-
"name": "recentUnknownToolNames",
|
|
8239
|
-
"privacy": "private",
|
|
8240
8092
|
"readonly": true,
|
|
8241
|
-
"
|
|
8242
|
-
"
|
|
8093
|
+
"description": "Hard cap on tool-loop iterations.",
|
|
8094
|
+
"default": "maxToolIterations"
|
|
8243
8095
|
},
|
|
8244
8096
|
{
|
|
8245
8097
|
"kind": "field",
|
|
8246
|
-
"name": "
|
|
8098
|
+
"name": "condenseBatchCalls",
|
|
8099
|
+
"type": {
|
|
8100
|
+
"text": "number"
|
|
8101
|
+
},
|
|
8247
8102
|
"privacy": "private",
|
|
8248
8103
|
"readonly": true,
|
|
8249
|
-
"
|
|
8250
|
-
"
|
|
8104
|
+
"description": "Model-calls per condensation batch; `1` collapses as soon as a trigger fires.",
|
|
8105
|
+
"default": "condenseBatchCalls"
|
|
8251
8106
|
},
|
|
8252
8107
|
{
|
|
8253
8108
|
"kind": "field",
|
|
8254
|
-
"name": "
|
|
8109
|
+
"name": "sessionKey",
|
|
8110
|
+
"type": {
|
|
8111
|
+
"text": "string"
|
|
8112
|
+
},
|
|
8255
8113
|
"privacy": "private",
|
|
8256
8114
|
"readonly": true,
|
|
8257
|
-
"
|
|
8258
|
-
"
|
|
8115
|
+
"description": "Session identity used to file meta events onto the shared debug-log timeline.",
|
|
8116
|
+
"default": "sessionKey"
|
|
8259
8117
|
},
|
|
8260
8118
|
{
|
|
8261
8119
|
"kind": "field",
|
|
8262
|
-
"name": "
|
|
8120
|
+
"name": "activityBus",
|
|
8263
8121
|
"type": {
|
|
8264
|
-
"text": "
|
|
8122
|
+
"text": "ActivityBus"
|
|
8265
8123
|
},
|
|
8266
8124
|
"privacy": "private",
|
|
8267
8125
|
"readonly": true,
|
|
8268
|
-
"
|
|
8126
|
+
"description": "Injected activity bus; defaults to a no-op off-browser (Node/tests/headless).",
|
|
8127
|
+
"default": "activityBus"
|
|
8269
8128
|
},
|
|
8270
8129
|
{
|
|
8271
8130
|
"kind": "field",
|
|
8272
|
-
"name": "
|
|
8131
|
+
"name": "budgetExhaustedMessageOverride",
|
|
8273
8132
|
"type": {
|
|
8274
|
-
"text": "
|
|
8133
|
+
"text": "string | undefined"
|
|
8275
8134
|
},
|
|
8276
8135
|
"privacy": "private",
|
|
8277
|
-
"
|
|
8278
|
-
"description": "
|
|
8136
|
+
"readonly": true,
|
|
8137
|
+
"description": "Host override for the budget-wall transcript copy, used verbatim — see\n`ChatDriverConfig.budgetExhaustedMessage`. `undefined` means no override,\nand the bubble is composed per wall by ChatDriver.budgetExhaustedBubble.",
|
|
8138
|
+
"default": "budgetExhaustedMessage"
|
|
8279
8139
|
},
|
|
8280
8140
|
{
|
|
8281
8141
|
"kind": "field",
|
|
8282
|
-
"name": "
|
|
8142
|
+
"name": "providerRefusedMessageOverride",
|
|
8283
8143
|
"type": {
|
|
8284
|
-
"text": "
|
|
8144
|
+
"text": "string | undefined"
|
|
8285
8145
|
},
|
|
8286
8146
|
"privacy": "private",
|
|
8287
|
-
"
|
|
8147
|
+
"readonly": true,
|
|
8148
|
+
"description": "Host override for the provider-refusal sentence, from\n`ChatDriverConfig.providerRefusedMessage`. `undefined` means no override, so the shipped default\nis used verbatim.",
|
|
8149
|
+
"default": "providerRefusedMessage"
|
|
8288
8150
|
},
|
|
8289
8151
|
{
|
|
8290
8152
|
"kind": "field",
|
|
8291
|
-
"name": "
|
|
8153
|
+
"name": "providerRefusedThisTurn",
|
|
8292
8154
|
"type": {
|
|
8293
8155
|
"text": "boolean"
|
|
8294
8156
|
},
|
|
8295
8157
|
"privacy": "private",
|
|
8296
8158
|
"default": "false",
|
|
8297
|
-
"description": "
|
|
8159
|
+
"description": "A provider refusal was observed this turn, so the tool loop must not call the model again\n(GENC-1506).\n\nExists for the SUB-AGENT path only, exactly like `budgetExhaustedThisTurn`: this driver's own\nrefusal returns straight out of the catch, whereas a child's refusal reaches the parent as a tool\nresult, and without this flag the loop would issue another call into the same wall — N batched\nchildren costing N doomed calls plus a doomed parent one."
|
|
8298
8160
|
},
|
|
8299
8161
|
{
|
|
8300
8162
|
"kind": "field",
|
|
8301
|
-
"name": "
|
|
8163
|
+
"name": "providerRefusedDetail",
|
|
8302
8164
|
"type": {
|
|
8303
|
-
"text": "
|
|
8165
|
+
"text": "ProviderRefusedDetail | undefined"
|
|
8304
8166
|
},
|
|
8305
8167
|
"privacy": "private",
|
|
8306
|
-
"description": "
|
|
8168
|
+
"description": "The refusal detail latched off a sub-agent's failure, for the parent's own result."
|
|
8307
8169
|
},
|
|
8308
8170
|
{
|
|
8309
8171
|
"kind": "field",
|
|
8310
|
-
"name": "
|
|
8172
|
+
"name": "budgetExhaustedThisTurn",
|
|
8311
8173
|
"type": {
|
|
8312
8174
|
"text": "boolean"
|
|
8313
8175
|
},
|
|
8314
8176
|
"privacy": "private",
|
|
8315
8177
|
"default": "false",
|
|
8316
|
-
"description": "Set
|
|
8178
|
+
"description": "Set the moment a budget wall is observed anywhere in this turn — this\ndriver's own 402, or a sub-agent's (which surfaces here only as a\n`'budget_exhausted'` tool result). Read at the top of the tool loop to end\nthe turn before issuing another model call that would hit the same wall.\nReset per turn alongside the other per-turn counters."
|
|
8317
8179
|
},
|
|
8318
8180
|
{
|
|
8319
8181
|
"kind": "field",
|
|
8320
|
-
"name": "
|
|
8182
|
+
"name": "budgetWallDetail",
|
|
8321
8183
|
"type": {
|
|
8322
|
-
"text": "
|
|
8184
|
+
"text": "BudgetDetail | undefined"
|
|
8323
8185
|
},
|
|
8324
8186
|
"privacy": "private",
|
|
8325
|
-
"
|
|
8326
|
-
"description": "Ring buffer of per-LLM-call snapshots. Cap is configurable via\n`chatConfig.agent.maxTurnSnapshots`; older entries drop off as new ones\narrive. See TurnSnapshot for the captured shape."
|
|
8187
|
+
"description": "The refusing vendor's own attribution for the wall `budgetExhaustedThisTurn`\nrecords, when it was knowable. Kept SEPARATE from the flag rather than\nreplacing it: a figure-less 402 from a transport no vendor claims yields no\ndetail at all (`budgetDetailOf` returns `undefined`), and folding the two\nwould make that case stop ending the turn.\n\nIt matters most for a sub-agent's wall. The child can sit on a different\nvendor from its parent — `applyAgent` reads `config.provider` — so without\nthis the parent's short-circuit reports `lastResolvedProvider`, i.e. the one\nvendor that did NOT refuse. Under a mixed registry that walls Gemini because\nan Anthropic child 402'd, and if those are the only two reachable vendors the\nhost then derives `blocked` and locks a composer that still had headroom."
|
|
8327
8188
|
},
|
|
8328
8189
|
{
|
|
8329
8190
|
"kind": "field",
|
|
8330
|
-
"name": "
|
|
8191
|
+
"name": "budgetWallViaSubAgent",
|
|
8331
8192
|
"type": {
|
|
8332
|
-
"text": "
|
|
8193
|
+
"text": "boolean"
|
|
8333
8194
|
},
|
|
8334
8195
|
"privacy": "private",
|
|
8335
|
-
"
|
|
8336
|
-
"
|
|
8337
|
-
"description": "`turn` + `message` diagnostic-log entries harvested from an out-of-band source (a resolved\ninteraction whose widget returned `InteractionResult.diagnostics` — e.g. a server-side\nChatDriver's debug log). `event` entries are NOT kept here — they're folded into the session's\nmeta-event registry via `mergeMetaEvents` (see `resolveInteraction`) so they inherit fresh host\nindices, and reach the log through `getMetaEvents`. Append-only; the host folds these into its\ndebug log alongside this driver's own timeline. Not cleared here — it lives with the driver\ninstance, like `turnSnapshots`, so a new chat (fresh driver) starts empty while a compaction\n(same instance) keeps it. (GENC-1461.)"
|
|
8196
|
+
"default": "false",
|
|
8197
|
+
"description": "Whether this turn's budget wall came from a SUB-AGENT rather than this\ndriver's own request. Decides whether `lastResolvedProvider` is a valid\nattribution fallback: for an own wall it is the refusing vendor, for a\nchild's wall it is the parent's vendor — the one known NOT to have refused.\nReset per turn alongside `budgetWallDetail`."
|
|
8338
8198
|
},
|
|
8339
8199
|
{
|
|
8340
|
-
"kind": "
|
|
8341
|
-
"name": "
|
|
8342
|
-
"
|
|
8343
|
-
"
|
|
8200
|
+
"kind": "method",
|
|
8201
|
+
"name": "dispose",
|
|
8202
|
+
"return": {
|
|
8203
|
+
"type": {
|
|
8204
|
+
"text": "void"
|
|
8205
|
+
}
|
|
8344
8206
|
},
|
|
8345
|
-
"
|
|
8346
|
-
"default": "0",
|
|
8347
|
-
"description": "Monotonic count of external-diagnostics batches harvested this driver-lifetime. Namespaces each\nbatch's re-keyed `turn` entries so distinct server generations in one chat session can't collide\non `turnIndex` in the forward-capture persister (which dedups turns by that key). (GENC-1461.)"
|
|
8207
|
+
"description": "Tear down the driver: aborts the lifecycle signal so any in-flight provider\nrequest (and prompt/tool factories awaiting it) cancels instead of running\non to completion or the transport timeout. Called by the host on driver\nswap and by `OrchestratingDriver.dispose()`. Idempotent.\n\nDeliberately does NOT settle `pendingInteractions` here: dispose is never\nreached while one is pending. The only host-level dispose is the agent-swap\nrebuild, which is guarded by `isBusy()` — a pending interaction keeps the\ntool loop suspended (`busy === true`), so the swap is deferred until the\nwidget resolves. Sub-agent child disposes always have an empty pending map\n(widgets park on the parent via `setHostInteractionRequester`). A pending\ninteraction is instead settled by `resolveInteraction` (user response or\ntimeout), which also stamps history and reverts the chat-input override."
|
|
8348
8208
|
},
|
|
8349
8209
|
{
|
|
8350
|
-
"kind": "
|
|
8351
|
-
"name": "
|
|
8352
|
-
"
|
|
8353
|
-
"
|
|
8210
|
+
"kind": "method",
|
|
8211
|
+
"name": "cancel",
|
|
8212
|
+
"return": {
|
|
8213
|
+
"type": {
|
|
8214
|
+
"text": "void"
|
|
8215
|
+
}
|
|
8354
8216
|
},
|
|
8355
|
-
"
|
|
8356
|
-
"default": "0",
|
|
8357
|
-
"description": "Monotonic counter that survives agent swaps — useful for cross-referencing with history."
|
|
8217
|
+
"description": "Stop the current turn (user \"stop\" button). Aborts the in-flight provider\nrequest immediately; if a tool is mid-execution it runs to completion and\nthe loop bails at the next boundary (tools are atomic). No-op when idle.\nThe driver stays usable for the next message."
|
|
8358
8218
|
},
|
|
8359
8219
|
{
|
|
8360
|
-
"kind": "
|
|
8361
|
-
"name": "
|
|
8362
|
-
"type": {
|
|
8363
|
-
"text": "() => unknown | undefined"
|
|
8364
|
-
},
|
|
8220
|
+
"kind": "method",
|
|
8221
|
+
"name": "beginTurn",
|
|
8365
8222
|
"privacy": "private",
|
|
8366
|
-
"
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
"name": "maxTurnSnapshots",
|
|
8371
|
-
"type": {
|
|
8372
|
-
"text": "number"
|
|
8223
|
+
"return": {
|
|
8224
|
+
"type": {
|
|
8225
|
+
"text": "void"
|
|
8226
|
+
}
|
|
8373
8227
|
},
|
|
8374
|
-
"
|
|
8375
|
-
"readonly": true,
|
|
8376
|
-
"default": "maxTurnSnapshots"
|
|
8228
|
+
"description": "Start a fresh per-turn abort scope. Chains `lifecycleController` into the\nnew `turnController` so a dispose mid-turn also aborts the request."
|
|
8377
8229
|
},
|
|
8378
8230
|
{
|
|
8379
|
-
"kind": "
|
|
8380
|
-
"name": "
|
|
8231
|
+
"kind": "method",
|
|
8232
|
+
"name": "endTurn",
|
|
8381
8233
|
"privacy": "private",
|
|
8382
|
-
"
|
|
8383
|
-
|
|
8384
|
-
|
|
8234
|
+
"return": {
|
|
8235
|
+
"type": {
|
|
8236
|
+
"text": "void"
|
|
8237
|
+
}
|
|
8238
|
+
},
|
|
8239
|
+
"description": "Detach the lifecycle→turn link so a long-lived lifecycle signal doesn't accumulate listeners."
|
|
8385
8240
|
},
|
|
8386
8241
|
{
|
|
8387
|
-
"kind": "
|
|
8388
|
-
"name": "
|
|
8242
|
+
"kind": "method",
|
|
8243
|
+
"name": "completeAbortedTurn",
|
|
8389
8244
|
"privacy": "private",
|
|
8390
|
-
"
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
"kind": "field",
|
|
8395
|
-
"name": "turnCancelled",
|
|
8396
|
-
"type": {
|
|
8397
|
-
"text": "boolean"
|
|
8245
|
+
"return": {
|
|
8246
|
+
"type": {
|
|
8247
|
+
"text": "ChatDriverResult"
|
|
8248
|
+
}
|
|
8398
8249
|
},
|
|
8399
|
-
"
|
|
8400
|
-
"default": "false",
|
|
8401
|
-
"description": "True when the current turn was stopped via `cancel()` (vs a dispose). Drives the \"Stopped.\" marker."
|
|
8250
|
+
"description": "Finish a turn whose signal aborted. A user cancel adds a subtle \"Stopped.\"\nmarker; a dispose-driven abort stops quietly (the widget is gone and the\ncached history would otherwise gain a stray marker on remount)."
|
|
8402
8251
|
},
|
|
8403
8252
|
{
|
|
8404
|
-
"kind": "
|
|
8405
|
-
"name": "
|
|
8406
|
-
"type": {
|
|
8407
|
-
"text": "() => void | undefined"
|
|
8408
|
-
},
|
|
8253
|
+
"kind": "method",
|
|
8254
|
+
"name": "turnDone",
|
|
8409
8255
|
"privacy": "private",
|
|
8410
|
-
"
|
|
8256
|
+
"return": {
|
|
8257
|
+
"type": {
|
|
8258
|
+
"text": "ChatDriverResult"
|
|
8259
|
+
}
|
|
8260
|
+
},
|
|
8261
|
+
"parameters": [
|
|
8262
|
+
{
|
|
8263
|
+
"name": "failureReason",
|
|
8264
|
+
"optional": true,
|
|
8265
|
+
"type": {
|
|
8266
|
+
"text": "TurnFailureReason"
|
|
8267
|
+
}
|
|
8268
|
+
},
|
|
8269
|
+
{
|
|
8270
|
+
"name": "budget",
|
|
8271
|
+
"optional": true,
|
|
8272
|
+
"type": {
|
|
8273
|
+
"text": "BudgetDetail"
|
|
8274
|
+
}
|
|
8275
|
+
},
|
|
8276
|
+
{
|
|
8277
|
+
"name": "providerRefused",
|
|
8278
|
+
"optional": true,
|
|
8279
|
+
"type": {
|
|
8280
|
+
"text": "ProviderRefusedDetail"
|
|
8281
|
+
}
|
|
8282
|
+
}
|
|
8283
|
+
],
|
|
8284
|
+
"description": "Build the `done` loop result, carrying the typed failure reason when the turn\nbailed (PTC-0). The discriminant stays `'done'` either way — the same value a\nclean turn returns — so consumers matching on `reason === 'done'` are unchanged;\n`failureReason` is simply present on a failure and absent on success. Omitted\n(rather than set to `undefined`) so a happy-path result stays byte-identical to\nthe historical `{ reason: 'done' }`."
|
|
8411
8285
|
},
|
|
8412
8286
|
{
|
|
8413
|
-
"kind": "
|
|
8414
|
-
"name": "
|
|
8415
|
-
"
|
|
8416
|
-
"
|
|
8287
|
+
"kind": "method",
|
|
8288
|
+
"name": "reportBudgetExhausted",
|
|
8289
|
+
"return": {
|
|
8290
|
+
"type": {
|
|
8291
|
+
"text": "ChatDriverResult"
|
|
8292
|
+
}
|
|
8417
8293
|
},
|
|
8418
|
-
"
|
|
8419
|
-
|
|
8294
|
+
"parameters": [
|
|
8295
|
+
{
|
|
8296
|
+
"name": "e",
|
|
8297
|
+
"type": {
|
|
8298
|
+
"text": "BudgetExhaustedError"
|
|
8299
|
+
}
|
|
8300
|
+
},
|
|
8301
|
+
{
|
|
8302
|
+
"name": "pendingUserMessage",
|
|
8303
|
+
"optional": true,
|
|
8304
|
+
"type": {
|
|
8305
|
+
"text": "ChatMessage"
|
|
8306
|
+
}
|
|
8307
|
+
}
|
|
8308
|
+
]
|
|
8420
8309
|
},
|
|
8421
8310
|
{
|
|
8422
|
-
"kind": "
|
|
8423
|
-
"name": "
|
|
8424
|
-
"type": {
|
|
8425
|
-
"text": "TemperatureInput | undefined"
|
|
8426
|
-
},
|
|
8311
|
+
"kind": "method",
|
|
8312
|
+
"name": "providerRefusedBubble",
|
|
8427
8313
|
"privacy": "private",
|
|
8428
|
-
"
|
|
8314
|
+
"return": {
|
|
8315
|
+
"type": {
|
|
8316
|
+
"text": "string"
|
|
8317
|
+
}
|
|
8318
|
+
},
|
|
8319
|
+
"description": "The sentence shown when the upstream provider refuses (GENC-1506).\n\nDeliberately far simpler than `budgetExhaustedBubble`: no vendor name, no figures, no\nswitch-provider advice, and no branching on `kind`. The copy is cause-free by design — a user who\ncan see their own remaining spend must not be told about a limit, and we must not imply the bill\nhas gone unpaid — so there is nothing here to compose. A host override wins verbatim."
|
|
8429
8320
|
},
|
|
8430
8321
|
{
|
|
8431
|
-
"kind": "
|
|
8432
|
-
"name": "
|
|
8433
|
-
"type": {
|
|
8434
|
-
"text": "ToolChoiceInput | undefined"
|
|
8435
|
-
},
|
|
8322
|
+
"kind": "method",
|
|
8323
|
+
"name": "reportProviderRefused",
|
|
8436
8324
|
"privacy": "private",
|
|
8437
|
-
"
|
|
8325
|
+
"return": {
|
|
8326
|
+
"type": {
|
|
8327
|
+
"text": "ChatDriverResult"
|
|
8328
|
+
}
|
|
8329
|
+
},
|
|
8330
|
+
"parameters": [
|
|
8331
|
+
{
|
|
8332
|
+
"name": "e",
|
|
8333
|
+
"type": {
|
|
8334
|
+
"text": "ProviderRefusedError"
|
|
8335
|
+
}
|
|
8336
|
+
}
|
|
8337
|
+
],
|
|
8338
|
+
"description": "Terminal provider-refusal outcome. Mirrors `reportBudgetExhausted` so the two walls behave\nidentically from the caller's side, while keeping their diagnostics distinct.\n\n`kind` reaches the debug log and the result but never the transcript: it is what lets an operator\ntell \"top up the account\" from \"rotate the key\", and with cause-free user copy this is the only\nplace that distinction survives."
|
|
8438
8339
|
},
|
|
8439
8340
|
{
|
|
8440
|
-
"kind": "
|
|
8441
|
-
"name": "
|
|
8442
|
-
"type": {
|
|
8443
|
-
"text": "CachePolicyInput | undefined"
|
|
8444
|
-
},
|
|
8341
|
+
"kind": "method",
|
|
8342
|
+
"name": "failureReasonOf",
|
|
8445
8343
|
"privacy": "private",
|
|
8446
|
-
"
|
|
8344
|
+
"static": true,
|
|
8345
|
+
"return": {
|
|
8346
|
+
"type": {
|
|
8347
|
+
"text": "TurnFailureReason | undefined"
|
|
8348
|
+
}
|
|
8349
|
+
},
|
|
8350
|
+
"parameters": [
|
|
8351
|
+
{
|
|
8352
|
+
"name": "result",
|
|
8353
|
+
"type": {
|
|
8354
|
+
"text": "ChatDriverResult"
|
|
8355
|
+
}
|
|
8356
|
+
}
|
|
8357
|
+
],
|
|
8358
|
+
"description": "The typed failure reason on a loop result, or `undefined` for a clean turn / handoff."
|
|
8447
8359
|
},
|
|
8448
8360
|
{
|
|
8449
|
-
"kind": "
|
|
8450
|
-
"name": "
|
|
8451
|
-
"type": {
|
|
8452
|
-
"text": "ThinkingPolicyInput | undefined"
|
|
8453
|
-
},
|
|
8361
|
+
"kind": "method",
|
|
8362
|
+
"name": "loopEndDetail",
|
|
8454
8363
|
"privacy": "private",
|
|
8455
|
-
"
|
|
8364
|
+
"return": {
|
|
8365
|
+
"type": {
|
|
8366
|
+
"text": "| {\n failureReason: TurnFailureReason;\n vendor?: AIProviderType;\n budget?: BudgetDetail;\n }\n | undefined"
|
|
8367
|
+
}
|
|
8368
|
+
},
|
|
8369
|
+
"parameters": [
|
|
8370
|
+
{
|
|
8371
|
+
"name": "result",
|
|
8372
|
+
"type": {
|
|
8373
|
+
"text": "ChatDriverResult"
|
|
8374
|
+
}
|
|
8375
|
+
}
|
|
8376
|
+
],
|
|
8377
|
+
"description": "Build the `tool-loop-end` event detail for a turn's result. A failure carries a\n`{ failureReason }` detail; a clean turn emits `undefined` — the historical shape,\nkept byte-identical so subscribers see exactly what they always have.\n\nA budget failure additionally carries `vendor` — the concrete vendor\n(`'anthropic'`/`'gemini'`) the walled turn resolved to, which the driver knows\nand used to discard. Optional and additive: a subscriber reading only\n`failureReason` is unaffected, a non-budget failure still emits the historical\n`{ failureReason }` with no `vendor` key, and the value is a plain string so\nthe detail stays structured-cloneable for the cross-tab hop. It is the field a\nper-vendor budget model needs and the one that would be awkward to retrofit."
|
|
8456
8378
|
},
|
|
8457
8379
|
{
|
|
8458
|
-
"kind": "
|
|
8459
|
-
"name": "
|
|
8460
|
-
"
|
|
8461
|
-
"
|
|
8380
|
+
"kind": "method",
|
|
8381
|
+
"name": "applyAgent",
|
|
8382
|
+
"return": {
|
|
8383
|
+
"type": {
|
|
8384
|
+
"text": "void"
|
|
8385
|
+
}
|
|
8462
8386
|
},
|
|
8463
|
-
"
|
|
8464
|
-
|
|
8387
|
+
"parameters": [
|
|
8388
|
+
{
|
|
8389
|
+
"name": "config",
|
|
8390
|
+
"type": {
|
|
8391
|
+
"text": "AgentConfig"
|
|
8392
|
+
}
|
|
8393
|
+
}
|
|
8394
|
+
],
|
|
8395
|
+
"description": "Swap in a new agent's configuration. Called by OrchestratingDriver before\neach specialist turn so the shared driver runs with the right tools and prompt."
|
|
8465
8396
|
},
|
|
8466
8397
|
{
|
|
8467
|
-
"kind": "
|
|
8468
|
-
"name": "
|
|
8469
|
-
"type": {
|
|
8470
|
-
"text": "ResponseSchemaInput | undefined"
|
|
8471
|
-
},
|
|
8398
|
+
"kind": "method",
|
|
8399
|
+
"name": "resolveUnresolvedToolContent",
|
|
8472
8400
|
"privacy": "private",
|
|
8473
|
-
"
|
|
8401
|
+
"return": {
|
|
8402
|
+
"type": {
|
|
8403
|
+
"text": "Promise<string>"
|
|
8404
|
+
}
|
|
8405
|
+
},
|
|
8406
|
+
"parameters": [
|
|
8407
|
+
{
|
|
8408
|
+
"name": "toolName",
|
|
8409
|
+
"type": {
|
|
8410
|
+
"text": "string"
|
|
8411
|
+
}
|
|
8412
|
+
},
|
|
8413
|
+
{
|
|
8414
|
+
"name": "kind",
|
|
8415
|
+
"type": {
|
|
8416
|
+
"text": "'stale' | 'unknown'"
|
|
8417
|
+
}
|
|
8418
|
+
},
|
|
8419
|
+
{
|
|
8420
|
+
"name": "fallback",
|
|
8421
|
+
"type": {
|
|
8422
|
+
"text": "string"
|
|
8423
|
+
}
|
|
8424
|
+
}
|
|
8425
|
+
],
|
|
8426
|
+
"description": "Resolve the tool-result content for an unresolved tool call. Consults the\nactive agent's `onUnresolvedTool` hook (if any) with the attempted tool\nname, the failure `kind`, and the currently dispatchable tools, and returns\nthe hook's non-empty string. Falls back to `fallback` when no hook is set,\nthe hook returns nothing/empty, or the hook throws — so a misbehaving hook\ncan never break tool dispatch."
|
|
8474
8427
|
},
|
|
8475
8428
|
{
|
|
8476
|
-
"kind": "
|
|
8477
|
-
"name": "
|
|
8478
|
-
"
|
|
8479
|
-
"
|
|
8429
|
+
"kind": "method",
|
|
8430
|
+
"name": "getActiveProviderName",
|
|
8431
|
+
"return": {
|
|
8432
|
+
"type": {
|
|
8433
|
+
"text": "string"
|
|
8434
|
+
}
|
|
8480
8435
|
},
|
|
8481
|
-
"
|
|
8482
|
-
"description": "Active agent's refusal-fallback chain (static). Passed through to the provider so a refused\nturn (e.g. Fable 5) is re-run on the next model server-side."
|
|
8436
|
+
"description": "Returns the most recently resolved provider name. Falls back to the\nregistry's default when no per-turn resolution has happened yet."
|
|
8483
8437
|
},
|
|
8484
8438
|
{
|
|
8485
|
-
"kind": "
|
|
8486
|
-
"name": "
|
|
8487
|
-
"type": {
|
|
8488
|
-
"text": "UnresolvedToolInput | undefined"
|
|
8489
|
-
},
|
|
8439
|
+
"kind": "method",
|
|
8440
|
+
"name": "resolveProviderByName",
|
|
8490
8441
|
"privacy": "private",
|
|
8491
|
-
"
|
|
8442
|
+
"return": {
|
|
8443
|
+
"type": {
|
|
8444
|
+
"text": "AIProvider"
|
|
8445
|
+
}
|
|
8446
|
+
},
|
|
8447
|
+
"parameters": [
|
|
8448
|
+
{
|
|
8449
|
+
"name": "name",
|
|
8450
|
+
"type": {
|
|
8451
|
+
"text": "string"
|
|
8452
|
+
}
|
|
8453
|
+
},
|
|
8454
|
+
{
|
|
8455
|
+
"name": "agentName",
|
|
8456
|
+
"type": {
|
|
8457
|
+
"text": "string"
|
|
8458
|
+
}
|
|
8459
|
+
}
|
|
8460
|
+
],
|
|
8461
|
+
"description": "Resolve a named provider against the registry. Cached per-agent so\nrepeated lookups during one agent's lifetime don't re-validate.\nValidation lives in `resolveChatProvider`; this wrapper just adds the\ncache."
|
|
8492
8462
|
},
|
|
8493
8463
|
{
|
|
8494
|
-
"kind": "
|
|
8495
|
-
"name": "
|
|
8464
|
+
"kind": "method",
|
|
8465
|
+
"name": "resolveProviderForTurn",
|
|
8496
8466
|
"privacy": "private",
|
|
8497
|
-
"
|
|
8498
|
-
|
|
8467
|
+
"return": {
|
|
8468
|
+
"type": {
|
|
8469
|
+
"text": "Promise<AIProvider>"
|
|
8470
|
+
}
|
|
8471
|
+
},
|
|
8472
|
+
"parameters": [
|
|
8473
|
+
{
|
|
8474
|
+
"name": "ctx",
|
|
8475
|
+
"type": {
|
|
8476
|
+
"text": "SystemPromptContext"
|
|
8477
|
+
}
|
|
8478
|
+
}
|
|
8479
|
+
],
|
|
8480
|
+
"description": "Resolve the provider to use for the current turn. Walks the agent's\n`provider` selector (static or function form) or falls back to the\nregistry default. Dispatches `provider-changed` when the resolved name\ndiffers from the last dispatched value."
|
|
8499
8481
|
},
|
|
8500
8482
|
{
|
|
8501
|
-
"kind": "
|
|
8502
|
-
"name": "
|
|
8503
|
-
"type": {
|
|
8504
|
-
"text": "string | undefined"
|
|
8505
|
-
},
|
|
8483
|
+
"kind": "method",
|
|
8484
|
+
"name": "resolveStatusForProvider",
|
|
8506
8485
|
"privacy": "private",
|
|
8507
|
-
"
|
|
8486
|
+
"return": {
|
|
8487
|
+
"type": {
|
|
8488
|
+
"text": "Promise<{ model?: string; provider?: AIProviderType }>"
|
|
8489
|
+
}
|
|
8490
|
+
},
|
|
8491
|
+
"parameters": [
|
|
8492
|
+
{
|
|
8493
|
+
"name": "name",
|
|
8494
|
+
"type": {
|
|
8495
|
+
"text": "string"
|
|
8496
|
+
}
|
|
8497
|
+
},
|
|
8498
|
+
{
|
|
8499
|
+
"name": "provider",
|
|
8500
|
+
"type": {
|
|
8501
|
+
"text": "AIProvider"
|
|
8502
|
+
}
|
|
8503
|
+
}
|
|
8504
|
+
],
|
|
8505
|
+
"description": "Resolve model id and vendor from a provider via its optional `getStatus()`,\nmemoised by registry name. Used to stamp `model` and `provider` onto outgoing\nmessages. Best-effort: a provider without `getStatus`, a null status, or a\nthrow all yield empty fields — attribution is diagnostic, never load-bearing."
|
|
8508
8506
|
},
|
|
8509
8507
|
{
|
|
8510
|
-
"kind": "
|
|
8511
|
-
"name": "
|
|
8512
|
-
"type": {
|
|
8513
|
-
"text": "string | undefined"
|
|
8514
|
-
},
|
|
8508
|
+
"kind": "method",
|
|
8509
|
+
"name": "resolveTurnInput",
|
|
8515
8510
|
"privacy": "private",
|
|
8516
|
-
"
|
|
8511
|
+
"return": {
|
|
8512
|
+
"type": {
|
|
8513
|
+
"text": "Promise<T | undefined>"
|
|
8514
|
+
}
|
|
8515
|
+
},
|
|
8516
|
+
"parameters": [
|
|
8517
|
+
{
|
|
8518
|
+
"name": "input",
|
|
8519
|
+
"type": {
|
|
8520
|
+
"text": "T | ((ctx: SystemPromptContext) => T | Promise<T>) | undefined"
|
|
8521
|
+
}
|
|
8522
|
+
},
|
|
8523
|
+
{
|
|
8524
|
+
"name": "ctx",
|
|
8525
|
+
"type": {
|
|
8526
|
+
"text": "SystemPromptContext"
|
|
8527
|
+
}
|
|
8528
|
+
}
|
|
8529
|
+
],
|
|
8530
|
+
"description": "Resolve a per-turn config input that is either a static value or a function\nof the turn context — the value-or-resolver shape shared by `provider`,\n`temperature`, and `toolChoice`. Returns undefined when the input is unset."
|
|
8517
8531
|
},
|
|
8518
8532
|
{
|
|
8519
|
-
"kind": "
|
|
8520
|
-
"name": "
|
|
8521
|
-
"
|
|
8522
|
-
"
|
|
8533
|
+
"kind": "method",
|
|
8534
|
+
"name": "getSubAgentCompletion",
|
|
8535
|
+
"return": {
|
|
8536
|
+
"type": {
|
|
8537
|
+
"text": "{ result: unknown } | undefined"
|
|
8538
|
+
}
|
|
8523
8539
|
},
|
|
8524
|
-
"
|
|
8525
|
-
"description": "Concrete model id of the provider resolved for the current turn, read from\nits `getStatus()` and stamped onto the resulting assistant message so the\ndebug log carries per-message model lineage. Re-resolved each turn in\n`resolveProviderForTurn`."
|
|
8540
|
+
"description": "Returns the early-stop result set by `completeSubAgent`, if any.\nCalled by a parent `ChatDriver` after running this instance as a sub-agent."
|
|
8526
8541
|
},
|
|
8527
8542
|
{
|
|
8528
|
-
"kind": "
|
|
8529
|
-
"name": "
|
|
8530
|
-
"
|
|
8531
|
-
"
|
|
8543
|
+
"kind": "method",
|
|
8544
|
+
"name": "markAsSubAgent",
|
|
8545
|
+
"return": {
|
|
8546
|
+
"type": {
|
|
8547
|
+
"text": "void"
|
|
8548
|
+
}
|
|
8532
8549
|
},
|
|
8533
|
-
"
|
|
8534
|
-
"description": "Vendor id from the provider's `getStatus()` for the current turn (e.g.\n`'anthropic'`, `'gemini'`). Stamped onto assistant messages alongside\n`lastResolvedModel`."
|
|
8550
|
+
"description": "Mark this driver as running as a sub-agent. Called by a parent driver's\n`invokeSubAgent` immediately after construction, before the first turn.\nEnables forced tool use and typed failure reporting (see `isSubAgent`)."
|
|
8535
8551
|
},
|
|
8536
8552
|
{
|
|
8537
|
-
"kind": "
|
|
8538
|
-
"name": "
|
|
8539
|
-
"
|
|
8540
|
-
|
|
8541
|
-
|
|
8553
|
+
"kind": "method",
|
|
8554
|
+
"name": "getSubAgentFailure",
|
|
8555
|
+
"return": {
|
|
8556
|
+
"type": {
|
|
8557
|
+
"text": "| {\n reason: SubAgentFailureReason;\n budget?: BudgetDetail;\n providerRefused?: ProviderRefusedDetail;\n }\n | undefined"
|
|
8558
|
+
}
|
|
8559
|
+
},
|
|
8560
|
+
"description": "Returns the typed failure recorded when a sub-agent run ended without\n`completeSubAgent`, if any. Called by a parent `ChatDriver` after running\nthis instance as a sub-agent."
|
|
8542
8561
|
},
|
|
8543
8562
|
{
|
|
8544
|
-
"kind": "
|
|
8545
|
-
"name": "
|
|
8546
|
-
"type": {
|
|
8547
|
-
"text": "() => void | undefined"
|
|
8548
|
-
},
|
|
8563
|
+
"kind": "method",
|
|
8564
|
+
"name": "failSubAgent",
|
|
8549
8565
|
"privacy": "private",
|
|
8550
|
-
"
|
|
8566
|
+
"return": {
|
|
8567
|
+
"type": {
|
|
8568
|
+
"text": "void"
|
|
8569
|
+
}
|
|
8570
|
+
},
|
|
8571
|
+
"parameters": [
|
|
8572
|
+
{
|
|
8573
|
+
"name": "reason",
|
|
8574
|
+
"type": {
|
|
8575
|
+
"text": "SubAgentFailureReason"
|
|
8576
|
+
}
|
|
8577
|
+
},
|
|
8578
|
+
{
|
|
8579
|
+
"name": "budget",
|
|
8580
|
+
"optional": true,
|
|
8581
|
+
"type": {
|
|
8582
|
+
"text": "BudgetDetail"
|
|
8583
|
+
}
|
|
8584
|
+
},
|
|
8585
|
+
{
|
|
8586
|
+
"name": "providerRefused",
|
|
8587
|
+
"optional": true,
|
|
8588
|
+
"type": {
|
|
8589
|
+
"text": "ProviderRefusedDetail"
|
|
8590
|
+
}
|
|
8591
|
+
}
|
|
8592
|
+
],
|
|
8593
|
+
"description": "Record a sub-agent failure reason (first one wins). No-op for top-level\nagents, so loop-exit sites can call it unconditionally. The parent reads\nthis via `getSubAgentFailure()` and emits the `subagent.failed` meta event\nunder its *own* session — see `invokeSubAgent`. (A child sub-agent runs\nunder a separate session key, so recording here would orphan the event off\nthe user-visible debug-log timeline.)"
|
|
8551
8594
|
},
|
|
8552
8595
|
{
|
|
8553
|
-
"kind": "
|
|
8554
|
-
"name": "
|
|
8555
|
-
"
|
|
8556
|
-
"
|
|
8596
|
+
"kind": "method",
|
|
8597
|
+
"name": "getAgentReleaseRequested",
|
|
8598
|
+
"return": {
|
|
8599
|
+
"type": {
|
|
8600
|
+
"text": "boolean"
|
|
8601
|
+
}
|
|
8557
8602
|
},
|
|
8558
|
-
"
|
|
8559
|
-
"readonly": true,
|
|
8560
|
-
"description": "Hard cap on tool-loop iterations.",
|
|
8561
|
-
"default": "maxToolIterations"
|
|
8603
|
+
"description": "Returns true if `releaseAgent` was called during the most recent turn.\nConsumed by the orchestrator to trigger the auto-pin release path."
|
|
8562
8604
|
},
|
|
8563
8605
|
{
|
|
8564
|
-
"kind": "
|
|
8565
|
-
"name": "
|
|
8566
|
-
"
|
|
8567
|
-
"
|
|
8606
|
+
"kind": "method",
|
|
8607
|
+
"name": "getTurnSnapshots",
|
|
8608
|
+
"return": {
|
|
8609
|
+
"type": {
|
|
8610
|
+
"text": "ReadonlyArray<TurnSnapshot>"
|
|
8611
|
+
}
|
|
8568
8612
|
},
|
|
8569
|
-
"
|
|
8570
|
-
"readonly": true,
|
|
8571
|
-
"description": "Model-calls per condensation batch; `1` collapses as soon as a trigger fires.",
|
|
8572
|
-
"default": "condenseBatchCalls"
|
|
8613
|
+
"description": "Return the per-turn snapshots captured so far. Used by the host's debug\nlog exporter to show what the LLM saw on each turn — system prompt, tool\nsurface, and agent-supplied state (e.g. a machine snapshot).\n\nRing-buffered at `MAX_TURN_SNAPSHOTS`; older entries are dropped."
|
|
8573
8614
|
},
|
|
8574
8615
|
{
|
|
8575
|
-
"kind": "
|
|
8576
|
-
"name": "
|
|
8577
|
-
"
|
|
8578
|
-
"
|
|
8616
|
+
"kind": "method",
|
|
8617
|
+
"name": "getExternalDiagnostics",
|
|
8618
|
+
"return": {
|
|
8619
|
+
"type": {
|
|
8620
|
+
"text": "ReadonlyArray<DiagnosticEntry>"
|
|
8621
|
+
}
|
|
8579
8622
|
},
|
|
8580
|
-
"
|
|
8581
|
-
"readonly": true,
|
|
8582
|
-
"description": "Session identity used to file meta events onto the shared debug-log timeline.",
|
|
8583
|
-
"default": "sessionKey"
|
|
8623
|
+
"description": "The `turn` + `message` diagnostic-log entries harvested from resolved interactions'\n`InteractionResult.diagnostics` (e.g. a server-side ChatDriver's collated debug log). The host\nconcatenates these into its own debug log so `downloadDebugLog`/the persisted diagnostics stream\ninclude external-engine logs; `event` entries are excluded here because they're merged into the\nsession's meta-event registry instead (see `resolveInteraction`) and reach the log via\n`getMetaEvents`. Opaque, chronologically sorted by the host at assemble time. (GENC-1461.)"
|
|
8584
8624
|
},
|
|
8585
8625
|
{
|
|
8586
|
-
"kind": "
|
|
8587
|
-
"name": "
|
|
8588
|
-
"type": {
|
|
8589
|
-
"text": "ActivityBus"
|
|
8590
|
-
},
|
|
8626
|
+
"kind": "method",
|
|
8627
|
+
"name": "forwardSubAgentSnapshots",
|
|
8591
8628
|
"privacy": "private",
|
|
8592
|
-
"
|
|
8593
|
-
|
|
8594
|
-
|
|
8629
|
+
"return": {
|
|
8630
|
+
"type": {
|
|
8631
|
+
"text": "void"
|
|
8632
|
+
}
|
|
8633
|
+
},
|
|
8634
|
+
"parameters": [
|
|
8635
|
+
{
|
|
8636
|
+
"name": "childSnapshots",
|
|
8637
|
+
"type": {
|
|
8638
|
+
"text": "ReadonlyArray<TurnSnapshot>"
|
|
8639
|
+
}
|
|
8640
|
+
}
|
|
8641
|
+
],
|
|
8642
|
+
"description": "Merge a sub-agent's turn snapshots into this driver's buffer so they surface\nas `kind:'turn'` entries in the exported debug log. The child runs as a\nseparate, discarded driver, so its snapshots would otherwise be lost. Each is\nre-labelled under the parent turn that activated the sub-agent: the child's\nown (numeric) turns become `\"<parentTurn>-1\"`, `\"-2\"`, … (1-based, in order);\nany already-forwarded grand-child labels (strings) have their leading segment\nremapped the same way, so nesting composes (`\"5-2\"` → `\"5-2-1\"`).\n\nNote: two sub-agents invoked in the *same* parent turn share the prefix, so\ntheir labels can repeat — `agentName` on each snapshot disambiguates them."
|
|
8595
8643
|
},
|
|
8596
8644
|
{
|
|
8597
|
-
"kind": "
|
|
8598
|
-
"name": "
|
|
8599
|
-
"type": {
|
|
8600
|
-
"text": "string | undefined"
|
|
8601
|
-
},
|
|
8645
|
+
"kind": "method",
|
|
8646
|
+
"name": "recordTurnSnapshot",
|
|
8602
8647
|
"privacy": "private",
|
|
8603
|
-
"readonly": true,
|
|
8604
|
-
"description": "Host override for the budget-wall transcript copy, used verbatim — see\n`ChatDriverConfig.budgetExhaustedMessage`. `undefined` means no override,\nand the bubble is composed per wall by ChatDriver.budgetExhaustedBubble.",
|
|
8605
|
-
"default": "budgetExhaustedMessage"
|
|
8606
|
-
},
|
|
8607
|
-
{
|
|
8608
|
-
"kind": "field",
|
|
8609
|
-
"name": "providerRefusedMessageOverride",
|
|
8610
|
-
"type": {
|
|
8611
|
-
"text": "string | undefined"
|
|
8612
|
-
},
|
|
8613
|
-
"privacy": "private",
|
|
8614
|
-
"readonly": true,
|
|
8615
|
-
"description": "Host override for the provider-refusal sentence, from\n`ChatDriverConfig.providerRefusedMessage`. `undefined` means no override, so the shipped default\nis used verbatim.",
|
|
8616
|
-
"default": "providerRefusedMessage"
|
|
8617
|
-
},
|
|
8618
|
-
{
|
|
8619
|
-
"kind": "field",
|
|
8620
|
-
"name": "providerRefusedThisTurn",
|
|
8621
|
-
"type": {
|
|
8622
|
-
"text": "boolean"
|
|
8623
|
-
},
|
|
8624
|
-
"privacy": "private",
|
|
8625
|
-
"default": "false",
|
|
8626
|
-
"description": "A provider refusal was observed this turn, so the tool loop must not call the model again\n(GENC-1506).\n\nExists for the SUB-AGENT path only, exactly like `budgetExhaustedThisTurn`: this driver's own\nrefusal returns straight out of the catch, whereas a child's refusal reaches the parent as a tool\nresult, and without this flag the loop would issue another call into the same wall — N batched\nchildren costing N doomed calls plus a doomed parent one."
|
|
8627
|
-
},
|
|
8628
|
-
{
|
|
8629
|
-
"kind": "field",
|
|
8630
|
-
"name": "providerRefusedDetail",
|
|
8631
|
-
"type": {
|
|
8632
|
-
"text": "ProviderRefusedDetail | undefined"
|
|
8633
|
-
},
|
|
8634
|
-
"privacy": "private",
|
|
8635
|
-
"description": "The refusal detail latched off a sub-agent's failure, for the parent's own result."
|
|
8636
|
-
},
|
|
8637
|
-
{
|
|
8638
|
-
"kind": "field",
|
|
8639
|
-
"name": "budgetExhaustedThisTurn",
|
|
8640
|
-
"type": {
|
|
8641
|
-
"text": "boolean"
|
|
8642
|
-
},
|
|
8643
|
-
"privacy": "private",
|
|
8644
|
-
"default": "false",
|
|
8645
|
-
"description": "Set the moment a budget wall is observed anywhere in this turn — this\ndriver's own 402, or a sub-agent's (which surfaces here only as a\n`'budget_exhausted'` tool result). Read at the top of the tool loop to end\nthe turn before issuing another model call that would hit the same wall.\nReset per turn alongside the other per-turn counters."
|
|
8646
|
-
},
|
|
8647
|
-
{
|
|
8648
|
-
"kind": "field",
|
|
8649
|
-
"name": "budgetWallDetail",
|
|
8650
|
-
"type": {
|
|
8651
|
-
"text": "BudgetDetail | undefined"
|
|
8652
|
-
},
|
|
8653
|
-
"privacy": "private",
|
|
8654
|
-
"description": "The refusing vendor's own attribution for the wall `budgetExhaustedThisTurn`\nrecords, when it was knowable. Kept SEPARATE from the flag rather than\nreplacing it: a figure-less 402 from a transport no vendor claims yields no\ndetail at all (`budgetDetailOf` returns `undefined`), and folding the two\nwould make that case stop ending the turn.\n\nIt matters most for a sub-agent's wall. The child can sit on a different\nvendor from its parent — `applyAgent` reads `config.provider` — so without\nthis the parent's short-circuit reports `lastResolvedProvider`, i.e. the one\nvendor that did NOT refuse. Under a mixed registry that walls Gemini because\nan Anthropic child 402'd, and if those are the only two reachable vendors the\nhost then derives `blocked` and locks a composer that still had headroom."
|
|
8655
|
-
},
|
|
8656
|
-
{
|
|
8657
|
-
"kind": "field",
|
|
8658
|
-
"name": "budgetWallViaSubAgent",
|
|
8659
|
-
"type": {
|
|
8660
|
-
"text": "boolean"
|
|
8661
|
-
},
|
|
8662
|
-
"privacy": "private",
|
|
8663
|
-
"default": "false",
|
|
8664
|
-
"description": "Whether this turn's budget wall came from a SUB-AGENT rather than this\ndriver's own request. Decides whether `lastResolvedProvider` is a valid\nattribution fallback: for an own wall it is the refusing vendor, for a\nchild's wall it is the parent's vendor — the one known NOT to have refused.\nReset per turn alongside `budgetWallDetail`."
|
|
8665
|
-
},
|
|
8666
|
-
{
|
|
8667
|
-
"kind": "method",
|
|
8668
|
-
"name": "dispose",
|
|
8669
8648
|
"return": {
|
|
8670
8649
|
"type": {
|
|
8671
|
-
"text": "
|
|
8650
|
+
"text": "TurnSnapshot"
|
|
8672
8651
|
}
|
|
8673
8652
|
},
|
|
8674
|
-
"
|
|
8653
|
+
"parameters": [
|
|
8654
|
+
{
|
|
8655
|
+
"name": "resolvedSystemPrompt",
|
|
8656
|
+
"type": {
|
|
8657
|
+
"text": "string | undefined"
|
|
8658
|
+
}
|
|
8659
|
+
},
|
|
8660
|
+
{
|
|
8661
|
+
"name": "temperature",
|
|
8662
|
+
"type": {
|
|
8663
|
+
"text": "number | undefined"
|
|
8664
|
+
}
|
|
8665
|
+
},
|
|
8666
|
+
{
|
|
8667
|
+
"name": "toolChoice",
|
|
8668
|
+
"type": {
|
|
8669
|
+
"text": "ChatToolChoice | undefined"
|
|
8670
|
+
}
|
|
8671
|
+
},
|
|
8672
|
+
{
|
|
8673
|
+
"name": "tailContext",
|
|
8674
|
+
"type": {
|
|
8675
|
+
"text": "string | undefined"
|
|
8676
|
+
}
|
|
8677
|
+
}
|
|
8678
|
+
],
|
|
8679
|
+
"description": "Push one snapshot to the ring buffer. Called inside `runToolLoop` just\nbefore each LLM call — that's the latest point where the prompt, tool\nsurface, and agent state line up with what the model is about to see.\n\nReturns the pushed object so the caller can back-fill what only the response\nknows (`usage`). Mutating it after the fact is safe whether or not the ring\nbuffer has since evicted it — an evicted snapshot is simply no longer exported."
|
|
8675
8680
|
},
|
|
8676
8681
|
{
|
|
8677
8682
|
"kind": "method",
|
|
8678
|
-
"name": "
|
|
8683
|
+
"name": "setProviderHistoryTransform",
|
|
8679
8684
|
"return": {
|
|
8680
8685
|
"type": {
|
|
8681
8686
|
"text": "void"
|
|
8682
8687
|
}
|
|
8683
8688
|
},
|
|
8684
|
-
"
|
|
8689
|
+
"parameters": [
|
|
8690
|
+
{
|
|
8691
|
+
"name": "transform",
|
|
8692
|
+
"optional": true,
|
|
8693
|
+
"type": {
|
|
8694
|
+
"text": "(history: ChatMessage[]) => ChatMessage[]"
|
|
8695
|
+
}
|
|
8696
|
+
}
|
|
8697
|
+
],
|
|
8698
|
+
"description": "Optional transform applied to conversation history immediately before each LLM request.\nCleared when `undefined`. Does not alter stored history."
|
|
8685
8699
|
},
|
|
8686
8700
|
{
|
|
8687
8701
|
"kind": "method",
|
|
8688
|
-
"name": "
|
|
8689
|
-
"privacy": "private",
|
|
8702
|
+
"name": "getHistory",
|
|
8690
8703
|
"return": {
|
|
8691
8704
|
"type": {
|
|
8692
|
-
"text": "
|
|
8705
|
+
"text": "ReadonlyArray<ChatMessage>"
|
|
8693
8706
|
}
|
|
8694
|
-
}
|
|
8695
|
-
"description": "Start a fresh per-turn abort scope. Chains `lifecycleController` into the\nnew `turnController` so a dispose mid-turn also aborts the request."
|
|
8707
|
+
}
|
|
8696
8708
|
},
|
|
8697
8709
|
{
|
|
8698
8710
|
"kind": "method",
|
|
8699
|
-
"name": "
|
|
8700
|
-
"privacy": "private",
|
|
8711
|
+
"name": "getRawHistory",
|
|
8701
8712
|
"return": {
|
|
8702
8713
|
"type": {
|
|
8703
|
-
"text": "
|
|
8714
|
+
"text": "readonly ChatMessage[]"
|
|
8704
8715
|
}
|
|
8705
|
-
}
|
|
8706
|
-
"description": "Detach the lifecycle→turn link so a long-lived lifecycle signal doesn't accumulate listeners."
|
|
8716
|
+
}
|
|
8707
8717
|
},
|
|
8708
8718
|
{
|
|
8709
8719
|
"kind": "method",
|
|
8710
|
-
"name": "
|
|
8711
|
-
"privacy": "private",
|
|
8720
|
+
"name": "getActiveFoldNames",
|
|
8712
8721
|
"return": {
|
|
8713
8722
|
"type": {
|
|
8714
|
-
"text": "
|
|
8723
|
+
"text": "string[]"
|
|
8715
8724
|
}
|
|
8716
8725
|
},
|
|
8717
|
-
"description": "
|
|
8726
|
+
"description": "Returns the current fold stack names for debugging."
|
|
8718
8727
|
},
|
|
8719
8728
|
{
|
|
8720
8729
|
"kind": "method",
|
|
8721
|
-
"name": "
|
|
8722
|
-
"privacy": "private",
|
|
8730
|
+
"name": "getSuggestions",
|
|
8723
8731
|
"return": {
|
|
8724
8732
|
"type": {
|
|
8725
|
-
"text": "
|
|
8733
|
+
"text": "Promise<string[]>"
|
|
8726
8734
|
}
|
|
8727
8735
|
},
|
|
8728
8736
|
"parameters": [
|
|
8729
8737
|
{
|
|
8730
|
-
"name": "
|
|
8731
|
-
"optional": true,
|
|
8738
|
+
"name": "history",
|
|
8732
8739
|
"type": {
|
|
8733
|
-
"text": "
|
|
8740
|
+
"text": "ChatMessage[]"
|
|
8734
8741
|
}
|
|
8735
8742
|
},
|
|
8736
8743
|
{
|
|
8737
|
-
"name": "
|
|
8738
|
-
"optional": true,
|
|
8744
|
+
"name": "prompt",
|
|
8739
8745
|
"type": {
|
|
8740
|
-
"text": "
|
|
8746
|
+
"text": "string"
|
|
8741
8747
|
}
|
|
8742
8748
|
},
|
|
8743
8749
|
{
|
|
8744
|
-
"name": "
|
|
8745
|
-
"optional": true,
|
|
8746
|
-
"type": {
|
|
8747
|
-
"text": "ProviderRefusedDetail"
|
|
8748
|
-
}
|
|
8749
|
-
}
|
|
8750
|
-
],
|
|
8751
|
-
"description": "Build the `done` loop result, carrying the typed failure reason when the turn\nbailed (PTC-0). The discriminant stays `'done'` either way — the same value a\nclean turn returns — so consumers matching on `reason === 'done'` are unchanged;\n`failureReason` is simply present on a failure and absent on success. Omitted\n(rather than set to `undefined`) so a happy-path result stays byte-identical to\nthe historical `{ reason: 'done' }`."
|
|
8752
|
-
},
|
|
8753
|
-
{
|
|
8754
|
-
"kind": "method",
|
|
8755
|
-
"name": "reportBudgetExhausted",
|
|
8756
|
-
"return": {
|
|
8757
|
-
"type": {
|
|
8758
|
-
"text": "ChatDriverResult"
|
|
8759
|
-
}
|
|
8760
|
-
},
|
|
8761
|
-
"parameters": [
|
|
8762
|
-
{
|
|
8763
|
-
"name": "e",
|
|
8750
|
+
"name": "count",
|
|
8764
8751
|
"type": {
|
|
8765
|
-
"text": "
|
|
8752
|
+
"text": "number"
|
|
8766
8753
|
}
|
|
8767
8754
|
},
|
|
8768
8755
|
{
|
|
8769
|
-
"name": "
|
|
8756
|
+
"name": "allAgentInfo",
|
|
8770
8757
|
"optional": true,
|
|
8771
8758
|
"type": {
|
|
8772
|
-
"text": "
|
|
8759
|
+
"text": "AllAgentSummary[]"
|
|
8773
8760
|
}
|
|
8774
8761
|
}
|
|
8775
8762
|
]
|
|
8776
8763
|
},
|
|
8777
8764
|
{
|
|
8778
8765
|
"kind": "method",
|
|
8779
|
-
"name": "
|
|
8780
|
-
"privacy": "private",
|
|
8766
|
+
"name": "canCompact",
|
|
8781
8767
|
"return": {
|
|
8782
8768
|
"type": {
|
|
8783
|
-
"text": "
|
|
8769
|
+
"text": "boolean"
|
|
8784
8770
|
}
|
|
8785
8771
|
},
|
|
8786
|
-
"description": "
|
|
8772
|
+
"description": "Whether `compact()` would do anything right now — a summarizable run of older\nturns exists behind a clean boundary. Uses the same `history` `compact()`\nacts on, so the UI's gate can't disagree with the action (GENC-1351 follow-up)."
|
|
8787
8773
|
},
|
|
8788
8774
|
{
|
|
8789
8775
|
"kind": "method",
|
|
8790
|
-
"name": "
|
|
8791
|
-
"privacy": "private",
|
|
8776
|
+
"name": "compact",
|
|
8792
8777
|
"return": {
|
|
8793
8778
|
"type": {
|
|
8794
|
-
"text": "
|
|
8779
|
+
"text": "Promise<ChatMessage | null>"
|
|
8795
8780
|
}
|
|
8796
8781
|
},
|
|
8797
|
-
"
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
|
|
8782
|
+
"description": "Destructively compact older turns into a single `compacted-summary` message\n(GENC-1351 §5.7). Summarizes everything before a clean recent-tail boundary\nvia the registry-default provider's one-shot `prompt()`, then **atomically**\nreplaces the covered turns with one summary message at the head — history is\nmutated only on success. Rolling: any existing head summary is folded into\nthe new one. Returns the created summary message, or `null` when there is\nnothing worth compacting or the default provider cannot summarize."
|
|
8783
|
+
},
|
|
8784
|
+
{
|
|
8785
|
+
"kind": "method",
|
|
8786
|
+
"name": "isBusy",
|
|
8787
|
+
"return": {
|
|
8788
|
+
"type": {
|
|
8789
|
+
"text": "boolean"
|
|
8803
8790
|
}
|
|
8804
|
-
|
|
8805
|
-
"description": "Terminal provider-refusal outcome. Mirrors `reportBudgetExhausted` so the two walls behave\nidentically from the caller's side, while keeping their diagnostics distinct.\n\n`kind` reaches the debug log and the result but never the transcript: it is what lets an operator\ntell \"top up the account\" from \"rotate the key\", and with cause-free user copy this is the only\nplace that distinction survives."
|
|
8791
|
+
}
|
|
8806
8792
|
},
|
|
8807
8793
|
{
|
|
8808
8794
|
"kind": "method",
|
|
8809
|
-
"name": "
|
|
8810
|
-
"privacy": "
|
|
8811
|
-
"static": true,
|
|
8795
|
+
"name": "setHostInteractionRequester",
|
|
8796
|
+
"privacy": "public",
|
|
8812
8797
|
"return": {
|
|
8813
8798
|
"type": {
|
|
8814
|
-
"text": "
|
|
8799
|
+
"text": "void"
|
|
8815
8800
|
}
|
|
8816
8801
|
},
|
|
8817
8802
|
"parameters": [
|
|
8818
8803
|
{
|
|
8819
|
-
"name": "
|
|
8804
|
+
"name": "fn",
|
|
8820
8805
|
"type": {
|
|
8821
|
-
"text": "
|
|
8806
|
+
"text": "<T>(componentName: string, data: any, options?: InteractionRequestOptions) => Promise<T>"
|
|
8822
8807
|
}
|
|
8823
8808
|
}
|
|
8824
8809
|
],
|
|
8825
|
-
"description": "
|
|
8810
|
+
"description": "Wire a parent driver as the host for this driver's interactions. When set,\n`requestInteraction` delegates upward so the widget renders in (and\nresolves through) the parent's history and pending map. Calls chain\nnaturally: a grandchild → child → root."
|
|
8826
8811
|
},
|
|
8827
8812
|
{
|
|
8828
8813
|
"kind": "method",
|
|
8829
|
-
"name": "
|
|
8830
|
-
"privacy": "
|
|
8814
|
+
"name": "requestInteraction",
|
|
8815
|
+
"privacy": "public",
|
|
8831
8816
|
"return": {
|
|
8832
8817
|
"type": {
|
|
8833
|
-
"text": "
|
|
8818
|
+
"text": "Promise<T>"
|
|
8834
8819
|
}
|
|
8835
8820
|
},
|
|
8836
8821
|
"parameters": [
|
|
8837
8822
|
{
|
|
8838
|
-
"name": "
|
|
8823
|
+
"name": "componentName",
|
|
8839
8824
|
"type": {
|
|
8840
|
-
"text": "
|
|
8841
|
-
}
|
|
8825
|
+
"text": "string"
|
|
8826
|
+
},
|
|
8827
|
+
"description": "The custom element name to render."
|
|
8828
|
+
},
|
|
8829
|
+
{
|
|
8830
|
+
"name": "data",
|
|
8831
|
+
"type": {
|
|
8832
|
+
"text": "any"
|
|
8833
|
+
},
|
|
8834
|
+
"description": "Data to pass to the component."
|
|
8835
|
+
},
|
|
8836
|
+
{
|
|
8837
|
+
"name": "options",
|
|
8838
|
+
"optional": true,
|
|
8839
|
+
"type": {
|
|
8840
|
+
"text": "InteractionRequestOptions"
|
|
8841
|
+
},
|
|
8842
|
+
"description": "Optional per-call overrides, including\n`chatInputDuringExecution` to hide or disable the main chat input while\nthe widget is awaiting user input (reverts when the interaction resolves),\nand `presentation` to control whether the host wraps the widget in a chat\nbubble and/or shows the \"Assistant\" label."
|
|
8842
8843
|
}
|
|
8843
8844
|
],
|
|
8844
|
-
"description": "
|
|
8845
|
+
"description": "Request a custom UI interaction. Emits a new message with the interaction.\nTool handlers can call this to pause execution until the user completes the UI interaction.\n\nIf a host requester is wired (sub-agent case), the call delegates upward\nso the interaction lives on the parent — the main UI is only listening to\nthe root driver. Only one interaction may be in flight at any time on a\ngiven root: concurrent calls (e.g. two parallel sub-agents both spawning a\nwidget) throw. Parallel sub-agents are for parallel work, not for user\ninteraction, which is inherently sequential."
|
|
8845
8846
|
},
|
|
8846
8847
|
{
|
|
8847
8848
|
"kind": "method",
|
|
8848
|
-
"name": "
|
|
8849
|
+
"name": "recordExternalCost",
|
|
8850
|
+
"privacy": "public",
|
|
8849
8851
|
"return": {
|
|
8850
8852
|
"type": {
|
|
8851
|
-
"text": "
|
|
8853
|
+
"text": ""
|
|
8852
8854
|
}
|
|
8853
8855
|
},
|
|
8854
8856
|
"parameters": [
|
|
8855
8857
|
{
|
|
8856
|
-
"name": "
|
|
8858
|
+
"name": "interactionId",
|
|
8857
8859
|
"type": {
|
|
8858
|
-
"text": "
|
|
8859
|
-
}
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
8860
|
+
"text": "string"
|
|
8861
|
+
},
|
|
8862
|
+
"description": "the interaction whose message owns the spend."
|
|
8863
|
+
},
|
|
8864
|
+
{
|
|
8865
|
+
"name": "costUsd",
|
|
8866
|
+
"type": {
|
|
8867
|
+
"text": "number"
|
|
8868
|
+
},
|
|
8869
|
+
"description": "a positive delta in USD. Non-finite, zero and negative values are ignored."
|
|
8870
|
+
}
|
|
8871
|
+
],
|
|
8872
|
+
"description": "Add external (non-LLM) spend to an interaction's message AFTER it has resolved.\n\n**Why this exists separately from `resolveInteraction`.** A widget's spend reaches the session\ntotal only through `InteractionResult.costUsd`, which is read exactly once — `resolveInteraction`\ndoes its whole job inside `if (interaction)` and then deletes the entry from\n`pendingInteractions`. That is correct for the resolution itself, but it assumes a widget stops\ncosting money when it resolves, and several deliberately do not: a widget that resolves EARLY so\nthe assistant stops waiting (options shown, a preview rendered) may stay interactive for minutes\nafterwards and do more paid work on the user's behalf. Re-emitting `interaction-completed` does\nnot help — with the interaction gone from the map the call is a silent no-op — so that spend had\nnowhere to go and was simply missing from the figure shown to the user.\n\nAdditive by design: the caller reports a DELTA, not a running total, so repeated calls sum. It\ntouches only `externalCostUsd`; the recorded `interaction.resolved` payload is left exactly as\nthe resolution wrote it, because this is not a second resolution and must not read like one.\n\nDeliberately does NOT require the interaction to be pending, does not resurrect it, and has no\nloading/turn side effects — this is bookkeeping about a turn that already happened."
|
|
8863
8873
|
},
|
|
8864
8874
|
{
|
|
8865
8875
|
"kind": "method",
|
|
8866
|
-
"name": "
|
|
8867
|
-
"privacy": "
|
|
8876
|
+
"name": "resolveInteraction",
|
|
8877
|
+
"privacy": "public",
|
|
8868
8878
|
"return": {
|
|
8869
8879
|
"type": {
|
|
8870
|
-
"text": "
|
|
8880
|
+
"text": "void"
|
|
8871
8881
|
}
|
|
8872
8882
|
},
|
|
8873
8883
|
"parameters": [
|
|
8874
8884
|
{
|
|
8875
|
-
"name": "
|
|
8885
|
+
"name": "interactionId",
|
|
8876
8886
|
"type": {
|
|
8877
8887
|
"text": "string"
|
|
8878
8888
|
}
|
|
8879
8889
|
},
|
|
8880
8890
|
{
|
|
8881
|
-
"name": "
|
|
8882
|
-
"type": {
|
|
8883
|
-
"text": "'stale' | 'unknown'"
|
|
8884
|
-
}
|
|
8885
|
-
},
|
|
8886
|
-
{
|
|
8887
|
-
"name": "fallback",
|
|
8891
|
+
"name": "result",
|
|
8888
8892
|
"type": {
|
|
8889
|
-
"text": "
|
|
8893
|
+
"text": "any"
|
|
8890
8894
|
}
|
|
8891
8895
|
}
|
|
8892
8896
|
],
|
|
8893
|
-
"description": "Resolve
|
|
8897
|
+
"description": "Resolve a pending interaction. The wrapper component calls this on completion.\nMarks the interaction message as resolved so it renders read-only on re-render."
|
|
8894
8898
|
},
|
|
8895
8899
|
{
|
|
8896
8900
|
"kind": "method",
|
|
8897
|
-
"name": "
|
|
8901
|
+
"name": "getInteractionContext",
|
|
8902
|
+
"privacy": "public",
|
|
8898
8903
|
"return": {
|
|
8899
8904
|
"type": {
|
|
8900
|
-
"text": "
|
|
8905
|
+
"text": "InteractionContext | undefined"
|
|
8901
8906
|
}
|
|
8902
8907
|
},
|
|
8903
|
-
"
|
|
8908
|
+
"parameters": [
|
|
8909
|
+
{
|
|
8910
|
+
"name": "interactionId",
|
|
8911
|
+
"type": {
|
|
8912
|
+
"text": "string"
|
|
8913
|
+
}
|
|
8914
|
+
}
|
|
8915
|
+
],
|
|
8916
|
+
"description": "The live InteractionContext for a pending interaction (GENC-1390), or\n`undefined` once resolved/evicted. Read by `AiChatInteractionWrapper` (via the\nhost) to build the widget's pending `interaction` descriptor."
|
|
8904
8917
|
},
|
|
8905
8918
|
{
|
|
8906
8919
|
"kind": "method",
|
|
8907
|
-
"name": "
|
|
8920
|
+
"name": "cancelPendingInteractions",
|
|
8908
8921
|
"privacy": "private",
|
|
8909
8922
|
"return": {
|
|
8910
8923
|
"type": {
|
|
8911
|
-
"text": "
|
|
8924
|
+
"text": "void"
|
|
8912
8925
|
}
|
|
8913
8926
|
},
|
|
8914
8927
|
"parameters": [
|
|
8915
8928
|
{
|
|
8916
|
-
"name": "
|
|
8917
|
-
"type": {
|
|
8918
|
-
"text": "string"
|
|
8919
|
-
}
|
|
8920
|
-
},
|
|
8921
|
-
{
|
|
8922
|
-
"name": "agentName",
|
|
8929
|
+
"name": "message",
|
|
8923
8930
|
"type": {
|
|
8924
8931
|
"text": "string"
|
|
8925
8932
|
}
|
|
8926
8933
|
}
|
|
8927
8934
|
],
|
|
8928
|
-
"description": "Resolve a
|
|
8935
|
+
"description": "Resolve every in-flight interaction with a `'timeout'` result, closing its\nwidget read-only. Used when a sub-agent that owns the open widget times out:\nthe widget is parked in *this* driver's map (interactions resolve on the\nhost, not the child), so cancelling it here unblocks the sub-agent handler\nawaiting it. The \"one interaction at a time\" invariant means there is at\nmost one."
|
|
8929
8936
|
},
|
|
8930
8937
|
{
|
|
8931
8938
|
"kind": "method",
|
|
8932
|
-
"name": "
|
|
8933
|
-
"privacy": "
|
|
8939
|
+
"name": "loadHistory",
|
|
8940
|
+
"privacy": "public",
|
|
8934
8941
|
"return": {
|
|
8935
8942
|
"type": {
|
|
8936
|
-
"text": "
|
|
8943
|
+
"text": "void"
|
|
8937
8944
|
}
|
|
8938
8945
|
},
|
|
8939
8946
|
"parameters": [
|
|
8940
8947
|
{
|
|
8941
|
-
"name": "
|
|
8948
|
+
"name": "messages",
|
|
8942
8949
|
"type": {
|
|
8943
|
-
"text": "
|
|
8950
|
+
"text": "ChatMessage[]"
|
|
8944
8951
|
}
|
|
8945
8952
|
}
|
|
8946
8953
|
],
|
|
8947
|
-
"description": "
|
|
8954
|
+
"description": "Seeds the driver with a prior conversation history so a new component instance\ncan continue an existing conversation. Call this before the first user message."
|
|
8948
8955
|
},
|
|
8949
8956
|
{
|
|
8950
8957
|
"kind": "method",
|
|
8951
|
-
"name": "
|
|
8952
|
-
"privacy": "private",
|
|
8958
|
+
"name": "sendMessage",
|
|
8953
8959
|
"return": {
|
|
8954
8960
|
"type": {
|
|
8955
|
-
"text": "Promise<
|
|
8961
|
+
"text": "Promise<ChatDriverResult>"
|
|
8956
8962
|
}
|
|
8957
8963
|
},
|
|
8958
8964
|
"parameters": [
|
|
8959
8965
|
{
|
|
8960
|
-
"name": "
|
|
8966
|
+
"name": "userInput",
|
|
8961
8967
|
"type": {
|
|
8962
8968
|
"text": "string"
|
|
8963
8969
|
}
|
|
8964
8970
|
},
|
|
8965
8971
|
{
|
|
8966
|
-
"name": "
|
|
8972
|
+
"name": "attachments",
|
|
8973
|
+
"optional": true,
|
|
8967
8974
|
"type": {
|
|
8968
|
-
"text": "
|
|
8975
|
+
"text": "ChatAttachment[]"
|
|
8969
8976
|
}
|
|
8970
8977
|
}
|
|
8978
|
+
]
|
|
8979
|
+
},
|
|
8980
|
+
{
|
|
8981
|
+
"kind": "method",
|
|
8982
|
+
"name": "buildHandlerContext",
|
|
8983
|
+
"privacy": "private",
|
|
8984
|
+
"parameters": [
|
|
8985
|
+
{
|
|
8986
|
+
"name": "activeToolCallId",
|
|
8987
|
+
"optional": true,
|
|
8988
|
+
"type": {
|
|
8989
|
+
"text": "string"
|
|
8990
|
+
},
|
|
8991
|
+
"description": "The id of the tool call this context belongs to, so\n`condenseWhen` can register against the right call (it stamps the clocks\nstraight off the driver). Absent for dispatch paths with no addressable tool\ncall (e.g. the fold-close handler), where `condenseWhen` is a no-op."
|
|
8992
|
+
},
|
|
8993
|
+
{
|
|
8994
|
+
"name": "traceCapture",
|
|
8995
|
+
"optional": true,
|
|
8996
|
+
"type": {
|
|
8997
|
+
"text": "{ traces: ChatMessage[][] }"
|
|
8998
|
+
},
|
|
8999
|
+
"description": "Optional per-tool-call accumulator. When provided, every\nsub-agent call's trace is **appended** here rather than written to shared\ninstance state, so parallel tool calls each capture their own traces\nindependently.\n\nDeliberately a list of traces, not one slot. A single handler may call\n`requestSubAgent` more than once — a code-driven scheduler dispatching a\ndependency graph, a retry of a timed-out child, any fan-out helper — and a\nsingle slot kept only the last, so every other child ran, was billed by the\nprovider, and then vanished from history. The loss was silent in the worst\nway: `sumUsage` and `usageRows` both recurse into the trace, so they summed a\ntruncated input and still agreed with each other. Measured at 1 of 7 traces\nkept on a seven-way fan-out, reporting ~2.3x under the real cost, with the\nerror growing as the fan-out widens."
|
|
9000
|
+
}
|
|
8971
9001
|
],
|
|
8972
|
-
"description": "
|
|
9002
|
+
"description": "Builds the context object passed to every tool handler call.\nCentralised here so fold shortcut dispatch and the main tool loop use the\nsame context without duplication."
|
|
8973
9003
|
},
|
|
8974
9004
|
{
|
|
8975
9005
|
"kind": "method",
|
|
8976
|
-
"name": "
|
|
9006
|
+
"name": "invokeSubAgent",
|
|
8977
9007
|
"privacy": "private",
|
|
8978
9008
|
"return": {
|
|
8979
9009
|
"type": {
|
|
8980
|
-
"text": "Promise<T |
|
|
9010
|
+
"text": "Promise<{\n // Closed union (see ChatToolHandlers.requestSubAgent) — keeps `result`/`reason`\n // accessible for consumers compiled without strictNullChecks.\n outcome:\n | { ok: true; result: T; reason?: never }\n | { ok: false; result?: never; reason: SubAgentFailureReason };\n trace: ChatMessage[];\n }>"
|
|
8981
9011
|
}
|
|
8982
9012
|
},
|
|
8983
9013
|
"parameters": [
|
|
8984
9014
|
{
|
|
8985
|
-
"name": "
|
|
9015
|
+
"name": "name",
|
|
8986
9016
|
"type": {
|
|
8987
|
-
"text": "
|
|
9017
|
+
"text": "string"
|
|
8988
9018
|
}
|
|
8989
9019
|
},
|
|
8990
9020
|
{
|
|
8991
|
-
"name": "
|
|
9021
|
+
"name": "options",
|
|
9022
|
+
"optional": true,
|
|
8992
9023
|
"type": {
|
|
8993
|
-
"text": "
|
|
9024
|
+
"text": "SubAgentRequestOptions"
|
|
8994
9025
|
}
|
|
8995
9026
|
}
|
|
8996
9027
|
],
|
|
8997
|
-
"description": "
|
|
9028
|
+
"description": "Creates a child `ChatDriver` for the named sub-agent, runs it to completion,\nand returns its structured result (or final text fallback) together with the\nfull child conversation trace. Callers receive both values so each parallel\ninvocation can capture its own trace without touching shared instance state."
|
|
8998
9029
|
},
|
|
8999
9030
|
{
|
|
9000
9031
|
"kind": "method",
|
|
9001
|
-
"name": "
|
|
9032
|
+
"name": "continueFromHistory",
|
|
9002
9033
|
"return": {
|
|
9003
9034
|
"type": {
|
|
9004
|
-
"text": "
|
|
9035
|
+
"text": "Promise<ChatDriverResult>"
|
|
9005
9036
|
}
|
|
9006
9037
|
},
|
|
9007
|
-
"
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
"text": "void"
|
|
9038
|
+
"parameters": [
|
|
9039
|
+
{
|
|
9040
|
+
"name": "transientPrimer",
|
|
9041
|
+
"optional": true,
|
|
9042
|
+
"type": {
|
|
9043
|
+
"text": "ChatMessage[]"
|
|
9044
|
+
}
|
|
9015
9045
|
}
|
|
9016
|
-
|
|
9017
|
-
"description": "
|
|
9046
|
+
],
|
|
9047
|
+
"description": "Continue the tool loop from current history without appending a new user message.\nUsed by OrchestratingDriver after an agent handoff."
|
|
9018
9048
|
},
|
|
9019
9049
|
{
|
|
9020
9050
|
"kind": "method",
|
|
9021
|
-
"name": "
|
|
9051
|
+
"name": "getFold",
|
|
9052
|
+
"privacy": "private",
|
|
9022
9053
|
"return": {
|
|
9023
9054
|
"type": {
|
|
9024
|
-
"text": "
|
|
9055
|
+
"text": "ToolFold | undefined"
|
|
9025
9056
|
}
|
|
9026
9057
|
},
|
|
9027
|
-
"
|
|
9058
|
+
"parameters": [
|
|
9059
|
+
{
|
|
9060
|
+
"name": "toolName",
|
|
9061
|
+
"type": {
|
|
9062
|
+
"text": "string"
|
|
9063
|
+
}
|
|
9064
|
+
}
|
|
9065
|
+
],
|
|
9066
|
+
"description": "Extract ToolFold metadata from a handler, or undefined if it isn't a fold facade."
|
|
9028
9067
|
},
|
|
9029
9068
|
{
|
|
9030
9069
|
"kind": "method",
|
|
9031
|
-
"name": "
|
|
9070
|
+
"name": "findFoldContaining",
|
|
9032
9071
|
"privacy": "private",
|
|
9033
9072
|
"return": {
|
|
9034
9073
|
"type": {
|
|
9035
|
-
"text": "
|
|
9074
|
+
"text": "string | null"
|
|
9036
9075
|
}
|
|
9037
9076
|
},
|
|
9038
9077
|
"parameters": [
|
|
9039
9078
|
{
|
|
9040
|
-
"name": "
|
|
9041
|
-
"type": {
|
|
9042
|
-
"text": "SubAgentFailureReason"
|
|
9043
|
-
}
|
|
9044
|
-
},
|
|
9045
|
-
{
|
|
9046
|
-
"name": "budget",
|
|
9047
|
-
"optional": true,
|
|
9079
|
+
"name": "toolName",
|
|
9048
9080
|
"type": {
|
|
9049
|
-
"text": "
|
|
9081
|
+
"text": "string"
|
|
9050
9082
|
}
|
|
9051
9083
|
},
|
|
9052
9084
|
{
|
|
9053
|
-
"name": "
|
|
9085
|
+
"name": "handlers",
|
|
9054
9086
|
"optional": true,
|
|
9055
9087
|
"type": {
|
|
9056
|
-
"text": "
|
|
9088
|
+
"text": "ChatToolHandlers"
|
|
9057
9089
|
}
|
|
9058
9090
|
}
|
|
9059
9091
|
],
|
|
9060
|
-
"description": "
|
|
9061
|
-
},
|
|
9062
|
-
{
|
|
9063
|
-
"kind": "method",
|
|
9064
|
-
"name": "getAgentReleaseRequested",
|
|
9065
|
-
"return": {
|
|
9066
|
-
"type": {
|
|
9067
|
-
"text": "boolean"
|
|
9068
|
-
}
|
|
9069
|
-
},
|
|
9070
|
-
"description": "Returns true if `releaseAgent` was called during the most recent turn.\nConsumed by the orchestrator to trigger the auto-pin release path."
|
|
9092
|
+
"description": "Search all currently registered fold facades (and their nested folds recursively)\nto find which fold contains a given tool name. Returns the immediate parent fold name."
|
|
9071
9093
|
},
|
|
9072
9094
|
{
|
|
9073
9095
|
"kind": "method",
|
|
9074
|
-
"name": "
|
|
9096
|
+
"name": "foldHidingTool",
|
|
9097
|
+
"privacy": "private",
|
|
9075
9098
|
"return": {
|
|
9076
9099
|
"type": {
|
|
9077
|
-
"text": "
|
|
9100
|
+
"text": "string | null"
|
|
9078
9101
|
}
|
|
9079
9102
|
},
|
|
9080
|
-
"
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
"type": {
|
|
9087
|
-
"text": "ReadonlyArray<DiagnosticEntry>"
|
|
9103
|
+
"parameters": [
|
|
9104
|
+
{
|
|
9105
|
+
"name": "toolName",
|
|
9106
|
+
"type": {
|
|
9107
|
+
"text": "string"
|
|
9108
|
+
}
|
|
9088
9109
|
}
|
|
9089
|
-
|
|
9090
|
-
"description": "
|
|
9110
|
+
],
|
|
9111
|
+
"description": "If an open fold is hiding a previously-available tool, return the name of\nthe fold to close to start getting it back. Only exclusive folds hide tools\n(they replace the tool set on open rather than extending it), so a base tool\nthat was visible before the fold opened now sits in a fold-stack frame's\n`previousHandlers` but not in the live handler map. Only the top fold's\n`close_` tool is active, so that's always the actionable next step — even\nwhen the tool lives further down the stack, closing repeatedly walks back to\nit. Returns null when no open fold accounts for the tool."
|
|
9091
9112
|
},
|
|
9092
9113
|
{
|
|
9093
9114
|
"kind": "method",
|
|
9094
|
-
"name": "
|
|
9115
|
+
"name": "applyFoldToolSet",
|
|
9095
9116
|
"privacy": "private",
|
|
9096
9117
|
"return": {
|
|
9097
9118
|
"type": {
|
|
@@ -9100,54 +9121,62 @@
|
|
|
9100
9121
|
},
|
|
9101
9122
|
"parameters": [
|
|
9102
9123
|
{
|
|
9103
|
-
"name": "
|
|
9124
|
+
"name": "fold",
|
|
9104
9125
|
"type": {
|
|
9105
|
-
"text": "
|
|
9126
|
+
"text": "ToolFold"
|
|
9127
|
+
}
|
|
9128
|
+
},
|
|
9129
|
+
{
|
|
9130
|
+
"name": "foldName",
|
|
9131
|
+
"type": {
|
|
9132
|
+
"text": "string"
|
|
9106
9133
|
}
|
|
9107
9134
|
}
|
|
9108
9135
|
],
|
|
9109
|
-
"description": "
|
|
9136
|
+
"description": "Install the fold's inner tool set, replacing (exclusive) or extending (non-exclusive)\nthe current tool set. Also injects the close tool. Does NOT touch the fold stack."
|
|
9110
9137
|
},
|
|
9111
9138
|
{
|
|
9112
9139
|
"kind": "method",
|
|
9113
|
-
"name": "
|
|
9140
|
+
"name": "openFold",
|
|
9114
9141
|
"privacy": "private",
|
|
9115
9142
|
"return": {
|
|
9116
9143
|
"type": {
|
|
9117
|
-
"text": "
|
|
9144
|
+
"text": "Promise<string>"
|
|
9118
9145
|
}
|
|
9119
9146
|
},
|
|
9120
9147
|
"parameters": [
|
|
9121
9148
|
{
|
|
9122
|
-
"name": "
|
|
9149
|
+
"name": "foldName",
|
|
9123
9150
|
"type": {
|
|
9124
|
-
"text": "string
|
|
9151
|
+
"text": "string"
|
|
9125
9152
|
}
|
|
9126
9153
|
},
|
|
9127
9154
|
{
|
|
9128
|
-
"name": "
|
|
9155
|
+
"name": "fold",
|
|
9129
9156
|
"type": {
|
|
9130
|
-
"text": "
|
|
9157
|
+
"text": "ToolFold"
|
|
9131
9158
|
}
|
|
9132
9159
|
},
|
|
9133
9160
|
{
|
|
9134
|
-
"name": "
|
|
9161
|
+
"name": "args",
|
|
9135
9162
|
"type": {
|
|
9136
|
-
"text": "
|
|
9163
|
+
"text": "Record<string, unknown>"
|
|
9137
9164
|
}
|
|
9138
9165
|
},
|
|
9139
9166
|
{
|
|
9140
|
-
"name": "
|
|
9167
|
+
"name": "activeToolCallId",
|
|
9168
|
+
"optional": true,
|
|
9141
9169
|
"type": {
|
|
9142
|
-
"text": "string
|
|
9170
|
+
"text": "string"
|
|
9143
9171
|
}
|
|
9144
9172
|
}
|
|
9145
9173
|
],
|
|
9146
|
-
"description": "
|
|
9174
|
+
"description": "Open a fold: push a stack frame, swap the tool set, return the response message."
|
|
9147
9175
|
},
|
|
9148
9176
|
{
|
|
9149
9177
|
"kind": "method",
|
|
9150
|
-
"name": "
|
|
9178
|
+
"name": "pushFoldFrame",
|
|
9179
|
+
"privacy": "private",
|
|
9151
9180
|
"return": {
|
|
9152
9181
|
"type": {
|
|
9153
9182
|
"text": "void"
|
|
@@ -9155,112 +9184,71 @@
|
|
|
9155
9184
|
},
|
|
9156
9185
|
"parameters": [
|
|
9157
9186
|
{
|
|
9158
|
-
"name": "
|
|
9159
|
-
"optional": true,
|
|
9187
|
+
"name": "foldName",
|
|
9160
9188
|
"type": {
|
|
9161
|
-
"text": "
|
|
9189
|
+
"text": "string"
|
|
9162
9190
|
}
|
|
9163
9191
|
}
|
|
9164
|
-
]
|
|
9165
|
-
"description": "Optional transform applied to conversation history immediately before each LLM request.\nCleared when `undefined`. Does not alter stored history."
|
|
9166
|
-
},
|
|
9167
|
-
{
|
|
9168
|
-
"kind": "method",
|
|
9169
|
-
"name": "getHistory",
|
|
9170
|
-
"return": {
|
|
9171
|
-
"type": {
|
|
9172
|
-
"text": "ReadonlyArray<ChatMessage>"
|
|
9173
|
-
}
|
|
9174
|
-
}
|
|
9192
|
+
]
|
|
9175
9193
|
},
|
|
9176
9194
|
{
|
|
9177
9195
|
"kind": "method",
|
|
9178
|
-
"name": "
|
|
9196
|
+
"name": "closeFold",
|
|
9197
|
+
"privacy": "private",
|
|
9179
9198
|
"return": {
|
|
9180
9199
|
"type": {
|
|
9181
|
-
"text": "
|
|
9200
|
+
"text": "string"
|
|
9182
9201
|
}
|
|
9183
|
-
}
|
|
9202
|
+
},
|
|
9203
|
+
"description": "Close the top fold: pop the stack frame, restore the previous tool set."
|
|
9184
9204
|
},
|
|
9185
9205
|
{
|
|
9186
9206
|
"kind": "method",
|
|
9187
|
-
"name": "
|
|
9207
|
+
"name": "buildFoldSystemPromptSuffix",
|
|
9208
|
+
"privacy": "private",
|
|
9188
9209
|
"return": {
|
|
9189
9210
|
"type": {
|
|
9190
|
-
"text": "string
|
|
9211
|
+
"text": "string"
|
|
9191
9212
|
}
|
|
9192
9213
|
},
|
|
9193
|
-
"description": "
|
|
9214
|
+
"description": "Build the fold-awareness suffix appended to the system prompt each LLM call."
|
|
9194
9215
|
},
|
|
9195
9216
|
{
|
|
9196
9217
|
"kind": "method",
|
|
9197
|
-
"name": "
|
|
9218
|
+
"name": "runToolLoop",
|
|
9219
|
+
"privacy": "private",
|
|
9198
9220
|
"return": {
|
|
9199
9221
|
"type": {
|
|
9200
|
-
"text": "Promise<
|
|
9222
|
+
"text": "Promise<ChatDriverResult>"
|
|
9201
9223
|
}
|
|
9202
9224
|
},
|
|
9203
9225
|
"parameters": [
|
|
9204
9226
|
{
|
|
9205
|
-
"name": "
|
|
9206
|
-
"type": {
|
|
9207
|
-
"text": "ChatMessage[]"
|
|
9208
|
-
}
|
|
9209
|
-
},
|
|
9210
|
-
{
|
|
9211
|
-
"name": "prompt",
|
|
9227
|
+
"name": "userInput",
|
|
9212
9228
|
"type": {
|
|
9213
9229
|
"text": "string"
|
|
9214
9230
|
}
|
|
9215
9231
|
},
|
|
9216
9232
|
{
|
|
9217
|
-
"name": "
|
|
9233
|
+
"name": "attachments",
|
|
9234
|
+
"optional": true,
|
|
9218
9235
|
"type": {
|
|
9219
|
-
"text": "
|
|
9236
|
+
"text": "ChatAttachment[]"
|
|
9220
9237
|
}
|
|
9221
9238
|
},
|
|
9222
9239
|
{
|
|
9223
|
-
"name": "
|
|
9240
|
+
"name": "transientPrimer",
|
|
9224
9241
|
"optional": true,
|
|
9225
9242
|
"type": {
|
|
9226
|
-
"text": "
|
|
9243
|
+
"text": "ChatMessage[]"
|
|
9227
9244
|
}
|
|
9228
9245
|
}
|
|
9229
9246
|
]
|
|
9230
9247
|
},
|
|
9231
9248
|
{
|
|
9232
9249
|
"kind": "method",
|
|
9233
|
-
"name": "
|
|
9234
|
-
"
|
|
9235
|
-
"type": {
|
|
9236
|
-
"text": "boolean"
|
|
9237
|
-
}
|
|
9238
|
-
},
|
|
9239
|
-
"description": "Whether `compact()` would do anything right now — a summarizable run of older\nturns exists behind a clean boundary. Uses the same `history` `compact()`\nacts on, so the UI's gate can't disagree with the action (GENC-1351 follow-up)."
|
|
9240
|
-
},
|
|
9241
|
-
{
|
|
9242
|
-
"kind": "method",
|
|
9243
|
-
"name": "compact",
|
|
9244
|
-
"return": {
|
|
9245
|
-
"type": {
|
|
9246
|
-
"text": "Promise<ChatMessage | null>"
|
|
9247
|
-
}
|
|
9248
|
-
},
|
|
9249
|
-
"description": "Destructively compact older turns into a single `compacted-summary` message\n(GENC-1351 §5.7). Summarizes everything before a clean recent-tail boundary\nvia the registry-default provider's one-shot `prompt()`, then **atomically**\nreplaces the covered turns with one summary message at the head — history is\nmutated only on success. Rolling: any existing head summary is folded into\nthe new one. Returns the created summary message, or `null` when there is\nnothing worth compacting or the default provider cannot summarize."
|
|
9250
|
-
},
|
|
9251
|
-
{
|
|
9252
|
-
"kind": "method",
|
|
9253
|
-
"name": "isBusy",
|
|
9254
|
-
"return": {
|
|
9255
|
-
"type": {
|
|
9256
|
-
"text": "boolean"
|
|
9257
|
-
}
|
|
9258
|
-
}
|
|
9259
|
-
},
|
|
9260
|
-
{
|
|
9261
|
-
"kind": "method",
|
|
9262
|
-
"name": "setHostInteractionRequester",
|
|
9263
|
-
"privacy": "public",
|
|
9250
|
+
"name": "appendToHistory",
|
|
9251
|
+
"privacy": "private",
|
|
9264
9252
|
"return": {
|
|
9265
9253
|
"type": {
|
|
9266
9254
|
"text": "void"
|
|
@@ -9268,548 +9256,560 @@
|
|
|
9268
9256
|
},
|
|
9269
9257
|
"parameters": [
|
|
9270
9258
|
{
|
|
9271
|
-
"name": "
|
|
9259
|
+
"name": "message",
|
|
9272
9260
|
"type": {
|
|
9273
|
-
"text": "
|
|
9261
|
+
"text": "ChatMessage"
|
|
9274
9262
|
}
|
|
9275
9263
|
}
|
|
9276
|
-
]
|
|
9277
|
-
|
|
9278
|
-
|
|
9264
|
+
]
|
|
9265
|
+
}
|
|
9266
|
+
],
|
|
9267
|
+
"events": [
|
|
9279
9268
|
{
|
|
9280
|
-
"
|
|
9281
|
-
"
|
|
9282
|
-
|
|
9283
|
-
|
|
9284
|
-
"type": {
|
|
9285
|
-
"text": "Promise<T>"
|
|
9286
|
-
}
|
|
9287
|
-
},
|
|
9288
|
-
"parameters": [
|
|
9289
|
-
{
|
|
9290
|
-
"name": "componentName",
|
|
9291
|
-
"type": {
|
|
9292
|
-
"text": "string"
|
|
9293
|
-
},
|
|
9294
|
-
"description": "The custom element name to render."
|
|
9295
|
-
},
|
|
9296
|
-
{
|
|
9297
|
-
"name": "data",
|
|
9298
|
-
"type": {
|
|
9299
|
-
"text": "any"
|
|
9300
|
-
},
|
|
9301
|
-
"description": "Data to pass to the component."
|
|
9302
|
-
},
|
|
9303
|
-
{
|
|
9304
|
-
"name": "options",
|
|
9305
|
-
"optional": true,
|
|
9306
|
-
"type": {
|
|
9307
|
-
"text": "InteractionRequestOptions"
|
|
9308
|
-
},
|
|
9309
|
-
"description": "Optional per-call overrides, including\n`chatInputDuringExecution` to hide or disable the main chat input while\nthe widget is awaiting user input (reverts when the interaction resolves),\nand `presentation` to control whether the host wraps the widget in a chat\nbubble and/or shows the \"Assistant\" label."
|
|
9310
|
-
}
|
|
9311
|
-
],
|
|
9312
|
-
"description": "Request a custom UI interaction. Emits a new message with the interaction.\nTool handlers can call this to pause execution until the user completes the UI interaction.\n\nIf a host requester is wired (sub-agent case), the call delegates upward\nso the interaction lives on the parent — the main UI is only listening to\nthe root driver. Only one interaction may be in flight at any time on a\ngiven root: concurrent calls (e.g. two parallel sub-agents both spawning a\nwidget) throw. Parallel sub-agents are for parallel work, not for user\ninteraction, which is inherently sequential."
|
|
9269
|
+
"name": "provider-changed",
|
|
9270
|
+
"type": {
|
|
9271
|
+
"text": "CustomEvent"
|
|
9272
|
+
}
|
|
9313
9273
|
},
|
|
9314
9274
|
{
|
|
9315
|
-
"
|
|
9316
|
-
"
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
"type": {
|
|
9320
|
-
"text": ""
|
|
9321
|
-
}
|
|
9322
|
-
},
|
|
9323
|
-
"parameters": [
|
|
9324
|
-
{
|
|
9325
|
-
"name": "interactionId",
|
|
9326
|
-
"type": {
|
|
9327
|
-
"text": "string"
|
|
9328
|
-
},
|
|
9329
|
-
"description": "the interaction whose message owns the spend."
|
|
9330
|
-
},
|
|
9331
|
-
{
|
|
9332
|
-
"name": "costUsd",
|
|
9333
|
-
"type": {
|
|
9334
|
-
"text": "number"
|
|
9335
|
-
},
|
|
9336
|
-
"description": "a positive delta in USD. Non-finite, zero and negative values are ignored."
|
|
9337
|
-
}
|
|
9338
|
-
],
|
|
9339
|
-
"description": "Add external (non-LLM) spend to an interaction's message AFTER it has resolved.\n\n**Why this exists separately from `resolveInteraction`.** A widget's spend reaches the session\ntotal only through `InteractionResult.costUsd`, which is read exactly once — `resolveInteraction`\ndoes its whole job inside `if (interaction)` and then deletes the entry from\n`pendingInteractions`. That is correct for the resolution itself, but it assumes a widget stops\ncosting money when it resolves, and several deliberately do not: a widget that resolves EARLY so\nthe assistant stops waiting (options shown, a preview rendered) may stay interactive for minutes\nafterwards and do more paid work on the user's behalf. Re-emitting `interaction-completed` does\nnot help — with the interaction gone from the map the call is a silent no-op — so that spend had\nnowhere to go and was simply missing from the figure shown to the user.\n\nAdditive by design: the caller reports a DELTA, not a running total, so repeated calls sum. It\ntouches only `externalCostUsd`; the recorded `interaction.resolved` payload is left exactly as\nthe resolution wrote it, because this is not a second resolution and must not read like one.\n\nDeliberately does NOT require the interaction to be pending, does not resurrect it, and has no\nloading/turn side effects — this is bookkeeping about a turn that already happened."
|
|
9275
|
+
"name": "interaction-start",
|
|
9276
|
+
"type": {
|
|
9277
|
+
"text": "CustomEvent"
|
|
9278
|
+
}
|
|
9340
9279
|
},
|
|
9341
9280
|
{
|
|
9342
|
-
"
|
|
9343
|
-
"
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
"type": {
|
|
9347
|
-
"text": "void"
|
|
9348
|
-
}
|
|
9349
|
-
},
|
|
9350
|
-
"parameters": [
|
|
9351
|
-
{
|
|
9352
|
-
"name": "interactionId",
|
|
9353
|
-
"type": {
|
|
9354
|
-
"text": "string"
|
|
9355
|
-
}
|
|
9356
|
-
},
|
|
9357
|
-
{
|
|
9358
|
-
"name": "result",
|
|
9359
|
-
"type": {
|
|
9360
|
-
"text": "any"
|
|
9361
|
-
}
|
|
9362
|
-
}
|
|
9363
|
-
],
|
|
9364
|
-
"description": "Resolve a pending interaction. The wrapper component calls this on completion.\nMarks the interaction message as resolved so it renders read-only on re-render."
|
|
9281
|
+
"name": "external-cost-recorded",
|
|
9282
|
+
"type": {
|
|
9283
|
+
"text": "CustomEvent"
|
|
9284
|
+
}
|
|
9365
9285
|
},
|
|
9366
9286
|
{
|
|
9367
|
-
"
|
|
9368
|
-
"
|
|
9369
|
-
|
|
9370
|
-
"return": {
|
|
9371
|
-
"type": {
|
|
9372
|
-
"text": "InteractionContext | undefined"
|
|
9373
|
-
}
|
|
9287
|
+
"name": "history-updated",
|
|
9288
|
+
"type": {
|
|
9289
|
+
"text": "CustomEvent"
|
|
9374
9290
|
},
|
|
9375
|
-
"
|
|
9376
|
-
{
|
|
9377
|
-
"name": "interactionId",
|
|
9378
|
-
"type": {
|
|
9379
|
-
"text": "string"
|
|
9380
|
-
}
|
|
9381
|
-
}
|
|
9382
|
-
],
|
|
9383
|
-
"description": "The live InteractionContext for a pending interaction (GENC-1390), or\n`undefined` once resolved/evicted. Read by `AiChatInteractionWrapper` (via the\nhost) to build the widget's pending `interaction` descriptor."
|
|
9291
|
+
"description": "Fired whenever the in-memory chat history changes (append, tool loop, interaction resolution, post-resolve external cost) with the full history snapshot. detail: `ReadonlyArray<ChatMessage>`"
|
|
9384
9292
|
},
|
|
9385
9293
|
{
|
|
9386
|
-
"
|
|
9387
|
-
"
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
"type": {
|
|
9391
|
-
"text": "void"
|
|
9392
|
-
}
|
|
9393
|
-
},
|
|
9394
|
-
"parameters": [
|
|
9395
|
-
{
|
|
9396
|
-
"name": "message",
|
|
9397
|
-
"type": {
|
|
9398
|
-
"text": "string"
|
|
9399
|
-
}
|
|
9400
|
-
}
|
|
9401
|
-
],
|
|
9402
|
-
"description": "Resolve every in-flight interaction with a `'timeout'` result, closing its\nwidget read-only. Used when a sub-agent that owns the open widget times out:\nthe widget is parked in *this* driver's map (interactions resolve on the\nhost, not the child), so cancelling it here unblocks the sub-agent handler\nawaiting it. The \"one interaction at a time\" invariant means there is at\nmost one."
|
|
9294
|
+
"name": "interaction-stop",
|
|
9295
|
+
"type": {
|
|
9296
|
+
"text": "CustomEvent"
|
|
9297
|
+
}
|
|
9403
9298
|
},
|
|
9404
9299
|
{
|
|
9405
|
-
"
|
|
9406
|
-
"
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
"type": {
|
|
9410
|
-
"text": "void"
|
|
9411
|
-
}
|
|
9412
|
-
},
|
|
9413
|
-
"parameters": [
|
|
9414
|
-
{
|
|
9415
|
-
"name": "messages",
|
|
9416
|
-
"type": {
|
|
9417
|
-
"text": "ChatMessage[]"
|
|
9418
|
-
}
|
|
9419
|
-
}
|
|
9420
|
-
],
|
|
9421
|
-
"description": "Seeds the driver with a prior conversation history so a new component instance\ncan continue an existing conversation. Call this before the first user message."
|
|
9300
|
+
"name": "sub-agent-history-updated",
|
|
9301
|
+
"type": {
|
|
9302
|
+
"text": "CustomEvent"
|
|
9303
|
+
}
|
|
9422
9304
|
},
|
|
9423
9305
|
{
|
|
9424
|
-
"
|
|
9425
|
-
"
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9306
|
+
"name": "sub-agent-start",
|
|
9307
|
+
"type": {
|
|
9308
|
+
"text": "CustomEvent"
|
|
9309
|
+
}
|
|
9310
|
+
},
|
|
9311
|
+
{
|
|
9312
|
+
"name": "sub-agent-stop",
|
|
9313
|
+
"type": {
|
|
9314
|
+
"text": "CustomEvent"
|
|
9315
|
+
}
|
|
9316
|
+
}
|
|
9317
|
+
],
|
|
9318
|
+
"superclass": {
|
|
9319
|
+
"name": "EventTarget",
|
|
9320
|
+
"module": "src/components/chat-driver/chat-driver.ts"
|
|
9321
|
+
}
|
|
9322
|
+
}
|
|
9323
|
+
],
|
|
9324
|
+
"exports": [
|
|
9325
|
+
{
|
|
9326
|
+
"kind": "js",
|
|
9327
|
+
"name": "REQUEST_CONTINUATION_TOOL",
|
|
9328
|
+
"declaration": {
|
|
9329
|
+
"name": "REQUEST_CONTINUATION_TOOL",
|
|
9330
|
+
"module": "src/components/chat-driver/chat-driver.ts"
|
|
9331
|
+
}
|
|
9332
|
+
},
|
|
9333
|
+
{
|
|
9334
|
+
"kind": "js",
|
|
9335
|
+
"name": "ChatDriver",
|
|
9336
|
+
"declaration": {
|
|
9337
|
+
"name": "ChatDriver",
|
|
9338
|
+
"module": "src/components/chat-driver/chat-driver.ts"
|
|
9339
|
+
}
|
|
9340
|
+
}
|
|
9341
|
+
]
|
|
9342
|
+
},
|
|
9343
|
+
{
|
|
9344
|
+
"kind": "javascript-module",
|
|
9345
|
+
"path": "src/components/chat-driver/index.ts",
|
|
9346
|
+
"declarations": [],
|
|
9347
|
+
"exports": [
|
|
9348
|
+
{
|
|
9349
|
+
"kind": "js",
|
|
9350
|
+
"name": "*",
|
|
9351
|
+
"declaration": {
|
|
9352
|
+
"name": "*",
|
|
9353
|
+
"package": "./chat-driver"
|
|
9354
|
+
}
|
|
9355
|
+
}
|
|
9356
|
+
]
|
|
9357
|
+
},
|
|
9358
|
+
{
|
|
9359
|
+
"kind": "javascript-module",
|
|
9360
|
+
"path": "src/components/chat-bubble/chat-bubble.styles.ts",
|
|
9361
|
+
"declarations": [
|
|
9362
|
+
{
|
|
9363
|
+
"kind": "variable",
|
|
9364
|
+
"name": "styles",
|
|
9365
|
+
"default": "css`\n :host {\n position: fixed;\n inset: 0;\n pointer-events: none;\n z-index: 9999;\n overflow: visible;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .bubble {\n position: absolute;\n width: 62px;\n height: 62px;\n border-radius: 50%;\n cursor: grab;\n pointer-events: all;\n overflow: visible;\n display: flex;\n align-items: center;\n justify-content: center;\n user-select: none;\n transition:\n transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),\n box-shadow 0.25s ease;\n background: linear-gradient(135deg, #0e1628 0%, #192340 100%);\n box-shadow: 0 4px 20px rgb(0 0 0 / 45%);\n border: 2px solid rgb(255 255 255 / 15%);\n color: white;\n }\n\n .bubble img {\n width: 62px;\n height: 62px;\n border-radius: 50%;\n object-fit: cover;\n pointer-events: none;\n box-shadow: 0 4px 20px rgb(0 0 0 / 45%);\n border: 2px solid rgb(255 255 255 / 15%);\n }\n\n .bubble svg {\n pointer-events: none;\n }\n\n .bubble:hover,\n .bubble.hovered {\n transform: scale(1.18);\n }\n\n .bubble:hover img,\n .bubble.hovered img {\n box-shadow:\n 0 6px 32px rgb(0 100 255 / 55%),\n 0 0 0 3px rgb(0 120 255 / 35%);\n }\n\n .bubble:active {\n cursor: grabbing;\n }\n\n .tooltip {\n position: absolute;\n bottom: calc(100% + 10px);\n background: linear-gradient(135deg, #0078ff 0%, #0050d0 100%);\n color: #fff;\n font-size: 0.78em;\n font-weight: 600;\n letter-spacing: 0.03em;\n white-space: nowrap;\n padding: 5px 10px;\n border-radius: 8px;\n box-shadow: 0 4px 14px rgb(0 120 255 / 45%);\n pointer-events: none;\n opacity: 0%;\n translate: 0 4px;\n transition:\n opacity 0.18s ease,\n translate 0.18s ease;\n }\n\n .tooltip::after {\n content: '';\n position: absolute;\n top: 100%;\n left: var(--arrow-left, 50%);\n transform: translateX(-50%);\n border: 5px solid transparent;\n border-top-color: #0050d0;\n }\n\n .bubble:hover .tooltip,\n .bubble.hovered .tooltip {\n opacity: 100%;\n translate: 0 0;\n }\n\n .pulse-ring {\n position: absolute;\n width: 62px;\n height: 62px;\n border-radius: 50%;\n border: 2px solid rgb(0 120 255 / 50%);\n animation: pulse 2.5s ease-out infinite;\n pointer-events: none;\n }\n\n @keyframes pulse {\n 0% {\n transform: scale(1);\n opacity: 70%;\n }\n\n 70% {\n transform: scale(1.5);\n opacity: 0%;\n }\n\n 100% {\n transform: scale(1.5);\n opacity: 0%;\n }\n }\n\n .dialog {\n position: absolute;\n box-sizing: border-box;\n width: 400px;\n height: 520px;\n min-width: 300px;\n min-height: 300px;\n max-width: 50vw;\n max-height: calc(100vh - 40px);\n background: var(--neutral-layer-1);\n border-radius: 14px;\n box-shadow:\n 0 12px 50px rgb(0 0 0 / 55%),\n 0 0 0 1px rgb(255 255 255 / 6%);\n pointer-events: all;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n resize: both;\n border: 1px solid var(--neutral-stroke-rest);\n animation: dialog-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);\n }\n\n @keyframes dialog-in {\n from {\n opacity: 0%;\n transform: scale(0.85) translateY(12px);\n }\n\n to {\n opacity: 100%;\n transform: scale(1) translateY(0);\n }\n }\n\n @keyframes dialog-out {\n from {\n opacity: 100%;\n transform: scale(1) translateY(0);\n }\n\n to {\n opacity: 0%;\n transform: scale(0.85) translateY(12px);\n }\n }\n\n .dialog.closing {\n animation: dialog-out 0.2s cubic-bezier(0.4, 0, 0.6, 1) forwards;\n }\n\n .dialog-content {\n flex: 1;\n overflow: hidden;\n display: flex;\n min-height: 0;\n }\n\n .dialog-content ::slotted(*) {\n display: flex;\n flex: 1;\n width: 100%;\n min-height: 0;\n }\n`"
|
|
9366
|
+
}
|
|
9367
|
+
],
|
|
9368
|
+
"exports": [
|
|
9369
|
+
{
|
|
9370
|
+
"kind": "js",
|
|
9371
|
+
"name": "styles",
|
|
9372
|
+
"declaration": {
|
|
9373
|
+
"name": "styles",
|
|
9374
|
+
"module": "src/components/chat-bubble/chat-bubble.styles.ts"
|
|
9375
|
+
}
|
|
9376
|
+
}
|
|
9377
|
+
]
|
|
9378
|
+
},
|
|
9379
|
+
{
|
|
9380
|
+
"kind": "javascript-module",
|
|
9381
|
+
"path": "src/components/chat-bubble/chat-bubble.template.ts",
|
|
9382
|
+
"declarations": [
|
|
9383
|
+
{
|
|
9384
|
+
"kind": "function",
|
|
9385
|
+
"name": "AiChatBubbleTemplate",
|
|
9386
|
+
"return": {
|
|
9387
|
+
"type": {
|
|
9388
|
+
"text": "ViewTemplate<AiChatBubble>"
|
|
9389
|
+
}
|
|
9390
|
+
}
|
|
9391
|
+
}
|
|
9392
|
+
],
|
|
9393
|
+
"exports": [
|
|
9394
|
+
{
|
|
9395
|
+
"kind": "js",
|
|
9396
|
+
"name": "AiChatBubbleTemplate",
|
|
9397
|
+
"declaration": {
|
|
9398
|
+
"name": "AiChatBubbleTemplate",
|
|
9399
|
+
"module": "src/components/chat-bubble/chat-bubble.template.ts"
|
|
9400
|
+
}
|
|
9401
|
+
}
|
|
9402
|
+
]
|
|
9403
|
+
},
|
|
9404
|
+
{
|
|
9405
|
+
"kind": "javascript-module",
|
|
9406
|
+
"path": "src/components/chat-bubble/chat-bubble.ts",
|
|
9407
|
+
"declarations": [
|
|
9408
|
+
{
|
|
9409
|
+
"kind": "class",
|
|
9410
|
+
"description": "Floating chat bubble component that provides a draggable orb and dialog panel\nfor embedding an AI assistant without a full-page layout.",
|
|
9411
|
+
"name": "AiChatBubble",
|
|
9412
|
+
"members": [
|
|
9413
|
+
{
|
|
9414
|
+
"kind": "field",
|
|
9415
|
+
"name": "title",
|
|
9416
|
+
"type": {
|
|
9417
|
+
"text": "string"
|
|
9430
9418
|
},
|
|
9431
|
-
"
|
|
9432
|
-
{
|
|
9433
|
-
"name": "userInput",
|
|
9434
|
-
"type": {
|
|
9435
|
-
"text": "string"
|
|
9436
|
-
}
|
|
9437
|
-
},
|
|
9438
|
-
{
|
|
9439
|
-
"name": "attachments",
|
|
9440
|
-
"optional": true,
|
|
9441
|
-
"type": {
|
|
9442
|
-
"text": "ChatAttachment[]"
|
|
9443
|
-
}
|
|
9444
|
-
}
|
|
9445
|
-
]
|
|
9419
|
+
"default": "'AI Assistant'"
|
|
9446
9420
|
},
|
|
9447
9421
|
{
|
|
9448
|
-
"kind": "
|
|
9449
|
-
"name": "
|
|
9422
|
+
"kind": "field",
|
|
9423
|
+
"name": "imageSrc",
|
|
9424
|
+
"type": {
|
|
9425
|
+
"text": "string | undefined"
|
|
9426
|
+
}
|
|
9427
|
+
},
|
|
9428
|
+
{
|
|
9429
|
+
"kind": "field",
|
|
9430
|
+
"name": "designSystemPrefix",
|
|
9431
|
+
"type": {
|
|
9432
|
+
"text": "string"
|
|
9433
|
+
},
|
|
9434
|
+
"default": "'rapid'"
|
|
9435
|
+
},
|
|
9436
|
+
{
|
|
9437
|
+
"kind": "field",
|
|
9438
|
+
"name": "bubbleLeft",
|
|
9439
|
+
"type": {
|
|
9440
|
+
"text": "number"
|
|
9441
|
+
},
|
|
9442
|
+
"default": "0",
|
|
9443
|
+
"description": "Current left position of the bubble orb (px from viewport left). @internal"
|
|
9444
|
+
},
|
|
9445
|
+
{
|
|
9446
|
+
"kind": "field",
|
|
9447
|
+
"name": "bubbleTop",
|
|
9448
|
+
"type": {
|
|
9449
|
+
"text": "number"
|
|
9450
|
+
},
|
|
9451
|
+
"default": "0",
|
|
9452
|
+
"description": "Current top position of the bubble orb (px from viewport top). @internal"
|
|
9453
|
+
},
|
|
9454
|
+
{
|
|
9455
|
+
"kind": "field",
|
|
9456
|
+
"name": "dialogLeft",
|
|
9457
|
+
"type": {
|
|
9458
|
+
"text": "number"
|
|
9459
|
+
},
|
|
9460
|
+
"default": "0",
|
|
9461
|
+
"description": "Current left position of the dialog panel (px from viewport left). @internal"
|
|
9462
|
+
},
|
|
9463
|
+
{
|
|
9464
|
+
"kind": "field",
|
|
9465
|
+
"name": "dialogTop",
|
|
9466
|
+
"type": {
|
|
9467
|
+
"text": "number"
|
|
9468
|
+
},
|
|
9469
|
+
"default": "0",
|
|
9470
|
+
"description": "Current top position of the dialog panel (px from viewport top). @internal"
|
|
9471
|
+
},
|
|
9472
|
+
{
|
|
9473
|
+
"kind": "field",
|
|
9474
|
+
"name": "dialogWidth",
|
|
9475
|
+
"type": {
|
|
9476
|
+
"text": "number"
|
|
9477
|
+
},
|
|
9478
|
+
"default": "400",
|
|
9479
|
+
"description": "Current rendered width of the dialog panel (px). @internal"
|
|
9480
|
+
},
|
|
9481
|
+
{
|
|
9482
|
+
"kind": "field",
|
|
9483
|
+
"name": "dialogHeight",
|
|
9484
|
+
"type": {
|
|
9485
|
+
"text": "number"
|
|
9486
|
+
},
|
|
9487
|
+
"default": "520",
|
|
9488
|
+
"description": "Current rendered height of the dialog panel (px). @internal"
|
|
9489
|
+
},
|
|
9490
|
+
{
|
|
9491
|
+
"kind": "field",
|
|
9492
|
+
"name": "dialogOpen",
|
|
9493
|
+
"type": {
|
|
9494
|
+
"text": "boolean"
|
|
9495
|
+
},
|
|
9496
|
+
"default": "false",
|
|
9497
|
+
"description": "Whether the dialog panel is currently open. @internal"
|
|
9498
|
+
},
|
|
9499
|
+
{
|
|
9500
|
+
"kind": "field",
|
|
9501
|
+
"name": "hovered",
|
|
9502
|
+
"type": {
|
|
9503
|
+
"text": "boolean"
|
|
9504
|
+
},
|
|
9505
|
+
"default": "false",
|
|
9506
|
+
"description": "Whether the bubble orb is currently hovered. @internal"
|
|
9507
|
+
},
|
|
9508
|
+
{
|
|
9509
|
+
"kind": "field",
|
|
9510
|
+
"name": "unsubBus",
|
|
9511
|
+
"type": {
|
|
9512
|
+
"text": "() => void | undefined"
|
|
9513
|
+
},
|
|
9514
|
+
"privacy": "private"
|
|
9515
|
+
},
|
|
9516
|
+
{
|
|
9517
|
+
"kind": "field",
|
|
9518
|
+
"name": "injectedCloseBtn",
|
|
9519
|
+
"type": {
|
|
9520
|
+
"text": "Element | undefined"
|
|
9521
|
+
},
|
|
9522
|
+
"privacy": "private"
|
|
9523
|
+
},
|
|
9524
|
+
{
|
|
9525
|
+
"kind": "field",
|
|
9526
|
+
"name": "resizeObserver",
|
|
9527
|
+
"type": {
|
|
9528
|
+
"text": "ResizeObserver | undefined"
|
|
9529
|
+
},
|
|
9530
|
+
"privacy": "private"
|
|
9531
|
+
},
|
|
9532
|
+
{
|
|
9533
|
+
"kind": "field",
|
|
9534
|
+
"name": "dragging",
|
|
9535
|
+
"type": {
|
|
9536
|
+
"text": "boolean"
|
|
9537
|
+
},
|
|
9450
9538
|
"privacy": "private",
|
|
9451
|
-
"
|
|
9452
|
-
{
|
|
9453
|
-
"name": "activeToolCallId",
|
|
9454
|
-
"optional": true,
|
|
9455
|
-
"type": {
|
|
9456
|
-
"text": "string"
|
|
9457
|
-
},
|
|
9458
|
-
"description": "The id of the tool call this context belongs to, so\n`condenseWhen` can register against the right call (it stamps the clocks\nstraight off the driver). Absent for dispatch paths with no addressable tool\ncall (e.g. the fold-close handler), where `condenseWhen` is a no-op."
|
|
9459
|
-
},
|
|
9460
|
-
{
|
|
9461
|
-
"name": "traceCapture",
|
|
9462
|
-
"optional": true,
|
|
9463
|
-
"type": {
|
|
9464
|
-
"text": "{ traces: ChatMessage[][] }"
|
|
9465
|
-
},
|
|
9466
|
-
"description": "Optional per-tool-call accumulator. When provided, every\nsub-agent call's trace is **appended** here rather than written to shared\ninstance state, so parallel tool calls each capture their own traces\nindependently.\n\nDeliberately a list of traces, not one slot. A single handler may call\n`requestSubAgent` more than once — a code-driven scheduler dispatching a\ndependency graph, a retry of a timed-out child, any fan-out helper — and a\nsingle slot kept only the last, so every other child ran, was billed by the\nprovider, and then vanished from history. The loss was silent in the worst\nway: `sumUsage` and `usageRows` both recurse into the trace, so they summed a\ntruncated input and still agreed with each other. Measured at 1 of 7 traces\nkept on a seven-way fan-out, reporting ~2.3x under the real cost, with the\nerror growing as the fan-out widens."
|
|
9467
|
-
}
|
|
9468
|
-
],
|
|
9469
|
-
"description": "Builds the context object passed to every tool handler call.\nCentralised here so fold shortcut dispatch and the main tool loop use the\nsame context without duplication."
|
|
9539
|
+
"default": "false"
|
|
9470
9540
|
},
|
|
9471
9541
|
{
|
|
9472
|
-
"kind": "
|
|
9473
|
-
"name": "
|
|
9542
|
+
"kind": "field",
|
|
9543
|
+
"name": "dragTarget",
|
|
9544
|
+
"type": {
|
|
9545
|
+
"text": "'bubble' | 'dialog' | null"
|
|
9546
|
+
},
|
|
9474
9547
|
"privacy": "private",
|
|
9475
|
-
"
|
|
9476
|
-
|
|
9477
|
-
|
|
9478
|
-
|
|
9548
|
+
"default": "null"
|
|
9549
|
+
},
|
|
9550
|
+
{
|
|
9551
|
+
"kind": "field",
|
|
9552
|
+
"name": "startMouseX",
|
|
9553
|
+
"type": {
|
|
9554
|
+
"text": "number"
|
|
9479
9555
|
},
|
|
9480
|
-
"
|
|
9481
|
-
|
|
9482
|
-
"name": "name",
|
|
9483
|
-
"type": {
|
|
9484
|
-
"text": "string"
|
|
9485
|
-
}
|
|
9486
|
-
},
|
|
9487
|
-
{
|
|
9488
|
-
"name": "options",
|
|
9489
|
-
"optional": true,
|
|
9490
|
-
"type": {
|
|
9491
|
-
"text": "SubAgentRequestOptions"
|
|
9492
|
-
}
|
|
9493
|
-
}
|
|
9494
|
-
],
|
|
9495
|
-
"description": "Creates a child `ChatDriver` for the named sub-agent, runs it to completion,\nand returns its structured result (or final text fallback) together with the\nfull child conversation trace. Callers receive both values so each parallel\ninvocation can capture its own trace without touching shared instance state."
|
|
9556
|
+
"privacy": "private",
|
|
9557
|
+
"default": "0"
|
|
9496
9558
|
},
|
|
9497
9559
|
{
|
|
9498
|
-
"kind": "
|
|
9499
|
-
"name": "
|
|
9500
|
-
"
|
|
9501
|
-
"
|
|
9502
|
-
"text": "Promise<ChatDriverResult>"
|
|
9503
|
-
}
|
|
9560
|
+
"kind": "field",
|
|
9561
|
+
"name": "startMouseY",
|
|
9562
|
+
"type": {
|
|
9563
|
+
"text": "number"
|
|
9504
9564
|
},
|
|
9505
|
-
"
|
|
9506
|
-
|
|
9507
|
-
"name": "transientPrimer",
|
|
9508
|
-
"optional": true,
|
|
9509
|
-
"type": {
|
|
9510
|
-
"text": "ChatMessage[]"
|
|
9511
|
-
}
|
|
9512
|
-
}
|
|
9513
|
-
],
|
|
9514
|
-
"description": "Continue the tool loop from current history without appending a new user message.\nUsed by OrchestratingDriver after an agent handoff."
|
|
9565
|
+
"privacy": "private",
|
|
9566
|
+
"default": "0"
|
|
9515
9567
|
},
|
|
9516
9568
|
{
|
|
9517
|
-
"kind": "
|
|
9518
|
-
"name": "
|
|
9569
|
+
"kind": "field",
|
|
9570
|
+
"name": "startElemLeft",
|
|
9571
|
+
"type": {
|
|
9572
|
+
"text": "number"
|
|
9573
|
+
},
|
|
9519
9574
|
"privacy": "private",
|
|
9520
|
-
"
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9575
|
+
"default": "0"
|
|
9576
|
+
},
|
|
9577
|
+
{
|
|
9578
|
+
"kind": "field",
|
|
9579
|
+
"name": "startElemTop",
|
|
9580
|
+
"type": {
|
|
9581
|
+
"text": "number"
|
|
9524
9582
|
},
|
|
9525
|
-
"
|
|
9526
|
-
|
|
9527
|
-
"name": "toolName",
|
|
9528
|
-
"type": {
|
|
9529
|
-
"text": "string"
|
|
9530
|
-
}
|
|
9531
|
-
}
|
|
9532
|
-
],
|
|
9533
|
-
"description": "Extract ToolFold metadata from a handler, or undefined if it isn't a fold facade."
|
|
9583
|
+
"privacy": "private",
|
|
9584
|
+
"default": "0"
|
|
9534
9585
|
},
|
|
9535
9586
|
{
|
|
9536
|
-
"kind": "
|
|
9537
|
-
"name": "
|
|
9587
|
+
"kind": "field",
|
|
9588
|
+
"name": "hasDragged",
|
|
9589
|
+
"type": {
|
|
9590
|
+
"text": "boolean"
|
|
9591
|
+
},
|
|
9538
9592
|
"privacy": "private",
|
|
9539
|
-
"
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9593
|
+
"default": "false"
|
|
9594
|
+
},
|
|
9595
|
+
{
|
|
9596
|
+
"kind": "field",
|
|
9597
|
+
"name": "latestMouseX",
|
|
9598
|
+
"type": {
|
|
9599
|
+
"text": "number"
|
|
9543
9600
|
},
|
|
9544
|
-
"
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
"
|
|
9601
|
+
"privacy": "private",
|
|
9602
|
+
"default": "0"
|
|
9603
|
+
},
|
|
9604
|
+
{
|
|
9605
|
+
"kind": "field",
|
|
9606
|
+
"name": "latestMouseY",
|
|
9607
|
+
"type": {
|
|
9608
|
+
"text": "number"
|
|
9609
|
+
},
|
|
9610
|
+
"privacy": "private",
|
|
9611
|
+
"default": "0"
|
|
9612
|
+
},
|
|
9613
|
+
{
|
|
9614
|
+
"kind": "field",
|
|
9615
|
+
"name": "rafHandle",
|
|
9616
|
+
"type": {
|
|
9617
|
+
"text": "number | undefined"
|
|
9618
|
+
},
|
|
9619
|
+
"privacy": "private"
|
|
9620
|
+
},
|
|
9621
|
+
{
|
|
9622
|
+
"kind": "field",
|
|
9623
|
+
"name": "closeAbort",
|
|
9624
|
+
"type": {
|
|
9625
|
+
"text": "AbortController | undefined"
|
|
9626
|
+
},
|
|
9627
|
+
"privacy": "private"
|
|
9560
9628
|
},
|
|
9561
9629
|
{
|
|
9562
9630
|
"kind": "method",
|
|
9563
|
-
"name": "
|
|
9564
|
-
"privacy": "private",
|
|
9565
|
-
"return": {
|
|
9566
|
-
"type": {
|
|
9567
|
-
"text": "string | null"
|
|
9568
|
-
}
|
|
9569
|
-
},
|
|
9570
|
-
"parameters": [
|
|
9571
|
-
{
|
|
9572
|
-
"name": "toolName",
|
|
9573
|
-
"type": {
|
|
9574
|
-
"text": "string"
|
|
9575
|
-
}
|
|
9576
|
-
}
|
|
9577
|
-
],
|
|
9578
|
-
"description": "If an open fold is hiding a previously-available tool, return the name of\nthe fold to close to start getting it back. Only exclusive folds hide tools\n(they replace the tool set on open rather than extending it), so a base tool\nthat was visible before the fold opened now sits in a fold-stack frame's\n`previousHandlers` but not in the live handler map. Only the top fold's\n`close_` tool is active, so that's always the actionable next step — even\nwhen the tool lives further down the stack, closing repeatedly walks back to\nit. Returns null when no open fold accounts for the tool."
|
|
9631
|
+
"name": "onBubbleMouseEnter"
|
|
9579
9632
|
},
|
|
9580
9633
|
{
|
|
9581
9634
|
"kind": "method",
|
|
9582
|
-
"name": "
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
}
|
|
9588
|
-
},
|
|
9635
|
+
"name": "onBubbleMouseLeave"
|
|
9636
|
+
},
|
|
9637
|
+
{
|
|
9638
|
+
"kind": "method",
|
|
9639
|
+
"name": "dialogOpenChanged",
|
|
9589
9640
|
"parameters": [
|
|
9590
9641
|
{
|
|
9591
|
-
"name": "
|
|
9642
|
+
"name": "_",
|
|
9592
9643
|
"type": {
|
|
9593
|
-
"text": "
|
|
9644
|
+
"text": "boolean"
|
|
9594
9645
|
}
|
|
9595
9646
|
},
|
|
9596
9647
|
{
|
|
9597
|
-
"name": "
|
|
9648
|
+
"name": "next",
|
|
9598
9649
|
"type": {
|
|
9599
|
-
"text": "
|
|
9650
|
+
"text": "boolean"
|
|
9600
9651
|
}
|
|
9601
9652
|
}
|
|
9602
|
-
]
|
|
9603
|
-
"description": "Install the fold's inner tool set, replacing (exclusive) or extending (non-exclusive)\nthe current tool set. Also injects the close tool. Does NOT touch the fold stack."
|
|
9653
|
+
]
|
|
9604
9654
|
},
|
|
9605
9655
|
{
|
|
9606
9656
|
"kind": "method",
|
|
9607
|
-
"name": "
|
|
9608
|
-
"privacy": "private",
|
|
9609
|
-
"return": {
|
|
9610
|
-
"type": {
|
|
9611
|
-
"text": "Promise<string>"
|
|
9612
|
-
}
|
|
9613
|
-
},
|
|
9657
|
+
"name": "dialogContentChanged",
|
|
9614
9658
|
"parameters": [
|
|
9615
9659
|
{
|
|
9616
|
-
"name": "
|
|
9617
|
-
"type": {
|
|
9618
|
-
"text": "string"
|
|
9619
|
-
}
|
|
9620
|
-
},
|
|
9621
|
-
{
|
|
9622
|
-
"name": "fold",
|
|
9623
|
-
"type": {
|
|
9624
|
-
"text": "ToolFold"
|
|
9625
|
-
}
|
|
9626
|
-
},
|
|
9627
|
-
{
|
|
9628
|
-
"name": "args",
|
|
9660
|
+
"name": "_",
|
|
9629
9661
|
"type": {
|
|
9630
|
-
"text": "
|
|
9662
|
+
"text": "HTMLElement[]"
|
|
9631
9663
|
}
|
|
9632
9664
|
},
|
|
9633
9665
|
{
|
|
9634
|
-
"name": "
|
|
9635
|
-
"optional": true,
|
|
9666
|
+
"name": "next",
|
|
9636
9667
|
"type": {
|
|
9637
|
-
"text": "
|
|
9668
|
+
"text": "HTMLElement[]"
|
|
9638
9669
|
}
|
|
9639
9670
|
}
|
|
9640
|
-
]
|
|
9641
|
-
"description": "Open a fold: push a stack frame, swap the tool set, return the response message."
|
|
9671
|
+
]
|
|
9642
9672
|
},
|
|
9643
9673
|
{
|
|
9644
9674
|
"kind": "method",
|
|
9645
|
-
"name": "
|
|
9675
|
+
"name": "injectCloseButton",
|
|
9646
9676
|
"privacy": "private",
|
|
9647
|
-
"return": {
|
|
9648
|
-
"type": {
|
|
9649
|
-
"text": "void"
|
|
9650
|
-
}
|
|
9651
|
-
},
|
|
9652
9677
|
"parameters": [
|
|
9653
9678
|
{
|
|
9654
|
-
"name": "
|
|
9679
|
+
"name": "assistant",
|
|
9655
9680
|
"type": {
|
|
9656
|
-
"text": "
|
|
9681
|
+
"text": "Element"
|
|
9657
9682
|
}
|
|
9658
9683
|
}
|
|
9659
9684
|
]
|
|
9660
9685
|
},
|
|
9661
9686
|
{
|
|
9662
9687
|
"kind": "method",
|
|
9663
|
-
"name": "
|
|
9664
|
-
"privacy": "private",
|
|
9665
|
-
"return": {
|
|
9666
|
-
"type": {
|
|
9667
|
-
"text": "string"
|
|
9668
|
-
}
|
|
9669
|
-
},
|
|
9670
|
-
"description": "Close the top fold: pop the stack frame, restore the previous tool set."
|
|
9671
|
-
},
|
|
9672
|
-
{
|
|
9673
|
-
"kind": "method",
|
|
9674
|
-
"name": "buildFoldSystemPromptSuffix",
|
|
9675
|
-
"privacy": "private",
|
|
9676
|
-
"return": {
|
|
9677
|
-
"type": {
|
|
9678
|
-
"text": "string"
|
|
9679
|
-
}
|
|
9680
|
-
},
|
|
9681
|
-
"description": "Build the fold-awareness suffix appended to the system prompt each LLM call."
|
|
9682
|
-
},
|
|
9683
|
-
{
|
|
9684
|
-
"kind": "method",
|
|
9685
|
-
"name": "runToolLoop",
|
|
9686
|
-
"privacy": "private",
|
|
9687
|
-
"return": {
|
|
9688
|
-
"type": {
|
|
9689
|
-
"text": "Promise<ChatDriverResult>"
|
|
9690
|
-
}
|
|
9691
|
-
},
|
|
9688
|
+
"name": "onBubbleMouseDown",
|
|
9692
9689
|
"parameters": [
|
|
9693
9690
|
{
|
|
9694
|
-
"name": "
|
|
9695
|
-
"type": {
|
|
9696
|
-
"text": "string"
|
|
9697
|
-
}
|
|
9698
|
-
},
|
|
9699
|
-
{
|
|
9700
|
-
"name": "attachments",
|
|
9701
|
-
"optional": true,
|
|
9702
|
-
"type": {
|
|
9703
|
-
"text": "ChatAttachment[]"
|
|
9704
|
-
}
|
|
9705
|
-
},
|
|
9706
|
-
{
|
|
9707
|
-
"name": "transientPrimer",
|
|
9708
|
-
"optional": true,
|
|
9691
|
+
"name": "e",
|
|
9709
9692
|
"type": {
|
|
9710
|
-
"text": "
|
|
9693
|
+
"text": "MouseEvent"
|
|
9711
9694
|
}
|
|
9712
9695
|
}
|
|
9713
9696
|
]
|
|
9714
9697
|
},
|
|
9715
9698
|
{
|
|
9716
9699
|
"kind": "method",
|
|
9717
|
-
"name": "
|
|
9718
|
-
"privacy": "private",
|
|
9719
|
-
"return": {
|
|
9720
|
-
"type": {
|
|
9721
|
-
"text": "void"
|
|
9722
|
-
}
|
|
9723
|
-
},
|
|
9700
|
+
"name": "onDialogHeaderMouseDown",
|
|
9724
9701
|
"parameters": [
|
|
9725
9702
|
{
|
|
9726
|
-
"name": "
|
|
9703
|
+
"name": "e",
|
|
9727
9704
|
"type": {
|
|
9728
|
-
"text": "
|
|
9705
|
+
"text": "CustomEvent<{ clientX: number; clientY: number }>"
|
|
9729
9706
|
}
|
|
9730
9707
|
}
|
|
9731
9708
|
]
|
|
9732
|
-
}
|
|
9733
|
-
],
|
|
9734
|
-
"events": [
|
|
9709
|
+
},
|
|
9735
9710
|
{
|
|
9736
|
-
"
|
|
9737
|
-
"
|
|
9738
|
-
|
|
9739
|
-
|
|
9711
|
+
"kind": "field",
|
|
9712
|
+
"name": "onCloseBtnClick",
|
|
9713
|
+
"privacy": "private",
|
|
9714
|
+
"readonly": true
|
|
9740
9715
|
},
|
|
9741
9716
|
{
|
|
9742
|
-
"
|
|
9743
|
-
"
|
|
9744
|
-
|
|
9745
|
-
}
|
|
9717
|
+
"kind": "method",
|
|
9718
|
+
"name": "cancelClose",
|
|
9719
|
+
"privacy": "private"
|
|
9746
9720
|
},
|
|
9747
9721
|
{
|
|
9748
|
-
"
|
|
9749
|
-
"
|
|
9750
|
-
|
|
9751
|
-
}
|
|
9722
|
+
"kind": "method",
|
|
9723
|
+
"name": "startCloseDialog",
|
|
9724
|
+
"privacy": "private"
|
|
9752
9725
|
},
|
|
9753
9726
|
{
|
|
9754
|
-
"
|
|
9755
|
-
"
|
|
9756
|
-
|
|
9757
|
-
},
|
|
9758
|
-
"description": "Fired whenever the in-memory chat history changes (append, tool loop, interaction resolution, post-resolve external cost) with the full history snapshot. detail: `ReadonlyArray<ChatMessage>`"
|
|
9727
|
+
"kind": "field",
|
|
9728
|
+
"name": "onDocMouseMove",
|
|
9729
|
+
"privacy": "private"
|
|
9759
9730
|
},
|
|
9760
9731
|
{
|
|
9761
|
-
"
|
|
9762
|
-
"
|
|
9763
|
-
|
|
9764
|
-
}
|
|
9732
|
+
"kind": "field",
|
|
9733
|
+
"name": "applyDragFrame",
|
|
9734
|
+
"privacy": "private"
|
|
9765
9735
|
},
|
|
9766
9736
|
{
|
|
9767
|
-
"
|
|
9737
|
+
"kind": "field",
|
|
9738
|
+
"name": "onDocMouseUp",
|
|
9739
|
+
"privacy": "private"
|
|
9740
|
+
},
|
|
9741
|
+
{
|
|
9742
|
+
"kind": "method",
|
|
9743
|
+
"name": "onPopout"
|
|
9744
|
+
},
|
|
9745
|
+
{
|
|
9746
|
+
"kind": "method",
|
|
9747
|
+
"name": "onCloseDialog"
|
|
9748
|
+
},
|
|
9749
|
+
{
|
|
9750
|
+
"kind": "field",
|
|
9751
|
+
"name": "tooltipStyle",
|
|
9768
9752
|
"type": {
|
|
9769
|
-
"text": "
|
|
9770
|
-
}
|
|
9753
|
+
"text": "string"
|
|
9754
|
+
},
|
|
9755
|
+
"readonly": true
|
|
9756
|
+
}
|
|
9757
|
+
],
|
|
9758
|
+
"attributes": [
|
|
9759
|
+
{
|
|
9760
|
+
"name": "title",
|
|
9761
|
+
"type": {
|
|
9762
|
+
"text": "string"
|
|
9763
|
+
},
|
|
9764
|
+
"default": "'AI Assistant'",
|
|
9765
|
+
"fieldName": "title"
|
|
9771
9766
|
},
|
|
9772
9767
|
{
|
|
9773
|
-
"name": "
|
|
9768
|
+
"name": "image-src",
|
|
9774
9769
|
"type": {
|
|
9775
|
-
"text": "
|
|
9776
|
-
}
|
|
9770
|
+
"text": "string | undefined"
|
|
9771
|
+
},
|
|
9772
|
+
"fieldName": "imageSrc"
|
|
9777
9773
|
},
|
|
9778
9774
|
{
|
|
9779
|
-
"name": "
|
|
9775
|
+
"name": "design-system-prefix",
|
|
9780
9776
|
"type": {
|
|
9781
|
-
"text": "
|
|
9782
|
-
}
|
|
9777
|
+
"text": "string"
|
|
9778
|
+
},
|
|
9779
|
+
"default": "'rapid'",
|
|
9780
|
+
"fieldName": "designSystemPrefix"
|
|
9783
9781
|
}
|
|
9784
9782
|
],
|
|
9785
9783
|
"superclass": {
|
|
9786
|
-
"name": "
|
|
9787
|
-
"
|
|
9788
|
-
}
|
|
9784
|
+
"name": "GenesisElement",
|
|
9785
|
+
"package": "@genesislcap/web-core"
|
|
9786
|
+
},
|
|
9787
|
+
"tagName": "foundation-ai-chat-bubble",
|
|
9788
|
+
"customElement": true
|
|
9789
9789
|
}
|
|
9790
9790
|
],
|
|
9791
9791
|
"exports": [
|
|
9792
9792
|
{
|
|
9793
9793
|
"kind": "js",
|
|
9794
|
-
"name": "
|
|
9794
|
+
"name": "AiChatBubble",
|
|
9795
9795
|
"declaration": {
|
|
9796
|
-
"name": "
|
|
9797
|
-
"module": "src/components/chat-
|
|
9796
|
+
"name": "AiChatBubble",
|
|
9797
|
+
"module": "src/components/chat-bubble/chat-bubble.ts"
|
|
9798
9798
|
}
|
|
9799
9799
|
},
|
|
9800
9800
|
{
|
|
9801
|
-
"kind": "
|
|
9802
|
-
"name": "
|
|
9801
|
+
"kind": "custom-element-definition",
|
|
9802
|
+
"name": "foundation-ai-chat-bubble",
|
|
9803
9803
|
"declaration": {
|
|
9804
|
-
"name": "
|
|
9805
|
-
"module": "src/components/chat-
|
|
9804
|
+
"name": "AiChatBubble",
|
|
9805
|
+
"module": "src/components/chat-bubble/chat-bubble.ts"
|
|
9806
9806
|
}
|
|
9807
9807
|
}
|
|
9808
9808
|
]
|
|
9809
9809
|
},
|
|
9810
9810
|
{
|
|
9811
9811
|
"kind": "javascript-module",
|
|
9812
|
-
"path": "src/components/chat-
|
|
9812
|
+
"path": "src/components/chat-bubble/index.ts",
|
|
9813
9813
|
"declarations": [],
|
|
9814
9814
|
"exports": [
|
|
9815
9815
|
{
|
|
@@ -9817,7 +9817,7 @@
|
|
|
9817
9817
|
"name": "*",
|
|
9818
9818
|
"declaration": {
|
|
9819
9819
|
"name": "*",
|
|
9820
|
-
"package": "./chat-
|
|
9820
|
+
"package": "./chat-bubble"
|
|
9821
9821
|
}
|
|
9822
9822
|
}
|
|
9823
9823
|
]
|