@genesislcap/ai-assistant 15.84.3 → 15.85.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.
Files changed (50) hide show
  1. package/dist/ai-assistant.api.json +2175 -138
  2. package/dist/ai-assistant.d.ts +420 -43
  3. package/dist/chat-driver.cjs +780 -210
  4. package/dist/chat-driver.cjs.map +4 -4
  5. package/dist/chat-driver.mjs +780 -209
  6. package/dist/chat-driver.mjs.map +4 -4
  7. package/dist/custom-elements.json +3251 -2161
  8. package/dist/dts/components/agent-session/agent-session.d.ts +50 -2
  9. package/dist/dts/components/agent-session/agent-session.d.ts.map +1 -1
  10. package/dist/dts/components/ai-driver/ai-driver.d.ts +59 -1
  11. package/dist/dts/components/ai-driver/ai-driver.d.ts.map +1 -1
  12. package/dist/dts/components/ai-driver/base-driver-decorator.d.ts +13 -1
  13. package/dist/dts/components/ai-driver/base-driver-decorator.d.ts.map +1 -1
  14. package/dist/dts/components/chat-driver/chat-driver.constants.d.ts +0 -8
  15. package/dist/dts/components/chat-driver/chat-driver.constants.d.ts.map +1 -1
  16. package/dist/dts/components/chat-driver/chat-driver.d.ts +74 -15
  17. package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
  18. package/dist/dts/components/orchestrating-driver/hand-off.d.ts +20 -0
  19. package/dist/dts/components/orchestrating-driver/hand-off.d.ts.map +1 -0
  20. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +121 -22
  21. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
  22. package/dist/dts/config/config.d.ts +66 -0
  23. package/dist/dts/config/config.d.ts.map +1 -1
  24. package/dist/dts/main/main.d.ts +3 -0
  25. package/dist/dts/main/main.d.ts.map +1 -1
  26. package/dist/dts/main/main.types.d.ts +6 -0
  27. package/dist/dts/main/main.types.d.ts.map +1 -1
  28. package/dist/dts/react.d.ts +4 -1
  29. package/dist/dts/state/persistence/session-persister.d.ts.map +1 -1
  30. package/dist/dts/state/persistence/session-snapshot.d.ts +33 -1
  31. package/dist/dts/state/persistence/session-snapshot.d.ts.map +1 -1
  32. package/dist/dts/utils/condense-history.d.ts +10 -3
  33. package/dist/dts/utils/condense-history.d.ts.map +1 -1
  34. package/dist/esm/components/agent-session/agent-session.js +128 -7
  35. package/dist/esm/components/ai-driver/ai-driver.js +3 -0
  36. package/dist/esm/components/ai-driver/base-driver-decorator.js +24 -0
  37. package/dist/esm/components/chat-driver/chat-driver.constants.js +0 -8
  38. package/dist/esm/components/chat-driver/chat-driver.js +247 -74
  39. package/dist/esm/components/orchestrating-driver/hand-off.js +59 -0
  40. package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +480 -299
  41. package/dist/esm/main/main.js +32 -6
  42. package/dist/esm/main/main.types.js +6 -0
  43. package/dist/esm/state/debug-event-log.js +1 -1
  44. package/dist/esm/state/persistence/session-persister.js +55 -8
  45. package/dist/esm/state/persistence/session-snapshot.js +12 -6
  46. package/dist/esm/utils/condense-history.js +13 -4
  47. package/dist/react.cjs +16 -1
  48. package/dist/react.mjs +16 -1
  49. package/docs/sub_agent.md +1 -1
  50. package/package.json +17 -17
@@ -2231,7 +2231,7 @@
2231
2231
  {
2232
2232
  "kind": "Class",
2233
2233
  "canonicalReference": "@genesislcap/ai-assistant!AgentSession:class",
2234
- "docComment": "/**\n * The stateful-agent contract: which agent is active, whether a flow or a user pin holds routing, and the `onActivate` / `onDeactivate` lifecycle around a swap. Either driver can own one.\n *\n * Knows nothing about routing, tool surfaces or transcripts — whether an agent is terminal, the continuation tool, the handoff marker in history all stay with the orchestrator, which is the only thing with agents to route between.\n *\n * @beta\n */\n",
2234
+ "docComment": "/**\n * The stateful-agent contract: which agent is active, whether a flow or a user pin holds routing, and the `onActivate` / `onDeactivate` lifecycle around a swap. Either driver can own one.\n *\n * Knows nothing about routing, tool surfaces or transcripts — whether an agent is terminal, the hand-off stack, the divider in history all stay with the orchestrator, which is the only thing with agents to route between.\n *\n * @beta\n */\n",
2235
2235
  "excerptTokens": [
2236
2236
  {
2237
2237
  "kind": "Content",
@@ -2376,6 +2376,73 @@
2376
2376
  "isAbstract": false,
2377
2377
  "name": "dispose"
2378
2378
  },
2379
+ {
2380
+ "kind": "Method",
2381
+ "canonicalReference": "@genesislcap/ai-assistant!AgentSession#dropFlowLock:member(1)",
2382
+ "docComment": "/**\n * Drop the flow lock and leave the active agent active (GENC-1737): a plain agent holding it with no hand-off behind it is done once its turn ends.\n */\n",
2383
+ "excerptTokens": [
2384
+ {
2385
+ "kind": "Content",
2386
+ "text": "dropFlowLock(): "
2387
+ },
2388
+ {
2389
+ "kind": "Content",
2390
+ "text": "void"
2391
+ },
2392
+ {
2393
+ "kind": "Content",
2394
+ "text": ";"
2395
+ }
2396
+ ],
2397
+ "isStatic": false,
2398
+ "returnTypeTokenRange": {
2399
+ "startIndex": 1,
2400
+ "endIndex": 2
2401
+ },
2402
+ "releaseTag": "Beta",
2403
+ "isProtected": false,
2404
+ "overloadIndex": 1,
2405
+ "parameters": [],
2406
+ "isOptional": false,
2407
+ "isAbstract": false,
2408
+ "name": "dropFlowLock"
2409
+ },
2410
+ {
2411
+ "kind": "Method",
2412
+ "canonicalReference": "@genesislcap/ai-assistant!AgentSession#endSuspended:member(1)",
2413
+ "docComment": "/**\n * Deactivate the callers left waiting by hand-offs that ended without a hand-back, newest first, when no teardown follows to do it (GENC-1737).\n */\n",
2414
+ "excerptTokens": [
2415
+ {
2416
+ "kind": "Content",
2417
+ "text": "endSuspended(): "
2418
+ },
2419
+ {
2420
+ "kind": "Reference",
2421
+ "text": "Promise",
2422
+ "canonicalReference": "!Promise:interface"
2423
+ },
2424
+ {
2425
+ "kind": "Content",
2426
+ "text": "<void>"
2427
+ },
2428
+ {
2429
+ "kind": "Content",
2430
+ "text": ";"
2431
+ }
2432
+ ],
2433
+ "isStatic": false,
2434
+ "returnTypeTokenRange": {
2435
+ "startIndex": 1,
2436
+ "endIndex": 3
2437
+ },
2438
+ "releaseTag": "Beta",
2439
+ "isProtected": false,
2440
+ "overloadIndex": 1,
2441
+ "parameters": [],
2442
+ "isOptional": false,
2443
+ "isAbstract": false,
2444
+ "name": "endSuspended"
2445
+ },
2379
2446
  {
2380
2447
  "kind": "Method",
2381
2448
  "canonicalReference": "@genesislcap/ai-assistant!AgentSession#getActive:member(1)",
@@ -2443,6 +2510,54 @@
2443
2510
  "isAbstract": false,
2444
2511
  "name": "getFlowOwner"
2445
2512
  },
2513
+ {
2514
+ "kind": "Method",
2515
+ "canonicalReference": "@genesislcap/ai-assistant!AgentSession#getHandOffData:member(1)",
2516
+ "docComment": "/**\n * The `data` of the hand-off that activated `agentName`, if one did and carried any.\n */\n",
2517
+ "excerptTokens": [
2518
+ {
2519
+ "kind": "Content",
2520
+ "text": "getHandOffData(agentName: "
2521
+ },
2522
+ {
2523
+ "kind": "Content",
2524
+ "text": "string"
2525
+ },
2526
+ {
2527
+ "kind": "Content",
2528
+ "text": "): "
2529
+ },
2530
+ {
2531
+ "kind": "Content",
2532
+ "text": "unknown"
2533
+ },
2534
+ {
2535
+ "kind": "Content",
2536
+ "text": ";"
2537
+ }
2538
+ ],
2539
+ "isStatic": false,
2540
+ "returnTypeTokenRange": {
2541
+ "startIndex": 3,
2542
+ "endIndex": 4
2543
+ },
2544
+ "releaseTag": "Beta",
2545
+ "isProtected": false,
2546
+ "overloadIndex": 1,
2547
+ "parameters": [
2548
+ {
2549
+ "parameterName": "agentName",
2550
+ "parameterTypeTokenRange": {
2551
+ "startIndex": 1,
2552
+ "endIndex": 2
2553
+ },
2554
+ "isOptional": false
2555
+ }
2556
+ ],
2557
+ "isOptional": false,
2558
+ "isAbstract": false,
2559
+ "name": "getHandOffData"
2560
+ },
2446
2561
  {
2447
2562
  "kind": "Method",
2448
2563
  "canonicalReference": "@genesislcap/ai-assistant!AgentSession#getLockedName:member(1)",
@@ -2522,6 +2637,125 @@
2522
2637
  "isAbstract": false,
2523
2638
  "name": "getPinned"
2524
2639
  },
2640
+ {
2641
+ "kind": "Method",
2642
+ "canonicalReference": "@genesislcap/ai-assistant!AgentSession#getSuspended:member(1)",
2643
+ "docComment": "/**\n * The callers waiting in a hand-off whose state is live, oldest first.\n */\n",
2644
+ "excerptTokens": [
2645
+ {
2646
+ "kind": "Content",
2647
+ "text": "getSuspended(): "
2648
+ },
2649
+ {
2650
+ "kind": "Content",
2651
+ "text": "readonly "
2652
+ },
2653
+ {
2654
+ "kind": "Reference",
2655
+ "text": "AgentConfig",
2656
+ "canonicalReference": "@genesislcap/ai-assistant!AgentConfig:type"
2657
+ },
2658
+ {
2659
+ "kind": "Content",
2660
+ "text": "[]"
2661
+ },
2662
+ {
2663
+ "kind": "Content",
2664
+ "text": ";"
2665
+ }
2666
+ ],
2667
+ "isStatic": false,
2668
+ "returnTypeTokenRange": {
2669
+ "startIndex": 1,
2670
+ "endIndex": 4
2671
+ },
2672
+ "releaseTag": "Beta",
2673
+ "isProtected": false,
2674
+ "overloadIndex": 1,
2675
+ "parameters": [],
2676
+ "isOptional": false,
2677
+ "isAbstract": false,
2678
+ "name": "getSuspended"
2679
+ },
2680
+ {
2681
+ "kind": "Method",
2682
+ "canonicalReference": "@genesislcap/ai-assistant!AgentSession#handOff:member(1)",
2683
+ "docComment": "/**\n * Make `target` active for a hand-off (GENC-1737), holding the flow lock whatever kind of agent it is, since a waiting caller depends on it. With `suspendCaller` the active agent waits: it is not deactivated and keeps its state. Without it the active agent is deactivated as on any swap: a one-way hand-off from a target, whose waiting caller then waits for the new target. Queued with {@link AgentSession.activate}.\n */\n",
2684
+ "excerptTokens": [
2685
+ {
2686
+ "kind": "Content",
2687
+ "text": "handOff(target: "
2688
+ },
2689
+ {
2690
+ "kind": "Reference",
2691
+ "text": "AgentConfig",
2692
+ "canonicalReference": "@genesislcap/ai-assistant!AgentConfig:type"
2693
+ },
2694
+ {
2695
+ "kind": "Content",
2696
+ "text": ", options: "
2697
+ },
2698
+ {
2699
+ "kind": "Content",
2700
+ "text": "{\n suspendCaller: boolean;\n }"
2701
+ },
2702
+ {
2703
+ "kind": "Content",
2704
+ "text": "): "
2705
+ },
2706
+ {
2707
+ "kind": "Reference",
2708
+ "text": "Promise",
2709
+ "canonicalReference": "!Promise:interface"
2710
+ },
2711
+ {
2712
+ "kind": "Content",
2713
+ "text": "<"
2714
+ },
2715
+ {
2716
+ "kind": "Reference",
2717
+ "text": "AgentTransition",
2718
+ "canonicalReference": "@genesislcap/ai-assistant!AgentTransition:interface"
2719
+ },
2720
+ {
2721
+ "kind": "Content",
2722
+ "text": ">"
2723
+ },
2724
+ {
2725
+ "kind": "Content",
2726
+ "text": ";"
2727
+ }
2728
+ ],
2729
+ "isStatic": false,
2730
+ "returnTypeTokenRange": {
2731
+ "startIndex": 5,
2732
+ "endIndex": 9
2733
+ },
2734
+ "releaseTag": "Beta",
2735
+ "isProtected": false,
2736
+ "overloadIndex": 1,
2737
+ "parameters": [
2738
+ {
2739
+ "parameterName": "target",
2740
+ "parameterTypeTokenRange": {
2741
+ "startIndex": 1,
2742
+ "endIndex": 2
2743
+ },
2744
+ "isOptional": false
2745
+ },
2746
+ {
2747
+ "parameterName": "options",
2748
+ "parameterTypeTokenRange": {
2749
+ "startIndex": 3,
2750
+ "endIndex": 4
2751
+ },
2752
+ "isOptional": false
2753
+ }
2754
+ ],
2755
+ "isOptional": false,
2756
+ "isAbstract": false,
2757
+ "name": "handOff"
2758
+ },
2525
2759
  {
2526
2760
  "kind": "Method",
2527
2761
  "canonicalReference": "@genesislcap/ai-assistant!AgentSession#hasRestoredState:member(1)",
@@ -2668,6 +2902,85 @@
2668
2902
  "isAbstract": false,
2669
2903
  "name": "release"
2670
2904
  },
2905
+ {
2906
+ "kind": "Method",
2907
+ "canonicalReference": "@genesislcap/ai-assistant!AgentSession#resume:member(1)",
2908
+ "docComment": "/**\n * Make a waiting caller active again when its hand-off ends (GENC-1737). One whose state is live resumes without `onActivate`, since it was never deactivated; after a reload it is activated from its saved state like any other agent. `lock` keeps the flow lock on it: it held it before, or another caller is still waiting further down.\n */\n",
2909
+ "excerptTokens": [
2910
+ {
2911
+ "kind": "Content",
2912
+ "text": "resume(caller: "
2913
+ },
2914
+ {
2915
+ "kind": "Reference",
2916
+ "text": "AgentConfig",
2917
+ "canonicalReference": "@genesislcap/ai-assistant!AgentConfig:type"
2918
+ },
2919
+ {
2920
+ "kind": "Content",
2921
+ "text": ", lock: "
2922
+ },
2923
+ {
2924
+ "kind": "Content",
2925
+ "text": "boolean"
2926
+ },
2927
+ {
2928
+ "kind": "Content",
2929
+ "text": "): "
2930
+ },
2931
+ {
2932
+ "kind": "Reference",
2933
+ "text": "Promise",
2934
+ "canonicalReference": "!Promise:interface"
2935
+ },
2936
+ {
2937
+ "kind": "Content",
2938
+ "text": "<"
2939
+ },
2940
+ {
2941
+ "kind": "Reference",
2942
+ "text": "AgentTransition",
2943
+ "canonicalReference": "@genesislcap/ai-assistant!AgentTransition:interface"
2944
+ },
2945
+ {
2946
+ "kind": "Content",
2947
+ "text": ">"
2948
+ },
2949
+ {
2950
+ "kind": "Content",
2951
+ "text": ";"
2952
+ }
2953
+ ],
2954
+ "isStatic": false,
2955
+ "returnTypeTokenRange": {
2956
+ "startIndex": 5,
2957
+ "endIndex": 9
2958
+ },
2959
+ "releaseTag": "Beta",
2960
+ "isProtected": false,
2961
+ "overloadIndex": 1,
2962
+ "parameters": [
2963
+ {
2964
+ "parameterName": "caller",
2965
+ "parameterTypeTokenRange": {
2966
+ "startIndex": 1,
2967
+ "endIndex": 2
2968
+ },
2969
+ "isOptional": false
2970
+ },
2971
+ {
2972
+ "parameterName": "lock",
2973
+ "parameterTypeTokenRange": {
2974
+ "startIndex": 3,
2975
+ "endIndex": 4
2976
+ },
2977
+ "isOptional": false
2978
+ }
2979
+ ],
2980
+ "isOptional": false,
2981
+ "isAbstract": false,
2982
+ "name": "resume"
2983
+ },
2671
2984
  {
2672
2985
  "kind": "Method",
2673
2986
  "canonicalReference": "@genesislcap/ai-assistant!AgentSession#setFlowOwner:member(1)",
@@ -2716,6 +3029,70 @@
2716
3029
  "isAbstract": false,
2717
3030
  "name": "setFlowOwner"
2718
3031
  },
3032
+ {
3033
+ "kind": "Method",
3034
+ "canonicalReference": "@genesislcap/ai-assistant!AgentSession#setHandOffData:member(1)",
3035
+ "docComment": "/**\n * Record the `data` a hand-off activated `agentName` with, or restore it; `undefined` drops it.\n */\n",
3036
+ "excerptTokens": [
3037
+ {
3038
+ "kind": "Content",
3039
+ "text": "setHandOffData(agentName: "
3040
+ },
3041
+ {
3042
+ "kind": "Content",
3043
+ "text": "string"
3044
+ },
3045
+ {
3046
+ "kind": "Content",
3047
+ "text": ", data: "
3048
+ },
3049
+ {
3050
+ "kind": "Content",
3051
+ "text": "unknown"
3052
+ },
3053
+ {
3054
+ "kind": "Content",
3055
+ "text": "): "
3056
+ },
3057
+ {
3058
+ "kind": "Content",
3059
+ "text": "void"
3060
+ },
3061
+ {
3062
+ "kind": "Content",
3063
+ "text": ";"
3064
+ }
3065
+ ],
3066
+ "isStatic": false,
3067
+ "returnTypeTokenRange": {
3068
+ "startIndex": 5,
3069
+ "endIndex": 6
3070
+ },
3071
+ "releaseTag": "Beta",
3072
+ "isProtected": false,
3073
+ "overloadIndex": 1,
3074
+ "parameters": [
3075
+ {
3076
+ "parameterName": "agentName",
3077
+ "parameterTypeTokenRange": {
3078
+ "startIndex": 1,
3079
+ "endIndex": 2
3080
+ },
3081
+ "isOptional": false
3082
+ },
3083
+ {
3084
+ "parameterName": "data",
3085
+ "parameterTypeTokenRange": {
3086
+ "startIndex": 3,
3087
+ "endIndex": 4
3088
+ },
3089
+ "isOptional": false
3090
+ }
3091
+ ],
3092
+ "isOptional": false,
3093
+ "isAbstract": false,
3094
+ "name": "setHandOffData"
3095
+ },
2719
3096
  {
2720
3097
  "kind": "Method",
2721
3098
  "canonicalReference": "@genesislcap/ai-assistant!AgentSession#setPinned:member(1)",
@@ -3170,7 +3547,7 @@
3170
3547
  },
3171
3548
  {
3172
3549
  "kind": "Content",
3173
- "text": "{\n readonly SessionCleared: \"session-cleared\";\n readonly ChatHeaderMouseDown: \"chat-header-mousedown\";\n}"
3550
+ "text": "{\n readonly SessionCleared: \"session-cleared\";\n readonly ChatHeaderMouseDown: \"chat-header-mousedown\";\n readonly HandOffStarted: \"handoff-started\";\n readonly HandOffReturned: \"handoff-returned\";\n readonly HandOffUnwound: \"handoff-unwound\";\n}"
3174
3551
  }
3175
3552
  ],
3176
3553
  "fileUrlPath": "src/main/main.types.ts",
@@ -4343,6 +4720,72 @@
4343
4720
  "parameters": [],
4344
4721
  "name": "getFlowOwner"
4345
4722
  },
