@genesislcap/ai-assistant 15.84.2 → 15.85.0-FUI-2666.2
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 +2175 -138
- package/dist/ai-assistant.d.ts +420 -43
- package/dist/chat-driver.cjs +780 -210
- package/dist/chat-driver.cjs.map +4 -4
- package/dist/chat-driver.mjs +780 -209
- package/dist/chat-driver.mjs.map +4 -4
- package/dist/custom-elements.json +2000 -910
- package/dist/dts/components/agent-session/agent-session.d.ts +50 -2
- package/dist/dts/components/agent-session/agent-session.d.ts.map +1 -1
- package/dist/dts/components/ai-driver/ai-driver.d.ts +59 -1
- package/dist/dts/components/ai-driver/ai-driver.d.ts.map +1 -1
- package/dist/dts/components/ai-driver/base-driver-decorator.d.ts +13 -1
- 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 +0 -8
- package/dist/dts/components/chat-driver/chat-driver.constants.d.ts.map +1 -1
- package/dist/dts/components/chat-driver/chat-driver.d.ts +74 -15
- package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
- package/dist/dts/components/orchestrating-driver/hand-off.d.ts +20 -0
- package/dist/dts/components/orchestrating-driver/hand-off.d.ts.map +1 -0
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +121 -22
- package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
- package/dist/dts/config/config.d.ts +66 -0
- package/dist/dts/config/config.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +3 -0
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/main.types.d.ts +6 -0
- package/dist/dts/main/main.types.d.ts.map +1 -1
- package/dist/dts/react.d.ts +4 -1
- package/dist/dts/state/persistence/session-persister.d.ts.map +1 -1
- package/dist/dts/state/persistence/session-snapshot.d.ts +33 -1
- package/dist/dts/state/persistence/session-snapshot.d.ts.map +1 -1
- package/dist/dts/utils/condense-history.d.ts +10 -3
- package/dist/dts/utils/condense-history.d.ts.map +1 -1
- package/dist/esm/components/agent-session/agent-session.js +128 -7
- package/dist/esm/components/ai-driver/ai-driver.js +3 -0
- package/dist/esm/components/ai-driver/base-driver-decorator.js +24 -0
- package/dist/esm/components/chat-driver/chat-driver.constants.js +0 -8
- package/dist/esm/components/chat-driver/chat-driver.js +247 -74
- package/dist/esm/components/orchestrating-driver/hand-off.js +59 -0
- package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +480 -299
- package/dist/esm/main/main.js +32 -6
- package/dist/esm/main/main.types.js +6 -0
- package/dist/esm/state/debug-event-log.js +1 -1
- package/dist/esm/state/persistence/session-persister.js +55 -8
- package/dist/esm/state/persistence/session-snapshot.js +12 -6
- package/dist/esm/utils/condense-history.js +13 -4
- package/dist/react.cjs +16 -1
- package/dist/react.mjs +16 -1
- package/docs/sub_agent.md +1 -1
- package/package.json +17 -17
|
@@ -2965,6 +2965,126 @@
|
|
|
2965
2965
|
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
2966
2966
|
}
|
|
2967
2967
|
},
|
|
2968
|
+
{
|
|
2969
|
+
"kind": "method",
|
|
2970
|
+
"name": "getHandOffStack",
|
|
2971
|
+
"return": {
|
|
2972
|
+
"type": {
|
|
2973
|
+
"text": "HandOffFrame[]"
|
|
2974
|
+
}
|
|
2975
|
+
},
|
|
2976
|
+
"inheritedFrom": {
|
|
2977
|
+
"name": "BaseDriverDecorator",
|
|
2978
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
2979
|
+
}
|
|
2980
|
+
},
|
|
2981
|
+
{
|
|
2982
|
+
"kind": "method",
|
|
2983
|
+
"name": "restoreHandOffStack",
|
|
2984
|
+
"return": {
|
|
2985
|
+
"type": {
|
|
2986
|
+
"text": "{ resume?: { agent: string; note: string }; droppedLocks?: string[] }"
|
|
2987
|
+
}
|
|
2988
|
+
},
|
|
2989
|
+
"parameters": [
|
|
2990
|
+
{
|
|
2991
|
+
"name": "saved",
|
|
2992
|
+
"type": {
|
|
2993
|
+
"text": "unknown"
|
|
2994
|
+
}
|
|
2995
|
+
},
|
|
2996
|
+
{
|
|
2997
|
+
"name": "savedStates",
|
|
2998
|
+
"type": {
|
|
2999
|
+
"text": "Record<string, unknown>"
|
|
3000
|
+
}
|
|
3001
|
+
},
|
|
3002
|
+
{
|
|
3003
|
+
"name": "interrupted",
|
|
3004
|
+
"type": {
|
|
3005
|
+
"text": "boolean"
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
],
|
|
3009
|
+
"inheritedFrom": {
|
|
3010
|
+
"name": "BaseDriverDecorator",
|
|
3011
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
3012
|
+
}
|
|
3013
|
+
},
|
|
3014
|
+
{
|
|
3015
|
+
"kind": "method",
|
|
3016
|
+
"name": "unwindHandOffs",
|
|
3017
|
+
"return": {
|
|
3018
|
+
"type": {
|
|
3019
|
+
"text": "Promise<void>"
|
|
3020
|
+
}
|
|
3021
|
+
},
|
|
3022
|
+
"parameters": [
|
|
3023
|
+
{
|
|
3024
|
+
"name": "kind",
|
|
3025
|
+
"type": {
|
|
3026
|
+
"text": "Extract<HandOffOutcomeKind, 'cleared' | 'state-lost'>"
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
],
|
|
3030
|
+
"inheritedFrom": {
|
|
3031
|
+
"name": "BaseDriverDecorator",
|
|
3032
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
3033
|
+
}
|
|
3034
|
+
},
|
|
3035
|
+
{
|
|
3036
|
+
"kind": "method",
|
|
3037
|
+
"name": "serializeWaitingCallers",
|
|
3038
|
+
"return": {
|
|
3039
|
+
"type": {
|
|
3040
|
+
"text": "Record<string, unknown>"
|
|
3041
|
+
}
|
|
3042
|
+
},
|
|
3043
|
+
"inheritedFrom": {
|
|
3044
|
+
"name": "BaseDriverDecorator",
|
|
3045
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
3046
|
+
}
|
|
3047
|
+
},
|
|
3048
|
+
{
|
|
3049
|
+
"kind": "method",
|
|
3050
|
+
"name": "getHandOffData",
|
|
3051
|
+
"return": {
|
|
3052
|
+
"type": {
|
|
3053
|
+
"text": "Record<string, unknown>"
|
|
3054
|
+
}
|
|
3055
|
+
},
|
|
3056
|
+
"inheritedFrom": {
|
|
3057
|
+
"name": "BaseDriverDecorator",
|
|
3058
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
3059
|
+
}
|
|
3060
|
+
},
|
|
3061
|
+
{
|
|
3062
|
+
"kind": "method",
|
|
3063
|
+
"name": "restoreHandOffData",
|
|
3064
|
+
"return": {
|
|
3065
|
+
"type": {
|
|
3066
|
+
"text": "void"
|
|
3067
|
+
}
|
|
3068
|
+
},
|
|
3069
|
+
"parameters": [
|
|
3070
|
+
{
|
|
3071
|
+
"name": "saved",
|
|
3072
|
+
"type": {
|
|
3073
|
+
"text": "unknown"
|
|
3074
|
+
}
|
|
3075
|
+
},
|
|
3076
|
+
{
|
|
3077
|
+
"name": "interrupted",
|
|
3078
|
+
"type": {
|
|
3079
|
+
"text": "boolean"
|
|
3080
|
+
}
|
|
3081
|
+
}
|
|
3082
|
+
],
|
|
3083
|
+
"inheritedFrom": {
|
|
3084
|
+
"name": "BaseDriverDecorator",
|
|
3085
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
3086
|
+
}
|
|
3087
|
+
},
|
|
2968
3088
|
{
|
|
2969
3089
|
"kind": "method",
|
|
2970
3090
|
"name": "getActiveAgent",
|
|
@@ -4824,202 +4944,247 @@
|
|
|
4824
4944
|
},
|
|
4825
4945
|
{
|
|
4826
4946
|
"kind": "javascript-module",
|
|
4827
|
-
"path": "src/
|
|
4947
|
+
"path": "src/config/config.ts",
|
|
4828
4948
|
"declarations": [
|
|
4829
4949
|
{
|
|
4830
|
-
"kind": "
|
|
4831
|
-
"
|
|
4832
|
-
"
|
|
4833
|
-
"members": [
|
|
4834
|
-
{
|
|
4835
|
-
"kind": "field",
|
|
4836
|
-
"name": "startTime",
|
|
4837
|
-
"type": {
|
|
4838
|
-
"text": "number | undefined"
|
|
4839
|
-
},
|
|
4840
|
-
"privacy": "private"
|
|
4841
|
-
},
|
|
4842
|
-
{
|
|
4843
|
-
"kind": "field",
|
|
4844
|
-
"name": "animFrame",
|
|
4845
|
-
"type": {
|
|
4846
|
-
"text": "number | undefined"
|
|
4847
|
-
},
|
|
4848
|
-
"privacy": "private"
|
|
4849
|
-
},
|
|
4850
|
-
{
|
|
4851
|
-
"kind": "field",
|
|
4852
|
-
"name": "bandPaths",
|
|
4853
|
-
"type": {
|
|
4854
|
-
"text": "SVGPathElement[] | undefined"
|
|
4855
|
-
},
|
|
4856
|
-
"privacy": "private"
|
|
4857
|
-
},
|
|
4858
|
-
{
|
|
4859
|
-
"kind": "method",
|
|
4860
|
-
"name": "tick",
|
|
4861
|
-
"privacy": "private",
|
|
4862
|
-
"parameters": [
|
|
4863
|
-
{
|
|
4864
|
-
"name": "now",
|
|
4865
|
-
"optional": true,
|
|
4866
|
-
"type": {
|
|
4867
|
-
"text": "number"
|
|
4868
|
-
}
|
|
4869
|
-
}
|
|
4870
|
-
]
|
|
4871
|
-
},
|
|
4872
|
-
{
|
|
4873
|
-
"kind": "method",
|
|
4874
|
-
"name": "buildBand",
|
|
4875
|
-
"privacy": "private",
|
|
4876
|
-
"static": true,
|
|
4877
|
-
"return": {
|
|
4878
|
-
"type": {
|
|
4879
|
-
"text": "string"
|
|
4880
|
-
}
|
|
4881
|
-
},
|
|
4882
|
-
"parameters": [
|
|
4883
|
-
{
|
|
4884
|
-
"name": "cfg",
|
|
4885
|
-
"type": {
|
|
4886
|
-
"text": "BandConfig"
|
|
4887
|
-
}
|
|
4888
|
-
},
|
|
4889
|
-
{
|
|
4890
|
-
"name": "frame",
|
|
4891
|
-
"type": {
|
|
4892
|
-
"text": "number"
|
|
4893
|
-
}
|
|
4894
|
-
}
|
|
4895
|
-
],
|
|
4896
|
-
"description": "Trace one band for the given frame: a baseline-plus-harmonics half-thickness\nprofile, clamped at 0 (so the band pinches to nothing between bumps) and\ntapered to 0 at both ends."
|
|
4897
|
-
}
|
|
4898
|
-
],
|
|
4899
|
-
"superclass": {
|
|
4900
|
-
"name": "GenesisElement",
|
|
4901
|
-
"package": "@genesislcap/web-core"
|
|
4902
|
-
},
|
|
4903
|
-
"tagName": "ai-flowing-waves-indicator",
|
|
4904
|
-
"customElement": true
|
|
4950
|
+
"kind": "function",
|
|
4951
|
+
"name": "defineAgent",
|
|
4952
|
+
"description": "Identity helper that infers the narrowest possible type for an agent config,\npreserving string literal types (including `name`) without requiring `as const`.\n\nUse this when you need `typeof myAgent` to carry the literal `name` type —\nfor example, when wiring `ChatToolHandlers<typeof myAgent>`.\n\n```ts\nconst myAgent = defineAgent({ name: 'my_agent', ... });\ntype Handlers = ChatToolHandlers<typeof myAgent>;\n// requestSubAgent name param is now typed as 'my_agent'\n```"
|
|
4905
4953
|
}
|
|
4906
4954
|
],
|
|
4907
4955
|
"exports": [
|
|
4908
4956
|
{
|
|
4909
4957
|
"kind": "js",
|
|
4910
|
-
"name": "
|
|
4958
|
+
"name": "CachePolicy",
|
|
4911
4959
|
"declaration": {
|
|
4912
|
-
"name": "
|
|
4913
|
-
"module": "src/
|
|
4960
|
+
"name": "CachePolicy",
|
|
4961
|
+
"module": "src/config/config.ts"
|
|
4914
4962
|
}
|
|
4915
4963
|
},
|
|
4916
4964
|
{
|
|
4917
|
-
"kind": "
|
|
4918
|
-
"name": "
|
|
4965
|
+
"kind": "js",
|
|
4966
|
+
"name": "ChatFallback",
|
|
4919
4967
|
"declaration": {
|
|
4920
|
-
"name": "
|
|
4921
|
-
"module": "src/
|
|
4968
|
+
"name": "ChatFallback",
|
|
4969
|
+
"module": "src/config/config.ts"
|
|
4970
|
+
}
|
|
4971
|
+
},
|
|
4972
|
+
{
|
|
4973
|
+
"kind": "js",
|
|
4974
|
+
"name": "ChatInputDuringExecutionMode",
|
|
4975
|
+
"declaration": {
|
|
4976
|
+
"name": "ChatInputDuringExecutionMode",
|
|
4977
|
+
"module": "src/config/config.ts"
|
|
4978
|
+
}
|
|
4979
|
+
},
|
|
4980
|
+
{
|
|
4981
|
+
"kind": "js",
|
|
4982
|
+
"name": "ChatThinkingPolicy",
|
|
4983
|
+
"declaration": {
|
|
4984
|
+
"name": "ChatThinkingPolicy",
|
|
4985
|
+
"module": "src/config/config.ts"
|
|
4986
|
+
}
|
|
4987
|
+
},
|
|
4988
|
+
{
|
|
4989
|
+
"kind": "js",
|
|
4990
|
+
"name": "ChatToolChoice",
|
|
4991
|
+
"declaration": {
|
|
4992
|
+
"name": "ChatToolChoice",
|
|
4993
|
+
"module": "src/config/config.ts"
|
|
4994
|
+
}
|
|
4995
|
+
},
|
|
4996
|
+
{
|
|
4997
|
+
"kind": "js",
|
|
4998
|
+
"name": "defineAgent",
|
|
4999
|
+
"declaration": {
|
|
5000
|
+
"name": "defineAgent",
|
|
5001
|
+
"module": "src/config/config.ts"
|
|
4922
5002
|
}
|
|
4923
5003
|
}
|
|
4924
5004
|
]
|
|
4925
5005
|
},
|
|
4926
5006
|
{
|
|
4927
5007
|
"kind": "javascript-module",
|
|
4928
|
-
"path": "src/
|
|
5008
|
+
"path": "src/config/define-stateful-agent.ts",
|
|
4929
5009
|
"declarations": [
|
|
4930
5010
|
{
|
|
4931
|
-
"kind": "
|
|
4932
|
-
"
|
|
4933
|
-
"
|
|
4934
|
-
|
|
5011
|
+
"kind": "function",
|
|
5012
|
+
"name": "restoreMachine",
|
|
5013
|
+
"return": {
|
|
5014
|
+
"type": {
|
|
5015
|
+
"text": "void"
|
|
5016
|
+
}
|
|
5017
|
+
},
|
|
5018
|
+
"parameters": [
|
|
4935
5019
|
{
|
|
4936
|
-
"
|
|
4937
|
-
"name": "active",
|
|
5020
|
+
"name": "machine",
|
|
4938
5021
|
"type": {
|
|
4939
|
-
"text": "
|
|
5022
|
+
"text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
|
|
4940
5023
|
},
|
|
4941
|
-
"
|
|
5024
|
+
"description": "the machine to restore (already constructed/started)."
|
|
4942
5025
|
},
|
|
4943
5026
|
{
|
|
4944
|
-
"
|
|
4945
|
-
"name": "speed",
|
|
5027
|
+
"name": "restored",
|
|
4946
5028
|
"type": {
|
|
4947
|
-
"text": "
|
|
4948
|
-
},
|
|
4949
|
-
"default": "1.5",
|
|
4950
|
-
"description": "Rotation speed in degrees per frame. Default: 1.5 (≈ 4 s per full revolution at 60 fps)."
|
|
4951
|
-
},
|
|
4952
|
-
{
|
|
4953
|
-
"kind": "field",
|
|
4954
|
-
"name": "direction",
|
|
4955
|
-
"type": {
|
|
4956
|
-
"text": "'cw' | 'ccw'"
|
|
4957
|
-
},
|
|
4958
|
-
"default": "'cw'",
|
|
4959
|
-
"description": "Rotation direction. Default: 'cw' (clockwise)."
|
|
4960
|
-
},
|
|
4961
|
-
{
|
|
4962
|
-
"kind": "field",
|
|
4963
|
-
"name": "borderSize",
|
|
4964
|
-
"type": {
|
|
4965
|
-
"text": "number"
|
|
4966
|
-
},
|
|
4967
|
-
"default": "3",
|
|
4968
|
-
"description": "Border thickness in px. Default: 3."
|
|
4969
|
-
},
|
|
4970
|
-
{
|
|
4971
|
-
"kind": "field",
|
|
4972
|
-
"name": "glowOpacity",
|
|
4973
|
-
"type": {
|
|
4974
|
-
"text": "number"
|
|
4975
|
-
},
|
|
4976
|
-
"default": "0.35",
|
|
4977
|
-
"description": "Glow layer opacity (0–1). Default: 0.35."
|
|
4978
|
-
},
|
|
4979
|
-
{
|
|
4980
|
-
"kind": "field",
|
|
4981
|
-
"name": "glowSpread",
|
|
4982
|
-
"type": {
|
|
4983
|
-
"text": "number"
|
|
5029
|
+
"text": "unknown"
|
|
4984
5030
|
},
|
|
4985
|
-
"
|
|
4986
|
-
"description": "Transparent stop of the radial glow mask as a percentage (0–100). Higher = less spread. Default: 70."
|
|
4987
|
-
},
|
|
4988
|
-
{
|
|
4989
|
-
"kind": "method",
|
|
4990
|
-
"name": "borderSizeChanged"
|
|
4991
|
-
},
|
|
4992
|
-
{
|
|
4993
|
-
"kind": "method",
|
|
4994
|
-
"name": "glowOpacityChanged"
|
|
5031
|
+
"description": "the agent's serialized image (`ctx.restored` in `init`)."
|
|
4995
5032
|
},
|
|
4996
5033
|
{
|
|
4997
|
-
"
|
|
4998
|
-
"
|
|
4999
|
-
|
|
5034
|
+
"name": "key",
|
|
5035
|
+
"default": "'machine'",
|
|
5036
|
+
"description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
|
|
5037
|
+
}
|
|
5038
|
+
],
|
|
5039
|
+
"description": "Restore a foundation-state-machine instance from a snapshot produced by the\ndefault serializer (or `machine.getPersistedSnapshot()`). Call inside a\nstateful agent's `init` to resume the machine in its exact prior place:\n\n```ts\ninit: ({ restored }) => {\n const machine = new MyMachine();\n restoreMachine(machine, restored); // resume, or no-op on a fresh start\n return { machine };\n}\n```\n\nNo-ops when there is nothing to restore (a fresh session), leaving the\nfreshly-constructed machine in its initial state."
|
|
5040
|
+
},
|
|
5041
|
+
{
|
|
5042
|
+
"kind": "function",
|
|
5043
|
+
"name": "defineStatefulAgent",
|
|
5044
|
+
"return": {
|
|
5045
|
+
"type": {
|
|
5046
|
+
"text": "AgentConfig"
|
|
5047
|
+
}
|
|
5048
|
+
},
|
|
5049
|
+
"parameters": [
|
|
5000
5050
|
{
|
|
5001
|
-
"
|
|
5002
|
-
"name": "FULL_ROTATION_DEG",
|
|
5051
|
+
"name": "opts",
|
|
5003
5052
|
"type": {
|
|
5004
|
-
"text": "
|
|
5005
|
-
}
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5053
|
+
"text": "StatefulAgentInit<S>"
|
|
5054
|
+
}
|
|
5055
|
+
}
|
|
5056
|
+
],
|
|
5057
|
+
"description": "Build an `AgentConfig` whose `systemPrompt`, `toolDefinitions`, and tool\nhandlers all close over a long-lived state object created on activation.\n\nThe framework wires the lifecycle: `init` on `onActivate`, `dispose` on\n`onDeactivate`. State is held inside the helper's closure — never exposed on\nthe resulting `AgentConfig` — so the redux serializer doesn't see it."
|
|
5058
|
+
},
|
|
5059
|
+
{
|
|
5060
|
+
"kind": "function",
|
|
5061
|
+
"name": "defineAutopilot",
|
|
5062
|
+
"return": {
|
|
5063
|
+
"type": {
|
|
5064
|
+
"text": "AutopilotConfig<S>"
|
|
5065
|
+
}
|
|
5066
|
+
},
|
|
5067
|
+
"parameters": [
|
|
5011
5068
|
{
|
|
5012
|
-
"
|
|
5013
|
-
"name": "angle",
|
|
5069
|
+
"name": "config",
|
|
5014
5070
|
"type": {
|
|
5015
|
-
"text": "
|
|
5016
|
-
}
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5071
|
+
"text": "AutopilotConfig<S>"
|
|
5072
|
+
}
|
|
5073
|
+
}
|
|
5074
|
+
],
|
|
5075
|
+
"description": "Define an autopilot for a stateful agent whose state is `S` (GENC-1660). An identity function\nthat exists for its type: the resolvers get `S`, and the result goes on `defineStatefulAgent`'s\n`autopilot` option."
|
|
5076
|
+
}
|
|
5077
|
+
],
|
|
5078
|
+
"exports": [
|
|
5079
|
+
{
|
|
5080
|
+
"kind": "js",
|
|
5081
|
+
"name": "restoreMachine",
|
|
5082
|
+
"declaration": {
|
|
5083
|
+
"name": "restoreMachine",
|
|
5084
|
+
"module": "src/config/define-stateful-agent.ts"
|
|
5085
|
+
}
|
|
5086
|
+
},
|
|
5087
|
+
{
|
|
5088
|
+
"kind": "js",
|
|
5089
|
+
"name": "defineStatefulAgent",
|
|
5090
|
+
"declaration": {
|
|
5091
|
+
"name": "defineStatefulAgent",
|
|
5092
|
+
"module": "src/config/define-stateful-agent.ts"
|
|
5093
|
+
}
|
|
5094
|
+
},
|
|
5095
|
+
{
|
|
5096
|
+
"kind": "js",
|
|
5097
|
+
"name": "defineAutopilot",
|
|
5098
|
+
"declaration": {
|
|
5099
|
+
"name": "defineAutopilot",
|
|
5100
|
+
"module": "src/config/define-stateful-agent.ts"
|
|
5101
|
+
}
|
|
5102
|
+
}
|
|
5103
|
+
]
|
|
5104
|
+
},
|
|
5105
|
+
{
|
|
5106
|
+
"kind": "javascript-module",
|
|
5107
|
+
"path": "src/config/fallback-agents.ts",
|
|
5108
|
+
"declarations": [
|
|
5109
|
+
{
|
|
5110
|
+
"kind": "variable",
|
|
5111
|
+
"name": "friendlyFallbackAgent",
|
|
5112
|
+
"type": {
|
|
5113
|
+
"text": "FallbackAgentConfig"
|
|
5114
|
+
},
|
|
5115
|
+
"default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a warm, friendly assistant. For general conversation like \"Hi\" or \"How are you\", you can have a friendly chat. For anything more complex, you cannot directly help, but you can explain what specialists are available. The available specialists are:\\n\\n{{agents}}\\n\\nPolitely let the user know what you can help with and invite them to rephrase their request if it is outside your scope.`,\n}",
|
|
5116
|
+
"description": "A warm, conversational fallback agent. Acknowledges it can't help directly,\nexplains what the available specialists can do, and invites the user to retry.\n\nThe system prompt is generated at runtime by `OrchestratingDriver` from the\nspecialist list — no manual authoring required."
|
|
5117
|
+
},
|
|
5118
|
+
{
|
|
5119
|
+
"kind": "variable",
|
|
5120
|
+
"name": "strictFallbackAgent",
|
|
5121
|
+
"type": {
|
|
5122
|
+
"text": "FallbackAgentConfig"
|
|
5123
|
+
},
|
|
5124
|
+
"default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a concise assistant. The user's request is outside your scope. The available specialists are: {{agents}}.\n\n{{unroutable}}\n\nAnswer in a single short sentence. Do not elaborate.`,\n}",
|
|
5125
|
+
"description": "A brief, professional fallback agent. States what is available without\nelaboration. The `{{agents}}` placeholder is replaced at runtime by\n`OrchestratingDriver` with the generated specialist list.\n\nThe `{{unroutable}}` placeholder positions `UNROUTABLE_INSTRUCTION` — the framework's\ninstruction for a substantive request no specialist covers, which is otherwise APPENDED to a\nstring-form prompt. Positioned rather than appended for one reason: this preset's whole point is\nbrevity, and appended text would be the last thing the model reads. Putting the block above the\nbrevity rule leaves \"a single short sentence\" with the recency, so the two compose instead of\ncompeting. A prompt whose tone rules matter should do the same."
|
|
5126
|
+
}
|
|
5127
|
+
],
|
|
5128
|
+
"exports": [
|
|
5129
|
+
{
|
|
5130
|
+
"kind": "js",
|
|
5131
|
+
"name": "friendlyFallbackAgent",
|
|
5132
|
+
"declaration": {
|
|
5133
|
+
"name": "friendlyFallbackAgent",
|
|
5134
|
+
"module": "src/config/fallback-agents.ts"
|
|
5135
|
+
}
|
|
5136
|
+
},
|
|
5137
|
+
{
|
|
5138
|
+
"kind": "js",
|
|
5139
|
+
"name": "strictFallbackAgent",
|
|
5140
|
+
"declaration": {
|
|
5141
|
+
"name": "strictFallbackAgent",
|
|
5142
|
+
"module": "src/config/fallback-agents.ts"
|
|
5143
|
+
}
|
|
5144
|
+
}
|
|
5145
|
+
]
|
|
5146
|
+
},
|
|
5147
|
+
{
|
|
5148
|
+
"kind": "javascript-module",
|
|
5149
|
+
"path": "src/config/index.ts",
|
|
5150
|
+
"declarations": [],
|
|
5151
|
+
"exports": [
|
|
5152
|
+
{
|
|
5153
|
+
"kind": "js",
|
|
5154
|
+
"name": "*",
|
|
5155
|
+
"declaration": {
|
|
5156
|
+
"name": "*",
|
|
5157
|
+
"package": "./config"
|
|
5158
|
+
}
|
|
5159
|
+
},
|
|
5160
|
+
{
|
|
5161
|
+
"kind": "js",
|
|
5162
|
+
"name": "*",
|
|
5163
|
+
"declaration": {
|
|
5164
|
+
"name": "*",
|
|
5165
|
+
"package": "./fallback-agents"
|
|
5166
|
+
}
|
|
5167
|
+
}
|
|
5168
|
+
]
|
|
5169
|
+
},
|
|
5170
|
+
{
|
|
5171
|
+
"kind": "javascript-module",
|
|
5172
|
+
"path": "src/config/validate-providers.ts",
|
|
5173
|
+
"declarations": [],
|
|
5174
|
+
"exports": []
|
|
5175
|
+
},
|
|
5176
|
+
{
|
|
5177
|
+
"kind": "javascript-module",
|
|
5178
|
+
"path": "src/components/flowing-waves-indicator.ts",
|
|
5179
|
+
"declarations": [
|
|
5180
|
+
{
|
|
5181
|
+
"kind": "class",
|
|
5182
|
+
"description": "Animated \"flowing waves\" loading indicator — coloured organic waves (in the\nfour brand colours) whose bumps swell, shrink, merge and split across a line,\ntapering to nothing at both ends. Where the colours overlap they blend\nadditively toward white.\n\nVisual sibling of the dots loading indicator; interchangeable with the other\nloading styles for the \"assistant is working\" state.",
|
|
5183
|
+
"name": "AiFlowingWavesIndicator",
|
|
5184
|
+
"members": [
|
|
5020
5185
|
{
|
|
5021
5186
|
"kind": "field",
|
|
5022
|
-
"name": "
|
|
5187
|
+
"name": "startTime",
|
|
5023
5188
|
"type": {
|
|
5024
5189
|
"text": "number | undefined"
|
|
5025
5190
|
},
|
|
@@ -5035,43 +5200,229 @@
|
|
|
5035
5200
|
},
|
|
5036
5201
|
{
|
|
5037
5202
|
"kind": "field",
|
|
5038
|
-
"name": "
|
|
5039
|
-
"type": {
|
|
5040
|
-
"text": "number | undefined"
|
|
5041
|
-
},
|
|
5042
|
-
"privacy": "private"
|
|
5043
|
-
},
|
|
5044
|
-
{
|
|
5045
|
-
"kind": "field",
|
|
5046
|
-
"name": "running",
|
|
5203
|
+
"name": "bandPaths",
|
|
5047
5204
|
"type": {
|
|
5048
|
-
"text": "
|
|
5205
|
+
"text": "SVGPathElement[] | undefined"
|
|
5049
5206
|
},
|
|
5050
|
-
"privacy": "private",
|
|
5051
|
-
"default": "false",
|
|
5052
|
-
"description": "Whether the loop should keep rescheduling itself — see AiHaloOverlay.tick."
|
|
5053
|
-
},
|
|
5054
|
-
{
|
|
5055
|
-
"kind": "method",
|
|
5056
|
-
"name": "activeChanged",
|
|
5057
|
-
"description": "Start/stop with `active`, so an idle overlay costs nothing.\n\nGuarded on `isConnected` because FAST invokes attribute-changed callbacks during\ninitialisation, before the element is in the document — `connectedCallback` is what decides\nfor an element that mounts already-active."
|
|
5058
|
-
},
|
|
5059
|
-
{
|
|
5060
|
-
"kind": "method",
|
|
5061
|
-
"name": "startAnimation",
|
|
5062
5207
|
"privacy": "private"
|
|
5063
5208
|
},
|
|
5064
5209
|
{
|
|
5065
5210
|
"kind": "method",
|
|
5066
|
-
"name": "
|
|
5211
|
+
"name": "tick",
|
|
5067
5212
|
"privacy": "private",
|
|
5068
|
-
"
|
|
5213
|
+
"parameters": [
|
|
5214
|
+
{
|
|
5215
|
+
"name": "now",
|
|
5216
|
+
"optional": true,
|
|
5217
|
+
"type": {
|
|
5218
|
+
"text": "number"
|
|
5219
|
+
}
|
|
5220
|
+
}
|
|
5221
|
+
]
|
|
5069
5222
|
},
|
|
5070
5223
|
{
|
|
5071
5224
|
"kind": "method",
|
|
5072
|
-
"name": "
|
|
5073
|
-
"privacy": "private"
|
|
5074
|
-
|
|
5225
|
+
"name": "buildBand",
|
|
5226
|
+
"privacy": "private",
|
|
5227
|
+
"static": true,
|
|
5228
|
+
"return": {
|
|
5229
|
+
"type": {
|
|
5230
|
+
"text": "string"
|
|
5231
|
+
}
|
|
5232
|
+
},
|
|
5233
|
+
"parameters": [
|
|
5234
|
+
{
|
|
5235
|
+
"name": "cfg",
|
|
5236
|
+
"type": {
|
|
5237
|
+
"text": "BandConfig"
|
|
5238
|
+
}
|
|
5239
|
+
},
|
|
5240
|
+
{
|
|
5241
|
+
"name": "frame",
|
|
5242
|
+
"type": {
|
|
5243
|
+
"text": "number"
|
|
5244
|
+
}
|
|
5245
|
+
}
|
|
5246
|
+
],
|
|
5247
|
+
"description": "Trace one band for the given frame: a baseline-plus-harmonics half-thickness\nprofile, clamped at 0 (so the band pinches to nothing between bumps) and\ntapered to 0 at both ends."
|
|
5248
|
+
}
|
|
5249
|
+
],
|
|
5250
|
+
"superclass": {
|
|
5251
|
+
"name": "GenesisElement",
|
|
5252
|
+
"package": "@genesislcap/web-core"
|
|
5253
|
+
},
|
|
5254
|
+
"tagName": "ai-flowing-waves-indicator",
|
|
5255
|
+
"customElement": true
|
|
5256
|
+
}
|
|
5257
|
+
],
|
|
5258
|
+
"exports": [
|
|
5259
|
+
{
|
|
5260
|
+
"kind": "js",
|
|
5261
|
+
"name": "AiFlowingWavesIndicator",
|
|
5262
|
+
"declaration": {
|
|
5263
|
+
"name": "AiFlowingWavesIndicator",
|
|
5264
|
+
"module": "src/components/flowing-waves-indicator.ts"
|
|
5265
|
+
}
|
|
5266
|
+
},
|
|
5267
|
+
{
|
|
5268
|
+
"kind": "custom-element-definition",
|
|
5269
|
+
"name": "ai-flowing-waves-indicator",
|
|
5270
|
+
"declaration": {
|
|
5271
|
+
"name": "AiFlowingWavesIndicator",
|
|
5272
|
+
"module": "src/components/flowing-waves-indicator.ts"
|
|
5273
|
+
}
|
|
5274
|
+
}
|
|
5275
|
+
]
|
|
5276
|
+
},
|
|
5277
|
+
{
|
|
5278
|
+
"kind": "javascript-module",
|
|
5279
|
+
"path": "src/components/halo-overlay.ts",
|
|
5280
|
+
"declarations": [
|
|
5281
|
+
{
|
|
5282
|
+
"kind": "class",
|
|
5283
|
+
"description": "Animated halo overlay — rotating conic-gradient border with an inward glow.\n\nDrop inside any `position: relative; overflow: hidden` container and toggle\nthe `active` attribute to show/hide the effect.",
|
|
5284
|
+
"name": "AiHaloOverlay",
|
|
5285
|
+
"members": [
|
|
5286
|
+
{
|
|
5287
|
+
"kind": "field",
|
|
5288
|
+
"name": "active",
|
|
5289
|
+
"type": {
|
|
5290
|
+
"text": "boolean"
|
|
5291
|
+
},
|
|
5292
|
+
"default": "false"
|
|
5293
|
+
},
|
|
5294
|
+
{
|
|
5295
|
+
"kind": "field",
|
|
5296
|
+
"name": "speed",
|
|
5297
|
+
"type": {
|
|
5298
|
+
"text": "number"
|
|
5299
|
+
},
|
|
5300
|
+
"default": "1.5",
|
|
5301
|
+
"description": "Rotation speed in degrees per frame. Default: 1.5 (≈ 4 s per full revolution at 60 fps)."
|
|
5302
|
+
},
|
|
5303
|
+
{
|
|
5304
|
+
"kind": "field",
|
|
5305
|
+
"name": "direction",
|
|
5306
|
+
"type": {
|
|
5307
|
+
"text": "'cw' | 'ccw'"
|
|
5308
|
+
},
|
|
5309
|
+
"default": "'cw'",
|
|
5310
|
+
"description": "Rotation direction. Default: 'cw' (clockwise)."
|
|
5311
|
+
},
|
|
5312
|
+
{
|
|
5313
|
+
"kind": "field",
|
|
5314
|
+
"name": "borderSize",
|
|
5315
|
+
"type": {
|
|
5316
|
+
"text": "number"
|
|
5317
|
+
},
|
|
5318
|
+
"default": "3",
|
|
5319
|
+
"description": "Border thickness in px. Default: 3."
|
|
5320
|
+
},
|
|
5321
|
+
{
|
|
5322
|
+
"kind": "field",
|
|
5323
|
+
"name": "glowOpacity",
|
|
5324
|
+
"type": {
|
|
5325
|
+
"text": "number"
|
|
5326
|
+
},
|
|
5327
|
+
"default": "0.35",
|
|
5328
|
+
"description": "Glow layer opacity (0–1). Default: 0.35."
|
|
5329
|
+
},
|
|
5330
|
+
{
|
|
5331
|
+
"kind": "field",
|
|
5332
|
+
"name": "glowSpread",
|
|
5333
|
+
"type": {
|
|
5334
|
+
"text": "number"
|
|
5335
|
+
},
|
|
5336
|
+
"default": "70",
|
|
5337
|
+
"description": "Transparent stop of the radial glow mask as a percentage (0–100). Higher = less spread. Default: 70."
|
|
5338
|
+
},
|
|
5339
|
+
{
|
|
5340
|
+
"kind": "method",
|
|
5341
|
+
"name": "borderSizeChanged"
|
|
5342
|
+
},
|
|
5343
|
+
{
|
|
5344
|
+
"kind": "method",
|
|
5345
|
+
"name": "glowOpacityChanged"
|
|
5346
|
+
},
|
|
5347
|
+
{
|
|
5348
|
+
"kind": "method",
|
|
5349
|
+
"name": "glowSpreadChanged"
|
|
5350
|
+
},
|
|
5351
|
+
{
|
|
5352
|
+
"kind": "field",
|
|
5353
|
+
"name": "FULL_ROTATION_DEG",
|
|
5354
|
+
"type": {
|
|
5355
|
+
"text": "number"
|
|
5356
|
+
},
|
|
5357
|
+
"privacy": "private",
|
|
5358
|
+
"static": true,
|
|
5359
|
+
"readonly": true,
|
|
5360
|
+
"default": "360"
|
|
5361
|
+
},
|
|
5362
|
+
{
|
|
5363
|
+
"kind": "field",
|
|
5364
|
+
"name": "angle",
|
|
5365
|
+
"type": {
|
|
5366
|
+
"text": "number"
|
|
5367
|
+
},
|
|
5368
|
+
"privacy": "private",
|
|
5369
|
+
"default": "0"
|
|
5370
|
+
},
|
|
5371
|
+
{
|
|
5372
|
+
"kind": "field",
|
|
5373
|
+
"name": "lastTime",
|
|
5374
|
+
"type": {
|
|
5375
|
+
"text": "number | undefined"
|
|
5376
|
+
},
|
|
5377
|
+
"privacy": "private"
|
|
5378
|
+
},
|
|
5379
|
+
{
|
|
5380
|
+
"kind": "field",
|
|
5381
|
+
"name": "animFrame",
|
|
5382
|
+
"type": {
|
|
5383
|
+
"text": "number | undefined"
|
|
5384
|
+
},
|
|
5385
|
+
"privacy": "private"
|
|
5386
|
+
},
|
|
5387
|
+
{
|
|
5388
|
+
"kind": "field",
|
|
5389
|
+
"name": "stopTimer",
|
|
5390
|
+
"type": {
|
|
5391
|
+
"text": "number | undefined"
|
|
5392
|
+
},
|
|
5393
|
+
"privacy": "private"
|
|
5394
|
+
},
|
|
5395
|
+
{
|
|
5396
|
+
"kind": "field",
|
|
5397
|
+
"name": "running",
|
|
5398
|
+
"type": {
|
|
5399
|
+
"text": "boolean"
|
|
5400
|
+
},
|
|
5401
|
+
"privacy": "private",
|
|
5402
|
+
"default": "false",
|
|
5403
|
+
"description": "Whether the loop should keep rescheduling itself — see AiHaloOverlay.tick."
|
|
5404
|
+
},
|
|
5405
|
+
{
|
|
5406
|
+
"kind": "method",
|
|
5407
|
+
"name": "activeChanged",
|
|
5408
|
+
"description": "Start/stop with `active`, so an idle overlay costs nothing.\n\nGuarded on `isConnected` because FAST invokes attribute-changed callbacks during\ninitialisation, before the element is in the document — `connectedCallback` is what decides\nfor an element that mounts already-active."
|
|
5409
|
+
},
|
|
5410
|
+
{
|
|
5411
|
+
"kind": "method",
|
|
5412
|
+
"name": "startAnimation",
|
|
5413
|
+
"privacy": "private"
|
|
5414
|
+
},
|
|
5415
|
+
{
|
|
5416
|
+
"kind": "method",
|
|
5417
|
+
"name": "scheduleStop",
|
|
5418
|
+
"privacy": "private",
|
|
5419
|
+
"description": "Keep spinning until the host has finished fading out.\n\nDeactivating only drops the host's opacity — the overlay is still on screen for the length of\nthe transition, so stopping the instant `active` flips would freeze the rotation mid-fade.\n\nTimed rather than driven by `transitionend`, which never fires if the host is hidden or an app\noverrides the transition away, and a stop that never arrives is exactly the idle-tick bug this\ngating exists to prevent.\n\nThe timer re-reads `active` rather than trusting that it was cancelled. FAST reflects the\nproperty to the attribute on a queued update, so `activeChanged` can run again, out of order,\nafter a rapid toggle — and a stale stop landing on a re-activated overlay would leave it\nfrozen for good, which is worse than the idle ticking this gate removes."
|
|
5420
|
+
},
|
|
5421
|
+
{
|
|
5422
|
+
"kind": "method",
|
|
5423
|
+
"name": "cancelPendingStop",
|
|
5424
|
+
"privacy": "private"
|
|
5425
|
+
},
|
|
5075
5426
|
{
|
|
5076
5427
|
"kind": "method",
|
|
5077
5428
|
"name": "stopAnimation",
|
|
@@ -5348,261 +5699,30 @@
|
|
|
5348
5699
|
},
|
|
5349
5700
|
{
|
|
5350
5701
|
"kind": "javascript-module",
|
|
5351
|
-
"path": "src/
|
|
5702
|
+
"path": "src/genesis/calendar.ts",
|
|
5703
|
+
"declarations": [],
|
|
5704
|
+
"exports": []
|
|
5705
|
+
},
|
|
5706
|
+
{
|
|
5707
|
+
"kind": "javascript-module",
|
|
5708
|
+
"path": "src/genesis/config.ts",
|
|
5352
5709
|
"declarations": [
|
|
5353
5710
|
{
|
|
5354
|
-
"kind": "
|
|
5355
|
-
"name": "
|
|
5356
|
-
"
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
"kind": "js",
|
|
5362
|
-
"name": "CachePolicy",
|
|
5363
|
-
"declaration": {
|
|
5364
|
-
"name": "CachePolicy",
|
|
5365
|
-
"module": "src/config/config.ts"
|
|
5366
|
-
}
|
|
5367
|
-
},
|
|
5368
|
-
{
|
|
5369
|
-
"kind": "js",
|
|
5370
|
-
"name": "ChatFallback",
|
|
5371
|
-
"declaration": {
|
|
5372
|
-
"name": "ChatFallback",
|
|
5373
|
-
"module": "src/config/config.ts"
|
|
5374
|
-
}
|
|
5711
|
+
"kind": "variable",
|
|
5712
|
+
"name": "DEFAULT_MAX_ROWS",
|
|
5713
|
+
"type": {
|
|
5714
|
+
"text": "number"
|
|
5715
|
+
},
|
|
5716
|
+
"default": "50",
|
|
5717
|
+
"description": "The default read cap, and the ceiling the config may raise it to."
|
|
5375
5718
|
},
|
|
5376
5719
|
{
|
|
5377
|
-
"kind": "
|
|
5378
|
-
"name": "
|
|
5379
|
-
"
|
|
5380
|
-
"
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
},
|
|
5384
|
-
{
|
|
5385
|
-
"kind": "js",
|
|
5386
|
-
"name": "ChatThinkingPolicy",
|
|
5387
|
-
"declaration": {
|
|
5388
|
-
"name": "ChatThinkingPolicy",
|
|
5389
|
-
"module": "src/config/config.ts"
|
|
5390
|
-
}
|
|
5391
|
-
},
|
|
5392
|
-
{
|
|
5393
|
-
"kind": "js",
|
|
5394
|
-
"name": "ChatToolChoice",
|
|
5395
|
-
"declaration": {
|
|
5396
|
-
"name": "ChatToolChoice",
|
|
5397
|
-
"module": "src/config/config.ts"
|
|
5398
|
-
}
|
|
5399
|
-
},
|
|
5400
|
-
{
|
|
5401
|
-
"kind": "js",
|
|
5402
|
-
"name": "defineAgent",
|
|
5403
|
-
"declaration": {
|
|
5404
|
-
"name": "defineAgent",
|
|
5405
|
-
"module": "src/config/config.ts"
|
|
5406
|
-
}
|
|
5407
|
-
}
|
|
5408
|
-
]
|
|
5409
|
-
},
|
|
5410
|
-
{
|
|
5411
|
-
"kind": "javascript-module",
|
|
5412
|
-
"path": "src/config/define-stateful-agent.ts",
|
|
5413
|
-
"declarations": [
|
|
5414
|
-
{
|
|
5415
|
-
"kind": "function",
|
|
5416
|
-
"name": "restoreMachine",
|
|
5417
|
-
"return": {
|
|
5418
|
-
"type": {
|
|
5419
|
-
"text": "void"
|
|
5420
|
-
}
|
|
5421
|
-
},
|
|
5422
|
-
"parameters": [
|
|
5423
|
-
{
|
|
5424
|
-
"name": "machine",
|
|
5425
|
-
"type": {
|
|
5426
|
-
"text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
|
|
5427
|
-
},
|
|
5428
|
-
"description": "the machine to restore (already constructed/started)."
|
|
5429
|
-
},
|
|
5430
|
-
{
|
|
5431
|
-
"name": "restored",
|
|
5432
|
-
"type": {
|
|
5433
|
-
"text": "unknown"
|
|
5434
|
-
},
|
|
5435
|
-
"description": "the agent's serialized image (`ctx.restored` in `init`)."
|
|
5436
|
-
},
|
|
5437
|
-
{
|
|
5438
|
-
"name": "key",
|
|
5439
|
-
"default": "'machine'",
|
|
5440
|
-
"description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
|
|
5441
|
-
}
|
|
5442
|
-
],
|
|
5443
|
-
"description": "Restore a foundation-state-machine instance from a snapshot produced by the\ndefault serializer (or `machine.getPersistedSnapshot()`). Call inside a\nstateful agent's `init` to resume the machine in its exact prior place:\n\n```ts\ninit: ({ restored }) => {\n const machine = new MyMachine();\n restoreMachine(machine, restored); // resume, or no-op on a fresh start\n return { machine };\n}\n```\n\nNo-ops when there is nothing to restore (a fresh session), leaving the\nfreshly-constructed machine in its initial state."
|
|
5444
|
-
},
|
|
5445
|
-
{
|
|
5446
|
-
"kind": "function",
|
|
5447
|
-
"name": "defineStatefulAgent",
|
|
5448
|
-
"return": {
|
|
5449
|
-
"type": {
|
|
5450
|
-
"text": "AgentConfig"
|
|
5451
|
-
}
|
|
5452
|
-
},
|
|
5453
|
-
"parameters": [
|
|
5454
|
-
{
|
|
5455
|
-
"name": "opts",
|
|
5456
|
-
"type": {
|
|
5457
|
-
"text": "StatefulAgentInit<S>"
|
|
5458
|
-
}
|
|
5459
|
-
}
|
|
5460
|
-
],
|
|
5461
|
-
"description": "Build an `AgentConfig` whose `systemPrompt`, `toolDefinitions`, and tool\nhandlers all close over a long-lived state object created on activation.\n\nThe framework wires the lifecycle: `init` on `onActivate`, `dispose` on\n`onDeactivate`. State is held inside the helper's closure — never exposed on\nthe resulting `AgentConfig` — so the redux serializer doesn't see it."
|
|
5462
|
-
},
|
|
5463
|
-
{
|
|
5464
|
-
"kind": "function",
|
|
5465
|
-
"name": "defineAutopilot",
|
|
5466
|
-
"return": {
|
|
5467
|
-
"type": {
|
|
5468
|
-
"text": "AutopilotConfig<S>"
|
|
5469
|
-
}
|
|
5470
|
-
},
|
|
5471
|
-
"parameters": [
|
|
5472
|
-
{
|
|
5473
|
-
"name": "config",
|
|
5474
|
-
"type": {
|
|
5475
|
-
"text": "AutopilotConfig<S>"
|
|
5476
|
-
}
|
|
5477
|
-
}
|
|
5478
|
-
],
|
|
5479
|
-
"description": "Define an autopilot for a stateful agent whose state is `S` (GENC-1660). An identity function\nthat exists for its type: the resolvers get `S`, and the result goes on `defineStatefulAgent`'s\n`autopilot` option."
|
|
5480
|
-
}
|
|
5481
|
-
],
|
|
5482
|
-
"exports": [
|
|
5483
|
-
{
|
|
5484
|
-
"kind": "js",
|
|
5485
|
-
"name": "restoreMachine",
|
|
5486
|
-
"declaration": {
|
|
5487
|
-
"name": "restoreMachine",
|
|
5488
|
-
"module": "src/config/define-stateful-agent.ts"
|
|
5489
|
-
}
|
|
5490
|
-
},
|
|
5491
|
-
{
|
|
5492
|
-
"kind": "js",
|
|
5493
|
-
"name": "defineStatefulAgent",
|
|
5494
|
-
"declaration": {
|
|
5495
|
-
"name": "defineStatefulAgent",
|
|
5496
|
-
"module": "src/config/define-stateful-agent.ts"
|
|
5497
|
-
}
|
|
5498
|
-
},
|
|
5499
|
-
{
|
|
5500
|
-
"kind": "js",
|
|
5501
|
-
"name": "defineAutopilot",
|
|
5502
|
-
"declaration": {
|
|
5503
|
-
"name": "defineAutopilot",
|
|
5504
|
-
"module": "src/config/define-stateful-agent.ts"
|
|
5505
|
-
}
|
|
5506
|
-
}
|
|
5507
|
-
]
|
|
5508
|
-
},
|
|
5509
|
-
{
|
|
5510
|
-
"kind": "javascript-module",
|
|
5511
|
-
"path": "src/config/fallback-agents.ts",
|
|
5512
|
-
"declarations": [
|
|
5513
|
-
{
|
|
5514
|
-
"kind": "variable",
|
|
5515
|
-
"name": "friendlyFallbackAgent",
|
|
5516
|
-
"type": {
|
|
5517
|
-
"text": "FallbackAgentConfig"
|
|
5518
|
-
},
|
|
5519
|
-
"default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a warm, friendly assistant. For general conversation like \"Hi\" or \"How are you\", you can have a friendly chat. For anything more complex, you cannot directly help, but you can explain what specialists are available. The available specialists are:\\n\\n{{agents}}\\n\\nPolitely let the user know what you can help with and invite them to rephrase their request if it is outside your scope.`,\n}",
|
|
5520
|
-
"description": "A warm, conversational fallback agent. Acknowledges it can't help directly,\nexplains what the available specialists can do, and invites the user to retry.\n\nThe system prompt is generated at runtime by `OrchestratingDriver` from the\nspecialist list — no manual authoring required."
|
|
5521
|
-
},
|
|
5522
|
-
{
|
|
5523
|
-
"kind": "variable",
|
|
5524
|
-
"name": "strictFallbackAgent",
|
|
5525
|
-
"type": {
|
|
5526
|
-
"text": "FallbackAgentConfig"
|
|
5527
|
-
},
|
|
5528
|
-
"default": "{\n name: 'Assistant',\n fallback: true,\n systemPrompt: `You are a concise assistant. The user's request is outside your scope. The available specialists are: {{agents}}.\n\n{{unroutable}}\n\nAnswer in a single short sentence. Do not elaborate.`,\n}",
|
|
5529
|
-
"description": "A brief, professional fallback agent. States what is available without\nelaboration. The `{{agents}}` placeholder is replaced at runtime by\n`OrchestratingDriver` with the generated specialist list.\n\nThe `{{unroutable}}` placeholder positions `UNROUTABLE_INSTRUCTION` — the framework's\ninstruction for a substantive request no specialist covers, which is otherwise APPENDED to a\nstring-form prompt. Positioned rather than appended for one reason: this preset's whole point is\nbrevity, and appended text would be the last thing the model reads. Putting the block above the\nbrevity rule leaves \"a single short sentence\" with the recency, so the two compose instead of\ncompeting. A prompt whose tone rules matter should do the same."
|
|
5530
|
-
}
|
|
5531
|
-
],
|
|
5532
|
-
"exports": [
|
|
5533
|
-
{
|
|
5534
|
-
"kind": "js",
|
|
5535
|
-
"name": "friendlyFallbackAgent",
|
|
5536
|
-
"declaration": {
|
|
5537
|
-
"name": "friendlyFallbackAgent",
|
|
5538
|
-
"module": "src/config/fallback-agents.ts"
|
|
5539
|
-
}
|
|
5540
|
-
},
|
|
5541
|
-
{
|
|
5542
|
-
"kind": "js",
|
|
5543
|
-
"name": "strictFallbackAgent",
|
|
5544
|
-
"declaration": {
|
|
5545
|
-
"name": "strictFallbackAgent",
|
|
5546
|
-
"module": "src/config/fallback-agents.ts"
|
|
5547
|
-
}
|
|
5548
|
-
}
|
|
5549
|
-
]
|
|
5550
|
-
},
|
|
5551
|
-
{
|
|
5552
|
-
"kind": "javascript-module",
|
|
5553
|
-
"path": "src/config/index.ts",
|
|
5554
|
-
"declarations": [],
|
|
5555
|
-
"exports": [
|
|
5556
|
-
{
|
|
5557
|
-
"kind": "js",
|
|
5558
|
-
"name": "*",
|
|
5559
|
-
"declaration": {
|
|
5560
|
-
"name": "*",
|
|
5561
|
-
"package": "./config"
|
|
5562
|
-
}
|
|
5563
|
-
},
|
|
5564
|
-
{
|
|
5565
|
-
"kind": "js",
|
|
5566
|
-
"name": "*",
|
|
5567
|
-
"declaration": {
|
|
5568
|
-
"name": "*",
|
|
5569
|
-
"package": "./fallback-agents"
|
|
5570
|
-
}
|
|
5571
|
-
}
|
|
5572
|
-
]
|
|
5573
|
-
},
|
|
5574
|
-
{
|
|
5575
|
-
"kind": "javascript-module",
|
|
5576
|
-
"path": "src/config/validate-providers.ts",
|
|
5577
|
-
"declarations": [],
|
|
5578
|
-
"exports": []
|
|
5579
|
-
},
|
|
5580
|
-
{
|
|
5581
|
-
"kind": "javascript-module",
|
|
5582
|
-
"path": "src/genesis/calendar.ts",
|
|
5583
|
-
"declarations": [],
|
|
5584
|
-
"exports": []
|
|
5585
|
-
},
|
|
5586
|
-
{
|
|
5587
|
-
"kind": "javascript-module",
|
|
5588
|
-
"path": "src/genesis/config.ts",
|
|
5589
|
-
"declarations": [
|
|
5590
|
-
{
|
|
5591
|
-
"kind": "variable",
|
|
5592
|
-
"name": "DEFAULT_MAX_ROWS",
|
|
5593
|
-
"type": {
|
|
5594
|
-
"text": "number"
|
|
5595
|
-
},
|
|
5596
|
-
"default": "50",
|
|
5597
|
-
"description": "The default read cap, and the ceiling the config may raise it to."
|
|
5598
|
-
},
|
|
5599
|
-
{
|
|
5600
|
-
"kind": "variable",
|
|
5601
|
-
"name": "MAX_ROWS_CEILING",
|
|
5602
|
-
"type": {
|
|
5603
|
-
"text": "number"
|
|
5604
|
-
},
|
|
5605
|
-
"default": "1000"
|
|
5720
|
+
"kind": "variable",
|
|
5721
|
+
"name": "MAX_ROWS_CEILING",
|
|
5722
|
+
"type": {
|
|
5723
|
+
"text": "number"
|
|
5724
|
+
},
|
|
5725
|
+
"default": "1000"
|
|
5606
5726
|
},
|
|
5607
5727
|
{
|
|
5608
5728
|
"kind": "function",
|
|
@@ -6762,46 +6882,220 @@
|
|
|
6762
6882
|
},
|
|
6763
6883
|
{
|
|
6764
6884
|
"kind": "javascript-module",
|
|
6765
|
-
"path": "src/
|
|
6766
|
-
"declarations": [
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
"exports": [
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6885
|
+
"path": "src/notifications/agent-notifications.ts",
|
|
6886
|
+
"declarations": [
|
|
6887
|
+
{
|
|
6888
|
+
"kind": "variable",
|
|
6889
|
+
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
6890
|
+
"type": {
|
|
6891
|
+
"text": "string"
|
|
6892
|
+
},
|
|
6893
|
+
"default": "'The assistant is ready for your next input'",
|
|
6894
|
+
"description": "The notification's text when neither the app nor the widget gives one."
|
|
6895
|
+
},
|
|
6896
|
+
{
|
|
6897
|
+
"kind": "function",
|
|
6898
|
+
"name": "agentNotificationPermission",
|
|
6899
|
+
"return": {
|
|
6900
|
+
"type": {
|
|
6901
|
+
"text": "AgentNotificationPermission"
|
|
6902
|
+
}
|
|
6903
|
+
},
|
|
6904
|
+
"description": "Whether this page may show notifications. Safe to call anywhere, including Node."
|
|
6905
|
+
},
|
|
6906
|
+
{
|
|
6907
|
+
"kind": "function",
|
|
6908
|
+
"name": "requestAgentNotificationPermission",
|
|
6909
|
+
"return": {
|
|
6910
|
+
"type": {
|
|
6911
|
+
"text": "Promise<AgentNotificationPermission>"
|
|
6912
|
+
}
|
|
6913
|
+
},
|
|
6914
|
+
"description": "Ask the person for permission to show notifications, and resolve to the result. Call it from a\nclick or key handler: browsers ignore or refuse a request that does not come from the person.\nResolves straight away when permission is already decided or unsupported, since a browser only\never asks once."
|
|
6915
|
+
}
|
|
6916
|
+
],
|
|
6917
|
+
"exports": [
|
|
6918
|
+
{
|
|
6919
|
+
"kind": "js",
|
|
6920
|
+
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
6921
|
+
"declaration": {
|
|
6922
|
+
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
6923
|
+
"module": "src/notifications/agent-notifications.ts"
|
|
6924
|
+
}
|
|
6925
|
+
},
|
|
6926
|
+
{
|
|
6927
|
+
"kind": "js",
|
|
6928
|
+
"name": "agentNotificationPermission",
|
|
6929
|
+
"declaration": {
|
|
6930
|
+
"name": "agentNotificationPermission",
|
|
6931
|
+
"module": "src/notifications/agent-notifications.ts"
|
|
6932
|
+
}
|
|
6933
|
+
},
|
|
6934
|
+
{
|
|
6935
|
+
"kind": "js",
|
|
6936
|
+
"name": "requestAgentNotificationPermission",
|
|
6937
|
+
"declaration": {
|
|
6938
|
+
"name": "requestAgentNotificationPermission",
|
|
6939
|
+
"module": "src/notifications/agent-notifications.ts"
|
|
6940
|
+
}
|
|
6941
|
+
}
|
|
6942
|
+
]
|
|
6943
|
+
},
|
|
6944
|
+
{
|
|
6945
|
+
"kind": "javascript-module",
|
|
6946
|
+
"path": "src/notifications/agent-notifier.ts",
|
|
6947
|
+
"declarations": [],
|
|
6948
|
+
"exports": []
|
|
6949
|
+
},
|
|
6950
|
+
{
|
|
6951
|
+
"kind": "javascript-module",
|
|
6952
|
+
"path": "src/notifications/index.ts",
|
|
6953
|
+
"declarations": [],
|
|
6954
|
+
"exports": [
|
|
6955
|
+
{
|
|
6956
|
+
"kind": "js",
|
|
6957
|
+
"name": "agentNotificationPermission",
|
|
6958
|
+
"declaration": {
|
|
6959
|
+
"name": "agentNotificationPermission",
|
|
6960
|
+
"module": "./agent-notifications"
|
|
6961
|
+
}
|
|
6962
|
+
},
|
|
6963
|
+
{
|
|
6964
|
+
"kind": "js",
|
|
6965
|
+
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
6966
|
+
"declaration": {
|
|
6967
|
+
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
6968
|
+
"module": "./agent-notifications"
|
|
6969
|
+
}
|
|
6970
|
+
},
|
|
6971
|
+
{
|
|
6972
|
+
"kind": "js",
|
|
6973
|
+
"name": "requestAgentNotificationPermission",
|
|
6974
|
+
"declaration": {
|
|
6975
|
+
"name": "requestAgentNotificationPermission",
|
|
6976
|
+
"module": "./agent-notifications"
|
|
6977
|
+
}
|
|
6978
|
+
},
|
|
6979
|
+
{
|
|
6980
|
+
"kind": "js",
|
|
6981
|
+
"name": "type",
|
|
6982
|
+
"declaration": {
|
|
6983
|
+
"name": "type",
|
|
6984
|
+
"module": "./agent-notifications"
|
|
6985
|
+
}
|
|
6986
|
+
},
|
|
6987
|
+
{
|
|
6988
|
+
"kind": "js",
|
|
6989
|
+
"name": "AgentAttentionDetail",
|
|
6990
|
+
"declaration": {
|
|
6991
|
+
"name": "AgentAttentionDetail",
|
|
6992
|
+
"module": "./agent-notifications"
|
|
6993
|
+
}
|
|
6994
|
+
},
|
|
6995
|
+
{
|
|
6996
|
+
"kind": "js",
|
|
6997
|
+
"name": "type",
|
|
6998
|
+
"declaration": {
|
|
6999
|
+
"name": "type",
|
|
7000
|
+
"module": "./agent-notifications"
|
|
7001
|
+
}
|
|
7002
|
+
},
|
|
7003
|
+
{
|
|
7004
|
+
"kind": "js",
|
|
7005
|
+
"name": "AgentAttentionKind",
|
|
7006
|
+
"declaration": {
|
|
7007
|
+
"name": "AgentAttentionKind",
|
|
7008
|
+
"module": "./agent-notifications"
|
|
7009
|
+
}
|
|
7010
|
+
},
|
|
7011
|
+
{
|
|
7012
|
+
"kind": "js",
|
|
7013
|
+
"name": "type",
|
|
7014
|
+
"declaration": {
|
|
7015
|
+
"name": "type",
|
|
7016
|
+
"module": "./agent-notifications"
|
|
7017
|
+
}
|
|
7018
|
+
},
|
|
7019
|
+
{
|
|
7020
|
+
"kind": "js",
|
|
7021
|
+
"name": "AgentNotificationLevel",
|
|
7022
|
+
"declaration": {
|
|
7023
|
+
"name": "AgentNotificationLevel",
|
|
7024
|
+
"module": "./agent-notifications"
|
|
7025
|
+
}
|
|
7026
|
+
},
|
|
7027
|
+
{
|
|
7028
|
+
"kind": "js",
|
|
7029
|
+
"name": "type",
|
|
7030
|
+
"declaration": {
|
|
7031
|
+
"name": "type",
|
|
7032
|
+
"module": "./agent-notifications"
|
|
7033
|
+
}
|
|
7034
|
+
},
|
|
7035
|
+
{
|
|
7036
|
+
"kind": "js",
|
|
7037
|
+
"name": "AgentNotificationPermission",
|
|
7038
|
+
"declaration": {
|
|
7039
|
+
"name": "AgentNotificationPermission",
|
|
7040
|
+
"module": "./agent-notifications"
|
|
7041
|
+
}
|
|
7042
|
+
}
|
|
7043
|
+
]
|
|
7044
|
+
},
|
|
7045
|
+
{
|
|
7046
|
+
"kind": "javascript-module",
|
|
7047
|
+
"path": "src/notifications/notification-level-picker.template.ts",
|
|
7048
|
+
"declarations": [],
|
|
7049
|
+
"exports": []
|
|
7050
|
+
},
|
|
7051
|
+
{
|
|
7052
|
+
"kind": "javascript-module",
|
|
7053
|
+
"path": "src/notifications/notification-settings.ts",
|
|
7054
|
+
"declarations": [],
|
|
7055
|
+
"exports": []
|
|
7056
|
+
},
|
|
7057
|
+
{
|
|
7058
|
+
"kind": "javascript-module",
|
|
7059
|
+
"path": "src/main/attachment-controller.ts",
|
|
7060
|
+
"declarations": [],
|
|
7061
|
+
"exports": []
|
|
7062
|
+
},
|
|
7063
|
+
{
|
|
7064
|
+
"kind": "javascript-module",
|
|
7065
|
+
"path": "src/main/budget-controller.ts",
|
|
7066
|
+
"declarations": [],
|
|
7067
|
+
"exports": []
|
|
7068
|
+
},
|
|
7069
|
+
{
|
|
7070
|
+
"kind": "javascript-module",
|
|
7071
|
+
"path": "src/main/composer-menu-controller.ts",
|
|
7072
|
+
"declarations": [],
|
|
7073
|
+
"exports": []
|
|
7074
|
+
},
|
|
7075
|
+
{
|
|
7076
|
+
"kind": "javascript-module",
|
|
7077
|
+
"path": "src/main/composer-resize-controller.ts",
|
|
7078
|
+
"declarations": [],
|
|
7079
|
+
"exports": []
|
|
7080
|
+
},
|
|
7081
|
+
{
|
|
7082
|
+
"kind": "javascript-module",
|
|
7083
|
+
"path": "src/main/context-gate-controller.ts",
|
|
7084
|
+
"declarations": [],
|
|
7085
|
+
"exports": []
|
|
7086
|
+
},
|
|
7087
|
+
{
|
|
7088
|
+
"kind": "javascript-module",
|
|
7089
|
+
"path": "src/main/cost-ledger-controller.ts",
|
|
7090
|
+
"declarations": [],
|
|
7091
|
+
"exports": []
|
|
7092
|
+
},
|
|
7093
|
+
{
|
|
7094
|
+
"kind": "javascript-module",
|
|
7095
|
+
"path": "src/main/index.ts",
|
|
7096
|
+
"declarations": [],
|
|
7097
|
+
"exports": [
|
|
7098
|
+
{
|
|
6805
7099
|
"kind": "js",
|
|
6806
7100
|
"name": "*",
|
|
6807
7101
|
"declaration": {
|
|
@@ -10797,6 +11091,18 @@
|
|
|
10797
11091
|
{
|
|
10798
11092
|
"description": "Fired after the session is wiped (the lifecycle menu's Clear). The payload is captured before teardown so the host can clean up any external state the active agent was working on. Bubbles and composed. detail: `SessionClearedDetail`",
|
|
10799
11093
|
"name": "session-cleared"
|
|
11094
|
+
},
|
|
11095
|
+
{
|
|
11096
|
+
"description": "Fired when an agent's `handOff` takes effect and its target becomes active. Bubbles and composed. detail: `HandOffFrame`",
|
|
11097
|
+
"name": "handoff-started"
|
|
11098
|
+
},
|
|
11099
|
+
{
|
|
11100
|
+
"description": "Fired when a hand-off ends and its caller is active again; `detail.outcome` says how it ended. Bubbles and composed. detail: `HandOffFrame`",
|
|
11101
|
+
"name": "handoff-returned"
|
|
11102
|
+
},
|
|
11103
|
+
{
|
|
11104
|
+
"description": "Fired when a hand-off ends with no hand-back: the chat was cleared, the agents changed, or a restore found it could not resume. Bubbles and composed. detail: `HandOffFrame`",
|
|
11105
|
+
"name": "handoff-unwound"
|
|
10800
11106
|
}
|
|
10801
11107
|
],
|
|
10802
11108
|
"attributes": [
|
|
@@ -10931,9 +11237,9 @@
|
|
|
10931
11237
|
"kind": "variable",
|
|
10932
11238
|
"name": "AiAssistantEvent",
|
|
10933
11239
|
"type": {
|
|
10934
|
-
"text": "{\n /** Session wiped via the lifecycle menu's Clear. `detail`: `SessionClearedDetail`. */\n SessionCleared: 'session-cleared',\n /** Header pressed in `popout-mode=\"expand\"` (drag-to-popout hosts). `detail`: `ChatHeaderMouseDownDetail`. */\n ChatHeaderMouseDown: 'chat-header-mousedown',\n}"
|
|
11240
|
+
"text": "{\n /** Session wiped via the lifecycle menu's Clear. `detail`: `SessionClearedDetail`. */\n SessionCleared: 'session-cleared',\n /** Header pressed in `popout-mode=\"expand\"` (drag-to-popout hosts). `detail`: `ChatHeaderMouseDownDetail`. */\n ChatHeaderMouseDown: 'chat-header-mousedown',\n /** An agent's hand-off started (GENC-1737). `detail`: `HandOffFrame`. */\n HandOffStarted: 'handoff-started',\n /** A hand-off ended and its caller is active again. `detail`: `HandOffFrame`, with `outcome`. */\n HandOffReturned: 'handoff-returned',\n /** A hand-off ended with no hand-back. `detail`: `HandOffFrame`, with `outcome`. */\n HandOffUnwound: 'handoff-unwound',\n}"
|
|
10935
11241
|
},
|
|
10936
|
-
"default": "{\n /** Session wiped via the lifecycle menu's Clear. `detail`: `SessionClearedDetail`. */\n SessionCleared: 'session-cleared',\n /** Header pressed in `popout-mode=\"expand\"` (drag-to-popout hosts). `detail`: `ChatHeaderMouseDownDetail`. */\n ChatHeaderMouseDown: 'chat-header-mousedown',\n}",
|
|
11242
|
+
"default": "{\n /** Session wiped via the lifecycle menu's Clear. `detail`: `SessionClearedDetail`. */\n SessionCleared: 'session-cleared',\n /** Header pressed in `popout-mode=\"expand\"` (drag-to-popout hosts). `detail`: `ChatHeaderMouseDownDetail`. */\n ChatHeaderMouseDown: 'chat-header-mousedown',\n /** An agent's hand-off started (GENC-1737). `detail`: `HandOffFrame`. */\n HandOffStarted: 'handoff-started',\n /** A hand-off ended and its caller is active again. `detail`: `HandOffFrame`, with `outcome`. */\n HandOffReturned: 'handoff-returned',\n /** A hand-off ended with no hand-back. `detail`: `HandOffFrame`, with `outcome`. */\n HandOffUnwound: 'handoff-unwound',\n}",
|
|
10937
11243
|
"description": "DOM events the `<foundation-ai-assistant>` element dispatches to its host.\nAll bubble and are `composed` (they cross the shadow boundary), so a host can\nlisten on the element — or any ancestor — to react. Use these constants to\nwire listeners instead of hand-typing event-name strings.\n\nAn `as const` map (not a TS `enum` — this package ships none), so it serves as\nboth the listener-name value and, via the same-named type below, a union."
|
|
10938
11244
|
},
|
|
10939
11245
|
{
|
|
@@ -11007,195 +11313,21 @@
|
|
|
11007
11313
|
},
|
|
11008
11314
|
{
|
|
11009
11315
|
"kind": "javascript-module",
|
|
11010
|
-
"path": "src/
|
|
11316
|
+
"path": "src/provider/ai-provider-switcher.ts",
|
|
11011
11317
|
"declarations": [
|
|
11012
11318
|
{
|
|
11013
11319
|
"kind": "variable",
|
|
11014
|
-
"name": "
|
|
11015
|
-
"
|
|
11016
|
-
"text": "string"
|
|
11017
|
-
},
|
|
11018
|
-
"default": "'The assistant is ready for your next input'",
|
|
11019
|
-
"description": "The notification's text when neither the app nor the widget gives one."
|
|
11020
|
-
},
|
|
11021
|
-
{
|
|
11022
|
-
"kind": "function",
|
|
11023
|
-
"name": "agentNotificationPermission",
|
|
11024
|
-
"return": {
|
|
11025
|
-
"type": {
|
|
11026
|
-
"text": "AgentNotificationPermission"
|
|
11027
|
-
}
|
|
11028
|
-
},
|
|
11029
|
-
"description": "Whether this page may show notifications. Safe to call anywhere, including Node."
|
|
11030
|
-
},
|
|
11031
|
-
{
|
|
11032
|
-
"kind": "function",
|
|
11033
|
-
"name": "requestAgentNotificationPermission",
|
|
11034
|
-
"return": {
|
|
11035
|
-
"type": {
|
|
11036
|
-
"text": "Promise<AgentNotificationPermission>"
|
|
11037
|
-
}
|
|
11038
|
-
},
|
|
11039
|
-
"description": "Ask the person for permission to show notifications, and resolve to the result. Call it from a\nclick or key handler: browsers ignore or refuse a request that does not come from the person.\nResolves straight away when permission is already decided or unsupported, since a browser only\never asks once."
|
|
11320
|
+
"name": "AIProviderSwitcher",
|
|
11321
|
+
"description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
|
|
11040
11322
|
}
|
|
11041
11323
|
],
|
|
11042
11324
|
"exports": [
|
|
11043
11325
|
{
|
|
11044
11326
|
"kind": "js",
|
|
11045
|
-
"name": "
|
|
11327
|
+
"name": "AIProviderSwitcher",
|
|
11046
11328
|
"declaration": {
|
|
11047
|
-
"name": "
|
|
11048
|
-
"module": "src/
|
|
11049
|
-
}
|
|
11050
|
-
},
|
|
11051
|
-
{
|
|
11052
|
-
"kind": "js",
|
|
11053
|
-
"name": "agentNotificationPermission",
|
|
11054
|
-
"declaration": {
|
|
11055
|
-
"name": "agentNotificationPermission",
|
|
11056
|
-
"module": "src/notifications/agent-notifications.ts"
|
|
11057
|
-
}
|
|
11058
|
-
},
|
|
11059
|
-
{
|
|
11060
|
-
"kind": "js",
|
|
11061
|
-
"name": "requestAgentNotificationPermission",
|
|
11062
|
-
"declaration": {
|
|
11063
|
-
"name": "requestAgentNotificationPermission",
|
|
11064
|
-
"module": "src/notifications/agent-notifications.ts"
|
|
11065
|
-
}
|
|
11066
|
-
}
|
|
11067
|
-
]
|
|
11068
|
-
},
|
|
11069
|
-
{
|
|
11070
|
-
"kind": "javascript-module",
|
|
11071
|
-
"path": "src/notifications/agent-notifier.ts",
|
|
11072
|
-
"declarations": [],
|
|
11073
|
-
"exports": []
|
|
11074
|
-
},
|
|
11075
|
-
{
|
|
11076
|
-
"kind": "javascript-module",
|
|
11077
|
-
"path": "src/notifications/index.ts",
|
|
11078
|
-
"declarations": [],
|
|
11079
|
-
"exports": [
|
|
11080
|
-
{
|
|
11081
|
-
"kind": "js",
|
|
11082
|
-
"name": "agentNotificationPermission",
|
|
11083
|
-
"declaration": {
|
|
11084
|
-
"name": "agentNotificationPermission",
|
|
11085
|
-
"module": "./agent-notifications"
|
|
11086
|
-
}
|
|
11087
|
-
},
|
|
11088
|
-
{
|
|
11089
|
-
"kind": "js",
|
|
11090
|
-
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
11091
|
-
"declaration": {
|
|
11092
|
-
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
11093
|
-
"module": "./agent-notifications"
|
|
11094
|
-
}
|
|
11095
|
-
},
|
|
11096
|
-
{
|
|
11097
|
-
"kind": "js",
|
|
11098
|
-
"name": "requestAgentNotificationPermission",
|
|
11099
|
-
"declaration": {
|
|
11100
|
-
"name": "requestAgentNotificationPermission",
|
|
11101
|
-
"module": "./agent-notifications"
|
|
11102
|
-
}
|
|
11103
|
-
},
|
|
11104
|
-
{
|
|
11105
|
-
"kind": "js",
|
|
11106
|
-
"name": "type",
|
|
11107
|
-
"declaration": {
|
|
11108
|
-
"name": "type",
|
|
11109
|
-
"module": "./agent-notifications"
|
|
11110
|
-
}
|
|
11111
|
-
},
|
|
11112
|
-
{
|
|
11113
|
-
"kind": "js",
|
|
11114
|
-
"name": "AgentAttentionDetail",
|
|
11115
|
-
"declaration": {
|
|
11116
|
-
"name": "AgentAttentionDetail",
|
|
11117
|
-
"module": "./agent-notifications"
|
|
11118
|
-
}
|
|
11119
|
-
},
|
|
11120
|
-
{
|
|
11121
|
-
"kind": "js",
|
|
11122
|
-
"name": "type",
|
|
11123
|
-
"declaration": {
|
|
11124
|
-
"name": "type",
|
|
11125
|
-
"module": "./agent-notifications"
|
|
11126
|
-
}
|
|
11127
|
-
},
|
|
11128
|
-
{
|
|
11129
|
-
"kind": "js",
|
|
11130
|
-
"name": "AgentAttentionKind",
|
|
11131
|
-
"declaration": {
|
|
11132
|
-
"name": "AgentAttentionKind",
|
|
11133
|
-
"module": "./agent-notifications"
|
|
11134
|
-
}
|
|
11135
|
-
},
|
|
11136
|
-
{
|
|
11137
|
-
"kind": "js",
|
|
11138
|
-
"name": "type",
|
|
11139
|
-
"declaration": {
|
|
11140
|
-
"name": "type",
|
|
11141
|
-
"module": "./agent-notifications"
|
|
11142
|
-
}
|
|
11143
|
-
},
|
|
11144
|
-
{
|
|
11145
|
-
"kind": "js",
|
|
11146
|
-
"name": "AgentNotificationLevel",
|
|
11147
|
-
"declaration": {
|
|
11148
|
-
"name": "AgentNotificationLevel",
|
|
11149
|
-
"module": "./agent-notifications"
|
|
11150
|
-
}
|
|
11151
|
-
},
|
|
11152
|
-
{
|
|
11153
|
-
"kind": "js",
|
|
11154
|
-
"name": "type",
|
|
11155
|
-
"declaration": {
|
|
11156
|
-
"name": "type",
|
|
11157
|
-
"module": "./agent-notifications"
|
|
11158
|
-
}
|
|
11159
|
-
},
|
|
11160
|
-
{
|
|
11161
|
-
"kind": "js",
|
|
11162
|
-
"name": "AgentNotificationPermission",
|
|
11163
|
-
"declaration": {
|
|
11164
|
-
"name": "AgentNotificationPermission",
|
|
11165
|
-
"module": "./agent-notifications"
|
|
11166
|
-
}
|
|
11167
|
-
}
|
|
11168
|
-
]
|
|
11169
|
-
},
|
|
11170
|
-
{
|
|
11171
|
-
"kind": "javascript-module",
|
|
11172
|
-
"path": "src/notifications/notification-level-picker.template.ts",
|
|
11173
|
-
"declarations": [],
|
|
11174
|
-
"exports": []
|
|
11175
|
-
},
|
|
11176
|
-
{
|
|
11177
|
-
"kind": "javascript-module",
|
|
11178
|
-
"path": "src/notifications/notification-settings.ts",
|
|
11179
|
-
"declarations": [],
|
|
11180
|
-
"exports": []
|
|
11181
|
-
},
|
|
11182
|
-
{
|
|
11183
|
-
"kind": "javascript-module",
|
|
11184
|
-
"path": "src/provider/ai-provider-switcher.ts",
|
|
11185
|
-
"declarations": [
|
|
11186
|
-
{
|
|
11187
|
-
"kind": "variable",
|
|
11188
|
-
"name": "AIProviderSwitcher",
|
|
11189
|
-
"description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
|
|
11190
|
-
}
|
|
11191
|
-
],
|
|
11192
|
-
"exports": [
|
|
11193
|
-
{
|
|
11194
|
-
"kind": "js",
|
|
11195
|
-
"name": "AIProviderSwitcher",
|
|
11196
|
-
"declaration": {
|
|
11197
|
-
"name": "AIProviderSwitcher",
|
|
11198
|
-
"module": "src/provider/ai-provider-switcher.ts"
|
|
11329
|
+
"name": "AIProviderSwitcher",
|
|
11330
|
+
"module": "src/provider/ai-provider-switcher.ts"
|
|
11199
11331
|
}
|
|
11200
11332
|
}
|
|
11201
11333
|
]
|
|
@@ -11668,7 +11800,7 @@
|
|
|
11668
11800
|
"type": {
|
|
11669
11801
|
"text": "readonly string[]"
|
|
11670
11802
|
},
|
|
11671
|
-
"default": "[\n 'This is an exported debug log for the Genesis AI assistant. Read it top-to-bottom.',\n \"`sessionUsage` is what this session spent: `costUsd` (USD, provider-reported per request and summed, cache discounts already applied) plus the four TOKEN BUCKETS — `uncachedInputTokens`, `cacheReadTokens`, `cacheWriteTokens`, `outputTokens`. Those four are disjoint and safe to add up for a total-tokens figure; the per-message fields further down are NOT (see kind:'message'). Each bucket bills at a different rate — cache reads a fraction of uncached input, cache writes a premium, output highest — so a big token count against a small cost means the prompt was mostly cache hits, not a missing charge. It covers sub-agent turns and spend a compaction banked, so for the CONVERSATION it is the authoritative total: prefer it over re-summing the timeline, which can be short by whatever the ring buffers evicted. The same figures appear under `meta.context`. It is as current as the snapshot it came from: the assistant's own download stamps a fresh one, but a log stitched by another tool can carry an older one — compare `meta.timestamp` with the last timeline entry, and if it is well behind, read these totals as historical and fall back to summing the timeline. One scope caveat: it is derived from the transcript, so it excludes billed calls that produced no message (a blank or refused attempt that was retried — see kind:'turn'.`usage`). Summing the turns can therefore come out HIGHER than this, and the difference is exactly that discarded spend, not a double-count.\",\n \"What 'session' means for those figures: the CURRENT conversation under this session key (a host-supplied per-project id, or the element id + header title when the host supplies none) — which is not necessarily everything in `timeline`. It is re-derived from the live transcript, so it spans page loads only when the chat is being remembered, and a Clear resets it to zero. `timeline` is append-only regardless: it keeps every page load and the pre-Clear conversation, with the session.cleared event as the boundary. So on a long-lived log, read these totals as the latest conversation's and the earlier sections as history — not as a total of the whole file.\",\n '`timeline` is the entire session as one array, already sorted chronologically by `timestamp` (ISO 8601). Every entry has a `kind`.',\n 'Timestamps are millisecond-resolution; entries that share the same millisecond are ordered by a fixed kind rank (event, then turn, then message), which is a heuristic and may not reflect exact causal order within that millisecond — e.g. a user message and the turn it triggered, or a final assistant message and its turn.end event, can appear in either order depending on whether they landed in the same millisecond. Read the logical structure of a turn rather than over-interpreting the micro-ordering of co-timestamped entries of different kinds.',\n \"kind:'message' — the conversation. `role` is user/assistant/tool/system-event/synthetic-user; `agentName` says which agent produced it; `toolCalls`/`toolResult`/`interaction` carry tool and widget activity; `inputTokens`/`outputTokens`/`cost` are per-message LLM usage, where `inputTokens` is the WHOLE prompt for that request and `cacheReadTokens`/`cacheWriteTokens` BREAK IT DOWN rather than add to it — uncached input is `inputTokens` minus those two, and adding the cache fields to `inputTokens` counts the prompt twice. The cache fields are absent on providers that report no cache split (Gemini reports reads only, since implicit caching bills no write) and on messages persisted before they existed, so read them as 0 when missing. Each bucket bills at a different rate — cache reads a fraction of uncached input, cache writes a premium, output highest — so a large token count at a small cost means the prompt was mostly cache hits. `externalCostUsd` is any non-LLM cost a widget reported for its own external service calls (folded into the session cost total alongside `cost`). On model-produced assistant messages, `model` is the concrete model id that generated it (e.g. 'gemini-2.5-flash-lite') and `providerName` is the registry slot it resolved under (e.g. a tier name like 'high'/'low', or the default); together they attribute the message — and any tool calls it carries — to an exact model even across a mid-session vendor/tier switch, where one slot name can map to different models before and after the switch. Both are undefined on any entry that is NOT an LLM response: non-assistant roles (user/tool/system-event) and 'synthetic-user' echoes; assistant interaction/widget entries (empty content carrying an `interaction` — a rendered widget, not a model turn); driver-authored assistant fallbacks (the timeout, repeated-malformed-call, and empty-response apology messages); and messages restored from a session persisted before these fields existed. One partial case: on a genuine model turn whose provider exposes no `getStatus` (or reports no model), `providerName` is still set but `model` alone is undefined. A 'synthetic-user' message is a display-only echo of an interaction outcome (e.g. the answer a widget reported): it renders on the user's side of the chat and `agentName` is the agent that created it, but it is never sent to the LLM — so it has no matching 'turn' and the model learns the outcome only from the corresponding tool result. An echo of an answer an interceptor (such as an autopilot) gave is NOT synthetic-user: see the delegated-messages paragraph.\",\n 'The autopilot (GENC-1660) runs on a driver of its own, and everything it did is harvested into this log: entries with delegate: autopilot and an agentName ending in › Autopilot are its turns (the decision message it was sent is the user message of its turn, so what it was shown is there verbatim; its systemPrompt is its grounding, such as the brief), its tool calls (widget_read, widget_act, hand_back, any read-only tools of its own, and its widget tools — reads with parameters that a widget type declares, routed to the interaction of that type being decided and refused with a reason when none is, offered on every decision so its tool list never changes; while one is open its tail starts with a line naming them) and their results (a read, view or widget tool, is capped at about 20,000 characters, cut with a note asking for less, and leaves its history at the end of the decision as a one-line note), and its own events. Its cost is already in the session total: it is booked as externalCostUsd on the interaction each decision answered, or, for a written question it answered, on the user message it sent on the user behalf (delegate: autopilot), so do not add its turns to that total. Spend that reached no message is recorded as autopilot.cost-dropped instead.',\n \"Delegated messages (GENC-1660): a message with a `delegate` field was written or sent ON THE USER'S BEHALF by a driver decorator, and `delegate` names it (e.g. autopilot). The platform stamps it; nothing else can. It renders as the assistant whatever its role. A delegated `user` message was NOT typed by the user: it is an answer given on their behalf, and the model read it with `delegateFraming` in brackets in front of the content (the stored `content` is the bare text). A delegated `assistant` message is display-only (`excludeFromProvider`): the decorator's narration note, or, when its answer carried no note, the widget's own echo of the answer (its `userMessage`), shown as the assistant and never as the person. A widget answer a decorator gave with a note is not echoed at all: the note already says what was chosen. To tell what the person decided from what was decided for them, read `interaction.answeredBy` and these fields, never the role alone.\",\n \"Sub-agent messages appear inline. When a tool delegates to a sub-agent (via `requestSubAgent`), the sub-agent's whole conversation — its own assistant/tool messages, each with their own `content`/`thinking`/`toolCalls`/`toolResult` and per-message `model`/`providerName`/`inputTokens`/`outputTokens`/`cacheReadTokens`/`cacheWriteTokens`/`cost` — is hoisted into the timeline as ordinary kind:'message' entries, interleaved by timestamp right after the tool call that spawned them (so you read the delegation top-to-bottom). A hoisted entry is marked: `subAgentDepth` is its delegation depth (1 for a sub-agent, 2 for a sub-agent's sub-agent, …), `subAgentOf` is the id of the parent tool call that spawned it (correlates it back even when two sub-agents run in one parent turn), `subAgentName` is the sub-agent's own name, and `agentName` is rewritten to a `\\\"<parent> › <sub-agent>\\\"` breadcrumb (composing when nested, e.g. `\\\"UI Builder › Planner › Grounding\\\"`). The sub-agent's per-LLM-call snapshots also surface as kind:'turn' entries with an N-M `turnIndex`, and subagent.started/completed (or subagent.failed) events bracket the run. Per-message `cost` on hoisted entries is already part of the session total (it is summed from the un-flattened history), so summing the top-level timeline does NOT double-count.\",\n \"kind:'turn' — one LLM call. `turnIndex` is a string: a top-level turn is the bare counter ('0', '1', …); a sub-agent's turns are numbered under the parent turn that activated them ('3-1', '3-2', …, and a nested sub-agent contributes '3-2-1', …), and `agentName` names the agent that ran the turn. `systemPrompt` and `toolNames` are what the model saw. A systemPrompt of '<repeated — identical to turn N>' was byte-identical to turn N and de-duplicated; the full prompt is shown whenever it changes (often because a stateful agent advanced), so prompt evolution is visible.\",\n \"kind:'turn'.`model`/`providerName`/`provider` — which model ran that call: the concrete model id, the registry slot it resolved under (a tier name like 'high'/'low', or the default), and the vendor. Recorded per CALL, so an agent whose `provider` selector varies by state — a flow that plans on a high tier and executes on a low one — has every step attributed, including calls that produced no message. `model` is the SERVING model where the provider reports one, so a turn answered by a server-side fallback names the model that answered rather than the one requested; it always matches the `model` on the message that call produced. Absent when the provider exposes no `getStatus` and the transport stamped nothing.\",\n \"kind:'turn'.`usage` — what that ONE call cost, in the same four-bucket + `costUsd` shape as `sessionUsage`. Absent while a call is in flight and on providers that report no usage. This is the SAME money as the message the call produced, not extra money: never add turn usage to message usage, and read a turn plus its message as one charge. Its distinct value is the calls that produced NO message — a blank or refused response is billed and then discarded before the retry, so the turn entry is the only record of that spend, and a turn with `usage` but no message after it is exactly that. `costUsd: 0` alongside a nonzero token count means the provider reported no price, not that the call was free.\",\n \"kind:'turn'.`agentSnapshot` — the active agent's own view of its internal state, captured at that turn. An agent opts into this by exposing a `getDebugSnapshot()` that returns JSON-serializable per-state info; stateful/flow agents wire it automatically, so you can watch a flow advance turn-by-turn (e.g. current step, cursor, collected fields, pending changes). Absent for agents that don't expose one.\",\n \"kind:'event' — a meta/lifecycle event. `type` names it (see below); `detail` carries structured data. `detail.placement` is the emitting UI instance: 'bubble' (collapsed), 'panel' (popped-out), or 'standalone'.\",\n \"Each 'event' also has an `importance`: 'high' (failures/limits — turn.error, tool.failed, subagent.failed, file.read-failed, suggestions.failed, context.threshold-crossed), 'normal' (session flow — connects, turns, retries, handoffs, agent/provider changes, interactions, sub-agent start/complete), or 'low' (skippable UI/bookkeeping noise — panel.toggled, attachment.added, driver.wired/unwired, context.updated, context.condensed). To skim, ignore importance:'low'; to triage a failure, filter to importance:'high' then read the nearby messages and turns. A 'high' turn.error is often preceded by one or more 'normal' turn.retry events for the same reason — read them together to see how many attempts were made before bailing. 'message' and 'turn' entries carry no importance — they are the substance, always read them.\",\n 'Event types: assistant.connected/disconnected (mount + placement + whether the session was created or restored), assistant.popout/popin (window placement), driver.created/wired/unwired (which driver is live and why it stops/starts responding across a popout), state.changed (idle↔loading), turn.start/turn.end (turn boundary; turn.end carries durationMs), turn.retry (a recoverable in-turn retry — detail.reason plus attempt/maxAttempts; for malformed calls also finishMessage; for empty responses also the provider finishReason + thoughtsTokens + parts breakdown), turn.error (a turn failed or hit a guardrail — detail.reason is one of exception/malformed-function-call/empty-response/unknown-tool-limit/max-iterations/response-truncated/refusal/budget-exhausted/provider-refused/context-exhausted/ai-service-error, plus reason-specific diagnostics: attempts (for empty-response also finishReason + thoughtsTokens + a parts breakdown, distinguishing a thinking-only STOP from a truly empty turn), finishMessage, for response-truncated the model + maxTokens + outputTokens + tools, unknownTools (split into staleTools — real earlier this activation but retired by the current state or hidden behind an open exclusive fold — and hallucinatedTools — never advertised) + availableTools, iterations + limit, for budget-exhausted the budgetUsd + spentUsd figures reported by the proxy plus the resolved vendor, for provider-refused the kind (spend|auth) plus the upstream status and error type — the vendor refusing the ACCOUNT rather than us refusing to spend, so the remedy is a top-up or a key rotation rather than a raised cap, and the kind is the only place that distinction survives because the user-facing copy is deliberately cause-free, for context-exhausted the estimated contextTokens against the guard that stopped the turn plus the iterations reached — the driver ending a runaway tool loop at the edge of the context window rather than issuing a request the provider would reject, so the transcript survives intact and can still be compacted, for ai-service-error the code (one of AI_SERVICE_ERROR_CODES, e.g. NO_API_KEY) and the status the AI service answered with — its own text goes to the browser console only, or name + message for exceptions), tool.failed (a tool threw), tool.unresolved (the model called a tool that could not be dispatched — detail.kind is folded/fold-hidden/stale/unknown, plus tool + agent and, for the counted kinds, the consecutive streak; the recurring lead-up to an unknown-tool-limit turn.error), subagent.started/completed/failed (the lifecycle of a `requestSubAgent` delegation — detail.agent names the sub-agent; these bracket the sub-agent turns that appear as kind:turn entries with an N-M `turnIndex`; subagent.failed also carries detail.reason, one of max_iterations/malformed_tool_call/empty_response/unknown_tool_limit/timeout/response_truncated/refusal/budget_exhausted/provider_refused/context_exhausted/ai_service_error; budget_exhausted and provider_refused are terminal for the PARENT turn too, and so is ai_service_error when the refusal is about the service rather than the request and came from the vendor the parent calls — the parent stops rather than calling the model again into the same wall; after context_exhausted the parent goes on, but its own next call is likely to stop on the same guard), agent.handoff (routing; from=null is the initial activation), agent.pinned/unpinned (forced routing), routing.decided (ONE PER ROUTING DECISION — see its own paragraph below), provider.selected (the resolved provider for the upcoming turns — detail.provider is the registry SLOT/tier name, detail.model the concrete model behind it and detail.vendor its vendor; emitted only when the slot CHANGES, so read the per-turn `model` for the model of any given call rather than assuming the nearest event still applies), interaction.requested/resolved (blocking user widgets — explain quiet gaps; note that when a sub-agent opens a widget, detail.agent — and the agentName on the interaction message — is the HOST agent that owns the widget, NOT the sub-agent that asked, because widgets render and resolve on the host driver; detail.ownerPath names the agents that actually asked, outermost first, the last being the one whose tool requested it, and detail.heldBy says who held it when it opened: user, or the id of the interceptor that claimed it, such as autopilot; on interaction.resolved, detail.answeredBy is who answered — the claimant id when it settled through its own hold, user for any other answer (a click counts as the person even on a widget a claimant held) — absent when it closed unanswered (a timeout or a stop), and absent too when it settled by itself other than through the hold of a claimant — a widget registered resolvesItself (one that does its work and settles on its own, asking the person nothing, such as a generation run), or one outcome its controller said settled itself (ctx.resolve with resolvedItself, such as a generation phase that failed outright before its review gate ever asked anything) — which then carries detail.resolvedItself: true instead, as the interaction message does — nobody answered it, and the platform cannot tell it finishing from the person interrupting it (a Skip), so only the result of the widget itself can say which; the same value is stamped on the interaction message as answeredBy and on the result the asking tool handler receives (absent there in the same cases), and when it is not user the tool result that interaction returned carries a decidedOnUsersBehalf record, so the model was told the choice was not made by the person; detail.edits, present only when non-zero, counts the editing actions a claimant ran on the widget before it was settled, whoever settled it, and those edits are stamped on the interaction message as edits, each with by, action, choice and args when it had some, in the order they ran, while a decidedOnUsersBehalf record carries their choice texts as edits, and when the person settled it after such edits the tool result carries an editedOnUsersBehalf record instead — the framing and those choice texts — so the model knows the widget was changed on the user behalf before the user answered, and that the user then confirmed it by finishing it), interaction.held (a claimant moved a pending interaction to the person or back to itself — detail.heldBy is the new holder, detail.claimant the interceptor; detail.late: true is an interceptor that declined it when it opened claiming it afterwards, such as the autopilot resumed while it was open; a widget held by anything but user was not answered by the person), interaction.claim-refused (a claim on a userOnly interaction, which stays with the person — detail.claimant + reason), autopilot.* (the autopilot, a decorator that answers interactions on behalf of the user — autopilot.claimed / autopilot.declined say whether it took each interaction and, for a decline, detail.reason: paused, other-flow, no-autopilot, unavailable, userOnly, policy or no-controller; one declined as paused that is still open when the person resumes the autopilot is looked at again, and the autopilot.claimed or autopilot.declined recorded for it then carries detail.onResume: true (a decline then can also be claimed-elsewhere, another interceptor having claimed it first); a restored mode looks at nothing; autopilot.decision-sent is what it was sent (detail.chars; detail.nothingEnabled: true when every action on the widget was unavailable — a gate whose controller said it was asking, such as a failed build the autopilot may not cancel — so it could only hand it back, which it may then do even after the person asked it to decide it itself; a widget whose controller says it is working (ctx.setWorking) is never sent a decision until it says it is asking, even when an action is enabled or the person resumes the autopilot); autopilot.acted is what it did (detail.action, detail.note, detail.finished); autopilot.handed-back is a decision it gave to the person (detail.reason and detail.trigger: model, no-decision or error); autopilot.paused / autopilot.resumed are mode changes (detail.scope, detail.trigger, detail.decideYourself when the person resumed during a hand-back; detail.trigger is restored when the mode came back with the session after a reload, applied once its flow re-activated, which starts nothing by itself); autopilot.error is the wrapper itself failing; autopilot.refinement counts a refining action against its step — a written answer (reply) or a widget action declared refines, such as a regenerate with instructions, counted together (detail.action, detail.stepKey, detail.count, detail.limitReached, after which every refining action is withdrawn for that step: not listed, and refused; the decision and every relisting of its actions say how many are left at the step, as a line Refinements left at this step: N, wherever the widget has a refining action); autopilot.handback-presented is the turn-level hand-back, shown when a working turn ended needing the person with no widget to hand over (detail.why: max-iterations, context-exhausted, failure or question; detail.options; detail.choice once answered); autopilot.catch-up is the autopilot being given the whole visible transcript at once (detail.why: first, for its first decision in a flow or after a reload; size, when its own history passed its budget and was rebuilt short — detail.ownChars; or compacted, when a compaction removed the last message it had seen, so it reads the summary and everything since, short; in each, what it had sent on the user behalf is included and labelled as its own, since its own history does not hold it); autopilot.cost-dropped is autopilot spend that no message carries, so it is NOT in the session total (detail.costUsd and detail.why: handed-back, aborted or stale for a written question it answered that no reply was sent for — stale when a pause, a resume, a new turn or the end of its flow came before the answer landed, which then went nowhere — or no-recorder when the driver had no way to book a decision to its interaction); a hand-back trigger can also be budget (the decision passed its spend cap), watchdog (its work went quiet: no ready surface and no heartbeat, or its own decision stalled with no model call landing, which stops that decision) or detached (the autopilot was removed while it held the interaction, which went to the person with no reason shown). To debug one autopilot decision, follow its interactionId: interaction.requested (heldBy), autopilot.claimed, autopilot.decision-sent, autopilot.acted or autopilot.handed-back, interaction.invoked, interaction.resolved (answeredBy), then the next turn of the working agent), interaction.invoked (a claimant ran one of the actions the widget itself exposes, through its hold, the same code the button runs — detail.claimant, detail.action (an option id, select or reply) and detail.finished, whether that settled the interaction, and when it did not, the run is recorded as an edit; the choice and narration it recorded reach the result of the tool that asked as decidedOnUsersBehalf), interaction.step (a long action run as named steps through runSteps, which survive a reload — detail.step and detail.outcome: started, done, skipped when the step was already done before a reload, or resumed when it started before a reload and runs again with what it saved part-way, such as a job id it re-attaches to), interaction.checkpoint (the checkpoints a conversation keeps for its long actions: the one in flight, and each one a reload cut, held apart until a request of its own widget type takes it over, so a resumed flow that opens other long widgets first, which save their own, loses nothing — detail.action: resumed when a reload cut the work and a request of the same widget type that the registration sameWork agrees is the same work took it over, refused when sameWork said a new request is different work (detail.saved is the identity it kept; detail.kept: true, since it stays for a later request of that type, and is offered to every one until one agrees) or when runSteps found the handed-over checkpoint malformed and started fresh (detail.reason, detail.saved), or cleared when its flow ended, once per checkpoint, with detail.cut: true for one a reload cut that nothing took over), context.updated/threshold-crossed (token + cost), context.condensed (a stale tool payload was collapsed out of the model-bound history by a `condenseWhen` declaration on the tool — detail.tool + toolCallId, target args|response, trigger (superseded:<key> or age:<n>), stubLen, and an estimated tokensSaved; stored history and this log keep the FULL payload, so the model-visible slice at any point is the full history minus the condensations recorded up to then), panel.toggled, attachment.added, file.read-failed, suggestions.failed.',\n 'Sub-agent meta events: a sub-agent\\'s own turn.retry/turn.error/tool.failed/tool.unresolved events are merged into this same timeline, tagged with `detail.subAgent` — a `\"<parent> › <sub-agent>\"` breadcrumb that composes when nested (e.g. `\"UI Builder › Planner › Grounding\"`) — and interleaved by their original timestamps within the subagent.started→completed/failed bracket. These are the per-attempt/per-failure signals that do NOT appear among the sub-agent\\'s (hoisted) messages: a malformed/empty attempt that gets retried produces no message, and the stale-vs-hallucinated split and streak counts live only on the event. A sub-agent\\'s high-volume, message-derivable events (turn.start/turn.end, provider.selected, context.updated) are intentionally NOT merged — read its hoisted messages for model/tokens/cost and turn-by-turn activity, and the bracketing subagent.* events for the run\\'s span.',\n \"`meta` holds context captured at export time: agentSummary (full agent configs), context (active model, contextTokens/contextLimit/contextUsagePercent for the last call, and the session totals — sessionCostUsd, sessionTokensConsumed, and the four-bucket sessionUsage lifted to the top of this log), activeDebugSnapshot (the active agent's `getDebugSnapshot()` taken fresh at export — reflects state NOW, which may have advanced beyond the last turn's agentSnapshot), debug (optional host-supplied debug state), host, and the export timestamp.\",\n 'Note the two different scopes in `meta.context`: `contextTokens` is the prompt size of the LAST call (against `contextLimit`, the model context window), while `sessionUsage`/`sessionTokensConsumed` are cumulative BILLED throughput. Every turn resends the conversation, so the cumulative figure counts each turn’s prompt again in the next turn’s and is expected to dwarf the context size — that is not double-counting.',\n \"kind:'event' type 'routing.decided' — how ONE turn was routed, emitted by the orchestrating driver before the agent runs (and again after every handoff). `decision` is why that agent was chosen: 'classified' (the classifier ran and picked one), 'no-match' (it ran and answered -1 — nothing listed covers the request), 'ballot-exhausted' (every eligible specialist had already handed off this turn, so the ballot was empty and NO call was made — distinct from 'no-match', where one ran and declined), 'pinned' (a user pin, an agent named for that one message by the send's `agent` option, or an active stateful flow owned the turn, so no call was made), 'single-candidate'/'no-specialists' (configuration left nothing to decide), 'provider-unavailable' (the registry default exposes no chat()), 'classifier-failed' (every attempt threw — `error` carries the last one). `to` names the agent and `fallback` says whether that agent is the fallback. `candidates` is what was actually ON THE BALLOT, in ballot order, so `index` — the classifier's own answer — indexes it directly; `excluded` names the specialists left off because they already handed off this turn, so the full eligible set is `candidates` ∪ `excluded`. `candidates` is absent on the four decisions that put nothing to a vote — 'pinned', 'single-candidate', 'no-specialists', 'ballot-exhausted'. It IS present on 'provider-unavailable', which is not an exception worth removing: the ballot was built there, it simply never got sent. `attempts` covers the retry ladder. `durationMs` is on EVERY routing.decided, and is the field to read when a decision looks wrong: the four decisions that can reach the fallback are told apart by the clock as much as by their name, because a fallback routing that resolved in tens of milliseconds made no network call at all whatever its `decision` says.\",\n \"kind:'event' type 'routing.decided'.`usage` — what that classifier call cost, in the same four-bucket + costUsd shape as `sessionUsage`, plus `model`. Absent on the decisions that make no call (see 'pinned' and the configuration ones). THIS SPEND IS NOT IN `sessionUsage`: a classifier call never enters the transcript and `sessionUsage` is derived from the transcript, so classifier cost is missing from the session total by construction, not by accident. Sum these events to close that gap — it is the one component of a session's real spend that the totals cannot see.\",\n 'To debug a failure: find the last turn.error or tool.failed, then read upward for the user message, the turn(s), and the agent/provider/state events that led into it. For a turn that went to the wrong agent, read its routing.decided first — `decision` says whether anything was actually asked.',\n]",
|
|
11803
|
+
"default": "[\n 'This is an exported debug log for the Genesis AI assistant. Read it top-to-bottom.',\n \"`sessionUsage` is what this session spent: `costUsd` (USD, provider-reported per request and summed, cache discounts already applied) plus the four TOKEN BUCKETS — `uncachedInputTokens`, `cacheReadTokens`, `cacheWriteTokens`, `outputTokens`. Those four are disjoint and safe to add up for a total-tokens figure; the per-message fields further down are NOT (see kind:'message'). Each bucket bills at a different rate — cache reads a fraction of uncached input, cache writes a premium, output highest — so a big token count against a small cost means the prompt was mostly cache hits, not a missing charge. It covers sub-agent turns and spend a compaction banked, so for the CONVERSATION it is the authoritative total: prefer it over re-summing the timeline, which can be short by whatever the ring buffers evicted. The same figures appear under `meta.context`. It is as current as the snapshot it came from: the assistant's own download stamps a fresh one, but a log stitched by another tool can carry an older one — compare `meta.timestamp` with the last timeline entry, and if it is well behind, read these totals as historical and fall back to summing the timeline. One scope caveat: it is derived from the transcript, so it excludes billed calls that produced no message (a blank or refused attempt that was retried — see kind:'turn'.`usage`). Summing the turns can therefore come out HIGHER than this, and the difference is exactly that discarded spend, not a double-count.\",\n \"What 'session' means for those figures: the CURRENT conversation under this session key (a host-supplied per-project id, or the element id + header title when the host supplies none) — which is not necessarily everything in `timeline`. It is re-derived from the live transcript, so it spans page loads only when the chat is being remembered, and a Clear resets it to zero. `timeline` is append-only regardless: it keeps every page load and the pre-Clear conversation, with the session.cleared event as the boundary. So on a long-lived log, read these totals as the latest conversation's and the earlier sections as history — not as a total of the whole file.\",\n '`timeline` is the entire session as one array, already sorted chronologically by `timestamp` (ISO 8601). Every entry has a `kind`.',\n 'Timestamps are millisecond-resolution; entries that share the same millisecond are ordered by a fixed kind rank (event, then turn, then message), which is a heuristic and may not reflect exact causal order within that millisecond — e.g. a user message and the turn it triggered, or a final assistant message and its turn.end event, can appear in either order depending on whether they landed in the same millisecond. Read the logical structure of a turn rather than over-interpreting the micro-ordering of co-timestamped entries of different kinds.',\n \"kind:'message' — the conversation. `role` is user/assistant/tool/system-event/synthetic-user; `agentName` says which agent produced it; `toolCalls`/`toolResult`/`interaction` carry tool and widget activity; `inputTokens`/`outputTokens`/`cost` are per-message LLM usage, where `inputTokens` is the WHOLE prompt for that request and `cacheReadTokens`/`cacheWriteTokens` BREAK IT DOWN rather than add to it — uncached input is `inputTokens` minus those two, and adding the cache fields to `inputTokens` counts the prompt twice. The cache fields are absent on providers that report no cache split (Gemini reports reads only, since implicit caching bills no write) and on messages persisted before they existed, so read them as 0 when missing. Each bucket bills at a different rate — cache reads a fraction of uncached input, cache writes a premium, output highest — so a large token count at a small cost means the prompt was mostly cache hits. `externalCostUsd` is any non-LLM cost a widget reported for its own external service calls (folded into the session cost total alongside `cost`). On model-produced assistant messages, `model` is the concrete model id that generated it (e.g. 'gemini-2.5-flash-lite') and `providerName` is the registry slot it resolved under (e.g. a tier name like 'high'/'low', or the default); together they attribute the message — and any tool calls it carries — to an exact model even across a mid-session vendor/tier switch, where one slot name can map to different models before and after the switch. Both are undefined on any entry that is NOT an LLM response: non-assistant roles (user/tool/system-event) and 'synthetic-user' echoes; assistant interaction/widget entries (empty content carrying an `interaction` — a rendered widget, not a model turn); driver-authored assistant fallbacks (the timeout, repeated-malformed-call, and empty-response apology messages); and messages restored from a session persisted before these fields existed. One partial case: on a genuine model turn whose provider exposes no `getStatus` (or reports no model), `providerName` is still set but `model` alone is undefined. A 'synthetic-user' message is a display-only echo of an interaction outcome (e.g. the answer a widget reported): it renders on the user's side of the chat and `agentName` is the agent that created it, but it is never sent to the LLM — so it has no matching 'turn' and the model learns the outcome only from the corresponding tool result. An echo of an answer an interceptor (such as an autopilot) gave is NOT synthetic-user: see the delegated-messages paragraph.\",\n 'The autopilot (GENC-1660) runs on a driver of its own, and everything it did is harvested into this log: entries with delegate: autopilot and an agentName ending in › Autopilot are its turns (the decision message it was sent is the user message of its turn, so what it was shown is there verbatim; its systemPrompt is its grounding, such as the brief), its tool calls (widget_read, widget_act, hand_back, any read-only tools of its own, and its widget tools — reads with parameters that a widget type declares, routed to the interaction of that type being decided and refused with a reason when none is, offered on every decision so its tool list never changes; while one is open its tail starts with a line naming them) and their results (a read, view or widget tool, is capped at about 20,000 characters, cut with a note asking for less, and leaves its history at the end of the decision as a one-line note), and its own events. Its cost is already in the session total: it is booked as externalCostUsd on the interaction each decision answered, or, for a written question it answered, on the user message it sent on the user behalf (delegate: autopilot), so do not add its turns to that total. Spend that reached no message is recorded as autopilot.cost-dropped instead.',\n \"Delegated messages (GENC-1660): a message with a `delegate` field was written or sent ON THE USER'S BEHALF by a driver decorator, and `delegate` names it (e.g. autopilot). The platform stamps it; nothing else can. It renders as the assistant whatever its role. A delegated `user` message was NOT typed by the user: it is an answer given on their behalf, and the model read it with `delegateFraming` in brackets in front of the content (the stored `content` is the bare text). A delegated `assistant` message is display-only (`excludeFromProvider`): the decorator's narration note, or, when its answer carried no note, the widget's own echo of the answer (its `userMessage`), shown as the assistant and never as the person. A widget answer a decorator gave with a note is not echoed at all: the note already says what was chosen. To tell what the person decided from what was decided for them, read `interaction.answeredBy` and these fields, never the role alone.\",\n \"Sub-agent messages appear inline. When a tool delegates to a sub-agent (via `requestSubAgent`), the sub-agent's whole conversation — its own assistant/tool messages, each with their own `content`/`thinking`/`toolCalls`/`toolResult` and per-message `model`/`providerName`/`inputTokens`/`outputTokens`/`cacheReadTokens`/`cacheWriteTokens`/`cost` — is hoisted into the timeline as ordinary kind:'message' entries, interleaved by timestamp right after the tool call that spawned them (so you read the delegation top-to-bottom). A hoisted entry is marked: `subAgentDepth` is its delegation depth (1 for a sub-agent, 2 for a sub-agent's sub-agent, …), `subAgentOf` is the id of the parent tool call that spawned it (correlates it back even when two sub-agents run in one parent turn), `subAgentName` is the sub-agent's own name, and `agentName` is rewritten to a `\\\"<parent> › <sub-agent>\\\"` breadcrumb (composing when nested, e.g. `\\\"UI Builder › Planner › Grounding\\\"`). The sub-agent's per-LLM-call snapshots also surface as kind:'turn' entries with an N-M `turnIndex`, and subagent.started/completed (or subagent.failed) events bracket the run. Per-message `cost` on hoisted entries is already part of the session total (it is summed from the un-flattened history), so summing the top-level timeline does NOT double-count.\",\n \"kind:'turn' — one LLM call. `turnIndex` is a string: a top-level turn is the bare counter ('0', '1', …); a sub-agent's turns are numbered under the parent turn that activated them ('3-1', '3-2', …, and a nested sub-agent contributes '3-2-1', …), and `agentName` names the agent that ran the turn. `systemPrompt` and `toolNames` are what the model saw. A systemPrompt of '<repeated — identical to turn N>' was byte-identical to turn N and de-duplicated; the full prompt is shown whenever it changes (often because a stateful agent advanced), so prompt evolution is visible.\",\n \"kind:'turn'.`model`/`providerName`/`provider` — which model ran that call: the concrete model id, the registry slot it resolved under (a tier name like 'high'/'low', or the default), and the vendor. Recorded per CALL, so an agent whose `provider` selector varies by state — a flow that plans on a high tier and executes on a low one — has every step attributed, including calls that produced no message. `model` is the SERVING model where the provider reports one, so a turn answered by a server-side fallback names the model that answered rather than the one requested; it always matches the `model` on the message that call produced. Absent when the provider exposes no `getStatus` and the transport stamped nothing.\",\n \"kind:'turn'.`usage` — what that ONE call cost, in the same four-bucket + `costUsd` shape as `sessionUsage`. Absent while a call is in flight and on providers that report no usage. This is the SAME money as the message the call produced, not extra money: never add turn usage to message usage, and read a turn plus its message as one charge. Its distinct value is the calls that produced NO message — a blank or refused response is billed and then discarded before the retry, so the turn entry is the only record of that spend, and a turn with `usage` but no message after it is exactly that. `costUsd: 0` alongside a nonzero token count means the provider reported no price, not that the call was free.\",\n \"kind:'turn'.`agentSnapshot` — the active agent's own view of its internal state, captured at that turn. An agent opts into this by exposing a `getDebugSnapshot()` that returns JSON-serializable per-state info; stateful/flow agents wire it automatically, so you can watch a flow advance turn-by-turn (e.g. current step, cursor, collected fields, pending changes). Absent for agents that don't expose one.\",\n \"kind:'event' — a meta/lifecycle event. `type` names it (see below); `detail` carries structured data. `detail.placement` is the emitting UI instance: 'bubble' (collapsed), 'panel' (popped-out), or 'standalone'.\",\n \"Each 'event' also has an `importance`: 'high' (failures/limits — turn.error, tool.failed, subagent.failed, file.read-failed, suggestions.failed, context.threshold-crossed), 'normal' (session flow — connects, turns, retries, handoffs, agent/provider changes, interactions, sub-agent start/complete), or 'low' (skippable UI/bookkeeping noise — panel.toggled, attachment.added, driver.wired/unwired, context.updated, context.condensed). To skim, ignore importance:'low'; to triage a failure, filter to importance:'high' then read the nearby messages and turns. A 'high' turn.error is often preceded by one or more 'normal' turn.retry events for the same reason — read them together to see how many attempts were made before bailing. 'message' and 'turn' entries carry no importance — they are the substance, always read them.\",\n 'Event types: assistant.connected/disconnected (mount + placement + whether the session was created or restored), assistant.popout/popin (window placement), driver.created/wired/unwired (which driver is live and why it stops/starts responding across a popout), state.changed (idle↔loading), turn.start/turn.end (turn boundary; turn.end carries durationMs), turn.retry (a recoverable in-turn retry — detail.reason plus attempt/maxAttempts; for malformed calls also finishMessage; for empty responses also the provider finishReason + thoughtsTokens + parts breakdown), turn.error (a turn failed or hit a guardrail — detail.reason is one of exception/malformed-function-call/empty-response/unknown-tool-limit/max-iterations/response-truncated/refusal/budget-exhausted/provider-refused/context-exhausted/ai-service-error, plus reason-specific diagnostics: attempts (for empty-response also finishReason + thoughtsTokens + a parts breakdown, distinguishing a thinking-only STOP from a truly empty turn), finishMessage, for response-truncated the model + maxTokens + outputTokens + tools, unknownTools (split into staleTools — real earlier this activation but retired by the current state or hidden behind an open exclusive fold — and hallucinatedTools — never advertised) + availableTools, iterations + limit, for budget-exhausted the budgetUsd + spentUsd figures reported by the proxy plus the resolved vendor, for provider-refused the kind (spend|auth) plus the upstream status and error type — the vendor refusing the ACCOUNT rather than us refusing to spend, so the remedy is a top-up or a key rotation rather than a raised cap, and the kind is the only place that distinction survives because the user-facing copy is deliberately cause-free, for context-exhausted the estimated contextTokens against the guard that stopped the turn plus the iterations reached — the driver ending a runaway tool loop at the edge of the context window rather than issuing a request the provider would reject, so the transcript survives intact and can still be compacted, for ai-service-error the code (one of AI_SERVICE_ERROR_CODES, e.g. NO_API_KEY) and the status the AI service answered with — its own text goes to the browser console only, or name + message for exceptions), tool.failed (a tool threw), tool.unresolved (the model called a tool that could not be dispatched — detail.kind is folded/fold-hidden/stale/unknown, plus tool + agent and, for the counted kinds, the consecutive streak; the recurring lead-up to an unknown-tool-limit turn.error), subagent.started/completed/failed (the lifecycle of a `requestSubAgent` delegation — detail.agent names the sub-agent; these bracket the sub-agent turns that appear as kind:turn entries with an N-M `turnIndex`; subagent.failed also carries detail.reason, one of max_iterations/malformed_tool_call/empty_response/unknown_tool_limit/timeout/response_truncated/refusal/budget_exhausted/provider_refused/context_exhausted/ai_service_error; budget_exhausted and provider_refused are terminal for the PARENT turn too, and so is ai_service_error when the refusal is about the service rather than the request and came from the vendor the parent calls — the parent stops rather than calling the model again into the same wall; after context_exhausted the parent goes on, but its own next call is likely to stop on the same guard), agent.handoff (routing; from=null is the initial activation), agent.pinned/unpinned (forced routing), routing.decided (ONE PER ROUTING DECISION — see its own paragraph below), provider.selected (the resolved provider for the upcoming turns — detail.provider is the registry SLOT/tier name, detail.model the concrete model behind it and detail.vendor its vendor; emitted only when the slot CHANGES, so read the per-turn `model` for the model of any given call rather than assuming the nearest event still applies), interaction.requested/resolved (blocking user widgets — explain quiet gaps; note that when a sub-agent opens a widget, detail.agent — and the agentName on the interaction message — is the HOST agent that owns the widget, NOT the sub-agent that asked, because widgets render and resolve on the host driver; detail.ownerPath names the agents that actually asked, outermost first, the last being the one whose tool requested it, and detail.heldBy says who held it when it opened: user, or the id of the interceptor that claimed it, such as autopilot; on interaction.resolved, detail.answeredBy is who answered — the claimant id when it settled through its own hold, user for any other answer (a click counts as the person even on a widget a claimant held) — absent when it closed unanswered (a timeout or a stop), and absent too when it settled by itself other than through the hold of a claimant — a widget registered resolvesItself (one that does its work and settles on its own, asking the person nothing, such as a generation run), or one outcome its controller said settled itself (ctx.resolve with resolvedItself, such as a generation phase that failed outright before its review gate ever asked anything) — which then carries detail.resolvedItself: true instead, as the interaction message does — nobody answered it, and the platform cannot tell it finishing from the person interrupting it (a Skip), so only the result of the widget itself can say which; the same value is stamped on the interaction message as answeredBy and on the result the asking tool handler receives (absent there in the same cases), and when it is not user the tool result that interaction returned carries a decidedOnUsersBehalf record, so the model was told the choice was not made by the person; detail.edits, present only when non-zero, counts the editing actions a claimant ran on the widget before it was settled, whoever settled it, and those edits are stamped on the interaction message as edits, each with by, action, choice and args when it had some, in the order they ran, while a decidedOnUsersBehalf record carries their choice texts as edits, and when the person settled it after such edits the tool result carries an editedOnUsersBehalf record instead — the framing and those choice texts — so the model knows the widget was changed on the user behalf before the user answered, and that the user then confirmed it by finishing it), interaction.held (a claimant moved a pending interaction to the person or back to itself — detail.heldBy is the new holder, detail.claimant the interceptor; detail.late: true is an interceptor that declined it when it opened claiming it afterwards, such as the autopilot resumed while it was open; a widget held by anything but user was not answered by the person), interaction.claim-refused (a claim on a userOnly interaction, which stays with the person — detail.claimant + reason), autopilot.* (the autopilot, a decorator that answers interactions on behalf of the user — autopilot.claimed / autopilot.declined say whether it took each interaction and, for a decline, detail.reason: paused, other-flow, no-autopilot, unavailable, userOnly, policy or no-controller; one declined as paused that is still open when the person resumes the autopilot is looked at again, and the autopilot.claimed or autopilot.declined recorded for it then carries detail.onResume: true (a decline then can also be claimed-elsewhere, another interceptor having claimed it first); a restored mode looks at nothing; autopilot.decision-sent is what it was sent (detail.chars; detail.nothingEnabled: true when every action on the widget was unavailable — a gate whose controller said it was asking, such as a failed build the autopilot may not cancel — so it could only hand it back, which it may then do even after the person asked it to decide it itself; a widget whose controller says it is working (ctx.setWorking) is never sent a decision until it says it is asking, even when an action is enabled or the person resumes the autopilot); autopilot.acted is what it did (detail.action, detail.note, detail.finished); autopilot.handed-back is a decision it gave to the person (detail.reason and detail.trigger: model, no-decision or error); autopilot.paused / autopilot.resumed are mode changes (detail.scope, detail.trigger, detail.decideYourself when the person resumed during a hand-back; detail.trigger is restored when the mode came back with the session after a reload, applied once its flow re-activated, which starts nothing by itself); autopilot.error is the wrapper itself failing; autopilot.refinement counts a refining action against its step — a written answer (reply) or a widget action declared refines, such as a regenerate with instructions, counted together (detail.action, detail.stepKey, detail.count, detail.limitReached, after which every refining action is withdrawn for that step: not listed, and refused; the decision and every relisting of its actions say how many are left at the step, as a line Refinements left at this step: N, wherever the widget has a refining action); autopilot.handback-presented is the turn-level hand-back, shown when a working turn ended needing the person with no widget to hand over (detail.why: max-iterations, context-exhausted, failure or question; detail.options; detail.choice once answered); autopilot.catch-up is the autopilot being given the whole visible transcript at once (detail.why: first, for its first decision in a flow or after a reload; size, when its own history passed its budget and was rebuilt short — detail.ownChars; or compacted, when a compaction removed the last message it had seen, so it reads the summary and everything since, short; in each, what it had sent on the user behalf is included and labelled as its own, since its own history does not hold it); autopilot.cost-dropped is autopilot spend that no message carries, so it is NOT in the session total (detail.costUsd and detail.why: handed-back, aborted or stale for a written question it answered that no reply was sent for — stale when a pause, a resume, a new turn or the end of its flow came before the answer landed, which then went nowhere — or no-recorder when the driver had no way to book a decision to its interaction); a hand-back trigger can also be budget (the decision passed its spend cap), watchdog (its work went quiet: no ready surface and no heartbeat, or its own decision stalled with no model call landing, which stops that decision) or detached (the autopilot was removed while it held the interaction, which went to the person with no reason shown). To debug one autopilot decision, follow its interactionId: interaction.requested (heldBy), autopilot.claimed, autopilot.decision-sent, autopilot.acted or autopilot.handed-back, interaction.invoked, interaction.resolved (answeredBy), then the next turn of the working agent), interaction.invoked (a claimant ran one of the actions the widget itself exposes, through its hold, the same code the button runs — detail.claimant, detail.action (an option id, select or reply) and detail.finished, whether that settled the interaction, and when it did not, the run is recorded as an edit; the choice and narration it recorded reach the result of the tool that asked as decidedOnUsersBehalf), interaction.step (a long action run as named steps through runSteps, which survive a reload — detail.step and detail.outcome: started, done, skipped when the step was already done before a reload, or resumed when it started before a reload and runs again with what it saved part-way, such as a job id it re-attaches to), interaction.checkpoint (the checkpoints a conversation keeps for its long actions: the one in flight, and each one a reload cut, held apart until a request of its own widget type takes it over, so a resumed flow that opens other long widgets first, which save their own, loses nothing — detail.action: resumed when a reload cut the work and a request of the same widget type that the registration sameWork agrees is the same work took it over, refused when sameWork said a new request is different work (detail.saved is the identity it kept; detail.kept: true, since it stays for a later request of that type, and is offered to every one until one agrees) or when runSteps found the handed-over checkpoint malformed and started fresh (detail.reason, detail.saved), or cleared when its flow ended, once per checkpoint, with detail.cut: true for one a reload cut that nothing took over), context.updated/threshold-crossed (token + cost), context.condensed (a stale tool payload was collapsed out of the model-bound history by a `condenseWhen` declaration on the tool — detail.tool + toolCallId, target args|response, trigger (superseded:<key> or age:<n>), stubLen, and an estimated tokensSaved; stored history and this log keep the FULL payload, so the model-visible slice at any point is the full history minus the condensations recorded up to then), panel.toggled, attachment.added, file.read-failed, suggestions.failed.',\n 'Sub-agent meta events: a sub-agent\\'s own turn.retry/turn.error/tool.failed/tool.unresolved events are merged into this same timeline, tagged with `detail.subAgent` — a `\"<parent> › <sub-agent>\"` breadcrumb that composes when nested (e.g. `\"UI Builder › Planner › Grounding\"`) — and interleaved by their original timestamps within the subagent.started→completed/failed bracket. These are the per-attempt/per-failure signals that do NOT appear among the sub-agent\\'s (hoisted) messages: a malformed/empty attempt that gets retried produces no message, and the stale-vs-hallucinated split and streak counts live only on the event. A sub-agent\\'s high-volume, message-derivable events (turn.start/turn.end, provider.selected, context.updated) are intentionally NOT merged — read its hoisted messages for model/tokens/cost and turn-by-turn activity, and the bracketing subagent.* events for the run\\'s span.',\n \"`meta` holds context captured at export time: agentSummary (full agent configs), context (active model, contextTokens/contextLimit/contextUsagePercent for the last call, and the session totals — sessionCostUsd, sessionTokensConsumed, and the four-bucket sessionUsage lifted to the top of this log), activeDebugSnapshot (the active agent's `getDebugSnapshot()` taken fresh at export — reflects state NOW, which may have advanced beyond the last turn's agentSnapshot), debug (optional host-supplied debug state), host, and the export timestamp.\",\n 'Note the two different scopes in `meta.context`: `contextTokens` is the prompt size of the LAST call (against `contextLimit`, the model context window), while `sessionUsage`/`sessionTokensConsumed` are cumulative BILLED throughput. Every turn resends the conversation, so the cumulative figure counts each turn’s prompt again in the next turn’s and is expected to dwarf the context size — that is not double-counting.',\n \"kind:'event' type 'routing.decided' — how ONE user turn was routed, emitted by the orchestrating driver before the agent runs. Only a user turn is routed: a hand-off names its target, so the agents a hand-off runs show up as agent.handoff events, not as more routing.decided. `decision` is why that agent was chosen: 'classified' (the classifier ran and picked one), 'no-match' (it ran and answered -1 — nothing listed covers the request), 'pinned' (a user pin, an agent named for that one message by the send's `agent` option, or an active stateful flow owned the turn, so no call was made), 'single-candidate'/'no-specialists' (configuration left nothing to decide), 'provider-unavailable' (the registry default exposes no chat()), 'classifier-failed' (every attempt threw — `error` carries the last one). `to` names the agent and `fallback` says whether that agent is the fallback. `candidates` is what was ON THE BALLOT — every classifier-eligible specialist — in ballot order, so `index` — the classifier's own answer — indexes it directly. `candidates` is absent on the three decisions that put nothing to a vote — 'pinned', 'single-candidate', 'no-specialists'. It IS present on 'provider-unavailable', which is not an exception worth removing: the ballot was built there, it simply never got sent. `attempts` covers the retry ladder. `durationMs` is on EVERY routing.decided, and is the field to read when a decision looks wrong: the decisions that can reach the fallback ('no-match', 'no-specialists', 'provider-unavailable', 'classifier-failed') are told apart by the clock as much as by their name, because a fallback routing that resolved in tens of milliseconds made no network call at all whatever its `decision` says.\",\n \"kind:'event' type 'routing.decided'.`usage` — what that classifier call cost, in the same four-bucket + costUsd shape as `sessionUsage`, plus `model`. Absent on the decisions that make no call (see 'pinned' and the configuration ones). THIS SPEND IS NOT IN `sessionUsage`: a classifier call never enters the transcript and `sessionUsage` is derived from the transcript, so classifier cost is missing from the session total by construction, not by accident. Sum these events to close that gap — it is the one component of a session's real spend that the totals cannot see.\",\n 'To debug a failure: find the last turn.error or tool.failed, then read upward for the user message, the turn(s), and the agent/provider/state events that led into it. For a turn that went to the wrong agent, read its routing.decided first — `decision` says whether anything was actually asked.',\n]",
|
|
11672
11804
|
"description": "Human/agent-facing guide emitted as the first key of the exported debug log,\nso whoever opens the JSON (often an AI agent) knows how to read it without\nreverse-engineering the shape. Kept here next to the event catalogue it\ndescribes — but proximity alone demonstrably did NOT keep the two in sync\n(`refusal` was missing from both reason lists for a whole release), so\n`debug-event-log.test.ts` now asserts that every `TurnFailureReason` and every\n`SubAgentFailureReason` is named here, and fails the build when one is added\nwithout a matching sentence. Enumerations below read as exhaustive and WILL be\ntrusted by an agent reading the JSON — keep them so."
|
|
11673
11805
|
}
|
|
11674
11806
|
],
|
|
@@ -13071,6 +13203,13 @@
|
|
|
13071
13203
|
"type": {
|
|
13072
13204
|
"text": "readonly ChatMessage[]"
|
|
13073
13205
|
}
|
|
13206
|
+
},
|
|
13207
|
+
{
|
|
13208
|
+
"name": "suspended",
|
|
13209
|
+
"default": "new Map()",
|
|
13210
|
+
"type": {
|
|
13211
|
+
"text": "ReadonlyMap<number, number>"
|
|
13212
|
+
}
|
|
13074
13213
|
}
|
|
13075
13214
|
],
|
|
13076
13215
|
"description": "The entries to PERSIST alongside `history` (GENC-1632): every registered policy that has not\nfired yet and whose tool call is still in the transcript being saved, re-expressed as elapsed\nclock counts (see PersistedCondensePolicy).\n\n`history` is the transcript actually being written, not the driver's live one, because the two\ncan differ: a non-resumable save freezes at the last user message, and a compaction may have\nsummarised a call away. An entry whose call is not in the saved transcript has nothing to\ncollapse after a reload, so it is not written.\n\nPure, no writes to the registry — safe on a save path that runs on every autosave."
|
|
@@ -15950,7 +16089,7 @@
|
|
|
15950
16089
|
"declarations": [
|
|
15951
16090
|
{
|
|
15952
16091
|
"kind": "class",
|
|
15953
|
-
"description": "The stateful-agent contract: which agent is active, whether a flow or a user pin holds routing,\nand the `onActivate` / `onDeactivate` lifecycle around a swap. Either driver can own one.\n\nKnows nothing about routing, tool surfaces or transcripts — whether an agent is terminal, the\
|
|
16092
|
+
"description": "The stateful-agent contract: which agent is active, whether a flow or a user pin holds routing,\nand the `onActivate` / `onDeactivate` lifecycle around a swap. Either driver can own one.\n\nKnows nothing about routing, tool surfaces or transcripts — whether an agent is terminal, the\nhand-off stack, the divider in history all stay with the orchestrator, which is the only thing\nwith agents to route between.",
|
|
15954
16093
|
"name": "AgentSession",
|
|
15955
16094
|
"members": [
|
|
15956
16095
|
{
|
|
@@ -16008,6 +16147,23 @@
|
|
|
16008
16147
|
"privacy": "private",
|
|
16009
16148
|
"description": "The tail of the activation queue — see AgentSession.activate."
|
|
16010
16149
|
},
|
|
16150
|
+
{
|
|
16151
|
+
"kind": "field",
|
|
16152
|
+
"name": "suspended",
|
|
16153
|
+
"type": {
|
|
16154
|
+
"text": "AgentConfig[]"
|
|
16155
|
+
},
|
|
16156
|
+
"privacy": "private",
|
|
16157
|
+
"default": "[]",
|
|
16158
|
+
"description": "Callers waiting in a hand-off (GENC-1737), oldest first: still live, so never deactivated by\nthe hand-off, and resumed without `onActivate`. Empty after a reload, when a caller has no live\nstate and is activated again from its saved state instead."
|
|
16159
|
+
},
|
|
16160
|
+
{
|
|
16161
|
+
"kind": "field",
|
|
16162
|
+
"name": "handOffData",
|
|
16163
|
+
"privacy": "private",
|
|
16164
|
+
"default": "new Map<string, unknown>()",
|
|
16165
|
+
"description": "The `data` of the hand-off that activated each agent (GENC-1737), for its tool handlers: kept\nwhile it is active or waits as a caller, and dropped when its activation ends."
|
|
16166
|
+
},
|
|
16011
16167
|
{
|
|
16012
16168
|
"kind": "method",
|
|
16013
16169
|
"name": "getActive",
|
|
@@ -16131,110 +16287,235 @@
|
|
|
16131
16287
|
},
|
|
16132
16288
|
{
|
|
16133
16289
|
"kind": "method",
|
|
16134
|
-
"name": "
|
|
16290
|
+
"name": "getHandOffData",
|
|
16135
16291
|
"return": {
|
|
16136
16292
|
"type": {
|
|
16137
|
-
"text": "
|
|
16293
|
+
"text": "unknown"
|
|
16138
16294
|
}
|
|
16139
16295
|
},
|
|
16140
16296
|
"parameters": [
|
|
16141
16297
|
{
|
|
16142
|
-
"name": "
|
|
16298
|
+
"name": "agentName",
|
|
16143
16299
|
"type": {
|
|
16144
|
-
"text": "
|
|
16300
|
+
"text": "string"
|
|
16145
16301
|
}
|
|
16146
16302
|
}
|
|
16147
16303
|
],
|
|
16148
|
-
"description": "
|
|
16304
|
+
"description": "The `data` of the hand-off that activated `agentName`, if one did and carried any."
|
|
16149
16305
|
},
|
|
16150
16306
|
{
|
|
16151
16307
|
"kind": "method",
|
|
16152
|
-
"name": "
|
|
16153
|
-
"privacy": "private",
|
|
16308
|
+
"name": "setHandOffData",
|
|
16154
16309
|
"return": {
|
|
16155
16310
|
"type": {
|
|
16156
|
-
"text": "
|
|
16311
|
+
"text": "void"
|
|
16157
16312
|
}
|
|
16158
16313
|
},
|
|
16159
16314
|
"parameters": [
|
|
16160
16315
|
{
|
|
16161
|
-
"name": "
|
|
16316
|
+
"name": "agentName",
|
|
16162
16317
|
"type": {
|
|
16163
|
-
"text": "
|
|
16318
|
+
"text": "string"
|
|
16319
|
+
}
|
|
16320
|
+
},
|
|
16321
|
+
{
|
|
16322
|
+
"name": "data",
|
|
16323
|
+
"type": {
|
|
16324
|
+
"text": "unknown"
|
|
16164
16325
|
}
|
|
16165
16326
|
}
|
|
16166
|
-
]
|
|
16327
|
+
],
|
|
16328
|
+
"description": "Record the `data` a hand-off activated `agentName` with, or restore it; `undefined` drops it."
|
|
16167
16329
|
},
|
|
16168
16330
|
{
|
|
16169
16331
|
"kind": "method",
|
|
16170
|
-
"name": "
|
|
16332
|
+
"name": "dropFlowLock",
|
|
16171
16333
|
"return": {
|
|
16172
16334
|
"type": {
|
|
16173
|
-
"text": "
|
|
16335
|
+
"text": "void"
|
|
16174
16336
|
}
|
|
16175
16337
|
},
|
|
16176
|
-
"description": "
|
|
16338
|
+
"description": "Drop the flow lock and leave the active agent active (GENC-1737): a plain agent holding it with\nno hand-off behind it is done once its turn ends."
|
|
16177
16339
|
},
|
|
16178
16340
|
{
|
|
16179
16341
|
"kind": "method",
|
|
16180
|
-
"name": "
|
|
16181
|
-
"privacy": "private",
|
|
16342
|
+
"name": "getSuspended",
|
|
16182
16343
|
"return": {
|
|
16183
16344
|
"type": {
|
|
16184
|
-
"text": "
|
|
16345
|
+
"text": "readonly AgentConfig[]"
|
|
16346
|
+
}
|
|
16347
|
+
},
|
|
16348
|
+
"description": "The callers waiting in a hand-off whose state is live, oldest first."
|
|
16349
|
+
},
|
|
16350
|
+
{
|
|
16351
|
+
"kind": "method",
|
|
16352
|
+
"name": "handOff",
|
|
16353
|
+
"return": {
|
|
16354
|
+
"type": {
|
|
16355
|
+
"text": "Promise<AgentTransition>"
|
|
16185
16356
|
}
|
|
16186
16357
|
},
|
|
16187
16358
|
"parameters": [
|
|
16188
16359
|
{
|
|
16189
|
-
"name": "
|
|
16360
|
+
"name": "target",
|
|
16190
16361
|
"type": {
|
|
16191
|
-
"text": "
|
|
16362
|
+
"text": "AgentConfig"
|
|
16363
|
+
}
|
|
16364
|
+
},
|
|
16365
|
+
{
|
|
16366
|
+
"name": "options",
|
|
16367
|
+
"type": {
|
|
16368
|
+
"text": "{ suspendCaller: boolean }"
|
|
16192
16369
|
}
|
|
16193
16370
|
}
|
|
16194
16371
|
],
|
|
16195
|
-
"description": "
|
|
16372
|
+
"description": "Make `target` active for a hand-off (GENC-1737), holding the flow lock whatever kind of agent\nit is, since a waiting caller depends on it. With `suspendCaller` the active agent waits:\nit is not deactivated and keeps its state. Without it the active agent is deactivated as on\nany swap: a one-way hand-off from a target, whose waiting caller then waits for the new\ntarget. Queued with AgentSession.activate."
|
|
16196
16373
|
},
|
|
16197
16374
|
{
|
|
16198
16375
|
"kind": "method",
|
|
16199
|
-
"name": "
|
|
16376
|
+
"name": "resume",
|
|
16200
16377
|
"return": {
|
|
16201
16378
|
"type": {
|
|
16202
|
-
"text": "Promise<
|
|
16379
|
+
"text": "Promise<AgentTransition>"
|
|
16203
16380
|
}
|
|
16204
16381
|
},
|
|
16205
|
-
"
|
|
16382
|
+
"parameters": [
|
|
16383
|
+
{
|
|
16384
|
+
"name": "caller",
|
|
16385
|
+
"type": {
|
|
16386
|
+
"text": "AgentConfig"
|
|
16387
|
+
}
|
|
16388
|
+
},
|
|
16389
|
+
{
|
|
16390
|
+
"name": "lock",
|
|
16391
|
+
"type": {
|
|
16392
|
+
"text": "boolean"
|
|
16393
|
+
}
|
|
16394
|
+
}
|
|
16395
|
+
],
|
|
16396
|
+
"description": "Make a waiting caller active again when its hand-off ends (GENC-1737). One whose state is live\nresumes without `onActivate`, since it was never deactivated; after a reload it is activated\nfrom its saved state like any other agent. `lock` keeps the flow lock on it: it held it before,\nor another caller is still waiting further down."
|
|
16206
16397
|
},
|
|
16207
16398
|
{
|
|
16208
16399
|
"kind": "method",
|
|
16209
|
-
"name": "
|
|
16210
|
-
"privacy": "private",
|
|
16400
|
+
"name": "endSuspended",
|
|
16211
16401
|
"return": {
|
|
16212
16402
|
"type": {
|
|
16213
16403
|
"text": "Promise<void>"
|
|
16214
16404
|
}
|
|
16215
16405
|
},
|
|
16406
|
+
"description": "Deactivate the callers left waiting by hand-offs that ended without a hand-back, newest first,\nwhen no teardown follows to do it (GENC-1737)."
|
|
16407
|
+
},
|
|
16408
|
+
{
|
|
16409
|
+
"kind": "method",
|
|
16410
|
+
"name": "activate",
|
|
16411
|
+
"return": {
|
|
16412
|
+
"type": {
|
|
16413
|
+
"text": "Promise<AgentTransition>"
|
|
16414
|
+
}
|
|
16415
|
+
},
|
|
16216
16416
|
"parameters": [
|
|
16217
16417
|
{
|
|
16218
16418
|
"name": "agent",
|
|
16219
16419
|
"type": {
|
|
16220
16420
|
"text": "AgentConfig"
|
|
16221
16421
|
}
|
|
16222
|
-
},
|
|
16223
|
-
{
|
|
16224
|
-
"name": "reason",
|
|
16225
|
-
"type": {
|
|
16226
|
-
"text": "'switch' | 'release' | 'dispose'"
|
|
16227
|
-
}
|
|
16228
16422
|
}
|
|
16229
16423
|
],
|
|
16230
|
-
"description": "
|
|
16231
|
-
}
|
|
16232
|
-
|
|
16233
|
-
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16424
|
+
"description": "Make `agent` active, firing the lifecycle hooks around the swap: outgoing `onDeactivate`\nfirst, then incoming `onActivate`. Both are awaited so heavy activation work (a machine\nrestore, say) completes before the agent's first turn runs, and a throw from either is logged\nrather than propagated — an agent whose hook fails still activates.\n\nRe-activating the same agent by name is not a switch: no hooks fire, no lock moves, and no\nhandoff is recorded. That guard matters because a per-turn re-resolve calls through here.\n\nSingle-flight (GENC-1662): calls run one after another, never interleaved. `active` is only\nset once the hooks have finished, so two overlapping calls for the same agent would otherwise\nboth see a switch and run `onActivate` twice — and a restored `init` would be overwritten by a\nfresh one that finished later. That overlap became possible when a restore started activating\nthe flow owner outside a turn, where a send can land mid-activation."
|
|
16425
|
+
},
|
|
16426
|
+
{
|
|
16427
|
+
"kind": "method",
|
|
16428
|
+
"name": "activateNow",
|
|
16429
|
+
"privacy": "private",
|
|
16430
|
+
"return": {
|
|
16431
|
+
"type": {
|
|
16432
|
+
"text": "Promise<AgentTransition>"
|
|
16433
|
+
}
|
|
16434
|
+
},
|
|
16435
|
+
"parameters": [
|
|
16436
|
+
{
|
|
16437
|
+
"name": "agent",
|
|
16438
|
+
"type": {
|
|
16439
|
+
"text": "AgentConfig"
|
|
16440
|
+
}
|
|
16441
|
+
},
|
|
16442
|
+
{
|
|
16443
|
+
"name": "{ lock = false, suspendPrevious = false }",
|
|
16444
|
+
"default": "{}"
|
|
16445
|
+
}
|
|
16446
|
+
],
|
|
16447
|
+
"description": "`lock` takes the flow lock whatever kind of agent it is, and `suspendPrevious` leaves the\noutgoing agent waiting instead of deactivating it, as a hand-off does (GENC-1737)."
|
|
16448
|
+
},
|
|
16449
|
+
{
|
|
16450
|
+
"kind": "method",
|
|
16451
|
+
"name": "release",
|
|
16452
|
+
"return": {
|
|
16453
|
+
"type": {
|
|
16454
|
+
"text": "Promise<AgentTransition | undefined>"
|
|
16455
|
+
}
|
|
16456
|
+
},
|
|
16457
|
+
"description": "Release the active agent: fire `onDeactivate` and drop the flow lock.\n\nThe user pin is intentionally **not** cleared — someone who explicitly picked this agent\nshould stay on it after the flow ends, so the next message starts a fresh flow on the same\nagent rather than routing through the classifier.\n\nReturns `undefined` when there was no active agent, so a caller can skip its events."
|
|
16458
|
+
},
|
|
16459
|
+
{
|
|
16460
|
+
"kind": "method",
|
|
16461
|
+
"name": "reportTransition",
|
|
16462
|
+
"privacy": "private",
|
|
16463
|
+
"return": {
|
|
16464
|
+
"type": {
|
|
16465
|
+
"text": "void"
|
|
16466
|
+
}
|
|
16467
|
+
},
|
|
16468
|
+
"parameters": [
|
|
16469
|
+
{
|
|
16470
|
+
"name": "transition",
|
|
16471
|
+
"type": {
|
|
16472
|
+
"text": "AgentTransition"
|
|
16473
|
+
}
|
|
16474
|
+
}
|
|
16475
|
+
],
|
|
16476
|
+
"description": "Hand a transition to the owner. A throwing listener is logged rather than propagated, for the\nsame reason a throwing hook is: the transition has already happened, and failing the caller\nwould leave it believing it had not."
|
|
16477
|
+
},
|
|
16478
|
+
{
|
|
16479
|
+
"kind": "method",
|
|
16480
|
+
"name": "dispose",
|
|
16481
|
+
"return": {
|
|
16482
|
+
"type": {
|
|
16483
|
+
"text": "Promise<void>"
|
|
16484
|
+
}
|
|
16485
|
+
},
|
|
16486
|
+
"description": "Fire `onDeactivate` on the active agent and abort pending lifecycle work, for session\nteardown, so machines release resources cleanly. The session is not reusable afterwards: the\nabort signal stays aborted, so a later `activate` would hand its hook a dead signal.\n\n`onDeactivate` runs **before** the abort, deliberately: teardown that needs to flush state\nwould otherwise be handed an already-aborted signal and have to skip its own work. The cost is\nthat an `onActivate` still in flight keeps running until `onDeactivate` finishes — both hold\nthe same signal. Acceptable because the two are sequenced by `activate`, so overlap only\nhappens if a hook resolves before the work it started; a hook that must stop immediately\nshould own its own cancellation."
|
|
16487
|
+
},
|
|
16488
|
+
{
|
|
16489
|
+
"kind": "method",
|
|
16490
|
+
"name": "fireDeactivate",
|
|
16491
|
+
"privacy": "private",
|
|
16492
|
+
"return": {
|
|
16493
|
+
"type": {
|
|
16494
|
+
"text": "Promise<void>"
|
|
16495
|
+
}
|
|
16496
|
+
},
|
|
16497
|
+
"parameters": [
|
|
16498
|
+
{
|
|
16499
|
+
"name": "agent",
|
|
16500
|
+
"type": {
|
|
16501
|
+
"text": "AgentConfig"
|
|
16502
|
+
}
|
|
16503
|
+
},
|
|
16504
|
+
{
|
|
16505
|
+
"name": "reason",
|
|
16506
|
+
"type": {
|
|
16507
|
+
"text": "'switch' | 'release' | 'dispose'"
|
|
16508
|
+
}
|
|
16509
|
+
}
|
|
16510
|
+
],
|
|
16511
|
+
"description": "The one place `onDeactivate` is invoked. `reason` only reaches the warning text, which is what\ntells a log reader which path fired."
|
|
16512
|
+
}
|
|
16513
|
+
]
|
|
16514
|
+
}
|
|
16515
|
+
],
|
|
16516
|
+
"exports": [
|
|
16517
|
+
{
|
|
16518
|
+
"kind": "js",
|
|
16238
16519
|
"name": "AgentSession",
|
|
16239
16520
|
"declaration": {
|
|
16240
16521
|
"name": "AgentSession",
|
|
@@ -16592,6 +16873,102 @@
|
|
|
16592
16873
|
}
|
|
16593
16874
|
]
|
|
16594
16875
|
},
|
|
16876
|
+
{
|
|
16877
|
+
"kind": "method",
|
|
16878
|
+
"name": "getHandOffStack",
|
|
16879
|
+
"return": {
|
|
16880
|
+
"type": {
|
|
16881
|
+
"text": "HandOffFrame[]"
|
|
16882
|
+
}
|
|
16883
|
+
}
|
|
16884
|
+
},
|
|
16885
|
+
{
|
|
16886
|
+
"kind": "method",
|
|
16887
|
+
"name": "restoreHandOffStack",
|
|
16888
|
+
"return": {
|
|
16889
|
+
"type": {
|
|
16890
|
+
"text": "{ resume?: { agent: string; note: string }; droppedLocks?: string[] }"
|
|
16891
|
+
}
|
|
16892
|
+
},
|
|
16893
|
+
"parameters": [
|
|
16894
|
+
{
|
|
16895
|
+
"name": "saved",
|
|
16896
|
+
"type": {
|
|
16897
|
+
"text": "unknown"
|
|
16898
|
+
}
|
|
16899
|
+
},
|
|
16900
|
+
{
|
|
16901
|
+
"name": "savedStates",
|
|
16902
|
+
"type": {
|
|
16903
|
+
"text": "Record<string, unknown>"
|
|
16904
|
+
}
|
|
16905
|
+
},
|
|
16906
|
+
{
|
|
16907
|
+
"name": "interrupted",
|
|
16908
|
+
"type": {
|
|
16909
|
+
"text": "boolean"
|
|
16910
|
+
}
|
|
16911
|
+
}
|
|
16912
|
+
]
|
|
16913
|
+
},
|
|
16914
|
+
{
|
|
16915
|
+
"kind": "method",
|
|
16916
|
+
"name": "unwindHandOffs",
|
|
16917
|
+
"return": {
|
|
16918
|
+
"type": {
|
|
16919
|
+
"text": "Promise<void>"
|
|
16920
|
+
}
|
|
16921
|
+
},
|
|
16922
|
+
"parameters": [
|
|
16923
|
+
{
|
|
16924
|
+
"name": "kind",
|
|
16925
|
+
"type": {
|
|
16926
|
+
"text": "Extract<HandOffOutcomeKind, 'cleared' | 'state-lost'>"
|
|
16927
|
+
}
|
|
16928
|
+
}
|
|
16929
|
+
]
|
|
16930
|
+
},
|
|
16931
|
+
{
|
|
16932
|
+
"kind": "method",
|
|
16933
|
+
"name": "serializeWaitingCallers",
|
|
16934
|
+
"return": {
|
|
16935
|
+
"type": {
|
|
16936
|
+
"text": "Record<string, unknown>"
|
|
16937
|
+
}
|
|
16938
|
+
}
|
|
16939
|
+
},
|
|
16940
|
+
{
|
|
16941
|
+
"kind": "method",
|
|
16942
|
+
"name": "getHandOffData",
|
|
16943
|
+
"return": {
|
|
16944
|
+
"type": {
|
|
16945
|
+
"text": "Record<string, unknown>"
|
|
16946
|
+
}
|
|
16947
|
+
}
|
|
16948
|
+
},
|
|
16949
|
+
{
|
|
16950
|
+
"kind": "method",
|
|
16951
|
+
"name": "restoreHandOffData",
|
|
16952
|
+
"return": {
|
|
16953
|
+
"type": {
|
|
16954
|
+
"text": "void"
|
|
16955
|
+
}
|
|
16956
|
+
},
|
|
16957
|
+
"parameters": [
|
|
16958
|
+
{
|
|
16959
|
+
"name": "saved",
|
|
16960
|
+
"type": {
|
|
16961
|
+
"text": "unknown"
|
|
16962
|
+
}
|
|
16963
|
+
},
|
|
16964
|
+
{
|
|
16965
|
+
"name": "interrupted",
|
|
16966
|
+
"type": {
|
|
16967
|
+
"text": "boolean"
|
|
16968
|
+
}
|
|
16969
|
+
}
|
|
16970
|
+
]
|
|
16971
|
+
},
|
|
16595
16972
|
{
|
|
16596
16973
|
"kind": "method",
|
|
16597
16974
|
"name": "getActiveAgent",
|
|
@@ -17670,24 +18047,6 @@
|
|
|
17670
18047
|
},
|
|
17671
18048
|
"default": "new Set([\n 'turn.retry',\n 'turn.error',\n 'tool.failed',\n 'tool.unresolved',\n])",
|
|
17672
18049
|
"description": "Sub-agent meta events worth folding into the parent's debug timeline: the\nper-attempt and per-failure signals that do NOT otherwise surface in the\nsub-agent's (now hoisted) messages — a retried-away malformed/empty attempt\nproduces no message, and the stale-vs-hallucinated/streak diagnostics live only\non the event. High-volume, message-derivable events (turn.start/turn.end,\nprovider.selected, context.updated) are intentionally excluded: read the\nsub-agent's hoisted messages for model/tokens/cost and turn-by-turn activity.\nSee `ChatDriver.invokeSubAgent`."
|
|
17673
|
-
},
|
|
17674
|
-
{
|
|
17675
|
-
"kind": "variable",
|
|
17676
|
-
"name": "REQUEST_CONTINUATION_TOOL",
|
|
17677
|
-
"type": {
|
|
17678
|
-
"text": "string"
|
|
17679
|
-
},
|
|
17680
|
-
"default": "'request_continuation'",
|
|
17681
|
-
"description": "Name reserved for the cross-agent handoff tool — injected by OrchestratingDriver."
|
|
17682
|
-
},
|
|
17683
|
-
{
|
|
17684
|
-
"kind": "variable",
|
|
17685
|
-
"name": "HANDOFF_TOOL_RESULT_PLACEHOLDER",
|
|
17686
|
-
"type": {
|
|
17687
|
-
"text": "string"
|
|
17688
|
-
},
|
|
17689
|
-
"default": "'Handoff to another specialist — routing continues on the next turn.'",
|
|
17690
|
-
"description": "Paired in history for each `request_continuation` so tool_calls stay balanced for the provider."
|
|
17691
18050
|
}
|
|
17692
18051
|
],
|
|
17693
18052
|
"exports": [
|
|
@@ -17778,22 +18137,6 @@
|
|
|
17778
18137
|
"name": "HARVESTED_SUBAGENT_EVENTS",
|
|
17779
18138
|
"module": "src/components/chat-driver/chat-driver.constants.ts"
|
|
17780
18139
|
}
|
|
17781
|
-
},
|
|
17782
|
-
{
|
|
17783
|
-
"kind": "js",
|
|
17784
|
-
"name": "REQUEST_CONTINUATION_TOOL",
|
|
17785
|
-
"declaration": {
|
|
17786
|
-
"name": "REQUEST_CONTINUATION_TOOL",
|
|
17787
|
-
"module": "src/components/chat-driver/chat-driver.constants.ts"
|
|
17788
|
-
}
|
|
17789
|
-
},
|
|
17790
|
-
{
|
|
17791
|
-
"kind": "js",
|
|
17792
|
-
"name": "HANDOFF_TOOL_RESULT_PLACEHOLDER",
|
|
17793
|
-
"declaration": {
|
|
17794
|
-
"name": "HANDOFF_TOOL_RESULT_PLACEHOLDER",
|
|
17795
|
-
"module": "src/components/chat-driver/chat-driver.constants.ts"
|
|
17796
|
-
}
|
|
17797
18140
|
}
|
|
17798
18141
|
]
|
|
17799
18142
|
},
|
|
@@ -18067,7 +18410,7 @@
|
|
|
18067
18410
|
"text": "{ result: unknown } | undefined"
|
|
18068
18411
|
},
|
|
18069
18412
|
"privacy": "private",
|
|
18070
|
-
"description": "Set by `completeSubAgent` inside a sub-agent tool handler. Checked
|
|
18413
|
+
"description": "Set by `completeSubAgent` inside a sub-agent tool handler. Checked after tool\nresults are appended, so the turn ends without another model call.\n`undefined` means the loop has not been stopped early."
|
|
18071
18414
|
},
|
|
18072
18415
|
{
|
|
18073
18416
|
"kind": "field",
|
|
@@ -18098,6 +18441,51 @@
|
|
|
18098
18441
|
"default": "false",
|
|
18099
18442
|
"description": "Set by `releaseAgent` inside a top-level tool handler — typically a stateful\nagent's terminal-state handler signalling that its flow is complete and the\nauto-pin lock can release. Checked by the orchestrator after `sendMessage`\nreturns; the orchestrator fires `onDeactivate` and clears the pin.\n\nReset at the start of each `sendMessage` so a release from a previous turn\ndoesn't leak forward."
|
|
18100
18443
|
},
|
|
18444
|
+
{
|
|
18445
|
+
"kind": "field",
|
|
18446
|
+
"name": "handOffRequested",
|
|
18447
|
+
"type": {
|
|
18448
|
+
"text": "HandOffRequest | undefined"
|
|
18449
|
+
},
|
|
18450
|
+
"privacy": "private",
|
|
18451
|
+
"description": "A `handOff` this call accepted, for the orchestrator to act on after it (GENC-1737)."
|
|
18452
|
+
},
|
|
18453
|
+
{
|
|
18454
|
+
"kind": "field",
|
|
18455
|
+
"name": "handOffCompletion",
|
|
18456
|
+
"type": {
|
|
18457
|
+
"text": "HandOffCompletion | undefined"
|
|
18458
|
+
},
|
|
18459
|
+
"privacy": "private",
|
|
18460
|
+
"description": "What `completeHandOff` handed back this call, beside the release it also requests."
|
|
18461
|
+
},
|
|
18462
|
+
{
|
|
18463
|
+
"kind": "field",
|
|
18464
|
+
"name": "checkHandOff",
|
|
18465
|
+
"type": {
|
|
18466
|
+
"text": "(request: HandOffRequest, caller: string | undefined) => HandOffResult | undefined"
|
|
18467
|
+
},
|
|
18468
|
+
"privacy": "private",
|
|
18469
|
+
"description": "See ChatDriver.setHandOffCheck."
|
|
18470
|
+
},
|
|
18471
|
+
{
|
|
18472
|
+
"kind": "field",
|
|
18473
|
+
"name": "suspendedActivations",
|
|
18474
|
+
"privacy": "private",
|
|
18475
|
+
"readonly": true,
|
|
18476
|
+
"default": "new Map<\n string,\n { activation: number; phaseEpoch: number }\n >()",
|
|
18477
|
+
"description": "The `agentEnd` activation of each caller waiting in a hand-off, by agent name, with the phase\nepoch it was suspended at (GENC-1737). A waiting caller is suspended, not ended, so neither its\n`agentEnd` payloads nor its `phaseEnd` ones (to another agent's `endPhase()`) collapse while the\ntarget runs; when it is installed again its entries move to the new activation and, while\ntheir phase had not ended, to the current epoch. A caller restored from a saved session gets\nan activation placeholder below zero, which no live activation uses."
|
|
18478
|
+
},
|
|
18479
|
+
{
|
|
18480
|
+
"kind": "field",
|
|
18481
|
+
"name": "restoredSuspensionSeq",
|
|
18482
|
+
"type": {
|
|
18483
|
+
"text": "number"
|
|
18484
|
+
},
|
|
18485
|
+
"privacy": "private",
|
|
18486
|
+
"default": "0",
|
|
18487
|
+
"description": "The last placeholder handed out for a restored caller; see `suspendedActivations`."
|
|
18488
|
+
},
|
|
18101
18489
|
{
|
|
18102
18490
|
"kind": "field",
|
|
18103
18491
|
"name": "turnRecorder",
|
|
@@ -18754,13 +19142,7 @@
|
|
|
18754
19142
|
"text": "boolean"
|
|
18755
19143
|
}
|
|
18756
19144
|
},
|
|
18757
|
-
"
|
|
18758
|
-
{
|
|
18759
|
-
"name": "handingOff",
|
|
18760
|
-
"default": "false"
|
|
18761
|
-
}
|
|
18762
|
-
],
|
|
18763
|
-
"description": "Whether a sub-agent hit a wall this turn that stops this driver too. A handoff goes on past an\nAI-service wall: the next agent may use another vendor, and if it uses this one its own call\nmeets the wall and says so."
|
|
19145
|
+
"description": "Whether a sub-agent hit a wall this turn that stops this driver too."
|
|
18764
19146
|
},
|
|
18765
19147
|
{
|
|
18766
19148
|
"kind": "method",
|
|
@@ -18771,7 +19153,7 @@
|
|
|
18771
19153
|
"text": "ChatDriverResult | undefined"
|
|
18772
19154
|
}
|
|
18773
19155
|
},
|
|
18774
|
-
"description": "Ends the turn when a sub-agent hit a wall this turn that stops this driver too: the provider\nrefusing the account, the AI service (GENC-1611), or the budget. Checked before each model call,\nand again right after a tool batch, before
|
|
19156
|
+
"description": "Ends the turn when a sub-agent hit a wall this turn that stops this driver too: the provider\nrefusing the account, the AI service (GENC-1611), or the budget. Checked before each model call,\nand again right after a tool batch, before the iteration cap can report the turn as something\nelse."
|
|
18775
19157
|
},
|
|
18776
19158
|
{
|
|
18777
19159
|
"kind": "method",
|
|
@@ -19159,41 +19541,167 @@
|
|
|
19159
19541
|
},
|
|
19160
19542
|
{
|
|
19161
19543
|
"kind": "method",
|
|
19162
|
-
"name": "
|
|
19163
|
-
"privacy": "private",
|
|
19544
|
+
"name": "getHandOffRequest",
|
|
19164
19545
|
"return": {
|
|
19165
19546
|
"type": {
|
|
19166
|
-
"text": "
|
|
19547
|
+
"text": "HandOffRequest | undefined"
|
|
19167
19548
|
}
|
|
19168
19549
|
},
|
|
19169
|
-
"description": "
|
|
19550
|
+
"description": "The `handOff` the most recent call accepted, if any (GENC-1737)."
|
|
19170
19551
|
},
|
|
19171
19552
|
{
|
|
19172
19553
|
"kind": "method",
|
|
19173
|
-
"name": "
|
|
19554
|
+
"name": "getHandOffCompletion",
|
|
19174
19555
|
"return": {
|
|
19175
19556
|
"type": {
|
|
19176
|
-
"text": "
|
|
19557
|
+
"text": "HandOffCompletion | undefined"
|
|
19177
19558
|
}
|
|
19178
19559
|
},
|
|
19179
|
-
"description": "
|
|
19560
|
+
"description": "What `completeHandOff` handed back in the most recent call, if it was called."
|
|
19180
19561
|
},
|
|
19181
19562
|
{
|
|
19182
19563
|
"kind": "method",
|
|
19183
|
-
"name": "
|
|
19564
|
+
"name": "requestHandOff",
|
|
19565
|
+
"privacy": "private",
|
|
19184
19566
|
"return": {
|
|
19185
19567
|
"type": {
|
|
19186
|
-
"text": "
|
|
19568
|
+
"text": "HandOffResult"
|
|
19187
19569
|
}
|
|
19188
19570
|
},
|
|
19189
|
-
"
|
|
19571
|
+
"parameters": [
|
|
19572
|
+
{
|
|
19573
|
+
"name": "request",
|
|
19574
|
+
"type": {
|
|
19575
|
+
"text": "HandOffRequest"
|
|
19576
|
+
}
|
|
19577
|
+
}
|
|
19578
|
+
],
|
|
19579
|
+
"description": "A handler's `handOff`: refused once this call has handed off or released, or when `data` is\nnot JSON, and otherwise checked by the orchestrator. `data` is kept as a JSON copy, since it is\nsaved with the session and the handler may change its own object afterwards."
|
|
19190
19580
|
},
|
|
19191
19581
|
{
|
|
19192
|
-
"kind": "
|
|
19193
|
-
"name": "
|
|
19194
|
-
"
|
|
19195
|
-
|
|
19196
|
-
|
|
19582
|
+
"kind": "method",
|
|
19583
|
+
"name": "closingCallNote",
|
|
19584
|
+
"privacy": "private",
|
|
19585
|
+
"return": {
|
|
19586
|
+
"type": {
|
|
19587
|
+
"text": "string | undefined"
|
|
19588
|
+
}
|
|
19589
|
+
},
|
|
19590
|
+
"description": "The note of the closing call a hand-off asks for (GENC-1737), or `undefined` when none: once a\nhandler's `handOff` is accepted, or `completeHandOff` is called, the rest of that batch runs,\nthen one model call with no tools, so the agent can say so but not carry on, which a model told\nso in a tool result does anyway. Then the turn ends."
|
|
19591
|
+
},
|
|
19592
|
+
{
|
|
19593
|
+
"kind": "method",
|
|
19594
|
+
"name": "suspendActivation",
|
|
19595
|
+
"return": {
|
|
19596
|
+
"type": {
|
|
19597
|
+
"text": "void"
|
|
19598
|
+
}
|
|
19599
|
+
},
|
|
19600
|
+
"parameters": [
|
|
19601
|
+
{
|
|
19602
|
+
"name": "agentName",
|
|
19603
|
+
"type": {
|
|
19604
|
+
"text": "string"
|
|
19605
|
+
}
|
|
19606
|
+
}
|
|
19607
|
+
],
|
|
19608
|
+
"description": "Suspend the active agent's activation for a hand-off it made (GENC-1737): installing the target\nadvances the `agentEnd` clock as any swap does, but this caller's payloads stay live."
|
|
19609
|
+
},
|
|
19610
|
+
{
|
|
19611
|
+
"kind": "method",
|
|
19612
|
+
"name": "suspendRestoredActivations",
|
|
19613
|
+
"return": {
|
|
19614
|
+
"type": {
|
|
19615
|
+
"text": "void"
|
|
19616
|
+
}
|
|
19617
|
+
},
|
|
19618
|
+
"parameters": [
|
|
19619
|
+
{
|
|
19620
|
+
"name": "agentNames",
|
|
19621
|
+
"type": {
|
|
19622
|
+
"text": "readonly string[]"
|
|
19623
|
+
}
|
|
19624
|
+
}
|
|
19625
|
+
],
|
|
19626
|
+
"description": "Suspend restored callers before their condense policies are restored, so entries still live\nat save time stay live instead of waiting for \"the next activation\", which is the target's."
|
|
19627
|
+
},
|
|
19628
|
+
{
|
|
19629
|
+
"kind": "method",
|
|
19630
|
+
"name": "endSuspendedActivations",
|
|
19631
|
+
"return": {
|
|
19632
|
+
"type": {
|
|
19633
|
+
"text": "void"
|
|
19634
|
+
}
|
|
19635
|
+
},
|
|
19636
|
+
"description": "End every suspension: the hand-offs were unwound, so their callers' activations are over."
|
|
19637
|
+
},
|
|
19638
|
+
{
|
|
19639
|
+
"kind": "method",
|
|
19640
|
+
"name": "resumeSuspendedActivation",
|
|
19641
|
+
"privacy": "private",
|
|
19642
|
+
"return": {
|
|
19643
|
+
"type": {
|
|
19644
|
+
"text": "void"
|
|
19645
|
+
}
|
|
19646
|
+
},
|
|
19647
|
+
"parameters": [
|
|
19648
|
+
{
|
|
19649
|
+
"name": "agentName",
|
|
19650
|
+
"type": {
|
|
19651
|
+
"text": "string"
|
|
19652
|
+
}
|
|
19653
|
+
}
|
|
19654
|
+
],
|
|
19655
|
+
"description": "A caller installed again takes its suspended entries into the activation it resumes in, and\nthe ones whose phase had not ended into the current phase epoch."
|
|
19656
|
+
},
|
|
19657
|
+
{
|
|
19658
|
+
"kind": "method",
|
|
19659
|
+
"name": "suspendedClocks",
|
|
19660
|
+
"privacy": "private",
|
|
19661
|
+
"return": {
|
|
19662
|
+
"type": {
|
|
19663
|
+
"text": "ReadonlyMap<number, number>"
|
|
19664
|
+
}
|
|
19665
|
+
},
|
|
19666
|
+
"description": "The suspended activations, each with the phase epoch it was suspended at, for the `agentEnd`\nand `phaseEnd` checks and for persistence."
|
|
19667
|
+
},
|
|
19668
|
+
{
|
|
19669
|
+
"kind": "method",
|
|
19670
|
+
"name": "releaseIfRequested",
|
|
19671
|
+
"privacy": "private",
|
|
19672
|
+
"return": {
|
|
19673
|
+
"type": {
|
|
19674
|
+
"text": "Promise<void>"
|
|
19675
|
+
}
|
|
19676
|
+
},
|
|
19677
|
+
"description": "Act on a `releaseAgent` call from a tool handler: fire `onDeactivate` and drop the flow lock,\nso the next turn starts clean and the persister does not serialize a flow that is over.\n\nNo-op when the owner handles release (ChatDriverConfig.deferAgentRelease). The flag is\ncleared here rather than only at the next `sendMessage`, so the signal cannot be acted on twice\nand release a later agent that never asked."
|
|
19678
|
+
},
|
|
19679
|
+
{
|
|
19680
|
+
"kind": "method",
|
|
19681
|
+
"name": "getTurnSnapshots",
|
|
19682
|
+
"return": {
|
|
19683
|
+
"type": {
|
|
19684
|
+
"text": "ReadonlyArray<TurnSnapshot>"
|
|
19685
|
+
}
|
|
19686
|
+
},
|
|
19687
|
+
"description": "Return the per-turn snapshots captured so far. Used by the host's debug\nlog exporter to show what the LLM saw on each turn — system prompt, tool\nsurface, and agent-supplied state (e.g. a machine snapshot).\n\nRing-buffered at `maxTurnSnapshots`; older entries are dropped."
|
|
19688
|
+
},
|
|
19689
|
+
{
|
|
19690
|
+
"kind": "method",
|
|
19691
|
+
"name": "getExternalDiagnostics",
|
|
19692
|
+
"return": {
|
|
19693
|
+
"type": {
|
|
19694
|
+
"text": "ReadonlyArray<DiagnosticEntry>"
|
|
19695
|
+
}
|
|
19696
|
+
},
|
|
19697
|
+
"description": "The `turn` + `message` diagnostic-log entries harvested from resolved interactions'\n`InteractionResult.diagnostics` (e.g. a server-side ChatDriver's collated debug log). The host\nconcatenates these into its own debug log so `downloadDebugLog`/the persisted diagnostics stream\ninclude external-engine logs; `event` entries are excluded here because they're merged into the\nsession's meta-event registry instead and reach the log via `getMetaEvents`. Opaque,\nchronologically sorted by the host at assemble time. (GENC-1461.)"
|
|
19698
|
+
},
|
|
19699
|
+
{
|
|
19700
|
+
"kind": "field",
|
|
19701
|
+
"name": "contextGuard",
|
|
19702
|
+
"type": {
|
|
19703
|
+
"text": "ContextGuardPolicy | undefined"
|
|
19704
|
+
},
|
|
19197
19705
|
"privacy": "private",
|
|
19198
19706
|
"description": "Mid-loop context guard policy (GENC-1567). `undefined` disables the guard.\n\nCarries a MARGIN rather than an absolute threshold, and the difference is the\nwhole point: the threshold depends on the window of whichever provider the\nnext call resolves to, which the driver learns during the call and the host\ncannot know until afterwards. The host owns the policy; the driver applies it\nagainst the model actually being addressed."
|
|
19199
19707
|
},
|
|
@@ -20116,14 +20624,6 @@
|
|
|
20116
20624
|
"module": "./chat-driver.constants"
|
|
20117
20625
|
}
|
|
20118
20626
|
},
|
|
20119
|
-
{
|
|
20120
|
-
"kind": "js",
|
|
20121
|
-
"name": "REQUEST_CONTINUATION_TOOL",
|
|
20122
|
-
"declaration": {
|
|
20123
|
-
"name": "REQUEST_CONTINUATION_TOOL",
|
|
20124
|
-
"module": "./chat-driver.constants"
|
|
20125
|
-
}
|
|
20126
|
-
},
|
|
20127
20627
|
{
|
|
20128
20628
|
"kind": "js",
|
|
20129
20629
|
"name": "TurnSnapshot",
|
|
@@ -22212,6 +22712,124 @@
|
|
|
22212
22712
|
}
|
|
22213
22713
|
]
|
|
22214
22714
|
},
|
|
22715
|
+
{
|
|
22716
|
+
"kind": "javascript-module",
|
|
22717
|
+
"path": "src/components/orchestrating-driver/hand-off.ts",
|
|
22718
|
+
"declarations": [
|
|
22719
|
+
{
|
|
22720
|
+
"kind": "function",
|
|
22721
|
+
"name": "handOffNote",
|
|
22722
|
+
"return": {
|
|
22723
|
+
"type": {
|
|
22724
|
+
"text": "string"
|
|
22725
|
+
}
|
|
22726
|
+
},
|
|
22727
|
+
"parameters": [
|
|
22728
|
+
{
|
|
22729
|
+
"name": "caller",
|
|
22730
|
+
"type": {
|
|
22731
|
+
"text": "string"
|
|
22732
|
+
}
|
|
22733
|
+
}
|
|
22734
|
+
],
|
|
22735
|
+
"description": "The tail note a hand-off's target runs its first call with (GENC-1737). The brief itself is in\nthe transcript, as a message delegated by the caller, so the request already closes on it."
|
|
22736
|
+
},
|
|
22737
|
+
{
|
|
22738
|
+
"kind": "function",
|
|
22739
|
+
"name": "handBackNote",
|
|
22740
|
+
"return": {
|
|
22741
|
+
"type": {
|
|
22742
|
+
"text": "string"
|
|
22743
|
+
}
|
|
22744
|
+
},
|
|
22745
|
+
"parameters": [
|
|
22746
|
+
{
|
|
22747
|
+
"name": "frame",
|
|
22748
|
+
"type": {
|
|
22749
|
+
"text": "HandOffFrame"
|
|
22750
|
+
}
|
|
22751
|
+
},
|
|
22752
|
+
{
|
|
22753
|
+
"name": "outcome",
|
|
22754
|
+
"type": {
|
|
22755
|
+
"text": "HandOffOutcome"
|
|
22756
|
+
}
|
|
22757
|
+
}
|
|
22758
|
+
],
|
|
22759
|
+
"description": "The tail note a caller resumes with when its hand-off ends (GENC-1737). It quotes nothing: a\ncompleted target's summary is in the transcript as a message it handed back, and a released\ntarget's last reply already is."
|
|
22760
|
+
},
|
|
22761
|
+
{
|
|
22762
|
+
"kind": "function",
|
|
22763
|
+
"name": "frameCopy",
|
|
22764
|
+
"return": {
|
|
22765
|
+
"type": {
|
|
22766
|
+
"text": "HandOffFrame"
|
|
22767
|
+
}
|
|
22768
|
+
},
|
|
22769
|
+
"parameters": [
|
|
22770
|
+
{
|
|
22771
|
+
"name": "frame",
|
|
22772
|
+
"type": {
|
|
22773
|
+
"text": "HandOffFrame"
|
|
22774
|
+
}
|
|
22775
|
+
}
|
|
22776
|
+
],
|
|
22777
|
+
"description": "A copy of `frame` for a hook or an event, so a host that changes it changes neither the stack\nnor what is saved. Frames are JSON."
|
|
22778
|
+
},
|
|
22779
|
+
{
|
|
22780
|
+
"kind": "function",
|
|
22781
|
+
"name": "parseHandOffFrames",
|
|
22782
|
+
"return": {
|
|
22783
|
+
"type": {
|
|
22784
|
+
"text": "HandOffFrame[]"
|
|
22785
|
+
}
|
|
22786
|
+
},
|
|
22787
|
+
"parameters": [
|
|
22788
|
+
{
|
|
22789
|
+
"name": "saved",
|
|
22790
|
+
"type": {
|
|
22791
|
+
"text": "unknown"
|
|
22792
|
+
}
|
|
22793
|
+
}
|
|
22794
|
+
],
|
|
22795
|
+
"description": "The saved frames that are frames, oldest first. The snapshot is parsed data."
|
|
22796
|
+
}
|
|
22797
|
+
],
|
|
22798
|
+
"exports": [
|
|
22799
|
+
{
|
|
22800
|
+
"kind": "js",
|
|
22801
|
+
"name": "handOffNote",
|
|
22802
|
+
"declaration": {
|
|
22803
|
+
"name": "handOffNote",
|
|
22804
|
+
"module": "src/components/orchestrating-driver/hand-off.ts"
|
|
22805
|
+
}
|
|
22806
|
+
},
|
|
22807
|
+
{
|
|
22808
|
+
"kind": "js",
|
|
22809
|
+
"name": "handBackNote",
|
|
22810
|
+
"declaration": {
|
|
22811
|
+
"name": "handBackNote",
|
|
22812
|
+
"module": "src/components/orchestrating-driver/hand-off.ts"
|
|
22813
|
+
}
|
|
22814
|
+
},
|
|
22815
|
+
{
|
|
22816
|
+
"kind": "js",
|
|
22817
|
+
"name": "frameCopy",
|
|
22818
|
+
"declaration": {
|
|
22819
|
+
"name": "frameCopy",
|
|
22820
|
+
"module": "src/components/orchestrating-driver/hand-off.ts"
|
|
22821
|
+
}
|
|
22822
|
+
},
|
|
22823
|
+
{
|
|
22824
|
+
"kind": "js",
|
|
22825
|
+
"name": "parseHandOffFrames",
|
|
22826
|
+
"declaration": {
|
|
22827
|
+
"name": "parseHandOffFrames",
|
|
22828
|
+
"module": "src/components/orchestrating-driver/hand-off.ts"
|
|
22829
|
+
}
|
|
22830
|
+
}
|
|
22831
|
+
]
|
|
22832
|
+
},
|
|
22215
22833
|
{
|
|
22216
22834
|
"kind": "javascript-module",
|
|
22217
22835
|
"path": "src/components/orchestrating-driver/index.ts",
|
|
@@ -22268,7 +22886,7 @@
|
|
|
22268
22886
|
"kind": "variable",
|
|
22269
22887
|
"name": "UNROUTABLE_INSTRUCTION",
|
|
22270
22888
|
"default": "`When the request is substantive but nothing above covers it, say so directly. Do not offer to do it yourself, and do not imply a specialist will pick it up.\n\nIf the user's message is a short follow-up to something already discussed — \"fix it\", \"try again\", \"why?\" — read it against the conversation above and answer that, rather than treating it as a new request with no context.\n\nNever end your turn without saying something. An empty reply is never a valid response: if you genuinely cannot help, say briefly that you cannot, and why.`",
|
|
22271
|
-
"description": "The instruction a fallback agent needs and, left to itself, tends not to have.\n\nA fallback prompt written by a consumer reliably covers two cases — small talk, and a request\nthat belongs to a specialist — because those are the ones you think of when you write it. The\ncase it exists FOR is the third: a substantive request that no specialist covers, and no way to\nact on it, because a fallback holds no tools
|
|
22889
|
+
"description": "The instruction a fallback agent needs and, left to itself, tends not to have.\n\nA fallback prompt written by a consumer reliably covers two cases — small talk, and a request\nthat belongs to a specialist — because those are the ones you think of when you write it. The\ncase it exists FOR is the third: a substantive request that no specialist covers, and no way to\nact on it, because a fallback holds no tools.\n\nCreate's fallback prompt is the worked example (GENC-1573). It covered chit-chat and\n\"out of scope, here are the specialists\", said nothing about a request nothing can serve, and\nnothing about a terse follow-up (\"fix it\", \"try again\") aimed at an answer already given. Asked\nto fix a Kotlin null pointer no agent could touch, it returned nine blank turns across three\npage loads — a model with no instruction covering its situation and no tool to reach for.\n\nSo the framework supplies it. Appended to a string-form prompt (or substituted at\nUNROUTABLE_PLACEHOLDER if the consumer positions it), because a fallback with no answer\nfor its own reason to exist is a defect in every host, not a matter of taste. It is additive and\nstatic: being fixed it cannot destabilise a cached prefix, and the fallback prompt already\nchanges whenever the agents array does (`{{agents}}` interpolates the specialist list). The\nfunction form still passes through untouched — a consumer that wants full control has it there.\n\nDELIBERATELY CONFINED TO WHAT A TERSE PROMPT CAN ALSO OBEY, and it must stay that way. Since\nthis is appended by default it lands on top of prompts written with their own tone rules, and\nan earlier draft asked the model to \"state what you can establish… and suggest what the user\ncould do next\" — a direct contradiction of strictFallbackAgent, a preset THIS PACKAGE\nships, whose whole instruction is \"a single short sentence… Do not elaborate\". What is left\nhere is compatible with brevity: say so, don't promise work you cannot do, read a short\nfollow-up in context, and never answer with nothing. Adding anything that presumes room to\nelaborate breaks a shipped preset — put it in the consumer's own prompt instead."
|
|
22272
22890
|
},
|
|
22273
22891
|
{
|
|
22274
22892
|
"kind": "class",
|
|
@@ -22357,7 +22975,7 @@
|
|
|
22357
22975
|
},
|
|
22358
22976
|
"privacy": "private",
|
|
22359
22977
|
"default": "false",
|
|
22360
|
-
"description": "Set by `cancel()` for the duration of a
|
|
22978
|
+
"description": "Set by `cancel()` for the duration of a run. Stops it before the next agent\nruns — a hand-off's target or a hand-back's caller — so nothing more is asked\nof a provider after the user stops. Reset at the start of each run."
|
|
22361
22979
|
},
|
|
22362
22980
|
{
|
|
22363
22981
|
"kind": "field",
|
|
@@ -22367,7 +22985,46 @@
|
|
|
22367
22985
|
},
|
|
22368
22986
|
"privacy": "private",
|
|
22369
22987
|
"default": "false",
|
|
22370
|
-
"description": "Whether the CURRENT turn's user message has reached the inner driver's\nhistory. False through the pre-first-turn classify (where the only echo of\nthe message is an optimistic `history-updated` dispatch), true from the\nmoment `chatDriver.sendMessage` is entered
|
|
22988
|
+
"description": "Whether the CURRENT turn's user message has reached the inner driver's\nhistory. False through the pre-first-turn classify (where the only echo of\nthe message is an optimistic `history-updated` dispatch), true from the\nmoment `chatDriver.sendMessage` is entered. Read by the budget-wall catch in\n`sendMessage` to decide\nwhether `reportBudgetExhausted` must append the message itself: appending\nit when already appended duplicated it; not appending it when unappended\nmade it vanish. Reset at the top of each `runOrchestratedTurn`."
|
|
22989
|
+
},
|
|
22990
|
+
{
|
|
22991
|
+
"kind": "field",
|
|
22992
|
+
"name": "maxHandOffDepth",
|
|
22993
|
+
"type": {
|
|
22994
|
+
"text": "number"
|
|
22995
|
+
},
|
|
22996
|
+
"privacy": "private",
|
|
22997
|
+
"readonly": true,
|
|
22998
|
+
"description": "How many callers may wait in hand-offs at once (GENC-1737)."
|
|
22999
|
+
},
|
|
23000
|
+
{
|
|
23001
|
+
"kind": "field",
|
|
23002
|
+
"name": "handOffStack",
|
|
23003
|
+
"type": {
|
|
23004
|
+
"text": "HandOffFrame[]"
|
|
23005
|
+
},
|
|
23006
|
+
"privacy": "private",
|
|
23007
|
+
"default": "[]",
|
|
23008
|
+
"description": "The hand-offs in progress, oldest first (GENC-1737). The top frame's target is the active agent\nand holds the flow lock; each caller waits, suspended, for the target above it. Saved with the\nsession through OrchestratingDriver.getHandOffStack."
|
|
23009
|
+
},
|
|
23010
|
+
{
|
|
23011
|
+
"kind": "field",
|
|
23012
|
+
"name": "handOffsThisTurn",
|
|
23013
|
+
"type": {
|
|
23014
|
+
"text": "number"
|
|
23015
|
+
},
|
|
23016
|
+
"privacy": "private",
|
|
23017
|
+
"default": "0",
|
|
23018
|
+
"description": "Hand-offs and hand-backs this user turn, against `maxHandoffs`."
|
|
23019
|
+
},
|
|
23020
|
+
{
|
|
23021
|
+
"kind": "field",
|
|
23022
|
+
"name": "pendingHandBack",
|
|
23023
|
+
"type": {
|
|
23024
|
+
"text": "{ frame: HandOffFrame; resumed: boolean } | undefined"
|
|
23025
|
+
},
|
|
23026
|
+
"privacy": "private",
|
|
23027
|
+
"description": "A hand-back a restore found due — the top frame's target had finished, or has gone — which\nOrchestratingDriver.resumeRestoredFlow carries out."
|
|
22371
23028
|
},
|
|
22372
23029
|
{
|
|
22373
23030
|
"kind": "field",
|
|
@@ -22375,215 +23032,617 @@
|
|
|
22375
23032
|
"type": {
|
|
22376
23033
|
"text": "AgentConfig | undefined"
|
|
22377
23034
|
},
|
|
22378
|
-
"description": "The active agent, or `undefined` before the first activation and after a release.\n\nKept as an accessor over `agentSession` rather than removed: it is a public member of an\nexported class, so nothing in this package reading it is not the same as nothing reading it.",
|
|
22379
|
-
"readonly": true
|
|
23035
|
+
"description": "The active agent, or `undefined` before the first activation and after a release.\n\nKept as an accessor over `agentSession` rather than removed: it is a public member of an\nexported class, so nothing in this package reading it is not the same as nothing reading it.",
|
|
23036
|
+
"readonly": true
|
|
23037
|
+
},
|
|
23038
|
+
{
|
|
23039
|
+
"kind": "method",
|
|
23040
|
+
"name": "createInner",
|
|
23041
|
+
"privacy": "private",
|
|
23042
|
+
"static": true,
|
|
23043
|
+
"return": {
|
|
23044
|
+
"type": {
|
|
23045
|
+
"text": "ChatDriver"
|
|
23046
|
+
}
|
|
23047
|
+
},
|
|
23048
|
+
"parameters": [
|
|
23049
|
+
{
|
|
23050
|
+
"name": "providerRegistry",
|
|
23051
|
+
"type": {
|
|
23052
|
+
"text": "AIProviderRegistry"
|
|
23053
|
+
}
|
|
23054
|
+
},
|
|
23055
|
+
{
|
|
23056
|
+
"name": "agents",
|
|
23057
|
+
"type": {
|
|
23058
|
+
"text": "AgentConfig[]"
|
|
23059
|
+
}
|
|
23060
|
+
},
|
|
23061
|
+
{
|
|
23062
|
+
"name": "options",
|
|
23063
|
+
"default": "{}",
|
|
23064
|
+
"type": {
|
|
23065
|
+
"text": "ConstructorParameters<typeof OrchestratingDriver>[2]"
|
|
23066
|
+
}
|
|
23067
|
+
}
|
|
23068
|
+
],
|
|
23069
|
+
"description": "Build the inner driver, after validating the agents' providers, so a bad config throws before\na driver exists to subscribe to the registry. Static because it runs before `super()`."
|
|
23070
|
+
},
|
|
23071
|
+
{
|
|
23072
|
+
"kind": "method",
|
|
23073
|
+
"name": "getSuggestions",
|
|
23074
|
+
"return": {
|
|
23075
|
+
"type": {
|
|
23076
|
+
"text": "Promise<string[]>"
|
|
23077
|
+
}
|
|
23078
|
+
},
|
|
23079
|
+
"parameters": [
|
|
23080
|
+
{
|
|
23081
|
+
"name": "history",
|
|
23082
|
+
"type": {
|
|
23083
|
+
"text": "ChatMessage[]"
|
|
23084
|
+
}
|
|
23085
|
+
},
|
|
23086
|
+
{
|
|
23087
|
+
"name": "prompt",
|
|
23088
|
+
"type": {
|
|
23089
|
+
"text": "string"
|
|
23090
|
+
}
|
|
23091
|
+
},
|
|
23092
|
+
{
|
|
23093
|
+
"name": "count",
|
|
23094
|
+
"type": {
|
|
23095
|
+
"text": "number"
|
|
23096
|
+
}
|
|
23097
|
+
},
|
|
23098
|
+
{
|
|
23099
|
+
"name": "allAgentInfo",
|
|
23100
|
+
"optional": true,
|
|
23101
|
+
"type": {
|
|
23102
|
+
"text": "AllAgentSummary[]"
|
|
23103
|
+
}
|
|
23104
|
+
}
|
|
23105
|
+
],
|
|
23106
|
+
"inheritedFrom": {
|
|
23107
|
+
"name": "BaseDriverDecorator",
|
|
23108
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
23109
|
+
}
|
|
23110
|
+
},
|
|
23111
|
+
{
|
|
23112
|
+
"kind": "method",
|
|
23113
|
+
"name": "sendMessage",
|
|
23114
|
+
"return": {
|
|
23115
|
+
"type": {
|
|
23116
|
+
"text": "Promise<ChatDriverResult>"
|
|
23117
|
+
}
|
|
23118
|
+
},
|
|
23119
|
+
"parameters": [
|
|
23120
|
+
{
|
|
23121
|
+
"name": "input",
|
|
23122
|
+
"type": {
|
|
23123
|
+
"text": "string"
|
|
23124
|
+
}
|
|
23125
|
+
},
|
|
23126
|
+
{
|
|
23127
|
+
"name": "attachments",
|
|
23128
|
+
"optional": true,
|
|
23129
|
+
"type": {
|
|
23130
|
+
"text": "ChatAttachment[]"
|
|
23131
|
+
}
|
|
23132
|
+
},
|
|
23133
|
+
{
|
|
23134
|
+
"name": "options",
|
|
23135
|
+
"optional": true,
|
|
23136
|
+
"type": {
|
|
23137
|
+
"text": "SendMessageOptions"
|
|
23138
|
+
}
|
|
23139
|
+
}
|
|
23140
|
+
],
|
|
23141
|
+
"inheritedFrom": {
|
|
23142
|
+
"name": "BaseDriverDecorator",
|
|
23143
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
23144
|
+
}
|
|
23145
|
+
},
|
|
23146
|
+
{
|
|
23147
|
+
"kind": "method",
|
|
23148
|
+
"name": "runOrchestratedTurn",
|
|
23149
|
+
"privacy": "private",
|
|
23150
|
+
"return": {
|
|
23151
|
+
"type": {
|
|
23152
|
+
"text": "Promise<ChatDriverResult>"
|
|
23153
|
+
}
|
|
23154
|
+
},
|
|
23155
|
+
"parameters": [
|
|
23156
|
+
{
|
|
23157
|
+
"name": "input",
|
|
23158
|
+
"type": {
|
|
23159
|
+
"text": "string"
|
|
23160
|
+
}
|
|
23161
|
+
},
|
|
23162
|
+
{
|
|
23163
|
+
"name": "attachments",
|
|
23164
|
+
"type": {
|
|
23165
|
+
"text": "ChatAttachment[] | undefined"
|
|
23166
|
+
}
|
|
23167
|
+
},
|
|
23168
|
+
{
|
|
23169
|
+
"name": "options",
|
|
23170
|
+
"type": {
|
|
23171
|
+
"text": "SendMessageOptions | undefined"
|
|
23172
|
+
}
|
|
23173
|
+
},
|
|
23174
|
+
{
|
|
23175
|
+
"name": "delegated",
|
|
23176
|
+
"type": {
|
|
23177
|
+
"text": "Pick<ChatMessage, 'delegate' | 'delegateFraming' | 'externalCostUsd'>"
|
|
23178
|
+
}
|
|
23179
|
+
}
|
|
23180
|
+
]
|
|
23181
|
+
},
|
|
23182
|
+
{
|
|
23183
|
+
"kind": "method",
|
|
23184
|
+
"name": "carryOn",
|
|
23185
|
+
"privacy": "private",
|
|
23186
|
+
"return": {
|
|
23187
|
+
"type": {
|
|
23188
|
+
"text": "Promise<ChatDriverResult>"
|
|
23189
|
+
}
|
|
23190
|
+
},
|
|
23191
|
+
"parameters": [
|
|
23192
|
+
{
|
|
23193
|
+
"name": "result",
|
|
23194
|
+
"type": {
|
|
23195
|
+
"text": "ChatDriverResult"
|
|
23196
|
+
}
|
|
23197
|
+
}
|
|
23198
|
+
],
|
|
23199
|
+
"description": "Act on what the agent call that just ended asked for, and run the next agent in the same user\nturn while there is one (GENC-1737): a `handOff` runs its target with the brief, and a target\nthat releases hands back to its caller. Returns the last call's result.\n\nA failed call ends the turn there, as a Stop does: what it asked for still happens, and the\nnext agent runs on the next message. Running it now would meet the same wall (a budget, a\nrefused account, a full context window), or build on a reply that never came."
|
|
23200
|
+
},
|
|
23201
|
+
{
|
|
23202
|
+
"kind": "method",
|
|
23203
|
+
"name": "afterAgentCall",
|
|
23204
|
+
"privacy": "private",
|
|
23205
|
+
"return": {
|
|
23206
|
+
"type": {
|
|
23207
|
+
"text": "Promise<string | undefined>"
|
|
23208
|
+
}
|
|
23209
|
+
},
|
|
23210
|
+
"description": "After one agent call: start the hand-off it asked for, or release it and, when it was a\nhand-off's target, hand back. Returns the tail note for the agent to run next, or `undefined`\nwhen the turn ends here.\n\nA plain target hands back when its call ends, released or not, as a plain agent is done once\nit has answered. A stateful one holds the hand-off until it releases, as it holds its flow."
|
|
23211
|
+
},
|
|
23212
|
+
{
|
|
23213
|
+
"kind": "method",
|
|
23214
|
+
"name": "outcomeOf",
|
|
23215
|
+
"privacy": "private",
|
|
23216
|
+
"return": {
|
|
23217
|
+
"type": {
|
|
23218
|
+
"text": "HandOffOutcome"
|
|
23219
|
+
}
|
|
23220
|
+
},
|
|
23221
|
+
"parameters": [
|
|
23222
|
+
{
|
|
23223
|
+
"name": "frame",
|
|
23224
|
+
"type": {
|
|
23225
|
+
"text": "HandOffFrame"
|
|
23226
|
+
}
|
|
23227
|
+
}
|
|
23228
|
+
],
|
|
23229
|
+
"description": "How the target of `frame` finished: with `completeHandOff`, or a release and its last reply."
|
|
23230
|
+
},
|
|
23231
|
+
{
|
|
23232
|
+
"kind": "method",
|
|
23233
|
+
"name": "endPlainTurn",
|
|
23234
|
+
"privacy": "private",
|
|
23235
|
+
"return": {
|
|
23236
|
+
"type": {
|
|
23237
|
+
"text": "void"
|
|
23238
|
+
}
|
|
23239
|
+
},
|
|
23240
|
+
"parameters": [
|
|
23241
|
+
{
|
|
23242
|
+
"name": "agent",
|
|
23243
|
+
"type": {
|
|
23244
|
+
"text": "AgentConfig"
|
|
23245
|
+
}
|
|
23246
|
+
}
|
|
23247
|
+
],
|
|
23248
|
+
"description": "A plain agent is done once it has answered (GENC-1737): the data a one-way hand-off gave it ends\nwith its turn, and so does a flow lock no hand-off holds, such as one a restore left on a\ntarget whose hand-off it could not resume."
|
|
23249
|
+
},
|
|
23250
|
+
{
|
|
23251
|
+
"kind": "method",
|
|
23252
|
+
"name": "canRestoreFlowOwner",
|
|
23253
|
+
"return": {
|
|
23254
|
+
"type": {
|
|
23255
|
+
"text": "boolean"
|
|
23256
|
+
}
|
|
23257
|
+
},
|
|
23258
|
+
"parameters": [
|
|
23259
|
+
{
|
|
23260
|
+
"name": "agentName",
|
|
23261
|
+
"type": {
|
|
23262
|
+
"text": "string"
|
|
23263
|
+
}
|
|
23264
|
+
}
|
|
23265
|
+
],
|
|
23266
|
+
"description": "{@inheritDoc AiDriver.canRestoreFlowOwner}",
|
|
23267
|
+
"inheritedFrom": {
|
|
23268
|
+
"name": "BaseDriverDecorator",
|
|
23269
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
23270
|
+
}
|
|
23271
|
+
},
|
|
23272
|
+
{
|
|
23273
|
+
"kind": "method",
|
|
23274
|
+
"name": "canResumeRestoredFlow",
|
|
23275
|
+
"return": {
|
|
23276
|
+
"type": {
|
|
23277
|
+
"text": "boolean"
|
|
23278
|
+
}
|
|
23279
|
+
},
|
|
23280
|
+
"parameters": [
|
|
23281
|
+
{
|
|
23282
|
+
"name": "agentName",
|
|
23283
|
+
"type": {
|
|
23284
|
+
"text": "string"
|
|
23285
|
+
}
|
|
23286
|
+
}
|
|
23287
|
+
],
|
|
23288
|
+
"description": "{@inheritDoc AiDriver.canResumeRestoredFlow}",
|
|
23289
|
+
"inheritedFrom": {
|
|
23290
|
+
"name": "BaseDriverDecorator",
|
|
23291
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
23292
|
+
}
|
|
23293
|
+
},
|
|
23294
|
+
{
|
|
23295
|
+
"kind": "method",
|
|
23296
|
+
"name": "resumeRestoredFlow",
|
|
23297
|
+
"return": {
|
|
23298
|
+
"type": {
|
|
23299
|
+
"text": "Promise<ChatDriverResult | undefined>"
|
|
23300
|
+
}
|
|
23301
|
+
},
|
|
23302
|
+
"parameters": [
|
|
23303
|
+
{
|
|
23304
|
+
"name": "resumeNote",
|
|
23305
|
+
"optional": true,
|
|
23306
|
+
"type": {
|
|
23307
|
+
"text": "string"
|
|
23308
|
+
}
|
|
23309
|
+
}
|
|
23310
|
+
],
|
|
23311
|
+
"description": "{@inheritDoc AiDriver.resumeRestoredFlow}\n\nInstalls the flow owner directly rather than through `handleTurn`: there is no user message\nto classify, and a restored lock already says which agent owns the flow. `continueFromHistory`\non its own would not do — it neither routes nor installs, so it would run on whatever agent\nhappened to be installed (none, straight after a reload).\n\nLooks the owner up in its own agents list, so the `agent` argument is not needed and is\nignored; and does not delegate to the inner driver's resume, which would install the agent\nundecorated.",
|
|
23312
|
+
"inheritedFrom": {
|
|
23313
|
+
"name": "BaseDriverDecorator",
|
|
23314
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
23315
|
+
}
|
|
23316
|
+
},
|
|
23317
|
+
{
|
|
23318
|
+
"kind": "method",
|
|
23319
|
+
"name": "resumeHandBack",
|
|
23320
|
+
"privacy": "private",
|
|
23321
|
+
"return": {
|
|
23322
|
+
"type": {
|
|
23323
|
+
"text": "Promise<ChatDriverResult | undefined>"
|
|
23324
|
+
}
|
|
23325
|
+
},
|
|
23326
|
+
"parameters": [
|
|
23327
|
+
{
|
|
23328
|
+
"name": "note",
|
|
23329
|
+
"optional": true,
|
|
23330
|
+
"type": {
|
|
23331
|
+
"text": "string"
|
|
23332
|
+
}
|
|
23333
|
+
}
|
|
23334
|
+
],
|
|
23335
|
+
"description": "The hand-back a restore found due (GENC-1737). The first call, inside the host's restore gate,\nmakes the caller active again and tells it the outcome; the call with the note runs its turn."
|
|
23336
|
+
},
|
|
23337
|
+
{
|
|
23338
|
+
"kind": "method",
|
|
23339
|
+
"name": "continueFromHistory",
|
|
23340
|
+
"return": {
|
|
23341
|
+
"type": {
|
|
23342
|
+
"text": "Promise<ChatDriverResult>"
|
|
23343
|
+
}
|
|
23344
|
+
},
|
|
23345
|
+
"parameters": [
|
|
23346
|
+
{
|
|
23347
|
+
"name": "transientPrimer",
|
|
23348
|
+
"optional": true,
|
|
23349
|
+
"type": {
|
|
23350
|
+
"text": "ChatMessage[]"
|
|
23351
|
+
}
|
|
23352
|
+
},
|
|
23353
|
+
{
|
|
23354
|
+
"name": "options",
|
|
23355
|
+
"optional": true,
|
|
23356
|
+
"type": {
|
|
23357
|
+
"text": "ContinueFromHistoryOptions"
|
|
23358
|
+
}
|
|
23359
|
+
}
|
|
23360
|
+
],
|
|
23361
|
+
"description": "A continuation outside a routed turn — a decorator carrying the agent on, say — can finish the\nflow as surely as a turn can, so a release it requests is acted on here too. Before\n(GENC-1660), only `sendMessage` checked, and a flow finished by a continuation stayed locked.",
|
|
23362
|
+
"inheritedFrom": {
|
|
23363
|
+
"name": "BaseDriverDecorator",
|
|
23364
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
23365
|
+
}
|
|
23366
|
+
},
|
|
23367
|
+
{
|
|
23368
|
+
"kind": "method",
|
|
23369
|
+
"name": "getContextReserve",
|
|
23370
|
+
"return": {
|
|
23371
|
+
"type": {
|
|
23372
|
+
"text": "ContextReserveResolution | undefined"
|
|
23373
|
+
}
|
|
23374
|
+
},
|
|
23375
|
+
"description": "{@inheritDoc AiDriver.getContextReserve}\n\nTwo cases, because routing has two modes and they need opposite answers.",
|
|
23376
|
+
"inheritedFrom": {
|
|
23377
|
+
"name": "BaseDriverDecorator",
|
|
23378
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
23379
|
+
}
|
|
23380
|
+
},
|
|
23381
|
+
{
|
|
23382
|
+
"kind": "method",
|
|
23383
|
+
"name": "installAgent",
|
|
23384
|
+
"privacy": "private",
|
|
23385
|
+
"return": {
|
|
23386
|
+
"type": {
|
|
23387
|
+
"text": "Promise<void>"
|
|
23388
|
+
}
|
|
23389
|
+
},
|
|
23390
|
+
"parameters": [
|
|
23391
|
+
{
|
|
23392
|
+
"name": "agent",
|
|
23393
|
+
"type": {
|
|
23394
|
+
"text": "AgentConfig"
|
|
23395
|
+
}
|
|
23396
|
+
}
|
|
23397
|
+
],
|
|
23398
|
+
"description": "Make `agent` active through the session, firing its hooks, and install it."
|
|
23399
|
+
},
|
|
23400
|
+
{
|
|
23401
|
+
"kind": "method",
|
|
23402
|
+
"name": "applyAgent",
|
|
23403
|
+
"privacy": "private",
|
|
23404
|
+
"return": {
|
|
23405
|
+
"type": {
|
|
23406
|
+
"text": "void"
|
|
23407
|
+
}
|
|
23408
|
+
},
|
|
23409
|
+
"parameters": [
|
|
23410
|
+
{
|
|
23411
|
+
"name": "agent",
|
|
23412
|
+
"type": {
|
|
23413
|
+
"text": "AgentConfig"
|
|
23414
|
+
}
|
|
23415
|
+
},
|
|
23416
|
+
{
|
|
23417
|
+
"name": "previousName",
|
|
23418
|
+
"type": {
|
|
23419
|
+
"text": "string | undefined"
|
|
23420
|
+
}
|
|
23421
|
+
}
|
|
23422
|
+
],
|
|
23423
|
+
"description": "Install an agent the session has already made active on the inner driver: the transcript's\ndivider when another agent spoke before it, and its own view of the history. What is left here\nis this driver's own job, the transcript; the session owns the lifecycle."
|
|
23424
|
+
},
|
|
23425
|
+
{
|
|
23426
|
+
"kind": "method",
|
|
23427
|
+
"name": "releaseActiveAgent",
|
|
23428
|
+
"privacy": "private",
|
|
23429
|
+
"return": {
|
|
23430
|
+
"type": {
|
|
23431
|
+
"text": "Promise<void>"
|
|
23432
|
+
}
|
|
23433
|
+
},
|
|
23434
|
+
"description": "Release the current stateful agent: fire `onDeactivate` and clear the flow-owner lock. The\ninner driver raises the events from the session's transition, so the host (and Redux) reflect\nthe unlocked state (GENC-1485). Called automatically when a tool handler invokes\n`context.releaseAgent`.\n\nThe user-pin (`pinnedAgentName`) is intentionally *not* cleared — a user\nwho explicitly picked this agent should stay on it after the flow ends,\nso the next message starts a fresh flow on the same agent rather than\nrouting through the classifier."
|
|
22380
23435
|
},
|
|
22381
23436
|
{
|
|
22382
23437
|
"kind": "method",
|
|
22383
|
-
"name": "
|
|
23438
|
+
"name": "agentNamed",
|
|
22384
23439
|
"privacy": "private",
|
|
22385
|
-
"static": true,
|
|
22386
23440
|
"return": {
|
|
22387
23441
|
"type": {
|
|
22388
|
-
"text": "
|
|
23442
|
+
"text": "AgentConfig | undefined"
|
|
22389
23443
|
}
|
|
22390
23444
|
},
|
|
22391
23445
|
"parameters": [
|
|
22392
23446
|
{
|
|
22393
|
-
"name": "
|
|
22394
|
-
"type": {
|
|
22395
|
-
"text": "AIProviderRegistry"
|
|
22396
|
-
}
|
|
22397
|
-
},
|
|
22398
|
-
{
|
|
22399
|
-
"name": "agents",
|
|
22400
|
-
"type": {
|
|
22401
|
-
"text": "AgentConfig[]"
|
|
22402
|
-
}
|
|
22403
|
-
},
|
|
22404
|
-
{
|
|
22405
|
-
"name": "options",
|
|
22406
|
-
"default": "{}",
|
|
23447
|
+
"name": "name",
|
|
22407
23448
|
"type": {
|
|
22408
|
-
"text": "
|
|
23449
|
+
"text": "string"
|
|
22409
23450
|
}
|
|
22410
23451
|
}
|
|
22411
23452
|
],
|
|
22412
|
-
"description": "
|
|
23453
|
+
"description": "The agent named `name` as this driver installs it: the fallback with its prompt built."
|
|
22413
23454
|
},
|
|
22414
23455
|
{
|
|
22415
23456
|
"kind": "method",
|
|
22416
|
-
"name": "
|
|
23457
|
+
"name": "endOrphanedHandOffs",
|
|
23458
|
+
"privacy": "private",
|
|
22417
23459
|
"return": {
|
|
22418
23460
|
"type": {
|
|
22419
|
-
"text": "Promise<
|
|
23461
|
+
"text": "Promise<void>"
|
|
22420
23462
|
}
|
|
22421
23463
|
},
|
|
22422
23464
|
"parameters": [
|
|
22423
23465
|
{
|
|
22424
|
-
"name": "
|
|
22425
|
-
"type": {
|
|
22426
|
-
"text": "ChatMessage[]"
|
|
22427
|
-
}
|
|
22428
|
-
},
|
|
22429
|
-
{
|
|
22430
|
-
"name": "prompt",
|
|
23466
|
+
"name": "agent",
|
|
22431
23467
|
"type": {
|
|
22432
|
-
"text": "
|
|
23468
|
+
"text": "AgentConfig"
|
|
22433
23469
|
}
|
|
22434
|
-
}
|
|
23470
|
+
}
|
|
23471
|
+
],
|
|
23472
|
+
"description": "End the hand-offs when a turn runs an agent other than the top target (GENC-1737): the lock\nthat kept turns on the target was taken away, by a host clearing `flowOwnerAgentName` say,\nand its caller would otherwise wait for good."
|
|
23473
|
+
},
|
|
23474
|
+
{
|
|
23475
|
+
"kind": "method",
|
|
23476
|
+
"name": "checkHandOff",
|
|
23477
|
+
"privacy": "private",
|
|
23478
|
+
"return": {
|
|
23479
|
+
"type": {
|
|
23480
|
+
"text": "HandOffResult"
|
|
23481
|
+
}
|
|
23482
|
+
},
|
|
23483
|
+
"parameters": [
|
|
22435
23484
|
{
|
|
22436
|
-
"name": "
|
|
23485
|
+
"name": "request",
|
|
22437
23486
|
"type": {
|
|
22438
|
-
"text": "
|
|
23487
|
+
"text": "HandOffRequest"
|
|
22439
23488
|
}
|
|
22440
23489
|
},
|
|
22441
23490
|
{
|
|
22442
|
-
"name": "
|
|
22443
|
-
"optional": true,
|
|
23491
|
+
"name": "caller",
|
|
22444
23492
|
"type": {
|
|
22445
|
-
"text": "
|
|
23493
|
+
"text": "string | undefined"
|
|
22446
23494
|
}
|
|
22447
23495
|
}
|
|
22448
23496
|
],
|
|
22449
|
-
"
|
|
22450
|
-
"name": "BaseDriverDecorator",
|
|
22451
|
-
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
22452
|
-
}
|
|
23497
|
+
"description": "Check a handler's `handOff` when it is made (GENC-1737), so a refusal reaches its model. Checked\nagainst the agents and the stack as they are now; the hand-off itself starts after the call."
|
|
22453
23498
|
},
|
|
22454
23499
|
{
|
|
22455
23500
|
"kind": "method",
|
|
22456
|
-
"name": "
|
|
23501
|
+
"name": "startHandOff",
|
|
23502
|
+
"privacy": "private",
|
|
22457
23503
|
"return": {
|
|
22458
23504
|
"type": {
|
|
22459
|
-
"text": "Promise<
|
|
23505
|
+
"text": "Promise<string | undefined>"
|
|
22460
23506
|
}
|
|
22461
23507
|
},
|
|
22462
23508
|
"parameters": [
|
|
22463
23509
|
{
|
|
22464
|
-
"name": "
|
|
23510
|
+
"name": "request",
|
|
22465
23511
|
"type": {
|
|
22466
|
-
"text": "
|
|
23512
|
+
"text": "HandOffRequest"
|
|
22467
23513
|
}
|
|
22468
|
-
}
|
|
23514
|
+
}
|
|
23515
|
+
],
|
|
23516
|
+
"description": "Start the hand-off the agent call just made, and return the target's tail note (GENC-1737).\n\n- `returnTo` (the default): push a frame. The caller waits without being deactivated, its\n `agentEnd` payloads suspended, and the target takes the flow lock.\n- One-way from a hand-off's target: that frame's caller now waits for the new target instead.\n- One-way with nobody waiting: a plain switch, the caller deactivated as on any swap.\n\nEither way the brief is recorded as a message the caller sent on the user's behalf."
|
|
23517
|
+
},
|
|
23518
|
+
{
|
|
23519
|
+
"kind": "method",
|
|
23520
|
+
"name": "handBack",
|
|
23521
|
+
"privacy": "private",
|
|
23522
|
+
"return": {
|
|
23523
|
+
"type": {
|
|
23524
|
+
"text": "Promise<string | undefined>"
|
|
23525
|
+
}
|
|
23526
|
+
},
|
|
23527
|
+
"parameters": [
|
|
22469
23528
|
{
|
|
22470
|
-
"name": "
|
|
22471
|
-
"optional": true,
|
|
23529
|
+
"name": "frame",
|
|
22472
23530
|
"type": {
|
|
22473
|
-
"text": "
|
|
23531
|
+
"text": "HandOffFrame"
|
|
22474
23532
|
}
|
|
22475
23533
|
},
|
|
22476
23534
|
{
|
|
22477
|
-
"name": "
|
|
22478
|
-
"optional": true,
|
|
23535
|
+
"name": "outcome",
|
|
22479
23536
|
"type": {
|
|
22480
|
-
"text": "
|
|
23537
|
+
"text": "HandOffOutcome"
|
|
22481
23538
|
}
|
|
22482
23539
|
}
|
|
22483
23540
|
],
|
|
22484
|
-
"
|
|
22485
|
-
"name": "BaseDriverDecorator",
|
|
22486
|
-
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
22487
|
-
}
|
|
23541
|
+
"description": "Hand back to `frame`'s caller with `outcome`, and return its tail note (GENC-1737). The outcome\nis kept on the frame until the caller is active again and its `onHandOffReturn` has run, so a\nreload in between still hands back; the frame then goes, before the caller's model call."
|
|
22488
23542
|
},
|
|
22489
23543
|
{
|
|
22490
23544
|
"kind": "method",
|
|
22491
|
-
"name": "
|
|
23545
|
+
"name": "topFrameFor",
|
|
22492
23546
|
"privacy": "private",
|
|
22493
23547
|
"return": {
|
|
22494
23548
|
"type": {
|
|
22495
|
-
"text": "
|
|
23549
|
+
"text": "HandOffFrame | undefined"
|
|
22496
23550
|
}
|
|
22497
23551
|
},
|
|
22498
23552
|
"parameters": [
|
|
22499
23553
|
{
|
|
22500
|
-
"name": "
|
|
23554
|
+
"name": "agent",
|
|
22501
23555
|
"type": {
|
|
22502
23556
|
"text": "string"
|
|
22503
23557
|
}
|
|
22504
|
-
},
|
|
22505
|
-
{
|
|
22506
|
-
"name": "attachments",
|
|
22507
|
-
"type": {
|
|
22508
|
-
"text": "ChatAttachment[] | undefined"
|
|
22509
|
-
}
|
|
22510
|
-
},
|
|
22511
|
-
{
|
|
22512
|
-
"name": "options",
|
|
22513
|
-
"type": {
|
|
22514
|
-
"text": "SendMessageOptions | undefined"
|
|
22515
|
-
}
|
|
22516
|
-
},
|
|
22517
|
-
{
|
|
22518
|
-
"name": "delegated",
|
|
22519
|
-
"type": {
|
|
22520
|
-
"text": "Pick<ChatMessage, 'delegate' | 'delegateFraming' | 'externalCostUsd'>"
|
|
22521
|
-
}
|
|
22522
23558
|
}
|
|
22523
|
-
]
|
|
23559
|
+
],
|
|
23560
|
+
"description": "The top frame, when `agent` is its target."
|
|
22524
23561
|
},
|
|
22525
23562
|
{
|
|
22526
23563
|
"kind": "method",
|
|
22527
|
-
"name": "
|
|
23564
|
+
"name": "lastReply",
|
|
23565
|
+
"privacy": "private",
|
|
22528
23566
|
"return": {
|
|
22529
23567
|
"type": {
|
|
22530
|
-
"text": "
|
|
23568
|
+
"text": "string | undefined"
|
|
22531
23569
|
}
|
|
22532
23570
|
},
|
|
22533
23571
|
"parameters": [
|
|
22534
23572
|
{
|
|
22535
|
-
"name": "
|
|
23573
|
+
"name": "frame",
|
|
22536
23574
|
"type": {
|
|
22537
|
-
"text": "
|
|
23575
|
+
"text": "HandOffFrame"
|
|
22538
23576
|
}
|
|
22539
23577
|
}
|
|
22540
23578
|
],
|
|
22541
|
-
"description": "
|
|
22542
|
-
"inheritedFrom": {
|
|
22543
|
-
"name": "BaseDriverDecorator",
|
|
22544
|
-
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
22545
|
-
}
|
|
23579
|
+
"description": "The target's last reply since its brief, for a target that released without a summary."
|
|
22546
23580
|
},
|
|
22547
23581
|
{
|
|
22548
23582
|
"kind": "method",
|
|
22549
|
-
"name": "
|
|
23583
|
+
"name": "recordDelegated",
|
|
23584
|
+
"privacy": "private",
|
|
22550
23585
|
"return": {
|
|
22551
23586
|
"type": {
|
|
22552
|
-
"text": "
|
|
23587
|
+
"text": "void"
|
|
22553
23588
|
}
|
|
22554
23589
|
},
|
|
22555
23590
|
"parameters": [
|
|
22556
23591
|
{
|
|
22557
|
-
"name": "
|
|
23592
|
+
"name": "from",
|
|
23593
|
+
"type": {
|
|
23594
|
+
"text": "string"
|
|
23595
|
+
}
|
|
23596
|
+
},
|
|
23597
|
+
{
|
|
23598
|
+
"name": "message",
|
|
23599
|
+
"type": {
|
|
23600
|
+
"text": "string"
|
|
23601
|
+
}
|
|
23602
|
+
},
|
|
23603
|
+
{
|
|
23604
|
+
"name": "framing",
|
|
22558
23605
|
"type": {
|
|
22559
23606
|
"text": "string"
|
|
22560
23607
|
}
|
|
22561
23608
|
}
|
|
22562
23609
|
],
|
|
22563
|
-
"description": "
|
|
22564
|
-
"inheritedFrom": {
|
|
22565
|
-
"name": "BaseDriverDecorator",
|
|
22566
|
-
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
22567
|
-
}
|
|
23610
|
+
"description": "The brief, in the transcript as a message the caller sent on the user's behalf."
|
|
22568
23611
|
},
|
|
22569
23612
|
{
|
|
22570
23613
|
"kind": "method",
|
|
22571
|
-
"name": "
|
|
23614
|
+
"name": "unwound",
|
|
23615
|
+
"privacy": "private",
|
|
22572
23616
|
"return": {
|
|
22573
23617
|
"type": {
|
|
22574
|
-
"text": "
|
|
23618
|
+
"text": "void"
|
|
22575
23619
|
}
|
|
22576
23620
|
},
|
|
22577
23621
|
"parameters": [
|
|
22578
23622
|
{
|
|
22579
|
-
"name": "
|
|
22580
|
-
"optional": true,
|
|
23623
|
+
"name": "frame",
|
|
22581
23624
|
"type": {
|
|
22582
|
-
"text": "
|
|
23625
|
+
"text": "HandOffFrame"
|
|
23626
|
+
}
|
|
23627
|
+
},
|
|
23628
|
+
{
|
|
23629
|
+
"name": "kind",
|
|
23630
|
+
"type": {
|
|
23631
|
+
"text": "HandOffOutcome['kind']"
|
|
22583
23632
|
}
|
|
22584
23633
|
}
|
|
22585
23634
|
],
|
|
22586
|
-
"description": "
|
|
23635
|
+
"description": "End `frame` with `kind` and no hand-back, for the host."
|
|
23636
|
+
},
|
|
23637
|
+
{
|
|
23638
|
+
"kind": "method",
|
|
23639
|
+
"name": "getHandOffStack",
|
|
23640
|
+
"return": {
|
|
23641
|
+
"type": {
|
|
23642
|
+
"text": "HandOffFrame[]"
|
|
23643
|
+
}
|
|
23644
|
+
},
|
|
23645
|
+
"description": "{@inheritDoc AiDriver.getHandOffStack}",
|
|
22587
23646
|
"inheritedFrom": {
|
|
22588
23647
|
"name": "BaseDriverDecorator",
|
|
22589
23648
|
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
@@ -22591,29 +23650,33 @@
|
|
|
22591
23650
|
},
|
|
22592
23651
|
{
|
|
22593
23652
|
"kind": "method",
|
|
22594
|
-
"name": "
|
|
23653
|
+
"name": "restoreHandOffStack",
|
|
22595
23654
|
"return": {
|
|
22596
23655
|
"type": {
|
|
22597
|
-
"text": "
|
|
23656
|
+
"text": "{ resume?: { agent: string; note: string }; droppedLocks?: string[] }"
|
|
22598
23657
|
}
|
|
22599
23658
|
},
|
|
22600
23659
|
"parameters": [
|
|
22601
23660
|
{
|
|
22602
|
-
"name": "
|
|
22603
|
-
"optional": true,
|
|
23661
|
+
"name": "saved",
|
|
22604
23662
|
"type": {
|
|
22605
|
-
"text": "
|
|
23663
|
+
"text": "unknown"
|
|
22606
23664
|
}
|
|
22607
23665
|
},
|
|
22608
23666
|
{
|
|
22609
|
-
"name": "
|
|
22610
|
-
"optional": true,
|
|
23667
|
+
"name": "savedStates",
|
|
22611
23668
|
"type": {
|
|
22612
|
-
"text": "
|
|
23669
|
+
"text": "Record<string, unknown>"
|
|
23670
|
+
}
|
|
23671
|
+
},
|
|
23672
|
+
{
|
|
23673
|
+
"name": "interrupted",
|
|
23674
|
+
"type": {
|
|
23675
|
+
"text": "boolean"
|
|
22613
23676
|
}
|
|
22614
23677
|
}
|
|
22615
23678
|
],
|
|
22616
|
-
"description": "
|
|
23679
|
+
"description": "{@inheritDoc AiDriver.restoreHandOffStack}",
|
|
22617
23680
|
"inheritedFrom": {
|
|
22618
23681
|
"name": "BaseDriverDecorator",
|
|
22619
23682
|
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
@@ -22621,24 +23684,35 @@
|
|
|
22621
23684
|
},
|
|
22622
23685
|
{
|
|
22623
23686
|
"kind": "method",
|
|
22624
|
-
"name": "
|
|
22625
|
-
"privacy": "private",
|
|
23687
|
+
"name": "unwindHandOffs",
|
|
22626
23688
|
"return": {
|
|
22627
23689
|
"type": {
|
|
22628
23690
|
"text": "Promise<void>"
|
|
22629
23691
|
}
|
|
22630
23692
|
},
|
|
22631
|
-
"
|
|
23693
|
+
"parameters": [
|
|
23694
|
+
{
|
|
23695
|
+
"name": "kind",
|
|
23696
|
+
"type": {
|
|
23697
|
+
"text": "'cleared' | 'state-lost'"
|
|
23698
|
+
}
|
|
23699
|
+
}
|
|
23700
|
+
],
|
|
23701
|
+
"description": "{@inheritDoc AiDriver.unwindHandOffs}",
|
|
23702
|
+
"inheritedFrom": {
|
|
23703
|
+
"name": "BaseDriverDecorator",
|
|
23704
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
23705
|
+
}
|
|
22632
23706
|
},
|
|
22633
23707
|
{
|
|
22634
23708
|
"kind": "method",
|
|
22635
|
-
"name": "
|
|
23709
|
+
"name": "getHandOffData",
|
|
22636
23710
|
"return": {
|
|
22637
23711
|
"type": {
|
|
22638
|
-
"text": "
|
|
23712
|
+
"text": "Record<string, unknown>"
|
|
22639
23713
|
}
|
|
22640
23714
|
},
|
|
22641
|
-
"description": "{@inheritDoc AiDriver.
|
|
23715
|
+
"description": "{@inheritDoc AiDriver.getHandOffData}",
|
|
22642
23716
|
"inheritedFrom": {
|
|
22643
23717
|
"name": "BaseDriverDecorator",
|
|
22644
23718
|
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
@@ -22646,40 +23720,45 @@
|
|
|
22646
23720
|
},
|
|
22647
23721
|
{
|
|
22648
23722
|
"kind": "method",
|
|
22649
|
-
"name": "
|
|
22650
|
-
"privacy": "private",
|
|
23723
|
+
"name": "restoreHandOffData",
|
|
22651
23724
|
"return": {
|
|
22652
23725
|
"type": {
|
|
22653
|
-
"text": "
|
|
23726
|
+
"text": "void"
|
|
22654
23727
|
}
|
|
22655
23728
|
},
|
|
22656
23729
|
"parameters": [
|
|
22657
23730
|
{
|
|
22658
|
-
"name": "
|
|
23731
|
+
"name": "saved",
|
|
22659
23732
|
"type": {
|
|
22660
|
-
"text": "
|
|
23733
|
+
"text": "unknown"
|
|
22661
23734
|
}
|
|
22662
23735
|
},
|
|
22663
23736
|
{
|
|
22664
|
-
"name": "
|
|
22665
|
-
"optional": true,
|
|
23737
|
+
"name": "interrupted",
|
|
22666
23738
|
"type": {
|
|
22667
|
-
"text": "
|
|
23739
|
+
"text": "boolean"
|
|
22668
23740
|
}
|
|
22669
23741
|
}
|
|
22670
23742
|
],
|
|
22671
|
-
"description": "
|
|
23743
|
+
"description": "{@inheritDoc AiDriver.restoreHandOffData}",
|
|
23744
|
+
"inheritedFrom": {
|
|
23745
|
+
"name": "BaseDriverDecorator",
|
|
23746
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
23747
|
+
}
|
|
22672
23748
|
},
|
|
22673
23749
|
{
|
|
22674
23750
|
"kind": "method",
|
|
22675
|
-
"name": "
|
|
22676
|
-
"privacy": "private",
|
|
23751
|
+
"name": "serializeWaitingCallers",
|
|
22677
23752
|
"return": {
|
|
22678
23753
|
"type": {
|
|
22679
|
-
"text": "
|
|
23754
|
+
"text": "Record<string, unknown>"
|
|
22680
23755
|
}
|
|
22681
23756
|
},
|
|
22682
|
-
"description": "
|
|
23757
|
+
"description": "{@inheritDoc AiDriver.serializeWaitingCallers}",
|
|
23758
|
+
"inheritedFrom": {
|
|
23759
|
+
"name": "BaseDriverDecorator",
|
|
23760
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
23761
|
+
}
|
|
22683
23762
|
},
|
|
22684
23763
|
{
|
|
22685
23764
|
"kind": "method",
|
|
@@ -22689,7 +23768,7 @@
|
|
|
22689
23768
|
"text": "void"
|
|
22690
23769
|
}
|
|
22691
23770
|
},
|
|
22692
|
-
"description": "Stop the current turn (user \"stop\" button). Cancels the inner chat driver's\nin-flight request and
|
|
23771
|
+
"description": "Stop the current turn (user \"stop\" button). Cancels the inner chat driver's\nin-flight request, and no further agent runs this turn, not even a hand-off's\ntarget or a hand-back. The driver stays usable for the next message.",
|
|
22693
23772
|
"inheritedFrom": {
|
|
22694
23773
|
"name": "BaseDriverDecorator",
|
|
22695
23774
|
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
@@ -22735,7 +23814,7 @@
|
|
|
22735
23814
|
"name": "detail",
|
|
22736
23815
|
"default": "{}",
|
|
22737
23816
|
"type": {
|
|
22738
|
-
"text": "{\n index?: number;\n durationMs?: number;\n attempts?: number;\n error?: string;\n response?: ChatMessage;\n
|
|
23817
|
+
"text": "{\n index?: number;\n durationMs?: number;\n attempts?: number;\n error?: string;\n response?: ChatMessage;\n /**\n * What was actually on the ballot for this classification, in ballot order — so `index`\n * indexes it. Omitted on the decisions that hold no vote at all.\n */\n ballot?: readonly string[];\n }"
|
|
22739
23818
|
}
|
|
22740
23819
|
}
|
|
22741
23820
|
],
|
|
@@ -22788,13 +23867,6 @@
|
|
|
22788
23867
|
"type": {
|
|
22789
23868
|
"text": "AgentConfig"
|
|
22790
23869
|
}
|
|
22791
|
-
},
|
|
22792
|
-
{
|
|
22793
|
-
"name": "excludeAgents",
|
|
22794
|
-
"default": "[]",
|
|
22795
|
-
"type": {
|
|
22796
|
-
"text": "readonly string[]"
|
|
22797
|
-
}
|
|
22798
23870
|
}
|
|
22799
23871
|
]
|
|
22800
23872
|
},
|
|
@@ -22835,7 +23907,7 @@
|
|
|
22835
23907
|
}
|
|
22836
23908
|
}
|
|
22837
23909
|
],
|
|
22838
|
-
"description": "Append prose the ORCHESTRATOR wrote — the
|
|
23910
|
+
"description": "Append prose the ORCHESTRATOR wrote — the no-specialist apology. Flagged\n`excludeFromProvider` for the same reason the driver's own notices are: it is not something a\nmodel said, and feeding it back invites the model to echo it. See\n`ChatMessage.excludeFromProvider`."
|
|
22839
23911
|
},
|
|
22840
23912
|
{
|
|
22841
23913
|
"kind": "field",
|
|
@@ -23466,6 +24538,24 @@
|
|
|
23466
24538
|
"type": {
|
|
23467
24539
|
"text": "CustomEvent"
|
|
23468
24540
|
}
|
|
24541
|
+
},
|
|
24542
|
+
{
|
|
24543
|
+
"name": "handoff-started",
|
|
24544
|
+
"type": {
|
|
24545
|
+
"text": "CustomEvent"
|
|
24546
|
+
}
|
|
24547
|
+
},
|
|
24548
|
+
{
|
|
24549
|
+
"name": "handoff-returned",
|
|
24550
|
+
"type": {
|
|
24551
|
+
"text": "CustomEvent"
|
|
24552
|
+
}
|
|
24553
|
+
},
|
|
24554
|
+
{
|
|
24555
|
+
"name": "handoff-unwound",
|
|
24556
|
+
"type": {
|
|
24557
|
+
"text": "CustomEvent"
|
|
24558
|
+
}
|
|
23469
24559
|
}
|
|
23470
24560
|
],
|
|
23471
24561
|
"superclass": {
|