@genesislcap/ai-assistant 15.35.3 → 15.35.4-FUI-0.10
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 +506 -0
- package/dist/ai-assistant.d.ts +238 -0
- package/dist/chat-driver.cjs +221 -4
- package/dist/chat-driver.cjs.map +2 -2
- package/dist/chat-driver.mjs +221 -4
- package/dist/chat-driver.mjs.map +2 -2
- package/dist/custom-elements.json +2705 -2335
- package/dist/dts/components/ai-driver/ai-driver.d.ts +31 -0
- package/dist/dts/components/ai-driver/ai-driver.d.ts.map +1 -1
- package/dist/dts/components/chat-bubble/chat-bubble.d.ts +18 -0
- package/dist/dts/components/chat-bubble/chat-bubble.d.ts.map +1 -1
- package/dist/dts/components/chat-bubble/chat-bubble.template.d.ts.map +1 -1
- package/dist/dts/components/chat-driver/chat-driver.d.ts +93 -0
- package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
- package/dist/dts/components/chat-markdown/chat-markdown.d.ts +29 -0
- package/dist/dts/components/chat-markdown/chat-markdown.d.ts.map +1 -1
- package/dist/dts/components/halo-overlay.d.ts +30 -0
- package/dist/dts/components/halo-overlay.d.ts.map +1 -1
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +17 -0
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -1
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts +15 -0
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/state/persistence/index.d.ts +1 -0
- package/dist/dts/state/persistence/index.d.ts.map +1 -1
- package/dist/dts/state/persistence/session-persister.d.ts +12 -0
- package/dist/dts/state/persistence/session-persister.d.ts.map +1 -1
- package/dist/dts/state/persistence/session-snapshot.d.ts +14 -0
- package/dist/dts/state/persistence/session-snapshot.d.ts.map +1 -1
- package/dist/dts/suggestions/chat-suggestions.d.ts +7 -0
- package/dist/dts/suggestions/chat-suggestions.d.ts.map +1 -1
- package/dist/dts/utils/condense-history.d.ts +114 -0
- package/dist/dts/utils/condense-history.d.ts.map +1 -1
- package/dist/esm/components/chat-bubble/chat-bubble.js +27 -0
- package/dist/esm/components/chat-bubble/chat-bubble.template.js +5 -3
- package/dist/esm/components/chat-driver/chat-driver.js +140 -17
- package/dist/esm/components/chat-markdown/chat-markdown.js +132 -1
- package/dist/esm/components/halo-overlay.js +96 -8
- package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +17 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/main/main.template.js +110 -45
- package/dist/esm/state/persistence/session-persister.js +63 -15
- package/dist/esm/state/persistence/session-snapshot.js +2 -17
- package/dist/esm/suggestions/chat-suggestions.js +11 -3
- package/dist/esm/utils/condense-history.js +123 -0
- package/docs/styling.md +153 -0
- package/package.json +18 -18
|
@@ -2,6 +2,7 @@ import type { ChatAttachment, ChatDriverResult, ChatMessage, ChatToolDefinition
|
|
|
2
2
|
import type { AgentConfig } from '../../config/config';
|
|
3
3
|
import type { DiagnosticEntry } from '../../state/persistence/diagnostics';
|
|
4
4
|
import type { InteractionContext } from '../../types/interaction-context';
|
|
5
|
+
import type { PersistedCondensePolicy } from '../../utils/condense-history';
|
|
5
6
|
import type { CompactionProjection } from '../../utils/context-tokens';
|
|
6
7
|
import type { CompactionPlanOptions } from '../../utils/history-transform';
|
|
7
8
|
import type { ContextGuardPolicy, TurnSnapshot } from '../chat-driver/chat-driver';
|
|
@@ -110,6 +111,36 @@ export interface AiDriver extends EventTarget {
|
|
|
110
111
|
* to project, and a caller falls back to {@link AiDriver.getRawHistory}.
|
|
111
112
|
*/
|
|
112
113
|
getHistoryForPersistence?(): ChatMessage[];
|
|
114
|
+
/**
|
|
115
|
+
* The `condenseWhen` policies that have NOT fired yet, for the tool calls in `messages` — the
|
|
116
|
+
* transcript being persisted — in a clock-independent form a later
|
|
117
|
+
* {@link AiDriver.restoreCondensePolicies} can re-register (GENC-1632). The companion of
|
|
118
|
+
* {@link AiDriver.getHistoryForPersistence}: that stores already-collapsed payloads as stubs;
|
|
119
|
+
* this keeps the not-yet-collapsed ones collapsible across a reload, where they would otherwise
|
|
120
|
+
* ride every provider call for the rest of the session. Optional, like its companion — a driver
|
|
121
|
+
* without condensation has none.
|
|
122
|
+
*
|
|
123
|
+
* @beta
|
|
124
|
+
*/
|
|
125
|
+
getCondensePoliciesForPersistence?(messages: readonly ChatMessage[]): PersistedCondensePolicy[];
|
|
126
|
+
/**
|
|
127
|
+
* Re-register policies from {@link AiDriver.getCondensePoliciesForPersistence} against a restored
|
|
128
|
+
* transcript (GENC-1632). Call after {@link AiDriver.loadHistory}: entries whose tool call is not
|
|
129
|
+
* in the loaded history are dropped. Tolerates `undefined` and malformed entries (an older or
|
|
130
|
+
* damaged snapshot), which are ignored.
|
|
131
|
+
*
|
|
132
|
+
* Returns how many entries were actually re-armed (`restored`) and how many of those are parked
|
|
133
|
+
* pending the next agent activation (`awaitingReactivation`) — narrower than `entries.length`,
|
|
134
|
+
* which counts what was offered, not what was accepted (a malformed entry, a trimmed-away call, or
|
|
135
|
+
* a first-wins duplicate is dropped silently). A caller logging the outcome needs this split to
|
|
136
|
+
* tell "all re-armed" from "none did".
|
|
137
|
+
*
|
|
138
|
+
* @beta
|
|
139
|
+
*/
|
|
140
|
+
restoreCondensePolicies?(entries: readonly unknown[] | undefined): {
|
|
141
|
+
restored: number;
|
|
142
|
+
awaitingReactivation: number;
|
|
143
|
+
};
|
|
113
144
|
/**
|
|
114
145
|
* The live `AgentConfig` currently active in the driver — the instance whose
|
|
115
146
|
* `onActivate` ran, so its `serialize`/`getDebugSnapshot` closures hold live
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/ai-driver/ai-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,kBAAkB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AAC,EAAE,eAAe,EAAE,GAC/B,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAErB;;;;;OAKG;IACH,gBAAgB,CAAC,IAAI,aAAa,CAAC,YAAY,CAAC,CAAC;IAEjD;;;;;OAKG;IACH,sBAAsB,CAAC,IAAI,aAAa,CAAC,eAAe,CAAC,CAAC;IAE1D;;;;;OAKG;IACH,qBAAqB,IAAI,MAAM,CAAC;IAEhC;;;;OAIG;IACH,OAAO,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjC;;;;;OAKG;IACH,MAAM,CAAC,IAAI,IAAI,CAAC;CACjB"}
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import { GenesisElement } from '@genesislcap/web-core';
|
|
2
|
+
/**
|
|
3
|
+
* Whether `el` still has an animation that will fire `animationend`.
|
|
4
|
+
*
|
|
5
|
+
* `dialog` is an exposed part, so an app's rules reach it and can leave the close waiting on an
|
|
6
|
+
* event that never arrives. Two shapes of that, both plausible customisations:
|
|
7
|
+
*
|
|
8
|
+
* - `::part(dialog) { animation: none }` to drop the bounce — no animation at all.
|
|
9
|
+
* - `::part(dialog) { animation: my-in 0.3s both }` to swap in its own entrance — that beats
|
|
10
|
+
* `.closing` in the cascade, so the exit never runs, and the entrance stays in `getAnimations()`
|
|
11
|
+
* as a finished animation held in effect by its fill mode.
|
|
12
|
+
*
|
|
13
|
+
* So presence in `getAnimations()` is not the question — whether anything is still going is.
|
|
14
|
+
* Tested for `running` rather than against `finished` so a paused animation, which will not fire
|
|
15
|
+
* either, is also treated as nothing to wait for.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function hasRunningAnimation(el: Element): boolean;
|
|
2
20
|
/**
|
|
3
21
|
* Floating chat bubble component that provides a draggable orb and dialog panel
|
|
4
22
|
* for embedding an AI assistant without a full-page layout.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-bubble.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-bubble/chat-bubble.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,cAAc,EAAoB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-bubble.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-bubble/chat-bubble.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,cAAc,EAAoB,MAAM,uBAAuB,CAAC;AAK9F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAExD;AAkCD;;;;;;;;;GASG;AACH,qBAOa,YAAa,SAAQ,cAAc;IAChB,KAAK,EAAE,MAAM,CAAkB;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IACP,kBAAkB,EAAE,MAAM,CAAW;IAElF,gBAAgB;IACJ,aAAa,EAAE,WAAW,EAAE,CAAM;IAC9C,gBAAgB;IACJ,oBAAoB,EAAE,MAAM,CAAK;IAC7C,iFAAiF;IACrE,UAAU,EAAE,MAAM,CAAK;IACnC,+EAA+E;IACnE,SAAS,EAAE,MAAM,CAAK;IAClC,mFAAmF;IACvE,UAAU,EAAE,MAAM,CAAK;IACnC,iFAAiF;IACrE,SAAS,EAAE,MAAM,CAAK;IAClC,iEAAiE;IACrD,WAAW,EAAE,MAAM,CAAwB;IACvD,kEAAkE;IACtD,YAAY,EAAE,MAAM,CAAyB;IACzD,4DAA4D;IAChD,UAAU,EAAE,OAAO,CAAS;IACxC,6DAA6D;IACjD,OAAO,EAAE,OAAO,CAAS;IAErC,gBAAgB;IAChB,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,gBAAgB;IAChB,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,WAAW,CAAC;IAEvB,OAAO,CAAC,QAAQ,CAAC,CAAa;IAC9B,OAAO,CAAC,gBAAgB,CAAC,CAAU;IACnC,OAAO,CAAC,cAAc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E,MAAM,eAAe,CAAC;AAgBlD,eAAO,MAAM,oBAAoB,QAAO,YAAY,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"chat-bubble.template.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-bubble/chat-bubble.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,YAAY,EAAQ,MAAM,uBAAuB,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAgBlD,eAAO,MAAM,oBAAoB,QAAO,YAAY,CAAC,YAAY,CAmDhE,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { type ActivityBus } from '../../channel/ai-activity-bus';
|
|
|
4
4
|
import type { AgentConfig, SystemPromptInput, ToolDefinitionsInput, ToolHandlersInput } from '../../config/config';
|
|
5
5
|
import type { DiagnosticEntry } from '../../state/persistence/diagnostics';
|
|
6
6
|
import type { InteractionContext } from '../../types/interaction-context';
|
|
7
|
+
import { type PersistedCondensePolicy } from '../../utils/condense-history';
|
|
7
8
|
import { type CompactionProjection } from '../../utils/context-tokens';
|
|
8
9
|
import { type CompactionPlanOptions } from '../../utils/history-transform';
|
|
9
10
|
import { AgentSession } from '../agent-session/agent-session';
|
|
@@ -208,8 +209,29 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
208
209
|
* provider call to collapse stale payloads from the model-bound history only.
|
|
209
210
|
* Accumulates across agents on a shared driver (a superseded read collapses no
|
|
210
211
|
* matter which agent made it) and is never cleared — it dies with the driver.
|
|
212
|
+
*
|
|
213
|
+
* "Dies with the driver" used to mean a page reload silently disarmed every policy that had
|
|
214
|
+
* not fired yet: the restored transcript carried the full payload and nothing was left to
|
|
215
|
+
* collapse it, so it rode every later provider call (GENC-1632). The unfired entries are now
|
|
216
|
+
* persisted with the session and re-registered on restore — see
|
|
217
|
+
* {@link ChatDriver.getCondensePoliciesForPersistence} and
|
|
218
|
+
* {@link ChatDriver.restoreCondensePolicies}.
|
|
211
219
|
*/
|
|
212
220
|
private readonly condensePolicies;
|
|
221
|
+
/**
|
|
222
|
+
* Restored policies whose owning activation was still live at save time, waiting for that agent
|
|
223
|
+
* to be re-installed so they can be stamped with the activation it resumes in (GENC-1632).
|
|
224
|
+
*
|
|
225
|
+
* They cannot be stamped at restore time. On a fresh page `activeAgentName` is unset, so the
|
|
226
|
+
* first `installAgent` after the reload is a "name change" and advances `currentActivation` —
|
|
227
|
+
* which is exactly the `agentEnd` signal. An entry stamped before that bump reads as belonging
|
|
228
|
+
* to an activation that has ended, and it and every `phaseEnd` entry (through the `agentEnd`
|
|
229
|
+
* backstop) collapse on the first provider call after the reload, mid-flow. For Create's
|
|
230
|
+
* Planning phase that is the uploaded scope document vanishing the moment the user carries on
|
|
231
|
+
* talking about it — a worse failure than the one being fixed. So the stamp is deferred to that
|
|
232
|
+
* `installAgent`, and consumed there once whichever agent it installs.
|
|
233
|
+
*/
|
|
234
|
+
private readonly condenseAwaitingReactivation;
|
|
213
235
|
/**
|
|
214
236
|
* Monotonic model-call counter for the driver's whole lifetime — the age clock
|
|
215
237
|
* for `condenseWhen({ on: { kind: 'age' } })`. The per-`sendMessage` `iterations`
|
|
@@ -816,6 +838,77 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
|
|
|
816
838
|
* unaffected — which is what makes the elision recoverable.
|
|
817
839
|
*/
|
|
818
840
|
getHistoryForPersistence(): ChatMessage[];
|
|
841
|
+
/** The four condensation clocks as they read now. */
|
|
842
|
+
private condenseClocks;
|
|
843
|
+
/**
|
|
844
|
+
* The `condenseWhen` policies that have not fired yet, for the calls in `messages`, in the
|
|
845
|
+
* clock-independent form {@link ChatDriver.restoreCondensePolicies} re-registers. See
|
|
846
|
+
* {@link AiDriver.getCondensePoliciesForPersistence}.
|
|
847
|
+
*
|
|
848
|
+
* The other half of {@link ChatDriver.getHistoryForPersistence} (GENC-1632). That stores the
|
|
849
|
+
* payloads the model has already stopped seeing as their stubs; this stores the policies for the
|
|
850
|
+
* ones it has NOT stopped seeing yet, so a reload does not strand them at full size for the rest
|
|
851
|
+
* of the session. Only entries whose call is in `messages` — the transcript actually being
|
|
852
|
+
* written — are returned, so a frozen (non-resumable) or compacted save carries no policy for a
|
|
853
|
+
* call it does not contain.
|
|
854
|
+
*
|
|
855
|
+
* @beta
|
|
856
|
+
*/
|
|
857
|
+
getCondensePoliciesForPersistence(messages: readonly ChatMessage[]): PersistedCondensePolicy[];
|
|
858
|
+
/**
|
|
859
|
+
* Re-register policies saved by {@link ChatDriver.getCondensePoliciesForPersistence} against
|
|
860
|
+
* the restored transcript. See {@link AiDriver.restoreCondensePolicies}.
|
|
861
|
+
*
|
|
862
|
+
* Call AFTER {@link ChatDriver.loadHistory} has seeded the restored transcript: an entry is
|
|
863
|
+
* re-registered only if its tool call is in the driver's history, so one whose call the
|
|
864
|
+
* restorable-boundary trim cut away (an orphaned trailing `tool_use`) is dropped rather than
|
|
865
|
+
* resurrected against nothing.
|
|
866
|
+
*
|
|
867
|
+
* First-wins still holds per call: an entry is skipped if a policy is already registered for its
|
|
868
|
+
* tool call — a restore never overrides what a live handler declared. `superseded` needs no
|
|
869
|
+
* special handling — survivors are resolved from HISTORY order on every pass, so a restored entry
|
|
870
|
+
* and a later call on the same `by` key resolve exactly as two live ones would.
|
|
871
|
+
*
|
|
872
|
+
* Clocks are rebased so each trigger is exactly as far from firing as it was at save time (see
|
|
873
|
+
* `rebaseRestoredCondensePolicy`), with one deferral. An entry owned by the activation that was
|
|
874
|
+
* live at save time, whose agent is not the one installed right now — the normal case on a
|
|
875
|
+
* fresh page, where nothing is installed yet — is parked in
|
|
876
|
+
* `condenseAwaitingReactivation` and stamped by the next `installAgent`: with
|
|
877
|
+
* that agent's resumed activation if it is the same agent, or left behind (so it reads as
|
|
878
|
+
* ended, which it has) if a different agent took over.
|
|
879
|
+
*
|
|
880
|
+
* A host with no agent to re-activate (a bare driver built from a static config) loses nothing
|
|
881
|
+
* by this: the entry's owner (`undefined`) matches the installed agent (`undefined`), so it is
|
|
882
|
+
* stamped live straight away and ends when the driver's single activation does — on
|
|
883
|
+
* `releaseAgent` / `completeSubAgent`, exactly as a policy registered live would.
|
|
884
|
+
*
|
|
885
|
+
* Returns how many entries were actually re-armed, split from how many were merely present in
|
|
886
|
+
* `entries` (review follow-up, GENC-1632): a malformed entry, one whose call the restorable-
|
|
887
|
+
* boundary trim removed, or a first-wins duplicate is silently dropped, so the caller's own count
|
|
888
|
+
* of `entries` can't tell "all of them came back" from "none did". `restored` is every entry that
|
|
889
|
+
* reached `condensePolicies`; `awaitingReactivation` is the subset of those parked pending the
|
|
890
|
+
* next `installAgent` rather than stamped live immediately.
|
|
891
|
+
*
|
|
892
|
+
* @beta
|
|
893
|
+
*/
|
|
894
|
+
restoreCondensePolicies(entries: readonly unknown[] | undefined): {
|
|
895
|
+
restored: number;
|
|
896
|
+
awaitingReactivation: number;
|
|
897
|
+
};
|
|
898
|
+
/**
|
|
899
|
+
* Stamp the restored entries parked in `condenseAwaitingReactivation` now that
|
|
900
|
+
* `installAgent` has advanced the activation clock for `agentName` (GENC-1632).
|
|
901
|
+
*
|
|
902
|
+
* Same agent → the flow the entry belonged to is resuming, so it takes the new activation and
|
|
903
|
+
* stays full until THAT activation ends (and, for `phaseEnd`, until the next `endPhase()`).
|
|
904
|
+
* Different agent → its owner did not come back; its activation is over, so it keeps the stamp
|
|
905
|
+
* it was restored with, which is now behind the clock, and collapses on the next provider call
|
|
906
|
+
* exactly as a live `agentEnd` payload does on a swap.
|
|
907
|
+
*
|
|
908
|
+
* One-shot: the set is emptied whatever the outcome, because only the FIRST activation after the
|
|
909
|
+
* restore can be the resumption. Any later swap is an ordinary activation boundary.
|
|
910
|
+
*/
|
|
911
|
+
private resumeRestoredCondensePolicies;
|
|
819
912
|
/**
|
|
820
913
|
* {@inheritDoc AiDriver.getSuggestions}
|
|
821
914
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-driver/chat-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,kBAAkB,EAGlB,cAAc,EACd,gBAAgB,EAGhB,WAAW,
|
|
1
|
+
{"version":3,"file":"chat-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-driver/chat-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,kBAAkB,EAGlB,cAAc,EACd,gBAAgB,EAGhB,WAAW,EAQX,yBAAyB,EACzB,qBAAqB,EAGtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,oBAAoB,EAOrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,+BAA+B,CAAC;AACpF,OAAO,KAAK,EACV,WAAW,EAKX,iBAAiB,EAKjB,oBAAoB,EACpB,iBAAiB,EAElB,MAAM,qBAAqB,CAAC;AAU7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAE3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAML,KAAK,uBAAuB,EAK7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,oBAAoB,EAG1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,KAAK,qBAAqB,EAG3B,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAmBxE,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAElE,mEAAmE;AACnE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;GAGG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC,OAAO,CAAC,gBAAgB,EAAE;IAAE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OAGG;IACI,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,IAAI;IAInE;;;;OAIG;IACI,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAInF;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAU/B;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI;IAK3C,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA0D/F;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,mBAAmB;IAmG3B;;;;;OAKG;YACW,cAAc;IAyP5B;;;OAGG;IACG,mBAAmB,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;YA6DvE,WAAW;IA4lCzB;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,eAAe;IAiBvB,gDAAgD;IAChD,OAAO,CAAC,oBAAoB;CAO7B"}
|
|
@@ -1,8 +1,37 @@
|
|
|
1
1
|
import { GenesisElement } from '@genesislcap/web-core';
|
|
2
|
+
/**
|
|
3
|
+
* Every part this component exposes, as an `exportparts` value.
|
|
4
|
+
*
|
|
5
|
+
* `::part()` crosses exactly one shadow boundary, so a host that renders `<ai-chat-markdown>` in
|
|
6
|
+
* its own shadow root has to forward these for an app to reach them at all. Built from the map
|
|
7
|
+
* above rather than written out, so the forwarded list cannot drift from what is emitted.
|
|
8
|
+
*/
|
|
9
|
+
export declare const MARKDOWN_EXPORTPARTS: string;
|
|
2
10
|
export declare class AiChatMarkdown extends GenesisElement {
|
|
3
11
|
/** The markdown string to render. */
|
|
4
12
|
content: string;
|
|
5
13
|
/** @internal */
|
|
6
14
|
renderMarkdown(): string;
|
|
15
|
+
/**
|
|
16
|
+
* Tag the generated elements with shadow parts so an embedding app can style them.
|
|
17
|
+
*
|
|
18
|
+
* Takes the tree DOMPurify built rather than re-parsing its serialised output: `content` changes
|
|
19
|
+
* on every streamed chunk, so a second parse/serialise round trip would run per chunk over the
|
|
20
|
+
* whole message, and the string the browser finally parses is then serialised straight from the
|
|
21
|
+
* tree DOMPurify checked. Parse/serialise mismatches are where mXSS bypasses have historically
|
|
22
|
+
* lived, and this walk has no need to introduce one.
|
|
23
|
+
*
|
|
24
|
+
* Only ever *adds* attributes, to DOM that has already been cleared - so it is not itself
|
|
25
|
+
* sanitiser surface.
|
|
26
|
+
*
|
|
27
|
+
* Lists additionally carry a level: a top-level list is `md-ul md-ul-level-1`, a list nested
|
|
28
|
+
* inside it is `md-ul-level-2`, and an `li` takes the level of the list holding it. Levels are
|
|
29
|
+
* clamped at `MAX_LIST_LEVEL`, so a list deeper than that answers to the deepest level
|
|
30
|
+
* rather than to a name no host forwards. Chat markdown rarely nests, so this is a safety valve
|
|
31
|
+
* rather than a feature - without it, every list at every depth would answer to one selector and
|
|
32
|
+
* there would be no way to tell them apart afterwards. Depth comes from walking the tree rather
|
|
33
|
+
* than from marked's renderers, which are invoked innermost-first and so cannot count downwards.
|
|
34
|
+
*/
|
|
35
|
+
private annotateParts;
|
|
7
36
|
}
|
|
8
37
|
//# sourceMappingURL=chat-markdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-markdown/chat-markdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,cAAc,EAAoB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-markdown/chat-markdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,cAAc,EAAoB,MAAM,uBAAuB,CAAC;AA0I7F;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAOvB,CAAC;AAWb,qBAOa,cAAe,SAAQ,cAAc;IAChD,qCAAqC;IACzB,OAAO,EAAE,MAAM,CAAM;IAEjC,gBAAgB;IAChB,cAAc;IAed;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,aAAa;CAmBtB"}
|
|
@@ -31,8 +31,38 @@ export declare class AiHaloOverlay extends GenesisElement {
|
|
|
31
31
|
private angle;
|
|
32
32
|
private lastTime?;
|
|
33
33
|
private animFrame?;
|
|
34
|
+
private stopTimer?;
|
|
35
|
+
/** Whether the loop should keep rescheduling itself — see {@link AiHaloOverlay.tick}. */
|
|
36
|
+
private running;
|
|
37
|
+
/**
|
|
38
|
+
* Start/stop with `active`, so an idle overlay costs nothing.
|
|
39
|
+
*
|
|
40
|
+
* Guarded on `isConnected` because FAST invokes attribute-changed callbacks during
|
|
41
|
+
* initialisation, before the element is in the document — `connectedCallback` is what decides
|
|
42
|
+
* for an element that mounts already-active.
|
|
43
|
+
*/
|
|
44
|
+
activeChanged(): void;
|
|
34
45
|
connectedCallback(): void;
|
|
35
46
|
disconnectedCallback(): void;
|
|
47
|
+
private startAnimation;
|
|
48
|
+
/**
|
|
49
|
+
* Keep spinning until the host has finished fading out.
|
|
50
|
+
*
|
|
51
|
+
* Deactivating only drops the host's opacity — the overlay is still on screen for the length of
|
|
52
|
+
* the transition, so stopping the instant `active` flips would freeze the rotation mid-fade.
|
|
53
|
+
*
|
|
54
|
+
* Timed rather than driven by `transitionend`, which never fires if the host is hidden or an app
|
|
55
|
+
* overrides the transition away, and a stop that never arrives is exactly the idle-tick bug this
|
|
56
|
+
* gating exists to prevent.
|
|
57
|
+
*
|
|
58
|
+
* The timer re-reads `active` rather than trusting that it was cancelled. FAST reflects the
|
|
59
|
+
* property to the attribute on a queued update, so `activeChanged` can run again, out of order,
|
|
60
|
+
* after a rapid toggle — and a stale stop landing on a re-activated overlay would leave it
|
|
61
|
+
* frozen for good, which is worse than the idle ticking this gate removes.
|
|
62
|
+
*/
|
|
63
|
+
private scheduleStop;
|
|
64
|
+
private cancelPendingStop;
|
|
65
|
+
private stopAnimation;
|
|
36
66
|
private tick;
|
|
37
67
|
}
|
|
38
68
|
//# sourceMappingURL=halo-overlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"halo-overlay.d.ts","sourceRoot":"","sources":["../../../src/components/halo-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,cAAc,EAAQ,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"halo-overlay.d.ts","sourceRoot":"","sources":["../../../src/components/halo-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,cAAc,EAAQ,MAAM,uBAAuB,CAAC;AAgCvF;;;;;;;;;;;;GAYG;AACH,qBA0Ea,aAAc,SAAQ,cAAc;IACpB,MAAM,EAAE,OAAO,CAAS;IACnD,+FAA+F;IACpC,KAAK,EAAE,MAAM,CAAsB;IAC9F,qDAAqD;IAC/C,SAAS,EAAE,IAAI,GAAG,KAAK,CAAQ;IACrC,0CAA0C;IAE1C,UAAU,EAAE,MAAM,CAA4B;IAC9C,+CAA+C;IAE/C,WAAW,EAAE,MAAM,CAA6B;IAChD,2GAA2G;IAE3G,UAAU,EAAE,MAAM,CAA4B;IAE9C,iBAAiB;IAIjB,kBAAkB;IAIlB,iBAAiB;IAejB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAO;IAEhD,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,yFAAyF;IACzF,OAAO,CAAC,OAAO,CAAS;IAExB;;;;;;OAMG;IACH,aAAa;IAUb,iBAAiB;IAKjB,oBAAoB;IAMpB,OAAO,CAAC,cAAc;IAQtB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,IAAI;CAyBb"}
|
|
@@ -3,6 +3,7 @@ import type { ActivityBus } from '../../channel/ai-activity-bus';
|
|
|
3
3
|
import type { AgentConfig } from '../../config/config';
|
|
4
4
|
import type { DiagnosticEntry } from '../../state/persistence/diagnostics';
|
|
5
5
|
import type { InteractionContext } from '../../types/interaction-context';
|
|
6
|
+
import type { PersistedCondensePolicy } from '../../utils/condense-history';
|
|
6
7
|
import type { CompactionProjection } from '../../utils/context-tokens';
|
|
7
8
|
import type { CompactionPlanOptions } from '../../utils/history-transform';
|
|
8
9
|
import type { AiDriver, AllAgentSummary, ContextReserveResolution } from '../ai-driver/ai-driver';
|
|
@@ -185,6 +186,22 @@ export declare class OrchestratingDriver extends EventTarget implements AiDriver
|
|
|
185
186
|
* tests passed, and the feature did nothing.
|
|
186
187
|
*/
|
|
187
188
|
getHistoryForPersistence(): ChatMessage[];
|
|
189
|
+
/**
|
|
190
|
+
* Delegates to the inner {@link ChatDriver}, which owns the condensation registry and clocks
|
|
191
|
+
* (GENC-1632). The forward matters for the same reason as `getHistoryForPersistence` above: the
|
|
192
|
+
* persister reaches it through `?.`, so a missing forward would compile, pass the ChatDriver
|
|
193
|
+
* tests, and do nothing for every orchestrated host — which is every host with an agents array.
|
|
194
|
+
*/
|
|
195
|
+
getCondensePoliciesForPersistence(messages: readonly ChatMessage[]): PersistedCondensePolicy[];
|
|
196
|
+
/**
|
|
197
|
+
* Delegates to the inner {@link ChatDriver} (GENC-1632). The deferred activation stamp it
|
|
198
|
+
* performs is taken by the inner driver's `installAgent`, which this driver's own
|
|
199
|
+
* `installAgent` always reaches, so nothing extra is needed here.
|
|
200
|
+
*/
|
|
201
|
+
restoreCondensePolicies(entries: readonly unknown[] | undefined): {
|
|
202
|
+
restored: number;
|
|
203
|
+
awaitingReactivation: number;
|
|
204
|
+
};
|
|
188
205
|
/** {@inheritDoc AiDriver.setContextGuard} */
|
|
189
206
|
setContextGuard(policy?: ContextGuardPolicy): void;
|
|
190
207
|
/** {@inheritDoc AiDriver.compact} */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrating-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/orchestrating-driver/orchestrating-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,WAAW,EAEZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EACV,WAAW,EAMZ,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAK3E,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClG,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,YAAY,EAClB,MAAM,4BAA4B,CAAC;AAkBpC;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe;AACzB,kDAAkD;AAChD,YAAY;AACd,6EAA6E;GAC3E,UAAU;AACZ;;;;;GAKG;GACD,kBAAkB;AACpB,+DAA+D;GAC7D,kBAAkB;AACpB,kDAAkD;GAChD,gBAAgB;AAClB,kFAAkF;GAChF,sBAAsB;AACxB,oEAAoE;GAClE,mBAAmB;AACrB,0EAA0E;GACxE,QAAQ,CAAC;AAwEb;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,sBAAsB,ijBAIyH,CAAC;AA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W,CAAC,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;YAmC7E,mBAAmB;IAwJ3B,mBAAmB,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIrF,qDAAqD;IACrD,uBAAuB,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAIjE;;;;OAIG;IACH,iBAAiB,IAAI,wBAAwB,GAAG,SAAS;IAiDzD,4CAA4C;IAC5C,cAAc,IAAI,WAAW,GAAG,SAAS;YAI3B,YAAY;IAqD1B;;;;;;;;;;OAUG;YACW,kBAAkB;IAYhC;;;;OAIG;IACH,MAAM,IAAI,IAAI;IAKd;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAS9B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,aAAa;IAoCrB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;YAgCd,QAAQ;IAmMtB;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAa1B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;CAe5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,mBAAmB,GAAG,SAAS,CAEjF"}
|
|
1
|
+
{"version":3,"file":"orchestrating-driver.d.ts","sourceRoot":"","sources":["../../../../src/components/orchestrating-driver/orchestrating-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,WAAW,EAEZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EACV,WAAW,EAMZ,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAA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AqD;IACrD,uBAAuB,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAIjE;;;;OAIG;IACH,iBAAiB,IAAI,wBAAwB,GAAG,SAAS;IAiDzD,4CAA4C;IAC5C,cAAc,IAAI,WAAW,GAAG,SAAS;YAI3B,YAAY;IAqD1B;;;;;;;;;;OAUG;YACW,kBAAkB;IAYhC;;;;OAIG;IACH,MAAM,IAAI,IAAI;IAKd;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAS9B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,aAAa;IAoCrB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;YAgCd,QAAQ;IAmMtB;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAa1B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;CAe5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,mBAAmB,GAAG,SAAS,CAEjF"}
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -27,5 +27,5 @@ export type { ResolvedDebugLogNoteConfig } from './utils/resolve-debug-log-note'
|
|
|
27
27
|
export type { ModelTagAppearance } from '@genesislcap/foundation-ai';
|
|
28
28
|
export type { AiChatInteraction, AiChatWidget } from './types/ai-chat-widget';
|
|
29
29
|
export type { InteractionContext } from './types/interaction-context';
|
|
30
|
-
export { AiChatMarkdown } from './components/chat-markdown/chat-markdown';
|
|
30
|
+
export { AiChatMarkdown, MARKDOWN_EXPORTPARTS } from './components/chat-markdown/chat-markdown';
|
|
31
31
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC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c,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,YAAY,EACV,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,gEAAgE,CAAC;AACxE,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AAGpC,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC3F,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,mCAAmC,EAAE,MAAM,2BAA2B,CAAC;AAChF,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAC7F,YAAY,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC9E,YAAY,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC"}
|
|
@@ -17,6 +17,21 @@
|
|
|
17
17
|
import type { ChatMessage } from '@genesislcap/foundation-ai';
|
|
18
18
|
import { ViewTemplate } from '@genesislcap/web-core';
|
|
19
19
|
import type { FoundationAiAssistant } from './main';
|
|
20
|
+
/**
|
|
21
|
+
* Part names for one avatar element: the bare name, a role-level name, and — on the assistant
|
|
22
|
+
* side, whose rows vary — the message type.
|
|
23
|
+
*
|
|
24
|
+
* The role-level name is the one an app usually wants. `messageType` splits the assistant across
|
|
25
|
+
* `ai`, `ai-thinking`, `ai-function` and `interaction`, so without it "style the assistant's
|
|
26
|
+
* avatar, not the user's" takes four selectors and silently misses any type added later.
|
|
27
|
+
* `::part()` names cannot be chained, so each has to be a name of its own rather than a
|
|
28
|
+
* combination. The user side needs no extra name — its role and its type are both `user`.
|
|
29
|
+
*
|
|
30
|
+
* Exported for the unit test that pins the vocabulary; not part of the element API.
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export declare const avatarPartsFor: (base: string, type: string) => string;
|
|
20
35
|
/**
|
|
21
36
|
* The timestamp shown beside the sender name (GENC-1257).
|
|
22
37
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAEV,WAAW,EAGZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAuC,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAEV,WAAW,EAGZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAuC,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAU1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAkDpD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,KAAG,MAC4B,CAAC;AAsGzF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,wBAAwB,kDAWpC,CAAC;AAoJF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,GAAI,GAAG,qBAAqB,KAAG,MAYlD,CAAC;AAEf;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,mBAAmB,GAAI,GAAG,qBAAqB,KAAG,MAAM,GAAG,IACpB,CAAC;AAyJrD,eAAO,MAAM,6BAA6B,GACxC,oBAAoB,MAAM,KACzB,YAAY,CAAC,qBAAqB,CAisBpC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { PERSISTED_SESSION_VERSION } from './session-snapshot';
|
|
2
2
|
export type { PersistedSession } from './session-snapshot';
|
|
3
|
+
export type { PersistedCondensePolicy } from '../../utils/condense-history';
|
|
3
4
|
export { WebStorageSessionProvider } from './session-persistence-provider';
|
|
4
5
|
export type { SessionPersistenceProvider, SessionPersistenceConfig, SessionPreferences, } from './session-persistence-provider';
|
|
5
6
|
export { assembleDebugLog, withFreshMetaSnapshot } from './diagnostics';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/state/persistence/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,YAAY,EACV,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACxE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/state/persistence/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,YAAY,EACV,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACxE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -196,6 +196,18 @@ export declare class SessionPersister {
|
|
|
196
196
|
* persist or accumulate across reload→save→reload cycles.
|
|
197
197
|
*/
|
|
198
198
|
private messagesToPersist;
|
|
199
|
+
/**
|
|
200
|
+
* The `condenseWhen` policies still waiting to fire for the calls in `messages` (GENC-1632) —
|
|
201
|
+
* the half of condensation `getHistoryForPersistence` cannot carry, because a payload whose
|
|
202
|
+
* trigger has not fired is stored full and needs its policy to collapse after a reload.
|
|
203
|
+
*
|
|
204
|
+
* `flowDropped` is the frozen (non-resumable) save: its snapshot drops the running flow, so the
|
|
205
|
+
* activation that owned the pending payloads does not resume and they are written as ended.
|
|
206
|
+
*
|
|
207
|
+
* Never throws: a failure here costs a resumed session some context, which is not worth losing
|
|
208
|
+
* the save over.
|
|
209
|
+
*/
|
|
210
|
+
private condensePoliciesToPersist;
|
|
199
211
|
/**
|
|
200
212
|
* Capture the current session to durable storage (GENC-1351 §5.1). Reads the
|
|
201
213
|
* full transcript from the driver and the restorable scalars from the store, and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-persister.d.ts","sourceRoot":"","sources":["../../../../src/state/persistence/session-persister.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"session-persister.d.ts","sourceRoot":"","sources":["../../../../src/state/persistence/session-persister.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAYrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAE5E,OAAO,KAAK,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AA8CnG;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,cAAc,EAAE,MAAM,wBAAwB,CAAC;IAC/C,+EAA+E;IAC/E,aAAa,EAAE,MAAM,MAAM,EAAE,CAAC;IAC9B,oEAAoE;IACpE,SAAS,EAAE,MAAM,QAAQ,GAAG,SAAS,CAAC;IACtC,mEAAmE;IACnE,QAAQ,EAAE,MAAM,kBAAkB,GAAG,SAAS,CAAC;IAC/C;;;;OAIG;IACH,oBAAoB,EAAE,MAAM,eAAe,EAAE,CAAC;IAC9C;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE;QAC7B,oEAAoE;QACpE,eAAe,EAAE,MAAM,CAAC;QACxB,mEAAmE;QACnE,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,+DAA+D;QAC/D,MAAM,EAAE,MAAM,CAAC;KAChB,KAAK,IAAI,CAAC;IACX,uFAAuF;IACvF,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;CACrC;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,gBAAgB;IAkDf,OAAO,CAAC,IAAI;IAjDxB,OAAO,CAAC,UAAU,CAAC,CAAgC;IACnD,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,iBAAiB,CAAC,CAAgC;IAC1D,O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,OAAO,CAAC,uBAAuB;IAU/B;;;;OAIG;IACG,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAmBvC;;;;OAIG;IACG,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAatC;;;;;OAKG;IACH,eAAe,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI;IAchD;;;;;;OAMG;IACH,mBAAmB,IAAI,IAAI;IAiB3B;;;;;;OAMG;IACG,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAYvC;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,uBAAuB;IA6C/B,sEAAsE;IACtE,OAAO,IAAI,IAAI;CAMhB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ChatMessage } from '@genesislcap/foundation-ai';
|
|
2
|
+
import type { PersistedCondensePolicy } from '../../utils/condense-history';
|
|
2
3
|
import type { LoadSessionPayload } from '../ai-assistant-slice';
|
|
3
4
|
/**
|
|
4
5
|
* Schema version of the persisted session shape. Bump on an incompatible
|
|
@@ -51,6 +52,18 @@ export interface PersistedSession {
|
|
|
51
52
|
* value shape is the agent's own, hence `unknown`.
|
|
52
53
|
*/
|
|
53
54
|
agentSnapshots: Record<string, unknown>;
|
|
55
|
+
/**
|
|
56
|
+
* `condenseWhen` policies that had not fired yet when the session was saved, for tool calls in
|
|
57
|
+
* {@link PersistedSession.messages} (GENC-1632). Handed back to the driver on restore so those
|
|
58
|
+
* payloads still collapse when their trigger fires, instead of riding every provider call for the
|
|
59
|
+
* rest of the resumed session at full size. Payloads that HAD already collapsed need no entry:
|
|
60
|
+
* `messages` already stores them as the stubs the model was sent (GENC-1566).
|
|
61
|
+
*
|
|
62
|
+
* Optional and additive, so the schema `version` is unchanged: a snapshot written before this
|
|
63
|
+
* field existed restores exactly as it always did (nothing to re-register), and a reader that
|
|
64
|
+
* predates it ignores it. Omitted rather than written empty when there is nothing to carry.
|
|
65
|
+
*/
|
|
66
|
+
condensePolicies?: PersistedCondensePolicy[];
|
|
54
67
|
/**
|
|
55
68
|
* Interrupted-flow marker (GENC-1351 §5.9). Present when the session was saved
|
|
56
69
|
* while an agent declared its current state non-resumable (`resumable === false`).
|
|
@@ -86,6 +99,7 @@ export interface PersistedSessionInput {
|
|
|
86
99
|
activeModel?: string;
|
|
87
100
|
activeProviderName?: string;
|
|
88
101
|
agentSnapshots?: Record<string, unknown>;
|
|
102
|
+
condensePolicies?: PersistedCondensePolicy[];
|
|
89
103
|
}
|
|
90
104
|
/**
|
|
91
105
|
* Assemble a versioned {@link PersistedSession}, stamping `version` and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-snapshot.d.ts","sourceRoot":"","sources":["../../../../src/state/persistence/session-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iEAAiE;IACjE,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,kEAAkE;IAClE,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,8CAA8C;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE;QACZ,+CAA+C;QAC/C,OAAO,EAAE,MAAM,CAAC;QAChB,gFAAgF;QAChF,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"session-snapshot.d.ts","sourceRoot":"","sources":["../../../../src/state/persistence/session-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;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AQ,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CAIjF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,gBAAgB,EAC1B,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,GAChC,MAAM,EAAE,CAIV;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC;IAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAQxE"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { GenesisElement } from '@genesislcap/web-core';
|
|
2
2
|
import type { SuggestionsState } from '../main/main.types';
|
|
3
|
+
/**
|
|
4
|
+
* Every part this component exposes, as an `exportparts` value.
|
|
5
|
+
*
|
|
6
|
+
* `::part()` crosses exactly one shadow boundary, so a host rendering `<chat-suggestions>` in its
|
|
7
|
+
* own shadow root has to forward these for an embedding app to reach them at all.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SUGGESTIONS_EXPORTPARTS = "suggestions-container, suggestion-placeholder, suggestion-pill";
|
|
3
10
|
export declare class ChatSuggestions extends GenesisElement {
|
|
4
11
|
state: SuggestionsState;
|
|
5
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-suggestions.d.ts","sourceRoot":"","sources":["../../../src/suggestions/chat-suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EAMf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-suggestions.d.ts","sourceRoot":"","sources":["../../../src/suggestions/chat-suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EAMf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAM3D;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,mEAC8B,CAAC;AAoJnE,qBAKa,eAAgB,SAAQ,cAAc;IAEjD,KAAK,EAAE,gBAAgB,CAAsB;IAE7C;;;;OAIG;IACkD,UAAU,UAAS;IAExE,YAAY,IAAI,IAAI;IAKpB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;CAGhD"}
|