@genesislcap/ai-assistant 15.11.0 → 15.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-assistant.api.json +135 -0
- package/dist/ai-assistant.d.ts +75 -3
- package/dist/chat-driver.cjs +540 -117
- package/dist/chat-driver.cjs.map +4 -4
- package/dist/chat-driver.mjs +524 -116
- package/dist/chat-driver.mjs.map +4 -4
- package/dist/custom-elements.json +1822 -1483
- package/dist/dts/chat-driver-node.d.ts +5 -2
- package/dist/dts/chat-driver-node.d.ts.map +1 -1
- package/dist/dts/components/chat-driver/chat-driver.d.ts +20 -3
- package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
- package/dist/dts/components/chat-driver/chat-driver.thinking-policy.test.d.ts +2 -0
- package/dist/dts/components/chat-driver/chat-driver.thinking-policy.test.d.ts.map +1 -0
- package/dist/dts/components/chat-driver/chat-driver.trace-capture.test.d.ts +2 -0
- package/dist/dts/components/chat-driver/chat-driver.trace-capture.test.d.ts.map +1 -0
- package/dist/dts/config/config.d.ts +39 -2
- package/dist/dts/config/config.d.ts.map +1 -1
- package/dist/dts/config/define-stateful-agent.d.ts +15 -1
- package/dist/dts/config/define-stateful-agent.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/utils/strip-agent-handlers.d.ts +1 -1
- package/dist/dts/utils/sum-usage.d.ts +37 -4
- package/dist/dts/utils/sum-usage.d.ts.map +1 -1
- package/dist/dts/utils/usage-rows.d.ts +102 -0
- package/dist/dts/utils/usage-rows.d.ts.map +1 -0
- package/dist/dts/utils/usage-rows.test.d.ts +2 -0
- package/dist/dts/utils/usage-rows.test.d.ts.map +1 -0
- package/dist/esm/chat-driver-node.js +36 -1
- package/dist/esm/components/chat-driver/chat-driver.js +73 -10
- package/dist/esm/components/chat-driver/chat-driver.thinking-policy.test.js +137 -0
- package/dist/esm/components/chat-driver/chat-driver.trace-capture.test.js +200 -0
- package/dist/esm/config/define-stateful-agent.js +11 -0
- package/dist/esm/main/main.template.js +20 -1
- package/dist/esm/utils/strip-agent-handlers.js +1 -1
- package/dist/esm/utils/sum-usage.js +37 -4
- package/dist/esm/utils/usage-rows.js +90 -0
- package/dist/esm/utils/usage-rows.test.js +189 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -17
- package/src/chat-driver-node.ts +58 -0
- package/src/components/chat-driver/chat-driver.thinking-policy.test.ts +185 -0
- package/src/components/chat-driver/chat-driver.trace-capture.test.ts +251 -0
- package/src/components/chat-driver/chat-driver.ts +90 -10
- package/src/config/config.ts +50 -1
- package/src/config/define-stateful-agent.ts +37 -0
- package/src/main/main.template.ts +19 -1
- package/src/utils/strip-agent-handlers.ts +1 -1
- package/src/utils/sum-usage.ts +37 -4
- package/src/utils/usage-rows.test.ts +237 -0
- package/src/utils/usage-rows.ts +187 -0
|
@@ -127,6 +127,94 @@
|
|
|
127
127
|
"package": "@genesislcap/foundation-ai"
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
|
+
{
|
|
131
|
+
"kind": "js",
|
|
132
|
+
"name": "ANTHROPIC_CACHE_READ_MULTIPLIER",
|
|
133
|
+
"declaration": {
|
|
134
|
+
"name": "ANTHROPIC_CACHE_READ_MULTIPLIER",
|
|
135
|
+
"package": "@genesislcap/foundation-ai"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"kind": "js",
|
|
140
|
+
"name": "ANTHROPIC_CACHE_WRITE_1H_MULTIPLIER",
|
|
141
|
+
"declaration": {
|
|
142
|
+
"name": "ANTHROPIC_CACHE_WRITE_1H_MULTIPLIER",
|
|
143
|
+
"package": "@genesislcap/foundation-ai"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"kind": "js",
|
|
148
|
+
"name": "ANTHROPIC_CACHE_WRITE_5M_MULTIPLIER",
|
|
149
|
+
"declaration": {
|
|
150
|
+
"name": "ANTHROPIC_CACHE_WRITE_5M_MULTIPLIER",
|
|
151
|
+
"package": "@genesislcap/foundation-ai"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"kind": "js",
|
|
156
|
+
"name": "anthropicRatesFor",
|
|
157
|
+
"declaration": {
|
|
158
|
+
"name": "anthropicRatesFor",
|
|
159
|
+
"package": "@genesislcap/foundation-ai"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"kind": "js",
|
|
164
|
+
"name": "anthropicTokenCost",
|
|
165
|
+
"declaration": {
|
|
166
|
+
"name": "anthropicTokenCost",
|
|
167
|
+
"package": "@genesislcap/foundation-ai"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"kind": "js",
|
|
172
|
+
"name": "GEMINI_CACHED_INPUT_MULTIPLIER",
|
|
173
|
+
"declaration": {
|
|
174
|
+
"name": "GEMINI_CACHED_INPUT_MULTIPLIER",
|
|
175
|
+
"package": "@genesislcap/foundation-ai"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"kind": "js",
|
|
180
|
+
"name": "GEMINI_LONG_CONTEXT_THRESHOLD",
|
|
181
|
+
"declaration": {
|
|
182
|
+
"name": "GEMINI_LONG_CONTEXT_THRESHOLD",
|
|
183
|
+
"package": "@genesislcap/foundation-ai"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"kind": "js",
|
|
188
|
+
"name": "geminiRatesFor",
|
|
189
|
+
"declaration": {
|
|
190
|
+
"name": "geminiRatesFor",
|
|
191
|
+
"package": "@genesislcap/foundation-ai"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"kind": "js",
|
|
196
|
+
"name": "geminiTokenCost",
|
|
197
|
+
"declaration": {
|
|
198
|
+
"name": "geminiTokenCost",
|
|
199
|
+
"package": "@genesislcap/foundation-ai"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"kind": "js",
|
|
204
|
+
"name": "vendorOfModel",
|
|
205
|
+
"declaration": {
|
|
206
|
+
"name": "vendorOfModel",
|
|
207
|
+
"package": "@genesislcap/foundation-ai"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"kind": "js",
|
|
212
|
+
"name": "AggregateUsage",
|
|
213
|
+
"declaration": {
|
|
214
|
+
"name": "AggregateUsage",
|
|
215
|
+
"package": "@genesislcap/foundation-ai"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
130
218
|
{
|
|
131
219
|
"kind": "js",
|
|
132
220
|
"name": "AIProvider",
|
|
@@ -183,6 +271,14 @@
|
|
|
183
271
|
"package": "@genesislcap/foundation-ai"
|
|
184
272
|
}
|
|
185
273
|
},
|
|
274
|
+
{
|
|
275
|
+
"kind": "js",
|
|
276
|
+
"name": "ChatThinkingPolicy",
|
|
277
|
+
"declaration": {
|
|
278
|
+
"name": "ChatThinkingPolicy",
|
|
279
|
+
"package": "@genesislcap/foundation-ai"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
186
282
|
{
|
|
187
283
|
"kind": "js",
|
|
188
284
|
"name": "ChatToolChoice",
|
|
@@ -215,6 +311,94 @@
|
|
|
215
311
|
"package": "@genesislcap/foundation-ai"
|
|
216
312
|
}
|
|
217
313
|
},
|
|
314
|
+
{
|
|
315
|
+
"kind": "js",
|
|
316
|
+
"name": "AnthropicUsageRecord",
|
|
317
|
+
"declaration": {
|
|
318
|
+
"name": "AnthropicUsageRecord",
|
|
319
|
+
"package": "@genesislcap/foundation-ai"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"kind": "js",
|
|
324
|
+
"name": "GeminiUsageRecord",
|
|
325
|
+
"declaration": {
|
|
326
|
+
"name": "GeminiUsageRecord",
|
|
327
|
+
"package": "@genesislcap/foundation-ai"
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"kind": "js",
|
|
332
|
+
"name": "TokenCost",
|
|
333
|
+
"declaration": {
|
|
334
|
+
"name": "TokenCost",
|
|
335
|
+
"package": "@genesislcap/foundation-ai"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"kind": "js",
|
|
340
|
+
"name": "TokenCostBreakdown",
|
|
341
|
+
"declaration": {
|
|
342
|
+
"name": "TokenCostBreakdown",
|
|
343
|
+
"package": "@genesislcap/foundation-ai"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"kind": "js",
|
|
348
|
+
"name": "TokenRates",
|
|
349
|
+
"declaration": {
|
|
350
|
+
"name": "TokenRates",
|
|
351
|
+
"package": "@genesislcap/foundation-ai"
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"kind": "js",
|
|
356
|
+
"name": "addUsage",
|
|
357
|
+
"declaration": {
|
|
358
|
+
"name": "addUsage",
|
|
359
|
+
"module": "./utils/sum-usage"
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"kind": "js",
|
|
364
|
+
"name": "emptyUsage",
|
|
365
|
+
"declaration": {
|
|
366
|
+
"name": "emptyUsage",
|
|
367
|
+
"module": "./utils/sum-usage"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"kind": "js",
|
|
372
|
+
"name": "sumUsage",
|
|
373
|
+
"declaration": {
|
|
374
|
+
"name": "sumUsage",
|
|
375
|
+
"module": "./utils/sum-usage"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"kind": "js",
|
|
380
|
+
"name": "totalTokens",
|
|
381
|
+
"declaration": {
|
|
382
|
+
"name": "totalTokens",
|
|
383
|
+
"module": "./utils/sum-usage"
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"kind": "js",
|
|
388
|
+
"name": "usageRows",
|
|
389
|
+
"declaration": {
|
|
390
|
+
"name": "usageRows",
|
|
391
|
+
"module": "./utils/usage-rows"
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"kind": "js",
|
|
396
|
+
"name": "UsageRow",
|
|
397
|
+
"declaration": {
|
|
398
|
+
"name": "UsageRow",
|
|
399
|
+
"module": "./utils/usage-rows"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
218
402
|
{
|
|
219
403
|
"kind": "js",
|
|
220
404
|
"name": "clearSession",
|
|
@@ -1241,6 +1425,14 @@
|
|
|
1241
1425
|
"module": "src/config/config.ts"
|
|
1242
1426
|
}
|
|
1243
1427
|
},
|
|
1428
|
+
{
|
|
1429
|
+
"kind": "js",
|
|
1430
|
+
"name": "ChatThinkingPolicy",
|
|
1431
|
+
"declaration": {
|
|
1432
|
+
"name": "ChatThinkingPolicy",
|
|
1433
|
+
"module": "src/config/config.ts"
|
|
1434
|
+
}
|
|
1435
|
+
},
|
|
1244
1436
|
{
|
|
1245
1437
|
"kind": "js",
|
|
1246
1438
|
"name": "ChatToolChoice",
|
|
@@ -5251,867 +5443,838 @@
|
|
|
5251
5443
|
},
|
|
5252
5444
|
{
|
|
5253
5445
|
"kind": "javascript-module",
|
|
5254
|
-
"path": "src/
|
|
5446
|
+
"path": "src/utils/animated-panel-toggle.ts",
|
|
5447
|
+
"declarations": [],
|
|
5448
|
+
"exports": []
|
|
5449
|
+
},
|
|
5450
|
+
{
|
|
5451
|
+
"kind": "javascript-module",
|
|
5452
|
+
"path": "src/utils/animation-exclusivity.ts",
|
|
5453
|
+
"declarations": [],
|
|
5454
|
+
"exports": []
|
|
5455
|
+
},
|
|
5456
|
+
{
|
|
5457
|
+
"kind": "javascript-module",
|
|
5458
|
+
"path": "src/utils/banked-usage-baselines.ts",
|
|
5459
|
+
"declarations": [],
|
|
5460
|
+
"exports": []
|
|
5461
|
+
},
|
|
5462
|
+
{
|
|
5463
|
+
"kind": "javascript-module",
|
|
5464
|
+
"path": "src/utils/collect-session-models.ts",
|
|
5255
5465
|
"declarations": [
|
|
5256
5466
|
{
|
|
5257
|
-
"kind": "
|
|
5258
|
-
"
|
|
5259
|
-
"
|
|
5260
|
-
|
|
5467
|
+
"kind": "function",
|
|
5468
|
+
"name": "collectSessionModels",
|
|
5469
|
+
"return": {
|
|
5470
|
+
"type": {
|
|
5471
|
+
"text": "CostSessionModelEntry[]"
|
|
5472
|
+
}
|
|
5473
|
+
},
|
|
5474
|
+
"parameters": [
|
|
5261
5475
|
{
|
|
5262
|
-
"
|
|
5263
|
-
"name": "tools",
|
|
5476
|
+
"name": "messages",
|
|
5264
5477
|
"type": {
|
|
5265
|
-
"text": "
|
|
5266
|
-
}
|
|
5267
|
-
"default": "''",
|
|
5268
|
-
"description": "Comma-separated list of tool names this element reacts to."
|
|
5478
|
+
"text": "readonly ChatMessage[]"
|
|
5479
|
+
}
|
|
5269
5480
|
},
|
|
5270
5481
|
{
|
|
5271
|
-
"
|
|
5272
|
-
"
|
|
5482
|
+
"name": "providerStatuses",
|
|
5483
|
+
"default": "[]",
|
|
5273
5484
|
"type": {
|
|
5274
|
-
"text": "
|
|
5275
|
-
}
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5485
|
+
"text": "readonly AIProviderRegistryStatusEntry[]"
|
|
5486
|
+
}
|
|
5487
|
+
}
|
|
5488
|
+
],
|
|
5489
|
+
"description": "Unique models used across a message list (includes sub-agent traces)."
|
|
5490
|
+
}
|
|
5491
|
+
],
|
|
5492
|
+
"exports": [
|
|
5493
|
+
{
|
|
5494
|
+
"kind": "js",
|
|
5495
|
+
"name": "collectSessionModels",
|
|
5496
|
+
"declaration": {
|
|
5497
|
+
"name": "collectSessionModels",
|
|
5498
|
+
"module": "src/utils/collect-session-models.ts"
|
|
5499
|
+
}
|
|
5500
|
+
}
|
|
5501
|
+
]
|
|
5502
|
+
},
|
|
5503
|
+
{
|
|
5504
|
+
"kind": "javascript-module",
|
|
5505
|
+
"path": "src/utils/condense-history.ts",
|
|
5506
|
+
"declarations": [
|
|
5507
|
+
{
|
|
5508
|
+
"kind": "variable",
|
|
5509
|
+
"name": "CONDENSE_MIN_CHARS",
|
|
5510
|
+
"type": {
|
|
5511
|
+
"text": "number"
|
|
5512
|
+
},
|
|
5513
|
+
"default": "1000",
|
|
5514
|
+
"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."
|
|
5515
|
+
},
|
|
5516
|
+
{
|
|
5517
|
+
"kind": "variable",
|
|
5518
|
+
"name": "CONDENSED_ARGS_KEY",
|
|
5519
|
+
"type": {
|
|
5520
|
+
"text": "string"
|
|
5521
|
+
},
|
|
5522
|
+
"default": "'condensed'",
|
|
5523
|
+
"description": "Key the collapsed args are stored under — a tool-call's args must stay a Record."
|
|
5524
|
+
},
|
|
5525
|
+
{
|
|
5526
|
+
"kind": "function",
|
|
5527
|
+
"name": "applyCondensation",
|
|
5528
|
+
"return": {
|
|
5529
|
+
"type": {
|
|
5530
|
+
"text": "ChatMessage[]"
|
|
5531
|
+
}
|
|
5532
|
+
},
|
|
5533
|
+
"parameters": [
|
|
5279
5534
|
{
|
|
5280
|
-
"
|
|
5281
|
-
"name": "unsubBus",
|
|
5535
|
+
"name": "history",
|
|
5282
5536
|
"type": {
|
|
5283
|
-
"text": "
|
|
5537
|
+
"text": "ChatMessage[]"
|
|
5284
5538
|
},
|
|
5285
|
-
"
|
|
5539
|
+
"description": "The to-model history copy to rewrite (not mutated)."
|
|
5286
5540
|
},
|
|
5287
5541
|
{
|
|
5288
|
-
"
|
|
5289
|
-
"name": "hideTimeout",
|
|
5542
|
+
"name": "policies",
|
|
5290
5543
|
"type": {
|
|
5291
|
-
"text": "
|
|
5544
|
+
"text": "Map<string, RegisteredCondensePolicy>"
|
|
5292
5545
|
},
|
|
5293
|
-
"
|
|
5546
|
+
"description": "The driver's registry, keyed by tool-call id. Its entries'\n`reported*` flags are flipped as payloads first collapse."
|
|
5294
5547
|
},
|
|
5295
5548
|
{
|
|
5296
|
-
"
|
|
5297
|
-
"name": "startTime",
|
|
5549
|
+
"name": "ctx",
|
|
5298
5550
|
"type": {
|
|
5299
|
-
"text": "
|
|
5551
|
+
"text": "CondenseContext"
|
|
5300
5552
|
},
|
|
5301
|
-
"
|
|
5302
|
-
"default": "0"
|
|
5303
|
-
},
|
|
5304
|
-
{
|
|
5305
|
-
"kind": "method",
|
|
5306
|
-
"name": "activate",
|
|
5307
|
-
"privacy": "private"
|
|
5308
|
-
},
|
|
5309
|
-
{
|
|
5310
|
-
"kind": "method",
|
|
5311
|
-
"name": "scheduleDeactivate",
|
|
5312
|
-
"privacy": "private"
|
|
5313
|
-
}
|
|
5314
|
-
],
|
|
5315
|
-
"attributes": [
|
|
5316
|
-
{
|
|
5317
|
-
"name": "tools",
|
|
5318
|
-
"type": {
|
|
5319
|
-
"text": "string"
|
|
5320
|
-
},
|
|
5321
|
-
"default": "''",
|
|
5322
|
-
"description": "Comma-separated list of tool names this element reacts to.",
|
|
5323
|
-
"fieldName": "tools"
|
|
5553
|
+
"description": "The driver's live clocks (model-call / turn / agent-activation)."
|
|
5324
5554
|
},
|
|
5325
5555
|
{
|
|
5326
|
-
"name": "
|
|
5556
|
+
"name": "onCondensed",
|
|
5327
5557
|
"type": {
|
|
5328
|
-
"text": "
|
|
5329
|
-
},
|
|
5330
|
-
"default": "DEFAULT_MIN_SHOW_TIME",
|
|
5331
|
-
"description": "Minimum time in ms the halo stays visible after activation.",
|
|
5332
|
-
"resolveInitializer": {
|
|
5333
|
-
"module": "src/components/activity-halo/activity-halo.ts"
|
|
5558
|
+
"text": "(detail: CondensedEventDetail) => void"
|
|
5334
5559
|
},
|
|
5335
|
-
"
|
|
5560
|
+
"description": "Invoked once per payload at its full→stub transition."
|
|
5336
5561
|
}
|
|
5337
5562
|
],
|
|
5338
|
-
"
|
|
5339
|
-
"name": "GenesisElement",
|
|
5340
|
-
"package": "@genesislcap/web-core"
|
|
5341
|
-
},
|
|
5342
|
-
"tagName": "ai-activity-halo",
|
|
5343
|
-
"customElement": true
|
|
5563
|
+
"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, write two latches onto the matching `policies`\nentry the first time a payload collapses, both because the collapse itself\nre-runs before every provider call: the `reported*` flag (the report-once gate\nthat keeps `onCondensed` firing once per (tool call, payload)) and\n`firedTrigger` (which pins the reason so a reason-bearing stub is rendered\nonce and never rewritten).\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."
|
|
5344
5564
|
}
|
|
5345
5565
|
],
|
|
5346
5566
|
"exports": [
|
|
5347
5567
|
{
|
|
5348
5568
|
"kind": "js",
|
|
5349
|
-
"name": "
|
|
5569
|
+
"name": "CONDENSE_MIN_CHARS",
|
|
5350
5570
|
"declaration": {
|
|
5351
|
-
"name": "
|
|
5352
|
-
"module": "src/
|
|
5571
|
+
"name": "CONDENSE_MIN_CHARS",
|
|
5572
|
+
"module": "src/utils/condense-history.ts"
|
|
5353
5573
|
}
|
|
5354
5574
|
},
|
|
5355
5575
|
{
|
|
5356
|
-
"kind": "
|
|
5357
|
-
"name": "
|
|
5576
|
+
"kind": "js",
|
|
5577
|
+
"name": "CONDENSED_ARGS_KEY",
|
|
5358
5578
|
"declaration": {
|
|
5359
|
-
"name": "
|
|
5360
|
-
"module": "src/
|
|
5579
|
+
"name": "CONDENSED_ARGS_KEY",
|
|
5580
|
+
"module": "src/utils/condense-history.ts"
|
|
5361
5581
|
}
|
|
5362
|
-
}
|
|
5363
|
-
]
|
|
5364
|
-
},
|
|
5365
|
-
{
|
|
5366
|
-
"kind": "javascript-module",
|
|
5367
|
-
"path": "src/components/agent-picker/agent-picker.constants.ts",
|
|
5368
|
-
"declarations": [
|
|
5369
|
-
{
|
|
5370
|
-
"kind": "variable",
|
|
5371
|
-
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
5372
|
-
"type": {
|
|
5373
|
-
"text": "string"
|
|
5374
|
-
},
|
|
5375
|
-
"default": "'__auto__'",
|
|
5376
|
-
"description": "Sentinel value used by the segmented control / select to represent \"Auto\"."
|
|
5377
|
-
}
|
|
5378
|
-
],
|
|
5379
|
-
"exports": [
|
|
5582
|
+
},
|
|
5380
5583
|
{
|
|
5381
5584
|
"kind": "js",
|
|
5382
|
-
"name": "
|
|
5585
|
+
"name": "applyCondensation",
|
|
5383
5586
|
"declaration": {
|
|
5384
|
-
"name": "
|
|
5385
|
-
"module": "src/
|
|
5587
|
+
"name": "applyCondensation",
|
|
5588
|
+
"module": "src/utils/condense-history.ts"
|
|
5386
5589
|
}
|
|
5387
5590
|
}
|
|
5388
5591
|
]
|
|
5389
5592
|
},
|
|
5390
5593
|
{
|
|
5391
5594
|
"kind": "javascript-module",
|
|
5392
|
-
"path": "src/
|
|
5595
|
+
"path": "src/utils/cost-session-history.ts",
|
|
5393
5596
|
"declarations": [
|
|
5394
5597
|
{
|
|
5395
|
-
"kind": "
|
|
5396
|
-
"name": "
|
|
5397
|
-
"
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5598
|
+
"kind": "function",
|
|
5599
|
+
"name": "costHistoryStorageKey",
|
|
5600
|
+
"return": {
|
|
5601
|
+
"type": {
|
|
5602
|
+
"text": "string"
|
|
5603
|
+
}
|
|
5604
|
+
},
|
|
5605
|
+
"parameters": [
|
|
5606
|
+
{
|
|
5607
|
+
"name": "scope",
|
|
5608
|
+
"type": {
|
|
5609
|
+
"text": "string"
|
|
5610
|
+
}
|
|
5611
|
+
}
|
|
5612
|
+
],
|
|
5613
|
+
"description": "localStorage key for a host-scoped cost history list."
|
|
5614
|
+
},
|
|
5401
5615
|
{
|
|
5402
|
-
"kind": "
|
|
5403
|
-
"name": "
|
|
5404
|
-
"
|
|
5405
|
-
"
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
"path": "src/components/agent-picker/agent-picker.ts",
|
|
5420
|
-
"declarations": [
|
|
5616
|
+
"kind": "function",
|
|
5617
|
+
"name": "loadCostSessionHistory",
|
|
5618
|
+
"return": {
|
|
5619
|
+
"type": {
|
|
5620
|
+
"text": "CostSessionRecord[]"
|
|
5621
|
+
}
|
|
5622
|
+
},
|
|
5623
|
+
"parameters": [
|
|
5624
|
+
{
|
|
5625
|
+
"name": "scope",
|
|
5626
|
+
"type": {
|
|
5627
|
+
"text": "string"
|
|
5628
|
+
}
|
|
5629
|
+
}
|
|
5630
|
+
],
|
|
5631
|
+
"description": "Load persisted cost sessions for a scope, in whatever order they were stored — this applies no\nordering of its own. Display order is the caller's business; see `sortRecordsByRecency`."
|
|
5632
|
+
},
|
|
5421
5633
|
{
|
|
5422
|
-
"kind": "
|
|
5423
|
-
"
|
|
5424
|
-
"
|
|
5425
|
-
|
|
5634
|
+
"kind": "function",
|
|
5635
|
+
"name": "saveCostSessionHistory",
|
|
5636
|
+
"return": {
|
|
5637
|
+
"type": {
|
|
5638
|
+
"text": "void"
|
|
5639
|
+
}
|
|
5640
|
+
},
|
|
5641
|
+
"parameters": [
|
|
5426
5642
|
{
|
|
5427
|
-
"
|
|
5428
|
-
"name": "designSystemPrefix",
|
|
5643
|
+
"name": "scope",
|
|
5429
5644
|
"type": {
|
|
5430
5645
|
"text": "string"
|
|
5431
|
-
}
|
|
5432
|
-
"default": "'rapid'",
|
|
5433
|
-
"description": "Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`."
|
|
5646
|
+
}
|
|
5434
5647
|
},
|
|
5435
5648
|
{
|
|
5436
|
-
"
|
|
5437
|
-
"name": "mode",
|
|
5649
|
+
"name": "records",
|
|
5438
5650
|
"type": {
|
|
5439
|
-
"text": "
|
|
5440
|
-
}
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5651
|
+
"text": "CostSessionRecord[]"
|
|
5652
|
+
}
|
|
5653
|
+
}
|
|
5654
|
+
],
|
|
5655
|
+
"description": "Replace the persisted list for a scope."
|
|
5656
|
+
},
|
|
5657
|
+
{
|
|
5658
|
+
"kind": "function",
|
|
5659
|
+
"name": "upsertRecord",
|
|
5660
|
+
"return": {
|
|
5661
|
+
"type": {
|
|
5662
|
+
"text": "CostSessionRecord[]"
|
|
5663
|
+
}
|
|
5664
|
+
},
|
|
5665
|
+
"parameters": [
|
|
5444
5666
|
{
|
|
5445
|
-
"
|
|
5446
|
-
"name": "agents",
|
|
5667
|
+
"name": "records",
|
|
5447
5668
|
"type": {
|
|
5448
|
-
"text": "
|
|
5449
|
-
}
|
|
5450
|
-
"default": "[]",
|
|
5451
|
-
"description": "Top-level agents passed to the assistant."
|
|
5669
|
+
"text": "readonly CostSessionRecord[]"
|
|
5670
|
+
}
|
|
5452
5671
|
},
|
|
5453
5672
|
{
|
|
5454
|
-
"
|
|
5455
|
-
"name": "pinnedAgentName",
|
|
5673
|
+
"name": "record",
|
|
5456
5674
|
"type": {
|
|
5457
|
-
"text": "
|
|
5458
|
-
}
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5675
|
+
"text": "CostSessionRecord"
|
|
5676
|
+
}
|
|
5677
|
+
}
|
|
5678
|
+
],
|
|
5679
|
+
"description": "Pure upsert — `records` with `record` replacing any row sharing its `projectKey`, or\nprepended when there is none.\n\nAn upsert, not an append, because a row stands for a **project's lifetime usage** rather\nthan a visit to it. Appending cut a fresh row per page-hide, so one project accumulated\na stack of near-identical rows and its spend was counted once per refresh by anything\nsumming the list.\n\nThe resulting array order is incidental — it is insertion order, so a project returned to\nstays where it first landed. Do not read it as recency; `sortRecordsByRecency` is what the\nUsage tab renders through.\n\nStorage-agnostic on purpose: the same merge serves the synchronous `localStorage` path\nand the async provider-backed one, so the two can never drift on what \"upsert\" means.\nThe caller owns persistence — see the assistant's `persistCostHistory`."
|
|
5680
|
+
},
|
|
5681
|
+
{
|
|
5682
|
+
"kind": "function",
|
|
5683
|
+
"name": "sortRecordsByRecency",
|
|
5684
|
+
"return": {
|
|
5685
|
+
"type": {
|
|
5686
|
+
"text": "CostSessionRecord[]"
|
|
5687
|
+
}
|
|
5688
|
+
},
|
|
5689
|
+
"parameters": [
|
|
5462
5690
|
{
|
|
5463
|
-
"
|
|
5464
|
-
"name": "resizeObserver",
|
|
5691
|
+
"name": "records",
|
|
5465
5692
|
"type": {
|
|
5466
|
-
"text": "
|
|
5467
|
-
}
|
|
5468
|
-
|
|
5469
|
-
|
|
5693
|
+
"text": "readonly CostSessionRecord[]"
|
|
5694
|
+
}
|
|
5695
|
+
}
|
|
5696
|
+
],
|
|
5697
|
+
"description": "Rows most-recently-worked-on first, as a new array.\n\nApplied at read time rather than baked into the stored order, so it covers rows that came from\na host provider as well as from `localStorage`, and so no write path has to maintain it.\n\n`updatedAt` is ISO-8601, which sorts lexicographically — no date parsing, and no dependence on\nthe strings being valid dates. Sorting by it rather than by insertion order is what makes the\nlist track use: the active project moves to the top on its first upsert and stays there, since\nits row is rewritten on every transcript change."
|
|
5698
|
+
},
|
|
5699
|
+
{
|
|
5700
|
+
"kind": "function",
|
|
5701
|
+
"name": "resolveBankedUsage",
|
|
5702
|
+
"return": {
|
|
5703
|
+
"type": {
|
|
5704
|
+
"text": "AggregateUsage"
|
|
5705
|
+
}
|
|
5706
|
+
},
|
|
5707
|
+
"parameters": [
|
|
5470
5708
|
{
|
|
5471
|
-
"
|
|
5472
|
-
"name": "selectableAgents",
|
|
5709
|
+
"name": "existing",
|
|
5473
5710
|
"type": {
|
|
5474
|
-
"text": "
|
|
5475
|
-
}
|
|
5476
|
-
"description": "Top-level agents that opted in to manual selection.",
|
|
5477
|
-
"readonly": true
|
|
5711
|
+
"text": "CostSessionRecord | undefined"
|
|
5712
|
+
}
|
|
5478
5713
|
},
|
|
5479
5714
|
{
|
|
5480
|
-
"
|
|
5481
|
-
"name": "visible",
|
|
5715
|
+
"name": "transcriptIsAuthoritative",
|
|
5482
5716
|
"type": {
|
|
5483
5717
|
"text": "boolean"
|
|
5484
|
-
},
|
|
5485
|
-
"description": "Whether the picker should render at all.",
|
|
5486
|
-
"readonly": true
|
|
5487
|
-
},
|
|
5488
|
-
{
|
|
5489
|
-
"kind": "field",
|
|
5490
|
-
"name": "effectiveMode",
|
|
5491
|
-
"type": {
|
|
5492
|
-
"text": "'select' | 'segmented-control'"
|
|
5493
|
-
},
|
|
5494
|
-
"description": "The variant actually rendered: `'select'` if user-configured or if the\nsegmented row currently overflows; `'segmented-control'` otherwise.",
|
|
5495
|
-
"readonly": true
|
|
5496
|
-
},
|
|
5497
|
-
{
|
|
5498
|
-
"kind": "method",
|
|
5499
|
-
"name": "agentsChanged",
|
|
5500
|
-
"return": {
|
|
5501
|
-
"type": {
|
|
5502
|
-
"text": "void"
|
|
5503
|
-
}
|
|
5504
|
-
},
|
|
5505
|
-
"description": "Re-measure when agents change — newly added selectable agents may push the\nsegmented row past the container's width."
|
|
5506
|
-
},
|
|
5507
|
-
{
|
|
5508
|
-
"kind": "method",
|
|
5509
|
-
"name": "modeChanged",
|
|
5510
|
-
"return": {
|
|
5511
|
-
"type": {
|
|
5512
|
-
"text": "void"
|
|
5513
|
-
}
|
|
5514
5718
|
}
|
|
5515
|
-
}
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
"kind": "method",
|
|
5529
|
-
"name": "selectAgent",
|
|
5530
|
-
"return": {
|
|
5531
|
-
"type": {
|
|
5532
|
-
"text": "void"
|
|
5533
|
-
}
|
|
5534
|
-
},
|
|
5535
|
-
"parameters": [
|
|
5536
|
-
{
|
|
5537
|
-
"name": "name",
|
|
5538
|
-
"type": {
|
|
5539
|
-
"text": "string | null"
|
|
5540
|
-
}
|
|
5541
|
-
}
|
|
5542
|
-
]
|
|
5543
|
-
},
|
|
5544
|
-
{
|
|
5545
|
-
"kind": "method",
|
|
5546
|
-
"name": "selectByValue",
|
|
5547
|
-
"return": {
|
|
5548
|
-
"type": {
|
|
5549
|
-
"text": "void"
|
|
5550
|
-
}
|
|
5551
|
-
},
|
|
5552
|
-
"parameters": [
|
|
5553
|
-
{
|
|
5554
|
-
"name": "value",
|
|
5555
|
-
"type": {
|
|
5556
|
-
"text": "string"
|
|
5557
|
-
}
|
|
5558
|
-
}
|
|
5559
|
-
],
|
|
5560
|
-
"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`."
|
|
5561
|
-
},
|
|
5719
|
+
}
|
|
5720
|
+
],
|
|
5721
|
+
"description": "The spend a project's next row must carry over from before its current transcript.\n\n`transcriptIsAuthoritative` means the open transcript already accounts for this project's\nhistory — true exactly when a session snapshot is restored on load. The two branches are\nnot interchangeable, and picking the wrong one is silently destructive:\n\n- Authoritative: carry the previous row's own `banked` forward. Taking `usage` instead would\n re-add the restored history on every reload, the compounding double-count this replaced.\n- Not authoritative: the whole previous total becomes banked, because nothing in the fresh\n transcript accounts for it. Taking `banked` instead would rewrite the row down to the\n current page-load and drop the project's earlier spend.\n\nNote both branches are idempotent — the result never includes the current transcript — which\nis what lets two assistant instances sharing a session write the same row."
|
|
5722
|
+
},
|
|
5723
|
+
{
|
|
5724
|
+
"kind": "function",
|
|
5725
|
+
"name": "clearCostSessionHistory",
|
|
5726
|
+
"return": {
|
|
5727
|
+
"type": {
|
|
5728
|
+
"text": "void"
|
|
5729
|
+
}
|
|
5730
|
+
},
|
|
5731
|
+
"parameters": [
|
|
5562
5732
|
{
|
|
5563
|
-
"
|
|
5564
|
-
"name": "currentValue",
|
|
5733
|
+
"name": "scope",
|
|
5565
5734
|
"type": {
|
|
5566
5735
|
"text": "string"
|
|
5567
|
-
}
|
|
5568
|
-
"description": "Current pinned agent name as a value the segmented-control / select can bind to.",
|
|
5569
|
-
"readonly": true
|
|
5736
|
+
}
|
|
5570
5737
|
}
|
|
5571
5738
|
],
|
|
5572
|
-
"
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5739
|
+
"description": "Clear all persisted records for a scope."
|
|
5740
|
+
},
|
|
5741
|
+
{
|
|
5742
|
+
"kind": "function",
|
|
5743
|
+
"name": "formatCostSessionDate",
|
|
5744
|
+
"return": {
|
|
5745
|
+
"type": {
|
|
5746
|
+
"text": "string"
|
|
5576
5747
|
}
|
|
5577
|
-
|
|
5578
|
-
"
|
|
5748
|
+
},
|
|
5749
|
+
"parameters": [
|
|
5579
5750
|
{
|
|
5580
|
-
"name": "
|
|
5751
|
+
"name": "iso",
|
|
5581
5752
|
"type": {
|
|
5582
5753
|
"text": "string"
|
|
5583
|
-
}
|
|
5584
|
-
"default": "'rapid'",
|
|
5585
|
-
"description": "Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`.",
|
|
5586
|
-
"fieldName": "designSystemPrefix"
|
|
5754
|
+
}
|
|
5587
5755
|
}
|
|
5588
5756
|
],
|
|
5589
|
-
"
|
|
5590
|
-
|
|
5591
|
-
|
|
5757
|
+
"description": "Display date for a history row (e.g. \"Jun 14, 2026\")."
|
|
5758
|
+
},
|
|
5759
|
+
{
|
|
5760
|
+
"kind": "function",
|
|
5761
|
+
"name": "isCostSessionRecord",
|
|
5762
|
+
"return": {
|
|
5763
|
+
"type": {
|
|
5764
|
+
"text": "value is CostSessionRecord"
|
|
5765
|
+
}
|
|
5592
5766
|
},
|
|
5593
|
-
"
|
|
5594
|
-
|
|
5767
|
+
"parameters": [
|
|
5768
|
+
{
|
|
5769
|
+
"name": "value",
|
|
5770
|
+
"type": {
|
|
5771
|
+
"text": "unknown"
|
|
5772
|
+
}
|
|
5773
|
+
}
|
|
5774
|
+
],
|
|
5775
|
+
"description": "Whether a value is a usable row. Exported because rows arrive by two routes and BOTH need it:\n`loadCostSessionHistory` filters the `localStorage` path here, and the assistant filters what a\nhost provider returns. A row that skips this check is not merely ignored downstream — a\nhalf-shaped `usage` sums to `NaN` through every total, and a missing `updatedAt` throws inside\nthe sort that orders the list, during render."
|
|
5595
5776
|
}
|
|
5596
5777
|
],
|
|
5597
5778
|
"exports": [
|
|
5598
5779
|
{
|
|
5599
5780
|
"kind": "js",
|
|
5600
|
-
"name": "
|
|
5781
|
+
"name": "costHistoryStorageKey",
|
|
5601
5782
|
"declaration": {
|
|
5602
|
-
"name": "
|
|
5603
|
-
"module": "src/
|
|
5783
|
+
"name": "costHistoryStorageKey",
|
|
5784
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5604
5785
|
}
|
|
5605
5786
|
},
|
|
5606
5787
|
{
|
|
5607
5788
|
"kind": "js",
|
|
5608
|
-
"name": "
|
|
5789
|
+
"name": "loadCostSessionHistory",
|
|
5609
5790
|
"declaration": {
|
|
5610
|
-
"name": "
|
|
5611
|
-
"module": "src/
|
|
5791
|
+
"name": "loadCostSessionHistory",
|
|
5792
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5612
5793
|
}
|
|
5613
5794
|
},
|
|
5614
5795
|
{
|
|
5615
|
-
"kind": "
|
|
5616
|
-
"name": "
|
|
5796
|
+
"kind": "js",
|
|
5797
|
+
"name": "saveCostSessionHistory",
|
|
5617
5798
|
"declaration": {
|
|
5618
|
-
"name": "
|
|
5619
|
-
"module": "src/
|
|
5799
|
+
"name": "saveCostSessionHistory",
|
|
5800
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5620
5801
|
}
|
|
5621
|
-
}
|
|
5622
|
-
]
|
|
5623
|
-
},
|
|
5624
|
-
{
|
|
5625
|
-
"kind": "javascript-module",
|
|
5626
|
-
"path": "src/components/agent-picker/index.ts",
|
|
5627
|
-
"declarations": [],
|
|
5628
|
-
"exports": [
|
|
5802
|
+
},
|
|
5629
5803
|
{
|
|
5630
5804
|
"kind": "js",
|
|
5631
|
-
"name": "
|
|
5805
|
+
"name": "upsertRecord",
|
|
5632
5806
|
"declaration": {
|
|
5633
|
-
"name": "
|
|
5634
|
-
"
|
|
5807
|
+
"name": "upsertRecord",
|
|
5808
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5635
5809
|
}
|
|
5636
|
-
}
|
|
5637
|
-
]
|
|
5638
|
-
},
|
|
5639
|
-
{
|
|
5640
|
-
"kind": "javascript-module",
|
|
5641
|
-
"path": "src/components/ai-driver/ai-driver.ts",
|
|
5642
|
-
"declarations": [],
|
|
5643
|
-
"exports": []
|
|
5644
|
-
},
|
|
5645
|
-
{
|
|
5646
|
-
"kind": "javascript-module",
|
|
5647
|
-
"path": "src/components/ai-driver/index.ts",
|
|
5648
|
-
"declarations": [],
|
|
5649
|
-
"exports": [
|
|
5810
|
+
},
|
|
5650
5811
|
{
|
|
5651
5812
|
"kind": "js",
|
|
5652
|
-
"name": "
|
|
5813
|
+
"name": "sortRecordsByRecency",
|
|
5653
5814
|
"declaration": {
|
|
5654
|
-
"name": "
|
|
5655
|
-
"module": "
|
|
5815
|
+
"name": "sortRecordsByRecency",
|
|
5816
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5656
5817
|
}
|
|
5657
|
-
}
|
|
5658
|
-
]
|
|
5659
|
-
},
|
|
5660
|
-
{
|
|
5661
|
-
"kind": "javascript-module",
|
|
5662
|
-
"path": "src/components/chat-bubble/chat-bubble.styles.ts",
|
|
5663
|
-
"declarations": [
|
|
5818
|
+
},
|
|
5664
5819
|
{
|
|
5665
|
-
"kind": "
|
|
5666
|
-
"name": "
|
|
5667
|
-
"
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5820
|
+
"kind": "js",
|
|
5821
|
+
"name": "resolveBankedUsage",
|
|
5822
|
+
"declaration": {
|
|
5823
|
+
"name": "resolveBankedUsage",
|
|
5824
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5825
|
+
}
|
|
5826
|
+
},
|
|
5671
5827
|
{
|
|
5672
5828
|
"kind": "js",
|
|
5673
|
-
"name": "
|
|
5829
|
+
"name": "clearCostSessionHistory",
|
|
5674
5830
|
"declaration": {
|
|
5675
|
-
"name": "
|
|
5676
|
-
"module": "src/
|
|
5831
|
+
"name": "clearCostSessionHistory",
|
|
5832
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5677
5833
|
}
|
|
5678
|
-
}
|
|
5679
|
-
]
|
|
5680
|
-
},
|
|
5681
|
-
{
|
|
5682
|
-
"kind": "javascript-module",
|
|
5683
|
-
"path": "src/components/chat-bubble/chat-bubble.template.ts",
|
|
5684
|
-
"declarations": [
|
|
5834
|
+
},
|
|
5685
5835
|
{
|
|
5686
|
-
"kind": "
|
|
5687
|
-
"name": "
|
|
5688
|
-
"
|
|
5689
|
-
"
|
|
5690
|
-
|
|
5691
|
-
}
|
|
5836
|
+
"kind": "js",
|
|
5837
|
+
"name": "formatCostSessionDate",
|
|
5838
|
+
"declaration": {
|
|
5839
|
+
"name": "formatCostSessionDate",
|
|
5840
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5692
5841
|
}
|
|
5693
|
-
}
|
|
5694
|
-
],
|
|
5695
|
-
"exports": [
|
|
5842
|
+
},
|
|
5696
5843
|
{
|
|
5697
5844
|
"kind": "js",
|
|
5698
|
-
"name": "
|
|
5845
|
+
"name": "isCostSessionRecord",
|
|
5699
5846
|
"declaration": {
|
|
5700
|
-
"name": "
|
|
5701
|
-
"module": "src/
|
|
5847
|
+
"name": "isCostSessionRecord",
|
|
5848
|
+
"module": "src/utils/cost-session-history.ts"
|
|
5702
5849
|
}
|
|
5703
5850
|
}
|
|
5704
5851
|
]
|
|
5705
5852
|
},
|
|
5706
5853
|
{
|
|
5707
5854
|
"kind": "javascript-module",
|
|
5708
|
-
"path": "src/
|
|
5855
|
+
"path": "src/utils/derive-cost-session-title.ts",
|
|
5709
5856
|
"declarations": [
|
|
5710
5857
|
{
|
|
5711
|
-
"kind": "
|
|
5712
|
-
"
|
|
5713
|
-
"
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5858
|
+
"kind": "variable",
|
|
5859
|
+
"name": "COST_SESSION_TITLE_MAX_WORDS",
|
|
5860
|
+
"type": {
|
|
5861
|
+
"text": "number"
|
|
5862
|
+
},
|
|
5863
|
+
"default": "10",
|
|
5864
|
+
"description": "Max words kept from the first user turn when deriving a session title."
|
|
5865
|
+
},
|
|
5866
|
+
{
|
|
5867
|
+
"kind": "variable",
|
|
5868
|
+
"name": "COST_SESSION_TITLE_MAX_CHARS",
|
|
5869
|
+
"type": {
|
|
5870
|
+
"text": "number"
|
|
5871
|
+
},
|
|
5872
|
+
"default": "60",
|
|
5873
|
+
"description": "Hard cap on derived title length (ellipsis included)."
|
|
5874
|
+
},
|
|
5875
|
+
{
|
|
5876
|
+
"kind": "function",
|
|
5877
|
+
"name": "getChatMessageText",
|
|
5878
|
+
"return": {
|
|
5879
|
+
"type": {
|
|
5880
|
+
"text": "string"
|
|
5881
|
+
}
|
|
5882
|
+
},
|
|
5883
|
+
"parameters": [
|
|
5723
5884
|
{
|
|
5724
|
-
"
|
|
5725
|
-
"name": "imageSrc",
|
|
5885
|
+
"name": "content",
|
|
5726
5886
|
"type": {
|
|
5727
|
-
"text": "
|
|
5887
|
+
"text": "ChatMessage['content']"
|
|
5728
5888
|
}
|
|
5729
|
-
}
|
|
5889
|
+
}
|
|
5890
|
+
],
|
|
5891
|
+
"description": "Plain text from a chat message `content` field."
|
|
5892
|
+
},
|
|
5893
|
+
{
|
|
5894
|
+
"kind": "function",
|
|
5895
|
+
"name": "truncateCostSessionTitle",
|
|
5896
|
+
"return": {
|
|
5897
|
+
"type": {
|
|
5898
|
+
"text": "string"
|
|
5899
|
+
}
|
|
5900
|
+
},
|
|
5901
|
+
"parameters": [
|
|
5730
5902
|
{
|
|
5731
|
-
"
|
|
5732
|
-
"name": "designSystemPrefix",
|
|
5903
|
+
"name": "text",
|
|
5733
5904
|
"type": {
|
|
5734
5905
|
"text": "string"
|
|
5735
|
-
}
|
|
5736
|
-
|
|
5737
|
-
|
|
5906
|
+
}
|
|
5907
|
+
}
|
|
5908
|
+
],
|
|
5909
|
+
"description": "Trim a raw user phrase to a display-friendly session title: first sentence,\nthen word cap, then character cap."
|
|
5910
|
+
},
|
|
5911
|
+
{
|
|
5912
|
+
"kind": "function",
|
|
5913
|
+
"name": "deriveCostSessionTitleFromMessages",
|
|
5914
|
+
"return": {
|
|
5915
|
+
"type": {
|
|
5916
|
+
"text": "string | undefined"
|
|
5917
|
+
}
|
|
5918
|
+
},
|
|
5919
|
+
"parameters": [
|
|
5738
5920
|
{
|
|
5739
|
-
"
|
|
5740
|
-
"name": "bubbleLeft",
|
|
5921
|
+
"name": "messages",
|
|
5741
5922
|
"type": {
|
|
5742
|
-
"text": "
|
|
5743
|
-
}
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5923
|
+
"text": "readonly ChatMessage[]"
|
|
5924
|
+
}
|
|
5925
|
+
}
|
|
5926
|
+
],
|
|
5927
|
+
"description": "First non-empty user message in the thread, shortened for cost history."
|
|
5928
|
+
},
|
|
5929
|
+
{
|
|
5930
|
+
"kind": "function",
|
|
5931
|
+
"name": "resolveCostSessionTitle",
|
|
5932
|
+
"return": {
|
|
5933
|
+
"type": {
|
|
5934
|
+
"text": "string"
|
|
5935
|
+
}
|
|
5936
|
+
},
|
|
5937
|
+
"parameters": [
|
|
5747
5938
|
{
|
|
5748
|
-
"
|
|
5749
|
-
"name": "bubbleTop",
|
|
5939
|
+
"name": "input",
|
|
5750
5940
|
"type": {
|
|
5751
|
-
"text": "
|
|
5752
|
-
}
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5941
|
+
"text": "ResolveCostSessionTitleInput"
|
|
5942
|
+
}
|
|
5943
|
+
}
|
|
5944
|
+
],
|
|
5945
|
+
"description": "Resolve the label stored on a finalized cost session record."
|
|
5946
|
+
}
|
|
5947
|
+
],
|
|
5948
|
+
"exports": [
|
|
5949
|
+
{
|
|
5950
|
+
"kind": "js",
|
|
5951
|
+
"name": "COST_SESSION_TITLE_MAX_WORDS",
|
|
5952
|
+
"declaration": {
|
|
5953
|
+
"name": "COST_SESSION_TITLE_MAX_WORDS",
|
|
5954
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
5955
|
+
}
|
|
5956
|
+
},
|
|
5957
|
+
{
|
|
5958
|
+
"kind": "js",
|
|
5959
|
+
"name": "COST_SESSION_TITLE_MAX_CHARS",
|
|
5960
|
+
"declaration": {
|
|
5961
|
+
"name": "COST_SESSION_TITLE_MAX_CHARS",
|
|
5962
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
5963
|
+
}
|
|
5964
|
+
},
|
|
5965
|
+
{
|
|
5966
|
+
"kind": "js",
|
|
5967
|
+
"name": "getChatMessageText",
|
|
5968
|
+
"declaration": {
|
|
5969
|
+
"name": "getChatMessageText",
|
|
5970
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
5971
|
+
}
|
|
5972
|
+
},
|
|
5973
|
+
{
|
|
5974
|
+
"kind": "js",
|
|
5975
|
+
"name": "truncateCostSessionTitle",
|
|
5976
|
+
"declaration": {
|
|
5977
|
+
"name": "truncateCostSessionTitle",
|
|
5978
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
5979
|
+
}
|
|
5980
|
+
},
|
|
5981
|
+
{
|
|
5982
|
+
"kind": "js",
|
|
5983
|
+
"name": "deriveCostSessionTitleFromMessages",
|
|
5984
|
+
"declaration": {
|
|
5985
|
+
"name": "deriveCostSessionTitleFromMessages",
|
|
5986
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
5987
|
+
}
|
|
5988
|
+
},
|
|
5989
|
+
{
|
|
5990
|
+
"kind": "js",
|
|
5991
|
+
"name": "resolveCostSessionTitle",
|
|
5992
|
+
"declaration": {
|
|
5993
|
+
"name": "resolveCostSessionTitle",
|
|
5994
|
+
"module": "src/utils/derive-cost-session-title.ts"
|
|
5995
|
+
}
|
|
5996
|
+
}
|
|
5997
|
+
]
|
|
5998
|
+
},
|
|
5999
|
+
{
|
|
6000
|
+
"kind": "javascript-module",
|
|
6001
|
+
"path": "src/utils/flatten-sub-agent-messages.ts",
|
|
6002
|
+
"declarations": [],
|
|
6003
|
+
"exports": []
|
|
6004
|
+
},
|
|
6005
|
+
{
|
|
6006
|
+
"kind": "javascript-module",
|
|
6007
|
+
"path": "src/utils/format-usd.ts",
|
|
6008
|
+
"declarations": [
|
|
6009
|
+
{
|
|
6010
|
+
"kind": "function",
|
|
6011
|
+
"name": "formatUsdAmount",
|
|
6012
|
+
"return": {
|
|
6013
|
+
"type": {
|
|
6014
|
+
"text": "string"
|
|
6015
|
+
}
|
|
6016
|
+
},
|
|
6017
|
+
"parameters": [
|
|
5756
6018
|
{
|
|
5757
|
-
"
|
|
5758
|
-
"name": "dialogLeft",
|
|
6019
|
+
"name": "value",
|
|
5759
6020
|
"type": {
|
|
5760
6021
|
"text": "number"
|
|
5761
|
-
}
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
6022
|
+
}
|
|
6023
|
+
}
|
|
6024
|
+
],
|
|
6025
|
+
"description": "The bare amount, no currency sign — `(12.3) => \"12.30\"`.\n\nExists for the settings modal's cost blocks, where the `$` is a separately\nstyled `<span class=\"prefix\">` and folding it into the text would change the\nDOM those styles target."
|
|
6026
|
+
},
|
|
6027
|
+
{
|
|
6028
|
+
"kind": "function",
|
|
6029
|
+
"name": "formatUsd",
|
|
6030
|
+
"return": {
|
|
6031
|
+
"type": {
|
|
6032
|
+
"text": "string"
|
|
6033
|
+
}
|
|
6034
|
+
},
|
|
6035
|
+
"parameters": [
|
|
5765
6036
|
{
|
|
5766
|
-
"
|
|
5767
|
-
"name": "dialogTop",
|
|
6037
|
+
"name": "value",
|
|
5768
6038
|
"type": {
|
|
5769
6039
|
"text": "number"
|
|
5770
|
-
}
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
6040
|
+
}
|
|
6041
|
+
}
|
|
6042
|
+
],
|
|
6043
|
+
"description": "A signed USD figure — `(12.3) => \"$12.30\"`."
|
|
6044
|
+
}
|
|
6045
|
+
],
|
|
6046
|
+
"exports": [
|
|
6047
|
+
{
|
|
6048
|
+
"kind": "js",
|
|
6049
|
+
"name": "formatUsdAmount",
|
|
6050
|
+
"declaration": {
|
|
6051
|
+
"name": "formatUsdAmount",
|
|
6052
|
+
"module": "src/utils/format-usd.ts"
|
|
6053
|
+
}
|
|
6054
|
+
},
|
|
6055
|
+
{
|
|
6056
|
+
"kind": "js",
|
|
6057
|
+
"name": "formatUsd",
|
|
6058
|
+
"declaration": {
|
|
6059
|
+
"name": "formatUsd",
|
|
6060
|
+
"module": "src/utils/format-usd.ts"
|
|
6061
|
+
}
|
|
6062
|
+
}
|
|
6063
|
+
]
|
|
6064
|
+
},
|
|
6065
|
+
{
|
|
6066
|
+
"kind": "javascript-module",
|
|
6067
|
+
"path": "src/utils/history-transform.ts",
|
|
6068
|
+
"declarations": [
|
|
6069
|
+
{
|
|
6070
|
+
"kind": "function",
|
|
6071
|
+
"name": "transformHistoryForAgent",
|
|
6072
|
+
"return": {
|
|
6073
|
+
"type": {
|
|
6074
|
+
"text": "ChatMessage[]"
|
|
6075
|
+
}
|
|
6076
|
+
},
|
|
6077
|
+
"parameters": [
|
|
5774
6078
|
{
|
|
5775
|
-
"
|
|
5776
|
-
"name": "dialogWidth",
|
|
6079
|
+
"name": "history",
|
|
5777
6080
|
"type": {
|
|
5778
|
-
"text": "
|
|
5779
|
-
}
|
|
5780
|
-
"default": "400",
|
|
5781
|
-
"description": "Current rendered width of the dialog panel (px). @internal"
|
|
6081
|
+
"text": "ChatMessage[]"
|
|
6082
|
+
}
|
|
5782
6083
|
},
|
|
5783
6084
|
{
|
|
5784
|
-
"
|
|
5785
|
-
"name": "dialogHeight",
|
|
5786
|
-
"type": {
|
|
5787
|
-
"text": "number"
|
|
5788
|
-
},
|
|
5789
|
-
"default": "520",
|
|
5790
|
-
"description": "Current rendered height of the dialog panel (px). @internal"
|
|
5791
|
-
},
|
|
5792
|
-
{
|
|
5793
|
-
"kind": "field",
|
|
5794
|
-
"name": "dialogOpen",
|
|
5795
|
-
"type": {
|
|
5796
|
-
"text": "boolean"
|
|
5797
|
-
},
|
|
5798
|
-
"default": "false",
|
|
5799
|
-
"description": "Whether the dialog panel is currently open. @internal"
|
|
5800
|
-
},
|
|
5801
|
-
{
|
|
5802
|
-
"kind": "field",
|
|
5803
|
-
"name": "hovered",
|
|
5804
|
-
"type": {
|
|
5805
|
-
"text": "boolean"
|
|
5806
|
-
},
|
|
5807
|
-
"default": "false",
|
|
5808
|
-
"description": "Whether the bubble orb is currently hovered. @internal"
|
|
5809
|
-
},
|
|
5810
|
-
{
|
|
5811
|
-
"kind": "field",
|
|
5812
|
-
"name": "unsubBus",
|
|
5813
|
-
"type": {
|
|
5814
|
-
"text": "() => void | undefined"
|
|
5815
|
-
},
|
|
5816
|
-
"privacy": "private"
|
|
5817
|
-
},
|
|
5818
|
-
{
|
|
5819
|
-
"kind": "field",
|
|
5820
|
-
"name": "injectedCloseBtn",
|
|
5821
|
-
"type": {
|
|
5822
|
-
"text": "Element | undefined"
|
|
5823
|
-
},
|
|
5824
|
-
"privacy": "private"
|
|
5825
|
-
},
|
|
5826
|
-
{
|
|
5827
|
-
"kind": "field",
|
|
5828
|
-
"name": "resizeObserver",
|
|
5829
|
-
"type": {
|
|
5830
|
-
"text": "ResizeObserver | undefined"
|
|
5831
|
-
},
|
|
5832
|
-
"privacy": "private"
|
|
5833
|
-
},
|
|
5834
|
-
{
|
|
5835
|
-
"kind": "field",
|
|
5836
|
-
"name": "dragging",
|
|
5837
|
-
"type": {
|
|
5838
|
-
"text": "boolean"
|
|
5839
|
-
},
|
|
5840
|
-
"privacy": "private",
|
|
5841
|
-
"default": "false"
|
|
5842
|
-
},
|
|
5843
|
-
{
|
|
5844
|
-
"kind": "field",
|
|
5845
|
-
"name": "dragTarget",
|
|
5846
|
-
"type": {
|
|
5847
|
-
"text": "'bubble' | 'dialog' | null"
|
|
5848
|
-
},
|
|
5849
|
-
"privacy": "private",
|
|
5850
|
-
"default": "null"
|
|
5851
|
-
},
|
|
5852
|
-
{
|
|
5853
|
-
"kind": "field",
|
|
5854
|
-
"name": "startMouseX",
|
|
5855
|
-
"type": {
|
|
5856
|
-
"text": "number"
|
|
5857
|
-
},
|
|
5858
|
-
"privacy": "private",
|
|
5859
|
-
"default": "0"
|
|
5860
|
-
},
|
|
5861
|
-
{
|
|
5862
|
-
"kind": "field",
|
|
5863
|
-
"name": "startMouseY",
|
|
6085
|
+
"name": "agentName",
|
|
5864
6086
|
"type": {
|
|
5865
|
-
"text": "
|
|
5866
|
-
}
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
6087
|
+
"text": "string"
|
|
6088
|
+
}
|
|
6089
|
+
}
|
|
6090
|
+
],
|
|
6091
|
+
"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."
|
|
6092
|
+
},
|
|
6093
|
+
{
|
|
6094
|
+
"kind": "function",
|
|
6095
|
+
"name": "applyHistoryCap",
|
|
6096
|
+
"return": {
|
|
6097
|
+
"type": {
|
|
6098
|
+
"text": "ChatMessage[]"
|
|
6099
|
+
}
|
|
6100
|
+
},
|
|
6101
|
+
"parameters": [
|
|
5870
6102
|
{
|
|
5871
|
-
"
|
|
5872
|
-
"name": "startElemLeft",
|
|
6103
|
+
"name": "history",
|
|
5873
6104
|
"type": {
|
|
5874
|
-
"text": "
|
|
5875
|
-
}
|
|
5876
|
-
"privacy": "private",
|
|
5877
|
-
"default": "0"
|
|
6105
|
+
"text": "readonly ChatMessage[]"
|
|
6106
|
+
}
|
|
5878
6107
|
},
|
|
5879
6108
|
{
|
|
5880
|
-
"
|
|
5881
|
-
"name": "startElemTop",
|
|
6109
|
+
"name": "cap",
|
|
5882
6110
|
"type": {
|
|
5883
6111
|
"text": "number"
|
|
5884
|
-
}
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
6112
|
+
}
|
|
6113
|
+
}
|
|
6114
|
+
],
|
|
6115
|
+
"description": "Applies a history cap for sub-agent context: the last `cap` messages are passed\nverbatim; older messages have their tool payloads masked."
|
|
6116
|
+
},
|
|
6117
|
+
{
|
|
6118
|
+
"kind": "variable",
|
|
6119
|
+
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
6120
|
+
"type": {
|
|
6121
|
+
"text": "number"
|
|
6122
|
+
},
|
|
6123
|
+
"default": "4",
|
|
6124
|
+
"description": "Recent messages kept verbatim when compacting; everything earlier is summarized."
|
|
6125
|
+
},
|
|
6126
|
+
{
|
|
6127
|
+
"kind": "variable",
|
|
6128
|
+
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
6129
|
+
"type": {
|
|
6130
|
+
"text": "number"
|
|
6131
|
+
},
|
|
6132
|
+
"default": "4",
|
|
6133
|
+
"description": "Don't bother compacting unless at least this many messages would be summarized."
|
|
6134
|
+
},
|
|
6135
|
+
{
|
|
6136
|
+
"kind": "function",
|
|
6137
|
+
"name": "findCompactionCut",
|
|
6138
|
+
"return": {
|
|
6139
|
+
"type": {
|
|
6140
|
+
"text": "number | null"
|
|
6141
|
+
}
|
|
6142
|
+
},
|
|
6143
|
+
"parameters": [
|
|
5897
6144
|
{
|
|
5898
|
-
"
|
|
5899
|
-
"name": "latestMouseX",
|
|
6145
|
+
"name": "history",
|
|
5900
6146
|
"type": {
|
|
5901
|
-
"text": "
|
|
5902
|
-
}
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
6147
|
+
"text": "readonly ChatMessage[]"
|
|
6148
|
+
}
|
|
6149
|
+
}
|
|
6150
|
+
],
|
|
6151
|
+
"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."
|
|
6152
|
+
},
|
|
6153
|
+
{
|
|
6154
|
+
"kind": "function",
|
|
6155
|
+
"name": "buildCompactionSummaryPrompt",
|
|
6156
|
+
"return": {
|
|
6157
|
+
"type": {
|
|
6158
|
+
"text": "{\n systemPrompt: string;\n userMessage: string;\n}"
|
|
6159
|
+
}
|
|
6160
|
+
},
|
|
6161
|
+
"parameters": [
|
|
5906
6162
|
{
|
|
5907
|
-
"
|
|
5908
|
-
"name": "latestMouseY",
|
|
6163
|
+
"name": "toCompact",
|
|
5909
6164
|
"type": {
|
|
5910
|
-
"text": "
|
|
5911
|
-
}
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
6165
|
+
"text": "readonly ChatMessage[]"
|
|
6166
|
+
}
|
|
6167
|
+
}
|
|
6168
|
+
],
|
|
6169
|
+
"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."
|
|
6170
|
+
},
|
|
6171
|
+
{
|
|
6172
|
+
"kind": "function",
|
|
6173
|
+
"name": "normalizeForProvider",
|
|
6174
|
+
"return": {
|
|
6175
|
+
"type": {
|
|
6176
|
+
"text": "ChatMessage[]"
|
|
6177
|
+
}
|
|
6178
|
+
},
|
|
6179
|
+
"parameters": [
|
|
5915
6180
|
{
|
|
5916
|
-
"
|
|
5917
|
-
"name": "rafHandle",
|
|
6181
|
+
"name": "history",
|
|
5918
6182
|
"type": {
|
|
5919
|
-
"text": "
|
|
5920
|
-
}
|
|
5921
|
-
|
|
5922
|
-
|
|
6183
|
+
"text": "readonly ChatMessage[]"
|
|
6184
|
+
}
|
|
6185
|
+
}
|
|
6186
|
+
],
|
|
6187
|
+
"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."
|
|
6188
|
+
},
|
|
6189
|
+
{
|
|
6190
|
+
"kind": "function",
|
|
6191
|
+
"name": "compactionDividerLabel",
|
|
6192
|
+
"return": {
|
|
6193
|
+
"type": {
|
|
6194
|
+
"text": "string"
|
|
6195
|
+
}
|
|
6196
|
+
},
|
|
6197
|
+
"parameters": [
|
|
5923
6198
|
{
|
|
5924
|
-
"
|
|
5925
|
-
"name": "closeAbort",
|
|
6199
|
+
"name": "m",
|
|
5926
6200
|
"type": {
|
|
5927
|
-
"text": "
|
|
5928
|
-
}
|
|
5929
|
-
"privacy": "private"
|
|
5930
|
-
},
|
|
5931
|
-
{
|
|
5932
|
-
"kind": "method",
|
|
5933
|
-
"name": "onBubbleMouseEnter"
|
|
5934
|
-
},
|
|
5935
|
-
{
|
|
5936
|
-
"kind": "method",
|
|
5937
|
-
"name": "onBubbleMouseLeave"
|
|
5938
|
-
},
|
|
5939
|
-
{
|
|
5940
|
-
"kind": "method",
|
|
5941
|
-
"name": "dialogOpenChanged",
|
|
5942
|
-
"parameters": [
|
|
5943
|
-
{
|
|
5944
|
-
"name": "_",
|
|
5945
|
-
"type": {
|
|
5946
|
-
"text": "boolean"
|
|
5947
|
-
}
|
|
5948
|
-
},
|
|
5949
|
-
{
|
|
5950
|
-
"name": "next",
|
|
5951
|
-
"type": {
|
|
5952
|
-
"text": "boolean"
|
|
5953
|
-
}
|
|
5954
|
-
}
|
|
5955
|
-
]
|
|
5956
|
-
},
|
|
5957
|
-
{
|
|
5958
|
-
"kind": "method",
|
|
5959
|
-
"name": "dialogContentChanged",
|
|
5960
|
-
"parameters": [
|
|
5961
|
-
{
|
|
5962
|
-
"name": "_",
|
|
5963
|
-
"type": {
|
|
5964
|
-
"text": "HTMLElement[]"
|
|
5965
|
-
}
|
|
5966
|
-
},
|
|
5967
|
-
{
|
|
5968
|
-
"name": "next",
|
|
5969
|
-
"type": {
|
|
5970
|
-
"text": "HTMLElement[]"
|
|
5971
|
-
}
|
|
5972
|
-
}
|
|
5973
|
-
]
|
|
5974
|
-
},
|
|
5975
|
-
{
|
|
5976
|
-
"kind": "method",
|
|
5977
|
-
"name": "injectCloseButton",
|
|
5978
|
-
"privacy": "private",
|
|
5979
|
-
"parameters": [
|
|
5980
|
-
{
|
|
5981
|
-
"name": "assistant",
|
|
5982
|
-
"type": {
|
|
5983
|
-
"text": "Element"
|
|
5984
|
-
}
|
|
5985
|
-
}
|
|
5986
|
-
]
|
|
5987
|
-
},
|
|
5988
|
-
{
|
|
5989
|
-
"kind": "method",
|
|
5990
|
-
"name": "onBubbleMouseDown",
|
|
5991
|
-
"parameters": [
|
|
5992
|
-
{
|
|
5993
|
-
"name": "e",
|
|
5994
|
-
"type": {
|
|
5995
|
-
"text": "MouseEvent"
|
|
5996
|
-
}
|
|
5997
|
-
}
|
|
5998
|
-
]
|
|
5999
|
-
},
|
|
6000
|
-
{
|
|
6001
|
-
"kind": "method",
|
|
6002
|
-
"name": "onDialogHeaderMouseDown",
|
|
6003
|
-
"parameters": [
|
|
6004
|
-
{
|
|
6005
|
-
"name": "e",
|
|
6006
|
-
"type": {
|
|
6007
|
-
"text": "CustomEvent<{ clientX: number; clientY: number }>"
|
|
6008
|
-
}
|
|
6009
|
-
}
|
|
6010
|
-
]
|
|
6011
|
-
},
|
|
6012
|
-
{
|
|
6013
|
-
"kind": "field",
|
|
6014
|
-
"name": "onCloseBtnClick",
|
|
6015
|
-
"privacy": "private",
|
|
6016
|
-
"readonly": true
|
|
6017
|
-
},
|
|
6018
|
-
{
|
|
6019
|
-
"kind": "method",
|
|
6020
|
-
"name": "cancelClose",
|
|
6021
|
-
"privacy": "private"
|
|
6022
|
-
},
|
|
6023
|
-
{
|
|
6024
|
-
"kind": "method",
|
|
6025
|
-
"name": "startCloseDialog",
|
|
6026
|
-
"privacy": "private"
|
|
6027
|
-
},
|
|
6028
|
-
{
|
|
6029
|
-
"kind": "field",
|
|
6030
|
-
"name": "onDocMouseMove",
|
|
6031
|
-
"privacy": "private"
|
|
6032
|
-
},
|
|
6033
|
-
{
|
|
6034
|
-
"kind": "field",
|
|
6035
|
-
"name": "applyDragFrame",
|
|
6036
|
-
"privacy": "private"
|
|
6037
|
-
},
|
|
6038
|
-
{
|
|
6039
|
-
"kind": "field",
|
|
6040
|
-
"name": "onDocMouseUp",
|
|
6041
|
-
"privacy": "private"
|
|
6042
|
-
},
|
|
6043
|
-
{
|
|
6044
|
-
"kind": "method",
|
|
6045
|
-
"name": "onPopout"
|
|
6046
|
-
},
|
|
6047
|
-
{
|
|
6048
|
-
"kind": "method",
|
|
6049
|
-
"name": "onCloseDialog"
|
|
6050
|
-
},
|
|
6051
|
-
{
|
|
6052
|
-
"kind": "field",
|
|
6053
|
-
"name": "tooltipStyle",
|
|
6054
|
-
"type": {
|
|
6055
|
-
"text": "string"
|
|
6056
|
-
},
|
|
6057
|
-
"readonly": true
|
|
6058
|
-
}
|
|
6059
|
-
],
|
|
6060
|
-
"attributes": [
|
|
6061
|
-
{
|
|
6062
|
-
"name": "title",
|
|
6063
|
-
"type": {
|
|
6064
|
-
"text": "string"
|
|
6065
|
-
},
|
|
6066
|
-
"default": "'AI Assistant'",
|
|
6067
|
-
"fieldName": "title"
|
|
6068
|
-
},
|
|
6069
|
-
{
|
|
6070
|
-
"name": "image-src",
|
|
6071
|
-
"type": {
|
|
6072
|
-
"text": "string | undefined"
|
|
6073
|
-
},
|
|
6074
|
-
"fieldName": "imageSrc"
|
|
6075
|
-
},
|
|
6076
|
-
{
|
|
6077
|
-
"name": "design-system-prefix",
|
|
6078
|
-
"type": {
|
|
6079
|
-
"text": "string"
|
|
6080
|
-
},
|
|
6081
|
-
"default": "'rapid'",
|
|
6082
|
-
"fieldName": "designSystemPrefix"
|
|
6201
|
+
"text": "ChatMessage"
|
|
6202
|
+
}
|
|
6083
6203
|
}
|
|
6084
6204
|
],
|
|
6085
|
-
"
|
|
6086
|
-
"name": "GenesisElement",
|
|
6087
|
-
"package": "@genesislcap/web-core"
|
|
6088
|
-
},
|
|
6089
|
-
"tagName": "foundation-ai-chat-bubble",
|
|
6090
|
-
"customElement": true
|
|
6205
|
+
"description": "Human-facing divider label for a `compacted-summary` message."
|
|
6091
6206
|
}
|
|
6092
6207
|
],
|
|
6093
6208
|
"exports": [
|
|
6094
6209
|
{
|
|
6095
6210
|
"kind": "js",
|
|
6096
|
-
"name": "
|
|
6211
|
+
"name": "transformHistoryForAgent",
|
|
6097
6212
|
"declaration": {
|
|
6098
|
-
"name": "
|
|
6099
|
-
"module": "src/
|
|
6213
|
+
"name": "transformHistoryForAgent",
|
|
6214
|
+
"module": "src/utils/history-transform.ts"
|
|
6100
6215
|
}
|
|
6101
6216
|
},
|
|
6102
6217
|
{
|
|
6103
|
-
"kind": "
|
|
6104
|
-
"name": "
|
|
6218
|
+
"kind": "js",
|
|
6219
|
+
"name": "applyHistoryCap",
|
|
6105
6220
|
"declaration": {
|
|
6106
|
-
"name": "
|
|
6107
|
-
"module": "src/
|
|
6221
|
+
"name": "applyHistoryCap",
|
|
6222
|
+
"module": "src/utils/history-transform.ts"
|
|
6223
|
+
}
|
|
6224
|
+
},
|
|
6225
|
+
{
|
|
6226
|
+
"kind": "js",
|
|
6227
|
+
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
6228
|
+
"declaration": {
|
|
6229
|
+
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
6230
|
+
"module": "src/utils/history-transform.ts"
|
|
6231
|
+
}
|
|
6232
|
+
},
|
|
6233
|
+
{
|
|
6234
|
+
"kind": "js",
|
|
6235
|
+
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
6236
|
+
"declaration": {
|
|
6237
|
+
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
6238
|
+
"module": "src/utils/history-transform.ts"
|
|
6239
|
+
}
|
|
6240
|
+
},
|
|
6241
|
+
{
|
|
6242
|
+
"kind": "js",
|
|
6243
|
+
"name": "findCompactionCut",
|
|
6244
|
+
"declaration": {
|
|
6245
|
+
"name": "findCompactionCut",
|
|
6246
|
+
"module": "src/utils/history-transform.ts"
|
|
6247
|
+
}
|
|
6248
|
+
},
|
|
6249
|
+
{
|
|
6250
|
+
"kind": "js",
|
|
6251
|
+
"name": "buildCompactionSummaryPrompt",
|
|
6252
|
+
"declaration": {
|
|
6253
|
+
"name": "buildCompactionSummaryPrompt",
|
|
6254
|
+
"module": "src/utils/history-transform.ts"
|
|
6255
|
+
}
|
|
6256
|
+
},
|
|
6257
|
+
{
|
|
6258
|
+
"kind": "js",
|
|
6259
|
+
"name": "normalizeForProvider",
|
|
6260
|
+
"declaration": {
|
|
6261
|
+
"name": "normalizeForProvider",
|
|
6262
|
+
"module": "src/utils/history-transform.ts"
|
|
6263
|
+
}
|
|
6264
|
+
},
|
|
6265
|
+
{
|
|
6266
|
+
"kind": "js",
|
|
6267
|
+
"name": "compactionDividerLabel",
|
|
6268
|
+
"declaration": {
|
|
6269
|
+
"name": "compactionDividerLabel",
|
|
6270
|
+
"module": "src/utils/history-transform.ts"
|
|
6108
6271
|
}
|
|
6109
6272
|
}
|
|
6110
6273
|
]
|
|
6111
6274
|
},
|
|
6112
6275
|
{
|
|
6113
6276
|
"kind": "javascript-module",
|
|
6114
|
-
"path": "src/
|
|
6277
|
+
"path": "src/utils/index.ts",
|
|
6115
6278
|
"declarations": [],
|
|
6116
6279
|
"exports": [
|
|
6117
6280
|
{
|
|
@@ -6119,95 +6282,90 @@
|
|
|
6119
6282
|
"name": "*",
|
|
6120
6283
|
"declaration": {
|
|
6121
6284
|
"name": "*",
|
|
6122
|
-
"package": "./
|
|
6285
|
+
"package": "./animated-panel-toggle"
|
|
6286
|
+
}
|
|
6287
|
+
},
|
|
6288
|
+
{
|
|
6289
|
+
"kind": "js",
|
|
6290
|
+
"name": "*",
|
|
6291
|
+
"declaration": {
|
|
6292
|
+
"name": "*",
|
|
6293
|
+
"package": "./logger"
|
|
6294
|
+
}
|
|
6295
|
+
},
|
|
6296
|
+
{
|
|
6297
|
+
"kind": "js",
|
|
6298
|
+
"name": "*",
|
|
6299
|
+
"declaration": {
|
|
6300
|
+
"name": "*",
|
|
6301
|
+
"package": "./tool-fold"
|
|
6123
6302
|
}
|
|
6124
6303
|
}
|
|
6125
6304
|
]
|
|
6126
6305
|
},
|
|
6127
6306
|
{
|
|
6128
6307
|
"kind": "javascript-module",
|
|
6129
|
-
"path": "src/utils/
|
|
6130
|
-
"declarations": [
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
"
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6308
|
+
"path": "src/utils/logger.ts",
|
|
6309
|
+
"declarations": [
|
|
6310
|
+
{
|
|
6311
|
+
"kind": "variable",
|
|
6312
|
+
"name": "logger"
|
|
6313
|
+
}
|
|
6314
|
+
],
|
|
6315
|
+
"exports": [
|
|
6316
|
+
{
|
|
6317
|
+
"kind": "js",
|
|
6318
|
+
"name": "logger",
|
|
6319
|
+
"declaration": {
|
|
6320
|
+
"name": "logger",
|
|
6321
|
+
"module": "src/utils/logger.ts"
|
|
6322
|
+
}
|
|
6323
|
+
}
|
|
6324
|
+
]
|
|
6144
6325
|
},
|
|
6145
6326
|
{
|
|
6146
6327
|
"kind": "javascript-module",
|
|
6147
|
-
"path": "src/utils/
|
|
6328
|
+
"path": "src/utils/message-partition.ts",
|
|
6148
6329
|
"declarations": [
|
|
6149
6330
|
{
|
|
6150
6331
|
"kind": "function",
|
|
6151
|
-
"name": "
|
|
6332
|
+
"name": "isSessionNoticeMarker",
|
|
6152
6333
|
"return": {
|
|
6153
6334
|
"type": {
|
|
6154
|
-
"text": "
|
|
6335
|
+
"text": "boolean"
|
|
6155
6336
|
}
|
|
6156
6337
|
},
|
|
6157
6338
|
"parameters": [
|
|
6158
6339
|
{
|
|
6159
|
-
"name": "
|
|
6160
|
-
"type": {
|
|
6161
|
-
"text": "readonly ChatMessage[]"
|
|
6162
|
-
}
|
|
6163
|
-
},
|
|
6164
|
-
{
|
|
6165
|
-
"name": "providerStatuses",
|
|
6166
|
-
"default": "[]",
|
|
6340
|
+
"name": "m",
|
|
6167
6341
|
"type": {
|
|
6168
|
-
"text": "
|
|
6342
|
+
"text": "ChatMessage"
|
|
6169
6343
|
}
|
|
6170
6344
|
}
|
|
6171
6345
|
],
|
|
6172
|
-
"description": "
|
|
6173
|
-
}
|
|
6174
|
-
],
|
|
6175
|
-
"exports": [
|
|
6176
|
-
{
|
|
6177
|
-
"kind": "js",
|
|
6178
|
-
"name": "collectSessionModels",
|
|
6179
|
-
"declaration": {
|
|
6180
|
-
"name": "collectSessionModels",
|
|
6181
|
-
"module": "src/utils/collect-session-models.ts"
|
|
6182
|
-
}
|
|
6183
|
-
}
|
|
6184
|
-
]
|
|
6185
|
-
},
|
|
6186
|
-
{
|
|
6187
|
-
"kind": "javascript-module",
|
|
6188
|
-
"path": "src/utils/condense-history.ts",
|
|
6189
|
-
"declarations": [
|
|
6190
|
-
{
|
|
6191
|
-
"kind": "variable",
|
|
6192
|
-
"name": "CONDENSE_MIN_CHARS",
|
|
6193
|
-
"type": {
|
|
6194
|
-
"text": "number"
|
|
6195
|
-
},
|
|
6196
|
-
"default": "1000",
|
|
6197
|
-
"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."
|
|
6346
|
+
"description": "Either restore notice — both display-only, stripped before persist. @internal"
|
|
6198
6347
|
},
|
|
6199
6348
|
{
|
|
6200
|
-
"kind": "
|
|
6201
|
-
"name": "
|
|
6202
|
-
"
|
|
6203
|
-
"
|
|
6349
|
+
"kind": "function",
|
|
6350
|
+
"name": "trailingInteractionRow",
|
|
6351
|
+
"return": {
|
|
6352
|
+
"type": {
|
|
6353
|
+
"text": "ChatMessage[]"
|
|
6354
|
+
}
|
|
6204
6355
|
},
|
|
6205
|
-
"
|
|
6206
|
-
|
|
6356
|
+
"parameters": [
|
|
6357
|
+
{
|
|
6358
|
+
"name": "messages",
|
|
6359
|
+
"type": {
|
|
6360
|
+
"text": "ChatMessage[]"
|
|
6361
|
+
}
|
|
6362
|
+
}
|
|
6363
|
+
],
|
|
6364
|
+
"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."
|
|
6207
6365
|
},
|
|
6208
6366
|
{
|
|
6209
6367
|
"kind": "function",
|
|
6210
|
-
"name": "
|
|
6368
|
+
"name": "filterVisibleMessages",
|
|
6211
6369
|
"return": {
|
|
6212
6370
|
"type": {
|
|
6213
6371
|
"text": "ChatMessage[]"
|
|
@@ -6215,388 +6373,320 @@
|
|
|
6215
6373
|
},
|
|
6216
6374
|
"parameters": [
|
|
6217
6375
|
{
|
|
6218
|
-
"name": "
|
|
6376
|
+
"name": "messages",
|
|
6219
6377
|
"type": {
|
|
6220
6378
|
"text": "ChatMessage[]"
|
|
6221
|
-
}
|
|
6222
|
-
"description": "The to-model history copy to rewrite (not mutated)."
|
|
6223
|
-
},
|
|
6224
|
-
{
|
|
6225
|
-
"name": "policies",
|
|
6226
|
-
"type": {
|
|
6227
|
-
"text": "Map<string, RegisteredCondensePolicy>"
|
|
6228
|
-
},
|
|
6229
|
-
"description": "The driver's registry, keyed by tool-call id. Its entries'\n`reported*` flags are flipped as payloads first collapse."
|
|
6230
|
-
},
|
|
6231
|
-
{
|
|
6232
|
-
"name": "ctx",
|
|
6233
|
-
"type": {
|
|
6234
|
-
"text": "CondenseContext"
|
|
6235
|
-
},
|
|
6236
|
-
"description": "The driver's live clocks (model-call / turn / agent-activation)."
|
|
6379
|
+
}
|
|
6237
6380
|
},
|
|
6238
6381
|
{
|
|
6239
|
-
"name": "
|
|
6382
|
+
"name": "toggles",
|
|
6240
6383
|
"type": {
|
|
6241
|
-
"text": "
|
|
6242
|
-
}
|
|
6243
|
-
"description": "Invoked once per payload at its full→stub transition."
|
|
6384
|
+
"text": "MessageFilterState"
|
|
6385
|
+
}
|
|
6244
6386
|
}
|
|
6245
6387
|
],
|
|
6246
|
-
"description": "
|
|
6388
|
+
"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."
|
|
6247
6389
|
}
|
|
6248
6390
|
],
|
|
6249
6391
|
"exports": [
|
|
6250
6392
|
{
|
|
6251
6393
|
"kind": "js",
|
|
6252
|
-
"name": "
|
|
6394
|
+
"name": "isSessionNoticeMarker",
|
|
6253
6395
|
"declaration": {
|
|
6254
|
-
"name": "
|
|
6255
|
-
"module": "src/utils/
|
|
6396
|
+
"name": "isSessionNoticeMarker",
|
|
6397
|
+
"module": "src/utils/message-partition.ts"
|
|
6256
6398
|
}
|
|
6257
6399
|
},
|
|
6258
6400
|
{
|
|
6259
6401
|
"kind": "js",
|
|
6260
|
-
"name": "
|
|
6402
|
+
"name": "trailingInteractionRow",
|
|
6261
6403
|
"declaration": {
|
|
6262
|
-
"name": "
|
|
6263
|
-
"module": "src/utils/
|
|
6404
|
+
"name": "trailingInteractionRow",
|
|
6405
|
+
"module": "src/utils/message-partition.ts"
|
|
6264
6406
|
}
|
|
6265
6407
|
},
|
|
6266
6408
|
{
|
|
6267
6409
|
"kind": "js",
|
|
6268
|
-
"name": "
|
|
6410
|
+
"name": "filterVisibleMessages",
|
|
6269
6411
|
"declaration": {
|
|
6270
|
-
"name": "
|
|
6271
|
-
"module": "src/utils/
|
|
6412
|
+
"name": "filterVisibleMessages",
|
|
6413
|
+
"module": "src/utils/message-partition.ts"
|
|
6272
6414
|
}
|
|
6273
6415
|
}
|
|
6274
6416
|
]
|
|
6275
6417
|
},
|
|
6276
6418
|
{
|
|
6277
6419
|
"kind": "javascript-module",
|
|
6278
|
-
"path": "src/utils/cost-
|
|
6420
|
+
"path": "src/utils/resolve-cost-history-config.ts",
|
|
6279
6421
|
"declarations": [
|
|
6280
6422
|
{
|
|
6281
6423
|
"kind": "function",
|
|
6282
|
-
"name": "
|
|
6424
|
+
"name": "resolveCostHistoryConfig",
|
|
6283
6425
|
"return": {
|
|
6284
6426
|
"type": {
|
|
6285
|
-
"text": "
|
|
6427
|
+
"text": "ResolvedCostHistoryConfig"
|
|
6286
6428
|
}
|
|
6287
6429
|
},
|
|
6288
6430
|
"parameters": [
|
|
6289
6431
|
{
|
|
6290
|
-
"name": "
|
|
6432
|
+
"name": "chatConfig",
|
|
6291
6433
|
"type": {
|
|
6292
|
-
"text": "
|
|
6434
|
+
"text": "ChatConfig"
|
|
6293
6435
|
}
|
|
6294
6436
|
}
|
|
6295
6437
|
],
|
|
6296
|
-
"description": "
|
|
6297
|
-
}
|
|
6438
|
+
"description": "Resolve `chatConfig.costHistory` with defaults applied."
|
|
6439
|
+
}
|
|
6440
|
+
],
|
|
6441
|
+
"exports": [
|
|
6442
|
+
{
|
|
6443
|
+
"kind": "js",
|
|
6444
|
+
"name": "resolveCostHistoryConfig",
|
|
6445
|
+
"declaration": {
|
|
6446
|
+
"name": "resolveCostHistoryConfig",
|
|
6447
|
+
"module": "src/utils/resolve-cost-history-config.ts"
|
|
6448
|
+
}
|
|
6449
|
+
}
|
|
6450
|
+
]
|
|
6451
|
+
},
|
|
6452
|
+
{
|
|
6453
|
+
"kind": "javascript-module",
|
|
6454
|
+
"path": "src/utils/resolve-preference-baseline.ts",
|
|
6455
|
+
"declarations": [],
|
|
6456
|
+
"exports": []
|
|
6457
|
+
},
|
|
6458
|
+
{
|
|
6459
|
+
"kind": "javascript-module",
|
|
6460
|
+
"path": "src/utils/strip-agent-handlers.ts",
|
|
6461
|
+
"declarations": [],
|
|
6462
|
+
"exports": []
|
|
6463
|
+
},
|
|
6464
|
+
{
|
|
6465
|
+
"kind": "javascript-module",
|
|
6466
|
+
"path": "src/utils/sum-costs.ts",
|
|
6467
|
+
"declarations": [],
|
|
6468
|
+
"exports": []
|
|
6469
|
+
},
|
|
6470
|
+
{
|
|
6471
|
+
"kind": "javascript-module",
|
|
6472
|
+
"path": "src/utils/sum-tokens.ts",
|
|
6473
|
+
"declarations": [
|
|
6298
6474
|
{
|
|
6299
6475
|
"kind": "function",
|
|
6300
|
-
"name": "
|
|
6476
|
+
"name": "formatCompactTokenCountSafe",
|
|
6301
6477
|
"return": {
|
|
6302
6478
|
"type": {
|
|
6303
|
-
"text": "
|
|
6479
|
+
"text": "string"
|
|
6304
6480
|
}
|
|
6305
6481
|
},
|
|
6306
6482
|
"parameters": [
|
|
6307
6483
|
{
|
|
6308
|
-
"name": "
|
|
6484
|
+
"name": "tokens",
|
|
6309
6485
|
"type": {
|
|
6310
|
-
"text": "
|
|
6486
|
+
"text": "number"
|
|
6311
6487
|
}
|
|
6312
6488
|
}
|
|
6313
6489
|
],
|
|
6314
|
-
"description": "
|
|
6490
|
+
"description": "formatCompactTokenCount passed through DOMPurify for `:innerHTML` bindings."
|
|
6491
|
+
}
|
|
6492
|
+
],
|
|
6493
|
+
"exports": [
|
|
6494
|
+
{
|
|
6495
|
+
"kind": "js",
|
|
6496
|
+
"name": "formatCompactTokenCountSafe",
|
|
6497
|
+
"declaration": {
|
|
6498
|
+
"name": "formatCompactTokenCountSafe",
|
|
6499
|
+
"module": "src/utils/sum-tokens.ts"
|
|
6500
|
+
}
|
|
6501
|
+
}
|
|
6502
|
+
]
|
|
6503
|
+
},
|
|
6504
|
+
{
|
|
6505
|
+
"kind": "javascript-module",
|
|
6506
|
+
"path": "src/utils/sum-usage.ts",
|
|
6507
|
+
"declarations": [
|
|
6508
|
+
{
|
|
6509
|
+
"kind": "function",
|
|
6510
|
+
"name": "emptyUsage",
|
|
6511
|
+
"return": {
|
|
6512
|
+
"type": {
|
|
6513
|
+
"text": "AggregateUsage"
|
|
6514
|
+
}
|
|
6515
|
+
},
|
|
6516
|
+
"description": "Zeroed AggregateUsage. A factory, not a shared const, because callers\naccumulate into the returned object."
|
|
6315
6517
|
},
|
|
6316
6518
|
{
|
|
6317
6519
|
"kind": "function",
|
|
6318
|
-
"name": "
|
|
6520
|
+
"name": "totalTokens",
|
|
6319
6521
|
"return": {
|
|
6320
6522
|
"type": {
|
|
6321
|
-
"text": "
|
|
6523
|
+
"text": "number"
|
|
6322
6524
|
}
|
|
6323
6525
|
},
|
|
6324
6526
|
"parameters": [
|
|
6325
6527
|
{
|
|
6326
|
-
"name": "
|
|
6327
|
-
"type": {
|
|
6328
|
-
"text": "string"
|
|
6329
|
-
}
|
|
6330
|
-
},
|
|
6331
|
-
{
|
|
6332
|
-
"name": "records",
|
|
6528
|
+
"name": "usage",
|
|
6333
6529
|
"type": {
|
|
6334
|
-
"text": "
|
|
6530
|
+
"text": "AggregateUsage"
|
|
6335
6531
|
}
|
|
6336
6532
|
}
|
|
6337
6533
|
],
|
|
6338
|
-
"description": "
|
|
6534
|
+
"description": "Total tokens processed — the four buckets added up. Safe to sum because the\nbuckets are disjoint (see AggregateUsage); the equivalent sum over\nper-message fields would double-count the prompt.\n\nBear in mind what this number is: because every turn resends the conversation,\na turn's prompt is counted again in the next turn's. It is billed throughput,\nNOT the count of distinct tokens in the conversation, so it grows\nsuper-linearly with turn count and is expected to dwarf the context size."
|
|
6339
6535
|
},
|
|
6340
6536
|
{
|
|
6341
6537
|
"kind": "function",
|
|
6342
|
-
"name": "
|
|
6538
|
+
"name": "addUsage",
|
|
6343
6539
|
"return": {
|
|
6344
6540
|
"type": {
|
|
6345
|
-
"text": "
|
|
6541
|
+
"text": "AggregateUsage"
|
|
6346
6542
|
}
|
|
6347
6543
|
},
|
|
6348
6544
|
"parameters": [
|
|
6349
6545
|
{
|
|
6350
|
-
"name": "
|
|
6546
|
+
"name": "a",
|
|
6351
6547
|
"type": {
|
|
6352
|
-
"text": "
|
|
6548
|
+
"text": "AggregateUsage"
|
|
6353
6549
|
}
|
|
6354
6550
|
},
|
|
6355
6551
|
{
|
|
6356
|
-
"name": "
|
|
6552
|
+
"name": "b",
|
|
6357
6553
|
"type": {
|
|
6358
|
-
"text": "
|
|
6554
|
+
"text": "AggregateUsage"
|
|
6359
6555
|
}
|
|
6360
6556
|
}
|
|
6361
6557
|
],
|
|
6362
|
-
"description": "
|
|
6558
|
+
"description": "`a + b`, per bucket, as a new object.\n\nUsed to lay a row's banked (pre-transcript) spend over what the live transcript\nproves. Pure rather than in-place because both operands are live state a caller\nmust not mutate."
|
|
6363
6559
|
},
|
|
6364
6560
|
{
|
|
6365
6561
|
"kind": "function",
|
|
6366
|
-
"name": "
|
|
6562
|
+
"name": "sumUsage",
|
|
6367
6563
|
"return": {
|
|
6368
6564
|
"type": {
|
|
6369
|
-
"text": "
|
|
6565
|
+
"text": "AggregateUsage"
|
|
6370
6566
|
}
|
|
6371
6567
|
},
|
|
6372
6568
|
"parameters": [
|
|
6373
6569
|
{
|
|
6374
|
-
"name": "
|
|
6570
|
+
"name": "messages",
|
|
6375
6571
|
"type": {
|
|
6376
|
-
"text": "readonly
|
|
6572
|
+
"text": "readonly ChatMessage[]"
|
|
6377
6573
|
}
|
|
6378
6574
|
}
|
|
6379
6575
|
],
|
|
6380
|
-
"description": "
|
|
6576
|
+
"description": "Sum cost and per-bucket token usage across a message list.\n\nOne walk produces everything a usage display needs, replacing separate cost and\ntoken passes over the same (potentially deep) transcript. Recurses into each\ntool call's `subAgentTrace`, so LLM work a sub-agent did — possibly on another\nprovider at other rates — lands in the total; the driver embeds a whole\nsub-agent conversation in the parent's tool result, so this is the only place\nthat spend is visible.\n\nSplitting the prompt into buckets is the point: `cost` already has the cache\ndiscount applied, but a single token total cannot show that a session was cheap\nbecause most of its prompt was a cache hit. The three input buckets are derived\nfrom the per-message fields, where `inputTokens` is the whole prompt and the\ncache fields break it down — so uncached input is the remainder, never an\naddition.\n\nAlso counts `compaction.rolledUpUsage`: compaction destroys the messages it\nsummarises, and without their banked usage every total re-derived from the\ntranscript would drop by whatever those turns had already spent.\n\nReturns a zeroed total when no message carries usage — providers that report\nnone (e.g. Chrome built-in) are skipped silently rather than guessed at."
|
|
6577
|
+
}
|
|
6578
|
+
],
|
|
6579
|
+
"exports": [
|
|
6580
|
+
{
|
|
6581
|
+
"kind": "js",
|
|
6582
|
+
"name": "emptyUsage",
|
|
6583
|
+
"declaration": {
|
|
6584
|
+
"name": "emptyUsage",
|
|
6585
|
+
"module": "src/utils/sum-usage.ts"
|
|
6586
|
+
}
|
|
6587
|
+
},
|
|
6588
|
+
{
|
|
6589
|
+
"kind": "js",
|
|
6590
|
+
"name": "totalTokens",
|
|
6591
|
+
"declaration": {
|
|
6592
|
+
"name": "totalTokens",
|
|
6593
|
+
"module": "src/utils/sum-usage.ts"
|
|
6594
|
+
}
|
|
6381
6595
|
},
|
|
6596
|
+
{
|
|
6597
|
+
"kind": "js",
|
|
6598
|
+
"name": "addUsage",
|
|
6599
|
+
"declaration": {
|
|
6600
|
+
"name": "addUsage",
|
|
6601
|
+
"module": "src/utils/sum-usage.ts"
|
|
6602
|
+
}
|
|
6603
|
+
},
|
|
6604
|
+
{
|
|
6605
|
+
"kind": "js",
|
|
6606
|
+
"name": "sumUsage",
|
|
6607
|
+
"declaration": {
|
|
6608
|
+
"name": "sumUsage",
|
|
6609
|
+
"module": "src/utils/sum-usage.ts"
|
|
6610
|
+
}
|
|
6611
|
+
}
|
|
6612
|
+
]
|
|
6613
|
+
},
|
|
6614
|
+
{
|
|
6615
|
+
"kind": "javascript-module",
|
|
6616
|
+
"path": "src/utils/tool-fold.ts",
|
|
6617
|
+
"declarations": [
|
|
6382
6618
|
{
|
|
6383
6619
|
"kind": "function",
|
|
6384
|
-
"name": "
|
|
6620
|
+
"name": "createToolFold",
|
|
6385
6621
|
"return": {
|
|
6386
6622
|
"type": {
|
|
6387
|
-
"text": "
|
|
6623
|
+
"text": "ToolFoldResult"
|
|
6388
6624
|
}
|
|
6389
6625
|
},
|
|
6390
6626
|
"parameters": [
|
|
6391
6627
|
{
|
|
6392
|
-
"name": "
|
|
6628
|
+
"name": "config",
|
|
6393
6629
|
"type": {
|
|
6394
|
-
"text": "
|
|
6395
|
-
}
|
|
6396
|
-
},
|
|
6397
|
-
{
|
|
6398
|
-
"name": "transcriptIsAuthoritative",
|
|
6399
|
-
"type": {
|
|
6400
|
-
"text": "boolean"
|
|
6401
|
-
}
|
|
6402
|
-
}
|
|
6403
|
-
],
|
|
6404
|
-
"description": "The spend a project's next row must carry over from before its current transcript.\n\n`transcriptIsAuthoritative` means the open transcript already accounts for this project's\nhistory — true exactly when a session snapshot is restored on load. The two branches are\nnot interchangeable, and picking the wrong one is silently destructive:\n\n- Authoritative: carry the previous row's own `banked` forward. Taking `usage` instead would\n re-add the restored history on every reload, the compounding double-count this replaced.\n- Not authoritative: the whole previous total becomes banked, because nothing in the fresh\n transcript accounts for it. Taking `banked` instead would rewrite the row down to the\n current page-load and drop the project's earlier spend.\n\nNote both branches are idempotent — the result never includes the current transcript — which\nis what lets two assistant instances sharing a session write the same row."
|
|
6405
|
-
},
|
|
6406
|
-
{
|
|
6407
|
-
"kind": "function",
|
|
6408
|
-
"name": "clearCostSessionHistory",
|
|
6409
|
-
"return": {
|
|
6410
|
-
"type": {
|
|
6411
|
-
"text": "void"
|
|
6412
|
-
}
|
|
6413
|
-
},
|
|
6414
|
-
"parameters": [
|
|
6415
|
-
{
|
|
6416
|
-
"name": "scope",
|
|
6417
|
-
"type": {
|
|
6418
|
-
"text": "string"
|
|
6630
|
+
"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}"
|
|
6419
6631
|
}
|
|
6420
6632
|
}
|
|
6421
6633
|
],
|
|
6422
|
-
"description": "
|
|
6634
|
+
"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."
|
|
6423
6635
|
},
|
|
6424
6636
|
{
|
|
6425
6637
|
"kind": "function",
|
|
6426
|
-
"name": "
|
|
6638
|
+
"name": "expandToolTree",
|
|
6427
6639
|
"return": {
|
|
6428
6640
|
"type": {
|
|
6429
|
-
"text": "
|
|
6641
|
+
"text": "ToolTreeNode[]"
|
|
6430
6642
|
}
|
|
6431
6643
|
},
|
|
6432
6644
|
"parameters": [
|
|
6433
6645
|
{
|
|
6434
|
-
"name": "
|
|
6646
|
+
"name": "definitions",
|
|
6435
6647
|
"type": {
|
|
6436
|
-
"text": "
|
|
6648
|
+
"text": "ChatToolDefinition[]"
|
|
6437
6649
|
}
|
|
6438
|
-
}
|
|
6439
|
-
],
|
|
6440
|
-
"description": "Display date for a history row (e.g. \"Jun 14, 2026\")."
|
|
6441
|
-
},
|
|
6442
|
-
{
|
|
6443
|
-
"kind": "function",
|
|
6444
|
-
"name": "isCostSessionRecord",
|
|
6445
|
-
"return": {
|
|
6446
|
-
"type": {
|
|
6447
|
-
"text": "value is CostSessionRecord"
|
|
6448
|
-
}
|
|
6449
|
-
},
|
|
6450
|
-
"parameters": [
|
|
6650
|
+
},
|
|
6451
6651
|
{
|
|
6452
|
-
"name": "
|
|
6652
|
+
"name": "handlers",
|
|
6453
6653
|
"type": {
|
|
6454
|
-
"text": "
|
|
6654
|
+
"text": "ChatToolHandlers"
|
|
6455
6655
|
}
|
|
6456
6656
|
}
|
|
6457
6657
|
],
|
|
6458
|
-
"description": "
|
|
6658
|
+
"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."
|
|
6459
6659
|
}
|
|
6460
6660
|
],
|
|
6461
6661
|
"exports": [
|
|
6462
6662
|
{
|
|
6463
6663
|
"kind": "js",
|
|
6464
|
-
"name": "
|
|
6465
|
-
"declaration": {
|
|
6466
|
-
"name": "costHistoryStorageKey",
|
|
6467
|
-
"module": "src/utils/cost-session-history.ts"
|
|
6468
|
-
}
|
|
6469
|
-
},
|
|
6470
|
-
{
|
|
6471
|
-
"kind": "js",
|
|
6472
|
-
"name": "loadCostSessionHistory",
|
|
6473
|
-
"declaration": {
|
|
6474
|
-
"name": "loadCostSessionHistory",
|
|
6475
|
-
"module": "src/utils/cost-session-history.ts"
|
|
6476
|
-
}
|
|
6477
|
-
},
|
|
6478
|
-
{
|
|
6479
|
-
"kind": "js",
|
|
6480
|
-
"name": "saveCostSessionHistory",
|
|
6481
|
-
"declaration": {
|
|
6482
|
-
"name": "saveCostSessionHistory",
|
|
6483
|
-
"module": "src/utils/cost-session-history.ts"
|
|
6484
|
-
}
|
|
6485
|
-
},
|
|
6486
|
-
{
|
|
6487
|
-
"kind": "js",
|
|
6488
|
-
"name": "upsertRecord",
|
|
6489
|
-
"declaration": {
|
|
6490
|
-
"name": "upsertRecord",
|
|
6491
|
-
"module": "src/utils/cost-session-history.ts"
|
|
6492
|
-
}
|
|
6493
|
-
},
|
|
6494
|
-
{
|
|
6495
|
-
"kind": "js",
|
|
6496
|
-
"name": "sortRecordsByRecency",
|
|
6497
|
-
"declaration": {
|
|
6498
|
-
"name": "sortRecordsByRecency",
|
|
6499
|
-
"module": "src/utils/cost-session-history.ts"
|
|
6500
|
-
}
|
|
6501
|
-
},
|
|
6502
|
-
{
|
|
6503
|
-
"kind": "js",
|
|
6504
|
-
"name": "resolveBankedUsage",
|
|
6505
|
-
"declaration": {
|
|
6506
|
-
"name": "resolveBankedUsage",
|
|
6507
|
-
"module": "src/utils/cost-session-history.ts"
|
|
6508
|
-
}
|
|
6509
|
-
},
|
|
6510
|
-
{
|
|
6511
|
-
"kind": "js",
|
|
6512
|
-
"name": "clearCostSessionHistory",
|
|
6513
|
-
"declaration": {
|
|
6514
|
-
"name": "clearCostSessionHistory",
|
|
6515
|
-
"module": "src/utils/cost-session-history.ts"
|
|
6516
|
-
}
|
|
6517
|
-
},
|
|
6518
|
-
{
|
|
6519
|
-
"kind": "js",
|
|
6520
|
-
"name": "formatCostSessionDate",
|
|
6664
|
+
"name": "createToolFold",
|
|
6521
6665
|
"declaration": {
|
|
6522
|
-
"name": "
|
|
6523
|
-
"module": "src/utils/
|
|
6666
|
+
"name": "createToolFold",
|
|
6667
|
+
"module": "src/utils/tool-fold.ts"
|
|
6524
6668
|
}
|
|
6525
6669
|
},
|
|
6526
6670
|
{
|
|
6527
6671
|
"kind": "js",
|
|
6528
|
-
"name": "
|
|
6672
|
+
"name": "expandToolTree",
|
|
6529
6673
|
"declaration": {
|
|
6530
|
-
"name": "
|
|
6531
|
-
"module": "src/utils/
|
|
6674
|
+
"name": "expandToolTree",
|
|
6675
|
+
"module": "src/utils/tool-fold.ts"
|
|
6532
6676
|
}
|
|
6533
6677
|
}
|
|
6534
6678
|
]
|
|
6535
6679
|
},
|
|
6536
6680
|
{
|
|
6537
6681
|
"kind": "javascript-module",
|
|
6538
|
-
"path": "src/utils/
|
|
6682
|
+
"path": "src/utils/usage-rows.ts",
|
|
6539
6683
|
"declarations": [
|
|
6540
|
-
{
|
|
6541
|
-
"kind": "variable",
|
|
6542
|
-
"name": "COST_SESSION_TITLE_MAX_WORDS",
|
|
6543
|
-
"type": {
|
|
6544
|
-
"text": "number"
|
|
6545
|
-
},
|
|
6546
|
-
"default": "10",
|
|
6547
|
-
"description": "Max words kept from the first user turn when deriving a session title."
|
|
6548
|
-
},
|
|
6549
|
-
{
|
|
6550
|
-
"kind": "variable",
|
|
6551
|
-
"name": "COST_SESSION_TITLE_MAX_CHARS",
|
|
6552
|
-
"type": {
|
|
6553
|
-
"text": "number"
|
|
6554
|
-
},
|
|
6555
|
-
"default": "60",
|
|
6556
|
-
"description": "Hard cap on derived title length (ellipsis included)."
|
|
6557
|
-
},
|
|
6558
|
-
{
|
|
6559
|
-
"kind": "function",
|
|
6560
|
-
"name": "getChatMessageText",
|
|
6561
|
-
"return": {
|
|
6562
|
-
"type": {
|
|
6563
|
-
"text": "string"
|
|
6564
|
-
}
|
|
6565
|
-
},
|
|
6566
|
-
"parameters": [
|
|
6567
|
-
{
|
|
6568
|
-
"name": "content",
|
|
6569
|
-
"type": {
|
|
6570
|
-
"text": "ChatMessage['content']"
|
|
6571
|
-
}
|
|
6572
|
-
}
|
|
6573
|
-
],
|
|
6574
|
-
"description": "Plain text from a chat message `content` field."
|
|
6575
|
-
},
|
|
6576
|
-
{
|
|
6577
|
-
"kind": "function",
|
|
6578
|
-
"name": "truncateCostSessionTitle",
|
|
6579
|
-
"return": {
|
|
6580
|
-
"type": {
|
|
6581
|
-
"text": "string"
|
|
6582
|
-
}
|
|
6583
|
-
},
|
|
6584
|
-
"parameters": [
|
|
6585
|
-
{
|
|
6586
|
-
"name": "text",
|
|
6587
|
-
"type": {
|
|
6588
|
-
"text": "string"
|
|
6589
|
-
}
|
|
6590
|
-
}
|
|
6591
|
-
],
|
|
6592
|
-
"description": "Trim a raw user phrase to a display-friendly session title: first sentence,\nthen word cap, then character cap."
|
|
6593
|
-
},
|
|
6594
6684
|
{
|
|
6595
6685
|
"kind": "function",
|
|
6596
|
-
"name": "
|
|
6686
|
+
"name": "usageRows",
|
|
6597
6687
|
"return": {
|
|
6598
6688
|
"type": {
|
|
6599
|
-
"text": "
|
|
6689
|
+
"text": "UsageRow[]"
|
|
6600
6690
|
}
|
|
6601
6691
|
},
|
|
6602
6692
|
"parameters": [
|
|
@@ -6607,357 +6697,401 @@
|
|
|
6607
6697
|
}
|
|
6608
6698
|
}
|
|
6609
6699
|
],
|
|
6610
|
-
"description": "
|
|
6611
|
-
},
|
|
6612
|
-
{
|
|
6613
|
-
"kind": "function",
|
|
6614
|
-
"name": "resolveCostSessionTitle",
|
|
6615
|
-
"return": {
|
|
6616
|
-
"type": {
|
|
6617
|
-
"text": "string"
|
|
6618
|
-
}
|
|
6619
|
-
},
|
|
6620
|
-
"parameters": [
|
|
6621
|
-
{
|
|
6622
|
-
"name": "input",
|
|
6623
|
-
"type": {
|
|
6624
|
-
"text": "ResolveCostSessionTitleInput"
|
|
6625
|
-
}
|
|
6626
|
-
}
|
|
6627
|
-
],
|
|
6628
|
-
"description": "Resolve the label stored on a finalized cost session record."
|
|
6700
|
+
"description": "Project a transcript into one row per billable unit of spend."
|
|
6629
6701
|
}
|
|
6630
6702
|
],
|
|
6631
6703
|
"exports": [
|
|
6632
6704
|
{
|
|
6633
6705
|
"kind": "js",
|
|
6634
|
-
"name": "
|
|
6635
|
-
"declaration": {
|
|
6636
|
-
"name": "COST_SESSION_TITLE_MAX_WORDS",
|
|
6637
|
-
"module": "src/utils/derive-cost-session-title.ts"
|
|
6638
|
-
}
|
|
6639
|
-
},
|
|
6640
|
-
{
|
|
6641
|
-
"kind": "js",
|
|
6642
|
-
"name": "COST_SESSION_TITLE_MAX_CHARS",
|
|
6643
|
-
"declaration": {
|
|
6644
|
-
"name": "COST_SESSION_TITLE_MAX_CHARS",
|
|
6645
|
-
"module": "src/utils/derive-cost-session-title.ts"
|
|
6646
|
-
}
|
|
6647
|
-
},
|
|
6648
|
-
{
|
|
6649
|
-
"kind": "js",
|
|
6650
|
-
"name": "getChatMessageText",
|
|
6651
|
-
"declaration": {
|
|
6652
|
-
"name": "getChatMessageText",
|
|
6653
|
-
"module": "src/utils/derive-cost-session-title.ts"
|
|
6654
|
-
}
|
|
6655
|
-
},
|
|
6656
|
-
{
|
|
6657
|
-
"kind": "js",
|
|
6658
|
-
"name": "truncateCostSessionTitle",
|
|
6659
|
-
"declaration": {
|
|
6660
|
-
"name": "truncateCostSessionTitle",
|
|
6661
|
-
"module": "src/utils/derive-cost-session-title.ts"
|
|
6662
|
-
}
|
|
6663
|
-
},
|
|
6664
|
-
{
|
|
6665
|
-
"kind": "js",
|
|
6666
|
-
"name": "deriveCostSessionTitleFromMessages",
|
|
6667
|
-
"declaration": {
|
|
6668
|
-
"name": "deriveCostSessionTitleFromMessages",
|
|
6669
|
-
"module": "src/utils/derive-cost-session-title.ts"
|
|
6670
|
-
}
|
|
6671
|
-
},
|
|
6672
|
-
{
|
|
6673
|
-
"kind": "js",
|
|
6674
|
-
"name": "resolveCostSessionTitle",
|
|
6706
|
+
"name": "usageRows",
|
|
6675
6707
|
"declaration": {
|
|
6676
|
-
"name": "
|
|
6677
|
-
"module": "src/utils/
|
|
6708
|
+
"name": "usageRows",
|
|
6709
|
+
"module": "src/utils/usage-rows.ts"
|
|
6678
6710
|
}
|
|
6679
6711
|
}
|
|
6680
6712
|
]
|
|
6681
6713
|
},
|
|
6682
6714
|
{
|
|
6683
6715
|
"kind": "javascript-module",
|
|
6684
|
-
"path": "src/utils/
|
|
6716
|
+
"path": "src/utils/with-timeout.ts",
|
|
6685
6717
|
"declarations": [],
|
|
6686
6718
|
"exports": []
|
|
6687
6719
|
},
|
|
6688
6720
|
{
|
|
6689
6721
|
"kind": "javascript-module",
|
|
6690
|
-
"path": "src/
|
|
6722
|
+
"path": "src/components/activity-halo/activity-halo.ts",
|
|
6691
6723
|
"declarations": [
|
|
6692
6724
|
{
|
|
6693
|
-
"kind": "
|
|
6694
|
-
"
|
|
6695
|
-
"
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
"
|
|
6725
|
+
"kind": "class",
|
|
6726
|
+
"description": "Wrapper component that shows an `<ai-halo-overlay>` when the AI assistant\nis executing one of the declared tool names.",
|
|
6727
|
+
"name": "AiActivityHalo",
|
|
6728
|
+
"members": [
|
|
6729
|
+
{
|
|
6730
|
+
"kind": "field",
|
|
6731
|
+
"name": "tools",
|
|
6732
|
+
"type": {
|
|
6733
|
+
"text": "string"
|
|
6734
|
+
},
|
|
6735
|
+
"default": "''",
|
|
6736
|
+
"description": "Comma-separated list of tool names this element reacts to."
|
|
6737
|
+
},
|
|
6738
|
+
{
|
|
6739
|
+
"kind": "field",
|
|
6740
|
+
"name": "minShowTime",
|
|
6741
|
+
"type": {
|
|
6704
6742
|
"text": "number"
|
|
6705
|
-
}
|
|
6743
|
+
},
|
|
6744
|
+
"default": "600",
|
|
6745
|
+
"description": "Minimum time in ms the halo stays visible after activation."
|
|
6746
|
+
},
|
|
6747
|
+
{
|
|
6748
|
+
"kind": "field",
|
|
6749
|
+
"name": "unsubBus",
|
|
6750
|
+
"type": {
|
|
6751
|
+
"text": "() => void | undefined"
|
|
6752
|
+
},
|
|
6753
|
+
"privacy": "private"
|
|
6754
|
+
},
|
|
6755
|
+
{
|
|
6756
|
+
"kind": "field",
|
|
6757
|
+
"name": "hideTimeout",
|
|
6758
|
+
"type": {
|
|
6759
|
+
"text": "ReturnType<typeof setTimeout> | undefined"
|
|
6760
|
+
},
|
|
6761
|
+
"privacy": "private"
|
|
6762
|
+
},
|
|
6763
|
+
{
|
|
6764
|
+
"kind": "field",
|
|
6765
|
+
"name": "startTime",
|
|
6766
|
+
"type": {
|
|
6767
|
+
"text": "number"
|
|
6768
|
+
},
|
|
6769
|
+
"privacy": "private",
|
|
6770
|
+
"default": "0"
|
|
6771
|
+
},
|
|
6772
|
+
{
|
|
6773
|
+
"kind": "method",
|
|
6774
|
+
"name": "activate",
|
|
6775
|
+
"privacy": "private"
|
|
6776
|
+
},
|
|
6777
|
+
{
|
|
6778
|
+
"kind": "method",
|
|
6779
|
+
"name": "scheduleDeactivate",
|
|
6780
|
+
"privacy": "private"
|
|
6706
6781
|
}
|
|
6707
6782
|
],
|
|
6708
|
-
"
|
|
6709
|
-
},
|
|
6710
|
-
{
|
|
6711
|
-
"kind": "function",
|
|
6712
|
-
"name": "formatUsd",
|
|
6713
|
-
"return": {
|
|
6714
|
-
"type": {
|
|
6715
|
-
"text": "string"
|
|
6716
|
-
}
|
|
6717
|
-
},
|
|
6718
|
-
"parameters": [
|
|
6783
|
+
"attributes": [
|
|
6719
6784
|
{
|
|
6720
|
-
"name": "
|
|
6785
|
+
"name": "tools",
|
|
6786
|
+
"type": {
|
|
6787
|
+
"text": "string"
|
|
6788
|
+
},
|
|
6789
|
+
"default": "''",
|
|
6790
|
+
"description": "Comma-separated list of tool names this element reacts to.",
|
|
6791
|
+
"fieldName": "tools"
|
|
6792
|
+
},
|
|
6793
|
+
{
|
|
6794
|
+
"name": "min-show-time",
|
|
6721
6795
|
"type": {
|
|
6722
6796
|
"text": "number"
|
|
6723
|
-
}
|
|
6797
|
+
},
|
|
6798
|
+
"default": "DEFAULT_MIN_SHOW_TIME",
|
|
6799
|
+
"description": "Minimum time in ms the halo stays visible after activation.",
|
|
6800
|
+
"resolveInitializer": {
|
|
6801
|
+
"module": "src/components/activity-halo/activity-halo.ts"
|
|
6802
|
+
},
|
|
6803
|
+
"fieldName": "minShowTime"
|
|
6724
6804
|
}
|
|
6725
6805
|
],
|
|
6726
|
-
"
|
|
6806
|
+
"superclass": {
|
|
6807
|
+
"name": "GenesisElement",
|
|
6808
|
+
"package": "@genesislcap/web-core"
|
|
6809
|
+
},
|
|
6810
|
+
"tagName": "ai-activity-halo",
|
|
6811
|
+
"customElement": true
|
|
6727
6812
|
}
|
|
6728
6813
|
],
|
|
6729
6814
|
"exports": [
|
|
6730
6815
|
{
|
|
6731
6816
|
"kind": "js",
|
|
6732
|
-
"name": "
|
|
6817
|
+
"name": "AiActivityHalo",
|
|
6733
6818
|
"declaration": {
|
|
6734
|
-
"name": "
|
|
6735
|
-
"module": "src/
|
|
6819
|
+
"name": "AiActivityHalo",
|
|
6820
|
+
"module": "src/components/activity-halo/activity-halo.ts"
|
|
6736
6821
|
}
|
|
6737
6822
|
},
|
|
6738
6823
|
{
|
|
6739
|
-
"kind": "
|
|
6740
|
-
"name": "
|
|
6824
|
+
"kind": "custom-element-definition",
|
|
6825
|
+
"name": "ai-activity-halo",
|
|
6741
6826
|
"declaration": {
|
|
6742
|
-
"name": "
|
|
6743
|
-
"module": "src/
|
|
6827
|
+
"name": "AiActivityHalo",
|
|
6828
|
+
"module": "src/components/activity-halo/activity-halo.ts"
|
|
6744
6829
|
}
|
|
6745
6830
|
}
|
|
6746
6831
|
]
|
|
6747
6832
|
},
|
|
6748
6833
|
{
|
|
6749
6834
|
"kind": "javascript-module",
|
|
6750
|
-
"path": "src/
|
|
6835
|
+
"path": "src/components/agent-picker/agent-picker.constants.ts",
|
|
6751
6836
|
"declarations": [
|
|
6752
6837
|
{
|
|
6753
|
-
"kind": "
|
|
6754
|
-
"name": "
|
|
6755
|
-
"
|
|
6756
|
-
"
|
|
6757
|
-
"text": "ChatMessage[]"
|
|
6758
|
-
}
|
|
6838
|
+
"kind": "variable",
|
|
6839
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
6840
|
+
"type": {
|
|
6841
|
+
"text": "string"
|
|
6759
6842
|
},
|
|
6760
|
-
"
|
|
6843
|
+
"default": "'__auto__'",
|
|
6844
|
+
"description": "Sentinel value used by the segmented control / select to represent \"Auto\"."
|
|
6845
|
+
}
|
|
6846
|
+
],
|
|
6847
|
+
"exports": [
|
|
6848
|
+
{
|
|
6849
|
+
"kind": "js",
|
|
6850
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
6851
|
+
"declaration": {
|
|
6852
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
6853
|
+
"module": "src/components/agent-picker/agent-picker.constants.ts"
|
|
6854
|
+
}
|
|
6855
|
+
}
|
|
6856
|
+
]
|
|
6857
|
+
},
|
|
6858
|
+
{
|
|
6859
|
+
"kind": "javascript-module",
|
|
6860
|
+
"path": "src/components/agent-picker/agent-picker.styles.ts",
|
|
6861
|
+
"declarations": [
|
|
6862
|
+
{
|
|
6863
|
+
"kind": "variable",
|
|
6864
|
+
"name": "styles",
|
|
6865
|
+
"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`"
|
|
6866
|
+
}
|
|
6867
|
+
],
|
|
6868
|
+
"exports": [
|
|
6869
|
+
{
|
|
6870
|
+
"kind": "js",
|
|
6871
|
+
"name": "styles",
|
|
6872
|
+
"declaration": {
|
|
6873
|
+
"name": "styles",
|
|
6874
|
+
"module": "src/components/agent-picker/agent-picker.styles.ts"
|
|
6875
|
+
}
|
|
6876
|
+
}
|
|
6877
|
+
]
|
|
6878
|
+
},
|
|
6879
|
+
{
|
|
6880
|
+
"kind": "javascript-module",
|
|
6881
|
+
"path": "src/components/agent-picker/agent-picker.template.ts",
|
|
6882
|
+
"declarations": [],
|
|
6883
|
+
"exports": []
|
|
6884
|
+
},
|
|
6885
|
+
{
|
|
6886
|
+
"kind": "javascript-module",
|
|
6887
|
+
"path": "src/components/agent-picker/agent-picker.ts",
|
|
6888
|
+
"declarations": [
|
|
6889
|
+
{
|
|
6890
|
+
"kind": "class",
|
|
6891
|
+
"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.",
|
|
6892
|
+
"name": "AgentPicker",
|
|
6893
|
+
"members": [
|
|
6761
6894
|
{
|
|
6762
|
-
"
|
|
6895
|
+
"kind": "field",
|
|
6896
|
+
"name": "designSystemPrefix",
|
|
6763
6897
|
"type": {
|
|
6764
|
-
"text": "
|
|
6765
|
-
}
|
|
6898
|
+
"text": "string"
|
|
6899
|
+
},
|
|
6900
|
+
"default": "'rapid'",
|
|
6901
|
+
"description": "Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`."
|
|
6766
6902
|
},
|
|
6767
6903
|
{
|
|
6768
|
-
"
|
|
6904
|
+
"kind": "field",
|
|
6905
|
+
"name": "mode",
|
|
6769
6906
|
"type": {
|
|
6770
|
-
"text": "
|
|
6771
|
-
}
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
},
|
|
6776
|
-
{
|
|
6777
|
-
"kind": "function",
|
|
6778
|
-
"name": "applyHistoryCap",
|
|
6779
|
-
"return": {
|
|
6780
|
-
"type": {
|
|
6781
|
-
"text": "ChatMessage[]"
|
|
6782
|
-
}
|
|
6783
|
-
},
|
|
6784
|
-
"parameters": [
|
|
6907
|
+
"text": "AgentPickerMode"
|
|
6908
|
+
},
|
|
6909
|
+
"default": "'disabled'",
|
|
6910
|
+
"description": "Picker variant, sourced from the assistant's `chatConfig.agentPicker`."
|
|
6911
|
+
},
|
|
6785
6912
|
{
|
|
6786
|
-
"
|
|
6913
|
+
"kind": "field",
|
|
6914
|
+
"name": "agents",
|
|
6787
6915
|
"type": {
|
|
6788
|
-
"text": "
|
|
6789
|
-
}
|
|
6916
|
+
"text": "AgentConfig[]"
|
|
6917
|
+
},
|
|
6918
|
+
"default": "[]",
|
|
6919
|
+
"description": "Top-level agents passed to the assistant."
|
|
6790
6920
|
},
|
|
6791
6921
|
{
|
|
6792
|
-
"
|
|
6922
|
+
"kind": "field",
|
|
6923
|
+
"name": "pinnedAgentName",
|
|
6793
6924
|
"type": {
|
|
6794
|
-
"text": "
|
|
6795
|
-
}
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
},
|
|
6800
|
-
{
|
|
6801
|
-
"kind": "variable",
|
|
6802
|
-
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
6803
|
-
"type": {
|
|
6804
|
-
"text": "number"
|
|
6805
|
-
},
|
|
6806
|
-
"default": "4",
|
|
6807
|
-
"description": "Recent messages kept verbatim when compacting; everything earlier is summarized."
|
|
6808
|
-
},
|
|
6809
|
-
{
|
|
6810
|
-
"kind": "variable",
|
|
6811
|
-
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
6812
|
-
"type": {
|
|
6813
|
-
"text": "number"
|
|
6814
|
-
},
|
|
6815
|
-
"default": "4",
|
|
6816
|
-
"description": "Don't bother compacting unless at least this many messages would be summarized."
|
|
6817
|
-
},
|
|
6818
|
-
{
|
|
6819
|
-
"kind": "function",
|
|
6820
|
-
"name": "findCompactionCut",
|
|
6821
|
-
"return": {
|
|
6822
|
-
"type": {
|
|
6823
|
-
"text": "number | null"
|
|
6824
|
-
}
|
|
6825
|
-
},
|
|
6826
|
-
"parameters": [
|
|
6925
|
+
"text": "string | null"
|
|
6926
|
+
},
|
|
6927
|
+
"default": "null",
|
|
6928
|
+
"description": "Currently pinned agent name, or `null` for Auto."
|
|
6929
|
+
},
|
|
6827
6930
|
{
|
|
6828
|
-
"
|
|
6829
|
-
"
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
},
|
|
6836
|
-
{
|
|
6837
|
-
"kind": "function",
|
|
6838
|
-
"name": "buildCompactionSummaryPrompt",
|
|
6839
|
-
"return": {
|
|
6840
|
-
"type": {
|
|
6841
|
-
"text": "{\n systemPrompt: string;\n userMessage: string;\n}"
|
|
6842
|
-
}
|
|
6843
|
-
},
|
|
6844
|
-
"parameters": [
|
|
6931
|
+
"kind": "field",
|
|
6932
|
+
"name": "resizeObserver",
|
|
6933
|
+
"type": {
|
|
6934
|
+
"text": "ResizeObserver | undefined"
|
|
6935
|
+
},
|
|
6936
|
+
"privacy": "private"
|
|
6937
|
+
},
|
|
6845
6938
|
{
|
|
6846
|
-
"
|
|
6939
|
+
"kind": "field",
|
|
6940
|
+
"name": "selectableAgents",
|
|
6847
6941
|
"type": {
|
|
6848
|
-
"text": "
|
|
6849
|
-
}
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
},
|
|
6854
|
-
{
|
|
6855
|
-
"kind": "function",
|
|
6856
|
-
"name": "normalizeForProvider",
|
|
6857
|
-
"return": {
|
|
6858
|
-
"type": {
|
|
6859
|
-
"text": "ChatMessage[]"
|
|
6860
|
-
}
|
|
6861
|
-
},
|
|
6862
|
-
"parameters": [
|
|
6942
|
+
"text": "AgentConfig[]"
|
|
6943
|
+
},
|
|
6944
|
+
"description": "Top-level agents that opted in to manual selection.",
|
|
6945
|
+
"readonly": true
|
|
6946
|
+
},
|
|
6863
6947
|
{
|
|
6864
|
-
"
|
|
6948
|
+
"kind": "field",
|
|
6949
|
+
"name": "visible",
|
|
6865
6950
|
"type": {
|
|
6866
|
-
"text": "
|
|
6951
|
+
"text": "boolean"
|
|
6952
|
+
},
|
|
6953
|
+
"description": "Whether the picker should render at all.",
|
|
6954
|
+
"readonly": true
|
|
6955
|
+
},
|
|
6956
|
+
{
|
|
6957
|
+
"kind": "field",
|
|
6958
|
+
"name": "effectiveMode",
|
|
6959
|
+
"type": {
|
|
6960
|
+
"text": "'select' | 'segmented-control'"
|
|
6961
|
+
},
|
|
6962
|
+
"description": "The variant actually rendered: `'select'` if user-configured or if the\nsegmented row currently overflows; `'segmented-control'` otherwise.",
|
|
6963
|
+
"readonly": true
|
|
6964
|
+
},
|
|
6965
|
+
{
|
|
6966
|
+
"kind": "method",
|
|
6967
|
+
"name": "agentsChanged",
|
|
6968
|
+
"return": {
|
|
6969
|
+
"type": {
|
|
6970
|
+
"text": "void"
|
|
6971
|
+
}
|
|
6972
|
+
},
|
|
6973
|
+
"description": "Re-measure when agents change — newly added selectable agents may push the\nsegmented row past the container's width."
|
|
6974
|
+
},
|
|
6975
|
+
{
|
|
6976
|
+
"kind": "method",
|
|
6977
|
+
"name": "modeChanged",
|
|
6978
|
+
"return": {
|
|
6979
|
+
"type": {
|
|
6980
|
+
"text": "void"
|
|
6981
|
+
}
|
|
6867
6982
|
}
|
|
6983
|
+
},
|
|
6984
|
+
{
|
|
6985
|
+
"kind": "method",
|
|
6986
|
+
"name": "measureOverflow",
|
|
6987
|
+
"privacy": "private",
|
|
6988
|
+
"return": {
|
|
6989
|
+
"type": {
|
|
6990
|
+
"text": "void"
|
|
6991
|
+
}
|
|
6992
|
+
},
|
|
6993
|
+
"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'`)."
|
|
6994
|
+
},
|
|
6995
|
+
{
|
|
6996
|
+
"kind": "method",
|
|
6997
|
+
"name": "selectAgent",
|
|
6998
|
+
"return": {
|
|
6999
|
+
"type": {
|
|
7000
|
+
"text": "void"
|
|
7001
|
+
}
|
|
7002
|
+
},
|
|
7003
|
+
"parameters": [
|
|
7004
|
+
{
|
|
7005
|
+
"name": "name",
|
|
7006
|
+
"type": {
|
|
7007
|
+
"text": "string | null"
|
|
7008
|
+
}
|
|
7009
|
+
}
|
|
7010
|
+
]
|
|
7011
|
+
},
|
|
7012
|
+
{
|
|
7013
|
+
"kind": "method",
|
|
7014
|
+
"name": "selectByValue",
|
|
7015
|
+
"return": {
|
|
7016
|
+
"type": {
|
|
7017
|
+
"text": "void"
|
|
7018
|
+
}
|
|
7019
|
+
},
|
|
7020
|
+
"parameters": [
|
|
7021
|
+
{
|
|
7022
|
+
"name": "value",
|
|
7023
|
+
"type": {
|
|
7024
|
+
"text": "string"
|
|
7025
|
+
}
|
|
7026
|
+
}
|
|
7027
|
+
],
|
|
7028
|
+
"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`."
|
|
7029
|
+
},
|
|
7030
|
+
{
|
|
7031
|
+
"kind": "field",
|
|
7032
|
+
"name": "currentValue",
|
|
7033
|
+
"type": {
|
|
7034
|
+
"text": "string"
|
|
7035
|
+
},
|
|
7036
|
+
"description": "Current pinned agent name as a value the segmented-control / select can bind to.",
|
|
7037
|
+
"readonly": true
|
|
6868
7038
|
}
|
|
6869
7039
|
],
|
|
6870
|
-
"
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
"name": "compactionDividerLabel",
|
|
6875
|
-
"return": {
|
|
6876
|
-
"type": {
|
|
6877
|
-
"text": "string"
|
|
7040
|
+
"events": [
|
|
7041
|
+
{
|
|
7042
|
+
"description": "Fired when the user changes selection with the agent name or `null` for Auto. detail: `string | null`",
|
|
7043
|
+
"name": "agent-pinned"
|
|
6878
7044
|
}
|
|
6879
|
-
|
|
6880
|
-
"
|
|
7045
|
+
],
|
|
7046
|
+
"attributes": [
|
|
6881
7047
|
{
|
|
6882
|
-
"name": "
|
|
7048
|
+
"name": "design-system-prefix",
|
|
6883
7049
|
"type": {
|
|
6884
|
-
"text": "
|
|
6885
|
-
}
|
|
7050
|
+
"text": "string"
|
|
7051
|
+
},
|
|
7052
|
+
"default": "'rapid'",
|
|
7053
|
+
"description": "Design-system tag prefix, e.g. `'rapid'` for `rapid-segmented-control`.",
|
|
7054
|
+
"fieldName": "designSystemPrefix"
|
|
6886
7055
|
}
|
|
6887
7056
|
],
|
|
6888
|
-
"
|
|
7057
|
+
"superclass": {
|
|
7058
|
+
"name": "GenesisElement",
|
|
7059
|
+
"package": "@genesislcap/web-core"
|
|
7060
|
+
},
|
|
7061
|
+
"tagName": "foundation-ai-agent-picker",
|
|
7062
|
+
"customElement": true
|
|
6889
7063
|
}
|
|
6890
7064
|
],
|
|
6891
7065
|
"exports": [
|
|
6892
7066
|
{
|
|
6893
7067
|
"kind": "js",
|
|
6894
|
-
"name": "
|
|
6895
|
-
"declaration": {
|
|
6896
|
-
"name": "transformHistoryForAgent",
|
|
6897
|
-
"module": "src/utils/history-transform.ts"
|
|
6898
|
-
}
|
|
6899
|
-
},
|
|
6900
|
-
{
|
|
6901
|
-
"kind": "js",
|
|
6902
|
-
"name": "applyHistoryCap",
|
|
6903
|
-
"declaration": {
|
|
6904
|
-
"name": "applyHistoryCap",
|
|
6905
|
-
"module": "src/utils/history-transform.ts"
|
|
6906
|
-
}
|
|
6907
|
-
},
|
|
6908
|
-
{
|
|
6909
|
-
"kind": "js",
|
|
6910
|
-
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
6911
|
-
"declaration": {
|
|
6912
|
-
"name": "COMPACT_KEEP_RECENT_MESSAGES",
|
|
6913
|
-
"module": "src/utils/history-transform.ts"
|
|
6914
|
-
}
|
|
6915
|
-
},
|
|
6916
|
-
{
|
|
6917
|
-
"kind": "js",
|
|
6918
|
-
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
6919
|
-
"declaration": {
|
|
6920
|
-
"name": "COMPACT_MIN_MESSAGES_TO_COMPACT",
|
|
6921
|
-
"module": "src/utils/history-transform.ts"
|
|
6922
|
-
}
|
|
6923
|
-
},
|
|
6924
|
-
{
|
|
6925
|
-
"kind": "js",
|
|
6926
|
-
"name": "findCompactionCut",
|
|
6927
|
-
"declaration": {
|
|
6928
|
-
"name": "findCompactionCut",
|
|
6929
|
-
"module": "src/utils/history-transform.ts"
|
|
6930
|
-
}
|
|
6931
|
-
},
|
|
6932
|
-
{
|
|
6933
|
-
"kind": "js",
|
|
6934
|
-
"name": "buildCompactionSummaryPrompt",
|
|
7068
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
6935
7069
|
"declaration": {
|
|
6936
|
-
"name": "
|
|
6937
|
-
"module": "src/
|
|
7070
|
+
"name": "AGENT_PICKER_AUTO_VALUE",
|
|
7071
|
+
"module": "src/components/agent-picker/agent-picker.ts"
|
|
6938
7072
|
}
|
|
6939
7073
|
},
|
|
6940
7074
|
{
|
|
6941
7075
|
"kind": "js",
|
|
6942
|
-
"name": "
|
|
7076
|
+
"name": "AgentPicker",
|
|
6943
7077
|
"declaration": {
|
|
6944
|
-
"name": "
|
|
6945
|
-
"module": "src/
|
|
7078
|
+
"name": "AgentPicker",
|
|
7079
|
+
"module": "src/components/agent-picker/agent-picker.ts"
|
|
6946
7080
|
}
|
|
6947
7081
|
},
|
|
6948
7082
|
{
|
|
6949
|
-
"kind": "
|
|
6950
|
-
"name": "
|
|
7083
|
+
"kind": "custom-element-definition",
|
|
7084
|
+
"name": "foundation-ai-agent-picker",
|
|
6951
7085
|
"declaration": {
|
|
6952
|
-
"name": "
|
|
6953
|
-
"module": "src/
|
|
7086
|
+
"name": "AgentPicker",
|
|
7087
|
+
"module": "src/components/agent-picker/agent-picker.ts"
|
|
6954
7088
|
}
|
|
6955
7089
|
}
|
|
6956
7090
|
]
|
|
6957
7091
|
},
|
|
6958
7092
|
{
|
|
6959
7093
|
"kind": "javascript-module",
|
|
6960
|
-
"path": "src/
|
|
7094
|
+
"path": "src/components/agent-picker/index.ts",
|
|
6961
7095
|
"declarations": [],
|
|
6962
7096
|
"exports": [
|
|
6963
7097
|
{
|
|
@@ -6965,303 +7099,499 @@
|
|
|
6965
7099
|
"name": "*",
|
|
6966
7100
|
"declaration": {
|
|
6967
7101
|
"name": "*",
|
|
6968
|
-
"package": "./
|
|
6969
|
-
}
|
|
6970
|
-
},
|
|
6971
|
-
{
|
|
6972
|
-
"kind": "js",
|
|
6973
|
-
"name": "*",
|
|
6974
|
-
"declaration": {
|
|
6975
|
-
"name": "*",
|
|
6976
|
-
"package": "./logger"
|
|
6977
|
-
}
|
|
6978
|
-
},
|
|
6979
|
-
{
|
|
6980
|
-
"kind": "js",
|
|
6981
|
-
"name": "*",
|
|
6982
|
-
"declaration": {
|
|
6983
|
-
"name": "*",
|
|
6984
|
-
"package": "./tool-fold"
|
|
7102
|
+
"package": "./agent-picker"
|
|
6985
7103
|
}
|
|
6986
7104
|
}
|
|
6987
7105
|
]
|
|
6988
7106
|
},
|
|
6989
7107
|
{
|
|
6990
7108
|
"kind": "javascript-module",
|
|
6991
|
-
"path": "src/
|
|
6992
|
-
"declarations": [
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
"
|
|
6999
|
-
|
|
7109
|
+
"path": "src/components/ai-driver/ai-driver.ts",
|
|
7110
|
+
"declarations": [],
|
|
7111
|
+
"exports": []
|
|
7112
|
+
},
|
|
7113
|
+
{
|
|
7114
|
+
"kind": "javascript-module",
|
|
7115
|
+
"path": "src/components/ai-driver/index.ts",
|
|
7116
|
+
"declarations": [],
|
|
7117
|
+
"exports": [
|
|
7118
|
+
{
|
|
7000
7119
|
"kind": "js",
|
|
7001
|
-
"name": "
|
|
7120
|
+
"name": "AiDriver",
|
|
7002
7121
|
"declaration": {
|
|
7003
|
-
"name": "
|
|
7004
|
-
"module": "
|
|
7122
|
+
"name": "AiDriver",
|
|
7123
|
+
"module": "./ai-driver"
|
|
7005
7124
|
}
|
|
7006
7125
|
}
|
|
7007
7126
|
]
|
|
7008
7127
|
},
|
|
7009
7128
|
{
|
|
7010
7129
|
"kind": "javascript-module",
|
|
7011
|
-
"path": "src/
|
|
7130
|
+
"path": "src/components/chat-bubble/chat-bubble.styles.ts",
|
|
7131
|
+
"declarations": [
|
|
7132
|
+
{
|
|
7133
|
+
"kind": "variable",
|
|
7134
|
+
"name": "styles",
|
|
7135
|
+
"default": "css`\n :host {\n position: fixed;\n inset: 0;\n pointer-events: none;\n z-index: 9999;\n overflow: visible;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .bubble {\n position: absolute;\n width: 62px;\n height: 62px;\n border-radius: 50%;\n cursor: grab;\n pointer-events: all;\n overflow: visible;\n display: flex;\n align-items: center;\n justify-content: center;\n user-select: none;\n transition:\n transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),\n box-shadow 0.25s ease;\n background: linear-gradient(135deg, #0e1628 0%, #192340 100%);\n box-shadow: 0 4px 20px rgb(0 0 0 / 45%);\n border: 2px solid rgb(255 255 255 / 15%);\n color: white;\n }\n\n .bubble img {\n width: 62px;\n height: 62px;\n border-radius: 50%;\n object-fit: cover;\n pointer-events: none;\n box-shadow: 0 4px 20px rgb(0 0 0 / 45%);\n border: 2px solid rgb(255 255 255 / 15%);\n }\n\n .bubble svg {\n pointer-events: none;\n }\n\n .bubble:hover,\n .bubble.hovered {\n transform: scale(1.18);\n }\n\n .bubble:hover img,\n .bubble.hovered img {\n box-shadow:\n 0 6px 32px rgb(0 100 255 / 55%),\n 0 0 0 3px rgb(0 120 255 / 35%);\n }\n\n .bubble:active {\n cursor: grabbing;\n }\n\n .tooltip {\n position: absolute;\n bottom: calc(100% + 10px);\n background: linear-gradient(135deg, #0078ff 0%, #0050d0 100%);\n color: #fff;\n font-size: 0.78em;\n font-weight: 600;\n letter-spacing: 0.03em;\n white-space: nowrap;\n padding: 5px 10px;\n border-radius: 8px;\n box-shadow: 0 4px 14px rgb(0 120 255 / 45%);\n pointer-events: none;\n opacity: 0%;\n translate: 0 4px;\n transition:\n opacity 0.18s ease,\n translate 0.18s ease;\n }\n\n .tooltip::after {\n content: '';\n position: absolute;\n top: 100%;\n left: var(--arrow-left, 50%);\n transform: translateX(-50%);\n border: 5px solid transparent;\n border-top-color: #0050d0;\n }\n\n .bubble:hover .tooltip,\n .bubble.hovered .tooltip {\n opacity: 100%;\n translate: 0 0;\n }\n\n .pulse-ring {\n position: absolute;\n width: 62px;\n height: 62px;\n border-radius: 50%;\n border: 2px solid rgb(0 120 255 / 50%);\n animation: pulse 2.5s ease-out infinite;\n pointer-events: none;\n }\n\n @keyframes pulse {\n 0% {\n transform: scale(1);\n opacity: 70%;\n }\n\n 70% {\n transform: scale(1.5);\n opacity: 0%;\n }\n\n 100% {\n transform: scale(1.5);\n opacity: 0%;\n }\n }\n\n .dialog {\n position: absolute;\n box-sizing: border-box;\n width: 400px;\n height: 520px;\n min-width: 300px;\n min-height: 300px;\n max-width: 50vw;\n max-height: calc(100vh - 40px);\n background: var(--neutral-layer-1);\n border-radius: 14px;\n box-shadow:\n 0 12px 50px rgb(0 0 0 / 55%),\n 0 0 0 1px rgb(255 255 255 / 6%);\n pointer-events: all;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n resize: both;\n border: 1px solid var(--neutral-stroke-rest);\n animation: dialog-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);\n }\n\n @keyframes dialog-in {\n from {\n opacity: 0%;\n transform: scale(0.85) translateY(12px);\n }\n\n to {\n opacity: 100%;\n transform: scale(1) translateY(0);\n }\n }\n\n @keyframes dialog-out {\n from {\n opacity: 100%;\n transform: scale(1) translateY(0);\n }\n\n to {\n opacity: 0%;\n transform: scale(0.85) translateY(12px);\n }\n }\n\n .dialog.closing {\n animation: dialog-out 0.2s cubic-bezier(0.4, 0, 0.6, 1) forwards;\n }\n\n .dialog-content {\n flex: 1;\n overflow: hidden;\n display: flex;\n min-height: 0;\n }\n\n .dialog-content ::slotted(*) {\n display: flex;\n flex: 1;\n width: 100%;\n min-height: 0;\n }\n`"
|
|
7136
|
+
}
|
|
7137
|
+
],
|
|
7138
|
+
"exports": [
|
|
7139
|
+
{
|
|
7140
|
+
"kind": "js",
|
|
7141
|
+
"name": "styles",
|
|
7142
|
+
"declaration": {
|
|
7143
|
+
"name": "styles",
|
|
7144
|
+
"module": "src/components/chat-bubble/chat-bubble.styles.ts"
|
|
7145
|
+
}
|
|
7146
|
+
}
|
|
7147
|
+
]
|
|
7148
|
+
},
|
|
7149
|
+
{
|
|
7150
|
+
"kind": "javascript-module",
|
|
7151
|
+
"path": "src/components/chat-bubble/chat-bubble.template.ts",
|
|
7012
7152
|
"declarations": [
|
|
7013
7153
|
{
|
|
7014
7154
|
"kind": "function",
|
|
7015
|
-
"name": "
|
|
7155
|
+
"name": "AiChatBubbleTemplate",
|
|
7016
7156
|
"return": {
|
|
7017
7157
|
"type": {
|
|
7018
|
-
"text": "
|
|
7158
|
+
"text": "ViewTemplate<AiChatBubble>"
|
|
7019
7159
|
}
|
|
7020
|
-
}
|
|
7021
|
-
|
|
7160
|
+
}
|
|
7161
|
+
}
|
|
7162
|
+
],
|
|
7163
|
+
"exports": [
|
|
7164
|
+
{
|
|
7165
|
+
"kind": "js",
|
|
7166
|
+
"name": "AiChatBubbleTemplate",
|
|
7167
|
+
"declaration": {
|
|
7168
|
+
"name": "AiChatBubbleTemplate",
|
|
7169
|
+
"module": "src/components/chat-bubble/chat-bubble.template.ts"
|
|
7170
|
+
}
|
|
7171
|
+
}
|
|
7172
|
+
]
|
|
7173
|
+
},
|
|
7174
|
+
{
|
|
7175
|
+
"kind": "javascript-module",
|
|
7176
|
+
"path": "src/components/chat-bubble/chat-bubble.ts",
|
|
7177
|
+
"declarations": [
|
|
7178
|
+
{
|
|
7179
|
+
"kind": "class",
|
|
7180
|
+
"description": "Floating chat bubble component that provides a draggable orb and dialog panel\nfor embedding an AI assistant without a full-page layout.",
|
|
7181
|
+
"name": "AiChatBubble",
|
|
7182
|
+
"members": [
|
|
7183
|
+
{
|
|
7184
|
+
"kind": "field",
|
|
7185
|
+
"name": "title",
|
|
7186
|
+
"type": {
|
|
7187
|
+
"text": "string"
|
|
7188
|
+
},
|
|
7189
|
+
"default": "'AI Assistant'"
|
|
7190
|
+
},
|
|
7191
|
+
{
|
|
7192
|
+
"kind": "field",
|
|
7193
|
+
"name": "imageSrc",
|
|
7194
|
+
"type": {
|
|
7195
|
+
"text": "string | undefined"
|
|
7196
|
+
}
|
|
7197
|
+
},
|
|
7198
|
+
{
|
|
7199
|
+
"kind": "field",
|
|
7200
|
+
"name": "designSystemPrefix",
|
|
7201
|
+
"type": {
|
|
7202
|
+
"text": "string"
|
|
7203
|
+
},
|
|
7204
|
+
"default": "'rapid'"
|
|
7205
|
+
},
|
|
7206
|
+
{
|
|
7207
|
+
"kind": "field",
|
|
7208
|
+
"name": "bubbleLeft",
|
|
7209
|
+
"type": {
|
|
7210
|
+
"text": "number"
|
|
7211
|
+
},
|
|
7212
|
+
"default": "0",
|
|
7213
|
+
"description": "Current left position of the bubble orb (px from viewport left). @internal"
|
|
7214
|
+
},
|
|
7215
|
+
{
|
|
7216
|
+
"kind": "field",
|
|
7217
|
+
"name": "bubbleTop",
|
|
7218
|
+
"type": {
|
|
7219
|
+
"text": "number"
|
|
7220
|
+
},
|
|
7221
|
+
"default": "0",
|
|
7222
|
+
"description": "Current top position of the bubble orb (px from viewport top). @internal"
|
|
7223
|
+
},
|
|
7224
|
+
{
|
|
7225
|
+
"kind": "field",
|
|
7226
|
+
"name": "dialogLeft",
|
|
7227
|
+
"type": {
|
|
7228
|
+
"text": "number"
|
|
7229
|
+
},
|
|
7230
|
+
"default": "0",
|
|
7231
|
+
"description": "Current left position of the dialog panel (px from viewport left). @internal"
|
|
7232
|
+
},
|
|
7233
|
+
{
|
|
7234
|
+
"kind": "field",
|
|
7235
|
+
"name": "dialogTop",
|
|
7236
|
+
"type": {
|
|
7237
|
+
"text": "number"
|
|
7238
|
+
},
|
|
7239
|
+
"default": "0",
|
|
7240
|
+
"description": "Current top position of the dialog panel (px from viewport top). @internal"
|
|
7241
|
+
},
|
|
7242
|
+
{
|
|
7243
|
+
"kind": "field",
|
|
7244
|
+
"name": "dialogWidth",
|
|
7245
|
+
"type": {
|
|
7246
|
+
"text": "number"
|
|
7247
|
+
},
|
|
7248
|
+
"default": "400",
|
|
7249
|
+
"description": "Current rendered width of the dialog panel (px). @internal"
|
|
7250
|
+
},
|
|
7251
|
+
{
|
|
7252
|
+
"kind": "field",
|
|
7253
|
+
"name": "dialogHeight",
|
|
7254
|
+
"type": {
|
|
7255
|
+
"text": "number"
|
|
7256
|
+
},
|
|
7257
|
+
"default": "520",
|
|
7258
|
+
"description": "Current rendered height of the dialog panel (px). @internal"
|
|
7259
|
+
},
|
|
7260
|
+
{
|
|
7261
|
+
"kind": "field",
|
|
7262
|
+
"name": "dialogOpen",
|
|
7263
|
+
"type": {
|
|
7264
|
+
"text": "boolean"
|
|
7265
|
+
},
|
|
7266
|
+
"default": "false",
|
|
7267
|
+
"description": "Whether the dialog panel is currently open. @internal"
|
|
7268
|
+
},
|
|
7269
|
+
{
|
|
7270
|
+
"kind": "field",
|
|
7271
|
+
"name": "hovered",
|
|
7272
|
+
"type": {
|
|
7273
|
+
"text": "boolean"
|
|
7274
|
+
},
|
|
7275
|
+
"default": "false",
|
|
7276
|
+
"description": "Whether the bubble orb is currently hovered. @internal"
|
|
7277
|
+
},
|
|
7278
|
+
{
|
|
7279
|
+
"kind": "field",
|
|
7280
|
+
"name": "unsubBus",
|
|
7281
|
+
"type": {
|
|
7282
|
+
"text": "() => void | undefined"
|
|
7283
|
+
},
|
|
7284
|
+
"privacy": "private"
|
|
7285
|
+
},
|
|
7286
|
+
{
|
|
7287
|
+
"kind": "field",
|
|
7288
|
+
"name": "injectedCloseBtn",
|
|
7289
|
+
"type": {
|
|
7290
|
+
"text": "Element | undefined"
|
|
7291
|
+
},
|
|
7292
|
+
"privacy": "private"
|
|
7293
|
+
},
|
|
7294
|
+
{
|
|
7295
|
+
"kind": "field",
|
|
7296
|
+
"name": "resizeObserver",
|
|
7297
|
+
"type": {
|
|
7298
|
+
"text": "ResizeObserver | undefined"
|
|
7299
|
+
},
|
|
7300
|
+
"privacy": "private"
|
|
7301
|
+
},
|
|
7302
|
+
{
|
|
7303
|
+
"kind": "field",
|
|
7304
|
+
"name": "dragging",
|
|
7305
|
+
"type": {
|
|
7306
|
+
"text": "boolean"
|
|
7307
|
+
},
|
|
7308
|
+
"privacy": "private",
|
|
7309
|
+
"default": "false"
|
|
7310
|
+
},
|
|
7311
|
+
{
|
|
7312
|
+
"kind": "field",
|
|
7313
|
+
"name": "dragTarget",
|
|
7314
|
+
"type": {
|
|
7315
|
+
"text": "'bubble' | 'dialog' | null"
|
|
7316
|
+
},
|
|
7317
|
+
"privacy": "private",
|
|
7318
|
+
"default": "null"
|
|
7319
|
+
},
|
|
7320
|
+
{
|
|
7321
|
+
"kind": "field",
|
|
7322
|
+
"name": "startMouseX",
|
|
7323
|
+
"type": {
|
|
7324
|
+
"text": "number"
|
|
7325
|
+
},
|
|
7326
|
+
"privacy": "private",
|
|
7327
|
+
"default": "0"
|
|
7328
|
+
},
|
|
7329
|
+
{
|
|
7330
|
+
"kind": "field",
|
|
7331
|
+
"name": "startMouseY",
|
|
7332
|
+
"type": {
|
|
7333
|
+
"text": "number"
|
|
7334
|
+
},
|
|
7335
|
+
"privacy": "private",
|
|
7336
|
+
"default": "0"
|
|
7337
|
+
},
|
|
7338
|
+
{
|
|
7339
|
+
"kind": "field",
|
|
7340
|
+
"name": "startElemLeft",
|
|
7341
|
+
"type": {
|
|
7342
|
+
"text": "number"
|
|
7343
|
+
},
|
|
7344
|
+
"privacy": "private",
|
|
7345
|
+
"default": "0"
|
|
7346
|
+
},
|
|
7347
|
+
{
|
|
7348
|
+
"kind": "field",
|
|
7349
|
+
"name": "startElemTop",
|
|
7350
|
+
"type": {
|
|
7351
|
+
"text": "number"
|
|
7352
|
+
},
|
|
7353
|
+
"privacy": "private",
|
|
7354
|
+
"default": "0"
|
|
7355
|
+
},
|
|
7356
|
+
{
|
|
7357
|
+
"kind": "field",
|
|
7358
|
+
"name": "hasDragged",
|
|
7359
|
+
"type": {
|
|
7360
|
+
"text": "boolean"
|
|
7361
|
+
},
|
|
7362
|
+
"privacy": "private",
|
|
7363
|
+
"default": "false"
|
|
7364
|
+
},
|
|
7365
|
+
{
|
|
7366
|
+
"kind": "field",
|
|
7367
|
+
"name": "latestMouseX",
|
|
7368
|
+
"type": {
|
|
7369
|
+
"text": "number"
|
|
7370
|
+
},
|
|
7371
|
+
"privacy": "private",
|
|
7372
|
+
"default": "0"
|
|
7373
|
+
},
|
|
7374
|
+
{
|
|
7375
|
+
"kind": "field",
|
|
7376
|
+
"name": "latestMouseY",
|
|
7377
|
+
"type": {
|
|
7378
|
+
"text": "number"
|
|
7379
|
+
},
|
|
7380
|
+
"privacy": "private",
|
|
7381
|
+
"default": "0"
|
|
7382
|
+
},
|
|
7383
|
+
{
|
|
7384
|
+
"kind": "field",
|
|
7385
|
+
"name": "rafHandle",
|
|
7386
|
+
"type": {
|
|
7387
|
+
"text": "number | undefined"
|
|
7388
|
+
},
|
|
7389
|
+
"privacy": "private"
|
|
7390
|
+
},
|
|
7391
|
+
{
|
|
7392
|
+
"kind": "field",
|
|
7393
|
+
"name": "closeAbort",
|
|
7394
|
+
"type": {
|
|
7395
|
+
"text": "AbortController | undefined"
|
|
7396
|
+
},
|
|
7397
|
+
"privacy": "private"
|
|
7398
|
+
},
|
|
7399
|
+
{
|
|
7400
|
+
"kind": "method",
|
|
7401
|
+
"name": "onBubbleMouseEnter"
|
|
7402
|
+
},
|
|
7403
|
+
{
|
|
7404
|
+
"kind": "method",
|
|
7405
|
+
"name": "onBubbleMouseLeave"
|
|
7406
|
+
},
|
|
7407
|
+
{
|
|
7408
|
+
"kind": "method",
|
|
7409
|
+
"name": "dialogOpenChanged",
|
|
7410
|
+
"parameters": [
|
|
7411
|
+
{
|
|
7412
|
+
"name": "_",
|
|
7413
|
+
"type": {
|
|
7414
|
+
"text": "boolean"
|
|
7415
|
+
}
|
|
7416
|
+
},
|
|
7417
|
+
{
|
|
7418
|
+
"name": "next",
|
|
7419
|
+
"type": {
|
|
7420
|
+
"text": "boolean"
|
|
7421
|
+
}
|
|
7422
|
+
}
|
|
7423
|
+
]
|
|
7424
|
+
},
|
|
7425
|
+
{
|
|
7426
|
+
"kind": "method",
|
|
7427
|
+
"name": "dialogContentChanged",
|
|
7428
|
+
"parameters": [
|
|
7429
|
+
{
|
|
7430
|
+
"name": "_",
|
|
7431
|
+
"type": {
|
|
7432
|
+
"text": "HTMLElement[]"
|
|
7433
|
+
}
|
|
7434
|
+
},
|
|
7435
|
+
{
|
|
7436
|
+
"name": "next",
|
|
7437
|
+
"type": {
|
|
7438
|
+
"text": "HTMLElement[]"
|
|
7439
|
+
}
|
|
7440
|
+
}
|
|
7441
|
+
]
|
|
7442
|
+
},
|
|
7443
|
+
{
|
|
7444
|
+
"kind": "method",
|
|
7445
|
+
"name": "injectCloseButton",
|
|
7446
|
+
"privacy": "private",
|
|
7447
|
+
"parameters": [
|
|
7448
|
+
{
|
|
7449
|
+
"name": "assistant",
|
|
7450
|
+
"type": {
|
|
7451
|
+
"text": "Element"
|
|
7452
|
+
}
|
|
7453
|
+
}
|
|
7454
|
+
]
|
|
7455
|
+
},
|
|
7456
|
+
{
|
|
7457
|
+
"kind": "method",
|
|
7458
|
+
"name": "onBubbleMouseDown",
|
|
7459
|
+
"parameters": [
|
|
7460
|
+
{
|
|
7461
|
+
"name": "e",
|
|
7462
|
+
"type": {
|
|
7463
|
+
"text": "MouseEvent"
|
|
7464
|
+
}
|
|
7465
|
+
}
|
|
7466
|
+
]
|
|
7467
|
+
},
|
|
7468
|
+
{
|
|
7469
|
+
"kind": "method",
|
|
7470
|
+
"name": "onDialogHeaderMouseDown",
|
|
7471
|
+
"parameters": [
|
|
7472
|
+
{
|
|
7473
|
+
"name": "e",
|
|
7474
|
+
"type": {
|
|
7475
|
+
"text": "CustomEvent<{ clientX: number; clientY: number }>"
|
|
7476
|
+
}
|
|
7477
|
+
}
|
|
7478
|
+
]
|
|
7479
|
+
},
|
|
7480
|
+
{
|
|
7481
|
+
"kind": "field",
|
|
7482
|
+
"name": "onCloseBtnClick",
|
|
7483
|
+
"privacy": "private",
|
|
7484
|
+
"readonly": true
|
|
7485
|
+
},
|
|
7486
|
+
{
|
|
7487
|
+
"kind": "method",
|
|
7488
|
+
"name": "cancelClose",
|
|
7489
|
+
"privacy": "private"
|
|
7490
|
+
},
|
|
7491
|
+
{
|
|
7492
|
+
"kind": "method",
|
|
7493
|
+
"name": "startCloseDialog",
|
|
7494
|
+
"privacy": "private"
|
|
7495
|
+
},
|
|
7496
|
+
{
|
|
7497
|
+
"kind": "field",
|
|
7498
|
+
"name": "onDocMouseMove",
|
|
7499
|
+
"privacy": "private"
|
|
7500
|
+
},
|
|
7501
|
+
{
|
|
7502
|
+
"kind": "field",
|
|
7503
|
+
"name": "applyDragFrame",
|
|
7504
|
+
"privacy": "private"
|
|
7505
|
+
},
|
|
7506
|
+
{
|
|
7507
|
+
"kind": "field",
|
|
7508
|
+
"name": "onDocMouseUp",
|
|
7509
|
+
"privacy": "private"
|
|
7510
|
+
},
|
|
7511
|
+
{
|
|
7512
|
+
"kind": "method",
|
|
7513
|
+
"name": "onPopout"
|
|
7514
|
+
},
|
|
7022
7515
|
{
|
|
7023
|
-
"
|
|
7024
|
-
"
|
|
7025
|
-
|
|
7026
|
-
}
|
|
7027
|
-
}
|
|
7028
|
-
],
|
|
7029
|
-
"description": "Either restore notice — both display-only, stripped before persist. @internal"
|
|
7030
|
-
},
|
|
7031
|
-
{
|
|
7032
|
-
"kind": "function",
|
|
7033
|
-
"name": "trailingInteractionRow",
|
|
7034
|
-
"return": {
|
|
7035
|
-
"type": {
|
|
7036
|
-
"text": "ChatMessage[]"
|
|
7037
|
-
}
|
|
7038
|
-
},
|
|
7039
|
-
"parameters": [
|
|
7516
|
+
"kind": "method",
|
|
7517
|
+
"name": "onCloseDialog"
|
|
7518
|
+
},
|
|
7040
7519
|
{
|
|
7041
|
-
"
|
|
7520
|
+
"kind": "field",
|
|
7521
|
+
"name": "tooltipStyle",
|
|
7042
7522
|
"type": {
|
|
7043
|
-
"text": "
|
|
7044
|
-
}
|
|
7523
|
+
"text": "string"
|
|
7524
|
+
},
|
|
7525
|
+
"readonly": true
|
|
7045
7526
|
}
|
|
7046
7527
|
],
|
|
7047
|
-
"
|
|
7048
|
-
},
|
|
7049
|
-
{
|
|
7050
|
-
"kind": "function",
|
|
7051
|
-
"name": "filterVisibleMessages",
|
|
7052
|
-
"return": {
|
|
7053
|
-
"type": {
|
|
7054
|
-
"text": "ChatMessage[]"
|
|
7055
|
-
}
|
|
7056
|
-
},
|
|
7057
|
-
"parameters": [
|
|
7528
|
+
"attributes": [
|
|
7058
7529
|
{
|
|
7059
|
-
"name": "
|
|
7530
|
+
"name": "title",
|
|
7060
7531
|
"type": {
|
|
7061
|
-
"text": "
|
|
7062
|
-
}
|
|
7532
|
+
"text": "string"
|
|
7533
|
+
},
|
|
7534
|
+
"default": "'AI Assistant'",
|
|
7535
|
+
"fieldName": "title"
|
|
7063
7536
|
},
|
|
7064
7537
|
{
|
|
7065
|
-
"name": "
|
|
7538
|
+
"name": "image-src",
|
|
7066
7539
|
"type": {
|
|
7067
|
-
"text": "
|
|
7068
|
-
}
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
"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."
|
|
7072
|
-
}
|
|
7073
|
-
],
|
|
7074
|
-
"exports": [
|
|
7075
|
-
{
|
|
7076
|
-
"kind": "js",
|
|
7077
|
-
"name": "isSessionNoticeMarker",
|
|
7078
|
-
"declaration": {
|
|
7079
|
-
"name": "isSessionNoticeMarker",
|
|
7080
|
-
"module": "src/utils/message-partition.ts"
|
|
7081
|
-
}
|
|
7082
|
-
},
|
|
7083
|
-
{
|
|
7084
|
-
"kind": "js",
|
|
7085
|
-
"name": "trailingInteractionRow",
|
|
7086
|
-
"declaration": {
|
|
7087
|
-
"name": "trailingInteractionRow",
|
|
7088
|
-
"module": "src/utils/message-partition.ts"
|
|
7089
|
-
}
|
|
7090
|
-
},
|
|
7091
|
-
{
|
|
7092
|
-
"kind": "js",
|
|
7093
|
-
"name": "filterVisibleMessages",
|
|
7094
|
-
"declaration": {
|
|
7095
|
-
"name": "filterVisibleMessages",
|
|
7096
|
-
"module": "src/utils/message-partition.ts"
|
|
7097
|
-
}
|
|
7098
|
-
}
|
|
7099
|
-
]
|
|
7100
|
-
},
|
|
7101
|
-
{
|
|
7102
|
-
"kind": "javascript-module",
|
|
7103
|
-
"path": "src/utils/resolve-cost-history-config.ts",
|
|
7104
|
-
"declarations": [
|
|
7105
|
-
{
|
|
7106
|
-
"kind": "function",
|
|
7107
|
-
"name": "resolveCostHistoryConfig",
|
|
7108
|
-
"return": {
|
|
7109
|
-
"type": {
|
|
7110
|
-
"text": "ResolvedCostHistoryConfig"
|
|
7111
|
-
}
|
|
7112
|
-
},
|
|
7113
|
-
"parameters": [
|
|
7540
|
+
"text": "string | undefined"
|
|
7541
|
+
},
|
|
7542
|
+
"fieldName": "imageSrc"
|
|
7543
|
+
},
|
|
7114
7544
|
{
|
|
7115
|
-
"name": "
|
|
7545
|
+
"name": "design-system-prefix",
|
|
7116
7546
|
"type": {
|
|
7117
|
-
"text": "
|
|
7118
|
-
}
|
|
7547
|
+
"text": "string"
|
|
7548
|
+
},
|
|
7549
|
+
"default": "'rapid'",
|
|
7550
|
+
"fieldName": "designSystemPrefix"
|
|
7119
7551
|
}
|
|
7120
7552
|
],
|
|
7121
|
-
"
|
|
7553
|
+
"superclass": {
|
|
7554
|
+
"name": "GenesisElement",
|
|
7555
|
+
"package": "@genesislcap/web-core"
|
|
7556
|
+
},
|
|
7557
|
+
"tagName": "foundation-ai-chat-bubble",
|
|
7558
|
+
"customElement": true
|
|
7122
7559
|
}
|
|
7123
7560
|
],
|
|
7124
7561
|
"exports": [
|
|
7125
7562
|
{
|
|
7126
7563
|
"kind": "js",
|
|
7127
|
-
"name": "
|
|
7564
|
+
"name": "AiChatBubble",
|
|
7128
7565
|
"declaration": {
|
|
7129
|
-
"name": "
|
|
7130
|
-
"module": "src/
|
|
7566
|
+
"name": "AiChatBubble",
|
|
7567
|
+
"module": "src/components/chat-bubble/chat-bubble.ts"
|
|
7131
7568
|
}
|
|
7132
|
-
}
|
|
7133
|
-
]
|
|
7134
|
-
},
|
|
7135
|
-
{
|
|
7136
|
-
"kind": "javascript-module",
|
|
7137
|
-
"path": "src/utils/resolve-preference-baseline.ts",
|
|
7138
|
-
"declarations": [],
|
|
7139
|
-
"exports": []
|
|
7140
|
-
},
|
|
7141
|
-
{
|
|
7142
|
-
"kind": "javascript-module",
|
|
7143
|
-
"path": "src/utils/strip-agent-handlers.ts",
|
|
7144
|
-
"declarations": [],
|
|
7145
|
-
"exports": []
|
|
7146
|
-
},
|
|
7147
|
-
{
|
|
7148
|
-
"kind": "javascript-module",
|
|
7149
|
-
"path": "src/utils/sum-costs.ts",
|
|
7150
|
-
"declarations": [],
|
|
7151
|
-
"exports": []
|
|
7152
|
-
},
|
|
7153
|
-
{
|
|
7154
|
-
"kind": "javascript-module",
|
|
7155
|
-
"path": "src/utils/sum-tokens.ts",
|
|
7156
|
-
"declarations": [
|
|
7157
|
-
{
|
|
7158
|
-
"kind": "function",
|
|
7159
|
-
"name": "formatCompactTokenCountSafe",
|
|
7160
|
-
"return": {
|
|
7161
|
-
"type": {
|
|
7162
|
-
"text": "string"
|
|
7163
|
-
}
|
|
7164
|
-
},
|
|
7165
|
-
"parameters": [
|
|
7166
|
-
{
|
|
7167
|
-
"name": "tokens",
|
|
7168
|
-
"type": {
|
|
7169
|
-
"text": "number"
|
|
7170
|
-
}
|
|
7171
|
-
}
|
|
7172
|
-
],
|
|
7173
|
-
"description": "formatCompactTokenCount passed through DOMPurify for `:innerHTML` bindings."
|
|
7174
|
-
}
|
|
7175
|
-
],
|
|
7176
|
-
"exports": [
|
|
7569
|
+
},
|
|
7177
7570
|
{
|
|
7178
|
-
"kind": "
|
|
7179
|
-
"name": "
|
|
7571
|
+
"kind": "custom-element-definition",
|
|
7572
|
+
"name": "foundation-ai-chat-bubble",
|
|
7180
7573
|
"declaration": {
|
|
7181
|
-
"name": "
|
|
7182
|
-
"module": "src/
|
|
7574
|
+
"name": "AiChatBubble",
|
|
7575
|
+
"module": "src/components/chat-bubble/chat-bubble.ts"
|
|
7183
7576
|
}
|
|
7184
7577
|
}
|
|
7185
7578
|
]
|
|
7186
7579
|
},
|
|
7187
7580
|
{
|
|
7188
7581
|
"kind": "javascript-module",
|
|
7189
|
-
"path": "src/
|
|
7582
|
+
"path": "src/components/chat-bubble/index.ts",
|
|
7190
7583
|
"declarations": [],
|
|
7191
|
-
"exports": []
|
|
7192
|
-
},
|
|
7193
|
-
{
|
|
7194
|
-
"kind": "javascript-module",
|
|
7195
|
-
"path": "src/utils/tool-fold.ts",
|
|
7196
|
-
"declarations": [
|
|
7197
|
-
{
|
|
7198
|
-
"kind": "function",
|
|
7199
|
-
"name": "createToolFold",
|
|
7200
|
-
"return": {
|
|
7201
|
-
"type": {
|
|
7202
|
-
"text": "ToolFoldResult"
|
|
7203
|
-
}
|
|
7204
|
-
},
|
|
7205
|
-
"parameters": [
|
|
7206
|
-
{
|
|
7207
|
-
"name": "config",
|
|
7208
|
-
"type": {
|
|
7209
|
-
"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}"
|
|
7210
|
-
}
|
|
7211
|
-
}
|
|
7212
|
-
],
|
|
7213
|
-
"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."
|
|
7214
|
-
},
|
|
7215
|
-
{
|
|
7216
|
-
"kind": "function",
|
|
7217
|
-
"name": "expandToolTree",
|
|
7218
|
-
"return": {
|
|
7219
|
-
"type": {
|
|
7220
|
-
"text": "ToolTreeNode[]"
|
|
7221
|
-
}
|
|
7222
|
-
},
|
|
7223
|
-
"parameters": [
|
|
7224
|
-
{
|
|
7225
|
-
"name": "definitions",
|
|
7226
|
-
"type": {
|
|
7227
|
-
"text": "ChatToolDefinition[]"
|
|
7228
|
-
}
|
|
7229
|
-
},
|
|
7230
|
-
{
|
|
7231
|
-
"name": "handlers",
|
|
7232
|
-
"type": {
|
|
7233
|
-
"text": "ChatToolHandlers"
|
|
7234
|
-
}
|
|
7235
|
-
}
|
|
7236
|
-
],
|
|
7237
|
-
"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."
|
|
7238
|
-
}
|
|
7239
|
-
],
|
|
7240
7584
|
"exports": [
|
|
7241
7585
|
{
|
|
7242
7586
|
"kind": "js",
|
|
7243
|
-
"name": "
|
|
7244
|
-
"declaration": {
|
|
7245
|
-
"name": "createToolFold",
|
|
7246
|
-
"module": "src/utils/tool-fold.ts"
|
|
7247
|
-
}
|
|
7248
|
-
},
|
|
7249
|
-
{
|
|
7250
|
-
"kind": "js",
|
|
7251
|
-
"name": "expandToolTree",
|
|
7587
|
+
"name": "*",
|
|
7252
7588
|
"declaration": {
|
|
7253
|
-
"name": "
|
|
7254
|
-
"
|
|
7589
|
+
"name": "*",
|
|
7590
|
+
"package": "./chat-bubble"
|
|
7255
7591
|
}
|
|
7256
7592
|
}
|
|
7257
7593
|
]
|
|
7258
7594
|
},
|
|
7259
|
-
{
|
|
7260
|
-
"kind": "javascript-module",
|
|
7261
|
-
"path": "src/utils/with-timeout.ts",
|
|
7262
|
-
"declarations": [],
|
|
7263
|
-
"exports": []
|
|
7264
|
-
},
|
|
7265
7595
|
{
|
|
7266
7596
|
"kind": "javascript-module",
|
|
7267
7597
|
"path": "src/components/chat-driver/align-event-globals.ts",
|
|
@@ -7714,6 +8044,15 @@
|
|
|
7714
8044
|
"privacy": "private",
|
|
7715
8045
|
"description": "Active agent's prompt-cache policy selector (static value or per-turn resolver).\n`undefined` requests no caching (equivalent to `{ scope: 'default' }`)."
|
|
7716
8046
|
},
|
|
8047
|
+
{
|
|
8048
|
+
"kind": "field",
|
|
8049
|
+
"name": "activeThinkingPolicyInput",
|
|
8050
|
+
"type": {
|
|
8051
|
+
"text": "ThinkingPolicyInput | undefined"
|
|
8052
|
+
},
|
|
8053
|
+
"privacy": "private",
|
|
8054
|
+
"description": "Active agent's extended-thinking selector (static value or per-turn resolver). `undefined` —\nunset, or returned by the resolver — leaves the model on its own default posture, which is\nneither uniformly on nor off, so an agent that never sets this is unaffected by the option."
|
|
8055
|
+
},
|
|
7717
8056
|
{
|
|
7718
8057
|
"kind": "field",
|
|
7719
8058
|
"name": "activeTailContextInput",
|
|
@@ -8620,9 +8959,9 @@
|
|
|
8620
8959
|
"name": "traceCapture",
|
|
8621
8960
|
"optional": true,
|
|
8622
8961
|
"type": {
|
|
8623
|
-
"text": "{
|
|
8962
|
+
"text": "{ traces: ChatMessage[][] }"
|
|
8624
8963
|
},
|
|
8625
|
-
"description": "Optional per-
|
|
8964
|
+
"description": "Optional per-tool-call accumulator. When provided, every\nsub-agent call's trace is **appended** here rather than written to shared\ninstance state, so parallel tool calls each capture their own traces\nindependently.\n\nDeliberately a list of traces, not one slot. A single handler may call\n`requestSubAgent` more than once — a code-driven scheduler dispatching a\ndependency graph, a retry of a timed-out child, any fan-out helper — and a\nsingle slot kept only the last, so every other child ran, was billed by the\nprovider, and then vanished from history. The loss was silent in the worst\nway: `sumUsage` and `usageRows` both recurse into the trace, so they summed a\ntruncated input and still agreed with each other. Measured at 1 of 7 traces\nkept on a seven-way fan-out, reporting ~2.3x under the real cost, with the\nerror growing as the fan-out widens."
|
|
8626
8965
|
}
|
|
8627
8966
|
],
|
|
8628
8967
|
"description": "Builds the context object passed to every tool handler call.\nCentralised here so fold shortcut dispatch and the main tool loop use the\nsame context without duplication."
|