@genesislcap/ai-assistant 15.29.0 → 15.30.1

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.
@@ -3608,6 +3608,38 @@ export declare class FoundationAiAssistant extends GenesisElement {
3608
3608
  * element has its own settings modal.
3609
3609
  */
3610
3610
  downloadingDebugLog: boolean;
3611
+ /**
3612
+ * True while `submitDebugLog` is building and handing off the log. Same role as
3613
+ * `downloadingDebugLog` for the Send button: the lifetime-stitch and the host's
3614
+ * `send` callback are async, so the button needs a visible in-flight state.
3615
+ */
3616
+ submittingDebugLog: boolean;
3617
+ /**
3618
+ * Outcome of the last log submission, shown briefly on the button ('Sent' /
3619
+ * 'Failed — retry') then cleared by `setDebugLogSubmitResult`'s timer. `null` when idle.
3620
+ */
3621
+ debugLogSubmitResult: 'sent' | 'error' | null;
3622
+ /** Timer that clears `debugLogSubmitResult` back to idle. */
3623
+ private debugLogSubmitResultTimer?;
3624
+ /**
3625
+ * Whether the agent-log compose box (note + Send/Cancel) is open. Opened by the row's
3626
+ * Send button when `debugLogSubmit.note` is not `false`; closed by Cancel or a
3627
+ * successful send. Stays open after a failure so the typed note is not lost.
3628
+ */
3629
+ debugLogComposeOpen: boolean;
3630
+ /** The note typed in the compose box, raw (trimmed only at submit time). */
3631
+ debugLogNote: string;
3632
+ /** Bound to the compose box's text-area via the template ref, for focus on open. */
3633
+ debugLogNoteEl?: HTMLElement;
3634
+ /** How long 'Sent' shows before idle. Overridable so tests need not wait 4 seconds. */
3635
+ debugLogSubmitResultFlashMs: number;
3636
+ /**
3637
+ * Bumped by `resetDebugLogSubmitState`. An in-flight `submitDebugLog` captures it and
3638
+ * drops its continuation when a reset (disconnect, session switch, Clear) happened
3639
+ * while it awaited — otherwise the stale submission would write state, arm a timer on
3640
+ * a torn-down element, or report 'Sent' into a session it never belonged to.
3641
+ */
3642
+ private debugLogSubmitGeneration;
3611
3643
  /** Active tab inside the settings modal. */
3612
3644
  get settingsModalTab(): SettingsModalTab;
3613
3645
  set settingsModalTab(value: SettingsModalTab);
@@ -4259,6 +4291,65 @@ export declare class FoundationAiAssistant extends GenesisElement {
4259
4291
  get settingsCostTabVisible(): boolean;
4260
4292
  /** Whether session token usage should render on the Usage tab. */
4261
4293
  get settingsSessionTokensVisible(): boolean;
4294
+ /**
4295
+ * Whether the settings "Agent log" section renders — shown when either action is
4296
+ * enabled: the download button (`allowDebugDownload`) or the host-transport Send
4297
+ * button (`debugLogSubmit`). Each button is additionally gated on its own flag
4298
+ * inside the section, so a host can enable one without the other.
4299
+ */
4300
+ get settingsAgentLogSectionVisible(): boolean;
4301
+ /**
4302
+ * The resolved compose-box settings for the agent-log Send button, or `null` when the
4303
+ * host opted out (`debugLogSubmit.note: false`) and the button sends on first click.
4304
+ */
4305
+ get debugLogNoteConfig(): ResolvedDebugLogNoteConfig | null;
4306
+ /**
4307
+ * Whether the typed note counts as empty — the ONE emptiness rule, shared by the
4308
+ * compose box's disabled state and its "required" hint so the two cannot drift apart.
4309
+ */
4310
+ get debugLogNoteMissing(): boolean;
4311
+ /** The Send button's idle label, as the host configured it. */
4312
+ get debugLogSubmitLabel(): string;
4313
+ /**
4314
+ * Label on the agent-log row's Send button. While the compose box is open the row
4315
+ * button is just the (disabled) trigger, so it keeps its idle label; otherwise it
4316
+ * reflects the in-flight / flashed outcome of the last submission.
4317
+ */
4318
+ get debugLogSubmitButtonLabel(): string;
4319
+ /**
4320
+ * The compose box's footer hint: a failure first, then the "required" nudge, else the
4321
+ * live counter. Visual only — the same information reaches assistive technology via
4322
+ * `debugLogNoteAriaLabel` (counter, required) and `debugLogSubmitAnnouncement` (outcome),
4323
+ * because IDREF attributes such as `aria-describedby` cannot point across the
4324
+ * design-system text-area's shadow boundary.
4325
+ */
4326
+ get debugLogComposeHint(): string;
4327
+ /**
4328
+ * Accessible name for the note. Deliberately STATIC apart from "(required)": a name
4329
+ * that changed per keystroke would be re-read in full by NVDA on every key and never
4330
+ * updated by JAWS. The running count reaches AT through `debugLogSubmitAnnouncement`
4331
+ * at the thresholds where it matters.
4332
+ */
4333
+ get debugLogNoteAriaLabel(): string;
4334
+ /**
4335
+ * Text for the always-present live region beside the agent-log row, so the outcome of
4336
+ * a submission is announced even when the compose box is closed or opted out
4337
+ * (`note: false`), where the only visible change is the button label.
4338
+ */
4339
+ get debugLogSubmitAnnouncement(): string;
4340
+ /**
4341
+ * The agent-log row's description, phrased for whichever actions the host enabled.
4342
+ * Send is called out as transmitting: Download keeps the log on the user's machine,
4343
+ * Send hands the full conversation to wherever the host's transport delivers it.
4344
+ */
4345
+ get debugLogRowDescription(): string;
4346
+ /**
4347
+ * Whether the compose box's Send button is inert: a send is already in flight, or the
4348
+ * host made the note required and it is still blank.
4349
+ */
4350
+ get debugLogSendDisabled(): boolean;
4351
+ /** Live "typed / max" counter for the compose box. */
4352
+ get debugLogNoteCounter(): string;
4262
4353
  /** Whether the chat header (and settings cog) should render. */
4263
4354
  get settingsCogVisible(): boolean;
4264
4355
  openSettingsModal(): void;
@@ -4329,6 +4420,62 @@ export declare class FoundationAiAssistant extends GenesisElement {
4329
4420
  */
4330
4421
  private buildMetaSnapshot;
4331
4422
  downloadDebugLog(): Promise<void>;
4423
+ /**
4424
+ * Hand the agent log to the host's `ui.debugLogSubmit.send` callback — the Send
4425
+ * button next to Download. Reuses `buildDownloadLog`, so the submitted log is
4426
+ * byte-identical to what Download saves (lifetime-stitched when the provider
4427
+ * persists diagnostics). The assistant is vendor-agnostic: the callback owns the
4428
+ * transport (Sentry feedback, a support API, an upload endpoint). Outcome lands in
4429
+ * `debugLogSubmitResult` so the button can flash 'Sent'/'Failed'; failures also go
4430
+ * to the logger with the cause.
4431
+ */
4432
+ submitDebugLog(): Promise<void>;
4433
+ /** The agent name stamped on the log: the active agent, else the header title. */
4434
+ private get debugLogAgentName();
4435
+ /**
4436
+ * Filename for the agent log — the ONE derivation Download saves under and Send hands
4437
+ * to the host, so `ChatDebugLogSubmission.filename`'s "same stem as the download"
4438
+ * promise is enforced rather than relying on two copies agreeing.
4439
+ */
4440
+ private debugLogFilename;
4441
+ /**
4442
+ * Back to idle: nothing in flight, no flash, no open compose box, no note. Called on
4443
+ * disconnect and on a session switch / Clear (a note typed against one conversation
4444
+ * must not caption the next one's log). On disconnect — the
4445
+ * flash timer would otherwise fire against a torn-down element, and clearing ONLY the
4446
+ * timer would strand `debugLogSubmitResult` at 'sent'/'error' for good on a pop-out /
4447
+ * pop-in (nothing else resets it), with the box remounting open on a stale note.
4448
+ */
4449
+ private resetDebugLogSubmitState;
4450
+ /**
4451
+ * The row's Send button. With a compose box configured (the default) it opens the box
4452
+ * and focuses the note so the user can caption the log; with `note: false` it sends
4453
+ * straight away, as before.
4454
+ */
4455
+ openDebugLogCompose(): void;
4456
+ /** The note's `@input`: track the text, and let typing dismiss a standing failure. */
4457
+ noteDebugLogInput(value: string): void;
4458
+ /** Close the compose box and discard the typed note. */
4459
+ cancelDebugLogCompose(): void;
4460
+ /**
4461
+ * Closing the compose box unmounts the focused text-area, which drops focus to the
4462
+ * document body and strands keyboard and screen-reader users. Hand it back to the row's
4463
+ * Send button — next frame, once the `when` block has torn down and the button, disabled
4464
+ * while the box was open, is interactive again.
4465
+ */
4466
+ private restoreDebugLogTriggerFocus;
4467
+ /**
4468
+ * After a FAILED send the controls come back but the element that started the send
4469
+ * was disabled meanwhile, so focus has already dropped to the document body. Put it
4470
+ * where the retry happens: the note when the box is open, else the row trigger.
4471
+ */
4472
+ private restoreDebugLogRetryFocus;
4473
+ /**
4474
+ * Record the submit outcome. 'sent' flashes and falls back to idle; 'error' PERSISTS
4475
+ * until the user acts (types, reopens the box, cancels, or retries) — a failure that
4476
+ * silently reverted to the counter after four seconds left no trace it had happened.
4477
+ */
4478
+ private setDebugLogSubmitResult;
4332
4479
  /**
4333
4480
  * The log to download (GENC-1351 §5.8). When the provider persists diagnostics,
4334
4481
  * stitch the **whole lifetime** stream (every page load) rather than just the
@@ -5145,6 +5292,13 @@ declare interface ResolvedCostHistoryConfig {
5145
5292
  summaryHint?: string;
5146
5293
  }
5147
5294
 
5295
+ /** `ChatDebugLogNoteConfig` with every option resolved. */
5296
+ export declare interface ResolvedDebugLogNoteConfig {
5297
+ placeholder: string;
5298
+ required: boolean;
5299
+ maxLength: number;
5300
+ }
5301
+
5148
5302
  /**
5149
5303
  * Structured-output schema for an agent. When set, the model's final (non-tool) answer is
5150
5304
  * constrained to this JSON Schema instead of free text. Either a static schema or a function