@genesislcap/ai-assistant 14.501.0 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +1379 -1379
- package/package.json +17 -17
|
@@ -4068,993 +4068,807 @@
|
|
|
4068
4068
|
},
|
|
4069
4069
|
{
|
|
4070
4070
|
"kind": "javascript-module",
|
|
4071
|
-
"path": "src/
|
|
4071
|
+
"path": "src/state/ai-assistant-slice.ts",
|
|
4072
4072
|
"declarations": [
|
|
4073
4073
|
{
|
|
4074
|
-
"kind": "
|
|
4075
|
-
"name": "
|
|
4076
|
-
"
|
|
4077
|
-
"
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
"description": "Shared brand colours used across the AI animation effects\n(halo overlay border/glow and loading dot indicators).\nDefined once here so both stay in sync."
|
|
4081
|
-
},
|
|
4082
|
-
{
|
|
4083
|
-
"kind": "variable",
|
|
4084
|
-
"name": "AI_COLOUR_PINK",
|
|
4085
|
-
"type": {
|
|
4086
|
-
"text": "string"
|
|
4074
|
+
"kind": "function",
|
|
4075
|
+
"name": "createDefaultSessionState",
|
|
4076
|
+
"return": {
|
|
4077
|
+
"type": {
|
|
4078
|
+
"text": "AiAssistantSessionState"
|
|
4079
|
+
}
|
|
4087
4080
|
},
|
|
4088
|
-
"
|
|
4081
|
+
"description": "Build a fresh default session state. A factory (not just a shared const) so\neach call returns independent collections — `resetSession` can hand back a\nclean slate without aliasing the initial state's arrays."
|
|
4089
4082
|
},
|
|
4090
4083
|
{
|
|
4091
4084
|
"kind": "variable",
|
|
4092
|
-
"name": "
|
|
4085
|
+
"name": "defaultSessionState",
|
|
4093
4086
|
"type": {
|
|
4094
|
-
"text": "
|
|
4095
|
-
}
|
|
4096
|
-
"default": "'#00dbf9'"
|
|
4087
|
+
"text": "AiAssistantSessionState"
|
|
4088
|
+
}
|
|
4097
4089
|
},
|
|
4098
4090
|
{
|
|
4099
4091
|
"kind": "variable",
|
|
4100
|
-
"name": "
|
|
4101
|
-
"type": {
|
|
4102
|
-
"text": "string"
|
|
4103
|
-
},
|
|
4104
|
-
"default": "'#da00f7'"
|
|
4092
|
+
"name": "aiAssistantSlice"
|
|
4105
4093
|
}
|
|
4106
4094
|
],
|
|
4107
4095
|
"exports": [
|
|
4108
4096
|
{
|
|
4109
4097
|
"kind": "js",
|
|
4110
|
-
"name": "
|
|
4111
|
-
"declaration": {
|
|
4112
|
-
"name": "AI_COLOUR_AMBER",
|
|
4113
|
-
"module": "src/styles/ai-colours.ts"
|
|
4114
|
-
}
|
|
4115
|
-
},
|
|
4116
|
-
{
|
|
4117
|
-
"kind": "js",
|
|
4118
|
-
"name": "AI_COLOUR_PINK",
|
|
4098
|
+
"name": "createDefaultSessionState",
|
|
4119
4099
|
"declaration": {
|
|
4120
|
-
"name": "
|
|
4121
|
-
"module": "src/
|
|
4100
|
+
"name": "createDefaultSessionState",
|
|
4101
|
+
"module": "src/state/ai-assistant-slice.ts"
|
|
4122
4102
|
}
|
|
4123
4103
|
},
|
|
4124
4104
|
{
|
|
4125
4105
|
"kind": "js",
|
|
4126
|
-
"name": "
|
|
4106
|
+
"name": "defaultSessionState",
|
|
4127
4107
|
"declaration": {
|
|
4128
|
-
"name": "
|
|
4129
|
-
"module": "src/
|
|
4108
|
+
"name": "defaultSessionState",
|
|
4109
|
+
"module": "src/state/ai-assistant-slice.ts"
|
|
4130
4110
|
}
|
|
4131
4111
|
},
|
|
4132
4112
|
{
|
|
4133
4113
|
"kind": "js",
|
|
4134
|
-
"name": "
|
|
4114
|
+
"name": "aiAssistantSlice",
|
|
4135
4115
|
"declaration": {
|
|
4136
|
-
"name": "
|
|
4137
|
-
"module": "src/
|
|
4116
|
+
"name": "aiAssistantSlice",
|
|
4117
|
+
"module": "src/state/ai-assistant-slice.ts"
|
|
4138
4118
|
}
|
|
4139
4119
|
}
|
|
4140
4120
|
]
|
|
4141
4121
|
},
|
|
4142
4122
|
{
|
|
4143
4123
|
"kind": "javascript-module",
|
|
4144
|
-
"path": "src/
|
|
4124
|
+
"path": "src/state/debug-event-log.ts",
|
|
4145
4125
|
"declarations": [
|
|
4146
4126
|
{
|
|
4147
|
-
"kind": "
|
|
4148
|
-
"
|
|
4149
|
-
"
|
|
4150
|
-
|
|
4127
|
+
"kind": "variable",
|
|
4128
|
+
"name": "META_EVENT_IMPORTANCE",
|
|
4129
|
+
"type": {
|
|
4130
|
+
"text": "Record<MetaEventType, MetaEventImportance>"
|
|
4131
|
+
},
|
|
4132
|
+
"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\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 'agent.handoff': 'normal',\n 'agent.pinned': 'normal',\n 'agent.unpinned': 'normal',\n 'provider.selected': 'normal',\n 'interaction.requested': 'normal',\n 'interaction.resolved': 'normal',\n 'external-diagnostics.folded': 'normal',\n 'session.cleared': 'normal',\n 'session.switched': 'low',\n 'session.switch-deferred': 'low',\n 'persistence.restored': '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}",
|
|
4133
|
+
"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."
|
|
4134
|
+
},
|
|
4135
|
+
{
|
|
4136
|
+
"kind": "function",
|
|
4137
|
+
"name": "recordMetaEvent",
|
|
4138
|
+
"return": {
|
|
4139
|
+
"type": {
|
|
4140
|
+
"text": "void"
|
|
4141
|
+
}
|
|
4142
|
+
},
|
|
4143
|
+
"parameters": [
|
|
4151
4144
|
{
|
|
4152
|
-
"
|
|
4153
|
-
"name": "state",
|
|
4145
|
+
"name": "key",
|
|
4154
4146
|
"type": {
|
|
4155
|
-
"text": "
|
|
4156
|
-
}
|
|
4157
|
-
"default": "{ status: 'idle' }"
|
|
4147
|
+
"text": "string"
|
|
4148
|
+
}
|
|
4158
4149
|
},
|
|
4159
4150
|
{
|
|
4160
|
-
"
|
|
4161
|
-
"name": "hasContent",
|
|
4151
|
+
"name": "type",
|
|
4162
4152
|
"type": {
|
|
4163
|
-
"text": "
|
|
4164
|
-
},
|
|
4165
|
-
"default": "false",
|
|
4166
|
-
"description": "Reflected to a `has-content` attribute so the host can collapse when there is\nnothing to render. True only while loading or when loaded with at least one\nsuggestion; idle, errored, and empty-loaded states render nothing."
|
|
4167
|
-
},
|
|
4168
|
-
{
|
|
4169
|
-
"kind": "method",
|
|
4170
|
-
"name": "stateChanged",
|
|
4171
|
-
"return": {
|
|
4172
|
-
"type": {
|
|
4173
|
-
"text": "void"
|
|
4174
|
-
}
|
|
4153
|
+
"text": "MetaEventType"
|
|
4175
4154
|
}
|
|
4176
4155
|
},
|
|
4177
4156
|
{
|
|
4178
|
-
"
|
|
4179
|
-
"
|
|
4180
|
-
"
|
|
4181
|
-
"
|
|
4182
|
-
|
|
4183
|
-
}
|
|
4184
|
-
},
|
|
4185
|
-
"parameters": [
|
|
4186
|
-
{
|
|
4187
|
-
"name": "suggestion",
|
|
4188
|
-
"type": {
|
|
4189
|
-
"text": "string"
|
|
4190
|
-
}
|
|
4191
|
-
}
|
|
4192
|
-
]
|
|
4157
|
+
"name": "detail",
|
|
4158
|
+
"optional": true,
|
|
4159
|
+
"type": {
|
|
4160
|
+
"text": "Record<string, unknown>"
|
|
4161
|
+
}
|
|
4193
4162
|
}
|
|
4194
4163
|
],
|
|
4195
|
-
"
|
|
4164
|
+
"description": "Append a meta event to the timeline for `key`. Once the buffer exceeds\nDEFAULT_MAX_META_EVENTS, evicts the oldest *non-`high`* event;\n`high`-importance events are never evicted. An empty `key` is bucketed under\n`''`, matching how drivers/stores handle an absent session identity, so\ncallers never need to guard."
|
|
4165
|
+
},
|
|
4166
|
+
{
|
|
4167
|
+
"kind": "function",
|
|
4168
|
+
"name": "recordTurnError",
|
|
4169
|
+
"return": {
|
|
4170
|
+
"type": {
|
|
4171
|
+
"text": "void"
|
|
4172
|
+
}
|
|
4173
|
+
},
|
|
4174
|
+
"parameters": [
|
|
4196
4175
|
{
|
|
4197
|
-
"name": "
|
|
4176
|
+
"name": "key",
|
|
4198
4177
|
"type": {
|
|
4199
|
-
"text": "
|
|
4200
|
-
}
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
"
|
|
4178
|
+
"text": "string"
|
|
4179
|
+
}
|
|
4180
|
+
},
|
|
4181
|
+
{
|
|
4182
|
+
"name": "reason",
|
|
4183
|
+
"type": {
|
|
4184
|
+
"text": "TurnFailureReason"
|
|
4185
|
+
}
|
|
4186
|
+
},
|
|
4187
|
+
{
|
|
4188
|
+
"name": "detail",
|
|
4189
|
+
"optional": true,
|
|
4190
|
+
"type": {
|
|
4191
|
+
"text": "Record<string, unknown>"
|
|
4192
|
+
}
|
|
4204
4193
|
}
|
|
4205
4194
|
],
|
|
4206
|
-
"
|
|
4207
|
-
"name": "GenesisElement",
|
|
4208
|
-
"package": "@genesislcap/web-core"
|
|
4209
|
-
},
|
|
4210
|
-
"tagName": "chat-suggestions",
|
|
4211
|
-
"customElement": true
|
|
4212
|
-
}
|
|
4213
|
-
],
|
|
4214
|
-
"exports": [
|
|
4215
|
-
{
|
|
4216
|
-
"kind": "js",
|
|
4217
|
-
"name": "ChatSuggestions",
|
|
4218
|
-
"declaration": {
|
|
4219
|
-
"name": "ChatSuggestions",
|
|
4220
|
-
"module": "src/suggestions/chat-suggestions.ts"
|
|
4221
|
-
}
|
|
4195
|
+
"description": "Record a turn-ending failure (`turn.error`, importance `high`). The `reason`\nis typed so the high-importance triage surface stays consistent; pass any\ndiagnostic specifics (attempt counts, offending tool names, etc.) in `detail`."
|
|
4222
4196
|
},
|
|
4223
|
-
{
|
|
4224
|
-
"kind": "custom-element-definition",
|
|
4225
|
-
"name": "chat-suggestions",
|
|
4226
|
-
"declaration": {
|
|
4227
|
-
"name": "ChatSuggestions",
|
|
4228
|
-
"module": "src/suggestions/chat-suggestions.ts"
|
|
4229
|
-
}
|
|
4230
|
-
}
|
|
4231
|
-
]
|
|
4232
|
-
},
|
|
4233
|
-
{
|
|
4234
|
-
"kind": "javascript-module",
|
|
4235
|
-
"path": "src/tags/index.ts",
|
|
4236
|
-
"declarations": [],
|
|
4237
|
-
"exports": []
|
|
4238
|
-
},
|
|
4239
|
-
{
|
|
4240
|
-
"kind": "javascript-module",
|
|
4241
|
-
"path": "src/types/ai-chat-widget.ts",
|
|
4242
|
-
"declarations": [],
|
|
4243
|
-
"exports": []
|
|
4244
|
-
},
|
|
4245
|
-
{
|
|
4246
|
-
"kind": "javascript-module",
|
|
4247
|
-
"path": "src/types/interaction-context.ts",
|
|
4248
|
-
"declarations": [],
|
|
4249
|
-
"exports": []
|
|
4250
|
-
},
|
|
4251
|
-
{
|
|
4252
|
-
"kind": "javascript-module",
|
|
4253
|
-
"path": "src/utils/animated-panel-toggle.ts",
|
|
4254
|
-
"declarations": [],
|
|
4255
|
-
"exports": []
|
|
4256
|
-
},
|
|
4257
|
-
{
|
|
4258
|
-
"kind": "javascript-module",
|
|
4259
|
-
"path": "src/utils/animation-exclusivity.ts",
|
|
4260
|
-
"declarations": [],
|
|
4261
|
-
"exports": []
|
|
4262
|
-
},
|
|
4263
|
-
{
|
|
4264
|
-
"kind": "javascript-module",
|
|
4265
|
-
"path": "src/utils/collect-session-models.ts",
|
|
4266
|
-
"declarations": [
|
|
4267
4197
|
{
|
|
4268
4198
|
"kind": "function",
|
|
4269
|
-
"name": "
|
|
4199
|
+
"name": "recordTurnRetry",
|
|
4270
4200
|
"return": {
|
|
4271
4201
|
"type": {
|
|
4272
|
-
"text": "
|
|
4202
|
+
"text": "void"
|
|
4273
4203
|
}
|
|
4274
4204
|
},
|
|
4275
4205
|
"parameters": [
|
|
4276
4206
|
{
|
|
4277
|
-
"name": "
|
|
4207
|
+
"name": "key",
|
|
4278
4208
|
"type": {
|
|
4279
|
-
"text": "
|
|
4209
|
+
"text": "string"
|
|
4280
4210
|
}
|
|
4281
4211
|
},
|
|
4282
4212
|
{
|
|
4283
|
-
"name": "
|
|
4284
|
-
"default": "[]",
|
|
4213
|
+
"name": "reason",
|
|
4285
4214
|
"type": {
|
|
4286
|
-
"text": "
|
|
4215
|
+
"text": "TurnFailureReason"
|
|
4216
|
+
}
|
|
4217
|
+
},
|
|
4218
|
+
{
|
|
4219
|
+
"name": "detail",
|
|
4220
|
+
"optional": true,
|
|
4221
|
+
"type": {
|
|
4222
|
+
"text": "Record<string, unknown>"
|
|
4287
4223
|
}
|
|
4288
4224
|
}
|
|
4289
4225
|
],
|
|
4290
|
-
"description": "
|
|
4291
|
-
}
|
|
4292
|
-
],
|
|
4293
|
-
"exports": [
|
|
4226
|
+
"description": "Record a recoverable retry *within* a turn (`turn.retry`, importance `normal`)\n— e.g. one malformed/empty attempt that will be retried, as distinct from the\nfinal attempt that bails out as a `turn.error`. Include `attempt`/`maxAttempts`\nin `detail` so the timeline shows which try this was."
|
|
4227
|
+
},
|
|
4294
4228
|
{
|
|
4295
|
-
"kind": "
|
|
4296
|
-
"name": "
|
|
4297
|
-
"
|
|
4298
|
-
"
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
}
|
|
4302
|
-
]
|
|
4303
|
-
},
|
|
4304
|
-
{
|
|
4305
|
-
"kind": "javascript-module",
|
|
4306
|
-
"path": "src/utils/condense-history.ts",
|
|
4307
|
-
"declarations": [
|
|
4308
|
-
{
|
|
4309
|
-
"kind": "variable",
|
|
4310
|
-
"name": "CONDENSE_MIN_CHARS",
|
|
4311
|
-
"type": {
|
|
4312
|
-
"text": "number"
|
|
4313
|
-
},
|
|
4314
|
-
"default": "1000",
|
|
4315
|
-
"description": "Below this serialized size a tool payload isn't worth condensing — the stub\nwould save little and cost a breadcrumb. A driver-level floor so the public\n`condenseWhen` API needs no per-policy threshold field."
|
|
4316
|
-
},
|
|
4317
|
-
{
|
|
4318
|
-
"kind": "variable",
|
|
4319
|
-
"name": "CONDENSED_ARGS_KEY",
|
|
4320
|
-
"type": {
|
|
4321
|
-
"text": "string"
|
|
4229
|
+
"kind": "function",
|
|
4230
|
+
"name": "getMetaEvents",
|
|
4231
|
+
"return": {
|
|
4232
|
+
"type": {
|
|
4233
|
+
"text": "ReadonlyArray<MetaEvent>"
|
|
4234
|
+
}
|
|
4322
4235
|
},
|
|
4323
|
-
"
|
|
4324
|
-
|
|
4236
|
+
"parameters": [
|
|
4237
|
+
{
|
|
4238
|
+
"name": "key",
|
|
4239
|
+
"type": {
|
|
4240
|
+
"text": "string"
|
|
4241
|
+
}
|
|
4242
|
+
}
|
|
4243
|
+
],
|
|
4244
|
+
"description": "Returns the meta-event timeline for `key`, or an empty array if none recorded."
|
|
4325
4245
|
},
|
|
4326
4246
|
{
|
|
4327
4247
|
"kind": "function",
|
|
4328
|
-
"name": "
|
|
4248
|
+
"name": "mergeMetaEvents",
|
|
4329
4249
|
"return": {
|
|
4330
4250
|
"type": {
|
|
4331
|
-
"text": "
|
|
4251
|
+
"text": "void"
|
|
4332
4252
|
}
|
|
4333
4253
|
},
|
|
4334
4254
|
"parameters": [
|
|
4335
4255
|
{
|
|
4336
|
-
"name": "
|
|
4337
|
-
"type": {
|
|
4338
|
-
"text": "ChatMessage[]"
|
|
4339
|
-
},
|
|
4340
|
-
"description": "The to-model history copy to rewrite (not mutated)."
|
|
4341
|
-
},
|
|
4342
|
-
{
|
|
4343
|
-
"name": "policies",
|
|
4256
|
+
"name": "targetKey",
|
|
4344
4257
|
"type": {
|
|
4345
|
-
"text": "
|
|
4346
|
-
}
|
|
4347
|
-
"description": "The driver's registry, keyed by tool-call id. Its entries'\n`reported*` flags are flipped as payloads first collapse."
|
|
4258
|
+
"text": "string"
|
|
4259
|
+
}
|
|
4348
4260
|
},
|
|
4349
4261
|
{
|
|
4350
|
-
"name": "
|
|
4262
|
+
"name": "events",
|
|
4351
4263
|
"type": {
|
|
4352
|
-
"text": "
|
|
4353
|
-
}
|
|
4354
|
-
|
|
4355
|
-
|
|
4264
|
+
"text": "readonly MetaEvent[]"
|
|
4265
|
+
}
|
|
4266
|
+
}
|
|
4267
|
+
],
|
|
4268
|
+
"description": "Merge pre-built meta events into the timeline for `targetKey`, **preserving each\nevent's original `timestamp`** (so it interleaves chronologically on export)\nwhile re-indexing onto the target buffer's monotonic counter. Used to fold a\nsub-agent's harvested events into the parent session — see\n`ChatDriver.invokeSubAgent`. Unlike recordMetaEvent it does not stamp a\nfresh timestamp; the same non-`high` eviction policy is applied once after the\nbatch so the buffer stays bounded."
|
|
4269
|
+
},
|
|
4270
|
+
{
|
|
4271
|
+
"kind": "function",
|
|
4272
|
+
"name": "clearSession",
|
|
4273
|
+
"return": {
|
|
4274
|
+
"type": {
|
|
4275
|
+
"text": "void"
|
|
4276
|
+
}
|
|
4277
|
+
},
|
|
4278
|
+
"parameters": [
|
|
4356
4279
|
{
|
|
4357
|
-
"name": "
|
|
4280
|
+
"name": "key",
|
|
4358
4281
|
"type": {
|
|
4359
|
-
"text": "
|
|
4360
|
-
}
|
|
4361
|
-
"description": "Invoked once per payload at its full→stub transition."
|
|
4282
|
+
"text": "string"
|
|
4283
|
+
}
|
|
4362
4284
|
}
|
|
4363
4285
|
],
|
|
4364
|
-
"description": "
|
|
4286
|
+
"description": "Drop the entire timeline for `key`. Used to discard a sub-agent's transient\nper-invocation session once its events have been harvested into the parent, so\nthe module registry doesn't accumulate one orphaned bucket per sub-agent run."
|
|
4287
|
+
},
|
|
4288
|
+
{
|
|
4289
|
+
"kind": "variable",
|
|
4290
|
+
"name": "DEBUG_LOG_README",
|
|
4291
|
+
"type": {
|
|
4292
|
+
"text": "readonly string[]"
|
|
4293
|
+
},
|
|
4294
|
+
"default": "[\n 'This is an exported debug log for the Genesis AI assistant. Read it top-to-bottom.',\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, and `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.\",\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`/`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'.`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, 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, 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), agent.handoff (routing; from=null is the initial activation), agent.pinned/unpinned (forced routing), provider.selected (model/provider for the upcoming turns), 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), 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, token usage, session cost), 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 '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.',\n]",
|
|
4295
|
+
"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 so the two stay in sync."
|
|
4365
4296
|
}
|
|
4366
4297
|
],
|
|
4367
4298
|
"exports": [
|
|
4368
4299
|
{
|
|
4369
4300
|
"kind": "js",
|
|
4370
|
-
"name": "
|
|
4301
|
+
"name": "META_EVENT_IMPORTANCE",
|
|
4371
4302
|
"declaration": {
|
|
4372
|
-
"name": "
|
|
4373
|
-
"module": "src/
|
|
4303
|
+
"name": "META_EVENT_IMPORTANCE",
|
|
4304
|
+
"module": "src/state/debug-event-log.ts"
|
|
4374
4305
|
}
|
|
4375
4306
|
},
|
|
4376
4307
|
{
|
|
4377
4308
|
"kind": "js",
|
|
4378
|
-
"name": "
|
|
4309
|
+
"name": "recordMetaEvent",
|
|
4379
4310
|
"declaration": {
|
|
4380
|
-
"name": "
|
|
4381
|
-
"module": "src/
|
|
4311
|
+
"name": "recordMetaEvent",
|
|
4312
|
+
"module": "src/state/debug-event-log.ts"
|
|
4382
4313
|
}
|
|
4383
4314
|
},
|
|
4384
4315
|
{
|
|
4385
4316
|
"kind": "js",
|
|
4386
|
-
"name": "
|
|
4317
|
+
"name": "TurnFailureReason",
|
|
4387
4318
|
"declaration": {
|
|
4388
|
-
"name": "
|
|
4389
|
-
"module": "src/
|
|
4319
|
+
"name": "TurnFailureReason",
|
|
4320
|
+
"module": "src/state/debug-event-log.ts"
|
|
4321
|
+
}
|
|
4322
|
+
},
|
|
4323
|
+
{
|
|
4324
|
+
"kind": "js",
|
|
4325
|
+
"name": "recordTurnError",
|
|
4326
|
+
"declaration": {
|
|
4327
|
+
"name": "recordTurnError",
|
|
4328
|
+
"module": "src/state/debug-event-log.ts"
|
|
4329
|
+
}
|
|
4330
|
+
},
|
|
4331
|
+
{
|
|
4332
|
+
"kind": "js",
|
|
4333
|
+
"name": "recordTurnRetry",
|
|
4334
|
+
"declaration": {
|
|
4335
|
+
"name": "recordTurnRetry",
|
|
4336
|
+
"module": "src/state/debug-event-log.ts"
|
|
4337
|
+
}
|
|
4338
|
+
},
|
|
4339
|
+
{
|
|
4340
|
+
"kind": "js",
|
|
4341
|
+
"name": "getMetaEvents",
|
|
4342
|
+
"declaration": {
|
|
4343
|
+
"name": "getMetaEvents",
|
|
4344
|
+
"module": "src/state/debug-event-log.ts"
|
|
4345
|
+
}
|
|
4346
|
+
},
|
|
4347
|
+
{
|
|
4348
|
+
"kind": "js",
|
|
4349
|
+
"name": "mergeMetaEvents",
|
|
4350
|
+
"declaration": {
|
|
4351
|
+
"name": "mergeMetaEvents",
|
|
4352
|
+
"module": "src/state/debug-event-log.ts"
|
|
4353
|
+
}
|
|
4354
|
+
},
|
|
4355
|
+
{
|
|
4356
|
+
"kind": "js",
|
|
4357
|
+
"name": "clearSession",
|
|
4358
|
+
"declaration": {
|
|
4359
|
+
"name": "clearSession",
|
|
4360
|
+
"module": "src/state/debug-event-log.ts"
|
|
4361
|
+
}
|
|
4362
|
+
},
|
|
4363
|
+
{
|
|
4364
|
+
"kind": "js",
|
|
4365
|
+
"name": "DEBUG_LOG_README",
|
|
4366
|
+
"declaration": {
|
|
4367
|
+
"name": "DEBUG_LOG_README",
|
|
4368
|
+
"module": "src/state/debug-event-log.ts"
|
|
4390
4369
|
}
|
|
4391
4370
|
}
|
|
4392
4371
|
]
|
|
4393
4372
|
},
|
|
4394
4373
|
{
|
|
4395
4374
|
"kind": "javascript-module",
|
|
4396
|
-
"path": "src/
|
|
4375
|
+
"path": "src/state/driver-registry.ts",
|
|
4397
4376
|
"declarations": [
|
|
4398
4377
|
{
|
|
4399
4378
|
"kind": "function",
|
|
4400
|
-
"name": "
|
|
4401
|
-
"return": {
|
|
4402
|
-
"type": {
|
|
4403
|
-
"text": "string"
|
|
4404
|
-
}
|
|
4405
|
-
},
|
|
4406
|
-
"parameters": [
|
|
4407
|
-
{
|
|
4408
|
-
"name": "scope",
|
|
4409
|
-
"type": {
|
|
4410
|
-
"text": "string"
|
|
4411
|
-
}
|
|
4412
|
-
}
|
|
4413
|
-
],
|
|
4414
|
-
"description": "localStorage key for a host-scoped cost history list."
|
|
4415
|
-
},
|
|
4416
|
-
{
|
|
4417
|
-
"kind": "function",
|
|
4418
|
-
"name": "loadCostSessionHistory",
|
|
4379
|
+
"name": "getOrCreateDriver",
|
|
4419
4380
|
"return": {
|
|
4420
4381
|
"type": {
|
|
4421
|
-
"text": "
|
|
4382
|
+
"text": "AiDriver"
|
|
4422
4383
|
}
|
|
4423
4384
|
},
|
|
4424
4385
|
"parameters": [
|
|
4425
4386
|
{
|
|
4426
|
-
"name": "
|
|
4387
|
+
"name": "key",
|
|
4427
4388
|
"type": {
|
|
4428
4389
|
"text": "string"
|
|
4429
4390
|
}
|
|
4430
|
-
}
|
|
4431
|
-
],
|
|
4432
|
-
"description": "Load persisted cost sessions for a scope (newest first)."
|
|
4433
|
-
},
|
|
4434
|
-
{
|
|
4435
|
-
"kind": "function",
|
|
4436
|
-
"name": "saveCostSessionHistory",
|
|
4437
|
-
"return": {
|
|
4438
|
-
"type": {
|
|
4439
|
-
"text": "void"
|
|
4440
|
-
}
|
|
4441
|
-
},
|
|
4442
|
-
"parameters": [
|
|
4391
|
+
},
|
|
4443
4392
|
{
|
|
4444
|
-
"name": "
|
|
4393
|
+
"name": "agentsKey",
|
|
4445
4394
|
"type": {
|
|
4446
4395
|
"text": "string"
|
|
4447
4396
|
}
|
|
4448
4397
|
},
|
|
4449
4398
|
{
|
|
4450
|
-
"name": "
|
|
4399
|
+
"name": "factory",
|
|
4451
4400
|
"type": {
|
|
4452
|
-
"text": "
|
|
4401
|
+
"text": "() => AiDriver"
|
|
4453
4402
|
}
|
|
4454
4403
|
}
|
|
4455
4404
|
],
|
|
4456
|
-
"description": "
|
|
4405
|
+
"description": "Returns the existing driver for the given key, or calls the factory to create\nand register a new one. `agentsKey` is the fingerprint of the agents the\ndriver is being built for; it is recorded only when a driver is created (a\nreused driver keeps the fingerprint it was originally built with)."
|
|
4457
4406
|
},
|
|
4458
4407
|
{
|
|
4459
4408
|
"kind": "function",
|
|
4460
|
-
"name": "
|
|
4409
|
+
"name": "getDriver",
|
|
4461
4410
|
"return": {
|
|
4462
4411
|
"type": {
|
|
4463
|
-
"text": "
|
|
4412
|
+
"text": "AiDriver | undefined"
|
|
4464
4413
|
}
|
|
4465
4414
|
},
|
|
4466
4415
|
"parameters": [
|
|
4467
4416
|
{
|
|
4468
|
-
"name": "
|
|
4417
|
+
"name": "key",
|
|
4469
4418
|
"type": {
|
|
4470
4419
|
"text": "string"
|
|
4471
4420
|
}
|
|
4472
|
-
},
|
|
4473
|
-
{
|
|
4474
|
-
"name": "record",
|
|
4475
|
-
"type": {
|
|
4476
|
-
"text": "CostSessionRecord"
|
|
4477
|
-
}
|
|
4478
4421
|
}
|
|
4479
4422
|
],
|
|
4480
|
-
"description": "
|
|
4423
|
+
"description": "Returns the existing driver for the given key, or `undefined`."
|
|
4481
4424
|
},
|
|
4482
4425
|
{
|
|
4483
4426
|
"kind": "function",
|
|
4484
|
-
"name": "
|
|
4427
|
+
"name": "getDriverAgentsKey",
|
|
4485
4428
|
"return": {
|
|
4486
4429
|
"type": {
|
|
4487
|
-
"text": "
|
|
4430
|
+
"text": "string | undefined"
|
|
4488
4431
|
}
|
|
4489
4432
|
},
|
|
4490
4433
|
"parameters": [
|
|
4491
4434
|
{
|
|
4492
|
-
"name": "
|
|
4493
|
-
"type": {
|
|
4494
|
-
"text": "string"
|
|
4495
|
-
}
|
|
4496
|
-
},
|
|
4497
|
-
{
|
|
4498
|
-
"name": "id",
|
|
4435
|
+
"name": "key",
|
|
4499
4436
|
"type": {
|
|
4500
4437
|
"text": "string"
|
|
4501
4438
|
}
|
|
4502
4439
|
}
|
|
4503
4440
|
],
|
|
4504
|
-
"description": "
|
|
4441
|
+
"description": "The agents fingerprint the registry driver for `key` was built with, or\n`undefined` if no driver is registered. Used by `agentsChanged` to decide\nwhether a sibling has already rebuilt the shared driver to the desired agents."
|
|
4505
4442
|
},
|
|
4506
4443
|
{
|
|
4507
4444
|
"kind": "function",
|
|
4508
|
-
"name": "
|
|
4445
|
+
"name": "deleteDriver",
|
|
4509
4446
|
"return": {
|
|
4510
4447
|
"type": {
|
|
4511
|
-
"text": "
|
|
4448
|
+
"text": "AiDriver | undefined"
|
|
4512
4449
|
}
|
|
4513
4450
|
},
|
|
4514
4451
|
"parameters": [
|
|
4515
4452
|
{
|
|
4516
|
-
"name": "
|
|
4453
|
+
"name": "key",
|
|
4517
4454
|
"type": {
|
|
4518
4455
|
"text": "string"
|
|
4519
4456
|
}
|
|
4520
4457
|
}
|
|
4521
4458
|
],
|
|
4522
|
-
"description": "
|
|
4523
|
-
}
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
"
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
{
|
|
4534
|
-
"name": "iso",
|
|
4535
|
-
"type": {
|
|
4536
|
-
"text": "string"
|
|
4537
|
-
}
|
|
4538
|
-
}
|
|
4539
|
-
],
|
|
4540
|
-
"description": "Display date for a history row (e.g. \"Jun 14, 2026\")."
|
|
4541
|
-
}
|
|
4542
|
-
],
|
|
4543
|
-
"exports": [
|
|
4544
|
-
{
|
|
4545
|
-
"kind": "js",
|
|
4546
|
-
"name": "costHistoryStorageKey",
|
|
4547
|
-
"declaration": {
|
|
4548
|
-
"name": "costHistoryStorageKey",
|
|
4549
|
-
"module": "src/utils/cost-session-history.ts"
|
|
4550
|
-
}
|
|
4551
|
-
},
|
|
4552
|
-
{
|
|
4553
|
-
"kind": "js",
|
|
4554
|
-
"name": "loadCostSessionHistory",
|
|
4555
|
-
"declaration": {
|
|
4556
|
-
"name": "loadCostSessionHistory",
|
|
4557
|
-
"module": "src/utils/cost-session-history.ts"
|
|
4558
|
-
}
|
|
4559
|
-
},
|
|
4560
|
-
{
|
|
4561
|
-
"kind": "js",
|
|
4562
|
-
"name": "saveCostSessionHistory",
|
|
4563
|
-
"declaration": {
|
|
4564
|
-
"name": "saveCostSessionHistory",
|
|
4565
|
-
"module": "src/utils/cost-session-history.ts"
|
|
4566
|
-
}
|
|
4567
|
-
},
|
|
4568
|
-
{
|
|
4569
|
-
"kind": "js",
|
|
4570
|
-
"name": "appendCostSessionRecord",
|
|
4571
|
-
"declaration": {
|
|
4572
|
-
"name": "appendCostSessionRecord",
|
|
4573
|
-
"module": "src/utils/cost-session-history.ts"
|
|
4574
|
-
}
|
|
4459
|
+
"description": "Removes and returns the driver for the given key.\nUsed when agents change (driver must be rebuilt) or on explicit session teardown."
|
|
4460
|
+
}
|
|
4461
|
+
],
|
|
4462
|
+
"exports": [
|
|
4463
|
+
{
|
|
4464
|
+
"kind": "js",
|
|
4465
|
+
"name": "getOrCreateDriver",
|
|
4466
|
+
"declaration": {
|
|
4467
|
+
"name": "getOrCreateDriver",
|
|
4468
|
+
"module": "src/state/driver-registry.ts"
|
|
4469
|
+
}
|
|
4575
4470
|
},
|
|
4576
4471
|
{
|
|
4577
4472
|
"kind": "js",
|
|
4578
|
-
"name": "
|
|
4473
|
+
"name": "getDriver",
|
|
4579
4474
|
"declaration": {
|
|
4580
|
-
"name": "
|
|
4581
|
-
"module": "src/
|
|
4475
|
+
"name": "getDriver",
|
|
4476
|
+
"module": "src/state/driver-registry.ts"
|
|
4582
4477
|
}
|
|
4583
4478
|
},
|
|
4584
4479
|
{
|
|
4585
4480
|
"kind": "js",
|
|
4586
|
-
"name": "
|
|
4481
|
+
"name": "getDriverAgentsKey",
|
|
4587
4482
|
"declaration": {
|
|
4588
|
-
"name": "
|
|
4589
|
-
"module": "src/
|
|
4483
|
+
"name": "getDriverAgentsKey",
|
|
4484
|
+
"module": "src/state/driver-registry.ts"
|
|
4590
4485
|
}
|
|
4591
4486
|
},
|
|
4592
4487
|
{
|
|
4593
4488
|
"kind": "js",
|
|
4594
|
-
"name": "
|
|
4489
|
+
"name": "deleteDriver",
|
|
4595
4490
|
"declaration": {
|
|
4596
|
-
"name": "
|
|
4597
|
-
"module": "src/
|
|
4491
|
+
"name": "deleteDriver",
|
|
4492
|
+
"module": "src/state/driver-registry.ts"
|
|
4598
4493
|
}
|
|
4599
4494
|
}
|
|
4600
4495
|
]
|
|
4601
4496
|
},
|
|
4602
4497
|
{
|
|
4603
4498
|
"kind": "javascript-module",
|
|
4604
|
-
"path": "src/
|
|
4499
|
+
"path": "src/state/interaction-context.ts",
|
|
4500
|
+
"declarations": [],
|
|
4501
|
+
"exports": []
|
|
4502
|
+
},
|
|
4503
|
+
{
|
|
4504
|
+
"kind": "javascript-module",
|
|
4505
|
+
"path": "src/state/session-store.ts",
|
|
4605
4506
|
"declarations": [
|
|
4606
|
-
{
|
|
4607
|
-
"kind": "variable",
|
|
4608
|
-
"name": "COST_SESSION_TITLE_MAX_WORDS",
|
|
4609
|
-
"type": {
|
|
4610
|
-
"text": "number"
|
|
4611
|
-
},
|
|
4612
|
-
"default": "10",
|
|
4613
|
-
"description": "Max words kept from the first user turn when deriving a session title."
|
|
4614
|
-
},
|
|
4615
|
-
{
|
|
4616
|
-
"kind": "variable",
|
|
4617
|
-
"name": "COST_SESSION_TITLE_MAX_CHARS",
|
|
4618
|
-
"type": {
|
|
4619
|
-
"text": "number"
|
|
4620
|
-
},
|
|
4621
|
-
"default": "60",
|
|
4622
|
-
"description": "Hard cap on derived title length (ellipsis included)."
|
|
4623
|
-
},
|
|
4624
4507
|
{
|
|
4625
4508
|
"kind": "function",
|
|
4626
|
-
"name": "
|
|
4509
|
+
"name": "getSessionStore",
|
|
4627
4510
|
"return": {
|
|
4628
4511
|
"type": {
|
|
4629
|
-
"text": "
|
|
4512
|
+
"text": "SessionStoreReturn"
|
|
4630
4513
|
}
|
|
4631
4514
|
},
|
|
4632
4515
|
"parameters": [
|
|
4633
4516
|
{
|
|
4634
|
-
"name": "
|
|
4517
|
+
"name": "key",
|
|
4635
4518
|
"type": {
|
|
4636
|
-
"text": "
|
|
4519
|
+
"text": "string"
|
|
4637
4520
|
}
|
|
4638
|
-
}
|
|
4639
|
-
],
|
|
4640
|
-
"description": "Plain text from a chat message `content` field."
|
|
4641
|
-
},
|
|
4642
|
-
{
|
|
4643
|
-
"kind": "function",
|
|
4644
|
-
"name": "truncateCostSessionTitle",
|
|
4645
|
-
"return": {
|
|
4646
|
-
"type": {
|
|
4647
|
-
"text": "string"
|
|
4648
|
-
}
|
|
4649
|
-
},
|
|
4650
|
-
"parameters": [
|
|
4521
|
+
},
|
|
4651
4522
|
{
|
|
4652
|
-
"name": "
|
|
4523
|
+
"name": "devTools",
|
|
4524
|
+
"optional": true,
|
|
4653
4525
|
"type": {
|
|
4654
|
-
"text": "
|
|
4526
|
+
"text": "boolean"
|
|
4655
4527
|
}
|
|
4656
4528
|
}
|
|
4657
4529
|
],
|
|
4658
|
-
"description": "
|
|
4530
|
+
"description": "Returns the session store for the given key, creating one if it does not\nalready exist. Omit `devTools` (or pass `undefined`) to defer to `isDev()`.\nPass `true` to force-enable or `false` to force-disable Redux DevTools."
|
|
4659
4531
|
},
|
|
4660
4532
|
{
|
|
4661
4533
|
"kind": "function",
|
|
4662
|
-
"name": "
|
|
4534
|
+
"name": "hasSessionStore",
|
|
4663
4535
|
"return": {
|
|
4664
4536
|
"type": {
|
|
4665
|
-
"text": "
|
|
4537
|
+
"text": "boolean"
|
|
4666
4538
|
}
|
|
4667
4539
|
},
|
|
4668
4540
|
"parameters": [
|
|
4669
4541
|
{
|
|
4670
|
-
"name": "
|
|
4542
|
+
"name": "key",
|
|
4671
4543
|
"type": {
|
|
4672
|
-
"text": "
|
|
4544
|
+
"text": "string"
|
|
4673
4545
|
}
|
|
4674
4546
|
}
|
|
4675
4547
|
],
|
|
4676
|
-
"description": "
|
|
4548
|
+
"description": "Returns true if a session store already exists for the given key."
|
|
4677
4549
|
},
|
|
4678
4550
|
{
|
|
4679
4551
|
"kind": "function",
|
|
4680
|
-
"name": "
|
|
4552
|
+
"name": "deleteSessionStore",
|
|
4681
4553
|
"return": {
|
|
4682
4554
|
"type": {
|
|
4683
|
-
"text": "
|
|
4555
|
+
"text": "void"
|
|
4684
4556
|
}
|
|
4685
4557
|
},
|
|
4686
4558
|
"parameters": [
|
|
4687
4559
|
{
|
|
4688
|
-
"name": "
|
|
4560
|
+
"name": "key",
|
|
4689
4561
|
"type": {
|
|
4690
|
-
"text": "
|
|
4562
|
+
"text": "string"
|
|
4691
4563
|
}
|
|
4692
4564
|
}
|
|
4693
4565
|
],
|
|
4694
|
-
"description": "
|
|
4566
|
+
"description": "Deletes the session store for the given key."
|
|
4695
4567
|
}
|
|
4696
4568
|
],
|
|
4697
4569
|
"exports": [
|
|
4698
4570
|
{
|
|
4699
4571
|
"kind": "js",
|
|
4700
|
-
"name": "
|
|
4701
|
-
"declaration": {
|
|
4702
|
-
"name": "COST_SESSION_TITLE_MAX_WORDS",
|
|
4703
|
-
"module": "src/utils/derive-cost-session-title.ts"
|
|
4704
|
-
}
|
|
4705
|
-
},
|
|
4706
|
-
{
|
|
4707
|
-
"kind": "js",
|
|
4708
|
-
"name": "COST_SESSION_TITLE_MAX_CHARS",
|
|
4572
|
+
"name": "getSessionStore",
|
|
4709
4573
|
"declaration": {
|
|
4710
|
-
"name": "
|
|
4711
|
-
"module": "src/
|
|
4574
|
+
"name": "getSessionStore",
|
|
4575
|
+
"module": "src/state/session-store.ts"
|
|
4712
4576
|
}
|
|
4713
4577
|
},
|
|
4714
4578
|
{
|
|
4715
4579
|
"kind": "js",
|
|
4716
|
-
"name": "
|
|
4580
|
+
"name": "hasSessionStore",
|
|
4717
4581
|
"declaration": {
|
|
4718
|
-
"name": "
|
|
4719
|
-
"module": "src/
|
|
4582
|
+
"name": "hasSessionStore",
|
|
4583
|
+
"module": "src/state/session-store.ts"
|
|
4720
4584
|
}
|
|
4721
4585
|
},
|
|
4722
4586
|
{
|
|
4723
4587
|
"kind": "js",
|
|
4724
|
-
"name": "
|
|
4588
|
+
"name": "deleteSessionStore",
|
|
4725
4589
|
"declaration": {
|
|
4726
|
-
"name": "
|
|
4727
|
-
"module": "src/
|
|
4590
|
+
"name": "deleteSessionStore",
|
|
4591
|
+
"module": "src/state/session-store.ts"
|
|
4728
4592
|
}
|
|
4729
4593
|
},
|
|
4730
4594
|
{
|
|
4731
4595
|
"kind": "js",
|
|
4732
|
-
"name": "
|
|
4596
|
+
"name": "SessionStoreReturn",
|
|
4733
4597
|
"declaration": {
|
|
4734
|
-
"name": "
|
|
4735
|
-
"module": "src/
|
|
4598
|
+
"name": "SessionStoreReturn",
|
|
4599
|
+
"module": "src/state/session-store.ts"
|
|
4736
4600
|
}
|
|
4737
4601
|
},
|
|
4738
4602
|
{
|
|
4739
4603
|
"kind": "js",
|
|
4740
|
-
"name": "
|
|
4604
|
+
"name": "AiAssistantSessionState",
|
|
4741
4605
|
"declaration": {
|
|
4742
|
-
"name": "
|
|
4743
|
-
"module": "src/
|
|
4606
|
+
"name": "AiAssistantSessionState",
|
|
4607
|
+
"module": "src/state/session-store.ts"
|
|
4744
4608
|
}
|
|
4745
4609
|
}
|
|
4746
4610
|
]
|
|
4747
4611
|
},
|
|
4748
4612
|
{
|
|
4749
4613
|
"kind": "javascript-module",
|
|
4750
|
-
"path": "src/
|
|
4751
|
-
"declarations": [],
|
|
4752
|
-
"exports": []
|
|
4753
|
-
},
|
|
4754
|
-
{
|
|
4755
|
-
"kind": "javascript-module",
|
|
4756
|
-
"path": "src/utils/history-transform.ts",
|
|
4614
|
+
"path": "src/styles/ai-colours.ts",
|
|
4757
4615
|
"declarations": [
|
|
4758
4616
|
{
|
|
4759
|
-
"kind": "
|
|
4760
|
-
"name": "
|
|
4761
|
-
"
|
|
4762
|
-
"
|
|
4763
|
-
"text": "ChatMessage[]"
|
|
4764
|
-
}
|
|
4617
|
+
"kind": "variable",
|
|
4618
|
+
"name": "AI_COLOUR_AMBER",
|
|
4619
|
+
"type": {
|
|
4620
|
+
"text": "string"
|
|
4765
4621
|
},
|
|
4766
|
-
"
|
|
4767
|
-
|
|
4768
|
-
"name": "history",
|
|
4769
|
-
"type": {
|
|
4770
|
-
"text": "ChatMessage[]"
|
|
4771
|
-
}
|
|
4772
|
-
},
|
|
4773
|
-
{
|
|
4774
|
-
"name": "agentName",
|
|
4775
|
-
"type": {
|
|
4776
|
-
"text": "string"
|
|
4777
|
-
}
|
|
4778
|
-
}
|
|
4779
|
-
],
|
|
4780
|
-
"description": "Prepares history for the LLM only: masks tool call args and results from other\nagents so the active specialist is not confused by tools it does not have.\nCanonical history in `ChatDriver` stays unmasked for UI and logging."
|
|
4622
|
+
"default": "'#feb60a'",
|
|
4623
|
+
"description": "Shared brand colours used across the AI animation effects\n(halo overlay border/glow and loading dot indicators).\nDefined once here so both stay in sync."
|
|
4781
4624
|
},
|
|
4782
4625
|
{
|
|
4783
|
-
"kind": "
|
|
4784
|
-
"name": "
|
|
4785
|
-
"
|
|
4786
|
-
"
|
|
4787
|
-
"text": "ChatMessage[]"
|
|
4788
|
-
}
|
|
4626
|
+
"kind": "variable",
|
|
4627
|
+
"name": "AI_COLOUR_PINK",
|
|
4628
|
+
"type": {
|
|
4629
|
+
"text": "string"
|
|
4789
4630
|
},
|
|
4790
|
-
"
|
|
4791
|
-
{
|
|
4792
|
-
"name": "history",
|
|
4793
|
-
"type": {
|
|
4794
|
-
"text": "readonly ChatMessage[]"
|
|
4795
|
-
}
|
|
4796
|
-
},
|
|
4797
|
-
{
|
|
4798
|
-
"name": "cap",
|
|
4799
|
-
"type": {
|
|
4800
|
-
"text": "number"
|
|
4801
|
-
}
|
|
4802
|
-
}
|
|
4803
|
-
],
|
|
4804
|
-
"description": "Applies a history cap for sub-agent context: the last `cap` messages are passed\nverbatim; older messages have their tool payloads masked."
|
|
4631
|
+
"default": "'#ff0062'"
|
|
4805
4632
|
},
|
|
4806
4633
|
{
|
|
4807
4634
|
"kind": "variable",
|
|
4808
|
-
"name": "
|
|
4635
|
+
"name": "AI_COLOUR_CYAN",
|
|
4809
4636
|
"type": {
|
|
4810
|
-
"text": "
|
|
4637
|
+
"text": "string"
|
|
4811
4638
|
},
|
|
4812
|
-
"default": "
|
|
4813
|
-
"description": "Recent messages kept verbatim when compacting; everything earlier is summarized."
|
|
4639
|
+
"default": "'#00dbf9'"
|
|
4814
4640
|
},
|
|
4815
4641
|
{
|
|
4816
4642
|
"kind": "variable",
|
|
4817
|
-
"name": "
|
|
4643
|
+
"name": "AI_COLOUR_VIOLET",
|
|
4818
4644
|
"type": {
|
|
4819
|
-
"text": "
|
|
4645
|
+
"text": "string"
|
|
4820
4646
|
},
|
|
4821
|
-
"default": "
|
|
4822
|
-
"description": "Don't bother compacting unless at least this many messages would be summarized."
|
|
4823
|
-
},
|
|
4824
|
-
{
|
|
4825
|
-
"kind": "function",
|
|
4826
|
-
"name": "findCompactionCut",
|
|
4827
|
-
"return": {
|
|
4828
|
-
"type": {
|
|
4829
|
-
"text": "number | null"
|
|
4830
|
-
}
|
|
4831
|
-
},
|
|
4832
|
-
"parameters": [
|
|
4833
|
-
{
|
|
4834
|
-
"name": "history",
|
|
4835
|
-
"type": {
|
|
4836
|
-
"text": "readonly ChatMessage[]"
|
|
4837
|
-
}
|
|
4838
|
-
}
|
|
4839
|
-
],
|
|
4840
|
-
"description": "Index at which the verbatim tail begins — everything before it gets summarized.\nThe tail starts on a clean turn boundary (a `user` message): a user message\nnever appears between a `tool_use` and its `tool_result`, so cutting there\nguarantees the summarized region is tool-pair-balanced (compaction only runs\nwhen idle, so history is turn-complete). Returns `null` when there is nothing\nworth compacting (too short, or no earlier user boundary) — e.g. a freshly\nrestored session whose only user turn is the current one."
|
|
4841
|
-
},
|
|
4842
|
-
{
|
|
4843
|
-
"kind": "function",
|
|
4844
|
-
"name": "buildCompactionSummaryPrompt",
|
|
4845
|
-
"return": {
|
|
4846
|
-
"type": {
|
|
4847
|
-
"text": "{\n systemPrompt: string;\n userMessage: string;\n}"
|
|
4848
|
-
}
|
|
4849
|
-
},
|
|
4850
|
-
"parameters": [
|
|
4851
|
-
{
|
|
4852
|
-
"name": "toCompact",
|
|
4853
|
-
"type": {
|
|
4854
|
-
"text": "readonly ChatMessage[]"
|
|
4855
|
-
}
|
|
4856
|
-
}
|
|
4857
|
-
],
|
|
4858
|
-
"description": "Build the one-shot summarizer prompt for a run of older messages (used with\n`AIProvider.prompt`). Mirrors the `<conversation_history>` block convention\nthat suggestions use. Any existing `compacted-summary` at the head is folded\nin (rendered as prior-summary context), so rolling re-compaction produces one\ncombined summary."
|
|
4859
|
-
},
|
|
4860
|
-
{
|
|
4861
|
-
"kind": "function",
|
|
4862
|
-
"name": "normalizeForProvider",
|
|
4863
|
-
"return": {
|
|
4864
|
-
"type": {
|
|
4865
|
-
"text": "ChatMessage[]"
|
|
4866
|
-
}
|
|
4867
|
-
},
|
|
4868
|
-
"parameters": [
|
|
4869
|
-
{
|
|
4870
|
-
"name": "history",
|
|
4871
|
-
"type": {
|
|
4872
|
-
"text": "readonly ChatMessage[]"
|
|
4873
|
-
}
|
|
4874
|
-
}
|
|
4875
|
-
],
|
|
4876
|
-
"description": "Normalize history for a provider request (GENC-1351 §5.7): translate each\n`compacted-summary` message into a `user` message that wraps its summary in a\n`<conversation_summary>` block, so the raw display-only role never reaches a\ntransport. Other roles pass through untouched. Pure — returns a new array.\n\nApplied at the request-build chokepoint *before* per-agent masking, so the\nguarantee holds for every provider/transport regardless of any optional\nper-agent history transform."
|
|
4877
|
-
},
|
|
4878
|
-
{
|
|
4879
|
-
"kind": "function",
|
|
4880
|
-
"name": "compactionDividerLabel",
|
|
4881
|
-
"return": {
|
|
4882
|
-
"type": {
|
|
4883
|
-
"text": "string"
|
|
4884
|
-
}
|
|
4885
|
-
},
|
|
4886
|
-
"parameters": [
|
|
4887
|
-
{
|
|
4888
|
-
"name": "m",
|
|
4889
|
-
"type": {
|
|
4890
|
-
"text": "ChatMessage"
|
|
4891
|
-
}
|
|
4892
|
-
}
|
|
4893
|
-
],
|
|
4894
|
-
"description": "Human-facing divider label for a `compacted-summary` message."
|
|
4647
|
+
"default": "'#da00f7'"
|
|
4895
4648
|
}
|
|
4896
4649
|
],
|
|
4897
4650
|
"exports": [
|
|
4898
4651
|
{
|
|
4899
4652
|
"kind": "js",
|
|
4900
|
-
"name": "
|
|
4901
|
-
"declaration": {
|
|
4902
|
-
"name": "transformHistoryForAgent",
|
|
4903
|
-
"module": "src/utils/history-transform.ts"
|
|
4904
|
-
}
|
|
4905
|
-
},
|
|
4906
|
-
{
|
|
4907
|
-
"kind": "js",
|
|
4908
|
-
"name": "applyHistoryCap",
|
|
4909
|
-
"declaration": {
|
|
4910
|
-
"name": "applyHistoryCap",
|
|
4911
|
-
"module": "src/utils/history-transform.ts"
|
|
4912
|
-
}
|
|
4913
|
-
},
|
|
4914
|
-
{
|
|
4915
|
-
"kind": "js",
|
|
4916
|
-
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
4917
|
-
"declaration": {
|
|
4918
|
-
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
4919
|
-
"module": "src/utils/history-transform.ts"
|
|
4920
|
-
}
|
|
4921
|
-
},
|
|
4922
|
-
{
|
|
4923
|
-
"kind": "js",
|
|
4924
|
-
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
4925
|
-
"declaration": {
|
|
4926
|
-
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
4927
|
-
"module": "src/utils/history-transform.ts"
|
|
4928
|
-
}
|
|
4929
|
-
},
|
|
4930
|
-
{
|
|
4931
|
-
"kind": "js",
|
|
4932
|
-
"name": "findCompactionCut",
|
|
4653
|
+
"name": "AI_COLOUR_AMBER",
|
|
4933
4654
|
"declaration": {
|
|
4934
|
-
"name": "
|
|
4935
|
-
"module": "src/
|
|
4655
|
+
"name": "AI_COLOUR_AMBER",
|
|
4656
|
+
"module": "src/styles/ai-colours.ts"
|
|
4936
4657
|
}
|
|
4937
4658
|
},
|
|
4938
4659
|
{
|
|
4939
4660
|
"kind": "js",
|
|
4940
|
-
"name": "
|
|
4661
|
+
"name": "AI_COLOUR_PINK",
|
|
4941
4662
|
"declaration": {
|
|
4942
|
-
"name": "
|
|
4943
|
-
"module": "src/
|
|
4663
|
+
"name": "AI_COLOUR_PINK",
|
|
4664
|
+
"module": "src/styles/ai-colours.ts"
|
|
4944
4665
|
}
|
|
4945
4666
|
},
|
|
4946
4667
|
{
|
|
4947
4668
|
"kind": "js",
|
|
4948
|
-
"name": "
|
|
4669
|
+
"name": "AI_COLOUR_CYAN",
|
|
4949
4670
|
"declaration": {
|
|
4950
|
-
"name": "
|
|
4951
|
-
"module": "src/
|
|
4671
|
+
"name": "AI_COLOUR_CYAN",
|
|
4672
|
+
"module": "src/styles/ai-colours.ts"
|
|
4952
4673
|
}
|
|
4953
4674
|
},
|
|
4954
4675
|
{
|
|
4955
4676
|
"kind": "js",
|
|
4956
|
-
"name": "
|
|
4677
|
+
"name": "AI_COLOUR_VIOLET",
|
|
4957
4678
|
"declaration": {
|
|
4958
|
-
"name": "
|
|
4959
|
-
"module": "src/
|
|
4679
|
+
"name": "AI_COLOUR_VIOLET",
|
|
4680
|
+
"module": "src/styles/ai-colours.ts"
|
|
4960
4681
|
}
|
|
4961
4682
|
}
|
|
4962
4683
|
]
|
|
4963
4684
|
},
|
|
4964
4685
|
{
|
|
4965
4686
|
"kind": "javascript-module",
|
|
4966
|
-
"path": "src/
|
|
4967
|
-
"declarations": [
|
|
4968
|
-
"exports": [
|
|
4687
|
+
"path": "src/suggestions/chat-suggestions.ts",
|
|
4688
|
+
"declarations": [
|
|
4969
4689
|
{
|
|
4970
|
-
"kind": "
|
|
4971
|
-
"
|
|
4972
|
-
"
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4690
|
+
"kind": "class",
|
|
4691
|
+
"description": "",
|
|
4692
|
+
"name": "ChatSuggestions",
|
|
4693
|
+
"members": [
|
|
4694
|
+
{
|
|
4695
|
+
"kind": "field",
|
|
4696
|
+
"name": "state",
|
|
4697
|
+
"type": {
|
|
4698
|
+
"text": "SuggestionsState"
|
|
4699
|
+
},
|
|
4700
|
+
"default": "{ status: 'idle' }"
|
|
4701
|
+
},
|
|
4702
|
+
{
|
|
4703
|
+
"kind": "field",
|
|
4704
|
+
"name": "hasContent",
|
|
4705
|
+
"type": {
|
|
4706
|
+
"text": "boolean"
|
|
4707
|
+
},
|
|
4708
|
+
"default": "false",
|
|
4709
|
+
"description": "Reflected to a `has-content` attribute so the host can collapse when there is\nnothing to render. True only while loading or when loaded with at least one\nsuggestion; idle, errored, and empty-loaded states render nothing."
|
|
4710
|
+
},
|
|
4711
|
+
{
|
|
4712
|
+
"kind": "method",
|
|
4713
|
+
"name": "stateChanged",
|
|
4714
|
+
"return": {
|
|
4715
|
+
"type": {
|
|
4716
|
+
"text": "void"
|
|
4717
|
+
}
|
|
4718
|
+
}
|
|
4719
|
+
},
|
|
4720
|
+
{
|
|
4721
|
+
"kind": "method",
|
|
4722
|
+
"name": "handleSuggestionClick",
|
|
4723
|
+
"return": {
|
|
4724
|
+
"type": {
|
|
4725
|
+
"text": "void"
|
|
4726
|
+
}
|
|
4727
|
+
},
|
|
4728
|
+
"parameters": [
|
|
4729
|
+
{
|
|
4730
|
+
"name": "suggestion",
|
|
4731
|
+
"type": {
|
|
4732
|
+
"text": "string"
|
|
4733
|
+
}
|
|
4734
|
+
}
|
|
4735
|
+
]
|
|
4736
|
+
}
|
|
4737
|
+
],
|
|
4738
|
+
"attributes": [
|
|
4739
|
+
{
|
|
4740
|
+
"name": "has-content",
|
|
4741
|
+
"type": {
|
|
4742
|
+
"text": "boolean"
|
|
4743
|
+
},
|
|
4744
|
+
"default": "false",
|
|
4745
|
+
"description": "Reflected to a `has-content` attribute so the host can collapse when there is\nnothing to render. True only while loading or when loaded with at least one\nsuggestion; idle, errored, and empty-loaded states render nothing.",
|
|
4746
|
+
"fieldName": "hasContent"
|
|
4747
|
+
}
|
|
4748
|
+
],
|
|
4749
|
+
"superclass": {
|
|
4750
|
+
"name": "GenesisElement",
|
|
4751
|
+
"package": "@genesislcap/web-core"
|
|
4752
|
+
},
|
|
4753
|
+
"tagName": "chat-suggestions",
|
|
4754
|
+
"customElement": true
|
|
4755
|
+
}
|
|
4756
|
+
],
|
|
4757
|
+
"exports": [
|
|
4977
4758
|
{
|
|
4978
4759
|
"kind": "js",
|
|
4979
|
-
"name": "
|
|
4760
|
+
"name": "ChatSuggestions",
|
|
4980
4761
|
"declaration": {
|
|
4981
|
-
"name": "
|
|
4982
|
-
"
|
|
4762
|
+
"name": "ChatSuggestions",
|
|
4763
|
+
"module": "src/suggestions/chat-suggestions.ts"
|
|
4983
4764
|
}
|
|
4984
4765
|
},
|
|
4985
4766
|
{
|
|
4986
|
-
"kind": "
|
|
4987
|
-
"name": "
|
|
4767
|
+
"kind": "custom-element-definition",
|
|
4768
|
+
"name": "chat-suggestions",
|
|
4988
4769
|
"declaration": {
|
|
4989
|
-
"name": "
|
|
4990
|
-
"
|
|
4770
|
+
"name": "ChatSuggestions",
|
|
4771
|
+
"module": "src/suggestions/chat-suggestions.ts"
|
|
4991
4772
|
}
|
|
4992
4773
|
}
|
|
4993
4774
|
]
|
|
4994
4775
|
},
|
|
4995
4776
|
{
|
|
4996
4777
|
"kind": "javascript-module",
|
|
4997
|
-
"path": "src/
|
|
4998
|
-
"declarations": [
|
|
4999
|
-
|
|
5000
|
-
"kind": "variable",
|
|
5001
|
-
"name": "logger"
|
|
5002
|
-
}
|
|
5003
|
-
],
|
|
5004
|
-
"exports": [
|
|
5005
|
-
{
|
|
5006
|
-
"kind": "js",
|
|
5007
|
-
"name": "logger",
|
|
5008
|
-
"declaration": {
|
|
5009
|
-
"name": "logger",
|
|
5010
|
-
"module": "src/utils/logger.ts"
|
|
5011
|
-
}
|
|
5012
|
-
}
|
|
5013
|
-
]
|
|
4778
|
+
"path": "src/tags/index.ts",
|
|
4779
|
+
"declarations": [],
|
|
4780
|
+
"exports": []
|
|
5014
4781
|
},
|
|
5015
4782
|
{
|
|
5016
4783
|
"kind": "javascript-module",
|
|
5017
|
-
"path": "src/
|
|
5018
|
-
"declarations": [
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
4784
|
+
"path": "src/types/ai-chat-widget.ts",
|
|
4785
|
+
"declarations": [],
|
|
4786
|
+
"exports": []
|
|
4787
|
+
},
|
|
4788
|
+
{
|
|
4789
|
+
"kind": "javascript-module",
|
|
4790
|
+
"path": "src/types/interaction-context.ts",
|
|
4791
|
+
"declarations": [],
|
|
4792
|
+
"exports": []
|
|
4793
|
+
},
|
|
4794
|
+
{
|
|
4795
|
+
"kind": "javascript-module",
|
|
4796
|
+
"path": "src/utils/animated-panel-toggle.ts",
|
|
4797
|
+
"declarations": [],
|
|
4798
|
+
"exports": []
|
|
4799
|
+
},
|
|
4800
|
+
{
|
|
4801
|
+
"kind": "javascript-module",
|
|
4802
|
+
"path": "src/utils/animation-exclusivity.ts",
|
|
4803
|
+
"declarations": [],
|
|
4804
|
+
"exports": []
|
|
4805
|
+
},
|
|
4806
|
+
{
|
|
4807
|
+
"kind": "javascript-module",
|
|
4808
|
+
"path": "src/utils/collect-session-models.ts",
|
|
4809
|
+
"declarations": [
|
|
5037
4810
|
{
|
|
5038
4811
|
"kind": "function",
|
|
5039
|
-
"name": "
|
|
4812
|
+
"name": "collectSessionModels",
|
|
5040
4813
|
"return": {
|
|
5041
4814
|
"type": {
|
|
5042
|
-
"text": "
|
|
4815
|
+
"text": "CostSessionModelEntry[]"
|
|
5043
4816
|
}
|
|
5044
4817
|
},
|
|
5045
4818
|
"parameters": [
|
|
5046
4819
|
{
|
|
5047
4820
|
"name": "messages",
|
|
5048
4821
|
"type": {
|
|
5049
|
-
"text": "ChatMessage[]"
|
|
4822
|
+
"text": "readonly ChatMessage[]"
|
|
4823
|
+
}
|
|
4824
|
+
},
|
|
4825
|
+
{
|
|
4826
|
+
"name": "providerStatuses",
|
|
4827
|
+
"default": "[]",
|
|
4828
|
+
"type": {
|
|
4829
|
+
"text": "readonly AIProviderRegistryStatusEntry[]"
|
|
5050
4830
|
}
|
|
5051
4831
|
}
|
|
5052
4832
|
],
|
|
5053
|
-
"description": "
|
|
4833
|
+
"description": "Unique models used across a message list (includes sub-agent traces)."
|
|
4834
|
+
}
|
|
4835
|
+
],
|
|
4836
|
+
"exports": [
|
|
4837
|
+
{
|
|
4838
|
+
"kind": "js",
|
|
4839
|
+
"name": "collectSessionModels",
|
|
4840
|
+
"declaration": {
|
|
4841
|
+
"name": "collectSessionModels",
|
|
4842
|
+
"module": "src/utils/collect-session-models.ts"
|
|
4843
|
+
}
|
|
4844
|
+
}
|
|
4845
|
+
]
|
|
4846
|
+
},
|
|
4847
|
+
{
|
|
4848
|
+
"kind": "javascript-module",
|
|
4849
|
+
"path": "src/utils/condense-history.ts",
|
|
4850
|
+
"declarations": [
|
|
4851
|
+
{
|
|
4852
|
+
"kind": "variable",
|
|
4853
|
+
"name": "CONDENSE_MIN_CHARS",
|
|
4854
|
+
"type": {
|
|
4855
|
+
"text": "number"
|
|
4856
|
+
},
|
|
4857
|
+
"default": "1000",
|
|
4858
|
+
"description": "Below this serialized size a tool payload isn't worth condensing — the stub\nwould save little and cost a breadcrumb. A driver-level floor so the public\n`condenseWhen` API needs no per-policy threshold field."
|
|
4859
|
+
},
|
|
4860
|
+
{
|
|
4861
|
+
"kind": "variable",
|
|
4862
|
+
"name": "CONDENSED_ARGS_KEY",
|
|
4863
|
+
"type": {
|
|
4864
|
+
"text": "string"
|
|
4865
|
+
},
|
|
4866
|
+
"default": "'condensed'",
|
|
4867
|
+
"description": "Key the collapsed args are stored under — a tool-call's args must stay a Record."
|
|
5054
4868
|
},
|
|
5055
4869
|
{
|
|
5056
4870
|
"kind": "function",
|
|
5057
|
-
"name": "
|
|
4871
|
+
"name": "applyCondensation",
|
|
5058
4872
|
"return": {
|
|
5059
4873
|
"type": {
|
|
5060
4874
|
"text": "ChatMessage[]"
|
|
@@ -5062,581 +4876,637 @@
|
|
|
5062
4876
|
},
|
|
5063
4877
|
"parameters": [
|
|
5064
4878
|
{
|
|
5065
|
-
"name": "
|
|
4879
|
+
"name": "history",
|
|
5066
4880
|
"type": {
|
|
5067
4881
|
"text": "ChatMessage[]"
|
|
5068
|
-
}
|
|
4882
|
+
},
|
|
4883
|
+
"description": "The to-model history copy to rewrite (not mutated)."
|
|
5069
4884
|
},
|
|
5070
4885
|
{
|
|
5071
|
-
"name": "
|
|
4886
|
+
"name": "policies",
|
|
5072
4887
|
"type": {
|
|
5073
|
-
"text": "
|
|
5074
|
-
}
|
|
4888
|
+
"text": "Map<string, RegisteredCondensePolicy>"
|
|
4889
|
+
},
|
|
4890
|
+
"description": "The driver's registry, keyed by tool-call id. Its entries'\n`reported*` flags are flipped as payloads first collapse."
|
|
4891
|
+
},
|
|
4892
|
+
{
|
|
4893
|
+
"name": "ctx",
|
|
4894
|
+
"type": {
|
|
4895
|
+
"text": "CondenseContext"
|
|
4896
|
+
},
|
|
4897
|
+
"description": "The driver's live clocks (model-call / turn / agent-activation)."
|
|
4898
|
+
},
|
|
4899
|
+
{
|
|
4900
|
+
"name": "onCondensed",
|
|
4901
|
+
"type": {
|
|
4902
|
+
"text": "(detail: CondensedEventDetail) => void"
|
|
4903
|
+
},
|
|
4904
|
+
"description": "Invoked once per payload at its full→stub transition."
|
|
5075
4905
|
}
|
|
5076
4906
|
],
|
|
5077
|
-
"description": "
|
|
4907
|
+
"description": "Collapse stale tool payloads (declared via `condenseWhen`) out of the\nmodel-bound history. Pure over the `history` array — it emits new message\nobjects and never mutates the input messages (mirroring the agent-masking\ntransform). It DOES, however, flip the `reported*` flag on the matching\n`policies` entry the first time a payload collapses — the report-once gate that\nkeeps `onCondensed` firing once per (tool call, payload) even though the\ncollapse itself re-runs before every provider call.\n\nTriggers (a policy may list several via `on: Trigger[]` — the FIRST to fire\ncollapses the payload; all are monotonic, so the collapse never reverts):\n- `superseded` — among all registered calls sharing a `by` key, the LAST in\n history order survives; every earlier one's targeted payload collapses. A\n re-call with the same key becomes the new survivor and re-arms the rest.\n- `age` — the result is first visible one model-call after the call, so `turns`\n is how many model-calls may see the full result before it collapses\n (fires when `modelCall − callModelCall > turns`): `turns: 1` is seen once,\n then collapses. The clock is monotonic across turns.\n- `turnEnd` — collapses once the turn (`sendMessage`) that made the call has\n ended (fires when `turn > callTurn`): full for the rest of that request,\n gone on every later one.\n- `agentEnd` — collapses once the agent activation that made the call has ended\n (a swap to another agent, or `releaseAgent`/`completeSubAgent`): kept across\n all of the agent's turns, dropped when its flow finishes.\n- `phaseEnd` — collapses once the app advances its phase epoch via `endPhase()`\n after the call (a sub-`agentEnd` boundary the author declares), OR at\n `agentEnd` as a backstop if no boundary is ever declared.\n\nThe tool-call/result envelope is never removed (providers reject orphaned\ncalls/results) — only the args object or the result content is replaced."
|
|
5078
4908
|
}
|
|
5079
4909
|
],
|
|
5080
4910
|
"exports": [
|
|
5081
4911
|
{
|
|
5082
4912
|
"kind": "js",
|
|
5083
|
-
"name": "
|
|
4913
|
+
"name": "CONDENSE_MIN_CHARS",
|
|
5084
4914
|
"declaration": {
|
|
5085
|
-
"name": "
|
|
5086
|
-
"module": "src/utils/
|
|
4915
|
+
"name": "CONDENSE_MIN_CHARS",
|
|
4916
|
+
"module": "src/utils/condense-history.ts"
|
|
5087
4917
|
}
|
|
5088
4918
|
},
|
|
5089
4919
|
{
|
|
5090
4920
|
"kind": "js",
|
|
5091
|
-
"name": "
|
|
4921
|
+
"name": "CONDENSED_ARGS_KEY",
|
|
5092
4922
|
"declaration": {
|
|
5093
|
-
"name": "
|
|
5094
|
-
"module": "src/utils/
|
|
4923
|
+
"name": "CONDENSED_ARGS_KEY",
|
|
4924
|
+
"module": "src/utils/condense-history.ts"
|
|
5095
4925
|
}
|
|
5096
4926
|
},
|
|
5097
4927
|
{
|
|
5098
4928
|
"kind": "js",
|
|
5099
|
-
"name": "
|
|
4929
|
+
"name": "applyCondensation",
|
|
5100
4930
|
"declaration": {
|
|
5101
|
-
"name": "
|
|
5102
|
-
"module": "src/utils/
|
|
4931
|
+
"name": "applyCondensation",
|
|
4932
|
+
"module": "src/utils/condense-history.ts"
|
|
5103
4933
|
}
|
|
5104
4934
|
}
|
|
5105
4935
|
]
|
|
5106
4936
|
},
|
|
5107
4937
|
{
|
|
5108
4938
|
"kind": "javascript-module",
|
|
5109
|
-
"path": "src/utils/
|
|
4939
|
+
"path": "src/utils/cost-session-history.ts",
|
|
5110
4940
|
"declarations": [
|
|
5111
4941
|
{
|
|
5112
4942
|
"kind": "function",
|
|
5113
|
-
"name": "
|
|
4943
|
+
"name": "costHistoryStorageKey",
|
|
5114
4944
|
"return": {
|
|
5115
4945
|
"type": {
|
|
5116
|
-
"text": "
|
|
4946
|
+
"text": "string"
|
|
5117
4947
|
}
|
|
5118
4948
|
},
|
|
5119
4949
|
"parameters": [
|
|
5120
4950
|
{
|
|
5121
|
-
"name": "
|
|
4951
|
+
"name": "scope",
|
|
5122
4952
|
"type": {
|
|
5123
|
-
"text": "
|
|
4953
|
+
"text": "string"
|
|
5124
4954
|
}
|
|
5125
4955
|
}
|
|
5126
4956
|
],
|
|
5127
|
-
"description": "
|
|
5128
|
-
}
|
|
5129
|
-
],
|
|
5130
|
-
"exports": [
|
|
5131
|
-
{
|
|
5132
|
-
"kind": "js",
|
|
5133
|
-
"name": "resolveCostHistoryConfig",
|
|
5134
|
-
"declaration": {
|
|
5135
|
-
"name": "resolveCostHistoryConfig",
|
|
5136
|
-
"module": "src/utils/resolve-cost-history-config.ts"
|
|
5137
|
-
}
|
|
5138
|
-
}
|
|
5139
|
-
]
|
|
5140
|
-
},
|
|
5141
|
-
{
|
|
5142
|
-
"kind": "javascript-module",
|
|
5143
|
-
"path": "src/utils/resolve-preference-baseline.ts",
|
|
5144
|
-
"declarations": [],
|
|
5145
|
-
"exports": []
|
|
5146
|
-
},
|
|
5147
|
-
{
|
|
5148
|
-
"kind": "javascript-module",
|
|
5149
|
-
"path": "src/utils/strip-agent-handlers.ts",
|
|
5150
|
-
"declarations": [],
|
|
5151
|
-
"exports": []
|
|
5152
|
-
},
|
|
5153
|
-
{
|
|
5154
|
-
"kind": "javascript-module",
|
|
5155
|
-
"path": "src/utils/sum-costs.ts",
|
|
5156
|
-
"declarations": [],
|
|
5157
|
-
"exports": []
|
|
5158
|
-
},
|
|
5159
|
-
{
|
|
5160
|
-
"kind": "javascript-module",
|
|
5161
|
-
"path": "src/utils/sum-tokens.ts",
|
|
5162
|
-
"declarations": [
|
|
4957
|
+
"description": "localStorage key for a host-scoped cost history list."
|
|
4958
|
+
},
|
|
5163
4959
|
{
|
|
5164
4960
|
"kind": "function",
|
|
5165
|
-
"name": "
|
|
4961
|
+
"name": "loadCostSessionHistory",
|
|
5166
4962
|
"return": {
|
|
5167
4963
|
"type": {
|
|
5168
|
-
"text": "
|
|
4964
|
+
"text": "CostSessionRecord[]"
|
|
5169
4965
|
}
|
|
5170
4966
|
},
|
|
5171
4967
|
"parameters": [
|
|
5172
4968
|
{
|
|
5173
|
-
"name": "
|
|
4969
|
+
"name": "scope",
|
|
5174
4970
|
"type": {
|
|
5175
|
-
"text": "
|
|
4971
|
+
"text": "string"
|
|
5176
4972
|
}
|
|
5177
4973
|
}
|
|
5178
4974
|
],
|
|
5179
|
-
"description": "
|
|
5180
|
-
}
|
|
5181
|
-
],
|
|
5182
|
-
"exports": [
|
|
5183
|
-
{
|
|
5184
|
-
"kind": "js",
|
|
5185
|
-
"name": "formatCompactTokenCountSafe",
|
|
5186
|
-
"declaration": {
|
|
5187
|
-
"name": "formatCompactTokenCountSafe",
|
|
5188
|
-
"module": "src/utils/sum-tokens.ts"
|
|
5189
|
-
}
|
|
5190
|
-
}
|
|
5191
|
-
]
|
|
5192
|
-
},
|
|
5193
|
-
{
|
|
5194
|
-
"kind": "javascript-module",
|
|
5195
|
-
"path": "src/utils/tool-fold.ts",
|
|
5196
|
-
"declarations": [
|
|
4975
|
+
"description": "Load persisted cost sessions for a scope (newest first)."
|
|
4976
|
+
},
|
|
5197
4977
|
{
|
|
5198
4978
|
"kind": "function",
|
|
5199
|
-
"name": "
|
|
4979
|
+
"name": "saveCostSessionHistory",
|
|
5200
4980
|
"return": {
|
|
5201
4981
|
"type": {
|
|
5202
|
-
"text": "
|
|
4982
|
+
"text": "void"
|
|
5203
4983
|
}
|
|
5204
4984
|
},
|
|
5205
4985
|
"parameters": [
|
|
5206
4986
|
{
|
|
5207
|
-
"name": "
|
|
4987
|
+
"name": "scope",
|
|
5208
4988
|
"type": {
|
|
5209
|
-
"text": "
|
|
4989
|
+
"text": "string"
|
|
4990
|
+
}
|
|
4991
|
+
},
|
|
4992
|
+
{
|
|
4993
|
+
"name": "records",
|
|
4994
|
+
"type": {
|
|
4995
|
+
"text": "CostSessionRecord[]"
|
|
5210
4996
|
}
|
|
5211
4997
|
}
|
|
5212
4998
|
],
|
|
5213
|
-
"description": "
|
|
4999
|
+
"description": "Replace the persisted list for a scope."
|
|
5214
5000
|
},
|
|
5215
5001
|
{
|
|
5216
5002
|
"kind": "function",
|
|
5217
|
-
"name": "
|
|
5003
|
+
"name": "appendCostSessionRecord",
|
|
5218
5004
|
"return": {
|
|
5219
5005
|
"type": {
|
|
5220
|
-
"text": "
|
|
5006
|
+
"text": "CostSessionRecord[]"
|
|
5221
5007
|
}
|
|
5222
5008
|
},
|
|
5223
5009
|
"parameters": [
|
|
5224
5010
|
{
|
|
5225
|
-
"name": "
|
|
5011
|
+
"name": "scope",
|
|
5226
5012
|
"type": {
|
|
5227
|
-
"text": "
|
|
5013
|
+
"text": "string"
|
|
5228
5014
|
}
|
|
5229
5015
|
},
|
|
5230
5016
|
{
|
|
5231
|
-
"name": "
|
|
5017
|
+
"name": "record",
|
|
5232
5018
|
"type": {
|
|
5233
|
-
"text": "
|
|
5019
|
+
"text": "CostSessionRecord"
|
|
5234
5020
|
}
|
|
5235
5021
|
}
|
|
5236
5022
|
],
|
|
5237
|
-
"description": "
|
|
5238
|
-
}
|
|
5239
|
-
],
|
|
5240
|
-
"exports": [
|
|
5241
|
-
{
|
|
5242
|
-
"kind": "js",
|
|
5243
|
-
"name": "createToolFold",
|
|
5244
|
-
"declaration": {
|
|
5245
|
-
"name": "createToolFold",
|
|
5246
|
-
"module": "src/utils/tool-fold.ts"
|
|
5247
|
-
}
|
|
5023
|
+
"description": "Prepend a record and persist. Returns the updated list."
|
|
5248
5024
|
},
|
|
5249
5025
|
{
|
|
5250
|
-
"kind": "
|
|
5251
|
-
"name": "
|
|
5252
|
-
"
|
|
5253
|
-
"
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
},
|
|
5259
|
-
{
|
|
5260
|
-
"kind": "javascript-module",
|
|
5261
|
-
"path": "src/utils/with-timeout.ts",
|
|
5262
|
-
"declarations": [],
|
|
5263
|
-
"exports": []
|
|
5264
|
-
},
|
|
5265
|
-
{
|
|
5266
|
-
"kind": "javascript-module",
|
|
5267
|
-
"path": "src/components/activity-halo/activity-halo.ts",
|
|
5268
|
-
"declarations": [
|
|
5269
|
-
{
|
|
5270
|
-
"kind": "class",
|
|
5271
|
-
"description": "Wrapper component that shows an `<ai-halo-overlay>` when the AI assistant\nis executing one of the declared tool names.",
|
|
5272
|
-
"name": "AiActivityHalo",
|
|
5273
|
-
"members": [
|
|
5026
|
+
"kind": "function",
|
|
5027
|
+
"name": "removeCostSessionRecord",
|
|
5028
|
+
"return": {
|
|
5029
|
+
"type": {
|
|
5030
|
+
"text": "CostSessionRecord[]"
|
|
5031
|
+
}
|
|
5032
|
+
},
|
|
5033
|
+
"parameters": [
|
|
5274
5034
|
{
|
|
5275
|
-
"
|
|
5276
|
-
"name": "tools",
|
|
5035
|
+
"name": "scope",
|
|
5277
5036
|
"type": {
|
|
5278
5037
|
"text": "string"
|
|
5279
|
-
}
|
|
5280
|
-
"default": "''",
|
|
5281
|
-
"description": "Comma-separated list of tool names this element reacts to."
|
|
5282
|
-
},
|
|
5283
|
-
{
|
|
5284
|
-
"kind": "field",
|
|
5285
|
-
"name": "minShowTime",
|
|
5286
|
-
"type": {
|
|
5287
|
-
"text": "number"
|
|
5288
|
-
},
|
|
5289
|
-
"default": "600",
|
|
5290
|
-
"description": "Minimum time in ms the halo stays visible after activation."
|
|
5291
|
-
},
|
|
5292
|
-
{
|
|
5293
|
-
"kind": "field",
|
|
5294
|
-
"name": "unsubBus",
|
|
5295
|
-
"type": {
|
|
5296
|
-
"text": "() => void | undefined"
|
|
5297
|
-
},
|
|
5298
|
-
"privacy": "private"
|
|
5299
|
-
},
|
|
5300
|
-
{
|
|
5301
|
-
"kind": "field",
|
|
5302
|
-
"name": "hideTimeout",
|
|
5303
|
-
"type": {
|
|
5304
|
-
"text": "ReturnType<typeof setTimeout> | undefined"
|
|
5305
|
-
},
|
|
5306
|
-
"privacy": "private"
|
|
5038
|
+
}
|
|
5307
5039
|
},
|
|
5308
5040
|
{
|
|
5309
|
-
"
|
|
5310
|
-
"name": "startTime",
|
|
5041
|
+
"name": "id",
|
|
5311
5042
|
"type": {
|
|
5312
|
-
"text": "
|
|
5313
|
-
}
|
|
5314
|
-
"privacy": "private",
|
|
5315
|
-
"default": "0"
|
|
5316
|
-
},
|
|
5317
|
-
{
|
|
5318
|
-
"kind": "method",
|
|
5319
|
-
"name": "activate",
|
|
5320
|
-
"privacy": "private"
|
|
5321
|
-
},
|
|
5322
|
-
{
|
|
5323
|
-
"kind": "method",
|
|
5324
|
-
"name": "scheduleDeactivate",
|
|
5325
|
-
"privacy": "private"
|
|
5043
|
+
"text": "string"
|
|
5044
|
+
}
|
|
5326
5045
|
}
|
|
5327
5046
|
],
|
|
5328
|
-
"
|
|
5047
|
+
"description": "Remove one record by id. Returns the updated list."
|
|
5048
|
+
},
|
|
5049
|
+
{
|
|
5050
|
+
"kind": "function",
|
|
5051
|
+
"name": "clearCostSessionHistory",
|
|
5052
|
+
"return": {
|
|
5053
|
+
"type": {
|
|
5054
|
+
"text": "void"
|
|
5055
|
+
}
|
|
5056
|
+
},
|
|
5057
|
+
"parameters": [
|
|
5329
5058
|
{
|
|
5330
|
-
"name": "
|
|
5059
|
+
"name": "scope",
|
|
5331
5060
|
"type": {
|
|
5332
5061
|
"text": "string"
|
|
5333
|
-
}
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5062
|
+
}
|
|
5063
|
+
}
|
|
5064
|
+
],
|
|
5065
|
+
"description": "Clear all persisted records for a scope."
|
|
5066
|
+
},
|
|
5067
|
+
{
|
|
5068
|
+
"kind": "function",
|
|
5069
|
+
"name": "formatCostSessionDate",
|
|
5070
|
+
"return": {
|
|
5071
|
+
"type": {
|
|
5072
|
+
"text": "string"
|
|
5073
|
+
}
|
|
5074
|
+
},
|
|
5075
|
+
"parameters": [
|
|
5338
5076
|
{
|
|
5339
|
-
"name": "
|
|
5077
|
+
"name": "iso",
|
|
5340
5078
|
"type": {
|
|
5341
|
-
"text": "
|
|
5342
|
-
}
|
|
5343
|
-
"default": "DEFAULT_MIN_SHOW_TIME",
|
|
5344
|
-
"description": "Minimum time in ms the halo stays visible after activation.",
|
|
5345
|
-
"resolveInitializer": {
|
|
5346
|
-
"module": "src/components/activity-halo/activity-halo.ts"
|
|
5347
|
-
},
|
|
5348
|
-
"fieldName": "minShowTime"
|
|
5079
|
+
"text": "string"
|
|
5080
|
+
}
|
|
5349
5081
|
}
|
|
5350
5082
|
],
|
|
5351
|
-
"
|
|
5352
|
-
"name": "GenesisElement",
|
|
5353
|
-
"package": "@genesislcap/web-core"
|
|
5354
|
-
},
|
|
5355
|
-
"tagName": "ai-activity-halo",
|
|
5356
|
-
"customElement": true
|
|
5083
|
+
"description": "Display date for a history row (e.g. \"Jun 14, 2026\")."
|
|
5357
5084
|
}
|
|
5358
5085
|
],
|
|
5359
5086
|
"exports": [
|
|
5360
5087
|
{
|
|
5361
5088
|
"kind": "js",
|
|
5362
|
-
"name": "
|
|
5089
|
+
"name": "costHistoryStorageKey",
|
|
5363
5090
|
"declaration": {
|
|
5364
|
-
"name": "
|
|
5365
|
-
"module": "src/
|
|
5091
|
+
"name": "costHistoryStorageKey",
|
|
5092
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5366
5093
|
}
|
|
5367
5094
|
},
|
|
5368
5095
|
{
|
|
5369
|
-
"kind": "
|
|
5370
|
-
"name": "
|
|
5096
|
+
"kind": "js",
|
|
5097
|
+
"name": "loadCostSessionHistory",
|
|
5371
5098
|
"declaration": {
|
|
5372
|
-
"name": "
|
|
5373
|
-
"module": "src/
|
|
5099
|
+
"name": "loadCostSessionHistory",
|
|
5100
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5101
|
+
}
|
|
5102
|
+
},
|
|
5103
|
+
{
|
|
5104
|
+
"kind": "js",
|
|
5105
|
+
"name": "saveCostSessionHistory",
|
|
5106
|
+
"declaration": {
|
|
5107
|
+
"name": "saveCostSessionHistory",
|
|
5108
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5109
|
+
}
|
|
5110
|
+
},
|
|
5111
|
+
{
|
|
5112
|
+
"kind": "js",
|
|
5113
|
+
"name": "appendCostSessionRecord",
|
|
5114
|
+
"declaration": {
|
|
5115
|
+
"name": "appendCostSessionRecord",
|
|
5116
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5117
|
+
}
|
|
5118
|
+
},
|
|
5119
|
+
{
|
|
5120
|
+
"kind": "js",
|
|
5121
|
+
"name": "removeCostSessionRecord",
|
|
5122
|
+
"declaration": {
|
|
5123
|
+
"name": "removeCostSessionRecord",
|
|
5124
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5125
|
+
}
|
|
5126
|
+
},
|
|
5127
|
+
{
|
|
5128
|
+
"kind": "js",
|
|
5129
|
+
"name": "clearCostSessionHistory",
|
|
5130
|
+
"declaration": {
|
|
5131
|
+
"name": "clearCostSessionHistory",
|
|
5132
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5133
|
+
}
|
|
5134
|
+
},
|
|
5135
|
+
{
|
|
5136
|
+
"kind": "js",
|
|
5137
|
+
"name": "formatCostSessionDate",
|
|
5138
|
+
"declaration": {
|
|
5139
|
+
"name": "formatCostSessionDate",
|
|
5140
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5374
5141
|
}
|
|
5375
5142
|
}
|
|
5376
5143
|
]
|
|
5377
5144
|
},
|
|
5378
5145
|
{
|
|
5379
5146
|
"kind": "javascript-module",
|
|
5380
|
-
"path": "src/
|
|
5147
|
+
"path": "src/utils/derive-cost-session-title.ts",
|
|
5381
5148
|
"declarations": [
|
|
5382
5149
|
{
|
|
5383
5150
|
"kind": "variable",
|
|
5384
|
-
"name": "
|
|
5151
|
+
"name": "COST_SESSION_TITLE_MAX_WORDS",
|
|
5385
5152
|
"type": {
|
|
5386
|
-
"text": "
|
|
5153
|
+
"text": "number"
|
|
5387
5154
|
},
|
|
5388
|
-
"default": "
|
|
5389
|
-
"description": "
|
|
5155
|
+
"default": "10",
|
|
5156
|
+
"description": "Max words kept from the first user turn when deriving a session title."
|
|
5157
|
+
},
|
|
5158
|
+
{
|
|
5159
|
+
"kind": "variable",
|
|
5160
|
+
"name": "COST_SESSION_TITLE_MAX_CHARS",
|
|
5161
|
+
"type": {
|
|
5162
|
+
"text": "number"
|
|
5163
|
+
},
|
|
5164
|
+
"default": "60",
|
|
5165
|
+
"description": "Hard cap on derived title length (ellipsis included)."
|
|
5166
|
+
},
|
|
5167
|
+
{
|
|
5168
|
+
"kind": "function",
|
|
5169
|
+
"name": "getChatMessageText",
|
|
5170
|
+
"return": {
|
|
5171
|
+
"type": {
|
|
5172
|
+
"text": "string"
|
|
5173
|
+
}
|
|
5174
|
+
},
|
|
5175
|
+
"parameters": [
|
|
5176
|
+
{
|
|
5177
|
+
"name": "content",
|
|
5178
|
+
"type": {
|
|
5179
|
+
"text": "ChatMessage['content']"
|
|
5180
|
+
}
|
|
5181
|
+
}
|
|
5182
|
+
],
|
|
5183
|
+
"description": "Plain text from a chat message `content` field."
|
|
5184
|
+
},
|
|
5185
|
+
{
|
|
5186
|
+
"kind": "function",
|
|
5187
|
+
"name": "truncateCostSessionTitle",
|
|
5188
|
+
"return": {
|
|
5189
|
+
"type": {
|
|
5190
|
+
"text": "string"
|
|
5191
|
+
}
|
|
5192
|
+
},
|
|
5193
|
+
"parameters": [
|
|
5194
|
+
{
|
|
5195
|
+
"name": "text",
|
|
5196
|
+
"type": {
|
|
5197
|
+
"text": "string"
|
|
5198
|
+
}
|
|
5199
|
+
}
|
|
5200
|
+
],
|
|
5201
|
+
"description": "Trim a raw user phrase to a display-friendly session title: first sentence,\nthen word cap, then character cap."
|
|
5202
|
+
},
|
|
5203
|
+
{
|
|
5204
|
+
"kind": "function",
|
|
5205
|
+
"name": "deriveCostSessionTitleFromMessages",
|
|
5206
|
+
"return": {
|
|
5207
|
+
"type": {
|
|
5208
|
+
"text": "string | undefined"
|
|
5209
|
+
}
|
|
5210
|
+
},
|
|
5211
|
+
"parameters": [
|
|
5212
|
+
{
|
|
5213
|
+
"name": "messages",
|
|
5214
|
+
"type": {
|
|
5215
|
+
"text": "readonly ChatMessage[]"
|
|
5216
|
+
}
|
|
5217
|
+
}
|
|
5218
|
+
],
|
|
5219
|
+
"description": "First non-empty user message in the thread, shortened for cost history."
|
|
5220
|
+
},
|
|
5221
|
+
{
|
|
5222
|
+
"kind": "function",
|
|
5223
|
+
"name": "resolveCostSessionTitle",
|
|
5224
|
+
"return": {
|
|
5225
|
+
"type": {
|
|
5226
|
+
"text": "string"
|
|
5227
|
+
}
|
|
5228
|
+
},
|
|
5229
|
+
"parameters": [
|
|
5230
|
+
{
|
|
5231
|
+
"name": "input",
|
|
5232
|
+
"type": {
|
|
5233
|
+
"text": "ResolveCostSessionTitleInput"
|
|
5234
|
+
}
|
|
5235
|
+
}
|
|
5236
|
+
],
|
|
5237
|
+
"description": "Resolve the label stored on a finalized cost session record."
|
|
5390
5238
|
}
|
|
5391
5239
|
],
|
|
5392
5240
|
"exports": [
|
|
5393
5241
|
{
|
|
5394
5242
|
"kind": "js",
|
|
5395
|
-
"name": "
|
|
5243
|
+
"name": "COST_SESSION_TITLE_MAX_WORDS",
|
|
5396
5244
|
"declaration": {
|
|
5397
|
-
"name": "
|
|
5398
|
-
"module": "src/
|
|
5245
|
+
"name": "COST_SESSION_TITLE_MAX_WORDS",
|
|
5246
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
5399
5247
|
}
|
|
5400
|
-
}
|
|
5401
|
-
]
|
|
5402
|
-
},
|
|
5403
|
-
{
|
|
5404
|
-
"kind": "javascript-module",
|
|
5405
|
-
"path": "src/components/agent-picker/agent-picker.styles.ts",
|
|
5406
|
-
"declarations": [
|
|
5248
|
+
},
|
|
5407
5249
|
{
|
|
5408
|
-
"kind": "
|
|
5409
|
-
"name": "
|
|
5410
|
-
"
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5250
|
+
"kind": "js",
|
|
5251
|
+
"name": "COST_SESSION_TITLE_MAX_CHARS",
|
|
5252
|
+
"declaration": {
|
|
5253
|
+
"name": "COST_SESSION_TITLE_MAX_CHARS",
|
|
5254
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
5255
|
+
}
|
|
5256
|
+
},
|
|
5414
5257
|
{
|
|
5415
5258
|
"kind": "js",
|
|
5416
|
-
"name": "
|
|
5259
|
+
"name": "getChatMessageText",
|
|
5417
5260
|
"declaration": {
|
|
5418
|
-
"name": "
|
|
5419
|
-
"module": "src/
|
|
5261
|
+
"name": "getChatMessageText",
|
|
5262
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
5263
|
+
}
|
|
5264
|
+
},
|
|
5265
|
+
{
|
|
5266
|
+
"kind": "js",
|
|
5267
|
+
"name": "truncateCostSessionTitle",
|
|
5268
|
+
"declaration": {
|
|
5269
|
+
"name": "truncateCostSessionTitle",
|
|
5270
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
5271
|
+
}
|
|
5272
|
+
},
|
|
5273
|
+
{
|
|
5274
|
+
"kind": "js",
|
|
5275
|
+
"name": "deriveCostSessionTitleFromMessages",
|
|
5276
|
+
"declaration": {
|
|
5277
|
+
"name": "deriveCostSessionTitleFromMessages",
|
|
5278
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
5279
|
+
}
|
|
5280
|
+
},
|
|
5281
|
+
{
|
|
5282
|
+
"kind": "js",
|
|
5283
|
+
"name": "resolveCostSessionTitle",
|
|
5284
|
+
"declaration": {
|
|
5285
|
+
"name": "resolveCostSessionTitle",
|
|
5286
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
5420
5287
|
}
|
|
5421
5288
|
}
|
|
5422
5289
|
]
|
|
5423
5290
|
},
|
|
5424
5291
|
{
|
|
5425
5292
|
"kind": "javascript-module",
|
|
5426
|
-
"path": "src/
|
|
5293
|
+
"path": "src/utils/flatten-sub-agent-messages.ts",
|
|
5427
5294
|
"declarations": [],
|
|
5428
5295
|
"exports": []
|
|
5429
5296
|
},
|
|
5430
5297
|
{
|
|
5431
5298
|
"kind": "javascript-module",
|
|
5432
|
-
"path": "src/
|
|
5299
|
+
"path": "src/utils/history-transform.ts",
|
|
5433
5300
|
"declarations": [
|
|
5434
5301
|
{
|
|
5435
|
-
"kind": "
|
|
5436
|
-
"
|
|
5437
|
-
"
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
"text": "string"
|
|
5444
|
-
},
|
|
5445
|
-
"default": "'rapid'",
|
|
5446
|
-
"description": "Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`."
|
|
5447
|
-
},
|
|
5448
|
-
{
|
|
5449
|
-
"kind": "field",
|
|
5450
|
-
"name": "mode",
|
|
5451
|
-
"type": {
|
|
5452
|
-
"text": "AgentPickerMode"
|
|
5453
|
-
},
|
|
5454
|
-
"default": "'disabled'",
|
|
5455
|
-
"description": "Picker variant, sourced from the assistant's `chatConfig.agentPicker`."
|
|
5456
|
-
},
|
|
5457
|
-
{
|
|
5458
|
-
"kind": "field",
|
|
5459
|
-
"name": "agents",
|
|
5460
|
-
"type": {
|
|
5461
|
-
"text": "AgentConfig[]"
|
|
5462
|
-
},
|
|
5463
|
-
"default": "[]",
|
|
5464
|
-
"description": "Top-level agents passed to the assistant."
|
|
5465
|
-
},
|
|
5466
|
-
{
|
|
5467
|
-
"kind": "field",
|
|
5468
|
-
"name": "pinnedAgentName",
|
|
5469
|
-
"type": {
|
|
5470
|
-
"text": "string | null"
|
|
5471
|
-
},
|
|
5472
|
-
"default": "null",
|
|
5473
|
-
"description": "Currently pinned agent name, or `null` for Auto."
|
|
5474
|
-
},
|
|
5475
|
-
{
|
|
5476
|
-
"kind": "field",
|
|
5477
|
-
"name": "resizeObserver",
|
|
5478
|
-
"type": {
|
|
5479
|
-
"text": "ResizeObserver | undefined"
|
|
5480
|
-
},
|
|
5481
|
-
"privacy": "private"
|
|
5482
|
-
},
|
|
5483
|
-
{
|
|
5484
|
-
"kind": "field",
|
|
5485
|
-
"name": "selectableAgents",
|
|
5486
|
-
"type": {
|
|
5487
|
-
"text": "AgentConfig[]"
|
|
5488
|
-
},
|
|
5489
|
-
"description": "Top-level agents that opted in to manual selection.",
|
|
5490
|
-
"readonly": true
|
|
5491
|
-
},
|
|
5492
|
-
{
|
|
5493
|
-
"kind": "field",
|
|
5494
|
-
"name": "visible",
|
|
5495
|
-
"type": {
|
|
5496
|
-
"text": "boolean"
|
|
5497
|
-
},
|
|
5498
|
-
"description": "Whether the picker should render at all.",
|
|
5499
|
-
"readonly": true
|
|
5500
|
-
},
|
|
5501
|
-
{
|
|
5502
|
-
"kind": "field",
|
|
5503
|
-
"name": "effectiveMode",
|
|
5504
|
-
"type": {
|
|
5505
|
-
"text": "'select' | 'segmented-control'"
|
|
5506
|
-
},
|
|
5507
|
-
"description": "The variant actually rendered: `'select'` if user-configured or if the\nsegmented row currently overflows; `'segmented-control'` otherwise.",
|
|
5508
|
-
"readonly": true
|
|
5509
|
-
},
|
|
5510
|
-
{
|
|
5511
|
-
"kind": "method",
|
|
5512
|
-
"name": "agentsChanged",
|
|
5513
|
-
"return": {
|
|
5514
|
-
"type": {
|
|
5515
|
-
"text": "void"
|
|
5516
|
-
}
|
|
5517
|
-
},
|
|
5518
|
-
"description": "Re-measure when agents change — newly added selectable agents may push the\nsegmented row past the container's width."
|
|
5519
|
-
},
|
|
5520
|
-
{
|
|
5521
|
-
"kind": "method",
|
|
5522
|
-
"name": "modeChanged",
|
|
5523
|
-
"return": {
|
|
5524
|
-
"type": {
|
|
5525
|
-
"text": "void"
|
|
5526
|
-
}
|
|
5527
|
-
}
|
|
5528
|
-
},
|
|
5529
|
-
{
|
|
5530
|
-
"kind": "method",
|
|
5531
|
-
"name": "measureOverflow",
|
|
5532
|
-
"privacy": "private",
|
|
5533
|
-
"return": {
|
|
5534
|
-
"type": {
|
|
5535
|
-
"text": "void"
|
|
5536
|
-
}
|
|
5537
|
-
},
|
|
5538
|
-
"description": "Measures whether the segmented row's natural content width exceeds the\ncontainer's visible width. Bails when the row isn't currently rendered\n(e.g. when `mode !== 'segmented-control'`)."
|
|
5539
|
-
},
|
|
5540
|
-
{
|
|
5541
|
-
"kind": "method",
|
|
5542
|
-
"name": "selectAgent",
|
|
5543
|
-
"return": {
|
|
5544
|
-
"type": {
|
|
5545
|
-
"text": "void"
|
|
5546
|
-
}
|
|
5547
|
-
},
|
|
5548
|
-
"parameters": [
|
|
5549
|
-
{
|
|
5550
|
-
"name": "name",
|
|
5551
|
-
"type": {
|
|
5552
|
-
"text": "string | null"
|
|
5553
|
-
}
|
|
5554
|
-
}
|
|
5555
|
-
]
|
|
5556
|
-
},
|
|
5302
|
+
"kind": "function",
|
|
5303
|
+
"name": "transformHistoryForAgent",
|
|
5304
|
+
"return": {
|
|
5305
|
+
"type": {
|
|
5306
|
+
"text": "ChatMessage[]"
|
|
5307
|
+
}
|
|
5308
|
+
},
|
|
5309
|
+
"parameters": [
|
|
5557
5310
|
{
|
|
5558
|
-
"
|
|
5559
|
-
"
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
"text": "void"
|
|
5563
|
-
}
|
|
5564
|
-
},
|
|
5565
|
-
"parameters": [
|
|
5566
|
-
{
|
|
5567
|
-
"name": "value",
|
|
5568
|
-
"type": {
|
|
5569
|
-
"text": "string"
|
|
5570
|
-
}
|
|
5571
|
-
}
|
|
5572
|
-
],
|
|
5573
|
-
"description": "Maps a value from the segmented-control or select (which uses\nAGENT_PICKER_AUTO_VALUE for Auto) back to the `string | null` form\nexpected by `selectAgent`."
|
|
5311
|
+
"name": "history",
|
|
5312
|
+
"type": {
|
|
5313
|
+
"text": "ChatMessage[]"
|
|
5314
|
+
}
|
|
5574
5315
|
},
|
|
5575
5316
|
{
|
|
5576
|
-
"
|
|
5577
|
-
"name": "currentValue",
|
|
5317
|
+
"name": "agentName",
|
|
5578
5318
|
"type": {
|
|
5579
5319
|
"text": "string"
|
|
5580
|
-
}
|
|
5581
|
-
"description": "Current pinned agent name as a value the segmented-control / select can bind to.",
|
|
5582
|
-
"readonly": true
|
|
5320
|
+
}
|
|
5583
5321
|
}
|
|
5584
5322
|
],
|
|
5585
|
-
"
|
|
5323
|
+
"description": "Prepares history for the LLM only: masks tool call args and results from other\nagents so the active specialist is not confused by tools it does not have.\nCanonical history in `ChatDriver` stays unmasked for UI and logging."
|
|
5324
|
+
},
|
|
5325
|
+
{
|
|
5326
|
+
"kind": "function",
|
|
5327
|
+
"name": "applyHistoryCap",
|
|
5328
|
+
"return": {
|
|
5329
|
+
"type": {
|
|
5330
|
+
"text": "ChatMessage[]"
|
|
5331
|
+
}
|
|
5332
|
+
},
|
|
5333
|
+
"parameters": [
|
|
5586
5334
|
{
|
|
5587
|
-
"
|
|
5588
|
-
"
|
|
5335
|
+
"name": "history",
|
|
5336
|
+
"type": {
|
|
5337
|
+
"text": "readonly ChatMessage[]"
|
|
5338
|
+
}
|
|
5339
|
+
},
|
|
5340
|
+
{
|
|
5341
|
+
"name": "cap",
|
|
5342
|
+
"type": {
|
|
5343
|
+
"text": "number"
|
|
5344
|
+
}
|
|
5589
5345
|
}
|
|
5590
5346
|
],
|
|
5591
|
-
"
|
|
5347
|
+
"description": "Applies a history cap for sub-agent context: the last `cap` messages are passed\nverbatim; older messages have their tool payloads masked."
|
|
5348
|
+
},
|
|
5349
|
+
{
|
|
5350
|
+
"kind": "variable",
|
|
5351
|
+
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
5352
|
+
"type": {
|
|
5353
|
+
"text": "number"
|
|
5354
|
+
},
|
|
5355
|
+
"default": "4",
|
|
5356
|
+
"description": "Recent messages kept verbatim when compacting; everything earlier is summarized."
|
|
5357
|
+
},
|
|
5358
|
+
{
|
|
5359
|
+
"kind": "variable",
|
|
5360
|
+
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
5361
|
+
"type": {
|
|
5362
|
+
"text": "number"
|
|
5363
|
+
},
|
|
5364
|
+
"default": "4",
|
|
5365
|
+
"description": "Don't bother compacting unless at least this many messages would be summarized."
|
|
5366
|
+
},
|
|
5367
|
+
{
|
|
5368
|
+
"kind": "function",
|
|
5369
|
+
"name": "findCompactionCut",
|
|
5370
|
+
"return": {
|
|
5371
|
+
"type": {
|
|
5372
|
+
"text": "number | null"
|
|
5373
|
+
}
|
|
5374
|
+
},
|
|
5375
|
+
"parameters": [
|
|
5592
5376
|
{
|
|
5593
|
-
"name": "
|
|
5377
|
+
"name": "history",
|
|
5594
5378
|
"type": {
|
|
5595
|
-
"text": "
|
|
5596
|
-
}
|
|
5597
|
-
"default": "'rapid'",
|
|
5598
|
-
"description": "Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`.",
|
|
5599
|
-
"fieldName": "designSystemPrefix"
|
|
5379
|
+
"text": "readonly ChatMessage[]"
|
|
5380
|
+
}
|
|
5600
5381
|
}
|
|
5601
5382
|
],
|
|
5602
|
-
"
|
|
5603
|
-
|
|
5604
|
-
|
|
5383
|
+
"description": "Index at which the verbatim tail begins — everything before it gets summarized.\nThe tail starts on a clean turn boundary (a `user` message): a user message\nnever appears between a `tool_use` and its `tool_result`, so cutting there\nguarantees the summarized region is tool-pair-balanced (compaction only runs\nwhen idle, so history is turn-complete). Returns `null` when there is nothing\nworth compacting (too short, or no earlier user boundary) — e.g. a freshly\nrestored session whose only user turn is the current one."
|
|
5384
|
+
},
|
|
5385
|
+
{
|
|
5386
|
+
"kind": "function",
|
|
5387
|
+
"name": "buildCompactionSummaryPrompt",
|
|
5388
|
+
"return": {
|
|
5389
|
+
"type": {
|
|
5390
|
+
"text": "{\n systemPrompt: string;\n userMessage: string;\n}"
|
|
5391
|
+
}
|
|
5605
5392
|
},
|
|
5606
|
-
"
|
|
5607
|
-
|
|
5393
|
+
"parameters": [
|
|
5394
|
+
{
|
|
5395
|
+
"name": "toCompact",
|
|
5396
|
+
"type": {
|
|
5397
|
+
"text": "readonly ChatMessage[]"
|
|
5398
|
+
}
|
|
5399
|
+
}
|
|
5400
|
+
],
|
|
5401
|
+
"description": "Build the one-shot summarizer prompt for a run of older messages (used with\n`AIProvider.prompt`). Mirrors the `<conversation_history>` block convention\nthat suggestions use. Any existing `compacted-summary` at the head is folded\nin (rendered as prior-summary context), so rolling re-compaction produces one\ncombined summary."
|
|
5402
|
+
},
|
|
5403
|
+
{
|
|
5404
|
+
"kind": "function",
|
|
5405
|
+
"name": "normalizeForProvider",
|
|
5406
|
+
"return": {
|
|
5407
|
+
"type": {
|
|
5408
|
+
"text": "ChatMessage[]"
|
|
5409
|
+
}
|
|
5410
|
+
},
|
|
5411
|
+
"parameters": [
|
|
5412
|
+
{
|
|
5413
|
+
"name": "history",
|
|
5414
|
+
"type": {
|
|
5415
|
+
"text": "readonly ChatMessage[]"
|
|
5416
|
+
}
|
|
5417
|
+
}
|
|
5418
|
+
],
|
|
5419
|
+
"description": "Normalize history for a provider request (GENC-1351 §5.7): translate each\n`compacted-summary` message into a `user` message that wraps its summary in a\n`<conversation_summary>` block, so the raw display-only role never reaches a\ntransport. Other roles pass through untouched. Pure — returns a new array.\n\nApplied at the request-build chokepoint *before* per-agent masking, so the\nguarantee holds for every provider/transport regardless of any optional\nper-agent history transform."
|
|
5420
|
+
},
|
|
5421
|
+
{
|
|
5422
|
+
"kind": "function",
|
|
5423
|
+
"name": "compactionDividerLabel",
|
|
5424
|
+
"return": {
|
|
5425
|
+
"type": {
|
|
5426
|
+
"text": "string"
|
|
5427
|
+
}
|
|
5428
|
+
},
|
|
5429
|
+
"parameters": [
|
|
5430
|
+
{
|
|
5431
|
+
"name": "m",
|
|
5432
|
+
"type": {
|
|
5433
|
+
"text": "ChatMessage"
|
|
5434
|
+
}
|
|
5435
|
+
}
|
|
5436
|
+
],
|
|
5437
|
+
"description": "Human-facing divider label for a `compacted-summary` message."
|
|
5608
5438
|
}
|
|
5609
5439
|
],
|
|
5610
5440
|
"exports": [
|
|
5611
5441
|
{
|
|
5612
5442
|
"kind": "js",
|
|
5613
|
-
"name": "
|
|
5443
|
+
"name": "transformHistoryForAgent",
|
|
5614
5444
|
"declaration": {
|
|
5615
|
-
"name": "
|
|
5616
|
-
"module": "src/
|
|
5445
|
+
"name": "transformHistoryForAgent",
|
|
5446
|
+
"module": "src/utils/history-transform.ts"
|
|
5617
5447
|
}
|
|
5618
5448
|
},
|
|
5619
5449
|
{
|
|
5620
5450
|
"kind": "js",
|
|
5621
|
-
"name": "
|
|
5451
|
+
"name": "applyHistoryCap",
|
|
5622
5452
|
"declaration": {
|
|
5623
|
-
"name": "
|
|
5624
|
-
"module": "src/
|
|
5453
|
+
"name": "applyHistoryCap",
|
|
5454
|
+
"module": "src/utils/history-transform.ts"
|
|
5625
5455
|
}
|
|
5626
5456
|
},
|
|
5627
5457
|
{
|
|
5628
|
-
"kind": "
|
|
5629
|
-
"name": "
|
|
5458
|
+
"kind": "js",
|
|
5459
|
+
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
5630
5460
|
"declaration": {
|
|
5631
|
-
"name": "
|
|
5632
|
-
"module": "src/
|
|
5461
|
+
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
5462
|
+
"module": "src/utils/history-transform.ts"
|
|
5463
|
+
}
|
|
5464
|
+
},
|
|
5465
|
+
{
|
|
5466
|
+
"kind": "js",
|
|
5467
|
+
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
5468
|
+
"declaration": {
|
|
5469
|
+
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
5470
|
+
"module": "src/utils/history-transform.ts"
|
|
5471
|
+
}
|
|
5472
|
+
},
|
|
5473
|
+
{
|
|
5474
|
+
"kind": "js",
|
|
5475
|
+
"name": "findCompactionCut",
|
|
5476
|
+
"declaration": {
|
|
5477
|
+
"name": "findCompactionCut",
|
|
5478
|
+
"module": "src/utils/history-transform.ts"
|
|
5479
|
+
}
|
|
5480
|
+
},
|
|
5481
|
+
{
|
|
5482
|
+
"kind": "js",
|
|
5483
|
+
"name": "buildCompactionSummaryPrompt",
|
|
5484
|
+
"declaration": {
|
|
5485
|
+
"name": "buildCompactionSummaryPrompt",
|
|
5486
|
+
"module": "src/utils/history-transform.ts"
|
|
5487
|
+
}
|
|
5488
|
+
},
|
|
5489
|
+
{
|
|
5490
|
+
"kind": "js",
|
|
5491
|
+
"name": "normalizeForProvider",
|
|
5492
|
+
"declaration": {
|
|
5493
|
+
"name": "normalizeForProvider",
|
|
5494
|
+
"module": "src/utils/history-transform.ts"
|
|
5495
|
+
}
|
|
5496
|
+
},
|
|
5497
|
+
{
|
|
5498
|
+
"kind": "js",
|
|
5499
|
+
"name": "compactionDividerLabel",
|
|
5500
|
+
"declaration": {
|
|
5501
|
+
"name": "compactionDividerLabel",
|
|
5502
|
+
"module": "src/utils/history-transform.ts"
|
|
5633
5503
|
}
|
|
5634
5504
|
}
|
|
5635
5505
|
]
|
|
5636
5506
|
},
|
|
5637
5507
|
{
|
|
5638
5508
|
"kind": "javascript-module",
|
|
5639
|
-
"path": "src/
|
|
5509
|
+
"path": "src/utils/index.ts",
|
|
5640
5510
|
"declarations": [],
|
|
5641
5511
|
"exports": [
|
|
5642
5512
|
{
|
|
@@ -5644,550 +5514,680 @@
|
|
|
5644
5514
|
"name": "*",
|
|
5645
5515
|
"declaration": {
|
|
5646
5516
|
"name": "*",
|
|
5647
|
-
"package": "./
|
|
5517
|
+
"package": "./animated-panel-toggle"
|
|
5518
|
+
}
|
|
5519
|
+
},
|
|
5520
|
+
{
|
|
5521
|
+
"kind": "js",
|
|
5522
|
+
"name": "*",
|
|
5523
|
+
"declaration": {
|
|
5524
|
+
"name": "*",
|
|
5525
|
+
"package": "./logger"
|
|
5526
|
+
}
|
|
5527
|
+
},
|
|
5528
|
+
{
|
|
5529
|
+
"kind": "js",
|
|
5530
|
+
"name": "*",
|
|
5531
|
+
"declaration": {
|
|
5532
|
+
"name": "*",
|
|
5533
|
+
"package": "./tool-fold"
|
|
5648
5534
|
}
|
|
5649
5535
|
}
|
|
5650
5536
|
]
|
|
5651
5537
|
},
|
|
5652
5538
|
{
|
|
5653
5539
|
"kind": "javascript-module",
|
|
5654
|
-
"path": "src/
|
|
5655
|
-
"declarations": [
|
|
5656
|
-
{
|
|
5657
|
-
"kind": "function",
|
|
5658
|
-
"name": "createDefaultSessionState",
|
|
5659
|
-
"return": {
|
|
5660
|
-
"type": {
|
|
5661
|
-
"text": "AiAssistantSessionState"
|
|
5662
|
-
}
|
|
5663
|
-
},
|
|
5664
|
-
"description": "Build a fresh default session state. A factory (not just a shared const) so\neach call returns independent collections — `resetSession` can hand back a\nclean slate without aliasing the initial state's arrays."
|
|
5665
|
-
},
|
|
5666
|
-
{
|
|
5667
|
-
"kind": "variable",
|
|
5668
|
-
"name": "defaultSessionState",
|
|
5669
|
-
"type": {
|
|
5670
|
-
"text": "AiAssistantSessionState"
|
|
5671
|
-
}
|
|
5672
|
-
},
|
|
5540
|
+
"path": "src/utils/logger.ts",
|
|
5541
|
+
"declarations": [
|
|
5673
5542
|
{
|
|
5674
5543
|
"kind": "variable",
|
|
5675
|
-
"name": "
|
|
5544
|
+
"name": "logger"
|
|
5676
5545
|
}
|
|
5677
5546
|
],
|
|
5678
5547
|
"exports": [
|
|
5679
5548
|
{
|
|
5680
5549
|
"kind": "js",
|
|
5681
|
-
"name": "
|
|
5682
|
-
"declaration": {
|
|
5683
|
-
"name": "createDefaultSessionState",
|
|
5684
|
-
"module": "src/state/ai-assistant-slice.ts"
|
|
5685
|
-
}
|
|
5686
|
-
},
|
|
5687
|
-
{
|
|
5688
|
-
"kind": "js",
|
|
5689
|
-
"name": "defaultSessionState",
|
|
5690
|
-
"declaration": {
|
|
5691
|
-
"name": "defaultSessionState",
|
|
5692
|
-
"module": "src/state/ai-assistant-slice.ts"
|
|
5693
|
-
}
|
|
5694
|
-
},
|
|
5695
|
-
{
|
|
5696
|
-
"kind": "js",
|
|
5697
|
-
"name": "aiAssistantSlice",
|
|
5550
|
+
"name": "logger",
|
|
5698
5551
|
"declaration": {
|
|
5699
|
-
"name": "
|
|
5700
|
-
"module": "src/
|
|
5552
|
+
"name": "logger",
|
|
5553
|
+
"module": "src/utils/logger.ts"
|
|
5701
5554
|
}
|
|
5702
5555
|
}
|
|
5703
5556
|
]
|
|
5704
5557
|
},
|
|
5705
5558
|
{
|
|
5706
5559
|
"kind": "javascript-module",
|
|
5707
|
-
"path": "src/
|
|
5560
|
+
"path": "src/utils/message-partition.ts",
|
|
5708
5561
|
"declarations": [
|
|
5709
|
-
{
|
|
5710
|
-
"kind": "variable",
|
|
5711
|
-
"name": "META_EVENT_IMPORTANCE",
|
|
5712
|
-
"type": {
|
|
5713
|
-
"text": "Record<MetaEventType, MetaEventImportance>"
|
|
5714
|
-
},
|
|
5715
|
-
"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\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 'agent.handoff': 'normal',\n 'agent.pinned': 'normal',\n 'agent.unpinned': 'normal',\n 'provider.selected': 'normal',\n 'interaction.requested': 'normal',\n 'interaction.resolved': 'normal',\n 'external-diagnostics.folded': 'normal',\n 'session.cleared': 'normal',\n 'session.switched': 'low',\n 'session.switch-deferred': 'low',\n 'persistence.restored': '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}",
|
|
5716
|
-
"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."
|
|
5717
|
-
},
|
|
5718
5562
|
{
|
|
5719
5563
|
"kind": "function",
|
|
5720
|
-
"name": "
|
|
5564
|
+
"name": "isSessionNoticeMarker",
|
|
5721
5565
|
"return": {
|
|
5722
5566
|
"type": {
|
|
5723
|
-
"text": "
|
|
5567
|
+
"text": "boolean"
|
|
5724
5568
|
}
|
|
5725
5569
|
},
|
|
5726
5570
|
"parameters": [
|
|
5727
5571
|
{
|
|
5728
|
-
"name": "
|
|
5729
|
-
"type": {
|
|
5730
|
-
"text": "string"
|
|
5731
|
-
}
|
|
5732
|
-
},
|
|
5733
|
-
{
|
|
5734
|
-
"name": "type",
|
|
5735
|
-
"type": {
|
|
5736
|
-
"text": "MetaEventType"
|
|
5737
|
-
}
|
|
5738
|
-
},
|
|
5739
|
-
{
|
|
5740
|
-
"name": "detail",
|
|
5741
|
-
"optional": true,
|
|
5572
|
+
"name": "m",
|
|
5742
5573
|
"type": {
|
|
5743
|
-
"text": "
|
|
5574
|
+
"text": "ChatMessage"
|
|
5744
5575
|
}
|
|
5745
5576
|
}
|
|
5746
5577
|
],
|
|
5747
|
-
"description": "
|
|
5578
|
+
"description": "Either restore notice — both display-only, stripped before persist. @internal"
|
|
5748
5579
|
},
|
|
5749
5580
|
{
|
|
5750
5581
|
"kind": "function",
|
|
5751
|
-
"name": "
|
|
5582
|
+
"name": "trailingInteractionRow",
|
|
5752
5583
|
"return": {
|
|
5753
5584
|
"type": {
|
|
5754
|
-
"text": "
|
|
5585
|
+
"text": "ChatMessage[]"
|
|
5755
5586
|
}
|
|
5756
5587
|
},
|
|
5757
5588
|
"parameters": [
|
|
5758
5589
|
{
|
|
5759
|
-
"name": "
|
|
5760
|
-
"type": {
|
|
5761
|
-
"text": "string"
|
|
5762
|
-
}
|
|
5763
|
-
},
|
|
5764
|
-
{
|
|
5765
|
-
"name": "reason",
|
|
5766
|
-
"type": {
|
|
5767
|
-
"text": "TurnFailureReason"
|
|
5768
|
-
}
|
|
5769
|
-
},
|
|
5770
|
-
{
|
|
5771
|
-
"name": "detail",
|
|
5772
|
-
"optional": true,
|
|
5590
|
+
"name": "messages",
|
|
5773
5591
|
"type": {
|
|
5774
|
-
"text": "
|
|
5592
|
+
"text": "ChatMessage[]"
|
|
5775
5593
|
}
|
|
5776
5594
|
}
|
|
5777
5595
|
],
|
|
5778
|
-
"description": "
|
|
5596
|
+
"description": "The trailing interaction to render in a pinned slot, separate from the\nfiltered list. Empty unless the most recent message carries an interaction.\n\nPinning the trailing interaction keeps its widget out of the list's\nreconciliation: FAST's `repeat` has no key function and reconciles by array\nindex, so re-filtering the list (a cog-menu toggle) would otherwise rebind an\nexisting row to a different message and re-create the live widget — discarding\nany in-progress input. The slot's binding reads only `messages` and returns\nthe same message object across toggles, so the widget's DOM is preserved.\n\nIt is the *trailing* message (resolved or not), not \"unresolved only\", so that\nanswering an interaction leaves it in the slot — `resolved` is forwarded in\nplace with no re-render. It rejoins the list naturally once a newer message\narrives and it is no longer last."
|
|
5779
5597
|
},
|
|
5780
5598
|
{
|
|
5781
5599
|
"kind": "function",
|
|
5782
|
-
"name": "
|
|
5600
|
+
"name": "filterVisibleMessages",
|
|
5783
5601
|
"return": {
|
|
5784
5602
|
"type": {
|
|
5785
|
-
"text": "
|
|
5603
|
+
"text": "ChatMessage[]"
|
|
5786
5604
|
}
|
|
5787
5605
|
},
|
|
5788
5606
|
"parameters": [
|
|
5789
5607
|
{
|
|
5790
|
-
"name": "
|
|
5791
|
-
"type": {
|
|
5792
|
-
"text": "string"
|
|
5793
|
-
}
|
|
5794
|
-
},
|
|
5795
|
-
{
|
|
5796
|
-
"name": "reason",
|
|
5608
|
+
"name": "messages",
|
|
5797
5609
|
"type": {
|
|
5798
|
-
"text": "
|
|
5610
|
+
"text": "ChatMessage[]"
|
|
5799
5611
|
}
|
|
5800
5612
|
},
|
|
5801
5613
|
{
|
|
5802
|
-
"name": "
|
|
5803
|
-
"optional": true,
|
|
5614
|
+
"name": "toggles",
|
|
5804
5615
|
"type": {
|
|
5805
|
-
"text": "
|
|
5616
|
+
"text": "MessageFilterState"
|
|
5806
5617
|
}
|
|
5807
5618
|
}
|
|
5808
5619
|
],
|
|
5809
|
-
"description": "
|
|
5810
|
-
}
|
|
5620
|
+
"description": "Filters messages for the scrolling list per the current cog-menu toggles.\n\nThe trailing interaction (see `trailingInteractionRow`) must be removed\nbefore calling, as it is rendered separately."
|
|
5621
|
+
}
|
|
5622
|
+
],
|
|
5623
|
+
"exports": [
|
|
5811
5624
|
{
|
|
5812
|
-
"kind": "
|
|
5813
|
-
"name": "
|
|
5814
|
-
"
|
|
5815
|
-
"
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
},
|
|
5819
|
-
"parameters": [
|
|
5820
|
-
{
|
|
5821
|
-
"name": "key",
|
|
5822
|
-
"type": {
|
|
5823
|
-
"text": "string"
|
|
5824
|
-
}
|
|
5825
|
-
}
|
|
5826
|
-
],
|
|
5827
|
-
"description": "Returns the meta-event timeline for `key`, or an empty array if none recorded."
|
|
5625
|
+
"kind": "js",
|
|
5626
|
+
"name": "isSessionNoticeMarker",
|
|
5627
|
+
"declaration": {
|
|
5628
|
+
"name": "isSessionNoticeMarker",
|
|
5629
|
+
"module": "src/utils/message-partition.ts"
|
|
5630
|
+
}
|
|
5828
5631
|
},
|
|
5829
5632
|
{
|
|
5830
|
-
"kind": "
|
|
5831
|
-
"name": "
|
|
5832
|
-
"
|
|
5833
|
-
"
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
},
|
|
5837
|
-
"parameters": [
|
|
5838
|
-
{
|
|
5839
|
-
"name": "targetKey",
|
|
5840
|
-
"type": {
|
|
5841
|
-
"text": "string"
|
|
5842
|
-
}
|
|
5843
|
-
},
|
|
5844
|
-
{
|
|
5845
|
-
"name": "events",
|
|
5846
|
-
"type": {
|
|
5847
|
-
"text": "readonly MetaEvent[]"
|
|
5848
|
-
}
|
|
5849
|
-
}
|
|
5850
|
-
],
|
|
5851
|
-
"description": "Merge pre-built meta events into the timeline for `targetKey`, **preserving each\nevent's original `timestamp`** (so it interleaves chronologically on export)\nwhile re-indexing onto the target buffer's monotonic counter. Used to fold a\nsub-agent's harvested events into the parent session — see\n`ChatDriver.invokeSubAgent`. Unlike recordMetaEvent it does not stamp a\nfresh timestamp; the same non-`high` eviction policy is applied once after the\nbatch so the buffer stays bounded."
|
|
5633
|
+
"kind": "js",
|
|
5634
|
+
"name": "trailingInteractionRow",
|
|
5635
|
+
"declaration": {
|
|
5636
|
+
"name": "trailingInteractionRow",
|
|
5637
|
+
"module": "src/utils/message-partition.ts"
|
|
5638
|
+
}
|
|
5852
5639
|
},
|
|
5640
|
+
{
|
|
5641
|
+
"kind": "js",
|
|
5642
|
+
"name": "filterVisibleMessages",
|
|
5643
|
+
"declaration": {
|
|
5644
|
+
"name": "filterVisibleMessages",
|
|
5645
|
+
"module": "src/utils/message-partition.ts"
|
|
5646
|
+
}
|
|
5647
|
+
}
|
|
5648
|
+
]
|
|
5649
|
+
},
|
|
5650
|
+
{
|
|
5651
|
+
"kind": "javascript-module",
|
|
5652
|
+
"path": "src/utils/resolve-cost-history-config.ts",
|
|
5653
|
+
"declarations": [
|
|
5853
5654
|
{
|
|
5854
5655
|
"kind": "function",
|
|
5855
|
-
"name": "
|
|
5656
|
+
"name": "resolveCostHistoryConfig",
|
|
5856
5657
|
"return": {
|
|
5857
5658
|
"type": {
|
|
5858
|
-
"text": "
|
|
5659
|
+
"text": "ResolvedCostHistoryConfig"
|
|
5859
5660
|
}
|
|
5860
5661
|
},
|
|
5861
5662
|
"parameters": [
|
|
5862
5663
|
{
|
|
5863
|
-
"name": "
|
|
5664
|
+
"name": "chatConfig",
|
|
5864
5665
|
"type": {
|
|
5865
|
-
"text": "
|
|
5666
|
+
"text": "ChatConfig"
|
|
5866
5667
|
}
|
|
5867
5668
|
}
|
|
5868
5669
|
],
|
|
5869
|
-
"description": "
|
|
5870
|
-
},
|
|
5871
|
-
{
|
|
5872
|
-
"kind": "variable",
|
|
5873
|
-
"name": "DEBUG_LOG_README",
|
|
5874
|
-
"type": {
|
|
5875
|
-
"text": "readonly string[]"
|
|
5876
|
-
},
|
|
5877
|
-
"default": "[\n 'This is an exported debug log for the Genesis AI assistant. Read it top-to-bottom.',\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, and `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.\",\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`/`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'.`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, 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, 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), agent.handoff (routing; from=null is the initial activation), agent.pinned/unpinned (forced routing), provider.selected (model/provider for the upcoming turns), 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), 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, token usage, session cost), 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 '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.',\n]",
|
|
5878
|
-
"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 so the two stay in sync."
|
|
5670
|
+
"description": "Resolve `chatConfig.costHistory` with defaults applied."
|
|
5879
5671
|
}
|
|
5880
5672
|
],
|
|
5881
5673
|
"exports": [
|
|
5882
5674
|
{
|
|
5883
5675
|
"kind": "js",
|
|
5884
|
-
"name": "
|
|
5885
|
-
"declaration": {
|
|
5886
|
-
"name": "META_EVENT_IMPORTANCE",
|
|
5887
|
-
"module": "src/state/debug-event-log.ts"
|
|
5888
|
-
}
|
|
5889
|
-
},
|
|
5890
|
-
{
|
|
5891
|
-
"kind": "js",
|
|
5892
|
-
"name": "recordMetaEvent",
|
|
5893
|
-
"declaration": {
|
|
5894
|
-
"name": "recordMetaEvent",
|
|
5895
|
-
"module": "src/state/debug-event-log.ts"
|
|
5896
|
-
}
|
|
5897
|
-
},
|
|
5898
|
-
{
|
|
5899
|
-
"kind": "js",
|
|
5900
|
-
"name": "TurnFailureReason",
|
|
5901
|
-
"declaration": {
|
|
5902
|
-
"name": "TurnFailureReason",
|
|
5903
|
-
"module": "src/state/debug-event-log.ts"
|
|
5904
|
-
}
|
|
5905
|
-
},
|
|
5906
|
-
{
|
|
5907
|
-
"kind": "js",
|
|
5908
|
-
"name": "recordTurnError",
|
|
5909
|
-
"declaration": {
|
|
5910
|
-
"name": "recordTurnError",
|
|
5911
|
-
"module": "src/state/debug-event-log.ts"
|
|
5912
|
-
}
|
|
5913
|
-
},
|
|
5914
|
-
{
|
|
5915
|
-
"kind": "js",
|
|
5916
|
-
"name": "recordTurnRetry",
|
|
5917
|
-
"declaration": {
|
|
5918
|
-
"name": "recordTurnRetry",
|
|
5919
|
-
"module": "src/state/debug-event-log.ts"
|
|
5920
|
-
}
|
|
5921
|
-
},
|
|
5922
|
-
{
|
|
5923
|
-
"kind": "js",
|
|
5924
|
-
"name": "getMetaEvents",
|
|
5925
|
-
"declaration": {
|
|
5926
|
-
"name": "getMetaEvents",
|
|
5927
|
-
"module": "src/state/debug-event-log.ts"
|
|
5928
|
-
}
|
|
5929
|
-
},
|
|
5930
|
-
{
|
|
5931
|
-
"kind": "js",
|
|
5932
|
-
"name": "mergeMetaEvents",
|
|
5933
|
-
"declaration": {
|
|
5934
|
-
"name": "mergeMetaEvents",
|
|
5935
|
-
"module": "src/state/debug-event-log.ts"
|
|
5936
|
-
}
|
|
5937
|
-
},
|
|
5938
|
-
{
|
|
5939
|
-
"kind": "js",
|
|
5940
|
-
"name": "clearSession",
|
|
5941
|
-
"declaration": {
|
|
5942
|
-
"name": "clearSession",
|
|
5943
|
-
"module": "src/state/debug-event-log.ts"
|
|
5944
|
-
}
|
|
5945
|
-
},
|
|
5946
|
-
{
|
|
5947
|
-
"kind": "js",
|
|
5948
|
-
"name": "DEBUG_LOG_README",
|
|
5676
|
+
"name": "resolveCostHistoryConfig",
|
|
5949
5677
|
"declaration": {
|
|
5950
|
-
"name": "
|
|
5951
|
-
"module": "src/
|
|
5678
|
+
"name": "resolveCostHistoryConfig",
|
|
5679
|
+
"module": "src/utils/resolve-cost-history-config.ts"
|
|
5952
5680
|
}
|
|
5953
5681
|
}
|
|
5954
5682
|
]
|
|
5955
5683
|
},
|
|
5956
5684
|
{
|
|
5957
5685
|
"kind": "javascript-module",
|
|
5958
|
-
"path": "src/
|
|
5686
|
+
"path": "src/utils/resolve-preference-baseline.ts",
|
|
5687
|
+
"declarations": [],
|
|
5688
|
+
"exports": []
|
|
5689
|
+
},
|
|
5690
|
+
{
|
|
5691
|
+
"kind": "javascript-module",
|
|
5692
|
+
"path": "src/utils/strip-agent-handlers.ts",
|
|
5693
|
+
"declarations": [],
|
|
5694
|
+
"exports": []
|
|
5695
|
+
},
|
|
5696
|
+
{
|
|
5697
|
+
"kind": "javascript-module",
|
|
5698
|
+
"path": "src/utils/sum-costs.ts",
|
|
5699
|
+
"declarations": [],
|
|
5700
|
+
"exports": []
|
|
5701
|
+
},
|
|
5702
|
+
{
|
|
5703
|
+
"kind": "javascript-module",
|
|
5704
|
+
"path": "src/utils/sum-tokens.ts",
|
|
5959
5705
|
"declarations": [
|
|
5960
5706
|
{
|
|
5961
5707
|
"kind": "function",
|
|
5962
|
-
"name": "
|
|
5708
|
+
"name": "formatCompactTokenCountSafe",
|
|
5963
5709
|
"return": {
|
|
5964
5710
|
"type": {
|
|
5965
|
-
"text": "
|
|
5711
|
+
"text": "string"
|
|
5966
5712
|
}
|
|
5967
5713
|
},
|
|
5968
5714
|
"parameters": [
|
|
5969
5715
|
{
|
|
5970
|
-
"name": "
|
|
5971
|
-
"type": {
|
|
5972
|
-
"text": "string"
|
|
5973
|
-
}
|
|
5974
|
-
},
|
|
5975
|
-
{
|
|
5976
|
-
"name": "agentsKey",
|
|
5977
|
-
"type": {
|
|
5978
|
-
"text": "string"
|
|
5979
|
-
}
|
|
5980
|
-
},
|
|
5981
|
-
{
|
|
5982
|
-
"name": "factory",
|
|
5716
|
+
"name": "tokens",
|
|
5983
5717
|
"type": {
|
|
5984
|
-
"text": "
|
|
5718
|
+
"text": "number"
|
|
5985
5719
|
}
|
|
5986
5720
|
}
|
|
5987
5721
|
],
|
|
5988
|
-
"description": "
|
|
5989
|
-
}
|
|
5722
|
+
"description": "formatCompactTokenCount passed through DOMPurify for `:innerHTML` bindings."
|
|
5723
|
+
}
|
|
5724
|
+
],
|
|
5725
|
+
"exports": [
|
|
5726
|
+
{
|
|
5727
|
+
"kind": "js",
|
|
5728
|
+
"name": "formatCompactTokenCountSafe",
|
|
5729
|
+
"declaration": {
|
|
5730
|
+
"name": "formatCompactTokenCountSafe",
|
|
5731
|
+
"module": "src/utils/sum-tokens.ts"
|
|
5732
|
+
}
|
|
5733
|
+
}
|
|
5734
|
+
]
|
|
5735
|
+
},
|
|
5736
|
+
{
|
|
5737
|
+
"kind": "javascript-module",
|
|
5738
|
+
"path": "src/utils/tool-fold.ts",
|
|
5739
|
+
"declarations": [
|
|
5990
5740
|
{
|
|
5991
5741
|
"kind": "function",
|
|
5992
|
-
"name": "
|
|
5742
|
+
"name": "createToolFold",
|
|
5993
5743
|
"return": {
|
|
5994
5744
|
"type": {
|
|
5995
|
-
"text": "
|
|
5745
|
+
"text": "ToolFoldResult"
|
|
5996
5746
|
}
|
|
5997
5747
|
},
|
|
5998
5748
|
"parameters": [
|
|
5999
5749
|
{
|
|
6000
|
-
"name": "
|
|
5750
|
+
"name": "config",
|
|
6001
5751
|
"type": {
|
|
6002
|
-
"text": "string"
|
|
5752
|
+
"text": "{\n /** Facade tool name — used as the tool name the model calls to open this fold. */\n name: string;\n /**\n * Description shown to the model for the facade tool.\n * If omitted, auto-generated from the inner tool names:\n * \"Contains: tool_a, tool_b. Invoke to access these tools.\"\n */\n description?: string;\n /**\n * Optional usage guidance injected into the fold-open response message.\n * Not included in the facade description — only visible once the fold is open.\n */\n usageNotes?: string;\n /** Inner tool definitions. Same type as `AgentConfig.toolDefinitions`. */\n tools: ChatToolDefinition[];\n /** Inner tool handlers. Same type as `AgentConfig.toolHandlers`. */\n handlers: ChatToolHandlers;\n /**\n * When true (default), all other tools are removed when this fold opens.\n * When false, sibling tools remain available alongside the inner tools.\n */\n exclusive?: boolean;\n}"
|
|
6003
5753
|
}
|
|
6004
5754
|
}
|
|
6005
5755
|
],
|
|
6006
|
-
"description": "
|
|
5756
|
+
"description": "Creates a tool fold — a facade that hides a group of related tools behind a single\nnamed entry, revealing them progressively when the model invokes the facade.\n\nThe `tools` and `handlers` parameters accept the exact same types as `AgentConfig.toolDefinitions`\nand `AgentConfig.toolHandlers`, so existing tool creation functions can be passed in unchanged."
|
|
6007
5757
|
},
|
|
6008
5758
|
{
|
|
6009
5759
|
"kind": "function",
|
|
6010
|
-
"name": "
|
|
5760
|
+
"name": "expandToolTree",
|
|
6011
5761
|
"return": {
|
|
6012
5762
|
"type": {
|
|
6013
|
-
"text": "
|
|
5763
|
+
"text": "ToolTreeNode[]"
|
|
6014
5764
|
}
|
|
6015
5765
|
},
|
|
6016
5766
|
"parameters": [
|
|
6017
5767
|
{
|
|
6018
|
-
"name": "
|
|
5768
|
+
"name": "definitions",
|
|
6019
5769
|
"type": {
|
|
6020
|
-
"text": "
|
|
5770
|
+
"text": "ChatToolDefinition[]"
|
|
5771
|
+
}
|
|
5772
|
+
},
|
|
5773
|
+
{
|
|
5774
|
+
"name": "handlers",
|
|
5775
|
+
"type": {
|
|
5776
|
+
"text": "ChatToolHandlers"
|
|
6021
5777
|
}
|
|
6022
5778
|
}
|
|
6023
5779
|
],
|
|
6024
|
-
"description": "
|
|
5780
|
+
"description": "Expands a flat list of tool definitions into a nested tree by resolving fold\nmetadata from the corresponding handlers. Use this for debug output so the\nfull tool hierarchy is visible rather than just the top-level facade names."
|
|
5781
|
+
}
|
|
5782
|
+
],
|
|
5783
|
+
"exports": [
|
|
5784
|
+
{
|
|
5785
|
+
"kind": "js",
|
|
5786
|
+
"name": "createToolFold",
|
|
5787
|
+
"declaration": {
|
|
5788
|
+
"name": "createToolFold",
|
|
5789
|
+
"module": "src/utils/tool-fold.ts"
|
|
5790
|
+
}
|
|
6025
5791
|
},
|
|
6026
5792
|
{
|
|
6027
|
-
"kind": "
|
|
6028
|
-
"name": "
|
|
6029
|
-
"
|
|
6030
|
-
"
|
|
6031
|
-
|
|
5793
|
+
"kind": "js",
|
|
5794
|
+
"name": "expandToolTree",
|
|
5795
|
+
"declaration": {
|
|
5796
|
+
"name": "expandToolTree",
|
|
5797
|
+
"module": "src/utils/tool-fold.ts"
|
|
5798
|
+
}
|
|
5799
|
+
}
|
|
5800
|
+
]
|
|
5801
|
+
},
|
|
5802
|
+
{
|
|
5803
|
+
"kind": "javascript-module",
|
|
5804
|
+
"path": "src/utils/with-timeout.ts",
|
|
5805
|
+
"declarations": [],
|
|
5806
|
+
"exports": []
|
|
5807
|
+
},
|
|
5808
|
+
{
|
|
5809
|
+
"kind": "javascript-module",
|
|
5810
|
+
"path": "src/components/activity-halo/activity-halo.ts",
|
|
5811
|
+
"declarations": [
|
|
5812
|
+
{
|
|
5813
|
+
"kind": "class",
|
|
5814
|
+
"description": "Wrapper component that shows an `<ai-halo-overlay>` when the AI assistant\nis executing one of the declared tool names.",
|
|
5815
|
+
"name": "AiActivityHalo",
|
|
5816
|
+
"members": [
|
|
5817
|
+
{
|
|
5818
|
+
"kind": "field",
|
|
5819
|
+
"name": "tools",
|
|
5820
|
+
"type": {
|
|
5821
|
+
"text": "string"
|
|
5822
|
+
},
|
|
5823
|
+
"default": "''",
|
|
5824
|
+
"description": "Comma-separated list of tool names this element reacts to."
|
|
5825
|
+
},
|
|
5826
|
+
{
|
|
5827
|
+
"kind": "field",
|
|
5828
|
+
"name": "minShowTime",
|
|
5829
|
+
"type": {
|
|
5830
|
+
"text": "number"
|
|
5831
|
+
},
|
|
5832
|
+
"default": "600",
|
|
5833
|
+
"description": "Minimum time in ms the halo stays visible after activation."
|
|
5834
|
+
},
|
|
5835
|
+
{
|
|
5836
|
+
"kind": "field",
|
|
5837
|
+
"name": "unsubBus",
|
|
5838
|
+
"type": {
|
|
5839
|
+
"text": "() => void | undefined"
|
|
5840
|
+
},
|
|
5841
|
+
"privacy": "private"
|
|
5842
|
+
},
|
|
5843
|
+
{
|
|
5844
|
+
"kind": "field",
|
|
5845
|
+
"name": "hideTimeout",
|
|
5846
|
+
"type": {
|
|
5847
|
+
"text": "ReturnType<typeof setTimeout> | undefined"
|
|
5848
|
+
},
|
|
5849
|
+
"privacy": "private"
|
|
5850
|
+
},
|
|
5851
|
+
{
|
|
5852
|
+
"kind": "field",
|
|
5853
|
+
"name": "startTime",
|
|
5854
|
+
"type": {
|
|
5855
|
+
"text": "number"
|
|
5856
|
+
},
|
|
5857
|
+
"privacy": "private",
|
|
5858
|
+
"default": "0"
|
|
5859
|
+
},
|
|
5860
|
+
{
|
|
5861
|
+
"kind": "method",
|
|
5862
|
+
"name": "activate",
|
|
5863
|
+
"privacy": "private"
|
|
5864
|
+
},
|
|
5865
|
+
{
|
|
5866
|
+
"kind": "method",
|
|
5867
|
+
"name": "scheduleDeactivate",
|
|
5868
|
+
"privacy": "private"
|
|
6032
5869
|
}
|
|
6033
|
-
|
|
6034
|
-
"
|
|
5870
|
+
],
|
|
5871
|
+
"attributes": [
|
|
6035
5872
|
{
|
|
6036
|
-
"name": "
|
|
5873
|
+
"name": "tools",
|
|
6037
5874
|
"type": {
|
|
6038
5875
|
"text": "string"
|
|
6039
|
-
}
|
|
5876
|
+
},
|
|
5877
|
+
"default": "''",
|
|
5878
|
+
"description": "Comma-separated list of tool names this element reacts to.",
|
|
5879
|
+
"fieldName": "tools"
|
|
5880
|
+
},
|
|
5881
|
+
{
|
|
5882
|
+
"name": "min-show-time",
|
|
5883
|
+
"type": {
|
|
5884
|
+
"text": "number"
|
|
5885
|
+
},
|
|
5886
|
+
"default": "DEFAULT_MIN_SHOW_TIME",
|
|
5887
|
+
"description": "Minimum time in ms the halo stays visible after activation.",
|
|
5888
|
+
"resolveInitializer": {
|
|
5889
|
+
"module": "src/components/activity-halo/activity-halo.ts"
|
|
5890
|
+
},
|
|
5891
|
+
"fieldName": "minShowTime"
|
|
6040
5892
|
}
|
|
6041
5893
|
],
|
|
6042
|
-
"
|
|
5894
|
+
"superclass": {
|
|
5895
|
+
"name": "GenesisElement",
|
|
5896
|
+
"package": "@genesislcap/web-core"
|
|
5897
|
+
},
|
|
5898
|
+
"tagName": "ai-activity-halo",
|
|
5899
|
+
"customElement": true
|
|
6043
5900
|
}
|
|
6044
5901
|
],
|
|
6045
5902
|
"exports": [
|
|
6046
5903
|
{
|
|
6047
5904
|
"kind": "js",
|
|
6048
|
-
"name": "
|
|
5905
|
+
"name": "AiActivityHalo",
|
|
6049
5906
|
"declaration": {
|
|
6050
|
-
"name": "
|
|
6051
|
-
"module": "src/
|
|
5907
|
+
"name": "AiActivityHalo",
|
|
5908
|
+
"module": "src/components/activity-halo/activity-halo.ts"
|
|
6052
5909
|
}
|
|
6053
5910
|
},
|
|
6054
5911
|
{
|
|
6055
|
-
"kind": "
|
|
6056
|
-
"name": "
|
|
5912
|
+
"kind": "custom-element-definition",
|
|
5913
|
+
"name": "ai-activity-halo",
|
|
6057
5914
|
"declaration": {
|
|
6058
|
-
"name": "
|
|
6059
|
-
"module": "src/
|
|
5915
|
+
"name": "AiActivityHalo",
|
|
5916
|
+
"module": "src/components/activity-halo/activity-halo.ts"
|
|
6060
5917
|
}
|
|
6061
|
-
}
|
|
5918
|
+
}
|
|
5919
|
+
]
|
|
5920
|
+
},
|
|
5921
|
+
{
|
|
5922
|
+
"kind": "javascript-module",
|
|
5923
|
+
"path": "src/components/agent-picker/agent-picker.constants.ts",
|
|
5924
|
+
"declarations": [
|
|
5925
|
+
{
|
|
5926
|
+
"kind": "variable",
|
|
5927
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
5928
|
+
"type": {
|
|
5929
|
+
"text": "string"
|
|
5930
|
+
},
|
|
5931
|
+
"default": "'__auto__'",
|
|
5932
|
+
"description": "Sentinel value used by the segmented control / select to represent \"Auto\"."
|
|
5933
|
+
}
|
|
5934
|
+
],
|
|
5935
|
+
"exports": [
|
|
6062
5936
|
{
|
|
6063
5937
|
"kind": "js",
|
|
6064
|
-
"name": "
|
|
5938
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
6065
5939
|
"declaration": {
|
|
6066
|
-
"name": "
|
|
6067
|
-
"module": "src/
|
|
5940
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
5941
|
+
"module": "src/components/agent-picker/agent-picker.constants.ts"
|
|
6068
5942
|
}
|
|
6069
|
-
}
|
|
5943
|
+
}
|
|
5944
|
+
]
|
|
5945
|
+
},
|
|
5946
|
+
{
|
|
5947
|
+
"kind": "javascript-module",
|
|
5948
|
+
"path": "src/components/agent-picker/agent-picker.styles.ts",
|
|
5949
|
+
"declarations": [
|
|
5950
|
+
{
|
|
5951
|
+
"kind": "variable",
|
|
5952
|
+
"name": "styles",
|
|
5953
|
+
"default": "css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .picker {\n position: relative;\n padding: 6px calc(var(--design-unit) * 3px);\n background-color: var(--neutral-layer-2);\n }\n\n /* Clipping wrapper. The inner segmented-control is naturally inline-flex\n and auto-sizes to its segments, so it would overflow the panel without\n ever reporting scrollWidth > clientWidth. By giving the wrapper a\n constrained width (flex+min-width:0) and overflow:hidden, the wrapper's\n scrollWidth reflects the segments' natural width while clientWidth is\n the available width — that's what we measure to decide on the fallback. */\n .segmented-row {\n display: flex;\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n }\n\n /* When the fallback select is showing, take the segmented row out of layout\n but keep it in the DOM so the ResizeObserver can re-measure when the\n container grows back and we can swap back to segmented-control. */\n .picker[data-effective='select'] .segmented-row {\n position: absolute;\n inset: 6px calc(var(--design-unit) * 3px);\n visibility: hidden;\n pointer-events: none;\n }\n\n .segmented-control {\n flex: 0 0 auto;\n }\n\n .select-fallback {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n\n .select-label {\n font-family: var(--body-font);\n font-size: 0.8em;\n color: var(--neutral-foreground-hint, var(--neutral-foreground-rest));\n }\n\n .select-control {\n flex: 1 1 auto;\n min-width: 0;\n padding: 4px 8px;\n background: var(--neutral-layer-3);\n color: var(--neutral-foreground-rest);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: 4px;\n font-family: var(--body-font);\n font-size: 0.85em;\n cursor: pointer;\n }\n\n .select-control:focus-visible {\n outline: 2px solid var(--accent-fill-rest);\n outline-offset: 1px;\n }\n`"
|
|
5954
|
+
}
|
|
5955
|
+
],
|
|
5956
|
+
"exports": [
|
|
6070
5957
|
{
|
|
6071
5958
|
"kind": "js",
|
|
6072
|
-
"name": "
|
|
5959
|
+
"name": "styles",
|
|
6073
5960
|
"declaration": {
|
|
6074
|
-
"name": "
|
|
6075
|
-
"module": "src/
|
|
5961
|
+
"name": "styles",
|
|
5962
|
+
"module": "src/components/agent-picker/agent-picker.styles.ts"
|
|
6076
5963
|
}
|
|
6077
5964
|
}
|
|
6078
5965
|
]
|
|
6079
5966
|
},
|
|
6080
5967
|
{
|
|
6081
5968
|
"kind": "javascript-module",
|
|
6082
|
-
"path": "src/
|
|
5969
|
+
"path": "src/components/agent-picker/agent-picker.template.ts",
|
|
6083
5970
|
"declarations": [],
|
|
6084
5971
|
"exports": []
|
|
6085
5972
|
},
|
|
6086
5973
|
{
|
|
6087
5974
|
"kind": "javascript-module",
|
|
6088
|
-
"path": "src/
|
|
5975
|
+
"path": "src/components/agent-picker/agent-picker.ts",
|
|
6089
5976
|
"declarations": [
|
|
6090
5977
|
{
|
|
6091
|
-
"kind": "
|
|
6092
|
-
"
|
|
6093
|
-
"
|
|
6094
|
-
|
|
6095
|
-
"text": "SessionStoreReturn"
|
|
6096
|
-
}
|
|
6097
|
-
},
|
|
6098
|
-
"parameters": [
|
|
5978
|
+
"kind": "class",
|
|
5979
|
+
"description": "User-facing agent picker rendered above the chat input.\n\nRenders `Auto` plus each top-level agent that has `manualSelection.enabled`.\nSub-agents and non-selectable specialists are excluded. Hidden when fewer\nthan two agents are configured or none are manually selectable.",
|
|
5980
|
+
"name": "AgentPicker",
|
|
5981
|
+
"members": [
|
|
6099
5982
|
{
|
|
6100
|
-
"
|
|
5983
|
+
"kind": "field",
|
|
5984
|
+
"name": "designSystemPrefix",
|
|
6101
5985
|
"type": {
|
|
6102
5986
|
"text": "string"
|
|
6103
|
-
}
|
|
5987
|
+
},
|
|
5988
|
+
"default": "'rapid'",
|
|
5989
|
+
"description": "Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`."
|
|
6104
5990
|
},
|
|
6105
5991
|
{
|
|
6106
|
-
"
|
|
6107
|
-
"
|
|
5992
|
+
"kind": "field",
|
|
5993
|
+
"name": "mode",
|
|
5994
|
+
"type": {
|
|
5995
|
+
"text": "AgentPickerMode"
|
|
5996
|
+
},
|
|
5997
|
+
"default": "'disabled'",
|
|
5998
|
+
"description": "Picker variant, sourced from the assistant's `chatConfig.agentPicker`."
|
|
5999
|
+
},
|
|
6000
|
+
{
|
|
6001
|
+
"kind": "field",
|
|
6002
|
+
"name": "agents",
|
|
6003
|
+
"type": {
|
|
6004
|
+
"text": "AgentConfig[]"
|
|
6005
|
+
},
|
|
6006
|
+
"default": "[]",
|
|
6007
|
+
"description": "Top-level agents passed to the assistant."
|
|
6008
|
+
},
|
|
6009
|
+
{
|
|
6010
|
+
"kind": "field",
|
|
6011
|
+
"name": "pinnedAgentName",
|
|
6012
|
+
"type": {
|
|
6013
|
+
"text": "string | null"
|
|
6014
|
+
},
|
|
6015
|
+
"default": "null",
|
|
6016
|
+
"description": "Currently pinned agent name, or `null` for Auto."
|
|
6017
|
+
},
|
|
6018
|
+
{
|
|
6019
|
+
"kind": "field",
|
|
6020
|
+
"name": "resizeObserver",
|
|
6021
|
+
"type": {
|
|
6022
|
+
"text": "ResizeObserver | undefined"
|
|
6023
|
+
},
|
|
6024
|
+
"privacy": "private"
|
|
6025
|
+
},
|
|
6026
|
+
{
|
|
6027
|
+
"kind": "field",
|
|
6028
|
+
"name": "selectableAgents",
|
|
6029
|
+
"type": {
|
|
6030
|
+
"text": "AgentConfig[]"
|
|
6031
|
+
},
|
|
6032
|
+
"description": "Top-level agents that opted in to manual selection.",
|
|
6033
|
+
"readonly": true
|
|
6034
|
+
},
|
|
6035
|
+
{
|
|
6036
|
+
"kind": "field",
|
|
6037
|
+
"name": "visible",
|
|
6108
6038
|
"type": {
|
|
6109
6039
|
"text": "boolean"
|
|
6040
|
+
},
|
|
6041
|
+
"description": "Whether the picker should render at all.",
|
|
6042
|
+
"readonly": true
|
|
6043
|
+
},
|
|
6044
|
+
{
|
|
6045
|
+
"kind": "field",
|
|
6046
|
+
"name": "effectiveMode",
|
|
6047
|
+
"type": {
|
|
6048
|
+
"text": "'select' | 'segmented-control'"
|
|
6049
|
+
},
|
|
6050
|
+
"description": "The variant actually rendered: `'select'` if user-configured or if the\nsegmented row currently overflows; `'segmented-control'` otherwise.",
|
|
6051
|
+
"readonly": true
|
|
6052
|
+
},
|
|
6053
|
+
{
|
|
6054
|
+
"kind": "method",
|
|
6055
|
+
"name": "agentsChanged",
|
|
6056
|
+
"return": {
|
|
6057
|
+
"type": {
|
|
6058
|
+
"text": "void"
|
|
6059
|
+
}
|
|
6060
|
+
},
|
|
6061
|
+
"description": "Re-measure when agents change — newly added selectable agents may push the\nsegmented row past the container's width."
|
|
6062
|
+
},
|
|
6063
|
+
{
|
|
6064
|
+
"kind": "method",
|
|
6065
|
+
"name": "modeChanged",
|
|
6066
|
+
"return": {
|
|
6067
|
+
"type": {
|
|
6068
|
+
"text": "void"
|
|
6069
|
+
}
|
|
6110
6070
|
}
|
|
6111
|
-
}
|
|
6112
|
-
],
|
|
6113
|
-
"description": "Returns the session store for the given key, creating one if it does not\nalready exist. Omit `devTools` (or pass `undefined`) to defer to `isDev()`.\nPass `true` to force-enable or `false` to force-disable Redux DevTools."
|
|
6114
|
-
},
|
|
6115
|
-
{
|
|
6116
|
-
"kind": "function",
|
|
6117
|
-
"name": "hasSessionStore",
|
|
6118
|
-
"return": {
|
|
6119
|
-
"type": {
|
|
6120
|
-
"text": "boolean"
|
|
6121
|
-
}
|
|
6122
|
-
},
|
|
6123
|
-
"parameters": [
|
|
6071
|
+
},
|
|
6124
6072
|
{
|
|
6125
|
-
"
|
|
6073
|
+
"kind": "method",
|
|
6074
|
+
"name": "measureOverflow",
|
|
6075
|
+
"privacy": "private",
|
|
6076
|
+
"return": {
|
|
6077
|
+
"type": {
|
|
6078
|
+
"text": "void"
|
|
6079
|
+
}
|
|
6080
|
+
},
|
|
6081
|
+
"description": "Measures whether the segmented row's natural content width exceeds the\ncontainer's visible width. Bails when the row isn't currently rendered\n(e.g. when `mode !== 'segmented-control'`)."
|
|
6082
|
+
},
|
|
6083
|
+
{
|
|
6084
|
+
"kind": "method",
|
|
6085
|
+
"name": "selectAgent",
|
|
6086
|
+
"return": {
|
|
6087
|
+
"type": {
|
|
6088
|
+
"text": "void"
|
|
6089
|
+
}
|
|
6090
|
+
},
|
|
6091
|
+
"parameters": [
|
|
6092
|
+
{
|
|
6093
|
+
"name": "name",
|
|
6094
|
+
"type": {
|
|
6095
|
+
"text": "string | null"
|
|
6096
|
+
}
|
|
6097
|
+
}
|
|
6098
|
+
]
|
|
6099
|
+
},
|
|
6100
|
+
{
|
|
6101
|
+
"kind": "method",
|
|
6102
|
+
"name": "selectByValue",
|
|
6103
|
+
"return": {
|
|
6104
|
+
"type": {
|
|
6105
|
+
"text": "void"
|
|
6106
|
+
}
|
|
6107
|
+
},
|
|
6108
|
+
"parameters": [
|
|
6109
|
+
{
|
|
6110
|
+
"name": "value",
|
|
6111
|
+
"type": {
|
|
6112
|
+
"text": "string"
|
|
6113
|
+
}
|
|
6114
|
+
}
|
|
6115
|
+
],
|
|
6116
|
+
"description": "Maps a value from the segmented-control or select (which uses\nAGENT_PICKER_AUTO_VALUE for Auto) back to the `string | null` form\nexpected by `selectAgent`."
|
|
6117
|
+
},
|
|
6118
|
+
{
|
|
6119
|
+
"kind": "field",
|
|
6120
|
+
"name": "currentValue",
|
|
6126
6121
|
"type": {
|
|
6127
6122
|
"text": "string"
|
|
6128
|
-
}
|
|
6123
|
+
},
|
|
6124
|
+
"description": "Current pinned agent name as a value the segmented-control / select can bind to.",
|
|
6125
|
+
"readonly": true
|
|
6129
6126
|
}
|
|
6130
6127
|
],
|
|
6131
|
-
"
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
"name": "deleteSessionStore",
|
|
6136
|
-
"return": {
|
|
6137
|
-
"type": {
|
|
6138
|
-
"text": "void"
|
|
6128
|
+
"events": [
|
|
6129
|
+
{
|
|
6130
|
+
"description": "Fired when the user changes selection with the agent name or `null` for Auto. detail: `string | null`",
|
|
6131
|
+
"name": "agent-pinned"
|
|
6139
6132
|
}
|
|
6140
|
-
|
|
6141
|
-
"
|
|
6133
|
+
],
|
|
6134
|
+
"attributes": [
|
|
6142
6135
|
{
|
|
6143
|
-
"name": "
|
|
6136
|
+
"name": "design-system-prefix",
|
|
6144
6137
|
"type": {
|
|
6145
6138
|
"text": "string"
|
|
6146
|
-
}
|
|
6139
|
+
},
|
|
6140
|
+
"default": "'rapid'",
|
|
6141
|
+
"description": "Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`.",
|
|
6142
|
+
"fieldName": "designSystemPrefix"
|
|
6147
6143
|
}
|
|
6148
6144
|
],
|
|
6149
|
-
"
|
|
6145
|
+
"superclass": {
|
|
6146
|
+
"name": "GenesisElement",
|
|
6147
|
+
"package": "@genesislcap/web-core"
|
|
6148
|
+
},
|
|
6149
|
+
"tagName": "foundation-ai-agent-picker",
|
|
6150
|
+
"customElement": true
|
|
6150
6151
|
}
|
|
6151
6152
|
],
|
|
6152
6153
|
"exports": [
|
|
6153
6154
|
{
|
|
6154
6155
|
"kind": "js",
|
|
6155
|
-
"name": "
|
|
6156
|
-
"declaration": {
|
|
6157
|
-
"name": "getSessionStore",
|
|
6158
|
-
"module": "src/state/session-store.ts"
|
|
6159
|
-
}
|
|
6160
|
-
},
|
|
6161
|
-
{
|
|
6162
|
-
"kind": "js",
|
|
6163
|
-
"name": "hasSessionStore",
|
|
6156
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
6164
6157
|
"declaration": {
|
|
6165
|
-
"name": "
|
|
6166
|
-
"module": "src/
|
|
6158
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
6159
|
+
"module": "src/components/agent-picker/agent-picker.ts"
|
|
6167
6160
|
}
|
|
6168
6161
|
},
|
|
6169
6162
|
{
|
|
6170
6163
|
"kind": "js",
|
|
6171
|
-
"name": "
|
|
6164
|
+
"name": "AgentPicker",
|
|
6172
6165
|
"declaration": {
|
|
6173
|
-
"name": "
|
|
6174
|
-
"module": "src/
|
|
6166
|
+
"name": "AgentPicker",
|
|
6167
|
+
"module": "src/components/agent-picker/agent-picker.ts"
|
|
6175
6168
|
}
|
|
6176
6169
|
},
|
|
6177
6170
|
{
|
|
6178
|
-
"kind": "
|
|
6179
|
-
"name": "
|
|
6171
|
+
"kind": "custom-element-definition",
|
|
6172
|
+
"name": "foundation-ai-agent-picker",
|
|
6180
6173
|
"declaration": {
|
|
6181
|
-
"name": "
|
|
6182
|
-
"module": "src/
|
|
6174
|
+
"name": "AgentPicker",
|
|
6175
|
+
"module": "src/components/agent-picker/agent-picker.ts"
|
|
6183
6176
|
}
|
|
6184
|
-
}
|
|
6177
|
+
}
|
|
6178
|
+
]
|
|
6179
|
+
},
|
|
6180
|
+
{
|
|
6181
|
+
"kind": "javascript-module",
|
|
6182
|
+
"path": "src/components/agent-picker/index.ts",
|
|
6183
|
+
"declarations": [],
|
|
6184
|
+
"exports": [
|
|
6185
6185
|
{
|
|
6186
6186
|
"kind": "js",
|
|
6187
|
-
"name": "
|
|
6187
|
+
"name": "*",
|
|
6188
6188
|
"declaration": {
|
|
6189
|
-
"name": "
|
|
6190
|
-
"
|
|
6189
|
+
"name": "*",
|
|
6190
|
+
"package": "./agent-picker"
|
|
6191
6191
|
}
|
|
6192
6192
|
}
|
|
6193
6193
|
]
|