@genesislcap/ai-assistant 15.98.3 → 15.99.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 +112 -7
- package/dist/ai-assistant.d.ts +42 -10
- package/dist/chat-driver.cjs +389 -68
- package/dist/chat-driver.cjs.map +3 -3
- package/dist/chat-driver.mjs +387 -68
- package/dist/chat-driver.mjs.map +3 -3
- package/dist/custom-elements.json +129 -1
- package/dist/dts/chat-driver-node.d.ts +1 -1
- package/dist/dts/chat-driver-node.d.ts.map +1 -1
- package/dist/dts/components/ai-driver/ai-driver.d.ts +15 -5
- package/dist/dts/components/ai-driver/ai-driver.d.ts.map +1 -1
- package/dist/dts/components/ai-driver/base-driver-decorator.d.ts +1 -0
- package/dist/dts/components/ai-driver/base-driver-decorator.d.ts.map +1 -1
- package/dist/dts/components/chat-driver/chat-driver.constants.d.ts +25 -0
- package/dist/dts/components/chat-driver/chat-driver.constants.d.ts.map +1 -1
- package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
- package/dist/dts/components/orchestrating-driver/hand-off.d.ts.map +1 -1
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +2 -0
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
- package/dist/dts/config/config.d.ts +24 -5
- package/dist/dts/config/config.d.ts.map +1 -1
- package/dist/dts/state/persistence/session-persister.d.ts +22 -0
- package/dist/dts/state/persistence/session-persister.d.ts.map +1 -1
- package/dist/esm/chat-driver-node.js +1 -1
- package/dist/esm/components/ai-driver/base-driver-decorator.js +4 -0
- package/dist/esm/components/chat-driver/chat-driver.constants.js +31 -0
- package/dist/esm/components/chat-driver/chat-driver.js +81 -5
- package/dist/esm/components/orchestrating-driver/hand-off.js +2 -0
- package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +20 -2
- package/dist/esm/state/debug-event-log.js +2 -2
- package/dist/esm/state/persistence/session-persister.js +106 -11
- package/package.json +17 -17
|
@@ -5154,6 +5154,39 @@
|
|
|
5154
5154
|
"parameters": [],
|
|
5155
5155
|
"name": "getTurnSnapshots"
|
|
5156
5156
|
},
|
|
5157
|
+
{
|
|
5158
|
+
"kind": "MethodSignature",
|
|
5159
|
+
"canonicalReference": "@genesislcap/ai-assistant!AiDriver#getWaitingCallers:member(1)",
|
|
5160
|
+
"docComment": "/**\n * The agent behind each hand-off frame's caller, oldest first, so a save can ask each whether it `resumable` (GENC-1640): the live instance when it waits live, else the configured one.\n *\n * @beta\n */\n",
|
|
5161
|
+
"excerptTokens": [
|
|
5162
|
+
{
|
|
5163
|
+
"kind": "Content",
|
|
5164
|
+
"text": "getWaitingCallers?(): "
|
|
5165
|
+
},
|
|
5166
|
+
{
|
|
5167
|
+
"kind": "Reference",
|
|
5168
|
+
"text": "AgentConfig",
|
|
5169
|
+
"canonicalReference": "@genesislcap/ai-assistant!AgentConfig:type"
|
|
5170
|
+
},
|
|
5171
|
+
{
|
|
5172
|
+
"kind": "Content",
|
|
5173
|
+
"text": "[]"
|
|
5174
|
+
},
|
|
5175
|
+
{
|
|
5176
|
+
"kind": "Content",
|
|
5177
|
+
"text": ";"
|
|
5178
|
+
}
|
|
5179
|
+
],
|
|
5180
|
+
"isOptional": true,
|
|
5181
|
+
"returnTypeTokenRange": {
|
|
5182
|
+
"startIndex": 1,
|
|
5183
|
+
"endIndex": 3
|
|
5184
|
+
},
|
|
5185
|
+
"releaseTag": "Beta",
|
|
5186
|
+
"overloadIndex": 1,
|
|
5187
|
+
"parameters": [],
|
|
5188
|
+
"name": "getWaitingCallers"
|
|
5189
|
+
},
|
|
5157
5190
|
{
|
|
5158
5191
|
"kind": "MethodSignature",
|
|
5159
5192
|
"canonicalReference": "@genesislcap/ai-assistant!AiDriver#invokeAsUser:member(1)",
|
|
@@ -5710,7 +5743,7 @@
|
|
|
5710
5743
|
{
|
|
5711
5744
|
"kind": "MethodSignature",
|
|
5712
5745
|
"canonicalReference": "@genesislcap/ai-assistant!AiDriver#restoreHandOffData:member(1)",
|
|
5713
|
-
"docComment": "/**\n * Restore what {@link AiDriver.getHandOffData} saved, before the hand-off stack.
|
|
5746
|
+
"docComment": "/**\n * Restore what {@link AiDriver.getHandOffData} saved, before the hand-off stack. With `interrupted` true nothing comes back. A frozen session saves only its waiting callers' data, which resume, so a host restoring one passes `false`.\n *\n * @beta\n */\n",
|
|
5714
5747
|
"excerptTokens": [
|
|
5715
5748
|
{
|
|
5716
5749
|
"kind": "Content",
|
|
@@ -5771,7 +5804,7 @@
|
|
|
5771
5804
|
{
|
|
5772
5805
|
"kind": "MethodSignature",
|
|
5773
5806
|
"canonicalReference": "@genesislcap/ai-assistant!AiDriver#restoreHandOffStack:member(1)",
|
|
5774
|
-
"docComment": "/**\n * Restore saved hand-offs, before the condense policies, against the agents configured now and the saved agent states. A frame whose caller has gone, or whose stateful caller has no saved state
|
|
5807
|
+
"docComment": "/**\n * Restore saved hand-offs, before the condense policies, against the agents configured now and the saved agent states. A frame whose caller has gone, or whose stateful caller has no saved state, is unwound with `handoff-unwound`. `interrupted` says the save was frozen: the running target's state was dropped, but the waiting callers' were kept, so when the top frame's target had not finished its outcome is `target-interrupted`. When the top frame's target had finished, or has gone, or was interrupted, its caller is due to resume: `resume` names it and the note its resumed turn needs, and {@link AiDriver.resumeRestoredFlow} hands back. `droppedLocks` names plain targets of unwound hand-offs, whose saved lock was only that hand-off's.\n *\n * @beta\n */\n",
|
|
5775
5808
|
"excerptTokens": [
|
|
5776
5809
|
{
|
|
5777
5810
|
"kind": "Content",
|
|
@@ -12576,6 +12609,42 @@
|
|
|
12576
12609
|
"isAbstract": false,
|
|
12577
12610
|
"name": "getTurnSnapshots"
|
|
12578
12611
|
},
|
|
12612
|
+
{
|
|
12613
|
+
"kind": "Method",
|
|
12614
|
+
"canonicalReference": "@genesislcap/ai-assistant!BaseDriverDecorator#getWaitingCallers:member(1)",
|
|
12615
|
+
"docComment": "",
|
|
12616
|
+
"excerptTokens": [
|
|
12617
|
+
{
|
|
12618
|
+
"kind": "Content",
|
|
12619
|
+
"text": "getWaitingCallers(): "
|
|
12620
|
+
},
|
|
12621
|
+
{
|
|
12622
|
+
"kind": "Reference",
|
|
12623
|
+
"text": "AgentConfig",
|
|
12624
|
+
"canonicalReference": "@genesislcap/ai-assistant!AgentConfig:type"
|
|
12625
|
+
},
|
|
12626
|
+
{
|
|
12627
|
+
"kind": "Content",
|
|
12628
|
+
"text": "[]"
|
|
12629
|
+
},
|
|
12630
|
+
{
|
|
12631
|
+
"kind": "Content",
|
|
12632
|
+
"text": ";"
|
|
12633
|
+
}
|
|
12634
|
+
],
|
|
12635
|
+
"isStatic": false,
|
|
12636
|
+
"returnTypeTokenRange": {
|
|
12637
|
+
"startIndex": 1,
|
|
12638
|
+
"endIndex": 3
|
|
12639
|
+
},
|
|
12640
|
+
"releaseTag": "Beta",
|
|
12641
|
+
"isProtected": false,
|
|
12642
|
+
"overloadIndex": 1,
|
|
12643
|
+
"parameters": [],
|
|
12644
|
+
"isOptional": false,
|
|
12645
|
+
"isAbstract": false,
|
|
12646
|
+
"name": "getWaitingCallers"
|
|
12647
|
+
},
|
|
12579
12648
|
{
|
|
12580
12649
|
"kind": "Property",
|
|
12581
12650
|
"canonicalReference": "@genesislcap/ai-assistant!BaseDriverDecorator#inner:member",
|
|
@@ -20663,7 +20732,7 @@
|
|
|
20663
20732
|
{
|
|
20664
20733
|
"kind": "TypeAlias",
|
|
20665
20734
|
"canonicalReference": "@genesislcap/ai-assistant!FinishGuardInput:type",
|
|
20666
|
-
"docComment": "/**\n * Optional per-agent hook consulted when a model reply in the tool loop carries no tool call, so the turn would end. Lets the agent hold the turn open with a note (\"your change is not applied yet …\"), or end it and release the agent. See {@link FinishGuardVerdict}.\n *\n * Return `undefined` (or throw) to end the turn as if there were no hook. Not consulted on a closing call, nor after a tool handler released the agent earlier in the turn. A continuation spends a tool-loop iteration, so `maxToolIterations` also bounds a guard that never says `'end'`: on the last iteration (`ctx.canContinue === false`) a `'continue'` ends the turn, though a release is still honoured. Use `ctx.continuations` for a tighter per-turn cap. A turn stopped while the hook is pending ends as stopped, whatever it answers.\n *\n * On a sub-agent, which succeeds only by calling `completeSubAgent`, prose is never an answer: `'end'` gives up (the sub-agent fails, as it does today), `release` is ignored, and when the hook answers nothing (or there is no hook) the driver holds the turn itself with a completion nudge, asking for the completion call (`driverNote: 'completion-nudge'`), up to twice per turn.\n *\n * @beta\n */\n",
|
|
20735
|
+
"docComment": "/**\n * Optional per-agent hook consulted when a model reply in the tool loop carries no tool call, so the turn would end. Lets the agent hold the turn open with a note (\"your change is not applied yet …\"), or end it and release the agent. See {@link FinishGuardVerdict}.\n *\n * Return `undefined` (or throw) to end the turn as if there were no hook. Not consulted on a closing call, nor after a tool handler released the agent earlier in the turn. A continuation spends a tool-loop iteration, so `maxToolIterations` also bounds a guard that never says `'end'`: on the last iteration (`ctx.canContinue === false`) a `'continue'` ends the turn, though a release is still honoured. Use `ctx.continuations` for a tighter per-turn cap. A turn stopped while the hook is pending ends as stopped, whatever it answers.\n *\n * On a sub-agent, which succeeds only by calling `completeSubAgent`, prose is never an answer: `'end'` gives up (the sub-agent fails, as it does today), `release` is ignored, and when the hook answers nothing (or there is no hook) the driver holds the turn itself with a completion nudge, asking for the completion call (`driverNote: 'completion-nudge'`), up to twice per turn.\n *\n * On a parent agent whose turn forced a tool call (`toolChoice: 'required'` or `{ tool }`) but was sent as `auto` because the model rejects forcing (`responseMeta.toolChoiceDowngraded`), the same applies: when the hook answers nothing (or there is no hook) the driver asks for the call (`driverNote: 'forced-tool-nudge'`, naming the tool when the turn was `{ tool }`), up to twice in a row (a forced call that comes back with its call starts the count again). An explicit `'end'` lets the prose stand. A downgraded `{ tool }` turn that calls only other tools is not a prose reply, so this hook is not consulted: the driver answers each of those calls with a refusal naming the pinned tool instead of running it, against the same cap (the completion nudge's cap on a sub-agent).\n *\n * @beta\n */\n",
|
|
20667
20736
|
"excerptTokens": [
|
|
20668
20737
|
{
|
|
20669
20738
|
"kind": "Content",
|
|
@@ -30533,7 +30602,7 @@
|
|
|
30533
30602
|
{
|
|
30534
30603
|
"kind": "TypeAlias",
|
|
30535
30604
|
"canonicalReference": "@genesislcap/ai-assistant!HandOffOutcomeKind:type",
|
|
30536
|
-
"docComment": "/**\n * How a hand-off ended (GENC-1737): - `completed`: the target called `completeHandOff`; - `released`: the target called `releaseAgent`, or, a plain one, ended its turn; - `cleared`: the user cleared the chat; - `agent-removed`: the caller or the target is no longer in the agent list, found on restore; - `state-lost`: the caller's saved state is gone, so it cannot resume: a
|
|
30605
|
+
"docComment": "/**\n * How a hand-off ended (GENC-1737): - `completed`: the target called `completeHandOff`; - `released`: the target called `releaseAgent`, or, a plain one, ended its turn; - `cleared`: the user cleared the chat; - `agent-removed`: the caller or the target is no longer in the agent list, found on restore; - `target-interrupted`: a reload cut the target's work short and it cannot resume (its `resumable` was `false`), so its unsaved work is lost; the caller's own state was saved, so the caller resumes and is told, and decides what to do next, such as handing off again; - `state-lost`: the caller's saved state is gone, so it cannot resume: a stateful caller whose state was not saved, or a change to the agents, which disposes them.\n *\n * @beta\n */\n",
|
|
30537
30606
|
"excerptTokens": [
|
|
30538
30607
|
{
|
|
30539
30608
|
"kind": "Content",
|
|
@@ -30541,7 +30610,7 @@
|
|
|
30541
30610
|
},
|
|
30542
30611
|
{
|
|
30543
30612
|
"kind": "Content",
|
|
30544
|
-
"text": "'completed' | 'released' | 'cleared' | 'agent-removed' | 'state-lost'"
|
|
30613
|
+
"text": "'completed' | 'released' | 'cleared' | 'agent-removed' | 'target-interrupted' | 'state-lost'"
|
|
30545
30614
|
},
|
|
30546
30615
|
{
|
|
30547
30616
|
"kind": "Content",
|
|
@@ -37342,10 +37411,46 @@
|
|
|
37342
37411
|
"isAbstract": false,
|
|
37343
37412
|
"name": "getSuggestions"
|
|
37344
37413
|
},
|
|
37414
|
+
{
|
|
37415
|
+
"kind": "Method",
|
|
37416
|
+
"canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#getWaitingCallers:member(1)",
|
|
37417
|
+
"docComment": "/**\n * The agent behind each hand-off frame's caller, oldest first, so a save can ask each whether it `resumable` (GENC-1640): the live instance when it waits live, else the configured one.\n */\n",
|
|
37418
|
+
"excerptTokens": [
|
|
37419
|
+
{
|
|
37420
|
+
"kind": "Content",
|
|
37421
|
+
"text": "getWaitingCallers(): "
|
|
37422
|
+
},
|
|
37423
|
+
{
|
|
37424
|
+
"kind": "Reference",
|
|
37425
|
+
"text": "AgentConfig",
|
|
37426
|
+
"canonicalReference": "@genesislcap/ai-assistant!AgentConfig:type"
|
|
37427
|
+
},
|
|
37428
|
+
{
|
|
37429
|
+
"kind": "Content",
|
|
37430
|
+
"text": "[]"
|
|
37431
|
+
},
|
|
37432
|
+
{
|
|
37433
|
+
"kind": "Content",
|
|
37434
|
+
"text": ";"
|
|
37435
|
+
}
|
|
37436
|
+
],
|
|
37437
|
+
"isStatic": false,
|
|
37438
|
+
"returnTypeTokenRange": {
|
|
37439
|
+
"startIndex": 1,
|
|
37440
|
+
"endIndex": 3
|
|
37441
|
+
},
|
|
37442
|
+
"releaseTag": "Beta",
|
|
37443
|
+
"isProtected": false,
|
|
37444
|
+
"overloadIndex": 1,
|
|
37445
|
+
"parameters": [],
|
|
37446
|
+
"isOptional": false,
|
|
37447
|
+
"isAbstract": false,
|
|
37448
|
+
"name": "getWaitingCallers"
|
|
37449
|
+
},
|
|
37345
37450
|
{
|
|
37346
37451
|
"kind": "Method",
|
|
37347
37452
|
"canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#restoreHandOffData:member(1)",
|
|
37348
|
-
"docComment": "/**\n * Restore what {@link AiDriver.getHandOffData} saved, before the hand-off stack.
|
|
37453
|
+
"docComment": "/**\n * Restore what {@link AiDriver.getHandOffData} saved, before the hand-off stack. With `interrupted` true nothing comes back. A frozen session saves only its waiting callers' data, which resume, so a host restoring one passes `false`.\n */\n",
|
|
37349
37454
|
"excerptTokens": [
|
|
37350
37455
|
{
|
|
37351
37456
|
"kind": "Content",
|
|
@@ -37409,7 +37514,7 @@
|
|
|
37409
37514
|
{
|
|
37410
37515
|
"kind": "Method",
|
|
37411
37516
|
"canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#restoreHandOffStack:member(1)",
|
|
37412
|
-
"docComment": "/**\n * Restore saved hand-offs, before the condense policies, against the agents configured now and the saved agent states. A frame whose caller has gone, or whose stateful caller has no saved state
|
|
37517
|
+
"docComment": "/**\n * Restore saved hand-offs, before the condense policies, against the agents configured now and the saved agent states. A frame whose caller has gone, or whose stateful caller has no saved state, is unwound with `handoff-unwound`. `interrupted` says the save was frozen: the running target's state was dropped, but the waiting callers' were kept, so when the top frame's target had not finished its outcome is `target-interrupted`. When the top frame's target had finished, or has gone, or was interrupted, its caller is due to resume: `resume` names it and the note its resumed turn needs, and {@link AiDriver.resumeRestoredFlow} hands back. `droppedLocks` names plain targets of unwound hand-offs, whose saved lock was only that hand-off's.\n */\n",
|
|
37413
37518
|
"excerptTokens": [
|
|
37414
37519
|
{
|
|
37415
37520
|
"kind": "Content",
|
package/dist/ai-assistant.d.ts
CHANGED
|
@@ -1102,9 +1102,11 @@ export declare interface AiDriver extends EventTarget {
|
|
|
1102
1102
|
/**
|
|
1103
1103
|
* Restore saved hand-offs, before the condense policies, against the agents configured now and
|
|
1104
1104
|
* the saved agent states. A frame whose caller has gone, or whose stateful caller has no saved
|
|
1105
|
-
* state
|
|
1106
|
-
* target
|
|
1107
|
-
* its
|
|
1105
|
+
* state, is unwound with `handoff-unwound`. `interrupted` says the save was frozen: the running
|
|
1106
|
+
* target's state was dropped, but the waiting callers' were kept, so when the top frame's target
|
|
1107
|
+
* had not finished its outcome is `target-interrupted`. When the top frame's target had
|
|
1108
|
+
* finished, or has gone, or was interrupted, its caller is due to resume: `resume` names it and
|
|
1109
|
+
* the note its resumed turn needs, and {@link AiDriver.resumeRestoredFlow} hands back. `droppedLocks`
|
|
1108
1110
|
* names plain targets of unwound hand-offs, whose saved lock was only that hand-off's.
|
|
1109
1111
|
*
|
|
1110
1112
|
* @beta
|
|
@@ -1130,6 +1132,13 @@ export declare interface AiDriver extends EventTarget {
|
|
|
1130
1132
|
* @beta
|
|
1131
1133
|
*/
|
|
1132
1134
|
serializeWaitingCallers?(): Record<string, unknown>;
|
|
1135
|
+
/**
|
|
1136
|
+
* The agent behind each hand-off frame's caller, oldest first, so a save can ask each whether it
|
|
1137
|
+
* `resumable` (GENC-1640): the live instance when it waits live, else the configured one.
|
|
1138
|
+
*
|
|
1139
|
+
* @beta
|
|
1140
|
+
*/
|
|
1141
|
+
getWaitingCallers?(): AgentConfig[];
|
|
1133
1142
|
/**
|
|
1134
1143
|
* The `data` each hand-off target was activated with, by name, for the agents a reload resumes:
|
|
1135
1144
|
* the flow owner and the callers waiting in a hand-off. See the tool context's `handOffData`.
|
|
@@ -1138,8 +1147,9 @@ export declare interface AiDriver extends EventTarget {
|
|
|
1138
1147
|
*/
|
|
1139
1148
|
getHandOffData?(): Record<string, unknown>;
|
|
1140
1149
|
/**
|
|
1141
|
-
* Restore what {@link AiDriver.getHandOffData} saved, before the hand-off stack.
|
|
1142
|
-
* back
|
|
1150
|
+
* Restore what {@link AiDriver.getHandOffData} saved, before the hand-off stack. With
|
|
1151
|
+
* `interrupted` true nothing comes back. A frozen session saves only its waiting callers' data,
|
|
1152
|
+
* which resume, so a host restoring one passes `false`.
|
|
1143
1153
|
*
|
|
1144
1154
|
* @beta
|
|
1145
1155
|
*/
|
|
@@ -2573,8 +2583,8 @@ declare interface BaseAgentConfig {
|
|
|
2573
2583
|
onHandOffStart?: (frame: HandOffFrame) => void | Promise<void>;
|
|
2574
2584
|
/**
|
|
2575
2585
|
* Fires on the caller when a hand-off it made ends, before its next model call, so its own state
|
|
2576
|
-
* can move on. `outcome.kind` says how it ended.
|
|
2577
|
-
* resume. GENC-1737.
|
|
2586
|
+
* can move on. `outcome.kind` says how it ended. Fired for `target-interrupted`, whose caller
|
|
2587
|
+
* resumes. Not fired for `state-lost`, whose caller cannot resume. GENC-1737.
|
|
2578
2588
|
*
|
|
2579
2589
|
* @beta
|
|
2580
2590
|
*/
|
|
@@ -2620,6 +2630,13 @@ declare interface BaseAgentConfig {
|
|
|
2620
2630
|
* default) and pre-fills the composer with the user's last message so they can
|
|
2621
2631
|
* re-run it.
|
|
2622
2632
|
*
|
|
2633
|
+
* It is also consulted for an agent waiting in a hand-off (with `isFlowOwner: false` and its own
|
|
2634
|
+
* saved state) when the active agent cannot resume, and decides whether that agent is resumed.
|
|
2635
|
+
* The session goes back to the topmost waiting caller that says `true`, which resumes with the
|
|
2636
|
+
* `target-interrupted` outcome; agents above it lose their state, and a caller below it that
|
|
2637
|
+
* says `false` is unwound as `state-lost`. When a caller resumes, the composer is not pre-filled
|
|
2638
|
+
* and the user's last message is not re-added, since the caller carries on from its own state.
|
|
2639
|
+
*
|
|
2623
2640
|
* Only consulted when the user has persistence enabled. Must be a **pure
|
|
2624
2641
|
* function of `ctx.state`** — it may be re-evaluated on a restored snapshot, so
|
|
2625
2642
|
* a resumable state must stay resumable. A thrown error is treated as `true`
|
|
@@ -2758,6 +2775,7 @@ export declare abstract class BaseDriverDecorator<TInner extends AiDriver = AiDr
|
|
|
2758
2775
|
};
|
|
2759
2776
|
unwindHandOffs(kind: Extract<HandOffOutcomeKind, 'cleared' | 'state-lost'>): Promise<void>;
|
|
2760
2777
|
serializeWaitingCallers(): Record<string, unknown>;
|
|
2778
|
+
getWaitingCallers(): AgentConfig[];
|
|
2761
2779
|
getHandOffData(): Record<string, unknown>;
|
|
2762
2780
|
restoreHandOffData(saved: unknown, interrupted: boolean): void;
|
|
2763
2781
|
getActiveAgent(): AgentConfig | undefined;
|
|
@@ -5124,6 +5142,15 @@ export declare interface FinishGuardContext extends SystemPromptContext {
|
|
|
5124
5142
|
* answers nothing (or there is no hook) the driver holds the turn itself with a completion nudge,
|
|
5125
5143
|
* asking for the completion call (`driverNote: 'completion-nudge'`), up to twice per turn.
|
|
5126
5144
|
*
|
|
5145
|
+
* On a parent agent whose turn forced a tool call (`toolChoice: 'required'` or `{ tool }`) but was
|
|
5146
|
+
* sent as `auto` because the model rejects forcing (`responseMeta.toolChoiceDowngraded`), the same
|
|
5147
|
+
* applies: when the hook answers nothing (or there is no hook) the driver asks for the call
|
|
5148
|
+
* (`driverNote: 'forced-tool-nudge'`, naming the tool when the turn was `{ tool }`), up to twice in a
|
|
5149
|
+
* row (a forced call that comes back with its call starts the count again). An explicit `'end'` lets the prose stand. A downgraded `{ tool }` turn that calls only other
|
|
5150
|
+
* tools is not a prose reply, so this hook is not consulted: the driver answers each of those calls
|
|
5151
|
+
* with a refusal naming the pinned tool instead of running it, against the same cap (the completion
|
|
5152
|
+
* nudge's cap on a sub-agent).
|
|
5153
|
+
*
|
|
5127
5154
|
* @beta
|
|
5128
5155
|
*/
|
|
5129
5156
|
export declare type FinishGuardInput = (ctx: FinishGuardContext) => FinishGuardVerdict | undefined | Promise<FinishGuardVerdict | undefined>;
|
|
@@ -7573,12 +7600,15 @@ export declare interface HandOffOutcome {
|
|
|
7573
7600
|
* - `released`: the target called `releaseAgent`, or, a plain one, ended its turn;
|
|
7574
7601
|
* - `cleared`: the user cleared the chat;
|
|
7575
7602
|
* - `agent-removed`: the caller or the target is no longer in the agent list, found on restore;
|
|
7576
|
-
* - `
|
|
7577
|
-
*
|
|
7603
|
+
* - `target-interrupted`: a reload cut the target's work short and it cannot resume (its
|
|
7604
|
+
* `resumable` was `false`), so its unsaved work is lost; the caller's own state was saved, so
|
|
7605
|
+
* the caller resumes and is told, and decides what to do next, such as handing off again;
|
|
7606
|
+
* - `state-lost`: the caller's saved state is gone, so it cannot resume: a stateful caller whose
|
|
7607
|
+
* state was not saved, or a change to the agents, which disposes them.
|
|
7578
7608
|
*
|
|
7579
7609
|
* @beta
|
|
7580
7610
|
*/
|
|
7581
|
-
export declare type HandOffOutcomeKind = 'completed' | 'released' | 'cleared' | 'agent-removed' | 'state-lost';
|
|
7611
|
+
export declare type HandOffOutcomeKind = 'completed' | 'released' | 'cleared' | 'agent-removed' | 'target-interrupted' | 'state-lost';
|
|
7582
7612
|
|
|
7583
7613
|
/**
|
|
7584
7614
|
* What `act` is given besides the action: the arguments a person would fill in.
|
|
@@ -9220,6 +9250,8 @@ export declare class OrchestratingDriver extends BaseDriverDecorator<ChatDriver>
|
|
|
9220
9250
|
getHandOffData(): Record<string, unknown>;
|
|
9221
9251
|
/** {@inheritDoc AiDriver.restoreHandOffData} */
|
|
9222
9252
|
restoreHandOffData(saved: unknown, interrupted: boolean): void;
|
|
9253
|
+
/** {@inheritDoc AiDriver.getWaitingCallers} */
|
|
9254
|
+
getWaitingCallers(): AgentConfig[];
|
|
9223
9255
|
/** {@inheritDoc AiDriver.serializeWaitingCallers} */
|
|
9224
9256
|
serializeWaitingCallers(): Record<string, unknown>;
|
|
9225
9257
|
/**
|