@genesislcap/ai-assistant 15.90.4 → 15.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +887 -887
- package/package.json +17 -17
|
@@ -5209,6 +5209,237 @@
|
|
|
5209
5209
|
}
|
|
5210
5210
|
]
|
|
5211
5211
|
},
|
|
5212
|
+
{
|
|
5213
|
+
"kind": "javascript-module",
|
|
5214
|
+
"path": "src/config/config.ts",
|
|
5215
|
+
"declarations": [
|
|
5216
|
+
{
|
|
5217
|
+
"kind": "function",
|
|
5218
|
+
"name": "defineAgent",
|
|
5219
|
+
"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```"
|
|
5220
|
+
}
|
|
5221
|
+
],
|
|
5222
|
+
"exports": [
|
|
5223
|
+
{
|
|
5224
|
+
"kind": "js",
|
|
5225
|
+
"name": "CachePolicy",
|
|
5226
|
+
"declaration": {
|
|
5227
|
+
"name": "CachePolicy",
|
|
5228
|
+
"module": "src/config/config.ts"
|
|
5229
|
+
}
|
|
5230
|
+
},
|
|
5231
|
+
{
|
|
5232
|
+
"kind": "js",
|
|
5233
|
+
"name": "ChatFallback",
|
|
5234
|
+
"declaration": {
|
|
5235
|
+
"name": "ChatFallback",
|
|
5236
|
+
"module": "src/config/config.ts"
|
|
5237
|
+
}
|
|
5238
|
+
},
|
|
5239
|
+
{
|
|
5240
|
+
"kind": "js",
|
|
5241
|
+
"name": "ChatInputDuringExecutionMode",
|
|
5242
|
+
"declaration": {
|
|
5243
|
+
"name": "ChatInputDuringExecutionMode",
|
|
5244
|
+
"module": "src/config/config.ts"
|
|
5245
|
+
}
|
|
5246
|
+
},
|
|
5247
|
+
{
|
|
5248
|
+
"kind": "js",
|
|
5249
|
+
"name": "ChatThinkingPolicy",
|
|
5250
|
+
"declaration": {
|
|
5251
|
+
"name": "ChatThinkingPolicy",
|
|
5252
|
+
"module": "src/config/config.ts"
|
|
5253
|
+
}
|
|
5254
|
+
},
|
|
5255
|
+
{
|
|
5256
|
+
"kind": "js",
|
|
5257
|
+
"name": "ChatToolChoice",
|
|
5258
|
+
"declaration": {
|
|
5259
|
+
"name": "ChatToolChoice",
|
|
5260
|
+
"module": "src/config/config.ts"
|
|
5261
|
+
}
|
|
5262
|
+
},
|
|
5263
|
+
{
|
|
5264
|
+
"kind": "js",
|
|
5265
|
+
"name": "defineAgent",
|
|
5266
|
+
"declaration": {
|
|
5267
|
+
"name": "defineAgent",
|
|
5268
|
+
"module": "src/config/config.ts"
|
|
5269
|
+
}
|
|
5270
|
+
}
|
|
5271
|
+
]
|
|
5272
|
+
},
|
|
5273
|
+
{
|
|
5274
|
+
"kind": "javascript-module",
|
|
5275
|
+
"path": "src/config/define-stateful-agent.ts",
|
|
5276
|
+
"declarations": [
|
|
5277
|
+
{
|
|
5278
|
+
"kind": "function",
|
|
5279
|
+
"name": "restoreMachine",
|
|
5280
|
+
"return": {
|
|
5281
|
+
"type": {
|
|
5282
|
+
"text": "void"
|
|
5283
|
+
}
|
|
5284
|
+
},
|
|
5285
|
+
"parameters": [
|
|
5286
|
+
{
|
|
5287
|
+
"name": "machine",
|
|
5288
|
+
"type": {
|
|
5289
|
+
"text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
|
|
5290
|
+
},
|
|
5291
|
+
"description": "the machine to restore (already constructed/started)."
|
|
5292
|
+
},
|
|
5293
|
+
{
|
|
5294
|
+
"name": "restored",
|
|
5295
|
+
"type": {
|
|
5296
|
+
"text": "unknown"
|
|
5297
|
+
},
|
|
5298
|
+
"description": "the agent's serialized image (`ctx.restored` in `init`)."
|
|
5299
|
+
},
|
|
5300
|
+
{
|
|
5301
|
+
"name": "key",
|
|
5302
|
+
"default": "'machine'",
|
|
5303
|
+
"description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
|
|
5304
|
+
}
|
|
5305
|
+
],
|
|
5306
|
+
"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."
|
|
5307
|
+
},
|
|
5308
|
+
{
|
|
5309
|
+
"kind": "function",
|
|
5310
|
+
"name": "defineStatefulAgent",
|
|
5311
|
+
"return": {
|
|
5312
|
+
"type": {
|
|
5313
|
+
"text": "AgentConfig"
|
|
5314
|
+
}
|
|
5315
|
+
},
|
|
5316
|
+
"parameters": [
|
|
5317
|
+
{
|
|
5318
|
+
"name": "opts",
|
|
5319
|
+
"type": {
|
|
5320
|
+
"text": "StatefulAgentInit<S>"
|
|
5321
|
+
}
|
|
5322
|
+
}
|
|
5323
|
+
],
|
|
5324
|
+
"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."
|
|
5325
|
+
},
|
|
5326
|
+
{
|
|
5327
|
+
"kind": "function",
|
|
5328
|
+
"name": "defineAutopilot",
|
|
5329
|
+
"return": {
|
|
5330
|
+
"type": {
|
|
5331
|
+
"text": "AutopilotConfig<S>"
|
|
5332
|
+
}
|
|
5333
|
+
},
|
|
5334
|
+
"parameters": [
|
|
5335
|
+
{
|
|
5336
|
+
"name": "config",
|
|
5337
|
+
"type": {
|
|
5338
|
+
"text": "AutopilotConfig<S>"
|
|
5339
|
+
}
|
|
5340
|
+
}
|
|
5341
|
+
],
|
|
5342
|
+
"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."
|
|
5343
|
+
}
|
|
5344
|
+
],
|
|
5345
|
+
"exports": [
|
|
5346
|
+
{
|
|
5347
|
+
"kind": "js",
|
|
5348
|
+
"name": "restoreMachine",
|
|
5349
|
+
"declaration": {
|
|
5350
|
+
"name": "restoreMachine",
|
|
5351
|
+
"module": "src/config/define-stateful-agent.ts"
|
|
5352
|
+
}
|
|
5353
|
+
},
|
|
5354
|
+
{
|
|
5355
|
+
"kind": "js",
|
|
5356
|
+
"name": "defineStatefulAgent",
|
|
5357
|
+
"declaration": {
|
|
5358
|
+
"name": "defineStatefulAgent",
|
|
5359
|
+
"module": "src/config/define-stateful-agent.ts"
|
|
5360
|
+
}
|
|
5361
|
+
},
|
|
5362
|
+
{
|
|
5363
|
+
"kind": "js",
|
|
5364
|
+
"name": "defineAutopilot",
|
|
5365
|
+
"declaration": {
|
|
5366
|
+
"name": "defineAutopilot",
|
|
5367
|
+
"module": "src/config/define-stateful-agent.ts"
|
|
5368
|
+
}
|
|
5369
|
+
}
|
|
5370
|
+
]
|
|
5371
|
+
},
|
|
5372
|
+
{
|
|
5373
|
+
"kind": "javascript-module",
|
|
5374
|
+
"path": "src/config/fallback-agents.ts",
|
|
5375
|
+
"declarations": [
|
|
5376
|
+
{
|
|
5377
|
+
"kind": "variable",
|
|
5378
|
+
"name": "friendlyFallbackAgent",
|
|
5379
|
+
"type": {
|
|
5380
|
+
"text": "FallbackAgentConfig"
|
|
5381
|
+
},
|
|
5382
|
+
"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}",
|
|
5383
|
+
"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."
|
|
5384
|
+
},
|
|
5385
|
+
{
|
|
5386
|
+
"kind": "variable",
|
|
5387
|
+
"name": "strictFallbackAgent",
|
|
5388
|
+
"type": {
|
|
5389
|
+
"text": "FallbackAgentConfig"
|
|
5390
|
+
},
|
|
5391
|
+
"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}",
|
|
5392
|
+
"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."
|
|
5393
|
+
}
|
|
5394
|
+
],
|
|
5395
|
+
"exports": [
|
|
5396
|
+
{
|
|
5397
|
+
"kind": "js",
|
|
5398
|
+
"name": "friendlyFallbackAgent",
|
|
5399
|
+
"declaration": {
|
|
5400
|
+
"name": "friendlyFallbackAgent",
|
|
5401
|
+
"module": "src/config/fallback-agents.ts"
|
|
5402
|
+
}
|
|
5403
|
+
},
|
|
5404
|
+
{
|
|
5405
|
+
"kind": "js",
|
|
5406
|
+
"name": "strictFallbackAgent",
|
|
5407
|
+
"declaration": {
|
|
5408
|
+
"name": "strictFallbackAgent",
|
|
5409
|
+
"module": "src/config/fallback-agents.ts"
|
|
5410
|
+
}
|
|
5411
|
+
}
|
|
5412
|
+
]
|
|
5413
|
+
},
|
|
5414
|
+
{
|
|
5415
|
+
"kind": "javascript-module",
|
|
5416
|
+
"path": "src/config/index.ts",
|
|
5417
|
+
"declarations": [],
|
|
5418
|
+
"exports": [
|
|
5419
|
+
{
|
|
5420
|
+
"kind": "js",
|
|
5421
|
+
"name": "*",
|
|
5422
|
+
"declaration": {
|
|
5423
|
+
"name": "*",
|
|
5424
|
+
"package": "./config"
|
|
5425
|
+
}
|
|
5426
|
+
},
|
|
5427
|
+
{
|
|
5428
|
+
"kind": "js",
|
|
5429
|
+
"name": "*",
|
|
5430
|
+
"declaration": {
|
|
5431
|
+
"name": "*",
|
|
5432
|
+
"package": "./fallback-agents"
|
|
5433
|
+
}
|
|
5434
|
+
}
|
|
5435
|
+
]
|
|
5436
|
+
},
|
|
5437
|
+
{
|
|
5438
|
+
"kind": "javascript-module",
|
|
5439
|
+
"path": "src/config/validate-providers.ts",
|
|
5440
|
+
"declarations": [],
|
|
5441
|
+
"exports": []
|
|
5442
|
+
},
|
|
5212
5443
|
{
|
|
5213
5444
|
"kind": "javascript-module",
|
|
5214
5445
|
"path": "src/components/flowing-waves-indicator.ts",
|
|
@@ -5735,254 +5966,23 @@
|
|
|
5735
5966
|
},
|
|
5736
5967
|
{
|
|
5737
5968
|
"kind": "javascript-module",
|
|
5738
|
-
"path": "src/
|
|
5969
|
+
"path": "src/genesis/calendar.ts",
|
|
5970
|
+
"declarations": [],
|
|
5971
|
+
"exports": []
|
|
5972
|
+
},
|
|
5973
|
+
{
|
|
5974
|
+
"kind": "javascript-module",
|
|
5975
|
+
"path": "src/genesis/config.ts",
|
|
5739
5976
|
"declarations": [
|
|
5740
5977
|
{
|
|
5741
|
-
"kind": "
|
|
5742
|
-
"name": "
|
|
5743
|
-
"
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
"name": "CachePolicy",
|
|
5750
|
-
"declaration": {
|
|
5751
|
-
"name": "CachePolicy",
|
|
5752
|
-
"module": "src/config/config.ts"
|
|
5753
|
-
}
|
|
5754
|
-
},
|
|
5755
|
-
{
|
|
5756
|
-
"kind": "js",
|
|
5757
|
-
"name": "ChatFallback",
|
|
5758
|
-
"declaration": {
|
|
5759
|
-
"name": "ChatFallback",
|
|
5760
|
-
"module": "src/config/config.ts"
|
|
5761
|
-
}
|
|
5762
|
-
},
|
|
5763
|
-
{
|
|
5764
|
-
"kind": "js",
|
|
5765
|
-
"name": "ChatInputDuringExecutionMode",
|
|
5766
|
-
"declaration": {
|
|
5767
|
-
"name": "ChatInputDuringExecutionMode",
|
|
5768
|
-
"module": "src/config/config.ts"
|
|
5769
|
-
}
|
|
5770
|
-
},
|
|
5771
|
-
{
|
|
5772
|
-
"kind": "js",
|
|
5773
|
-
"name": "ChatThinkingPolicy",
|
|
5774
|
-
"declaration": {
|
|
5775
|
-
"name": "ChatThinkingPolicy",
|
|
5776
|
-
"module": "src/config/config.ts"
|
|
5777
|
-
}
|
|
5778
|
-
},
|
|
5779
|
-
{
|
|
5780
|
-
"kind": "js",
|
|
5781
|
-
"name": "ChatToolChoice",
|
|
5782
|
-
"declaration": {
|
|
5783
|
-
"name": "ChatToolChoice",
|
|
5784
|
-
"module": "src/config/config.ts"
|
|
5785
|
-
}
|
|
5786
|
-
},
|
|
5787
|
-
{
|
|
5788
|
-
"kind": "js",
|
|
5789
|
-
"name": "defineAgent",
|
|
5790
|
-
"declaration": {
|
|
5791
|
-
"name": "defineAgent",
|
|
5792
|
-
"module": "src/config/config.ts"
|
|
5793
|
-
}
|
|
5794
|
-
}
|
|
5795
|
-
]
|
|
5796
|
-
},
|
|
5797
|
-
{
|
|
5798
|
-
"kind": "javascript-module",
|
|
5799
|
-
"path": "src/config/define-stateful-agent.ts",
|
|
5800
|
-
"declarations": [
|
|
5801
|
-
{
|
|
5802
|
-
"kind": "function",
|
|
5803
|
-
"name": "restoreMachine",
|
|
5804
|
-
"return": {
|
|
5805
|
-
"type": {
|
|
5806
|
-
"text": "void"
|
|
5807
|
-
}
|
|
5808
|
-
},
|
|
5809
|
-
"parameters": [
|
|
5810
|
-
{
|
|
5811
|
-
"name": "machine",
|
|
5812
|
-
"type": {
|
|
5813
|
-
"text": "{ stop: () => void; start: (options?: { state?: unknown }) => void }"
|
|
5814
|
-
},
|
|
5815
|
-
"description": "the machine to restore (already constructed/started)."
|
|
5816
|
-
},
|
|
5817
|
-
{
|
|
5818
|
-
"name": "restored",
|
|
5819
|
-
"type": {
|
|
5820
|
-
"text": "unknown"
|
|
5821
|
-
},
|
|
5822
|
-
"description": "the agent's serialized image (`ctx.restored` in `init`)."
|
|
5823
|
-
},
|
|
5824
|
-
{
|
|
5825
|
-
"name": "key",
|
|
5826
|
-
"default": "'machine'",
|
|
5827
|
-
"description": "the property the machine occupies in the snapshot; defaults to\n`'machine'` to match the conventional `{ machine }` state bag."
|
|
5828
|
-
}
|
|
5829
|
-
],
|
|
5830
|
-
"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."
|
|
5831
|
-
},
|
|
5832
|
-
{
|
|
5833
|
-
"kind": "function",
|
|
5834
|
-
"name": "defineStatefulAgent",
|
|
5835
|
-
"return": {
|
|
5836
|
-
"type": {
|
|
5837
|
-
"text": "AgentConfig"
|
|
5838
|
-
}
|
|
5839
|
-
},
|
|
5840
|
-
"parameters": [
|
|
5841
|
-
{
|
|
5842
|
-
"name": "opts",
|
|
5843
|
-
"type": {
|
|
5844
|
-
"text": "StatefulAgentInit<S>"
|
|
5845
|
-
}
|
|
5846
|
-
}
|
|
5847
|
-
],
|
|
5848
|
-
"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."
|
|
5849
|
-
},
|
|
5850
|
-
{
|
|
5851
|
-
"kind": "function",
|
|
5852
|
-
"name": "defineAutopilot",
|
|
5853
|
-
"return": {
|
|
5854
|
-
"type": {
|
|
5855
|
-
"text": "AutopilotConfig<S>"
|
|
5856
|
-
}
|
|
5857
|
-
},
|
|
5858
|
-
"parameters": [
|
|
5859
|
-
{
|
|
5860
|
-
"name": "config",
|
|
5861
|
-
"type": {
|
|
5862
|
-
"text": "AutopilotConfig<S>"
|
|
5863
|
-
}
|
|
5864
|
-
}
|
|
5865
|
-
],
|
|
5866
|
-
"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."
|
|
5867
|
-
}
|
|
5868
|
-
],
|
|
5869
|
-
"exports": [
|
|
5870
|
-
{
|
|
5871
|
-
"kind": "js",
|
|
5872
|
-
"name": "restoreMachine",
|
|
5873
|
-
"declaration": {
|
|
5874
|
-
"name": "restoreMachine",
|
|
5875
|
-
"module": "src/config/define-stateful-agent.ts"
|
|
5876
|
-
}
|
|
5877
|
-
},
|
|
5878
|
-
{
|
|
5879
|
-
"kind": "js",
|
|
5880
|
-
"name": "defineStatefulAgent",
|
|
5881
|
-
"declaration": {
|
|
5882
|
-
"name": "defineStatefulAgent",
|
|
5883
|
-
"module": "src/config/define-stateful-agent.ts"
|
|
5884
|
-
}
|
|
5885
|
-
},
|
|
5886
|
-
{
|
|
5887
|
-
"kind": "js",
|
|
5888
|
-
"name": "defineAutopilot",
|
|
5889
|
-
"declaration": {
|
|
5890
|
-
"name": "defineAutopilot",
|
|
5891
|
-
"module": "src/config/define-stateful-agent.ts"
|
|
5892
|
-
}
|
|
5893
|
-
}
|
|
5894
|
-
]
|
|
5895
|
-
},
|
|
5896
|
-
{
|
|
5897
|
-
"kind": "javascript-module",
|
|
5898
|
-
"path": "src/config/fallback-agents.ts",
|
|
5899
|
-
"declarations": [
|
|
5900
|
-
{
|
|
5901
|
-
"kind": "variable",
|
|
5902
|
-
"name": "friendlyFallbackAgent",
|
|
5903
|
-
"type": {
|
|
5904
|
-
"text": "FallbackAgentConfig"
|
|
5905
|
-
},
|
|
5906
|
-
"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}",
|
|
5907
|
-
"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."
|
|
5908
|
-
},
|
|
5909
|
-
{
|
|
5910
|
-
"kind": "variable",
|
|
5911
|
-
"name": "strictFallbackAgent",
|
|
5912
|
-
"type": {
|
|
5913
|
-
"text": "FallbackAgentConfig"
|
|
5914
|
-
},
|
|
5915
|
-
"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}",
|
|
5916
|
-
"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."
|
|
5917
|
-
}
|
|
5918
|
-
],
|
|
5919
|
-
"exports": [
|
|
5920
|
-
{
|
|
5921
|
-
"kind": "js",
|
|
5922
|
-
"name": "friendlyFallbackAgent",
|
|
5923
|
-
"declaration": {
|
|
5924
|
-
"name": "friendlyFallbackAgent",
|
|
5925
|
-
"module": "src/config/fallback-agents.ts"
|
|
5926
|
-
}
|
|
5927
|
-
},
|
|
5928
|
-
{
|
|
5929
|
-
"kind": "js",
|
|
5930
|
-
"name": "strictFallbackAgent",
|
|
5931
|
-
"declaration": {
|
|
5932
|
-
"name": "strictFallbackAgent",
|
|
5933
|
-
"module": "src/config/fallback-agents.ts"
|
|
5934
|
-
}
|
|
5935
|
-
}
|
|
5936
|
-
]
|
|
5937
|
-
},
|
|
5938
|
-
{
|
|
5939
|
-
"kind": "javascript-module",
|
|
5940
|
-
"path": "src/config/index.ts",
|
|
5941
|
-
"declarations": [],
|
|
5942
|
-
"exports": [
|
|
5943
|
-
{
|
|
5944
|
-
"kind": "js",
|
|
5945
|
-
"name": "*",
|
|
5946
|
-
"declaration": {
|
|
5947
|
-
"name": "*",
|
|
5948
|
-
"package": "./config"
|
|
5949
|
-
}
|
|
5950
|
-
},
|
|
5951
|
-
{
|
|
5952
|
-
"kind": "js",
|
|
5953
|
-
"name": "*",
|
|
5954
|
-
"declaration": {
|
|
5955
|
-
"name": "*",
|
|
5956
|
-
"package": "./fallback-agents"
|
|
5957
|
-
}
|
|
5958
|
-
}
|
|
5959
|
-
]
|
|
5960
|
-
},
|
|
5961
|
-
{
|
|
5962
|
-
"kind": "javascript-module",
|
|
5963
|
-
"path": "src/config/validate-providers.ts",
|
|
5964
|
-
"declarations": [],
|
|
5965
|
-
"exports": []
|
|
5966
|
-
},
|
|
5967
|
-
{
|
|
5968
|
-
"kind": "javascript-module",
|
|
5969
|
-
"path": "src/genesis/calendar.ts",
|
|
5970
|
-
"declarations": [],
|
|
5971
|
-
"exports": []
|
|
5972
|
-
},
|
|
5973
|
-
{
|
|
5974
|
-
"kind": "javascript-module",
|
|
5975
|
-
"path": "src/genesis/config.ts",
|
|
5976
|
-
"declarations": [
|
|
5977
|
-
{
|
|
5978
|
-
"kind": "variable",
|
|
5979
|
-
"name": "DEFAULT_MAX_ROWS",
|
|
5980
|
-
"type": {
|
|
5981
|
-
"text": "number"
|
|
5982
|
-
},
|
|
5983
|
-
"default": "50",
|
|
5984
|
-
"description": "The default read cap, and the ceiling the config may raise it to."
|
|
5985
|
-
},
|
|
5978
|
+
"kind": "variable",
|
|
5979
|
+
"name": "DEFAULT_MAX_ROWS",
|
|
5980
|
+
"type": {
|
|
5981
|
+
"text": "number"
|
|
5982
|
+
},
|
|
5983
|
+
"default": "50",
|
|
5984
|
+
"description": "The default read cap, and the ceiling the config may raise it to."
|
|
5985
|
+
},
|
|
5986
5986
|
{
|
|
5987
5987
|
"kind": "variable",
|
|
5988
5988
|
"name": "MAX_ROWS_CEILING",
|
|
@@ -18185,155 +18185,196 @@
|
|
|
18185
18185
|
},
|
|
18186
18186
|
{
|
|
18187
18187
|
"kind": "javascript-module",
|
|
18188
|
-
"path": "src/components/
|
|
18188
|
+
"path": "src/components/ai-driver/ai-driver.ts",
|
|
18189
18189
|
"declarations": [
|
|
18190
18190
|
{
|
|
18191
|
-
"kind": "
|
|
18192
|
-
"
|
|
18193
|
-
"
|
|
18194
|
-
|
|
18195
|
-
|
|
18196
|
-
|
|
18197
|
-
|
|
18198
|
-
|
|
18199
|
-
|
|
18200
|
-
|
|
18201
|
-
|
|
18202
|
-
|
|
18203
|
-
|
|
18204
|
-
|
|
18205
|
-
|
|
18206
|
-
|
|
18207
|
-
|
|
18208
|
-
|
|
18209
|
-
|
|
18210
|
-
|
|
18211
|
-
|
|
18212
|
-
|
|
18213
|
-
|
|
18214
|
-
|
|
18215
|
-
|
|
18216
|
-
},
|
|
18217
|
-
"privacy": "private",
|
|
18218
|
-
"default": "null",
|
|
18219
|
-
"description": "Sticky user pick from the picker (or the host's `setAgent` API). Only changes on explicit\nuser action. Survives flow completion: when a stateful agent releases, the user-pin stays put\nand routing falls back to it on the next turn."
|
|
18220
|
-
},
|
|
18221
|
-
{
|
|
18222
|
-
"kind": "field",
|
|
18223
|
-
"name": "flowOwner",
|
|
18224
|
-
"type": {
|
|
18225
|
-
"text": "string | null"
|
|
18226
|
-
},
|
|
18227
|
-
"privacy": "private",
|
|
18228
|
-
"default": "null",
|
|
18229
|
-
"description": "Transient flow lock — set when a stateful agent activates, cleared on release. While\nnon-null, routing precedence goes to this agent and the picker is locked. Independent of\nthe user pin so completing a flow doesn't wipe the user's sticky choice."
|
|
18230
|
-
},
|
|
18191
|
+
"kind": "variable",
|
|
18192
|
+
"name": "AI_DRIVER_EVENT_TYPES",
|
|
18193
|
+
"description": "The event types in AiDriverEventMap, as a runtime list. Built from a record keyed by the\nmap, so adding an event to the map without adding it here is a compile error."
|
|
18194
|
+
}
|
|
18195
|
+
],
|
|
18196
|
+
"exports": [
|
|
18197
|
+
{
|
|
18198
|
+
"kind": "js",
|
|
18199
|
+
"name": "AI_DRIVER_EVENT_TYPES",
|
|
18200
|
+
"declaration": {
|
|
18201
|
+
"name": "AI_DRIVER_EVENT_TYPES",
|
|
18202
|
+
"module": "src/components/ai-driver/ai-driver.ts"
|
|
18203
|
+
}
|
|
18204
|
+
}
|
|
18205
|
+
]
|
|
18206
|
+
},
|
|
18207
|
+
{
|
|
18208
|
+
"kind": "javascript-module",
|
|
18209
|
+
"path": "src/components/ai-driver/base-driver-decorator.ts",
|
|
18210
|
+
"declarations": [
|
|
18211
|
+
{
|
|
18212
|
+
"kind": "class",
|
|
18213
|
+
"description": "The base of every driver decorator (GENC-1660): an AiDriver that wraps another and\npasses every member, and every event in AiDriverEventMap, through to it.\n\nA decorator extends this and overrides only what it changes, so decorators stack in any order\nand a member or event added to `AiDriver` reaches the host through every layer by default.\n`OrchestratingDriver` is one; it used to forward by hand, and twice a member it did not forward\nsilently did nothing for every multi-agent host (`recordExternalCost`, then\n`getHistoryForPersistence`).\n\nAbstract with no abstract members, so it cannot be constructed on its own: a decorator that\nchanges nothing is not one.\n\nOptional `AiDriver` members are implemented here unconditionally, as a forward that falls back\nto the \"not supported\" answer when the inner driver lacks them. A host that feature-detects with\n`?.` therefore always finds them, and gets the same answer it would from the inner driver.",
|
|
18214
|
+
"name": "BaseDriverDecorator",
|
|
18215
|
+
"members": [
|
|
18231
18216
|
{
|
|
18232
18217
|
"kind": "field",
|
|
18233
|
-
"name": "
|
|
18218
|
+
"name": "detachers",
|
|
18234
18219
|
"type": {
|
|
18235
|
-
"text": "
|
|
18220
|
+
"text": "Array<() => void>"
|
|
18236
18221
|
},
|
|
18237
18222
|
"privacy": "private",
|
|
18238
|
-
"
|
|
18239
|
-
"
|
|
18223
|
+
"readonly": true,
|
|
18224
|
+
"default": "[]",
|
|
18225
|
+
"description": "Undoes this layer's hold on its inner driver; see BaseDriverDecorator.detach."
|
|
18240
18226
|
},
|
|
18241
18227
|
{
|
|
18242
|
-
"kind": "
|
|
18243
|
-
"name": "
|
|
18244
|
-
"
|
|
18245
|
-
"
|
|
18228
|
+
"kind": "method",
|
|
18229
|
+
"name": "detach",
|
|
18230
|
+
"return": {
|
|
18231
|
+
"type": {
|
|
18232
|
+
"text": "void"
|
|
18233
|
+
}
|
|
18246
18234
|
},
|
|
18247
|
-
"
|
|
18248
|
-
"description": "The tail of the activation queue — see AgentSession.activate."
|
|
18235
|
+
"description": "Let go of the inner driver WITHOUT disposing it: stop forwarding its events, and undo whatever\na subclass registered through BaseDriverDecorator.onDetach (its interceptors, its\ncapabilities, its own listeners). For dropping or replacing a decorator while the driver it\nwrapped lives on — otherwise the old layer keeps re-dispatching every event and is never\ncollected. Idempotent. `dispose()` detaches too."
|
|
18249
18236
|
},
|
|
18250
18237
|
{
|
|
18251
|
-
"kind": "
|
|
18252
|
-
"name": "
|
|
18253
|
-
"
|
|
18254
|
-
|
|
18238
|
+
"kind": "method",
|
|
18239
|
+
"name": "onDetach",
|
|
18240
|
+
"privacy": "protected",
|
|
18241
|
+
"return": {
|
|
18242
|
+
"type": {
|
|
18243
|
+
"text": "void"
|
|
18244
|
+
}
|
|
18255
18245
|
},
|
|
18256
|
-
"
|
|
18257
|
-
|
|
18258
|
-
|
|
18259
|
-
|
|
18260
|
-
|
|
18261
|
-
|
|
18262
|
-
|
|
18263
|
-
|
|
18264
|
-
"
|
|
18265
|
-
"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."
|
|
18246
|
+
"parameters": [
|
|
18247
|
+
{
|
|
18248
|
+
"name": "undo",
|
|
18249
|
+
"type": {
|
|
18250
|
+
"text": "() => void"
|
|
18251
|
+
}
|
|
18252
|
+
}
|
|
18253
|
+
],
|
|
18254
|
+
"description": "Register something BaseDriverDecorator.detach must undo."
|
|
18266
18255
|
},
|
|
18267
18256
|
{
|
|
18268
18257
|
"kind": "method",
|
|
18269
|
-
"name": "
|
|
18258
|
+
"name": "sendMessage",
|
|
18270
18259
|
"return": {
|
|
18271
18260
|
"type": {
|
|
18272
|
-
"text": "
|
|
18261
|
+
"text": "Promise<ChatDriverResult>"
|
|
18273
18262
|
}
|
|
18274
18263
|
},
|
|
18275
|
-
"
|
|
18264
|
+
"parameters": [
|
|
18265
|
+
{
|
|
18266
|
+
"name": "input",
|
|
18267
|
+
"type": {
|
|
18268
|
+
"text": "string"
|
|
18269
|
+
}
|
|
18270
|
+
},
|
|
18271
|
+
{
|
|
18272
|
+
"name": "attachments",
|
|
18273
|
+
"optional": true,
|
|
18274
|
+
"type": {
|
|
18275
|
+
"text": "ChatAttachment[]"
|
|
18276
|
+
}
|
|
18277
|
+
},
|
|
18278
|
+
{
|
|
18279
|
+
"name": "options",
|
|
18280
|
+
"optional": true,
|
|
18281
|
+
"type": {
|
|
18282
|
+
"text": "SendMessageOptions"
|
|
18283
|
+
}
|
|
18284
|
+
}
|
|
18285
|
+
]
|
|
18276
18286
|
},
|
|
18277
18287
|
{
|
|
18278
18288
|
"kind": "method",
|
|
18279
|
-
"name": "
|
|
18289
|
+
"name": "continueFromHistory",
|
|
18280
18290
|
"return": {
|
|
18281
18291
|
"type": {
|
|
18282
|
-
"text": "
|
|
18292
|
+
"text": "Promise<ChatDriverResult>"
|
|
18283
18293
|
}
|
|
18284
18294
|
},
|
|
18285
|
-
"
|
|
18295
|
+
"parameters": [
|
|
18296
|
+
{
|
|
18297
|
+
"name": "transientPrimer",
|
|
18298
|
+
"optional": true,
|
|
18299
|
+
"type": {
|
|
18300
|
+
"text": "ChatMessage[]"
|
|
18301
|
+
}
|
|
18302
|
+
},
|
|
18303
|
+
{
|
|
18304
|
+
"name": "options",
|
|
18305
|
+
"optional": true,
|
|
18306
|
+
"type": {
|
|
18307
|
+
"text": "ContinueFromHistoryOptions"
|
|
18308
|
+
}
|
|
18309
|
+
}
|
|
18310
|
+
]
|
|
18286
18311
|
},
|
|
18287
18312
|
{
|
|
18288
18313
|
"kind": "method",
|
|
18289
|
-
"name": "
|
|
18314
|
+
"name": "resolveInteraction",
|
|
18290
18315
|
"return": {
|
|
18291
18316
|
"type": {
|
|
18292
|
-
"text": "
|
|
18317
|
+
"text": "void"
|
|
18293
18318
|
}
|
|
18294
18319
|
},
|
|
18295
|
-
"
|
|
18320
|
+
"parameters": [
|
|
18321
|
+
{
|
|
18322
|
+
"name": "interactionId",
|
|
18323
|
+
"type": {
|
|
18324
|
+
"text": "string"
|
|
18325
|
+
}
|
|
18326
|
+
},
|
|
18327
|
+
{
|
|
18328
|
+
"name": "result",
|
|
18329
|
+
"type": {
|
|
18330
|
+
"text": "unknown"
|
|
18331
|
+
}
|
|
18332
|
+
}
|
|
18333
|
+
]
|
|
18296
18334
|
},
|
|
18297
18335
|
{
|
|
18298
18336
|
"kind": "method",
|
|
18299
|
-
"name": "
|
|
18337
|
+
"name": "recordExternalCost",
|
|
18300
18338
|
"return": {
|
|
18301
18339
|
"type": {
|
|
18302
|
-
"text": "
|
|
18340
|
+
"text": "boolean"
|
|
18303
18341
|
}
|
|
18304
18342
|
},
|
|
18305
18343
|
"parameters": [
|
|
18306
18344
|
{
|
|
18307
|
-
"name": "
|
|
18308
|
-
"default": "this.pinned",
|
|
18345
|
+
"name": "interactionId",
|
|
18309
18346
|
"type": {
|
|
18310
|
-
"text": "string
|
|
18347
|
+
"text": "string"
|
|
18348
|
+
}
|
|
18349
|
+
},
|
|
18350
|
+
{
|
|
18351
|
+
"name": "costUsd",
|
|
18352
|
+
"type": {
|
|
18353
|
+
"text": "number"
|
|
18311
18354
|
}
|
|
18312
18355
|
}
|
|
18313
|
-
]
|
|
18314
|
-
"description": "The name routing is locked to, flow lock first. A flow in progress outranks the user's\nsticky pick for the duration of the flow; neither being set means automatic routing.\n`pin`, when given, stands in for the sticky pick: one message routed its own way."
|
|
18356
|
+
]
|
|
18315
18357
|
},
|
|
18316
18358
|
{
|
|
18317
18359
|
"kind": "method",
|
|
18318
|
-
"name": "
|
|
18360
|
+
"name": "getInteractionContext",
|
|
18319
18361
|
"return": {
|
|
18320
18362
|
"type": {
|
|
18321
|
-
"text": "
|
|
18363
|
+
"text": "InteractionContext | undefined"
|
|
18322
18364
|
}
|
|
18323
18365
|
},
|
|
18324
18366
|
"parameters": [
|
|
18325
18367
|
{
|
|
18326
|
-
"name": "
|
|
18368
|
+
"name": "interactionId",
|
|
18327
18369
|
"type": {
|
|
18328
|
-
"text": "string
|
|
18370
|
+
"text": "string"
|
|
18329
18371
|
}
|
|
18330
18372
|
}
|
|
18331
|
-
]
|
|
18332
|
-
"description": "Set the sticky user pin. `null` returns to automatic routing."
|
|
18373
|
+
]
|
|
18333
18374
|
},
|
|
18334
18375
|
{
|
|
18335
18376
|
"kind": "method",
|
|
18336
|
-
"name": "
|
|
18377
|
+
"name": "loadHistory",
|
|
18337
18378
|
"return": {
|
|
18338
18379
|
"type": {
|
|
18339
18380
|
"text": "void"
|
|
@@ -18341,17 +18382,16 @@
|
|
|
18341
18382
|
},
|
|
18342
18383
|
"parameters": [
|
|
18343
18384
|
{
|
|
18344
|
-
"name": "
|
|
18385
|
+
"name": "messages",
|
|
18345
18386
|
"type": {
|
|
18346
|
-
"text": "
|
|
18387
|
+
"text": "ChatMessage[]"
|
|
18347
18388
|
}
|
|
18348
18389
|
}
|
|
18349
|
-
]
|
|
18350
|
-
"description": "Set the flow-owner lock directly — used to restore state on driver reconstruction\n(agents-array changes, pop-in/pop-out), not to steer routing. Writes without firing hooks or\nreporting a transition, because the flow it names is already running."
|
|
18390
|
+
]
|
|
18351
18391
|
},
|
|
18352
18392
|
{
|
|
18353
18393
|
"kind": "method",
|
|
18354
|
-
"name": "
|
|
18394
|
+
"name": "primeRestoredAgentState",
|
|
18355
18395
|
"return": {
|
|
18356
18396
|
"type": {
|
|
18357
18397
|
"text": "void"
|
|
@@ -18364,12 +18404,11 @@
|
|
|
18364
18404
|
"text": "Record<string, unknown>"
|
|
18365
18405
|
}
|
|
18366
18406
|
}
|
|
18367
|
-
]
|
|
18368
|
-
"description": "Prime per-agent restored state for a rehydrated session. Replaces any pending entries."
|
|
18407
|
+
]
|
|
18369
18408
|
},
|
|
18370
18409
|
{
|
|
18371
18410
|
"kind": "method",
|
|
18372
|
-
"name": "
|
|
18411
|
+
"name": "canRestoreFlowOwner",
|
|
18373
18412
|
"return": {
|
|
18374
18413
|
"type": {
|
|
18375
18414
|
"text": "boolean"
|
|
@@ -18382,15 +18421,14 @@
|
|
|
18382
18421
|
"text": "string"
|
|
18383
18422
|
}
|
|
18384
18423
|
}
|
|
18385
|
-
]
|
|
18386
|
-
"description": "Whether a restored snapshot is waiting for this agent's next activation."
|
|
18424
|
+
]
|
|
18387
18425
|
},
|
|
18388
18426
|
{
|
|
18389
18427
|
"kind": "method",
|
|
18390
|
-
"name": "
|
|
18428
|
+
"name": "canResumeRestoredFlow",
|
|
18391
18429
|
"return": {
|
|
18392
18430
|
"type": {
|
|
18393
|
-
"text": "
|
|
18431
|
+
"text": "boolean"
|
|
18394
18432
|
}
|
|
18395
18433
|
},
|
|
18396
18434
|
"parameters": [
|
|
@@ -18400,300 +18438,193 @@
|
|
|
18400
18438
|
"text": "string"
|
|
18401
18439
|
}
|
|
18402
18440
|
}
|
|
18403
|
-
]
|
|
18404
|
-
"description": "The `data` of the hand-off that activated `agentName`, if one did and carried any."
|
|
18441
|
+
]
|
|
18405
18442
|
},
|
|
18406
18443
|
{
|
|
18407
18444
|
"kind": "method",
|
|
18408
|
-
"name": "
|
|
18445
|
+
"name": "resumeRestoredFlow",
|
|
18409
18446
|
"return": {
|
|
18410
18447
|
"type": {
|
|
18411
|
-
"text": "
|
|
18448
|
+
"text": "Promise<ChatDriverResult | undefined>"
|
|
18412
18449
|
}
|
|
18413
18450
|
},
|
|
18414
18451
|
"parameters": [
|
|
18415
18452
|
{
|
|
18416
|
-
"name": "
|
|
18453
|
+
"name": "resumeNote",
|
|
18454
|
+
"optional": true,
|
|
18417
18455
|
"type": {
|
|
18418
18456
|
"text": "string"
|
|
18419
18457
|
}
|
|
18420
18458
|
},
|
|
18421
18459
|
{
|
|
18422
|
-
"name": "
|
|
18460
|
+
"name": "agent",
|
|
18461
|
+
"optional": true,
|
|
18423
18462
|
"type": {
|
|
18424
|
-
"text": "
|
|
18463
|
+
"text": "AgentConfig"
|
|
18425
18464
|
}
|
|
18426
18465
|
}
|
|
18427
|
-
]
|
|
18428
|
-
"description": "Record the `data` a hand-off activated `agentName` with, or restore it; `undefined` drops it."
|
|
18466
|
+
]
|
|
18429
18467
|
},
|
|
18430
18468
|
{
|
|
18431
18469
|
"kind": "method",
|
|
18432
|
-
"name": "
|
|
18470
|
+
"name": "getRawHistory",
|
|
18433
18471
|
"return": {
|
|
18434
18472
|
"type": {
|
|
18435
|
-
"text": "
|
|
18473
|
+
"text": "readonly ChatMessage[]"
|
|
18436
18474
|
}
|
|
18437
|
-
}
|
|
18438
|
-
"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."
|
|
18475
|
+
}
|
|
18439
18476
|
},
|
|
18440
18477
|
{
|
|
18441
18478
|
"kind": "method",
|
|
18442
|
-
"name": "
|
|
18479
|
+
"name": "getHistoryForPersistence",
|
|
18443
18480
|
"return": {
|
|
18444
18481
|
"type": {
|
|
18445
|
-
"text": "
|
|
18482
|
+
"text": "ChatMessage[]"
|
|
18446
18483
|
}
|
|
18447
|
-
}
|
|
18448
|
-
"description": "The callers waiting in a hand-off whose state is live, oldest first."
|
|
18484
|
+
}
|
|
18449
18485
|
},
|
|
18450
18486
|
{
|
|
18451
18487
|
"kind": "method",
|
|
18452
|
-
"name": "
|
|
18488
|
+
"name": "getCondensePoliciesForPersistence",
|
|
18453
18489
|
"return": {
|
|
18454
18490
|
"type": {
|
|
18455
|
-
"text": "
|
|
18491
|
+
"text": "PersistedCondensePolicy[]"
|
|
18456
18492
|
}
|
|
18457
18493
|
},
|
|
18458
18494
|
"parameters": [
|
|
18459
18495
|
{
|
|
18460
|
-
"name": "
|
|
18496
|
+
"name": "messages",
|
|
18461
18497
|
"type": {
|
|
18462
|
-
"text": "
|
|
18463
|
-
}
|
|
18464
|
-
},
|
|
18465
|
-
{
|
|
18466
|
-
"name": "options",
|
|
18467
|
-
"type": {
|
|
18468
|
-
"text": "{ suspendCaller: boolean }"
|
|
18498
|
+
"text": "readonly ChatMessage[]"
|
|
18469
18499
|
}
|
|
18470
18500
|
}
|
|
18471
|
-
]
|
|
18472
|
-
"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."
|
|
18501
|
+
]
|
|
18473
18502
|
},
|
|
18474
18503
|
{
|
|
18475
18504
|
"kind": "method",
|
|
18476
|
-
"name": "
|
|
18505
|
+
"name": "restoreCondensePolicies",
|
|
18477
18506
|
"return": {
|
|
18478
18507
|
"type": {
|
|
18479
|
-
"text": "
|
|
18508
|
+
"text": "{\n restored: number;\n awaitingReactivation: number;\n }"
|
|
18480
18509
|
}
|
|
18481
18510
|
},
|
|
18482
18511
|
"parameters": [
|
|
18483
18512
|
{
|
|
18484
|
-
"name": "
|
|
18485
|
-
"type": {
|
|
18486
|
-
"text": "AgentConfig"
|
|
18487
|
-
}
|
|
18488
|
-
},
|
|
18489
|
-
{
|
|
18490
|
-
"name": "lock",
|
|
18513
|
+
"name": "entries",
|
|
18491
18514
|
"type": {
|
|
18492
|
-
"text": "
|
|
18515
|
+
"text": "readonly unknown[] | undefined"
|
|
18493
18516
|
}
|
|
18494
18517
|
}
|
|
18495
|
-
]
|
|
18496
|
-
"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."
|
|
18518
|
+
]
|
|
18497
18519
|
},
|
|
18498
18520
|
{
|
|
18499
18521
|
"kind": "method",
|
|
18500
|
-
"name": "
|
|
18522
|
+
"name": "getHandOffStack",
|
|
18501
18523
|
"return": {
|
|
18502
18524
|
"type": {
|
|
18503
|
-
"text": "
|
|
18525
|
+
"text": "HandOffFrame[]"
|
|
18504
18526
|
}
|
|
18505
|
-
}
|
|
18506
|
-
"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)."
|
|
18527
|
+
}
|
|
18507
18528
|
},
|
|
18508
18529
|
{
|
|
18509
18530
|
"kind": "method",
|
|
18510
|
-
"name": "
|
|
18531
|
+
"name": "restoreHandOffStack",
|
|
18511
18532
|
"return": {
|
|
18512
18533
|
"type": {
|
|
18513
|
-
"text": "
|
|
18534
|
+
"text": "{ resume?: { agent: string; note: string }; droppedLocks?: string[] }"
|
|
18514
18535
|
}
|
|
18515
18536
|
},
|
|
18516
18537
|
"parameters": [
|
|
18517
18538
|
{
|
|
18518
|
-
"name": "
|
|
18539
|
+
"name": "saved",
|
|
18519
18540
|
"type": {
|
|
18520
|
-
"text": "
|
|
18541
|
+
"text": "unknown"
|
|
18521
18542
|
}
|
|
18522
|
-
}
|
|
18523
|
-
],
|
|
18524
|
-
"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."
|
|
18525
|
-
},
|
|
18526
|
-
{
|
|
18527
|
-
"kind": "method",
|
|
18528
|
-
"name": "activateNow",
|
|
18529
|
-
"privacy": "private",
|
|
18530
|
-
"return": {
|
|
18531
|
-
"type": {
|
|
18532
|
-
"text": "Promise<AgentTransition>"
|
|
18533
|
-
}
|
|
18534
|
-
},
|
|
18535
|
-
"parameters": [
|
|
18543
|
+
},
|
|
18536
18544
|
{
|
|
18537
|
-
"name": "
|
|
18545
|
+
"name": "savedStates",
|
|
18538
18546
|
"type": {
|
|
18539
|
-
"text": "
|
|
18547
|
+
"text": "Record<string, unknown>"
|
|
18540
18548
|
}
|
|
18541
18549
|
},
|
|
18542
18550
|
{
|
|
18543
|
-
"name": "
|
|
18544
|
-
"
|
|
18551
|
+
"name": "interrupted",
|
|
18552
|
+
"type": {
|
|
18553
|
+
"text": "boolean"
|
|
18554
|
+
}
|
|
18545
18555
|
}
|
|
18546
|
-
]
|
|
18547
|
-
"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)."
|
|
18556
|
+
]
|
|
18548
18557
|
},
|
|
18549
18558
|
{
|
|
18550
18559
|
"kind": "method",
|
|
18551
|
-
"name": "
|
|
18560
|
+
"name": "unwindHandOffs",
|
|
18552
18561
|
"return": {
|
|
18553
18562
|
"type": {
|
|
18554
|
-
"text": "Promise<
|
|
18563
|
+
"text": "Promise<void>"
|
|
18555
18564
|
}
|
|
18556
18565
|
},
|
|
18557
|
-
"
|
|
18566
|
+
"parameters": [
|
|
18567
|
+
{
|
|
18568
|
+
"name": "kind",
|
|
18569
|
+
"type": {
|
|
18570
|
+
"text": "Extract<HandOffOutcomeKind, 'cleared' | 'state-lost'>"
|
|
18571
|
+
}
|
|
18572
|
+
}
|
|
18573
|
+
]
|
|
18558
18574
|
},
|
|
18559
18575
|
{
|
|
18560
18576
|
"kind": "method",
|
|
18561
|
-
"name": "
|
|
18562
|
-
"privacy": "private",
|
|
18577
|
+
"name": "serializeWaitingCallers",
|
|
18563
18578
|
"return": {
|
|
18564
18579
|
"type": {
|
|
18565
|
-
"text": "
|
|
18566
|
-
}
|
|
18567
|
-
},
|
|
18568
|
-
"parameters": [
|
|
18569
|
-
{
|
|
18570
|
-
"name": "transition",
|
|
18571
|
-
"type": {
|
|
18572
|
-
"text": "AgentTransition"
|
|
18573
|
-
}
|
|
18580
|
+
"text": "Record<string, unknown>"
|
|
18574
18581
|
}
|
|
18575
|
-
|
|
18576
|
-
"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."
|
|
18582
|
+
}
|
|
18577
18583
|
},
|
|
18578
18584
|
{
|
|
18579
18585
|
"kind": "method",
|
|
18580
|
-
"name": "
|
|
18586
|
+
"name": "getHandOffData",
|
|
18581
18587
|
"return": {
|
|
18582
18588
|
"type": {
|
|
18583
|
-
"text": "
|
|
18589
|
+
"text": "Record<string, unknown>"
|
|
18584
18590
|
}
|
|
18585
|
-
}
|
|
18586
|
-
"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."
|
|
18591
|
+
}
|
|
18587
18592
|
},
|
|
18588
18593
|
{
|
|
18589
18594
|
"kind": "method",
|
|
18590
|
-
"name": "
|
|
18591
|
-
"privacy": "private",
|
|
18595
|
+
"name": "restoreHandOffData",
|
|
18592
18596
|
"return": {
|
|
18593
18597
|
"type": {
|
|
18594
|
-
"text": "
|
|
18598
|
+
"text": "void"
|
|
18595
18599
|
}
|
|
18596
18600
|
},
|
|
18597
18601
|
"parameters": [
|
|
18598
18602
|
{
|
|
18599
|
-
"name": "
|
|
18603
|
+
"name": "saved",
|
|
18600
18604
|
"type": {
|
|
18601
|
-
"text": "
|
|
18605
|
+
"text": "unknown"
|
|
18602
18606
|
}
|
|
18603
18607
|
},
|
|
18604
18608
|
{
|
|
18605
|
-
"name": "
|
|
18609
|
+
"name": "interrupted",
|
|
18606
18610
|
"type": {
|
|
18607
|
-
"text": "
|
|
18611
|
+
"text": "boolean"
|
|
18608
18612
|
}
|
|
18609
18613
|
}
|
|
18610
|
-
]
|
|
18611
|
-
"description": "The one place `onDeactivate` is invoked. `reason` only reaches the warning text, which is what\ntells a log reader which path fired."
|
|
18612
|
-
}
|
|
18613
|
-
]
|
|
18614
|
-
}
|
|
18615
|
-
],
|
|
18616
|
-
"exports": [
|
|
18617
|
-
{
|
|
18618
|
-
"kind": "js",
|
|
18619
|
-
"name": "AgentSession",
|
|
18620
|
-
"declaration": {
|
|
18621
|
-
"name": "AgentSession",
|
|
18622
|
-
"module": "src/components/agent-session/agent-session.ts"
|
|
18623
|
-
}
|
|
18624
|
-
}
|
|
18625
|
-
]
|
|
18626
|
-
},
|
|
18627
|
-
{
|
|
18628
|
-
"kind": "javascript-module",
|
|
18629
|
-
"path": "src/components/agent-session/index.ts",
|
|
18630
|
-
"declarations": [],
|
|
18631
|
-
"exports": [
|
|
18632
|
-
{
|
|
18633
|
-
"kind": "js",
|
|
18634
|
-
"name": "*",
|
|
18635
|
-
"declaration": {
|
|
18636
|
-
"name": "*",
|
|
18637
|
-
"package": "./agent-session"
|
|
18638
|
-
}
|
|
18639
|
-
}
|
|
18640
|
-
]
|
|
18641
|
-
},
|
|
18642
|
-
{
|
|
18643
|
-
"kind": "javascript-module",
|
|
18644
|
-
"path": "src/components/ai-driver/ai-driver.ts",
|
|
18645
|
-
"declarations": [
|
|
18646
|
-
{
|
|
18647
|
-
"kind": "variable",
|
|
18648
|
-
"name": "AI_DRIVER_EVENT_TYPES",
|
|
18649
|
-
"description": "The event types in AiDriverEventMap, as a runtime list. Built from a record keyed by the\nmap, so adding an event to the map without adding it here is a compile error."
|
|
18650
|
-
}
|
|
18651
|
-
],
|
|
18652
|
-
"exports": [
|
|
18653
|
-
{
|
|
18654
|
-
"kind": "js",
|
|
18655
|
-
"name": "AI_DRIVER_EVENT_TYPES",
|
|
18656
|
-
"declaration": {
|
|
18657
|
-
"name": "AI_DRIVER_EVENT_TYPES",
|
|
18658
|
-
"module": "src/components/ai-driver/ai-driver.ts"
|
|
18659
|
-
}
|
|
18660
|
-
}
|
|
18661
|
-
]
|
|
18662
|
-
},
|
|
18663
|
-
{
|
|
18664
|
-
"kind": "javascript-module",
|
|
18665
|
-
"path": "src/components/ai-driver/base-driver-decorator.ts",
|
|
18666
|
-
"declarations": [
|
|
18667
|
-
{
|
|
18668
|
-
"kind": "class",
|
|
18669
|
-
"description": "The base of every driver decorator (GENC-1660): an AiDriver that wraps another and\npasses every member, and every event in AiDriverEventMap, through to it.\n\nA decorator extends this and overrides only what it changes, so decorators stack in any order\nand a member or event added to `AiDriver` reaches the host through every layer by default.\n`OrchestratingDriver` is one; it used to forward by hand, and twice a member it did not forward\nsilently did nothing for every multi-agent host (`recordExternalCost`, then\n`getHistoryForPersistence`).\n\nAbstract with no abstract members, so it cannot be constructed on its own: a decorator that\nchanges nothing is not one.\n\nOptional `AiDriver` members are implemented here unconditionally, as a forward that falls back\nto the \"not supported\" answer when the inner driver lacks them. A host that feature-detects with\n`?.` therefore always finds them, and gets the same answer it would from the inner driver.",
|
|
18670
|
-
"name": "BaseDriverDecorator",
|
|
18671
|
-
"members": [
|
|
18672
|
-
{
|
|
18673
|
-
"kind": "field",
|
|
18674
|
-
"name": "detachers",
|
|
18675
|
-
"type": {
|
|
18676
|
-
"text": "Array<() => void>"
|
|
18677
|
-
},
|
|
18678
|
-
"privacy": "private",
|
|
18679
|
-
"readonly": true,
|
|
18680
|
-
"default": "[]",
|
|
18681
|
-
"description": "Undoes this layer's hold on its inner driver; see BaseDriverDecorator.detach."
|
|
18614
|
+
]
|
|
18682
18615
|
},
|
|
18683
18616
|
{
|
|
18684
18617
|
"kind": "method",
|
|
18685
|
-
"name": "
|
|
18618
|
+
"name": "getActiveAgent",
|
|
18686
18619
|
"return": {
|
|
18687
18620
|
"type": {
|
|
18688
|
-
"text": "
|
|
18621
|
+
"text": "AgentConfig | undefined"
|
|
18689
18622
|
}
|
|
18690
|
-
}
|
|
18691
|
-
"description": "Let go of the inner driver WITHOUT disposing it: stop forwarding its events, and undo whatever\na subclass registered through BaseDriverDecorator.onDetach (its interceptors, its\ncapabilities, its own listeners). For dropping or replacing a decorator while the driver it\nwrapped lives on — otherwise the old layer keeps re-dispatching every event and is never\ncollected. Idempotent. `dispose()` detaches too."
|
|
18623
|
+
}
|
|
18692
18624
|
},
|
|
18693
18625
|
{
|
|
18694
18626
|
"kind": "method",
|
|
18695
|
-
"name": "
|
|
18696
|
-
"privacy": "protected",
|
|
18627
|
+
"name": "setPinnedAgent",
|
|
18697
18628
|
"return": {
|
|
18698
18629
|
"type": {
|
|
18699
18630
|
"text": "void"
|
|
@@ -18701,136 +18632,77 @@
|
|
|
18701
18632
|
},
|
|
18702
18633
|
"parameters": [
|
|
18703
18634
|
{
|
|
18704
|
-
"name": "
|
|
18635
|
+
"name": "name",
|
|
18705
18636
|
"type": {
|
|
18706
|
-
"text": "
|
|
18637
|
+
"text": "string | null"
|
|
18707
18638
|
}
|
|
18708
18639
|
}
|
|
18709
|
-
]
|
|
18710
|
-
"description": "Register something BaseDriverDecorator.detach must undo."
|
|
18640
|
+
]
|
|
18711
18641
|
},
|
|
18712
18642
|
{
|
|
18713
18643
|
"kind": "method",
|
|
18714
|
-
"name": "
|
|
18644
|
+
"name": "setFlowOwner",
|
|
18715
18645
|
"return": {
|
|
18716
18646
|
"type": {
|
|
18717
|
-
"text": "
|
|
18647
|
+
"text": "void"
|
|
18718
18648
|
}
|
|
18719
18649
|
},
|
|
18720
18650
|
"parameters": [
|
|
18721
18651
|
{
|
|
18722
|
-
"name": "
|
|
18723
|
-
"type": {
|
|
18724
|
-
"text": "string"
|
|
18725
|
-
}
|
|
18726
|
-
},
|
|
18727
|
-
{
|
|
18728
|
-
"name": "attachments",
|
|
18729
|
-
"optional": true,
|
|
18730
|
-
"type": {
|
|
18731
|
-
"text": "ChatAttachment[]"
|
|
18732
|
-
}
|
|
18733
|
-
},
|
|
18734
|
-
{
|
|
18735
|
-
"name": "options",
|
|
18736
|
-
"optional": true,
|
|
18652
|
+
"name": "name",
|
|
18737
18653
|
"type": {
|
|
18738
|
-
"text": "
|
|
18654
|
+
"text": "string | null"
|
|
18739
18655
|
}
|
|
18740
18656
|
}
|
|
18741
18657
|
]
|
|
18742
18658
|
},
|
|
18743
18659
|
{
|
|
18744
18660
|
"kind": "method",
|
|
18745
|
-
"name": "
|
|
18661
|
+
"name": "getFlowOwner",
|
|
18746
18662
|
"return": {
|
|
18747
18663
|
"type": {
|
|
18748
|
-
"text": "
|
|
18749
|
-
}
|
|
18750
|
-
},
|
|
18751
|
-
"parameters": [
|
|
18752
|
-
{
|
|
18753
|
-
"name": "transientPrimer",
|
|
18754
|
-
"optional": true,
|
|
18755
|
-
"type": {
|
|
18756
|
-
"text": "ChatMessage[]"
|
|
18757
|
-
}
|
|
18758
|
-
},
|
|
18759
|
-
{
|
|
18760
|
-
"name": "options",
|
|
18761
|
-
"optional": true,
|
|
18762
|
-
"type": {
|
|
18763
|
-
"text": "ContinueFromHistoryOptions"
|
|
18764
|
-
}
|
|
18664
|
+
"text": "string | null"
|
|
18765
18665
|
}
|
|
18766
|
-
|
|
18666
|
+
}
|
|
18767
18667
|
},
|
|
18768
18668
|
{
|
|
18769
18669
|
"kind": "method",
|
|
18770
|
-
"name": "
|
|
18670
|
+
"name": "getInteractionCheckpoints",
|
|
18771
18671
|
"return": {
|
|
18772
18672
|
"type": {
|
|
18773
|
-
"text": "
|
|
18774
|
-
}
|
|
18775
|
-
},
|
|
18776
|
-
"parameters": [
|
|
18777
|
-
{
|
|
18778
|
-
"name": "interactionId",
|
|
18779
|
-
"type": {
|
|
18780
|
-
"text": "string"
|
|
18781
|
-
}
|
|
18782
|
-
},
|
|
18783
|
-
{
|
|
18784
|
-
"name": "result",
|
|
18785
|
-
"type": {
|
|
18786
|
-
"text": "unknown"
|
|
18787
|
-
}
|
|
18673
|
+
"text": "readonly PersistedInteractionCheckpoint[]"
|
|
18788
18674
|
}
|
|
18789
|
-
|
|
18675
|
+
}
|
|
18790
18676
|
},
|
|
18791
18677
|
{
|
|
18792
18678
|
"kind": "method",
|
|
18793
|
-
"name": "
|
|
18679
|
+
"name": "restoreInteractionCheckpoints",
|
|
18794
18680
|
"return": {
|
|
18795
18681
|
"type": {
|
|
18796
|
-
"text": "
|
|
18682
|
+
"text": "void"
|
|
18797
18683
|
}
|
|
18798
18684
|
},
|
|
18799
18685
|
"parameters": [
|
|
18800
18686
|
{
|
|
18801
|
-
"name": "
|
|
18802
|
-
"type": {
|
|
18803
|
-
"text": "string"
|
|
18804
|
-
}
|
|
18805
|
-
},
|
|
18806
|
-
{
|
|
18807
|
-
"name": "costUsd",
|
|
18687
|
+
"name": "saved",
|
|
18808
18688
|
"type": {
|
|
18809
|
-
"text": "
|
|
18689
|
+
"text": "readonly PersistedInteractionCheckpoint[]"
|
|
18810
18690
|
}
|
|
18811
18691
|
}
|
|
18812
18692
|
]
|
|
18813
18693
|
},
|
|
18814
18694
|
{
|
|
18815
18695
|
"kind": "method",
|
|
18816
|
-
"name": "
|
|
18696
|
+
"name": "getInteractionCheckpoint",
|
|
18817
18697
|
"return": {
|
|
18818
18698
|
"type": {
|
|
18819
|
-
"text": "
|
|
18820
|
-
}
|
|
18821
|
-
},
|
|
18822
|
-
"parameters": [
|
|
18823
|
-
{
|
|
18824
|
-
"name": "interactionId",
|
|
18825
|
-
"type": {
|
|
18826
|
-
"text": "string"
|
|
18827
|
-
}
|
|
18699
|
+
"text": "PersistedInteractionCheckpoint | undefined"
|
|
18828
18700
|
}
|
|
18829
|
-
|
|
18701
|
+
}
|
|
18830
18702
|
},
|
|
18831
18703
|
{
|
|
18832
18704
|
"kind": "method",
|
|
18833
|
-
"name": "
|
|
18705
|
+
"name": "restoreInteractionCheckpoint",
|
|
18834
18706
|
"return": {
|
|
18835
18707
|
"type": {
|
|
18836
18708
|
"text": "void"
|
|
@@ -18838,327 +18710,510 @@
|
|
|
18838
18710
|
},
|
|
18839
18711
|
"parameters": [
|
|
18840
18712
|
{
|
|
18841
|
-
"name": "
|
|
18713
|
+
"name": "saved",
|
|
18842
18714
|
"type": {
|
|
18843
|
-
"text": "
|
|
18715
|
+
"text": "PersistedInteractionCheckpoint | undefined"
|
|
18844
18716
|
}
|
|
18845
18717
|
}
|
|
18846
18718
|
]
|
|
18847
18719
|
},
|
|
18848
18720
|
{
|
|
18849
18721
|
"kind": "method",
|
|
18850
|
-
"name": "
|
|
18722
|
+
"name": "addInteractionInterceptor",
|
|
18851
18723
|
"return": {
|
|
18852
18724
|
"type": {
|
|
18853
|
-
"text": "void"
|
|
18725
|
+
"text": "() => void"
|
|
18854
18726
|
}
|
|
18855
18727
|
},
|
|
18856
18728
|
"parameters": [
|
|
18857
18729
|
{
|
|
18858
|
-
"name": "
|
|
18730
|
+
"name": "interceptor",
|
|
18859
18731
|
"type": {
|
|
18860
|
-
"text": "
|
|
18732
|
+
"text": "InteractionInterceptor"
|
|
18861
18733
|
}
|
|
18862
18734
|
}
|
|
18863
|
-
]
|
|
18735
|
+
],
|
|
18736
|
+
"description": "Forwarded, so an interceptor installed on any layer lands on the driver that opens the\ninteractions. A decorator that answers interactions installs its own on `this.inner`."
|
|
18864
18737
|
},
|
|
18865
18738
|
{
|
|
18866
18739
|
"kind": "method",
|
|
18867
|
-
"name": "
|
|
18740
|
+
"name": "invokeAsUser",
|
|
18868
18741
|
"return": {
|
|
18869
18742
|
"type": {
|
|
18870
|
-
"text": "
|
|
18743
|
+
"text": "Promise<InvokeResult>"
|
|
18871
18744
|
}
|
|
18872
18745
|
},
|
|
18873
18746
|
"parameters": [
|
|
18874
18747
|
{
|
|
18875
|
-
"name": "
|
|
18748
|
+
"name": "interactionId",
|
|
18749
|
+
"type": {
|
|
18750
|
+
"text": "string"
|
|
18751
|
+
}
|
|
18752
|
+
},
|
|
18753
|
+
{
|
|
18754
|
+
"name": "action",
|
|
18876
18755
|
"type": {
|
|
18877
18756
|
"text": "string"
|
|
18878
18757
|
}
|
|
18758
|
+
},
|
|
18759
|
+
{
|
|
18760
|
+
"name": "args",
|
|
18761
|
+
"optional": true,
|
|
18762
|
+
"type": {
|
|
18763
|
+
"text": "unknown"
|
|
18764
|
+
}
|
|
18879
18765
|
}
|
|
18880
|
-
]
|
|
18766
|
+
],
|
|
18767
|
+
"description": "Forwarded: the interaction belongs to the driver that opened it. An inner driver that cannot\nrun actions answers as if the interaction had ended."
|
|
18881
18768
|
},
|
|
18882
18769
|
{
|
|
18883
18770
|
"kind": "method",
|
|
18884
|
-
"name": "
|
|
18771
|
+
"name": "presentInteraction",
|
|
18885
18772
|
"return": {
|
|
18886
18773
|
"type": {
|
|
18887
|
-
"text": "
|
|
18774
|
+
"text": "Promise<T>"
|
|
18888
18775
|
}
|
|
18889
18776
|
},
|
|
18890
18777
|
"parameters": [
|
|
18891
18778
|
{
|
|
18892
|
-
"name": "
|
|
18779
|
+
"name": "componentName",
|
|
18893
18780
|
"type": {
|
|
18894
18781
|
"text": "string"
|
|
18895
18782
|
}
|
|
18783
|
+
},
|
|
18784
|
+
{
|
|
18785
|
+
"name": "data",
|
|
18786
|
+
"type": {
|
|
18787
|
+
"text": "unknown"
|
|
18788
|
+
}
|
|
18789
|
+
},
|
|
18790
|
+
{
|
|
18791
|
+
"name": "options",
|
|
18792
|
+
"optional": true,
|
|
18793
|
+
"type": {
|
|
18794
|
+
"text": "InteractionRequestOptions"
|
|
18795
|
+
}
|
|
18896
18796
|
}
|
|
18897
18797
|
]
|
|
18898
18798
|
},
|
|
18899
18799
|
{
|
|
18900
18800
|
"kind": "method",
|
|
18901
|
-
"name": "
|
|
18801
|
+
"name": "provideHandlerCapability",
|
|
18902
18802
|
"return": {
|
|
18903
18803
|
"type": {
|
|
18904
|
-
"text": "
|
|
18804
|
+
"text": "() => void"
|
|
18905
18805
|
}
|
|
18906
18806
|
},
|
|
18907
18807
|
"parameters": [
|
|
18908
18808
|
{
|
|
18909
|
-
"name": "
|
|
18910
|
-
"optional": true,
|
|
18809
|
+
"name": "name",
|
|
18911
18810
|
"type": {
|
|
18912
18811
|
"text": "string"
|
|
18913
18812
|
}
|
|
18914
18813
|
},
|
|
18915
18814
|
{
|
|
18916
|
-
"name": "
|
|
18917
|
-
"optional": true,
|
|
18815
|
+
"name": "factory",
|
|
18918
18816
|
"type": {
|
|
18919
|
-
"text": "
|
|
18817
|
+
"text": "HandlerCapabilityFactory"
|
|
18920
18818
|
}
|
|
18921
18819
|
}
|
|
18922
18820
|
]
|
|
18923
18821
|
},
|
|
18924
18822
|
{
|
|
18925
18823
|
"kind": "method",
|
|
18926
|
-
"name": "
|
|
18824
|
+
"name": "getContextReserve",
|
|
18927
18825
|
"return": {
|
|
18928
18826
|
"type": {
|
|
18929
|
-
"text": "
|
|
18827
|
+
"text": "ContextReserveResolution | undefined"
|
|
18930
18828
|
}
|
|
18931
18829
|
}
|
|
18932
18830
|
},
|
|
18933
18831
|
{
|
|
18934
18832
|
"kind": "method",
|
|
18935
|
-
"name": "
|
|
18833
|
+
"name": "getPreambleTokens",
|
|
18936
18834
|
"return": {
|
|
18937
18835
|
"type": {
|
|
18938
|
-
"text": "
|
|
18836
|
+
"text": "number | undefined"
|
|
18939
18837
|
}
|
|
18940
18838
|
}
|
|
18941
18839
|
},
|
|
18942
18840
|
{
|
|
18943
18841
|
"kind": "method",
|
|
18944
|
-
"name": "
|
|
18842
|
+
"name": "setContextGuard",
|
|
18945
18843
|
"return": {
|
|
18946
18844
|
"type": {
|
|
18947
|
-
"text": "
|
|
18845
|
+
"text": "void"
|
|
18948
18846
|
}
|
|
18949
18847
|
},
|
|
18950
18848
|
"parameters": [
|
|
18951
18849
|
{
|
|
18952
|
-
"name": "
|
|
18850
|
+
"name": "policy",
|
|
18851
|
+
"optional": true,
|
|
18953
18852
|
"type": {
|
|
18954
|
-
"text": "
|
|
18853
|
+
"text": "ContextGuardPolicy"
|
|
18955
18854
|
}
|
|
18956
18855
|
}
|
|
18957
18856
|
]
|
|
18958
18857
|
},
|
|
18959
18858
|
{
|
|
18960
18859
|
"kind": "method",
|
|
18961
|
-
"name": "
|
|
18860
|
+
"name": "compact",
|
|
18962
18861
|
"return": {
|
|
18963
18862
|
"type": {
|
|
18964
|
-
"text": "
|
|
18863
|
+
"text": "Promise<ChatMessage | null>"
|
|
18965
18864
|
}
|
|
18966
18865
|
},
|
|
18967
18866
|
"parameters": [
|
|
18968
18867
|
{
|
|
18969
|
-
"name": "
|
|
18868
|
+
"name": "options",
|
|
18869
|
+
"optional": true,
|
|
18970
18870
|
"type": {
|
|
18971
|
-
"text": "
|
|
18871
|
+
"text": "CompactionPlanOptions"
|
|
18972
18872
|
}
|
|
18973
18873
|
}
|
|
18974
18874
|
]
|
|
18975
18875
|
},
|
|
18976
18876
|
{
|
|
18977
18877
|
"kind": "method",
|
|
18978
|
-
"name": "
|
|
18979
|
-
"return": {
|
|
18980
|
-
"type": {
|
|
18981
|
-
"text": "HandOffFrame[]"
|
|
18982
|
-
}
|
|
18983
|
-
}
|
|
18984
|
-
},
|
|
18985
|
-
{
|
|
18986
|
-
"kind": "method",
|
|
18987
|
-
"name": "restoreHandOffStack",
|
|
18878
|
+
"name": "getCompactionPlan",
|
|
18988
18879
|
"return": {
|
|
18989
18880
|
"type": {
|
|
18990
|
-
"text": "
|
|
18881
|
+
"text": "CompactionProjection | null"
|
|
18991
18882
|
}
|
|
18992
18883
|
},
|
|
18993
18884
|
"parameters": [
|
|
18994
18885
|
{
|
|
18995
|
-
"name": "
|
|
18996
|
-
"
|
|
18997
|
-
"text": "unknown"
|
|
18998
|
-
}
|
|
18999
|
-
},
|
|
19000
|
-
{
|
|
19001
|
-
"name": "savedStates",
|
|
19002
|
-
"type": {
|
|
19003
|
-
"text": "Record<string, unknown>"
|
|
19004
|
-
}
|
|
19005
|
-
},
|
|
19006
|
-
{
|
|
19007
|
-
"name": "interrupted",
|
|
18886
|
+
"name": "options",
|
|
18887
|
+
"optional": true,
|
|
19008
18888
|
"type": {
|
|
19009
|
-
"text": "
|
|
18889
|
+
"text": "CompactionPlanOptions"
|
|
19010
18890
|
}
|
|
19011
18891
|
}
|
|
19012
18892
|
]
|
|
19013
18893
|
},
|
|
19014
18894
|
{
|
|
19015
18895
|
"kind": "method",
|
|
19016
|
-
"name": "
|
|
18896
|
+
"name": "canCompact",
|
|
19017
18897
|
"return": {
|
|
19018
18898
|
"type": {
|
|
19019
|
-
"text": "
|
|
18899
|
+
"text": "boolean"
|
|
19020
18900
|
}
|
|
19021
18901
|
},
|
|
19022
18902
|
"parameters": [
|
|
19023
18903
|
{
|
|
19024
|
-
"name": "
|
|
18904
|
+
"name": "options",
|
|
18905
|
+
"optional": true,
|
|
19025
18906
|
"type": {
|
|
19026
|
-
"text": "
|
|
18907
|
+
"text": "CompactionPlanOptions"
|
|
19027
18908
|
}
|
|
19028
18909
|
}
|
|
19029
18910
|
]
|
|
19030
18911
|
},
|
|
19031
18912
|
{
|
|
19032
18913
|
"kind": "method",
|
|
19033
|
-
"name": "
|
|
19034
|
-
"return": {
|
|
19035
|
-
"type": {
|
|
19036
|
-
"text": "Record<string, unknown>"
|
|
19037
|
-
}
|
|
19038
|
-
}
|
|
19039
|
-
},
|
|
19040
|
-
{
|
|
19041
|
-
"kind": "method",
|
|
19042
|
-
"name": "getHandOffData",
|
|
18914
|
+
"name": "isBusy",
|
|
19043
18915
|
"return": {
|
|
19044
18916
|
"type": {
|
|
19045
|
-
"text": "
|
|
18917
|
+
"text": "boolean"
|
|
19046
18918
|
}
|
|
19047
18919
|
}
|
|
19048
18920
|
},
|
|
19049
18921
|
{
|
|
19050
18922
|
"kind": "method",
|
|
19051
|
-
"name": "
|
|
18923
|
+
"name": "getSuggestions",
|
|
19052
18924
|
"return": {
|
|
19053
18925
|
"type": {
|
|
19054
|
-
"text": "
|
|
18926
|
+
"text": "Promise<string[]>"
|
|
19055
18927
|
}
|
|
19056
18928
|
},
|
|
19057
18929
|
"parameters": [
|
|
19058
18930
|
{
|
|
19059
|
-
"name": "
|
|
18931
|
+
"name": "history",
|
|
19060
18932
|
"type": {
|
|
19061
|
-
"text": "
|
|
18933
|
+
"text": "ChatMessage[]"
|
|
19062
18934
|
}
|
|
19063
18935
|
},
|
|
19064
18936
|
{
|
|
19065
|
-
"name": "
|
|
18937
|
+
"name": "prompt",
|
|
19066
18938
|
"type": {
|
|
19067
|
-
"text": "
|
|
18939
|
+
"text": "string"
|
|
18940
|
+
}
|
|
18941
|
+
},
|
|
18942
|
+
{
|
|
18943
|
+
"name": "count",
|
|
18944
|
+
"type": {
|
|
18945
|
+
"text": "number"
|
|
18946
|
+
}
|
|
18947
|
+
},
|
|
18948
|
+
{
|
|
18949
|
+
"name": "allAgentInfo",
|
|
18950
|
+
"optional": true,
|
|
18951
|
+
"type": {
|
|
18952
|
+
"text": "AllAgentSummary[]"
|
|
19068
18953
|
}
|
|
19069
18954
|
}
|
|
19070
18955
|
]
|
|
19071
18956
|
},
|
|
19072
18957
|
{
|
|
19073
18958
|
"kind": "method",
|
|
19074
|
-
"name": "
|
|
18959
|
+
"name": "getTurnSnapshots",
|
|
19075
18960
|
"return": {
|
|
19076
18961
|
"type": {
|
|
19077
|
-
"text": "
|
|
18962
|
+
"text": "ReadonlyArray<TurnSnapshot>"
|
|
19078
18963
|
}
|
|
19079
18964
|
}
|
|
19080
18965
|
},
|
|
19081
18966
|
{
|
|
19082
18967
|
"kind": "method",
|
|
19083
|
-
"name": "
|
|
18968
|
+
"name": "getExternalDiagnostics",
|
|
19084
18969
|
"return": {
|
|
19085
18970
|
"type": {
|
|
19086
|
-
"text": "
|
|
18971
|
+
"text": "ReadonlyArray<DiagnosticEntry>"
|
|
19087
18972
|
}
|
|
19088
18973
|
},
|
|
19089
|
-
"
|
|
19090
|
-
|
|
19091
|
-
|
|
19092
|
-
|
|
19093
|
-
|
|
19094
|
-
|
|
18974
|
+
"description": "The inner driver's entries. Diagnostics compose down the stack: a decorator with entries of\nits own overrides this and appends them to `super.getExternalDiagnostics()`."
|
|
18975
|
+
},
|
|
18976
|
+
{
|
|
18977
|
+
"kind": "method",
|
|
18978
|
+
"name": "getActiveProviderName",
|
|
18979
|
+
"return": {
|
|
18980
|
+
"type": {
|
|
18981
|
+
"text": "string"
|
|
19095
18982
|
}
|
|
19096
|
-
|
|
18983
|
+
}
|
|
19097
18984
|
},
|
|
19098
18985
|
{
|
|
19099
18986
|
"kind": "method",
|
|
19100
|
-
"name": "
|
|
18987
|
+
"name": "dispose",
|
|
18988
|
+
"return": {
|
|
18989
|
+
"type": {
|
|
18990
|
+
"text": "void | Promise<void>"
|
|
18991
|
+
}
|
|
18992
|
+
}
|
|
18993
|
+
},
|
|
18994
|
+
{
|
|
18995
|
+
"kind": "method",
|
|
18996
|
+
"name": "cancel",
|
|
19101
18997
|
"return": {
|
|
19102
18998
|
"type": {
|
|
19103
18999
|
"text": "void"
|
|
19104
19000
|
}
|
|
19001
|
+
}
|
|
19002
|
+
}
|
|
19003
|
+
],
|
|
19004
|
+
"superclass": {
|
|
19005
|
+
"name": "EventTarget",
|
|
19006
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
19007
|
+
}
|
|
19008
|
+
}
|
|
19009
|
+
],
|
|
19010
|
+
"exports": [
|
|
19011
|
+
{
|
|
19012
|
+
"kind": "js",
|
|
19013
|
+
"name": "BaseDriverDecorator",
|
|
19014
|
+
"declaration": {
|
|
19015
|
+
"name": "BaseDriverDecorator",
|
|
19016
|
+
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
19017
|
+
}
|
|
19018
|
+
}
|
|
19019
|
+
]
|
|
19020
|
+
},
|
|
19021
|
+
{
|
|
19022
|
+
"kind": "javascript-module",
|
|
19023
|
+
"path": "src/components/ai-driver/index.ts",
|
|
19024
|
+
"declarations": [],
|
|
19025
|
+
"exports": [
|
|
19026
|
+
{
|
|
19027
|
+
"kind": "js",
|
|
19028
|
+
"name": "AiDriver",
|
|
19029
|
+
"declaration": {
|
|
19030
|
+
"name": "AiDriver",
|
|
19031
|
+
"module": "./ai-driver"
|
|
19032
|
+
}
|
|
19033
|
+
},
|
|
19034
|
+
{
|
|
19035
|
+
"kind": "js",
|
|
19036
|
+
"name": "AiDriverEventMap",
|
|
19037
|
+
"declaration": {
|
|
19038
|
+
"name": "AiDriverEventMap",
|
|
19039
|
+
"module": "./ai-driver"
|
|
19040
|
+
}
|
|
19041
|
+
},
|
|
19042
|
+
{
|
|
19043
|
+
"kind": "js",
|
|
19044
|
+
"name": "AI_DRIVER_EVENT_TYPES",
|
|
19045
|
+
"declaration": {
|
|
19046
|
+
"name": "AI_DRIVER_EVENT_TYPES",
|
|
19047
|
+
"module": "./ai-driver"
|
|
19048
|
+
}
|
|
19049
|
+
},
|
|
19050
|
+
{
|
|
19051
|
+
"kind": "js",
|
|
19052
|
+
"name": "BaseDriverDecorator",
|
|
19053
|
+
"declaration": {
|
|
19054
|
+
"name": "BaseDriverDecorator",
|
|
19055
|
+
"module": "./base-driver-decorator"
|
|
19056
|
+
}
|
|
19057
|
+
}
|
|
19058
|
+
]
|
|
19059
|
+
},
|
|
19060
|
+
{
|
|
19061
|
+
"kind": "javascript-module",
|
|
19062
|
+
"path": "src/components/ai-driver/stub-driver.ts",
|
|
19063
|
+
"declarations": [],
|
|
19064
|
+
"exports": []
|
|
19065
|
+
},
|
|
19066
|
+
{
|
|
19067
|
+
"kind": "javascript-module",
|
|
19068
|
+
"path": "src/components/agent-session/agent-session.ts",
|
|
19069
|
+
"declarations": [
|
|
19070
|
+
{
|
|
19071
|
+
"kind": "class",
|
|
19072
|
+
"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.",
|
|
19073
|
+
"name": "AgentSession",
|
|
19074
|
+
"members": [
|
|
19075
|
+
{
|
|
19076
|
+
"kind": "field",
|
|
19077
|
+
"name": "lifecycleAbortController",
|
|
19078
|
+
"privacy": "private",
|
|
19079
|
+
"readonly": true,
|
|
19080
|
+
"default": "new AbortController()",
|
|
19081
|
+
"description": "Aborted on disposal. Threaded into `AgentLifecycleContext.signal` so long-running\n`onActivate` work can bail if the session disconnects."
|
|
19082
|
+
},
|
|
19083
|
+
{
|
|
19084
|
+
"kind": "field",
|
|
19085
|
+
"name": "active",
|
|
19086
|
+
"type": {
|
|
19087
|
+
"text": "AgentConfig | undefined"
|
|
19105
19088
|
},
|
|
19106
|
-
"
|
|
19107
|
-
|
|
19108
|
-
|
|
19109
|
-
|
|
19110
|
-
|
|
19111
|
-
|
|
19089
|
+
"privacy": "private"
|
|
19090
|
+
},
|
|
19091
|
+
{
|
|
19092
|
+
"kind": "field",
|
|
19093
|
+
"name": "pinned",
|
|
19094
|
+
"type": {
|
|
19095
|
+
"text": "string | null"
|
|
19096
|
+
},
|
|
19097
|
+
"privacy": "private",
|
|
19098
|
+
"default": "null",
|
|
19099
|
+
"description": "Sticky user pick from the picker (or the host's `setAgent` API). Only changes on explicit\nuser action. Survives flow completion: when a stateful agent releases, the user-pin stays put\nand routing falls back to it on the next turn."
|
|
19100
|
+
},
|
|
19101
|
+
{
|
|
19102
|
+
"kind": "field",
|
|
19103
|
+
"name": "flowOwner",
|
|
19104
|
+
"type": {
|
|
19105
|
+
"text": "string | null"
|
|
19106
|
+
},
|
|
19107
|
+
"privacy": "private",
|
|
19108
|
+
"default": "null",
|
|
19109
|
+
"description": "Transient flow lock — set when a stateful agent activates, cleared on release. While\nnon-null, routing precedence goes to this agent and the picker is locked. Independent of\nthe user pin so completing a flow doesn't wipe the user's sticky choice."
|
|
19110
|
+
},
|
|
19111
|
+
{
|
|
19112
|
+
"kind": "field",
|
|
19113
|
+
"name": "restoredStates",
|
|
19114
|
+
"type": {
|
|
19115
|
+
"text": "Record<string, unknown>"
|
|
19116
|
+
},
|
|
19117
|
+
"privacy": "private",
|
|
19118
|
+
"default": "{}",
|
|
19119
|
+
"description": "Per-agent restored state for a rehydrated session, keyed by agent name. Primed by the host on\nrestore; each entry is passed to that agent's `onActivate` as `ctx.restored` on its next\nactivation, then deleted so a later re-activation starts fresh."
|
|
19120
|
+
},
|
|
19121
|
+
{
|
|
19122
|
+
"kind": "field",
|
|
19123
|
+
"name": "activation",
|
|
19124
|
+
"type": {
|
|
19125
|
+
"text": "Promise<unknown>"
|
|
19126
|
+
},
|
|
19127
|
+
"privacy": "private",
|
|
19128
|
+
"description": "The tail of the activation queue — see AgentSession.activate."
|
|
19129
|
+
},
|
|
19130
|
+
{
|
|
19131
|
+
"kind": "field",
|
|
19132
|
+
"name": "suspended",
|
|
19133
|
+
"type": {
|
|
19134
|
+
"text": "AgentConfig[]"
|
|
19135
|
+
},
|
|
19136
|
+
"privacy": "private",
|
|
19137
|
+
"default": "[]",
|
|
19138
|
+
"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."
|
|
19139
|
+
},
|
|
19140
|
+
{
|
|
19141
|
+
"kind": "field",
|
|
19142
|
+
"name": "handOffData",
|
|
19143
|
+
"privacy": "private",
|
|
19144
|
+
"default": "new Map<string, unknown>()",
|
|
19145
|
+
"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."
|
|
19146
|
+
},
|
|
19147
|
+
{
|
|
19148
|
+
"kind": "method",
|
|
19149
|
+
"name": "getActive",
|
|
19150
|
+
"return": {
|
|
19151
|
+
"type": {
|
|
19152
|
+
"text": "AgentConfig | undefined"
|
|
19112
19153
|
}
|
|
19113
|
-
|
|
19154
|
+
},
|
|
19155
|
+
"description": "The active agent, or `undefined` before the first activation and after a release."
|
|
19114
19156
|
},
|
|
19115
19157
|
{
|
|
19116
19158
|
"kind": "method",
|
|
19117
|
-
"name": "
|
|
19159
|
+
"name": "getPinned",
|
|
19118
19160
|
"return": {
|
|
19119
19161
|
"type": {
|
|
19120
19162
|
"text": "string | null"
|
|
19121
19163
|
}
|
|
19122
|
-
}
|
|
19164
|
+
},
|
|
19165
|
+
"description": "The sticky user pin, or `null` for automatic routing."
|
|
19123
19166
|
},
|
|
19124
19167
|
{
|
|
19125
19168
|
"kind": "method",
|
|
19126
|
-
"name": "
|
|
19169
|
+
"name": "getFlowOwner",
|
|
19127
19170
|
"return": {
|
|
19128
19171
|
"type": {
|
|
19129
|
-
"text": "
|
|
19172
|
+
"text": "string | null"
|
|
19130
19173
|
}
|
|
19131
|
-
}
|
|
19174
|
+
},
|
|
19175
|
+
"description": "The transient flow lock, or `null` when no flow holds routing."
|
|
19132
19176
|
},
|
|
19133
19177
|
{
|
|
19134
19178
|
"kind": "method",
|
|
19135
|
-
"name": "
|
|
19179
|
+
"name": "getLockedName",
|
|
19136
19180
|
"return": {
|
|
19137
19181
|
"type": {
|
|
19138
|
-
"text": "
|
|
19182
|
+
"text": "string | null"
|
|
19139
19183
|
}
|
|
19140
19184
|
},
|
|
19141
19185
|
"parameters": [
|
|
19142
19186
|
{
|
|
19143
|
-
"name": "
|
|
19187
|
+
"name": "pin",
|
|
19188
|
+
"default": "this.pinned",
|
|
19144
19189
|
"type": {
|
|
19145
|
-
"text": "
|
|
19190
|
+
"text": "string | null"
|
|
19146
19191
|
}
|
|
19147
19192
|
}
|
|
19148
|
-
]
|
|
19193
|
+
],
|
|
19194
|
+
"description": "The name routing is locked to, flow lock first. A flow in progress outranks the user's\nsticky pick for the duration of the flow; neither being set means automatic routing.\n`pin`, when given, stands in for the sticky pick: one message routed its own way."
|
|
19149
19195
|
},
|
|
19150
19196
|
{
|
|
19151
19197
|
"kind": "method",
|
|
19152
|
-
"name": "
|
|
19198
|
+
"name": "setPinned",
|
|
19153
19199
|
"return": {
|
|
19154
19200
|
"type": {
|
|
19155
|
-
"text": "
|
|
19201
|
+
"text": "void"
|
|
19156
19202
|
}
|
|
19157
|
-
}
|
|
19203
|
+
},
|
|
19204
|
+
"parameters": [
|
|
19205
|
+
{
|
|
19206
|
+
"name": "name",
|
|
19207
|
+
"type": {
|
|
19208
|
+
"text": "string | null"
|
|
19209
|
+
}
|
|
19210
|
+
}
|
|
19211
|
+
],
|
|
19212
|
+
"description": "Set the sticky user pin. `null` returns to automatic routing."
|
|
19158
19213
|
},
|
|
19159
19214
|
{
|
|
19160
19215
|
"kind": "method",
|
|
19161
|
-
"name": "
|
|
19216
|
+
"name": "setFlowOwner",
|
|
19162
19217
|
"return": {
|
|
19163
19218
|
"type": {
|
|
19164
19219
|
"text": "void"
|
|
@@ -19166,359 +19221,304 @@
|
|
|
19166
19221
|
},
|
|
19167
19222
|
"parameters": [
|
|
19168
19223
|
{
|
|
19169
|
-
"name": "
|
|
19224
|
+
"name": "name",
|
|
19170
19225
|
"type": {
|
|
19171
|
-
"text": "
|
|
19226
|
+
"text": "string | null"
|
|
19172
19227
|
}
|
|
19173
19228
|
}
|
|
19174
|
-
]
|
|
19229
|
+
],
|
|
19230
|
+
"description": "Set the flow-owner lock directly — used to restore state on driver reconstruction\n(agents-array changes, pop-in/pop-out), not to steer routing. Writes without firing hooks or\nreporting a transition, because the flow it names is already running."
|
|
19175
19231
|
},
|
|
19176
19232
|
{
|
|
19177
19233
|
"kind": "method",
|
|
19178
|
-
"name": "
|
|
19234
|
+
"name": "primeRestoredStates",
|
|
19179
19235
|
"return": {
|
|
19180
19236
|
"type": {
|
|
19181
|
-
"text": "
|
|
19237
|
+
"text": "void"
|
|
19182
19238
|
}
|
|
19183
19239
|
},
|
|
19184
19240
|
"parameters": [
|
|
19185
19241
|
{
|
|
19186
|
-
"name": "
|
|
19242
|
+
"name": "snapshots",
|
|
19187
19243
|
"type": {
|
|
19188
|
-
"text": "
|
|
19244
|
+
"text": "Record<string, unknown>"
|
|
19189
19245
|
}
|
|
19190
19246
|
}
|
|
19191
19247
|
],
|
|
19192
|
-
"description": "
|
|
19248
|
+
"description": "Prime per-agent restored state for a rehydrated session. Replaces any pending entries."
|
|
19193
19249
|
},
|
|
19194
19250
|
{
|
|
19195
19251
|
"kind": "method",
|
|
19196
|
-
"name": "
|
|
19252
|
+
"name": "hasRestoredState",
|
|
19197
19253
|
"return": {
|
|
19198
19254
|
"type": {
|
|
19199
|
-
"text": "
|
|
19255
|
+
"text": "boolean"
|
|
19200
19256
|
}
|
|
19201
19257
|
},
|
|
19202
19258
|
"parameters": [
|
|
19203
19259
|
{
|
|
19204
|
-
"name": "
|
|
19205
|
-
"type": {
|
|
19206
|
-
"text": "string"
|
|
19207
|
-
}
|
|
19208
|
-
},
|
|
19209
|
-
{
|
|
19210
|
-
"name": "action",
|
|
19260
|
+
"name": "agentName",
|
|
19211
19261
|
"type": {
|
|
19212
19262
|
"text": "string"
|
|
19213
19263
|
}
|
|
19214
|
-
},
|
|
19215
|
-
{
|
|
19216
|
-
"name": "args",
|
|
19217
|
-
"optional": true,
|
|
19218
|
-
"type": {
|
|
19219
|
-
"text": "unknown"
|
|
19220
|
-
}
|
|
19221
19264
|
}
|
|
19222
19265
|
],
|
|
19223
|
-
"description": "
|
|
19266
|
+
"description": "Whether a restored snapshot is waiting for this agent's next activation."
|
|
19224
19267
|
},
|
|
19225
19268
|
{
|
|
19226
19269
|
"kind": "method",
|
|
19227
|
-
"name": "
|
|
19270
|
+
"name": "getHandOffData",
|
|
19228
19271
|
"return": {
|
|
19229
19272
|
"type": {
|
|
19230
|
-
"text": "
|
|
19273
|
+
"text": "unknown"
|
|
19231
19274
|
}
|
|
19232
19275
|
},
|
|
19233
19276
|
"parameters": [
|
|
19234
19277
|
{
|
|
19235
|
-
"name": "
|
|
19278
|
+
"name": "agentName",
|
|
19236
19279
|
"type": {
|
|
19237
19280
|
"text": "string"
|
|
19238
19281
|
}
|
|
19239
|
-
},
|
|
19240
|
-
{
|
|
19241
|
-
"name": "data",
|
|
19242
|
-
"type": {
|
|
19243
|
-
"text": "unknown"
|
|
19244
|
-
}
|
|
19245
|
-
},
|
|
19246
|
-
{
|
|
19247
|
-
"name": "options",
|
|
19248
|
-
"optional": true,
|
|
19249
|
-
"type": {
|
|
19250
|
-
"text": "InteractionRequestOptions"
|
|
19251
|
-
}
|
|
19252
19282
|
}
|
|
19253
|
-
]
|
|
19283
|
+
],
|
|
19284
|
+
"description": "The `data` of the hand-off that activated `agentName`, if one did and carried any."
|
|
19254
19285
|
},
|
|
19255
19286
|
{
|
|
19256
19287
|
"kind": "method",
|
|
19257
|
-
"name": "
|
|
19288
|
+
"name": "setHandOffData",
|
|
19258
19289
|
"return": {
|
|
19259
19290
|
"type": {
|
|
19260
|
-
"text": "
|
|
19291
|
+
"text": "void"
|
|
19261
19292
|
}
|
|
19262
19293
|
},
|
|
19263
19294
|
"parameters": [
|
|
19264
19295
|
{
|
|
19265
|
-
"name": "
|
|
19296
|
+
"name": "agentName",
|
|
19266
19297
|
"type": {
|
|
19267
19298
|
"text": "string"
|
|
19268
19299
|
}
|
|
19269
19300
|
},
|
|
19270
19301
|
{
|
|
19271
|
-
"name": "
|
|
19302
|
+
"name": "data",
|
|
19272
19303
|
"type": {
|
|
19273
|
-
"text": "
|
|
19304
|
+
"text": "unknown"
|
|
19274
19305
|
}
|
|
19275
19306
|
}
|
|
19276
|
-
]
|
|
19307
|
+
],
|
|
19308
|
+
"description": "Record the `data` a hand-off activated `agentName` with, or restore it; `undefined` drops it."
|
|
19277
19309
|
},
|
|
19278
19310
|
{
|
|
19279
19311
|
"kind": "method",
|
|
19280
|
-
"name": "
|
|
19312
|
+
"name": "dropFlowLock",
|
|
19281
19313
|
"return": {
|
|
19282
19314
|
"type": {
|
|
19283
|
-
"text": "
|
|
19315
|
+
"text": "void"
|
|
19284
19316
|
}
|
|
19285
|
-
}
|
|
19317
|
+
},
|
|
19318
|
+
"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."
|
|
19286
19319
|
},
|
|
19287
19320
|
{
|
|
19288
19321
|
"kind": "method",
|
|
19289
|
-
"name": "
|
|
19322
|
+
"name": "getSuspended",
|
|
19290
19323
|
"return": {
|
|
19291
19324
|
"type": {
|
|
19292
|
-
"text": "
|
|
19325
|
+
"text": "readonly AgentConfig[]"
|
|
19293
19326
|
}
|
|
19294
|
-
}
|
|
19327
|
+
},
|
|
19328
|
+
"description": "The callers waiting in a hand-off whose state is live, oldest first."
|
|
19295
19329
|
},
|
|
19296
19330
|
{
|
|
19297
19331
|
"kind": "method",
|
|
19298
|
-
"name": "
|
|
19332
|
+
"name": "handOff",
|
|
19299
19333
|
"return": {
|
|
19300
19334
|
"type": {
|
|
19301
|
-
"text": "
|
|
19335
|
+
"text": "Promise<AgentTransition>"
|
|
19302
19336
|
}
|
|
19303
19337
|
},
|
|
19304
19338
|
"parameters": [
|
|
19305
19339
|
{
|
|
19306
|
-
"name": "
|
|
19307
|
-
"optional": true,
|
|
19340
|
+
"name": "target",
|
|
19308
19341
|
"type": {
|
|
19309
|
-
"text": "
|
|
19342
|
+
"text": "AgentConfig"
|
|
19343
|
+
}
|
|
19344
|
+
},
|
|
19345
|
+
{
|
|
19346
|
+
"name": "options",
|
|
19347
|
+
"type": {
|
|
19348
|
+
"text": "{ suspendCaller: boolean }"
|
|
19310
19349
|
}
|
|
19311
19350
|
}
|
|
19312
|
-
]
|
|
19351
|
+
],
|
|
19352
|
+
"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."
|
|
19313
19353
|
},
|
|
19314
19354
|
{
|
|
19315
19355
|
"kind": "method",
|
|
19316
|
-
"name": "
|
|
19356
|
+
"name": "resume",
|
|
19317
19357
|
"return": {
|
|
19318
19358
|
"type": {
|
|
19319
|
-
"text": "Promise<
|
|
19359
|
+
"text": "Promise<AgentTransition>"
|
|
19320
19360
|
}
|
|
19321
19361
|
},
|
|
19322
19362
|
"parameters": [
|
|
19323
19363
|
{
|
|
19324
|
-
"name": "
|
|
19325
|
-
"optional": true,
|
|
19364
|
+
"name": "caller",
|
|
19326
19365
|
"type": {
|
|
19327
|
-
"text": "
|
|
19366
|
+
"text": "AgentConfig"
|
|
19367
|
+
}
|
|
19368
|
+
},
|
|
19369
|
+
{
|
|
19370
|
+
"name": "lock",
|
|
19371
|
+
"type": {
|
|
19372
|
+
"text": "boolean"
|
|
19328
19373
|
}
|
|
19329
19374
|
}
|
|
19330
|
-
]
|
|
19375
|
+
],
|
|
19376
|
+
"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."
|
|
19331
19377
|
},
|
|
19332
19378
|
{
|
|
19333
19379
|
"kind": "method",
|
|
19334
|
-
"name": "
|
|
19380
|
+
"name": "endSuspended",
|
|
19335
19381
|
"return": {
|
|
19336
19382
|
"type": {
|
|
19337
|
-
"text": "
|
|
19383
|
+
"text": "Promise<void>"
|
|
19338
19384
|
}
|
|
19339
19385
|
},
|
|
19340
|
-
"
|
|
19341
|
-
{
|
|
19342
|
-
"name": "options",
|
|
19343
|
-
"optional": true,
|
|
19344
|
-
"type": {
|
|
19345
|
-
"text": "CompactionPlanOptions"
|
|
19346
|
-
}
|
|
19347
|
-
}
|
|
19348
|
-
]
|
|
19386
|
+
"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)."
|
|
19349
19387
|
},
|
|
19350
19388
|
{
|
|
19351
19389
|
"kind": "method",
|
|
19352
|
-
"name": "
|
|
19390
|
+
"name": "activate",
|
|
19353
19391
|
"return": {
|
|
19354
19392
|
"type": {
|
|
19355
|
-
"text": "
|
|
19393
|
+
"text": "Promise<AgentTransition>"
|
|
19356
19394
|
}
|
|
19357
19395
|
},
|
|
19358
19396
|
"parameters": [
|
|
19359
19397
|
{
|
|
19360
|
-
"name": "
|
|
19361
|
-
"optional": true,
|
|
19398
|
+
"name": "agent",
|
|
19362
19399
|
"type": {
|
|
19363
|
-
"text": "
|
|
19400
|
+
"text": "AgentConfig"
|
|
19364
19401
|
}
|
|
19365
19402
|
}
|
|
19366
|
-
]
|
|
19367
|
-
|
|
19368
|
-
{
|
|
19369
|
-
"kind": "method",
|
|
19370
|
-
"name": "isBusy",
|
|
19371
|
-
"return": {
|
|
19372
|
-
"type": {
|
|
19373
|
-
"text": "boolean"
|
|
19374
|
-
}
|
|
19375
|
-
}
|
|
19403
|
+
],
|
|
19404
|
+
"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."
|
|
19376
19405
|
},
|
|
19377
19406
|
{
|
|
19378
19407
|
"kind": "method",
|
|
19379
|
-
"name": "
|
|
19408
|
+
"name": "activateNow",
|
|
19409
|
+
"privacy": "private",
|
|
19380
19410
|
"return": {
|
|
19381
19411
|
"type": {
|
|
19382
|
-
"text": "Promise<
|
|
19412
|
+
"text": "Promise<AgentTransition>"
|
|
19383
19413
|
}
|
|
19384
19414
|
},
|
|
19385
19415
|
"parameters": [
|
|
19386
19416
|
{
|
|
19387
|
-
"name": "
|
|
19388
|
-
"type": {
|
|
19389
|
-
"text": "ChatMessage[]"
|
|
19390
|
-
}
|
|
19391
|
-
},
|
|
19392
|
-
{
|
|
19393
|
-
"name": "prompt",
|
|
19394
|
-
"type": {
|
|
19395
|
-
"text": "string"
|
|
19396
|
-
}
|
|
19397
|
-
},
|
|
19398
|
-
{
|
|
19399
|
-
"name": "count",
|
|
19417
|
+
"name": "agent",
|
|
19400
19418
|
"type": {
|
|
19401
|
-
"text": "
|
|
19419
|
+
"text": "AgentConfig"
|
|
19402
19420
|
}
|
|
19403
19421
|
},
|
|
19404
19422
|
{
|
|
19405
|
-
"name": "
|
|
19406
|
-
"
|
|
19407
|
-
"type": {
|
|
19408
|
-
"text": "AllAgentSummary[]"
|
|
19409
|
-
}
|
|
19423
|
+
"name": "{ lock = false, suspendPrevious = false }",
|
|
19424
|
+
"default": "{}"
|
|
19410
19425
|
}
|
|
19411
|
-
]
|
|
19426
|
+
],
|
|
19427
|
+
"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)."
|
|
19412
19428
|
},
|
|
19413
19429
|
{
|
|
19414
19430
|
"kind": "method",
|
|
19415
|
-
"name": "
|
|
19431
|
+
"name": "release",
|
|
19416
19432
|
"return": {
|
|
19417
19433
|
"type": {
|
|
19418
|
-
"text": "
|
|
19434
|
+
"text": "Promise<AgentTransition | undefined>"
|
|
19419
19435
|
}
|
|
19420
|
-
}
|
|
19436
|
+
},
|
|
19437
|
+
"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."
|
|
19421
19438
|
},
|
|
19422
19439
|
{
|
|
19423
19440
|
"kind": "method",
|
|
19424
|
-
"name": "
|
|
19441
|
+
"name": "reportTransition",
|
|
19442
|
+
"privacy": "private",
|
|
19425
19443
|
"return": {
|
|
19426
19444
|
"type": {
|
|
19427
|
-
"text": "
|
|
19445
|
+
"text": "void"
|
|
19428
19446
|
}
|
|
19429
19447
|
},
|
|
19430
|
-
"
|
|
19431
|
-
|
|
19432
|
-
|
|
19433
|
-
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
"type": {
|
|
19437
|
-
"text": "string"
|
|
19448
|
+
"parameters": [
|
|
19449
|
+
{
|
|
19450
|
+
"name": "transition",
|
|
19451
|
+
"type": {
|
|
19452
|
+
"text": "AgentTransition"
|
|
19453
|
+
}
|
|
19438
19454
|
}
|
|
19439
|
-
|
|
19455
|
+
],
|
|
19456
|
+
"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."
|
|
19440
19457
|
},
|
|
19441
19458
|
{
|
|
19442
19459
|
"kind": "method",
|
|
19443
19460
|
"name": "dispose",
|
|
19444
19461
|
"return": {
|
|
19445
19462
|
"type": {
|
|
19446
|
-
"text": "
|
|
19463
|
+
"text": "Promise<void>"
|
|
19447
19464
|
}
|
|
19448
|
-
}
|
|
19465
|
+
},
|
|
19466
|
+
"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."
|
|
19449
19467
|
},
|
|
19450
19468
|
{
|
|
19451
19469
|
"kind": "method",
|
|
19452
|
-
"name": "
|
|
19470
|
+
"name": "fireDeactivate",
|
|
19471
|
+
"privacy": "private",
|
|
19453
19472
|
"return": {
|
|
19454
19473
|
"type": {
|
|
19455
|
-
"text": "void"
|
|
19474
|
+
"text": "Promise<void>"
|
|
19456
19475
|
}
|
|
19457
|
-
}
|
|
19476
|
+
},
|
|
19477
|
+
"parameters": [
|
|
19478
|
+
{
|
|
19479
|
+
"name": "agent",
|
|
19480
|
+
"type": {
|
|
19481
|
+
"text": "AgentConfig"
|
|
19482
|
+
}
|
|
19483
|
+
},
|
|
19484
|
+
{
|
|
19485
|
+
"name": "reason",
|
|
19486
|
+
"type": {
|
|
19487
|
+
"text": "'switch' | 'release' | 'dispose'"
|
|
19488
|
+
}
|
|
19489
|
+
}
|
|
19490
|
+
],
|
|
19491
|
+
"description": "The one place `onDeactivate` is invoked. `reason` only reaches the warning text, which is what\ntells a log reader which path fired."
|
|
19458
19492
|
}
|
|
19459
|
-
]
|
|
19460
|
-
"superclass": {
|
|
19461
|
-
"name": "EventTarget",
|
|
19462
|
-
"module": "src/components/ai-driver/base-driver-decorator.ts"
|
|
19463
|
-
}
|
|
19493
|
+
]
|
|
19464
19494
|
}
|
|
19465
19495
|
],
|
|
19466
19496
|
"exports": [
|
|
19467
19497
|
{
|
|
19468
19498
|
"kind": "js",
|
|
19469
|
-
"name": "
|
|
19499
|
+
"name": "AgentSession",
|
|
19470
19500
|
"declaration": {
|
|
19471
|
-
"name": "
|
|
19472
|
-
"module": "src/components/
|
|
19501
|
+
"name": "AgentSession",
|
|
19502
|
+
"module": "src/components/agent-session/agent-session.ts"
|
|
19473
19503
|
}
|
|
19474
19504
|
}
|
|
19475
19505
|
]
|
|
19476
19506
|
},
|
|
19477
19507
|
{
|
|
19478
19508
|
"kind": "javascript-module",
|
|
19479
|
-
"path": "src/components/
|
|
19509
|
+
"path": "src/components/agent-session/index.ts",
|
|
19480
19510
|
"declarations": [],
|
|
19481
19511
|
"exports": [
|
|
19482
19512
|
{
|
|
19483
19513
|
"kind": "js",
|
|
19484
|
-
"name": "
|
|
19485
|
-
"declaration": {
|
|
19486
|
-
"name": "AiDriver",
|
|
19487
|
-
"module": "./ai-driver"
|
|
19488
|
-
}
|
|
19489
|
-
},
|
|
19490
|
-
{
|
|
19491
|
-
"kind": "js",
|
|
19492
|
-
"name": "AiDriverEventMap",
|
|
19493
|
-
"declaration": {
|
|
19494
|
-
"name": "AiDriverEventMap",
|
|
19495
|
-
"module": "./ai-driver"
|
|
19496
|
-
}
|
|
19497
|
-
},
|
|
19498
|
-
{
|
|
19499
|
-
"kind": "js",
|
|
19500
|
-
"name": "AI_DRIVER_EVENT_TYPES",
|
|
19501
|
-
"declaration": {
|
|
19502
|
-
"name": "AI_DRIVER_EVENT_TYPES",
|
|
19503
|
-
"module": "./ai-driver"
|
|
19504
|
-
}
|
|
19505
|
-
},
|
|
19506
|
-
{
|
|
19507
|
-
"kind": "js",
|
|
19508
|
-
"name": "BaseDriverDecorator",
|
|
19514
|
+
"name": "*",
|
|
19509
19515
|
"declaration": {
|
|
19510
|
-
"name": "
|
|
19511
|
-
"
|
|
19516
|
+
"name": "*",
|
|
19517
|
+
"package": "./agent-session"
|
|
19512
19518
|
}
|
|
19513
19519
|
}
|
|
19514
19520
|
]
|
|
19515
19521
|
},
|
|
19516
|
-
{
|
|
19517
|
-
"kind": "javascript-module",
|
|
19518
|
-
"path": "src/components/ai-driver/stub-driver.ts",
|
|
19519
|
-
"declarations": [],
|
|
19520
|
-
"exports": []
|
|
19521
|
-
},
|
|
19522
19522
|
{
|
|
19523
19523
|
"kind": "javascript-module",
|
|
19524
19524
|
"path": "src/components/chat-bubble/chat-bubble.styles.ts",
|