arcane-os 0.2.2 → 0.3.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 (117) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +8 -8
  3. package/browser-runtime/ARCANE_SDK_BROWSER_RELEASE.json +29 -22
  4. package/browser-runtime/ai/ARCANE_AI_BROWSER_SPEECH_COMPONENTS.json +203 -0
  5. package/browser-runtime/ai/browser-kokoro-worker.mjs +11 -2
  6. package/browser-runtime/ai/browser-speech-artifacts.mjs +3230 -397
  7. package/browser-runtime/ai/browser-speech-providers.mjs +1141 -157
  8. package/browser-runtime/ai/browser-speech.mjs +2 -0
  9. package/browser-runtime/ai/browser-whisper-worker.mjs +11 -2
  10. package/browser-runtime/ai/model-controller.mjs +285 -95
  11. package/browser-runtime/ai/speech-worker-client.mjs +247 -32
  12. package/browser-runtime/ai/speech-worker-runtime.mjs +2310 -167
  13. package/browser-runtime/event-manager.mjs +1097 -1
  14. package/docs/architecture.md +2 -2
  15. package/docs/event-manager.md +155 -27
  16. package/docs/reference/README.md +27 -27
  17. package/docs/reference/ai/browser-speech-package-authority.json +835 -0
  18. package/docs/reference/ai/browser-speech.md +1162 -246
  19. package/docs/reference/ai/browser-wasm.md +18 -7
  20. package/docs/reference/availability-and-normalization.md +6 -3
  21. package/docs/reference/behavioral-testing.md +29 -6
  22. package/docs/reference/cli.md +117 -9
  23. package/docs/reference/core/arcane-ai-contracts.md +1 -1
  24. package/docs/reference/event-manager.md +577 -32
  25. package/docs/reference/inventory/package-api.json +478 -2
  26. package/docs/reference/inventory/runtime-components.json +108 -44
  27. package/docs/reference/inventory/runtime-modules.json +131 -53
  28. package/docs/reference/mail.md +316 -0
  29. package/docs/reference/protocols.md +157 -43
  30. package/docs/reference/runtime-components.md +258 -83
  31. package/docs/reference/runtime-modules.md +613 -77
  32. package/docs/reference/sdk-api.md +1014 -25
  33. package/package.json +5 -4
  34. package/runtime/ARCANE_RUNTIME_RELEASE.json +145 -140
  35. package/runtime/arcane/components/app-bar.html +34 -13
  36. package/runtime/arcane/components/assistant-panel.html +110 -57
  37. package/runtime/arcane/components/calculator.html +7 -4
  38. package/runtime/arcane/components/chart.html +58 -17
  39. package/runtime/arcane/components/chat.html +606 -136
  40. package/runtime/arcane/components/conversation-view.html +13 -6
  41. package/runtime/arcane/components/dashboard-config.html +96 -59
  42. package/runtime/arcane/components/data-maintenance.html +69 -14
  43. package/runtime/arcane/components/data-view.html +53 -7
  44. package/runtime/arcane/components/directory-picker.html +118 -32
  45. package/runtime/arcane/components/document-inspector.html +47 -10
  46. package/runtime/arcane/components/file-drop.html +81 -35
  47. package/runtime/arcane/components/file-inspector.html +72 -22
  48. package/runtime/arcane/components/file-manager.html +374 -79
  49. package/runtime/arcane/components/integration-settings.html +12 -5
  50. package/runtime/arcane/components/local-ai-status.html +48 -19
  51. package/runtime/arcane/components/markdown-document.html +161 -68
  52. package/runtime/arcane/components/markdown-editor.html +110 -33
  53. package/runtime/arcane/components/media-embed.html +8 -5
  54. package/runtime/arcane/components/modal.html +15 -5
  55. package/runtime/arcane/components/output-panel.html +28 -23
  56. package/runtime/arcane/components/preferences-form.html +22 -4
  57. package/runtime/arcane/components/record-timeline.html +18 -2
  58. package/runtime/arcane/components/relationship-board.html +23 -3
  59. package/runtime/arcane/components/screen-capture.html +10 -4
  60. package/runtime/arcane/components/source-code-viewer.html +76 -9
  61. package/runtime/arcane/components/source-explanation.html +23 -3
  62. package/runtime/arcane/components/speech.html +462 -384
  63. package/runtime/arcane/components/summary-strip.html +22 -11
  64. package/runtime/arcane/components/table.html +39 -21
  65. package/runtime/arcane/components/task-progress.html +79 -21
  66. package/runtime/arcane/components/terminal-workspace.html +7 -4
  67. package/runtime/arcane/components/theme-editor.html +7 -3
  68. package/runtime/arcane/components/unified-inbox.html +9 -4
  69. package/runtime/arcane/components/voice-transcription.html +639 -98
  70. package/runtime/arcane/components/weather-widget.html +5 -3
  71. package/runtime/arcane/components/web-navigator.html +48 -8
  72. package/runtime/arcane/entities/Chat.js +1 -1
  73. package/runtime/arcane/entities/User.js +110 -23
  74. package/runtime/arcane/modules/AI.js +2109 -130
  75. package/runtime/arcane/modules/AIProviderRuntime.js +720 -13
  76. package/runtime/arcane/modules/AIRuntimeState.js +109 -52
  77. package/runtime/arcane/modules/ApiModelDatabase.js +390 -17
  78. package/runtime/arcane/modules/BrowserTestSuite.js +205 -28
  79. package/runtime/arcane/modules/CalculatorEngine.js +63 -3
  80. package/runtime/arcane/modules/CommunicationAppController.js +588 -28
  81. package/runtime/arcane/modules/CommunicationHub.js +590 -10
  82. package/runtime/arcane/modules/ComponentContracts.js +470 -0
  83. package/runtime/arcane/modules/ConversationTimebox.js +152 -33
  84. package/runtime/arcane/modules/DBLS.js +40 -7
  85. package/runtime/arcane/modules/DBOPFS.js +35 -11
  86. package/runtime/arcane/modules/DataMaintenance.js +12 -2
  87. package/runtime/arcane/modules/Errors.js +65 -7
  88. package/runtime/arcane/modules/HTMLImport.js +198 -14
  89. package/runtime/arcane/modules/LocalAIReadinessController.js +208 -29
  90. package/runtime/arcane/modules/Mail.js +738 -115
  91. package/runtime/arcane/modules/MailOutbox.mjs +1395 -0
  92. package/runtime/arcane/modules/MailTransport.mjs +197 -39
  93. package/runtime/arcane/modules/Ollama.js +36 -1
  94. package/runtime/arcane/modules/OpenMeteoWeatherProvider.js +583 -7
  95. package/runtime/arcane/modules/PreferenceStore.js +367 -33
  96. package/runtime/arcane/modules/RecordReviewStore.js +322 -23
  97. package/runtime/arcane/modules/ScreenCapture.js +1397 -15
  98. package/runtime/arcane/modules/SpeechPlayback.js +438 -41
  99. package/runtime/arcane/modules/TerminalClient.js +277 -12
  100. package/runtime/arcane/modules/ThemeBootstrap.js +80 -6
  101. package/runtime/arcane/modules/ThemeManager.js +39 -7
  102. package/runtime/arcane/modules/TimeGuard.js +131 -20
  103. package/runtime/arcane/modules/WaitForComponent.js +386 -33
  104. package/schemas/arcane-lock.schema.json +2 -2
  105. package/src/cli/main.mjs +435 -9
  106. package/src/event-manager.mjs +1097 -1
  107. package/src/import-map.mjs +21 -3
  108. package/src/index.mjs +13 -0
  109. package/src/installed-sdk-runtime.mjs +112 -0
  110. package/src/mail-api.mjs +22 -0
  111. package/src/mail-credentials.mjs +667 -0
  112. package/src/mail-server.mjs +1769 -0
  113. package/src/mail.mjs +261 -0
  114. package/src/sdk-browser-runtime.mjs +85 -41
  115. package/src/testing-loader.mjs +7 -0
  116. package/src/toolchain.mjs +3 -0
  117. package/src/workspace.mjs +1 -1
@@ -21,49 +21,82 @@ A component file does not register its own custom element. The `<html-import>` h
21
21
  </script>
