@genesislcap/ai-assistant 15.27.0-agent-log-submit.3 → 15.27.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.
Files changed (36) hide show
  1. package/dist/ai-assistant.api.json +77 -838
  2. package/dist/ai-assistant.d.ts +23 -179
  3. package/dist/chat-driver.cjs +13 -14
  4. package/dist/chat-driver.cjs.map +2 -2
  5. package/dist/chat-driver.mjs +13 -14
  6. package/dist/chat-driver.mjs.map +2 -2
  7. package/dist/custom-elements.json +17 -454
  8. package/dist/dts/components/ai-driver/ai-driver.d.ts +11 -12
  9. package/dist/dts/components/ai-driver/ai-driver.d.ts.map +1 -1
  10. package/dist/dts/components/ai-driver/stub-driver.d.ts +17 -0
  11. package/dist/dts/components/ai-driver/stub-driver.d.ts.map +1 -0
  12. package/dist/dts/components/chat-driver/chat-driver.d.ts +10 -11
  13. package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
  14. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +2 -2
  15. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
  16. package/dist/dts/components/settings-modal/settings-modal.d.ts.map +1 -1
  17. package/dist/dts/components/settings-modal/settings-modal.styles.d.ts.map +1 -1
  18. package/dist/dts/components/settings-modal/settings-modal.template.d.ts +0 -8
  19. package/dist/dts/components/settings-modal/settings-modal.template.d.ts.map +1 -1
  20. package/dist/dts/index.d.ts +0 -1
  21. package/dist/dts/index.d.ts.map +1 -1
  22. package/dist/dts/main/main.d.ts +0 -148
  23. package/dist/dts/main/main.d.ts.map +1 -1
  24. package/dist/esm/components/ai-driver/stub-driver.js +16 -0
  25. package/dist/esm/components/chat-driver/chat-driver.js +11 -12
  26. package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +5 -5
  27. package/dist/esm/components/settings-modal/settings-modal.js +0 -1
  28. package/dist/esm/components/settings-modal/settings-modal.styles.js +5 -85
  29. package/dist/esm/components/settings-modal/settings-modal.template.js +23 -167
  30. package/dist/esm/main/main.js +20 -444
  31. package/dist/esm/state/persistence/session-persister.js +20 -20
  32. package/docs/migration-GENC-1580.md +108 -58
  33. package/package.json +16 -16
  34. package/dist/dts/utils/resolve-debug-log-note.d.ts +0 -25
  35. package/dist/dts/utils/resolve-debug-log-note.d.ts.map +0 -1
  36. package/dist/esm/utils/resolve-debug-log-note.js +0 -37