4723
+ {
4724
+ "kind": "MethodSignature",
4725
+ "canonicalReference": "@genesislcap/ai-assistant!AiDriver#getHandOffData:member(1)",
4726
+ "docComment": "/**\n * The `data` each hand-off target was activated with, by name, for the agents a reload resumes: the flow owner and the callers waiting in a hand-off. See the tool context's `handOffData`.\n *\n * @beta\n */\n",
4727
+ "excerptTokens": [
4728
+ {
4729
+ "kind": "Content",
4730
+ "text": "getHandOffData?(): "
4731
+ },
4732
+ {
4733
+ "kind": "Reference",
4734
+ "text": "Record",
4735
+ "canonicalReference": "!Record:type"
4736
+ },
4737
+ {
4738
+ "kind": "Content",
4739
+ "text": "<string, unknown>"
4740
+ },
4741
+ {
4742
+ "kind": "Content",
4743
+ "text": ";"
4744
+ }
4745
+ ],
4746
+ "isOptional": true,
4747
+ "returnTypeTokenRange": {
4748
+ "startIndex": 1,
4749
+ "endIndex": 3
4750
+ },
4751
+ "releaseTag": "Beta",
4752
+ "overloadIndex": 1,
4753
+ "parameters": [],
4754
+ "name": "getHandOffData"
4755
+ },
4756
+ {
4757
+ "kind": "MethodSignature",
4758
+ "canonicalReference": "@genesislcap/ai-assistant!AiDriver#getHandOffStack:member(1)",
4759
+ "docComment": "/**\n * The hand-offs in progress, oldest first, to save with the session (GENC-1737). Copies: changing them changes nothing.\n *\n * @beta\n */\n",
4760
+ "excerptTokens": [
4761
+ {
4762
+ "kind": "Content",
4763
+ "text": "getHandOffStack?(): "
4764
+ },
4765
+ {
4766
+ "kind": "Reference",
4767
+ "text": "HandOffFrame",
4768
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame:interface"
4769
+ },
4770
+ {
4771
+ "kind": "Content",
4772
+ "text": "[]"
4773
+ },
4774
+ {
4775
+ "kind": "Content",
4776
+ "text": ";"
4777
+ }
4778
+ ],
4779
+ "isOptional": true,
4780
+ "returnTypeTokenRange": {
4781
+ "startIndex": 1,
4782
+ "endIndex": 3
4783
+ },
4784
+ "releaseTag": "Beta",
4785
+ "overloadIndex": 1,
4786
+ "parameters": [],
4787
+ "name": "getHandOffStack"
4788
+ },
4346
4789
  {
4347
4790
  "kind": "MethodSignature",
4348
4791
  "canonicalReference": "@genesislcap/ai-assistant!AiDriver#getHistoryForPersistence:member(1)",
@@ -5173,6 +5616,149 @@
5173
5616
  ],
5174
5617
  "name": "restoreCondensePolicies"
5175
5618
  },
5619
+ {
5620
+ "kind": "MethodSignature",
5621
+ "canonicalReference": "@genesislcap/ai-assistant!AiDriver#restoreHandOffData:member(1)",
5622
+ "docComment": "/**\n * Restore what {@link AiDriver.getHandOffData} saved, before the hand-off stack. Nothing comes back from a frozen (`interrupted`) session, whose flow does not resume.\n *\n * @beta\n */\n",
5623
+ "excerptTokens": [
5624
+ {
5625
+ "kind": "Content",
5626
+ "text": "restoreHandOffData?(saved: "
5627
+ },
5628
+ {
5629
+ "kind": "Content",
5630
+ "text": "unknown"
5631
+ },
5632
+ {
5633
+ "kind": "Content",
5634
+ "text": ", interrupted: "
5635
+ },
5636
+ {
5637
+ "kind": "Content",
5638
+ "text": "boolean"
5639
+ },
5640
+ {
5641
+ "kind": "Content",
5642
+ "text": "): "
5643
+ },
5644
+ {
5645
+ "kind": "Content",
5646
+ "text": "void"
5647
+ },
5648
+ {
5649
+ "kind": "Content",
5650
+ "text": ";"
5651
+ }
5652
+ ],
5653
+ "isOptional": true,
5654
+ "returnTypeTokenRange": {
5655
+ "startIndex": 5,
5656
+ "endIndex": 6
5657
+ },
5658
+ "releaseTag": "Beta",
5659
+ "overloadIndex": 1,
5660
+ "parameters": [
5661
+ {
5662
+ "parameterName": "saved",
5663
+ "parameterTypeTokenRange": {
5664
+ "startIndex": 1,
5665
+ "endIndex": 2
5666
+ },
5667
+ "isOptional": false
5668
+ },
5669
+ {
5670
+ "parameterName": "interrupted",
5671
+ "parameterTypeTokenRange": {
5672
+ "startIndex": 3,
5673
+ "endIndex": 4
5674
+ },
5675
+ "isOptional": false
5676
+ }
5677
+ ],
5678
+ "name": "restoreHandOffData"
5679
+ },
5680
+ {
5681
+ "kind": "MethodSignature",
5682
+ "canonicalReference": "@genesislcap/ai-assistant!AiDriver#restoreHandOffStack:member(1)",
5683
+ "docComment": "/**\n * Restore saved hand-offs, before the condense policies, against the agents configured now and the saved agent states. A frame whose caller has gone, or whose stateful caller has no saved state (`interrupted` drops them all), is unwound with `handoff-unwound`. When the top frame's target had finished, or has gone, its caller is due to resume: `resume` names it and the note its resumed turn needs, and {@link AiDriver.resumeRestoredFlow} hands back. `droppedLocks` names plain targets of unwound hand-offs, whose saved lock was only that hand-off's.\n *\n * @beta\n */\n",
5684
+ "excerptTokens": [
5685
+ {
5686
+ "kind": "Content",
5687
+ "text": "restoreHandOffStack?(saved: "
5688
+ },
5689
+ {
5690
+ "kind": "Content",
5691
+ "text": "unknown"
5692
+ },
5693
+ {
5694
+ "kind": "Content",
5695
+ "text": ", savedStates: "
5696
+ },
5697
+ {
5698
+ "kind": "Reference",
5699
+ "text": "Record",
5700
+ "canonicalReference": "!Record:type"
5701
+ },
5702
+ {
5703
+ "kind": "Content",
5704
+ "text": "<string, unknown>"
5705
+ },
5706
+ {
5707
+ "kind": "Content",
5708
+ "text": ", interrupted: "
5709
+ },
5710
+ {
5711
+ "kind": "Content",
5712
+ "text": "boolean"
5713
+ },
5714
+ {
5715
+ "kind": "Content",
5716
+ "text": "): "
5717
+ },
5718
+ {
5719
+ "kind": "Content",
5720
+ "text": "{\n resume?: {\n agent: string;\n note: string;\n };\n droppedLocks?: string[];\n }"
5721
+ },
5722
+ {
5723
+ "kind": "Content",
5724
+ "text": ";"
5725
+ }
5726
+ ],
5727
+ "isOptional": true,
5728
+ "returnTypeTokenRange": {
5729
+ "startIndex": 8,
5730
+ "endIndex": 9
5731
+ },
5732
+ "releaseTag": "Beta",
5733
+ "overloadIndex": 1,
5734
+ "parameters": [
5735
+ {
5736
+ "parameterName": "saved",
5737
+ "parameterTypeTokenRange": {
5738
+ "startIndex": 1,
5739
+ "endIndex": 2
5740
+ },
5741
+ "isOptional": false
5742
+ },
5743
+ {
5744
+ "parameterName": "savedStates",
5745
+ "parameterTypeTokenRange": {
5746
+ "startIndex": 3,
5747
+ "endIndex": 5
5748
+ },
5749
+ "isOptional": false
5750
+ },
5751
+ {
5752
+ "parameterName": "interrupted",
5753
+ "parameterTypeTokenRange": {
5754
+ "startIndex": 6,
5755
+ "endIndex": 7
5756
+ },
5757
+ "isOptional": false
5758
+ }
5759
+ ],
5760
+ "name": "restoreHandOffStack"
5761
+ },
5176
5762
  {
5177
5763
  "kind": "MethodSignature",
5178
5764
  "canonicalReference": "@genesislcap/ai-assistant!AiDriver#restoreInteractionCheckpoint:member(1)",
@@ -5450,6 +6036,39 @@
5450
6036
  ],
