@genesislcap/ai-assistant 15.6.2 → 15.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-assistant.api.json +422 -6
- package/dist/ai-assistant.d.ts +654 -19
- package/dist/chat-driver.cjs +285 -26
- package/dist/chat-driver.cjs.map +3 -3
- package/dist/chat-driver.mjs +285 -26
- package/dist/chat-driver.mjs.map +3 -3
- package/dist/custom-elements.json +289 -32
- package/dist/dts/channel/ai-activity-channel.d.ts +51 -1
- package/dist/dts/channel/ai-activity-channel.d.ts.map +1 -1
- package/dist/dts/components/chat-driver/chat-driver.d.ts +99 -1
- package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
- package/dist/dts/components/chat-driver/chat-driver.test.d.ts.map +1 -1
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.budget.test.d.ts +2 -0
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.budget.test.d.ts.map +1 -0
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +14 -0
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
- package/dist/dts/components/settings-modal/settings-modal.styles.d.ts.map +1 -1
- package/dist/dts/components/settings-modal/settings-modal.template.d.ts.map +1 -1
- package/dist/dts/main/blocked-state.test.d.ts +2 -0
- package/dist/dts/main/blocked-state.test.d.ts.map +1 -0
- package/dist/dts/main/main.d.ts +435 -19
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/main.styles.d.ts.map +1 -1
- package/dist/dts/main/main.styles.test.d.ts +2 -0
- package/dist/dts/main/main.styles.test.d.ts.map +1 -0
- package/dist/dts/main/main.template.d.ts +53 -0
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/state/ai-assistant-slice.d.ts +162 -6
- package/dist/dts/state/ai-assistant-slice.d.ts.map +1 -1
- package/dist/dts/state/debug-event-log.d.ts +6 -1
- package/dist/dts/state/debug-event-log.d.ts.map +1 -1
- package/dist/dts/state/session-store.d.ts +11 -0
- package/dist/dts/state/session-store.d.ts.map +1 -1
- package/dist/dts/utils/banked-usage-baselines.d.ts +51 -0
- package/dist/dts/utils/banked-usage-baselines.d.ts.map +1 -0
- package/dist/esm/components/chat-driver/chat-driver.js +263 -21
- package/dist/esm/components/chat-driver/chat-driver.test.js +464 -1
- package/dist/esm/components/orchestrating-driver/orchestrating-driver.budget.test.js +312 -0
- package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +89 -4
- package/dist/esm/components/settings-modal/settings-modal.styles.js +63 -18
- package/dist/esm/components/settings-modal/settings-modal.template.js +36 -7
- package/dist/esm/main/blocked-state.test.js +969 -0
- package/dist/esm/main/cost-session-banking.test.js +238 -8
- package/dist/esm/main/main.js +826 -48
- package/dist/esm/main/main.styles.js +72 -0
- package/dist/esm/main/main.styles.test.js +99 -0
- package/dist/esm/main/main.template.js +121 -4
- package/dist/esm/state/ai-assistant-slice.js +145 -7
- package/dist/esm/state/ai-assistant-slice.test.js +138 -1
- package/dist/esm/state/debug-event-log.js +7 -2
- package/dist/esm/state/debug-event-log.test.js +49 -1
- package/dist/esm/state/persistence/session-snapshot.test.js +18 -0
- package/dist/esm/utils/banked-usage-baselines.js +84 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/migration-GENC-1464.md +562 -0
- package/docs/sub_agent.md +20 -3
- package/package.json +17 -17
- package/src/channel/ai-activity-channel.ts +56 -2
- package/src/components/chat-driver/chat-driver.test.ts +549 -0
- package/src/components/chat-driver/chat-driver.ts +324 -14
- package/src/components/orchestrating-driver/orchestrating-driver.budget.test.ts +438 -0
- package/src/components/orchestrating-driver/orchestrating-driver.ts +101 -6
- package/src/components/settings-modal/settings-modal.styles.ts +63 -18
- package/src/components/settings-modal/settings-modal.template.ts +38 -7
- package/src/main/blocked-state.test.ts +1316 -0
- package/src/main/cost-session-banking.test.ts +283 -11
- package/src/main/main.styles.test.ts +130 -0
- package/src/main/main.styles.ts +72 -0
- package/src/main/main.template.ts +131 -4
- package/src/main/main.ts +827 -42
- package/src/state/ai-assistant-slice.test.ts +215 -0
- package/src/state/ai-assistant-slice.ts +218 -8
- package/src/state/debug-event-log.test.ts +63 -0
- package/src/state/debug-event-log.ts +7 -2
- package/src/state/persistence/session-snapshot.test.ts +22 -0
- package/src/utils/banked-usage-baselines.ts +90 -0
|
@@ -993,7 +993,7 @@
|
|
|
993
993
|
{
|
|
994
994
|
"kind": "PropertySignature",
|
|
995
995
|
"canonicalReference": "@genesislcap/ai-assistant!AgenticActivityEvents#\"tool-loop-end\":member",
|
|
996
|
-
"docComment": "/**\n * Fired when the tool loop completes for the current turn and control returns to the user on the **main chat prompt** (i.e. the next free-form user message can now be accepted).\n *\n * Boundary: this is the moment the user regains control of the main chat input. It is **not** fired when a tool handler hands a widget to the user mid-loop (e.g. while a planning widget is awaiting a click) — widget pauses are still inside the loop, the assistant still owns the turn, and the main chat input may be hidden during them. Wait for this event when you need to know that the assistant is fully idle and the user can type freely again.\n *\n * Emitted from the finally block of each `ChatDriver`'s `sendMessage` and `continueFromHistory`, so a multi-agent handoff fires this event once per agent.\n *\n * Distinct from {@link AgenticActivityEvents.'halo-stop'} — the halo event tracks the spinner animation lifecycle (which can flap mid-turn as tool calls resolve), whereas this event is a one-shot per turn boundary. Use this for hooks tied to a turn ending (telemetry flushes, post-turn workspace transitions, deferred state recomputation).\n *\n * The detail carries the turn's outcome (PTC-0): on a failure it is `{ failureReason }` with the typed `TurnFailureReason`; on a clean completion, a user cancel, a driver dispose, and an agent handoff the detail is `undefined` — the historical shape, kept byte-identical so subscribers that only care about the boundary can keep ignoring it. Structured-cloneable so it survives the cross-tab BroadcastChannel hop.\n */\n",
|
|
996
|
+
"docComment": "/**\n * Fired when the tool loop completes for the current turn and control returns to the user on the **main chat prompt** (i.e. the next free-form user message can now be accepted).\n *\n * Boundary: this is the moment the user regains control of the main chat input. It is **not** fired when a tool handler hands a widget to the user mid-loop (e.g. while a planning widget is awaiting a click) — widget pauses are still inside the loop, the assistant still owns the turn, and the main chat input may be hidden during them. Wait for this event when you need to know that the assistant is fully idle and the user can type freely again.\n *\n * Emitted from the finally block of each `ChatDriver`'s `sendMessage` and `continueFromHistory`, so a multi-agent handoff fires this event once per agent.\n *\n * Distinct from {@link AgenticActivityEvents.'halo-stop'} — the halo event tracks the spinner animation lifecycle (which can flap mid-turn as tool calls resolve), whereas this event is a one-shot per turn boundary. Use this for hooks tied to a turn ending (telemetry flushes, post-turn workspace transitions, deferred state recomputation).\n *\n * The detail carries the turn's outcome (PTC-0): on a failure it is `{ failureReason }` with the typed `TurnFailureReason`; on a clean completion, a user cancel, a driver dispose, and an agent handoff the detail is `undefined` — the historical shape, kept byte-identical so subscribers that only care about the boundary can keep ignoring it. Structured-cloneable so it survives the cross-tab BroadcastChannel hop.\n *\n * A `'budget-exhausted'` failure additionally carries `vendor` — the concrete vendor the walled turn resolved to (GENC-1464), which is NOT the same thing as the registry alias recorded on the debug-log entry. Optional and additive: a subscriber reading only `failureReason` is unaffected, and every other failure still emits the historical `{ failureReason }` with no `vendor` key. It exists so a later per-vendor budget model is an additive change rather than a retrofit — the vendor is known at the transport and at the driver, and was previously discarded between them.\n *\n * Note this topic is forwarded on the tab-scoped channel, so a wall hit in a popped-out window reaches the main window's subscribers too — which is why the assistant's blocked latch fires there as well. Correct for a shared spend cap; see `docs/migration-GENC-1464.md` §Scope.\n */\n",
|
|
997
997
|
"excerptTokens": [
|
|
998
998
|
{
|
|
999
999
|
"kind": "Content",
|
|
@@ -1010,7 +1010,25 @@
|
|
|
1010
1010
|
},
|
|
1011
1011
|
{
|
|
1012
1012
|
"kind": "Content",
|
|
1013
|
-
"text": ";\n
|
|
1013
|
+
"text": ";\n vendor?: "
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
"kind": "Reference",
|
|
1017
|
+
"text": "AIProviderType",
|
|
1018
|
+
"canonicalReference": "@genesislcap/foundation-ai!AIProviderType:type"
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"kind": "Content",
|
|
1022
|
+
"text": ";\n budget?: {\n budgetUsd?: number;\n spentUsd?: number;\n vendorLabel: string;\n vendor?: "
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
"kind": "Reference",
|
|
1026
|
+
"text": "AIProviderType",
|
|
1027
|
+
"canonicalReference": "@genesislcap/foundation-ai!AIProviderType:type"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"kind": "Content",
|
|
1031
|
+
"text": ";\n otherVendorAvailable?: boolean;\n };\n } | undefined"
|
|
1014
1032
|
},
|
|
1015
1033
|
{
|
|
1016
1034
|
"kind": "Content",
|
|
@@ -1023,7 +1041,7 @@
|
|
|
1023
1041
|
"name": "\"tool-loop-end\"",
|
|
1024
1042
|
"propertyTypeTokenRange": {
|
|
1025
1043
|
"startIndex": 1,
|
|
1026
|
-
"endIndex":
|
|
1044
|
+
"endIndex": 8
|
|
1027
1045
|
}
|
|
1028
1046
|
},
|
|
1029
1047
|
{
|
|
@@ -4936,6 +4954,15 @@
|
|
|
4936
4954
|
"text": "SubAgentFailureReason",
|
|
4937
4955
|
"canonicalReference": "@genesislcap/foundation-ai!SubAgentFailureReason:type"
|
|
4938
4956
|
},
|
|
4957
|
+
{
|
|
4958
|
+
"kind": "Content",
|
|
4959
|
+
"text": ";\n budget?: "
|
|
4960
|
+
},
|
|
4961
|
+
{
|
|
4962
|
+
"kind": "Reference",
|
|
4963
|
+
"text": "BudgetDetail",
|
|
4964
|
+
"canonicalReference": "@genesislcap/ai-assistant!~BudgetDetail:type"
|
|
4965
|
+
},
|
|
4939
4966
|
{
|
|
4940
4967
|
"kind": "Content",
|
|
4941
4968
|
"text": ";\n } | undefined"
|
|
@@ -4948,7 +4975,7 @@
|
|
|
4948
4975
|
"isStatic": false,
|
|
4949
4976
|
"returnTypeTokenRange": {
|
|
4950
4977
|
"startIndex": 1,
|
|
4951
|
-
"endIndex":
|
|
4978
|
+
"endIndex": 6
|
|
4952
4979
|
},
|
|
4953
4980
|
"releaseTag": "Beta",
|
|
4954
4981
|
"isProtected": false,
|
|
@@ -5662,6 +5689,33 @@
|
|
|
5662
5689
|
"endIndex": 2
|
|
5663
5690
|
}
|
|
5664
5691
|
},
|
|
5692
|
+
{
|
|
5693
|
+
"kind": "PropertySignature",
|
|
5694
|
+
"canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#budgetExhaustedMessage:member",
|
|
5695
|
+
"docComment": "/**\n * Transcript copy appended when the AI-spend budget wall is hit (GENC-1464). Defaults to `DEFAULT_BUDGET_EXHAUSTED_MESSAGE`.\n *\n * The assistant element already lets a host override the blocked **banner** via `setBlocked(true, reason)`; without this the transcript **bubble** stayed on the default, so a white-labelled host got its own copy in the banner and the shipped default directly below it. Passing the same effective copy here keeps the two surfaces saying one thing.\n *\n * Deliberately a driver-config field rather than something read off a chat config: `ChatDriver` has no `chatConfig` and is used standalone (see `chat-driver-node`), so threading one in would be a much larger and less reversible change.\n */\n",
|
|
5696
|
+
"excerptTokens": [
|
|
5697
|
+
{
|
|
5698
|
+
"kind": "Content",
|
|
5699
|
+
"text": "budgetExhaustedMessage?: "
|
|
5700
|
+
},
|
|
5701
|
+
{
|
|
5702
|
+
"kind": "Content",
|
|
5703
|
+
"text": "string"
|
|
5704
|
+
},
|
|
5705
|
+
{
|
|
5706
|
+
"kind": "Content",
|
|
5707
|
+
"text": ";"
|
|
5708
|
+
}
|
|
5709
|
+
],
|
|
5710
|
+
"isReadonly": false,
|
|
5711
|
+
"isOptional": true,
|
|
5712
|
+
"releaseTag": "Beta",
|
|
5713
|
+
"name": "budgetExhaustedMessage",
|
|
5714
|
+
"propertyTypeTokenRange": {
|
|
5715
|
+
"startIndex": 1,
|
|
5716
|
+
"endIndex": 2
|
|
5717
|
+
}
|
|
5718
|
+
},
|
|
5665
5719
|
{
|
|
5666
5720
|
"kind": "PropertySignature",
|
|
5667
5721
|
"canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#condenseBatchCalls:member",
|
|
@@ -7533,6 +7587,105 @@
|
|
|
7533
7587
|
"isProtected": false,
|
|
7534
7588
|
"isAbstract": false
|
|
7535
7589
|
},
|
|
7590
|
+
{
|
|
7591
|
+
"kind": "Property",
|
|
7592
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#blocked:member",
|
|
7593
|
+
"docComment": "/**\n * Whether the assistant is blocked by a backend condition and cannot send — today, an exhausted AI-spend budget (GENC-1464). While true the composer is disabled, `send`/`submitMessage` refuse, suggestions stop being fetched, and a persistent banner (`part=\"blocked-banner\"`) sits above the composer explaining why. The transcript stays visible and scrollable throughout — unlike `compacting` and `restoring`, this does not replace the conversation.\n *\n * **Latched.** Nothing in the element clears it: not a new turn, not \"Clear\" / \"New chat\", not a pop-in/out. It stays set until the host writes `false` — because nothing the user can do inside the assistant refills a budget. Hosts typically set it from their own pre-flight budget check on mount, and clear it once a later check shows headroom again.\n *\n * The driver also latches it automatically when a turn ends with the `'budget-exhausted'` failure reason — off the `tool-loop-end` activity bus (which also covers a sub-agent wall, a turn this element did not start, and an element swapped in mid-turn) and off the driver's return value (which covers a wall hit during multi-agent classification, where no tool loop ran and so no bus event fires). So a host that does no pre-flight at all still gets a correct locked UI the moment the first 402 lands. The bus topic is tab-scoped, so a wall hit in a popped-out window latches the main window too — correct for a shared spend cap.\n *\n * **Lifetime — read this before relying on it as your source of truth.** The latch is in-memory and per-`stateKey`:\n *\n * - It does **not** survive `switchSession`. Switching away tears the outgoing session's store down entirely, so switching back yields a fresh, unblocked store. - It does **not** survive a page reload. It is deliberately absent from the persisted session snapshot: the snapshot is long-lived, so a persisted latch would outlive an out-of-band budget raise with no in-element way to clear it — a stale lock is worse than re-deriving the state.\n *\n * The durable source of truth is therefore the **host's pre-flight**, which should run on mount and on every session switch. See `docs/migration-GENC-1464.md` §\"How to adopt\", Option B.\n *\n * @beta\n */\n",
|
|
7594
|
+
"excerptTokens": [
|
|
7595
|
+
{
|
|
7596
|
+
"kind": "Content",
|
|
7597
|
+
"text": "get blocked(): "
|
|
7598
|
+
},
|
|
7599
|
+
{
|
|
7600
|
+
"kind": "Content",
|
|
7601
|
+
"text": "boolean"
|
|
7602
|
+
},
|
|
7603
|
+
{
|
|
7604
|
+
"kind": "Content",
|
|
7605
|
+
"text": ";\n\nset blocked(value: boolean);"
|
|
7606
|
+
}
|
|
7607
|
+
],
|
|
7608
|
+
"isReadonly": false,
|
|
7609
|
+
"isOptional": false,
|
|
7610
|
+
"releaseTag": "Beta",
|
|
7611
|
+
"name": "blocked",
|
|
7612
|
+
"propertyTypeTokenRange": {
|
|
7613
|
+
"startIndex": 1,
|
|
7614
|
+
"endIndex": 2
|
|
7615
|
+
},
|
|
7616
|
+
"isStatic": false,
|
|
7617
|
+
"isProtected": false,
|
|
7618
|
+
"isAbstract": false
|
|
7619
|
+
},
|
|
7620
|
+
{
|
|
7621
|
+
"kind": "Property",
|
|
7622
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#blockedReason:member",
|
|
7623
|
+
"docComment": "/**\n * Explanation shown in the blocked banner, or `null` for the element's default copy. Only meaningful while {@link FoundationAiAssistant.blocked} is true; setting `blocked = false` clears it.\n *\n * Writable, and symmetric with every other store-backed accessor on this class: writing it re-latches with the CURRENT `blocked` value, so it changes the copy without disturbing the flag. Assigning `null` clears the explanation while staying blocked (the banner falls back to the default copy). {@link FoundationAiAssistant.setBlocked} remains the way to write both in one atomic action.\n *\n * @beta\n */\n",
|
|
7624
|
+
"excerptTokens": [
|
|
7625
|
+
{
|
|
7626
|
+
"kind": "Content",
|
|
7627
|
+
"text": "get blockedReason(): "
|
|
7628
|
+
},
|
|
7629
|
+
{
|
|
7630
|
+
"kind": "Content",
|
|
7631
|
+
"text": "string | null"
|
|
7632
|
+
},
|
|
7633
|
+
{
|
|
7634
|
+
"kind": "Content",
|
|
7635
|
+
"text": ";\n\nset blockedReason(value: string | null);"
|
|
7636
|
+
}
|
|
7637
|
+
],
|
|
7638
|
+
"isReadonly": false,
|
|
7639
|
+
"isOptional": false,
|
|
7640
|
+
"releaseTag": "Beta",
|
|
7641
|
+
"name": "blockedReason",
|
|
7642
|
+
"propertyTypeTokenRange": {
|
|
7643
|
+
"startIndex": 1,
|
|
7644
|
+
"endIndex": 2
|
|
7645
|
+
},
|
|
7646
|
+
"isStatic": false,
|
|
7647
|
+
"isProtected": false,
|
|
7648
|
+
"isAbstract": false
|
|
7649
|
+
},
|
|
7650
|
+
{
|
|
7651
|
+
"kind": "Property",
|
|
7652
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#blockedVendors:member",
|
|
7653
|
+
"docComment": "/**\n * Vendors currently walled by the AI-spend budget, in the order they were walled. Empty for a host that never adopts the per-vendor API.\n *\n * May include a vendor this registry cannot reach — either because the registry moved on after the wall was latched, or because a 402's `otherVendorAvailable: false` walls every vendor the proxy meters (which is what that verdict is a statement about; see {@link FoundationAiAssistant.latchBlockedFrom}). Neither costs anything internally — {@link FoundationAiAssistant.blocked} asks only about the reachable set, and the banner reads the reachability-filtered {@link FoundationAiAssistant.relevantBlockedVendors} — but a host rendering this list itself should filter it against its own registry.\n *\n * Read-only on purpose: a settable array would let a host write a partial list and silently orphan the per-vendor banner copy. {@link FoundationAiAssistant.setVendorBlocked} is the write path.\n *\n * @beta\n */\n",
|
|
7654
|
+
"excerptTokens": [
|
|
7655
|
+
{
|
|
7656
|
+
"kind": "Content",
|
|
7657
|
+
"text": "get blockedVendors(): "
|
|
7658
|
+
},
|
|
7659
|
+
{
|
|
7660
|
+
"kind": "Content",
|
|
7661
|
+
"text": "readonly "
|
|
7662
|
+
},
|
|
7663
|
+
{
|
|
7664
|
+
"kind": "Reference",
|
|
7665
|
+
"text": "AIProviderType",
|
|
7666
|
+
"canonicalReference": "@genesislcap/foundation-ai!AIProviderType:type"
|
|
7667
|
+
},
|
|
7668
|
+
{
|
|
7669
|
+
"kind": "Content",
|
|
7670
|
+
"text": "[]"
|
|
7671
|
+
},
|
|
7672
|
+
{
|
|
7673
|
+
"kind": "Content",
|
|
7674
|
+
"text": ";"
|
|
7675
|
+
}
|
|
7676
|
+
],
|
|
7677
|
+
"isReadonly": true,
|
|
7678
|
+
"isOptional": false,
|
|
7679
|
+
"releaseTag": "Beta",
|
|
7680
|
+
"name": "blockedVendors",
|
|
7681
|
+
"propertyTypeTokenRange": {
|
|
7682
|
+
"startIndex": 1,
|
|
7683
|
+
"endIndex": 4
|
|
7684
|
+
},
|
|
7685
|
+
"isStatic": false,
|
|
7686
|
+
"isProtected": false,
|
|
7687
|
+
"isAbstract": false
|
|
7688
|
+
},
|
|
7536
7689
|
{
|
|
7537
7690
|
"kind": "Property",
|
|
7538
7691
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#busy:member",
|
|
@@ -9095,6 +9248,55 @@
|
|
|
9095
9248
|
"isProtected": false,
|
|
9096
9249
|
"isAbstract": false
|
|
9097
9250
|
},
|
|
9251
|
+
{
|
|
9252
|
+
"kind": "Method",
|
|
9253
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#isVendorBlocked:member(1)",
|
|
9254
|
+
"docComment": "/**\n * Whether this specific vendor's budget is walled — regardless of whether any other vendor still has headroom.\n *\n * @beta\n */\n",
|
|
9255
|
+
"excerptTokens": [
|
|
9256
|
+
{
|
|
9257
|
+
"kind": "Content",
|
|
9258
|
+
"text": "isVendorBlocked(vendor: "
|
|
9259
|
+
},
|
|
9260
|
+
{
|
|
9261
|
+
"kind": "Reference",
|
|
9262
|
+
"text": "AIProviderType",
|
|
9263
|
+
"canonicalReference": "@genesislcap/foundation-ai!AIProviderType:type"
|
|
9264
|
+
},
|
|
9265
|
+
{
|
|
9266
|
+
"kind": "Content",
|
|
9267
|
+
"text": "): "
|
|
9268
|
+
},
|
|
9269
|
+
{
|
|
9270
|
+
"kind": "Content",
|
|
9271
|
+
"text": "boolean"
|
|
9272
|
+
},
|
|
9273
|
+
{
|
|
9274
|
+
"kind": "Content",
|
|
9275
|
+
"text": ";"
|
|
9276
|
+
}
|
|
9277
|
+
],
|
|
9278
|
+
"isStatic": false,
|
|
9279
|
+
"returnTypeTokenRange": {
|
|
9280
|
+
"startIndex": 3,
|
|
9281
|
+
"endIndex": 4
|
|
9282
|
+
},
|
|
9283
|
+
"releaseTag": "Beta",
|
|
9284
|
+
"isProtected": false,
|
|
9285
|
+
"overloadIndex": 1,
|
|
9286
|
+
"parameters": [
|
|
9287
|
+
{
|
|
9288
|
+
"parameterName": "vendor",
|
|
9289
|
+
"parameterTypeTokenRange": {
|
|
9290
|
+
"startIndex": 1,
|
|
9291
|
+
"endIndex": 2
|
|
9292
|
+
},
|
|
9293
|
+
"isOptional": false
|
|
9294
|
+
}
|
|
9295
|
+
],
|
|
9296
|
+
"isOptional": false,
|
|
9297
|
+
"isAbstract": false,
|
|
9298
|
+
"name": "isVendorBlocked"
|
|
9299
|
+
},
|
|
9098
9300
|
{
|
|
9099
9301
|
"kind": "Property",
|
|
9100
9302
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#liveCostSessionTitle:member",
|
|
@@ -10032,6 +10234,45 @@
|
|
|
10032
10234
|
"isProtected": false,
|
|
10033
10235
|
"isAbstract": false
|
|
10034
10236
|
},
|
|
10237
|
+
{
|
|
10238
|
+
"kind": "Property",
|
|
10239
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#reachableVendors:member",
|
|
10240
|
+
"docComment": "/**\n * The distinct vendors the registry can currently reach, from the provider statuses this element already loads on connect and refreshes on every observable-registry change.\n *\n * This is the element's answer to \"which vendor would the next turn use\" — a question that has **no** correct answer and deliberately gets no API. The provider is resolved per turn AND per agent: `activeProviderInput` may be an async function of the turn's context, an orchestrated turn picks its agent with an LLM `classify()` call, and sub-agents resolve their own providers. Any pre-turn \"peek\" would therefore be a guess that is wrong precisely on the multi-agent hosts per-vendor budgets exist for.\n *\n * Asking instead which vendors are REACHABLE is answerable, synchronous, and free — and it is enough: the composer must stay live while any reachable vendor has headroom, and must lock when none does. It also makes vendor-switch recovery a derivation rather than a mutation: a host that swaps its registry to another vendor fires the observable, the statuses reload, the walled vendor drops out of this set, and `blocked` goes false with every latch left intact.\n *\n * @beta\n */\n",
|
|
10241
|
+
"excerptTokens": [
|
|
10242
|
+
{
|
|
10243
|
+
"kind": "Content",
|
|
10244
|
+
"text": "get reachableVendors(): "
|
|
10245
|
+
},
|
|
10246
|
+
{
|
|
10247
|
+
"kind": "Content",
|
|
10248
|
+
"text": "readonly "
|
|
10249
|
+
},
|
|
10250
|
+
{
|
|
10251
|
+
"kind": "Reference",
|
|
10252
|
+
"text": "AIProviderType",
|
|
10253
|
+
"canonicalReference": "@genesislcap/foundation-ai!AIProviderType:type"
|
|
10254
|
+
},
|
|
10255
|
+
{
|
|
10256
|
+
"kind": "Content",
|
|
10257
|
+
"text": "[]"
|
|
10258
|
+
},
|
|
10259
|
+
{
|
|
10260
|
+
"kind": "Content",
|
|
10261
|
+
"text": ";"
|
|
10262
|
+
}
|
|
10263
|
+
],
|
|
10264
|
+
"isReadonly": true,
|
|
10265
|
+
"isOptional": false,
|
|
10266
|
+
"releaseTag": "Beta",
|
|
10267
|
+
"name": "reachableVendors",
|
|
10268
|
+
"propertyTypeTokenRange": {
|
|
10269
|
+
"startIndex": 1,
|
|
10270
|
+
"endIndex": 4
|
|
10271
|
+
},
|
|
10272
|
+
"isStatic": false,
|
|
10273
|
+
"isProtected": false,
|
|
10274
|
+
"isAbstract": false
|
|
10275
|
+
},
|
|
10035
10276
|
{
|
|
10036
10277
|
"kind": "Method",
|
|
10037
10278
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#removeAttachment:member(1)",
|
|
@@ -10620,6 +10861,70 @@
|
|
|
10620
10861
|
"isAbstract": false,
|
|
10621
10862
|
"name": "setAppSettingValue"
|
|
10622
10863
|
},
|
|
10864
|
+
{
|
|
10865
|
+
"kind": "Method",
|
|
10866
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#setBlocked:member(1)",
|
|
10867
|
+
"docComment": "/**\n * Block or unblock the assistant, optionally with custom banner copy. Equivalent to the {@link FoundationAiAssistant.blocked} setter, plus the reason in one atomic write.\n *\n * Blocking writes the **vendor-agnostic** block — what a host with one budget pot means — and does not populate {@link FoundationAiAssistant.blockedVendors}. Unblocking clears the per-vendor walls as well, so a host asserting \"the wall is gone\" after its own pre-flight cannot be silently overruled by a driver latch it never saw.\n *\n * @beta\n */\n",
|
|
10868
|
+
"excerptTokens": [
|
|
10869
|
+
{
|
|
10870
|
+
"kind": "Content",
|
|
10871
|
+
"text": "setBlocked(blocked: "
|
|
10872
|
+
},
|
|
10873
|
+
{
|
|
10874
|
+
"kind": "Content",
|
|
10875
|
+
"text": "boolean"
|
|
10876
|
+
},
|
|
10877
|
+
{
|
|
10878
|
+
"kind": "Content",
|
|
10879
|
+
"text": ", reason?: "
|
|
10880
|
+
},
|
|
10881
|
+
{
|
|
10882
|
+
"kind": "Content",
|
|
10883
|
+
"text": "string | null"
|
|
10884
|
+
},
|
|
10885
|
+
{
|
|
10886
|
+
"kind": "Content",
|
|
10887
|
+
"text": "): "
|
|
10888
|
+
},
|
|
10889
|
+
{
|
|
10890
|
+
"kind": "Content",
|
|
10891
|
+
"text": "void"
|
|
10892
|
+
},
|
|
10893
|
+
{
|
|
10894
|
+
"kind": "Content",
|
|
10895
|
+
"text": ";"
|
|
10896
|
+
}
|
|
10897
|
+
],
|
|
10898
|
+
"isStatic": false,
|
|
10899
|
+
"returnTypeTokenRange": {
|
|
10900
|
+
"startIndex": 5,
|
|
10901
|
+
"endIndex": 6
|
|
10902
|
+
},
|
|
10903
|
+
"releaseTag": "Beta",
|
|
10904
|
+
"isProtected": false,
|
|
10905
|
+
"overloadIndex": 1,
|
|
10906
|
+
"parameters": [
|
|
10907
|
+
{
|
|
10908
|
+
"parameterName": "blocked",
|
|
10909
|
+
"parameterTypeTokenRange": {
|
|
10910
|
+
"startIndex": 1,
|
|
10911
|
+
"endIndex": 2
|
|
10912
|
+
},
|
|
10913
|
+
"isOptional": false
|
|
10914
|
+
},
|
|
10915
|
+
{
|
|
10916
|
+
"parameterName": "reason",
|
|
10917
|
+
"parameterTypeTokenRange": {
|
|
10918
|
+
"startIndex": 3,
|
|
10919
|
+
"endIndex": 4
|
|
10920
|
+
},
|
|
10921
|
+
"isOptional": true
|
|
10922
|
+
}
|
|
10923
|
+
],
|
|
10924
|
+
"isOptional": false,
|
|
10925
|
+
"isAbstract": false,
|
|
10926
|
+
"name": "setBlocked"
|
|
10927
|
+
},
|
|
10623
10928
|
{
|
|
10624
10929
|
"kind": "Method",
|
|
10625
10930
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#setEnabledAnimations:member(1)",
|
|
@@ -10960,10 +11265,40 @@
|
|
|
10960
11265
|
"isProtected": false,
|
|
10961
11266
|
"isAbstract": false
|
|
10962
11267
|
},
|
|
11268
|
+
{
|
|
11269
|
+
"kind": "Property",
|
|
11270
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#settingsCostHistoryHeadingVisible:member",
|
|
11271
|
+
"docComment": "/**\n * Whether the \"Build history\" heading has anything under it.\n *\n * Broader than {@link FoundationAiAssistant.settingsCostHistorySectionVisible} because the heading also covers the lifetime total, which renders before the first row exists (rows are written as spend accrues, the lifetime section only needs history switched on). Gating the heading on the rows alone left that total sitting under nothing.\n */\n",
|
|
11272
|
+
"excerptTokens": [
|
|
11273
|
+
{
|
|
11274
|
+
"kind": "Content",
|
|
11275
|
+
"text": "get settingsCostHistoryHeadingVisible(): "
|
|
11276
|
+
},
|
|
11277
|
+
{
|
|
11278
|
+
"kind": "Content",
|
|
11279
|
+
"text": "boolean"
|
|
11280
|
+
},
|
|
11281
|
+
{
|
|
11282
|
+
"kind": "Content",
|
|
11283
|
+
"text": ";"
|
|
11284
|
+
}
|
|
11285
|
+
],
|
|
11286
|
+
"isReadonly": true,
|
|
11287
|
+
"isOptional": false,
|
|
11288
|
+
"releaseTag": "Beta",
|
|
11289
|
+
"name": "settingsCostHistoryHeadingVisible",
|
|
11290
|
+
"propertyTypeTokenRange": {
|
|
11291
|
+
"startIndex": 1,
|
|
11292
|
+
"endIndex": 2
|
|
11293
|
+
},
|
|
11294
|
+
"isStatic": false,
|
|
11295
|
+
"isProtected": false,
|
|
11296
|
+
"isAbstract": false
|
|
11297
|
+
},
|
|
10963
11298
|
{
|
|
10964
11299
|
"kind": "Property",
|
|
10965
11300
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#settingsCostHistorySectionVisible:member",
|
|
10966
|
-
"docComment": "",
|
|
11301
|
+
"docComment": "/**\n * Whether the build-history section has anything in it — the built-in row list, or a host's own markup in the `settings-cost-history` slot.\n *\n * Slotted content is checked FIRST, ahead of `enabled`. That flag governs the *built-in* ledger: it gates the row writes, the reload, and the lifetime sum — and it defaults to `false` (`cost?.enabled === true`), while the Usage tab itself shows for `showCost`/`showTokens`, which default true. So a host can legitimately render its own build history into the slot and never opt into our `localStorage` ledger. Short-circuiting on `enabled` above the slot check hid that host's markup outright, since the slot is the only thing in the container.\n */\n",
|
|
10967
11302
|
"excerptTokens": [
|
|
10968
11303
|
{
|
|
10969
11304
|
"kind": "Content",
|
|
@@ -11333,6 +11668,87 @@
|
|
|
11333
11668
|
"isProtected": false,
|
|
11334
11669
|
"isAbstract": false
|
|
11335
11670
|
},
|
|
11671
|
+
{
|
|
11672
|
+
"kind": "Method",
|
|
11673
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#setVendorBlocked:member(1)",
|
|
11674
|
+
"docComment": "/**\n * Wall (or release) one vendor's budget, optionally with banner copy for it. The per-vendor mirror of {@link FoundationAiAssistant.setBlocked}.\n *\n * Walling a vendor does **not** on its own disable the composer: while another reachable vendor has headroom the assistant stays usable and the banner tells the user to switch. Only when every reachable vendor is walled does `blocked` become true.\n *\n * `reason` is composed into the banner sentence for that vendor, **however many vendors are walled** — see {@link FoundationAiAssistant.effectiveBlockedReason}. It is per-vendor copy, not a whole-banner override; {@link FoundationAiAssistant.blockedReason} is the override. Omitting it keeps whatever explanation that vendor already carried, so a driver latch landing after a host one cannot blank it.\n *\n * `'none'` is rejected with a warning rather than accepted: it is the \"no provider configured\" sentinel, not a vendor. Latching it would put the raw sentinel in the banner (\"none's AI usage limit is reached\") and could never be undone by derivation, because `'none'` never appears in {@link FoundationAiAssistant.reachableVendors} — so `blocked` could never become derivable from it either. Use {@link FoundationAiAssistant.setBlocked} for a vendor-agnostic block.\n *\n * @beta\n */\n",
|
|
11675
|
+
"excerptTokens": [
|
|
11676
|
+
{
|
|
11677
|
+
"kind": "Content",
|
|
11678
|
+
"text": "setVendorBlocked(vendor: "
|
|
11679
|
+
},
|
|
11680
|
+
{
|
|
11681
|
+
"kind": "Reference",
|
|
11682
|
+
"text": "AIProviderType",
|
|
11683
|
+
"canonicalReference": "@genesislcap/foundation-ai!AIProviderType:type"
|
|
11684
|
+
},
|
|
11685
|
+
{
|
|
11686
|
+
"kind": "Content",
|
|
11687
|
+
"text": ", blocked: "
|
|
11688
|
+
},
|
|
11689
|
+
{
|
|
11690
|
+
"kind": "Content",
|
|
11691
|
+
"text": "boolean"
|
|
11692
|
+
},
|
|
11693
|
+
{
|
|
11694
|
+
"kind": "Content",
|
|
11695
|
+
"text": ", reason?: "
|
|
11696
|
+
},
|
|
11697
|
+
{
|
|
11698
|
+
"kind": "Content",
|
|
11699
|
+
"text": "string | null"
|
|
11700
|
+
},
|
|
11701
|
+
{
|
|
11702
|
+
"kind": "Content",
|
|
11703
|
+
"text": "): "
|
|
11704
|
+
},
|
|
11705
|
+
{
|
|
11706
|
+
"kind": "Content",
|
|
11707
|
+
"text": "void"
|
|
11708
|
+
},
|
|
11709
|
+
{
|
|
11710
|
+
"kind": "Content",
|
|
11711
|
+
"text": ";"
|
|
11712
|
+
}
|
|
11713
|
+
],
|
|
11714
|
+
"isStatic": false,
|
|
11715
|
+
"returnTypeTokenRange": {
|
|
11716
|
+
"startIndex": 7,
|
|
11717
|
+
"endIndex": 8
|
|
11718
|
+
},
|
|
11719
|
+
"releaseTag": "Beta",
|
|
11720
|
+
"isProtected": false,
|
|
11721
|
+
"overloadIndex": 1,
|
|
11722
|
+
"parameters": [
|
|
11723
|
+
{
|
|
11724
|
+
"parameterName": "vendor",
|
|
11725
|
+
"parameterTypeTokenRange": {
|
|
11726
|
+
"startIndex": 1,
|
|
11727
|
+
"endIndex": 2
|
|
11728
|
+
},
|
|
11729
|
+
"isOptional": false
|
|
11730
|
+
},
|
|
11731
|
+
{
|
|
11732
|
+
"parameterName": "blocked",
|
|
11733
|
+
"parameterTypeTokenRange": {
|
|
11734
|
+
"startIndex": 3,
|
|
11735
|
+
"endIndex": 4
|
|
11736
|
+
},
|
|
11737
|
+
"isOptional": false
|
|
11738
|
+
},
|
|
11739
|
+
{
|
|
11740
|
+
"parameterName": "reason",
|
|
11741
|
+
"parameterTypeTokenRange": {
|
|
11742
|
+
"startIndex": 5,
|
|
11743
|
+
"endIndex": 6
|
|
11744
|
+
},
|
|
11745
|
+
"isOptional": true
|
|
11746
|
+
}
|
|
11747
|
+
],
|
|
11748
|
+
"isOptional": false,
|
|
11749
|
+
"isAbstract": false,
|
|
11750
|
+
"name": "setVendorBlocked"
|
|
11751
|
+
},
|
|
11336
11752
|
{
|
|
11337
11753
|
"kind": "Property",
|
|
11338
11754
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#showAgentSwitchIndicator:member",
|
|
@@ -13383,7 +13799,7 @@
|
|
|
13383
13799
|
},
|
|
13384
13800
|
{
|
|
13385
13801
|
"kind": "Content",
|
|
13386
|
-
"text": ";\n }"
|
|
13802
|
+
"text": ";\n budgetExhaustedMessage?: string;\n }"
|
|
13387
13803
|
},
|
|
13388
13804
|
{
|
|
13389
13805
|
"kind": "Content",
|