@genesislcap/ai-assistant 15.94.0 → 15.95.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/custom-elements.json +1131 -1131
  2. package/package.json +17 -17
@@ -9025,421 +9025,859 @@
9025
9025
  },
9026
9026
  {
9027
9027
  "kind": "javascript-module",
9028
- "path": "src/main/attachment-controller.ts",
9029
- "declarations": [],
9030
- "exports": []
9031
- },
9032
- {
9033
- "kind": "javascript-module",
9034
- "path": "src/main/budget-controller.ts",
9035
- "declarations": [],
9036
- "exports": []
9037
- },
9038
- {
9039
- "kind": "javascript-module",
9040
- "path": "src/main/composer-menu-controller.ts",
9041
- "declarations": [],
9042
- "exports": []
9043
- },
9044
- {
9045
- "kind": "javascript-module",
9046
- "path": "src/main/composer-resize-controller.ts",
9047
- "declarations": [],
9048
- "exports": []
9049
- },
9050
- {
9051
- "kind": "javascript-module",
9052
- "path": "src/main/context-gate-controller.ts",
9053
- "declarations": [],
9054
- "exports": []
9028
+ "path": "src/notifications/agent-notifications.ts",
9029
+ "declarations": [
9030
+ {
9031
+ "kind": "variable",
9032
+ "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
9033
+ "type": {
9034
+ "text": "string"
9035
+ },
9036
+ "default": "'The assistant is ready for your next input'",
9037
+ "description": "The notification's text when neither the app nor the widget gives one."
9038
+ },
9039
+ {
9040
+ "kind": "function",
9041
+ "name": "agentNotificationPermission",
9042
+ "return": {
9043
+ "type": {
9044
+ "text": "AgentNotificationPermission"
9045
+ }
9046
+ },
9047
+ "description": "Whether this page may show notifications. Safe to call anywhere, including Node."
9048
+ },
9049
+ {
9050
+ "kind": "function",
9051
+ "name": "requestAgentNotificationPermission",
9052
+ "return": {
9053
+ "type": {
9054
+ "text": "Promise<AgentNotificationPermission>"
9055
+ }
9056
+ },
9057
+ "description": "Ask the person for permission to show notifications, and resolve to the result. Call it from a\nclick or key handler: browsers ignore or refuse a request that does not come from the person.\nResolves straight away when permission is already decided or unsupported, since a browser only\never asks once."
9058
+ }
9059
+ ],
9060
+ "exports": [
9061
+ {
9062
+ "kind": "js",
9063
+ "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
9064
+ "declaration": {
9065
+ "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
9066
+ "module": "src/notifications/agent-notifications.ts"
9067
+ }
9068
+ },
9069
+ {
9070
+ "kind": "js",
9071
+ "name": "agentNotificationPermission",
9072
+ "declaration": {
9073
+ "name": "agentNotificationPermission",
9074
+ "module": "src/notifications/agent-notifications.ts"
9075
+ }
9076
+ },
9077
+ {
9078
+ "kind": "js",
9079
+ "name": "requestAgentNotificationPermission",
9080
+ "declaration": {
9081
+ "name": "requestAgentNotificationPermission",
9082
+ "module": "src/notifications/agent-notifications.ts"
9083
+ }
9084
+ }
9085
+ ]
9055
9086
  },
9056
9087
  {
9057
9088
  "kind": "javascript-module",
9058
- "path": "src/main/cost-ledger-controller.ts",
9089
+ "path": "src/notifications/agent-notifier.ts",
9059
9090
  "declarations": [],
9060
9091
  "exports": []
9061
9092
  },
9062
9093
  {
9063
9094
  "kind": "javascript-module",
9064
- "path": "src/main/index.ts",
9095
+ "path": "src/notifications/index.ts",
9065
9096
  "declarations": [],
9066
9097
  "exports": [
9067
9098
  {
9068
9099
  "kind": "js",
9069
- "name": "*",
9100
+ "name": "agentNotificationPermission",
9070
9101
  "declaration": {
9071
- "name": "*",
9072
- "package": "./main.template"
9102
+ "name": "agentNotificationPermission",
9103
+ "module": "./agent-notifications"
9073
9104
  }
9074
9105
  },
9075
9106
  {
9076
9107
  "kind": "js",
9077
- "name": "*",
9108
+ "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
9078
9109
  "declaration": {
9079
- "name": "*",
9080
- "package": "./main"
9110
+ "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
9111
+ "module": "./agent-notifications"
9081
9112
  }
9082
9113
  },
9083
9114
  {
9084
9115
  "kind": "js",
9085
- "name": "*",
9116
+ "name": "requestAgentNotificationPermission",
9086
9117
  "declaration": {
9087
- "name": "*",
9088
- "package": "./main.types"
9118
+ "name": "requestAgentNotificationPermission",
9119
+ "module": "./agent-notifications"
9120
+ }
9121
+ },
9122
+ {
9123
+ "kind": "js",
9124
+ "name": "type",
9125
+ "declaration": {
9126
+ "name": "type",
9127
+ "module": "./agent-notifications"
9128
+ }
9129
+ },
9130
+ {
9131
+ "kind": "js",
9132
+ "name": "AgentAttentionDetail",
9133
+ "declaration": {
9134
+ "name": "AgentAttentionDetail",
9135
+ "module": "./agent-notifications"
9136
+ }
9137
+ },
9138
+ {
9139
+ "kind": "js",
9140
+ "name": "type",
9141
+ "declaration": {
9142
+ "name": "type",
9143
+ "module": "./agent-notifications"
9144
+ }
9145
+ },
9146
+ {
9147
+ "kind": "js",
9148
+ "name": "AgentAttentionKind",
9149
+ "declaration": {
9150
+ "name": "AgentAttentionKind",
9151
+ "module": "./agent-notifications"
9152
+ }
9153
+ },
9154
+ {
9155
+ "kind": "js",
9156
+ "name": "type",
9157
+ "declaration": {
9158
+ "name": "type",
9159
+ "module": "./agent-notifications"
9160
+ }
9161
+ },
9162
+ {
9163
+ "kind": "js",
9164
+ "name": "AgentNotificationLevel",
9165
+ "declaration": {
9166
+ "name": "AgentNotificationLevel",
9167
+ "module": "./agent-notifications"
9168
+ }
9169
+ },
9170
+ {
9171
+ "kind": "js",
9172
+ "name": "type",
9173
+ "declaration": {
9174
+ "name": "type",
9175
+ "module": "./agent-notifications"
9176
+ }
9177
+ },
9178
+ {
9179
+ "kind": "js",
9180
+ "name": "AgentNotificationPermission",
9181
+ "declaration": {
9182
+ "name": "AgentNotificationPermission",
9183
+ "module": "./agent-notifications"
9089
9184
  }
9090
9185
  }
9091
9186
  ]
9092
9187
  },
9093
9188
  {
9094
9189
  "kind": "javascript-module",
9095
- "path": "src/main/main.styles.ts",
9190
+ "path": "src/notifications/notification-level-picker.template.ts",
9191
+ "declarations": [],
9192
+ "exports": []
9193
+ },
9194
+ {
9195
+ "kind": "javascript-module",
9196
+ "path": "src/notifications/notification-settings.ts",
9197
+ "declarations": [],
9198
+ "exports": []
9199
+ },
9200
+ {
9201
+ "kind": "javascript-module",
9202
+ "path": "src/provider/ai-provider-switcher.ts",
9096
9203
  "declarations": [
9097
9204
  {
9098
9205
  "kind": "variable",
9099
- "name": "styles",
9100
- "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`"
9206
+ "name": "AIProviderSwitcher",
9207
+ "description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
9101
9208
  }
9102
9209
  ],
9103
9210
  "exports": [
9104
9211
  {
9105
9212
  "kind": "js",
9106
- "name": "styles",
9213
+ "name": "AIProviderSwitcher",
9107
9214
  "declaration": {
9108
- "name": "styles",
9109
- "module": "src/main/main.styles.ts"
9215
+ "name": "AIProviderSwitcher",
9216
+ "module": "src/provider/ai-provider-switcher.ts"
9110
9217
  }
9111
9218
  }
9112
9219
  ]
9113
9220
  },
9114
9221
  {
9115
9222
  "kind": "javascript-module",
9116
- "path": "src/main/main.template.ts",
9223
+ "path": "src/provider/assistant-app-settings.ts",
9117
9224
  "declarations": [
9118
9225
  {
9119
9226
  "kind": "variable",
9120
- "name": "messageTimestampTemplate",
9121
- "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`",
9122
- "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`."
9123
- },
9124
- {
9125
- "kind": "function",
9126
- "name": "FoundationAiAssistantTemplate",
9127
- "return": {
9128
- "type": {
9129
- "text": "ViewTemplate<FoundationAiAssistant>"
9130
- }
9131
- },
9132
- "parameters": [
9133
- {
9134
- "name": "designSystemPrefix",
9135
- "type": {
9136
- "text": "string"
9137
- }
9138
- }
9139
- ]
9227
+ "name": "AssistantAppSettingsProvider",
9228
+ "description": "The DI token for the (AssistantAppSettingsProvider:interface). Resolves a noop\nuntil the host registers one."
9140
9229
  }
9141
9230
  ],
9142
9231
  "exports": [
9143
9232
  {
9144
9233
  "kind": "js",
9145
- "name": "messageTimestampTemplate",
9146
- "declaration": {
9147
- "name": "messageTimestampTemplate",
9148
- "module": "src/main/main.template.ts"
9149
- }
9150
- },
9151
- {
9152
- "kind": "js",
9153
- "name": "FoundationAiAssistantTemplate",
9234
+ "name": "AssistantAppSettingsProvider",
9154
9235
  "declaration": {
9155
- "name": "FoundationAiAssistantTemplate",
9156
- "module": "src/main/main.template.ts"
9236
+ "name": "AssistantAppSettingsProvider",
9237
+ "module": "src/provider/assistant-app-settings.ts"
9157
9238
  }
9158
9239
  }
9159
9240
  ]
9160
9241
  },