22
22
  ```
23
23
 
24
+ ## Shared semantic-event and lifecycle contract
25
+
26
+ Except for the legacy `header.html` and platform-owned `theme-switcher.html`,
27
+ each component owns exactly one source created through
28
+ `createArcaneEventSource(host,{source:'arcane.component.<name>',eventTypes})`.
29
+ That source publishes synchronously to the realm's branded
30
+ `globalThis.arcaneEvents` authority. Component DOM events are one-way
31
+ compatibility projections of the same canonical occurrence; they are never
32
+ republished into the authority. Every projected detail has the canonical
33
+ `occurrenceId`, `arcaneSource`, `instanceId`, and `operationId` fields and a
34
+ frozen outer record. A compatibility payload's existing `source` field remains
35
+ source-local and may differ from `arcaneSource`; the payload may additionally
36
+ retain source-local browser or provider objects.
37
+
38
+ When a component uses a cancelable event as an admission gate, cancellation on
39
+ either the canonical occurrence or its DOM projection makes the publication
40
+ unaccepted, and the component does not continue the guarded operation. A
41
+ cancelable compatibility notification emitted after committed work does not
42
+ roll that work back unless its component section explicitly says otherwise.
43
+ Asynchronous work keeps its own `AbortSignal`, operation generation, and
44
+ promise ownership; canonical publication is synchronous and does not become an
45
+ async queue.
46
+
47
+ Every singleton-backed component publishes its ready event only after its host
48
+ members are installed. Its idempotent `destroy()` (unless a more specific
49
+ return is documented) disposes the canonical source and marks the host
50
+ unready. Cleanup of owned listeners, pending work, nested subscriptions, and
51
+ controllers is component-specific and is stated below where it forms part of
52
+ that component's public contract. Removing an `<html-import>` host calls an
53
+ imported component's `destroy()` through `HTMLImport`; callers that invoke
54
+ `destroy()` directly retain responsibility for removing the element when
55
+ appropriate.
56
+
24
57
  ## Canonical inventory
25
58
 
26
59
  | Component | Capability | Principal methods | Events | Normalization |
27
60
  | --- | --- | --- | --- | --- |
28
- | [`app-bar.html`](#app-barhtml) | Responsive application navigation, route state, status, and trailing actions. | `setNavigation()`<br>`setActiveRoute()`<br>`setStatus()`<br>`refresh()` | `app-bar-ready` | DOM-normalized |
29
- | [`assistant-panel.html`](#assistant-panelhtml) | Reusable assistant drawer, message area, composer, pending/streaming/empty/error state, and actions. | `open()`<br>`close()`<br>`toggle()`<br>`send()`<br>`clear()`<br>`setState()`<br>`focusComposer()`<br>`scrollToEnd()` | `assistant-ready`<br>`assistant-send`<br>`assistant-clear` | DOM-normalized; caller/provider results remain external |
30
- | [`calculator.html`](#calculatorhtml) | Calculator keypad and result/error event surface backed by CalculatorEngine. | `calculate()` | `calculator-ready`<br>`calculation-complete`<br>`calculation-error` | Normalized Calculation/error events |
61
+ | [`app-bar.html`](#app-barhtml) | Responsive application navigation, route state, status, and trailing actions. | `setNavigation()`<br>`setActiveRoute()`<br>`setStatus()`<br>`refresh()`<br>`destroy()` | `app-bar-ready` | DOM-normalized |
62
+ | [`assistant-panel.html`](#assistant-panelhtml) | Reusable assistant drawer, message area, composer, pending/streaming/empty/error state, and actions. | `open()`<br>`close()`<br>`toggle()`<br>`send()`<br>`clear()`<br>`setState()`<br>`focusComposer()`<br>`scrollToEnd()`<br>`destroy()` | `assistant-ready`<br>`assistant-opened`<br>`assistant-closed`<br>`assistant-send`<br>`assistant-clear` | DOM-normalized; caller/provider results remain external |
63
+ | [`calculator.html`](#calculatorhtml) | Calculator keypad and result/error event surface backed by CalculatorEngine. | `calculate()`<br>`destroy()` | `calculator-ready`<br>`calculation-complete`<br>`calculation-error` | Normalized Calculation/error events |
31
64
  | [`chart.html`](#charthtml) | Accessible uPlot line, area, or point chart with normalized options and rows. | `configure()`<br>`populate()`<br>`setData()`<br>`addData()`<br>`update()`<br>`destroy()` | `chart-ready`<br>`chart-remove` | Options/rows normalized; uPlot rendering is vendor-native |
32
- | [`chat.html`](#chathtml) | Shared chat, visible selected-model activation request, file upload, streaming, speech, language, availability, and conversation-timebox surface. | `streamMessage()`<br>`setMessageProgress()`<br>`setAIAvailability()`<br>`setInitialSpeechMuted()`<br>`setConversationComplete()`<br>`bindConversationTimebox()`<br>`submitMessage()`<br>`sendMessage()`<br>`languageChanged()`<br>`requestAIActivation()`<br>`destroy()` | `chat-ready`<br>`chat-send-message`<br>`chat-send-error`<br>`chat-file-uploaded`<br>`chat-language-changed`<br>`chat-ai-activation-request`<br>`chat-ai-activation-error`<br>`conversation-timebox-error` | UI/runtime state and explicit user activation intent normalized; AI/storage/media behavior mixed |
33
- | [`conversation-view.html`](#conversation-viewhtml) | Provider-neutral conversation display, advisory actions, composer, busy state, and status. | `setConversation()`<br>`setBusy()`<br>`setStatus()`<br>`clearComposer()` | `conversation-view-ready`<br>`communication-send`<br>`communication-advisory-action` | DOM-normalized |
34
- | [`dashboard-config.html`](#dashboard-confightml) | Selects which normalized chart definitions are visible on a dashboard. | `configure()`<br>`setDefinitions()`<br>`setVisibility()`<br>`getChartOptions()`<br>`getEffectiveVisibility()`<br>`open()`<br>`close()` | `dashboard-config-ready`<br>`dashboard-config-opened`<br>`dashboard-config-closed`<br>`dashboard-config-change` | Fully normalized definitions and visibility |
35
- | [`data-maintenance.html`](#data-maintenancehtml) | Runs destructive cleanup of empty chats and memories inside the current app data scope. | `open()` | `data-maintenance-ready`<br>`data-maintenance-complete` | Normalized counts; DBOPFS failures mixed |
36
- | [`data-view.html`](#data-viewhtml) | Opens a generic modal-style data view around an injected provider. | `beforeOpen()`<br>`open()` | `data-view-ready` | DOM-native result |
37
- | [`directory-picker.html`](#directory-pickerhtml) | Presents the provider-owned OS directory chooser with change/cancel/error states. | `configure()`<br>`focus()`<br>`select()` | `directory-picker-ready`<br>`directory-picker-change`<br>`directory-picker-cancel`<br>`directory-picker-error` | Strict normalized native selection/error |
38
- | [`document-inspector.html`](#document-inspectorhtml) | Inspects PDF, text, or source documents and records review state. | `loadDocument()`<br>`selectView()`<br>`markSaved()` | `document-inspector-ready`<br>`document-review-change` | Document state normalized; browser document APIs mixed |
39
- | [`file-drop.html`](#file-drophtml) | Acquires files by drag/drop or picker and presents busy, progress, error, and cleared state. | `configure()`<br>`openPicker()`<br>`clear()`<br>`setBusy()`<br>`setError()`<br>`setProgress()` | `file-drop-ready`<br>`file-drop-selected`<br>`file-drop-progress`<br>`file-drop-state`<br>`file-drop-error` | State normalized; browser File/drop errors mixed |
40
- | [`file-inspector.html`](#file-inspectorhtml) | Displays file metadata, preview, busy/error state, and caller-defined actions. | `configure()`<br>`show()`<br>`clear()`<br>`setActions()`<br>`setBusy()`<br>`setError()`<br>`setPreview()` | `file-inspector-ready`<br>`file-inspector-action`<br>`file-inspector-change`<br>`file-inspector-cleared`<br>`file-inspector-error` | State normalized; preview/provider behavior mixed |
41
- | [`file-manager.html`](#file-managerhtml) | Browses, filters, selects, opens, and acts on app-scoped files. | `setProvider()`<br>`loadAll()`<br>`setFilter()`<br>`select()`<br>`clearSelection()` | `file-manager-ready`<br>`file-manager-select`<br>`file-manager-open`<br>`file-manager-action` | Selection/filter state normalized; storage/provider behavior mixed |
65
+ | [`chat.html`](#chathtml) | Shared chat, visible selected-model activation request, file upload, streaming, speech, language, availability, and conversation-timebox surface. | `streamMessage()`<br>`setMessageProgress()`<br>`setAIAvailability()`<br>`setInitialSpeechMuted()`<br>`setConversationComplete()`<br>`bindConversationTimebox()`<br>`submitMessage()`<br>`sendMessage()`<br>`languageChanged()`<br>`requestAIActivation()`<br>`destroy()` | `chat-ready`<br>`chat-send-message`<br>`chat-send-error`<br>`chat-file-uploaded`<br>`chat-file-upload-error`<br>`chat-language-changed`<br>`chat-language-change-error`<br>`chat-ai-activation-request`<br>`chat-ai-activation-error`<br>`chat-speech-synthesis-error`<br>`conversation-timebox-error` | UI/runtime state and explicit user activation intent normalized; AI/storage/media behavior mixed |
66
+ | [`conversation-view.html`](#conversation-viewhtml) | Provider-neutral conversation display, advisory actions, composer, busy state, and status. | `setConversation()`<br>`setBusy()`<br>`setStatus()`<br>`clearComposer()`<br>`destroy()` | `conversation-view-ready`<br>`communication-send`<br>`communication-advisory-action` | DOM-normalized |
67
+ | [`dashboard-config.html`](#dashboard-confightml) | Selects which normalized chart definitions are visible on a dashboard. | `configure()`<br>`setDefinitions()`<br>`setVisibility()`<br>`getChartOptions()`<br>`getEffectiveVisibility()`<br>`open()`<br>`close()`<br>`destroy()` | `dashboard-config-ready`<br>`dashboard-config-opened`<br>`dashboard-config-closed`<br>`dashboard-config-change` | Fully normalized definitions and visibility |
68
+ | [`data-maintenance.html`](#data-maintenancehtml) | Runs destructive cleanup of empty chats and memories inside the current app data scope. | `open()`<br>`destroy()` | `data-maintenance-ready`<br>`data-maintenance-complete` | Normalized counts; DBOPFS failures mixed |
69
+ | [`data-view.html`](#data-viewhtml) | Opens a generic modal-style data view around an injected provider. | `beforeOpen()`<br>`open()`<br>`destroy()` | `data-view-ready` | DOM-native result |
70
+ | [`directory-picker.html`](#directory-pickerhtml) | Presents the provider-owned OS directory chooser with change/cancel/error states. | `configure()`<br>`focus()`<br>`select()`<br>`destroy()` | `directory-picker-ready`<br>`directory-picker-change`<br>`directory-picker-cancel`<br>`directory-picker-error` | Strict normalized native selection/error |
71
+ | [`document-inspector.html`](#document-inspectorhtml) | Inspects PDF, text, or source documents and records review state. | `loadDocument()`<br>`selectView()`<br>`markSaved()`<br>`destroy()` | `document-inspector-ready`<br>`document-review-change` | Document state normalized; browser document APIs mixed |
72
+ | [`file-drop.html`](#file-drophtml) | Acquires files by drag/drop or picker and presents busy, progress, error, and cleared state. | `configure()`<br>`openPicker()`<br>`clear()`<br>`setBusy()`<br>`setError()`<br>`setProgress()`<br>`destroy()` | `file-drop-ready`<br>`file-drop-selected`<br>`file-drop-progress`<br>`file-drop-state`<br>`file-drop-error` | State normalized; browser File/drop errors mixed |
73
+ | [`file-inspector.html`](#file-inspectorhtml) | Displays file metadata, preview, busy/error state, and caller-defined actions. | `configure()`<br>`show()`<br>`clear()`<br>`setActions()`<br>`setBusy()`<br>`setError()`<br>`setPreview()`<br>`destroy()` | `file-inspector-ready`<br>`file-inspector-action`<br>`file-inspector-change`<br>`file-inspector-cleared`<br>`file-inspector-error` | State normalized; preview/provider behavior mixed |
74
+ | [`file-manager.html`](#file-managerhtml) | Browses, filters, selects, opens, and acts on app-scoped files. | `setProvider()`<br>`loadAll()`<br>`setFilter()`<br>`select()`<br>`clearSelection()`<br>`destroy()` | `file-manager-ready`<br>`file-manager-select`<br>`file-manager-open`<br>`file-manager-action` | Selection/filter state normalized; storage/provider behavior mixed |
42
75
  | [`header.html`](#headerhtml) | Legacy title bar with history, reload, online marker, presentation labels, and 988 link. | None | No component-specific event | Browser/platform-native behavior; no component-ready contract |
43
- | [`integration-settings.html`](#integration-settingshtml) | Edits non-secret communication service configuration and service actions. | `configure()`<br>`getValues()`<br>`setStatus()` | `integration-settings-ready`<br>`integration-settings-save`<br>`integration-settings-close`<br>`integration-action` | Normalized non-secret values |
44
- | [`local-ai-status.html`](#local-ai-statushtml) | Presents local-AI standby, failure, recovery, guidance, retry, and dismissal states. | `configure()`<br>`begin()`<br>`present(); hidden property` | `local-ai-status-ready`<br>`local-ai-status-dismissed`<br>`local-ai-retry` | Fully normalized LocalAIReadiness report |
45
- | [`markdown-document.html`](#markdown-documenthtml) | Safely renders and navigates a Markdown document with focusable fragments. | `configure()`<br>`load()`<br>`render()`<br>`clear()`<br>`fail()`<br>`focus()`<br>`focusFragment()` | `markdown-document-ready`<br>`markdown-document-state`<br>`markdown-document-navigate` | State/sanitized output normalized; Marked/DOM failures mixed |
46
- | [`markdown-editor.html`](#markdown-editorhtml) | Configurable Markdown authoring, toolbar, preview, title, and save surface. | `configure()`<br>`focus()`<br>`clear()`<br>`saveEntry()` | `markdown-editor-ready`<br>`markdown-editor-change`<br>`markdown-editor-saved` | Editor values normalized; injected save result mixed |
47
- | [`media-embed.html`](#media-embedhtml) | Loads a validated YouTube video or playlist embed and exposes external-platform action. | `configure()`<br>`load()` | `media-embed-ready`<br>`media-load`<br>`media-error`<br>`media-open-platform` | URL/error normalized; iframe/platform behavior native |
48
- | [`modal.html`](#modalhtml) | Generic modal with population, open/close, actions, and sequential task execution. | `populate()`<br>`open()`<br>`close()`<br>`runTasks()` | `modal-ready`<br>`modal-opened`<br>`modal-closed`<br>`modal-action` | Modal state normalized; injected task results mixed |
49
- | [`output-panel.html`](#output-panelhtml) | Presents status, output, body, coverage, actions, pending, error, and cleared states. | `configure()`<br>`setOutput()`<br>`setBody()`<br>`setCoverage()`<br>`setActions()`<br>`setPending()`<br>`setStatus()`<br>`setError()`<br>`clear()` | `output-panel-ready`<br>`output-panel-state`<br>`output-panel-change`<br>`output-panel-action`<br>`output-panel-error`<br>`output-panel-cleared` | DOM-normalized |
50
- | [`preferences-form.html`](#preferences-formhtml) | Builds a schema-driven preferences form with submit, reset, busy, and status behavior. | `configure()`<br>`getValues()`<br>`setValues()`<br>`setBusy()`<br>`setStatus()` | `preferences-form-ready`<br>`preferences-change`<br>`preferences-submit`<br>`preferences-reset` | Normalized form values |
51
- | [`record-timeline.html`](#record-timelinehtml) | Displays chronological records/evidence and emits open actions. | `setItems()`<br>`populate()` | `record-timeline-ready`<br>`record-timeline-open` | DOM-normalized |
52
- | [`relationship-board.html`](#relationship-boardhtml) | Displays normalized relationship nodes/edges in graph and list forms. | `setGraph()`<br>`populate()` | `relationship-board-ready`<br>`relationship-node-open`<br>`relationship-edge-open` | DOM-normalized |
53
- | [`screen-capture.html`](#screen-capturehtml) | Presents image, video, or GIF display-capture workflow. | `capture()` | `screen-capture-ready`<br>`screen-capture-result` | State/result normalized; media permission/codec failures mixed |
54
- | [`source-code-viewer.html`](#source-code-viewerhtml) | Renders line-addressable source code with load, error, focus, and state behavior. | `configure()`<br>`load()`<br>`render()`<br>`clear()`<br>`fail()`<br>`focus()`<br>`focusLine()` | `source-code-viewer-ready`<br>`source-code-viewer-state` | Normalized source/state |
55
- | [`source-explanation.html`](#source-explanationhtml) | Presents an evidence finding, source selection, explanation, and save state. | `showFinding()`<br>`populate()`<br>`selectSource()`<br>`markSaved()` | `source-explanation-ready`<br>`source-explanation-save`<br>`source-explanation-source-selected` | DOM-normalized |
56
- | [`speech.html`](#speechhtml) | Coordinates explicit STT activation, speech controls, transcription completion, mute state, and microphone availability. | `configure()`<br>`setAvailability()`<br>`setMuted()`<br>`requestSTTActivation()`<br>`destroy()`<br>`availability`<br>`muted`<br>`initialMuted`<br>`componentReady` | `speech-ready`<br>`speech-transcription-complete`<br>`speech-transcription-error`<br>`speech-transcription-cancelled`<br>`speech-microphone-unavailable`<br>`speech-stt-activation-request`<br>`speech-stt-activation-error`<br>`speech-tts-lifecycle-error` | Sticky runtime speech readiness, explicit STT activation, request cancellation, and TTS mute lifecycle intent normalized; provider/model authority and media behavior remain external |
57
- | [`summary-strip.html`](#summary-striphtml) | Displays compact selectable KPI or summary items. | `configure()`<br>`setItems()`<br>`updateItem()`<br>`clear()` | `summary-strip-ready`<br>`summary-strip-change`<br>`summary-strip-select` | DOM-normalized |
58
- | [`table.html`](#tablehtml) | Builds and updates a simple header/body table. | `buildHeader()`<br>`buildTable()` | `table-ready`<br>`header-update`<br>`body-update` | DOM-normalized |
59
- | [`task-progress.html`](#task-progresshtml) | Runs and displays a task list with started/change/complete/error state. | `configure()`<br>`setTasks()`<br>`updateTask()`<br>`runTasks()`<br>`clear()` | `task-progress-ready`<br>`task-progress-started`<br>`task-progress-change`<br>`task-progress-complete`<br>`task-progress-error` | Task state normalized; injected task results mixed |
60
- | [`terminal-workspace.html`](#terminal-workspacehtml) | Presents multiple terminal sessions, output, active selection, theme, and terminal actions. | `configure()`<br>`addSession()`<br>`removeSession()`<br>`activateSession()`<br>`append()`<br>`clear()`<br>`setState()`<br>`setTheme()`<br>`focus()` | `terminal-workspace-ready`<br>`terminal-submit`<br>`terminal-interrupt`<br>`terminal-clear`<br>`terminal-session-new`<br>`terminal-session-close`<br>`terminal-session-select`<br>`terminal-settings` | UI/session state normalized; native command results supplied externally |
61
- | [`theme-editor.html`](#theme-editorhtml) | Edits, previews, saves, and resets semantic custom theme tokens. | `configure()`<br>`getTheme()`<br>`setTheme()`<br>`setBusy()`<br>`setStatus()` | `theme-editor-ready`<br>`theme-preview`<br>`theme-save`<br>`theme-reset` | Fully normalized Theme values |
76
+ | [`integration-settings.html`](#integration-settingshtml) | Edits non-secret communication service configuration and service actions. | `configure()`<br>`getValues()`<br>`setStatus()`<br>`destroy()` | `integration-settings-ready`<br>`integration-settings-save`<br>`integration-settings-close`<br>`integration-action` | Normalized non-secret values |
77
+ | [`local-ai-status.html`](#local-ai-statushtml) | Presents local-AI standby, failure, recovery, guidance, retry, and dismissal states. | `configure()`<br>`begin()`<br>`present()`<br>`destroy()`<br>`hidden` | `local-ai-status-ready`<br>`local-ai-status-dismissed`<br>`local-ai-retry` | Fully normalized LocalAIReadiness report |
78
+ | [`markdown-document.html`](#markdown-documenthtml) | Safely renders and navigates a Markdown document with focusable fragments. | `configure()`<br>`load()`<br>`render()`<br>`clear()`<br>`fail()`<br>`focus()`<br>`focusFragment()`<br>`destroy()` | `markdown-document-ready`<br>`markdown-document-state`<br>`markdown-document-loading`<br>`markdown-document-rendered`<br>`markdown-document-empty`<br>`markdown-document-error`<br>`markdown-document-navigate` | State/sanitized output normalized; Marked/DOM failures mixed |
79
+ | [`markdown-editor.html`](#markdown-editorhtml) | Configurable Markdown authoring, toolbar, preview, title, and save surface. | `configure()`<br>`focus()`<br>`clear()`<br>`saveEntry()`<br>`destroy()` | `markdown-editor-ready`<br>`markdown-editor-change`<br>`markdown-editor-saved` | Editor values normalized; injected save result mixed |
80
+ | [`media-embed.html`](#media-embedhtml) | Loads a validated YouTube video or playlist embed and exposes external-platform action. | `configure()`<br>`load()`<br>`destroy()` | `media-embed-ready`<br>`media-load`<br>`media-error`<br>`media-open-platform` | URL/error normalized; iframe/platform behavior native |
81
+ | [`modal.html`](#modalhtml) | Generic modal with population, open/close, actions, and sequential task execution. | `populate()`<br>`open()`<br>`close()`<br>`runTasks()`<br>`destroy()` | `modal-ready`<br>`modal-opened`<br>`modal-closed`<br>`modal-action` | Modal state normalized; injected task results mixed |
82
+ | [`output-panel.html`](#output-panelhtml) | Presents status, output, body, coverage, actions, pending, error, and cleared states. | `configure()`<br>`setOutput()`<br>`setBody()`<br>`setCoverage()`<br>`setActions()`<br>`setPending()`<br>`setStatus()`<br>`setError()`<br>`clear()`<br>`destroy()` | `output-panel-ready`<br>`output-panel-state`<br>`output-panel-change`<br>`output-panel-action`<br>`output-panel-error`<br>`output-panel-cleared` | DOM-normalized |
83
+ | [`preferences-form.html`](#preferences-formhtml) | Builds a schema-driven preferences form with submit, reset, busy, and status behavior. | `configure()`<br>`getValues()`<br>`setValues()`<br>`setBusy()`<br>`setStatus()`<br>`destroy()` | `preferences-form-ready`<br>`preferences-change`<br>`preferences-submit`<br>`preferences-reset` | Normalized form values |
84
+ | [`record-timeline.html`](#record-timelinehtml) | Displays chronological records/evidence and emits open actions. | `setItems()`<br>`populate()`<br>`destroy()` | `record-timeline-ready`<br>`record-timeline-open` | DOM-normalized |
85
+ | [`relationship-board.html`](#relationship-boardhtml) | Displays normalized relationship nodes/edges in graph and list forms. | `setGraph()`<br>`populate()`<br>`destroy()` | `relationship-board-ready`<br>`relationship-node-open`<br>`relationship-edge-open` | DOM-normalized |
86
+ | [`screen-capture.html`](#screen-capturehtml) | Presents image, video, or GIF display-capture workflow. | `capture` (`ScreenCapture` instance)<br>`destroy()` | `screen-capture-ready`<br>`screen-capture-result` | State/result normalized; media permission/codec failures mixed |
87
+ | [`source-code-viewer.html`](#source-code-viewerhtml) | Renders line-addressable source code with load, error, focus, and state behavior. | `configure()`<br>`load()`<br>`render()`<br>`clear()`<br>`fail()`<br>`focus()`<br>`focusLine()`<br>`destroy()` | `source-code-viewer-ready`<br>`source-code-viewer-state`<br>`source-code-viewer-state-loading`<br>`source-code-viewer-state-ready`<br>`source-code-viewer-state-empty`<br>`source-code-viewer-state-error` | Normalized source/state |
88
+ | [`source-explanation.html`](#source-explanationhtml) | Presents an evidence finding, source selection, explanation, and save state. | `showFinding()`<br>`populate()`<br>`selectSource()`<br>`markSaved()`<br>`destroy()` | `source-explanation-ready`<br>`source-explanation-save`<br>`source-explanation-source-selected` | DOM-normalized |
89
+ | [`speech.html`](#speechhtml) | Coordinates explicit STT activation, speech controls, transcription completion, mute state, and microphone availability. | `configure()`<br>`setAvailability()`<br>`setMuted()`<br>`reportTTSError()`<br>`requestSTTActivation()`<br>`destroy()`<br>`availability`<br>`muted`<br>`initialMuted`<br>`componentReady` | `speech-ready`<br>`speech-transcription-complete`<br>`speech-transcription-error`<br>`speech-transcription-cancelled`<br>`speech-microphone-unavailable`<br>`speech-stt-activation-request`<br>`speech-stt-activation-error`<br>`speech-tts-lifecycle-error`<br>`speech-synthesis-error` | Sticky runtime speech readiness, explicit STT activation, request cancellation, and TTS mute lifecycle intent normalized; provider/model authority and media behavior remain external |
90
+ | [`summary-strip.html`](#summary-striphtml) | Displays compact selectable KPI or summary items. | `configure()`<br>`setItems()`<br>`updateItem()`<br>`clear()`<br>`destroy()` | `summary-strip-ready`<br>`summary-strip-change`<br>`summary-strip-select` | DOM-normalized |
91
+ | [`table.html`](#tablehtml) | Builds and updates a simple header/body table. | `buildHeader()`<br>`buildTable()`<br>`destroy()` | `table-ready`<br>`header-update`<br>`body-update` | DOM-normalized |
92
+ | [`task-progress.html`](#task-progresshtml) | Runs and displays a task list with started/change/complete/error state. | `configure()`<br>`setTasks()`<br>`updateTask()`<br>`runTasks()`<br>`clear()`<br>`destroy()` | `task-progress-ready`<br>`task-progress-started`<br>`task-progress-change`<br>`task-progress-complete`<br>`task-progress-error` | Task state normalized; injected task results mixed |
93
+ | [`terminal-workspace.html`](#terminal-workspacehtml) | Presents multiple terminal sessions, output, active selection, theme, and terminal actions. | `configure()`<br>`addSession()`<br>`removeSession()`<br>`activateSession()`<br>`append()`<br>`clear()`<br>`setState()`<br>`setTheme()`<br>`focus()`<br>`destroy()` | `terminal-workspace-ready`<br>`terminal-submit`<br>`terminal-interrupt`<br>`terminal-clear`<br>`terminal-session-new`<br>`terminal-session-close`<br>`terminal-session-select`<br>`terminal-settings` | UI/session state normalized; native command results supplied externally |
94
+ | [`theme-editor.html`](#theme-editorhtml) | Edits, previews, saves, and resets semantic custom theme tokens. | `configure()`<br>`getTheme()`<br>`setTheme()`<br>`setBusy()`<br>`setStatus()`<br>`destroy()` | `theme-editor-ready`<br>`theme-preview`<br>`theme-save`<br>`theme-reset` | Fully normalized Theme values |
62
95
  | [`theme-switcher.html`](#theme-switcherhtml) | Selects and refreshes system, light, dark, or custom theme mode. | `setMode()`<br>`refresh()` | No component-specific event | Preference/native appearance behavior mixed; no component-ready contract |
63
- | [`unified-inbox.html`](#unified-inboxhtml) | Displays provider-neutral communication threads with active/loading state. | `configure()`<br>`setThreads()`<br>`setActive()`<br>`setLoading()` | `unified-inbox-ready`<br>`inbox-refresh`<br>`thread-select` | DOM-normalized |
64
- | [`voice-transcription.html`](#voice-transcriptionhtml) | Records segmented microphone audio, transcribes, persists, and completes a combined transcript. | `configure()`<br>`startRecording()`<br>`stopRecording()`<br>`save()`<br>`completeTranscription()/complete()`<br>`clear()`<br>`reset()`<br>`destroy()` | `voice-transcription-ready`<br>`voice-transcription-state`<br>`voice-transcription-segment`<br>`voice-transcription-change`<br>`voice-transcription-complete`<br>`speech-transcription-complete` | State/text normalized; media/provider behavior mixed |
65
- | [`weather-widget.html`](#weather-widgethtml) | Displays normalized current and daily weather with refresh intent. | `setWeather()`<br>`clear()` | `weather-widget-ready`<br>`weather-refresh` | Display normalized; provider supplied externally |
66
- | [`web-navigator.html`](#web-navigatorhtml) | Guards embedded/external navigation and surfaces allow/block/open intents. | `configure()`<br>`navigate()`<br>`currentUrl()` | `web-navigator-ready`<br>`web-navigate`<br>`web-navigation-blocked`<br>`web-open-external` | Navigation intent/decision normalized; browser navigation result platform-native |
96
+ | [`unified-inbox.html`](#unified-inboxhtml) | Displays provider-neutral communication threads with active/loading state. | `configure()`<br>`setThreads()`<br>`setActive()`<br>`setLoading()`<br>`destroy()` | `unified-inbox-ready`<br>`inbox-refresh`<br>`thread-select` | DOM-normalized |
97
+ | [`voice-transcription.html`](#voice-transcriptionhtml) | Records segmented microphone audio only after authoritative STT admission, exposes explicit selected-STT activation, transcribes with cancellation, persists, and completes a combined transcript. | `configure()`<br>`requestSTTActivation()`<br>`startRecording()`<br>`stopRecording()`<br>`save()`<br>`completeTranscription()/complete()`<br>`clear()`<br>`reset()`<br>`destroy()` | `voice-transcription-ready`<br>`voice-transcription-state`<br>`voice-transcription-segment`<br>`voice-transcription-change`<br>`voice-transcription-complete`<br>`speech-transcription-complete`<br>`speech-transcription-cancelled`<br>`speech-stt-activation-request`<br>`speech-stt-activation-error` | Sticky runtime STT readiness, explicit activation, request cancellation, and state/text are normalized; media/provider behavior remains external |
98
+ | [`weather-widget.html`](#weather-widgethtml) | Displays normalized current and daily weather with refresh intent. | `setWeather()`<br>`clear()`<br>`destroy()` | `weather-widget-ready`<br>`weather-refresh` | Display normalized; provider supplied externally |
99
+ | [`web-navigator.html`](#web-navigatorhtml) | Guards embedded/external navigation and surfaces allow/block/open intents. | `configure()`<br>`navigate()`<br>`currentUrl()`<br>`destroy()` | `web-navigator-ready`<br>`web-navigate`<br>`web-navigation-blocked`<br>`web-open-external` | Navigation intent/decision normalized; browser navigation result platform-native |
67
100
 
68
101
  ## app-bar.html
69
102
 
@@ -73,7 +106,7 @@ Responsive application navigation, route state, status, and trailing actions.
73
106
 
74
107
  ### Public surface
75
108
 
76
- Methods/properties: `setNavigation()`, `setActiveRoute()`, `setStatus()`, `refresh()`.
109
+ Methods/properties: `setNavigation()`, `setActiveRoute()`, `setStatus()`, `refresh()`, `destroy()`.
77
110
 
78
111
  Events: `app-bar-ready`.
79
112
 
@@ -100,9 +133,10 @@ Reusable assistant drawer, message area, composer, pending/streaming/empty/error
100
133
 
101
134
  ### Public surface
102
135
 
103
- Methods/properties: `open()`, `close()`, `toggle()`, `send()`, `clear()`, `setState()`, `focusComposer()`, `scrollToEnd()`.
136
+ Methods/properties: `open()`, `close()`, `toggle()`, `send()`, `clear()`, `setState()`, `focusComposer()`, `scrollToEnd()`, `destroy()`.
104
137
 
105
- Events: `assistant-ready`, `assistant-send`, `assistant-clear`.
138
+ Events: `assistant-ready`, `assistant-opened`, `assistant-closed`,
139
+ `assistant-send`, `assistant-clear`.
106
140
 
107
141
  Slots: `title`, `subtitle`, `identity`, `messages/message`, `composer`, `actions`, `pending`, `streaming`, `empty`, `error`, `footer`.
108
142
 
@@ -127,7 +161,7 @@ Calculator keypad and result/error event surface backed by CalculatorEngine.
127
161
 
128
162
  ### Public surface
129
163
 
130
- Methods/properties: `calculate()`.
164
+ Methods/properties: `calculate()`, `destroy()`.
131
165
 
132
166
  Events: `calculator-ready`, `calculation-complete`, `calculation-error`.
133
167
 
@@ -192,6 +226,17 @@ extension callbacks. The component installs warning-only defaults when the host
192
226
  does not supply them; applications may instead consume the corresponding
193
227
  `chat-send-message` and `chat-language-changed` events.
194
228
 
229
+ `submitMessage(textOverride='',context={})` returns `Promise<boolean>`.
230
+ `context` accepts `source`, `preserveDraft`, `synthetic`, an optional exact
231
+ `operationId`, and an optional caller-owned `AbortSignal`. The component owns a
232
+ derived signal for each submission, supplies it in the frozen compatibility
233
+ `{message,context}` detail, and aborts it on canonical/DOM cancellation,
234
+ component destruction, or caller cancellation. `chat-send-message` is
235
+ cancelable and is the gate before `sendMessage(text,context)`; a canceled event
236
+ never reaches the host callback. Rejected host promises are observed as
237
+ `chat-send-error`, and stale settlement after abort or destruction is
238
+ suppressed.
239
+
195
240
  `setAIAvailability()` remains an LLM compatibility input, but selected sticky
196
241
  `AIRuntimeState` LLM state wins over that boolean. STT and TTS readiness always
197
242
  comes from sticky runtime role state; the method never forwards compatibility
@@ -218,10 +263,38 @@ speech controller's `destroy()`, sets `ready` to `false`, and returns
218
263
  `undefined`. It does not initiate a provider load or unload.
219
264
 
220
265
  Events: `chat-ready`, `chat-send-message`, `chat-send-error`,
221
- `chat-file-uploaded`, `chat-language-changed`,
222
- `chat-ai-activation-request`, `chat-ai-activation-error`, and
266
+ `chat-file-uploaded`, `chat-file-upload-error`, `chat-language-changed`,
267
+ `chat-language-change-error`, `chat-ai-activation-request`,
268
+ `chat-ai-activation-error`, `chat-speech-synthesis-error`, and
223
269
  `conversation-timebox-error`.
224
270
 
271
+ All chat operation ids have the form
272
+ `<component-instance-id>:<kind>:<sequence>`. The stable public reasons are
273
+ `chat-ready`, `message-submission-requested`,
274
+ `message-submission-cancelled`, `caller-signal-aborted`,
275
+ `component-destroyed`, `host-message-submission-rejected`,
276
+ `file-storage-completed`, `file-storage-rejected`,
277
+ `language-change-requested`, `language-change-callback-rejected`,
278
+ `language-model-activation-requested`,
279
+ `language-model-activation-rejected`, `speech-synthesis-rejected`, and
280
+ `conversation-timebox-delivery-rejected`.
281
+
282
+ The stable chat boundary codes are:
283
+
284
+ - `ARCANE_CHAT_MESSAGE_SUBMISSION_ABORTED` for the owned submission signal;
285
+ - `ARCANE_CHAT_LANGUAGE_MODEL_ACTIVATION_REQUEST_REJECTED`;
286
+ - `ARCANE_CHAT_HOST_MESSAGE_SUBMISSION_REJECTED`;
287
+ - `ARCANE_CHAT_FILE_STORAGE_REJECTED`;
288
+ - `ARCANE_CHAT_LANGUAGE_CHANGE_CALLBACK_REJECTED`;
289
+ - `ARCANE_CHAT_SPEECH_SYNTHESIS_REQUEST_REJECTED`;
290
+ - `ARCANE_CHAT_CONVERSATION_TIMEBOX_DELIVERY_REJECTED`.
291
+
292
+ Error projections expose the boundary `code` and include `causeCode` only when
293
+ the rejected dependency supplies a distinct code. File projections expose only
294
+ size/type metadata canonically while retaining the live `File` locally.
295
+ Language and LLM activation request projections are cancelable gates before
296
+ their host callbacks. Every public detail is frozen by the canonical authority.
297
+
225
298
  Shared dependencies: [`MD.js`](runtime-modules.md#mdjs), [`File.js`](runtime-entities.md#filejs), [`ConversationTimebox.js`](runtime-modules.md#conversationtimeboxjs), [`AIRuntimeState.js`](runtime-modules.md#airuntimestatejs).
226
299
 
227
300
  ### Availability and normalization
@@ -252,7 +325,7 @@ Provider-neutral conversation display, advisory actions, composer, busy state, a
252
325
 
253
326
  ### Public surface
254
327
 
255
- Methods/properties: `setConversation()`, `setBusy()`, `setStatus()`, `clearComposer()`.
328
+ Methods/properties: `setConversation()`, `setBusy()`, `setStatus()`, `clearComposer()`, `destroy()`.
256
329
 
257
330
  Events: `conversation-view-ready`, `communication-send`, `communication-advisory-action`.
258
331
 
@@ -277,7 +350,7 @@ Selects which normalized chart definitions are visible on a dashboard.
277
350
 
278
351
  ### Public surface
279
352
 
280
- Methods/properties: `configure()`, `setDefinitions()`, `setVisibility()`, `getChartOptions()`, `getEffectiveVisibility()`, `open()`, `close()`.
353
+ Methods/properties: `configure()`, `setDefinitions()`, `setVisibility()`, `getChartOptions()`, `getEffectiveVisibility()`, `open()`, `close()`, `destroy()`.
281
354
 
282
355
  Events: `dashboard-config-ready`, `dashboard-config-opened`, `dashboard-config-closed`, `dashboard-config-change`.
283
356
 
@@ -304,7 +377,7 @@ Runs destructive cleanup of empty chats and memories inside the current app data
304
377
 
305
378
  ### Public surface
306
379
 
307
- Methods/properties: `open()`.
380
+ Methods/properties: `open()`, `destroy()`.
308
381
 
309
382
  Events: `data-maintenance-ready`, `data-maintenance-complete`.
310
383
 
@@ -331,7 +404,7 @@ Opens a generic modal-style data view around an injected provider.
331
404
 
332
405
  ### Public surface
333
406
 
334
- Methods/properties: `beforeOpen()`, `open()`.
407
+ Methods/properties: `beforeOpen()`, `open()`, `destroy()`.
335
408
 
336
409
  Events: `data-view-ready`.
337
410
 
@@ -358,7 +431,7 @@ Presents the provider-owned OS directory chooser with change/cancel/error states
358
431
 
359
432
  ### Public surface
360
433
 
361
- Methods/properties: `configure()`, `focus()`, `select()`.
434
+ Methods/properties: `configure()`, `focus()`, `select()`, `destroy()`.
362
435
 
363
436
  Events: `directory-picker-ready`, `directory-picker-change`, `directory-picker-cancel`, `directory-picker-error`.
364
437
 
@@ -385,7 +458,7 @@ Inspects PDF, text, or source documents and records review state.
385
458
 
386
459
  ### Public surface
387
460
 
388
- Methods/properties: `loadDocument()`, `selectView()`, `markSaved()`.
461
+ Methods/properties: `loadDocument()`, `selectView()`, `markSaved()`, `destroy()`.
389
462
 
390
463
  Events: `document-inspector-ready`, `document-review-change`.
391
464
 
@@ -412,7 +485,7 @@ Acquires files by drag/drop or picker and presents busy, progress, error, and cl
412
485
 
413
486
  ### Public surface
414
487
 
415
- Methods/properties: `configure()`, `openPicker()`, `clear()`, `setBusy()`, `setError()`, `setProgress()`.
488
+ Methods/properties: `configure()`, `openPicker()`, `clear()`, `setBusy()`, `setError()`, `setProgress()`, `destroy()`.
416
489
 
417
490
  Events: `file-drop-ready`, `file-drop-selected`, `file-drop-progress`, `file-drop-state`, `file-drop-error`.
418
491
 
@@ -437,7 +510,7 @@ Displays file metadata, preview, busy/error state, and caller-defined actions.
437
510
 
438
511
  ### Public surface
439
512
 
440
- Methods/properties: `configure()`, `show()`, `clear()`, `setActions()`, `setBusy()`, `setError()`, `setPreview()`.
513
+ Methods/properties: `configure()`, `show()`, `clear()`, `setActions()`, `setBusy()`, `setError()`, `setPreview()`, `destroy()`.
441
514
 
442
515
  Events: `file-inspector-ready`, `file-inspector-action`, `file-inspector-change`, `file-inspector-cleared`, `file-inspector-error`.
443
516
 
@@ -464,7 +537,7 @@ Browses, filters, selects, opens, and acts on app-scoped files.
464
537
 
465
538
  ### Public surface
466
539
 
467
- Methods/properties: `setProvider()`, `loadAll()`, `setFilter()`, `select()`, `clearSelection()`.
540
+ Methods/properties: `setProvider()`, `loadAll()`, `setFilter()`, `select()`, `clearSelection()`, `destroy()`.
468
541
 
469
542
  Events: `file-manager-ready`, `file-manager-select`, `file-manager-open`, `file-manager-action`.
470
543
 
@@ -516,7 +589,7 @@ Edits non-secret communication service configuration and service actions.
516
589
 
517
590
  ### Public surface
518
591
 
519
- Methods/properties: `configure()`, `getValues()`, `setStatus()`.
592
+ Methods/properties: `configure()`, `getValues()`, `setStatus()`, `destroy()`.
520
593
 
521
594
  Events: `integration-settings-ready`, `integration-settings-save`, `integration-settings-close`, `integration-action`.
522
595
 
@@ -541,7 +614,7 @@ Presents local-AI standby, failure, recovery, guidance, retry, and dismissal sta
541
614
 
542
615
  ### Public surface
543
616
 
544
- Methods/properties: `configure()`, `begin()`, `present(); hidden property`.
617
+ Methods/properties: `configure()`, `begin()`, `present()`, `destroy()`, and the `hidden` property.
545
618
 
546
619
  Events: `local-ai-status-ready`, `local-ai-status-dismissed`, `local-ai-retry`.
547
620
 
@@ -568,9 +641,12 @@ Safely renders and navigates a Markdown document with focusable fragments.
568
641
 
569
642
  ### Public surface
570
643
 
571
- Methods/properties: `configure()`, `load()`, `render()`, `clear()`, `fail()`, `focus()`, `focusFragment()`.
644
+ Methods/properties: `configure()`, `load()`, `render()`, `clear()`, `fail()`, `focus()`, `focusFragment()`, `destroy()`.
572
645
 
573
- Events: `markdown-document-ready`, `markdown-document-state`, `markdown-document-navigate`.
646
+ Events: `markdown-document-ready`, `markdown-document-state`,
647
+ `markdown-document-loading`, `markdown-document-rendered`,
648
+ `markdown-document-empty`, `markdown-document-error`, and
649
+ `markdown-document-navigate`.
574
650
 
575
651
  Shared dependencies: [`MD.js`](runtime-modules.md#mdjs).
576
652
 
@@ -595,7 +671,7 @@ Configurable Markdown authoring, toolbar, preview, title, and save surface.
595
671
 
596
672
  ### Public surface
597
673
 
598
- Methods/properties: `configure()`, `focus()`, `clear()`, `saveEntry()`.
674
+ Methods/properties: `configure()`, `focus()`, `clear()`, `saveEntry()`, `destroy()`.
599
675
 
600
676
  Events: `markdown-editor-ready`, `markdown-editor-change`, `markdown-editor-saved`.
601
677
 
@@ -622,7 +698,7 @@ Loads a validated YouTube video or playlist embed and exposes external-platform
622
698
 
623
699
  ### Public surface
624
700
 
625
- Methods/properties: `configure()`, `load()`.
701
+ Methods/properties: `configure()`, `load()`, `destroy()`.
626
702
 
627
703
  Events: `media-embed-ready`, `media-load`, `media-error`, `media-open-platform`.
628
704
 
@@ -649,7 +725,7 @@ Generic modal with population, open/close, actions, and sequential task executio
649
725
 
650
726
  ### Public surface
651
727
 
652
- Methods/properties: `populate()`, `open()`, `close()`, `runTasks()`.
728
+ Methods/properties: `populate()`, `open()`, `close()`, `runTasks()`, `destroy()`.
653
729
 
654
730
  Events: `modal-ready`, `modal-opened`, `modal-closed`, `modal-action`.
655
731
 
@@ -676,7 +752,7 @@ Presents status, output, body, coverage, actions, pending, error, and cleared st
676
752
 
677
753
  ### Public surface
678
754
 
679
- Methods/properties: `configure()`, `setOutput()`, `setBody()`, `setCoverage()`, `setActions()`, `setPending()`, `setStatus()`, `setError()`, `clear()`.
755
+ Methods/properties: `configure()`, `setOutput()`, `setBody()`, `setCoverage()`, `setActions()`, `setPending()`, `setStatus()`, `setError()`, `clear()`, `destroy()`.
680
756
 
681
757
  Events: `output-panel-ready`, `output-panel-state`, `output-panel-change`, `output-panel-action`, `output-panel-error`, `output-panel-cleared`.
682
758
 
@@ -703,7 +779,7 @@ Builds a schema-driven preferences form with submit, reset, busy, and status beh
703
779
 
704
780
  ### Public surface
705
781
 
706
- Methods/properties: `configure()`, `getValues()`, `setValues()`, `setBusy()`, `setStatus()`.
782
+ Methods/properties: `configure()`, `getValues()`, `setValues()`, `setBusy()`, `setStatus()`, `destroy()`.
707
783
 
708
784
  Events: `preferences-form-ready`, `preferences-change`, `preferences-submit`, `preferences-reset`.
709
785
 
@@ -728,7 +804,7 @@ Displays chronological records/evidence and emits open actions.
728
804
 
729
805
  ### Public surface
730
806
 
731
- Methods/properties: `setItems()`, `populate()`.
807
+ Methods/properties: `setItems()`, `populate()`, `destroy()`.
732
808
 
733
809
  Events: `record-timeline-ready`, `record-timeline-open`.
734
810
 
@@ -753,7 +829,7 @@ Displays normalized relationship nodes/edges in graph and list forms.
753
829
 
754
830
  ### Public surface
755
831
 
756
- Methods/properties: `setGraph()`, `populate()`.
832
+ Methods/properties: `setGraph()`, `populate()`, `destroy()`.
757
833
 
758
834
  Events: `relationship-board-ready`, `relationship-node-open`, `relationship-edge-open`.
759
835
 
@@ -778,10 +854,16 @@ Presents image, video, or GIF display-capture workflow.
778
854
 
779
855
  ### Public surface
780
856
 
781
- Methods/properties: `capture()`.
857
+ Methods/properties: `capture` (the component-owned `ScreenCapture` instance) and `destroy()`.
782
858
 
783
859
  Events: `screen-capture-ready`, `screen-capture-result`.
784
860
 
861
+ Ready uses operation id `screen-capture-ready-<component-instance-id>`;
862
+ capture results use the current instance-owned generation. `destroy()`
863
+ invalidates that generation, aborts UI listeners, revokes the preview URL,
864
+ destroys the `ScreenCapture` instance, disposes the source, marks the host
865
+ unready, and returns `true`; repeated calls return `false`.
866
+
785
867
  Shared dependencies: [`ScreenCapture.js`](runtime-modules.md#screencapturejs).
786
868
 
787
869
  ### Availability and normalization
@@ -805,9 +887,11 @@ Renders line-addressable source code with load, error, focus, and state behavior
805
887
 
806
888
  ### Public surface
807
889
 
808
- Methods/properties: `configure()`, `load()`, `render()`, `clear()`, `fail()`, `focus()`, `focusLine()`.
890
+ Methods/properties: `configure()`, `load()`, `render()`, `clear()`, `fail()`, `focus()`, `focusLine()`, `destroy()`.
809
891
 
810
- Events: `source-code-viewer-ready`, `source-code-viewer-state`.
892
+ Events: `source-code-viewer-ready`, `source-code-viewer-state`,
893
+ `source-code-viewer-state-loading`, `source-code-viewer-state-ready`,
894
+ `source-code-viewer-state-empty`, and `source-code-viewer-state-error`.
811
895
 
812
896
  ### Availability and normalization
813
897
 
@@ -830,7 +914,7 @@ Presents an evidence finding, source selection, explanation, and save state.
830
914
 
831
915
  ### Public surface
832
916
 
833
- Methods/properties: `showFinding()`, `populate()`, `selectSource()`, `markSaved()`.
917
+ Methods/properties: `showFinding()`, `populate()`, `selectSource()`, `markSaved()`, `destroy()`.
834
918
 
835
919
  Events: `source-explanation-ready`, `source-explanation-save`, `source-explanation-source-selected`.
836
920
 
@@ -857,16 +941,18 @@ completion, mute state, and microphone availability.
857
941
  ### Public surface
858
942
 
859
943
  Methods/properties: `configure()`, `setAvailability()`, `setMuted()`,
860
- `requestSTTActivation()`, `destroy()`, `availability`, `muted`, `initialMuted`,
861
- and `componentReady`.
944
+ `reportTTSError(error,boundary='synthesis')`, `requestSTTActivation()`,
945
+ `destroy()`, `availability`, `muted`, `initialMuted`, and `componentReady`.
862
946
 
863
947
  Events: `speech-ready`, `speech-transcription-complete`,
864
948
  `speech-transcription-error`, `speech-transcription-cancelled`,
865
949
  `speech-microphone-unavailable`, `speech-stt-activation-request`,
866
- `speech-stt-activation-error`, and `speech-tts-lifecycle-error`.
950
+ `speech-stt-activation-error`, `speech-tts-lifecycle-error`, and
951
+ `speech-synthesis-error`.
867
952
 
868
953
  Shared dependencies: [`AI.js`](runtime-modules.md#aijs),
869
- [`AIRuntimeState.js`](runtime-modules.md#airuntimestatejs), and
954
+ [`AIRuntimeState.js`](runtime-modules.md#airuntimestatejs),
955
+ [`ComponentContracts.js`](runtime-modules.md#componentcontractsjs), and
870
956
  [`DBLS.js`](runtime-modules.md#dblsjs).
871
957
 
872
958
  The Hold to talk control remains disabled unless sticky STT state is `ready`,
@@ -911,6 +997,29 @@ Mute calls `AI.setSpeechMuted(true)`, stops playback, cancels active TTS work,
911
997
  and unloads the selected TTS role. Lifecycle failures remain visible through
912
998
  `speech-tts-lifecycle-error` and sticky role state.
913
999
 
1000
+ Speech operation ids are
1001
+ `<component-instance-id>:<kind>:<sequence>`. Canonical cancellation reasons are
1002
+ `stt-role-unready`, `stt-provider-transcription-cancelled`, `stt-role-busy`,
1003
+ `microphone-unavailable`, `component-destroyed`, and
1004
+ `stt-transcription-cancelled`. Microphone capture-failure reasons are
1005
+ `microphone-input-missing`, `microphone-input-unavailable`,
1006
+ `microphone-capture-denied`, and `microphone-capture-rejected`. Component
1007
+ boundary codes are `ARCANE_SPEECH_MICROPHONE_CAPTURE_REJECTED`,
1008
+ `ARCANE_SPEECH_STT_TRANSCRIPTION_REQUEST_REJECTED`,
1009
+ `ARCANE_SPEECH_TTS_LOAD_REJECTED`, `ARCANE_SPEECH_TTS_UNLOAD_REJECTED`,
1010
+ `ARCANE_SPEECH_TTS_SYNTHESIS_REQUEST_REJECTED`, and
1011
+ `ARCANE_SPEECH_TTS_PLAYBACK_RESUME_REJECTED`. Each of those component-boundary
1012
+ public projections keeps the exact boundary in `code` and preserves a distinct
1013
+ string code from the browser, runtime, or provider additively as `causeCode`.
1014
+ A missing STT method therefore uses boundary
1015
+ `ARCANE_SPEECH_STT_TRANSCRIPTION_REQUEST_REJECTED` with
1016
+ `causeCode:'ARCANE_SPEECH_STT_RUNTIME_METHOD_UNAVAILABLE'`.
1017
+
1018
+ Stable rejection reasons are `stt-transcription-rejected`,
1019
+ `tts-load-rejected`, `tts-unload-rejected`, `tts-synthesis-rejected`, and
1020
+ `tts-playback-resume-rejected`. Shared activation rejection uses
1021
+ `ARCANE_STT_ACTIVATION_REQUEST_REJECTED` and `activation-request-rejected`.
1022
+
914
1023
  ### Availability and normalization
915
1024
 
916
1025
  **Browser and supported native WebViews.** UI/runtime state and explicit user
@@ -936,7 +1045,7 @@ Displays compact selectable KPI or summary items.
936
1045
 
937
1046
  ### Public surface
938
1047
 
939
- Methods/properties: `configure()`, `setItems()`, `updateItem()`, `clear()`.
1048
+ Methods/properties: `configure()`, `setItems()`, `updateItem()`, `clear()`, `destroy()`.
940
1049
 
941
1050
  Events: `summary-strip-ready`, `summary-strip-change`, `summary-strip-select`.
942
1051
 
@@ -961,7 +1070,7 @@ Builds and updates a simple header/body table.
961
1070
 
962
1071
  ### Public surface
963
1072
 
964
- Methods/properties: `buildHeader()`, `buildTable()`.
1073
+ Methods/properties: `buildHeader()`, `buildTable()`, `destroy()`.
965
1074
 
966
1075
  Events: `table-ready`, `header-update`, `body-update`.
967
1076
 
@@ -986,7 +1095,7 @@ Runs and displays a task list with started/change/complete/error state.
986
1095
 
987
1096
  ### Public surface
988
1097
 
989
- Methods/properties: `configure()`, `setTasks()`, `updateTask()`, `runTasks()`, `clear()`.
1098
+ Methods/properties: `configure()`, `setTasks()`, `updateTask()`, `runTasks()`, `clear()`, `destroy()`.
990
1099
 
991
1100
  Events: `task-progress-ready`, `task-progress-started`, `task-progress-change`, `task-progress-complete`, `task-progress-error`.
992
1101
 
@@ -1011,7 +1120,7 @@ Presents multiple terminal sessions, output, active selection, theme, and termin
1011
1120
 
1012
1121
  ### Public surface
1013
1122
 
1014
- Methods/properties: `configure()`, `addSession()`, `removeSession()`, `activateSession()`, `append()`, `clear()`, `setState()`, `setTheme()`, `focus()`.
1123
+ Methods/properties: `configure()`, `addSession()`, `removeSession()`, `activateSession()`, `append()`, `clear()`, `setState()`, `setTheme()`, `focus()`, `destroy()`.
1015
1124
 
1016
1125
  Events: `terminal-workspace-ready`, `terminal-submit`, `terminal-interrupt`, `terminal-clear`, `terminal-session-new`, `terminal-session-close`, `terminal-session-select`, `terminal-settings`.
1017
1126
 
@@ -1038,7 +1147,7 @@ Edits, previews, saves, and resets semantic custom theme tokens.
1038
1147
 
1039
1148
  ### Public surface
1040
1149
 
1041
- Methods/properties: `configure()`, `getTheme()`, `setTheme()`, `setBusy()`, `setStatus()`.
1150
+ Methods/properties: `configure()`, `getTheme()`, `setTheme()`, `setBusy()`, `setStatus()`, `destroy()`.
1042
1151
 
1043
1152
  Events: `theme-editor-ready`, `theme-preview`, `theme-save`, `theme-reset`.
1044
1153
 
@@ -1092,7 +1201,7 @@ Displays provider-neutral communication threads with active/loading state.
1092
1201
 
1093
1202
  ### Public surface
1094
1203
 
1095
- Methods/properties: `configure()`, `setThreads()`, `setActive()`, `setLoading()`.
1204
+ Methods/properties: `configure()`, `setThreads()`, `setActive()`, `setLoading()`, `destroy()`.
1096
1205
 
1097
1206
  Events: `unified-inbox-ready`, `inbox-refresh`, `thread-select`.
1098
1207
 
@@ -1113,19 +1222,85 @@ Events: `unified-inbox-ready`, `inbox-refresh`, `thread-select`.
1113
1222
 
1114
1223
  ### Overview
1115
1224
 
1116
- Records segmented microphone audio, transcribes, persists, and completes a combined transcript.
1225
+ Records segmented microphone audio only after authoritative STT admission,
1226
+ exposes explicit selected-STT activation, transcribes with cancellation,
1227
+ persists, and completes a combined transcript.
1117
1228
 
1118
1229
  ### Public surface
1119
1230
 
1120
- Methods/properties: `configure()`, `startRecording()`, `stopRecording()`, `save()`, `completeTranscription()/complete()`, `clear()`, `reset()`, `destroy()`.
1231
+ Methods/properties: `configure()`, `requestSTTActivation()`, `startRecording()`,
1232
+ `stopRecording()`, `save()`, `completeTranscription()/complete()`, `clear()`,
1233
+ `reset()`, `destroy()`.
1121
1234
 
1122
- Events: `voice-transcription-ready`, `voice-transcription-state`, `voice-transcription-segment`, `voice-transcription-change`, `voice-transcription-complete`, `speech-transcription-complete`.
1235
+ Events: `voice-transcription-ready`, `voice-transcription-state`,
1236
+ `voice-transcription-segment`, `voice-transcription-change`,
1237
+ `voice-transcription-complete`, `speech-transcription-complete`,
1238
+ `speech-transcription-cancelled`, `speech-stt-activation-request`, and
1239
+ `speech-stt-activation-error`.
1123
1240
 
1124
- Shared dependencies: [`MD.js`](runtime-modules.md#mdjs), [`ComponentContracts.js`](runtime-modules.md#componentcontractsjs), [`AI.js`](runtime-modules.md#aijs).
1241
+ Shared dependencies: [`MD.js`](runtime-modules.md#mdjs),
1242
+ [`ComponentContracts.js`](runtime-modules.md#componentcontractsjs),
1243
+ [`AIRuntimeState.js`](runtime-modules.md#airuntimestatejs), and
1244
+ [`AI.js`](runtime-modules.md#aijs).
1125
1245
 
1126
1246
  ### Availability and normalization
1127
1247
 
1128
- **Browser and supported native WebViews.** State/text normalized; media/provider behavior mixed. HTMLImport + DOM; injected Arcane/provider modules where listed. Native methods remain subject to the bound app's capabilities. [Deep protocol details](protocols.md).
1248
+ **Browser and supported native WebViews.** The component subscribes
1249
+ synchronously to sticky `AIRuntimeState.roles.stt`; its recording Start button
1250
+ and public `startRecording()` both fail closed unless that role is exactly
1251
+ `ready` and not busy. A configured `transcribe(file,context)` callback remains
1252
+ request plumbing rather than readiness authority. Its context now includes the
1253
+ owned `signal` additively. The default route calls
1254
+ `AI.fetchSTT(file,undefined,signal)` so the callback position remains valid and
1255
+ readiness loss or destruction can abort delivery.
1256
+
1257
+ For a selected `unloaded`, `loading`, `unloading`, or `error` role, the component
1258
+ keeps recording Start disabled and presents the same keyboard-operable Start
1259
+ transcription/Try again or Cancel loading control as `speech.html`. Both use the
1260
+ shared `createSTTActivationController()` contract. User operation emits the
1261
+ cancelable `speech-stt-activation-request` event with frozen `{intent,state}`;
1262
+ `preventDefault()` suppresses the callback. The default
1263
+ `requestSTTActivation(intent)` publishes the frozen
1264
+ `{role:'stt',action:'load'|'unload',reason:'user'}` intent. Callback failure emits
1265
+ `speech-stt-activation-error` with frozen `{request,error,message}`. Import and
1266
+ state observation emit no activation request and never begin a model download.
1267
+
1268
+ If sticky readiness is lost during microphone acquisition, capture, or the STT
1269
+ request, the component invalidates the session, aborts the owned request signal,
1270
+ releases media, discards late completion, and emits
1271
+ `speech-transcription-cancelled`. Its local compatibility reason is
1272
+ `runtime-unready`, while its canonical/public reason is `stt-role-unready`. A
1273
+ busy role uses `stt-role-busy` in both views. A current provider cancellation
1274
+ returns the component workflow to `idle` with local
1275
+ `stt-provider-request-cancelled` and canonical/public
1276
+ `stt-provider-transcription-cancelled`; destruction uses
1277
+ `component-destroyed` in both views. Replacing configuration without an
1278
+ `initialValue` during active work uses `configuration-replaced` in both views.
1279
+ Stale teardown results remain suppressed. A
1280
+ current save failure, including `AbortError`, enters the visible `error` state.
1281
+ Readiness loss after transcription has finished does not invalidate an already
1282
+ pending application save or completion callback: its settlement remains
1283
+ observable, while any new recording remains gated by current sticky readiness.
1284
+ Assigning `value` or calling `configure({initialValue})` explicitly supersedes
1285
+ an in-flight microphone start, STT request, save, or completion. The component
1286
+ advances its generation, aborts owned STT delivery, releases owned media, emits
1287
+ `speech-transcription-cancelled` with
1288
+ `reason:'transcript-replaced'`, and suppresses
1289
+ late settlement before publishing the assigned transcript. Assigning transcript
1290
+ text during active recording preserves that recording and changes the transcript
1291
+ to which the captured segment will be appended.
1292
+ `destroy()` aborts the state subscription, cancels active work, removes the
1293
+ activation listener, sets component `ready` to `false`, and returns `true`;
1294
+ repeated destruction is
1295
+ idempotent. Destruction is terminal: Start, activation, and Complete remain
1296
+ disabled and status remains unavailable. `voice-transcription-state` detail is
1297
+ the frozen `{message,state,stt}` record, where `state` remains the component
1298
+ workflow and `stt` is the authoritative immutable role record. Transcript
1299
+ completion stays available when STT is unavailable before destruction.
1300
+ State/text, explicit activation, and request cancellation are normalized;
1301
+ provider/model authority and media behavior remain external. HTMLImport + DOM;
1302
+ injected Arcane/provider modules where listed.
1303
+ Native methods remain subject to the bound app's capabilities. [Deep protocol details](protocols.md).
1129
1304
 
1130
1305
  ### Example
1131
1306
 
@@ -1144,7 +1319,7 @@ Displays normalized current and daily weather with refresh intent.
1144
1319
 
1145
1320
  ### Public surface
1146
1321
 
1147
- Methods/properties: `setWeather()`, `clear()`.
1322
+ Methods/properties: `setWeather()`, `clear()`, `destroy()`.
1148
1323
 
1149
1324
  Events: `weather-widget-ready`, `weather-refresh`.
1150
1325
 
@@ -1169,7 +1344,7 @@ Guards embedded/external navigation and surfaces allow/block/open intents.
1169
1344
 
1170
1345
  ### Public surface
1171
1346
 
1172
- Methods/properties: `configure()`, `navigate()`, `currentUrl()`.
1347
+ Methods/properties: `configure()`, `navigate()`, `currentUrl()`, `destroy()`.
1173
1348
 
1174
1349
  Events: `web-navigator-ready`, `web-navigate`, `web-navigation-blocked`, `web-open-external`.
1175
1350