5451
6037
  "name": "sendMessage"
5452
6038
  },
6039
+ {
6040
+ "kind": "MethodSignature",
6041
+ "canonicalReference": "@genesislcap/ai-assistant!AiDriver#serializeWaitingCallers:member(1)",
6042
+ "docComment": "/**\n * The saved state of each caller waiting in a hand-off whose state is live, by name, from its `serialize`. Saved with the active agent's, so a reload can resume the caller.\n *\n * @beta\n */\n",
6043
+ "excerptTokens": [
6044
+ {
6045
+ "kind": "Content",
6046
+ "text": "serializeWaitingCallers?(): "
6047
+ },
6048
+ {
6049
+ "kind": "Reference",
6050
+ "text": "Record",
6051
+ "canonicalReference": "!Record:type"
6052
+ },
6053
+ {
6054
+ "kind": "Content",
6055
+ "text": "<string, unknown>"
6056
+ },
6057
+ {
6058
+ "kind": "Content",
6059
+ "text": ";"
6060
+ }
6061
+ ],
6062
+ "isOptional": true,
6063
+ "returnTypeTokenRange": {
6064
+ "startIndex": 1,
6065
+ "endIndex": 3
6066
+ },
6067
+ "releaseTag": "Beta",
6068
+ "overloadIndex": 1,
6069
+ "parameters": [],
6070
+ "name": "serializeWaitingCallers"
6071
+ },
5453
6072
  {
5454
6073
  "kind": "MethodSignature",
5455
6074
  "canonicalReference": "@genesislcap/ai-assistant!AiDriver#setContextGuard:member(1)",
@@ -5585,6 +6204,70 @@
5585
6204
  }
5586
6205
  ],
5587
6206
  "name": "setPinnedAgent"
6207
+ },
6208
+ {
6209
+ "kind": "MethodSignature",
6210
+ "canonicalReference": "@genesislcap/ai-assistant!AiDriver#unwindHandOffs:member(1)",
6211
+ "docComment": "/**\n * End every hand-off without a hand-back, newest first: the chat was cleared, or the agents changed. Each raises `handoff-unwound`; on Clear a waiting caller's `onHandOffReturn` is told.\n *\n * @beta\n */\n",
6212
+ "excerptTokens": [
6213
+ {
6214
+ "kind": "Content",
6215
+ "text": "unwindHandOffs?(kind: "
6216
+ },
6217
+ {
6218
+ "kind": "Reference",
6219
+ "text": "Extract",
6220
+ "canonicalReference": "!Extract:type"
6221
+ },
6222
+ {
6223
+ "kind": "Content",
6224
+ "text": "<"
6225
+ },
6226
+ {
6227
+ "kind": "Reference",
6228
+ "text": "HandOffOutcomeKind",
6229
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffOutcomeKind:type"
6230
+ },
6231
+ {
6232
+ "kind": "Content",
6233
+ "text": ", 'cleared' | 'state-lost'>"
6234
+ },
6235
+ {
6236
+ "kind": "Content",
6237
+ "text": "): "
6238
+ },
6239
+ {
6240
+ "kind": "Reference",
6241
+ "text": "Promise",
6242
+ "canonicalReference": "!Promise:interface"
6243
+ },
6244
+ {
6245
+ "kind": "Content",
6246
+ "text": "<void>"
6247
+ },
6248
+ {
6249
+ "kind": "Content",
6250
+ "text": ";"
6251
+ }
6252
+ ],
6253
+ "isOptional": true,
6254
+ "returnTypeTokenRange": {
6255
+ "startIndex": 6,
6256
+ "endIndex": 8
6257
+ },
6258
+ "releaseTag": "Beta",
6259
+ "overloadIndex": 1,
6260
+ "parameters": [
6261
+ {
6262
+ "parameterName": "kind",
6263
+ "parameterTypeTokenRange": {
6264
+ "startIndex": 1,
6265
+ "endIndex": 5
6266
+ },
6267
+ "isOptional": false
6268
+ }
6269
+ ],
6270
+ "name": "unwindHandOffs"
5588
6271
  }
5589
6272
  ],
5590
6273
  "extendsTokenRanges": [
@@ -5787,6 +6470,129 @@
5787
6470
  "endIndex": 3
5788
6471
  }
5789
6472
  },
6473
+ {
6474
+ "kind": "PropertySignature",
6475
+ "canonicalReference": "@genesislcap/ai-assistant!AiDriverEventMap#\"handoff-returned\":member",
6476
+ "docComment": "/**\n * A hand-off ended and its caller is active again; `detail.outcome` says how.\n */\n",
6477
+ "excerptTokens": [
6478
+ {
6479
+ "kind": "Content",
6480
+ "text": "'handoff-returned': "
6481
+ },
6482
+ {
6483
+ "kind": "Reference",
6484
+ "text": "CustomEvent",
6485
+ "canonicalReference": "!CustomEvent:interface"
6486
+ },
6487
+ {
6488
+ "kind": "Content",
6489
+ "text": "<"
6490
+ },
6491
+ {
6492
+ "kind": "Reference",
6493
+ "text": "HandOffFrame",
6494
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame:interface"
6495
+ },
6496
+ {
6497
+ "kind": "Content",
6498
+ "text": ">"
6499
+ },
6500
+ {
6501
+ "kind": "Content",
6502
+ "text": ";"
6503
+ }
6504
+ ],
6505
+ "isReadonly": false,
6506
+ "isOptional": false,
6507
+ "releaseTag": "Beta",
6508
+ "name": "\"handoff-returned\"",
6509
+ "propertyTypeTokenRange": {
6510
+ "startIndex": 1,
6511
+ "endIndex": 5
6512
+ }
6513
+ },
6514
+ {
6515
+ "kind": "PropertySignature",
6516
+ "canonicalReference": "@genesislcap/ai-assistant!AiDriverEventMap#\"handoff-started\":member",
6517
+ "docComment": "/**\n * A hand-off started: its target is now active (GENC-1737).\n */\n",
6518
+ "excerptTokens": [
6519
+ {
6520
+ "kind": "Content",
6521
+ "text": "'handoff-started': "
6522
+ },
6523
+ {
6524
+ "kind": "Reference",
6525
+ "text": "CustomEvent",
6526
+ "canonicalReference": "!CustomEvent:interface"
6527
+ },
6528
+ {
6529
+ "kind": "Content",
6530
+ "text": "<"
6531
+ },
6532
+ {
6533
+ "kind": "Reference",
6534
+ "text": "HandOffFrame",
6535
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame:interface"
6536
+ },
6537
+ {
6538
+ "kind": "Content",
6539
+ "text": ">"
6540
+ },
6541
+ {
6542
+ "kind": "Content",
6543
+ "text": ";"
6544
+ }
6545
+ ],
6546
+ "isReadonly": false,
6547
+ "isOptional": false,
6548
+ "releaseTag": "Beta",
6549
+ "name": "\"handoff-started\"",
6550
+ "propertyTypeTokenRange": {
6551
+ "startIndex": 1,
6552
+ "endIndex": 5
6553
+ }
6554
+ },
6555
+ {
6556
+ "kind": "PropertySignature",
6557
+ "canonicalReference": "@genesislcap/ai-assistant!AiDriverEventMap#\"handoff-unwound\":member",
6558
+ "docComment": "/**\n * A hand-off ended with no hand-back: cleared, or found unresumable.\n */\n",
6559
+ "excerptTokens": [
6560
+ {
6561
+ "kind": "Content",
6562
+ "text": "'handoff-unwound': "
6563
+ },
6564
+ {
6565
+ "kind": "Reference",
6566
+ "text": "CustomEvent",
6567
+ "canonicalReference": "!CustomEvent:interface"
6568
+ },
6569
+ {
6570
+ "kind": "Content",
6571
+ "text": "<"
6572
+ },
6573
+ {
6574
+ "kind": "Reference",
6575
+ "text": "HandOffFrame",
6576
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame:interface"
6577
+ },
6578
+ {
6579
+ "kind": "Content",
6580
+ "text": ">"
6581
+ },
6582
+ {
6583
+ "kind": "Content",
6584
+ "text": ";"
6585
+ }
6586
+ ],
6587
+ "isReadonly": false,
6588
+ "isOptional": false,
6589
+ "releaseTag": "Beta",
6590
+ "name": "\"handoff-unwound\"",
6591
+ "propertyTypeTokenRange": {
6592
+ "startIndex": 1,
6593
+ "endIndex": 5
6594
+ }
6595
+ },
5790
6596
  {
5791
6597
  "kind": "PropertySignature",
5792
6598
  "canonicalReference": "@genesislcap/ai-assistant!AiDriverEventMap#\"history-updated\":member",
@@ -11148,6 +11954,78 @@
11148
11954
  "isAbstract": false,
11149
11955
  "name": "getFlowOwner"
11150
11956
  },
11957
+ {
11958
+ "kind": "Method",
11959
+ "canonicalReference": "@genesislcap/ai-assistant!BaseDriverDecorator#getHandOffData:member(1)",
11960
+ "docComment": "",
11961
+ "excerptTokens": [
11962
+ {
11963
+ "kind": "Content",
11964
+ "text": "getHandOffData(): "
11965
+ },
11966
+ {
11967
+ "kind": "Reference",
11968
+ "text": "Record",
11969
+ "canonicalReference": "!Record:type"
11970
+ },
11971
+ {
11972
+ "kind": "Content",
11973
+ "text": "<string, unknown>"
11974
+ },
11975
+ {
11976
+ "kind": "Content",
11977
+ "text": ";"
11978
+ }
11979
+ ],
11980
+ "isStatic": false,
11981
+ "returnTypeTokenRange": {
11982
+ "startIndex": 1,
11983
+ "endIndex": 3
11984
+ },
11985
+ "releaseTag": "Beta",
11986
+ "isProtected": false,
11987
+ "overloadIndex": 1,
11988
+ "parameters": [],
11989
+ "isOptional": false,
11990
+ "isAbstract": false,
11991
+ "name": "getHandOffData"
11992
+ },
11993
+ {
11994
+ "kind": "Method",
11995
+ "canonicalReference": "@genesislcap/ai-assistant!BaseDriverDecorator#getHandOffStack:member(1)",
11996
+ "docComment": "",
11997
+ "excerptTokens": [
11998
+ {
11999
+ "kind": "Content",
12000
+ "text": "getHandOffStack(): "
12001
+ },
12002
+ {
12003
+ "kind": "Reference",
12004
+ "text": "HandOffFrame",
12005
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame:interface"
12006
+ },
12007
+ {
12008
+ "kind": "Content",
12009
+ "text": "[]"
12010
+ },
12011
+ {
12012
+ "kind": "Content",
12013
+ "text": ";"
12014
+ }
12015
+ ],
12016
+ "isStatic": false,
12017
+ "returnTypeTokenRange": {
12018
+ "startIndex": 1,
12019
+ "endIndex": 3
12020
+ },
12021
+ "releaseTag": "Beta",
12022
+ "isProtected": false,
12023
+ "overloadIndex": 1,
12024
+ "parameters": [],
12025
+ "isOptional": false,
12026
+ "isAbstract": false,
12027
+ "name": "getHandOffStack"
12028
+ },
11151
12029
  {
11152
12030
  "kind": "Method",
11153
12031
  "canonicalReference": "@genesislcap/ai-assistant!BaseDriverDecorator#getHistoryForPersistence:member(1)",
@@ -12104,6 +12982,155 @@
12104
12982
  "isAbstract": false,
12105
12983
  "name": "restoreCondensePolicies"
12106
12984
  },
12985
+ {
12986
+ "kind": "Method",
12987
+ "canonicalReference": "@genesislcap/ai-assistant!BaseDriverDecorator#restoreHandOffData:member(1)",
12988
+ "docComment": "",
12989
+ "excerptTokens": [
12990
+ {
12991
+ "kind": "Content",
12992
+ "text": "restoreHandOffData(saved: "
12993
+ },
12994
+ {
12995
+ "kind": "Content",
12996
+ "text": "unknown"
12997
+ },
12998
+ {
12999
+ "kind": "Content",
13000
+ "text": ", interrupted: "
13001
+ },
13002
+ {
13003
+ "kind": "Content",
13004
+ "text": "boolean"
13005
+ },
13006
+ {
13007
+ "kind": "Content",
13008
+ "text": "): "
13009
+ },
13010
+ {
13011
+ "kind": "Content",
13012
+ "text": "void"
13013
+ },
13014
+ {
13015
+ "kind": "Content",
13016
+ "text": ";"
13017
+ }
13018
+ ],
13019
+ "isStatic": false,
13020
+ "returnTypeTokenRange": {
13021
+ "startIndex": 5,
13022
+ "endIndex": 6
13023
+ },
13024
+ "releaseTag": "Beta",
13025
+ "isProtected": false,
13026
+ "overloadIndex": 1,
13027
+ "parameters": [
13028
+ {
13029
+ "parameterName": "saved",
13030
+ "parameterTypeTokenRange": {
13031
+ "startIndex": 1,
13032
+ "endIndex": 2
13033
+ },
13034
+ "isOptional": false
13035
+ },
13036
+ {
13037
+ "parameterName": "interrupted",
13038
+ "parameterTypeTokenRange": {
13039
+ "startIndex": 3,
13040
+ "endIndex": 4
13041
+ },
13042
+ "isOptional": false
13043
+ }
13044
+ ],
13045
+ "isOptional": false,
13046
+ "isAbstract": false,
13047
+ "name": "restoreHandOffData"
13048
+ },
13049
+ {
13050
+ "kind": "Method",
13051
+ "canonicalReference": "@genesislcap/ai-assistant!BaseDriverDecorator#restoreHandOffStack:member(1)",
13052
+ "docComment": "",
13053
+ "excerptTokens": [
13054
+ {
13055
+ "kind": "Content",
13056
+ "text": "restoreHandOffStack(saved: "
13057
+ },
13058
+ {
13059
+ "kind": "Content",
13060
+ "text": "unknown"
13061
+ },
13062
+ {
13063
+ "kind": "Content",
13064
+ "text": ", savedStates: "
13065
+ },
13066
+ {
13067
+ "kind": "Reference",
13068
+ "text": "Record",
13069
+ "canonicalReference": "!Record:type"
13070
+ },
13071
+ {
13072
+ "kind": "Content",
13073
+ "text": "<string, unknown>"
13074
+ },
13075
+ {
13076
+ "kind": "Content",
13077
+ "text": ", interrupted: "
13078
+ },
13079
+ {
13080
+ "kind": "Content",
13081
+ "text": "boolean"
13082
+ },
13083
+ {
13084
+ "kind": "Content",
13085
+ "text": "): "
13086
+ },
13087
+ {
13088
+ "kind": "Content",
13089
+ "text": "{\n resume?: {\n agent: string;\n note: string;\n };\n droppedLocks?: string[];\n }"
13090
+ },
13091
+ {
13092
+ "kind": "Content",
13093
+ "text": ";"
13094
+ }
13095
+ ],
13096
+ "isStatic": false,
13097
+ "returnTypeTokenRange": {
13098
+ "startIndex": 8,
13099
+ "endIndex": 9
13100
+ },
13101
+ "releaseTag": "Beta",
13102
+ "isProtected": false,
13103
+ "overloadIndex": 1,
13104
+ "parameters": [
13105
+ {
13106
+ "parameterName": "saved",
13107
+ "parameterTypeTokenRange": {
13108
+ "startIndex": 1,
13109
+ "endIndex": 2
13110
+ },
13111
+ "isOptional": false
13112
+ },
13113
+ {
13114
+ "parameterName": "savedStates",
13115
+ "parameterTypeTokenRange": {
13116
+ "startIndex": 3,
13117
+ "endIndex": 5
13118
+ },
13119
+ "isOptional": false
13120
+ },
13121
+ {
13122
+ "parameterName": "interrupted",
13123
+ "parameterTypeTokenRange": {
13124
+ "startIndex": 6,
13125
+ "endIndex": 7
13126
+ },
13127
+ "isOptional": false
13128
+ }
13129
+ ],
13130
+ "isOptional": false,
13131
+ "isAbstract": false,
13132
+ "name": "restoreHandOffStack"
13133
+ },
12107
13134
  {
12108
13135
  "kind": "Method",
12109
13136
  "canonicalReference": "@genesislcap/ai-assistant!BaseDriverDecorator#restoreInteractionCheckpoint:member(1)",
@@ -12393,6 +13420,42 @@
12393
13420
  "isAbstract": false,
12394
13421
  "name": "sendMessage"
12395
13422
  },