9161
9242
  {
9162
9243
  "kind": "javascript-module",
9163
- "path": "src/main/main.ts",
9244
+ "path": "src/provider/tiered-provider-switcher.ts",
9164
9245
  "declarations": [
9165
- {
9166
- "kind": "variable",
9167
- "name": "sparkleIconSvg",
9168
- "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>`",
9169
- "description": "Three-star AI \"sparkle\" mark — the conventional AI signifier; default assistant avatar."
9170
- },
9171
- {
9172
- "kind": "variable",
9173
- "name": "userIconSvg",
9174
- "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>`",
9175
- "description": "Person silhouette — default user avatar."
9176
- },
9177
- {
9178
- "kind": "variable",
9179
- "name": "genesisIconSvg",
9180
- "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>`",
9181
- "description": "Genesis G-mark — opt-in assistant avatar (the default before the sparkle mark)."
9182
- },
9183
9246
  {
9184
9247
  "kind": "class",
9185
- "description": "Foundation AI Assistant component.",
9186
- "name": "FoundationAiAssistant",
9187
- "members": [
9188
- {
9189
- "kind": "field",
9190
- "name": "composerResize",
9191
- "privacy": "private",
9192
- "readonly": true,
9193
- "default": "new ComposerResizeController({\n enabled: () => this.chatConfig.ui?.resizableInput !== false,\n inputEl: () => this.chatInputEl,\n messagesEl: () => this.messagesEl,\n })"
9194
- },
9195
- {
9196
- "kind": "field",
9197
- "name": "composerMenus",
9198
- "privacy": "private",
9199
- "readonly": true,
9200
- "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 })"
9201
- },
9202
- {
9203
- "kind": "field",
9204
- "name": "attachmentCtrl",
9205
- "privacy": "private",
9206
- "readonly": true,
9207
- "default": "new AttachmentController(this, {\n acceptedFiles: () => this.chatConfig.ui?.acceptedFiles,\n logMeta: (type, detail) => this.logMeta(type, detail),\n })"
9208
- },
9209
- {
9210
- "kind": "field",
9211
- "name": "contextGateCtrl",
9212
- "privacy": "private",
9213
- "readonly": true,
9214
- "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 })",
9215
- "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."
9216
- },
9217
- {
9218
- "kind": "field",
9219
- "name": "costLedger",
9220
- "privacy": "private",
9221
- "readonly": true,
9222
- "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 })",
9223
- "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."
9224
- },
9225
- {
9226
- "kind": "field",
9227
- "name": "budget",
9228
- "privacy": "private",
9229
- "readonly": true,
9230
- "default": "new BudgetController({\n sessionRef: () => this._sessionRef,\n providerStatuses: () => this.providerStatuses,\n providerRegistry: () => this.providerRegistry,\n chatConfig: () => this.chatConfig,\n })",
9231
- "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."
9232
- },
9233
- {
9234
- "kind": "field",
9235
- "name": "settings",
9236
- "privacy": "private",
9237
- "readonly": true,
9238
- "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 })",
9239
- "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`."
9240
- },
9241
- {
9242
- "kind": "field",
9243
- "name": "providerRegistry",
9244
- "type": {
9245
- "text": "AIProviderRegistry"
9246
- }
9247
- },
9248
- {
9249
- "kind": "field",
9250
- "name": "appSettingsProvider",
9251
- "type": {
9252
- "text": "AssistantAppSettingsProvider"
9253
- }
9254
- },
9248
+ "description": "Which cloud vendor backs the tier-shaped provider registry, plus the means to move it at\nruntime (GENC-1610).",
9249
+ "name": "TieredAIProviderSwitcher",
9250
+ "members": [
9255
9251
  {
9256
9252
  "kind": "field",
9257
- "name": "designSystemPrefix",
9253
+ "name": "vendors",
9258
9254
  "type": {
9259
- "text": "string"
9255
+ "text": "readonly AITierVendor[]"
9260
9256
  },
9261
- "default": "'rapid'"
9257
+ "readonly": true
9262
9258
  },
9263
9259
  {
9264
9260
  "kind": "field",
9265
- "name": "headerTitle",
9261
+ "name": "options",
9266
9262
  "type": {
9267
- "text": "string"
9263
+ "text": "TieredAIProviderSwitcherOptions"
9268
9264
  },
9269
- "default": "'Genesis Assistant'"
9265
+ "privacy": "private",
9266
+ "readonly": true,
9267
+ "default": "options"
9270
9268
  },
9271
9269
  {
9272
9270
  "kind": "field",
9273
- "name": "sessionKey",
9271
+ "name": "defaultTier",
9274
9272
  "type": {
9275
- "text": "string | undefined"
9273
+ "text": "AITierId"
9276
9274
  },
9277
- "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."
9275
+ "privacy": "private",
9276
+ "readonly": true
9278
9277
  },
9279
9278
  {
9280
9279
  "kind": "field",
9281
- "name": "imageSrc",
9280
+ "name": "registry",
9282
9281
  "type": {
9283
- "text": "string | undefined"
9284
- }
9282
+ "text": "MutableAIProviderRegistry"
9283
+ },
9284
+ "privacy": "private",
9285
+ "readonly": true
9285
9286
  },
9286
9287
  {
9287
9288
  "kind": "field",
9288
- "name": "userImageSrc",
9289
- "type": {
9290
- "text": "string | undefined"
9291
- }
9289
+ "name": "listeners",
9290
+ "privacy": "private",
9291
+ "readonly": true,
9292
+ "default": "new Set<(vendor: AITierVendor) => void>()"
9292
9293
  },
9293
9294
  {
9294
9295
  "kind": "field",
9295
- "name": "assistantIcon",
9296
+ "name": "_vendor",
9296
9297
  "type": {
9297
- "text": "string | undefined"
9298
+ "text": "AITierVendor"
9298
9299
  },
9299
- "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."
9300
+ "privacy": "private"
9300
9301
  },
9301
9302
  {
9302
9303
  "kind": "field",
9303
- "name": "assistantIconSafe",
9304
+ "name": "vendor",
9304
9305
  "type": {
9305
- "text": "string"
9306
+ "text": "AITierVendor"
9306
9307
  },
9307
- "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>`",
9308
- "description": "Sanitized `assistantIcon`, or the default sparkle mark; bound into the template. @internal"
9308
+ "readonly": true
9309
9309
  },
9310
9310
  {
9311
9311
  "kind": "method",
9312
- "name": "assistantIconChanged",
9313
- "privacy": "protected",
9312
+ "name": "switchTo",
9314
9313
  "return": {
9315
9314
  "type": {
9316
9315
  "text": "void"
9317
9316
  }
9318
- }
9317
+ },
9318
+ "parameters": [
9319
+ {
9320
+ "name": "vendor",
9321
+ "type": {
9322
+ "text": "string"
9323
+ }
9324
+ }
9325
+ ],
9326
+ "description": "A user-driven switch: move the registry, then tell the app so it can persist the choice.\nAn unknown vendor is ignored."
9319
9327
  },
9320
9328
  {
9321
- "kind": "field",
9322
- "name": "userIcon",
9323
- "type": {
9324
- "text": "string | undefined"
9329
+ "kind": "method",
9330
+ "name": "adoptPersistedVendor",
9331
+ "return": {
9332
+ "type": {
9333
+ "text": "void"
9334
+ }
9325
9335
  },
9326
- "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."
9336
+ "parameters": [
9337
+ {
9338
+ "name": "vendor",
9339
+ "type": {
9340
+ "text": "string"
9341
+ }
9342
+ }
9343
+ ],
9344
+ "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."
9327
9345
  },
9328
9346
  {
9329
- "kind": "field",
9330
- "name": "userIconSafe",
9331
- "type": {
9332
- "text": "string"
9347
+ "kind": "method",
9348
+ "name": "subscribe",
9349
+ "return": {
9350
+ "type": {
9351
+ "text": "() => void"
9352
+ }
9333
9353
  },
9334
- "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>`",
9335
- "description": "Sanitized `userIcon`, or the default person mark; bound into the template. @internal"
9354
+ "parameters": [
9355
+ {
9356
+ "name": "listener",
9357
+ "type": {
9358
+ "text": "(vendor: string) => void"
9359
+ }
9360
+ }
9361
+ ]
9336
9362
  },
9337
9363
  {
9338
9364
  "kind": "method",
9339
- "name": "userIconChanged",
9340
- "privacy": "protected",
9365
+ "name": "apply",
9366
+ "privacy": "private",
9341
9367
  "return": {
9342
9368
  "type": {
9343
9369
  "text": "void"
9344
9370
  }
9345
- }
9371
+ },
9372
+ "parameters": [
9373
+ {
9374
+ "name": "vendor",
9375
+ "type": {
9376
+ "text": "AITierVendor"
9377
+ }
9378
+ }
9379
+ ],
9380
+ "description": "The registry move both entry points share, and nothing else."
9346
9381
  },
9347
9382
  {
9348
- "kind": "field",
9349
- "name": "placeholder",
9350
- "type": {
9351
- "text": "string"
9383
+ "kind": "method",
9384
+ "name": "build",
9385
+ "privacy": "private",
9386
+ "return": {
9387
+ "type": {
9388
+ "text": "Record<string, AIProvider>"
9389
+ }
9352
9390
  },
9353
- "default": "'Message assistant...'"
9391
+ "parameters": [
9392
+ {
9393
+ "name": "vendor",
9394
+ "type": {
9395
+ "text": "AITierVendor"
9396
+ }
9397
+ }
9398
+ ]
9354
9399
  },
9355
9400
  {
9356
- "kind": "field",
9357
- "name": "popoutMode",
9358
- "type": {
9359
- "text": "PopoutMode | undefined"
9401
+ "kind": "method",
9402
+ "name": "isKnownVendor",
9403
+ "privacy": "private",
9404
+ "return": {
9405
+ "type": {
9406
+ "text": "vendor is AITierVendor"
9407
+ }
9360
9408
  },
9361
- "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)."
9362
- },
9409
+ "parameters": [
9410
+ {
9411
+ "name": "vendor",
9412
+ "type": {
9413
+ "text": "string"
9414
+ }
9415
+ }
9416
+ ]
9417
+ }
9418
+ ]
9419
+ },
9420
+ {
9421
+ "kind": "function",
9422
+ "name": "registerTieredAIProviders",
9423
+ "return": {
9424
+ "type": {
9425
+ "text": "TieredAIProviderSwitcher"
9426
+ }
9427
+ },
9428
+ "parameters": [
9363
9429
  {
9364
- "kind": "field",
9365
- "name": "closable",
9430
+ "name": "container",
9366
9431
  "type": {
9367
- "text": "boolean"
9368
- },
9369
- "default": "false",
9370
- "description": "Shows a Close button in the header, which fires `close-requested` and leaves the closing to\nwhatever holds the assistant. The chat bubble sets it while the assistant is in its dialog."
9432
+ "text": "Container"
9433
+ }
9371
9434
  },
9372
9435
  {
9373
- "kind": "field",
9374
- "name": "agents",
9436
+ "name": "options",
9375
9437
  "type": {
9376
- "text": "AgentConfig[] | undefined"
9377
- },
9378
- "description": "Agent configuration. Each user message is routed to the appropriate specialist\nbased on intent. With a single entry, orchestration is skipped."
9379
- },
9438
+ "text": "Omit<TieredAIProviderSwitcherOptions, 'container'>"
9439
+ }
9440
+ }
9441
+ ],
9442
+ "description": "Build a TieredAIProviderSwitcher — which registers the tier-shaped provider\nregistry — and put it on the (AIProviderSwitcher:variable) token. Call once at app\nbootstrap."
9443
+ }
9444
+ ],
9445
+ "exports": [
9446
+ {
9447
+ "kind": "js",
9448
+ "name": "TieredAIProviderSwitcher",
9449
+ "declaration": {
9450
+ "name": "TieredAIProviderSwitcher",
9451
+ "module": "src/provider/tiered-provider-switcher.ts"
9452
+ }
9453
+ },
9454
+ {
9455
+ "kind": "js",
9456
+ "name": "registerTieredAIProviders",
9457
+ "declaration": {
9458
+ "name": "registerTieredAIProviders",
9459
+ "module": "src/provider/tiered-provider-switcher.ts"
9460
+ }
9461
+ }
9462
+ ]
9463
+ },
9464
+ {
9465
+ "kind": "javascript-module",
9466
+ "path": "src/main/attachment-controller.ts",
9467
+ "declarations": [],
9468
+ "exports": []
9469
+ },
9470
+ {
9471
+ "kind": "javascript-module",
9472
+ "path": "src/main/budget-controller.ts",
9473
+ "declarations": [],
9474
+ "exports": []
9475
+ },
9476
+ {
9477
+ "kind": "javascript-module",
9478
+ "path": "src/main/composer-menu-controller.ts",
9479
+ "declarations": [],
9480
+ "exports": []
9481
+ },
9482
+ {
9483
+ "kind": "javascript-module",
9484
+ "path": "src/main/composer-resize-controller.ts",
9485
+ "declarations": [],
9486
+ "exports": []
9487
+ },
9488
+ {
9489
+ "kind": "javascript-module",
9490
+ "path": "src/main/context-gate-controller.ts",
9491
+ "declarations": [],
9492
+ "exports": []
9493
+ },
9494
+ {
9495
+ "kind": "javascript-module",
9496
+ "path": "src/main/cost-ledger-controller.ts",
9497
+ "declarations": [],
9498
+ "exports": []
9499
+ },
9500
+ {
9501
+ "kind": "javascript-module",
9502
+ "path": "src/main/index.ts",
9503
+ "declarations": [],
9504
+ "exports": [
9505
+ {
9506
+ "kind": "js",
9507
+ "name": "*",
9508
+ "declaration": {
9509
+ "name": "*",
9510
+ "package": "./main.template"
9511
+ }
9512
+ },
9513
+ {
9514
+ "kind": "js",
9515
+ "name": "*",
9516
+ "declaration": {
9517
+ "name": "*",
9518
+ "package": "./main"
9519
+ }
9520
+ },
9521
+ {
9522
+ "kind": "js",
9523
+ "name": "*",
9524
+ "declaration": {
9525
+ "name": "*",
9526
+ "package": "./main.types"
9527
+ }
9528
+ }
9529
+ ]
9530
+ },
9531
+ {
9532
+ "kind": "javascript-module",
9533
+ "path": "src/main/main.styles.ts",
9534
+ "declarations": [
9535
+ {
9536
+ "kind": "variable",
9537
+ "name": "styles",
9538
+ "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`"
9539
+ }
9540
+ ],
9541
+ "exports": [
9542
+ {
9543
+ "kind": "js",
9544
+ "name": "styles",
9545
+ "declaration": {
9546
+ "name": "styles",
9547
+ "module": "src/main/main.styles.ts"
9548
+ }
9549
+ }
9550
+ ]
9551
+ },
9552
+ {
9553
+ "kind": "javascript-module",
9554
+ "path": "src/main/main.template.ts",
9555
+ "declarations": [
9556
+ {
9557
+ "kind": "variable",
9558
+ "name": "messageTimestampTemplate",
9559
+ "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`",
9560
+ "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`."
9561
+ },
9562
+ {
9563
+ "kind": "function",
9564
+ "name": "FoundationAiAssistantTemplate",
9565
+ "return": {
9566
+ "type": {
9567
+ "text": "ViewTemplate<FoundationAiAssistant>"
9568
+ }
9569
+ },
9570
+ "parameters": [
9380
9571
  {
9381
- "kind": "field",
9382
- "name": "chatConfig",
9572
+ "name": "designSystemPrefix",
9383
9573
  "type": {
9384
- "text": "ChatConfig"
9385
- },
9386
- "default": "{}"
9387
- },
9574
+ "text": "string"
9575
+ }
9576
+ }
9577
+ ]
9578
+ }
9579
+ ],
9580
+ "exports": [
9581
+ {
9582
+ "kind": "js",
9583
+ "name": "messageTimestampTemplate",
9584
+ "declaration": {
9585
+ "name": "messageTimestampTemplate",
9586
+ "module": "src/main/main.template.ts"
9587
+ }
9588
+ },
9589
+ {
9590
+ "kind": "js",
9591
+ "name": "FoundationAiAssistantTemplate",
9592
+ "declaration": {
9593
+ "name": "FoundationAiAssistantTemplate",
9594
+ "module": "src/main/main.template.ts"
9595
+ }
9596
+ }
9597
+ ]
9598
+ },
9599
+ {
9600
+ "kind": "javascript-module",
9601
+ "path": "src/main/main.ts",
9602
+ "declarations": [
9603
+ {
9604
+ "kind": "variable",
9605
+ "name": "sparkleIconSvg",
9606
+ "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>`",
9607
+ "description": "Three-star AI \"sparkle\" mark — the conventional AI signifier; default assistant avatar."
9608
+ },
9609
+ {
9610
+ "kind": "variable",
9611
+ "name": "userIconSvg",
9612
+ "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>`",
9613
+ "description": "Person silhouette — default user avatar."
9614
+ },
9615
+ {
9616
+ "kind": "variable",
9617
+ "name": "genesisIconSvg",
9618
+ "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>`",
9619
+ "description": "Genesis G-mark — opt-in assistant avatar (the default before the sparkle mark)."
9620
+ },
9621
+ {
9622
+ "kind": "class",
9623
+ "description": "Foundation AI Assistant component.",
9624
+ "name": "FoundationAiAssistant",
9625
+ "members": [
9388
9626
  {
9389
9627
  "kind": "field",
9390
- "name": "persistence",
9391
- "type": {
9392
- "text": "SessionPersistenceConfig"
9393
- },
9394
- "default": "{}",
9395
- "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`."
9628
+ "name": "composerResize",
9629
+ "privacy": "private",
9630
+ "readonly": true,
9631
+ "default": "new ComposerResizeController({\n enabled: () => this.chatConfig.ui?.resizableInput !== false,\n inputEl: () => this.chatInputEl,\n messagesEl: () => this.messagesEl,\n })"
9396
9632
  },
9397
9633
  {
9398
9634
  "kind": "field",
9399
- "name": "aiServiceErrorMessages",
9400
- "type": {
9401
- "text": "Partial<Record<AIServiceRefusal, string>> | undefined"
9402
- },
9403
- "description": "Replaces the transcript sentence shown when the app's AI service refuses a request with one of\n`AI_SERVICE_ERROR_CODES`, or its router with one of `AI_SERVICE_ACCESS_REFUSALS` (GENC-1611), per\ncode; a code with no entry keeps\n`DEFAULT_AI_SERVICE_ERROR_MESSAGES`. Read when the driver is created, so set it before the\nelement connects."
9635
+ "name": "composerMenus",
9636
+ "privacy": "private",
9637
+ "readonly": true,
9638
+ "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 })"
9404
9639
  },
9405
9640
  {
9406
9641
  "kind": "field",
9407
- "name": "agentPicker",
9408
- "type": {
9409
- "text": "AgentPickerMode"
9410
- },
9411
- "description": "Resolved agent picker mode from `chatConfig.picker.mode`. Defaults to\n`'disabled'`.",
9412
- "readonly": true
9642
+ "name": "attachmentCtrl",
9643
+ "privacy": "private",
9644
+ "readonly": true,
9645
+ "default": "new AttachmentController(this, {\n acceptedFiles: () => this.chatConfig.ui?.acceptedFiles,\n logMeta: (type, detail) => this.logMeta(type, detail),\n })"
9413
9646
  },
9414
9647
  {
9415
9648
  "kind": "field",
9416
- "name": "composerHiddenByConfig",
9417
- "type": {
9418
- "text": "boolean"
9419
- },
9420
- "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.",
9421
- "readonly": true
9649
+ "name": "contextGateCtrl",
9650
+ "privacy": "private",
9651
+ "readonly": true,
9652
+ "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 })",
9653
+ "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."
9422
9654
  },
9423
9655
  {
9424
9656
  "kind": "field",
9425
- "name": "debugStateFactory",
9426
- "type": {
9427
- "text": "() => unknown | undefined"
9428
- }
9657
+ "name": "costLedger",
9658
+ "privacy": "private",
9659
+ "readonly": true,
9660
+ "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 })",
9661
+ "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."
9429
9662
  },
9430
9663
  {
9431
9664
  "kind": "field",
9432
- "name": "debugRedux",
9433
- "type": {
9434
- "text": "boolean"
9435
- },
9436
- "default": "false",
9437
- "description": "When set, enables Redux DevTools for this instance's session store."
9665
+ "name": "budget",
9666
+ "privacy": "private",
9667
+ "readonly": true,
9668
+ "default": "new BudgetController({\n sessionRef: () => this._sessionRef,\n providerStatuses: () => this.providerStatuses,\n providerRegistry: () => this.providerRegistry,\n chatConfig: () => this.chatConfig,\n })",
9669
+ "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."
9438
9670
  },
9439
9671
  {
9440
9672
  "kind": "field",
9441
- "name": "_sessionRef",
9442
- "type": {
9673
+ "name": "settings",
9674
+ "privacy": "private",
9675
+ "readonly": true,
9676
+ "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 })",
9677
+ "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`."
9678
+ },
9679
+ {
9680
+ "kind": "field",
9681
+ "name": "providerRegistry",
9682
+ "type": {
9683
+ "text": "AIProviderRegistry"
9684
+ }
9685
+ },
9686
+ {
9687
+ "kind": "field",
9688
+ "name": "appSettingsProvider",
9689
+ "type": {
9690
+ "text": "AssistantAppSettingsProvider"
9691
+ }
9692
+ },
9693
+ {
9694
+ "kind": "field",
9695
+ "name": "designSystemPrefix",
9696
+ "type": {
9697
+ "text": "string"
9698
+ },
9699
+ "default": "'rapid'"
9700
+ },
9701
+ {
9702
+ "kind": "field",
9703
+ "name": "headerTitle",
9704
+ "type": {
9705
+ "text": "string"
9706
+ },
9707
+ "default": "'Genesis Assistant'"
9708
+ },
9709
+ {
9710
+ "kind": "field",
9711
+ "name": "sessionKey",
9712
+ "type": {
9713
+ "text": "string | undefined"
9714
+ },
9715
+ "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."
9716
+ },
9717
+ {
9718
+ "kind": "field",
9719
+ "name": "imageSrc",
9720
+ "type": {
9721
+ "text": "string | undefined"
9722
+ }
9723
+ },
9724
+ {
9725
+ "kind": "field",
9726
+ "name": "userImageSrc",
9727
+ "type": {
9728
+ "text": "string | undefined"
9729
+ }
9730
+ },
9731
+ {
9732
+ "kind": "field",
9733
+ "name": "assistantIcon",
9734
+ "type": {
9735
+ "text": "string | undefined"
9736
+ },
9737
+ "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."
9738
+ },
9739
+ {
9740
+ "kind": "field",
9741
+ "name": "assistantIconSafe",
9742
+ "type": {
9743
+ "text": "string"
9744
+ },
9745
+ "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>`",
9746
+ "description": "Sanitized `assistantIcon`, or the default sparkle mark; bound into the template. @internal"
9747
+ },
9748
+ {
9749
+ "kind": "method",
9750
+ "name": "assistantIconChanged",
9751
+ "privacy": "protected",
9752
+ "return": {
9753
+ "type": {
9754
+ "text": "void"
9755
+ }
9756
+ }
9757
+ },
9758
+ {
9759
+ "kind": "field",
9760
+ "name": "userIcon",
9761
+ "type": {
9762
+ "text": "string | undefined"
9763
+ },
9764
+ "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."
9765
+ },
9766
+ {
9767
+ "kind": "field",
9768
+ "name": "userIconSafe",
9769
+ "type": {
9770
+ "text": "string"
9771
+ },
9772
+ "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>`",
9773
+ "description": "Sanitized `userIcon`, or the default person mark; bound into the template. @internal"
9774
+ },
9775
+ {
9776
+ "kind": "method",
9777
+ "name": "userIconChanged",
9778
+ "privacy": "protected",
9779
+ "return": {
9780
+ "type": {
9781
+ "text": "void"
9782
+ }
9783
+ }
9784
+ },
9785
+ {
9786
+ "kind": "field",
9787
+ "name": "placeholder",
9788
+ "type": {
9789
+ "text": "string"
9790
+ },
9791
+ "default": "'Message assistant...'"
9792
+ },
9793
+ {
9794
+ "kind": "field",
9795
+ "name": "popoutMode",
9796
+ "type": {
9797
+ "text": "PopoutMode | undefined"
9798
+ },
9799
+ "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)."
9800
+ },
9801
+ {
9802
+ "kind": "field",
9803
+ "name": "closable",
9804
+ "type": {
9805
+ "text": "boolean"
9806
+ },
9807
+ "default": "false",
9808
+ "description": "Shows a Close button in the header, which fires `close-requested` and leaves the closing to\nwhatever holds the assistant. The chat bubble sets it while the assistant is in its dialog."
9809
+ },
9810
+ {
9811
+ "kind": "field",
9812
+ "name": "agents",
9813
+ "type": {
9814
+ "text": "AgentConfig[] | undefined"
9815
+ },
9816
+ "description": "Agent configuration. Each user message is routed to the appropriate specialist\nbased on intent. With a single entry, orchestration is skipped."
9817
+ },
9818
+ {
9819
+ "kind": "field",
9820
+ "name": "chatConfig",
9821
+ "type": {
9822
+ "text": "ChatConfig"
9823
+ },
9824
+ "default": "{}"
9825
+ },
9826
+ {
9827
+ "kind": "field",
9828
+ "name": "persistence",
9829
+ "type": {
9830
+ "text": "SessionPersistenceConfig"
9831
+ },
9832
+ "default": "{}",
9833
+ "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`."
9834
+ },
9835
+ {
9836
+ "kind": "field",
9837
+ "name": "aiServiceErrorMessages",
9838
+ "type": {
9839
+ "text": "Partial<Record<AIServiceRefusal, string>> | undefined"
9840
+ },
9841
+ "description": "Replaces the transcript sentence shown when the app's AI service refuses a request with one of\n`AI_SERVICE_ERROR_CODES`, or its router with one of `AI_SERVICE_ACCESS_REFUSALS` (GENC-1611), per\ncode; a code with no entry keeps\n`DEFAULT_AI_SERVICE_ERROR_MESSAGES`. Read when the driver is created, so set it before the\nelement connects."
9842
+ },
9843
+ {
9844
+ "kind": "field",
9845
+ "name": "agentPicker",
9846
+ "type": {
9847
+ "text": "AgentPickerMode"
9848
+ },
9849
+ "description": "Resolved agent picker mode from `chatConfig.picker.mode`. Defaults to\n`'disabled'`.",
9850
+ "readonly": true
9851
+ },
9852
+ {
9853
+ "kind": "field",
9854
+ "name": "composerHiddenByConfig",
9855
+ "type": {
9856
+ "text": "boolean"
9857
+ },
9858
+ "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.",
9859
+ "readonly": true
9860
+ },
9861
+ {
9862
+ "kind": "field",
9863
+ "name": "debugStateFactory",
9864
+ "type": {
9865
+ "text": "() => unknown | undefined"
9866
+ }
9867
+ },
9868
+ {
9869
+ "kind": "field",
9870
+ "name": "debugRedux",
9871
+ "type": {
9872
+ "text": "boolean"
9873
+ },
9874
+ "default": "false",
9875
+ "description": "When set, enables Redux DevTools for this instance's session store."
9876
+ },
9877
+ {
9878
+ "kind": "field",
9879
+ "name": "_sessionRef",
9880
+ "type": {
9443
9881
  "text": "SessionStoreReturn | undefined"
9444
9882
  },
9445
9883
  "privacy": "private",
@@ -12768,842 +13206,129 @@
12768
13206
  "text": "Event"
12769
13207
  }
12770
13208
  }
12771
- ]
12772
- },
12773
- {
12774
- "kind": "method",
12775
- "name": "removeAttachment",
12776
- "return": {
12777
- "type": {
12778
- "text": "void"
12779
- }
12780
- },
12781
- "parameters": [
12782
- {
12783
- "name": "attachment",
12784
- "type": {
12785
- "text": "ChatAttachment"
12786
- }
12787
- }
12788
- ]
12789
- },
12790
- {
12791
- "kind": "method",
12792
- "name": "removeAttachmentError",
12793
- "return": {
12794
- "type": {
12795
- "text": "void"
12796
- }
12797
- },
12798
- "parameters": [
12799
- {
12800
- "name": "message",
12801
- "type": {
12802
- "text": "string"
12803
- }
12804
- }
12805
- ]
12806
- },
12807
- {
12808
- "kind": "method",
12809
- "name": "handleSendClick"
12810
- },
12811
- {
12812
- "kind": "method",
12813
- "name": "handleStopClick",
12814
- "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."
12815
- },
12816
- {
12817
- "kind": "method",
12818
- "name": "handleSuggestionClick",
12819
- "parameters": [
12820
- {
12821
- "name": "suggestion",
12822
- "type": {
12823
- "text": "string"
12824
- }
12825
- }
12826
- ]
12827
- },
12828
- {
12829
- "kind": "method",
12830
- "name": "submitMessage",
12831
- "return": {
12832
- "type": {
12833
- "text": "Promise<SubmitMessageResult>"
12834
- }
12835
- },
12836
- "parameters": [
12837
- {
12838
- "name": "input",
12839
- "type": {
12840
- "text": "{ text?: string; files?: File[] }"
12841
- }
12842
- },
12843
- {
12844
- "name": "options",
12845
- "optional": true,
12846
- "type": {
12847
- "text": "SubmitMessageOptions"
12848
- }
12849
- }
12850
- ],
12851
- "description": "Programmatically submit a message. Sends it the way the built-in composer's\nSend does, but from external code — a custom input rendered inside\n`slot=\"splash\"` when paired with `chatConfig.ui.hideComposer`, or a host\nsending on the user's behalf.\n\nThe input fully describes the turn: `text` and `files` are sent as given,\nand the composer is never read or cleared, so whatever the user has typed or\nattached there stays where it is. Files are validated against\n`chatConfig.ui.acceptedFiles` using the same pipeline as the composer's\nattach button. `options` routes the message — see SubmitMessageOptions.\n\nAtomic on validation: if any file fails validation, no send is dispatched,\nand the failure messages are returned in `errors`. They are not shown as\ncomposer chips: the files are the caller's, not the user's.\n\nResolves when the send settles: it awaits the driver's `sendMessage`, which\nfor the built-in drivers is the whole turn, the assistant's response included."
12852
- },
12853
- {
12854
- "kind": "method",
12855
- "name": "fetchSuggestions",
12856
- "privacy": "private"
12857
- },
12858
- {
12859
- "kind": "field",
12860
- "name": "_pendingSendPrompt",
12861
- "type": {
12862
- "text": "string | undefined"
12863
- },
12864
- "privacy": "private",
12865
- "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)"
12866
- },
12867
- {
12868
- "kind": "method",
12869
- "name": "send",
12870
- "privacy": "private",
12871
- "parameters": [
12872
- {
12873
- "name": "message",
12874
- "optional": true,
12875
- "type": {
12876
- "text": "{ text: string; attachments: ChatAttachment[] }"
12877
- },
12878
- "description": "What to send in place of the composer's contents, which are then neither\nread nor cleared (`submitMessage`). Left out, the composer's contents are sent and cleared."
12879
- },
12880
- {
12881
- "name": "routing",
12882
- "optional": true,
12883
- "type": {
12884
- "text": "SendMessageOptions"
12885
- },
12886
- "description": "Passed on to the driver: how this one message is routed."
12887
- }
12888
- ]
12889
- },
12890
- {
12891
- "kind": "method",
12892
- "name": "settleAfterTurn",
12893
- "privacy": "private",
12894
- "return": {
12895
- "type": {
12896
- "text": "void"
12897
- }
12898
- },
12899
- "parameters": [
12900
- {
12901
- "name": "capturedSessionRef",
12902
- "type": {
12903
- "text": "SessionStoreReturn | null | undefined"
12904
- }
12905
- }
12906
- ],
12907
- "description": "The post-turn settle shared by `send()` and a resumed restore turn: back to idle through\nthe session ref captured at turn start, then the cleanup the state setter would have done."
12908
- },
12909
- {
12910
- "kind": "method",
12911
- "name": "reportTurnEnded",
12912
- "privacy": "private",
12913
- "return": {
12914
- "type": {
12915
- "text": "void"
12916
- }
12917
- },
12918
- "parameters": [
12919
- {
12920
- "name": "prevState",
12921
- "type": {
12922
- "text": "AiAssistantState | undefined"
12923
- }
12924
- },
12925
- {
12926
- "name": "sessionRef",
12927
- "type": {
12928
- "text": "SessionStoreReturn | null | undefined"
12929
- }
12930
- }
12931
- ],
12932
- "description": "Report a turn that ended with the assistant waiting for the person to type (GENC-1660), for the\nAlways level: `turn-ended` on the activity bus, like every other notification report.\n\nOnly for a turn that ran to its end, failed ones included: not one the person stopped\n(`cancelling`), since they are there. Not while an interaction waits on them, which reports\nitself, so the person is never told twice about one moment. And not while an autopilot runs for\nthe flow: it answers, hands back or reports its own stop. Sub-agents' turns never get here; they\nrun inside one of the parent's."
12933
- },
12934
- {
12935
- "kind": "method",
12936
- "name": "handleClose",
12937
- "return": {
12938
- "type": {
12939
- "text": "void"
12940
- }
12941
- },
12942
- "description": "Called when the user clicks the header's Close button."
12943
- },
12944
- {
12945
- "kind": "method",
12946
- "name": "onChatHeaderMouseDown",
12947
- "parameters": [
12948
- {
12949
- "name": "e",
12950
- "type": {
12951
- "text": "MouseEvent"
12952
- }
12953
- }
12954
- ]
12955
- },
12956
- {
12957
- "kind": "method",
12958
- "name": "handleInteractionCompleted",
12959
- "parameters": [
12960
- {
12961
- "name": "e",
12962
- "type": {
12963
- "text": "Event"
12964
- }
12965
- }
12966
- ]
12967
- },
12968
- {
12969
- "kind": "method",
12970
- "name": "handleInteractionCost",
12971
- "parameters": [
12972
- {
12973
- "name": "e",
12974
- "type": {
12975
- "text": "Event"
12976
- }
12977
- }
12978
- ],
12979
- "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."
12980
- },
12981
- {
12982
- "kind": "field",
12983
- "name": "stopButtonVisible",
12984
- "type": {
12985
- "text": "boolean"
12986
- },
12987
- "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.",
12988
- "readonly": true
12989
- },
12990
- {
12991
- "kind": "field",
12992
- "name": "sendButtonVisible",
12993
- "type": {
12994
- "text": "boolean"
12995
- },
12996
- "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.",
12997
- "readonly": true
12998
- },
12999
- {
13000
- "kind": "field",
13001
- "name": "isComposerResizable",
13002
- "type": {
13003
- "text": "boolean"
13004
- },
13005
- "description": "Whether the message input shows a drag handle to resize its height.",
13006
- "readonly": true
13007
- },
13008
- {
13009
- "kind": "field",
13010
- "name": "composerHeightStyle",
13011
- "type": {
13012
- "text": "string"
13013
- },
13014
- "description": "Inline style carrying the dragged height into `--composer-height`.",
13015
- "readonly": true
13016
- },
13017
- {
13018
- "kind": "method",
13019
- "name": "onComposerResizeStart",
13020
- "return": {
13021
- "type": {
13022
- "text": "void"
13023
- }
13024
- },
13025
- "parameters": [
13026
- {
13027
- "name": "e",
13028
- "type": {
13029
- "text": "PointerEvent"
13030
- }
13031
- }
13032
- ]
13033
- },
13034
- {
13035
- "kind": "method",
13036
- "name": "onComposerResizeMove",
13037
- "return": {
13038
- "type": {
13039
- "text": "void"
13040
- }
13041
- },
13042
- "parameters": [
13043
- {
13044
- "name": "e",
13045
- "type": {
13046
- "text": "PointerEvent"
13047
- }
13048
- }
13049
- ]
13050
- },
13051
- {
13052
- "kind": "method",
13053
- "name": "onComposerResizeEnd",
13054
- "return": {
13055
- "type": {
13056
- "text": "void"
13057
- }
13058
- },
13059
- "parameters": [
13060
- {
13061
- "name": "e",
13062
- "type": {
13063
- "text": "PointerEvent"
13064
- }
13065
- }
13066
- ]
13067
- }
13068
- ],
13069
- "events": [
13070
- {
13071
- "name": "budget-refresh-requested",
13072
- "type": {
13073
- "text": "CustomEvent"
13074
- }
13075
- },
13076
- {
13077
- "type": {
13078
- "text": "CustomEvent"
13079
- }
13080
- },
13081
- {
13082
- "description": "Fired when the user presses the chat header in `popout-mode=\"expand\"` (for drag-to-popout hosts). Bubbles and composed. detail: `ChatHeaderMouseDownDetail`",
13083
- "name": "chat-header-mousedown"
13084
- },
13085
- {
13086
- "description": "Fired when the user presses the header's Close button, which shows while `closable` is set (the chat bubble sets it while the assistant is in its dialog). Bubbles and composed.",
13087
- "name": "close-requested"
13088
- },
13089
- {
13090
- "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`",
13091
- "name": "session-cleared"
13092
- },
13093
- {
13094
- "description": "Fired when an agent's `handOff` takes effect and its target becomes active. Bubbles and composed. detail: `HandOffFrame`",
13095
- "name": "handoff-started"
13096
- },
13097
- {
13098
- "description": "Fired when a hand-off ends and its caller is active again; `detail.outcome` says how it ended. Bubbles and composed. detail: `HandOffFrame`",
13099
- "name": "handoff-returned"
13100
- },
13101
- {
13102
- "description": "Fired when a hand-off ends with no hand-back: the chat was cleared, the agents changed, or a restore found it could not resume. Bubbles and composed. detail: `HandOffFrame`",
13103
- "name": "handoff-unwound"
13104
- }
13105
- ],
13106
- "attributes": [
13107
- {
13108
- "name": "header-title",
13109
- "type": {
13110
- "text": "string"
13111
- },
13112
- "default": "'Genesis Assistant'",
13113
- "fieldName": "headerTitle"
13114
- },
13115
- {
13116
- "name": "session-key",
13117
- "type": {
13118
- "text": "string | undefined"
13119
- },
13120
- "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.",
13121
- "fieldName": "sessionKey"
13122
- },
13123
- {
13124
- "name": "image-src",
13125
- "type": {
13126
- "text": "string | undefined"
13127
- },
13128
- "fieldName": "imageSrc"
13129
- },
13130
- {
13131
- "name": "user-image-src",
13132
- "type": {
13133
- "text": "string | undefined"
13134
- },
13135
- "fieldName": "userImageSrc"
13136
- },
13137
- {
13138
- "name": "placeholder",
13139
- "type": {
13140
- "text": "string"
13141
- },
13142
- "default": "'Message assistant...'",
13143
- "fieldName": "placeholder"
13144
- },
13145
- {
13146
- "name": "popout-mode",
13147
- "type": {
13148
- "text": "PopoutMode | undefined"
13149
- },
13150
- "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).",
13151
- "fieldName": "popoutMode"
13152
- },
13153
- {
13154
- "type": {
13155
- "text": "boolean"
13156
- },
13157
- "default": "false",
13158
- "description": "Shows a Close button in the header, which fires `close-requested` and leaves the closing to\nwhatever holds the assistant. The chat bubble sets it while the assistant is in its dialog.",
13159
- "fieldName": "closable"
13160
- },
13161
- {
13162
- "name": "debug-redux",
13163
- "type": {
13164
- "text": "boolean"
13165
- },
13166
- "default": "false",
13167
- "description": "When set, enables Redux DevTools for this instance's session store.",
13168
- "fieldName": "debugRedux"
13169
- }
13170
- ],
13171
- "superclass": {
13172
- "name": "GenesisElement",
13173
- "package": "@genesislcap/web-core"
13174
- },
13175
- "tagName": "foundation-ai-assistant",
13176
- "customElement": true
13177
- }
13178
- ],
13179
- "exports": [
13180
- {
13181
- "kind": "js",
13182
- "name": "sparkleIconSvg",
13183
- "declaration": {
13184
- "name": "sparkleIconSvg",
13185
- "module": "src/main/main.ts"
13186
- }
13187
- },
13188
- {
13189
- "kind": "js",
13190
- "name": "userIconSvg",
13191
- "declaration": {
13192
- "name": "userIconSvg",
13193
- "module": "src/main/main.ts"
13194
- }
13195
- },
13196
- {
13197
- "kind": "js",
13198
- "name": "genesisIconSvg",
13199
- "declaration": {
13200
- "name": "genesisIconSvg",
13201
- "module": "src/main/main.ts"
13202
- }
13203
- },
13204
- {
13205
- "kind": "js",
13206
- "name": "budgetPercentOf",
13207
- "declaration": {
13208
- "name": "budgetPercentOf",
13209
- "module": "./budget-controller"
13210
- }
13211
- },
13212
- {
13213
- "kind": "js",
13214
- "name": "formatBlockedReason",
13215
- "declaration": {
13216
- "name": "formatBlockedReason",
13217
- "module": "./budget-controller"
13218
- }
13219
- },
13220
- {
13221
- "kind": "js",
13222
- "name": "FoundationAiAssistant",
13223
- "declaration": {
13224
- "name": "FoundationAiAssistant",
13225
- "module": "src/main/main.ts"
13226
- }
13227
- },
13228
- {
13229
- "kind": "custom-element-definition",
13230
- "name": "foundation-ai-assistant",
13231
- "declaration": {
13232
- "name": "FoundationAiAssistant",
13233
- "module": "src/main/main.ts"
13234
- }
13235
- }
13236
- ]
13237
- },
13238
- {
13239
- "kind": "javascript-module",
13240
- "path": "src/main/main.types.ts",
13241
- "declarations": [
13242
- {
13243
- "kind": "variable",
13244
- "name": "AiAssistantEvent",
13245
- "type": {
13246
- "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 /** An agent's hand-off started (GENC-1737). `detail`: `HandOffFrame`. */\n HandOffStarted: 'handoff-started',\n /** A hand-off ended and its caller is active again. `detail`: `HandOffFrame`, with `outcome`. */\n HandOffReturned: 'handoff-returned',\n /** A hand-off ended with no hand-back. `detail`: `HandOffFrame`, with `outcome`. */\n HandOffUnwound: 'handoff-unwound',\n /** The header's Close button pressed, shown while `closable` is set. No `detail`. */\n CloseRequested: 'close-requested',\n}"
13247
- },
13248
- "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 /** An agent's hand-off started (GENC-1737). `detail`: `HandOffFrame`. */\n HandOffStarted: 'handoff-started',\n /** A hand-off ended and its caller is active again. `detail`: `HandOffFrame`, with `outcome`. */\n HandOffReturned: 'handoff-returned',\n /** A hand-off ended with no hand-back. `detail`: `HandOffFrame`, with `outcome`. */\n HandOffUnwound: 'handoff-unwound',\n /** The header's Close button pressed, shown while `closable` is set. No `detail`. */\n CloseRequested: 'close-requested',\n}",
13249
- "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."
13250
- },
13251
- {
13252
- "kind": "variable",
13253
- "name": "ANIMATION_DEFS",
13254
- "type": {
13255
- "text": "object"
13256
- },
13257
- "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}",
13258
- "description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
13259
- },
13260
- {
13261
- "kind": "variable",
13262
- "name": "satisfies",
13263
- "description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
13264
- },
13265
- {
13266
- "kind": "variable",
13267
- "name": "Record",
13268
- "description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
13269
- }
13270
- ],
13271
- "exports": [
13272
- {
13273
- "kind": "js",
13274
- "name": "AgentPickerMode",
13275
- "declaration": {
13276
- "name": "AgentPickerMode",
13277
- "package": "@genesislcap/foundation-ai"
13278
- }
13279
- },
13280
- {
13281
- "kind": "js",
13282
- "name": "AiAssistantEvent",
13283
- "declaration": {
13284
- "name": "AiAssistantEvent",
13285
- "module": "src/main/main.types.ts"
13286
- }
13287
- },
13288
- {
13289
- "kind": "js",
13290
- "name": "ANIMATION_DEFS",
13291
- "declaration": {
13292
- "name": "ANIMATION_DEFS",
13293
- "module": "src/main/main.types.ts"
13294
- }
13295
- },
13296
- {
13297
- "kind": "js",
13298
- "name": "satisfies",
13299
- "declaration": {
13300
- "name": "satisfies",
13301
- "module": "src/main/main.types.ts"
13302
- }
13303
- },
13304
- {
13305
- "kind": "js",
13306
- "name": "Record",
13307
- "declaration": {
13308
- "name": "Record",
13309
- "module": "src/main/main.types.ts"
13310
- }
13311
- }
13312
- ]
13313
- },
13314
- {
13315
- "kind": "javascript-module",
13316
- "path": "src/main/meta-snapshot.ts",
13317
- "declarations": [],
13318
- "exports": []
13319
- },
13320
- {
13321
- "kind": "javascript-module",
13322
- "path": "src/notifications/agent-notifications.ts",
13323
- "declarations": [
13324
- {
13325
- "kind": "variable",
13326
- "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
13327
- "type": {
13328
- "text": "string"
13329
- },
13330
- "default": "'The assistant is ready for your next input'",
13331
- "description": "The notification's text when neither the app nor the widget gives one."
13332
- },
13333
- {
13334
- "kind": "function",
13335
- "name": "agentNotificationPermission",
13336
- "return": {
13337
- "type": {
13338
- "text": "AgentNotificationPermission"
13339
- }
13340
- },
13341
- "description": "Whether this page may show notifications. Safe to call anywhere, including Node."
13342
- },
13343
- {
13344
- "kind": "function",
13345
- "name": "requestAgentNotificationPermission",
13346
- "return": {
13347
- "type": {
13348
- "text": "Promise<AgentNotificationPermission>"
13349
- }
13350
- },
13351
- "description": "Ask the person for permission to show notifications, and resolve to the result. Call it from a\nclick or key handler: browsers ignore or refuse a request that does not come from the person.\nResolves straight away when permission is already decided or unsupported, since a browser only\never asks once."
13352
- }
13353
- ],
13354
- "exports": [
13355
- {
13356
- "kind": "js",
13357
- "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
13358
- "declaration": {
13359
- "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
13360
- "module": "src/notifications/agent-notifications.ts"
13361
- }
13362
- },
13363
- {
13364
- "kind": "js",
13365
- "name": "agentNotificationPermission",
13366
- "declaration": {
13367
- "name": "agentNotificationPermission",
13368
- "module": "src/notifications/agent-notifications.ts"
13369
- }
13370
- },
13371
- {
13372
- "kind": "js",
13373
- "name": "requestAgentNotificationPermission",
13374
- "declaration": {
13375
- "name": "requestAgentNotificationPermission",
13376
- "module": "src/notifications/agent-notifications.ts"
13377
- }
13378
- }
13379
- ]
13380
- },
13381
- {
13382
- "kind": "javascript-module",
13383
- "path": "src/notifications/agent-notifier.ts",
13384
- "declarations": [],
13385
- "exports": []
13386
- },
13387
- {
13388
- "kind": "javascript-module",
13389
- "path": "src/notifications/index.ts",
13390
- "declarations": [],
13391
- "exports": [
13392
- {
13393
- "kind": "js",
13394
- "name": "agentNotificationPermission",
13395
- "declaration": {
13396
- "name": "agentNotificationPermission",
13397
- "module": "./agent-notifications"
13398
- }
13399
- },
13400
- {
13401
- "kind": "js",
13402
- "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
13403
- "declaration": {
13404
- "name": "DEFAULT_AGENT_NOTIFICATION_MESSAGE",
13405
- "module": "./agent-notifications"
13406
- }
13407
- },
13408
- {
13409
- "kind": "js",
13410
- "name": "requestAgentNotificationPermission",
13411
- "declaration": {
13412
- "name": "requestAgentNotificationPermission",
13413
- "module": "./agent-notifications"
13414
- }
13415
- },
13416
- {
13417
- "kind": "js",
13418
- "name": "type",
13419
- "declaration": {
13420
- "name": "type",
13421
- "module": "./agent-notifications"
13422
- }
13423
- },
13424
- {
13425
- "kind": "js",
13426
- "name": "AgentAttentionDetail",
13427
- "declaration": {
13428
- "name": "AgentAttentionDetail",
13429
- "module": "./agent-notifications"
13430
- }
13431
- },
13432
- {
13433
- "kind": "js",
13434
- "name": "type",
13435
- "declaration": {
13436
- "name": "type",
13437
- "module": "./agent-notifications"
13438
- }
13439
- },
13440
- {
13441
- "kind": "js",
13442
- "name": "AgentAttentionKind",
13443
- "declaration": {
13444
- "name": "AgentAttentionKind",
13445
- "module": "./agent-notifications"
13446
- }
13447
- },
13448
- {
13449
- "kind": "js",
13450
- "name": "type",
13451
- "declaration": {
13452
- "name": "type",
13453
- "module": "./agent-notifications"
13454
- }
13455
- },
13456
- {
13457
- "kind": "js",
13458
- "name": "AgentNotificationLevel",
13459
- "declaration": {
13460
- "name": "AgentNotificationLevel",
13461
- "module": "./agent-notifications"
13462
- }
13463
- },
13464
- {
13465
- "kind": "js",
13466
- "name": "type",
13467
- "declaration": {
13468
- "name": "type",
13469
- "module": "./agent-notifications"
13470
- }
13471
- },
13472
- {
13473
- "kind": "js",
13474
- "name": "AgentNotificationPermission",
13475
- "declaration": {
13476
- "name": "AgentNotificationPermission",
13477
- "module": "./agent-notifications"
13478
- }
13479
- }
13480
- ]
13481
- },
13482
- {
13483
- "kind": "javascript-module",
13484
- "path": "src/notifications/notification-level-picker.template.ts",
13485
- "declarations": [],
13486
- "exports": []
13487
- },
13488
- {
13489
- "kind": "javascript-module",
13490
- "path": "src/notifications/notification-settings.ts",
13491
- "declarations": [],
13492
- "exports": []
13493
- },
13494
- {
13495
- "kind": "javascript-module",
13496
- "path": "src/provider/ai-provider-switcher.ts",
13497
- "declarations": [
13498
- {
13499
- "kind": "variable",
13500
- "name": "AIProviderSwitcher",
13501
- "description": "The DI token for the (AIProviderSwitcher:interface). Resolves a noop until the app\nregisters one."
13502
- }
13503
- ],
13504
- "exports": [
13505
- {
13506
- "kind": "js",
13507
- "name": "AIProviderSwitcher",
13508
- "declaration": {
13509
- "name": "AIProviderSwitcher",
13510
- "module": "src/provider/ai-provider-switcher.ts"
13511
- }
13512
- }
13513
- ]
13514
- },
13515
- {
13516
- "kind": "javascript-module",
13517
- "path": "src/provider/assistant-app-settings.ts",
13518
- "declarations": [
13519
- {
13520
- "kind": "variable",
13521
- "name": "AssistantAppSettingsProvider",
13522
- "description": "The DI token for the (AssistantAppSettingsProvider:interface). Resolves a noop\nuntil the host registers one."
13523
- }
13524
- ],
13525
- "exports": [
13526
- {
13527
- "kind": "js",
13528
- "name": "AssistantAppSettingsProvider",
13529
- "declaration": {
13530
- "name": "AssistantAppSettingsProvider",
13531
- "module": "src/provider/assistant-app-settings.ts"
13532
- }
13533
- }
13534
- ]
13535
- },
13536
- {
13537
- "kind": "javascript-module",
13538
- "path": "src/provider/tiered-provider-switcher.ts",
13539
- "declarations": [
13540
- {
13541
- "kind": "class",
13542
- "description": "Which cloud vendor backs the tier-shaped provider registry, plus the means to move it at\nruntime (GENC-1610).",
13543
- "name": "TieredAIProviderSwitcher",
13544
- "members": [
13209
+ ]
13210
+ },
13545
13211
  {
13546
- "kind": "field",
13547
- "name": "vendors",
13548
- "type": {
13549
- "text": "readonly AITierVendor[]"
13212
+ "kind": "method",
13213
+ "name": "removeAttachment",
13214
+ "return": {
13215
+ "type": {
13216
+ "text": "void"
13217
+ }
13550
13218
  },
13551
- "readonly": true
13219
+ "parameters": [
13220
+ {
13221
+ "name": "attachment",
13222
+ "type": {
13223
+ "text": "ChatAttachment"
13224
+ }
13225
+ }
13226
+ ]
13552
13227
  },
13553
13228
  {
13554
- "kind": "field",
13555
- "name": "options",
13556
- "type": {
13557
- "text": "TieredAIProviderSwitcherOptions"
13229
+ "kind": "method",
13230
+ "name": "removeAttachmentError",
13231
+ "return": {
13232
+ "type": {
13233
+ "text": "void"
13234
+ }
13558
13235
  },
13559
- "privacy": "private",
13560
- "readonly": true,
13561
- "default": "options"
13236
+ "parameters": [
13237
+ {
13238
+ "name": "message",
13239
+ "type": {
13240
+ "text": "string"
13241
+ }
13242
+ }
13243
+ ]
13562
13244
  },
13563
13245
  {
13564
- "kind": "field",
13565
- "name": "defaultTier",
13566
- "type": {
13567
- "text": "AITierId"
13568
- },
13569
- "privacy": "private",
13570
- "readonly": true
13246
+ "kind": "method",
13247
+ "name": "handleSendClick"
13571
13248
  },
13572
13249
  {
13573
- "kind": "field",
13574
- "name": "registry",
13575
- "type": {
13576
- "text": "MutableAIProviderRegistry"
13577
- },
13578
- "privacy": "private",
13579
- "readonly": true
13250
+ "kind": "method",
13251
+ "name": "handleStopClick",
13252
+ "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."
13580
13253
  },
13581
13254
  {
13582
- "kind": "field",
13583
- "name": "listeners",
13584
- "privacy": "private",
13585
- "readonly": true,
13586
- "default": "new Set<(vendor: AITierVendor) => void>()"
13255
+ "kind": "method",
13256
+ "name": "handleSuggestionClick",
13257
+ "parameters": [
13258
+ {
13259
+ "name": "suggestion",
13260
+ "type": {
13261
+ "text": "string"
13262
+ }
13263
+ }
13264
+ ]
13587
13265
  },
13588
13266
  {
13589
- "kind": "field",
13590
- "name": "_vendor",
13591
- "type": {
13592
- "text": "AITierVendor"
13267
+ "kind": "method",
13268
+ "name": "submitMessage",
13269
+ "return": {
13270
+ "type": {
13271
+ "text": "Promise<SubmitMessageResult>"
13272
+ }
13593
13273
  },
13274
+ "parameters": [
13275
+ {
13276
+ "name": "input",
13277
+ "type": {
13278
+ "text": "{ text?: string; files?: File[] }"
13279
+ }
13280
+ },
13281
+ {
13282
+ "name": "options",
13283
+ "optional": true,
13284
+ "type": {
13285
+ "text": "SubmitMessageOptions"
13286
+ }
13287
+ }
13288
+ ],
13289
+ "description": "Programmatically submit a message. Sends it the way the built-in composer's\nSend does, but from external code — a custom input rendered inside\n`slot=\"splash\"` when paired with `chatConfig.ui.hideComposer`, or a host\nsending on the user's behalf.\n\nThe input fully describes the turn: `text` and `files` are sent as given,\nand the composer is never read or cleared, so whatever the user has typed or\nattached there stays where it is. Files are validated against\n`chatConfig.ui.acceptedFiles` using the same pipeline as the composer's\nattach button. `options` routes the message — see SubmitMessageOptions.\n\nAtomic on validation: if any file fails validation, no send is dispatched,\nand the failure messages are returned in `errors`. They are not shown as\ncomposer chips: the files are the caller's, not the user's.\n\nResolves when the send settles: it awaits the driver's `sendMessage`, which\nfor the built-in drivers is the whole turn, the assistant's response included."
13290
+ },
13291
+ {
13292
+ "kind": "method",
13293
+ "name": "fetchSuggestions",
13594
13294
  "privacy": "private"
13595
13295
  },
13596
13296
  {
13597
13297
  "kind": "field",
13598
- "name": "vendor",
13298
+ "name": "_pendingSendPrompt",
13599
13299
  "type": {
13600
- "text": "AITierVendor"
13300
+ "text": "string | undefined"
13601
13301
  },
13602
- "readonly": true
13302
+ "privacy": "private",
13303
+ "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)"
13603
13304
  },
13604
13305
  {
13605
13306
  "kind": "method",
13606
- "name": "switchTo",
13307
+ "name": "send",
13308
+ "privacy": "private",
13309
+ "parameters": [
13310
+ {
13311
+ "name": "message",
13312
+ "optional": true,
13313
+ "type": {
13314
+ "text": "{ text: string; attachments: ChatAttachment[] }"
13315
+ },
13316
+ "description": "What to send in place of the composer's contents, which are then neither\nread nor cleared (`submitMessage`). Left out, the composer's contents are sent and cleared."
13317
+ },
13318
+ {
13319
+ "name": "routing",
13320
+ "optional": true,
13321
+ "type": {
13322
+ "text": "SendMessageOptions"
13323
+ },
13324
+ "description": "Passed on to the driver: how this one message is routed."
13325
+ }
13326
+ ]
13327
+ },
13328
+ {
13329
+ "kind": "method",
13330
+ "name": "settleAfterTurn",
13331
+ "privacy": "private",
13607
13332
  "return": {
13608
13333
  "type": {
13609
13334
  "text": "void"
@@ -13611,17 +13336,18 @@
13611
13336
  },
13612
13337
  "parameters": [
13613
13338
  {
13614
- "name": "vendor",
13339
+ "name": "capturedSessionRef",
13615
13340
  "type": {
13616
- "text": "string"
13341
+ "text": "SessionStoreReturn | null | undefined"
13617
13342
  }
13618
13343
  }
13619
13344
  ],
13620
- "description": "A user-driven switch: move the registry, then tell the app so it can persist the choice.\nAn unknown vendor is ignored."
13345
+ "description": "The post-turn settle shared by `send()` and a resumed restore turn: back to idle through\nthe session ref captured at turn start, then the cleanup the state setter would have done."
13621
13346
  },
13622
13347
  {
13623
13348
  "kind": "method",
13624
- "name": "adoptPersistedVendor",
13349
+ "name": "reportTurnEnded",
13350
+ "privacy": "private",
13625
13351
  "return": {
13626
13352
  "type": {
13627
13353
  "text": "void"
@@ -13629,35 +13355,106 @@
13629
13355
  },
13630
13356
  "parameters": [
13631
13357
  {
13632
- "name": "vendor",
13358
+ "name": "prevState",
13633
13359
  "type": {
13634
- "text": "string"
13360
+ "text": "AiAssistantState | undefined"
13361
+ }
13362
+ },
13363
+ {
13364
+ "name": "sessionRef",
13365
+ "type": {
13366
+ "text": "SessionStoreReturn | null | undefined"
13635
13367
  }
13636
13368
  }
13637
13369
  ],
13638
- "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."
13370
+ "description": "Report a turn that ended with the assistant waiting for the person to type (GENC-1660), for the\nAlways level: `turn-ended` on the activity bus, like every other notification report.\n\nOnly for a turn that ran to its end, failed ones included: not one the person stopped\n(`cancelling`), since they are there. Not while an interaction waits on them, which reports\nitself, so the person is never told twice about one moment. And not while an autopilot runs for\nthe flow: it answers, hands back or reports its own stop. Sub-agents' turns never get here; they\nrun inside one of the parent's."
13639
13371
  },
13640
13372
  {
13641
13373
  "kind": "method",
13642
- "name": "subscribe",
13374
+ "name": "handleClose",
13643
13375
  "return": {
13644
13376
  "type": {
13645
- "text": "() => void"
13377
+ "text": "void"
13646
13378
  }
13647
13379
  },
13380
+ "description": "Called when the user clicks the header's Close button."
13381
+ },
13382
+ {
13383
+ "kind": "method",
13384
+ "name": "onChatHeaderMouseDown",
13648
13385
  "parameters": [
13649
13386
  {
13650
- "name": "listener",
13387
+ "name": "e",
13651
13388
  "type": {
13652
- "text": "(vendor: string) => void"
13389
+ "text": "MouseEvent"
13653
13390
  }
13654
13391
  }
13655
13392
  ]
13656
13393
  },
13657
13394
  {
13658
13395
  "kind": "method",
13659
- "name": "apply",
13660
- "privacy": "private",
13396
+ "name": "handleInteractionCompleted",
13397
+ "parameters": [
13398
+ {
13399
+ "name": "e",
13400
+ "type": {
13401
+ "text": "Event"
13402
+ }
13403
+ }
13404
+ ]
13405
+ },
13406
+ {
13407
+ "kind": "method",
13408
+ "name": "handleInteractionCost",
13409
+ "parameters": [
13410
+ {
13411
+ "name": "e",
13412
+ "type": {
13413
+ "text": "Event"
13414
+ }
13415
+ }
13416
+ ],
13417
+ "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."
13418
+ },
13419
+ {
13420
+ "kind": "field",
13421
+ "name": "stopButtonVisible",
13422
+ "type": {
13423
+ "text": "boolean"
13424
+ },
13425
+ "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.",
13426
+ "readonly": true
13427
+ },
13428
+ {
13429
+ "kind": "field",
13430
+ "name": "sendButtonVisible",
13431
+ "type": {
13432
+ "text": "boolean"
13433
+ },
13434
+ "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.",
13435
+ "readonly": true
13436
+ },
13437
+ {
13438
+ "kind": "field",
13439
+ "name": "isComposerResizable",
13440
+ "type": {
13441
+ "text": "boolean"
13442
+ },
13443
+ "description": "Whether the message input shows a drag handle to resize its height.",
13444
+ "readonly": true
13445
+ },
13446
+ {
13447
+ "kind": "field",
13448
+ "name": "composerHeightStyle",
13449
+ "type": {
13450
+ "text": "string"
13451
+ },
13452
+ "description": "Inline style carrying the dragged height into `--composer-height`.",
13453
+ "readonly": true
13454
+ },
13455
+ {
13456
+ "kind": "method",
13457
+ "name": "onComposerResizeStart",
13661
13458
  "return": {
13662
13459
  "type": {
13663
13460
  "text": "void"
@@ -13665,96 +13462,299 @@
13665
13462
  },
13666
13463
  "parameters": [
13667
13464
  {
13668
- "name": "vendor",
13465
+ "name": "e",
13669
13466
  "type": {
13670
- "text": "AITierVendor"
13467
+ "text": "PointerEvent"
13671
13468
  }
13672
13469
  }
13673
- ],
13674
- "description": "The registry move both entry points share, and nothing else."
13470
+ ]
13675
13471
  },
13676
13472
  {
13677
13473
  "kind": "method",
13678
- "name": "build",
13679
- "privacy": "private",
13474
+ "name": "onComposerResizeMove",
13680
13475
  "return": {
13681
13476
  "type": {
13682
- "text": "Record<string, AIProvider>"
13477
+ "text": "void"
13683
13478
  }
13684
13479
  },
13685
13480
  "parameters": [
13686
13481
  {
13687
- "name": "vendor",
13482
+ "name": "e",
13688
13483
  "type": {
13689
- "text": "AITierVendor"
13484
+ "text": "PointerEvent"
13690
13485
  }
13691
13486
  }
13692
13487
  ]
13693
13488
  },
13694
13489
  {
13695
13490
  "kind": "method",
13696
- "name": "isKnownVendor",
13697
- "privacy": "private",
13491
+ "name": "onComposerResizeEnd",
13698
13492
  "return": {
13699
13493
  "type": {
13700
- "text": "vendor is AITierVendor"
13494
+ "text": "void"
13701
13495
  }
13702
13496
  },
13703
13497
  "parameters": [
13704
13498
  {
13705
- "name": "vendor",
13499
+ "name": "e",
13706
13500
  "type": {
13707
- "text": "string"
13501
+ "text": "PointerEvent"
13708
13502
  }
13709
13503
  }
13710
13504
  ]
13711
13505
  }
13712
- ]
13713
- },
13714
- {
13715
- "kind": "function",
13716
- "name": "registerTieredAIProviders",
13717
- "return": {
13718
- "type": {
13719
- "text": "TieredAIProviderSwitcher"
13720
- }
13721
- },
13722
- "parameters": [
13506
+ ],
13507
+ "events": [
13723
13508
  {
13724
- "name": "container",
13509
+ "name": "budget-refresh-requested",
13725
13510
  "type": {
13726
- "text": "Container"
13511
+ "text": "CustomEvent"
13727
13512
  }
13728
13513
  },
13729
13514
  {
13730
- "name": "options",
13731
13515
  "type": {
13732
- "text": "Omit<TieredAIProviderSwitcherOptions, 'container'>"
13516
+ "text": "CustomEvent"
13733
13517
  }
13518
+ },
13519
+ {
13520
+ "description": "Fired when the user presses the chat header in `popout-mode=\"expand\"` (for drag-to-popout hosts). Bubbles and composed. detail: `ChatHeaderMouseDownDetail`",
13521
+ "name": "chat-header-mousedown"
13522
+ },
13523
+ {
13524
+ "description": "Fired when the user presses the header's Close button, which shows while `closable` is set (the chat bubble sets it while the assistant is in its dialog). Bubbles and composed.",
13525
+ "name": "close-requested"
13526
+ },
13527
+ {
13528
+ "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`",
13529
+ "name": "session-cleared"
13530
+ },
13531
+ {
13532
+ "description": "Fired when an agent's `handOff` takes effect and its target becomes active. Bubbles and composed. detail: `HandOffFrame`",
13533
+ "name": "handoff-started"
13534
+ },
13535
+ {
13536
+ "description": "Fired when a hand-off ends and its caller is active again; `detail.outcome` says how it ended. Bubbles and composed. detail: `HandOffFrame`",
13537
+ "name": "handoff-returned"
13538
+ },
13539
+ {
13540
+ "description": "Fired when a hand-off ends with no hand-back: the chat was cleared, the agents changed, or a restore found it could not resume. Bubbles and composed. detail: `HandOffFrame`",
13541
+ "name": "handoff-unwound"
13734
13542
  }
13735
13543
  ],
13736
- "description": "Build a TieredAIProviderSwitcher — which registers the tier-shaped provider\nregistry — and put it on the (AIProviderSwitcher:variable) token. Call once at app\nbootstrap."
13544
+ "attributes": [
13545
+ {
13546
+ "name": "header-title",
13547
+ "type": {
13548
+ "text": "string"
13549
+ },
13550
+ "default": "'Genesis Assistant'",
13551
+ "fieldName": "headerTitle"
13552
+ },
13553
+ {
13554
+ "name": "session-key",
13555
+ "type": {
13556
+ "text": "string | undefined"
13557
+ },
13558
+ "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.",
13559
+ "fieldName": "sessionKey"
13560
+ },
13561
+ {
13562
+ "name": "image-src",
13563
+ "type": {
13564
+ "text": "string | undefined"
13565
+ },
13566
+ "fieldName": "imageSrc"
13567
+ },
13568
+ {
13569
+ "name": "user-image-src",
13570
+ "type": {
13571
+ "text": "string | undefined"
13572
+ },
13573
+ "fieldName": "userImageSrc"
13574
+ },
13575
+ {
13576
+ "name": "placeholder",
13577
+ "type": {
13578
+ "text": "string"
13579
+ },
13580
+ "default": "'Message assistant...'",
13581
+ "fieldName": "placeholder"
13582
+ },
13583
+ {
13584
+ "name": "popout-mode",
13585
+ "type": {
13586
+ "text": "PopoutMode | undefined"
13587
+ },
13588
+ "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).",
13589
+ "fieldName": "popoutMode"
13590
+ },
13591
+ {
13592
+ "type": {
13593
+ "text": "boolean"
13594
+ },
13595
+ "default": "false",
13596
+ "description": "Shows a Close button in the header, which fires `close-requested` and leaves the closing to\nwhatever holds the assistant. The chat bubble sets it while the assistant is in its dialog.",
13597
+ "fieldName": "closable"
13598
+ },
13599
+ {
13600
+ "name": "debug-redux",
13601
+ "type": {
13602
+ "text": "boolean"
13603
+ },
13604
+ "default": "false",
13605
+ "description": "When set, enables Redux DevTools for this instance's session store.",
13606
+ "fieldName": "debugRedux"
13607
+ }
13608
+ ],
13609
+ "superclass": {
13610
+ "name": "GenesisElement",
13611
+ "package": "@genesislcap/web-core"
13612
+ },
13613
+ "tagName": "foundation-ai-assistant",
13614
+ "customElement": true
13737
13615
  }
13738
13616
  ],
13739
13617
  "exports": [
13740
13618
  {
13741
13619
  "kind": "js",
13742
- "name": "TieredAIProviderSwitcher",
13620
+ "name": "sparkleIconSvg",
13743
13621
  "declaration": {
13744
- "name": "TieredAIProviderSwitcher",
13745
- "module": "src/provider/tiered-provider-switcher.ts"
13622
+ "name": "sparkleIconSvg",
13623
+ "module": "src/main/main.ts"
13746
13624
  }
13747
13625
  },
13748
13626
  {
13749
13627
  "kind": "js",
13750
- "name": "registerTieredAIProviders",
13628
+ "name": "userIconSvg",
13751
13629
  "declaration": {
13752
- "name": "registerTieredAIProviders",
13753
- "module": "src/provider/tiered-provider-switcher.ts"
13630
+ "name": "userIconSvg",
13631
+ "module": "src/main/main.ts"
13632
+ }
13633
+ },
13634
+ {
13635
+ "kind": "js",
13636
+ "name": "genesisIconSvg",
13637
+ "declaration": {
13638
+ "name": "genesisIconSvg",
13639
+ "module": "src/main/main.ts"
13640
+ }
13641
+ },
13642
+ {
13643
+ "kind": "js",
13644
+ "name": "budgetPercentOf",
13645
+ "declaration": {
13646
+ "name": "budgetPercentOf",
13647
+ "module": "./budget-controller"
13648
+ }
13649
+ },
13650
+ {
13651
+ "kind": "js",
13652
+ "name": "formatBlockedReason",
13653
+ "declaration": {
13654
+ "name": "formatBlockedReason",
13655
+ "module": "./budget-controller"
13656
+ }
13657
+ },
13658
+ {
13659
+ "kind": "js",
13660
+ "name": "FoundationAiAssistant",
13661
+ "declaration": {
13662
+ "name": "FoundationAiAssistant",
13663
+ "module": "src/main/main.ts"
13664
+ }
13665
+ },
13666
+ {
13667
+ "kind": "custom-element-definition",
13668
+ "name": "foundation-ai-assistant",
13669
+ "declaration": {
13670
+ "name": "FoundationAiAssistant",
13671
+ "module": "src/main/main.ts"
13672
+ }
13673
+ }
13674
+ ]
13675
+ },
13676
+ {
13677
+ "kind": "javascript-module",
13678
+ "path": "src/main/main.types.ts",
13679
+ "declarations": [
13680
+ {
13681
+ "kind": "variable",
13682
+ "name": "AiAssistantEvent",
13683
+ "type": {
13684
+ "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 /** An agent's hand-off started (GENC-1737). `detail`: `HandOffFrame`. */\n HandOffStarted: 'handoff-started',\n /** A hand-off ended and its caller is active again. `detail`: `HandOffFrame`, with `outcome`. */\n HandOffReturned: 'handoff-returned',\n /** A hand-off ended with no hand-back. `detail`: `HandOffFrame`, with `outcome`. */\n HandOffUnwound: 'handoff-unwound',\n /** The header's Close button pressed, shown while `closable` is set. No `detail`. */\n CloseRequested: 'close-requested',\n}"
13685
+ },
13686
+ "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 /** An agent's hand-off started (GENC-1737). `detail`: `HandOffFrame`. */\n HandOffStarted: 'handoff-started',\n /** A hand-off ended and its caller is active again. `detail`: `HandOffFrame`, with `outcome`. */\n HandOffReturned: 'handoff-returned',\n /** A hand-off ended with no hand-back. `detail`: `HandOffFrame`, with `outcome`. */\n HandOffUnwound: 'handoff-unwound',\n /** The header's Close button pressed, shown while `closable` is set. No `detail`. */\n CloseRequested: 'close-requested',\n}",
13687
+ "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."
13688
+ },
13689
+ {
13690
+ "kind": "variable",
13691
+ "name": "ANIMATION_DEFS",
13692
+ "type": {
13693
+ "text": "object"
13694
+ },
13695
+ "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}",
13696
+ "description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
13697
+ },
13698
+ {
13699
+ "kind": "variable",
13700
+ "name": "satisfies",
13701
+ "description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
13702
+ },
13703
+ {
13704
+ "kind": "variable",
13705
+ "name": "Record",
13706
+ "description": "Registry of all available animations with their display metadata.\nAdding an entry here automatically extends the AiAssistantAnimation type."
13707
+ }
13708
+ ],
13709
+ "exports": [
13710
+ {
13711
+ "kind": "js",
13712
+ "name": "AgentPickerMode",
13713
+ "declaration": {
13714
+ "name": "AgentPickerMode",
13715
+ "package": "@genesislcap/foundation-ai"
13716
+ }
13717
+ },
13718
+ {
13719
+ "kind": "js",
13720
+ "name": "AiAssistantEvent",
13721
+ "declaration": {
13722
+ "name": "AiAssistantEvent",
13723
+ "module": "src/main/main.types.ts"
13724
+ }
13725
+ },
13726
+ {
13727
+ "kind": "js",
13728
+ "name": "ANIMATION_DEFS",
13729
+ "declaration": {
13730
+ "name": "ANIMATION_DEFS",
13731
+ "module": "src/main/main.types.ts"
13732
+ }
13733
+ },
13734
+ {
13735
+ "kind": "js",
13736
+ "name": "satisfies",
13737
+ "declaration": {
13738
+ "name": "satisfies",
13739
+ "module": "src/main/main.types.ts"
13740
+ }
13741
+ },
13742
+ {
13743
+ "kind": "js",
13744
+ "name": "Record",
13745
+ "declaration": {
13746
+ "name": "Record",
13747
+ "module": "src/main/main.types.ts"
13754
13748
  }
13755
13749
  }
13756
13750
  ]
13757
13751
  },
13752
+ {
13753
+ "kind": "javascript-module",
13754
+ "path": "src/main/meta-snapshot.ts",
13755
+ "declarations": [],
13756
+ "exports": []
13757
+ },
13758
13758
  {
13759
13759
  "kind": "javascript-module",
13760
13760
  "path": "src/state/ai-assistant-slice.ts",