@genesislcap/ai-assistant 15.3.2 → 15.3.3-alpha-4899ddd.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/ai-assistant.api.json +391 -5
- package/dist/ai-assistant.d.ts +603 -6
- 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 +236 -10
- 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/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 +384 -6
- 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 +143 -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 +10 -0
- package/dist/dts/state/session-store.d.ts.map +1 -1
- 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/main/blocked-state.test.js +913 -0
- package/dist/esm/main/main.js +680 -16
- package/dist/esm/main/main.styles.js +47 -0
- package/dist/esm/main/main.styles.test.js +86 -0
- package/dist/esm/main/main.template.js +121 -4
- package/dist/esm/state/ai-assistant-slice.js +128 -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/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/main/blocked-state.test.ts +1243 -0
- package/src/main/main.styles.test.ts +103 -0
- package/src/main/main.styles.ts +47 -0
- package/src/main/main.template.ts +131 -4
- package/src/main/main.ts +680 -10
- package/src/state/ai-assistant-slice.test.ts +215 -0
- package/src/state/ai-assistant-slice.ts +181 -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
|
@@ -16,6 +16,59 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { ViewTemplate } from '@genesislcap/web-core';
|
|
18
18
|
import type { FoundationAiAssistant } from './main';
|
|
19
|
+
/**
|
|
20
|
+
* Class list for the banner below, joined rather than interpolated so an
|
|
21
|
+
* inapplicable modifier contributes nothing. Two interpolations directly in the
|
|
22
|
+
* attribute emitted `class="blocked-banner "` in the common (unblocked) case —
|
|
23
|
+
* harmless to the browser, but it shows up in every DOM snapshot and every
|
|
24
|
+
* innerHTML assertion a host writes against this element.
|
|
25
|
+
*
|
|
26
|
+
* The two modifiers name what they actually gate, which is why neither is
|
|
27
|
+
* `is-blocked`: `is-visible` means the banner has something to say, and that
|
|
28
|
+
* includes PARTIAL exhaustion — one vendor walled, composer still live, `blocked`
|
|
29
|
+
* false. `is-partial` then softens the treatment for exactly that case. Naming
|
|
30
|
+
* the first after `blocked` read as a contradiction beside the second, and made
|
|
31
|
+
* the styles say `.blocked-banner.is-blocked` to mean "visible".
|
|
32
|
+
*
|
|
33
|
+
* Exported for the unit test that pins the attribute; not part of the element
|
|
34
|
+
* API.
|
|
35
|
+
*
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export declare const blockedBannerClasses: (x: FoundationAiAssistant) => string;
|
|
39
|
+
/**
|
|
40
|
+
* Id of the blocked banner, referenced by the composer controls'
|
|
41
|
+
* `aria-describedby`. Shadow-DOM-scoped, so a fixed string cannot collide with
|
|
42
|
+
* the host page — and IDREF resolution is same-root, which is exactly where both
|
|
43
|
+
* ends of this reference live.
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export declare const BLOCKED_BANNER_ID = "blocked-banner";
|
|
48
|
+
/**
|
|
49
|
+
* `aria-describedby` for the composer's textarea, send button and attach button:
|
|
50
|
+
* the banner's id whenever the banner has something to say, otherwise `null` (so
|
|
51
|
+
* the attribute is omitted rather than emitted empty).
|
|
52
|
+
*
|
|
53
|
+
* Keyed on `bannerVisible`, NOT on `blocked`, and that is the point. The
|
|
54
|
+
* PARTIAL state — some vendor walled, composer still live — is the state this
|
|
55
|
+
* feature exists to create, and it was the one state with no accessible
|
|
56
|
+
* explanation at all: `aria-disabled` and `aria-label` bind only on `blocked`, and
|
|
57
|
+
* a live composer keeps the host's own placeholder, so a screen-reader user
|
|
58
|
+
* arriving at the textarea heard "Type a message" with no hint that the next turn
|
|
59
|
+
* might be refused. The banner's `role="status"` announces the text when it
|
|
60
|
+
* CHANGES; this is what makes the same explanation reachable afterwards, on
|
|
61
|
+
* demand, from the control it is about.
|
|
62
|
+
*
|
|
63
|
+
* Applied in the fully blocked state too, where it is additive: the `aria-label`
|
|
64
|
+
* there states the reason as the control's name, and this restates it as its
|
|
65
|
+
* description for the send/attach buttons, which carry neither.
|
|
66
|
+
*
|
|
67
|
+
* Exported for the unit test that pins it; not part of the element API.
|
|
68
|
+
*
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
export declare const composerDescribedBy: (x: FoundationAiAssistant) => string | null;
|
|
19
72
|
/** @internal */
|
|
20
73
|
export declare const FoundationAiAssistantTemplate: (designSystemPrefix: string) => ViewTemplate<FoundationAiAssistant>;
|
|
21
74
|
//# sourceMappingURL=main.template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AASH,OAAO,EAAuC,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AASH,OAAO,EAAuC,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAyPpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,GAAI,GAAG,qBAAqB,KAAG,MAOlD,CAAC;AAEf;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,mBAAmB,GAAI,GAAG,qBAAqB,KAAG,MAAM,GAAG,IAC5B,CAAC;AAoD7C,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,GACxC,oBAAoB,MAAM,KACzB,YAAY,CAAC,qBAAqB,CAwhBpC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AIProviderRegistryStatusEntry, ChatInputDuringExecutionMode, ChatMessage } from '@genesislcap/foundation-ai';
|
|
1
|
+
import type { AIProviderRegistryStatusEntry, AIProviderType, ChatInputDuringExecutionMode, ChatMessage } from '@genesislcap/foundation-ai';
|
|
2
2
|
import type { PayloadAction } from '@genesislcap/foundation-redux';
|
|
3
3
|
import type { AgentConfig } from '../config/config';
|
|
4
4
|
import type { AiAssistantAnimation, AiAssistantState, SuggestionsState } from '../main/main.types';
|
|
@@ -48,6 +48,10 @@ export interface AiAssistantSessionState {
|
|
|
48
48
|
* Snapshot of every registered provider's status, in registration order.
|
|
49
49
|
* Populated on connect (or on settings-open if not yet loaded) and reused
|
|
50
50
|
* for the lifetime of the session — provider registration is static.
|
|
51
|
+
*
|
|
52
|
+
* Describes the registry rather than the conversation, so it survives
|
|
53
|
+
* {@link resetSession} ("Clear" / "New chat"); see the reasoning there. Only
|
|
54
|
+
* a registry change (via the observable-registry subscription) rewrites it.
|
|
51
55
|
*/
|
|
52
56
|
providerStatuses: AIProviderRegistryStatusEntry[];
|
|
53
57
|
activeAgent: Omit<AgentConfig, 'toolHandlers'> | undefined;
|
|
@@ -103,6 +107,55 @@ export interface AiAssistantSessionState {
|
|
|
103
107
|
* being clobbered** when the restored history loads.
|
|
104
108
|
*/
|
|
105
109
|
restoring: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Whether the assistant is **blocked by a backend condition** and cannot send
|
|
112
|
+
* at all — today, an exhausted AI-spend budget (GENC-1464). Unlike `compacting`
|
|
113
|
+
* and `restoring`, which are short-lived in-flight flags that clear
|
|
114
|
+
* themselves, this is a **latched** state: nothing the user or the element
|
|
115
|
+
* does clears it, because nothing they can do fixes it. It stays set until the
|
|
116
|
+
* host writes `blocked = false` (typically after a fresh pre-flight shows
|
|
117
|
+
* budget available again).
|
|
118
|
+
*
|
|
119
|
+
* Also unlike those two, it does **not** replace the transcript — the user
|
|
120
|
+
* keeps their conversation and gets a banner above a disabled composer.
|
|
121
|
+
*
|
|
122
|
+
* In the slice so the banner + input-disable stay in sync across pop-in/out.
|
|
123
|
+
* Preserved across `resetSession` ("Clear" / "New chat"): starting a new chat
|
|
124
|
+
* does not refill the budget.
|
|
125
|
+
*
|
|
126
|
+
* **Vendor-agnostic.** Under per-vendor budgets this means "blocked whatever
|
|
127
|
+
* vendor you use" — a host-set block, or a wall that could not be attributed
|
|
128
|
+
* to a vendor. A wall that WAS attributed lands in
|
|
129
|
+
* {@link AiAssistantSessionState.blockedVendors} instead, and the element
|
|
130
|
+
* derives its public `blocked` from the two together.
|
|
131
|
+
*/
|
|
132
|
+
blocked: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Host- or driver-supplied explanation shown in the blocked banner. `null`
|
|
135
|
+
* falls back to the element's default copy. Meaningless while
|
|
136
|
+
* {@link AiAssistantSessionState.blocked} is false.
|
|
137
|
+
*/
|
|
138
|
+
blockedReason: string | null;
|
|
139
|
+
/**
|
|
140
|
+
* Vendors walled by the AI-spend budget (GENC-1464 per-vendor), in the order they
|
|
141
|
+
* were walled.
|
|
142
|
+
*
|
|
143
|
+
* An **array**, not a `Set` and not one `Record<AIProviderType, {...}>`:
|
|
144
|
+
* a `Set` is neither plain JSON for the redux store nor structured-cloneable
|
|
145
|
+
* across the tab channel; the order is what the multi-vendor banner copy
|
|
146
|
+
* ("Anthropic and Gemini") reads; and a combined record would conflate "not
|
|
147
|
+
* walled" with "walled, no reason".
|
|
148
|
+
*
|
|
149
|
+
* Empty for every host that never adopts the per-vendor API — which is what
|
|
150
|
+
* makes the element's derived `blocked` byte-identical to the old stored one.
|
|
151
|
+
*/
|
|
152
|
+
blockedVendors: AIProviderType[];
|
|
153
|
+
/**
|
|
154
|
+
* Per-vendor banner copy, keyed by a member of
|
|
155
|
+
* {@link AiAssistantSessionState.blockedVendors}. A missing entry falls back to
|
|
156
|
+
* copy composed from the vendor's display name.
|
|
157
|
+
*/
|
|
158
|
+
blockedVendorReasons: Partial<Record<AIProviderType, string>>;
|
|
106
159
|
/** Draft text in the input box — preserved across pop-in/pop-out cycles. */
|
|
107
160
|
inputValue: string;
|
|
108
161
|
/** Live trace from a currently-executing sub-agent. Cleared on sub-agent-stop. */
|
|
@@ -166,6 +219,60 @@ export declare const aiAssistantSlice: import("@reduxjs/toolkit").Slice<AiAssist
|
|
|
166
219
|
setSessionMenuOpen(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<boolean>): void;
|
|
167
220
|
setCompacting(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<boolean>): void;
|
|
168
221
|
setRestoring(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<boolean>): void;
|
|
222
|
+
/**
|
|
223
|
+
* Latch (or release) the backend-blocked state.
|
|
224
|
+
*
|
|
225
|
+
* `reason` is only meaningful while blocking, and it distinguishes three
|
|
226
|
+
* cases rather than two:
|
|
227
|
+
*
|
|
228
|
+
* - **omitted** — a re-latch that leaves the existing explanation intact.
|
|
229
|
+
* Load-bearing: the block has two writers (the host, and the driver's
|
|
230
|
+
* automatic latch), and the driver's write lands AFTER a bus-subscribed
|
|
231
|
+
* host has already set its own detailed copy. Treating "no reason" as
|
|
232
|
+
* "clear the reason" made that sequence replace the host's figures with
|
|
233
|
+
* generic copy every time, deterministically.
|
|
234
|
+
* - **a string** — replaces the explanation.
|
|
235
|
+
* - **`null`** — explicitly clears the explanation while staying blocked;
|
|
236
|
+
* the banner falls back to the element's default copy.
|
|
237
|
+
*
|
|
238
|
+
* Unblocking always clears it, so a stale explanation can never outlive the
|
|
239
|
+
* condition it described.
|
|
240
|
+
*
|
|
241
|
+
* Unblocking **also clears every per-vendor latch**, and that is the single
|
|
242
|
+
* rule that keeps per-vendor budgets non-breaking. A host asserting "the wall
|
|
243
|
+
* is gone" (the documented pre-flight, migration-GENC-1464 Option B) must not be
|
|
244
|
+
* silently overruled by a driver latch it cannot see; without this, the same
|
|
245
|
+
* `setBlocked(false)` that used to unblock would leave the composer locked.
|
|
246
|
+
*/
|
|
247
|
+
setBlocked(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<{
|
|
248
|
+
blocked: boolean;
|
|
249
|
+
reason?: string | null;
|
|
250
|
+
}>): void;
|
|
251
|
+
/**
|
|
252
|
+
* Write the banner explanation without touching the flag.
|
|
253
|
+
*
|
|
254
|
+
* Separate from {@link setBlocked} rather than expressed as
|
|
255
|
+
* `setBlocked({ blocked: current, reason })`, because the element's public
|
|
256
|
+
* `blocked` is now DERIVED: re-latching with the derived value would pass
|
|
257
|
+
* `false` for a partially-walled session and so clear every per-vendor latch
|
|
258
|
+
* as a side effect of setting a string.
|
|
259
|
+
*/
|
|
260
|
+
setBlockedReason(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<string | null>): void;
|
|
261
|
+
/**
|
|
262
|
+
* Wall (or release) a single vendor's budget.
|
|
263
|
+
*
|
|
264
|
+
* The `reason` trichotomy mirrors {@link setBlocked}'s exactly, and for the
|
|
265
|
+
* same reason: the same two-writer race (the driver's latch landing after a
|
|
266
|
+
* bus-subscribed host has written its own copy) applies per vendor.
|
|
267
|
+
*
|
|
268
|
+
* Adding an already-walled vendor is idempotent — the array is a set with an
|
|
269
|
+
* order, so the vendor keeps the position it was first walled at.
|
|
270
|
+
*/
|
|
271
|
+
setVendorBlocked(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<{
|
|
272
|
+
vendor: AIProviderType;
|
|
273
|
+
blocked: boolean;
|
|
274
|
+
reason?: string | null;
|
|
275
|
+
}>): void;
|
|
169
276
|
setInputValue(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<string>): void;
|
|
170
277
|
setLiveSubAgentTrace(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<ChatMessage[]>): void;
|
|
171
278
|
setLiveSubAgentName(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<string | null>): void;
|
|
@@ -182,11 +289,41 @@ export declare const aiAssistantSlice: import("@reduxjs/toolkit").Slice<AiAssist
|
|
|
182
289
|
loadSession(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<LoadSessionPayload>): void;
|
|
183
290
|
/**
|
|
184
291
|
* Wipe the session back to a fresh default — the "Clear" / "New chat" action.
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
292
|
+
*
|
|
293
|
+
* Three categories survive, for three different reasons — keep them distinct:
|
|
294
|
+
*
|
|
295
|
+
* 1. The user's **display preferences** (tool-call / thinking / narration /
|
|
296
|
+
* agent-switch visibility + animations). They are settings, not
|
|
297
|
+
* conversation state, and are persisted independently of the snapshot
|
|
298
|
+
* (GENC-1351). Without this they'd flip to their all-off defaults in the
|
|
299
|
+
* live store on Clear, since `clearSession` re-applies no baseline and the
|
|
300
|
+
* idempotent setters suppress a re-apply.
|
|
301
|
+
* 2. The **backend block** (`blocked` / `blockedReason`, and the per-vendor
|
|
302
|
+
* latches beside them). Not a preference at
|
|
303
|
+
* all — a standing backend condition that Clear cannot change. It is here
|
|
304
|
+
* because starting a new chat does not refill the AI budget, so clearing
|
|
305
|
+
* it would hand the user a working-looking composer that fails on the very
|
|
306
|
+
* next send.
|
|
307
|
+
* 3. The **provider statuses**. They describe the REGISTRY, not the
|
|
308
|
+
* conversation — provider registration is static for the store's lifetime
|
|
309
|
+
* and this snapshot is refreshed from the registry, never from a turn. They
|
|
310
|
+
* are session state only because that is where the element's store lives.
|
|
311
|
+
*
|
|
312
|
+
* Dropping them on Clear is not cosmetic: the element derives `blocked`
|
|
313
|
+
* from "every REACHABLE vendor is walled", and an empty reachable set fails
|
|
314
|
+
* safe to "blocked". So wiping the statuses while keeping the per-vendor
|
|
315
|
+
* latches (category 2) escalated one walled vendor out of two into a fully
|
|
316
|
+
* locked composer, and nothing reloads them — `loadProviderStatuses()` runs
|
|
317
|
+
* only on connect/session-switch and from the observable-registry
|
|
318
|
+
* subscription, so a host with a static registry stayed locked until a
|
|
319
|
+
* remount. Preserving is the fix rather than re-loading after reset,
|
|
320
|
+
* because the reload is async: it would still flash a fully locked composer
|
|
321
|
+
* for a turn of the event loop, and would break a host whose registry is
|
|
322
|
+
* immutable (nothing to re-listen to) or whose `listStatuses()` rejects.
|
|
323
|
+
*
|
|
324
|
+
* Stated separately so a future contributor deciding what belongs in this
|
|
325
|
+
* list does not "tidy" the block out on the grounds that it is not a display
|
|
326
|
+
* preference.
|
|
190
327
|
*/
|
|
191
328
|
resetSession(state: import("immer").WritableDraft<AiAssistantSessionState>): void;
|
|
192
329
|
}, "aiAssistant", "aiAssistant", {}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-assistant-slice.d.ts","sourceRoot":"","sources":["../../../src/state/ai-assistant-slice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,4BAA4B,EAC5B,WAAW,EACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEnG;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,EAAE,EAAE,MAAM,CAAC;IACX,8CAA8C;IAC9C,IAAI,EAAE,4BAA4B,CAAC;CACpC;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,WAAW,EAAE,CAAC;I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;+FAGnC,aAAa,CAAC,6BAA6B,EAAE,CAAC;0FAGnD,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,SAAS,CAAC;8FAGxD,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;iGAGzB,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;mGAG1B,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;8FAGjC,aAAa,CAAC,OAAO,CAAC;8FAGtB,aAAa,CAAC,OAAO,CAAC;yFAG3B,aAAa,CAAC,OAAO,CAAC;wFAGvB,aAAa,CAAC,OAAO,CAAC;IAGlD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;sFACuB,aAAa,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAUrF;;;;;;;;OAQG;4FAC6B,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;IAG5D;;;;;;;;;OASG;4FAGO,aAAa,CAAC;QAAE,MAAM,EAAE,cAAc,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;yFAgBhE,aAAa,CAAC,MAAM,CAAC;gGAGd,aAAa,CAAC,WAAW,EAAE,CAAC;+FAG7B,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;4FAG/B,aAAa,CAAC,aAAa,CAAC;+FAGzB,aAAa,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAGhE;;;;;OAKG;uFACwB,aAAa,CAAC,kBAAkB,CAAC;IAY5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;;oCAuBL,CAAC"}
|
|
@@ -112,7 +112,12 @@ export declare function clearSession(key: string): void;
|
|
|
112
112
|
* Human/agent-facing guide emitted as the first key of the exported debug log,
|
|
113
113
|
* so whoever opens the JSON (often an AI agent) knows how to read it without
|
|
114
114
|
* reverse-engineering the shape. Kept here next to the event catalogue it
|
|
115
|
-
* describes
|
|
115
|
+
* describes — but proximity alone demonstrably did NOT keep the two in sync
|
|
116
|
+
* (`refusal` was missing from both reason lists for a whole release), so
|
|
117
|
+
* `debug-event-log.test.ts` now asserts that every `TurnFailureReason` and every
|
|
118
|
+
* `SubAgentFailureReason` is named here, and fails the build when one is added
|
|
119
|
+
* without a matching sentence. Enumerations below read as exhaustive and WILL be
|
|
120
|
+
* trusted by an agent reading the JSON — keep them so.
|
|
116
121
|
*/
|
|
117
122
|
export declare const DEBUG_LOG_README: readonly string[];
|
|
118
123
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-event-log.d.ts","sourceRoot":"","sources":["../../../src/state/debug-event-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAErB,qBAAqB,GACrB,wBAAwB,GACxB,kBAAkB,GAClB,iBAAiB,GAEjB,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAEhB,eAAe,GACf,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,iBAAiB,GAEjB,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,mBAAmB,GAEnB,uBAAuB,GACvB,sBAAsB,GAEtB,6BAA6B,GAE7B,iBAAiB,GACjB,2BAA2B,GAC3B,mBAAmB,GACnB,mBAAmB,GAEnB,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,oBAAoB,GAEpB,iBAAiB,GACjB,kBAAkB,GAClB,yBAAyB,GACzB,qBAAqB,GACrB,mBAAmB,GACnB,wBAAwB,GACxB,2BAA2B,GAC3B,sBAAsB,GACtB,4BAA4B,CAAC;AAEjC;;;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,GAAG,IAAI,CA0BrF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED
|
|
1
|
+
{"version":3,"file":"debug-event-log.d.ts","sourceRoot":"","sources":["../../../src/state/debug-event-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAErB,qBAAqB,GACrB,wBAAwB,GACxB,kBAAkB,GAClB,iBAAiB,GAEjB,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAEhB,eAAe,GACf,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,iBAAiB,GAEjB,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,mBAAmB,GAEnB,uBAAuB,GACvB,sBAAsB,GAEtB,6BAA6B,GAE7B,iBAAiB,GACjB,2BAA2B,GAC3B,mBAAmB,GACnB,mBAAmB,GAEnB,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,oBAAoB,GAEpB,iBAAiB,GACjB,kBAAkB,GAClB,yBAAyB,GACzB,qBAAqB,GACrB,mBAAmB,GACnB,wBAAwB,GACxB,2BAA2B,GAC3B,sBAAsB,GACtB,4BAA4B,CAAC;AAEjC;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE5D;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,aAAa,EAAE,mBAAmB,CA4C5E,CAAC;AAEF,4CAA4C;AAC5C,MAAM,WAAW,SAAS;IACxB,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,SAAS,EAAE,MAAM,CAAC;IAClB,8C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essionMenuOpen(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<boolean>): void;
|
|
25
25
|
setCompacting(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<boolean>): void;
|
|
26
26
|
setRestoring(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<boolean>): void;
|
|
27
|
+
setBlocked(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<{
|
|
28
|
+
blocked: boolean;
|
|
29
|
+
reason?: string | null;
|
|
30
|
+
}>): void;
|
|
31
|
+
setBlockedReason(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<string | null>): void;
|
|
32
|
+
setVendorBlocked(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<{
|
|
33
|
+
vendor: import("@genesislcap/foundation-ai").AIProviderType;
|
|
34
|
+
blocked: boolean;
|
|
35
|
+
reason?: string | null;
|
|
36
|
+
}>): void;
|
|
27
37
|
setInputValue(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<string>): void;
|
|
28
38
|
setLiveSubAgentTrace(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<import("@genesislcap/foundation-ai").ChatMessage[]>): void;
|
|
29
39
|
setLiveSubAgentName(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<string | null>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-store.d.ts","sourceRoot":"","sources":["../../../src/state/session-store.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAE9B,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAIvD,iBAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS
|
|
1
|
+
{"version":3,"file":"session-store.d.ts","sourceRoot":"","sources":["../../../src/state/session-store.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAE9B,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAIvD,iBAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;cA6Cy+Y,CAAC;;;;;;cAAu8C,CAAC;;;;;;;;;;;wCAvCj+b;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAMnF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAED,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAC"}
|