@genesislcap/ai-assistant 15.85.0 → 15.86.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.
@@ -4051,6 +4051,8 @@ var META_EVENT_IMPORTANCE = {
4051
4051
  "autopilot.handed-back": "normal",
4052
4052
  "autopilot.paused": "normal",
4053
4053
  "autopilot.resumed": "normal",
4054
+ // The mode went with the task across a hand-off or its hand-back, rather than ending with the flow.
4055
+ "autopilot.carried": "normal",
4054
4056
  // The wrapper itself failed: the journey stops being automatic without anyone choosing that.
4055
4057
  "autopilot.error": "high",
4056
4058
  // A written answer counted against the step's limit; reaching it withdraws `reply`.
@@ -10255,7 +10257,8 @@ var OrchestratingDriver = class _OrchestratingDriver extends BaseDriverDecorator
10255
10257
  *
10256
10258
  * A failed call ends the turn there, as a Stop does: what it asked for still happens, and the
10257
10259
  * next agent runs on the next message. Running it now would meet the same wall (a budget, a
10258
- * refused account, a full context window), or build on a reply that never came.
10260
+ * refused account, a full context window), or build on a reply that never came. The one thing a
10261
+ * Stop takes back is a hand-off that has not started (see `afterAgentCall`).
10259
10262
  */
10260
10263
  async carryOn(result) {
10261
10264
  let last = result;
@@ -10273,10 +10276,18 @@ var OrchestratingDriver = class _OrchestratingDriver extends BaseDriverDecorator
10273
10276
  *
10274
10277
  * A plain target hands back when its call ends, released or not, as a plain agent is done once
10275
10278
  * it has answered. A stateful one holds the hand-off until it releases, as it holds its flow.
10279
+ *
10280
+ * A Stop cancels a hand-off that has not started: the user stopped the turn the caller asked for
10281
+ * it in, often during the caller's closing call, so the target is not activated, and the call
10282
+ * ends as if it had never asked (a plain caller's turn ends as usual below). A hand-back is not
10283
+ * taken back: the target finished the work it was given.
10276
10284
  */
10277
10285
  async afterAgentCall() {
10278
10286
  const request = this.chatDriver.getHandOffRequest();
10279
- if (request) return this.startHandOff(request);
10287
+ if (request && !this.cancelled) return this.startHandOff(request);
10288
+ if (request) {
10289
+ logger2.debug(`OrchestratingDriver: stopped before the hand-off to "${request.to}" started`);
10290
+ }
10280
10291
  const active = this.agentSession.getActive();
10281
10292
  if (!active) return void 0;
10282
10293
  const frame = this.topFrameFor(active.name);