@genesislcap/ai-assistant 15.35.1 → 15.35.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +1573 -1573
- package/package.json +18 -18
|
@@ -2246,993 +2246,954 @@
|
|
|
2246
2246
|
},
|
|
2247
2247
|
{
|
|
2248
2248
|
"kind": "javascript-module",
|
|
2249
|
-
"path": "src/
|
|
2250
|
-
"declarations": [],
|
|
2251
|
-
"exports": []
|
|
2252
|
-
},
|
|
2253
|
-
{
|
|
2254
|
-
"kind": "javascript-module",
|
|
2255
|
-
"path": "src/main/budget-controller.ts",
|
|
2256
|
-
"declarations": [],
|
|
2257
|
-
"exports": []
|
|
2258
|
-
},
|
|
2259
|
-
{
|
|
2260
|
-
"kind": "javascript-module",
|
|
2261
|
-
"path": "src/main/composer-menu-controller.ts",
|
|
2262
|
-
"declarations": [],
|
|
2263
|
-
"exports": []
|
|
2264
|
-
},
|
|
2265
|
-
{
|
|
2266
|
-
"kind": "javascript-module",
|
|
2267
|
-
"path": "src/main/composer-resize-controller.ts",
|
|
2268
|
-
"declarations": [],
|
|
2269
|
-
"exports": []
|
|
2270
|
-
},
|
|
2271
|
-
{
|
|
2272
|
-
"kind": "javascript-module",
|
|
2273
|
-
"path": "src/main/context-gate-controller.ts",
|
|
2274
|
-
"declarations": [],
|
|
2275
|
-
"exports": []
|
|
2276
|
-
},
|
|
2277
|
-
{
|
|
2278
|
-
"kind": "javascript-module",
|
|
2279
|
-
"path": "src/main/cost-ledger-controller.ts",
|
|
2280
|
-
"declarations": [],
|
|
2281
|
-
"exports": []
|
|
2282
|
-
},
|
|
2283
|
-
{
|
|
2284
|
-
"kind": "javascript-module",
|
|
2285
|
-
"path": "src/main/index.ts",
|
|
2286
|
-
"declarations": [],
|
|
2287
|
-
"exports": [
|
|
2288
|
-
{
|
|
2289
|
-
"kind": "js",
|
|
2290
|
-
"name": "*",
|
|
2291
|
-
"declaration": {
|
|
2292
|
-
"name": "*",
|
|
2293
|
-
"package": "./main.template"
|
|
2294
|
-
}
|
|
2295
|
-
},
|
|
2296
|
-
{
|
|
2297
|
-
"kind": "js",
|
|
2298
|
-
"name": "*",
|
|
2299
|
-
"declaration": {
|
|
2300
|
-
"name": "*",
|
|
2301
|
-
"package": "./main"
|
|
2302
|
-
}
|
|
2303
|
-
},
|
|
2304
|
-
{
|
|
2305
|
-
"kind": "js",
|
|
2306
|
-
"name": "*",
|
|
2307
|
-
"declaration": {
|
|
2308
|
-
"name": "*",
|
|
2309
|
-
"package": "./main.types"
|
|
2310
|
-
}
|
|
2311
|
-
}
|
|
2312
|
-
]
|
|
2313
|
-
},
|
|
2314
|
-
{
|
|
2315
|
-
"kind": "javascript-module",
|
|
2316
|
-
"path": "src/main/main.styles.ts",
|
|
2249
|
+
"path": "src/provider/ai-provider-switcher.ts",
|
|
2317
2250
|
"declarations": [
|
|
2318
2251
|
{
|
|
2319
2252
|
"kind": "variable",
|
|
2320
|
-
"name": "
|
|
2321
|
-
"
|
|
2253
|
+
"name": "AIProviderSwitcher",
|
|
2254
|
+
"description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
|
|
2322
2255
|
}
|
|
2323
2256
|
],
|
|
2324
2257
|
"exports": [
|
|
2325
2258
|
{
|
|
2326
2259
|
"kind": "js",
|
|
2327
|
-
"name": "
|
|
2260
|
+
"name": "AIProviderSwitcher",
|
|
2328
2261
|
"declaration": {
|
|
2329
|
-
"name": "
|
|
2330
|
-
"module": "src/
|
|
2262
|
+
"name": "AIProviderSwitcher",
|
|
2263
|
+
"module": "src/provider/ai-provider-switcher.ts"
|
|
2331
2264
|
}
|
|
2332
2265
|
}
|
|
2333
2266
|
]
|
|
2334
2267
|
},
|
|
2335
2268
|
{
|
|
2336
2269
|
"kind": "javascript-module",
|
|
2337
|
-
"path": "src/
|
|
2270
|
+
"path": "src/provider/assistant-app-settings.ts",
|
|
2338
2271
|
"declarations": [
|
|
2339
2272
|
{
|
|
2340
2273
|
"kind": "variable",
|
|
2341
|
-
"name": "
|
|
2342
|
-
"
|
|
2343
|
-
"description": "The timestamp shown beside the sender name (GENC-1257).\n\nTwo strings, not one. A screen reader announces a `<time>` element's TEXT — it has no\nimplicit ARIA role, and the `datetime` attribute is never surfaced to the user — so the\nrelative text is hidden from assistive tech and paired with a visually-hidden absolute\nstring. Otherwise AT would hear \"5 minutes ago\" with nothing to anchor it, and in\n`'hover'` mode would hear it for a timestamp sighted users never asked to see.\n`datetime` stays because it is correct HTML and useful to tooling, not for a11y.\n\nOnly the VISUAL reveal is hover-gated, in CSS — see `.message-timestamp`. `opacity: 0`\nleaves the element in the accessibility tree, so AT gets a time in both visible modes;\n`'off'` is the only mode that removes it.\n\nReads `timestampClock` rather than `Date.now()` so every row shares one invalidatable\nclock and a tick re-evaluates them all; see `FoundationAiAssistant.timestampClock`."
|
|
2344
|
-
},
|
|
2345
|
-
{
|
|
2346
|
-
"kind": "function",
|
|
2347
|
-
"name": "FoundationAiAssistantTemplate",
|
|
2348
|
-
"return": {
|
|
2349
|
-
"type": {
|
|
2350
|
-
"text": "ViewTemplate<FoundationAiAssistant>"
|
|
2351
|
-
}
|
|
2352
|
-
},
|
|
2353
|
-
"parameters": [
|
|
2354
|
-
{
|
|
2355
|
-
"name": "designSystemPrefix",
|
|
2356
|
-
"type": {
|
|
2357
|
-
"text": "string"
|
|
2358
|
-
}
|
|
2359
|
-
}
|
|
2360
|
-
]
|
|
2274
|
+
"name": "AssistantAppSettingsProvider",
|
|
2275
|
+
"description": "The DI token for the (AssistantAppSettingsProvider:interface). Resolves a noop\nuntil the host registers one."
|
|
2361
2276
|
}
|
|
2362
2277
|
],
|
|
2363
2278
|
"exports": [
|
|
2364
2279
|
{
|
|
2365
2280
|
"kind": "js",
|
|
2366
|
-
"name": "
|
|
2367
|
-
"declaration": {
|
|
2368
|
-
"name": "messageTimestampTemplate",
|
|
2369
|
-
"module": "src/main/main.template.ts"
|
|
2370
|
-
}
|
|
2371
|
-
},
|
|
2372
|
-
{
|
|
2373
|
-
"kind": "js",
|
|
2374
|
-
"name": "FoundationAiAssistantTemplate",
|
|
2281
|
+
"name": "AssistantAppSettingsProvider",
|
|
2375
2282
|
"declaration": {
|
|
2376
|
-
"name": "
|
|
2377
|
-
"module": "src/
|
|
2283
|
+
"name": "AssistantAppSettingsProvider",
|
|
2284
|
+
"module": "src/provider/assistant-app-settings.ts"
|
|
2378
2285
|
}
|
|
2379
2286
|
}
|
|
2380
2287
|
]
|
|
2381
2288
|
},
|
|
2382
2289
|
{
|
|
2383
2290
|
"kind": "javascript-module",
|
|
2384
|
-
"path": "src/
|
|
2291
|
+
"path": "src/provider/tiered-provider-switcher.ts",
|
|
2385
2292
|
"declarations": [
|
|
2386
|
-
{
|
|
2387
|
-
"kind": "variable",
|
|
2388
|
-
"name": "sparkleIconSvg",
|
|
2389
|
-
"default": "`<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.5 5 C9.5 11.4 11.1 13 17.5 13 C11.1 13 9.5 14.6 9.5 21 C9.5 14.6 7.9 13 1.5 13 C7.9 13 9.5 11.4 9.5 5 Z\" fill=\"currentColor\"/><path d=\"M17 2.5 C17 5.7 17.8 6.5 21 6.5 C17.8 6.5 17 7.3 17 10.5 C17 7.3 16.2 6.5 13 6.5 C16.2 6.5 17 5.7 17 2.5 Z\" fill=\"currentColor\"/><path d=\"M17.5 15 C17.5 17 18 17.5 20 17.5 C18 17.5 17.5 18 17.5 20 C17.5 18 17 17.5 15 17.5 C17 17.5 17.5 17 17.5 15 Z\" fill=\"currentColor\"/></svg>`",
|
|
2390
|
-
"description": "Three-star AI \"sparkle\" mark — the conventional AI signifier; default assistant avatar."
|
|
2391
|
-
},
|
|
2392
|
-
{
|
|
2393
|
-
"kind": "variable",
|
|
2394
|
-
"name": "userIconSvg",
|
|
2395
|
-
"default": "`<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\" fill=\"currentColor\"/></svg>`",
|
|
2396
|
-
"description": "Person silhouette — default user avatar."
|
|
2397
|
-
},
|
|
2398
|
-
{
|
|
2399
|
-
"kind": "variable",
|
|
2400
|
-
"name": "genesisIconSvg",
|
|
2401
|
-
"default": "`<svg viewBox=\"-4 0 30 26\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M18.7702 23.0437C18.7702 22.4675 18.8526 21.8089 19.0995 21.3149C19.3465 20.7386 19.6758 20.2447 20.0874 19.833C20.4991 19.4214 20.993 19.0921 21.5693 18.8451C22.1456 18.5982 22.7219 18.5158 23.2981 18.5158H25.9326V11.6828H19.1819V14.3172C19.1819 15.5521 18.6879 16.7047 17.8647 17.5279C17.0414 18.3512 15.8888 18.8451 14.7363 18.9275H6.7507V6.99025H16.4651V0.157227H3.54C2.63442 0.157227 1.72884 0.568855 1.07023 1.22746C0.411628 1.88606 0 2.79165 0 3.77955V22.2205C0 23.1261 0.411628 24.0316 1.07023 24.7726C1.72884 25.4312 2.63442 25.8428 3.54 25.8428H18.7702V23.0437Z\" fill=\"currentColor\"/></svg>`",
|
|
2402
|
-
"description": "Genesis G-mark — opt-in assistant avatar (the default before the sparkle mark)."
|
|
2403
|
-
},
|
|
2404
2293
|
{
|
|
2405
2294
|
"kind": "class",
|
|
2406
|
-
"description": "
|
|
2407
|
-
"name": "
|
|
2295
|
+
"description": "Which cloud vendor backs the tier-shaped provider registry, plus the means to move it at\nruntime (GENC-1610).",
|
|
2296
|
+
"name": "TieredAIProviderSwitcher",
|
|
2408
2297
|
"members": [
|
|
2409
2298
|
{
|
|
2410
2299
|
"kind": "field",
|
|
2411
|
-
"name": "
|
|
2412
|
-
"
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
{
|
|
2417
|
-
"kind": "field",
|
|
2418
|
-
"name": "composerMenus",
|
|
2419
|
-
"privacy": "private",
|
|
2420
|
-
"readonly": true,
|
|
2421
|
-
"default": "new ComposerMenuController(this, {\n agentPickerOpen: this.accessor('agentPickerOpen'),\n sessionMenuOpen: this.accessor('sessionMenuOpen'),\n focusInput: () => this.chatInputEl?.focus(),\n resetSessionConfirmations: () => {\n this.confirmingClear = false;\n this.confirmingCompact = false;\n },\n logMeta: (type, detail) => this.logMeta(type, detail),\n })"
|
|
2422
|
-
},
|
|
2423
|
-
{
|
|
2424
|
-
"kind": "field",
|
|
2425
|
-
"name": "attachmentCtrl",
|
|
2426
|
-
"privacy": "private",
|
|
2427
|
-
"readonly": true,
|
|
2428
|
-
"default": "new AttachmentController(this, {\n acceptedFiles: () => this.chatConfig.ui?.acceptedFiles,\n logMeta: (type, detail) => this.logMeta(type, detail),\n })"
|
|
2300
|
+
"name": "vendors",
|
|
2301
|
+
"type": {
|
|
2302
|
+
"text": "readonly AITierVendor[]"
|
|
2303
|
+
},
|
|
2304
|
+
"readonly": true
|
|
2429
2305
|
},
|
|
2430
2306
|
{
|
|
2431
2307
|
"kind": "field",
|
|
2432
|
-
"name": "
|
|
2308
|
+
"name": "options",
|
|
2309
|
+
"type": {
|
|
2310
|
+
"text": "TieredAIProviderSwitcherOptions"
|
|
2311
|
+
},
|
|
2433
2312
|
"privacy": "private",
|
|
2434
2313
|
"readonly": true,
|
|
2435
|
-
"default": "
|
|
2436
|
-
"description": "Pure derivation — owns no state. Reaches the driver only through the two\ncallbacks below, so it stays clear of the stateful-agent surface (§11.2\nconstraint 2) and of redux entirely."
|
|
2314
|
+
"default": "options"
|
|
2437
2315
|
},
|
|
2438
2316
|
{
|
|
2439
2317
|
"kind": "field",
|
|
2440
|
-
"name": "
|
|
2318
|
+
"name": "defaultTier",
|
|
2319
|
+
"type": {
|
|
2320
|
+
"text": "AITierId"
|
|
2321
|
+
},
|
|
2441
2322
|
"privacy": "private",
|
|
2442
|
-
"readonly": true
|
|
2443
|
-
"default": "new CostLedgerController({\n chatConfig: () => this.chatConfig,\n messages: () => this.messages,\n sessionUsage: () => this.sessionUsage,\n providerStatuses: () => this.providerStatuses,\n persistenceActive: () => this.persistenceActive,\n stateKey: () => this.getStateKey(),\n headerTitle: () => this.headerTitle,\n provider: () => this.persistence.provider,\n elementId: () => this.id,\n })",
|
|
2444
|
-
"description": "Cost accounting and the persisted build-history ledger (GENC-1475). Reads the live\nsession through callbacks and owns the rows, the load/write latches and the debounce\ntimer — the element keeps only the names the settings modal binds."
|
|
2323
|
+
"readonly": true
|
|
2445
2324
|
},
|
|
2446
2325
|
{
|
|
2447
2326
|
"kind": "field",
|
|
2448
|
-
"name": "
|
|
2327
|
+
"name": "registry",
|
|
2328
|
+
"type": {
|
|
2329
|
+
"text": "MutableAIProviderRegistry"
|
|
2330
|
+
},
|
|
2449
2331
|
"privacy": "private",
|
|
2450
|
-
"readonly": true
|
|
2451
|
-
"default": "new BudgetController({\n sessionRef: () => this._sessionRef,\n providerStatuses: () => this.providerStatuses,\n providerRegistry: () => this.providerRegistry,\n chatConfig: () => this.chatConfig,\n })",
|
|
2452
|
-
"description": "The AI-spend budget: vendor walls, the derived composer lock, the banner copy\nand the settings meter (GENC-1464).\n\nTakes the session store itself rather than a callback per field — see\n`BudgetDeps` for why this one differs from its siblings."
|
|
2332
|
+
"readonly": true
|
|
2453
2333
|
},
|
|
2454
2334
|
{
|
|
2455
2335
|
"kind": "field",
|
|
2456
|
-
"name": "
|
|
2336
|
+
"name": "listeners",
|
|
2457
2337
|
"privacy": "private",
|
|
2458
2338
|
"readonly": true,
|
|
2459
|
-
"default": "new
|
|
2460
|
-
"description": "The settings modal (`docs/code-health.md` §3). Reaches the two design-system\nrefs through callbacks, because the template writes them by name — see\n`SettingsModalDeps`."
|
|
2461
|
-
},
|
|
2462
|
-
{
|
|
2463
|
-
"kind": "field",
|
|
2464
|
-
"name": "providerRegistry",
|
|
2465
|
-
"type": {
|
|
2466
|
-
"text": "AIProviderRegistry"
|
|
2467
|
-
}
|
|
2339
|
+
"default": "new Set<(vendor: AITierVendor) => void>()"
|
|
2468
2340
|
},
|
|
2469
2341
|
{
|
|
2470
2342
|
"kind": "field",
|
|
2471
|
-
"name": "
|
|
2343
|
+
"name": "_vendor",
|
|
2472
2344
|
"type": {
|
|
2473
|
-
"text": "
|
|
2474
|
-
}
|
|
2345
|
+
"text": "AITierVendor"
|
|
2346
|
+
},
|
|
2347
|
+
"privacy": "private"
|
|
2475
2348
|
},
|
|
2476
2349
|
{
|
|
2477
2350
|
"kind": "field",
|
|
2478
|
-
"name": "
|
|
2351
|
+
"name": "vendor",
|
|
2479
2352
|
"type": {
|
|
2480
|
-
"text": "
|
|
2353
|
+
"text": "AITierVendor"
|
|
2481
2354
|
},
|
|
2482
|
-
"
|
|
2355
|
+
"readonly": true
|
|
2483
2356
|
},
|
|
2484
2357
|
{
|
|
2485
|
-
"kind": "
|
|
2486
|
-
"name": "
|
|
2487
|
-
"
|
|
2488
|
-
"
|
|
2358
|
+
"kind": "method",
|
|
2359
|
+
"name": "switchTo",
|
|
2360
|
+
"return": {
|
|
2361
|
+
"type": {
|
|
2362
|
+
"text": "void"
|
|
2363
|
+
}
|
|
2489
2364
|
},
|
|
2490
|
-
"
|
|
2365
|
+
"parameters": [
|
|
2366
|
+
{
|
|
2367
|
+
"name": "vendor",
|
|
2368
|
+
"type": {
|
|
2369
|
+
"text": "string"
|
|
2370
|
+
}
|
|
2371
|
+
}
|
|
2372
|
+
],
|
|
2373
|
+
"description": "A user-driven switch: move the registry, then tell the app so it can persist the choice.\nAn unknown vendor is ignored."
|
|
2491
2374
|
},
|
|
2492
2375
|
{
|
|
2493
|
-
"kind": "
|
|
2494
|
-
"name": "
|
|
2495
|
-
"
|
|
2496
|
-
"
|
|
2376
|
+
"kind": "method",
|
|
2377
|
+
"name": "adoptPersistedVendor",
|
|
2378
|
+
"return": {
|
|
2379
|
+
"type": {
|
|
2380
|
+
"text": "void"
|
|
2381
|
+
}
|
|
2497
2382
|
},
|
|
2498
|
-
"
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
{
|
|
2508
|
-
"kind": "field",
|
|
2509
|
-
"name": "userImageSrc",
|
|
2510
|
-
"type": {
|
|
2511
|
-
"text": "string | undefined"
|
|
2512
|
-
}
|
|
2513
|
-
},
|
|
2514
|
-
{
|
|
2515
|
-
"kind": "field",
|
|
2516
|
-
"name": "assistantIcon",
|
|
2517
|
-
"type": {
|
|
2518
|
-
"text": "string | undefined"
|
|
2519
|
-
},
|
|
2520
|
-
"description": "Inline SVG markup overriding the default assistant \"sparkle\" avatar. The\nmarkup is sanitized (SVG profile) before rendering and uses the avatar's\ntheme colour via `currentColor`. For a raster/photo avatar set `imageSrc`\ninstead, which takes precedence. Set to `genesisIconSvg` to restore the\nGenesis G-mark."
|
|
2521
|
-
},
|
|
2522
|
-
{
|
|
2523
|
-
"kind": "field",
|
|
2524
|
-
"name": "assistantIconSafe",
|
|
2525
|
-
"type": {
|
|
2526
|
-
"text": "string"
|
|
2527
|
-
},
|
|
2528
|
-
"default": "`<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.5 5 C9.5 11.4 11.1 13 17.5 13 C11.1 13 9.5 14.6 9.5 21 C9.5 14.6 7.9 13 1.5 13 C7.9 13 9.5 11.4 9.5 5 Z\" fill=\"currentColor\"/><path d=\"M17 2.5 C17 5.7 17.8 6.5 21 6.5 C17.8 6.5 17 7.3 17 10.5 C17 7.3 16.2 6.5 13 6.5 C16.2 6.5 17 5.7 17 2.5 Z\" fill=\"currentColor\"/><path d=\"M17.5 15 C17.5 17 18 17.5 20 17.5 C18 17.5 17.5 18 17.5 20 C17.5 18 17 17.5 15 17.5 C17 17.5 17.5 17 17.5 15 Z\" fill=\"currentColor\"/></svg>`",
|
|
2529
|
-
"description": "Sanitized `assistantIcon`, or the default sparkle mark; bound into the template. @internal"
|
|
2383
|
+
"parameters": [
|
|
2384
|
+
{
|
|
2385
|
+
"name": "vendor",
|
|
2386
|
+
"type": {
|
|
2387
|
+
"text": "string"
|
|
2388
|
+
}
|
|
2389
|
+
}
|
|
2390
|
+
],
|
|
2391
|
+
"description": "Adopt a vendor the app read back from its own store — the same registry move as\nTieredAIProviderSwitcher.switchTo, without the `onSwitch` callback, because this\nvalue came FROM the store and writing it back would be a pointless round-trip on load.\n\nExists because registration has to stay synchronous: an element that connects before the\ntoken is registered caches the platform's no-op fallback, so an app cannot await its\nstored preference before constructing this. It boots on `initialVendor` and adopts the\nstored one a moment later, through a registry that is mutable and held by reference."
|
|
2530
2392
|
},
|
|
2531
2393
|
{
|
|
2532
2394
|
"kind": "method",
|
|
2533
|
-
"name": "
|
|
2534
|
-
"privacy": "protected",
|
|
2395
|
+
"name": "subscribe",
|
|
2535
2396
|
"return": {
|
|
2536
2397
|
"type": {
|
|
2537
|
-
"text": "void"
|
|
2398
|
+
"text": "() => void"
|
|
2538
2399
|
}
|
|
2539
|
-
}
|
|
2540
|
-
},
|
|
2541
|
-
{
|
|
2542
|
-
"kind": "field",
|
|
2543
|
-
"name": "userIcon",
|
|
2544
|
-
"type": {
|
|
2545
|
-
"text": "string | undefined"
|
|
2546
|
-
},
|
|
2547
|
-
"description": "Inline SVG markup overriding the default user \"person\" avatar. The markup is\nsanitized (SVG profile) before rendering and uses the avatar's theme colour\nvia `currentColor`. For a raster/photo avatar set `userImageSrc` instead,\nwhich takes precedence."
|
|
2548
|
-
},
|
|
2549
|
-
{
|
|
2550
|
-
"kind": "field",
|
|
2551
|
-
"name": "userIconSafe",
|
|
2552
|
-
"type": {
|
|
2553
|
-
"text": "string"
|
|
2554
2400
|
},
|
|
2555
|
-
"
|
|
2556
|
-
|
|
2401
|
+
"parameters": [
|
|
2402
|
+
{
|
|
2403
|
+
"name": "listener",
|
|
2404
|
+
"type": {
|
|
2405
|
+
"text": "(vendor: string) => void"
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
]
|
|
2557
2409
|
},
|
|
2558
2410
|
{
|
|
2559
2411
|
"kind": "method",
|
|
2560
|
-
"name": "
|
|
2561
|
-
"privacy": "
|
|
2412
|
+
"name": "apply",
|
|
2413
|
+
"privacy": "private",
|
|
2562
2414
|
"return": {
|
|
2563
2415
|
"type": {
|
|
2564
2416
|
"text": "void"
|
|
2565
2417
|
}
|
|
2566
|
-
}
|
|
2567
|
-
},
|
|
2568
|
-
{
|
|
2569
|
-
"kind": "field",
|
|
2570
|
-
"name": "placeholder",
|
|
2571
|
-
"type": {
|
|
2572
|
-
"text": "string"
|
|
2573
|
-
},
|
|
2574
|
-
"default": "'Message assistant...'"
|
|
2575
|
-
},
|
|
2576
|
-
{
|
|
2577
|
-
"kind": "field",
|
|
2578
|
-
"name": "popoutMode",
|
|
2579
|
-
"type": {
|
|
2580
|
-
"text": "PopoutMode | undefined"
|
|
2581
|
-
},
|
|
2582
|
-
"description": "Controls the pop-out button shown next to the settings cog.\n\"expand\" — in bubble, expands to layout panel (fires chat-popout).\n\"collapse\" — in layout panel, collapses back to bubble (fires chat-popin).\nAbsent — no button (default standalone behaviour, no breaking change)."
|
|
2583
|
-
},
|
|
2584
|
-
{
|
|
2585
|
-
"kind": "field",
|
|
2586
|
-
"name": "agents",
|
|
2587
|
-
"type": {
|
|
2588
|
-
"text": "AgentConfig[] | undefined"
|
|
2589
|
-
},
|
|
2590
|
-
"description": "Agent configuration. Each user message is routed to the appropriate specialist\nbased on intent. With a single entry, orchestration is skipped."
|
|
2591
|
-
},
|
|
2592
|
-
{
|
|
2593
|
-
"kind": "field",
|
|
2594
|
-
"name": "chatConfig",
|
|
2595
|
-
"type": {
|
|
2596
|
-
"text": "ChatConfig"
|
|
2597
|
-
},
|
|
2598
|
-
"default": "{}"
|
|
2599
|
-
},
|
|
2600
|
-
{
|
|
2601
|
-
"kind": "field",
|
|
2602
|
-
"name": "persistence",
|
|
2603
|
-
"type": {
|
|
2604
|
-
"text": "SessionPersistenceConfig"
|
|
2605
|
-
},
|
|
2606
|
-
"default": "{}",
|
|
2607
|
-
"description": "Optional session persistence (GENC-1351). Off by default — set `enabled`\nand a `provider` (e.g. a `WebStorageSessionProvider`) to have the assistant\nautosave on idle and auto-restore the conversation on page reload. Exposed\nas a top-level property (like `agents`/`providerRegistry`) rather than via\n`chatConfig`, since the provider type lives in this package while\n`ChatConfig` lives in `foundation-ai`."
|
|
2608
|
-
},
|
|
2609
|
-
{
|
|
2610
|
-
"kind": "field",
|
|
2611
|
-
"name": "agentPicker",
|
|
2612
|
-
"type": {
|
|
2613
|
-
"text": "AgentPickerMode"
|
|
2614
|
-
},
|
|
2615
|
-
"description": "Resolved agent picker mode from `chatConfig.picker.mode`. Defaults to\n`'disabled'`.",
|
|
2616
|
-
"readonly": true
|
|
2617
|
-
},
|
|
2618
|
-
{
|
|
2619
|
-
"kind": "field",
|
|
2620
|
-
"name": "composerHiddenByConfig",
|
|
2621
|
-
"type": {
|
|
2622
|
-
"text": "boolean"
|
|
2623
|
-
},
|
|
2624
|
-
"description": "Whether the built-in composer (input row + attachment chips) is hidden by\nthe host's `chatConfig.ui.hideComposer` setting. Used by the template to\ngate those blocks. Marked `@volatile` because the `'while-splash'` branch\nreads `showingSplash` only conditionally, so FAST cannot rely on cached\ndependency tracking.",
|
|
2625
|
-
"readonly": true
|
|
2626
|
-
},
|
|
2627
|
-
{
|
|
2628
|
-
"kind": "field",
|
|
2629
|
-
"name": "debugStateFactory",
|
|
2630
|
-
"type": {
|
|
2631
|
-
"text": "() => unknown | undefined"
|
|
2632
|
-
}
|
|
2633
|
-
},
|
|
2634
|
-
{
|
|
2635
|
-
"kind": "field",
|
|
2636
|
-
"name": "debugRedux",
|
|
2637
|
-
"type": {
|
|
2638
|
-
"text": "boolean"
|
|
2639
|
-
},
|
|
2640
|
-
"default": "false",
|
|
2641
|
-
"description": "When set, enables Redux DevTools for this instance's session store."
|
|
2642
|
-
},
|
|
2643
|
-
{
|
|
2644
|
-
"kind": "field",
|
|
2645
|
-
"name": "_sessionRef",
|
|
2646
|
-
"type": {
|
|
2647
|
-
"text": "SessionStoreReturn | undefined"
|
|
2648
|
-
},
|
|
2649
|
-
"privacy": "private",
|
|
2650
|
-
"description": "Pointer to this session's redux store. `@observable` (GENC-1351 §5.12) so that\n**swapping** it — the in-place session switch/re-key (`switchSession`) —\nforces every store-backed getter binding to re-evaluate against the NEW store.\nWithout this, FAST's per-store slice tracking would leave the view subscribed\nto the old store after a swap and it wouldn't re-render. (A same-store reset via\nredux actions re-renders without this; a store *swap* needs it.)"
|
|
2651
|
-
},
|
|
2652
|
-
{
|
|
2653
|
-
"kind": "field",
|
|
2654
|
-
"name": "_gateContextTokens",
|
|
2655
|
-
"type": {
|
|
2656
|
-
"text": "number | undefined"
|
|
2657
2418
|
},
|
|
2658
|
-
"
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
},
|
|
2668
|
-
{
|
|
2669
|
-
"kind": "field",
|
|
2670
|
-
"name": "state",
|
|
2671
|
-
"type": {
|
|
2672
|
-
"text": "AiAssistantState"
|
|
2673
|
-
}
|
|
2419
|
+
"parameters": [
|
|
2420
|
+
{
|
|
2421
|
+
"name": "vendor",
|
|
2422
|
+
"type": {
|
|
2423
|
+
"text": "AITierVendor"
|
|
2424
|
+
}
|
|
2425
|
+
}
|
|
2426
|
+
],
|
|
2427
|
+
"description": "The registry move both entry points share, and nothing else."
|
|
2674
2428
|
},
|
|
2675
2429
|
{
|
|
2676
2430
|
"kind": "method",
|
|
2677
|
-
"name": "
|
|
2431
|
+
"name": "build",
|
|
2678
2432
|
"privacy": "private",
|
|
2679
2433
|
"return": {
|
|
2680
2434
|
"type": {
|
|
2681
|
-
"text": "
|
|
2435
|
+
"text": "Record<string, AIProvider>"
|
|
2682
2436
|
}
|
|
2683
2437
|
},
|
|
2684
2438
|
"parameters": [
|
|
2685
2439
|
{
|
|
2686
|
-
"name": "
|
|
2687
|
-
"optional": true,
|
|
2440
|
+
"name": "vendor",
|
|
2688
2441
|
"type": {
|
|
2689
|
-
"text": "
|
|
2442
|
+
"text": "AITierVendor"
|
|
2690
2443
|
}
|
|
2691
2444
|
}
|
|
2692
|
-
]
|
|
2693
|
-
"description": "Whether a state value counts as \"busy\" — a turn is active."
|
|
2445
|
+
]
|
|
2694
2446
|
},
|
|
2695
2447
|
{
|
|
2696
2448
|
"kind": "method",
|
|
2697
|
-
"name": "
|
|
2449
|
+
"name": "isKnownVendor",
|
|
2698
2450
|
"privacy": "private",
|
|
2699
2451
|
"return": {
|
|
2700
2452
|
"type": {
|
|
2701
|
-
"text": "
|
|
2453
|
+
"text": "vendor is AITierVendor"
|
|
2702
2454
|
}
|
|
2703
2455
|
},
|
|
2704
|
-
"
|
|
2705
|
-
|
|
2456
|
+
"parameters": [
|
|
2457
|
+
{
|
|
2458
|
+
"name": "vendor",
|
|
2459
|
+
"type": {
|
|
2460
|
+
"text": "string"
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
]
|
|
2464
|
+
}
|
|
2465
|
+
]
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
"kind": "function",
|
|
2469
|
+
"name": "registerTieredAIProviders",
|
|
2470
|
+
"return": {
|
|
2471
|
+
"type": {
|
|
2472
|
+
"text": "TieredAIProviderSwitcher"
|
|
2473
|
+
}
|
|
2474
|
+
},
|
|
2475
|
+
"parameters": [
|
|
2706
2476
|
{
|
|
2707
|
-
"
|
|
2708
|
-
"name": "busy",
|
|
2477
|
+
"name": "container",
|
|
2709
2478
|
"type": {
|
|
2710
|
-
"text": "
|
|
2711
|
-
}
|
|
2712
|
-
"description": "True while a turn is active — `loading` or `cancelling` (a stop was\nrequested but the turn is still winding down). The single \"is a turn\nrunning\" predicate; UI gates use this so `cancelling` behaves like\n`loading` everywhere. `@volatile` so the template re-evaluates it when the\nstore-backed `state` changes.",
|
|
2713
|
-
"readonly": true
|
|
2479
|
+
"text": "Container"
|
|
2480
|
+
}
|
|
2714
2481
|
},
|
|
2715
2482
|
{
|
|
2716
|
-
"
|
|
2717
|
-
"name": "sendBlocked",
|
|
2483
|
+
"name": "options",
|
|
2718
2484
|
"type": {
|
|
2719
|
-
"text": "
|
|
2720
|
-
}
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2485
|
+
"text": "Omit<TieredAIProviderSwitcherOptions, 'container'>"
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
],
|
|
2489
|
+
"description": "Build a TieredAIProviderSwitcher — which registers the tier-shaped provider\nregistry — and put it on the (AIProviderSwitcher:variable) token. Call once at app\nbootstrap."
|
|
2490
|
+
}
|
|
2491
|
+
],
|
|
2492
|
+
"exports": [
|
|
2493
|
+
{
|
|
2494
|
+
"kind": "js",
|
|
2495
|
+
"name": "TieredAIProviderSwitcher",
|
|
2496
|
+
"declaration": {
|
|
2497
|
+
"name": "TieredAIProviderSwitcher",
|
|
2498
|
+
"module": "src/provider/tiered-provider-switcher.ts"
|
|
2499
|
+
}
|
|
2500
|
+
},
|
|
2501
|
+
{
|
|
2502
|
+
"kind": "js",
|
|
2503
|
+
"name": "registerTieredAIProviders",
|
|
2504
|
+
"declaration": {
|
|
2505
|
+
"name": "registerTieredAIProviders",
|
|
2506
|
+
"module": "src/provider/tiered-provider-switcher.ts"
|
|
2507
|
+
}
|
|
2508
|
+
}
|
|
2509
|
+
]
|
|
2510
|
+
},
|
|
2511
|
+
{
|
|
2512
|
+
"kind": "javascript-module",
|
|
2513
|
+
"path": "src/main/attachment-controller.ts",
|
|
2514
|
+
"declarations": [],
|
|
2515
|
+
"exports": []
|
|
2516
|
+
},
|
|
2517
|
+
{
|
|
2518
|
+
"kind": "javascript-module",
|
|
2519
|
+
"path": "src/main/budget-controller.ts",
|
|
2520
|
+
"declarations": [],
|
|
2521
|
+
"exports": []
|
|
2522
|
+
},
|
|
2523
|
+
{
|
|
2524
|
+
"kind": "javascript-module",
|
|
2525
|
+
"path": "src/main/composer-menu-controller.ts",
|
|
2526
|
+
"declarations": [],
|
|
2527
|
+
"exports": []
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
"kind": "javascript-module",
|
|
2531
|
+
"path": "src/main/composer-resize-controller.ts",
|
|
2532
|
+
"declarations": [],
|
|
2533
|
+
"exports": []
|
|
2534
|
+
},
|
|
2535
|
+
{
|
|
2536
|
+
"kind": "javascript-module",
|
|
2537
|
+
"path": "src/main/context-gate-controller.ts",
|
|
2538
|
+
"declarations": [],
|
|
2539
|
+
"exports": []
|
|
2540
|
+
},
|
|
2541
|
+
{
|
|
2542
|
+
"kind": "javascript-module",
|
|
2543
|
+
"path": "src/main/cost-ledger-controller.ts",
|
|
2544
|
+
"declarations": [],
|
|
2545
|
+
"exports": []
|
|
2546
|
+
},
|
|
2547
|
+
{
|
|
2548
|
+
"kind": "javascript-module",
|
|
2549
|
+
"path": "src/main/index.ts",
|
|
2550
|
+
"declarations": [],
|
|
2551
|
+
"exports": [
|
|
2552
|
+
{
|
|
2553
|
+
"kind": "js",
|
|
2554
|
+
"name": "*",
|
|
2555
|
+
"declaration": {
|
|
2556
|
+
"name": "*",
|
|
2557
|
+
"package": "./main.template"
|
|
2558
|
+
}
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
"kind": "js",
|
|
2562
|
+
"name": "*",
|
|
2563
|
+
"declaration": {
|
|
2564
|
+
"name": "*",
|
|
2565
|
+
"package": "./main"
|
|
2566
|
+
}
|
|
2567
|
+
},
|
|
2568
|
+
{
|
|
2569
|
+
"kind": "js",
|
|
2570
|
+
"name": "*",
|
|
2571
|
+
"declaration": {
|
|
2572
|
+
"name": "*",
|
|
2573
|
+
"package": "./main.types"
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
]
|
|
2577
|
+
},
|
|
2578
|
+
{
|
|
2579
|
+
"kind": "javascript-module",
|
|
2580
|
+
"path": "src/main/main.styles.ts",
|
|
2581
|
+
"declarations": [
|
|
2582
|
+
{
|
|
2583
|
+
"kind": "variable",
|
|
2584
|
+
"name": "styles",
|
|
2585
|
+
"default": "css`\n ${baseStyles}\n ${\n /* The session menu's rows. Same partial the agent picker imports into its own\n shadow root — the one thing that keeps the two menus looking alike. */ ''\n }\n ${menuItemStyles}\n ${settingsModalStyles}\n`"
|
|
2586
|
+
}
|
|
2587
|
+
],
|
|
2588
|
+
"exports": [
|
|
2589
|
+
{
|
|
2590
|
+
"kind": "js",
|
|
2591
|
+
"name": "styles",
|
|
2592
|
+
"declaration": {
|
|
2593
|
+
"name": "styles",
|
|
2594
|
+
"module": "src/main/main.styles.ts"
|
|
2595
|
+
}
|
|
2596
|
+
}
|
|
2597
|
+
]
|
|
2598
|
+
},
|
|
2599
|
+
{
|
|
2600
|
+
"kind": "javascript-module",
|
|
2601
|
+
"path": "src/main/main.template.ts",
|
|
2602
|
+
"declarations": [
|
|
2603
|
+
{
|
|
2604
|
+
"kind": "variable",
|
|
2605
|
+
"name": "messageTimestampTemplate",
|
|
2606
|
+
"default": "html<ChatMessage, FoundationAiAssistant>`\n <time\n class=\"message-timestamp\"\n part=\"message-timestamp\"\n datetime=\"${(m) => messageTimestampDateTime(m.timestamp)}\"\n >\n <span aria-hidden=\"true\">\n ${(m, c) => formatMessageTimestamp(m.timestamp, c.parent.timestampClock)}\n </span>\n <span class=\"visually-hidden\">${(m) => formatAbsoluteTimestamp(m.timestamp)}</span>\n </time>\n`",
|
|
2607
|
+
"description": "The timestamp shown beside the sender name (GENC-1257).\n\nTwo strings, not one. A screen reader announces a `<time>` element's TEXT — it has no\nimplicit ARIA role, and the `datetime` attribute is never surfaced to the user — so the\nrelative text is hidden from assistive tech and paired with a visually-hidden absolute\nstring. Otherwise AT would hear \"5 minutes ago\" with nothing to anchor it, and in\n`'hover'` mode would hear it for a timestamp sighted users never asked to see.\n`datetime` stays because it is correct HTML and useful to tooling, not for a11y.\n\nOnly the VISUAL reveal is hover-gated, in CSS — see `.message-timestamp`. `opacity: 0`\nleaves the element in the accessibility tree, so AT gets a time in both visible modes;\n`'off'` is the only mode that removes it.\n\nReads `timestampClock` rather than `Date.now()` so every row shares one invalidatable\nclock and a tick re-evaluates them all; see `FoundationAiAssistant.timestampClock`."
|
|
2608
|
+
},
|
|
2609
|
+
{
|
|
2610
|
+
"kind": "function",
|
|
2611
|
+
"name": "FoundationAiAssistantTemplate",
|
|
2612
|
+
"return": {
|
|
2613
|
+
"type": {
|
|
2614
|
+
"text": "ViewTemplate<FoundationAiAssistant>"
|
|
2615
|
+
}
|
|
2616
|
+
},
|
|
2617
|
+
"parameters": [
|
|
2747
2618
|
{
|
|
2748
|
-
"
|
|
2749
|
-
"
|
|
2619
|
+
"name": "designSystemPrefix",
|
|
2620
|
+
"type": {
|
|
2621
|
+
"text": "string"
|
|
2622
|
+
}
|
|
2623
|
+
}
|
|
2624
|
+
]
|
|
2625
|
+
}
|
|
2626
|
+
],
|
|
2627
|
+
"exports": [
|
|
2628
|
+
{
|
|
2629
|
+
"kind": "js",
|
|
2630
|
+
"name": "messageTimestampTemplate",
|
|
2631
|
+
"declaration": {
|
|
2632
|
+
"name": "messageTimestampTemplate",
|
|
2633
|
+
"module": "src/main/main.template.ts"
|
|
2634
|
+
}
|
|
2635
|
+
},
|
|
2636
|
+
{
|
|
2637
|
+
"kind": "js",
|
|
2638
|
+
"name": "FoundationAiAssistantTemplate",
|
|
2639
|
+
"declaration": {
|
|
2640
|
+
"name": "FoundationAiAssistantTemplate",
|
|
2641
|
+
"module": "src/main/main.template.ts"
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
]
|
|
2645
|
+
},
|
|
2646
|
+
{
|
|
2647
|
+
"kind": "javascript-module",
|
|
2648
|
+
"path": "src/main/main.ts",
|
|
2649
|
+
"declarations": [
|
|
2650
|
+
{
|
|
2651
|
+
"kind": "variable",
|
|
2652
|
+
"name": "sparkleIconSvg",
|
|
2653
|
+
"default": "`<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.5 5 C9.5 11.4 11.1 13 17.5 13 C11.1 13 9.5 14.6 9.5 21 C9.5 14.6 7.9 13 1.5 13 C7.9 13 9.5 11.4 9.5 5 Z\" fill=\"currentColor\"/><path d=\"M17 2.5 C17 5.7 17.8 6.5 21 6.5 C17.8 6.5 17 7.3 17 10.5 C17 7.3 16.2 6.5 13 6.5 C16.2 6.5 17 5.7 17 2.5 Z\" fill=\"currentColor\"/><path d=\"M17.5 15 C17.5 17 18 17.5 20 17.5 C18 17.5 17.5 18 17.5 20 C17.5 18 17 17.5 15 17.5 C17 17.5 17.5 17 17.5 15 Z\" fill=\"currentColor\"/></svg>`",
|
|
2654
|
+
"description": "Three-star AI \"sparkle\" mark — the conventional AI signifier; default assistant avatar."
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
"kind": "variable",
|
|
2658
|
+
"name": "userIconSvg",
|
|
2659
|
+
"default": "`<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\" fill=\"currentColor\"/></svg>`",
|
|
2660
|
+
"description": "Person silhouette — default user avatar."
|
|
2661
|
+
},
|
|
2662
|
+
{
|
|
2663
|
+
"kind": "variable",
|
|
2664
|
+
"name": "genesisIconSvg",
|
|
2665
|
+
"default": "`<svg viewBox=\"-4 0 30 26\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M18.7702 23.0437C18.7702 22.4675 18.8526 21.8089 19.0995 21.3149C19.3465 20.7386 19.6758 20.2447 20.0874 19.833C20.4991 19.4214 20.993 19.0921 21.5693 18.8451C22.1456 18.5982 22.7219 18.5158 23.2981 18.5158H25.9326V11.6828H19.1819V14.3172C19.1819 15.5521 18.6879 16.7047 17.8647 17.5279C17.0414 18.3512 15.8888 18.8451 14.7363 18.9275H6.7507V6.99025H16.4651V0.157227H3.54C2.63442 0.157227 1.72884 0.568855 1.07023 1.22746C0.411628 1.88606 0 2.79165 0 3.77955V22.2205C0 23.1261 0.411628 24.0316 1.07023 24.7726C1.72884 25.4312 2.63442 25.8428 3.54 25.8428H18.7702V23.0437Z\" fill=\"currentColor\"/></svg>`",
|
|
2666
|
+
"description": "Genesis G-mark — opt-in assistant avatar (the default before the sparkle mark)."
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
"kind": "class",
|
|
2670
|
+
"description": "Foundation AI Assistant component.",
|
|
2671
|
+
"name": "FoundationAiAssistant",
|
|
2672
|
+
"members": [
|
|
2673
|
+
{
|
|
2674
|
+
"kind": "field",
|
|
2675
|
+
"name": "composerResize",
|
|
2750
2676
|
"privacy": "private",
|
|
2751
|
-
"
|
|
2752
|
-
|
|
2753
|
-
"text": "void"
|
|
2754
|
-
}
|
|
2755
|
-
},
|
|
2756
|
-
"description": "Apply a `session-key` re-key that arrived mid-turn and was deferred by\n`switchSession`'s busy guard (GENC-1351 §5.12). Run at each point the driver\nreturns to idle, BEFORE `applyDeferredAgentsSwap` — a switch rebuilds the\ndriver against the current agents, so a pending agents-swap then no-ops."
|
|
2677
|
+
"readonly": true,
|
|
2678
|
+
"default": "new ComposerResizeController({\n enabled: () => this.chatConfig.ui?.resizableInput !== false,\n inputEl: () => this.chatInputEl,\n messagesEl: () => this.messagesEl,\n })"
|
|
2757
2679
|
},
|
|
2758
2680
|
{
|
|
2759
|
-
"kind": "
|
|
2760
|
-
"name": "
|
|
2681
|
+
"kind": "field",
|
|
2682
|
+
"name": "composerMenus",
|
|
2761
2683
|
"privacy": "private",
|
|
2762
|
-
"
|
|
2684
|
+
"readonly": true,
|
|
2685
|
+
"default": "new ComposerMenuController(this, {\n agentPickerOpen: this.accessor('agentPickerOpen'),\n sessionMenuOpen: this.accessor('sessionMenuOpen'),\n focusInput: () => this.chatInputEl?.focus(),\n resetSessionConfirmations: () => {\n this.confirmingClear = false;\n this.confirmingCompact = false;\n },\n logMeta: (type, detail) => this.logMeta(type, detail),\n })"
|
|
2763
2686
|
},
|
|
2764
2687
|
{
|
|
2765
2688
|
"kind": "field",
|
|
2766
|
-
"name": "
|
|
2767
|
-
"
|
|
2768
|
-
|
|
2769
|
-
}
|
|
2689
|
+
"name": "attachmentCtrl",
|
|
2690
|
+
"privacy": "private",
|
|
2691
|
+
"readonly": true,
|
|
2692
|
+
"default": "new AttachmentController(this, {\n acceptedFiles: () => this.chatConfig.ui?.acceptedFiles,\n logMeta: (type, detail) => this.logMeta(type, detail),\n })"
|
|
2770
2693
|
},
|
|
2771
2694
|
{
|
|
2772
2695
|
"kind": "field",
|
|
2773
|
-
"name": "
|
|
2774
|
-
"
|
|
2775
|
-
|
|
2776
|
-
}
|
|
2696
|
+
"name": "contextGateCtrl",
|
|
2697
|
+
"privacy": "private",
|
|
2698
|
+
"readonly": true,
|
|
2699
|
+
"default": "new ContextGateController({\n chatConfig: () => this.chatConfig,\n messages: () => this.messages,\n contextTokens: () => this.contextTokens,\n contextLimit: () => this.contextLimit,\n gateContextTokens: () => this._gateContextTokens,\n contextReserve: () => this.contextReserve,\n preambleTokens: () => this.driver?.getPreambleTokens?.(),\n compactionPlanFor: (options) => this.driver?.getCompactionPlan?.(options) ?? null,\n bannerVisible: () => this.bannerVisible,\n effectiveBlockedReason: () => this.effectiveBlockedReason,\n flowOwnerAgentName: () => this.flowOwnerAgentName,\n })",
|
|
2700
|
+
"description": "Pure derivation — owns no state. Reaches the driver only through the two\ncallbacks below, so it stays clear of the stateful-agent surface (§11.2\nconstraint 2) and of redux entirely."
|
|
2777
2701
|
},
|
|
2778
2702
|
{
|
|
2779
2703
|
"kind": "field",
|
|
2780
|
-
"name": "
|
|
2781
|
-
"
|
|
2782
|
-
|
|
2783
|
-
},
|
|
2784
|
-
"description": "
|
|
2704
|
+
"name": "costLedger",
|
|
2705
|
+
"privacy": "private",
|
|
2706
|
+
"readonly": true,
|
|
2707
|
+
"default": "new CostLedgerController({\n chatConfig: () => this.chatConfig,\n messages: () => this.messages,\n sessionUsage: () => this.sessionUsage,\n providerStatuses: () => this.providerStatuses,\n persistenceActive: () => this.persistenceActive,\n stateKey: () => this.getStateKey(),\n headerTitle: () => this.headerTitle,\n provider: () => this.persistence.provider,\n elementId: () => this.id,\n })",
|
|
2708
|
+
"description": "Cost accounting and the persisted build-history ledger (GENC-1475). Reads the live\nsession through callbacks and owns the rows, the load/write latches and the debounce\ntimer — the element keeps only the names the settings modal binds."
|
|
2785
2709
|
},
|
|
2786
2710
|
{
|
|
2787
2711
|
"kind": "field",
|
|
2788
|
-
"name": "
|
|
2789
|
-
"
|
|
2790
|
-
|
|
2791
|
-
},
|
|
2792
|
-
"description": "
|
|
2712
|
+
"name": "budget",
|
|
2713
|
+
"privacy": "private",
|
|
2714
|
+
"readonly": true,
|
|
2715
|
+
"default": "new BudgetController({\n sessionRef: () => this._sessionRef,\n providerStatuses: () => this.providerStatuses,\n providerRegistry: () => this.providerRegistry,\n chatConfig: () => this.chatConfig,\n })",
|
|
2716
|
+
"description": "The AI-spend budget: vendor walls, the derived composer lock, the banner copy\nand the settings meter (GENC-1464).\n\nTakes the session store itself rather than a callback per field — see\n`BudgetDeps` for why this one differs from its siblings."
|
|
2793
2717
|
},
|
|
2794
2718
|
{
|
|
2795
2719
|
"kind": "field",
|
|
2796
|
-
"name": "
|
|
2797
|
-
"
|
|
2798
|
-
|
|
2799
|
-
},
|
|
2800
|
-
"description": "
|
|
2720
|
+
"name": "settings",
|
|
2721
|
+
"privacy": "private",
|
|
2722
|
+
"readonly": true,
|
|
2723
|
+
"default": "new SettingsModalController({\n chatConfig: () => this.chatConfig,\n contextTokens: () => this.contextTokens,\n contextLimit: () => this.contextLimit,\n budgetUsageVisible: () => this.budget.settingsUsageVisible,\n costConfig: () => this.costLedger.config,\n costHistoryLength: () => this.costLedger.history.length,\n liveCostSessionTitle: () => this.costLedger.liveTitle,\n providerStatusCount: () => this.providerStatuses.length,\n sessionRef: () => this._sessionRef,\n stateKey: () => this.getStateKey(),\n popoutMode: () => this.popoutMode,\n headerTitle: () => this.headerTitle,\n appSettingsProvider: () => this.appSettingsProvider,\n modal: () => this.settingsModal,\n tabsEl: () => this.settingsTabsEl,\n requestBudgetRefresh: () => this.requestBudgetRefresh(),\n logMeta: (type, detail) => this.logMeta(type, detail),\n })",
|
|
2724
|
+
"description": "The settings modal (`docs/code-health.md` §3). Reaches the two design-system\nrefs through callbacks, because the template writes them by name — see\n`SettingsModalDeps`."
|
|
2801
2725
|
},
|
|
2802
2726
|
{
|
|
2803
2727
|
"kind": "field",
|
|
2804
|
-
"name": "
|
|
2728
|
+
"name": "providerRegistry",
|
|
2805
2729
|
"type": {
|
|
2806
|
-
"text": "
|
|
2730
|
+
"text": "AIProviderRegistry"
|
|
2731
|
+
}
|
|
2732
|
+
},
|
|
2733
|
+
{
|
|
2734
|
+
"kind": "field",
|
|
2735
|
+
"name": "appSettingsProvider",
|
|
2736
|
+
"type": {
|
|
2737
|
+
"text": "AssistantAppSettingsProvider"
|
|
2738
|
+
}
|
|
2739
|
+
},
|
|
2740
|
+
{
|
|
2741
|
+
"kind": "field",
|
|
2742
|
+
"name": "designSystemPrefix",
|
|
2743
|
+
"type": {
|
|
2744
|
+
"text": "string"
|
|
2807
2745
|
},
|
|
2808
|
-
"
|
|
2746
|
+
"default": "'rapid'"
|
|
2809
2747
|
},
|
|
2810
2748
|
{
|
|
2811
2749
|
"kind": "field",
|
|
2812
|
-
"name": "
|
|
2750
|
+
"name": "headerTitle",
|
|
2813
2751
|
"type": {
|
|
2814
|
-
"text": "
|
|
2752
|
+
"text": "string"
|
|
2815
2753
|
},
|
|
2816
|
-
"
|
|
2754
|
+
"default": "'Genesis Assistant'"
|
|
2817
2755
|
},
|
|
2818
2756
|
{
|
|
2819
2757
|
"kind": "field",
|
|
2820
|
-
"name": "
|
|
2758
|
+
"name": "sessionKey",
|
|
2821
2759
|
"type": {
|
|
2822
|
-
"text": "
|
|
2760
|
+
"text": "string | undefined"
|
|
2823
2761
|
},
|
|
2824
|
-
"description": "
|
|
2762
|
+
"description": "Explicit session/persistence key (GENC-1351 §5.12). When set, this is the\nsession identity — the key for the driver/store/persister/diagnostics\nregistries and the `sessionKey` passed to the persistence provider — taking\nprecedence over the DOM `id`. A host that scopes persistence per-entity\n(e.g. one chat session per project) binds this to a stable per-entity id;\nchanging it on a **connected** element re-keys the session in place — tears\ndown the current conversation and restores the new key's — via\n`switchSession`. Falls back to `id` when unset,\nso existing consumers are unaffected."
|
|
2825
2763
|
},
|
|
2826
2764
|
{
|
|
2827
2765
|
"kind": "field",
|
|
2828
|
-
"name": "
|
|
2766
|
+
"name": "imageSrc",
|
|
2829
2767
|
"type": {
|
|
2830
|
-
"text": "
|
|
2768
|
+
"text": "string | undefined"
|
|
2769
|
+
}
|
|
2770
|
+
},
|
|
2771
|
+
{
|
|
2772
|
+
"kind": "field",
|
|
2773
|
+
"name": "userImageSrc",
|
|
2774
|
+
"type": {
|
|
2775
|
+
"text": "string | undefined"
|
|
2776
|
+
}
|
|
2777
|
+
},
|
|
2778
|
+
{
|
|
2779
|
+
"kind": "field",
|
|
2780
|
+
"name": "assistantIcon",
|
|
2781
|
+
"type": {
|
|
2782
|
+
"text": "string | undefined"
|
|
2831
2783
|
},
|
|
2832
|
-
"
|
|
2833
|
-
|
|
2784
|
+
"description": "Inline SVG markup overriding the default assistant \"sparkle\" avatar. The\nmarkup is sanitized (SVG profile) before rendering and uses the avatar's\ntheme colour via `currentColor`. For a raster/photo avatar set `imageSrc`\ninstead, which takes precedence. Set to `genesisIconSvg` to restore the\nGenesis G-mark."
|
|
2785
|
+
},
|
|
2786
|
+
{
|
|
2787
|
+
"kind": "field",
|
|
2788
|
+
"name": "assistantIconSafe",
|
|
2789
|
+
"type": {
|
|
2790
|
+
"text": "string"
|
|
2791
|
+
},
|
|
2792
|
+
"default": "`<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.5 5 C9.5 11.4 11.1 13 17.5 13 C11.1 13 9.5 14.6 9.5 21 C9.5 14.6 7.9 13 1.5 13 C7.9 13 9.5 11.4 9.5 5 Z\" fill=\"currentColor\"/><path d=\"M17 2.5 C17 5.7 17.8 6.5 21 6.5 C17.8 6.5 17 7.3 17 10.5 C17 7.3 16.2 6.5 13 6.5 C16.2 6.5 17 5.7 17 2.5 Z\" fill=\"currentColor\"/><path d=\"M17.5 15 C17.5 17 18 17.5 20 17.5 C18 17.5 17.5 18 17.5 20 C17.5 18 17 17.5 15 17.5 C17 17.5 17.5 17 17.5 15 Z\" fill=\"currentColor\"/></svg>`",
|
|
2793
|
+
"description": "Sanitized `assistantIcon`, or the default sparkle mark; bound into the template. @internal"
|
|
2834
2794
|
},
|
|
2835
2795
|
{
|
|
2836
2796
|
"kind": "method",
|
|
2837
|
-
"name": "
|
|
2838
|
-
"privacy": "
|
|
2797
|
+
"name": "assistantIconChanged",
|
|
2798
|
+
"privacy": "protected",
|
|
2839
2799
|
"return": {
|
|
2840
2800
|
"type": {
|
|
2841
2801
|
"text": "void"
|
|
2842
2802
|
}
|
|
2803
|
+
}
|
|
2804
|
+
},
|
|
2805
|
+
{
|
|
2806
|
+
"kind": "field",
|
|
2807
|
+
"name": "userIcon",
|
|
2808
|
+
"type": {
|
|
2809
|
+
"text": "string | undefined"
|
|
2843
2810
|
},
|
|
2844
|
-
"description": "
|
|
2811
|
+
"description": "Inline SVG markup overriding the default user \"person\" avatar. The markup is\nsanitized (SVG profile) before rendering and uses the avatar's theme colour\nvia `currentColor`. For a raster/photo avatar set `userImageSrc` instead,\nwhich takes precedence."
|
|
2845
2812
|
},
|
|
2846
2813
|
{
|
|
2847
2814
|
"kind": "field",
|
|
2848
|
-
"name": "
|
|
2815
|
+
"name": "userIconSafe",
|
|
2849
2816
|
"type": {
|
|
2850
|
-
"text": "
|
|
2817
|
+
"text": "string"
|
|
2851
2818
|
},
|
|
2852
|
-
"
|
|
2819
|
+
"default": "`<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\" fill=\"currentColor\"/></svg>`",
|
|
2820
|
+
"description": "Sanitized `userIcon`, or the default person mark; bound into the template. @internal"
|
|
2821
|
+
},
|
|
2822
|
+
{
|
|
2823
|
+
"kind": "method",
|
|
2824
|
+
"name": "userIconChanged",
|
|
2825
|
+
"privacy": "protected",
|
|
2826
|
+
"return": {
|
|
2827
|
+
"type": {
|
|
2828
|
+
"text": "void"
|
|
2829
|
+
}
|
|
2830
|
+
}
|
|
2853
2831
|
},
|
|
2854
2832
|
{
|
|
2855
2833
|
"kind": "field",
|
|
2856
|
-
"name": "
|
|
2834
|
+
"name": "placeholder",
|
|
2857
2835
|
"type": {
|
|
2858
|
-
"text": "
|
|
2836
|
+
"text": "string"
|
|
2859
2837
|
},
|
|
2860
|
-
"
|
|
2838
|
+
"default": "'Message assistant...'"
|
|
2861
2839
|
},
|
|
2862
2840
|
{
|
|
2863
2841
|
"kind": "field",
|
|
2864
|
-
"name": "
|
|
2842
|
+
"name": "popoutMode",
|
|
2865
2843
|
"type": {
|
|
2866
|
-
"text": "
|
|
2844
|
+
"text": "PopoutMode | undefined"
|
|
2867
2845
|
},
|
|
2868
|
-
"description": "
|
|
2846
|
+
"description": "Controls the pop-out button shown next to the settings cog.\n\"expand\" — in bubble, expands to layout panel (fires chat-popout).\n\"collapse\" — in layout panel, collapses back to bubble (fires chat-popin).\nAbsent — no button (default standalone behaviour, no breaking change)."
|
|
2869
2847
|
},
|
|
2870
2848
|
{
|
|
2871
2849
|
"kind": "field",
|
|
2872
|
-
"name": "
|
|
2850
|
+
"name": "agents",
|
|
2873
2851
|
"type": {
|
|
2874
|
-
"text": "
|
|
2852
|
+
"text": "AgentConfig[] | undefined"
|
|
2875
2853
|
},
|
|
2876
|
-
"description": "
|
|
2854
|
+
"description": "Agent configuration. Each user message is routed to the appropriate specialist\nbased on intent. With a single entry, orchestration is skipped."
|
|
2877
2855
|
},
|
|
2878
2856
|
{
|
|
2879
2857
|
"kind": "field",
|
|
2880
|
-
"name": "
|
|
2858
|
+
"name": "chatConfig",
|
|
2881
2859
|
"type": {
|
|
2882
|
-
"text": "
|
|
2860
|
+
"text": "ChatConfig"
|
|
2883
2861
|
},
|
|
2884
|
-
"
|
|
2862
|
+
"default": "{}"
|
|
2885
2863
|
},
|
|
2886
2864
|
{
|
|
2887
2865
|
"kind": "field",
|
|
2888
|
-
"name": "
|
|
2866
|
+
"name": "persistence",
|
|
2889
2867
|
"type": {
|
|
2890
|
-
"text": "
|
|
2868
|
+
"text": "SessionPersistenceConfig"
|
|
2891
2869
|
},
|
|
2892
|
-
"
|
|
2870
|
+
"default": "{}",
|
|
2871
|
+
"description": "Optional session persistence (GENC-1351). Off by default — set `enabled`\nand a `provider` (e.g. a `WebStorageSessionProvider`) to have the assistant\nautosave on idle and auto-restore the conversation on page reload. Exposed\nas a top-level property (like `agents`/`providerRegistry`) rather than via\n`chatConfig`, since the provider type lives in this package while\n`ChatConfig` lives in `foundation-ai`."
|
|
2893
2872
|
},
|
|
2894
2873
|
{
|
|
2895
2874
|
"kind": "field",
|
|
2896
|
-
"name": "
|
|
2875
|
+
"name": "agentPicker",
|
|
2897
2876
|
"type": {
|
|
2898
|
-
"text": "
|
|
2877
|
+
"text": "AgentPickerMode"
|
|
2899
2878
|
},
|
|
2900
|
-
"description": "
|
|
2879
|
+
"description": "Resolved agent picker mode from `chatConfig.picker.mode`. Defaults to\n`'disabled'`.",
|
|
2901
2880
|
"readonly": true
|
|
2902
2881
|
},
|
|
2903
2882
|
{
|
|
2904
2883
|
"kind": "field",
|
|
2905
|
-
"name": "
|
|
2884
|
+
"name": "composerHiddenByConfig",
|
|
2906
2885
|
"type": {
|
|
2907
|
-
"text": "
|
|
2886
|
+
"text": "boolean"
|
|
2908
2887
|
},
|
|
2909
|
-
"description": "
|
|
2888
|
+
"description": "Whether the built-in composer (input row + attachment chips) is hidden by\nthe host's `chatConfig.ui.hideComposer` setting. Used by the template to\ngate those blocks. Marked `@volatile` because the `'while-splash'` branch\nreads `showingSplash` only conditionally, so FAST cannot rely on cached\ndependency tracking.",
|
|
2910
2889
|
"readonly": true
|
|
2911
2890
|
},
|
|
2912
2891
|
{
|
|
2913
|
-
"kind": "
|
|
2914
|
-
"name": "
|
|
2915
|
-
"
|
|
2916
|
-
"
|
|
2917
|
-
|
|
2918
|
-
|
|
2892
|
+
"kind": "field",
|
|
2893
|
+
"name": "debugStateFactory",
|
|
2894
|
+
"type": {
|
|
2895
|
+
"text": "() => unknown | undefined"
|
|
2896
|
+
}
|
|
2897
|
+
},
|
|
2898
|
+
{
|
|
2899
|
+
"kind": "field",
|
|
2900
|
+
"name": "debugRedux",
|
|
2901
|
+
"type": {
|
|
2902
|
+
"text": "boolean"
|
|
2919
2903
|
},
|
|
2920
|
-
"
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2904
|
+
"default": "false",
|
|
2905
|
+
"description": "When set, enables Redux DevTools for this instance's session store."
|
|
2906
|
+
},
|
|
2907
|
+
{
|
|
2908
|
+
"kind": "field",
|
|
2909
|
+
"name": "_sessionRef",
|
|
2910
|
+
"type": {
|
|
2911
|
+
"text": "SessionStoreReturn | undefined"
|
|
2912
|
+
},
|
|
2913
|
+
"privacy": "private",
|
|
2914
|
+
"description": "Pointer to this session's redux store. `@observable` (GENC-1351 §5.12) so that\n**swapping** it — the in-place session switch/re-key (`switchSession`) —\nforces every store-backed getter binding to re-evaluate against the NEW store.\nWithout this, FAST's per-store slice tracking would leave the view subscribed\nto the old store after a swap and it wouldn't re-render. (A same-store reset via\nredux actions re-renders without this; a store *swap* needs it.)"
|
|
2915
|
+
},
|
|
2916
|
+
{
|
|
2917
|
+
"kind": "field",
|
|
2918
|
+
"name": "_gateContextTokens",
|
|
2919
|
+
"type": {
|
|
2920
|
+
"text": "number | undefined"
|
|
2921
|
+
},
|
|
2922
|
+
"privacy": "private",
|
|
2923
|
+
"description": "FoundationAiAssistant.contextTokens as of the last moment no turn was\nrunning — the figure FoundationAiAssistant.contextGate is judged\nagainst (GENC-1582).\n\n**Why the gate reads a held figure and the gauge does not.** They answer\ndifferent questions. The gauge is a meter: \"how much context is in play right\nnow\", and a build that momentarily fills 900k of a 1M window should say so.\nThe gate answers \"may the next turn START\", which is only meaningful when no\nturn is running — the composer is disabled by `busy` throughout one anyway, so\na warning raised mid-turn is unactionable by construction.\n\nReading the live figure meant the pill went amber part-way through every large\nbuild and cleared itself at the end, because a `condenseWhen` agent's context\npeaks mid-turn and is shed before the turn finishes. A signal that fires and\nwithdraws on its own each time teaches people to ignore it.\n\n**Held, not latched.** The distinction matters, because `contextGate` is\ndocumented as derived-never-latched and the reason is a real dead end: a figure\npinned to a conversation that has since shrunk blocks the user out of the very\nactions that would fix it. This holds only for the duration of a turn and is\nrefreshed the moment one settles, so no shrink can outlive it — a compaction\nruns under `compacting` rather than `busy` and therefore updates it as it goes,\nand Clear drops it outright. What it costs is one turn of lag: a turn that\nballoons the resting size does not warn until it ends, which is the same trade\nthe flow-owner soften already makes deliberately.\n\nUnset falls back to the live figure, which is correct wherever there is no held\nvalue yet — first paint, and a remount, both of which happen at rest."
|
|
2924
|
+
},
|
|
2925
|
+
{
|
|
2926
|
+
"kind": "field",
|
|
2927
|
+
"name": "messages",
|
|
2928
|
+
"type": {
|
|
2929
|
+
"text": "ChatMessage[]"
|
|
2930
|
+
}
|
|
2931
|
+
},
|
|
2932
|
+
{
|
|
2933
|
+
"kind": "field",
|
|
2934
|
+
"name": "state",
|
|
2935
|
+
"type": {
|
|
2936
|
+
"text": "AiAssistantState"
|
|
2937
|
+
}
|
|
2929
2938
|
},
|
|
2930
2939
|
{
|
|
2931
2940
|
"kind": "method",
|
|
2932
|
-
"name": "
|
|
2941
|
+
"name": "isBusyState",
|
|
2942
|
+
"privacy": "private",
|
|
2933
2943
|
"return": {
|
|
2934
2944
|
"type": {
|
|
2935
|
-
"text": "
|
|
2945
|
+
"text": "boolean"
|
|
2936
2946
|
}
|
|
2937
2947
|
},
|
|
2938
2948
|
"parameters": [
|
|
2939
2949
|
{
|
|
2940
|
-
"name": "
|
|
2941
|
-
"type": {
|
|
2942
|
-
"text": "AIProviderType"
|
|
2943
|
-
}
|
|
2944
|
-
},
|
|
2945
|
-
{
|
|
2946
|
-
"name": "blocked",
|
|
2947
|
-
"type": {
|
|
2948
|
-
"text": "boolean"
|
|
2949
|
-
}
|
|
2950
|
-
},
|
|
2951
|
-
{
|
|
2952
|
-
"name": "reason",
|
|
2950
|
+
"name": "s",
|
|
2953
2951
|
"optional": true,
|
|
2954
2952
|
"type": {
|
|
2955
|
-
"text": "
|
|
2953
|
+
"text": "AiAssistantState"
|
|
2956
2954
|
}
|
|
2957
2955
|
}
|
|
2958
2956
|
],
|
|
2959
|
-
"description": "
|
|
2957
|
+
"description": "Whether a state value counts as \"busy\" — a turn is active."
|
|
2960
2958
|
},
|
|
2961
2959
|
{
|
|
2962
2960
|
"kind": "method",
|
|
2963
|
-
"name": "
|
|
2961
|
+
"name": "rearmContextGate",
|
|
2962
|
+
"privacy": "private",
|
|
2964
2963
|
"return": {
|
|
2965
2964
|
"type": {
|
|
2966
|
-
"text": "
|
|
2965
|
+
"text": "void"
|
|
2967
2966
|
}
|
|
2968
2967
|
},
|
|
2969
|
-
"
|
|
2970
|
-
{
|
|
2971
|
-
"name": "vendor",
|
|
2972
|
-
"type": {
|
|
2973
|
-
"text": "string"
|
|
2974
|
-
}
|
|
2975
|
-
},
|
|
2976
|
-
{
|
|
2977
|
-
"name": "figures",
|
|
2978
|
-
"type": {
|
|
2979
|
-
"text": "VendorBudgetFigures | null"
|
|
2980
|
-
}
|
|
2981
|
-
}
|
|
2982
|
-
],
|
|
2983
|
-
"description": "Feed (or clear) one vendor's AI-spend figures for the settings-modal budget\nmeter — the numeric companion to\nFoundationAiAssistant.setVendorBlocked, and like it a host-driven\nwrite: the element meters nothing itself.\n\nThe meter renders a row for exactly the vendors that currently HAVE\nfigures. An **unlimited** vendor (the budget endpoint reports\n`unlimited: true` / `limitUsd: null`) is expressed by never feeding it —\nthere is deliberately no \"unlimited\" figure shape, because a bar with no\ncap has nothing truthful to fill to. `spentUsd` MAY exceed `budgetUsd`\n(the last allowed call can overshoot the cap): the row's text shows the\nreal figures and only the bar clamps.\n\nReturns `false` — and warns once, not per call — instead of throwing when\n`vendor` is not a budgeted vendor (`BUDGETED_VENDORS`, the proxy's own\nmetered list) or either figure is not a finite number `>= 0`. Invalid input\nchanges no state. Idempotent: re-feeding a vendor's current figures is a\nno-op, so hosts can re-feed unconditionally after every turn.\n\n`false` ALSO means \"not stored, because the element is not ready yet\": a\nfeed that lands before the element has its session store (a host calling\nahead of the first append, or during a pop-out remount) stores nothing and\nsays so, rather than reporting a write that never happened. That case is\ntransient and needs no host handling — the documented per-turn re-feed is\nwhat recovers it — so it is deliberately NOT warned about; the warn-once\nchannel is for garbage input only.\n\n`figures` is nullish-checked at run time, so `undefined` behaves exactly\nlike `null` and CLEARS that vendor's row. Untyped JS hosts feed this\nstraight from `GET /api/budget`, where a per-vendor lookup that misses\nyields `undefined`, not `null` — and \"no figures\" coherently means \"no\nrow\". The `| null` parameter type is unchanged for typed callers; the\nruntime is deliberately the more forgiving of the two.\n\nThe intended feed is the platform budget endpoint:\n\n```ts\n// `vendors` is an OBJECT keyed by vendor id, not an array.\nconst { vendors } = await (await fetch('/api/budget')).json();\nfor (const v of Object.values(vendors)) {\n if (v.unlimited || v.limitUsd == null) {\n assistantEl.setVendorBudget(v.vendor, null); // clear stale figures after a cap is lifted\n continue;\n }\n assistantEl.setVendorBudget(v.vendor, { budgetUsd: v.limitUsd, spentUsd: v.spentUsd });\n}\n```\n\nA host that meters its spend by source can pass an optional `segments` breakdown, and\nthe vendor's bar is drawn stacked with a legend naming each one (NEW-15):\n\n```ts\nassistantEl.setVendorBudget('anthropic', {\n budgetUsd: 50,\n spentUsd: 12.5,\n segments: [\n { id: 'app', label: 'App', spentUsd: 9 },\n { id: 'batch', label: 'Batch jobs', spentUsd: 3.5 },\n ],\n});\n```\n\nThe labels are yours — the assistant has no vocabulary for what a host spends money on.\nSegments may add up to less than `spentUsd` (the remainder draws unlabelled) but never\nto more; a breakdown that does, or that is otherwise malformed, is dropped with a debug\nlog and the single bar renders. Omit `segments` entirely and nothing about the meter\nchanges.\n\nRe-run it on mount and after each turn. Scope and lifetime follow the rest\nof the session slice (per `stateKey`, survives pop-in/out and \"Clear\" /\n\"New chat\") — except that the figures are NOT persisted to the session\nsnapshot: the server is authoritative and the host re-feeds at boot, so a\npersisted copy could only show stale dollars after a reload."
|
|
2968
|
+
"description": "Re-arm FoundationAiAssistant.contextGate against the size the turn\njust left behind (GENC-1582).\n\nThe final call of a turn is made AFTER `agentEnd` condensation fires, so by\nthe time a turn settles `contextTokens` is the resting figure rather than the\nmid-turn peak — which is the number the reserve's thresholds are drawn\nagainst.\n\n**Called from BOTH settle paths, and it has to be.** A turn does not end\nthrough the `state` setter: `send()`'s `finally` writes `setState('idle')`\nstraight to the captured session ref, because the element may have\ndisconnected mid-turn, and that block then replicates the parts of the\nsetter's settle that matter. Arming the gate inline in the setter therefore\narmed it on the one path a real turn never takes — the gate silently kept\nfalling back to the live figure and the hold did nothing at all. Found by\ndriving a real UI Builder turn and reading `_gateContextTokens`, which was\n`undefined` from start to finish; no unit test noticed, because the test\nharness sets `state` through the property.\n\nOne method rather than two assignments so the two paths cannot drift again."
|
|
2984
2969
|
},
|
|
2985
2970
|
{
|
|
2986
2971
|
"kind": "field",
|
|
2987
|
-
"name": "
|
|
2972
|
+
"name": "busy",
|
|
2988
2973
|
"type": {
|
|
2989
|
-
"text": "
|
|
2974
|
+
"text": "boolean"
|
|
2990
2975
|
},
|
|
2991
|
-
"description": "
|
|
2976
|
+
"description": "True while a turn is active — `loading` or `cancelling` (a stop was\nrequested but the turn is still winding down). The single \"is a turn\nrunning\" predicate; UI gates use this so `cancelling` behaves like\n`loading` everywhere. `@volatile` so the template re-evaluates it when the\nstore-backed `state` changes.",
|
|
2977
|
+
"readonly": true
|
|
2992
2978
|
},
|
|
2993
2979
|
{
|
|
2994
2980
|
"kind": "field",
|
|
2995
|
-
"name": "
|
|
2981
|
+
"name": "sendBlocked",
|
|
2996
2982
|
"type": {
|
|
2997
|
-
"text": "
|
|
2983
|
+
"text": "boolean"
|
|
2998
2984
|
},
|
|
2999
|
-
"
|
|
2985
|
+
"privacy": "private",
|
|
2986
|
+
"description": "True when a new send must be refused: a turn is running (`busy`), a page-reload\nrestore is loading history that would clobber it (`restoring`), a manual\ncompaction is rewriting history (`compacting`), or a backend condition has\nlocked the assistant outright (`blocked` — e.g. an exhausted AI budget).\nMirrors the composer's `?disabled` gate so a **programmatic**\n`send`/`submitMessage` (e.g. a host's custom input while the built-in composer\nis hidden) can't slip past it and have its message wiped when the\nrestored/compacted history lands (GENC-1351 §6).",
|
|
3000
2987
|
"readonly": true
|
|
3001
2988
|
},
|
|
3002
2989
|
{
|
|
3003
2990
|
"kind": "method",
|
|
3004
|
-
"name": "
|
|
2991
|
+
"name": "sendRefusalReason",
|
|
2992
|
+
"privacy": "private",
|
|
3005
2993
|
"return": {
|
|
3006
2994
|
"type": {
|
|
3007
|
-
"text": "
|
|
2995
|
+
"text": "string"
|
|
3008
2996
|
}
|
|
3009
2997
|
},
|
|
3010
|
-
"description": "
|
|
3011
|
-
},
|
|
3012
|
-
{
|
|
3013
|
-
"kind": "field",
|
|
3014
|
-
"name": "blockedReason",
|
|
3015
|
-
"type": {
|
|
3016
|
-
"text": "string | null"
|
|
3017
|
-
},
|
|
3018
|
-
"description": "Explanation shown in the blocked banner, or `null` for the element's default\ncopy. Only meaningful while FoundationAiAssistant.blocked is true;\nsetting `blocked = false` clears it.\n\nWritable, and symmetric with every other store-backed accessor on this\nclass: writing it re-latches with the CURRENT `blocked` value, so it changes\nthe copy without disturbing the flag. Assigning `null` clears the\nexplanation while staying blocked (the banner falls back to the default\ncopy). FoundationAiAssistant.setBlocked remains the way to write\nboth in one atomic action."
|
|
2998
|
+
"description": "Why a programmatic send was refused, for `submitMessage`'s `errors`. A\nbackend block is called out distinctly because — unlike the transient\n\"busy\" cases — waiting and retrying will never clear it, and a caller\nlooping on \"Assistant is busy\" would spin forever."
|
|
3019
2999
|
},
|
|
3020
3000
|
{
|
|
3021
3001
|
"kind": "method",
|
|
3022
|
-
"name": "
|
|
3002
|
+
"name": "applyDeferredAgentsSwap",
|
|
3003
|
+
"privacy": "private",
|
|
3023
3004
|
"return": {
|
|
3024
3005
|
"type": {
|
|
3025
3006
|
"text": "void"
|
|
3026
3007
|
}
|
|
3027
3008
|
},
|
|
3028
|
-
"
|
|
3029
|
-
{
|
|
3030
|
-
"name": "blocked",
|
|
3031
|
-
"type": {
|
|
3032
|
-
"text": "boolean"
|
|
3033
|
-
}
|
|
3034
|
-
},
|
|
3035
|
-
{
|
|
3036
|
-
"name": "reason",
|
|
3037
|
-
"optional": true,
|
|
3038
|
-
"type": {
|
|
3039
|
-
"text": "string | null"
|
|
3040
|
-
}
|
|
3041
|
-
}
|
|
3042
|
-
],
|
|
3043
|
-
"description": "Block or unblock the assistant, optionally with custom banner copy.\nEquivalent to the FoundationAiAssistant.blocked setter, plus the\nreason in one atomic write.\n\nBlocking writes the **vendor-agnostic** block — what a host with one budget\npot means — and does not populate\nFoundationAiAssistant.blockedVendors. Unblocking clears the\nper-vendor walls as well, so a host asserting \"the wall is gone\" after its\nown pre-flight cannot be silently overruled by a driver latch it never saw."
|
|
3009
|
+
"description": "Re-runs `agentsChanged` if the live `agents` array no longer matches the\nfingerprint of the currently installed driver. Used to apply swaps that\nlanded during a turn (and were skipped by the `isBusy()` guard) once the\ndriver returns to idle."
|
|
3044
3010
|
},
|
|
3045
3011
|
{
|
|
3046
|
-
"kind": "
|
|
3047
|
-
"name": "
|
|
3048
|
-
"type": {
|
|
3049
|
-
"text": "string | undefined"
|
|
3050
|
-
},
|
|
3012
|
+
"kind": "method",
|
|
3013
|
+
"name": "applyDeferredSessionSwitch",
|
|
3051
3014
|
"privacy": "private",
|
|
3052
|
-
"
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
"kind": "field",
|
|
3057
|
-
"name": "pinnedAgentName",
|
|
3058
|
-
"type": {
|
|
3059
|
-
"text": "string | null"
|
|
3015
|
+
"return": {
|
|
3016
|
+
"type": {
|
|
3017
|
+
"text": "void"
|
|
3018
|
+
}
|
|
3060
3019
|
},
|
|
3061
|
-
"description": "
|
|
3020
|
+
"description": "Apply a `session-key` re-key that arrived mid-turn and was deferred by\n`switchSession`'s busy guard (GENC-1351 §5.12). Run at each point the driver\nreturns to idle, BEFORE `applyDeferredAgentsSwap` — a switch rebuilds the\ndriver against the current agents, so a pending agents-swap then no-ops."
|
|
3062
3021
|
},
|
|
3063
3022
|
{
|
|
3064
|
-
"kind": "
|
|
3065
|
-
"name": "
|
|
3066
|
-
"
|
|
3067
|
-
|
|
3068
|
-
},
|
|
3069
|
-
"description": "Name of the agent that currently owns a guided flow. Set by the\norchestrator when a stateful agent's `onActivate` fires, cleared when the\nagent calls `releaseAgent` from a terminal-state tool handler. While\nnon-null, routing precedence goes to this agent and the picker is locked.\n\nIndependent of `pinnedAgentName`: a flow can complete and release\nwithout disturbing the user's sticky picker choice."
|
|
3023
|
+
"kind": "method",
|
|
3024
|
+
"name": "maybeAutoFocusChatInput",
|
|
3025
|
+
"privacy": "private",
|
|
3026
|
+
"description": "Focus the main chat input if the user is still engaged with the assistant.\nDeferred to the next frame so any conditional re-render (e.g. unhiding the\ninput row when an agent's `chatInputDuringExecution: 'hidden'` execution\nends) has committed before we call `.focus()`.\n\n`rapid-text-area` does not delegate focus to its inner native `<textarea>`,\nso we drill into its shadow root and focus the textarea directly."
|
|
3070
3027
|
},
|
|
3071
3028
|
{
|
|
3072
3029
|
"kind": "field",
|
|
3073
|
-
"name": "
|
|
3030
|
+
"name": "activeAgent",
|
|
3074
3031
|
"type": {
|
|
3075
|
-
"text": "
|
|
3032
|
+
"text": "Omit<AgentConfig, 'toolHandlers'> | undefined"
|
|
3076
3033
|
}
|
|
3077
3034
|
},
|
|
3078
3035
|
{
|
|
3079
3036
|
"kind": "field",
|
|
3080
|
-
"name": "
|
|
3037
|
+
"name": "suggestionsState",
|
|
3081
3038
|
"type": {
|
|
3082
|
-
"text": "
|
|
3039
|
+
"text": "SuggestionsState"
|
|
3083
3040
|
}
|
|
3084
3041
|
},
|
|
3085
3042
|
{
|
|
3086
3043
|
"kind": "field",
|
|
3087
|
-
"name": "
|
|
3088
|
-
"
|
|
3089
|
-
|
|
3044
|
+
"name": "showToolCalls",
|
|
3045
|
+
"type": {
|
|
3046
|
+
"text": "boolean"
|
|
3047
|
+
},
|
|
3048
|
+
"description": "Current user-facing toggle state for tool call visibility."
|
|
3090
3049
|
},
|
|
3091
3050
|
{
|
|
3092
3051
|
"kind": "field",
|
|
3093
|
-
"name": "
|
|
3052
|
+
"name": "showThinkingSteps",
|
|
3094
3053
|
"type": {
|
|
3095
|
-
"text": "
|
|
3054
|
+
"text": "boolean"
|
|
3096
3055
|
},
|
|
3097
|
-
"description": "
|
|
3098
|
-
"readonly": true
|
|
3056
|
+
"description": "Current user-facing toggle state for thinking step visibility."
|
|
3099
3057
|
},
|
|
3100
3058
|
{
|
|
3101
3059
|
"kind": "field",
|
|
3102
|
-
"name": "
|
|
3060
|
+
"name": "showNarration",
|
|
3103
3061
|
"type": {
|
|
3104
|
-
"text": "
|
|
3062
|
+
"text": "boolean"
|
|
3105
3063
|
},
|
|
3106
|
-
"description": "
|
|
3064
|
+
"description": "Current user-facing toggle state for narration (interstitial prose) visibility."
|
|
3107
3065
|
},
|
|
3108
3066
|
{
|
|
3109
3067
|
"kind": "field",
|
|
3110
|
-
"name": "
|
|
3068
|
+
"name": "showAgentSwitchIndicator",
|
|
3111
3069
|
"type": {
|
|
3112
|
-
"text": "
|
|
3070
|
+
"text": "boolean"
|
|
3113
3071
|
},
|
|
3114
|
-
"description": "
|
|
3072
|
+
"description": "Current user-facing toggle state for agent switch indicator visibility."
|
|
3115
3073
|
},
|
|
3116
3074
|
{
|
|
3117
3075
|
"kind": "field",
|
|
3118
|
-
"name": "
|
|
3076
|
+
"name": "timestampDisplay",
|
|
3119
3077
|
"type": {
|
|
3120
|
-
"text": "
|
|
3078
|
+
"text": "TimestampDisplay"
|
|
3121
3079
|
},
|
|
3122
|
-
"description": "
|
|
3080
|
+
"description": "When each message shows its timestamp — `'off'`, `'hover'` or `'always'` (default).\n\nFalls back to `DEFAULT_TIMESTAMP_DISPLAY` rather than `'off'` when there is no\nstore yet: this preference defaults ON, so the pre-store render must match the state\nthe baseline is about to resolve to, or timestamps would visibly pop in on connect."
|
|
3123
3081
|
},
|
|
3124
3082
|
{
|
|
3125
3083
|
"kind": "field",
|
|
3126
|
-
"name": "
|
|
3084
|
+
"name": "timestampClock",
|
|
3127
3085
|
"type": {
|
|
3128
3086
|
"text": "number"
|
|
3129
3087
|
},
|
|
3130
|
-
"description": "
|
|
3131
|
-
"readonly": true
|
|
3088
|
+
"description": "Epoch ms the transcript's relative timestamps are measured against.\n\nA relative label is only correct at the instant it renders: FAST evaluates the\nbinding once, and an idle conversation never re-renders, so \"2 minutes ago\" would\nstill read \"2 minutes ago\" an hour later. Making the formatter read this observable\ninstead of `Date.now()` gives every row one shared, invalidatable clock — a tick\nre-evaluates them all."
|
|
3132
3089
|
},
|
|
3133
3090
|
{
|
|
3134
3091
|
"kind": "field",
|
|
3135
|
-
"name": "
|
|
3092
|
+
"name": "_timestampClockTimer",
|
|
3136
3093
|
"type": {
|
|
3137
|
-
"text": "
|
|
3094
|
+
"text": "ReturnType<typeof setInterval> | undefined"
|
|
3138
3095
|
},
|
|
3139
|
-
"
|
|
3140
|
-
"
|
|
3096
|
+
"privacy": "private",
|
|
3097
|
+
"description": "Handle for the `TIMESTAMP_CLOCK_INTERVAL_MS` ticker; undefined while stopped."
|
|
3098
|
+
},
|
|
3099
|
+
{
|
|
3100
|
+
"kind": "method",
|
|
3101
|
+
"name": "syncTimestampClock",
|
|
3102
|
+
"privacy": "private",
|
|
3103
|
+
"return": {
|
|
3104
|
+
"type": {
|
|
3105
|
+
"text": "void"
|
|
3106
|
+
}
|
|
3107
|
+
},
|
|
3108
|
+
"description": "Start or stop the timestamp clock to match the current mode and connection state.\n\nIdempotent, and safe to call from either lifecycle end — it is driven from\n`connectedCallback`, `disconnectedCallback` and the `timestampDisplay` setter, which\ncan fire in any order. Nothing runs while the mode is `'off'` (no binding reads the\nclock) or while disconnected (a timer outliving its element is a leak, and a\npopped-out view disconnects without the session ending)."
|
|
3141
3109
|
},
|
|
3142
3110
|
{
|
|
3143
3111
|
"kind": "field",
|
|
3144
|
-
"name": "
|
|
3112
|
+
"name": "enabledAnimations",
|
|
3145
3113
|
"type": {
|
|
3146
|
-
"text": "
|
|
3114
|
+
"text": "AiAssistantAnimation[]"
|
|
3147
3115
|
},
|
|
3148
|
-
"description": "
|
|
3149
|
-
"readonly": true
|
|
3116
|
+
"description": "Currently enabled animations."
|
|
3150
3117
|
},
|
|
3151
3118
|
{
|
|
3152
3119
|
"kind": "field",
|
|
3153
|
-
"name": "
|
|
3120
|
+
"name": "agentPickerOpen",
|
|
3154
3121
|
"type": {
|
|
3155
|
-
"text": "
|
|
3122
|
+
"text": "boolean"
|
|
3156
3123
|
},
|
|
3157
|
-
"description": "
|
|
3158
|
-
"readonly": true
|
|
3124
|
+
"description": "Whether the agent picker slide-out panel is open. Lives on the session\nstore so the bubble-dialog and popout-panel instances stay in sync."
|
|
3159
3125
|
},
|
|
3160
3126
|
{
|
|
3161
3127
|
"kind": "field",
|
|
3162
|
-
"name": "
|
|
3128
|
+
"name": "sessionMenuOpen",
|
|
3163
3129
|
"type": {
|
|
3164
|
-
"text": "
|
|
3130
|
+
"text": "boolean"
|
|
3165
3131
|
},
|
|
3166
|
-
"description": "
|
|
3167
|
-
"readonly": true
|
|
3132
|
+
"description": "Whether the lifecycle (session) menu slide-out panel is open. Like the\nagent picker, lives on the session store so bubble/popout stay in sync."
|
|
3168
3133
|
},
|
|
3169
3134
|
{
|
|
3170
3135
|
"kind": "field",
|
|
3171
|
-
"name": "
|
|
3136
|
+
"name": "compacting",
|
|
3172
3137
|
"type": {
|
|
3173
3138
|
"text": "boolean"
|
|
3174
3139
|
},
|
|
3175
|
-
"description": "Whether the
|
|
3176
|
-
"readonly": true
|
|
3140
|
+
"description": "Whether a manual compaction is in flight (GENC-1351 §5.7). On the session\nstore (not element-local) so the \"Compacting…\" view + input-disable stay in\nsync across pop-in/out, like the panel flags."
|
|
3177
3141
|
},
|
|
3178
3142
|
{
|
|
3179
3143
|
"kind": "field",
|
|
3180
|
-
"name": "
|
|
3144
|
+
"name": "restoring",
|
|
3181
3145
|
"type": {
|
|
3182
|
-
"text": "
|
|
3146
|
+
"text": "boolean"
|
|
3183
3147
|
},
|
|
3184
|
-
"description": "
|
|
3185
|
-
"readonly": true
|
|
3148
|
+
"description": "Whether a page-reload restore is in flight (GENC-1351 §6). On the session\nstore (like `compacting`) so the \"Restoring…\" view + input-disable stay in\nsync across pop-in/out. Gating input while true prevents a mid-load send from\nbeing clobbered when the restored history loads."
|
|
3186
3149
|
},
|
|
3187
3150
|
{
|
|
3188
3151
|
"kind": "field",
|
|
3189
|
-
"name": "
|
|
3152
|
+
"name": "blocked",
|
|
3190
3153
|
"type": {
|
|
3191
|
-
"text": "
|
|
3154
|
+
"text": "boolean"
|
|
3192
3155
|
},
|
|
3193
|
-
"description": "
|
|
3156
|
+
"description": "Whether the assistant is blocked by a backend condition and cannot send —\ntoday, an exhausted AI-spend budget (GENC-1464). While true the composer is\ndisabled, `send`/`submitMessage` refuse, suggestions stop being fetched, and\na persistent banner (`part=\"blocked-banner\"`) sits above the composer\nexplaining why. The transcript stays visible and scrollable throughout —\nunlike `compacting` and `restoring`, this does not replace the conversation.\n\n**Latched.** Nothing in the element clears it: not a new turn, not \"Clear\"\n/ \"New chat\", not a pop-in/out. It stays set until the host writes\n`false` — because nothing the user can do inside the assistant refills a\nbudget. Hosts typically set it from their own pre-flight budget check on\nmount, and clear it once a later check shows headroom again.\n\nThe driver also latches it automatically when a turn ends with the\n`'budget-exhausted'` failure reason — off the `tool-loop-end` activity bus\n(which also covers a sub-agent wall, a turn this element did not start, and\nan element swapped in mid-turn) and off the driver's return value (which\ncovers a wall hit during multi-agent classification, where no tool loop ran\nand so no bus event fires). So a host that does no pre-flight at all still\ngets a correct locked UI the moment the first 402 lands. The bus topic is\ntab-scoped, so a wall hit in a popped-out window latches the main window\ntoo — correct for a shared spend cap.\n\n**Lifetime — read this before relying on it as your source of truth.** The\nlatch is in-memory and per-`stateKey`:\n\n- It does **not** survive `switchSession`. Switching away tears the outgoing\n session's store down entirely, so switching back yields a fresh, unblocked\n store.\n- It does **not** survive a page reload. It is deliberately absent from the\n persisted session snapshot: the snapshot is long-lived, so a persisted\n latch would outlive an out-of-band budget raise with no in-element way to\n clear it — a stale lock is worse than re-deriving the state.\n\nThe durable source of truth is therefore the **host's pre-flight**, which\nshould run on mount and on every session switch. See\n`docs/migration-GENC-1464.md` §\"How to adopt\", Option B."
|
|
3194
3157
|
},
|
|
3195
3158
|
{
|
|
3196
3159
|
"kind": "field",
|
|
3197
|
-
"name": "
|
|
3160
|
+
"name": "reachableVendors",
|
|
3198
3161
|
"type": {
|
|
3199
|
-
"text": "
|
|
3162
|
+
"text": "readonly AIProviderType[]"
|
|
3200
3163
|
},
|
|
3201
|
-
"description": "
|
|
3164
|
+
"description": "The distinct vendors the registry can currently reach, from the provider\nstatuses this element already loads on connect and refreshes on every\nobservable-registry change — this element's answer to \"which vendor would the\nnext turn use\", a question that has no correct answer and deliberately gets\nno API. See `BudgetController.reachableVendors` for why reachability is\nthe answerable question and what deriving from it buys.",
|
|
3202
3165
|
"readonly": true
|
|
3203
3166
|
},
|
|
3204
3167
|
{
|
|
3205
3168
|
"kind": "field",
|
|
3206
|
-
"name": "
|
|
3169
|
+
"name": "blockedVendors",
|
|
3207
3170
|
"type": {
|
|
3208
|
-
"text": "
|
|
3171
|
+
"text": "readonly AIProviderType[]"
|
|
3209
3172
|
},
|
|
3210
|
-
"description": "
|
|
3173
|
+
"description": "Vendors currently walled by the AI-spend budget, in the order they were\nwalled. Empty for a host that never adopts the per-vendor API.\n\nMay include a vendor this registry cannot reach — either because the registry\nmoved on after the wall was latched, or because a 402's\n`otherVendorAvailable: false` walls every vendor the proxy meters. Neither\ncosts anything internally — FoundationAiAssistant.blocked asks only\nabout the reachable set, and the banner reads the reachability-filtered\n`BudgetController.relevantBlockedVendors` — but a host rendering this\nlist itself should filter it against its own registry.\n\nRead-only on purpose: a settable array would let a host write a partial list\nand silently orphan the per-vendor banner copy.\nFoundationAiAssistant.setVendorBlocked is the write path.",
|
|
3211
3174
|
"readonly": true
|
|
3212
3175
|
},
|
|
3213
3176
|
{
|
|
3214
3177
|
"kind": "method",
|
|
3215
|
-
"name": "
|
|
3178
|
+
"name": "isVendorBlocked",
|
|
3216
3179
|
"return": {
|
|
3217
3180
|
"type": {
|
|
3218
|
-
"text": "
|
|
3181
|
+
"text": "boolean"
|
|
3219
3182
|
}
|
|
3220
3183
|
},
|
|
3221
3184
|
"parameters": [
|
|
3222
3185
|
{
|
|
3223
|
-
"name": "
|
|
3224
|
-
"optional": true,
|
|
3186
|
+
"name": "vendor",
|
|
3225
3187
|
"type": {
|
|
3226
|
-
"text": "
|
|
3188
|
+
"text": "AIProviderType"
|
|
3227
3189
|
}
|
|
3228
3190
|
}
|
|
3229
3191
|
],
|
|
3230
|
-
"description": "
|
|
3192
|
+
"description": "Whether this specific vendor's budget is walled — regardless of whether any\nother vendor still has headroom."
|
|
3231
3193
|
},
|
|
3232
3194
|
{
|
|
3233
3195
|
"kind": "method",
|
|
3234
|
-
"name": "
|
|
3235
|
-
"privacy": "private",
|
|
3196
|
+
"name": "setVendorBlocked",
|
|
3236
3197
|
"return": {
|
|
3237
3198
|
"type": {
|
|
3238
3199
|
"text": "void"
|
|
@@ -3240,282 +3201,282 @@
|
|
|
3240
3201
|
},
|
|
3241
3202
|
"parameters": [
|
|
3242
3203
|
{
|
|
3243
|
-
"name": "
|
|
3204
|
+
"name": "vendor",
|
|
3244
3205
|
"type": {
|
|
3245
|
-
"text": "
|
|
3206
|
+
"text": "AIProviderType"
|
|
3246
3207
|
}
|
|
3247
3208
|
},
|
|
3248
3209
|
{
|
|
3249
|
-
"name": "
|
|
3210
|
+
"name": "blocked",
|
|
3250
3211
|
"type": {
|
|
3251
|
-
"text": "
|
|
3212
|
+
"text": "boolean"
|
|
3213
|
+
}
|
|
3214
|
+
},
|
|
3215
|
+
{
|
|
3216
|
+
"name": "reason",
|
|
3217
|
+
"optional": true,
|
|
3218
|
+
"type": {
|
|
3219
|
+
"text": "string | null"
|
|
3252
3220
|
}
|
|
3253
3221
|
}
|
|
3254
3222
|
],
|
|
3255
|
-
"description": "
|
|
3223
|
+
"description": "Wall (or release) one vendor's budget, optionally with banner copy for it.\nThe per-vendor mirror of FoundationAiAssistant.setBlocked.\n\nWalling a vendor does **not** on its own disable the composer: while another\nreachable vendor has headroom the assistant stays usable and the banner tells\nthe user to switch. Only when every reachable vendor is walled does `blocked`\nbecome true.\n\n`reason` is composed into the banner sentence for that vendor, **however many\nvendors are walled** — see `BudgetController.effectiveBlockedReason`.\nIt is per-vendor copy, not a whole-banner override;\nFoundationAiAssistant.blockedReason is the override. Omitting it keeps\nwhatever explanation that vendor already carried, so a driver latch landing\nafter a host one cannot blank it.\n\n`'none'` is rejected with a warning rather than accepted — it is the \"no\nprovider configured\" sentinel, not a vendor, and a wall on it could never be\nundone by derivation. Use FoundationAiAssistant.setBlocked for a\nvendor-agnostic block."
|
|
3256
3224
|
},
|
|
3257
3225
|
{
|
|
3258
3226
|
"kind": "method",
|
|
3259
|
-
"name": "
|
|
3227
|
+
"name": "setVendorBudget",
|
|
3260
3228
|
"return": {
|
|
3261
3229
|
"type": {
|
|
3262
|
-
"text": "
|
|
3230
|
+
"text": "boolean"
|
|
3263
3231
|
}
|
|
3264
3232
|
},
|
|
3265
3233
|
"parameters": [
|
|
3266
3234
|
{
|
|
3267
|
-
"name": "
|
|
3235
|
+
"name": "vendor",
|
|
3268
3236
|
"type": {
|
|
3269
3237
|
"text": "string"
|
|
3270
3238
|
}
|
|
3271
3239
|
},
|
|
3272
3240
|
{
|
|
3273
|
-
"name": "
|
|
3274
|
-
"type": {
|
|
3275
|
-
"text": "HTMLElement"
|
|
3276
|
-
}
|
|
3277
|
-
},
|
|
3278
|
-
{
|
|
3279
|
-
"name": "onConfirm",
|
|
3280
|
-
"type": {
|
|
3281
|
-
"text": "() => void"
|
|
3282
|
-
}
|
|
3283
|
-
},
|
|
3284
|
-
{
|
|
3285
|
-
"name": "onCancel",
|
|
3286
|
-
"optional": true,
|
|
3241
|
+
"name": "figures",
|
|
3287
3242
|
"type": {
|
|
3288
|
-
"text": "
|
|
3243
|
+
"text": "VendorBudgetFigures | null"
|
|
3289
3244
|
}
|
|
3290
3245
|
}
|
|
3291
|
-
]
|
|
3246
|
+
],
|
|
3247
|
+
"description": "Feed (or clear) one vendor's AI-spend figures for the settings-modal budget\nmeter — the numeric companion to\nFoundationAiAssistant.setVendorBlocked, and like it a host-driven\nwrite: the element meters nothing itself.\n\nThe meter renders a row for exactly the vendors that currently HAVE\nfigures. An **unlimited** vendor (the budget endpoint reports\n`unlimited: true` / `limitUsd: null`) is expressed by never feeding it —\nthere is deliberately no \"unlimited\" figure shape, because a bar with no\ncap has nothing truthful to fill to. `spentUsd` MAY exceed `budgetUsd`\n(the last allowed call can overshoot the cap): the row's text shows the\nreal figures and only the bar clamps.\n\nReturns `false` — and warns once, not per call — instead of throwing when\n`vendor` is not a budgeted vendor (`BUDGETED_VENDORS`, the proxy's own\nmetered list) or either figure is not a finite number `>= 0`. Invalid input\nchanges no state. Idempotent: re-feeding a vendor's current figures is a\nno-op, so hosts can re-feed unconditionally after every turn.\n\n`false` ALSO means \"not stored, because the element is not ready yet\": a\nfeed that lands before the element has its session store (a host calling\nahead of the first append, or during a pop-out remount) stores nothing and\nsays so, rather than reporting a write that never happened. That case is\ntransient and needs no host handling — the documented per-turn re-feed is\nwhat recovers it — so it is deliberately NOT warned about; the warn-once\nchannel is for garbage input only.\n\n`figures` is nullish-checked at run time, so `undefined` behaves exactly\nlike `null` and CLEARS that vendor's row. Untyped JS hosts feed this\nstraight from `GET /api/budget`, where a per-vendor lookup that misses\nyields `undefined`, not `null` — and \"no figures\" coherently means \"no\nrow\". The `| null` parameter type is unchanged for typed callers; the\nruntime is deliberately the more forgiving of the two.\n\nThe intended feed is the platform budget endpoint:\n\n```ts\n// `vendors` is an OBJECT keyed by vendor id, not an array.\nconst { vendors } = await (await fetch('/api/budget')).json();\nfor (const v of Object.values(vendors)) {\n if (v.unlimited || v.limitUsd == null) {\n assistantEl.setVendorBudget(v.vendor, null); // clear stale figures after a cap is lifted\n continue;\n }\n assistantEl.setVendorBudget(v.vendor, { budgetUsd: v.limitUsd, spentUsd: v.spentUsd });\n}\n```\n\nA host that meters its spend by source can pass an optional `segments` breakdown, and\nthe vendor's bar is drawn stacked with a legend naming each one (NEW-15):\n\n```ts\nassistantEl.setVendorBudget('anthropic', {\n budgetUsd: 50,\n spentUsd: 12.5,\n segments: [\n { id: 'app', label: 'App', spentUsd: 9 },\n { id: 'batch', label: 'Batch jobs', spentUsd: 3.5 },\n ],\n});\n```\n\nThe labels are yours — the assistant has no vocabulary for what a host spends money on.\nSegments may add up to less than `spentUsd` (the remainder draws unlabelled) but never\nto more; a breakdown that does, or that is otherwise malformed, is dropped with a debug\nlog and the single bar renders. Omit `segments` entirely and nothing about the meter\nchanges.\n\nRe-run it on mount and after each turn. Scope and lifetime follow the rest\nof the session slice (per `stateKey`, survives pop-in/out and \"Clear\" /\n\"New chat\") — except that the figures are NOT persisted to the session\nsnapshot: the server is authoritative and the host re-feeds at boot, so a\npersisted copy could only show stale dollars after a reload."
|
|
3248
|
+
},
|
|
3249
|
+
{
|
|
3250
|
+
"kind": "field",
|
|
3251
|
+
"name": "budgetMeterLastFedAt",
|
|
3252
|
+
"type": {
|
|
3253
|
+
"text": "number | null"
|
|
3254
|
+
},
|
|
3255
|
+
"description": "When budget figures last arrived — from the host's\nFoundationAiAssistant.setVendorBudget or the wall latch's own feed —\nas epoch ms; `null` until the first feed.\n\nELEMENT state, not slice state, on purpose: the reducer is idempotent by\nvalue (an unchanged re-feed must not re-render the meter rows), but \"when\nwas this fetched\" must move on every feed, changed figures or not — a\nrefresh that confirms the same dollars is still a refresh. Only the\ntoolbar label observes this, so a stamp re-renders one span, not the rows."
|
|
3256
|
+
},
|
|
3257
|
+
{
|
|
3258
|
+
"kind": "field",
|
|
3259
|
+
"name": "settingsBudgetUpdatedLabel",
|
|
3260
|
+
"type": {
|
|
3261
|
+
"text": "string | undefined"
|
|
3262
|
+
},
|
|
3263
|
+
"description": "\"Updated HH:MM:SS\" for the meter toolbar, or `undefined` before any feed.",
|
|
3264
|
+
"readonly": true
|
|
3292
3265
|
},
|
|
3293
3266
|
{
|
|
3294
3267
|
"kind": "method",
|
|
3295
|
-
"name": "
|
|
3268
|
+
"name": "requestBudgetRefresh",
|
|
3296
3269
|
"return": {
|
|
3297
3270
|
"type": {
|
|
3298
3271
|
"text": "void"
|
|
3299
3272
|
}
|
|
3300
3273
|
},
|
|
3301
|
-
"
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
"description": "
|
|
3274
|
+
"description": "Ask the host to re-fetch budget figures now (GENC-1464 refresh affordance).\n\nThe element cannot fetch — the meter is host-fed by design — so this emits\n`budget-refresh-requested` and the host answers with the same fetch that\nalready feeds FoundationAiAssistant.setVendorBudget (Create's handler coalesces in-flight\nfetches, so a spammed button costs one request). Fired by the meter's\nrefresh button and on settings-modal open, so the figures are fresh exactly\nwhen someone is looking at them. Fires unconditionally: a host without a\nlistener simply keeps the per-turn cadence."
|
|
3275
|
+
},
|
|
3276
|
+
{
|
|
3277
|
+
"kind": "field",
|
|
3278
|
+
"name": "blockedReason",
|
|
3279
|
+
"type": {
|
|
3280
|
+
"text": "string | null"
|
|
3281
|
+
},
|
|
3282
|
+
"description": "Explanation shown in the blocked banner, or `null` for the element's default\ncopy. Only meaningful while FoundationAiAssistant.blocked is true;\nsetting `blocked = false` clears it.\n\nWritable, and symmetric with every other store-backed accessor on this\nclass: writing it re-latches with the CURRENT `blocked` value, so it changes\nthe copy without disturbing the flag. Assigning `null` clears the\nexplanation while staying blocked (the banner falls back to the default\ncopy). FoundationAiAssistant.setBlocked remains the way to write\nboth in one atomic action."
|
|
3310
3283
|
},
|
|
3311
3284
|
{
|
|
3312
3285
|
"kind": "method",
|
|
3313
|
-
"name": "
|
|
3286
|
+
"name": "setBlocked",
|
|
3314
3287
|
"return": {
|
|
3315
3288
|
"type": {
|
|
3316
3289
|
"text": "void"
|
|
3317
3290
|
}
|
|
3318
3291
|
},
|
|
3319
|
-
"
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3292
|
+
"parameters": [
|
|
3293
|
+
{
|
|
3294
|
+
"name": "blocked",
|
|
3295
|
+
"type": {
|
|
3296
|
+
"text": "boolean"
|
|
3297
|
+
}
|
|
3298
|
+
},
|
|
3299
|
+
{
|
|
3300
|
+
"name": "reason",
|
|
3301
|
+
"optional": true,
|
|
3302
|
+
"type": {
|
|
3303
|
+
"text": "string | null"
|
|
3304
|
+
}
|
|
3305
|
+
}
|
|
3306
|
+
],
|
|
3307
|
+
"description": "Block or unblock the assistant, optionally with custom banner copy.\nEquivalent to the FoundationAiAssistant.blocked setter, plus the\nreason in one atomic write.\n\nBlocking writes the **vendor-agnostic** block — what a host with one budget\npot means — and does not populate\nFoundationAiAssistant.blockedVendors. Unblocking clears the\nper-vendor walls as well, so a host asserting \"the wall is gone\" after its\nown pre-flight cannot be silently overruled by a driver latch it never saw."
|
|
3328
3308
|
},
|
|
3329
3309
|
{
|
|
3330
3310
|
"kind": "field",
|
|
3331
|
-
"name": "
|
|
3311
|
+
"name": "transcriptBudgetExhaustedMessage",
|
|
3332
3312
|
"type": {
|
|
3333
3313
|
"text": "string | undefined"
|
|
3334
3314
|
},
|
|
3335
|
-
"
|
|
3315
|
+
"privacy": "private",
|
|
3316
|
+
"description": "Copy the driver writes into the TRANSCRIPT when a turn hits the budget wall,\nor `undefined` to let the driver compose it per wall — see\n`BudgetController.transcriptMessage`.",
|
|
3317
|
+
"readonly": true
|
|
3336
3318
|
},
|
|
3337
3319
|
{
|
|
3338
3320
|
"kind": "field",
|
|
3339
|
-
"name": "
|
|
3321
|
+
"name": "pinnedAgentName",
|
|
3340
3322
|
"type": {
|
|
3341
|
-
"text": "
|
|
3323
|
+
"text": "string | null"
|
|
3342
3324
|
},
|
|
3343
|
-
"description": "
|
|
3325
|
+
"description": "Name of the agent the user has pinned via the agent picker. `null` means\nautomatic routing (Auto). Persisted on the session store, so it survives\npop-in/pop-out but resets on page refresh.\n\nOnly changes on explicit user action (picker click or host's `setAgent`).\nThe orchestrator's auto-pin on stateful activation writes\n`flowOwnerAgentName` instead, so finishing a guided flow doesn't wipe\nthe user's sticky pick."
|
|
3344
3326
|
},
|
|
3345
3327
|
{
|
|
3346
3328
|
"kind": "field",
|
|
3347
|
-
"name": "
|
|
3329
|
+
"name": "flowOwnerAgentName",
|
|
3348
3330
|
"type": {
|
|
3349
|
-
"text": "
|
|
3331
|
+
"text": "string | null"
|
|
3350
3332
|
},
|
|
3351
|
-
"
|
|
3352
|
-
"default": "0"
|
|
3333
|
+
"description": "Name of the agent that currently owns a guided flow. Set by the\norchestrator when a stateful agent's `onActivate` fires, cleared when the\nagent calls `releaseAgent` from a terminal-state tool handler. While\nnon-null, routing precedence goes to this agent and the picker is locked.\n\nIndependent of `pinnedAgentName`: a flow can complete and release\nwithout disturbing the user's sticky picker choice."
|
|
3353
3334
|
},
|
|
3354
3335
|
{
|
|
3355
3336
|
"kind": "field",
|
|
3356
|
-
"name": "
|
|
3337
|
+
"name": "liveSubAgentTrace",
|
|
3357
3338
|
"type": {
|
|
3358
|
-
"text": "
|
|
3339
|
+
"text": "ChatMessage[]"
|
|
3359
3340
|
}
|
|
3360
3341
|
},
|
|
3361
3342
|
{
|
|
3362
3343
|
"kind": "field",
|
|
3363
|
-
"name": "
|
|
3344
|
+
"name": "liveSubAgentName",
|
|
3364
3345
|
"type": {
|
|
3365
|
-
"text": "
|
|
3366
|
-
}
|
|
3367
|
-
"description": "Attachments pending on the next message."
|
|
3346
|
+
"text": "string | null"
|
|
3347
|
+
}
|
|
3368
3348
|
},
|
|
3369
3349
|
{
|
|
3370
3350
|
"kind": "field",
|
|
3371
|
-
"name": "
|
|
3372
|
-
"
|
|
3373
|
-
|
|
3374
|
-
},
|
|
3375
|
-
"description": "Rejection messages for files the last pick refused."
|
|
3351
|
+
"name": "inputOverrides",
|
|
3352
|
+
"description": "In-flight per-call chat-input overrides pushed by `requestSubAgent` or\n`requestInteraction` calls. Empty means no override is active.",
|
|
3353
|
+
"readonly": true
|
|
3376
3354
|
},
|
|
3377
3355
|
{
|
|
3378
3356
|
"kind": "field",
|
|
3379
|
-
"name": "
|
|
3357
|
+
"name": "effectiveChatInputDuringExecution",
|
|
3380
3358
|
"type": {
|
|
3381
|
-
"text": "
|
|
3359
|
+
"text": "ChatInputDuringExecutionMode"
|
|
3382
3360
|
},
|
|
3383
|
-
"
|
|
3384
|
-
"
|
|
3361
|
+
"description": "Resolves the effective chat-input behaviour while the assistant is\nexecuting. Per-call overrides take precedence over the agent-level\nconfig; among overrides the most restrictive wins (`'hidden'` >\n`'disabled'`). Falls back to the active agent's config, then `'disabled'`.",
|
|
3362
|
+
"readonly": true
|
|
3385
3363
|
},
|
|
3386
3364
|
{
|
|
3387
3365
|
"kind": "field",
|
|
3388
|
-
"name": "
|
|
3366
|
+
"name": "contextTokens",
|
|
3389
3367
|
"type": {
|
|
3390
|
-
"text": "number"
|
|
3368
|
+
"text": "number | undefined"
|
|
3391
3369
|
},
|
|
3392
|
-
"description": "
|
|
3370
|
+
"description": "Most recent prompt token count from the AI provider, if available."
|
|
3393
3371
|
},
|
|
3394
3372
|
{
|
|
3395
3373
|
"kind": "field",
|
|
3396
|
-
"name": "
|
|
3374
|
+
"name": "contextLimit",
|
|
3397
3375
|
"type": {
|
|
3398
|
-
"text": "
|
|
3376
|
+
"text": "number | undefined"
|
|
3399
3377
|
},
|
|
3400
|
-
"description": "
|
|
3378
|
+
"description": "Context window size for the active model, if known."
|
|
3401
3379
|
},
|
|
3402
3380
|
{
|
|
3403
3381
|
"kind": "field",
|
|
3404
|
-
"name": "
|
|
3382
|
+
"name": "sessionUsage",
|
|
3405
3383
|
"type": {
|
|
3406
|
-
"text": "
|
|
3384
|
+
"text": "AggregateUsage"
|
|
3407
3385
|
},
|
|
3408
|
-
"
|
|
3409
|
-
"description": "True while `downloadDebugLog` is building the log (GENC-1351 §5.8). Drives the\ndownload button's disabled + spinner state — the lifetime-stitch path is async\n(a provider `loadDiagnostics` round-trip), so without feedback a click looks\nlike nothing happened. Per-instance and transient (not shared/persisted): each\nelement has its own settings modal."
|
|
3386
|
+
"description": "Cost plus the four token buckets for this session — derived from the transcript\non every change, so it includes sub-agent turns and spend banked by a compaction."
|
|
3410
3387
|
},
|
|
3411
3388
|
{
|
|
3412
3389
|
"kind": "field",
|
|
3413
|
-
"name": "
|
|
3390
|
+
"name": "sessionCostUsd",
|
|
3414
3391
|
"type": {
|
|
3415
|
-
"text": "
|
|
3392
|
+
"text": "number"
|
|
3416
3393
|
},
|
|
3417
|
-
"
|
|
3418
|
-
"
|
|
3394
|
+
"description": "Aggregated USD cost across every chat turn in this session.\n\nRead-only: a projection of `sessionUsage`, so an assigned figure would be overwritten by\nthe next transcript change.",
|
|
3395
|
+
"readonly": true
|
|
3419
3396
|
},
|
|
3420
3397
|
{
|
|
3421
3398
|
"kind": "field",
|
|
3422
|
-
"name": "
|
|
3399
|
+
"name": "uniqueProviderModels",
|
|
3423
3400
|
"type": {
|
|
3424
|
-
"text": "
|
|
3401
|
+
"text": "CostSessionModelEntry[]"
|
|
3425
3402
|
},
|
|
3426
|
-
"
|
|
3427
|
-
"
|
|
3403
|
+
"description": "The cost ledger's derived surface (GENC-1475). Every member below delegates to\n`CostLedgerController` — the names are this element's public API and the\nsettings modal's bindings, so they stay put while the accounting moves.\n\nNone carries `@volatile`: the decorators live on the controller's getters, and they\nreach the binding observer from there — see `docs/code-health.md` §11.4.",
|
|
3404
|
+
"readonly": true
|
|
3428
3405
|
},
|
|
3429
3406
|
{
|
|
3430
3407
|
"kind": "field",
|
|
3431
|
-
"name": "
|
|
3408
|
+
"name": "sortedCostSessionHistory",
|
|
3432
3409
|
"type": {
|
|
3433
|
-
"text": "
|
|
3410
|
+
"text": "CostSessionRecord[]"
|
|
3434
3411
|
},
|
|
3435
|
-
"
|
|
3436
|
-
"
|
|
3412
|
+
"description": "Build history for display: most recently worked on first.",
|
|
3413
|
+
"readonly": true
|
|
3437
3414
|
},
|
|
3438
3415
|
{
|
|
3439
3416
|
"kind": "field",
|
|
3440
|
-
"name": "
|
|
3417
|
+
"name": "cumulativeUsage",
|
|
3441
3418
|
"type": {
|
|
3442
|
-
"text": "
|
|
3419
|
+
"text": "AggregateUsage"
|
|
3443
3420
|
},
|
|
3444
|
-
"
|
|
3445
|
-
"
|
|
3421
|
+
"description": "Lifetime usage across every project in the history scope — rows only, never plus live.",
|
|
3422
|
+
"readonly": true
|
|
3446
3423
|
},
|
|
3447
3424
|
{
|
|
3448
3425
|
"kind": "field",
|
|
3449
|
-
"name": "
|
|
3426
|
+
"name": "cumulativeCostUsd",
|
|
3450
3427
|
"type": {
|
|
3451
|
-
"text": "
|
|
3428
|
+
"text": "number"
|
|
3452
3429
|
},
|
|
3453
|
-
"
|
|
3454
|
-
"
|
|
3430
|
+
"description": "Lifetime USD across every project in the history scope.",
|
|
3431
|
+
"readonly": true
|
|
3455
3432
|
},
|
|
3456
3433
|
{
|
|
3457
3434
|
"kind": "field",
|
|
3458
|
-
"name": "
|
|
3435
|
+
"name": "liveUsageIsProjectLifetime",
|
|
3459
3436
|
"type": {
|
|
3460
|
-
"text": "
|
|
3437
|
+
"text": "boolean"
|
|
3461
3438
|
},
|
|
3462
|
-
"description": "
|
|
3463
|
-
|
|
3464
|
-
{
|
|
3465
|
-
"kind": "field",
|
|
3466
|
-
"name": "debugLogSubmitResultFlashMs",
|
|
3467
|
-
"default": "4000",
|
|
3468
|
-
"description": "How long 'Sent' shows before idle. Overridable so tests need not wait 4 seconds.",
|
|
3469
|
-
"type": {
|
|
3470
|
-
"text": "number"
|
|
3471
|
-
}
|
|
3439
|
+
"description": "Whether the live session figures amount to this project's whole history.",
|
|
3440
|
+
"readonly": true
|
|
3472
3441
|
},
|
|
3473
3442
|
{
|
|
3474
3443
|
"kind": "field",
|
|
3475
|
-
"name": "
|
|
3444
|
+
"name": "resolvedCostHistory",
|
|
3476
3445
|
"type": {
|
|
3477
|
-
"text": "
|
|
3446
|
+
"text": "ResolvedCostHistoryConfig"
|
|
3478
3447
|
},
|
|
3479
|
-
"
|
|
3480
|
-
"
|
|
3481
|
-
"description": "Bumped by `resetDebugLogSubmitState`. An in-flight `submitDebugLog` captures it and\ndrops its continuation when a reset (disconnect, session switch, Clear) happened\nwhile it awaited — otherwise the stale submission would write state, arm a timer on\na torn-down element, or report 'Sent' into a session it never belonged to."
|
|
3448
|
+
"description": "Resolved cost tab and build-history settings from `chatConfig.costHistory`.",
|
|
3449
|
+
"readonly": true
|
|
3482
3450
|
},
|
|
3483
3451
|
{
|
|
3484
3452
|
"kind": "field",
|
|
3485
|
-
"name": "
|
|
3453
|
+
"name": "costSessionHistory",
|
|
3486
3454
|
"type": {
|
|
3487
|
-
"text": "
|
|
3455
|
+
"text": "CostSessionRecord[]"
|
|
3488
3456
|
},
|
|
3489
|
-
"description": "
|
|
3457
|
+
"description": "Persisted finalized cost sessions shown on the Usage tab build history list.\n\nA get/set pair rather than a read-only projection: the banking tests seed rows to\nmodel a page load that found some, and a host provider's rows arrive the same way."
|
|
3490
3458
|
},
|
|
3491
3459
|
{
|
|
3492
3460
|
"kind": "field",
|
|
3493
|
-
"name": "
|
|
3461
|
+
"name": "sessionTokensConsumed",
|
|
3494
3462
|
"type": {
|
|
3495
|
-
"text": "
|
|
3463
|
+
"text": "number"
|
|
3496
3464
|
},
|
|
3497
|
-
"description": "
|
|
3465
|
+
"description": "Total tokens across every chat turn in this session — all four buckets added up.\nRead-only; the per-bucket split is on `sessionUsage`.",
|
|
3466
|
+
"readonly": true
|
|
3498
3467
|
},
|
|
3499
3468
|
{
|
|
3500
3469
|
"kind": "field",
|
|
3501
|
-
"name": "
|
|
3470
|
+
"name": "liveCostSessionTitle",
|
|
3502
3471
|
"type": {
|
|
3503
|
-
"text": "
|
|
3472
|
+
"text": "string | undefined"
|
|
3504
3473
|
},
|
|
3505
|
-
"
|
|
3506
|
-
"
|
|
3507
|
-
},
|
|
3508
|
-
{
|
|
3509
|
-
"kind": "field",
|
|
3510
|
-
"name": "brokenSources",
|
|
3511
|
-
"privacy": "private",
|
|
3512
|
-
"readonly": true,
|
|
3513
|
-
"default": "new Map<string, { message?: string; detail?: string }>()",
|
|
3514
|
-
"description": "Which reporters currently consider persistence broken, newest last, each with the copy it\nasked for. FoundationAiAssistant.persistenceBroken is DERIVED from this (`size > 0`) rather than being the\nsource of truth.\n\nA plain boolean was wrong the moment there was more than one reporter, and review caught it:\nthis element's own persister covers `sessions/<key>`, while a host reports its own keyspaces\n(Create's `projects/<id>.json`). With one flag, a SESSION save landing after its own broken\nepisode called `reportPersistenceRecovered()` and closed the modal while the PROJECT store\nwas still refusing writes — and because Create's own re-entry guard only clears on a\nsuccessful project write, the warning could then never be raised again for the life of the\npage. The user carried on against a dead store with the warning cancelled by an unrelated\nsubsystem: the exact failure this modal exists to prevent, on the keyspace that holds the app\nrather than the transcript.\n\nA `Map` and not a `Set` because the copy has to survive the same collision. The winner is the\nmost recently reported still-broken source (insertion order, so it is deterministic), and when\none recovers the copy falls back to whoever is left instead of reverting to the session\ndefault — which would otherwise state something untrue of the failure still in progress."
|
|
3474
|
+
"description": "Label shown on the Usage tab for the in-flight session (app title or first user phrase).",
|
|
3475
|
+
"readonly": true
|
|
3515
3476
|
},
|
|
3516
3477
|
{
|
|
3517
3478
|
"kind": "method",
|
|
3518
|
-
"name": "
|
|
3479
|
+
"name": "finalizeCostSession",
|
|
3519
3480
|
"return": {
|
|
3520
3481
|
"type": {
|
|
3521
3482
|
"text": "void"
|
|
@@ -3523,39 +3484,18 @@
|
|
|
3523
3484
|
},
|
|
3524
3485
|
"parameters": [
|
|
3525
3486
|
{
|
|
3526
|
-
"name": "
|
|
3527
|
-
"
|
|
3528
|
-
"text": "boolean"
|
|
3529
|
-
}
|
|
3530
|
-
},
|
|
3531
|
-
{
|
|
3532
|
-
"name": "broken",
|
|
3487
|
+
"name": "options",
|
|
3488
|
+
"optional": true,
|
|
3533
3489
|
"type": {
|
|
3534
|
-
"text": "
|
|
3490
|
+
"text": "{ title?: string }"
|
|
3535
3491
|
}
|
|
3536
3492
|
}
|
|
3537
3493
|
],
|
|
3538
|
-
"description": "
|
|
3539
|
-
},
|
|
3540
|
-
{
|
|
3541
|
-
"kind": "field",
|
|
3542
|
-
"name": "onPersistenceModalCancel",
|
|
3543
|
-
"privacy": "private",
|
|
3544
|
-
"readonly": true,
|
|
3545
|
-
"description": "Swallows the native dialog's Escape route. Stored, not inline, so it can be removed again."
|
|
3546
|
-
},
|
|
3547
|
-
{
|
|
3548
|
-
"kind": "field",
|
|
3549
|
-
"name": "persistenceEscapeGuardTarget",
|
|
3550
|
-
"type": {
|
|
3551
|
-
"text": "HTMLDialogElement | undefined"
|
|
3552
|
-
},
|
|
3553
|
-
"privacy": "private",
|
|
3554
|
-
"description": "The node the guard above is bound to, so removal targets the same one it was added to."
|
|
3494
|
+
"description": "Write this session's usage into persisted build history as a single row keyed by the\nsession key, replacing any existing row for that key.\n\n**Idempotent** — safe to call per turn, on tab close, and on a title change alike. The\nname is historical: it does NOT end the session or reset the running totals. See\n`CostLedgerController.finalize` for the full contract and the no-op cases."
|
|
3555
3495
|
},
|
|
3556
3496
|
{
|
|
3557
3497
|
"kind": "method",
|
|
3558
|
-
"name": "
|
|
3498
|
+
"name": "rebaselineOnClearedTranscript",
|
|
3559
3499
|
"privacy": "private",
|
|
3560
3500
|
"return": {
|
|
3561
3501
|
"type": {
|
|
@@ -3564,242 +3504,566 @@
|
|
|
3564
3504
|
},
|
|
3565
3505
|
"parameters": [
|
|
3566
3506
|
{
|
|
3567
|
-
"name": "
|
|
3507
|
+
"name": "key",
|
|
3568
3508
|
"type": {
|
|
3569
|
-
"text": "
|
|
3509
|
+
"text": "string"
|
|
3510
|
+
}
|
|
3511
|
+
},
|
|
3512
|
+
{
|
|
3513
|
+
"name": "discarded",
|
|
3514
|
+
"type": {
|
|
3515
|
+
"text": "AggregateUsage"
|
|
3570
3516
|
}
|
|
3571
3517
|
}
|
|
3572
3518
|
],
|
|
3573
|
-
"description": "
|
|
3519
|
+
"description": "Re-baseline this session against an emptied transcript — see\n`CostLedgerController.rebaselineOnClearedTranscript`. `discarded` must be read\nBEFORE the live figures are reset, since that is the only record of the latter."
|
|
3574
3520
|
},
|
|
3575
3521
|
{
|
|
3576
3522
|
"kind": "method",
|
|
3577
|
-
"name": "
|
|
3578
|
-
"privacy": "private",
|
|
3523
|
+
"name": "showConfirmationDialog",
|
|
3579
3524
|
"return": {
|
|
3580
3525
|
"type": {
|
|
3581
3526
|
"text": "void"
|
|
3582
3527
|
}
|
|
3583
3528
|
},
|
|
3584
|
-
"
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3529
|
+
"parameters": [
|
|
3530
|
+
{
|
|
3531
|
+
"name": "confirmationMessage",
|
|
3532
|
+
"type": {
|
|
3533
|
+
"text": "string"
|
|
3534
|
+
}
|
|
3535
|
+
},
|
|
3536
|
+
{
|
|
3537
|
+
"name": "modalParent",
|
|
3538
|
+
"type": {
|
|
3539
|
+
"text": "HTMLElement"
|
|
3540
|
+
}
|
|
3541
|
+
},
|
|
3542
|
+
{
|
|
3543
|
+
"name": "onConfirm",
|
|
3544
|
+
"type": {
|
|
3545
|
+
"text": "() => void"
|
|
3546
|
+
}
|
|
3547
|
+
},
|
|
3548
|
+
{
|
|
3549
|
+
"name": "onCancel",
|
|
3550
|
+
"optional": true,
|
|
3551
|
+
"type": {
|
|
3552
|
+
"text": "() => void"
|
|
3553
|
+
}
|
|
3554
|
+
}
|
|
3555
|
+
]
|
|
3556
|
+
},
|
|
3557
|
+
{
|
|
3558
|
+
"kind": "method",
|
|
3559
|
+
"name": "removeCostSessionFromHistory",
|
|
3560
|
+
"return": {
|
|
3561
|
+
"type": {
|
|
3562
|
+
"text": "void"
|
|
3563
|
+
}
|
|
3591
3564
|
},
|
|
3592
|
-
"
|
|
3565
|
+
"parameters": [
|
|
3566
|
+
{
|
|
3567
|
+
"name": "id",
|
|
3568
|
+
"type": {
|
|
3569
|
+
"text": "string"
|
|
3570
|
+
}
|
|
3571
|
+
}
|
|
3572
|
+
],
|
|
3573
|
+
"description": "Remove one entry from persisted build history."
|
|
3574
|
+
},
|
|
3575
|
+
{
|
|
3576
|
+
"kind": "method",
|
|
3577
|
+
"name": "clearCostSessionHistory",
|
|
3578
|
+
"return": {
|
|
3579
|
+
"type": {
|
|
3580
|
+
"text": "void"
|
|
3581
|
+
}
|
|
3582
|
+
},
|
|
3583
|
+
"description": "Clear all persisted build history for this assistant scope."
|
|
3593
3584
|
},
|
|
3594
3585
|
{
|
|
3595
3586
|
"kind": "field",
|
|
3596
|
-
"name": "
|
|
3587
|
+
"name": "activeModel",
|
|
3597
3588
|
"type": {
|
|
3598
3589
|
"text": "string | undefined"
|
|
3599
3590
|
},
|
|
3600
|
-
"description": "
|
|
3591
|
+
"description": "Active model id resolved from the AIProvider, if exposed."
|
|
3601
3592
|
},
|
|
3602
3593
|
{
|
|
3603
3594
|
"kind": "field",
|
|
3604
|
-
"name": "
|
|
3595
|
+
"name": "activeProviderName",
|
|
3605
3596
|
"type": {
|
|
3606
|
-
"text": "
|
|
3597
|
+
"text": "string | undefined"
|
|
3607
3598
|
},
|
|
3608
|
-
"description": "
|
|
3599
|
+
"description": "Name of the AI provider used on the most recent turn."
|
|
3609
3600
|
},
|
|
3610
3601
|
{
|
|
3611
3602
|
"kind": "field",
|
|
3612
|
-
"name": "
|
|
3603
|
+
"name": "providerStatuses",
|
|
3613
3604
|
"type": {
|
|
3614
|
-
"text": "
|
|
3605
|
+
"text": "AIProviderRegistryStatusEntry[]"
|
|
3615
3606
|
},
|
|
3616
|
-
"description": "
|
|
3607
|
+
"description": "Per-provider status snapshot used by the settings panel."
|
|
3617
3608
|
},
|
|
3618
3609
|
{
|
|
3619
3610
|
"kind": "field",
|
|
3620
|
-
"name": "
|
|
3611
|
+
"name": "_suggestionsGeneration",
|
|
3621
3612
|
"type": {
|
|
3622
|
-
"text": "
|
|
3613
|
+
"text": "number"
|
|
3623
3614
|
},
|
|
3624
|
-
"
|
|
3615
|
+
"privacy": "private",
|
|
3616
|
+
"default": "0"
|
|
3625
3617
|
},
|
|
3626
3618
|
{
|
|
3627
3619
|
"kind": "field",
|
|
3628
|
-
"name": "
|
|
3620
|
+
"name": "inputValue",
|
|
3629
3621
|
"type": {
|
|
3630
|
-
"text": "
|
|
3622
|
+
"text": "string"
|
|
3631
3623
|
}
|
|
3632
3624
|
},
|
|
3633
3625
|
{
|
|
3634
3626
|
"kind": "field",
|
|
3635
|
-
"name": "
|
|
3627
|
+
"name": "attachments",
|
|
3636
3628
|
"type": {
|
|
3637
|
-
"text": "
|
|
3638
|
-
}
|
|
3629
|
+
"text": "ChatAttachment[]"
|
|
3630
|
+
},
|
|
3631
|
+
"description": "Attachments pending on the next message."
|
|
3639
3632
|
},
|
|
3640
3633
|
{
|
|
3641
3634
|
"kind": "field",
|
|
3642
|
-
"name": "
|
|
3635
|
+
"name": "attachmentErrors",
|
|
3643
3636
|
"type": {
|
|
3644
|
-
"text": "
|
|
3645
|
-
}
|
|
3637
|
+
"text": "string[]"
|
|
3638
|
+
},
|
|
3639
|
+
"description": "Rejection messages for files the last pick refused."
|
|
3646
3640
|
},
|
|
3647
3641
|
{
|
|
3648
3642
|
"kind": "field",
|
|
3649
|
-
"name": "
|
|
3643
|
+
"name": "showLoadingIndicator",
|
|
3650
3644
|
"type": {
|
|
3651
3645
|
"text": "boolean"
|
|
3652
3646
|
},
|
|
3653
3647
|
"default": "false",
|
|
3654
|
-
"description": "Whether the
|
|
3648
|
+
"description": "Whether the loading spinner is currently visible. Controlled by the loading delay timer."
|
|
3655
3649
|
},
|
|
3656
3650
|
{
|
|
3657
3651
|
"kind": "field",
|
|
3658
|
-
"name": "
|
|
3652
|
+
"name": "appSettingsRevision",
|
|
3659
3653
|
"type": {
|
|
3660
|
-
"text": "
|
|
3654
|
+
"text": "number"
|
|
3661
3655
|
},
|
|
3662
|
-
"
|
|
3656
|
+
"description": "Bump to re-render app settings toggles when the host provider notifies a change."
|
|
3663
3657
|
},
|
|
3664
3658
|
{
|
|
3665
3659
|
"kind": "field",
|
|
3666
|
-
"name": "
|
|
3660
|
+
"name": "settingsOpen",
|
|
3667
3661
|
"type": {
|
|
3668
|
-
"text": "
|
|
3662
|
+
"text": "boolean"
|
|
3669
3663
|
},
|
|
3670
|
-
"
|
|
3671
|
-
"description": "This element's driver as an orchestrator, or `undefined` when the session is running a bare\n`ChatDriver`. The only place in this element that narrows the type; the test itself lives in\n`asOrchestrator`, shared with the session persister.",
|
|
3672
|
-
"readonly": true
|
|
3664
|
+
"description": "Whether the settings modal is open."
|
|
3673
3665
|
},
|
|
3674
3666
|
{
|
|
3675
3667
|
"kind": "field",
|
|
3676
|
-
"name": "
|
|
3668
|
+
"name": "downloadingDebugLog",
|
|
3677
3669
|
"type": {
|
|
3678
|
-
"text": "
|
|
3670
|
+
"text": "boolean"
|
|
3679
3671
|
},
|
|
3680
|
-
"
|
|
3672
|
+
"default": "false",
|
|
3673
|
+
"description": "True while `downloadDebugLog` is building the log (GENC-1351 §5.8). Drives the\ndownload button's disabled + spinner state — the lifetime-stitch path is async\n(a provider `loadDiagnostics` round-trip), so without feedback a click looks\nlike nothing happened. Per-instance and transient (not shared/persisted): each\nelement has its own settings modal."
|
|
3681
3674
|
},
|
|
3682
3675
|
{
|
|
3683
3676
|
"kind": "field",
|
|
3684
|
-
"name": "
|
|
3677
|
+
"name": "submittingDebugLog",
|
|
3685
3678
|
"type": {
|
|
3686
|
-
"text": "
|
|
3679
|
+
"text": "boolean"
|
|
3687
3680
|
},
|
|
3688
|
-
"
|
|
3681
|
+
"default": "false",
|
|
3682
|
+
"description": "True while `submitDebugLog` is building and handing off the log. Same role as\n`downloadingDebugLog` for the Send button: the lifetime-stitch and the host's\n`send` callback are async, so the button needs a visible in-flight state."
|
|
3689
3683
|
},
|
|
3690
3684
|
{
|
|
3691
3685
|
"kind": "field",
|
|
3692
|
-
"name": "
|
|
3686
|
+
"name": "debugLogSubmitResult",
|
|
3693
3687
|
"type": {
|
|
3694
|
-
"text": "
|
|
3688
|
+
"text": "'sent' | 'error' | null"
|
|
3695
3689
|
},
|
|
3696
|
-
"
|
|
3690
|
+
"default": "null",
|
|
3691
|
+
"description": "Outcome of the last log submission, shown briefly on the button ('Sent' /\n'Failed — retry') then cleared by `setDebugLogSubmitResult`'s timer. `null` when idle."
|
|
3697
3692
|
},
|
|
3698
3693
|
{
|
|
3699
3694
|
"kind": "field",
|
|
3700
|
-
"name": "
|
|
3695
|
+
"name": "debugLogSubmitResultTimer",
|
|
3701
3696
|
"type": {
|
|
3702
|
-
"text": "
|
|
3697
|
+
"text": "ReturnType<typeof setTimeout> | undefined"
|
|
3703
3698
|
},
|
|
3704
3699
|
"privacy": "private",
|
|
3705
|
-
"description": "
|
|
3700
|
+
"description": "Timer that clears `debugLogSubmitResult` back to idle."
|
|
3706
3701
|
},
|
|
3707
3702
|
{
|
|
3708
3703
|
"kind": "field",
|
|
3709
|
-
"name": "
|
|
3704
|
+
"name": "debugLogComposeOpen",
|
|
3710
3705
|
"type": {
|
|
3711
|
-
"text": "
|
|
3706
|
+
"text": "boolean"
|
|
3712
3707
|
},
|
|
3713
|
-
"
|
|
3714
|
-
"description": "
|
|
3708
|
+
"default": "false",
|
|
3709
|
+
"description": "Whether the agent-log compose box (note + Send/Cancel) is open. Opened by the row's\nSend button when `debugLogSubmit.note` is not `false`; closed by Cancel or a\nsuccessful send. Stays open after a failure so the typed note is not lost."
|
|
3715
3710
|
},
|
|
3716
3711
|
{
|
|
3717
3712
|
"kind": "field",
|
|
3718
|
-
"name": "
|
|
3719
|
-
"
|
|
3713
|
+
"name": "debugLogNote",
|
|
3714
|
+
"type": {
|
|
3715
|
+
"text": "string"
|
|
3716
|
+
},
|
|
3717
|
+
"default": "''",
|
|
3718
|
+
"description": "The note typed in the compose box, raw (trimmed only at submit time)."
|
|
3720
3719
|
},
|
|
3721
3720
|
{
|
|
3722
3721
|
"kind": "field",
|
|
3723
|
-
"name": "
|
|
3722
|
+
"name": "debugLogNoteEl",
|
|
3724
3723
|
"type": {
|
|
3725
|
-
"text": "
|
|
3724
|
+
"text": "HTMLElement | undefined"
|
|
3726
3725
|
},
|
|
3727
|
-
"
|
|
3728
|
-
"default": "false"
|
|
3726
|
+
"description": "Bound to the compose box's text-area via the template ref, for focus on open."
|
|
3729
3727
|
},
|
|
3730
3728
|
{
|
|
3731
3729
|
"kind": "field",
|
|
3732
|
-
"name": "
|
|
3730
|
+
"name": "debugLogSubmitResultFlashMs",
|
|
3731
|
+
"default": "4000",
|
|
3732
|
+
"description": "How long 'Sent' shows before idle. Overridable so tests need not wait 4 seconds.",
|
|
3733
3733
|
"type": {
|
|
3734
|
-
"text": "
|
|
3734
|
+
"text": "number"
|
|
3735
|
+
}
|
|
3736
|
+
},
|
|
3737
|
+
{
|
|
3738
|
+
"kind": "field",
|
|
3739
|
+
"name": "debugLogSubmitGeneration",
|
|
3740
|
+
"type": {
|
|
3741
|
+
"text": "number"
|
|
3735
3742
|
},
|
|
3736
3743
|
"privacy": "private",
|
|
3737
|
-
"
|
|
3744
|
+
"default": "0",
|
|
3745
|
+
"description": "Bumped by `resetDebugLogSubmitState`. An in-flight `submitDebugLog` captures it and\ndrops its continuation when a reset (disconnect, session switch, Clear) happened\nwhile it awaited — otherwise the stale submission would write state, arm a timer on\na torn-down element, or report 'Sent' into a session it never belonged to."
|
|
3738
3746
|
},
|
|
3739
3747
|
{
|
|
3740
3748
|
"kind": "field",
|
|
3741
|
-
"name": "
|
|
3749
|
+
"name": "settingsModalTab",
|
|
3742
3750
|
"type": {
|
|
3743
|
-
"text": "
|
|
3751
|
+
"text": "SettingsModalTab"
|
|
3744
3752
|
},
|
|
3745
|
-
"description": "
|
|
3753
|
+
"description": "Active tab inside the settings modal."
|
|
3746
3754
|
},
|
|
3747
3755
|
{
|
|
3748
3756
|
"kind": "field",
|
|
3749
|
-
"name": "
|
|
3757
|
+
"name": "settingsModal",
|
|
3750
3758
|
"type": {
|
|
3751
|
-
"text": "
|
|
3759
|
+
"text": "Modal | undefined"
|
|
3752
3760
|
},
|
|
3753
|
-
"description": "Bound to the
|
|
3761
|
+
"description": "Bound to the design-system modal via the template ref."
|
|
3754
3762
|
},
|
|
3755
3763
|
{
|
|
3756
|
-
"kind": "
|
|
3757
|
-
"name": "
|
|
3764
|
+
"kind": "field",
|
|
3765
|
+
"name": "persistenceBroken",
|
|
3766
|
+
"type": {
|
|
3767
|
+
"text": "boolean"
|
|
3768
|
+
},
|
|
3769
|
+
"default": "false",
|
|
3770
|
+
"description": "GENC-1511 — persistence has failed repeatedly and it is no longer saving. Drives a BLOCKING\nmodal with a single Reload action: the whole failure class this ticket exists for is one the\nuser cannot see, and a passive indicator is close to invisible (Will worked for 3h17m past\nthe point his session stopped saving, with nothing on screen to tell him).\n\nSet only at a moment when reloading is SAFE — the persister gates it on the active agent\nbeing resumable, so we never advise a reload while an agent's in-flight work would be lost."
|
|
3771
|
+
},
|
|
3772
|
+
{
|
|
3773
|
+
"kind": "field",
|
|
3774
|
+
"name": "brokenSources",
|
|
3758
3775
|
"privacy": "private",
|
|
3776
|
+
"readonly": true,
|
|
3777
|
+
"default": "new Map<string, { message?: string; detail?: string }>()",
|
|
3778
|
+
"description": "Which reporters currently consider persistence broken, newest last, each with the copy it\nasked for. FoundationAiAssistant.persistenceBroken is DERIVED from this (`size > 0`) rather than being the\nsource of truth.\n\nA plain boolean was wrong the moment there was more than one reporter, and review caught it:\nthis element's own persister covers `sessions/<key>`, while a host reports its own keyspaces\n(Create's `projects/<id>.json`). With one flag, a SESSION save landing after its own broken\nepisode called `reportPersistenceRecovered()` and closed the modal while the PROJECT store\nwas still refusing writes — and because Create's own re-entry guard only clears on a\nsuccessful project write, the warning could then never be raised again for the life of the\npage. The user carried on against a dead store with the warning cancelled by an unrelated\nsubsystem: the exact failure this modal exists to prevent, on the keyspace that holds the app\nrather than the transcript.\n\nA `Map` and not a `Set` because the copy has to survive the same collision. The winner is the\nmost recently reported still-broken source (insertion order, so it is deterministic), and when\none recovers the copy falls back to whoever is left instead of reverting to the session\ndefault — which would otherwise state something untrue of the failure still in progress."
|
|
3779
|
+
},
|
|
3780
|
+
{
|
|
3781
|
+
"kind": "method",
|
|
3782
|
+
"name": "persistenceBrokenChanged",
|
|
3759
3783
|
"return": {
|
|
3760
3784
|
"type": {
|
|
3761
|
-
"text": "
|
|
3785
|
+
"text": "void"
|
|
3762
3786
|
}
|
|
3763
3787
|
},
|
|
3764
3788
|
"parameters": [
|
|
3765
3789
|
{
|
|
3766
|
-
"name": "
|
|
3790
|
+
"name": "_old",
|
|
3767
3791
|
"type": {
|
|
3768
|
-
"text": "
|
|
3792
|
+
"text": "boolean"
|
|
3793
|
+
}
|
|
3794
|
+
},
|
|
3795
|
+
{
|
|
3796
|
+
"name": "broken",
|
|
3797
|
+
"type": {
|
|
3798
|
+
"text": "boolean"
|
|
3769
3799
|
}
|
|
3770
3800
|
}
|
|
3771
3801
|
],
|
|
3772
|
-
"description": "
|
|
3802
|
+
"description": "Showing and hiding the modal hangs off the PROPERTY, so `persistenceBroken` is the single\nentry point — for this element's own persister callback and for a host reporting a failure in\na keyspace this element knows nothing about (Create's project payload, GENC-1511 §17).\n\nIt has to be here rather than at the call site because of the `cancel` listener: `cancel`\ndoes not bubble, so it cannot be bound from the template, and a caller that shows the modal\nwithout attaching it gets a modal Escape closes — which defeats the whole point. Routing\nevery path through one place makes a dismissible variant unreachable."
|
|
3773
3803
|
},
|
|
3774
3804
|
{
|
|
3775
3805
|
"kind": "field",
|
|
3776
|
-
"name": "
|
|
3777
|
-
"
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
"description": "Explicit composer height once dragged; `null` keeps the default auto-grow."
|
|
3806
|
+
"name": "onPersistenceModalCancel",
|
|
3807
|
+
"privacy": "private",
|
|
3808
|
+
"readonly": true,
|
|
3809
|
+
"description": "Swallows the native dialog's Escape route. Stored, not inline, so it can be removed again."
|
|
3781
3810
|
},
|
|
3782
3811
|
{
|
|
3783
3812
|
"kind": "field",
|
|
3784
|
-
"name": "
|
|
3813
|
+
"name": "persistenceEscapeGuardTarget",
|
|
3785
3814
|
"type": {
|
|
3786
|
-
"text": "
|
|
3815
|
+
"text": "HTMLDialogElement | undefined"
|
|
3787
3816
|
},
|
|
3788
|
-
"
|
|
3789
|
-
"description": "
|
|
3790
|
-
},
|
|
3791
|
-
{
|
|
3792
|
-
"kind": "field",
|
|
3793
|
-
"name": "_handleGlobalInteraction",
|
|
3794
|
-
"privacy": "private"
|
|
3817
|
+
"privacy": "private",
|
|
3818
|
+
"description": "The node the guard above is bound to, so removal targets the same one it was added to."
|
|
3795
3819
|
},
|
|
3796
3820
|
{
|
|
3797
|
-
"kind": "
|
|
3798
|
-
"name": "
|
|
3799
|
-
"
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3821
|
+
"kind": "method",
|
|
3822
|
+
"name": "attachPersistenceEscapeGuard",
|
|
3823
|
+
"privacy": "private",
|
|
3824
|
+
"return": {
|
|
3825
|
+
"type": {
|
|
3826
|
+
"text": "void"
|
|
3827
|
+
}
|
|
3828
|
+
},
|
|
3829
|
+
"parameters": [
|
|
3830
|
+
{
|
|
3831
|
+
"name": "modal",
|
|
3832
|
+
"type": {
|
|
3833
|
+
"text": "Modal"
|
|
3834
|
+
}
|
|
3835
|
+
}
|
|
3836
|
+
],
|
|
3837
|
+
"description": "Make the modal survive Escape. Bound imperatively because `cancel` does not bubble.\n\nAttach/detach rather than fire-and-forget: a broken → recovered → broken cycle is reachable\n(that is what FoundationAiAssistant.reportPersistenceRecovered is for), and re-showing previously added a\nfresh anonymous closure each time, accumulating duplicate listeners on the dialog.\n\nA missing `mainElement` is LOGGED rather than ignored. `Dialog` declares it non-optional, so\nif it is ever absent the old optional-chain quietly produced an Escape-dismissible modal —\nfailing open on the one property this modal must never lose."
|
|
3838
|
+
},
|
|
3839
|
+
{
|
|
3840
|
+
"kind": "method",
|
|
3841
|
+
"name": "detachPersistenceEscapeGuard",
|
|
3842
|
+
"privacy": "private",
|
|
3843
|
+
"return": {
|
|
3844
|
+
"type": {
|
|
3845
|
+
"text": "void"
|
|
3846
|
+
}
|
|
3847
|
+
},
|
|
3848
|
+
"description": "Remove the Escape guard, if one is bound. Safe to call when there is none."
|
|
3849
|
+
},
|
|
3850
|
+
{
|
|
3851
|
+
"kind": "field",
|
|
3852
|
+
"name": "persistenceBrokenMessage",
|
|
3853
|
+
"type": {
|
|
3854
|
+
"text": "string | undefined"
|
|
3855
|
+
},
|
|
3856
|
+
"description": "Body copy for the modal; `undefined` uses the session-oriented default in the template. A\nhost reporting a different keyspace overrides it — \"this session has stopped saving\" is\nsimply untrue of a failed project write."
|
|
3857
|
+
},
|
|
3858
|
+
{
|
|
3859
|
+
"kind": "field",
|
|
3860
|
+
"name": "persistenceBrokenDetail",
|
|
3861
|
+
"type": {
|
|
3862
|
+
"text": "string | undefined"
|
|
3863
|
+
},
|
|
3864
|
+
"description": "Optional second line, already composed. A STRING rather than the message-count fields it\nreplaces: quantifying is caller-specific (\"N messages\", \"your last N changes\"), and keeping\nthe template ignorant of what is being counted is what makes it reusable."
|
|
3865
|
+
},
|
|
3866
|
+
{
|
|
3867
|
+
"kind": "field",
|
|
3868
|
+
"name": "persistenceModal",
|
|
3869
|
+
"type": {
|
|
3870
|
+
"text": "Modal | undefined"
|
|
3871
|
+
},
|
|
3872
|
+
"description": "The modal itself, so it can be shown and made non-dismissible."
|
|
3873
|
+
},
|
|
3874
|
+
{
|
|
3875
|
+
"kind": "field",
|
|
3876
|
+
"name": "settingsTabsEl",
|
|
3877
|
+
"type": {
|
|
3878
|
+
"text": "SettingsModalTabsElement | undefined"
|
|
3879
|
+
},
|
|
3880
|
+
"description": "Bound to the settings modal tab bar — used to resync selection after reopen."
|
|
3881
|
+
},
|
|
3882
|
+
{
|
|
3883
|
+
"kind": "field",
|
|
3884
|
+
"name": "settingsModelSlotted",
|
|
3885
|
+
"type": {
|
|
3886
|
+
"text": "HTMLElement[]"
|
|
3887
|
+
},
|
|
3888
|
+
"description": "Light-DOM nodes assigned to settings modal slots. The template's `slotted()`\nbindings write these by property NAME, so each needs a real setter here even\nthough the controller owns the arrays."
|
|
3889
|
+
},
|
|
3890
|
+
{
|
|
3891
|
+
"kind": "field",
|
|
3892
|
+
"name": "settingsAppSlotted",
|
|
3893
|
+
"type": {
|
|
3894
|
+
"text": "HTMLElement[]"
|
|
3895
|
+
}
|
|
3896
|
+
},
|
|
3897
|
+
{
|
|
3898
|
+
"kind": "field",
|
|
3899
|
+
"name": "settingsCostCurrentSlotted",
|
|
3900
|
+
"type": {
|
|
3901
|
+
"text": "HTMLElement[]"
|
|
3902
|
+
}
|
|
3903
|
+
},
|
|
3904
|
+
{
|
|
3905
|
+
"kind": "field",
|
|
3906
|
+
"name": "settingsCostHistorySlotted",
|
|
3907
|
+
"type": {
|
|
3908
|
+
"text": "HTMLElement[]"
|
|
3909
|
+
}
|
|
3910
|
+
},
|
|
3911
|
+
{
|
|
3912
|
+
"kind": "field",
|
|
3913
|
+
"name": "showingSplash",
|
|
3914
|
+
"type": {
|
|
3915
|
+
"text": "boolean"
|
|
3916
|
+
},
|
|
3917
|
+
"default": "false",
|
|
3918
|
+
"description": "Whether the splash overlay is currently showing (no messages and showSplash is enabled). Reflected as a boolean attribute on the host."
|
|
3919
|
+
},
|
|
3920
|
+
{
|
|
3921
|
+
"kind": "field",
|
|
3922
|
+
"name": "driver",
|
|
3923
|
+
"type": {
|
|
3924
|
+
"text": "AiDriver | undefined"
|
|
3925
|
+
},
|
|
3926
|
+
"privacy": "private"
|
|
3927
|
+
},
|
|
3928
|
+
{
|
|
3929
|
+
"kind": "field",
|
|
3930
|
+
"name": "orchestrator",
|
|
3931
|
+
"type": {
|
|
3932
|
+
"text": "OrchestratingDriver | undefined"
|
|
3933
|
+
},
|
|
3934
|
+
"privacy": "private",
|
|
3935
|
+
"description": "This element's driver as an orchestrator, or `undefined` when the session is running a bare\n`ChatDriver`. The only place in this element that narrows the type; the test itself lives in\n`asOrchestrator`, shared with the session persister.",
|
|
3936
|
+
"readonly": true
|
|
3937
|
+
},
|
|
3938
|
+
{
|
|
3939
|
+
"kind": "field",
|
|
3940
|
+
"name": "driverCleanup",
|
|
3941
|
+
"type": {
|
|
3942
|
+
"text": "() => void | undefined"
|
|
3943
|
+
},
|
|
3944
|
+
"privacy": "private"
|
|
3945
|
+
},
|
|
3946
|
+
{
|
|
3947
|
+
"kind": "field",
|
|
3948
|
+
"name": "loadingTimer",
|
|
3949
|
+
"type": {
|
|
3950
|
+
"text": "ReturnType<typeof setTimeout> | undefined"
|
|
3951
|
+
},
|
|
3952
|
+
"privacy": "private"
|
|
3953
|
+
},
|
|
3954
|
+
{
|
|
3955
|
+
"kind": "field",
|
|
3956
|
+
"name": "unsubBus",
|
|
3957
|
+
"type": {
|
|
3958
|
+
"text": "() => void | undefined"
|
|
3959
|
+
},
|
|
3960
|
+
"privacy": "private"
|
|
3961
|
+
},
|
|
3962
|
+
{
|
|
3963
|
+
"kind": "field",
|
|
3964
|
+
"name": "_unsubBudgetLatch",
|
|
3965
|
+
"type": {
|
|
3966
|
+
"text": "() => void | undefined"
|
|
3967
|
+
},
|
|
3968
|
+
"privacy": "private",
|
|
3969
|
+
"description": "Unsubscribe handle for the `tool-loop-end` budget latch (GENC-1464)."
|
|
3970
|
+
},
|
|
3971
|
+
{
|
|
3972
|
+
"kind": "field",
|
|
3973
|
+
"name": "unsubProviderRegistry",
|
|
3974
|
+
"type": {
|
|
3975
|
+
"text": "() => void | undefined"
|
|
3976
|
+
},
|
|
3977
|
+
"privacy": "private",
|
|
3978
|
+
"description": "Unsubscribe handle for the provider-registry change listener (observable registries only)."
|
|
3979
|
+
},
|
|
3980
|
+
{
|
|
3981
|
+
"kind": "field",
|
|
3982
|
+
"name": "_handlePageHide",
|
|
3983
|
+
"privacy": "private"
|
|
3984
|
+
},
|
|
3985
|
+
{
|
|
3986
|
+
"kind": "field",
|
|
3987
|
+
"name": "haloStartPublished",
|
|
3988
|
+
"type": {
|
|
3989
|
+
"text": "boolean"
|
|
3990
|
+
},
|
|
3991
|
+
"privacy": "private",
|
|
3992
|
+
"default": "false"
|
|
3993
|
+
},
|
|
3994
|
+
{
|
|
3995
|
+
"kind": "field",
|
|
3996
|
+
"name": "_driverAgentsKey",
|
|
3997
|
+
"type": {
|
|
3998
|
+
"text": "string | undefined"
|
|
3999
|
+
},
|
|
4000
|
+
"privacy": "private",
|
|
4001
|
+
"description": "Fingerprint of the agents array used to build the current driver. Used by agentsChanged to skip spurious rebuilds."
|
|
4002
|
+
},
|
|
4003
|
+
{
|
|
4004
|
+
"kind": "field",
|
|
4005
|
+
"name": "messagesEl",
|
|
4006
|
+
"type": {
|
|
4007
|
+
"text": "HTMLElement | undefined"
|
|
4008
|
+
},
|
|
4009
|
+
"description": "Bound to the messages container via the template ref — assigned by FAST before connectedCallback logic runs."
|
|
4010
|
+
},
|
|
4011
|
+
{
|
|
4012
|
+
"kind": "field",
|
|
4013
|
+
"name": "chatInputEl",
|
|
4014
|
+
"type": {
|
|
4015
|
+
"text": "HTMLElement | undefined"
|
|
4016
|
+
},
|
|
4017
|
+
"description": "Bound to the rapid-text-area chat input via the template ref."
|
|
4018
|
+
},
|
|
4019
|
+
{
|
|
4020
|
+
"kind": "method",
|
|
4021
|
+
"name": "accessor",
|
|
4022
|
+
"privacy": "private",
|
|
4023
|
+
"return": {
|
|
4024
|
+
"type": {
|
|
4025
|
+
"text": "Accessor<this[K]>"
|
|
4026
|
+
}
|
|
4027
|
+
},
|
|
4028
|
+
"parameters": [
|
|
4029
|
+
{
|
|
4030
|
+
"name": "key",
|
|
4031
|
+
"type": {
|
|
4032
|
+
"text": "K"
|
|
4033
|
+
}
|
|
4034
|
+
}
|
|
4035
|
+
],
|
|
4036
|
+
"description": "A get/set pair over one of this element's own properties, for a controller\nthat drives state it does not own. Written as a helper rather than two inline\nclosures per call: a pair of same-typed closures is easy to transpose by\naccident, and a single object cannot be."
|
|
4037
|
+
},
|
|
4038
|
+
{
|
|
4039
|
+
"kind": "field",
|
|
4040
|
+
"name": "composerHeightPx",
|
|
4041
|
+
"type": {
|
|
4042
|
+
"text": "number | null"
|
|
4043
|
+
},
|
|
4044
|
+
"description": "Explicit composer height once dragged; `null` keeps the default auto-grow."
|
|
4045
|
+
},
|
|
4046
|
+
{
|
|
4047
|
+
"kind": "field",
|
|
4048
|
+
"name": "isEngaged",
|
|
4049
|
+
"type": {
|
|
4050
|
+
"text": "boolean"
|
|
4051
|
+
},
|
|
4052
|
+
"default": "true",
|
|
4053
|
+
"description": "True when the user's last interaction (pointer or keyboard focus) was inside\nthe assistant. Defaults to true so the assistant claims focus on first mount.\nAuto-focus features (chat input on idle, widget inputs on mount) gate on this\nto avoid stealing focus from elsewhere on the page."
|
|
4054
|
+
},
|
|
4055
|
+
{
|
|
4056
|
+
"kind": "field",
|
|
4057
|
+
"name": "_handleGlobalInteraction",
|
|
4058
|
+
"privacy": "private"
|
|
4059
|
+
},
|
|
4060
|
+
{
|
|
4061
|
+
"kind": "field",
|
|
4062
|
+
"name": "_userScrolledAway",
|
|
4063
|
+
"type": {
|
|
4064
|
+
"text": "boolean"
|
|
4065
|
+
},
|
|
4066
|
+
"privacy": "private",
|
|
3803
4067
|
"default": "false",
|
|
3804
4068
|
"description": "True when the user has intentionally scrolled away from the bottom — suppresses auto-scroll."
|
|
3805
4069
|
},
|
|
@@ -5222,664 +5486,110 @@
|
|
|
5222
5486
|
"type": {
|
|
5223
5487
|
"text": "string"
|
|
5224
5488
|
},
|
|
5225
|
-
"description": "must match the id the failure was reported under."
|
|
5226
|
-
}
|
|
5227
|
-
],
|
|
5228
|
-
"description": "Withdraw one reporter's warning — its save landed, or the host's own store recovered.\n\nOnly `source`'s entry is removed, so a session recovery cannot cancel a host's still-live\nproject failure (GENC-1511, caught in review; see `brokenSources`). The modal closes\nonly once nothing is broken; while anything remains, the copy falls back to the newest\nsurvivor."
|
|
5229
|
-
},
|
|
5230
|
-
{
|
|
5231
|
-
"kind": "method",
|
|
5232
|
-
"name": "syncPersistenceBrokenCopy",
|
|
5233
|
-
"privacy": "private",
|
|
5234
|
-
"return": {
|
|
5235
|
-
"type": {
|
|
5236
|
-
"text": "void"
|
|
5237
|
-
}
|
|
5238
|
-
},
|
|
5239
|
-
"description": "Recompute the derived flag and the displayed copy from `brokenSources`.\n\nCopy order is last-in-wins, which is both deterministic (`Map` iterates in insertion order)\nand the behaviour a reader expects — the most recent failure is the one described. Setting\n`persistenceBroken` last means the modal is only ever shown or closed once the copy backing\nit is already correct."
|
|
5240
|
-
},
|
|
5241
|
-
{
|
|
5242
|
-
"kind": "method",
|
|
5243
|
-
"name": "onPersistenceBroken",
|
|
5244
|
-
"privacy": "private",
|
|
5245
|
-
"return": {
|
|
5246
|
-
"type": {
|
|
5247
|
-
"text": "void"
|
|
5248
|
-
}
|
|
5249
|
-
},
|
|
5250
|
-
"parameters": [
|
|
5251
|
-
{
|
|
5252
|
-
"name": "d",
|
|
5253
|
-
"type": {
|
|
5254
|
-
"text": "{\n unsavedMessages: number;\n lastSavedAt?: string;\n reason: string;\n }"
|
|
5255
|
-
}
|
|
5256
|
-
}
|
|
5257
|
-
],
|
|
5258
|
-
"description": "This element's own persister said the session snapshot is not landing (GENC-1511)."
|
|
5259
|
-
},
|
|
5260
|
-
{
|
|
5261
|
-
"kind": "method",
|
|
5262
|
-
"name": "onPersistenceRecovered",
|
|
5263
|
-
"privacy": "private",
|
|
5264
|
-
"return": {
|
|
5265
|
-
"type": {
|
|
5266
|
-
"text": "void"
|
|
5267
|
-
}
|
|
5268
|
-
},
|
|
5269
|
-
"description": "A session save landed after a broken episode — withdraw OUR warning only (GENC-1511).\n\nThe explicit source is the whole point: a host's project store may still be failing, and\nbefore this was per-source a session recovery closed that modal too."
|
|
5270
|
-
},
|
|
5271
|
-
{
|
|
5272
|
-
"kind": "method",
|
|
5273
|
-
"name": "reloadForPersistence",
|
|
5274
|
-
"return": {
|
|
5275
|
-
"type": {
|
|
5276
|
-
"text": "void"
|
|
5277
|
-
}
|
|
5278
|
-
},
|
|
5279
|
-
"description": "The modal's only action. A reload re-reads the stored snapshot, which is plain data parsed\nfrom the server, so it also clears the serialisation fault that is the most likely cause."
|
|
5280
|
-
},
|
|
5281
|
-
{
|
|
5282
|
-
"kind": "method",
|
|
5283
|
-
"name": "initPersistenceForNewStore",
|
|
5284
|
-
"privacy": "private",
|
|
5285
|
-
"return": {
|
|
5286
|
-
"type": {
|
|
5287
|
-
"text": "Promise<void>"
|
|
5288
|
-
}
|
|
5289
|
-
},
|
|
5290
|
-
"parameters": [
|
|
5291
|
-
{
|
|
5292
|
-
"name": "key",
|
|
5293
|
-
"type": {
|
|
5294
|
-
"text": "string"
|
|
5295
|
-
}
|
|
5296
|
-
}
|
|
5297
|
-
],
|
|
5298
|
-
"description": "First-load persistence init for a freshly created store (GENC-1351). Restores\nthe user's remembered persistence-toggle choice — kept independently of the\nsession snapshot so it survives a clear; the host-configured `enabled` is only\nthe default for a first-ever load — then auto-restores the session when\npersistence is (now) on."
|
|
5299
|
-
},
|
|
5300
|
-
{
|
|
5301
|
-
"kind": "method",
|
|
5302
|
-
"name": "triggerFileInput",
|
|
5303
|
-
"return": {
|
|
5304
|
-
"type": {
|
|
5305
|
-
"text": "void"
|
|
5306
|
-
}
|
|
5307
|
-
}
|
|
5308
|
-
},
|
|
5309
|
-
{
|
|
5310
|
-
"kind": "method",
|
|
5311
|
-
"name": "handleFileSelect",
|
|
5312
|
-
"return": {
|
|
5313
|
-
"type": {
|
|
5314
|
-
"text": "void"
|
|
5315
|
-
}
|
|
5316
|
-
},
|
|
5317
|
-
"parameters": [
|
|
5318
|
-
{
|
|
5319
|
-
"name": "e",
|
|
5320
|
-
"type": {
|
|
5321
|
-
"text": "Event"
|
|
5322
|
-
}
|
|
5323
|
-
}
|
|
5324
|
-
]
|
|
5325
|
-
},
|
|
5326
|
-
{
|
|
5327
|
-
"kind": "method",
|
|
5328
|
-
"name": "removeAttachment",
|
|
5329
|
-
"return": {
|
|
5330
|
-
"type": {
|
|
5331
|
-
"text": "void"
|
|
5332
|
-
}
|
|
5333
|
-
},
|
|
5334
|
-
"parameters": [
|
|
5335
|
-
{
|
|
5336
|
-
"name": "attachment",
|
|
5337
|
-
"type": {
|
|
5338
|
-
"text": "ChatAttachment"
|
|
5339
|
-
}
|
|
5340
|
-
}
|
|
5341
|
-
]
|
|
5342
|
-
},
|
|
5343
|
-
{
|
|
5344
|
-
"kind": "method",
|
|
5345
|
-
"name": "removeAttachmentError",
|
|
5346
|
-
"return": {
|
|
5347
|
-
"type": {
|
|
5348
|
-
"text": "void"
|
|
5349
|
-
}
|
|
5350
|
-
},
|
|
5351
|
-
"parameters": [
|
|
5352
|
-
{
|
|
5353
|
-
"name": "message",
|
|
5354
|
-
"type": {
|
|
5355
|
-
"text": "string"
|
|
5356
|
-
}
|
|
5357
|
-
}
|
|
5358
|
-
]
|
|
5359
|
-
},
|
|
5360
|
-
{
|
|
5361
|
-
"kind": "method",
|
|
5362
|
-
"name": "handleSendClick"
|
|
5363
|
-
},
|
|
5364
|
-
{
|
|
5365
|
-
"kind": "method",
|
|
5366
|
-
"name": "handleStopClick",
|
|
5367
|
-
"description": "User clicked Stop. Cancels the current turn via the driver and flips the\nbutton to \"Stopping…\" until the turn winds down (a tool mid-execution\nfinishes first). Guarded so a second click is a no-op."
|
|
5368
|
-
},
|
|
5369
|
-
{
|
|
5370
|
-
"kind": "method",
|
|
5371
|
-
"name": "handleSuggestionClick",
|
|
5372
|
-
"parameters": [
|
|
5373
|
-
{
|
|
5374
|
-
"name": "suggestion",
|
|
5375
|
-
"type": {
|
|
5376
|
-
"text": "string"
|
|
5377
|
-
}
|
|
5378
|
-
}
|
|
5379
|
-
]
|
|
5380
|
-
},
|
|
5381
|
-
{
|
|
5382
|
-
"kind": "method",
|
|
5383
|
-
"name": "submitMessage",
|
|
5384
|
-
"return": {
|
|
5385
|
-
"type": {
|
|
5386
|
-
"text": "Promise<SubmitMessageResult>"
|
|
5387
|
-
}
|
|
5388
|
-
},
|
|
5389
|
-
"parameters": [
|
|
5390
|
-
{
|
|
5391
|
-
"name": "input",
|
|
5392
|
-
"type": {
|
|
5393
|
-
"text": "{ text?: string; files?: File[] }"
|
|
5394
|
-
}
|
|
5395
|
-
}
|
|
5396
|
-
],
|
|
5397
|
-
"description": "Programmatically submit a message. Equivalent to the user typing into the\nbuilt-in composer and pressing send, but callable from external code — most\ncommonly a custom input rendered inside `slot=\"splash\"` when paired with\n`chatConfig.ui.hideComposer`.\n\nThe input fully describes the turn: `text` and `files` REPLACE any current\ncomposer state (they are not appended to it). Files are validated against\n`chatConfig.ui.acceptedFiles` using the same pipeline as the composer's\nattach button.\n\nAtomic on validation: if any file fails validation, no attachments are\ncommitted and no send is dispatched. Failure messages are returned in\n`errors` AND appended to the `attachmentErrors` observable so the built-in\nchip UI still surfaces them when visible.\n\nResolves once the underlying send has been kicked off — it does NOT await\nthe assistant's response."
|
|
5398
|
-
},
|
|
5399
|
-
{
|
|
5400
|
-
"kind": "method",
|
|
5401
|
-
"name": "fetchSuggestions",
|
|
5402
|
-
"privacy": "private"
|
|
5403
|
-
},
|
|
5404
|
-
{
|
|
5405
|
-
"kind": "field",
|
|
5406
|
-
"name": "_pendingSendPrompt",
|
|
5407
|
-
"type": {
|
|
5408
|
-
"text": "string | undefined"
|
|
5409
|
-
},
|
|
5410
|
-
"privacy": "private",
|
|
5411
|
-
"description": "User text of the message currently being sent, stashed for the lifetime of `send()`.\n`flow-owner-changed` fires while the driver routes this turn — before the message is\nappended to raw history — so the flow-activation-prompt capture reads this rather than\na stale raw-history lookup. Cleared once the send settles. (GENC-1351 §5.9)"
|
|
5412
|
-
},
|
|
5413
|
-
{
|
|
5414
|
-
"kind": "method",
|
|
5415
|
-
"name": "send",
|
|
5416
|
-
"privacy": "private"
|
|
5417
|
-
},
|
|
5418
|
-
{
|
|
5419
|
-
"kind": "method",
|
|
5420
|
-
"name": "onChatHeaderMouseDown",
|
|
5421
|
-
"parameters": [
|
|
5422
|
-
{
|
|
5423
|
-
"name": "e",
|
|
5424
|
-
"type": {
|
|
5425
|
-
"text": "MouseEvent"
|
|
5426
|
-
}
|
|
5427
|
-
}
|
|
5428
|
-
]
|
|
5429
|
-
},
|
|
5430
|
-
{
|
|
5431
|
-
"kind": "method",
|
|
5432
|
-
"name": "handleInteractionCompleted",
|
|
5433
|
-
"parameters": [
|
|
5434
|
-
{
|
|
5435
|
-
"name": "e",
|
|
5436
|
-
"type": {
|
|
5437
|
-
"text": "Event"
|
|
5438
|
-
}
|
|
5439
|
-
}
|
|
5440
|
-
]
|
|
5441
|
-
},
|
|
5442
|
-
{
|
|
5443
|
-
"kind": "method",
|
|
5444
|
-
"name": "handleInteractionCost",
|
|
5445
|
-
"parameters": [
|
|
5446
|
-
{
|
|
5447
|
-
"name": "e",
|
|
5448
|
-
"type": {
|
|
5449
|
-
"text": "Event"
|
|
5450
|
-
}
|
|
5451
|
-
}
|
|
5452
|
-
],
|
|
5453
|
-
"description": "A widget reporting spend it incurred AFTER resolving.\n\nNote what this deliberately does NOT do: no `startLoadingTimer()`. This is bookkeeping about a\nturn that already finished, so it must be invisible — showing a spinner would tell the user the\nassistant is working when nothing is pending."
|
|
5454
|
-
},
|
|
5455
|
-
{
|
|
5456
|
-
"kind": "field",
|
|
5457
|
-
"name": "stopButtonVisible",
|
|
5458
|
-
"type": {
|
|
5459
|
-
"text": "boolean"
|
|
5460
|
-
},
|
|
5461
|
-
"description": "Whether the Stop control is showing.\n\nWhile a turn runs Stop REPLACES Send rather than sitting beside it: the two\nare mutually exclusive actions, and a disabled Send next to a live Stop just\ngives the eye a dead control to skip past. Reads `busy`, so `cancelling`\nkeeps it up (in its \"Stopping…\" state) until the turn actually winds down.",
|
|
5462
|
-
"readonly": true
|
|
5463
|
-
},
|
|
5464
|
-
{
|
|
5465
|
-
"kind": "field",
|
|
5466
|
-
"name": "sendButtonVisible",
|
|
5467
|
-
"type": {
|
|
5468
|
-
"text": "boolean"
|
|
5469
|
-
},
|
|
5470
|
-
"description": "Whether Send is rendered at all. Hidden exactly when Stop has taken its\nplace — so a host that suppressed Stop via `hideStopButton` keeps Send\nthroughout, disabled for the duration, and the slot is never left empty\nmid-turn.",
|
|
5471
|
-
"readonly": true
|
|
5472
|
-
},
|
|
5473
|
-
{
|
|
5474
|
-
"kind": "field",
|
|
5475
|
-
"name": "isComposerResizable",
|
|
5476
|
-
"type": {
|
|
5477
|
-
"text": "boolean"
|
|
5478
|
-
},
|
|
5479
|
-
"description": "Whether the message input shows a drag handle to resize its height.",
|
|
5480
|
-
"readonly": true
|
|
5481
|
-
},
|
|
5482
|
-
{
|
|
5483
|
-
"kind": "field",
|
|
5484
|
-
"name": "composerHeightStyle",
|
|
5485
|
-
"type": {
|
|
5486
|
-
"text": "string"
|
|
5487
|
-
},
|
|
5488
|
-
"description": "Inline style carrying the dragged height into `--composer-height`.",
|
|
5489
|
-
"readonly": true
|
|
5490
|
-
},
|
|
5491
|
-
{
|
|
5492
|
-
"kind": "method",
|
|
5493
|
-
"name": "onComposerResizeStart",
|
|
5494
|
-
"return": {
|
|
5495
|
-
"type": {
|
|
5496
|
-
"text": "void"
|
|
5497
|
-
}
|
|
5498
|
-
},
|
|
5499
|
-
"parameters": [
|
|
5500
|
-
{
|
|
5501
|
-
"name": "e",
|
|
5502
|
-
"type": {
|
|
5503
|
-
"text": "PointerEvent"
|
|
5504
|
-
}
|
|
5505
|
-
}
|
|
5506
|
-
]
|
|
5507
|
-
},
|
|
5508
|
-
{
|
|
5509
|
-
"kind": "method",
|
|
5510
|
-
"name": "onComposerResizeMove",
|
|
5511
|
-
"return": {
|
|
5512
|
-
"type": {
|
|
5513
|
-
"text": "void"
|
|
5514
|
-
}
|
|
5515
|
-
},
|
|
5516
|
-
"parameters": [
|
|
5517
|
-
{
|
|
5518
|
-
"name": "e",
|
|
5519
|
-
"type": {
|
|
5520
|
-
"text": "PointerEvent"
|
|
5521
|
-
}
|
|
5522
|
-
}
|
|
5523
|
-
]
|
|
5524
|
-
},
|
|
5525
|
-
{
|
|
5526
|
-
"kind": "method",
|
|
5527
|
-
"name": "onComposerResizeEnd",
|
|
5528
|
-
"return": {
|
|
5529
|
-
"type": {
|
|
5530
|
-
"text": "void"
|
|
5531
|
-
}
|
|
5532
|
-
},
|
|
5533
|
-
"parameters": [
|
|
5534
|
-
{
|
|
5535
|
-
"name": "e",
|
|
5536
|
-
"type": {
|
|
5537
|
-
"text": "PointerEvent"
|
|
5538
|
-
}
|
|
5539
|
-
}
|
|
5540
|
-
]
|
|
5541
|
-
}
|
|
5542
|
-
],
|
|
5543
|
-
"events": [
|
|
5544
|
-
{
|
|
5545
|
-
"name": "budget-refresh-requested",
|
|
5546
|
-
"type": {
|
|
5547
|
-
"text": "CustomEvent"
|
|
5548
|
-
}
|
|
5549
|
-
},
|
|
5550
|
-
{
|
|
5551
|
-
"type": {
|
|
5552
|
-
"text": "CustomEvent"
|
|
5553
|
-
}
|
|
5554
|
-
},
|
|
5555
|
-
{
|
|
5556
|
-
"description": "Fired when the user presses the chat header in `popout-mode=\"expand\"` (for drag-to-popout hosts). Bubbles and composed. detail: `ChatHeaderMouseDownDetail`",
|
|
5557
|
-
"name": "chat-header-mousedown"
|
|
5558
|
-
},
|
|
5559
|
-
{
|
|
5560
|
-
"description": "Fired after the session is wiped (the lifecycle menu's Clear). The payload is captured before teardown so the host can clean up any external state the active agent was working on. Bubbles and composed. detail: `SessionClearedDetail`",
|
|
5561
|
-
"name": "session-cleared"
|
|
5562
|
-
}
|
|
5563
|
-
],
|
|
5564
|
-
"attributes": [
|
|
5565
|
-
{
|
|
5566
|
-
"name": "header-title",
|
|
5567
|
-
"type": {
|
|
5568
|
-
"text": "string"
|
|
5569
|
-
},
|
|
5570
|
-
"default": "'Genesis Assistant'",
|
|
5571
|
-
"fieldName": "headerTitle"
|
|
5572
|
-
},
|
|
5573
|
-
{
|
|
5574
|
-
"name": "session-key",
|
|
5575
|
-
"type": {
|
|
5576
|
-
"text": "string | undefined"
|
|
5577
|
-
},
|
|
5578
|
-
"description": "Explicit session/persistence key (GENC-1351 §5.12). When set, this is the\nsession identity — the key for the driver/store/persister/diagnostics\nregistries and the `sessionKey` passed to the persistence provider — taking\nprecedence over the DOM `id`. A host that scopes persistence per-entity\n(e.g. one chat session per project) binds this to a stable per-entity id;\nchanging it on a **connected** element re-keys the session in place — tears\ndown the current conversation and restores the new key's — via\n`switchSession`. Falls back to `id` when unset,\nso existing consumers are unaffected.",
|
|
5579
|
-
"fieldName": "sessionKey"
|
|
5580
|
-
},
|
|
5581
|
-
{
|
|
5582
|
-
"name": "image-src",
|
|
5583
|
-
"type": {
|
|
5584
|
-
"text": "string | undefined"
|
|
5585
|
-
},
|
|
5586
|
-
"fieldName": "imageSrc"
|
|
5587
|
-
},
|
|
5588
|
-
{
|
|
5589
|
-
"name": "user-image-src",
|
|
5590
|
-
"type": {
|
|
5591
|
-
"text": "string | undefined"
|
|
5592
|
-
},
|
|
5593
|
-
"fieldName": "userImageSrc"
|
|
5594
|
-
},
|
|
5595
|
-
{
|
|
5596
|
-
"name": "placeholder",
|
|
5597
|
-
"type": {
|
|
5598
|
-
"text": "string"
|
|
5599
|
-
},
|
|
5600
|
-
"default": "'Message assistant...'",
|
|
5601
|
-
"fieldName": "placeholder"
|
|
5602
|
-
},
|
|
5603
|
-
{
|
|
5604
|
-
"name": "popout-mode",
|
|
5605
|
-
"type": {
|
|
5606
|
-
"text": "PopoutMode | undefined"
|
|
5607
|
-
},
|
|
5608
|
-
"description": "Controls the pop-out button shown next to the settings cog.\n\"expand\" — in bubble, expands to layout panel (fires chat-popout).\n\"collapse\" — in layout panel, collapses back to bubble (fires chat-popin).\nAbsent — no button (default standalone behaviour, no breaking change).",
|
|
5609
|
-
"fieldName": "popoutMode"
|
|
5610
|
-
},
|
|
5611
|
-
{
|
|
5612
|
-
"name": "debug-redux",
|
|
5613
|
-
"type": {
|
|
5614
|
-
"text": "boolean"
|
|
5615
|
-
},
|
|
5616
|
-
"default": "false",
|
|
5617
|
-
"description": "When set, enables Redux DevTools for this instance's session store.",
|
|
5618
|
-
"fieldName": "debugRedux"
|
|
5619
|
-
}
|
|
5620
|
-
],
|
|
5621
|
-
"superclass": {
|
|
5622
|
-
"name": "GenesisElement",
|
|
5623
|
-
"package": "@genesislcap/web-core"
|
|
5624
|
-
},
|
|
5625
|
-
"tagName": "foundation-ai-assistant",
|
|
5626
|
-
"customElement": true
|
|
5627
|
-
}
|
|
5628
|
-
],
|
|
5629
|
-
"exports": [
|
|
5630
|
-
{
|
|
5631
|
-
"kind": "js",
|
|
5632
|
-
"name": "sparkleIconSvg",
|
|
5633
|
-
"declaration": {
|
|
5634
|
-
"name": "sparkleIconSvg",
|
|
5635
|
-
"module": "src/main/main.ts"
|
|
5636
|
-
}
|
|
5637
|
-
},
|
|
5638
|
-
{
|
|
5639
|
-
"kind": "js",
|
|
5640
|
-
"name": "userIconSvg",
|
|
5641
|
-
"declaration": {
|
|
5642
|
-
"name": "userIconSvg",
|
|
5643
|
-
"module": "src/main/main.ts"
|
|
5644
|
-
}
|
|
5645
|
-
},
|
|
5646
|
-
{
|
|
5647
|
-
"kind": "js",
|
|
5648
|
-
"name": "genesisIconSvg",
|
|
5649
|
-
"declaration": {
|
|
5650
|
-
"name": "genesisIconSvg",
|
|
5651
|
-
"module": "src/main/main.ts"
|
|
5652
|
-
}
|
|
5653
|
-
},
|
|
5654
|
-
{
|
|
5655
|
-
"kind": "js",
|
|
5656
|
-
"name": "budgetPercentOf",
|
|
5657
|
-
"declaration": {
|
|
5658
|
-
"name": "budgetPercentOf",
|
|
5659
|
-
"module": "./budget-controller"
|
|
5660
|
-
}
|
|
5661
|
-
},
|
|
5662
|
-
{
|
|
5663
|
-
"kind": "js",
|
|
5664
|
-
"name": "formatBlockedReason",
|
|
5665
|
-
"declaration": {
|
|
5666
|
-
"name": "formatBlockedReason",
|
|
5667
|
-
"module": "./budget-controller"
|
|
5668
|
-
}
|
|
5669
|
-
},
|
|
5670
|
-
{
|
|
5671
|
-
"kind": "js",
|
|
5672
|
-
"name": "FoundationAiAssistant",
|
|
5673
|
-
"declaration": {
|
|
5674
|
-
"name": "FoundationAiAssistant",
|
|
5675
|
-
"module": "src/main/main.ts"
|
|
5676
|
-
}
|
|
5677
|
-
},
|
|
5678
|
-
{
|
|
5679
|
-
"kind": "custom-element-definition",
|
|
5680
|
-
"name": "foundation-ai-assistant",
|
|
5681
|
-
"declaration": {
|
|
5682
|
-
"name": "FoundationAiAssistant",
|
|
5683
|
-
"module": "src/main/main.ts"
|
|
5684
|
-
}
|
|
5685
|
-
}
|
|
5686
|
-
]
|
|
5687
|
-
},
|
|
5688
|
-
{
|
|
5689
|
-
"kind": "javascript-module",
|
|
5690
|
-
"path": "src/main/main.types.ts",
|
|
5691
|
-
"declarations": [
|
|
5692
|
-
{
|
|
5693
|
-
"kind": "variable",
|
|
5694
|
-
"name": "AiAssistantEvent",
|
|
5695
|
-
"type": {
|
|
5696
|
-
"text": "{\n /** Session wiped via the lifecycle menu's Clear. `detail`: `SessionClearedDetail`. */\n SessionCleared: 'session-cleared',\n /** Header pressed in `popout-mode=\"expand\"` (drag-to-popout hosts). `detail`: `ChatHeaderMouseDownDetail`. */\n ChatHeaderMouseDown: 'chat-header-mousedown',\n}"
|
|
5697
|
-
},
|
|
5698
|
-
"default": "{\n /** Session wiped via the lifecycle menu's Clear. `detail`: `SessionClearedDetail`. */\n SessionCleared: 'session-cleared',\n /** Header pressed in `popout-mode=\"expand\"` (drag-to-popout hosts). `detail`: `ChatHeaderMouseDownDetail`. */\n ChatHeaderMouseDown: 'chat-header-mousedown',\n}",
|
|
5699
|
-
"description": "DOM events the `<foundation-ai-assistant>` element dispatches to its host.\nAll bubble and are `composed` (they cross the shadow boundary), so a host can\nlisten on the element — or any ancestor — to react. Use these constants to\nwire listeners instead of hand-typing event-name strings.\n\nAn `as const` map (not a TS `enum` — this package ships none), so it serves as\nboth the listener-name value and, via the same-named type below, a union."
|
|
5700
|
-
},
|
|
5701
|
-
{
|
|
5702
|
-
"kind": "variable",
|
|
5703
|
-
"name": "ANIMATION_DEFS",
|
|
5704
|
-
"type": {
|
|
5705
|
-
"text": "object"
|
|
5706
|
-
},
|
|
5707
|
-
"default": "{\n loading: {\n label: 'Dots',\n description: 'Shows pulsing dots while the assistant is generating a response.',\n category: 'Loading style',\n },\n waves: {\n label: 'Waves',\n description:\n 'Shows glowing sine waves inside a circle while the assistant is generating a response.',\n category: 'Loading style',\n },\n flowingWaves: {\n label: 'Flowing waves',\n description:\n 'Shows coloured waves rising and settling from a line while the assistant is generating a response.',\n category: 'Loading style',\n },\n plasma: {\n label: 'Plasma orb',\n description:\n 'Shows a glowing plasma sphere with drifting energy while the assistant is generating a response.',\n category: 'Loading style',\n },\n halo: {\n label: 'Halo',\n description:\n 'Displays a glowing halo around the assistant avatar while a response is streaming.',\n category: 'Effects',\n },\n}",
|
|
5708
|
-
"description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
|
|
5709
|
-
},
|
|
5710
|
-
{
|
|
5711
|
-
"kind": "variable",
|
|
5712
|
-
"name": "satisfies",
|
|
5713
|
-
"description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
|
|
5714
|
-
},
|
|
5715
|
-
{
|
|
5716
|
-
"kind": "variable",
|
|
5717
|
-
"name": "Record",
|
|
5718
|
-
"description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
|
|
5719
|
-
}
|
|
5720
|
-
],
|
|
5721
|
-
"exports": [
|
|
5722
|
-
{
|
|
5723
|
-
"kind": "js",
|
|
5724
|
-
"name": "AgentPickerMode",
|
|
5725
|
-
"declaration": {
|
|
5726
|
-
"name": "AgentPickerMode",
|
|
5727
|
-
"package": "@genesislcap/foundation-ai"
|
|
5728
|
-
}
|
|
5729
|
-
},
|
|
5730
|
-
{
|
|
5731
|
-
"kind": "js",
|
|
5732
|
-
"name": "AiAssistantEvent",
|
|
5733
|
-
"declaration": {
|
|
5734
|
-
"name": "AiAssistantEvent",
|
|
5735
|
-
"module": "src/main/main.types.ts"
|
|
5736
|
-
}
|
|
5737
|
-
},
|
|
5738
|
-
{
|
|
5739
|
-
"kind": "js",
|
|
5740
|
-
"name": "ANIMATION_DEFS",
|
|
5741
|
-
"declaration": {
|
|
5742
|
-
"name": "ANIMATION_DEFS",
|
|
5743
|
-
"module": "src/main/main.types.ts"
|
|
5744
|
-
}
|
|
5745
|
-
},
|
|
5746
|
-
{
|
|
5747
|
-
"kind": "js",
|
|
5748
|
-
"name": "satisfies",
|
|
5749
|
-
"declaration": {
|
|
5750
|
-
"name": "satisfies",
|
|
5751
|
-
"module": "src/main/main.types.ts"
|
|
5752
|
-
}
|
|
5753
|
-
},
|
|
5754
|
-
{
|
|
5755
|
-
"kind": "js",
|
|
5756
|
-
"name": "Record",
|
|
5757
|
-
"declaration": {
|
|
5758
|
-
"name": "Record",
|
|
5759
|
-
"module": "src/main/main.types.ts"
|
|
5760
|
-
}
|
|
5761
|
-
}
|
|
5762
|
-
]
|
|
5763
|
-
},
|
|
5764
|
-
{
|
|
5765
|
-
"kind": "javascript-module",
|
|
5766
|
-
"path": "src/main/meta-snapshot.ts",
|
|
5767
|
-
"declarations": [],
|
|
5768
|
-
"exports": []
|
|
5769
|
-
},
|
|
5770
|
-
{
|
|
5771
|
-
"kind": "javascript-module",
|
|
5772
|
-
"path": "src/provider/ai-provider-switcher.ts",
|
|
5773
|
-
"declarations": [
|
|
5774
|
-
{
|
|
5775
|
-
"kind": "variable",
|
|
5776
|
-
"name": "AIProviderSwitcher",
|
|
5777
|
-
"description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
|
|
5778
|
-
}
|
|
5779
|
-
],
|
|
5780
|
-
"exports": [
|
|
5781
|
-
{
|
|
5782
|
-
"kind": "js",
|
|
5783
|
-
"name": "AIProviderSwitcher",
|
|
5784
|
-
"declaration": {
|
|
5785
|
-
"name": "AIProviderSwitcher",
|
|
5786
|
-
"module": "src/provider/ai-provider-switcher.ts"
|
|
5787
|
-
}
|
|
5788
|
-
}
|
|
5789
|
-
]
|
|
5790
|
-
},
|
|
5791
|
-
{
|
|
5792
|
-
"kind": "javascript-module",
|
|
5793
|
-
"path": "src/provider/assistant-app-settings.ts",
|
|
5794
|
-
"declarations": [
|
|
5795
|
-
{
|
|
5796
|
-
"kind": "variable",
|
|
5797
|
-
"name": "AssistantAppSettingsProvider",
|
|
5798
|
-
"description": "The DI token for the (AssistantAppSettingsProvider:interface). Resolves a noop\nuntil the host registers one."
|
|
5799
|
-
}
|
|
5800
|
-
],
|
|
5801
|
-
"exports": [
|
|
5802
|
-
{
|
|
5803
|
-
"kind": "js",
|
|
5804
|
-
"name": "AssistantAppSettingsProvider",
|
|
5805
|
-
"declaration": {
|
|
5806
|
-
"name": "AssistantAppSettingsProvider",
|
|
5807
|
-
"module": "src/provider/assistant-app-settings.ts"
|
|
5808
|
-
}
|
|
5809
|
-
}
|
|
5810
|
-
]
|
|
5811
|
-
},
|
|
5812
|
-
{
|
|
5813
|
-
"kind": "javascript-module",
|
|
5814
|
-
"path": "src/provider/tiered-provider-switcher.ts",
|
|
5815
|
-
"declarations": [
|
|
5816
|
-
{
|
|
5817
|
-
"kind": "class",
|
|
5818
|
-
"description": "Which cloud vendor backs the tier-shaped provider registry, plus the means to move it at\nruntime (GENC-1610).",
|
|
5819
|
-
"name": "TieredAIProviderSwitcher",
|
|
5820
|
-
"members": [
|
|
5489
|
+
"description": "must match the id the failure was reported under."
|
|
5490
|
+
}
|
|
5491
|
+
],
|
|
5492
|
+
"description": "Withdraw one reporter's warning — its save landed, or the host's own store recovered.\n\nOnly `source`'s entry is removed, so a session recovery cannot cancel a host's still-live\nproject failure (GENC-1511, caught in review; see `brokenSources`). The modal closes\nonly once nothing is broken; while anything remains, the copy falls back to the newest\nsurvivor."
|
|
5493
|
+
},
|
|
5821
5494
|
{
|
|
5822
|
-
"kind": "
|
|
5823
|
-
"name": "
|
|
5824
|
-
"
|
|
5825
|
-
|
|
5495
|
+
"kind": "method",
|
|
5496
|
+
"name": "syncPersistenceBrokenCopy",
|
|
5497
|
+
"privacy": "private",
|
|
5498
|
+
"return": {
|
|
5499
|
+
"type": {
|
|
5500
|
+
"text": "void"
|
|
5501
|
+
}
|
|
5826
5502
|
},
|
|
5827
|
-
"
|
|
5503
|
+
"description": "Recompute the derived flag and the displayed copy from `brokenSources`.\n\nCopy order is last-in-wins, which is both deterministic (`Map` iterates in insertion order)\nand the behaviour a reader expects — the most recent failure is the one described. Setting\n`persistenceBroken` last means the modal is only ever shown or closed once the copy backing\nit is already correct."
|
|
5828
5504
|
},
|
|
5829
5505
|
{
|
|
5830
|
-
"kind": "
|
|
5831
|
-
"name": "
|
|
5832
|
-
"type": {
|
|
5833
|
-
"text": "TieredAIProviderSwitcherOptions"
|
|
5834
|
-
},
|
|
5506
|
+
"kind": "method",
|
|
5507
|
+
"name": "onPersistenceBroken",
|
|
5835
5508
|
"privacy": "private",
|
|
5836
|
-
"
|
|
5837
|
-
|
|
5509
|
+
"return": {
|
|
5510
|
+
"type": {
|
|
5511
|
+
"text": "void"
|
|
5512
|
+
}
|
|
5513
|
+
},
|
|
5514
|
+
"parameters": [
|
|
5515
|
+
{
|
|
5516
|
+
"name": "d",
|
|
5517
|
+
"type": {
|
|
5518
|
+
"text": "{\n unsavedMessages: number;\n lastSavedAt?: string;\n reason: string;\n }"
|
|
5519
|
+
}
|
|
5520
|
+
}
|
|
5521
|
+
],
|
|
5522
|
+
"description": "This element's own persister said the session snapshot is not landing (GENC-1511)."
|
|
5838
5523
|
},
|
|
5839
5524
|
{
|
|
5840
|
-
"kind": "
|
|
5841
|
-
"name": "
|
|
5842
|
-
"type": {
|
|
5843
|
-
"text": "AITierId"
|
|
5844
|
-
},
|
|
5525
|
+
"kind": "method",
|
|
5526
|
+
"name": "onPersistenceRecovered",
|
|
5845
5527
|
"privacy": "private",
|
|
5846
|
-
"
|
|
5528
|
+
"return": {
|
|
5529
|
+
"type": {
|
|
5530
|
+
"text": "void"
|
|
5531
|
+
}
|
|
5532
|
+
},
|
|
5533
|
+
"description": "A session save landed after a broken episode — withdraw OUR warning only (GENC-1511).\n\nThe explicit source is the whole point: a host's project store may still be failing, and\nbefore this was per-source a session recovery closed that modal too."
|
|
5847
5534
|
},
|
|
5848
5535
|
{
|
|
5849
|
-
"kind": "
|
|
5850
|
-
"name": "
|
|
5851
|
-
"
|
|
5852
|
-
"
|
|
5536
|
+
"kind": "method",
|
|
5537
|
+
"name": "reloadForPersistence",
|
|
5538
|
+
"return": {
|
|
5539
|
+
"type": {
|
|
5540
|
+
"text": "void"
|
|
5541
|
+
}
|
|
5853
5542
|
},
|
|
5854
|
-
"
|
|
5855
|
-
"readonly": true
|
|
5543
|
+
"description": "The modal's only action. A reload re-reads the stored snapshot, which is plain data parsed\nfrom the server, so it also clears the serialisation fault that is the most likely cause."
|
|
5856
5544
|
},
|
|
5857
5545
|
{
|
|
5858
|
-
"kind": "
|
|
5859
|
-
"name": "
|
|
5546
|
+
"kind": "method",
|
|
5547
|
+
"name": "initPersistenceForNewStore",
|
|
5860
5548
|
"privacy": "private",
|
|
5861
|
-
"
|
|
5862
|
-
|
|
5549
|
+
"return": {
|
|
5550
|
+
"type": {
|
|
5551
|
+
"text": "Promise<void>"
|
|
5552
|
+
}
|
|
5553
|
+
},
|
|
5554
|
+
"parameters": [
|
|
5555
|
+
{
|
|
5556
|
+
"name": "key",
|
|
5557
|
+
"type": {
|
|
5558
|
+
"text": "string"
|
|
5559
|
+
}
|
|
5560
|
+
}
|
|
5561
|
+
],
|
|
5562
|
+
"description": "First-load persistence init for a freshly created store (GENC-1351). Restores\nthe user's remembered persistence-toggle choice — kept independently of the\nsession snapshot so it survives a clear; the host-configured `enabled` is only\nthe default for a first-ever load — then auto-restores the session when\npersistence is (now) on."
|
|
5863
5563
|
},
|
|
5864
5564
|
{
|
|
5865
|
-
"kind": "
|
|
5866
|
-
"name": "
|
|
5867
|
-
"
|
|
5868
|
-
"
|
|
5869
|
-
|
|
5870
|
-
|
|
5565
|
+
"kind": "method",
|
|
5566
|
+
"name": "triggerFileInput",
|
|
5567
|
+
"return": {
|
|
5568
|
+
"type": {
|
|
5569
|
+
"text": "void"
|
|
5570
|
+
}
|
|
5571
|
+
}
|
|
5871
5572
|
},
|
|
5872
5573
|
{
|
|
5873
|
-
"kind": "
|
|
5874
|
-
"name": "
|
|
5875
|
-
"
|
|
5876
|
-
"
|
|
5574
|
+
"kind": "method",
|
|
5575
|
+
"name": "handleFileSelect",
|
|
5576
|
+
"return": {
|
|
5577
|
+
"type": {
|
|
5578
|
+
"text": "void"
|
|
5579
|
+
}
|
|
5877
5580
|
},
|
|
5878
|
-
"
|
|
5581
|
+
"parameters": [
|
|
5582
|
+
{
|
|
5583
|
+
"name": "e",
|
|
5584
|
+
"type": {
|
|
5585
|
+
"text": "Event"
|
|
5586
|
+
}
|
|
5587
|
+
}
|
|
5588
|
+
]
|
|
5879
5589
|
},
|
|
5880
5590
|
{
|
|
5881
5591
|
"kind": "method",
|
|
5882
|
-
"name": "
|
|
5592
|
+
"name": "removeAttachment",
|
|
5883
5593
|
"return": {
|
|
5884
5594
|
"type": {
|
|
5885
5595
|
"text": "void"
|
|
@@ -5887,17 +5597,16 @@
|
|
|
5887
5597
|
},
|
|
5888
5598
|
"parameters": [
|
|
5889
5599
|
{
|
|
5890
|
-
"name": "
|
|
5600
|
+
"name": "attachment",
|
|
5891
5601
|
"type": {
|
|
5892
|
-
"text": "
|
|
5602
|
+
"text": "ChatAttachment"
|
|
5893
5603
|
}
|
|
5894
5604
|
}
|
|
5895
|
-
]
|
|
5896
|
-
"description": "A user-driven switch: move the registry, then tell the app so it can persist the choice.\nAn unknown vendor is ignored."
|
|
5605
|
+
]
|
|
5897
5606
|
},
|
|
5898
5607
|
{
|
|
5899
5608
|
"kind": "method",
|
|
5900
|
-
"name": "
|
|
5609
|
+
"name": "removeAttachmentError",
|
|
5901
5610
|
"return": {
|
|
5902
5611
|
"type": {
|
|
5903
5612
|
"text": "void"
|
|
@@ -5905,35 +5614,147 @@
|
|
|
5905
5614
|
},
|
|
5906
5615
|
"parameters": [
|
|
5907
5616
|
{
|
|
5908
|
-
"name": "
|
|
5617
|
+
"name": "message",
|
|
5909
5618
|
"type": {
|
|
5910
5619
|
"text": "string"
|
|
5911
5620
|
}
|
|
5912
5621
|
}
|
|
5913
|
-
]
|
|
5914
|
-
"description": "Adopt a vendor the app read back from its own store — the same registry move as\nTieredAIProviderSwitcher.switchTo, without the `onSwitch` callback, because this\nvalue came FROM the store and writing it back would be a pointless round-trip on load.\n\nExists because registration has to stay synchronous: an element that connects before the\ntoken is registered caches the platform's no-op fallback, so an app cannot await its\nstored preference before constructing this. It boots on `initialVendor` and adopts the\nstored one a moment later, through a registry that is mutable and held by reference."
|
|
5622
|
+
]
|
|
5915
5623
|
},
|
|
5916
5624
|
{
|
|
5917
5625
|
"kind": "method",
|
|
5918
|
-
"name": "
|
|
5626
|
+
"name": "handleSendClick"
|
|
5627
|
+
},
|
|
5628
|
+
{
|
|
5629
|
+
"kind": "method",
|
|
5630
|
+
"name": "handleStopClick",
|
|
5631
|
+
"description": "User clicked Stop. Cancels the current turn via the driver and flips the\nbutton to \"Stopping…\" until the turn winds down (a tool mid-execution\nfinishes first). Guarded so a second click is a no-op."
|
|
5632
|
+
},
|
|
5633
|
+
{
|
|
5634
|
+
"kind": "method",
|
|
5635
|
+
"name": "handleSuggestionClick",
|
|
5636
|
+
"parameters": [
|
|
5637
|
+
{
|
|
5638
|
+
"name": "suggestion",
|
|
5639
|
+
"type": {
|
|
5640
|
+
"text": "string"
|
|
5641
|
+
}
|
|
5642
|
+
}
|
|
5643
|
+
]
|
|
5644
|
+
},
|
|
5645
|
+
{
|
|
5646
|
+
"kind": "method",
|
|
5647
|
+
"name": "submitMessage",
|
|
5919
5648
|
"return": {
|
|
5920
5649
|
"type": {
|
|
5921
|
-
"text": "
|
|
5650
|
+
"text": "Promise<SubmitMessageResult>"
|
|
5922
5651
|
}
|
|
5923
5652
|
},
|
|
5924
5653
|
"parameters": [
|
|
5925
5654
|
{
|
|
5926
|
-
"name": "
|
|
5655
|
+
"name": "input",
|
|
5927
5656
|
"type": {
|
|
5928
|
-
"text": "
|
|
5657
|
+
"text": "{ text?: string; files?: File[] }"
|
|
5658
|
+
}
|
|
5659
|
+
}
|
|
5660
|
+
],
|
|
5661
|
+
"description": "Programmatically submit a message. Equivalent to the user typing into the\nbuilt-in composer and pressing send, but callable from external code — most\ncommonly a custom input rendered inside `slot=\"splash\"` when paired with\n`chatConfig.ui.hideComposer`.\n\nThe input fully describes the turn: `text` and `files` REPLACE any current\ncomposer state (they are not appended to it). Files are validated against\n`chatConfig.ui.acceptedFiles` using the same pipeline as the composer's\nattach button.\n\nAtomic on validation: if any file fails validation, no attachments are\ncommitted and no send is dispatched. Failure messages are returned in\n`errors` AND appended to the `attachmentErrors` observable so the built-in\nchip UI still surfaces them when visible.\n\nResolves once the underlying send has been kicked off — it does NOT await\nthe assistant's response."
|
|
5662
|
+
},
|
|
5663
|
+
{
|
|
5664
|
+
"kind": "method",
|
|
5665
|
+
"name": "fetchSuggestions",
|
|
5666
|
+
"privacy": "private"
|
|
5667
|
+
},
|
|
5668
|
+
{
|
|
5669
|
+
"kind": "field",
|
|
5670
|
+
"name": "_pendingSendPrompt",
|
|
5671
|
+
"type": {
|
|
5672
|
+
"text": "string | undefined"
|
|
5673
|
+
},
|
|
5674
|
+
"privacy": "private",
|
|
5675
|
+
"description": "User text of the message currently being sent, stashed for the lifetime of `send()`.\n`flow-owner-changed` fires while the driver routes this turn — before the message is\nappended to raw history — so the flow-activation-prompt capture reads this rather than\na stale raw-history lookup. Cleared once the send settles. (GENC-1351 §5.9)"
|
|
5676
|
+
},
|
|
5677
|
+
{
|
|
5678
|
+
"kind": "method",
|
|
5679
|
+
"name": "send",
|
|
5680
|
+
"privacy": "private"
|
|
5681
|
+
},
|
|
5682
|
+
{
|
|
5683
|
+
"kind": "method",
|
|
5684
|
+
"name": "onChatHeaderMouseDown",
|
|
5685
|
+
"parameters": [
|
|
5686
|
+
{
|
|
5687
|
+
"name": "e",
|
|
5688
|
+
"type": {
|
|
5689
|
+
"text": "MouseEvent"
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5692
|
+
]
|
|
5693
|
+
},
|
|
5694
|
+
{
|
|
5695
|
+
"kind": "method",
|
|
5696
|
+
"name": "handleInteractionCompleted",
|
|
5697
|
+
"parameters": [
|
|
5698
|
+
{
|
|
5699
|
+
"name": "e",
|
|
5700
|
+
"type": {
|
|
5701
|
+
"text": "Event"
|
|
5929
5702
|
}
|
|
5930
5703
|
}
|
|
5931
5704
|
]
|
|
5932
5705
|
},
|
|
5933
5706
|
{
|
|
5934
5707
|
"kind": "method",
|
|
5935
|
-
"name": "
|
|
5936
|
-
"
|
|
5708
|
+
"name": "handleInteractionCost",
|
|
5709
|
+
"parameters": [
|
|
5710
|
+
{
|
|
5711
|
+
"name": "e",
|
|
5712
|
+
"type": {
|
|
5713
|
+
"text": "Event"
|
|
5714
|
+
}
|
|
5715
|
+
}
|
|
5716
|
+
],
|
|
5717
|
+
"description": "A widget reporting spend it incurred AFTER resolving.\n\nNote what this deliberately does NOT do: no `startLoadingTimer()`. This is bookkeeping about a\nturn that already finished, so it must be invisible — showing a spinner would tell the user the\nassistant is working when nothing is pending."
|
|
5718
|
+
},
|
|
5719
|
+
{
|
|
5720
|
+
"kind": "field",
|
|
5721
|
+
"name": "stopButtonVisible",
|
|
5722
|
+
"type": {
|
|
5723
|
+
"text": "boolean"
|
|
5724
|
+
},
|
|
5725
|
+
"description": "Whether the Stop control is showing.\n\nWhile a turn runs Stop REPLACES Send rather than sitting beside it: the two\nare mutually exclusive actions, and a disabled Send next to a live Stop just\ngives the eye a dead control to skip past. Reads `busy`, so `cancelling`\nkeeps it up (in its \"Stopping…\" state) until the turn actually winds down.",
|
|
5726
|
+
"readonly": true
|
|
5727
|
+
},
|
|
5728
|
+
{
|
|
5729
|
+
"kind": "field",
|
|
5730
|
+
"name": "sendButtonVisible",
|
|
5731
|
+
"type": {
|
|
5732
|
+
"text": "boolean"
|
|
5733
|
+
},
|
|
5734
|
+
"description": "Whether Send is rendered at all. Hidden exactly when Stop has taken its\nplace — so a host that suppressed Stop via `hideStopButton` keeps Send\nthroughout, disabled for the duration, and the slot is never left empty\nmid-turn.",
|
|
5735
|
+
"readonly": true
|
|
5736
|
+
},
|
|
5737
|
+
{
|
|
5738
|
+
"kind": "field",
|
|
5739
|
+
"name": "isComposerResizable",
|
|
5740
|
+
"type": {
|
|
5741
|
+
"text": "boolean"
|
|
5742
|
+
},
|
|
5743
|
+
"description": "Whether the message input shows a drag handle to resize its height.",
|
|
5744
|
+
"readonly": true
|
|
5745
|
+
},
|
|
5746
|
+
{
|
|
5747
|
+
"kind": "field",
|
|
5748
|
+
"name": "composerHeightStyle",
|
|
5749
|
+
"type": {
|
|
5750
|
+
"text": "string"
|
|
5751
|
+
},
|
|
5752
|
+
"description": "Inline style carrying the dragged height into `--composer-height`.",
|
|
5753
|
+
"readonly": true
|
|
5754
|
+
},
|
|
5755
|
+
{
|
|
5756
|
+
"kind": "method",
|
|
5757
|
+
"name": "onComposerResizeStart",
|
|
5937
5758
|
"return": {
|
|
5938
5759
|
"type": {
|
|
5939
5760
|
"text": "void"
|
|
@@ -5941,96 +5762,275 @@
|
|
|
5941
5762
|
},
|
|
5942
5763
|
"parameters": [
|
|
5943
5764
|
{
|
|
5944
|
-
"name": "
|
|
5765
|
+
"name": "e",
|
|
5945
5766
|
"type": {
|
|
5946
|
-
"text": "
|
|
5767
|
+
"text": "PointerEvent"
|
|
5947
5768
|
}
|
|
5948
5769
|
}
|
|
5949
|
-
]
|
|
5950
|
-
"description": "The registry move both entry points share, and nothing else."
|
|
5770
|
+
]
|
|
5951
5771
|
},
|
|
5952
5772
|
{
|
|
5953
5773
|
"kind": "method",
|
|
5954
|
-
"name": "
|
|
5955
|
-
"privacy": "private",
|
|
5774
|
+
"name": "onComposerResizeMove",
|
|
5956
5775
|
"return": {
|
|
5957
5776
|
"type": {
|
|
5958
|
-
"text": "
|
|
5777
|
+
"text": "void"
|
|
5959
5778
|
}
|
|
5960
5779
|
},
|
|
5961
5780
|
"parameters": [
|
|
5962
5781
|
{
|
|
5963
|
-
"name": "
|
|
5782
|
+
"name": "e",
|
|
5964
5783
|
"type": {
|
|
5965
|
-
"text": "
|
|
5784
|
+
"text": "PointerEvent"
|
|
5966
5785
|
}
|
|
5967
5786
|
}
|
|
5968
5787
|
]
|
|
5969
5788
|
},
|
|
5970
5789
|
{
|
|
5971
5790
|
"kind": "method",
|
|
5972
|
-
"name": "
|
|
5973
|
-
"privacy": "private",
|
|
5791
|
+
"name": "onComposerResizeEnd",
|
|
5974
5792
|
"return": {
|
|
5975
5793
|
"type": {
|
|
5976
|
-
"text": "
|
|
5794
|
+
"text": "void"
|
|
5977
5795
|
}
|
|
5978
5796
|
},
|
|
5979
5797
|
"parameters": [
|
|
5980
5798
|
{
|
|
5981
|
-
"name": "
|
|
5799
|
+
"name": "e",
|
|
5982
5800
|
"type": {
|
|
5983
|
-
"text": "
|
|
5801
|
+
"text": "PointerEvent"
|
|
5984
5802
|
}
|
|
5985
5803
|
}
|
|
5986
5804
|
]
|
|
5987
5805
|
}
|
|
5988
|
-
]
|
|
5989
|
-
|
|
5990
|
-
{
|
|
5991
|
-
"kind": "function",
|
|
5992
|
-
"name": "registerTieredAIProviders",
|
|
5993
|
-
"return": {
|
|
5994
|
-
"type": {
|
|
5995
|
-
"text": "TieredAIProviderSwitcher"
|
|
5996
|
-
}
|
|
5997
|
-
},
|
|
5998
|
-
"parameters": [
|
|
5806
|
+
],
|
|
5807
|
+
"events": [
|
|
5999
5808
|
{
|
|
6000
|
-
"name": "
|
|
5809
|
+
"name": "budget-refresh-requested",
|
|
6001
5810
|
"type": {
|
|
6002
|
-
"text": "
|
|
5811
|
+
"text": "CustomEvent"
|
|
6003
5812
|
}
|
|
6004
5813
|
},
|
|
6005
5814
|
{
|
|
6006
|
-
"name": "options",
|
|
6007
5815
|
"type": {
|
|
6008
|
-
"text": "
|
|
5816
|
+
"text": "CustomEvent"
|
|
6009
5817
|
}
|
|
5818
|
+
},
|
|
5819
|
+
{
|
|
5820
|
+
"description": "Fired when the user presses the chat header in `popout-mode=\"expand\"` (for drag-to-popout hosts). Bubbles and composed. detail: `ChatHeaderMouseDownDetail`",
|
|
5821
|
+
"name": "chat-header-mousedown"
|
|
5822
|
+
},
|
|
5823
|
+
{
|
|
5824
|
+
"description": "Fired after the session is wiped (the lifecycle menu's Clear). The payload is captured before teardown so the host can clean up any external state the active agent was working on. Bubbles and composed. detail: `SessionClearedDetail`",
|
|
5825
|
+
"name": "session-cleared"
|
|
6010
5826
|
}
|
|
6011
5827
|
],
|
|
6012
|
-
"
|
|
5828
|
+
"attributes": [
|
|
5829
|
+
{
|
|
5830
|
+
"name": "header-title",
|
|
5831
|
+
"type": {
|
|
5832
|
+
"text": "string"
|
|
5833
|
+
},
|
|
5834
|
+
"default": "'Genesis Assistant'",
|
|
5835
|
+
"fieldName": "headerTitle"
|
|
5836
|
+
},
|
|
5837
|
+
{
|
|
5838
|
+
"name": "session-key",
|
|
5839
|
+
"type": {
|
|
5840
|
+
"text": "string | undefined"
|
|
5841
|
+
},
|
|
5842
|
+
"description": "Explicit session/persistence key (GENC-1351 §5.12). When set, this is the\nsession identity — the key for the driver/store/persister/diagnostics\nregistries and the `sessionKey` passed to the persistence provider — taking\nprecedence over the DOM `id`. A host that scopes persistence per-entity\n(e.g. one chat session per project) binds this to a stable per-entity id;\nchanging it on a **connected** element re-keys the session in place — tears\ndown the current conversation and restores the new key's — via\n`switchSession`. Falls back to `id` when unset,\nso existing consumers are unaffected.",
|
|
5843
|
+
"fieldName": "sessionKey"
|
|
5844
|
+
},
|
|
5845
|
+
{
|
|
5846
|
+
"name": "image-src",
|
|
5847
|
+
"type": {
|
|
5848
|
+
"text": "string | undefined"
|
|
5849
|
+
},
|
|
5850
|
+
"fieldName": "imageSrc"
|
|
5851
|
+
},
|
|
5852
|
+
{
|
|
5853
|
+
"name": "user-image-src",
|
|
5854
|
+
"type": {
|
|
5855
|
+
"text": "string | undefined"
|
|
5856
|
+
},
|
|
5857
|
+
"fieldName": "userImageSrc"
|
|
5858
|
+
},
|
|
5859
|
+
{
|
|
5860
|
+
"name": "placeholder",
|
|
5861
|
+
"type": {
|
|
5862
|
+
"text": "string"
|
|
5863
|
+
},
|
|
5864
|
+
"default": "'Message assistant...'",
|
|
5865
|
+
"fieldName": "placeholder"
|
|
5866
|
+
},
|
|
5867
|
+
{
|
|
5868
|
+
"name": "popout-mode",
|
|
5869
|
+
"type": {
|
|
5870
|
+
"text": "PopoutMode | undefined"
|
|
5871
|
+
},
|
|
5872
|
+
"description": "Controls the pop-out button shown next to the settings cog.\n\"expand\" — in bubble, expands to layout panel (fires chat-popout).\n\"collapse\" — in layout panel, collapses back to bubble (fires chat-popin).\nAbsent — no button (default standalone behaviour, no breaking change).",
|
|
5873
|
+
"fieldName": "popoutMode"
|
|
5874
|
+
},
|
|
5875
|
+
{
|
|
5876
|
+
"name": "debug-redux",
|
|
5877
|
+
"type": {
|
|
5878
|
+
"text": "boolean"
|
|
5879
|
+
},
|
|
5880
|
+
"default": "false",
|
|
5881
|
+
"description": "When set, enables Redux DevTools for this instance's session store.",
|
|
5882
|
+
"fieldName": "debugRedux"
|
|
5883
|
+
}
|
|
5884
|
+
],
|
|
5885
|
+
"superclass": {
|
|
5886
|
+
"name": "GenesisElement",
|
|
5887
|
+
"package": "@genesislcap/web-core"
|
|
5888
|
+
},
|
|
5889
|
+
"tagName": "foundation-ai-assistant",
|
|
5890
|
+
"customElement": true
|
|
6013
5891
|
}
|
|
6014
5892
|
],
|
|
6015
5893
|
"exports": [
|
|
6016
5894
|
{
|
|
6017
5895
|
"kind": "js",
|
|
6018
|
-
"name": "
|
|
5896
|
+
"name": "sparkleIconSvg",
|
|
6019
5897
|
"declaration": {
|
|
6020
|
-
"name": "
|
|
6021
|
-
"module": "src/
|
|
5898
|
+
"name": "sparkleIconSvg",
|
|
5899
|
+
"module": "src/main/main.ts"
|
|
6022
5900
|
}
|
|
6023
5901
|
},
|
|
6024
5902
|
{
|
|
6025
5903
|
"kind": "js",
|
|
6026
|
-
"name": "
|
|
5904
|
+
"name": "userIconSvg",
|
|
6027
5905
|
"declaration": {
|
|
6028
|
-
"name": "
|
|
6029
|
-
"module": "src/
|
|
5906
|
+
"name": "userIconSvg",
|
|
5907
|
+
"module": "src/main/main.ts"
|
|
5908
|
+
}
|
|
5909
|
+
},
|
|
5910
|
+
{
|
|
5911
|
+
"kind": "js",
|
|
5912
|
+
"name": "genesisIconSvg",
|
|
5913
|
+
"declaration": {
|
|
5914
|
+
"name": "genesisIconSvg",
|
|
5915
|
+
"module": "src/main/main.ts"
|
|
5916
|
+
}
|
|
5917
|
+
},
|
|
5918
|
+
{
|
|
5919
|
+
"kind": "js",
|
|
5920
|
+
"name": "budgetPercentOf",
|
|
5921
|
+
"declaration": {
|
|
5922
|
+
"name": "budgetPercentOf",
|
|
5923
|
+
"module": "./budget-controller"
|
|
5924
|
+
}
|
|
5925
|
+
},
|
|
5926
|
+
{
|
|
5927
|
+
"kind": "js",
|
|
5928
|
+
"name": "formatBlockedReason",
|
|
5929
|
+
"declaration": {
|
|
5930
|
+
"name": "formatBlockedReason",
|
|
5931
|
+
"module": "./budget-controller"
|
|
5932
|
+
}
|
|
5933
|
+
},
|
|
5934
|
+
{
|
|
5935
|
+
"kind": "js",
|
|
5936
|
+
"name": "FoundationAiAssistant",
|
|
5937
|
+
"declaration": {
|
|
5938
|
+
"name": "FoundationAiAssistant",
|
|
5939
|
+
"module": "src/main/main.ts"
|
|
5940
|
+
}
|
|
5941
|
+
},
|
|
5942
|
+
{
|
|
5943
|
+
"kind": "custom-element-definition",
|
|
5944
|
+
"name": "foundation-ai-assistant",
|
|
5945
|
+
"declaration": {
|
|
5946
|
+
"name": "FoundationAiAssistant",
|
|
5947
|
+
"module": "src/main/main.ts"
|
|
5948
|
+
}
|
|
5949
|
+
}
|
|
5950
|
+
]
|
|
5951
|
+
},
|
|
5952
|
+
{
|
|
5953
|
+
"kind": "javascript-module",
|
|
5954
|
+
"path": "src/main/main.types.ts",
|
|
5955
|
+
"declarations": [
|
|
5956
|
+
{
|
|
5957
|
+
"kind": "variable",
|
|
5958
|
+
"name": "AiAssistantEvent",
|
|
5959
|
+
"type": {
|
|
5960
|
+
"text": "{\n /** Session wiped via the lifecycle menu's Clear. `detail`: `SessionClearedDetail`. */\n SessionCleared: 'session-cleared',\n /** Header pressed in `popout-mode=\"expand\"` (drag-to-popout hosts). `detail`: `ChatHeaderMouseDownDetail`. */\n ChatHeaderMouseDown: 'chat-header-mousedown',\n}"
|
|
5961
|
+
},
|
|
5962
|
+
"default": "{\n /** Session wiped via the lifecycle menu's Clear. `detail`: `SessionClearedDetail`. */\n SessionCleared: 'session-cleared',\n /** Header pressed in `popout-mode=\"expand\"` (drag-to-popout hosts). `detail`: `ChatHeaderMouseDownDetail`. */\n ChatHeaderMouseDown: 'chat-header-mousedown',\n}",
|
|
5963
|
+
"description": "DOM events the `<foundation-ai-assistant>` element dispatches to its host.\nAll bubble and are `composed` (they cross the shadow boundary), so a host can\nlisten on the element — or any ancestor — to react. Use these constants to\nwire listeners instead of hand-typing event-name strings.\n\nAn `as const` map (not a TS `enum` — this package ships none), so it serves as\nboth the listener-name value and, via the same-named type below, a union."
|
|
5964
|
+
},
|
|
5965
|
+
{
|
|
5966
|
+
"kind": "variable",
|
|
5967
|
+
"name": "ANIMATION_DEFS",
|
|
5968
|
+
"type": {
|
|
5969
|
+
"text": "object"
|
|
5970
|
+
},
|
|
5971
|
+
"default": "{\n loading: {\n label: 'Dots',\n description: 'Shows pulsing dots while the assistant is generating a response.',\n category: 'Loading style',\n },\n waves: {\n label: 'Waves',\n description:\n 'Shows glowing sine waves inside a circle while the assistant is generating a response.',\n category: 'Loading style',\n },\n flowingWaves: {\n label: 'Flowing waves',\n description:\n 'Shows coloured waves rising and settling from a line while the assistant is generating a response.',\n category: 'Loading style',\n },\n plasma: {\n label: 'Plasma orb',\n description:\n 'Shows a glowing plasma sphere with drifting energy while the assistant is generating a response.',\n category: 'Loading style',\n },\n halo: {\n label: 'Halo',\n description:\n 'Displays a glowing halo around the assistant avatar while a response is streaming.',\n category: 'Effects',\n },\n}",
|
|
5972
|
+
"description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
|
|
5973
|
+
},
|
|
5974
|
+
{
|
|
5975
|
+
"kind": "variable",
|
|
5976
|
+
"name": "satisfies",
|
|
5977
|
+
"description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
|
|
5978
|
+
},
|
|
5979
|
+
{
|
|
5980
|
+
"kind": "variable",
|
|
5981
|
+
"name": "Record",
|
|
5982
|
+
"description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
|
|
5983
|
+
}
|
|
5984
|
+
],
|
|
5985
|
+
"exports": [
|
|
5986
|
+
{
|
|
5987
|
+
"kind": "js",
|
|
5988
|
+
"name": "AgentPickerMode",
|
|
5989
|
+
"declaration": {
|
|
5990
|
+
"name": "AgentPickerMode",
|
|
5991
|
+
"package": "@genesislcap/foundation-ai"
|
|
5992
|
+
}
|
|
5993
|
+
},
|
|
5994
|
+
{
|
|
5995
|
+
"kind": "js",
|
|
5996
|
+
"name": "AiAssistantEvent",
|
|
5997
|
+
"declaration": {
|
|
5998
|
+
"name": "AiAssistantEvent",
|
|
5999
|
+
"module": "src/main/main.types.ts"
|
|
6000
|
+
}
|
|
6001
|
+
},
|
|
6002
|
+
{
|
|
6003
|
+
"kind": "js",
|
|
6004
|
+
"name": "ANIMATION_DEFS",
|
|
6005
|
+
"declaration": {
|
|
6006
|
+
"name": "ANIMATION_DEFS",
|
|
6007
|
+
"module": "src/main/main.types.ts"
|
|
6008
|
+
}
|
|
6009
|
+
},
|
|
6010
|
+
{
|
|
6011
|
+
"kind": "js",
|
|
6012
|
+
"name": "satisfies",
|
|
6013
|
+
"declaration": {
|
|
6014
|
+
"name": "satisfies",
|
|
6015
|
+
"module": "src/main/main.types.ts"
|
|
6016
|
+
}
|
|
6017
|
+
},
|
|
6018
|
+
{
|
|
6019
|
+
"kind": "js",
|
|
6020
|
+
"name": "Record",
|
|
6021
|
+
"declaration": {
|
|
6022
|
+
"name": "Record",
|
|
6023
|
+
"module": "src/main/main.types.ts"
|
|
6030
6024
|
}
|
|
6031
6025
|
}
|
|
6032
6026
|
]
|
|
6033
6027
|
},
|
|
6028
|
+
{
|
|
6029
|
+
"kind": "javascript-module",
|
|
6030
|
+
"path": "src/main/meta-snapshot.ts",
|
|
6031
|
+
"declarations": [],
|
|
6032
|
+
"exports": []
|
|
6033
|
+
},
|
|
6034
6034
|
{
|
|
6035
6035
|
"kind": "javascript-module",
|
|
6036
6036
|
"path": "src/state/ai-assistant-slice.ts",
|