@genesislcap/ai-assistant 15.85.1 → 15.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-assistant.api.json +2 -2
- package/dist/ai-assistant.d.ts +46 -2
- package/dist/chat-driver.cjs +2 -0
- package/dist/chat-driver.cjs.map +2 -2
- package/dist/chat-driver.mjs +2 -0
- package/dist/chat-driver.mjs.map +2 -2
- package/dist/custom-elements.json +294 -177
- package/dist/dts/autopilot/autopilot-driver.d.ts +46 -2
- package/dist/dts/autopilot/autopilot-driver.d.ts.map +1 -1
- package/dist/dts/state/debug-event-log.d.ts +1 -1
- package/dist/dts/state/debug-event-log.d.ts.map +1 -1
- package/dist/esm/autopilot/autopilot-driver.js +112 -6
- package/dist/esm/state/debug-event-log.js +3 -1
- package/package.json +17 -17
|
@@ -1586,6 +1586,24 @@
|
|
|
1586
1586
|
"privacy": "private",
|
|
1587
1587
|
"description": "A mode restored with the session, waiting for its flow to become the owner again."
|
|
1588
1588
|
},
|
|
1589
|
+
{
|
|
1590
|
+
"kind": "field",
|
|
1591
|
+
"name": "handingBack",
|
|
1592
|
+
"type": {
|
|
1593
|
+
"text": "Carried | undefined"
|
|
1594
|
+
},
|
|
1595
|
+
"privacy": "private",
|
|
1596
|
+
"description": "The mode of a hand-off's target that has released, kept for its caller, which has not taken the\nlock back yet (GENC-1751): the flow has no owner in between. See `carriedTo`."
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
"kind": "field",
|
|
1600
|
+
"name": "switchedFrom",
|
|
1601
|
+
"type": {
|
|
1602
|
+
"text": "Carried | undefined"
|
|
1603
|
+
},
|
|
1604
|
+
"privacy": "private",
|
|
1605
|
+
"description": "The mode of the flow that just ended, should a one-way hand-off with nobody waiting turn out to\nhave ended it: that switch announces itself only after the owner has changed (GENC-1751)."
|
|
1606
|
+
},
|
|
1589
1607
|
{
|
|
1590
1608
|
"kind": "field",
|
|
1591
1609
|
"name": "generation",
|
|
@@ -1722,7 +1740,7 @@
|
|
|
1722
1740
|
"text": "PersistedAutopilotMode | undefined"
|
|
1723
1741
|
}
|
|
1724
1742
|
},
|
|
1725
|
-
"description": "The mode to save with the session, while it is set for the current flow."
|
|
1743
|
+
"description": "The mode to save with the session, while it is set for the current flow — or kept for a\nhand-off's caller while its target releases, saved for that target, as the stack saves it."
|
|
1726
1744
|
},
|
|
1727
1745
|
{
|
|
1728
1746
|
"kind": "method",
|
|
@@ -2513,6 +2531,105 @@
|
|
|
2513
2531
|
}
|
|
2514
2532
|
]
|
|
2515
2533
|
},
|
|
2534
|
+
{
|
|
2535
|
+
"kind": "method",
|
|
2536
|
+
"name": "onHandOffStarted",
|
|
2537
|
+
"privacy": "private",
|
|
2538
|
+
"return": {
|
|
2539
|
+
"type": {
|
|
2540
|
+
"text": "void"
|
|
2541
|
+
}
|
|
2542
|
+
},
|
|
2543
|
+
"parameters": [
|
|
2544
|
+
{
|
|
2545
|
+
"name": "frame",
|
|
2546
|
+
"type": {
|
|
2547
|
+
"text": "HandOffFrame"
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
],
|
|
2551
|
+
"description": "A one-way hand-off with nobody waiting is a plain switch, the caller deactivated, so nothing on\nthe stack says the owner it changed to took over the same task: its event, raised once the\ntarget is active, does (GENC-1751)."
|
|
2552
|
+
},
|
|
2553
|
+
{
|
|
2554
|
+
"kind": "method",
|
|
2555
|
+
"name": "current",
|
|
2556
|
+
"privacy": "private",
|
|
2557
|
+
"return": {
|
|
2558
|
+
"type": {
|
|
2559
|
+
"text": "Carried | undefined"
|
|
2560
|
+
}
|
|
2561
|
+
},
|
|
2562
|
+
"description": "The mode set for the current flow, or kept for the caller of a hand-back under way."
|
|
2563
|
+
},
|
|
2564
|
+
{
|
|
2565
|
+
"kind": "method",
|
|
2566
|
+
"name": "carriedTo",
|
|
2567
|
+
"privacy": "private",
|
|
2568
|
+
"return": {
|
|
2569
|
+
"type": {
|
|
2570
|
+
"text": "Carried | undefined"
|
|
2571
|
+
}
|
|
2572
|
+
},
|
|
2573
|
+
"parameters": [
|
|
2574
|
+
{
|
|
2575
|
+
"name": "owner",
|
|
2576
|
+
"type": {
|
|
2577
|
+
"text": "string | null"
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2580
|
+
],
|
|
2581
|
+
"description": "The mode that carries to `owner` because the owner changed for a hand-off or its hand-back, as\nthe hand-off stack shows it at that moment (GENC-1751):\n- a hand-off: `owner` is the top frame's target, which has not finished. Its frame is on the\n stack before the target is activated, and so is a waiting caller's passed on by a one-way\n hand-off from a target;\n- a hand-back: the top frame's target, which the mode is set for, has finished, and `owner` is\n its caller, or no one while the target releases. Its frame leaves the stack only after the\n caller is active again.\n\nClear and an agents change empty the stack before the flow ends, so the mode ends with it, as\nit ends with any flow. A turn routed away from the target ends the hand-offs the same way."
|
|
2582
|
+
},
|
|
2583
|
+
{
|
|
2584
|
+
"kind": "method",
|
|
2585
|
+
"name": "handsBack",
|
|
2586
|
+
"privacy": "private",
|
|
2587
|
+
"return": {
|
|
2588
|
+
"type": {
|
|
2589
|
+
"text": "boolean"
|
|
2590
|
+
}
|
|
2591
|
+
},
|
|
2592
|
+
"parameters": [
|
|
2593
|
+
{
|
|
2594
|
+
"name": "target",
|
|
2595
|
+
"type": {
|
|
2596
|
+
"text": "string"
|
|
2597
|
+
}
|
|
2598
|
+
},
|
|
2599
|
+
{
|
|
2600
|
+
"name": "owner",
|
|
2601
|
+
"type": {
|
|
2602
|
+
"text": "string"
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
],
|
|
2606
|
+
"description": "Whether `owner` is the caller the top hand-off hands back to from `target`."
|
|
2607
|
+
},
|
|
2608
|
+
{
|
|
2609
|
+
"kind": "method",
|
|
2610
|
+
"name": "carry",
|
|
2611
|
+
"privacy": "private",
|
|
2612
|
+
"return": {
|
|
2613
|
+
"type": {
|
|
2614
|
+
"text": "void"
|
|
2615
|
+
}
|
|
2616
|
+
},
|
|
2617
|
+
"parameters": [
|
|
2618
|
+
{
|
|
2619
|
+
"name": "carried",
|
|
2620
|
+
"type": {
|
|
2621
|
+
"text": "Carried"
|
|
2622
|
+
}
|
|
2623
|
+
},
|
|
2624
|
+
{
|
|
2625
|
+
"name": "owner",
|
|
2626
|
+
"type": {
|
|
2627
|
+
"text": "string"
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
],
|
|
2631
|
+
"description": "Set `carried`'s mode for `owner`, which took the task over in a hand-off or its hand-back. A\npause the person chose carries with it; the autopilot's own hand-back of an interaction does\nnot, since that interaction settled before the hand-off could start."
|
|
2632
|
+
},
|
|
2516
2633
|
{
|
|
2517
2634
|
"kind": "method",
|
|
2518
2635
|
"name": "capabilityFor",
|
|
@@ -6880,6 +6997,180 @@
|
|
|
6880
6997
|
"declarations": [],
|
|
6881
6998
|
"exports": []
|
|
6882
6999
|
},
|
|
7000
|
+
{
|
|
7001
|
+
"kind": "javascript-module",
|
|
7002
|
+
"path": "src/notifications/agent-notifications.ts",
|
|
7003
|
+
"declarations": [
|
|
7004
|
+
{
|
|
7005
|
+
"kind": "variable",
|
|
7006
|
+
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
7007
|
+
"type": {
|
|
7008
|
+
"text": "string"
|
|
7009
|
+
},
|
|
7010
|
+
"default": "'The assistant is ready for your next input'",
|
|
7011
|
+
"description": "The notification's text when neither the app nor the widget gives one."
|
|
7012
|
+
},
|
|
7013
|
+
{
|
|
7014
|
+
"kind": "function",
|
|
7015
|
+
"name": "agentNotificationPermission",
|
|
7016
|
+
"return": {
|
|
7017
|
+
"type": {
|
|
7018
|
+
"text": "AgentNotificationPermission"
|
|
7019
|
+
}
|
|
7020
|
+
},
|
|
7021
|
+
"description": "Whether this page may show notifications. Safe to call anywhere, including Node."
|
|
7022
|
+
},
|
|
7023
|
+
{
|
|
7024
|
+
"kind": "function",
|
|
7025
|
+
"name": "requestAgentNotificationPermission",
|
|
7026
|
+
"return": {
|
|
7027
|
+
"type": {
|
|
7028
|
+
"text": "Promise<AgentNotificationPermission>"
|
|
7029
|
+
}
|
|
7030
|
+
},
|
|
7031
|
+
"description": "Ask the person for permission to show notifications, and resolve to the result. Call it from a\nclick or key handler: browsers ignore or refuse a request that does not come from the person.\nResolves straight away when permission is already decided or unsupported, since a browser only\never asks once."
|
|
7032
|
+
}
|
|
7033
|
+
],
|
|
7034
|
+
"exports": [
|
|
7035
|
+
{
|
|
7036
|
+
"kind": "js",
|
|
7037
|
+
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
7038
|
+
"declaration": {
|
|
7039
|
+
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
7040
|
+
"module": "src/notifications/agent-notifications.ts"
|
|
7041
|
+
}
|
|
7042
|
+
},
|
|
7043
|
+
{
|
|
7044
|
+
"kind": "js",
|
|
7045
|
+
"name": "agentNotificationPermission",
|
|
7046
|
+
"declaration": {
|
|
7047
|
+
"name": "agentNotificationPermission",
|
|
7048
|
+
"module": "src/notifications/agent-notifications.ts"
|
|
7049
|
+
}
|
|
7050
|
+
},
|
|
7051
|
+
{
|
|
7052
|
+
"kind": "js",
|
|
7053
|
+
"name": "requestAgentNotificationPermission",
|
|
7054
|
+
"declaration": {
|
|
7055
|
+
"name": "requestAgentNotificationPermission",
|
|
7056
|
+
"module": "src/notifications/agent-notifications.ts"
|
|
7057
|
+
}
|
|
7058
|
+
}
|
|
7059
|
+
]
|
|
7060
|
+
},
|
|
7061
|
+
{
|
|
7062
|
+
"kind": "javascript-module",
|
|
7063
|
+
"path": "src/notifications/agent-notifier.ts",
|
|
7064
|
+
"declarations": [],
|
|
7065
|
+
"exports": []
|
|
7066
|
+
},
|
|
7067
|
+
{
|
|
7068
|
+
"kind": "javascript-module",
|
|
7069
|
+
"path": "src/notifications/index.ts",
|
|
7070
|
+
"declarations": [],
|
|
7071
|
+
"exports": [
|
|
7072
|
+
{
|
|
7073
|
+
"kind": "js",
|
|
7074
|
+
"name": "agentNotificationPermission",
|
|
7075
|
+
"declaration": {
|
|
7076
|
+
"name": "agentNotificationPermission",
|
|
7077
|
+
"module": "./agent-notifications"
|
|
7078
|
+
}
|
|
7079
|
+
},
|
|
7080
|
+
{
|
|
7081
|
+
"kind": "js",
|
|
7082
|
+
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
7083
|
+
"declaration": {
|
|
7084
|
+
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
7085
|
+
"module": "./agent-notifications"
|
|
7086
|
+
}
|
|
7087
|
+
},
|
|
7088
|
+
{
|
|
7089
|
+
"kind": "js",
|
|
7090
|
+
"name": "requestAgentNotificationPermission",
|
|
7091
|
+
"declaration": {
|
|
7092
|
+
"name": "requestAgentNotificationPermission",
|
|
7093
|
+
"module": "./agent-notifications"
|
|
7094
|
+
}
|
|
7095
|
+
},
|
|
7096
|
+
{
|
|
7097
|
+
"kind": "js",
|
|
7098
|
+
"name": "type",
|
|
7099
|
+
"declaration": {
|
|
7100
|
+
"name": "type",
|
|
7101
|
+
"module": "./agent-notifications"
|
|
7102
|
+
}
|
|
7103
|
+
},
|
|
7104
|
+
{
|
|
7105
|
+
"kind": "js",
|
|
7106
|
+
"name": "AgentAttentionDetail",
|
|
7107
|
+
"declaration": {
|
|
7108
|
+
"name": "AgentAttentionDetail",
|
|
7109
|
+
"module": "./agent-notifications"
|
|
7110
|
+
}
|
|
7111
|
+
},
|
|
7112
|
+
{
|
|
7113
|
+
"kind": "js",
|
|
7114
|
+
"name": "type",
|
|
7115
|
+
"declaration": {
|
|
7116
|
+
"name": "type",
|
|
7117
|
+
"module": "./agent-notifications"
|
|
7118
|
+
}
|
|
7119
|
+
},
|
|
7120
|
+
{
|
|
7121
|
+
"kind": "js",
|
|
7122
|
+
"name": "AgentAttentionKind",
|
|
7123
|
+
"declaration": {
|
|
7124
|
+
"name": "AgentAttentionKind",
|
|
7125
|
+
"module": "./agent-notifications"
|
|
7126
|
+
}
|
|
7127
|
+
},
|
|
7128
|
+
{
|
|
7129
|
+
"kind": "js",
|
|
7130
|
+
"name": "type",
|
|
7131
|
+
"declaration": {
|
|
7132
|
+
"name": "type",
|
|
7133
|
+
"module": "./agent-notifications"
|
|
7134
|
+
}
|
|
7135
|
+
},
|
|
7136
|
+
{
|
|
7137
|
+
"kind": "js",
|
|
7138
|
+
"name": "AgentNotificationLevel",
|
|
7139
|
+
"declaration": {
|
|
7140
|
+
"name": "AgentNotificationLevel",
|
|
7141
|
+
"module": "./agent-notifications"
|
|
7142
|
+
}
|
|
7143
|
+
},
|
|
7144
|
+
{
|
|
7145
|
+
"kind": "js",
|
|
7146
|
+
"name": "type",
|
|
7147
|
+
"declaration": {
|
|
7148
|
+
"name": "type",
|
|
7149
|
+
"module": "./agent-notifications"
|
|
7150
|
+
}
|
|
7151
|
+
},
|
|
7152
|
+
{
|
|
7153
|
+
"kind": "js",
|
|
7154
|
+
"name": "AgentNotificationPermission",
|
|
7155
|
+
"declaration": {
|
|
7156
|
+
"name": "AgentNotificationPermission",
|
|
7157
|
+
"module": "./agent-notifications"
|
|
7158
|
+
}
|
|
7159
|
+
}
|
|
7160
|
+
]
|
|
7161
|
+
},
|
|
7162
|
+
{
|
|
7163
|
+
"kind": "javascript-module",
|
|
7164
|
+
"path": "src/notifications/notification-level-picker.template.ts",
|
|
7165
|
+
"declarations": [],
|
|
7166
|
+
"exports": []
|
|
7167
|
+
},
|
|
7168
|
+
{
|
|
7169
|
+
"kind": "javascript-module",
|
|
7170
|
+
"path": "src/notifications/notification-settings.ts",
|
|
7171
|
+
"declarations": [],
|
|
7172
|
+
"exports": []
|
|
7173
|
+
},
|
|
6883
7174
|
{
|
|
6884
7175
|
"kind": "javascript-module",
|
|
6885
7176
|
"path": "src/main/attachment-controller.ts",
|
|
@@ -11137,180 +11428,6 @@
|
|
|
11137
11428
|
"declarations": [],
|
|
11138
11429
|
"exports": []
|
|
11139
11430
|
},
|
|
11140
|
-
{
|
|
11141
|
-
"kind": "javascript-module",
|
|
11142
|
-
"path": "src/notifications/agent-notifications.ts",
|
|
11143
|
-
"declarations": [
|
|
11144
|
-
{
|
|
11145
|
-
"kind": "variable",
|
|
11146
|
-
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
11147
|
-
"type": {
|
|
11148
|
-
"text": "string"
|
|
11149
|
-
},
|
|
11150
|
-
"default": "'The assistant is ready for your next input'",
|
|
11151
|
-
"description": "The notification's text when neither the app nor the widget gives one."
|
|
11152
|
-
},
|
|
11153
|
-
{
|
|
11154
|
-
"kind": "function",
|
|
11155
|
-
"name": "agentNotificationPermission",
|
|
11156
|
-
"return": {
|
|
11157
|
-
"type": {
|
|
11158
|
-
"text": "AgentNotificationPermission"
|
|
11159
|
-
}
|
|
11160
|
-
},
|
|
11161
|
-
"description": "Whether this page may show notifications. Safe to call anywhere, including Node."
|
|
11162
|
-
},
|
|
11163
|
-
{
|
|
11164
|
-
"kind": "function",
|
|
11165
|
-
"name": "requestAgentNotificationPermission",
|
|
11166
|
-
"return": {
|
|
11167
|
-
"type": {
|
|
11168
|
-
"text": "Promise<AgentNotificationPermission>"
|
|
11169
|
-
}
|
|
11170
|
-
},
|
|
11171
|
-
"description": "Ask the person for permission to show notifications, and resolve to the result. Call it from a\nclick or key handler: browsers ignore or refuse a request that does not come from the person.\nResolves straight away when permission is already decided or unsupported, since a browser only\never asks once."
|
|
11172
|
-
}
|
|
11173
|
-
],
|
|
11174
|
-
"exports": [
|
|
11175
|
-
{
|
|
11176
|
-
"kind": "js",
|
|
11177
|
-
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
11178
|
-
"declaration": {
|
|
11179
|
-
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
11180
|
-
"module": "src/notifications/agent-notifications.ts"
|
|
11181
|
-
}
|
|
11182
|
-
},
|
|
11183
|
-
{
|
|
11184
|
-
"kind": "js",
|
|
11185
|
-
"name": "agentNotificationPermission",
|
|
11186
|
-
"declaration": {
|
|
11187
|
-
"name": "agentNotificationPermission",
|
|
11188
|
-
"module": "src/notifications/agent-notifications.ts"
|
|
11189
|
-
}
|
|
11190
|
-
},
|
|
11191
|
-
{
|
|
11192
|
-
"kind": "js",
|
|
11193
|
-
"name": "requestAgentNotificationPermission",
|
|
11194
|
-
"declaration": {
|
|
11195
|
-
"name": "requestAgentNotificationPermission",
|
|
11196
|
-
"module": "src/notifications/agent-notifications.ts"
|
|
11197
|
-
}
|
|
11198
|
-
}
|
|
11199
|
-
]
|
|
11200
|
-
},
|
|
11201
|
-
{
|
|
11202
|
-
"kind": "javascript-module",
|
|
11203
|
-
"path": "src/notifications/agent-notifier.ts",
|
|
11204
|
-
"declarations": [],
|
|
11205
|
-
"exports": []
|
|
11206
|
-
},
|
|
11207
|
-
{
|
|
11208
|
-
"kind": "javascript-module",
|
|
11209
|
-
"path": "src/notifications/index.ts",
|
|
11210
|
-
"declarations": [],
|
|
11211
|
-
"exports": [
|
|
11212
|
-
{
|
|
11213
|
-
"kind": "js",
|
|
11214
|
-
"name": "agentNotificationPermission",
|
|
11215
|
-
"declaration": {
|
|
11216
|
-
"name": "agentNotificationPermission",
|
|
11217
|
-
"module": "./agent-notifications"
|
|
11218
|
-
}
|
|
11219
|
-
},
|
|
11220
|
-
{
|
|
11221
|
-
"kind": "js",
|
|
11222
|
-
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
11223
|
-
"declaration": {
|
|
11224
|
-
"name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
|
|
11225
|
-
"module": "./agent-notifications"
|
|
11226
|
-
}
|
|
11227
|
-
},
|
|
11228
|
-
{
|
|
11229
|
-
"kind": "js",
|
|
11230
|
-
"name": "requestAgentNotificationPermission",
|
|
11231
|
-
"declaration": {
|
|
11232
|
-
"name": "requestAgentNotificationPermission",
|
|
11233
|
-
"module": "./agent-notifications"
|
|
11234
|
-
}
|
|
11235
|
-
},
|
|
11236
|
-
{
|
|
11237
|
-
"kind": "js",
|
|
11238
|
-
"name": "type",
|
|
11239
|
-
"declaration": {
|
|
11240
|
-
"name": "type",
|
|
11241
|
-
"module": "./agent-notifications"
|
|
11242
|
-
}
|
|
11243
|
-
},
|
|
11244
|
-
{
|
|
11245
|
-
"kind": "js",
|
|
11246
|
-
"name": "AgentAttentionDetail",
|
|
11247
|
-
"declaration": {
|
|
11248
|
-
"name": "AgentAttentionDetail",
|
|
11249
|
-
"module": "./agent-notifications"
|
|
11250
|
-
}
|
|
11251
|
-
},
|
|
11252
|
-
{
|
|
11253
|
-
"kind": "js",
|
|
11254
|
-
"name": "type",
|
|
11255
|
-
"declaration": {
|
|
11256
|
-
"name": "type",
|
|
11257
|
-
"module": "./agent-notifications"
|
|
11258
|
-
}
|
|
11259
|
-
},
|
|
11260
|
-
{
|
|
11261
|
-
"kind": "js",
|
|
11262
|
-
"name": "AgentAttentionKind",
|
|
11263
|
-
"declaration": {
|
|
11264
|
-
"name": "AgentAttentionKind",
|
|
11265
|
-
"module": "./agent-notifications"
|
|
11266
|
-
}
|
|
11267
|
-
},
|
|
11268
|
-
{
|
|
11269
|
-
"kind": "js",
|
|
11270
|
-
"name": "type",
|
|
11271
|
-
"declaration": {
|
|
11272
|
-
"name": "type",
|
|
11273
|
-
"module": "./agent-notifications"
|
|
11274
|
-
}
|
|
11275
|
-
},
|
|
11276
|
-
{
|
|
11277
|
-
"kind": "js",
|
|
11278
|
-
"name": "AgentNotificationLevel",
|
|
11279
|
-
"declaration": {
|
|
11280
|
-
"name": "AgentNotificationLevel",
|
|
11281
|
-
"module": "./agent-notifications"
|
|
11282
|
-
}
|
|
11283
|
-
},
|
|
11284
|
-
{
|
|
11285
|
-
"kind": "js",
|
|
11286
|
-
"name": "type",
|
|
11287
|
-
"declaration": {
|
|
11288
|
-
"name": "type",
|
|
11289
|
-
"module": "./agent-notifications"
|
|
11290
|
-
}
|
|
11291
|
-
},
|
|
11292
|
-
{
|
|
11293
|
-
"kind": "js",
|
|
11294
|
-
"name": "AgentNotificationPermission",
|
|
11295
|
-
"declaration": {
|
|
11296
|
-
"name": "AgentNotificationPermission",
|
|
11297
|
-
"module": "./agent-notifications"
|
|
11298
|
-
}
|
|
11299
|
-
}
|
|
11300
|
-
]
|
|
11301
|
-
},
|
|
11302
|
-
{
|
|
11303
|
-
"kind": "javascript-module",
|
|
11304
|
-
"path": "src/notifications/notification-level-picker.template.ts",
|
|
11305
|
-
"declarations": [],
|
|
11306
|
-
"exports": []
|
|
11307
|
-
},
|
|
11308
|
-
{
|
|
11309
|
-
"kind": "javascript-module",
|
|
11310
|
-
"path": "src/notifications/notification-settings.ts",
|
|
11311
|
-
"declarations": [],
|
|
11312
|
-
"exports": []
|
|
11313
|
-
},
|
|
11314
11431
|
{
|
|
11315
11432
|
"kind": "javascript-module",
|
|
11316
11433
|
"path": "src/provider/ai-provider-switcher.ts",
|
|
@@ -11638,7 +11755,7 @@
|
|
|
11638
11755
|
"type": {
|
|
11639
11756
|
"text": "Record<MetaEventType, MetaEventImportance>"
|
|
11640
11757
|
},
|
|
11641
|
-
"default": "{\n 'turn.error': 'high',\n 'tool.failed': 'high',\n 'subagent.failed': 'high',\n 'file.read-failed': 'high',\n 'suggestions.failed': 'high',\n 'context.threshold-crossed': 'high',\n 'context.compacted': 'high',\n 'persistence.restore-orphan': 'high',\n // A save that did not land is silent data loss in progress: the transcript on screen\n // is no longer backed by the store, and every later turn widens the gap. GENC-1511.\n 'persistence.save-failed': 'high',\n\n 'assistant.connected': 'normal',\n 'assistant.disconnected': 'normal',\n 'assistant.popout': 'normal',\n 'assistant.popin': 'normal',\n 'driver.created': 'normal',\n 'state.changed': 'normal',\n 'turn.start': 'normal',\n 'turn.end': 'normal',\n 'turn.retry': 'normal',\n 'tool.unresolved': 'normal',\n 'subagent.started': 'normal',\n 'subagent.completed': 'normal',\n // One per routing decision, with what the classifier answered and what the call cost. Same\n // level as the handoff it produces: you read them together to follow how a turn was routed.\n 'routing.decided': 'normal',\n 'agent.handoff': 'normal',\n 'agent.pinned': 'normal',\n 'agent.unpinned': 'normal',\n 'provider.selected': 'normal',\n 'interaction.requested': 'normal',\n 'interaction.resolved': 'normal',\n // Bookkeeping about an already-finished turn; interesting when reconciling a session total.\n 'interaction.external-cost': 'normal',\n // Spend that was billed but could NOT be recorded (the message was trimmed/condensed away, or\n // the value was not real spend). 'high': it is the one way the session total goes quietly\n // wrong, so it must stand out when reconciling.\n 'interaction.external-cost-dropped': 'high',\n // What came of an answer, recorded by the tool that asked (see recordInteractionOutcome).\n 'interaction.outcome': 'normal',\n // An outcome that could not be recorded: the widget goes on showing only the answer.\n 'interaction.outcome-dropped': 'high',\n // A long action's step starting, finishing, or skipped on resume because it was already done.\n 'interaction.step': 'low',\n // A cut checkpoint taken over after a reload, refused (by sameWork, and kept for a later request;\n // or as malformed), or dropped at flow end, as is the live one.\n 'interaction.checkpoint': 'normal',\n // A claimant handing a pending interaction to the person, or taking it back.\n 'interaction.held': 'normal',\n // A claim on a `userOnly` interaction, refused. Expected when an interceptor claims broadly.\n 'interaction.claim-refused': 'low',\n // A claimant ran one of the surface's actions: what it did, and whether that settled it.\n 'interaction.invoked': 'normal',\n 'autopilot.claimed': 'normal',\n // One per interaction the autopilot does not take, so frequent and mostly expected.\n 'autopilot.declined': 'low',\n 'autopilot.decision-sent': 'low',\n 'autopilot.acted': 'normal',\n 'autopilot.handed-back': 'normal',\n 'autopilot.paused': 'normal',\n 'autopilot.resumed': 'normal',\n // The wrapper itself failed: the journey stops being automatic without anyone choosing that.\n 'autopilot.error': 'high',\n // A written answer counted against the step's limit; reaching it withdraws `reply`.\n 'autopilot.refinement': 'normal',\n // The autopilot showed its own widget because a working turn ended needing the person.\n 'autopilot.handback-presented': 'normal',\n // The autopilot was given the whole visible transcript: its first decision, a rebuild, or after\n // a compaction removed the last message it saw.\n 'autopilot.catch-up': 'normal',\n // Autopilot spend that reached no message, so it is missing from the session total.\n 'autopilot.cost-dropped': 'high',\n 'external-diagnostics.folded': 'normal',\n 'session.cleared': 'normal',\n 'session.switched': 'low',\n 'session.switch-deferred': 'low',\n 'persistence.restored': 'normal',\n // Whether a restored flow will be re-activated and resumed (GENC-1662), and how much the trim cut.\n 'persistence.resume-planned': 'normal',\n // A planned resume that did not run, and why (GENC-1662) — the divider was put back to plain.\n 'persistence.resume-withdrawn': 'normal',\n 'persistence.suppressed': 'normal',\n 'persistence.not-resumable': 'normal',\n\n 'driver.wired': 'low',\n 'driver.unwired': 'low',\n 'context.updated': 'low',\n 'context.condensed': 'low',\n 'panel.toggled': 'low',\n 'persistence.toggled': 'low',\n 'persistence.saved': 'low',\n 'attachment.added': 'low',\n}",
|
|
11758
|
+
"default": "{\n 'turn.error': 'high',\n 'tool.failed': 'high',\n 'subagent.failed': 'high',\n 'file.read-failed': 'high',\n 'suggestions.failed': 'high',\n 'context.threshold-crossed': 'high',\n 'context.compacted': 'high',\n 'persistence.restore-orphan': 'high',\n // A save that did not land is silent data loss in progress: the transcript on screen\n // is no longer backed by the store, and every later turn widens the gap. GENC-1511.\n 'persistence.save-failed': 'high',\n\n 'assistant.connected': 'normal',\n 'assistant.disconnected': 'normal',\n 'assistant.popout': 'normal',\n 'assistant.popin': 'normal',\n 'driver.created': 'normal',\n 'state.changed': 'normal',\n 'turn.start': 'normal',\n 'turn.end': 'normal',\n 'turn.retry': 'normal',\n 'tool.unresolved': 'normal',\n 'subagent.started': 'normal',\n 'subagent.completed': 'normal',\n // One per routing decision, with what the classifier answered and what the call cost. Same\n // level as the handoff it produces: you read them together to follow how a turn was routed.\n 'routing.decided': 'normal',\n 'agent.handoff': 'normal',\n 'agent.pinned': 'normal',\n 'agent.unpinned': 'normal',\n 'provider.selected': 'normal',\n 'interaction.requested': 'normal',\n 'interaction.resolved': 'normal',\n // Bookkeeping about an already-finished turn; interesting when reconciling a session total.\n 'interaction.external-cost': 'normal',\n // Spend that was billed but could NOT be recorded (the message was trimmed/condensed away, or\n // the value was not real spend). 'high': it is the one way the session total goes quietly\n // wrong, so it must stand out when reconciling.\n 'interaction.external-cost-dropped': 'high',\n // What came of an answer, recorded by the tool that asked (see recordInteractionOutcome).\n 'interaction.outcome': 'normal',\n // An outcome that could not be recorded: the widget goes on showing only the answer.\n 'interaction.outcome-dropped': 'high',\n // A long action's step starting, finishing, or skipped on resume because it was already done.\n 'interaction.step': 'low',\n // A cut checkpoint taken over after a reload, refused (by sameWork, and kept for a later request;\n // or as malformed), or dropped at flow end, as is the live one.\n 'interaction.checkpoint': 'normal',\n // A claimant handing a pending interaction to the person, or taking it back.\n 'interaction.held': 'normal',\n // A claim on a `userOnly` interaction, refused. Expected when an interceptor claims broadly.\n 'interaction.claim-refused': 'low',\n // A claimant ran one of the surface's actions: what it did, and whether that settled it.\n 'interaction.invoked': 'normal',\n 'autopilot.claimed': 'normal',\n // One per interaction the autopilot does not take, so frequent and mostly expected.\n 'autopilot.declined': 'low',\n 'autopilot.decision-sent': 'low',\n 'autopilot.acted': 'normal',\n 'autopilot.handed-back': 'normal',\n 'autopilot.paused': 'normal',\n 'autopilot.resumed': 'normal',\n // The mode went with the task across a hand-off or its hand-back, rather than ending with the flow.\n 'autopilot.carried': 'normal',\n // The wrapper itself failed: the journey stops being automatic without anyone choosing that.\n 'autopilot.error': 'high',\n // A written answer counted against the step's limit; reaching it withdraws `reply`.\n 'autopilot.refinement': 'normal',\n // The autopilot showed its own widget because a working turn ended needing the person.\n 'autopilot.handback-presented': 'normal',\n // The autopilot was given the whole visible transcript: its first decision, a rebuild, or after\n // a compaction removed the last message it saw.\n 'autopilot.catch-up': 'normal',\n // Autopilot spend that reached no message, so it is missing from the session total.\n 'autopilot.cost-dropped': 'high',\n 'external-diagnostics.folded': 'normal',\n 'session.cleared': 'normal',\n 'session.switched': 'low',\n 'session.switch-deferred': 'low',\n 'persistence.restored': 'normal',\n // Whether a restored flow will be re-activated and resumed (GENC-1662), and how much the trim cut.\n 'persistence.resume-planned': 'normal',\n // A planned resume that did not run, and why (GENC-1662) — the divider was put back to plain.\n 'persistence.resume-withdrawn': 'normal',\n 'persistence.suppressed': 'normal',\n 'persistence.not-resumable': 'normal',\n\n 'driver.wired': 'low',\n 'driver.unwired': 'low',\n 'context.updated': 'low',\n 'context.condensed': 'low',\n 'panel.toggled': 'low',\n 'persistence.toggled': 'low',\n 'persistence.saved': 'low',\n 'attachment.added': 'low',\n}",
|
|
11642
11759
|
"description": "Importance is intrinsic to the event *type*, not the instance, so it's\ndefined once here and stamped automatically by recordMetaEvent — call\nsites never pass it. The `Record` is exhaustive: adding a `MetaEventType`\nwithout a level here is a compile error.\n\n- `high` — failures and hard limits you almost always want to see.\n- `normal` — meaningful session flow you read to follow what happened.\n- `low` — frequent UI / bookkeeping noise, usually safe to skip."
|
|
11643
11760
|
},
|
|
11644
11761
|
{
|
|
@@ -11800,7 +11917,7 @@
|
|
|
11800
11917
|
"type": {
|
|
11801
11918
|
"text": "readonly string[]"
|
|
11802
11919
|
},
|
|
11803
|
-
"default": "[\n 'This is an exported debug log for the Genesis AI assistant. Read it top-to-bottom.',\n \"`sessionUsage` is what this session spent: `costUsd` (USD, provider-reported per request and summed, cache discounts already applied) plus the four TOKEN BUCKETS — `uncachedInputTokens`, `cacheReadTokens`, `cacheWriteTokens`, `outputTokens`. Those four are disjoint and safe to add up for a total-tokens figure; the per-message fields further down are NOT (see kind:'message'). Each bucket bills at a different rate — cache reads a fraction of uncached input, cache writes a premium, output highest — so a big token count against a small cost means the prompt was mostly cache hits, not a missing charge. It covers sub-agent turns and spend a compaction banked, so for the CONVERSATION it is the authoritative total: prefer it over re-summing the timeline, which can be short by whatever the ring buffers evicted. The same figures appear under `meta.context`. It is as current as the snapshot it came from: the assistant's own download stamps a fresh one, but a log stitched by another tool can carry an older one — compare `meta.timestamp` with the last timeline entry, and if it is well behind, read these totals as historical and fall back to summing the timeline. One scope caveat: it is derived from the transcript, so it excludes billed calls that produced no message (a blank or refused attempt that was retried — see kind:'turn'.`usage`). Summing the turns can therefore come out HIGHER than this, and the difference is exactly that discarded spend, not a double-count.\",\n \"What 'session' means for those figures: the CURRENT conversation under this session key (a host-supplied per-project id, or the element id + header title when the host supplies none) — which is not necessarily everything in `timeline`. It is re-derived from the live transcript, so it spans page loads only when the chat is being remembered, and a Clear resets it to zero. `timeline` is append-only regardless: it keeps every page load and the pre-Clear conversation, with the session.cleared event as the boundary. So on a long-lived log, read these totals as the latest conversation's and the earlier sections as history — not as a total of the whole file.\",\n '`timeline` is the entire session as one array, already sorted chronologically by `timestamp` (ISO 8601). Every entry has a `kind`.',\n 'Timestamps are millisecond-resolution; entries that share the same millisecond are ordered by a fixed kind rank (event, then turn, then message), which is a heuristic and may not reflect exact causal order within that millisecond — e.g. a user message and the turn it triggered, or a final assistant message and its turn.end event, can appear in either order depending on whether they landed in the same millisecond. Read the logical structure of a turn rather than over-interpreting the micro-ordering of co-timestamped entries of different kinds.',\n \"kind:'message' — the conversation. `role` is user/assistant/tool/system-event/synthetic-user; `agentName` says which agent produced it; `toolCalls`/`toolResult`/`interaction` carry tool and widget activity; `inputTokens`/`outputTokens`/`cost` are per-message LLM usage, where `inputTokens` is the WHOLE prompt for that request and `cacheReadTokens`/`cacheWriteTokens` BREAK IT DOWN rather than add to it — uncached input is `inputTokens` minus those two, and adding the cache fields to `inputTokens` counts the prompt twice. The cache fields are absent on providers that report no cache split (Gemini reports reads only, since implicit caching bills no write) and on messages persisted before they existed, so read them as 0 when missing. Each bucket bills at a different rate — cache reads a fraction of uncached input, cache writes a premium, output highest — so a large token count at a small cost means the prompt was mostly cache hits. `externalCostUsd` is any non-LLM cost a widget reported for its own external service calls (folded into the session cost total alongside `cost`). On model-produced assistant messages, `model` is the concrete model id that generated it (e.g. 'gemini-2.5-flash-lite') and `providerName` is the registry slot it resolved under (e.g. a tier name like 'high'/'low', or the default); together they attribute the message — and any tool calls it carries — to an exact model even across a mid-session vendor/tier switch, where one slot name can map to different models before and after the switch. Both are undefined on any entry that is NOT an LLM response: non-assistant roles (user/tool/system-event) and 'synthetic-user' echoes; assistant interaction/widget entries (empty content carrying an `interaction` — a rendered widget, not a model turn); driver-authored assistant fallbacks (the timeout, repeated-malformed-call, and empty-response apology messages); and messages restored from a session persisted before these fields existed. One partial case: on a genuine model turn whose provider exposes no `getStatus` (or reports no model), `providerName` is still set but `model` alone is undefined. A 'synthetic-user' message is a display-only echo of an interaction outcome (e.g. the answer a widget reported): it renders on the user's side of the chat and `agentName` is the agent that created it, but it is never sent to the LLM — so it has no matching 'turn' and the model learns the outcome only from the corresponding tool result. An echo of an answer an interceptor (such as an autopilot) gave is NOT synthetic-user: see the delegated-messages paragraph.\",\n 'The autopilot (GENC-1660) runs on a driver of its own, and everything it did is harvested into this log: entries with delegate: autopilot and an agentName ending in › Autopilot are its turns (the decision message it was sent is the user message of its turn, so what it was shown is there verbatim; its systemPrompt is its grounding, such as the brief), its tool calls (widget_read, widget_act, hand_back, any read-only tools of its own, and its widget tools — reads with parameters that a widget type declares, routed to the interaction of that type being decided and refused with a reason when none is, offered on every decision so its tool list never changes; while one is open its tail starts with a line naming them) and their results (a read, view or widget tool, is capped at about 20,000 characters, cut with a note asking for less, and leaves its history at the end of the decision as a one-line note), and its own events. Its cost is already in the session total: it is booked as externalCostUsd on the interaction each decision answered, or, for a written question it answered, on the user message it sent on the user behalf (delegate: autopilot), so do not add its turns to that total. Spend that reached no message is recorded as autopilot.cost-dropped instead.',\n \"Delegated messages (GENC-1660): a message with a `delegate` field was written or sent ON THE USER'S BEHALF by a driver decorator, and `delegate` names it (e.g. autopilot). The platform stamps it; nothing else can. It renders as the assistant whatever its role. A delegated `user` message was NOT typed by the user: it is an answer given on their behalf, and the model read it with `delegateFraming` in brackets in front of the content (the stored `content` is the bare text). A delegated `assistant` message is display-only (`excludeFromProvider`): the decorator's narration note, or, when its answer carried no note, the widget's own echo of the answer (its `userMessage`), shown as the assistant and never as the person. A widget answer a decorator gave with a note is not echoed at all: the note already says what was chosen. To tell what the person decided from what was decided for them, read `interaction.answeredBy` and these fields, never the role alone.\",\n \"Sub-agent messages appear inline. When a tool delegates to a sub-agent (via `requestSubAgent`), the sub-agent's whole conversation — its own assistant/tool messages, each with their own `content`/`thinking`/`toolCalls`/`toolResult` and per-message `model`/`providerName`/`inputTokens`/`outputTokens`/`cacheReadTokens`/`cacheWriteTokens`/`cost` — is hoisted into the timeline as ordinary kind:'message' entries, interleaved by timestamp right after the tool call that spawned them (so you read the delegation top-to-bottom). A hoisted entry is marked: `subAgentDepth` is its delegation depth (1 for a sub-agent, 2 for a sub-agent's sub-agent, …), `subAgentOf` is the id of the parent tool call that spawned it (correlates it back even when two sub-agents run in one parent turn), `subAgentName` is the sub-agent's own name, and `agentName` is rewritten to a `\\\"<parent> › <sub-agent>\\\"` breadcrumb (composing when nested, e.g. `\\\"UI Builder › Planner › Grounding\\\"`). The sub-agent's per-LLM-call snapshots also surface as kind:'turn' entries with an N-M `turnIndex`, and subagent.started/completed (or subagent.failed) events bracket the run. Per-message `cost` on hoisted entries is already part of the session total (it is summed from the un-flattened history), so summing the top-level timeline does NOT double-count.\",\n \"kind:'turn' — one LLM call. `turnIndex` is a string: a top-level turn is the bare counter ('0', '1', …); a sub-agent's turns are numbered under the parent turn that activated them ('3-1', '3-2', …, and a nested sub-agent contributes '3-2-1', …), and `agentName` names the agent that ran the turn. `systemPrompt` and `toolNames` are what the model saw. A systemPrompt of '<repeated — identical to turn N>' was byte-identical to turn N and de-duplicated; the full prompt is shown whenever it changes (often because a stateful agent advanced), so prompt evolution is visible.\",\n \"kind:'turn'.`model`/`providerName`/`provider` — which model ran that call: the concrete model id, the registry slot it resolved under (a tier name like 'high'/'low', or the default), and the vendor. Recorded per CALL, so an agent whose `provider` selector varies by state — a flow that plans on a high tier and executes on a low one — has every step attributed, including calls that produced no message. `model` is the SERVING model where the provider reports one, so a turn answered by a server-side fallback names the model that answered rather than the one requested; it always matches the `model` on the message that call produced. Absent when the provider exposes no `getStatus` and the transport stamped nothing.\",\n \"kind:'turn'.`usage` — what that ONE call cost, in the same four-bucket + `costUsd` shape as `sessionUsage`. Absent while a call is in flight and on providers that report no usage. This is the SAME money as the message the call produced, not extra money: never add turn usage to message usage, and read a turn plus its message as one charge. Its distinct value is the calls that produced NO message — a blank or refused response is billed and then discarded before the retry, so the turn entry is the only record of that spend, and a turn with `usage` but no message after it is exactly that. `costUsd: 0` alongside a nonzero token count means the provider reported no price, not that the call was free.\",\n \"kind:'turn'.`agentSnapshot` — the active agent's own view of its internal state, captured at that turn. An agent opts into this by exposing a `getDebugSnapshot()` that returns JSON-serializable per-state info; stateful/flow agents wire it automatically, so you can watch a flow advance turn-by-turn (e.g. current step, cursor, collected fields, pending changes). Absent for agents that don't expose one.\",\n \"kind:'event' — a meta/lifecycle event. `type` names it (see below); `detail` carries structured data. `detail.placement` is the emitting UI instance: 'bubble' (collapsed), 'panel' (popped-out), or 'standalone'.\",\n \"Each 'event' also has an `importance`: 'high' (failures/limits — turn.error, tool.failed, subagent.failed, file.read-failed, suggestions.failed, context.threshold-crossed), 'normal' (session flow — connects, turns, retries, handoffs, agent/provider changes, interactions, sub-agent start/complete), or 'low' (skippable UI/bookkeeping noise — panel.toggled, attachment.added, driver.wired/unwired, context.updated, context.condensed). To skim, ignore importance:'low'; to triage a failure, filter to importance:'high' then read the nearby messages and turns. A 'high' turn.error is often preceded by one or more 'normal' turn.retry events for the same reason — read them together to see how many attempts were made before bailing. 'message' and 'turn' entries carry no importance — they are the substance, always read them.\",\n 'Event types: assistant.connected/disconnected (mount + placement + whether the session was created or restored), assistant.popout/popin (window placement), driver.created/wired/unwired (which driver is live and why it stops/starts responding across a popout), state.changed (idle↔loading), turn.start/turn.end (turn boundary; turn.end carries durationMs), turn.retry (a recoverable in-turn retry — detail.reason plus attempt/maxAttempts; for malformed calls also finishMessage; for empty responses also the provider finishReason + thoughtsTokens + parts breakdown), turn.error (a turn failed or hit a guardrail — detail.reason is one of exception/malformed-function-call/empty-response/unknown-tool-limit/max-iterations/response-truncated/refusal/budget-exhausted/provider-refused/context-exhausted/ai-service-error, plus reason-specific diagnostics: attempts (for empty-response also finishReason + thoughtsTokens + a parts breakdown, distinguishing a thinking-only STOP from a truly empty turn), finishMessage, for response-truncated the model + maxTokens + outputTokens + tools, unknownTools (split into staleTools — real earlier this activation but retired by the current state or hidden behind an open exclusive fold — and hallucinatedTools — never advertised) + availableTools, iterations + limit, for budget-exhausted the budgetUsd + spentUsd figures reported by the proxy plus the resolved vendor, for provider-refused the kind (spend|auth) plus the upstream status and error type — the vendor refusing the ACCOUNT rather than us refusing to spend, so the remedy is a top-up or a key rotation rather than a raised cap, and the kind is the only place that distinction survives because the user-facing copy is deliberately cause-free, for context-exhausted the estimated contextTokens against the guard that stopped the turn plus the iterations reached — the driver ending a runaway tool loop at the edge of the context window rather than issuing a request the provider would reject, so the transcript survives intact and can still be compacted, for ai-service-error the code (one of AI_SERVICE_ERROR_CODES, e.g. NO_API_KEY) and the status the AI service answered with — its own text goes to the browser console only, or name + message for exceptions), tool.failed (a tool threw), tool.unresolved (the model called a tool that could not be dispatched — detail.kind is folded/fold-hidden/stale/unknown, plus tool + agent and, for the counted kinds, the consecutive streak; the recurring lead-up to an unknown-tool-limit turn.error), subagent.started/completed/failed (the lifecycle of a `requestSubAgent` delegation — detail.agent names the sub-agent; these bracket the sub-agent turns that appear as kind:turn entries with an N-M `turnIndex`; subagent.failed also carries detail.reason, one of max_iterations/malformed_tool_call/empty_response/unknown_tool_limit/timeout/response_truncated/refusal/budget_exhausted/provider_refused/context_exhausted/ai_service_error; budget_exhausted and provider_refused are terminal for the PARENT turn too, and so is ai_service_error when the refusal is about the service rather than the request and came from the vendor the parent calls — the parent stops rather than calling the model again into the same wall; after context_exhausted the parent goes on, but its own next call is likely to stop on the same guard), agent.handoff (routing; from=null is the initial activation), agent.pinned/unpinned (forced routing), routing.decided (ONE PER ROUTING DECISION — see its own paragraph below), provider.selected (the resolved provider for the upcoming turns — detail.provider is the registry SLOT/tier name, detail.model the concrete model behind it and detail.vendor its vendor; emitted only when the slot CHANGES, so read the per-turn `model` for the model of any given call rather than assuming the nearest event still applies), interaction.requested/resolved (blocking user widgets — explain quiet gaps; note that when a sub-agent opens a widget, detail.agent — and the agentName on the interaction message — is the HOST agent that owns the widget, NOT the sub-agent that asked, because widgets render and resolve on the host driver; detail.ownerPath names the agents that actually asked, outermost first, the last being the one whose tool requested it, and detail.heldBy says who held it when it opened: user, or the id of the interceptor that claimed it, such as autopilot; on interaction.resolved, detail.answeredBy is who answered — the claimant id when it settled through its own hold, user for any other answer (a click counts as the person even on a widget a claimant held) — absent when it closed unanswered (a timeout or a stop), and absent too when it settled by itself other than through the hold of a claimant — a widget registered resolvesItself (one that does its work and settles on its own, asking the person nothing, such as a generation run), or one outcome its controller said settled itself (ctx.resolve with resolvedItself, such as a generation phase that failed outright before its review gate ever asked anything) — which then carries detail.resolvedItself: true instead, as the interaction message does — nobody answered it, and the platform cannot tell it finishing from the person interrupting it (a Skip), so only the result of the widget itself can say which; the same value is stamped on the interaction message as answeredBy and on the result the asking tool handler receives (absent there in the same cases), and when it is not user the tool result that interaction returned carries a decidedOnUsersBehalf record, so the model was told the choice was not made by the person; detail.edits, present only when non-zero, counts the editing actions a claimant ran on the widget before it was settled, whoever settled it, and those edits are stamped on the interaction message as edits, each with by, action, choice and args when it had some, in the order they ran, while a decidedOnUsersBehalf record carries their choice texts as edits, and when the person settled it after such edits the tool result carries an editedOnUsersBehalf record instead — the framing and those choice texts — so the model knows the widget was changed on the user behalf before the user answered, and that the user then confirmed it by finishing it), interaction.held (a claimant moved a pending interaction to the person or back to itself — detail.heldBy is the new holder, detail.claimant the interceptor; detail.late: true is an interceptor that declined it when it opened claiming it afterwards, such as the autopilot resumed while it was open; a widget held by anything but user was not answered by the person), interaction.claim-refused (a claim on a userOnly interaction, which stays with the person — detail.claimant + reason), autopilot.* (the autopilot, a decorator that answers interactions on behalf of the user — autopilot.claimed / autopilot.declined say whether it took each interaction and, for a decline, detail.reason: paused, other-flow, no-autopilot, unavailable, userOnly, policy or no-controller; one declined as paused that is still open when the person resumes the autopilot is looked at again, and the autopilot.claimed or autopilot.declined recorded for it then carries detail.onResume: true (a decline then can also be claimed-elsewhere, another interceptor having claimed it first); a restored mode looks at nothing; autopilot.decision-sent is what it was sent (detail.chars; detail.nothingEnabled: true when every action on the widget was unavailable — a gate whose controller said it was asking, such as a failed build the autopilot may not cancel — so it could only hand it back, which it may then do even after the person asked it to decide it itself; a widget whose controller says it is working (ctx.setWorking) is never sent a decision until it says it is asking, even when an action is enabled or the person resumes the autopilot); autopilot.acted is what it did (detail.action, detail.note, detail.finished); autopilot.handed-back is a decision it gave to the person (detail.reason and detail.trigger: model, no-decision or error); autopilot.paused / autopilot.resumed are mode changes (detail.scope, detail.trigger, detail.decideYourself when the person resumed during a hand-back; detail.trigger is restored when the mode came back with the session after a reload, applied once its flow re-activated, which starts nothing by itself); autopilot.error is the wrapper itself failing; autopilot.refinement counts a refining action against its step — a written answer (reply) or a widget action declared refines, such as a regenerate with instructions, counted together (detail.action, detail.stepKey, detail.count, detail.limitReached, after which every refining action is withdrawn for that step: not listed, and refused; the decision and every relisting of its actions say how many are left at the step, as a line Refinements left at this step: N, wherever the widget has a refining action); autopilot.handback-presented is the turn-level hand-back, shown when a working turn ended needing the person with no widget to hand over (detail.why: max-iterations, context-exhausted, failure or question; detail.options; detail.choice once answered); autopilot.catch-up is the autopilot being given the whole visible transcript at once (detail.why: first, for its first decision in a flow or after a reload; size, when its own history passed its budget and was rebuilt short — detail.ownChars; or compacted, when a compaction removed the last message it had seen, so it reads the summary and everything since, short; in each, what it had sent on the user behalf is included and labelled as its own, since its own history does not hold it); autopilot.cost-dropped is autopilot spend that no message carries, so it is NOT in the session total (detail.costUsd and detail.why: handed-back, aborted or stale for a written question it answered that no reply was sent for — stale when a pause, a resume, a new turn or the end of its flow came before the answer landed, which then went nowhere — or no-recorder when the driver had no way to book a decision to its interaction); a hand-back trigger can also be budget (the decision passed its spend cap), watchdog (its work went quiet: no ready surface and no heartbeat, or its own decision stalled with no model call landing, which stops that decision) or detached (the autopilot was removed while it held the interaction, which went to the person with no reason shown). To debug one autopilot decision, follow its interactionId: interaction.requested (heldBy), autopilot.claimed, autopilot.decision-sent, autopilot.acted or autopilot.handed-back, interaction.invoked, interaction.resolved (answeredBy), then the next turn of the working agent), interaction.invoked (a claimant ran one of the actions the widget itself exposes, through its hold, the same code the button runs — detail.claimant, detail.action (an option id, select or reply) and detail.finished, whether that settled the interaction, and when it did not, the run is recorded as an edit; the choice and narration it recorded reach the result of the tool that asked as decidedOnUsersBehalf), interaction.step (a long action run as named steps through runSteps, which survive a reload — detail.step and detail.outcome: started, done, skipped when the step was already done before a reload, or resumed when it started before a reload and runs again with what it saved part-way, such as a job id it re-attaches to), interaction.checkpoint (the checkpoints a conversation keeps for its long actions: the one in flight, and each one a reload cut, held apart until a request of its own widget type takes it over, so a resumed flow that opens other long widgets first, which save their own, loses nothing — detail.action: resumed when a reload cut the work and a request of the same widget type that the registration sameWork agrees is the same work took it over, refused when sameWork said a new request is different work (detail.saved is the identity it kept; detail.kept: true, since it stays for a later request of that type, and is offered to every one until one agrees) or when runSteps found the handed-over checkpoint malformed and started fresh (detail.reason, detail.saved), or cleared when its flow ended, once per checkpoint, with detail.cut: true for one a reload cut that nothing took over), context.updated/threshold-crossed (token + cost), context.condensed (a stale tool payload was collapsed out of the model-bound history by a `condenseWhen` declaration on the tool — detail.tool + toolCallId, target args|response, trigger (superseded:<key> or age:<n>), stubLen, and an estimated tokensSaved; stored history and this log keep the FULL payload, so the model-visible slice at any point is the full history minus the condensations recorded up to then), panel.toggled, attachment.added, file.read-failed, suggestions.failed.',\n 'Sub-agent meta events: a sub-agent\\'s own turn.retry/turn.error/tool.failed/tool.unresolved events are merged into this same timeline, tagged with `detail.subAgent` — a `\"<parent> › <sub-agent>\"` breadcrumb that composes when nested (e.g. `\"UI Builder › Planner › Grounding\"`) — and interleaved by their original timestamps within the subagent.started→completed/failed bracket. These are the per-attempt/per-failure signals that do NOT appear among the sub-agent\\'s (hoisted) messages: a malformed/empty attempt that gets retried produces no message, and the stale-vs-hallucinated split and streak counts live only on the event. A sub-agent\\'s high-volume, message-derivable events (turn.start/turn.end, provider.selected, context.updated) are intentionally NOT merged — read its hoisted messages for model/tokens/cost and turn-by-turn activity, and the bracketing subagent.* events for the run\\'s span.',\n \"`meta` holds context captured at export time: agentSummary (full agent configs), context (active model, contextTokens/contextLimit/contextUsagePercent for the last call, and the session totals — sessionCostUsd, sessionTokensConsumed, and the four-bucket sessionUsage lifted to the top of this log), activeDebugSnapshot (the active agent's `getDebugSnapshot()` taken fresh at export — reflects state NOW, which may have advanced beyond the last turn's agentSnapshot), debug (optional host-supplied debug state), host, and the export timestamp.\",\n 'Note the two different scopes in `meta.context`: `contextTokens` is the prompt size of the LAST call (against `contextLimit`, the model context window), while `sessionUsage`/`sessionTokensConsumed` are cumulative BILLED throughput. Every turn resends the conversation, so the cumulative figure counts each turn’s prompt again in the next turn’s and is expected to dwarf the context size — that is not double-counting.',\n \"kind:'event' type 'routing.decided' — how ONE user turn was routed, emitted by the orchestrating driver before the agent runs. Only a user turn is routed: a hand-off names its target, so the agents a hand-off runs show up as agent.handoff events, not as more routing.decided. `decision` is why that agent was chosen: 'classified' (the classifier ran and picked one), 'no-match' (it ran and answered -1 — nothing listed covers the request), 'pinned' (a user pin, an agent named for that one message by the send's `agent` option, or an active stateful flow owned the turn, so no call was made), 'single-candidate'/'no-specialists' (configuration left nothing to decide), 'provider-unavailable' (the registry default exposes no chat()), 'classifier-failed' (every attempt threw — `error` carries the last one). `to` names the agent and `fallback` says whether that agent is the fallback. `candidates` is what was ON THE BALLOT — every classifier-eligible specialist — in ballot order, so `index` — the classifier's own answer — indexes it directly. `candidates` is absent on the three decisions that put nothing to a vote — 'pinned', 'single-candidate', 'no-specialists'. It IS present on 'provider-unavailable', which is not an exception worth removing: the ballot was built there, it simply never got sent. `attempts` covers the retry ladder. `durationMs` is on EVERY routing.decided, and is the field to read when a decision looks wrong: the decisions that can reach the fallback ('no-match', 'no-specialists', 'provider-unavailable', 'classifier-failed') are told apart by the clock as much as by their name, because a fallback routing that resolved in tens of milliseconds made no network call at all whatever its `decision` says.\",\n \"kind:'event' type 'routing.decided'.`usage` — what that classifier call cost, in the same four-bucket + costUsd shape as `sessionUsage`, plus `model`. Absent on the decisions that make no call (see 'pinned' and the configuration ones). THIS SPEND IS NOT IN `sessionUsage`: a classifier call never enters the transcript and `sessionUsage` is derived from the transcript, so classifier cost is missing from the session total by construction, not by accident. Sum these events to close that gap — it is the one component of a session's real spend that the totals cannot see.\",\n 'To debug a failure: find the last turn.error or tool.failed, then read upward for the user message, the turn(s), and the agent/provider/state events that led into it. For a turn that went to the wrong agent, read its routing.decided first — `decision` says whether anything was actually asked.',\n]",
|
|
11920
|
+
"default": "[\n 'This is an exported debug log for the Genesis AI assistant. Read it top-to-bottom.',\n \"`sessionUsage` is what this session spent: `costUsd` (USD, provider-reported per request and summed, cache discounts already applied) plus the four TOKEN BUCKETS — `uncachedInputTokens`, `cacheReadTokens`, `cacheWriteTokens`, `outputTokens`. Those four are disjoint and safe to add up for a total-tokens figure; the per-message fields further down are NOT (see kind:'message'). Each bucket bills at a different rate — cache reads a fraction of uncached input, cache writes a premium, output highest — so a big token count against a small cost means the prompt was mostly cache hits, not a missing charge. It covers sub-agent turns and spend a compaction banked, so for the CONVERSATION it is the authoritative total: prefer it over re-summing the timeline, which can be short by whatever the ring buffers evicted. The same figures appear under `meta.context`. It is as current as the snapshot it came from: the assistant's own download stamps a fresh one, but a log stitched by another tool can carry an older one — compare `meta.timestamp` with the last timeline entry, and if it is well behind, read these totals as historical and fall back to summing the timeline. One scope caveat: it is derived from the transcript, so it excludes billed calls that produced no message (a blank or refused attempt that was retried — see kind:'turn'.`usage`). Summing the turns can therefore come out HIGHER than this, and the difference is exactly that discarded spend, not a double-count.\",\n \"What 'session' means for those figures: the CURRENT conversation under this session key (a host-supplied per-project id, or the element id + header title when the host supplies none) — which is not necessarily everything in `timeline`. It is re-derived from the live transcript, so it spans page loads only when the chat is being remembered, and a Clear resets it to zero. `timeline` is append-only regardless: it keeps every page load and the pre-Clear conversation, with the session.cleared event as the boundary. So on a long-lived log, read these totals as the latest conversation's and the earlier sections as history — not as a total of the whole file.\",\n '`timeline` is the entire session as one array, already sorted chronologically by `timestamp` (ISO 8601). Every entry has a `kind`.',\n 'Timestamps are millisecond-resolution; entries that share the same millisecond are ordered by a fixed kind rank (event, then turn, then message), which is a heuristic and may not reflect exact causal order within that millisecond — e.g. a user message and the turn it triggered, or a final assistant message and its turn.end event, can appear in either order depending on whether they landed in the same millisecond. Read the logical structure of a turn rather than over-interpreting the micro-ordering of co-timestamped entries of different kinds.',\n \"kind:'message' — the conversation. `role` is user/assistant/tool/system-event/synthetic-user; `agentName` says which agent produced it; `toolCalls`/`toolResult`/`interaction` carry tool and widget activity; `inputTokens`/`outputTokens`/`cost` are per-message LLM usage, where `inputTokens` is the WHOLE prompt for that request and `cacheReadTokens`/`cacheWriteTokens` BREAK IT DOWN rather than add to it — uncached input is `inputTokens` minus those two, and adding the cache fields to `inputTokens` counts the prompt twice. The cache fields are absent on providers that report no cache split (Gemini reports reads only, since implicit caching bills no write) and on messages persisted before they existed, so read them as 0 when missing. Each bucket bills at a different rate — cache reads a fraction of uncached input, cache writes a premium, output highest — so a large token count at a small cost means the prompt was mostly cache hits. `externalCostUsd` is any non-LLM cost a widget reported for its own external service calls (folded into the session cost total alongside `cost`). On model-produced assistant messages, `model` is the concrete model id that generated it (e.g. 'gemini-2.5-flash-lite') and `providerName` is the registry slot it resolved under (e.g. a tier name like 'high'/'low', or the default); together they attribute the message — and any tool calls it carries — to an exact model even across a mid-session vendor/tier switch, where one slot name can map to different models before and after the switch. Both are undefined on any entry that is NOT an LLM response: non-assistant roles (user/tool/system-event) and 'synthetic-user' echoes; assistant interaction/widget entries (empty content carrying an `interaction` — a rendered widget, not a model turn); driver-authored assistant fallbacks (the timeout, repeated-malformed-call, and empty-response apology messages); and messages restored from a session persisted before these fields existed. One partial case: on a genuine model turn whose provider exposes no `getStatus` (or reports no model), `providerName` is still set but `model` alone is undefined. A 'synthetic-user' message is a display-only echo of an interaction outcome (e.g. the answer a widget reported): it renders on the user's side of the chat and `agentName` is the agent that created it, but it is never sent to the LLM — so it has no matching 'turn' and the model learns the outcome only from the corresponding tool result. An echo of an answer an interceptor (such as an autopilot) gave is NOT synthetic-user: see the delegated-messages paragraph.\",\n 'The autopilot (GENC-1660) runs on a driver of its own, and everything it did is harvested into this log: entries with delegate: autopilot and an agentName ending in › Autopilot are its turns (the decision message it was sent is the user message of its turn, so what it was shown is there verbatim; its systemPrompt is its grounding, such as the brief), its tool calls (widget_read, widget_act, hand_back, any read-only tools of its own, and its widget tools — reads with parameters that a widget type declares, routed to the interaction of that type being decided and refused with a reason when none is, offered on every decision so its tool list never changes; while one is open its tail starts with a line naming them) and their results (a read, view or widget tool, is capped at about 20,000 characters, cut with a note asking for less, and leaves its history at the end of the decision as a one-line note), and its own events. Its cost is already in the session total: it is booked as externalCostUsd on the interaction each decision answered, or, for a written question it answered, on the user message it sent on the user behalf (delegate: autopilot), so do not add its turns to that total. Spend that reached no message is recorded as autopilot.cost-dropped instead.',\n \"Delegated messages (GENC-1660): a message with a `delegate` field was written or sent ON THE USER'S BEHALF by a driver decorator, and `delegate` names it (e.g. autopilot). The platform stamps it; nothing else can. It renders as the assistant whatever its role. A delegated `user` message was NOT typed by the user: it is an answer given on their behalf, and the model read it with `delegateFraming` in brackets in front of the content (the stored `content` is the bare text). A delegated `assistant` message is display-only (`excludeFromProvider`): the decorator's narration note, or, when its answer carried no note, the widget's own echo of the answer (its `userMessage`), shown as the assistant and never as the person. A widget answer a decorator gave with a note is not echoed at all: the note already says what was chosen. To tell what the person decided from what was decided for them, read `interaction.answeredBy` and these fields, never the role alone.\",\n \"Sub-agent messages appear inline. When a tool delegates to a sub-agent (via `requestSubAgent`), the sub-agent's whole conversation — its own assistant/tool messages, each with their own `content`/`thinking`/`toolCalls`/`toolResult` and per-message `model`/`providerName`/`inputTokens`/`outputTokens`/`cacheReadTokens`/`cacheWriteTokens`/`cost` — is hoisted into the timeline as ordinary kind:'message' entries, interleaved by timestamp right after the tool call that spawned them (so you read the delegation top-to-bottom). A hoisted entry is marked: `subAgentDepth` is its delegation depth (1 for a sub-agent, 2 for a sub-agent's sub-agent, …), `subAgentOf` is the id of the parent tool call that spawned it (correlates it back even when two sub-agents run in one parent turn), `subAgentName` is the sub-agent's own name, and `agentName` is rewritten to a `\\\"<parent> › <sub-agent>\\\"` breadcrumb (composing when nested, e.g. `\\\"UI Builder › Planner › Grounding\\\"`). The sub-agent's per-LLM-call snapshots also surface as kind:'turn' entries with an N-M `turnIndex`, and subagent.started/completed (or subagent.failed) events bracket the run. Per-message `cost` on hoisted entries is already part of the session total (it is summed from the un-flattened history), so summing the top-level timeline does NOT double-count.\",\n \"kind:'turn' — one LLM call. `turnIndex` is a string: a top-level turn is the bare counter ('0', '1', …); a sub-agent's turns are numbered under the parent turn that activated them ('3-1', '3-2', …, and a nested sub-agent contributes '3-2-1', …), and `agentName` names the agent that ran the turn. `systemPrompt` and `toolNames` are what the model saw. A systemPrompt of '<repeated — identical to turn N>' was byte-identical to turn N and de-duplicated; the full prompt is shown whenever it changes (often because a stateful agent advanced), so prompt evolution is visible.\",\n \"kind:'turn'.`model`/`providerName`/`provider` — which model ran that call: the concrete model id, the registry slot it resolved under (a tier name like 'high'/'low', or the default), and the vendor. Recorded per CALL, so an agent whose `provider` selector varies by state — a flow that plans on a high tier and executes on a low one — has every step attributed, including calls that produced no message. `model` is the SERVING model where the provider reports one, so a turn answered by a server-side fallback names the model that answered rather than the one requested; it always matches the `model` on the message that call produced. Absent when the provider exposes no `getStatus` and the transport stamped nothing.\",\n \"kind:'turn'.`usage` — what that ONE call cost, in the same four-bucket + `costUsd` shape as `sessionUsage`. Absent while a call is in flight and on providers that report no usage. This is the SAME money as the message the call produced, not extra money: never add turn usage to message usage, and read a turn plus its message as one charge. Its distinct value is the calls that produced NO message — a blank or refused response is billed and then discarded before the retry, so the turn entry is the only record of that spend, and a turn with `usage` but no message after it is exactly that. `costUsd: 0` alongside a nonzero token count means the provider reported no price, not that the call was free.\",\n \"kind:'turn'.`agentSnapshot` — the active agent's own view of its internal state, captured at that turn. An agent opts into this by exposing a `getDebugSnapshot()` that returns JSON-serializable per-state info; stateful/flow agents wire it automatically, so you can watch a flow advance turn-by-turn (e.g. current step, cursor, collected fields, pending changes). Absent for agents that don't expose one.\",\n \"kind:'event' — a meta/lifecycle event. `type` names it (see below); `detail` carries structured data. `detail.placement` is the emitting UI instance: 'bubble' (collapsed), 'panel' (popped-out), or 'standalone'.\",\n \"Each 'event' also has an `importance`: 'high' (failures/limits — turn.error, tool.failed, subagent.failed, file.read-failed, suggestions.failed, context.threshold-crossed), 'normal' (session flow — connects, turns, retries, handoffs, agent/provider changes, interactions, sub-agent start/complete), or 'low' (skippable UI/bookkeeping noise — panel.toggled, attachment.added, driver.wired/unwired, context.updated, context.condensed). To skim, ignore importance:'low'; to triage a failure, filter to importance:'high' then read the nearby messages and turns. A 'high' turn.error is often preceded by one or more 'normal' turn.retry events for the same reason — read them together to see how many attempts were made before bailing. 'message' and 'turn' entries carry no importance — they are the substance, always read them.\",\n 'Event types: assistant.connected/disconnected (mount + placement + whether the session was created or restored), assistant.popout/popin (window placement), driver.created/wired/unwired (which driver is live and why it stops/starts responding across a popout), state.changed (idle↔loading), turn.start/turn.end (turn boundary; turn.end carries durationMs), turn.retry (a recoverable in-turn retry — detail.reason plus attempt/maxAttempts; for malformed calls also finishMessage; for empty responses also the provider finishReason + thoughtsTokens + parts breakdown), turn.error (a turn failed or hit a guardrail — detail.reason is one of exception/malformed-function-call/empty-response/unknown-tool-limit/max-iterations/response-truncated/refusal/budget-exhausted/provider-refused/context-exhausted/ai-service-error, plus reason-specific diagnostics: attempts (for empty-response also finishReason + thoughtsTokens + a parts breakdown, distinguishing a thinking-only STOP from a truly empty turn), finishMessage, for response-truncated the model + maxTokens + outputTokens + tools, unknownTools (split into staleTools — real earlier this activation but retired by the current state or hidden behind an open exclusive fold — and hallucinatedTools — never advertised) + availableTools, iterations + limit, for budget-exhausted the budgetUsd + spentUsd figures reported by the proxy plus the resolved vendor, for provider-refused the kind (spend|auth) plus the upstream status and error type — the vendor refusing the ACCOUNT rather than us refusing to spend, so the remedy is a top-up or a key rotation rather than a raised cap, and the kind is the only place that distinction survives because the user-facing copy is deliberately cause-free, for context-exhausted the estimated contextTokens against the guard that stopped the turn plus the iterations reached — the driver ending a runaway tool loop at the edge of the context window rather than issuing a request the provider would reject, so the transcript survives intact and can still be compacted, for ai-service-error the code (one of AI_SERVICE_ERROR_CODES, e.g. NO_API_KEY) and the status the AI service answered with — its own text goes to the browser console only, or name + message for exceptions), tool.failed (a tool threw), tool.unresolved (the model called a tool that could not be dispatched — detail.kind is folded/fold-hidden/stale/unknown, plus tool + agent and, for the counted kinds, the consecutive streak; the recurring lead-up to an unknown-tool-limit turn.error), subagent.started/completed/failed (the lifecycle of a `requestSubAgent` delegation — detail.agent names the sub-agent; these bracket the sub-agent turns that appear as kind:turn entries with an N-M `turnIndex`; subagent.failed also carries detail.reason, one of max_iterations/malformed_tool_call/empty_response/unknown_tool_limit/timeout/response_truncated/refusal/budget_exhausted/provider_refused/context_exhausted/ai_service_error; budget_exhausted and provider_refused are terminal for the PARENT turn too, and so is ai_service_error when the refusal is about the service rather than the request and came from the vendor the parent calls — the parent stops rather than calling the model again into the same wall; after context_exhausted the parent goes on, but its own next call is likely to stop on the same guard), agent.handoff (routing; from=null is the initial activation), agent.pinned/unpinned (forced routing), routing.decided (ONE PER ROUTING DECISION — see its own paragraph below), provider.selected (the resolved provider for the upcoming turns — detail.provider is the registry SLOT/tier name, detail.model the concrete model behind it and detail.vendor its vendor; emitted only when the slot CHANGES, so read the per-turn `model` for the model of any given call rather than assuming the nearest event still applies), interaction.requested/resolved (blocking user widgets — explain quiet gaps; note that when a sub-agent opens a widget, detail.agent — and the agentName on the interaction message — is the HOST agent that owns the widget, NOT the sub-agent that asked, because widgets render and resolve on the host driver; detail.ownerPath names the agents that actually asked, outermost first, the last being the one whose tool requested it, and detail.heldBy says who held it when it opened: user, or the id of the interceptor that claimed it, such as autopilot; on interaction.resolved, detail.answeredBy is who answered — the claimant id when it settled through its own hold, user for any other answer (a click counts as the person even on a widget a claimant held) — absent when it closed unanswered (a timeout or a stop), and absent too when it settled by itself other than through the hold of a claimant — a widget registered resolvesItself (one that does its work and settles on its own, asking the person nothing, such as a generation run), or one outcome its controller said settled itself (ctx.resolve with resolvedItself, such as a generation phase that failed outright before its review gate ever asked anything) — which then carries detail.resolvedItself: true instead, as the interaction message does — nobody answered it, and the platform cannot tell it finishing from the person interrupting it (a Skip), so only the result of the widget itself can say which; the same value is stamped on the interaction message as answeredBy and on the result the asking tool handler receives (absent there in the same cases), and when it is not user the tool result that interaction returned carries a decidedOnUsersBehalf record, so the model was told the choice was not made by the person; detail.edits, present only when non-zero, counts the editing actions a claimant ran on the widget before it was settled, whoever settled it, and those edits are stamped on the interaction message as edits, each with by, action, choice and args when it had some, in the order they ran, while a decidedOnUsersBehalf record carries their choice texts as edits, and when the person settled it after such edits the tool result carries an editedOnUsersBehalf record instead — the framing and those choice texts — so the model knows the widget was changed on the user behalf before the user answered, and that the user then confirmed it by finishing it), interaction.held (a claimant moved a pending interaction to the person or back to itself — detail.heldBy is the new holder, detail.claimant the interceptor; detail.late: true is an interceptor that declined it when it opened claiming it afterwards, such as the autopilot resumed while it was open; a widget held by anything but user was not answered by the person), interaction.claim-refused (a claim on a userOnly interaction, which stays with the person — detail.claimant + reason), autopilot.* (the autopilot, a decorator that answers interactions on behalf of the user — autopilot.claimed / autopilot.declined say whether it took each interaction and, for a decline, detail.reason: paused, other-flow, no-autopilot, unavailable, userOnly, policy or no-controller; one declined as paused that is still open when the person resumes the autopilot is looked at again, and the autopilot.claimed or autopilot.declined recorded for it then carries detail.onResume: true (a decline then can also be claimed-elsewhere, another interceptor having claimed it first); a restored mode looks at nothing; autopilot.decision-sent is what it was sent (detail.chars; detail.nothingEnabled: true when every action on the widget was unavailable — a gate whose controller said it was asking, such as a failed build the autopilot may not cancel — so it could only hand it back, which it may then do even after the person asked it to decide it itself; a widget whose controller says it is working (ctx.setWorking) is never sent a decision until it says it is asking, even when an action is enabled or the person resumes the autopilot); autopilot.acted is what it did (detail.action, detail.note, detail.finished); autopilot.handed-back is a decision it gave to the person (detail.reason and detail.trigger: model, no-decision or error); autopilot.paused / autopilot.resumed are mode changes (detail.scope, detail.trigger, detail.decideYourself when the person resumed during a hand-back; detail.trigger is restored when the mode came back with the session after a reload, applied once its flow re-activated, which starts nothing by itself); autopilot.carried is the mode, running or paused, going with the task to the agent that took it over, rather than ending with the flow as on any other change of flow owner: to the target of a hand-off, or back to its caller on the hand-back (detail.from, detail.to, detail.mode); a pause the person chose goes with it, and Stop and Clear still end it; a mode restored for the target of a hand-off applies to its caller when the reload hands back; autopilot.error is the wrapper itself failing; autopilot.refinement counts a refining action against its step — a written answer (reply) or a widget action declared refines, such as a regenerate with instructions, counted together (detail.action, detail.stepKey, detail.count, detail.limitReached, after which every refining action is withdrawn for that step: not listed, and refused; the decision and every relisting of its actions say how many are left at the step, as a line Refinements left at this step: N, wherever the widget has a refining action); autopilot.handback-presented is the turn-level hand-back, shown when a working turn ended needing the person with no widget to hand over (detail.why: max-iterations, context-exhausted, failure or question; detail.options; detail.choice once answered); autopilot.catch-up is the autopilot being given the whole visible transcript at once (detail.why: first, for its first decision in a flow or after a reload; size, when its own history passed its budget and was rebuilt short — detail.ownChars; or compacted, when a compaction removed the last message it had seen, so it reads the summary and everything since, short; in each, what it had sent on the user behalf is included and labelled as its own, since its own history does not hold it); autopilot.cost-dropped is autopilot spend that no message carries, so it is NOT in the session total (detail.costUsd and detail.why: handed-back, aborted or stale for a written question it answered that no reply was sent for — stale when a pause, a resume, a new turn or the end of its flow came before the answer landed, which then went nowhere — or no-recorder when the driver had no way to book a decision to its interaction); a hand-back trigger can also be budget (the decision passed its spend cap), watchdog (its work went quiet: no ready surface and no heartbeat, or its own decision stalled with no model call landing, which stops that decision) or detached (the autopilot was removed while it held the interaction, which went to the person with no reason shown). To debug one autopilot decision, follow its interactionId: interaction.requested (heldBy), autopilot.claimed, autopilot.decision-sent, autopilot.acted or autopilot.handed-back, interaction.invoked, interaction.resolved (answeredBy), then the next turn of the working agent), interaction.invoked (a claimant ran one of the actions the widget itself exposes, through its hold, the same code the button runs — detail.claimant, detail.action (an option id, select or reply) and detail.finished, whether that settled the interaction, and when it did not, the run is recorded as an edit; the choice and narration it recorded reach the result of the tool that asked as decidedOnUsersBehalf), interaction.step (a long action run as named steps through runSteps, which survive a reload — detail.step and detail.outcome: started, done, skipped when the step was already done before a reload, or resumed when it started before a reload and runs again with what it saved part-way, such as a job id it re-attaches to), interaction.checkpoint (the checkpoints a conversation keeps for its long actions: the one in flight, and each one a reload cut, held apart until a request of its own widget type takes it over, so a resumed flow that opens other long widgets first, which save their own, loses nothing — detail.action: resumed when a reload cut the work and a request of the same widget type that the registration sameWork agrees is the same work took it over, refused when sameWork said a new request is different work (detail.saved is the identity it kept; detail.kept: true, since it stays for a later request of that type, and is offered to every one until one agrees) or when runSteps found the handed-over checkpoint malformed and started fresh (detail.reason, detail.saved), or cleared when its flow ended, once per checkpoint, with detail.cut: true for one a reload cut that nothing took over), context.updated/threshold-crossed (token + cost), context.condensed (a stale tool payload was collapsed out of the model-bound history by a `condenseWhen` declaration on the tool — detail.tool + toolCallId, target args|response, trigger (superseded:<key> or age:<n>), stubLen, and an estimated tokensSaved; stored history and this log keep the FULL payload, so the model-visible slice at any point is the full history minus the condensations recorded up to then), panel.toggled, attachment.added, file.read-failed, suggestions.failed.',\n 'Sub-agent meta events: a sub-agent\\'s own turn.retry/turn.error/tool.failed/tool.unresolved events are merged into this same timeline, tagged with `detail.subAgent` — a `\"<parent> › <sub-agent>\"` breadcrumb that composes when nested (e.g. `\"UI Builder › Planner › Grounding\"`) — and interleaved by their original timestamps within the subagent.started→completed/failed bracket. These are the per-attempt/per-failure signals that do NOT appear among the sub-agent\\'s (hoisted) messages: a malformed/empty attempt that gets retried produces no message, and the stale-vs-hallucinated split and streak counts live only on the event. A sub-agent\\'s high-volume, message-derivable events (turn.start/turn.end, provider.selected, context.updated) are intentionally NOT merged — read its hoisted messages for model/tokens/cost and turn-by-turn activity, and the bracketing subagent.* events for the run\\'s span.',\n \"`meta` holds context captured at export time: agentSummary (full agent configs), context (active model, contextTokens/contextLimit/contextUsagePercent for the last call, and the session totals — sessionCostUsd, sessionTokensConsumed, and the four-bucket sessionUsage lifted to the top of this log), activeDebugSnapshot (the active agent's `getDebugSnapshot()` taken fresh at export — reflects state NOW, which may have advanced beyond the last turn's agentSnapshot), debug (optional host-supplied debug state), host, and the export timestamp.\",\n 'Note the two different scopes in `meta.context`: `contextTokens` is the prompt size of the LAST call (against `contextLimit`, the model context window), while `sessionUsage`/`sessionTokensConsumed` are cumulative BILLED throughput. Every turn resends the conversation, so the cumulative figure counts each turn’s prompt again in the next turn’s and is expected to dwarf the context size — that is not double-counting.',\n \"kind:'event' type 'routing.decided' — how ONE user turn was routed, emitted by the orchestrating driver before the agent runs. Only a user turn is routed: a hand-off names its target, so the agents a hand-off runs show up as agent.handoff events, not as more routing.decided. `decision` is why that agent was chosen: 'classified' (the classifier ran and picked one), 'no-match' (it ran and answered -1 — nothing listed covers the request), 'pinned' (a user pin, an agent named for that one message by the send's `agent` option, or an active stateful flow owned the turn, so no call was made), 'single-candidate'/'no-specialists' (configuration left nothing to decide), 'provider-unavailable' (the registry default exposes no chat()), 'classifier-failed' (every attempt threw — `error` carries the last one). `to` names the agent and `fallback` says whether that agent is the fallback. `candidates` is what was ON THE BALLOT — every classifier-eligible specialist — in ballot order, so `index` — the classifier's own answer — indexes it directly. `candidates` is absent on the three decisions that put nothing to a vote — 'pinned', 'single-candidate', 'no-specialists'. It IS present on 'provider-unavailable', which is not an exception worth removing: the ballot was built there, it simply never got sent. `attempts` covers the retry ladder. `durationMs` is on EVERY routing.decided, and is the field to read when a decision looks wrong: the decisions that can reach the fallback ('no-match', 'no-specialists', 'provider-unavailable', 'classifier-failed') are told apart by the clock as much as by their name, because a fallback routing that resolved in tens of milliseconds made no network call at all whatever its `decision` says.\",\n \"kind:'event' type 'routing.decided'.`usage` — what that classifier call cost, in the same four-bucket + costUsd shape as `sessionUsage`, plus `model`. Absent on the decisions that make no call (see 'pinned' and the configuration ones). THIS SPEND IS NOT IN `sessionUsage`: a classifier call never enters the transcript and `sessionUsage` is derived from the transcript, so classifier cost is missing from the session total by construction, not by accident. Sum these events to close that gap — it is the one component of a session's real spend that the totals cannot see.\",\n 'To debug a failure: find the last turn.error or tool.failed, then read upward for the user message, the turn(s), and the agent/provider/state events that led into it. For a turn that went to the wrong agent, read its routing.decided first — `decision` says whether anything was actually asked.',\n]",
|
|
11804
11921
|
"description": "Human/agent-facing guide emitted as the first key of the exported debug log,\nso whoever opens the JSON (often an AI agent) knows how to read it without\nreverse-engineering the shape. Kept here next to the event catalogue it\ndescribes — but proximity alone demonstrably did NOT keep the two in sync\n(`refusal` was missing from both reason lists for a whole release), so\n`debug-event-log.test.ts` now asserts that every `TurnFailureReason` and every\n`SubAgentFailureReason` is named here, and fails the build when one is added\nwithout a matching sentence. Enumerations below read as exhaustive and WILL be\ntrusted by an agent reading the JSON — keep them so."
|
|
11805
11922
|
}
|
|
11806
11923
|
],
|