13423
+ {
13424
+ "kind": "Method",
13425
+ "canonicalReference": "@genesislcap/ai-assistant!BaseDriverDecorator#serializeWaitingCallers:member(1)",
13426
+ "docComment": "",
13427
+ "excerptTokens": [
13428
+ {
13429
+ "kind": "Content",
13430
+ "text": "serializeWaitingCallers(): "
13431
+ },
13432
+ {
13433
+ "kind": "Reference",
13434
+ "text": "Record",
13435
+ "canonicalReference": "!Record:type"
13436
+ },
13437
+ {
13438
+ "kind": "Content",
13439
+ "text": "<string, unknown>"
13440
+ },
13441
+ {
13442
+ "kind": "Content",
13443
+ "text": ";"
13444
+ }
13445
+ ],
13446
+ "isStatic": false,
13447
+ "returnTypeTokenRange": {
13448
+ "startIndex": 1,
13449
+ "endIndex": 3
13450
+ },
13451
+ "releaseTag": "Beta",
13452
+ "isProtected": false,
13453
+ "overloadIndex": 1,
13454
+ "parameters": [],
13455
+ "isOptional": false,
13456
+ "isAbstract": false,
13457
+ "name": "serializeWaitingCallers"
13458
+ },
12396
13459
  {
12397
13460
  "kind": "Method",
12398
13461
  "canonicalReference": "@genesislcap/ai-assistant!BaseDriverDecorator#setContextGuard:member(1)",
@@ -12537,6 +13600,73 @@
12537
13600
  "isOptional": false,
12538
13601
  "isAbstract": false,
12539
13602
  "name": "setPinnedAgent"
13603
+ },
13604
+ {
13605
+ "kind": "Method",
13606
+ "canonicalReference": "@genesislcap/ai-assistant!BaseDriverDecorator#unwindHandOffs:member(1)",
13607
+ "docComment": "",
13608
+ "excerptTokens": [
13609
+ {
13610
+ "kind": "Content",
13611
+ "text": "unwindHandOffs(kind: "
13612
+ },
13613
+ {
13614
+ "kind": "Reference",
13615
+ "text": "Extract",
13616
+ "canonicalReference": "!Extract:type"
13617
+ },
13618
+ {
13619
+ "kind": "Content",
13620
+ "text": "<"
13621
+ },
13622
+ {
13623
+ "kind": "Reference",
13624
+ "text": "HandOffOutcomeKind",
13625
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffOutcomeKind:type"
13626
+ },
13627
+ {
13628
+ "kind": "Content",
13629
+ "text": ", 'cleared' | 'state-lost'>"
13630
+ },
13631
+ {
13632
+ "kind": "Content",
13633
+ "text": "): "
13634
+ },
13635
+ {
13636
+ "kind": "Reference",
13637
+ "text": "Promise",
13638
+ "canonicalReference": "!Promise:interface"
13639
+ },
13640
+ {
13641
+ "kind": "Content",
13642
+ "text": "<void>"
13643
+ },
13644
+ {
13645
+ "kind": "Content",
13646
+ "text": ";"
13647
+ }
13648
+ ],
13649
+ "isStatic": false,
13650
+ "returnTypeTokenRange": {
13651
+ "startIndex": 6,
13652
+ "endIndex": 8
13653
+ },
13654
+ "releaseTag": "Beta",
13655
+ "isProtected": false,
13656
+ "overloadIndex": 1,
13657
+ "parameters": [
13658
+ {
13659
+ "parameterName": "kind",
13660
+ "parameterTypeTokenRange": {
13661
+ "startIndex": 1,
13662
+ "endIndex": 5
13663
+ },
13664
+ "isOptional": false
13665
+ }
13666
+ ],
13667
+ "isOptional": false,
13668
+ "isAbstract": false,
13669
+ "name": "unwindHandOffs"
12540
13670
  }
12541
13671
  ],
12542
13672
  "extendsTokenRange": {
@@ -13093,6 +14223,37 @@
13093
14223
  "isAbstract": false,
13094
14224
  "name": "dispose"
13095
14225
  },
14226
+ {
14227
+ "kind": "Method",
14228
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#endSuspendedActivations:member(1)",
14229
+ "docComment": "/**\n * End every suspension: the hand-offs were unwound, so their callers' activations are over.\n */\n",
14230
+ "excerptTokens": [
14231
+ {
14232
+ "kind": "Content",
14233
+ "text": "endSuspendedActivations(): "
14234
+ },
14235
+ {
14236
+ "kind": "Content",
14237
+ "text": "void"
14238
+ },
14239
+ {
14240
+ "kind": "Content",
14241
+ "text": ";"
14242
+ }
14243
+ ],
14244
+ "isStatic": false,
14245
+ "returnTypeTokenRange": {
14246
+ "startIndex": 1,
14247
+ "endIndex": 2
14248
+ },
14249
+ "releaseTag": "Public",
14250
+ "isProtected": false,
14251
+ "overloadIndex": 1,
14252
+ "parameters": [],
14253
+ "isOptional": false,
14254
+ "isAbstract": false,
14255
+ "name": "endSuspendedActivations"
14256
+ },
13096
14257
  {
13097
14258
  "kind": "Method",
13098
14259
  "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getActiveAgent:member(1)",
@@ -13416,30 +14577,21 @@
13416
14577
  },
