@genesislcap/ai-assistant 15.85.1 → 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.
@@ -9733,7 +9733,7 @@
9733
9733
  {
9734
9734
  "kind": "Method",
9735
9735
  "canonicalReference": "@genesislcap/ai-assistant!AutopilotDriver#getPersistedMode:member(1)",
9736
- "docComment": "/**\n * The mode to save with the session, while it is set for the current flow.\n */\n",
9736
+ "docComment": "/**\n * The mode to save with the session, while it is set for the current flow — or kept for a hand-off's caller while its target releases, saved for that target, as the stack saves it.\n */\n",
9737
9737
  "excerptTokens": [
9738
9738
  {
9739
9739
  "kind": "Content",
@@ -33076,7 +33076,7 @@
33076
33076
  {
33077
33077
  "kind": "Interface",
33078
33078
  "canonicalReference": "@genesislcap/ai-assistant!PersistedAutopilotMode:interface",
33079
- "docComment": "/**\n * The autopilot's mode as saved with the session (GENC-1660 §4.8): which flow it was set for, and whether it was running. Cleared when that flow ends, so a saved mode never outlives its flow.\n *\n * @beta\n */\n",
33079
+ "docComment": "/**\n * The autopilot's mode as saved with the session (GENC-1660 §4.8): which flow it was set for, and whether it was running. Cleared when that flow ends, so a saved mode never outlives its flow. A hand-off does not end it: the mode goes with the task to the target, and back (GENC-1751).\n *\n * @beta\n */\n",
33080
33080
  "excerptTokens": [
33081
33081
  {
33082
33082
  "kind": "Content",
@@ -1965,6 +1965,16 @@ export declare class AutopilotDriver extends BaseDriverDecorator implements Auto
1965
1965
  private turnHandBack?;
1966
1966
  /** A mode restored with the session, waiting for its flow to become the owner again. */
1967
1967
  private restored?;
1968
+ /**
1969
+ * The mode of a hand-off's target that has released, kept for its caller, which has not taken the
1970
+ * lock back yet (GENC-1751): the flow has no owner in between. See `carriedTo`.
1971
+ */
1972
+ private handingBack?;
1973
+ /**
1974
+ * The mode of the flow that just ended, should a one-way hand-off with nobody waiting turn out to
1975
+ * have ended it: that switch announces itself only after the owner has changed (GENC-1751).
1976
+ */
1977
+ private switchedFrom?;
1968
1978
  /**
1969
1979
  * Bumped on every pause and resume, and when its sessions end. A written answer is sent only if
1970
1980
  * none came between asking for it and its landing: one started before a pause is stale after it,
@@ -2005,7 +2015,10 @@ export declare class AutopilotDriver extends BaseDriverDecorator implements Auto
2005
2015
  pause(): void;
2006
2016
  resume(): void;
2007
2017
  stop(): void;
2008
- /** The mode to save with the session, while it is set for the current flow. */
2018
+ /**
2019
+ * The mode to save with the session, while it is set for the current flow — or kept for a
2020
+ * hand-off's caller while its target releases, saved for that target, as the stack saves it.
2021
+ */
2009
2022
  getPersistedMode(): PersistedAutopilotMode | undefined;
2010
2023
  /**
2011
2024
  * Bring back a saved mode. It applies once its flow is the owner again — at once if it already
@@ -2157,6 +2170,36 @@ export declare class AutopilotDriver extends BaseDriverDecorator implements Auto
2157
2170
  /** A claimed interaction settled, whoever settled it. */
2158
2171
  private onSettled;
2159
2172
  private onFlowOwnerChanged;
2173
+ /**
2174
+ * A one-way hand-off with nobody waiting is a plain switch, the caller deactivated, so nothing on
2175
+ * the stack says the owner it changed to took over the same task: its event, raised once the
2176
+ * target is active, does (GENC-1751).
2177
+ */
2178
+ private onHandOffStarted;
2179
+ /** The mode set for the current flow, or kept for the caller of a hand-back under way. */
2180
+ private current;
2181
+ /**
2182
+ * The mode that carries to `owner` because the owner changed for a hand-off or its hand-back, as
2183
+ * the hand-off stack shows it at that moment (GENC-1751):
2184
+ * - a hand-off: `owner` is the top frame's target, which has not finished. Its frame is on the
2185
+ * stack before the target is activated, and so is a waiting caller's passed on by a one-way
2186
+ * hand-off from a target;
2187
+ * - a hand-back: the top frame's target, which the mode is set for, has finished, and `owner` is
2188
+ * its caller, or no one while the target releases. Its frame leaves the stack only after the
2189
+ * caller is active again.
2190
+ *
2191
+ * Clear and an agents change empty the stack before the flow ends, so the mode ends with it, as
2192
+ * it ends with any flow. A turn routed away from the target ends the hand-offs the same way.
2193
+ */
2194
+ private carriedTo;
2195
+ /** Whether `owner` is the caller the top hand-off hands back to from `target`. */
2196
+ private handsBack;
2197
+ /**
2198
+ * Set `carried`'s mode for `owner`, which took the task over in a hand-off or its hand-back. A
2199
+ * pause the person chose carries with it; the autopilot's own hand-back of an interaction does
2200
+ * not, since that interaction settled before the hand-off could start.
2201
+ */
2202
+ private carry;
2160
2203
  private capabilityFor;
2161
2204
  private flowOwner;
2162
2205
  private bindingFor;
@@ -8300,7 +8343,8 @@ export declare const PERSISTED_SESSION_VERSION = 1;
8300
8343
 
8301
8344
  /**
8302
8345
  * The autopilot's mode as saved with the session (GENC-1660 §4.8): which flow it was set for, and
8303
- * whether it was running. Cleared when that flow ends, so a saved mode never outlives its flow.
8346
+ * whether it was running. Cleared when that flow ends, so a saved mode never outlives its flow. A
8347
+ * hand-off does not end it: the mode goes with the task to the target, and back (GENC-1751).
8304
8348
  *
8305
8349
  * @beta
8306
8350
  */
@@ -4133,6 +4133,8 @@ var META_EVENT_IMPORTANCE = {
4133
4133
  "autopilot.handed-back": "normal",
4134
4134
  "autopilot.paused": "normal",
4135
4135
  "autopilot.resumed": "normal",
4136
+ // The mode went with the task across a hand-off or its hand-back, rather than ending with the flow.
4137
+ "autopilot.carried": "normal",
4136
4138
  // The wrapper itself failed: the journey stops being automatic without anyone choosing that.
4137
4139
  "autopilot.error": "high",
4138
4140
  // A written answer counted against the step's limit; reaching it withdraws `reply`.