@genesislcap/ai-assistant 14.500.0 → 14.501.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 +1374 -1374
- package/package.json +17 -17
|
@@ -4068,1445 +4068,1575 @@
|
|
|
4068
4068
|
},
|
|
4069
4069
|
{
|
|
4070
4070
|
"kind": "javascript-module",
|
|
4071
|
-
"path": "src/
|
|
4071
|
+
"path": "src/styles/ai-colours.ts",
|
|
4072
4072
|
"declarations": [
|
|
4073
4073
|
{
|
|
4074
|
-
"kind": "
|
|
4075
|
-
"name": "
|
|
4076
|
-
"
|
|
4077
|
-
"
|
|
4078
|
-
"text": "AiAssistantSessionState"
|
|
4079
|
-
}
|
|
4074
|
+
"kind": "variable",
|
|
4075
|
+
"name": "AI_COLOUR_AMBER",
|
|
4076
|
+
"type": {
|
|
4077
|
+
"text": "string"
|
|
4080
4078
|
},
|
|
4081
|
-
"
|
|
4079
|
+
"default": "'#feb60a'",
|
|
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."
|
|
4082
4081
|
},
|
|
4083
4082
|
{
|
|
4084
4083
|
"kind": "variable",
|
|
4085
|
-
"name": "
|
|
4084
|
+
"name": "AI_COLOUR_PINK",
|
|
4086
4085
|
"type": {
|
|
4087
|
-
"text": "
|
|
4088
|
-
}
|
|
4086
|
+
"text": "string"
|
|
4087
|
+
},
|
|
4088
|
+
"default": "'#ff0062'"
|
|
4089
4089
|
},
|
|
4090
4090
|
{
|
|
4091
4091
|
"kind": "variable",
|
|
4092
|
-
"name": "
|
|
4092
|
+
"name": "AI_COLOUR_CYAN",
|
|
4093
|
+
"type": {
|
|
4094
|
+
"text": "string"
|
|
4095
|
+
},
|
|
4096
|
+
"default": "'#00dbf9'"
|
|
4097
|
+
},
|
|
4098
|
+
{
|
|
4099
|
+
"kind": "variable",
|
|
4100
|
+
"name": "AI_COLOUR_VIOLET",
|
|
4101
|
+
"type": {
|
|
4102
|
+
"text": "string"
|
|
4103
|
+
},
|
|
4104
|
+
"default": "'#da00f7'"
|
|
4093
4105
|
}
|
|
4094
4106
|
],
|
|
4095
4107
|
"exports": [
|
|
4096
4108
|
{
|
|
4097
4109
|
"kind": "js",
|
|
4098
|
-
"name": "
|
|
4110
|
+
"name": "AI_COLOUR_AMBER",
|
|
4099
4111
|
"declaration": {
|
|
4100
|
-
"name": "
|
|
4101
|
-
"module": "src/
|
|
4112
|
+
"name": "AI_COLOUR_AMBER",
|
|
4113
|
+
"module": "src/styles/ai-colours.ts"
|
|
4102
4114
|
}
|
|
4103
4115
|
},
|
|
4104
4116
|
{
|
|
4105
4117
|
"kind": "js",
|
|
4106
|
-
"name": "
|
|
4118
|
+
"name": "AI_COLOUR_PINK",
|
|
4107
4119
|
"declaration": {
|
|
4108
|
-
"name": "
|
|
4109
|
-
"module": "src/
|
|
4120
|
+
"name": "AI_COLOUR_PINK",
|
|
4121
|
+
"module": "src/styles/ai-colours.ts"
|
|
4110
4122
|
}
|
|
4111
4123
|
},
|
|
4112
4124
|
{
|
|
4113
4125
|
"kind": "js",
|
|
4114
|
-
"name": "
|
|
4126
|
+
"name": "AI_COLOUR_CYAN",
|
|
4115
4127
|
"declaration": {
|
|
4116
|
-
"name": "
|
|
4117
|
-
"module": "src/
|
|
4128
|
+
"name": "AI_COLOUR_CYAN",
|
|
4129
|
+
"module": "src/styles/ai-colours.ts"
|
|
4130
|
+
}
|
|
4131
|
+
},
|
|
4132
|
+
{
|
|
4133
|
+
"kind": "js",
|
|
4134
|
+
"name": "AI_COLOUR_VIOLET",
|
|
4135
|
+
"declaration": {
|
|
4136
|
+
"name": "AI_COLOUR_VIOLET",
|
|
4137
|
+
"module": "src/styles/ai-colours.ts"
|
|
4118
4138
|
}
|
|
4119
4139
|
}
|
|
4120
4140
|
]
|
|
4121
4141
|
},
|
|
4122
4142
|
{
|
|
4123
4143
|
"kind": "javascript-module",
|
|
4124
|
-
"path": "src/
|
|
4144
|
+
"path": "src/suggestions/chat-suggestions.ts",
|
|
4125
4145
|
"declarations": [
|
|
4126
4146
|
{
|
|
4127
|
-
"kind": "
|
|
4128
|
-
"
|
|
4129
|
-
"
|
|
4130
|
-
|
|
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": [
|
|
4147
|
+
"kind": "class",
|
|
4148
|
+
"description": "",
|
|
4149
|
+
"name": "ChatSuggestions",
|
|
4150
|
+
"members": [
|
|
4144
4151
|
{
|
|
4145
|
-
"
|
|
4152
|
+
"kind": "field",
|
|
4153
|
+
"name": "state",
|
|
4146
4154
|
"type": {
|
|
4147
|
-
"text": "
|
|
4148
|
-
}
|
|
4155
|
+
"text": "SuggestionsState"
|
|
4156
|
+
},
|
|
4157
|
+
"default": "{ status: 'idle' }"
|
|
4149
4158
|
},
|
|
4150
4159
|
{
|
|
4151
|
-
"
|
|
4160
|
+
"kind": "field",
|
|
4161
|
+
"name": "hasContent",
|
|
4152
4162
|
"type": {
|
|
4153
|
-
"text": "
|
|
4154
|
-
}
|
|
4163
|
+
"text": "boolean"
|
|
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."
|
|
4155
4167
|
},
|
|
4156
4168
|
{
|
|
4157
|
-
"
|
|
4158
|
-
"
|
|
4159
|
-
"
|
|
4160
|
-
"
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
],
|
|
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": [
|
|
4175
|
-
{
|
|
4176
|
-
"name": "key",
|
|
4177
|
-
"type": {
|
|
4178
|
-
"text": "string"
|
|
4169
|
+
"kind": "method",
|
|
4170
|
+
"name": "stateChanged",
|
|
4171
|
+
"return": {
|
|
4172
|
+
"type": {
|
|
4173
|
+
"text": "void"
|
|
4174
|
+
}
|
|
4179
4175
|
}
|
|
4180
4176
|
},
|
|
4181
4177
|
{
|
|
4182
|
-
"
|
|
4183
|
-
"
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4178
|
+
"kind": "method",
|
|
4179
|
+
"name": "handleSuggestionClick",
|
|
4180
|
+
"return": {
|
|
4181
|
+
"type": {
|
|
4182
|
+
"text": "void"
|
|
4183
|
+
}
|
|
4184
|
+
},
|
|
4185
|
+
"parameters": [
|
|
4186
|
+
{
|
|
4187
|
+
"name": "suggestion",
|
|
4188
|
+
"type": {
|
|
4189
|
+
"text": "string"
|
|
4190
|
+
}
|
|
4191
|
+
}
|
|
4192
|
+
]
|
|
4193
|
+
}
|
|
4194
|
+
],
|
|
4195
|
+
"attributes": [
|
|
4187
4196
|
{
|
|
4188
|
-
"name": "
|
|
4189
|
-
"optional": true,
|
|
4197
|
+
"name": "has-content",
|
|
4190
4198
|
"type": {
|
|
4191
|
-
"text": "
|
|
4192
|
-
}
|
|
4199
|
+
"text": "boolean"
|
|
4200
|
+
},
|
|
4201
|
+
"default": "false",
|
|
4202
|
+
"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.",
|
|
4203
|
+
"fieldName": "hasContent"
|
|
4193
4204
|
}
|
|
4194
4205
|
],
|
|
4195
|
-
"
|
|
4206
|
+
"superclass": {
|
|
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
|
+
}
|
|
4196
4222
|
},
|
|
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": [
|
|
4197
4267
|
{
|
|
4198
4268
|
"kind": "function",
|
|
4199
|
-
"name": "
|
|
4269
|
+
"name": "collectSessionModels",
|
|
4200
4270
|
"return": {
|
|
4201
4271
|
"type": {
|
|
4202
|
-
"text": "
|
|
4272
|
+
"text": "CostSessionModelEntry[]"
|
|
4203
4273
|
}
|
|
4204
4274
|
},
|
|
4205
4275
|
"parameters": [
|
|
4206
4276
|
{
|
|
4207
|
-
"name": "
|
|
4208
|
-
"type": {
|
|
4209
|
-
"text": "string"
|
|
4210
|
-
}
|
|
4211
|
-
},
|
|
4212
|
-
{
|
|
4213
|
-
"name": "reason",
|
|
4277
|
+
"name": "messages",
|
|
4214
4278
|
"type": {
|
|
4215
|
-
"text": "
|
|
4279
|
+
"text": "readonly ChatMessage[]"
|
|
4216
4280
|
}
|
|
4217
4281
|
},
|
|
4218
4282
|
{
|
|
4219
|
-
"name": "
|
|
4220
|
-
"
|
|
4283
|
+
"name": "providerStatuses",
|
|
4284
|
+
"default": "[]",
|
|
4221
4285
|
"type": {
|
|
4222
|
-
"text": "
|
|
4286
|
+
"text": "readonly AIProviderRegistryStatusEntry[]"
|
|
4223
4287
|
}
|
|
4224
4288
|
}
|
|
4225
4289
|
],
|
|
4226
|
-
"description": "
|
|
4227
|
-
}
|
|
4290
|
+
"description": "Unique models used across a message list (includes sub-agent traces)."
|
|
4291
|
+
}
|
|
4292
|
+
],
|
|
4293
|
+
"exports": [
|
|
4228
4294
|
{
|
|
4229
|
-
"kind": "
|
|
4230
|
-
"name": "
|
|
4231
|
-
"
|
|
4232
|
-
"
|
|
4233
|
-
|
|
4234
|
-
|
|
4295
|
+
"kind": "js",
|
|
4296
|
+
"name": "collectSessionModels",
|
|
4297
|
+
"declaration": {
|
|
4298
|
+
"name": "collectSessionModels",
|
|
4299
|
+
"module": "src/utils/collect-session-models.ts"
|
|
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"
|
|
4235
4313
|
},
|
|
4236
|
-
"
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
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"
|
|
4322
|
+
},
|
|
4323
|
+
"default": "'condensed'",
|
|
4324
|
+
"description": "Key the collapsed args are stored under — a tool-call's args must stay a Record."
|
|
4245
4325
|
},
|
|
4246
4326
|
{
|
|
4247
4327
|
"kind": "function",
|
|
4248
|
-
"name": "
|
|
4328
|
+
"name": "applyCondensation",
|
|
4249
4329
|
"return": {
|
|
4250
4330
|
"type": {
|
|
4251
|
-
"text": "
|
|
4331
|
+
"text": "ChatMessage[]"
|
|
4252
4332
|
}
|
|
4253
4333
|
},
|
|
4254
4334
|
"parameters": [
|
|
4255
4335
|
{
|
|
4256
|
-
"name": "
|
|
4336
|
+
"name": "history",
|
|
4257
4337
|
"type": {
|
|
4258
|
-
"text": "
|
|
4259
|
-
}
|
|
4338
|
+
"text": "ChatMessage[]"
|
|
4339
|
+
},
|
|
4340
|
+
"description": "The to-model history copy to rewrite (not mutated)."
|
|
4260
4341
|
},
|
|
4261
4342
|
{
|
|
4262
|
-
"name": "
|
|
4343
|
+
"name": "policies",
|
|
4263
4344
|
"type": {
|
|
4264
|
-
"text": "
|
|
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": [
|
|
4345
|
+
"text": "Map<string, RegisteredCondensePolicy>"
|
|
4346
|
+
},
|
|
4347
|
+
"description": "The driver's registry, keyed by tool-call id. Its entries'\n`reported*` flags are flipped as payloads first collapse."
|
|
4348
|
+
},
|
|
4279
4349
|
{
|
|
4280
|
-
"name": "
|
|
4350
|
+
"name": "ctx",
|
|
4281
4351
|
"type": {
|
|
4282
|
-
"text": "
|
|
4283
|
-
}
|
|
4352
|
+
"text": "CondenseContext"
|
|
4353
|
+
},
|
|
4354
|
+
"description": "The driver's live clocks (model-call / turn / agent-activation)."
|
|
4355
|
+
},
|
|
4356
|
+
{
|
|
4357
|
+
"name": "onCondensed",
|
|
4358
|
+
"type": {
|
|
4359
|
+
"text": "(detail: CondensedEventDetail) => void"
|
|
4360
|
+
},
|
|
4361
|
+
"description": "Invoked once per payload at its full→stub transition."
|
|
4284
4362
|
}
|
|
4285
4363
|
],
|
|
4286
|
-
"description": "
|
|
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."
|
|
4364
|
+
"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."
|
|
4296
4365
|
}
|
|
4297
4366
|
],
|
|
4298
4367
|
"exports": [
|
|
4299
4368
|
{
|
|
4300
4369
|
"kind": "js",
|
|
4301
|
-
"name": "
|
|
4302
|
-
"declaration": {
|
|
4303
|
-
"name": "META_EVENT_IMPORTANCE",
|
|
4304
|
-
"module": "src/state/debug-event-log.ts"
|
|
4305
|
-
}
|
|
4306
|
-
},
|
|
4307
|
-
{
|
|
4308
|
-
"kind": "js",
|
|
4309
|
-
"name": "recordMetaEvent",
|
|
4310
|
-
"declaration": {
|
|
4311
|
-
"name": "recordMetaEvent",
|
|
4312
|
-
"module": "src/state/debug-event-log.ts"
|
|
4313
|
-
}
|
|
4314
|
-
},
|
|
4315
|
-
{
|
|
4316
|
-
"kind": "js",
|
|
4317
|
-
"name": "TurnFailureReason",
|
|
4318
|
-
"declaration": {
|
|
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",
|
|
4370
|
+
"name": "CONDENSE_MIN_CHARS",
|
|
4350
4371
|
"declaration": {
|
|
4351
|
-
"name": "
|
|
4352
|
-
"module": "src/
|
|
4372
|
+
"name": "CONDENSE_MIN_CHARS",
|
|
4373
|
+
"module": "src/utils/condense-history.ts"
|
|
4353
4374
|
}
|
|
4354
4375
|
},
|
|
4355
4376
|
{
|
|
4356
4377
|
"kind": "js",
|
|
4357
|
-
"name": "
|
|
4378
|
+
"name": "CONDENSED_ARGS_KEY",
|
|
4358
4379
|
"declaration": {
|
|
4359
|
-
"name": "
|
|
4360
|
-
"module": "src/
|
|
4380
|
+
"name": "CONDENSED_ARGS_KEY",
|
|
4381
|
+
"module": "src/utils/condense-history.ts"
|
|
4361
4382
|
}
|
|
4362
4383
|
},
|
|
4363
4384
|
{
|
|
4364
4385
|
"kind": "js",
|
|
4365
|
-
"name": "
|
|
4386
|
+
"name": "applyCondensation",
|
|
4366
4387
|
"declaration": {
|
|
4367
|
-
"name": "
|
|
4368
|
-
"module": "src/
|
|
4388
|
+
"name": "applyCondensation",
|
|
4389
|
+
"module": "src/utils/condense-history.ts"
|
|
4369
4390
|
}
|
|
4370
4391
|
}
|
|
4371
4392
|
]
|
|
4372
4393
|
},
|
|
4373
4394
|
{
|
|
4374
4395
|
"kind": "javascript-module",
|
|
4375
|
-
"path": "src/
|
|
4396
|
+
"path": "src/utils/cost-session-history.ts",
|
|
4376
4397
|
"declarations": [
|
|
4377
4398
|
{
|
|
4378
4399
|
"kind": "function",
|
|
4379
|
-
"name": "
|
|
4400
|
+
"name": "costHistoryStorageKey",
|
|
4380
4401
|
"return": {
|
|
4381
4402
|
"type": {
|
|
4382
|
-
"text": "
|
|
4403
|
+
"text": "string"
|
|
4383
4404
|
}
|
|
4384
4405
|
},
|
|
4385
4406
|
"parameters": [
|
|
4386
4407
|
{
|
|
4387
|
-
"name": "
|
|
4408
|
+
"name": "scope",
|
|
4388
4409
|
"type": {
|
|
4389
4410
|
"text": "string"
|
|
4390
4411
|
}
|
|
4391
|
-
}
|
|
4412
|
+
}
|
|
4413
|
+
],
|
|
4414
|
+
"description": "localStorage key for a host-scoped cost history list."
|
|
4415
|
+
},
|
|
4416
|
+
{
|
|
4417
|
+
"kind": "function",
|
|
4418
|
+
"name": "loadCostSessionHistory",
|
|
4419
|
+
"return": {
|
|
4420
|
+
"type": {
|
|
4421
|
+
"text": "CostSessionRecord[]"
|
|
4422
|
+
}
|
|
4423
|
+
},
|
|
4424
|
+
"parameters": [
|
|
4392
4425
|
{
|
|
4393
|
-
"name": "
|
|
4426
|
+
"name": "scope",
|
|
4427
|
+
"type": {
|
|
4428
|
+
"text": "string"
|
|
4429
|
+
}
|
|
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": [
|
|
4443
|
+
{
|
|
4444
|
+
"name": "scope",
|
|
4394
4445
|
"type": {
|
|
4395
4446
|
"text": "string"
|
|
4396
4447
|
}
|
|
4397
4448
|
},
|
|
4398
4449
|
{
|
|
4399
|
-
"name": "
|
|
4450
|
+
"name": "records",
|
|
4400
4451
|
"type": {
|
|
4401
|
-
"text": "
|
|
4452
|
+
"text": "CostSessionRecord[]"
|
|
4402
4453
|
}
|
|
4403
4454
|
}
|
|
4404
4455
|
],
|
|
4405
|
-
"description": "
|
|
4456
|
+
"description": "Replace the persisted list for a scope."
|
|
4406
4457
|
},
|
|
4407
4458
|
{
|
|
4408
4459
|
"kind": "function",
|
|
4409
|
-
"name": "
|
|
4460
|
+
"name": "appendCostSessionRecord",
|
|
4410
4461
|
"return": {
|
|
4411
4462
|
"type": {
|
|
4412
|
-
"text": "
|
|
4463
|
+
"text": "CostSessionRecord[]"
|
|
4413
4464
|
}
|
|
4414
4465
|
},
|
|
4415
4466
|
"parameters": [
|
|
4416
4467
|
{
|
|
4417
|
-
"name": "
|
|
4468
|
+
"name": "scope",
|
|
4418
4469
|
"type": {
|
|
4419
4470
|
"text": "string"
|
|
4420
4471
|
}
|
|
4472
|
+
},
|
|
4473
|
+
{
|
|
4474
|
+
"name": "record",
|
|
4475
|
+
"type": {
|
|
4476
|
+
"text": "CostSessionRecord"
|
|
4477
|
+
}
|
|
4421
4478
|
}
|
|
4422
4479
|
],
|
|
4423
|
-
"description": "
|
|
4480
|
+
"description": "Prepend a record and persist. Returns the updated list."
|
|
4424
4481
|
},
|
|
4425
4482
|
{
|
|
4426
4483
|
"kind": "function",
|
|
4427
|
-
"name": "
|
|
4484
|
+
"name": "removeCostSessionRecord",
|
|
4428
4485
|
"return": {
|
|
4429
4486
|
"type": {
|
|
4430
|
-
"text": "
|
|
4487
|
+
"text": "CostSessionRecord[]"
|
|
4431
4488
|
}
|
|
4432
4489
|
},
|
|
4433
4490
|
"parameters": [
|
|
4434
4491
|
{
|
|
4435
|
-
"name": "
|
|
4492
|
+
"name": "scope",
|
|
4493
|
+
"type": {
|
|
4494
|
+
"text": "string"
|
|
4495
|
+
}
|
|
4496
|
+
},
|
|
4497
|
+
{
|
|
4498
|
+
"name": "id",
|
|
4436
4499
|
"type": {
|
|
4437
4500
|
"text": "string"
|
|
4438
4501
|
}
|
|
4439
4502
|
}
|
|
4440
4503
|
],
|
|
4441
|
-
"description": "
|
|
4504
|
+
"description": "Remove one record by id. Returns the updated list."
|
|
4442
4505
|
},
|
|
4443
4506
|
{
|
|
4444
4507
|
"kind": "function",
|
|
4445
|
-
"name": "
|
|
4508
|
+
"name": "clearCostSessionHistory",
|
|
4446
4509
|
"return": {
|
|
4447
4510
|
"type": {
|
|
4448
|
-
"text": "
|
|
4511
|
+
"text": "void"
|
|
4449
4512
|
}
|
|
4450
4513
|
},
|
|
4451
4514
|
"parameters": [
|
|
4452
4515
|
{
|
|
4453
|
-
"name": "
|
|
4516
|
+
"name": "scope",
|
|
4454
4517
|
"type": {
|
|
4455
4518
|
"text": "string"
|
|
4456
4519
|
}
|
|
4457
4520
|
}
|
|
4458
4521
|
],
|
|
4459
|
-
"description": "
|
|
4460
|
-
}
|
|
4461
|
-
],
|
|
4462
|
-
"exports": [
|
|
4463
|
-
{
|
|
4464
|
-
"kind": "js",
|
|
4465
|
-
"name": "getOrCreateDriver",
|
|
4466
|
-
"declaration": {
|
|
4467
|
-
"name": "getOrCreateDriver",
|
|
4468
|
-
"module": "src/state/driver-registry.ts"
|
|
4469
|
-
}
|
|
4522
|
+
"description": "Clear all persisted records for a scope."
|
|
4470
4523
|
},
|
|
4471
4524
|
{
|
|
4472
|
-
"kind": "
|
|
4473
|
-
"name": "
|
|
4525
|
+
"kind": "function",
|
|
4526
|
+
"name": "formatCostSessionDate",
|
|
4527
|
+
"return": {
|
|
4528
|
+
"type": {
|
|
4529
|
+
"text": "string"
|
|
4530
|
+
}
|
|
4531
|
+
},
|
|
4532
|
+
"parameters": [
|
|
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",
|
|
4474
4547
|
"declaration": {
|
|
4475
|
-
"name": "
|
|
4476
|
-
"module": "src/
|
|
4548
|
+
"name": "costHistoryStorageKey",
|
|
4549
|
+
"module": "src/utils/cost-session-history.ts"
|
|
4477
4550
|
}
|
|
4478
4551
|
},
|
|
4479
4552
|
{
|
|
4480
4553
|
"kind": "js",
|
|
4481
|
-
"name": "
|
|
4554
|
+
"name": "loadCostSessionHistory",
|
|
4482
4555
|
"declaration": {
|
|
4483
|
-
"name": "
|
|
4484
|
-
"module": "src/
|
|
4556
|
+
"name": "loadCostSessionHistory",
|
|
4557
|
+
"module": "src/utils/cost-session-history.ts"
|
|
4485
4558
|
}
|
|
4486
4559
|
},
|
|
4487
4560
|
{
|
|
4488
4561
|
"kind": "js",
|
|
4489
|
-
"name": "
|
|
4562
|
+
"name": "saveCostSessionHistory",
|
|
4490
4563
|
"declaration": {
|
|
4491
|
-
"name": "
|
|
4492
|
-
"module": "src/
|
|
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
|
+
}
|
|
4575
|
+
},
|
|
4576
|
+
{
|
|
4577
|
+
"kind": "js",
|
|
4578
|
+
"name": "removeCostSessionRecord",
|
|
4579
|
+
"declaration": {
|
|
4580
|
+
"name": "removeCostSessionRecord",
|
|
4581
|
+
"module": "src/utils/cost-session-history.ts"
|
|
4582
|
+
}
|
|
4583
|
+
},
|
|
4584
|
+
{
|
|
4585
|
+
"kind": "js",
|
|
4586
|
+
"name": "clearCostSessionHistory",
|
|
4587
|
+
"declaration": {
|
|
4588
|
+
"name": "clearCostSessionHistory",
|
|
4589
|
+
"module": "src/utils/cost-session-history.ts"
|
|
4590
|
+
}
|
|
4591
|
+
},
|
|
4592
|
+
{
|
|
4593
|
+
"kind": "js",
|
|
4594
|
+
"name": "formatCostSessionDate",
|
|
4595
|
+
"declaration": {
|
|
4596
|
+
"name": "formatCostSessionDate",
|
|
4597
|
+
"module": "src/utils/cost-session-history.ts"
|
|
4493
4598
|
}
|
|
4494
4599
|
}
|
|
4495
4600
|
]
|
|
4496
4601
|
},
|
|
4497
4602
|
{
|
|
4498
4603
|
"kind": "javascript-module",
|
|
4499
|
-
"path": "src/
|
|
4500
|
-
"declarations": [],
|
|
4501
|
-
"exports": []
|
|
4502
|
-
},
|
|
4503
|
-
{
|
|
4504
|
-
"kind": "javascript-module",
|
|
4505
|
-
"path": "src/state/session-store.ts",
|
|
4604
|
+
"path": "src/utils/derive-cost-session-title.ts",
|
|
4506
4605
|
"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
|
+
},
|
|
4507
4624
|
{
|
|
4508
4625
|
"kind": "function",
|
|
4509
|
-
"name": "
|
|
4626
|
+
"name": "getChatMessageText",
|
|
4510
4627
|
"return": {
|
|
4511
4628
|
"type": {
|
|
4512
|
-
"text": "
|
|
4629
|
+
"text": "string"
|
|
4513
4630
|
}
|
|
4514
4631
|
},
|
|
4515
4632
|
"parameters": [
|
|
4516
4633
|
{
|
|
4517
|
-
"name": "
|
|
4634
|
+
"name": "content",
|
|
4518
4635
|
"type": {
|
|
4519
|
-
"text": "
|
|
4636
|
+
"text": "ChatMessage['content']"
|
|
4520
4637
|
}
|
|
4521
|
-
}
|
|
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": [
|
|
4522
4651
|
{
|
|
4523
|
-
"name": "
|
|
4524
|
-
"optional": true,
|
|
4652
|
+
"name": "text",
|
|
4525
4653
|
"type": {
|
|
4526
|
-
"text": "
|
|
4654
|
+
"text": "string"
|
|
4527
4655
|
}
|
|
4528
4656
|
}
|
|
4529
4657
|
],
|
|
4530
|
-
"description": "
|
|
4658
|
+
"description": "Trim a raw user phrase to a display-friendly session title: first sentence,\nthen word cap, then character cap."
|
|
4531
4659
|
},
|
|
4532
4660
|
{
|
|
4533
4661
|
"kind": "function",
|
|
4534
|
-
"name": "
|
|
4662
|
+
"name": "deriveCostSessionTitleFromMessages",
|
|
4535
4663
|
"return": {
|
|
4536
4664
|
"type": {
|
|
4537
|
-
"text": "
|
|
4665
|
+
"text": "string | undefined"
|
|
4538
4666
|
}
|
|
4539
4667
|
},
|
|
4540
4668
|
"parameters": [
|
|
4541
4669
|
{
|
|
4542
|
-
"name": "
|
|
4670
|
+
"name": "messages",
|
|
4543
4671
|
"type": {
|
|
4544
|
-
"text": "
|
|
4672
|
+
"text": "readonly ChatMessage[]"
|
|
4545
4673
|
}
|
|
4546
4674
|
}
|
|
4547
4675
|
],
|
|
4548
|
-
"description": "
|
|
4676
|
+
"description": "First non-empty user message in the thread, shortened for cost history."
|
|
4549
4677
|
},
|
|
4550
4678
|
{
|
|
4551
4679
|
"kind": "function",
|
|
4552
|
-
"name": "
|
|
4680
|
+
"name": "resolveCostSessionTitle",
|
|
4553
4681
|
"return": {
|
|
4554
4682
|
"type": {
|
|
4555
|
-
"text": "
|
|
4683
|
+
"text": "string"
|
|
4556
4684
|
}
|
|
4557
4685
|
},
|
|
4558
4686
|
"parameters": [
|
|
4559
4687
|
{
|
|
4560
|
-
"name": "
|
|
4688
|
+
"name": "input",
|
|
4561
4689
|
"type": {
|
|
4562
|
-
"text": "
|
|
4690
|
+
"text": "ResolveCostSessionTitleInput"
|
|
4563
4691
|
}
|
|
4564
4692
|
}
|
|
4565
4693
|
],
|
|
4566
|
-
"description": "
|
|
4694
|
+
"description": "Resolve the label stored on a finalized cost session record."
|
|
4567
4695
|
}
|
|
4568
4696
|
],
|
|
4569
4697
|
"exports": [
|
|
4570
4698
|
{
|
|
4571
4699
|
"kind": "js",
|
|
4572
|
-
"name": "
|
|
4700
|
+
"name": "COST_SESSION_TITLE_MAX_WORDS",
|
|
4573
4701
|
"declaration": {
|
|
4574
|
-
"name": "
|
|
4575
|
-
"module": "src/
|
|
4702
|
+
"name": "COST_SESSION_TITLE_MAX_WORDS",
|
|
4703
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
4576
4704
|
}
|
|
4577
4705
|
},
|
|
4578
4706
|
{
|
|
4579
4707
|
"kind": "js",
|
|
4580
|
-
"name": "
|
|
4708
|
+
"name": "COST_SESSION_TITLE_MAX_CHARS",
|
|
4581
4709
|
"declaration": {
|
|
4582
|
-
"name": "
|
|
4583
|
-
"module": "src/
|
|
4710
|
+
"name": "COST_SESSION_TITLE_MAX_CHARS",
|
|
4711
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
4584
4712
|
}
|
|
4585
4713
|
},
|
|
4586
4714
|
{
|
|
4587
4715
|
"kind": "js",
|
|
4588
|
-
"name": "
|
|
4716
|
+
"name": "getChatMessageText",
|
|
4589
4717
|
"declaration": {
|
|
4590
|
-
"name": "
|
|
4591
|
-
"module": "src/
|
|
4718
|
+
"name": "getChatMessageText",
|
|
4719
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
4592
4720
|
}
|
|
4593
4721
|
},
|
|
4594
4722
|
{
|
|
4595
4723
|
"kind": "js",
|
|
4596
|
-
"name": "
|
|
4724
|
+
"name": "truncateCostSessionTitle",
|
|
4597
4725
|
"declaration": {
|
|
4598
|
-
"name": "
|
|
4599
|
-
"module": "src/
|
|
4726
|
+
"name": "truncateCostSessionTitle",
|
|
4727
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
4600
4728
|
}
|
|
4601
4729
|
},
|
|
4602
4730
|
{
|
|
4603
4731
|
"kind": "js",
|
|
4604
|
-
"name": "
|
|
4732
|
+
"name": "deriveCostSessionTitleFromMessages",
|
|
4605
4733
|
"declaration": {
|
|
4606
|
-
"name": "
|
|
4607
|
-
"module": "src/
|
|
4734
|
+
"name": "deriveCostSessionTitleFromMessages",
|
|
4735
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
4736
|
+
}
|
|
4737
|
+
},
|
|
4738
|
+
{
|
|
4739
|
+
"kind": "js",
|
|
4740
|
+
"name": "resolveCostSessionTitle",
|
|
4741
|
+
"declaration": {
|
|
4742
|
+
"name": "resolveCostSessionTitle",
|
|
4743
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
4608
4744
|
}
|
|
4609
4745
|
}
|
|
4610
4746
|
]
|
|
4611
4747
|
},
|
|
4612
4748
|
{
|
|
4613
4749
|
"kind": "javascript-module",
|
|
4614
|
-
"path": "src/
|
|
4750
|
+
"path": "src/utils/flatten-sub-agent-messages.ts",
|
|
4751
|
+
"declarations": [],
|
|
4752
|
+
"exports": []
|
|
4753
|
+
},
|
|
4754
|
+
{
|
|
4755
|
+
"kind": "javascript-module",
|
|
4756
|
+
"path": "src/utils/history-transform.ts",
|
|
4615
4757
|
"declarations": [
|
|
4616
4758
|
{
|
|
4617
|
-
"kind": "
|
|
4618
|
-
"name": "
|
|
4619
|
-
"
|
|
4620
|
-
"
|
|
4759
|
+
"kind": "function",
|
|
4760
|
+
"name": "transformHistoryForAgent",
|
|
4761
|
+
"return": {
|
|
4762
|
+
"type": {
|
|
4763
|
+
"text": "ChatMessage[]"
|
|
4764
|
+
}
|
|
4621
4765
|
},
|
|
4622
|
-
"
|
|
4623
|
-
|
|
4766
|
+
"parameters": [
|
|
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."
|
|
4624
4781
|
},
|
|
4625
4782
|
{
|
|
4626
|
-
"kind": "
|
|
4627
|
-
"name": "
|
|
4628
|
-
"
|
|
4629
|
-
"
|
|
4783
|
+
"kind": "function",
|
|
4784
|
+
"name": "applyHistoryCap",
|
|
4785
|
+
"return": {
|
|
4786
|
+
"type": {
|
|
4787
|
+
"text": "ChatMessage[]"
|
|
4788
|
+
}
|
|
4630
4789
|
},
|
|
4631
|
-
"
|
|
4790
|
+
"parameters": [
|
|
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."
|
|
4632
4805
|
},
|
|
4633
4806
|
{
|
|
4634
4807
|
"kind": "variable",
|
|
4635
|
-
"name": "
|
|
4808
|
+
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
4636
4809
|
"type": {
|
|
4637
|
-
"text": "
|
|
4810
|
+
"text": "number"
|
|
4638
4811
|
},
|
|
4639
|
-
"default": "
|
|
4812
|
+
"default": "4",
|
|
4813
|
+
"description": "Recent messages kept verbatim when compacting; everything earlier is summarized."
|
|
4640
4814
|
},
|
|
4641
4815
|
{
|
|
4642
4816
|
"kind": "variable",
|
|
4643
|
-
"name": "
|
|
4817
|
+
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
4644
4818
|
"type": {
|
|
4645
|
-
"text": "
|
|
4819
|
+
"text": "number"
|
|
4646
4820
|
},
|
|
4647
|
-
"default": "
|
|
4821
|
+
"default": "4",
|
|
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."
|
|
4648
4895
|
}
|
|
4649
4896
|
],
|
|
4650
4897
|
"exports": [
|
|
4651
4898
|
{
|
|
4652
4899
|
"kind": "js",
|
|
4653
|
-
"name": "
|
|
4900
|
+
"name": "transformHistoryForAgent",
|
|
4654
4901
|
"declaration": {
|
|
4655
|
-
"name": "
|
|
4656
|
-
"module": "src/
|
|
4902
|
+
"name": "transformHistoryForAgent",
|
|
4903
|
+
"module": "src/utils/history-transform.ts"
|
|
4657
4904
|
}
|
|
4658
4905
|
},
|
|
4659
4906
|
{
|
|
4660
4907
|
"kind": "js",
|
|
4661
|
-
"name": "
|
|
4908
|
+
"name": "applyHistoryCap",
|
|
4662
4909
|
"declaration": {
|
|
4663
|
-
"name": "
|
|
4664
|
-
"module": "src/
|
|
4910
|
+
"name": "applyHistoryCap",
|
|
4911
|
+
"module": "src/utils/history-transform.ts"
|
|
4665
4912
|
}
|
|
4666
4913
|
},
|
|
4667
4914
|
{
|
|
4668
4915
|
"kind": "js",
|
|
4669
|
-
"name": "
|
|
4916
|
+
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
4670
4917
|
"declaration": {
|
|
4671
|
-
"name": "
|
|
4672
|
-
"module": "src/
|
|
4918
|
+
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
4919
|
+
"module": "src/utils/history-transform.ts"
|
|
4673
4920
|
}
|
|
4674
4921
|
},
|
|
4675
4922
|
{
|
|
4676
4923
|
"kind": "js",
|
|
4677
|
-
"name": "
|
|
4924
|
+
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
4678
4925
|
"declaration": {
|
|
4679
|
-
"name": "
|
|
4680
|
-
"module": "src/
|
|
4926
|
+
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
4927
|
+
"module": "src/utils/history-transform.ts"
|
|
4681
4928
|
}
|
|
4682
|
-
}
|
|
4683
|
-
]
|
|
4684
|
-
},
|
|
4685
|
-
{
|
|
4686
|
-
"kind": "javascript-module",
|
|
4687
|
-
"path": "src/suggestions/chat-suggestions.ts",
|
|
4688
|
-
"declarations": [
|
|
4929
|
+
},
|
|
4689
4930
|
{
|
|
4690
|
-
"kind": "
|
|
4691
|
-
"
|
|
4692
|
-
"
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
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": [
|
|
4931
|
+
"kind": "js",
|
|
4932
|
+
"name": "findCompactionCut",
|
|
4933
|
+
"declaration": {
|
|
4934
|
+
"name": "findCompactionCut",
|
|
4935
|
+
"module": "src/utils/history-transform.ts"
|
|
4936
|
+
}
|
|
4937
|
+
},
|
|
4758
4938
|
{
|
|
4759
4939
|
"kind": "js",
|
|
4760
|
-
"name": "
|
|
4940
|
+
"name": "buildCompactionSummaryPrompt",
|
|
4761
4941
|
"declaration": {
|
|
4762
|
-
"name": "
|
|
4763
|
-
"module": "src/
|
|
4942
|
+
"name": "buildCompactionSummaryPrompt",
|
|
4943
|
+
"module": "src/utils/history-transform.ts"
|
|
4764
4944
|
}
|
|
4765
4945
|
},
|
|
4766
4946
|
{
|
|
4767
|
-
"kind": "
|
|
4768
|
-
"name": "
|
|
4947
|
+
"kind": "js",
|
|
4948
|
+
"name": "normalizeForProvider",
|
|
4769
4949
|
"declaration": {
|
|
4770
|
-
"name": "
|
|
4771
|
-
"module": "src/
|
|
4950
|
+
"name": "normalizeForProvider",
|
|
4951
|
+
"module": "src/utils/history-transform.ts"
|
|
4952
|
+
}
|
|
4953
|
+
},
|
|
4954
|
+
{
|
|
4955
|
+
"kind": "js",
|
|
4956
|
+
"name": "compactionDividerLabel",
|
|
4957
|
+
"declaration": {
|
|
4958
|
+
"name": "compactionDividerLabel",
|
|
4959
|
+
"module": "src/utils/history-transform.ts"
|
|
4772
4960
|
}
|
|
4773
4961
|
}
|
|
4774
4962
|
]
|
|
4775
4963
|
},
|
|
4776
4964
|
{
|
|
4777
4965
|
"kind": "javascript-module",
|
|
4778
|
-
"path": "src/
|
|
4779
|
-
"declarations": [],
|
|
4780
|
-
"exports": []
|
|
4781
|
-
},
|
|
4782
|
-
{
|
|
4783
|
-
"kind": "javascript-module",
|
|
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",
|
|
4966
|
+
"path": "src/utils/index.ts",
|
|
4803
4967
|
"declarations": [],
|
|
4804
|
-
"exports": []
|
|
4805
|
-
},
|
|
4806
|
-
{
|
|
4807
|
-
"kind": "javascript-module",
|
|
4808
|
-
"path": "src/utils/collect-session-models.ts",
|
|
4809
|
-
"declarations": [
|
|
4810
|
-
{
|
|
4811
|
-
"kind": "function",
|
|
4812
|
-
"name": "collectSessionModels",
|
|
4813
|
-
"return": {
|
|
4814
|
-
"type": {
|
|
4815
|
-
"text": "CostSessionModelEntry[]"
|
|
4816
|
-
}
|
|
4817
|
-
},
|
|
4818
|
-
"parameters": [
|
|
4819
|
-
{
|
|
4820
|
-
"name": "messages",
|
|
4821
|
-
"type": {
|
|
4822
|
-
"text": "readonly ChatMessage[]"
|
|
4823
|
-
}
|
|
4824
|
-
},
|
|
4825
|
-
{
|
|
4826
|
-
"name": "providerStatuses",
|
|
4827
|
-
"default": "[]",
|
|
4828
|
-
"type": {
|
|
4829
|
-
"text": "readonly AIProviderRegistryStatusEntry[]"
|
|
4830
|
-
}
|
|
4831
|
-
}
|
|
4832
|
-
],
|
|
4833
|
-
"description": "Unique models used across a message list (includes sub-agent traces)."
|
|
4834
|
-
}
|
|
4835
|
-
],
|
|
4836
4968
|
"exports": [
|
|
4837
4969
|
{
|
|
4838
4970
|
"kind": "js",
|
|
4839
|
-
"name": "
|
|
4971
|
+
"name": "*",
|
|
4840
4972
|
"declaration": {
|
|
4841
|
-
"name": "
|
|
4842
|
-
"
|
|
4973
|
+
"name": "*",
|
|
4974
|
+
"package": "./animated-panel-toggle"
|
|
4975
|
+
}
|
|
4976
|
+
},
|
|
4977
|
+
{
|
|
4978
|
+
"kind": "js",
|
|
4979
|
+
"name": "*",
|
|
4980
|
+
"declaration": {
|
|
4981
|
+
"name": "*",
|
|
4982
|
+
"package": "./logger"
|
|
4983
|
+
}
|
|
4984
|
+
},
|
|
4985
|
+
{
|
|
4986
|
+
"kind": "js",
|
|
4987
|
+
"name": "*",
|
|
4988
|
+
"declaration": {
|
|
4989
|
+
"name": "*",
|
|
4990
|
+
"package": "./tool-fold"
|
|
4843
4991
|
}
|
|
4844
4992
|
}
|
|
4845
4993
|
]
|
|
4846
4994
|
},
|
|
4847
4995
|
{
|
|
4848
4996
|
"kind": "javascript-module",
|
|
4849
|
-
"path": "src/utils/
|
|
4997
|
+
"path": "src/utils/logger.ts",
|
|
4850
4998
|
"declarations": [
|
|
4851
4999
|
{
|
|
4852
5000
|
"kind": "variable",
|
|
4853
|
-
"name": "
|
|
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."
|
|
4868
|
-
},
|
|
4869
|
-
{
|
|
4870
|
-
"kind": "function",
|
|
4871
|
-
"name": "applyCondensation",
|
|
4872
|
-
"return": {
|
|
4873
|
-
"type": {
|
|
4874
|
-
"text": "ChatMessage[]"
|
|
4875
|
-
}
|
|
4876
|
-
},
|
|
4877
|
-
"parameters": [
|
|
4878
|
-
{
|
|
4879
|
-
"name": "history",
|
|
4880
|
-
"type": {
|
|
4881
|
-
"text": "ChatMessage[]"
|
|
4882
|
-
},
|
|
4883
|
-
"description": "The to-model history copy to rewrite (not mutated)."
|
|
4884
|
-
},
|
|
4885
|
-
{
|
|
4886
|
-
"name": "policies",
|
|
4887
|
-
"type": {
|
|
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."
|
|
4905
|
-
}
|
|
4906
|
-
],
|
|
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."
|
|
5001
|
+
"name": "logger"
|
|
4908
5002
|
}
|
|
4909
5003
|
],
|
|
4910
5004
|
"exports": [
|
|
4911
5005
|
{
|
|
4912
5006
|
"kind": "js",
|
|
4913
|
-
"name": "
|
|
4914
|
-
"declaration": {
|
|
4915
|
-
"name": "CONDENSE_MIN_CHARS",
|
|
4916
|
-
"module": "src/utils/condense-history.ts"
|
|
4917
|
-
}
|
|
4918
|
-
},
|
|
4919
|
-
{
|
|
4920
|
-
"kind": "js",
|
|
4921
|
-
"name": "CONDENSED_ARGS_KEY",
|
|
4922
|
-
"declaration": {
|
|
4923
|
-
"name": "CONDENSED_ARGS_KEY",
|
|
4924
|
-
"module": "src/utils/condense-history.ts"
|
|
4925
|
-
}
|
|
4926
|
-
},
|
|
4927
|
-
{
|
|
4928
|
-
"kind": "js",
|
|
4929
|
-
"name": "applyCondensation",
|
|
5007
|
+
"name": "logger",
|
|
4930
5008
|
"declaration": {
|
|
4931
|
-
"name": "
|
|
4932
|
-
"module": "src/utils/
|
|
5009
|
+
"name": "logger",
|
|
5010
|
+
"module": "src/utils/logger.ts"
|
|
4933
5011
|
}
|
|
4934
5012
|
}
|
|
4935
5013
|
]
|
|
4936
5014
|
},
|
|
4937
5015
|
{
|
|
4938
5016
|
"kind": "javascript-module",
|
|
4939
|
-
"path": "src/utils/
|
|
5017
|
+
"path": "src/utils/message-partition.ts",
|
|
4940
5018
|
"declarations": [
|
|
4941
5019
|
{
|
|
4942
5020
|
"kind": "function",
|
|
4943
|
-
"name": "
|
|
5021
|
+
"name": "isSessionNoticeMarker",
|
|
4944
5022
|
"return": {
|
|
4945
5023
|
"type": {
|
|
4946
|
-
"text": "
|
|
5024
|
+
"text": "boolean"
|
|
4947
5025
|
}
|
|
4948
5026
|
},
|
|
4949
5027
|
"parameters": [
|
|
4950
5028
|
{
|
|
4951
|
-
"name": "
|
|
5029
|
+
"name": "m",
|
|
4952
5030
|
"type": {
|
|
4953
|
-
"text": "
|
|
5031
|
+
"text": "ChatMessage"
|
|
4954
5032
|
}
|
|
4955
5033
|
}
|
|
4956
5034
|
],
|
|
4957
|
-
"description": "
|
|
5035
|
+
"description": "Either restore notice — both display-only, stripped before persist. @internal"
|
|
4958
5036
|
},
|
|
4959
5037
|
{
|
|
4960
5038
|
"kind": "function",
|
|
4961
|
-
"name": "
|
|
5039
|
+
"name": "trailingInteractionRow",
|
|
4962
5040
|
"return": {
|
|
4963
5041
|
"type": {
|
|
4964
|
-
"text": "
|
|
5042
|
+
"text": "ChatMessage[]"
|
|
4965
5043
|
}
|
|
4966
5044
|
},
|
|
4967
5045
|
"parameters": [
|
|
4968
5046
|
{
|
|
4969
|
-
"name": "
|
|
5047
|
+
"name": "messages",
|
|
4970
5048
|
"type": {
|
|
4971
|
-
"text": "
|
|
5049
|
+
"text": "ChatMessage[]"
|
|
4972
5050
|
}
|
|
4973
5051
|
}
|
|
4974
5052
|
],
|
|
4975
|
-
"description": "
|
|
5053
|
+
"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."
|
|
4976
5054
|
},
|
|
4977
5055
|
{
|
|
4978
5056
|
"kind": "function",
|
|
4979
|
-
"name": "
|
|
5057
|
+
"name": "filterVisibleMessages",
|
|
4980
5058
|
"return": {
|
|
4981
5059
|
"type": {
|
|
4982
|
-
"text": "
|
|
5060
|
+
"text": "ChatMessage[]"
|
|
4983
5061
|
}
|
|
4984
5062
|
},
|
|
4985
5063
|
"parameters": [
|
|
4986
5064
|
{
|
|
4987
|
-
"name": "
|
|
5065
|
+
"name": "messages",
|
|
4988
5066
|
"type": {
|
|
4989
|
-
"text": "
|
|
5067
|
+
"text": "ChatMessage[]"
|
|
4990
5068
|
}
|
|
4991
5069
|
},
|
|
4992
5070
|
{
|
|
4993
|
-
"name": "
|
|
5071
|
+
"name": "toggles",
|
|
4994
5072
|
"type": {
|
|
4995
|
-
"text": "
|
|
5073
|
+
"text": "MessageFilterState"
|
|
4996
5074
|
}
|
|
4997
5075
|
}
|
|
4998
5076
|
],
|
|
4999
|
-
"description": "
|
|
5077
|
+
"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."
|
|
5078
|
+
}
|
|
5079
|
+
],
|
|
5080
|
+
"exports": [
|
|
5081
|
+
{
|
|
5082
|
+
"kind": "js",
|
|
5083
|
+
"name": "isSessionNoticeMarker",
|
|
5084
|
+
"declaration": {
|
|
5085
|
+
"name": "isSessionNoticeMarker",
|
|
5086
|
+
"module": "src/utils/message-partition.ts"
|
|
5087
|
+
}
|
|
5000
5088
|
},
|
|
5089
|
+
{
|
|
5090
|
+
"kind": "js",
|
|
5091
|
+
"name": "trailingInteractionRow",
|
|
5092
|
+
"declaration": {
|
|
5093
|
+
"name": "trailingInteractionRow",
|
|
5094
|
+
"module": "src/utils/message-partition.ts"
|
|
5095
|
+
}
|
|
5096
|
+
},
|
|
5097
|
+
{
|
|
5098
|
+
"kind": "js",
|
|
5099
|
+
"name": "filterVisibleMessages",
|
|
5100
|
+
"declaration": {
|
|
5101
|
+
"name": "filterVisibleMessages",
|
|
5102
|
+
"module": "src/utils/message-partition.ts"
|
|
5103
|
+
}
|
|
5104
|
+
}
|
|
5105
|
+
]
|
|
5106
|
+
},
|
|
5107
|
+
{
|
|
5108
|
+
"kind": "javascript-module",
|
|
5109
|
+
"path": "src/utils/resolve-cost-history-config.ts",
|
|
5110
|
+
"declarations": [
|
|
5001
5111
|
{
|
|
5002
5112
|
"kind": "function",
|
|
5003
|
-
"name": "
|
|
5113
|
+
"name": "resolveCostHistoryConfig",
|
|
5004
5114
|
"return": {
|
|
5005
5115
|
"type": {
|
|
5006
|
-
"text": "
|
|
5116
|
+
"text": "ResolvedCostHistoryConfig"
|
|
5007
5117
|
}
|
|
5008
|
-
},
|
|
5009
|
-
"parameters": [
|
|
5010
|
-
{
|
|
5011
|
-
"name": "scope",
|
|
5012
|
-
"type": {
|
|
5013
|
-
"text": "string"
|
|
5014
|
-
}
|
|
5015
|
-
},
|
|
5118
|
+
},
|
|
5119
|
+
"parameters": [
|
|
5016
5120
|
{
|
|
5017
|
-
"name": "
|
|
5121
|
+
"name": "chatConfig",
|
|
5018
5122
|
"type": {
|
|
5019
|
-
"text": "
|
|
5123
|
+
"text": "ChatConfig"
|
|
5020
5124
|
}
|
|
5021
5125
|
}
|
|
5022
5126
|
],
|
|
5023
|
-
"description": "
|
|
5024
|
-
}
|
|
5127
|
+
"description": "Resolve `chatConfig.costHistory` with defaults applied."
|
|
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": [
|
|
5025
5163
|
{
|
|
5026
5164
|
"kind": "function",
|
|
5027
|
-
"name": "
|
|
5165
|
+
"name": "formatCompactTokenCountSafe",
|
|
5028
5166
|
"return": {
|
|
5029
5167
|
"type": {
|
|
5030
|
-
"text": "
|
|
5168
|
+
"text": "string"
|
|
5031
5169
|
}
|
|
5032
5170
|
},
|
|
5033
5171
|
"parameters": [
|
|
5034
5172
|
{
|
|
5035
|
-
"name": "
|
|
5036
|
-
"type": {
|
|
5037
|
-
"text": "string"
|
|
5038
|
-
}
|
|
5039
|
-
},
|
|
5040
|
-
{
|
|
5041
|
-
"name": "id",
|
|
5173
|
+
"name": "tokens",
|
|
5042
5174
|
"type": {
|
|
5043
|
-
"text": "
|
|
5175
|
+
"text": "number"
|
|
5044
5176
|
}
|
|
5045
5177
|
}
|
|
5046
5178
|
],
|
|
5047
|
-
"description": "
|
|
5048
|
-
}
|
|
5179
|
+
"description": "formatCompactTokenCount passed through DOMPurify for `:innerHTML` bindings."
|
|
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": [
|
|
5049
5197
|
{
|
|
5050
5198
|
"kind": "function",
|
|
5051
|
-
"name": "
|
|
5199
|
+
"name": "createToolFold",
|
|
5052
5200
|
"return": {
|
|
5053
5201
|
"type": {
|
|
5054
|
-
"text": "
|
|
5202
|
+
"text": "ToolFoldResult"
|
|
5055
5203
|
}
|
|
5056
5204
|
},
|
|
5057
5205
|
"parameters": [
|
|
5058
5206
|
{
|
|
5059
|
-
"name": "
|
|
5207
|
+
"name": "config",
|
|
5060
5208
|
"type": {
|
|
5061
|
-
"text": "string"
|
|
5209
|
+
"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}"
|
|
5062
5210
|
}
|
|
5063
5211
|
}
|
|
5064
5212
|
],
|
|
5065
|
-
"description": "
|
|
5213
|
+
"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."
|
|
5066
5214
|
},
|
|
5067
5215
|
{
|
|
5068
5216
|
"kind": "function",
|
|
5069
|
-
"name": "
|
|
5217
|
+
"name": "expandToolTree",
|
|
5070
5218
|
"return": {
|
|
5071
5219
|
"type": {
|
|
5072
|
-
"text": "
|
|
5220
|
+
"text": "ToolTreeNode[]"
|
|
5073
5221
|
}
|
|
5074
5222
|
},
|
|
5075
5223
|
"parameters": [
|
|
5076
5224
|
{
|
|
5077
|
-
"name": "
|
|
5225
|
+
"name": "definitions",
|
|
5078
5226
|
"type": {
|
|
5079
|
-
"text": "
|
|
5227
|
+
"text": "ChatToolDefinition[]"
|
|
5228
|
+
}
|
|
5229
|
+
},
|
|
5230
|
+
{
|
|
5231
|
+
"name": "handlers",
|
|
5232
|
+
"type": {
|
|
5233
|
+
"text": "ChatToolHandlers"
|
|
5080
5234
|
}
|
|
5081
5235
|
}
|
|
5082
5236
|
],
|
|
5083
|
-
"description": "
|
|
5237
|
+
"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."
|
|
5084
5238
|
}
|
|
5085
5239
|
],
|
|
5086
5240
|
"exports": [
|
|
5087
5241
|
{
|
|
5088
5242
|
"kind": "js",
|
|
5089
|
-
"name": "
|
|
5090
|
-
"declaration": {
|
|
5091
|
-
"name": "costHistoryStorageKey",
|
|
5092
|
-
"module": "src/utils/cost-session-history.ts"
|
|
5093
|
-
}
|
|
5094
|
-
},
|
|
5095
|
-
{
|
|
5096
|
-
"kind": "js",
|
|
5097
|
-
"name": "loadCostSessionHistory",
|
|
5098
|
-
"declaration": {
|
|
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",
|
|
5243
|
+
"name": "createToolFold",
|
|
5130
5244
|
"declaration": {
|
|
5131
|
-
"name": "
|
|
5132
|
-
"module": "src/utils/
|
|
5245
|
+
"name": "createToolFold",
|
|
5246
|
+
"module": "src/utils/tool-fold.ts"
|
|
5133
5247
|
}
|
|
5134
5248
|
},
|
|
5135
5249
|
{
|
|
5136
5250
|
"kind": "js",
|
|
5137
|
-
"name": "
|
|
5251
|
+
"name": "expandToolTree",
|
|
5138
5252
|
"declaration": {
|
|
5139
|
-
"name": "
|
|
5140
|
-
"module": "src/utils/
|
|
5253
|
+
"name": "expandToolTree",
|
|
5254
|
+
"module": "src/utils/tool-fold.ts"
|
|
5141
5255
|
}
|
|
5142
5256
|
}
|
|
5143
5257
|
]
|
|
5144
5258
|
},
|
|
5145
5259
|
{
|
|
5146
5260
|
"kind": "javascript-module",
|
|
5147
|
-
"path": "src/utils/
|
|
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",
|
|
5148
5268
|
"declarations": [
|
|
5149
5269
|
{
|
|
5150
|
-
"kind": "
|
|
5151
|
-
"
|
|
5152
|
-
"
|
|
5153
|
-
|
|
5154
|
-
},
|
|
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": [
|
|
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": [
|
|
5176
5274
|
{
|
|
5177
|
-
"
|
|
5275
|
+
"kind": "field",
|
|
5276
|
+
"name": "tools",
|
|
5178
5277
|
"type": {
|
|
5179
|
-
"text": "
|
|
5180
|
-
}
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
"
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5278
|
+
"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"
|
|
5307
|
+
},
|
|
5308
|
+
{
|
|
5309
|
+
"kind": "field",
|
|
5310
|
+
"name": "startTime",
|
|
5311
|
+
"type": {
|
|
5312
|
+
"text": "number"
|
|
5313
|
+
},
|
|
5314
|
+
"privacy": "private",
|
|
5315
|
+
"default": "0"
|
|
5316
|
+
},
|
|
5317
|
+
{
|
|
5318
|
+
"kind": "method",
|
|
5319
|
+
"name": "activate",
|
|
5320
|
+
"privacy": "private"
|
|
5321
|
+
},
|
|
5194
5322
|
{
|
|
5195
|
-
"
|
|
5196
|
-
"
|
|
5197
|
-
|
|
5198
|
-
}
|
|
5323
|
+
"kind": "method",
|
|
5324
|
+
"name": "scheduleDeactivate",
|
|
5325
|
+
"privacy": "private"
|
|
5199
5326
|
}
|
|
5200
5327
|
],
|
|
5201
|
-
"
|
|
5202
|
-
},
|
|
5203
|
-
{
|
|
5204
|
-
"kind": "function",
|
|
5205
|
-
"name": "deriveCostSessionTitleFromMessages",
|
|
5206
|
-
"return": {
|
|
5207
|
-
"type": {
|
|
5208
|
-
"text": "string | undefined"
|
|
5209
|
-
}
|
|
5210
|
-
},
|
|
5211
|
-
"parameters": [
|
|
5328
|
+
"attributes": [
|
|
5212
5329
|
{
|
|
5213
|
-
"name": "
|
|
5330
|
+
"name": "tools",
|
|
5214
5331
|
"type": {
|
|
5215
|
-
"text": "
|
|
5216
|
-
}
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
{
|
|
5222
|
-
"kind": "function",
|
|
5223
|
-
"name": "resolveCostSessionTitle",
|
|
5224
|
-
"return": {
|
|
5225
|
-
"type": {
|
|
5226
|
-
"text": "string"
|
|
5227
|
-
}
|
|
5228
|
-
},
|
|
5229
|
-
"parameters": [
|
|
5332
|
+
"text": "string"
|
|
5333
|
+
},
|
|
5334
|
+
"default": "''",
|
|
5335
|
+
"description": "Comma-separated list of tool names this element reacts to.",
|
|
5336
|
+
"fieldName": "tools"
|
|
5337
|
+
},
|
|
5230
5338
|
{
|
|
5231
|
-
"name": "
|
|
5339
|
+
"name": "min-show-time",
|
|
5232
5340
|
"type": {
|
|
5233
|
-
"text": "
|
|
5234
|
-
}
|
|
5341
|
+
"text": "number"
|
|
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"
|
|
5235
5349
|
}
|
|
5236
5350
|
],
|
|
5237
|
-
"
|
|
5351
|
+
"superclass": {
|
|
5352
|
+
"name": "GenesisElement",
|
|
5353
|
+
"package": "@genesislcap/web-core"
|
|
5354
|
+
},
|
|
5355
|
+
"tagName": "ai-activity-halo",
|
|
5356
|
+
"customElement": true
|
|
5238
5357
|
}
|
|
5239
5358
|
],
|
|
5240
5359
|
"exports": [
|
|
5241
5360
|
{
|
|
5242
5361
|
"kind": "js",
|
|
5243
|
-
"name": "
|
|
5362
|
+
"name": "AiActivityHalo",
|
|
5244
5363
|
"declaration": {
|
|
5245
|
-
"name": "
|
|
5246
|
-
"module": "src/
|
|
5364
|
+
"name": "AiActivityHalo",
|
|
5365
|
+
"module": "src/components/activity-halo/activity-halo.ts"
|
|
5247
5366
|
}
|
|
5248
5367
|
},
|
|
5249
5368
|
{
|
|
5250
|
-
"kind": "
|
|
5251
|
-
"name": "
|
|
5369
|
+
"kind": "custom-element-definition",
|
|
5370
|
+
"name": "ai-activity-halo",
|
|
5252
5371
|
"declaration": {
|
|
5253
|
-
"name": "
|
|
5254
|
-
"module": "src/
|
|
5372
|
+
"name": "AiActivityHalo",
|
|
5373
|
+
"module": "src/components/activity-halo/activity-halo.ts"
|
|
5255
5374
|
}
|
|
5256
|
-
}
|
|
5375
|
+
}
|
|
5376
|
+
]
|
|
5377
|
+
},
|
|
5378
|
+
{
|
|
5379
|
+
"kind": "javascript-module",
|
|
5380
|
+
"path": "src/components/agent-picker/agent-picker.constants.ts",
|
|
5381
|
+
"declarations": [
|
|
5257
5382
|
{
|
|
5258
|
-
"kind": "
|
|
5259
|
-
"name": "
|
|
5260
|
-
"
|
|
5261
|
-
"
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5383
|
+
"kind": "variable",
|
|
5384
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
5385
|
+
"type": {
|
|
5386
|
+
"text": "string"
|
|
5387
|
+
},
|
|
5388
|
+
"default": "'__auto__'",
|
|
5389
|
+
"description": "Sentinel value used by the segmented control / select to represent \"Auto\"."
|
|
5390
|
+
}
|
|
5391
|
+
],
|
|
5392
|
+
"exports": [
|
|
5265
5393
|
{
|
|
5266
5394
|
"kind": "js",
|
|
5267
|
-
"name": "
|
|
5395
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
5268
5396
|
"declaration": {
|
|
5269
|
-
"name": "
|
|
5270
|
-
"module": "src/
|
|
5397
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
5398
|
+
"module": "src/components/agent-picker/agent-picker.constants.ts"
|
|
5271
5399
|
}
|
|
5272
|
-
}
|
|
5400
|
+
}
|
|
5401
|
+
]
|
|
5402
|
+
},
|
|
5403
|
+
{
|
|
5404
|
+
"kind": "javascript-module",
|
|
5405
|
+
"path": "src/components/agent-picker/agent-picker.styles.ts",
|
|
5406
|
+
"declarations": [
|
|
5273
5407
|
{
|
|
5274
|
-
"kind": "
|
|
5275
|
-
"name": "
|
|
5276
|
-
"
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
},
|
|
5408
|
+
"kind": "variable",
|
|
5409
|
+
"name": "styles",
|
|
5410
|
+
"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`"
|
|
5411
|
+
}
|
|
5412
|
+
],
|
|
5413
|
+
"exports": [
|
|
5281
5414
|
{
|
|
5282
5415
|
"kind": "js",
|
|
5283
|
-
"name": "
|
|
5416
|
+
"name": "styles",
|
|
5284
5417
|
"declaration": {
|
|
5285
|
-
"name": "
|
|
5286
|
-
"module": "src/
|
|
5418
|
+
"name": "styles",
|
|
5419
|
+
"module": "src/components/agent-picker/agent-picker.styles.ts"
|
|
5287
5420
|
}
|
|
5288
5421
|
}
|
|
5289
5422
|
]
|
|
5290
5423
|
},
|
|
5291
5424
|
{
|
|
5292
5425
|
"kind": "javascript-module",
|
|
5293
|
-
"path": "src/
|
|
5426
|
+
"path": "src/components/agent-picker/agent-picker.template.ts",
|
|
5294
5427
|
"declarations": [],
|
|
5295
5428
|
"exports": []
|
|
5296
5429
|
},
|
|
5297
5430
|
{
|
|
5298
5431
|
"kind": "javascript-module",
|
|
5299
|
-
"path": "src/
|
|
5432
|
+
"path": "src/components/agent-picker/agent-picker.ts",
|
|
5300
5433
|
"declarations": [
|
|
5301
5434
|
{
|
|
5302
|
-
"kind": "
|
|
5303
|
-
"
|
|
5304
|
-
"
|
|
5305
|
-
|
|
5306
|
-
"text": "ChatMessage[]"
|
|
5307
|
-
}
|
|
5308
|
-
},
|
|
5309
|
-
"parameters": [
|
|
5435
|
+
"kind": "class",
|
|
5436
|
+
"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.",
|
|
5437
|
+
"name": "AgentPicker",
|
|
5438
|
+
"members": [
|
|
5310
5439
|
{
|
|
5311
|
-
"
|
|
5440
|
+
"kind": "field",
|
|
5441
|
+
"name": "designSystemPrefix",
|
|
5312
5442
|
"type": {
|
|
5313
|
-
"text": "
|
|
5314
|
-
}
|
|
5443
|
+
"text": "string"
|
|
5444
|
+
},
|
|
5445
|
+
"default": "'rapid'",
|
|
5446
|
+
"description": "Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`."
|
|
5315
5447
|
},
|
|
5316
5448
|
{
|
|
5317
|
-
"
|
|
5449
|
+
"kind": "field",
|
|
5450
|
+
"name": "mode",
|
|
5318
5451
|
"type": {
|
|
5319
|
-
"text": "
|
|
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
|
+
}
|
|
5320
5527
|
}
|
|
5321
|
-
}
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
"parameters": [
|
|
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
|
+
},
|
|
5334
5540
|
{
|
|
5335
|
-
"
|
|
5336
|
-
"
|
|
5337
|
-
|
|
5338
|
-
|
|
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
|
+
]
|
|
5339
5556
|
},
|
|
5340
5557
|
{
|
|
5341
|
-
"
|
|
5342
|
-
"
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
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": [
|
|
5558
|
+
"kind": "method",
|
|
5559
|
+
"name": "selectByValue",
|
|
5560
|
+
"return": {
|
|
5561
|
+
"type": {
|
|
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`."
|
|
5574
|
+
},
|
|
5376
5575
|
{
|
|
5377
|
-
"
|
|
5576
|
+
"kind": "field",
|
|
5577
|
+
"name": "currentValue",
|
|
5378
5578
|
"type": {
|
|
5379
|
-
"text": "
|
|
5380
|
-
}
|
|
5579
|
+
"text": "string"
|
|
5580
|
+
},
|
|
5581
|
+
"description": "Current pinned agent name as a value the segmented-control / select can bind to.",
|
|
5582
|
+
"readonly": true
|
|
5381
5583
|
}
|
|
5382
5584
|
],
|
|
5383
|
-
"
|
|
5384
|
-
},
|
|
5385
|
-
{
|
|
5386
|
-
"kind": "function",
|
|
5387
|
-
"name": "buildCompactionSummaryPrompt",
|
|
5388
|
-
"return": {
|
|
5389
|
-
"type": {
|
|
5390
|
-
"text": "{\n systemPrompt: string;\n userMessage: string;\n}"
|
|
5391
|
-
}
|
|
5392
|
-
},
|
|
5393
|
-
"parameters": [
|
|
5585
|
+
"events": [
|
|
5394
5586
|
{
|
|
5395
|
-
"
|
|
5396
|
-
"
|
|
5397
|
-
"text": "readonly ChatMessage[]"
|
|
5398
|
-
}
|
|
5587
|
+
"description": "Fired when the user changes selection with the agent name or `null` for Auto. detail: `string | null`",
|
|
5588
|
+
"name": "agent-pinned"
|
|
5399
5589
|
}
|
|
5400
5590
|
],
|
|
5401
|
-
"
|
|
5402
|
-
},
|
|
5403
|
-
{
|
|
5404
|
-
"kind": "function",
|
|
5405
|
-
"name": "normalizeForProvider",
|
|
5406
|
-
"return": {
|
|
5407
|
-
"type": {
|
|
5408
|
-
"text": "ChatMessage[]"
|
|
5409
|
-
}
|
|
5410
|
-
},
|
|
5411
|
-
"parameters": [
|
|
5591
|
+
"attributes": [
|
|
5412
5592
|
{
|
|
5413
|
-
"name": "
|
|
5593
|
+
"name": "design-system-prefix",
|
|
5414
5594
|
"type": {
|
|
5415
|
-
"text": "
|
|
5416
|
-
}
|
|
5595
|
+
"text": "string"
|
|
5596
|
+
},
|
|
5597
|
+
"default": "'rapid'",
|
|
5598
|
+
"description": "Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`.",
|
|
5599
|
+
"fieldName": "designSystemPrefix"
|
|
5417
5600
|
}
|
|
5418
5601
|
],
|
|
5419
|
-
"
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
"kind": "function",
|
|
5423
|
-
"name": "compactionDividerLabel",
|
|
5424
|
-
"return": {
|
|
5425
|
-
"type": {
|
|
5426
|
-
"text": "string"
|
|
5427
|
-
}
|
|
5602
|
+
"superclass": {
|
|
5603
|
+
"name": "GenesisElement",
|
|
5604
|
+
"package": "@genesislcap/web-core"
|
|
5428
5605
|
},
|
|
5429
|
-
"
|
|
5430
|
-
|
|
5431
|
-
"name": "m",
|
|
5432
|
-
"type": {
|
|
5433
|
-
"text": "ChatMessage"
|
|
5434
|
-
}
|
|
5435
|
-
}
|
|
5436
|
-
],
|
|
5437
|
-
"description": "Human-facing divider label for a `compacted-summary` message."
|
|
5606
|
+
"tagName": "foundation-ai-agent-picker",
|
|
5607
|
+
"customElement": true
|
|
5438
5608
|
}
|
|
5439
5609
|
],
|
|
5440
5610
|
"exports": [
|
|
5441
5611
|
{
|
|
5442
5612
|
"kind": "js",
|
|
5443
|
-
"name": "
|
|
5444
|
-
"declaration": {
|
|
5445
|
-
"name": "transformHistoryForAgent",
|
|
5446
|
-
"module": "src/utils/history-transform.ts"
|
|
5447
|
-
}
|
|
5448
|
-
},
|
|
5449
|
-
{
|
|
5450
|
-
"kind": "js",
|
|
5451
|
-
"name": "applyHistoryCap",
|
|
5452
|
-
"declaration": {
|
|
5453
|
-
"name": "applyHistoryCap",
|
|
5454
|
-
"module": "src/utils/history-transform.ts"
|
|
5455
|
-
}
|
|
5456
|
-
},
|
|
5457
|
-
{
|
|
5458
|
-
"kind": "js",
|
|
5459
|
-
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
5460
|
-
"declaration": {
|
|
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",
|
|
5613
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
5484
5614
|
"declaration": {
|
|
5485
|
-
"name": "
|
|
5486
|
-
"module": "src/
|
|
5615
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
5616
|
+
"module": "src/components/agent-picker/agent-picker.ts"
|
|
5487
5617
|
}
|
|
5488
5618
|
},
|
|
5489
5619
|
{
|
|
5490
5620
|
"kind": "js",
|
|
5491
|
-
"name": "
|
|
5621
|
+
"name": "AgentPicker",
|
|
5492
5622
|
"declaration": {
|
|
5493
|
-
"name": "
|
|
5494
|
-
"module": "src/
|
|
5623
|
+
"name": "AgentPicker",
|
|
5624
|
+
"module": "src/components/agent-picker/agent-picker.ts"
|
|
5495
5625
|
}
|
|
5496
5626
|
},
|
|
5497
5627
|
{
|
|
5498
|
-
"kind": "
|
|
5499
|
-
"name": "
|
|
5628
|
+
"kind": "custom-element-definition",
|
|
5629
|
+
"name": "foundation-ai-agent-picker",
|
|
5500
5630
|
"declaration": {
|
|
5501
|
-
"name": "
|
|
5502
|
-
"module": "src/
|
|
5631
|
+
"name": "AgentPicker",
|
|
5632
|
+
"module": "src/components/agent-picker/agent-picker.ts"
|
|
5503
5633
|
}
|
|
5504
5634
|
}
|
|
5505
5635
|
]
|
|
5506
5636
|
},
|
|
5507
5637
|
{
|
|
5508
5638
|
"kind": "javascript-module",
|
|
5509
|
-
"path": "src/
|
|
5639
|
+
"path": "src/components/agent-picker/index.ts",
|
|
5510
5640
|
"declarations": [],
|
|
5511
5641
|
"exports": [
|
|
5512
5642
|
{
|
|
@@ -5514,680 +5644,550 @@
|
|
|
5514
5644
|
"name": "*",
|
|
5515
5645
|
"declaration": {
|
|
5516
5646
|
"name": "*",
|
|
5517
|
-
"package": "./
|
|
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"
|
|
5647
|
+
"package": "./agent-picker"
|
|
5534
5648
|
}
|
|
5535
5649
|
}
|
|
5536
5650
|
]
|
|
5537
5651
|
},
|
|
5538
5652
|
{
|
|
5539
5653
|
"kind": "javascript-module",
|
|
5540
|
-
"path": "src/
|
|
5654
|
+
"path": "src/state/ai-assistant-slice.ts",
|
|
5541
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
|
+
},
|
|
5542
5666
|
{
|
|
5543
5667
|
"kind": "variable",
|
|
5544
|
-
"name": "
|
|
5668
|
+
"name": "defaultSessionState",
|
|
5669
|
+
"type": {
|
|
5670
|
+
"text": "AiAssistantSessionState"
|
|
5671
|
+
}
|
|
5672
|
+
},
|
|
5673
|
+
{
|
|
5674
|
+
"kind": "variable",
|
|
5675
|
+
"name": "aiAssistantSlice"
|
|
5545
5676
|
}
|
|
5546
5677
|
],
|
|
5547
5678
|
"exports": [
|
|
5548
5679
|
{
|
|
5549
5680
|
"kind": "js",
|
|
5550
|
-
"name": "
|
|
5681
|
+
"name": "createDefaultSessionState",
|
|
5682
|
+
"declaration": {
|
|
5683
|
+
"name": "createDefaultSessionState",
|
|
5684
|
+
"module": "src/state/ai-assistant-slice.ts"
|
|
5685
|
+
}
|
|
5686
|
+
},
|
|
5687
|
+
{
|
|
5688
|
+
"kind": "js",
|
|
5689
|
+
"name": "defaultSessionState",
|
|
5551
5690
|
"declaration": {
|
|
5552
|
-
"name": "
|
|
5553
|
-
"module": "src/
|
|
5691
|
+
"name": "defaultSessionState",
|
|
5692
|
+
"module": "src/state/ai-assistant-slice.ts"
|
|
5693
|
+
}
|
|
5694
|
+
},
|
|
5695
|
+
{
|
|
5696
|
+
"kind": "js",
|
|
5697
|
+
"name": "aiAssistantSlice",
|
|
5698
|
+
"declaration": {
|
|
5699
|
+
"name": "aiAssistantSlice",
|
|
5700
|
+
"module": "src/state/ai-assistant-slice.ts"
|
|
5554
5701
|
}
|
|
5555
5702
|
}
|
|
5556
5703
|
]
|
|
5557
5704
|
},
|
|
5558
5705
|
{
|
|
5559
5706
|
"kind": "javascript-module",
|
|
5560
|
-
"path": "src/
|
|
5707
|
+
"path": "src/state/debug-event-log.ts",
|
|
5561
5708
|
"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
|
+
},
|
|
5562
5718
|
{
|
|
5563
5719
|
"kind": "function",
|
|
5564
|
-
"name": "
|
|
5720
|
+
"name": "recordMetaEvent",
|
|
5565
5721
|
"return": {
|
|
5566
5722
|
"type": {
|
|
5567
|
-
"text": "
|
|
5723
|
+
"text": "void"
|
|
5568
5724
|
}
|
|
5569
5725
|
},
|
|
5570
5726
|
"parameters": [
|
|
5571
5727
|
{
|
|
5572
|
-
"name": "
|
|
5728
|
+
"name": "key",
|
|
5573
5729
|
"type": {
|
|
5574
|
-
"text": "
|
|
5730
|
+
"text": "string"
|
|
5731
|
+
}
|
|
5732
|
+
},
|
|
5733
|
+
{
|
|
5734
|
+
"name": "type",
|
|
5735
|
+
"type": {
|
|
5736
|
+
"text": "MetaEventType"
|
|
5737
|
+
}
|
|
5738
|
+
},
|
|
5739
|
+
{
|
|
5740
|
+
"name": "detail",
|
|
5741
|
+
"optional": true,
|
|
5742
|
+
"type": {
|
|
5743
|
+
"text": "Record<string, unknown>"
|
|
5575
5744
|
}
|
|
5576
5745
|
}
|
|
5577
5746
|
],
|
|
5578
|
-
"description": "
|
|
5747
|
+
"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."
|
|
5579
5748
|
},
|
|
5580
5749
|
{
|
|
5581
5750
|
"kind": "function",
|
|
5582
|
-
"name": "
|
|
5751
|
+
"name": "recordTurnError",
|
|
5583
5752
|
"return": {
|
|
5584
5753
|
"type": {
|
|
5585
|
-
"text": "
|
|
5754
|
+
"text": "void"
|
|
5586
5755
|
}
|
|
5587
5756
|
},
|
|
5588
5757
|
"parameters": [
|
|
5589
5758
|
{
|
|
5590
|
-
"name": "
|
|
5759
|
+
"name": "key",
|
|
5591
5760
|
"type": {
|
|
5592
|
-
"text": "
|
|
5761
|
+
"text": "string"
|
|
5762
|
+
}
|
|
5763
|
+
},
|
|
5764
|
+
{
|
|
5765
|
+
"name": "reason",
|
|
5766
|
+
"type": {
|
|
5767
|
+
"text": "TurnFailureReason"
|
|
5768
|
+
}
|
|
5769
|
+
},
|
|
5770
|
+
{
|
|
5771
|
+
"name": "detail",
|
|
5772
|
+
"optional": true,
|
|
5773
|
+
"type": {
|
|
5774
|
+
"text": "Record<string, unknown>"
|
|
5593
5775
|
}
|
|
5594
5776
|
}
|
|
5595
5777
|
],
|
|
5596
|
-
"description": "
|
|
5778
|
+
"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`."
|
|
5597
5779
|
},
|
|
5598
5780
|
{
|
|
5599
5781
|
"kind": "function",
|
|
5600
|
-
"name": "
|
|
5782
|
+
"name": "recordTurnRetry",
|
|
5601
5783
|
"return": {
|
|
5602
5784
|
"type": {
|
|
5603
|
-
"text": "
|
|
5785
|
+
"text": "void"
|
|
5604
5786
|
}
|
|
5605
5787
|
},
|
|
5606
5788
|
"parameters": [
|
|
5607
5789
|
{
|
|
5608
|
-
"name": "
|
|
5790
|
+
"name": "key",
|
|
5609
5791
|
"type": {
|
|
5610
|
-
"text": "
|
|
5792
|
+
"text": "string"
|
|
5611
5793
|
}
|
|
5612
5794
|
},
|
|
5613
5795
|
{
|
|
5614
|
-
"name": "
|
|
5796
|
+
"name": "reason",
|
|
5615
5797
|
"type": {
|
|
5616
|
-
"text": "
|
|
5798
|
+
"text": "TurnFailureReason"
|
|
5799
|
+
}
|
|
5800
|
+
},
|
|
5801
|
+
{
|
|
5802
|
+
"name": "detail",
|
|
5803
|
+
"optional": true,
|
|
5804
|
+
"type": {
|
|
5805
|
+
"text": "Record<string, unknown>"
|
|
5617
5806
|
}
|
|
5618
5807
|
}
|
|
5619
5808
|
],
|
|
5620
|
-
"description": "
|
|
5621
|
-
}
|
|
5622
|
-
],
|
|
5623
|
-
"exports": [
|
|
5624
|
-
{
|
|
5625
|
-
"kind": "js",
|
|
5626
|
-
"name": "isSessionNoticeMarker",
|
|
5627
|
-
"declaration": {
|
|
5628
|
-
"name": "isSessionNoticeMarker",
|
|
5629
|
-
"module": "src/utils/message-partition.ts"
|
|
5630
|
-
}
|
|
5809
|
+
"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."
|
|
5631
5810
|
},
|
|
5632
5811
|
{
|
|
5633
|
-
"kind": "
|
|
5634
|
-
"name": "
|
|
5635
|
-
"
|
|
5636
|
-
"
|
|
5637
|
-
|
|
5638
|
-
|
|
5812
|
+
"kind": "function",
|
|
5813
|
+
"name": "getMetaEvents",
|
|
5814
|
+
"return": {
|
|
5815
|
+
"type": {
|
|
5816
|
+
"text": "ReadonlyArray<MetaEvent>"
|
|
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."
|
|
5639
5828
|
},
|
|
5640
5829
|
{
|
|
5641
|
-
"kind": "
|
|
5642
|
-
"name": "
|
|
5643
|
-
"
|
|
5644
|
-
"
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5830
|
+
"kind": "function",
|
|
5831
|
+
"name": "mergeMetaEvents",
|
|
5832
|
+
"return": {
|
|
5833
|
+
"type": {
|
|
5834
|
+
"text": "void"
|
|
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."
|
|
5852
|
+
},
|
|
5654
5853
|
{
|
|
5655
5854
|
"kind": "function",
|
|
5656
|
-
"name": "
|
|
5855
|
+
"name": "clearSession",
|
|
5657
5856
|
"return": {
|
|
5658
5857
|
"type": {
|
|
5659
|
-
"text": "
|
|
5858
|
+
"text": "void"
|
|
5660
5859
|
}
|
|
5661
5860
|
},
|
|
5662
5861
|
"parameters": [
|
|
5663
5862
|
{
|
|
5664
|
-
"name": "
|
|
5863
|
+
"name": "key",
|
|
5665
5864
|
"type": {
|
|
5666
|
-
"text": "
|
|
5865
|
+
"text": "string"
|
|
5667
5866
|
}
|
|
5668
5867
|
}
|
|
5669
5868
|
],
|
|
5670
|
-
"description": "
|
|
5869
|
+
"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."
|
|
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."
|
|
5671
5879
|
}
|
|
5672
5880
|
],
|
|
5673
5881
|
"exports": [
|
|
5674
5882
|
{
|
|
5675
5883
|
"kind": "js",
|
|
5676
|
-
"name": "
|
|
5884
|
+
"name": "META_EVENT_IMPORTANCE",
|
|
5677
5885
|
"declaration": {
|
|
5678
|
-
"name": "
|
|
5679
|
-
"module": "src/
|
|
5886
|
+
"name": "META_EVENT_IMPORTANCE",
|
|
5887
|
+
"module": "src/state/debug-event-log.ts"
|
|
5680
5888
|
}
|
|
5681
|
-
}
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
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",
|
|
5949
|
+
"declaration": {
|
|
5950
|
+
"name": "DEBUG_LOG_README",
|
|
5951
|
+
"module": "src/state/debug-event-log.ts"
|
|
5952
|
+
}
|
|
5953
|
+
}
|
|
5954
|
+
]
|
|
5701
5955
|
},
|
|
5702
5956
|
{
|
|
5703
5957
|
"kind": "javascript-module",
|
|
5704
|
-
"path": "src/
|
|
5958
|
+
"path": "src/state/driver-registry.ts",
|
|
5705
5959
|
"declarations": [
|
|
5706
5960
|
{
|
|
5707
5961
|
"kind": "function",
|
|
5708
|
-
"name": "
|
|
5962
|
+
"name": "getOrCreateDriver",
|
|
5709
5963
|
"return": {
|
|
5710
5964
|
"type": {
|
|
5711
|
-
"text": "
|
|
5965
|
+
"text": "AiDriver"
|
|
5712
5966
|
}
|
|
5713
5967
|
},
|
|
5714
5968
|
"parameters": [
|
|
5715
5969
|
{
|
|
5716
|
-
"name": "
|
|
5970
|
+
"name": "key",
|
|
5717
5971
|
"type": {
|
|
5718
|
-
"text": "
|
|
5972
|
+
"text": "string"
|
|
5973
|
+
}
|
|
5974
|
+
},
|
|
5975
|
+
{
|
|
5976
|
+
"name": "agentsKey",
|
|
5977
|
+
"type": {
|
|
5978
|
+
"text": "string"
|
|
5979
|
+
}
|
|
5980
|
+
},
|
|
5981
|
+
{
|
|
5982
|
+
"name": "factory",
|
|
5983
|
+
"type": {
|
|
5984
|
+
"text": "() => AiDriver"
|
|
5719
5985
|
}
|
|
5720
5986
|
}
|
|
5721
5987
|
],
|
|
5722
|
-
"description": "
|
|
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": [
|
|
5988
|
+
"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)."
|
|
5989
|
+
},
|
|
5740
5990
|
{
|
|
5741
5991
|
"kind": "function",
|
|
5742
|
-
"name": "
|
|
5992
|
+
"name": "getDriver",
|
|
5743
5993
|
"return": {
|
|
5744
5994
|
"type": {
|
|
5745
|
-
"text": "
|
|
5995
|
+
"text": "AiDriver | undefined"
|
|
5746
5996
|
}
|
|
5747
5997
|
},
|
|
5748
5998
|
"parameters": [
|
|
5749
5999
|
{
|
|
5750
|
-
"name": "
|
|
6000
|
+
"name": "key",
|
|
5751
6001
|
"type": {
|
|
5752
|
-
"text": "
|
|
6002
|
+
"text": "string"
|
|
5753
6003
|
}
|
|
5754
6004
|
}
|
|
5755
6005
|
],
|
|
5756
|
-
"description": "
|
|
6006
|
+
"description": "Returns the existing driver for the given key, or `undefined`."
|
|
5757
6007
|
},
|
|
5758
6008
|
{
|
|
5759
6009
|
"kind": "function",
|
|
5760
|
-
"name": "
|
|
6010
|
+
"name": "getDriverAgentsKey",
|
|
5761
6011
|
"return": {
|
|
5762
6012
|
"type": {
|
|
5763
|
-
"text": "
|
|
6013
|
+
"text": "string | undefined"
|
|
5764
6014
|
}
|
|
5765
6015
|
},
|
|
5766
6016
|
"parameters": [
|
|
5767
6017
|
{
|
|
5768
|
-
"name": "
|
|
5769
|
-
"type": {
|
|
5770
|
-
"text": "ChatToolDefinition[]"
|
|
5771
|
-
}
|
|
5772
|
-
},
|
|
5773
|
-
{
|
|
5774
|
-
"name": "handlers",
|
|
6018
|
+
"name": "key",
|
|
5775
6019
|
"type": {
|
|
5776
|
-
"text": "
|
|
6020
|
+
"text": "string"
|
|
5777
6021
|
}
|
|
5778
6022
|
}
|
|
5779
6023
|
],
|
|
5780
|
-
"description": "
|
|
5781
|
-
}
|
|
5782
|
-
],
|
|
5783
|
-
"exports": [
|
|
5784
|
-
{
|
|
5785
|
-
"kind": "js",
|
|
5786
|
-
"name": "createToolFold",
|
|
5787
|
-
"declaration": {
|
|
5788
|
-
"name": "createToolFold",
|
|
5789
|
-
"module": "src/utils/tool-fold.ts"
|
|
5790
|
-
}
|
|
6024
|
+
"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."
|
|
5791
6025
|
},
|
|
5792
6026
|
{
|
|
5793
|
-
"kind": "
|
|
5794
|
-
"name": "
|
|
5795
|
-
"
|
|
5796
|
-
"
|
|
5797
|
-
|
|
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"
|
|
6027
|
+
"kind": "function",
|
|
6028
|
+
"name": "deleteDriver",
|
|
6029
|
+
"return": {
|
|
6030
|
+
"type": {
|
|
6031
|
+
"text": "AiDriver | undefined"
|
|
5869
6032
|
}
|
|
5870
|
-
|
|
5871
|
-
"
|
|
6033
|
+
},
|
|
6034
|
+
"parameters": [
|
|
5872
6035
|
{
|
|
5873
|
-
"name": "
|
|
6036
|
+
"name": "key",
|
|
5874
6037
|
"type": {
|
|
5875
6038
|
"text": "string"
|
|
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"
|
|
6039
|
+
}
|
|
5892
6040
|
}
|
|
5893
6041
|
],
|
|
5894
|
-
"
|
|
5895
|
-
"name": "GenesisElement",
|
|
5896
|
-
"package": "@genesislcap/web-core"
|
|
5897
|
-
},
|
|
5898
|
-
"tagName": "ai-activity-halo",
|
|
5899
|
-
"customElement": true
|
|
6042
|
+
"description": "Removes and returns the driver for the given key.\nUsed when agents change (driver must be rebuilt) or on explicit session teardown."
|
|
5900
6043
|
}
|
|
5901
6044
|
],
|
|
5902
6045
|
"exports": [
|
|
5903
6046
|
{
|
|
5904
6047
|
"kind": "js",
|
|
5905
|
-
"name": "
|
|
6048
|
+
"name": "getOrCreateDriver",
|
|
5906
6049
|
"declaration": {
|
|
5907
|
-
"name": "
|
|
5908
|
-
"module": "src/
|
|
6050
|
+
"name": "getOrCreateDriver",
|
|
6051
|
+
"module": "src/state/driver-registry.ts"
|
|
5909
6052
|
}
|
|
5910
6053
|
},
|
|
5911
|
-
{
|
|
5912
|
-
"kind": "custom-element-definition",
|
|
5913
|
-
"name": "ai-activity-halo",
|
|
5914
|
-
"declaration": {
|
|
5915
|
-
"name": "AiActivityHalo",
|
|
5916
|
-
"module": "src/components/activity-halo/activity-halo.ts"
|
|
5917
|
-
}
|
|
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": [
|
|
5936
6054
|
{
|
|
5937
6055
|
"kind": "js",
|
|
5938
|
-
"name": "
|
|
6056
|
+
"name": "getDriver",
|
|
5939
6057
|
"declaration": {
|
|
5940
|
-
"name": "
|
|
5941
|
-
"module": "src/
|
|
6058
|
+
"name": "getDriver",
|
|
6059
|
+
"module": "src/state/driver-registry.ts"
|
|
5942
6060
|
}
|
|
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": [
|
|
6061
|
+
},
|
|
5957
6062
|
{
|
|
5958
6063
|
"kind": "js",
|
|
5959
|
-
"name": "
|
|
6064
|
+
"name": "getDriverAgentsKey",
|
|
5960
6065
|
"declaration": {
|
|
5961
|
-
"name": "
|
|
5962
|
-
"module": "src/
|
|
6066
|
+
"name": "getDriverAgentsKey",
|
|
6067
|
+
"module": "src/state/driver-registry.ts"
|
|
6068
|
+
}
|
|
6069
|
+
},
|
|
6070
|
+
{
|
|
6071
|
+
"kind": "js",
|
|
6072
|
+
"name": "deleteDriver",
|
|
6073
|
+
"declaration": {
|
|
6074
|
+
"name": "deleteDriver",
|
|
6075
|
+
"module": "src/state/driver-registry.ts"
|
|
5963
6076
|
}
|
|
5964
6077
|
}
|
|
5965
6078
|
]
|
|
5966
6079
|
},
|
|
5967
6080
|
{
|
|
5968
6081
|
"kind": "javascript-module",
|
|
5969
|
-
"path": "src/
|
|
6082
|
+
"path": "src/state/interaction-context.ts",
|
|
5970
6083
|
"declarations": [],
|
|
5971
6084
|
"exports": []
|
|
5972
6085
|
},
|
|
5973
6086
|
{
|
|
5974
6087
|
"kind": "javascript-module",
|
|
5975
|
-
"path": "src/
|
|
6088
|
+
"path": "src/state/session-store.ts",
|
|
5976
6089
|
"declarations": [
|
|
5977
6090
|
{
|
|
5978
|
-
"kind": "
|
|
5979
|
-
"
|
|
5980
|
-
"
|
|
5981
|
-
|
|
6091
|
+
"kind": "function",
|
|
6092
|
+
"name": "getSessionStore",
|
|
6093
|
+
"return": {
|
|
6094
|
+
"type": {
|
|
6095
|
+
"text": "SessionStoreReturn"
|
|
6096
|
+
}
|
|
6097
|
+
},
|
|
6098
|
+
"parameters": [
|
|
5982
6099
|
{
|
|
5983
|
-
"
|
|
5984
|
-
"name": "designSystemPrefix",
|
|
6100
|
+
"name": "key",
|
|
5985
6101
|
"type": {
|
|
5986
6102
|
"text": "string"
|
|
5987
|
-
}
|
|
5988
|
-
"default": "'rapid'",
|
|
5989
|
-
"description": "Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`."
|
|
5990
|
-
},
|
|
5991
|
-
{
|
|
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
|
|
6103
|
+
}
|
|
6034
6104
|
},
|
|
6035
6105
|
{
|
|
6036
|
-
"
|
|
6037
|
-
"
|
|
6106
|
+
"name": "devTools",
|
|
6107
|
+
"optional": true,
|
|
6038
6108
|
"type": {
|
|
6039
6109
|
"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
|
-
}
|
|
6070
6110
|
}
|
|
6071
|
-
}
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
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
|
-
},
|
|
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": [
|
|
6118
6124
|
{
|
|
6119
|
-
"
|
|
6120
|
-
"name": "currentValue",
|
|
6125
|
+
"name": "key",
|
|
6121
6126
|
"type": {
|
|
6122
6127
|
"text": "string"
|
|
6123
|
-
}
|
|
6124
|
-
"description": "Current pinned agent name as a value the segmented-control / select can bind to.",
|
|
6125
|
-
"readonly": true
|
|
6128
|
+
}
|
|
6126
6129
|
}
|
|
6127
6130
|
],
|
|
6128
|
-
"
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6131
|
+
"description": "Returns true if a session store already exists for the given key."
|
|
6132
|
+
},
|
|
6133
|
+
{
|
|
6134
|
+
"kind": "function",
|
|
6135
|
+
"name": "deleteSessionStore",
|
|
6136
|
+
"return": {
|
|
6137
|
+
"type": {
|
|
6138
|
+
"text": "void"
|
|
6132
6139
|
}
|
|
6133
|
-
|
|
6134
|
-
"
|
|
6140
|
+
},
|
|
6141
|
+
"parameters": [
|
|
6135
6142
|
{
|
|
6136
|
-
"name": "
|
|
6143
|
+
"name": "key",
|
|
6137
6144
|
"type": {
|
|
6138
6145
|
"text": "string"
|
|
6139
|
-
}
|
|
6140
|
-
"default": "'rapid'",
|
|
6141
|
-
"description": "Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`.",
|
|
6142
|
-
"fieldName": "designSystemPrefix"
|
|
6146
|
+
}
|
|
6143
6147
|
}
|
|
6144
6148
|
],
|
|
6145
|
-
"
|
|
6146
|
-
"name": "GenesisElement",
|
|
6147
|
-
"package": "@genesislcap/web-core"
|
|
6148
|
-
},
|
|
6149
|
-
"tagName": "foundation-ai-agent-picker",
|
|
6150
|
-
"customElement": true
|
|
6149
|
+
"description": "Deletes the session store for the given key."
|
|
6151
6150
|
}
|
|
6152
6151
|
],
|
|
6153
6152
|
"exports": [
|
|
6154
6153
|
{
|
|
6155
6154
|
"kind": "js",
|
|
6156
|
-
"name": "
|
|
6155
|
+
"name": "getSessionStore",
|
|
6157
6156
|
"declaration": {
|
|
6158
|
-
"name": "
|
|
6159
|
-
"module": "src/
|
|
6157
|
+
"name": "getSessionStore",
|
|
6158
|
+
"module": "src/state/session-store.ts"
|
|
6160
6159
|
}
|
|
6161
6160
|
},
|
|
6162
6161
|
{
|
|
6163
6162
|
"kind": "js",
|
|
6164
|
-
"name": "
|
|
6163
|
+
"name": "hasSessionStore",
|
|
6165
6164
|
"declaration": {
|
|
6166
|
-
"name": "
|
|
6167
|
-
"module": "src/
|
|
6165
|
+
"name": "hasSessionStore",
|
|
6166
|
+
"module": "src/state/session-store.ts"
|
|
6168
6167
|
}
|
|
6169
6168
|
},
|
|
6170
6169
|
{
|
|
6171
|
-
"kind": "
|
|
6172
|
-
"name": "
|
|
6170
|
+
"kind": "js",
|
|
6171
|
+
"name": "deleteSessionStore",
|
|
6173
6172
|
"declaration": {
|
|
6174
|
-
"name": "
|
|
6175
|
-
"module": "src/
|
|
6173
|
+
"name": "deleteSessionStore",
|
|
6174
|
+
"module": "src/state/session-store.ts"
|
|
6176
6175
|
}
|
|
6177
|
-
}
|
|
6178
|
-
]
|
|
6179
|
-
},
|
|
6180
|
-
{
|
|
6181
|
-
"kind": "javascript-module",
|
|
6182
|
-
"path": "src/components/agent-picker/index.ts",
|
|
6183
|
-
"declarations": [],
|
|
6184
|
-
"exports": [
|
|
6176
|
+
},
|
|
6185
6177
|
{
|
|
6186
6178
|
"kind": "js",
|
|
6187
|
-
"name": "
|
|
6179
|
+
"name": "SessionStoreReturn",
|
|
6188
6180
|
"declaration": {
|
|
6189
|
-
"name": "
|
|
6190
|
-
"
|
|
6181
|
+
"name": "SessionStoreReturn",
|
|
6182
|
+
"module": "src/state/session-store.ts"
|
|
6183
|
+
}
|
|
6184
|
+
},
|
|
6185
|
+
{
|
|
6186
|
+
"kind": "js",
|
|
6187
|
+
"name": "AiAssistantSessionState",
|
|
6188
|
+
"declaration": {
|
|
6189
|
+
"name": "AiAssistantSessionState",
|
|
6190
|
+
"module": "src/state/session-store.ts"
|
|
6191
6191
|
}
|
|
6192
6192
|
}
|
|
6193
6193
|
]
|