@@ -5233,7 +5233,7 @@ var ChatDriver = class _ChatDriver extends EventTarget {
5233
5233
  this.turnSeq = 0;
5234
5234
  /**
5235
5235
  * Monotonic agent-activation counter — the `agentEnd` clock. Advances when the
5236
- * active flow ends: a swap to a different-named agent (`applyAgent`) OR an
5236
+ * active flow ends: a swap to a different-named agent (`installAgent`) OR an
5237
5237
  * explicit `releaseAgent` / `completeSubAgent`. A stateful agent re-resolving
5238
5238
  * the same name across turns keeps one activation. `agentEnd` fires for a
5239
5239
  * payload once a LATER activation is current (`callActivation < currentActivation`)
@@ -5274,7 +5274,7 @@ var ChatDriver = class _ChatDriver extends EventTarget {
5274
5274
  * Union of every tool name advertised at any point during the current agent
5275
5275
  * activation. Lets the unknown-tool path tell a *stale* call (a real tool from
5276
5276
  * an earlier state, now retired — or one an open exclusive fold is hiding)
5277
- * apart from a *hallucinated* one. Reset on agent swap in `applyAgent`.
5277
+ * apart from a *hallucinated* one. Reset on agent swap in `installAgent`.
5278
5278
  */
5279
5279
  this.everSeenToolNames = /* @__PURE__ */ new Set();
5280
5280
  /**
@@ -5325,7 +5325,7 @@ var ChatDriver = class _ChatDriver extends EventTarget {
5325
5325
  this.turnCancelled = false;
5326
5326
  /**
5327
5327
  * Caches validated provider lookups per name within the current agent. Cleared
5328
- * by `applyAgent` so each new agent's static/function-resolved names are
5328
+ * by `installAgent` so each new agent's static/function-resolved names are
5329
5329
  * validated fresh.
5330
5330
  */
5331
5331
  this.resolvedProviderCache = /* @__PURE__ */ new Map();
@@ -5631,7 +5631,7 @@ var ChatDriver = class _ChatDriver extends EventTarget {
5631
5631
  * Make `config` the active agent, firing its lifecycle hooks — `onDeactivate` on the outgoing
5632
5632
  * agent, then `onActivate` on this one — before installing it.
5633
5633
  *
5634
- * This is the entry point a host should use. {@link ChatDriver.applyAgent} installs a config
5634
+ * This is the entry point a host should use. {@link ChatDriver.installAgent} installs a config
5635
5635
  * *without* firing hooks, which is right for the two callers that need it (the orchestrator,
5636
5636
  * which fires them through the shared session, and `invokeSubAgent`, where a child's config is
5637
5637
  * not an activation) and wrong for everyone else.
@@ -5640,7 +5640,7 @@ var ChatDriver = class _ChatDriver extends EventTarget {
5640
5640
  */
5641
5641
  async activateAgent(config) {
5642
5642
  await this.agentSession.activate(config);
5643
- this.applyAgent(config);
5643
+ this.installAgent(config);
5644
5644
  }
5645
5645
  /**
5646
5646
  * {@inheritDoc AiDriver.getActiveAgent}
@@ -5685,11 +5685,10 @@ var ChatDriver = class _ChatDriver extends EventTarget {
5685
5685
  * {@link ChatDriver.agentSession} and then installs a decorated config, and `invokeSubAgent`,
5686
5686
  * where the child driver's config is a tool surface rather than an activation.
5687
5687
  *
5688
- * Renamed to `installAgent` in a follow-up (GENC-1580) — see `docs/migration-GENC-1580.md`.
5689
- * Until then the name says less than it should, so do not add a third caller to this path
5690
- * without checking which of the two above it resembles.
5688
+ * Do not add a third caller to this path without checking which of the two above it resembles —
5689
+ * whether the hooks should fire is the whole difference between this and `activateAgent`.
5691
5690
  */
5692
- applyAgent(config) {
5691
+ installAgent(config) {
5693
5692
  if (config.name !== this.activeAgentName) this.currentActivation += 1;
5694
5693
  this.systemPrompt = config.systemPrompt;
5695
5694
  if (typeof config.toolDefinitions === "function") {
@@ -6381,7 +6380,7 @@ var ChatDriver = class _ChatDriver extends EventTarget {
6381
6380
  } else {
6382
6381
  this.lifecycleController.signal.addEventListener("abort", disposeChild, { once: true });
6383
6382
  }
6384
- child.applyAgent({ ...subConfig, primerHistory: effectivePrimer });
6383
+ child.installAgent({ ...subConfig, primerHistory: effectivePrimer });
6385
6384
  child.setHostInteractionRequester(
6386
6385
  (componentName, data, opts) => this.requestInteraction(componentName, data, opts)
6387
6386
  );
@@ -7436,7 +7435,7 @@ var OrchestratingDriver = class extends EventTarget {
7436
7435
  * **The inner driver's session, not one of our own.** One session is the invariant: two would
7437
7436
  * let the outer and inner driver disagree about which agent is active, and the inner one would
7438
7437
  * never be activated at all, because this driver installs a *decorated* config through
7439
- * `applyAgent` rather than going via `ChatDriver.activateAgent`. This driver keeps the routing
7438
+ * `installAgent` rather than going via `ChatDriver.activateAgent`. This driver keeps the routing
7440
7439
  * decisions; the session owns the lifecycle.
7441
7440
  */
7442
7441
  get agentSession() {
@@ -7594,7 +7593,7 @@ var OrchestratingDriver = class extends EventTarget {
7594
7593
  let lastResult;
7595
7594
  while (true) {
7596
7595
  if (this.cancelled) break;
7597
- await this.applyAgent(currentAgent);
7596
+ await this.installAgent(currentAgent);
7598
7597
  let result;
7599
7598
  if (isHandoff) {
7600
7599
  const contextPrimer = handoffSummary ? [{ role: "user", content: `[Context from previous agent]: ${handoffSummary}` }] : [];
@@ -7676,7 +7675,7 @@ var OrchestratingDriver = class extends EventTarget {
7676
7675
  getActiveAgent() {
7677
7676
  return this.agentSession.getActive();
7678
7677
  }
7679
- async applyAgent(agent) {
7678
+ async installAgent(agent) {
7680
7679
  const { previousAgent, flowOwnerChangedTo } = await this.agentSession.activate(agent);
7681
7680
  if (flowOwnerChangedTo !== void 0) {
7682
7681
  this.dispatchEvent(new CustomEvent("flow-owner-changed", { detail: flowOwnerChangedTo }));
@@ -7701,7 +7700,7 @@ var OrchestratingDriver = class extends EventTarget {
7701
7700
  ]);
7702
7701
  }
7703
7702
  this.chatDriver.setProviderHistoryTransform((h) => transformHistoryForAgent(h, agent.name));
7704
- this.chatDriver.applyAgent(agentToApply);
7703
+ this.chatDriver.installAgent(agentToApply);
7705
7704
  this.dispatchEvent(new CustomEvent("orchestrating-stop"));
7706
7705
  this.dispatchEvent(new CustomEvent("agent-changed", { detail: agent }));
7707
7706
  }