13417
14578
  {
13418
14579
  "kind": "Method",
13419
- "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getHistory:member(1)",
13420
- "docComment": "",
14580
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getHandOffCompletion:member(1)",
14581
+ "docComment": "/**\n * What `completeHandOff` handed back in the most recent call, if it was called.\n */\n",
13421
14582
  "excerptTokens": [
13422
14583
  {
13423
14584
  "kind": "Content",
13424
- "text": "getHistory(): "
13425
- },
13426
- {
13427
- "kind": "Reference",
13428
- "text": "ReadonlyArray",
13429
- "canonicalReference": "!ReadonlyArray:interface"
13430
- },
13431
- {
13432
- "kind": "Content",
13433
- "text": "<"
14585
+ "text": "getHandOffCompletion(): "
13434
14586
  },
13435
14587
  {
13436
14588
  "kind": "Reference",
13437
- "text": "ChatMessage",
13438
- "canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
14589
+ "text": "HandOffCompletion",
14590
+ "canonicalReference": "@genesislcap/foundation-ai!HandOffCompletion:interface"
13439
14591
  },
13440
14592
  {
13441
14593
  "kind": "Content",
13442
- "text": ">"
14594
+ "text": " | undefined"
13443
14595
  },
13444
14596
  {
13445
14597
  "kind": "Content",
@@ -13449,7 +14601,7 @@
13449
14601
  "isStatic": false,
13450
14602
  "returnTypeTokenRange": {
13451
14603
  "startIndex": 1,
13452
- "endIndex": 5
14604
+ "endIndex": 3
13453
14605
  },
13454
14606
  "releaseTag": "Public",
13455
14607
  "isProtected": false,
@@ -13457,25 +14609,25 @@
13457
14609
  "parameters": [],
13458
14610
  "isOptional": false,
13459
14611
  "isAbstract": false,
13460
- "name": "getHistory"
14612
+ "name": "getHandOffCompletion"
13461
14613
  },
13462
14614
  {
13463
14615
  "kind": "Method",
13464
- "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getHistoryForPersistence:member(1)",
13465
- "docComment": "/**\n * The transcript as it should be **stored**: every tool payload the model has already stopped seeing replaced by the same stub it was sent (GENC-1566). Live history is untouched — this returns a copy.\n *\n * Condensation deliberately spares stored history, because the live transcript and the debug export both read it. A host writing that transcript to durable storage inherits the other half of that decision: it stores payloads the driver has already retired, on every autosave, for the life of the session. Measured on one small Create session — 58,187 chars, 7.4% of a 790 KB session object, across five payloads worth 14,434 tokens of context, written 86 times.\n *\n * Only already-collapsed payloads are touched, so this can never store a stub for something the model can still see, and it has no side effects (see `condenseForPersistence`, which is internal). A host that wants the unredacted transcript still calls {@link ChatDriver.getRawHistory}, and a diagnostics stream that keeps full payloads is unaffected — which is what makes the elision recoverable.\n */\n",
14616
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getHandOffRequest:member(1)",
14617
+ "docComment": "/**\n * The `handOff` the most recent call accepted, if any (GENC-1737).\n */\n",
13466
14618
  "excerptTokens": [
13467
14619
  {
13468
14620
  "kind": "Content",
13469
- "text": "getHistoryForPersistence(): "
14621
+ "text": "getHandOffRequest(): "
13470
14622
  },
13471
14623
  {
13472
14624
  "kind": "Reference",
13473
- "text": "ChatMessage",
13474
- "canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
14625
+ "text": "HandOffRequest",
14626
+ "canonicalReference": "@genesislcap/foundation-ai!HandOffRequest:interface"
13475
14627
  },
13476
14628
  {
13477
14629
  "kind": "Content",
13478
- "text": "[]"
14630
+ "text": " | undefined"
13479
14631
  },
13480
14632
  {
13481
14633
  "kind": "Content",
@@ -13493,25 +14645,34 @@
13493
14645
  "parameters": [],
13494
14646
  "isOptional": false,
13495
14647
  "isAbstract": false,
13496
- "name": "getHistoryForPersistence"
14648
+ "name": "getHandOffRequest"
13497
14649
  },
13498
14650
  {
13499
14651
  "kind": "Method",
13500
- "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getInteractionCheckpoint:member(1)",
13501
- "docComment": "/**\n * One checkpoint to save: the long action in flight's, else the newest a reload cut.\n *\n * @deprecated\n *\n * Use `getInteractionCheckpoints`.\n */\n",
14652
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getHistory:member(1)",
14653
+ "docComment": "",
13502
14654
  "excerptTokens": [
13503
14655
  {
13504
14656
  "kind": "Content",
13505
- "text": "getInteractionCheckpoint(): "
14657
+ "text": "getHistory(): "
13506
14658
  },
13507
14659
  {
13508
14660
  "kind": "Reference",
13509
- "text": "PersistedInteractionCheckpoint",
13510
- "canonicalReference": "@genesislcap/ai-assistant!PersistedInteractionCheckpoint:interface"
14661
+ "text": "ReadonlyArray",
14662
+ "canonicalReference": "!ReadonlyArray:interface"
13511
14663
  },
13512
14664
  {
13513
14665
  "kind": "Content",
13514
- "text": " | undefined"
14666
+ "text": "<"
14667
+ },
14668
+ {
14669
+ "kind": "Reference",
14670
+ "text": "ChatMessage",
14671
+ "canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
14672
+ },
14673
+ {
14674
+ "kind": "Content",
14675
+ "text": ">"
13515
14676
  },
13516
14677
  {
13517
14678
  "kind": "Content",
@@ -13521,7 +14682,7 @@
13521
14682
  "isStatic": false,
13522
14683
  "returnTypeTokenRange": {
13523
14684
  "startIndex": 1,
13524
- "endIndex": 3
14685
+ "endIndex": 5
13525
14686
  },
13526
14687
  "releaseTag": "Public",
13527
14688
  "isProtected": false,
@@ -13529,25 +14690,21 @@
13529
14690
  "parameters": [],
13530
14691
  "isOptional": false,
13531
14692
  "isAbstract": false,
13532
- "name": "getInteractionCheckpoint"
14693
+ "name": "getHistory"
13533
14694
  },
13534
14695
  {
13535
14696
  "kind": "Method",
13536
- "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getInteractionCheckpoints:member(1)",
13537
- "docComment": "/**\n * Every checkpoint to save with the session (GENC-1660 §4.12): those a reload cut that nothing has taken over yet, oldest first, then the long action in flight's, if it has saved one.\n *\n * Optional, so a third-party driver need not implement it; every shipped driver does.\n */\n",
14697
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getHistoryForPersistence:member(1)",
14698
+ "docComment": "/**\n * The transcript as it should be **stored**: every tool payload the model has already stopped seeing replaced by the same stub it was sent (GENC-1566). Live history is untouched — this returns a copy.\n *\n * Condensation deliberately spares stored history, because the live transcript and the debug export both read it. A host writing that transcript to durable storage inherits the other half of that decision: it stores payloads the driver has already retired, on every autosave, for the life of the session. Measured on one small Create session — 58,187 chars, 7.4% of a 790 KB session object, across five payloads worth 14,434 tokens of context, written 86 times.\n *\n * Only already-collapsed payloads are touched, so this can never store a stub for something the model can still see, and it has no side effects (see `condenseForPersistence`, which is internal). A host that wants the unredacted transcript still calls {@link ChatDriver.getRawHistory}, and a diagnostics stream that keeps full payloads is unaffected — which is what makes the elision recoverable.\n */\n",
13538
14699
  "excerptTokens": [
13539
14700
  {
13540
14701
  "kind": "Content",
13541
- "text": "getInteractionCheckpoints(): "
13542
- },
13543
- {
13544
- "kind": "Content",
13545
- "text": "readonly "
14702
+ "text": "getHistoryForPersistence(): "
13546
14703
  },
13547
14704
  {
13548
14705
  "kind": "Reference",
13549
- "text": "PersistedInteractionCheckpoint",
13550
- "canonicalReference": "@genesislcap/ai-assistant!PersistedInteractionCheckpoint:interface"
14706
+ "text": "ChatMessage",
14707
+ "canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
13551
14708
  },
13552
14709
  {
13553
14710
  "kind": "Content",
@@ -13561,7 +14718,7 @@
13561
14718
  "isStatic": false,
13562
14719
  "returnTypeTokenRange": {
13563
14720
  "startIndex": 1,
13564
- "endIndex": 4
14721
+ "endIndex": 3
13565
14722
  },
13566
14723
  "releaseTag": "Public",
13567
14724
  "isProtected": false,
@@ -13569,29 +14726,21 @@
13569
14726
  "parameters": [],
13570
14727
  "isOptional": false,
13571
14728
  "isAbstract": false,
13572
- "name": "getInteractionCheckpoints"
14729
+ "name": "getHistoryForPersistence"
13573
14730
  },
13574
14731
  {
13575
14732
  "kind": "Method",
13576
- "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getInteractionContext:member(1)",
13577
- "docComment": "/**\n * The live {@link InteractionContext} for a pending interaction (GENC-1390), or `undefined` once resolved/evicted. Read by `AiChatInteractionWrapper` (via the host) to build the widget's pending `interaction` descriptor.\n */\n",
14733
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getInteractionCheckpoint:member(1)",
14734
+ "docComment": "/**\n * One checkpoint to save: the long action in flight's, else the newest a reload cut.\n *\n * @deprecated\n *\n * Use `getInteractionCheckpoints`.\n */\n",
13578
14735
  "excerptTokens": [
13579
14736
  {
13580
14737
  "kind": "Content",
13581
- "text": "getInteractionContext(interactionId: "
13582
- },
13583
- {
13584
- "kind": "Content",
13585
- "text": "string"
13586
- },
13587
- {
13588
- "kind": "Content",
13589
- "text": "): "
14738
+ "text": "getInteractionCheckpoint(): "
13590
14739
  },
13591
14740
  {
13592
14741
  "kind": "Reference",
13593
- "text": "InteractionContext",
13594
- "canonicalReference": "@genesislcap/ai-assistant!InteractionContext:interface"
14742
+ "text": "PersistedInteractionCheckpoint",
14743
+ "canonicalReference": "@genesislcap/ai-assistant!PersistedInteractionCheckpoint:interface"
13595
14744
  },
13596
14745
  {
13597
14746
  "kind": "Content",
@@ -13603,49 +14752,9 @@
13603
14752
  }
13604
14753
  ],
13605
14754
  "isStatic": false,
13606
- "returnTypeTokenRange": {
13607
- "startIndex": 3,
13608
- "endIndex": 5
13609
- },
13610
- "releaseTag": "Public",
13611
- "isProtected": false,
13612
- "overloadIndex": 1,
13613
- "parameters": [
13614
- {
13615
- "parameterName": "interactionId",
13616
- "parameterTypeTokenRange": {
13617
- "startIndex": 1,
13618
- "endIndex": 2
13619
- },
13620
- "isOptional": false
13621
- }
13622
- ],
13623
- "isOptional": false,
13624
- "isAbstract": false,
13625
- "name": "getInteractionContext"
13626
- },
13627
- {
13628
- "kind": "Method",
13629
- "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getPreambleTokens:member(1)",
13630
- "docComment": "/**\n * Token cost of the last request's preamble — system prompt, tool definitions and framed tail (GENC-1582). `undefined` before the first call of a turn.\n *\n * A live getter rather than a field stamped on each message, deliberately: every consumer wants the CURRENT preamble, never its history, and a message field would mean a type change in `@genesislcap/foundation-ai` plus churn in every persisted session for a value nobody reads twice.\n *\n * It exists because the preamble cannot be derived reliably. Inferring it as \"first measured prompt minus the messages it covered\" is accurate once and then goes stale, since each agent brings its own prompt and tool surface — and every attempt to compensate downstream ended up comparing stored characters against wire tokens. The driver is the only place that knows what it just sent.\n *\n * Optional — only drivers that build requests implement it.\n */\n",
13631
- "excerptTokens": [
13632
- {
13633
- "kind": "Content",
13634
- "text": "getPreambleTokens(): "
13635
- },
13636
- {
13637
- "kind": "Content",
13638
- "text": "number | undefined"
13639
- },
13640
- {
13641
- "kind": "Content",
13642
- "text": ";"
13643
- }
13644
- ],
13645
- "isStatic": false,
13646
14755
  "returnTypeTokenRange": {
13647
14756
  "startIndex": 1,
13648
- "endIndex": 2
14757
+ "endIndex": 3
13649
14758
  },
13650
14759
  "releaseTag": "Public",
13651
14760
  "isProtected": false,
@@ -13653,16 +14762,16 @@
13653
14762
  "parameters": [],
13654
14763
  "isOptional": false,
13655
14764
  "isAbstract": false,
13656
- "name": "getPreambleTokens"
14765
+ "name": "getInteractionCheckpoint"
13657
14766
  },
13658
14767
  {
13659
14768
  "kind": "Method",
13660
- "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getRawHistory:member(1)",
13661
- "docComment": "",
14769
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getInteractionCheckpoints:member(1)",
14770
+ "docComment": "/**\n * Every checkpoint to save with the session (GENC-1660 §4.12): those a reload cut that nothing has taken over yet, oldest first, then the long action in flight's, if it has saved one.\n *\n * Optional, so a third-party driver need not implement it; every shipped driver does.\n */\n",
13662
14771
  "excerptTokens": [
13663
14772
  {
13664
14773
  "kind": "Content",
13665
- "text": "getRawHistory(): "
14774
+ "text": "getInteractionCheckpoints(): "
13666
14775
  },
13667
14776
  {
13668
14777
  "kind": "Content",
@@ -13670,8 +14779,132 @@
13670
14779
  },
13671
14780
  {
13672
14781
  "kind": "Reference",
13673
- "text": "ChatMessage",
13674
- "canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
14782
+ "text": "PersistedInteractionCheckpoint",
14783
+ "canonicalReference": "@genesislcap/ai-assistant!PersistedInteractionCheckpoint:interface"
14784
+ },
14785
+ {
14786
+ "kind": "Content",
14787
+ "text": "[]"
14788
+ },
14789
+ {
14790
+ "kind": "Content",
14791
+ "text": ";"
14792
+ }
14793
+ ],
14794
+ "isStatic": false,
14795
+ "returnTypeTokenRange": {
14796
+ "startIndex": 1,
14797
+ "endIndex": 4
14798
+ },
14799
+ "releaseTag": "Public",
14800
+ "isProtected": false,
14801
+ "overloadIndex": 1,
14802
+ "parameters": [],
14803
+ "isOptional": false,
14804
+ "isAbstract": false,
14805
+ "name": "getInteractionCheckpoints"
14806
+ },
14807
+ {
14808
+ "kind": "Method",
14809
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getInteractionContext:member(1)",
14810
+ "docComment": "/**\n * The live {@link InteractionContext} for a pending interaction (GENC-1390), or `undefined` once resolved/evicted. Read by `AiChatInteractionWrapper` (via the host) to build the widget's pending `interaction` descriptor.\n */\n",
14811
+ "excerptTokens": [
14812
+ {
14813
+ "kind": "Content",
14814
+ "text": "getInteractionContext(interactionId: "
14815
+ },
14816
+ {
14817
+ "kind": "Content",
14818
+ "text": "string"
14819
+ },
14820
+ {
14821
+ "kind": "Content",
14822
+ "text": "): "
14823
+ },
14824
+ {
14825
+ "kind": "Reference",
14826
+ "text": "InteractionContext",
14827
+ "canonicalReference": "@genesislcap/ai-assistant!InteractionContext:interface"
14828
+ },
14829
+ {
14830
+ "kind": "Content",
14831
+ "text": " | undefined"
14832
+ },
14833
+ {
14834
+ "kind": "Content",
14835
+ "text": ";"
14836
+ }
14837
+ ],
14838
+ "isStatic": false,
14839
+ "returnTypeTokenRange": {
14840
+ "startIndex": 3,
14841
+ "endIndex": 5
14842
+ },
14843
+ "releaseTag": "Public",
14844
+ "isProtected": false,
14845
+ "overloadIndex": 1,
14846
+ "parameters": [
14847
+ {
14848
+ "parameterName": "interactionId",
14849
+ "parameterTypeTokenRange": {
14850
+ "startIndex": 1,
14851
+ "endIndex": 2
14852
+ },
14853
+ "isOptional": false
14854
+ }
14855
+ ],
14856
+ "isOptional": false,
14857
+ "isAbstract": false,
14858
+ "name": "getInteractionContext"
14859
+ },
14860
+ {
14861
+ "kind": "Method",
14862
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getPreambleTokens:member(1)",
14863
+ "docComment": "/**\n * Token cost of the last request's preamble — system prompt, tool definitions and framed tail (GENC-1582). `undefined` before the first call of a turn.\n *\n * A live getter rather than a field stamped on each message, deliberately: every consumer wants the CURRENT preamble, never its history, and a message field would mean a type change in `@genesislcap/foundation-ai` plus churn in every persisted session for a value nobody reads twice.\n *\n * It exists because the preamble cannot be derived reliably. Inferring it as \"first measured prompt minus the messages it covered\" is accurate once and then goes stale, since each agent brings its own prompt and tool surface — and every attempt to compensate downstream ended up comparing stored characters against wire tokens. The driver is the only place that knows what it just sent.\n *\n * Optional — only drivers that build requests implement it.\n */\n",
14864
+ "excerptTokens": [
14865
+ {
14866
+ "kind": "Content",
14867
+ "text": "getPreambleTokens(): "
14868
+ },
14869
+ {
14870
+ "kind": "Content",
14871
+ "text": "number | undefined"
14872
+ },
14873
+ {
14874
+ "kind": "Content",
14875
+ "text": ";"
14876
+ }
14877
+ ],
14878
+ "isStatic": false,
14879
+ "returnTypeTokenRange": {
14880
+ "startIndex": 1,
14881
+ "endIndex": 2
14882
+ },
14883
+ "releaseTag": "Public",
14884
+ "isProtected": false,
14885
+ "overloadIndex": 1,
14886
+ "parameters": [],
14887
+ "isOptional": false,
14888
+ "isAbstract": false,
14889
+ "name": "getPreambleTokens"
14890
+ },
14891
+ {
14892
+ "kind": "Method",
14893
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#getRawHistory:member(1)",
14894
+ "docComment": "",
14895
+ "excerptTokens": [
14896
+ {
14897
+ "kind": "Content",
14898
+ "text": "getRawHistory(): "
14899
+ },
14900
+ {
14901
+ "kind": "Content",
14902
+ "text": "readonly "
14903
+ },
14904
+ {
14905
+ "kind": "Reference",
14906
+ "text": "ChatMessage",
14907
+ "canonicalReference": "@genesislcap/foundation-ai!ChatMessage:interface"
13675
14908
  },
13676
14909
  {
13677
14910
  "kind": "Content",
@@ -15369,6 +16602,102 @@
15369
16602
  "isOptional": false,
15370
16603
  "isAbstract": false,
15371
16604
  "name": "setProviderHistoryTransform"
16605
+ },
16606
+ {
16607
+ "kind": "Method",
16608
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#suspendActivation:member(1)",
16609
+ "docComment": "/**\n * Suspend the active agent's activation for a hand-off it made (GENC-1737): installing the target advances the `agentEnd` clock as any swap does, but this caller's payloads stay live.\n */\n",
16610
+ "excerptTokens": [
16611
+ {
16612
+ "kind": "Content",
16613
+ "text": "suspendActivation(agentName: "
16614
+ },
16615
+ {
16616
+ "kind": "Content",
16617
+ "text": "string"
16618
+ },
16619
+ {
16620
+ "kind": "Content",
16621
+ "text": "): "
16622
+ },
16623
+ {
16624
+ "kind": "Content",
16625
+ "text": "void"
16626
+ },
16627
+ {
16628
+ "kind": "Content",
16629
+ "text": ";"
16630
+ }
16631
+ ],
16632
+ "isStatic": false,
16633
+ "returnTypeTokenRange": {
16634
+ "startIndex": 3,
16635
+ "endIndex": 4
16636
+ },
16637
+ "releaseTag": "Public",
16638
+ "isProtected": false,
16639
+ "overloadIndex": 1,
16640
+ "parameters": [
16641
+ {
16642
+ "parameterName": "agentName",
16643
+ "parameterTypeTokenRange": {
16644
+ "startIndex": 1,
16645
+ "endIndex": 2
16646
+ },
16647
+ "isOptional": false
16648
+ }
16649
+ ],
16650
+ "isOptional": false,
16651
+ "isAbstract": false,
16652
+ "name": "suspendActivation"
16653
+ },
16654
+ {
16655
+ "kind": "Method",
16656
+ "canonicalReference": "@genesislcap/ai-assistant!ChatDriver#suspendRestoredActivations:member(1)",
16657
+ "docComment": "/**\n * Suspend restored callers before their condense policies are restored, so entries still live at save time stay live instead of waiting for \"the next activation\", which is the target's.\n */\n",
16658
+ "excerptTokens": [
16659
+ {
16660
+ "kind": "Content",
16661
+ "text": "suspendRestoredActivations(agentNames: "
16662
+ },
16663
+ {
16664
+ "kind": "Content",
16665
+ "text": "readonly string[]"
16666
+ },
16667
+ {
16668
+ "kind": "Content",
16669
+ "text": "): "
16670
+ },
16671
+ {
16672
+ "kind": "Content",
16673
+ "text": "void"
16674
+ },
16675
+ {
16676
+ "kind": "Content",
16677
+ "text": ";"
16678
+ }
16679
+ ],
16680
+ "isStatic": false,
16681
+ "returnTypeTokenRange": {
16682
+ "startIndex": 3,
16683
+ "endIndex": 4
16684
+ },
16685
+ "releaseTag": "Public",
16686
+ "isProtected": false,
16687
+ "overloadIndex": 1,
16688
+ "parameters": [
16689
+ {
16690
+ "parameterName": "agentNames",
16691
+ "parameterTypeTokenRange": {
16692
+ "startIndex": 1,
16693
+ "endIndex": 2
16694
+ },
16695
+ "isOptional": false
16696
+ }
16697
+ ],
16698
+ "isOptional": false,
16699
+ "isAbstract": false,
16700
+ "name": "suspendRestoredActivations"
15372
16701
  }
15373
16702
  ],
15374
16703
  "extendsTokenRange": {
@@ -15532,7 +16861,7 @@
15532
16861
  {
15533
16862
  "kind": "PropertySignature",
15534
16863
  "canonicalReference": "@genesislcap/ai-assistant!ChatDriverConfig#deferAgentRelease:member",
15535
- "docComment": "/**\n * Leave acting on `releaseAgent` to the owner of this driver.\n *\n * Set by `OrchestratingDriver` for its inner driver, which performs the release itself after the turn, because a release ends its handoff loop and it reads the flag to know. Both drivers share one `AgentSession`, and releasing here first would clear the flag before the orchestrator saw it. The host-facing `agent-released` / `agent-changed` / `flow-owner-changed` events fire from the session's transition either way (GENC-1485).\n *\n * Left unset, a driver releases its own agent, which is what a bare `ChatDriver` needs: nothing else is watching the flag.\n */\n",
16864
+ "docComment": "/**\n * Leave acting on `releaseAgent` to the owner of this driver.\n *\n * Set by `OrchestratingDriver` for its inner driver, which performs the release itself after the call, because a release may hand back to a waiting caller and it reads the flag to know. Both drivers share one `AgentSession`, and releasing here first would clear the flag before the orchestrator saw it. The host-facing `agent-released` / `agent-changed` / `flow-owner-changed` events fire from the session's transition either way (GENC-1485).\n *\n * Left unset, a driver releases its own agent, which is what a bare `ChatDriver` needs: nothing else is watching the flag.\n */\n",
15536
16865
  "excerptTokens": [
15537
16866
  {
15538
16867
  "kind": "Content",
@@ -18299,7 +19628,7 @@
18299
19628
  {
18300
19629
  "kind": "Class",
18301
19630
  "canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant:class",
18302
- "docComment": "/**\n * Foundation AI Assistant component.\n *\n * @remarks\n *\n * Register one or more AI providers via `registerAIProviders` from `@genesislcap/foundation-ai`; this element resolves the `AIProviderRegistry` through the DI container. Pass agent configuration via the `agents` property — each agent can override which registered provider it uses via `provider:`. The component creates a `ChatDriver` (single agent) or `OrchestratingDriver` (multiple agents) to manage the conversation loop.\n *\n * Popout/collapse coordination uses `agenticActivityBus` topics `chat-popout` and `chat-popin` — not DOM `CustomEvent`s on this element.\n *\n * **Cost build history:** opt-in via `chatConfig.costHistory.enabled`. When enabled, each session's usage is kept as exactly ONE row per session key in `localStorage` (scoped by `costHistory.scope`, the element `id`, or `'default'`), upserted as spend accrues. So a row is a project's lifetime usage rather than a visit to it, and the Usage tab's total is the sum of the rows alone — the live session is never added on top, because the active project's own row already reflects it. Hosts may call {@link FoundationAiAssistant.finalizeCostSession} to flush early; it is idempotent.\n *\n * @fires\n *\n * chat-header-mousedown - Fired when the user presses the chat header in `popout-mode=\"expand\"` (for drag-to-popout hosts). Bubbles and composed. detail: `ChatHeaderMouseDownDetail`\n *\n * @fires\n *\n * session-cleared - 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`\n *\n * @beta\n */\n",
19631
+ "docComment": "/**\n * Foundation AI Assistant component.\n *\n * @remarks\n *\n * Register one or more AI providers via `registerAIProviders` from `@genesislcap/foundation-ai`; this element resolves the `AIProviderRegistry` through the DI container. Pass agent configuration via the `agents` property — each agent can override which registered provider it uses via `provider:`. The component creates a `ChatDriver` (single agent) or `OrchestratingDriver` (multiple agents) to manage the conversation loop.\n *\n * Popout/collapse coordination uses `agenticActivityBus` topics `chat-popout` and `chat-popin` — not DOM `CustomEvent`s on this element.\n *\n * **Cost build history:** opt-in via `chatConfig.costHistory.enabled`. When enabled, each session's usage is kept as exactly ONE row per session key in `localStorage` (scoped by `costHistory.scope`, the element `id`, or `'default'`), upserted as spend accrues. So a row is a project's lifetime usage rather than a visit to it, and the Usage tab's total is the sum of the rows alone — the live session is never added on top, because the active project's own row already reflects it. Hosts may call {@link FoundationAiAssistant.finalizeCostSession} to flush early; it is idempotent.\n *\n * @fires\n *\n * chat-header-mousedown - Fired when the user presses the chat header in `popout-mode=\"expand\"` (for drag-to-popout hosts). Bubbles and composed. detail: `ChatHeaderMouseDownDetail`\n *\n * @fires\n *\n * session-cleared - 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`\n *\n * @fires\n *\n * handoff-started - Fired when an agent's `handOff` takes effect and its target becomes active. Bubbles and composed. detail: `HandOffFrame`\n *\n * @fires\n *\n * handoff-returned - Fired when a hand-off ends and its caller is active again; `detail.outcome` says how it ended. Bubbles and composed. detail: `HandOffFrame`\n *\n * @fires\n *\n * handoff-unwound - 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`\n *\n * @beta\n */\n",
18303
19632
  "excerptTokens": [
18304
19633
  {
18305
19634
  "kind": "Content",
@@ -27682,6 +29011,367 @@
27682
29011
  ],
27683
29012
  "extendsTokenRanges": []
27684
29013
  },
29014
+ {
29015
+ "kind": "Interface",
29016
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame:interface",
29017
+ "docComment": "/**\n * One hand-off on the stack, saved with the session: who waits, for whom, and why. `outcome` is set when the target finishes, until the caller has resumed, so a reload in between still hands back. Also the `detail` of the `handoff-started`, `handoff-returned` and `handoff-unwound` events.\n *\n * @beta\n */\n",
29018
+ "excerptTokens": [
29019
+ {
29020
+ "kind": "Content",
29021
+ "text": "export interface HandOffFrame "
29022
+ }
29023
+ ],
29024
+ "fileUrlPath": "src/config/config.ts",
29025
+ "releaseTag": "Beta",
29026
+ "name": "HandOffFrame",
29027
+ "preserveMemberOrder": false,
29028
+ "members": [
29029
+ {
29030
+ "kind": "PropertySignature",
29031
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame#caller:member",
29032
+ "docComment": "/**\n * The agent waiting for the hand-back.\n */\n",
29033
+ "excerptTokens": [
29034
+ {
29035
+ "kind": "Content",
29036
+ "text": "caller: "
29037
+ },
29038
+ {
29039
+ "kind": "Content",
29040
+ "text": "string"
29041
+ },
29042
+ {
29043
+ "kind": "Content",
29044
+ "text": ";"
29045
+ }
29046
+ ],
29047
+ "isReadonly": false,
29048
+ "isOptional": false,
29049
+ "releaseTag": "Beta",
29050
+ "name": "caller",
29051
+ "propertyTypeTokenRange": {
29052
+ "startIndex": 1,
29053
+ "endIndex": 2
29054
+ }
29055
+ },
29056
+ {
29057
+ "kind": "PropertySignature",
29058
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame#data:member",
29059
+ "docComment": "/**\n * JSON only.\n */\n",
29060
+ "excerptTokens": [
29061
+ {
29062
+ "kind": "Content",
29063
+ "text": "data?: "
29064
+ },
29065
+ {
29066
+ "kind": "Content",
29067
+ "text": "unknown"
29068
+ },
29069
+ {
29070
+ "kind": "Content",
29071
+ "text": ";"
29072
+ }
29073
+ ],
29074
+ "isReadonly": false,
29075
+ "isOptional": true,
29076
+ "releaseTag": "Beta",
29077
+ "name": "data",
29078
+ "propertyTypeTokenRange": {
29079
+ "startIndex": 1,
29080
+ "endIndex": 2
29081
+ }
29082
+ },
29083
+ {
29084
+ "kind": "PropertySignature",
29085
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame#id:member",
29086
+ "docComment": "",
29087
+ "excerptTokens": [
29088
+ {
29089
+ "kind": "Content",
29090
+ "text": "id: "
29091
+ },
29092
+ {
29093
+ "kind": "Content",
29094
+ "text": "string"
29095
+ },
29096
+ {
29097
+ "kind": "Content",
29098
+ "text": ";"
29099
+ }
29100
+ ],
29101
+ "isReadonly": false,
29102
+ "isOptional": false,
29103
+ "releaseTag": "Beta",
29104
+ "name": "id",
29105
+ "propertyTypeTokenRange": {
29106
+ "startIndex": 1,
29107
+ "endIndex": 2
29108
+ }
29109
+ },
29110
+ {
29111
+ "kind": "PropertySignature",
29112
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame#message:member",
29113
+ "docComment": "/**\n * The brief.\n */\n",
29114
+ "excerptTokens": [
29115
+ {
29116
+ "kind": "Content",
29117
+ "text": "message: "
29118
+ },
29119
+ {
29120
+ "kind": "Content",
29121
+ "text": "string"
29122
+ },
29123
+ {
29124
+ "kind": "Content",
29125
+ "text": ";"
29126
+ }
29127
+ ],
29128
+ "isReadonly": false,
29129
+ "isOptional": false,
29130
+ "releaseTag": "Beta",
29131
+ "name": "message",
29132
+ "propertyTypeTokenRange": {
29133
+ "startIndex": 1,
29134
+ "endIndex": 2
29135
+ }
29136
+ },
29137
+ {
29138
+ "kind": "PropertySignature",
29139
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame#outcome:member",
29140
+ "docComment": "",
29141
+ "excerptTokens": [
29142
+ {
29143
+ "kind": "Content",
29144
+ "text": "outcome?: "
29145
+ },
29146
+ {
29147
+ "kind": "Reference",
29148
+ "text": "HandOffOutcome",
29149
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffOutcome:interface"
29150
+ },
29151
+ {
29152
+ "kind": "Content",
29153
+ "text": ";"
29154
+ }
29155
+ ],
29156
+ "isReadonly": false,
29157
+ "isOptional": true,
29158
+ "releaseTag": "Beta",
29159
+ "name": "outcome",
29160
+ "propertyTypeTokenRange": {
29161
+ "startIndex": 1,
29162
+ "endIndex": 2
29163
+ }
29164
+ },
29165
+ {
29166
+ "kind": "PropertySignature",
29167
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame#returnTo:member",
29168
+ "docComment": "",
29169
+ "excerptTokens": [
29170
+ {
29171
+ "kind": "Content",
29172
+ "text": "returnTo: "
29173
+ },
29174
+ {
29175
+ "kind": "Content",
29176
+ "text": "boolean"
29177
+ },
29178
+ {
29179
+ "kind": "Content",
29180
+ "text": ";"
29181
+ }
29182
+ ],
29183
+ "isReadonly": false,
29184
+ "isOptional": false,
29185
+ "releaseTag": "Beta",
29186
+ "name": "returnTo",
29187
+ "propertyTypeTokenRange": {
29188
+ "startIndex": 1,
29189
+ "endIndex": 2
29190
+ }
29191
+ },
29192
+ {
29193
+ "kind": "PropertySignature",
29194
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame#startedAt:member",
29195
+ "docComment": "/**\n * ISO time the hand-off started.\n */\n",
29196
+ "excerptTokens": [
29197
+ {
29198
+ "kind": "Content",
29199
+ "text": "startedAt: "
29200
+ },
29201
+ {
29202
+ "kind": "Content",
29203
+ "text": "string"
29204
+ },
29205
+ {
29206
+ "kind": "Content",
29207
+ "text": ";"
29208
+ }
29209
+ ],
29210
+ "isReadonly": false,
29211
+ "isOptional": false,
29212
+ "releaseTag": "Beta",
29213
+ "name": "startedAt",
29214
+ "propertyTypeTokenRange": {
29215
+ "startIndex": 1,
29216
+ "endIndex": 2
29217
+ }
29218
+ },
29219
+ {
29220
+ "kind": "PropertySignature",
29221
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame#target:member",
29222
+ "docComment": "",
29223
+ "excerptTokens": [
29224
+ {
29225
+ "kind": "Content",
29226
+ "text": "target: "
29227
+ },
29228
+ {
29229
+ "kind": "Content",
29230
+ "text": "string"
29231
+ },
29232
+ {
29233
+ "kind": "Content",
29234
+ "text": ";"
29235
+ }
29236
+ ],
29237
+ "isReadonly": false,
29238
+ "isOptional": false,
29239
+ "releaseTag": "Beta",
29240
+ "name": "target",
29241
+ "propertyTypeTokenRange": {
29242
+ "startIndex": 1,
29243
+ "endIndex": 2
29244
+ }
29245
+ }
29246
+ ],
29247
+ "extendsTokenRanges": []
29248
+ },
29249
+ {
29250
+ "kind": "Interface",
29251
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffOutcome:interface",
29252
+ "docComment": "/**\n * What a hand-off's caller gets back. `message` is the target's `completeHandOff` summary, or for `released` its final reply since the brief; `data` is what `completeHandOff` passed.\n *\n * @beta\n */\n",
29253
+ "excerptTokens": [
29254
+ {
29255
+ "kind": "Content",
29256
+ "text": "export interface HandOffOutcome "
29257
+ }
29258
+ ],
29259
+ "fileUrlPath": "src/config/config.ts",
29260
+ "releaseTag": "Beta",
29261
+ "name": "HandOffOutcome",
29262
+ "preserveMemberOrder": false,
29263
+ "members": [
29264
+ {
29265
+ "kind": "PropertySignature",
29266
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffOutcome#data:member",
29267
+ "docComment": "",
29268
+ "excerptTokens": [
29269
+ {
29270
+ "kind": "Content",
29271
+ "text": "data?: "
29272
+ },
29273
+ {
29274
+ "kind": "Content",
29275
+ "text": "unknown"
29276
+ },
29277
+ {
29278
+ "kind": "Content",
29279
+ "text": ";"
29280
+ }
29281
+ ],
29282
+ "isReadonly": false,
29283
+ "isOptional": true,
29284
+ "releaseTag": "Beta",
29285
+ "name": "data",
29286
+ "propertyTypeTokenRange": {
29287
+ "startIndex": 1,
29288
+ "endIndex": 2
29289
+ }
29290
+ },
29291
+ {
29292
+ "kind": "PropertySignature",
29293
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffOutcome#kind:member",
29294
+ "docComment": "",
29295
+ "excerptTokens": [
29296
+ {
29297
+ "kind": "Content",
29298
+ "text": "kind: "
29299
+ },
29300
+ {
29301
+ "kind": "Reference",
29302
+ "text": "HandOffOutcomeKind",
29303
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffOutcomeKind:type"
29304
+ },
29305
+ {
29306
+ "kind": "Content",
29307
+ "text": ";"
29308
+ }
29309
+ ],
29310
+ "isReadonly": false,
29311
+ "isOptional": false,
29312
+ "releaseTag": "Beta",
29313
+ "name": "kind",
29314
+ "propertyTypeTokenRange": {
29315
+ "startIndex": 1,
29316
+ "endIndex": 2
29317
+ }
29318
+ },
29319
+ {
29320
+ "kind": "PropertySignature",
29321
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffOutcome#message:member",
29322
+ "docComment": "",
29323
+ "excerptTokens": [
29324
+ {
29325
+ "kind": "Content",
29326
+ "text": "message?: "
29327
+ },
29328
+ {
29329
+ "kind": "Content",
29330
+ "text": "string"
29331
+ },
29332
+ {
29333
+ "kind": "Content",
29334
+ "text": ";"
29335
+ }
29336
+ ],
29337
+ "isReadonly": false,
29338
+ "isOptional": true,
29339
+ "releaseTag": "Beta",
29340
+ "name": "message",
29341
+ "propertyTypeTokenRange": {
29342
+ "startIndex": 1,
29343
+ "endIndex": 2
29344
+ }
29345
+ }
29346
+ ],
29347
+ "extendsTokenRanges": []
29348
+ },
29349
+ {
29350
+ "kind": "TypeAlias",
29351
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffOutcomeKind:type",
29352
+ "docComment": "/**\n * How a hand-off ended (GENC-1737): - `completed`: the target called `completeHandOff`; - `released`: the target called `releaseAgent`, or, a plain one, ended its turn; - `cleared`: the user cleared the chat; - `agent-removed`: the caller or the target is no longer in the agent list, found on restore; - `state-lost`: the caller's saved state is gone, so it cannot resume: a session saved while its flow could not be resumed, or a change to the agents, which disposes them.\n *\n * @beta\n */\n",
29353
+ "excerptTokens": [
29354
+ {
29355
+ "kind": "Content",
29356
+ "text": "export type HandOffOutcomeKind = "
29357
+ },
29358
+ {
29359
+ "kind": "Content",
29360
+ "text": "'completed' | 'released' | 'cleared' | 'agent-removed' | 'state-lost'"
29361
+ },
29362
+ {
29363
+ "kind": "Content",
29364
+ "text": ";"
29365
+ }
29366
+ ],
29367
+ "fileUrlPath": "src/config/config.ts",
29368
+ "releaseTag": "Beta",
29369
+ "name": "HandOffOutcomeKind",
29370
+ "typeTokenRange": {
29371
+ "startIndex": 1,
29372
+ "endIndex": 2
29373
+ }
29374
+ },
27685
29375
  {
27686
29376
  "kind": "TypeAlias",
27687
29377
  "canonicalReference": "@genesislcap/ai-assistant!InteractionCompletedEventDetail:type",
@@ -30375,7 +32065,7 @@
30375
32065
  },
30376
32066
  {
30377
32067
  "kind": "Content",
30378
- "text": "{\n sessionKey?: string;\n maxHandoffs?: number;\n classifierHistoryLength?: number;\n classifierRetries?: number;\n maxToolIterations?: number;\n maxFoldOperations?: number;\n maxTurnSnapshots?: number;\n activityBus?: "
32068
+ "text": "{\n sessionKey?: string;\n maxHandoffs?: number;\n maxHandOffDepth?: number;\n classifierHistoryLength?: number;\n classifierRetries?: number;\n maxToolIterations?: number;\n maxFoldOperations?: number;\n maxTurnSnapshots?: number;\n activityBus?: "
30379
32069
  },
30380
32070
  {
30381
32071
  "kind": "Reference",
@@ -30486,7 +32176,7 @@
30486
32176
  {
30487
32177
  "kind": "Method",
30488
32178
  "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#cancel:member(1)",
30489
- "docComment": "/**\n * Stop the current turn (user \"stop\" button). Cancels the inner chat driver's in-flight request and breaks the handoff loop so no further agent turn or classify runs. The driver stays usable for the next message.\n */\n",
32179
+ "docComment": "/**\n * Stop the current turn (user \"stop\" button). Cancels the inner chat driver's in-flight request, and no further agent runs this turn, not even a hand-off's target or a hand-back. The driver stays usable for the next message.\n */\n",
30490
32180
  "excerptTokens": [
30491
32181
  {
30492
32182
  "kind": "Content",
@@ -30766,6 +32456,78 @@
30766
32456
  "isAbstract": false,
30767
32457
  "name": "getContextReserve"
30768
32458
  },
32459
+ {
32460
+ "kind": "Method",
32461
+ "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#getHandOffData:member(1)",
32462
+ "docComment": "/**\n * The `data` each hand-off target was activated with, by name, for the agents a reload resumes: the flow owner and the callers waiting in a hand-off. See the tool context's `handOffData`.\n */\n",
32463
+ "excerptTokens": [
32464
+ {
32465
+ "kind": "Content",
32466
+ "text": "getHandOffData(): "
32467
+ },
32468
+ {
32469
+ "kind": "Reference",
32470
+ "text": "Record",
32471
+ "canonicalReference": "!Record:type"
32472
+ },
32473
+ {
32474
+ "kind": "Content",
32475
+ "text": "<string, unknown>"
32476
+ },
32477
+ {
32478
+ "kind": "Content",
32479
+ "text": ";"
32480
+ }
32481
+ ],
32482
+ "isStatic": false,
32483
+ "returnTypeTokenRange": {
32484
+ "startIndex": 1,
32485
+ "endIndex": 3
32486
+ },
32487
+ "releaseTag": "Beta",
32488
+ "isProtected": false,
32489
+ "overloadIndex": 1,
32490
+ "parameters": [],
32491
+ "isOptional": false,
32492
+ "isAbstract": false,
32493
+ "name": "getHandOffData"
32494
+ },
32495
+ {
32496
+ "kind": "Method",
32497
+ "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#getHandOffStack:member(1)",
32498
+ "docComment": "/**\n * The hand-offs in progress, oldest first, to save with the session (GENC-1737). Copies: changing them changes nothing.\n */\n",
32499
+ "excerptTokens": [
32500
+ {
32501
+ "kind": "Content",
32502
+ "text": "getHandOffStack(): "
32503
+ },
32504
+ {
32505
+ "kind": "Reference",
32506
+ "text": "HandOffFrame",
32507
+ "canonicalReference": "@genesislcap/ai-assistant!HandOffFrame:interface"
32508
+ },
32509
+ {
32510
+ "kind": "Content",
32511
+ "text": "[]"
32512
+ },
32513
+ {
32514
+ "kind": "Content",
32515
+ "text": ";"
32516
+ }
32517
+ ],
32518
+ "isStatic": false,
32519
+ "returnTypeTokenRange": {
32520
+ "startIndex": 1,
32521
+ "endIndex": 3
32522
+ },
32523
+ "releaseTag": "Beta",
32524
+ "isProtected": false,
32525
+ "overloadIndex": 1,
32526
+ "parameters": [],
32527
+ "isOptional": false,
32528
+ "isAbstract": false,
32529
+ "name": "getHandOffStack"
32530
+ },
30769
32531
  {
30770
32532
  "kind": "Method",
30771
32533
  "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#getSuggestions:member(1)",
@@ -30877,6 +32639,155 @@
30877
32639
  "isAbstract": false,
30878
32640
  "name": "getSuggestions"
30879
32641
  },
32642
+ {
32643
+ "kind": "Method",
32644
+ "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#restoreHandOffData:member(1)",
32645
+ "docComment": "/**\n * Restore what {@link AiDriver.getHandOffData} saved, before the hand-off stack. Nothing comes back from a frozen (`interrupted`) session, whose flow does not resume.\n */\n",
32646
+ "excerptTokens": [
32647
+ {
32648
+ "kind": "Content",
32649
+ "text": "restoreHandOffData(saved: "
32650
+ },
32651
+ {
32652
+ "kind": "Content",
32653
+ "text": "unknown"
32654
+ },
32655
+ {
32656
+ "kind": "Content",
32657
+ "text": ", interrupted: "
32658
+ },
32659
+ {
32660
+ "kind": "Content",
32661
+ "text": "boolean"
32662
+ },
32663
+ {
32664
+ "kind": "Content",
32665
+ "text": "): "
32666
+ },
32667
+ {
32668
+ "kind": "Content",
32669
+ "text": "void"
32670
+ },
32671
+ {
32672
+ "kind": "Content",
32673
+ "text": ";"
32674
+ }
32675
+ ],
32676
+ "isStatic": false,
32677
+ "returnTypeTokenRange": {
32678
+ "startIndex": 5,
32679
+ "endIndex": 6
32680
+ },
32681
+ "releaseTag": "Beta",
32682
+ "isProtected": false,
32683
+ "overloadIndex": 1,
32684
+ "parameters": [
32685
+ {
32686
+ "parameterName": "saved",
32687
+ "parameterTypeTokenRange": {
32688
+ "startIndex": 1,
32689
+ "endIndex": 2
32690
+ },
32691
+ "isOptional": false
32692
+ },
32693
+ {
32694
+ "parameterName": "interrupted",
32695
+ "parameterTypeTokenRange": {
32696
+ "startIndex": 3,
32697
+ "endIndex": 4
32698
+ },
32699
+ "isOptional": false
32700
+ }
32701
+ ],
32702
+ "isOptional": false,
32703
+ "isAbstract": false,
32704
+ "name": "restoreHandOffData"
32705
+ },
32706
+ {
32707
+ "kind": "Method",
32708
+ "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#restoreHandOffStack:member(1)",
32709
+ "docComment": "/**\n * Restore saved hand-offs, before the condense policies, against the agents configured now and the saved agent states. A frame whose caller has gone, or whose stateful caller has no saved state (`interrupted` drops them all), is unwound with `handoff-unwound`. When the top frame's target had finished, or has gone, its caller is due to resume: `resume` names it and the note its resumed turn needs, and {@link AiDriver.resumeRestoredFlow} hands back. `droppedLocks` names plain targets of unwound hand-offs, whose saved lock was only that hand-off's.\n */\n",
32710
+ "excerptTokens": [
32711
+ {
32712
+ "kind": "Content",
32713
+ "text": "restoreHandOffStack(saved: "
32714
+ },
32715
+ {
32716
+ "kind": "Content",
32717
+ "text": "unknown"
32718
+ },
32719
+ {
32720
+ "kind": "Content",
32721
+ "text": ", savedStates: "
32722
+ },
32723
+ {
32724
+ "kind": "Reference",
32725
+ "text": "Record",
32726
+ "canonicalReference": "!Record:type"
32727
+ },
32728
+ {
32729
+ "kind": "Content",
32730
+ "text": "<string, unknown>"
32731
+ },
32732
+ {
32733
+ "kind": "Content",
32734
+ "text": ", interrupted: "
32735
+ },
32736
+ {
32737
+ "kind": "Content",
32738
+ "text": "boolean"
32739
+ },
32740
+ {
32741
+ "kind": "Content",
32742
+ "text": "): "
32743
+ },
32744
+ {
32745
+ "kind": "Content",
32746
+ "text": "{\n resume?: {\n agent: string;\n note: string;\n };\n droppedLocks?: string[];\n }"
32747
+ },
32748
+ {
32749
+ "kind": "Content",
32750
+ "text": ";"
32751
+ }
32752
+ ],
32753
+ "isStatic": false,
32754
+ "returnTypeTokenRange": {
32755
+ "startIndex": 8,
32756
+ "endIndex": 9
32757
+ },
32758
+ "releaseTag": "Beta",
32759
+ "isProtected": false,
32760
+ "overloadIndex": 1,
32761
+ "parameters": [
32762
+ {
32763
+ "parameterName": "saved",
32764
+ "parameterTypeTokenRange": {
32765
+ "startIndex": 1,
32766
+ "endIndex": 2
32767
+ },
32768
+ "isOptional": false
32769
+ },
32770
+ {
32771
+ "parameterName": "savedStates",
32772
+ "parameterTypeTokenRange": {
32773
+ "startIndex": 3,
32774
+ "endIndex": 5
32775
+ },
32776
+ "isOptional": false
32777
+ },
32778
+ {
32779
+ "parameterName": "interrupted",
32780
+ "parameterTypeTokenRange": {
32781
+ "startIndex": 6,
32782
+ "endIndex": 7
32783
+ },
32784
+ "isOptional": false
32785
+ }
32786
+ ],
32787
+ "isOptional": false,
32788
+ "isAbstract": false,
32789
+ "name": "restoreHandOffStack"
32790
+ },
30880
32791
  {
30881
32792
  "kind": "Method",
30882
32793
  "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#resumeRestoredFlow:member(1)",
@@ -31038,6 +32949,95 @@
31038
32949
  "isOptional": false,
31039
32950
  "isAbstract": false,
31040
32951
  "name": "sendMessage"
32952
+ },
32953
+ {
32954
+ "kind": "Method",
32955
+ "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#serializeWaitingCallers:member(1)",
32956
+ "docComment": "/**\n * The saved state of each caller waiting in a hand-off whose state is live, by name, from its `serialize`. Saved with the active agent's, so a reload can resume the caller.\n */\n",
32957
+ "excerptTokens": [
32958
+ {
32959
+ "kind": "Content",
32960
+ "text": "serializeWaitingCallers(): "
32961
+ },
32962
+ {
32963
+ "kind": "Reference",
32964
+ "text": "Record",
32965
+ "canonicalReference": "!Record:type"
32966
+ },
32967
+ {
32968
+ "kind": "Content",
32969
+ "text": "<string, unknown>"
32970
+ },
32971
+ {
32972
+ "kind": "Content",
32973
+ "text": ";"
32974
+ }
32975
+ ],
32976
+ "isStatic": false,
32977
+ "returnTypeTokenRange": {
32978
+ "startIndex": 1,
32979
+ "endIndex": 3
32980
+ },
32981
+ "releaseTag": "Beta",
32982
+ "isProtected": false,
32983
+ "overloadIndex": 1,
32984
+ "parameters": [],
32985
+ "isOptional": false,
32986
+ "isAbstract": false,
32987
+ "name": "serializeWaitingCallers"
32988
+ },
32989
+ {
32990
+ "kind": "Method",
32991
+ "canonicalReference": "@genesislcap/ai-assistant!OrchestratingDriver#unwindHandOffs:member(1)",
32992
+ "docComment": "/**\n * End every hand-off without a hand-back, newest first: the chat was cleared, or the agents changed. Each raises `handoff-unwound`; on Clear a waiting caller's `onHandOffReturn` is told.\n */\n",
32993
+ "excerptTokens": [
32994
+ {
32995
+ "kind": "Content",
32996
+ "text": "unwindHandOffs(kind: "
32997
+ },
32998
+ {
32999
+ "kind": "Content",
33000
+ "text": "'cleared' | 'state-lost'"
33001
+ },
33002
+ {
33003
+ "kind": "Content",
33004
+ "text": "): "
33005
+ },
33006
+ {
33007
+ "kind": "Reference",
33008
+ "text": "Promise",
33009
+ "canonicalReference": "!Promise:interface"
33010
+ },
33011
+ {
33012
+ "kind": "Content",
33013
+ "text": "<void>"
33014
+ },
33015
+ {
33016
+ "kind": "Content",
33017
+ "text": ";"
33018
+ }
33019
+ ],
33020
+ "isStatic": false,
33021
+ "returnTypeTokenRange": {
33022
+ "startIndex": 3,
33023
+ "endIndex": 5
33024
+ },
33025
+ "releaseTag": "Beta",
33026
+ "isProtected": false,
33027
+ "overloadIndex": 1,
33028
+ "parameters": [
33029
+ {
33030
+ "parameterName": "kind",
33031
+ "parameterTypeTokenRange": {
33032
+ "startIndex": 1,
33033
+ "endIndex": 2
33034
+ },
33035
+ "isOptional": false
33036
+ }
33037
+ ],
33038
+ "isOptional": false,
33039
+ "isAbstract": false,
33040
+ "name": "unwindHandOffs"
31041
33041
  }
31042
33042
  ],
31043
33043
  "extendsTokenRange": {
@@ -31671,6 +33671,70 @@
31671
33671
  "endIndex": 2
31672
33672
  }
31673
33673
  },
33674
+ {
33675
+ "kind": "PropertySignature",
33676
+ "canonicalReference": "@genesislcap/ai-assistant!PersistedSession#handOffData:member",
33677
+ "docComment": "/**\n * The `data` each hand-off target was activated with, by agent name (GENC-1737), for the agents a restore resumes: the flow owner and the waiting callers. Not written for a frozen session. Optional and additive, like `handoffStack`; omitted when there is none.\n */\n",
33678
+ "excerptTokens": [
33679
+ {
33680
+ "kind": "Content",
33681
+ "text": "handOffData?: "
33682
+ },
33683
+ {
33684
+ "kind": "Reference",
33685
+ "text": "Record",
33686
+ "canonicalReference": "!Record:type"
33687
+ },
33688
+ {
33689
+ "kind": "Content",
33690
+ "text": "<string, unknown>"
33691
+ },
33692
+ {
33693
+ "kind": "Content",
33694
+ "text": ";"
33695
+ }
33696
+ ],
33697
+ "isReadonly": false,
33698
+ "isOptional": true,
33699
+ "releaseTag": "Public",
33700
+ "name": "handOffData",
33701
+ "propertyTypeTokenRange": {
33702
+ "startIndex": 1,
33703
+ "endIndex": 3
33704
+ }
33705
+ },
33706
+ {
33707
+ "kind": "PropertySignature",
33708
+ "canonicalReference": "@genesislcap/ai-assistant!PersistedSession#handoffStack:member",
33709
+ "docComment": "/**\n * The hand-offs in progress, oldest first (GENC-1737): who waits for whom, and why. A frame with an `outcome` was finished by its target but its caller had not resumed yet, so a restore hands back. Each agent's own state is in `agentSnapshots`, the waiting callers' included. Optional and additive, like `condensePolicies`; omitted when there are none. The frame's shape, written out here as for `checkpoints`.\n */\n",
33710
+ "excerptTokens": [
33711
+ {
33712
+ "kind": "Content",
33713
+ "text": "handoffStack?: "
33714
+ },
33715
+ {
33716
+ "kind": "Reference",
33717
+ "text": "Array",
33718
+ "canonicalReference": "!Array:interface"
33719
+ },
33720
+ {
33721
+ "kind": "Content",
33722
+ "text": "<{\n id: string;\n caller: string;\n target: string;\n returnTo: boolean;\n message: string;\n data?: unknown;\n startedAt: string;\n outcome?: {\n kind: string;\n message?: string;\n data?: unknown;\n };\n }>"
33723
+ },
33724
+ {
33725
+ "kind": "Content",
33726
+ "text": ";"
33727
+ }
33728
+ ],
33729
+ "isReadonly": false,
33730
+ "isOptional": true,
33731
+ "releaseTag": "Public",
33732
+ "name": "handoffStack",
33733
+ "propertyTypeTokenRange": {
33734
+ "startIndex": 1,
33735
+ "endIndex": 3
33736
+ }
33737
+ },
31674
33738
  {
31675
33739
  "kind": "PropertySignature",
31676
33740
  "canonicalReference": "@genesislcap/ai-assistant!PersistedSession#host:member",
@@ -32129,33 +34193,6 @@
32129
34193
  ],
32130
34194
  "name": "registerTieredAIProviders"
32131
34195
  },
32132
- {
32133
- "kind": "Variable",
32134
- "canonicalReference": "@genesislcap/ai-assistant!REQUEST_CONTINUATION_TOOL:var",
32135
- "docComment": "/**\n * Name reserved for the cross-agent handoff tool — injected by OrchestratingDriver.\n *\n * @beta\n */\n",
32136
- "excerptTokens": [
32137
- {
32138
- "kind": "Content",
32139
- "text": "REQUEST_CONTINUATION_TOOL = "
32140
- },
32141
- {
32142
- "kind": "Content",
32143
- "text": "\"request_continuation\""
32144
- }
32145
- ],
32146
- "fileUrlPath": "src/components/chat-driver/chat-driver.constants.ts",
32147
- "initializerTokenRange": {
32148
- "startIndex": 1,
32149
- "endIndex": 2
32150
- },
32151
- "isReadonly": true,
32152
- "releaseTag": "Beta",
32153
- "name": "REQUEST_CONTINUATION_TOOL",
32154
- "variableTypeTokenRange": {
32155
- "startIndex": 0,
32156
- "endIndex": 0
32157
- }
32158
- },
32159
34196
  {
32160
34197
  "kind": "Function",
32161
34198
  "canonicalReference": "@genesislcap/ai-assistant!requestAgentNotificationPermission:function(1)",
@@ -32429,7 +34466,7 @@
32429
34466
  },
32430
34467
  {
32431
34468
  "kind": "Content",
32432
- "text": "'classified'\n/** The classifier ran and answered -1: nothing listed covers the request. */\n | 'no-match'\n/**\n * Every classifier-eligible specialist had already handled part of this turn and handed on, so\n * the ballot was empty and no call was made. Distinct from `'no-match'`, which means a\n * classifier RAN and declined — conflating the two re-creates exactly the \"did anything actually\n * get asked?\" ambiguity this event exists to remove.\n */\n | 'ballot-exhausted'\n/** One viable specialist and no fallback — no point asking. */\n | 'single-candidate'\n/** Nothing classifier-eligible was configured. */\n | 'no-specialists'\n/** The registry default exposes no `chat()`, so no classification is possible. */\n | 'provider-unavailable'\n/** Every attempt threw. `detail.error` carries the last message. */\n | 'classifier-failed'\n/** A pin or an active flow owned the turn; the classifier was skipped. */\n | 'pinned'"
34469
+ "text": "'classified'\n/** The classifier ran and answered -1: nothing listed covers the request. */\n | 'no-match'\n/** One viable specialist and no fallback — no point asking. */\n | 'single-candidate'\n/** Nothing classifier-eligible was configured. */\n | 'no-specialists'\n/** The registry default exposes no `chat()`, so no classification is possible. */\n | 'provider-unavailable'\n/** Every attempt threw. `detail.error` carries the last message. */\n | 'classifier-failed'\n/** A pin or an active flow owned the turn; the classifier was skipped. */\n | 'pinned'"
32433
34470
  },
32434
34471
  {
32435
34472
  "kind": "Content",
@@ -39040,7 +41077,7 @@
39040
41077
  {
39041
41078
  "kind": "Variable",
39042
41079
  "canonicalReference": "@genesislcap/ai-assistant!UNROUTABLE_INSTRUCTION:var",
39043
- "docComment": "/**\n * The instruction a fallback agent needs and, left to itself, tends not to have.\n *\n * A fallback prompt written by a consumer reliably covers two cases — small talk, and a request that belongs to a specialist — because those are the ones you think of when you write it. The case it exists FOR is the third: a substantive request that no specialist covers, and no way to act on it, because a fallback holds no tools and is denied the continuation tool as a leaf.\n *\n * Create's fallback prompt is the worked example (GENC-1573). It covered chit-chat and \"out of scope, here are the specialists\", said nothing about a request nothing can serve, and nothing about a terse follow-up (\"fix it\", \"try again\") aimed at an answer already given. Asked to fix a Kotlin null pointer no agent could touch, it returned nine blank turns across three page loads — a model with no instruction covering its situation and no tool to reach for.\n *\n * So the framework supplies it. Appended to a string-form prompt (or substituted at {@link UNROUTABLE_PLACEHOLDER} if the consumer positions it), because a fallback with no answer for its own reason to exist is a defect in every host, not a matter of taste. It is additive and static: being fixed it cannot destabilise a cached prefix, and the fallback prompt already changes whenever the agents array does (`{{agents}}` interpolates the specialist list). The function form still passes through untouched — a consumer that wants full control has it there.\n *\n * DELIBERATELY CONFINED TO WHAT A TERSE PROMPT CAN ALSO OBEY, and it must stay that way. Since this is appended by default it lands on top of prompts written with their own tone rules, and an earlier draft asked the model to \"state what you can establish… and suggest what the user could do next\" — a direct contradiction of {@link strictFallbackAgent}, a preset THIS PACKAGE ships, whose whole instruction is \"a single short sentence… Do not elaborate\". What is left here is compatible with brevity: say so, don't promise work you cannot do, read a short follow-up in context, and never answer with nothing. Adding anything that presumes room to elaborate breaks a shipped preset — put it in the consumer's own prompt instead.\n *\n * @beta\n */\n",
41080
+ "docComment": "/**\n * The instruction a fallback agent needs and, left to itself, tends not to have.\n *\n * A fallback prompt written by a consumer reliably covers two cases — small talk, and a request that belongs to a specialist — because those are the ones you think of when you write it. The case it exists FOR is the third: a substantive request that no specialist covers, and no way to act on it, because a fallback holds no tools.\n *\n * Create's fallback prompt is the worked example (GENC-1573). It covered chit-chat and \"out of scope, here are the specialists\", said nothing about a request nothing can serve, and nothing about a terse follow-up (\"fix it\", \"try again\") aimed at an answer already given. Asked to fix a Kotlin null pointer no agent could touch, it returned nine blank turns across three page loads — a model with no instruction covering its situation and no tool to reach for.\n *\n * So the framework supplies it. Appended to a string-form prompt (or substituted at {@link UNROUTABLE_PLACEHOLDER} if the consumer positions it), because a fallback with no answer for its own reason to exist is a defect in every host, not a matter of taste. It is additive and static: being fixed it cannot destabilise a cached prefix, and the fallback prompt already changes whenever the agents array does (`{{agents}}` interpolates the specialist list). The function form still passes through untouched — a consumer that wants full control has it there.\n *\n * DELIBERATELY CONFINED TO WHAT A TERSE PROMPT CAN ALSO OBEY, and it must stay that way. Since this is appended by default it lands on top of prompts written with their own tone rules, and an earlier draft asked the model to \"state what you can establish… and suggest what the user could do next\" — a direct contradiction of {@link strictFallbackAgent}, a preset THIS PACKAGE ships, whose whole instruction is \"a single short sentence… Do not elaborate\". What is left here is compatible with brevity: say so, don't promise work you cannot do, read a short follow-up in context, and never answer with nothing. Adding anything that presumes room to elaborate breaks a shipped preset — put it in the consumer's own prompt instead.\n *\n * @beta\n */\n",
39044
41081
  "excerptTokens": [
39045
41082
  {
39046
41083
  "kind": "Content",