arcane-os 0.35.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.36.0
4
+
5
+ - Add optional continuous microphone capture to `voice-transcription` through
6
+ `configure({capture:{mode:'continuous'}})`. The AudioWorklet retains rolling
7
+ pre-roll and emits complete mono Float32 WAV segments at amplitude-based
8
+ pauses, periodic boundaries, and final stop. Manual capture remains the default.
9
+ - Keep microphone capture independent of the ordered transcription/save queue.
10
+ Failed transcription retains its clip; a failed save retains its text and
11
+ retries only that save. Stop releases the microphone, flushes the final clip,
12
+ and drains accepted work. Explicit cancellation aborts callbacks and discards
13
+ outstanding clips. Optional simple Start/Stop controls preserve the default
14
+ Complete action and application-owned persistence.
15
+ - Add async `file-manager.previewDescriptor(originalFile, context)` for complete
16
+ text, Markdown, HTML, JSON, conversation, nested collection, media and download
17
+ views. Media loaders run only on explicit selection; closing or replacing a
18
+ preview aborts pending work and releases owned media resources. Existing
19
+ `previewTransform` remains supported.
20
+ - Add `directoryFilter` before DBOPFS key and metadata reads, with `data-view`
21
+ forwarding the preview/filter hooks before loading. Preserve complete native
22
+ JSONL text, MIME-based HTML/Markdown handling and original binary downloads.
23
+ Application schemas, record mapping, persistence and presentation choices remain
24
+ application-owned; no saved-data migration or provider/model default changes.
25
+
3
26
  ## 0.35.0
4
27
 
5
28
  - Add `DBOPFS.createCompressedPNG({tableNames, additionalTables, signal})` to
package/README.md CHANGED
@@ -19,7 +19,7 @@ version-locked SDK runtime, while an integrated Arcane checkout uses its live
19
19
  `arcane/` runtime. Both profiles share the theme, packaging, event, cancellation,
20
20
  and browser run contracts while retaining their selected application layout.
21
21
 
22
- This checkout defines the `0.35.0` SDK contract. Applications pin one exact npm
22
+ This checkout defines the `0.36.0` SDK contract. Applications pin one exact npm
23
23
  version and lockfile; registry state is deliberately not baked into application
24
24
  artifacts.
25
25
 
@@ -272,7 +272,7 @@
272
272
  {
273
273
  "file": "runtime/arcane/components/data-view.html",
274
274
  "name": "data-view.html",
275
- "purpose": "Opens a generic modal-style data view around an injected provider.",
275
+ "purpose": "Opens a modal file view and forwards application-owned preview and directory-filter callbacks to the shared file manager.",
276
276
  "methods": [
277
277
  "beforeOpen()",
278
278
  "open()",
@@ -287,7 +287,7 @@
287
287
  ],
288
288
  "availability": "Browser and supported native WebViews",
289
289
  "transport": "HTMLImport + DOM; injected Arcane/provider modules where listed",
290
- "normalization": "DOM-native result"
290
+ "normalization": "DOM-native result. Forwards previewDescriptor, previewTransform, directoryFilter, data-hidden-prefixes, and data-show-hidden before the child file manager first loads; reopening refreshes them before loadAll. beforeOpen runs before those values are consumed. The child owns neutral preview rendering, cancellation, and media cleanup; destroy also destroys the child and modal."
291
291
  },
292
292
  {
293
293
  "file": "runtime/arcane/components/directory-picker.html",
@@ -396,11 +396,12 @@
396
396
  {
397
397
  "file": "runtime/arcane/components/file-manager.html",
398
398
  "name": "file-manager.html",
399
- "purpose": "Browses, filters, selects, opens, and acts on app-scoped files.",
399
+ "purpose": "Browses app-scoped files, filters directories before reads, and renders application-described complete document, conversation, collection, and media previews.",
400
400
  "methods": [
401
401
  "setProvider()",
402
402
  "loadAll()",
403
403
  "setFilter()",
404
+ "setDirectoryFilter()",
404
405
  "select()",
405
406
  "clearSelection()",
406
407
  "destroy()"
@@ -415,11 +416,12 @@
415
416
  "dependencies": [
416
417
  "DBOPFS.js",
417
418
  "File.js",
419
+ "MD.js",
418
420
  "WaitForComponent.js"
419
421
  ],
420
422
  "availability": "Browser and supported native WebViews",
421
423
  "transport": "HTMLImport + DOM; injected Arcane/provider modules where listed",
422
- "normalization": "Selection/filter state normalized; storage/provider behavior mixed"
424
+ "normalization": "Selection/filter state and neutral previews normalized; storage/provider behavior mixed. Initial directoryFilter and setDirectoryFilter(fn|null) use false-only exclusion before built-in DBOPFS key/metadata reads; data-hidden-prefixes also applies to directories unless data-show-hidden is present. Existing file predicates preserve their first argument and receive optional directory/fileName/path/layout context. previewDescriptor(original File,{directory,fileName,extension,path,mimeType,signal}) may asynchronously return text/markdown/html/json content, conversation messages with role/content/real timestamp and optional name/status, collection items, or image/audio/pdf/download content as Blob/File or a lazy ({signal}) loader. Downloads require fileName; descriptors accept title and images accept alt. Lazy items load only on explicit request and retain item-local retry. Close, replacement, and destroy abort the preview signal, suppress late output, remove iframe srcdoc, stop audio, and revoke all owned object URLs. HTML preserves the exact string in iframe srcdoc; HTML/Markdown MIME fallback supports extensionless files. Nullish descriptors preserve previewTransform for JSON-family files and native previews; untransformed JSONL/NDJSON retains complete raw text, and other binary files download the original File."
423
425
  },
424
426
  {
425
427
  "file": "runtime/arcane/components/header.html",
@@ -988,12 +990,14 @@
988
990
  {
989
991
  "file": "runtime/arcane/components/voice-transcription.html",
990
992
  "name": "voice-transcription.html",
991
- "purpose": "Records segmented microphone audio only after authoritative STT admission, exposes explicit selected-STT activation, transcribes with cancellation, persists, and completes a combined transcript.",
993
+ "purpose": "Records manual clips or optional continuous microphone audio with rolling pre-roll, pause/periodic segments, ordered transcription and saves, retained failures, retry, cancellation, and complete transcript delivery.",
992
994
  "methods": [
993
995
  "configure()",
994
996
  "requestSTTActivation()",
995
997
  "startRecording()",
996
998
  "stopRecording()",
999
+ "retryTranscription()",
1000
+ "cancelRecording()",
997
1001
  "save()",
998
1002
  "completeTranscription()/complete()",
999
1003
  "clear()",
@@ -1004,6 +1008,8 @@
1004
1008
  "voice-transcription-ready",
1005
1009
  "voice-transcription-state",
1006
1010
  "voice-transcription-segment",
1011
+ "voice-transcription-empty",
1012
+ "voice-transcription-error",
1007
1013
  "voice-transcription-change",
1008
1014
  "voice-transcription-complete",
1009
1015
  "speech-transcription-complete",
@@ -1016,11 +1022,12 @@
1016
1022
  "MD.js",
1017
1023
  "ComponentContracts.js",
1018
1024
  "AIRuntimeState.js",
1025
+ "ContinuousVoiceCapture.js",
1019
1026
  "AI.js"
1020
1027
  ],
1021
1028
  "availability": "Browser and supported native WebViews",
1022
1029
  "transport": "HTMLImport + DOM; injected Arcane/provider modules where listed",
1023
- "normalization": "Sticky runtime STT readiness, explicit activation, request cancellation, state/text, and BFCache-preserving page lifecycle are normalized; persisted pageshow rerenders retained state without restarting work, while nonpersisted pagehide destroys; media/provider behavior remains external"
1030
+ "normalization": "Sticky STT readiness and explicit activation; default manual capture; optional continuous amplitude-based capture with rolling pre-roll, ordered STT/save stages, retained failures, save-only retry, sequence-bearing segment events, and capture/processing/queued/errorPhase/error state. Complete text remains exact. Continuous stop flushes and drains; explicit cancel, transcript/configuration replacement, and destruction abort outstanding work and suppress late effects. Persisted pagehide stops and flushes continuous capture while retaining component state; persisted pageshow rerenders without restarting capture; nonpersisted pagehide destroys. Media/provider behavior remains external."
1024
1031
  },
1025
1032
  {
1026
1033
  "file": "runtime/arcane/components/weather-widget.html",
@@ -8,9 +8,9 @@
8
8
  "sdkVersion": "0.6.0",
9
9
  "protocol": "arcane/1"
10
10
  },
11
- "artifactCount": 86,
12
- "javascriptArtifactCount": 84,
13
- "esmExportCount": 355,
11
+ "artifactCount": 88,
12
+ "javascriptArtifactCount": 86,
13
+ "esmExportCount": 356,
14
14
  "artifacts": [
15
15
  {
16
16
  "file": "runtime/arcane/modules/AI.js",
@@ -417,7 +417,7 @@
417
417
  "availability": "Cross-host with an injected event constructor outside DOM hosts",
418
418
  "protocol": "In-process only",
419
419
  "normalization": "Fully normalized labels, rows, definitions, visibility, formats, editor and voice options, plus capability-neutral STT activation intent and presentation state. Complete finite progress measures remain visible, including fractional and over-total values.",
420
- "surface": "Constant sets plus normalization, complete finite-progress formatting, and explicit STT activation helpers."
420
+ "surface": "Constant sets plus normalization, complete finite-progress formatting, and explicit STT activation helpers. normalizeVoiceOptions preserves manual capture and standard controls by default and accepts continuous capture timing/activity options, simple controls, showComplete, and retry/cancel labels."
421
421
  },
422
422
  {
423
423
  "file": "runtime/arcane/modules/ConfiguredAIChatSession.js",
@@ -433,6 +433,19 @@
433
433
  "normalization": "Complete mutable session/result; declarations and emitted calls require nonempty user-facing arguments.message; ordered parallel calls and their exact IDs/names/arguments/extensions remain raw only through the active matching tool continuation, then settled recurrence becomes complete ordinary visible content; one atomic result batch must settle every pending ID; per-turn request options cannot replace session-owned messages or signal; persisted sequencing has stable coded failures; and provider rejection remains visible.",
434
434
  "surface": "default `ConfiguredAIChatSession`, named `normalizeStructuralToolCall`; constructor accepts complete initial messages and one unresolved ordered structural-call tail; history/clear/prepare/send; per-turn request overrides preserve session-owned messages/signal; every pending ID requires exactly one matching nonblank role=tool result in the same request batch; settled raw protocol does not recur."
435
435
  },
436
+ {
437
+ "file": "runtime/arcane/modules/ContinuousVoiceCapture.js",
438
+ "name": "ContinuousVoiceCapture.js",
439
+ "kind": "esm",
440
+ "exports": [
441
+ "default"
442
+ ],
443
+ "summary": "Owns continuous microphone capture with rolling pre-roll, activity-triggered pause/periodic segments, complete WAV delivery, final flush, and cancellation.",
444
+ "availability": "Browser / native WebView with getUserMedia, AudioContext, and AudioWorklet",
445
+ "protocol": "Native microphone and Web Audio lifecycle; internal VoiceCaptureWorklet MessagePort",
446
+ "normalization": "Complete mono Float32 WAV Blob segments with session-local sequence, pause/periodic/stop reason, and durationMs. Sound amplitude drives segmentation without semantic speech recognition. Inactive audio produces no segment, and periodic segments do not reuse samples. Stop releases microphone tracks immediately and waits for final flush; cancel releases capture and suppresses late callbacks.",
447
+ "surface": "default ContinuousVoiceCapture; constructor({preRollMs=1500,quietMs=2000,chunkMs=30000,activityThreshold=0.02,onSegment,onError,onState}); start({mediaConstraints={audio:true},signal}={}) resolves boolean; stop() resolves after final flush; cancel() and destroy() release the owned session."
448
+ },
436
449
  {
437
450
  "file": "runtime/arcane/modules/ConversationActionItems.js",
438
451
  "name": "ConversationActionItems.js",
@@ -1360,6 +1373,17 @@
1360
1373
  "normalization": "Presentation only.",
1361
1374
  "surface": "Load with a stylesheet link before rendering uPlot charts."
1362
1375
  },
1376
+ {
1377
+ "file": "runtime/arcane/modules/VoiceCaptureWorklet.js",
1378
+ "name": "VoiceCaptureWorklet.js",
1379
+ "kind": "worker",
1380
+ "exports": [],
1381
+ "summary": "Segments microphone samples on the audio rendering thread and transfers complete mono Float32 WAV clips to ContinuousVoiceCapture.",
1382
+ "availability": "AudioWorkletGlobalScope",
1383
+ "protocol": "AudioWorklet processor arcane-continuous-voice-capture and its owner-local MessagePort",
1384
+ "normalization": "Rolling pre-roll, amplitude activity, quiet and periodic boundaries, sequence, complete WAV audio, and stop acknowledgement are owned here. Silence does not emit clips; adjacent periodic clips have no repeated samples.",
1385
+ "surface": "No ESM exports. ContinuousVoiceCapture loads this static worklet, supplies processorOptions, receives segment messages, and requests stop followed by the stopped acknowledgement."
1386
+ },
1363
1387
  {
1364
1388
  "file": "runtime/arcane/modules/WaitForComponent.js",
1365
1389
  "name": "WaitForComponent.js",
@@ -67,12 +67,12 @@ appropriate.
67
67
  | [`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 |
68
68
  | [`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 |
69
69
  | [`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 |
70
- | [`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
+ | [`data-view.html`](#data-viewhtml) | Opens a modal file view and forwards application-owned preview and directory-filter callbacks. | `beforeOpen()`<br>`open()`<br>`destroy()` | `data-view-ready` | DOM-native result; preview/filter configuration reaches the child before loading |
71
71
  | [`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` | Complete plain-text paths and native selection/error |
72
72
  | [`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 |
73
73
  | [`file-drop.html`](#file-drophtml) | Acquires complete file selections 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` | Complete selections preserved; browser File/drop errors mixed |
74
74
  | [`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 |
75
- | [`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 |
75
+ | [`file-manager.html`](#file-managerhtml) | Browses app-scoped files, filters directories before reads, and renders application-described previews. | `setProvider()`<br>`loadAll()`<br>`setFilter()`<br>`setDirectoryFilter()`<br>`select()`<br>`clearSelection()`<br>`destroy()` | `file-manager-ready`<br>`file-manager-select`<br>`file-manager-open`<br>`file-manager-action` | Selection/filter state, neutral preview descriptors, cancellation, and media cleanup normalized; storage/provider behavior mixed |
76
76
  | [`header.html`](#headerhtml) | Shared 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 |
77
77
  | [`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 |
78
78
  | [`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 |
@@ -96,7 +96,7 @@ appropriate.
96
96
  | [`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 |
97
97
  | [`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 |
98
98
  | [`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 |
99
- | [`voice-transcription.html`](#voice-transcriptionhtml) | Records segmented microphone audio only after authoritative STT readiness, exposes explicit selected-STT activation, transcribes complete content 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 complete state/text are normalized; media/provider behavior remains external |
99
+ | [`voice-transcription.html`](#voice-transcriptionhtml) | Records manual clips or optional continuous microphone audio with pause/periodic segments, ordered transcription and saves, retained failures, and complete transcript delivery. | `configure()`<br>`requestSTTActivation()`<br>`startRecording()`<br>`stopRecording()`<br>`retryTranscription()`<br>`cancelRecording()`<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-empty`<br>`voice-transcription-error`<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 STT readiness, capture/queue lifecycle, retry, cancellation, and complete state/text are normalized; media/provider behavior remains external |
100
100
  | [`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 |
101
101
  | [`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 |
102
102
 
@@ -641,19 +641,33 @@ Shared dependencies: [`DataMaintenance.js`](runtime-modules.md#datamaintenancejs
641
641
 
642
642
  ### Overview
643
643
 
644
- Opens a generic modal-style data view around an injected provider.
644
+ Opens a modal file view using the shared file manager. Applications supply their
645
+ own record mappings through the same preview callbacks as the standalone
646
+ [`file-manager.html`](#file-managerhtml).
645
647
 
646
648
  ### Public surface
647
649
 
648
650
  Methods/properties: `beforeOpen()`, `open()`, `destroy()`.
649
651
 
652
+ Assign `previewDescriptor`, `previewTransform`, and `directoryFilter` on the
653
+ host before opening. The component forwards those callbacks, comma-separated
654
+ `data-hidden-prefixes`, and the presence of `data-show-hidden` to its child
655
+ before the child's first load. Reopening refreshes those values before
656
+ `loadAll()`, so changed callbacks and hidden-directory choices take effect.
657
+ `beforeOpen()` is awaited before this configuration is consumed. `data-dirs`
658
+ selects the initial directories; `data-layout` defaults to `files`.
659
+
650
660
  Events: `data-view-ready`.
651
661
 
652
662
  Shared dependencies: [`WaitForComponent.js`](runtime-modules.md#waitforcomponentjs).
653
663
 
654
664
  ### Availability and normalization
655
665
 
656
- **Browser and supported native WebViews.** DOM-native result. HTMLImport + DOM; injected Arcane/provider modules where listed. Native methods remain subject to the bound app's capabilities. [Deep protocol details](protocols.md).
666
+ **Browser and supported native WebViews.** DOM-native result. Preview records
667
+ and directory policy remain application-owned; the child owns rendering,
668
+ preview cancellation, and media cleanup. `destroy()` also destroys the child
669
+ file manager and modal. HTMLImport + DOM; native methods remain subject to the
670
+ bound app's capabilities. [Deep protocol details](protocols.md).
657
671
 
658
672
  ### Example
659
673
 
@@ -779,7 +793,9 @@ Slots: `title`, `preview`, `metadata`, `actions`.
779
793
 
780
794
  ### Overview
781
795
 
782
- Browses, filters, selects, opens, and acts on app-scoped files.
796
+ Browses, filters, selects, opens, and acts on app-scoped files. Optional neutral
797
+ preview descriptors let an application display complete text, documents,
798
+ conversations, and related media without adding its record schemas to the SDK.
783
799
 
784
800
  The default tree provider is initialized before storage readiness starts the
785
801
  first load. Already-ready DBOPFS loads immediately; otherwise the component
@@ -788,15 +804,93 @@ and `destroy()` cleanup, without delaying unrelated component startup.
788
804
 
789
805
  ### Public surface
790
806
 
791
- Methods/properties: `setProvider()`, `loadAll()`, `setFilter()`, `select()`, `clearSelection()`, `destroy()`.
807
+ Methods/properties: `setProvider()`, `loadAll()`, `setFilter()`,
808
+ `setDirectoryFilter()`, `select()`, `clearSelection()`, `destroy()`,
809
+ `previewDescriptor`, `previewTransform`, `directoryFilter`.
810
+
811
+ Assign `directoryFilter(entry, context)` before the first load, or call
812
+ `setDirectoryFilter(fn|null)` to replace it and reload an initialized manager.
813
+ Returning exactly `false` excludes a directory. Context is
814
+ `{directory,fileName,path,layout}`; directory-level calls have an empty
815
+ `fileName`. The built-in DBOPFS paths apply this predicate before reading an
816
+ excluded directory's keys or file metadata. Tree-provider entries are also
817
+ filtered before display and expansion; an injected provider still owns the
818
+ reads inside its own `list()` implementation.
819
+
820
+ Comma-separated `data-hidden-prefixes` now applies to directory names as well
821
+ as the existing filename filtering. `data-show-hidden` disables the prefix
822
+ rule, while the explicit directory predicate remains active. Existing
823
+ `setFilter(fn|null)` and provider `filter` predicates retain their entry first
824
+ argument and false-only exclusion behavior; their optional second argument
825
+ is the same `{directory,fileName,path,layout}` context.
826
+
827
+ `previewDescriptor(file, context)` receives the original opened `File`, not a
828
+ serialized copy or a JSON-only projection. Context is
829
+ `{directory,fileName,extension,path,mimeType,signal}`. It may return a descriptor
830
+ or a promise for one. Returning `null` or `undefined` continues through the
831
+ existing preview path. Application record parsing and mapping belong in this
832
+ callback; the SDK supplies no conversation or media-storage schema.
833
+
834
+ Each descriptor accepts an optional `title`. Supported shapes are:
835
+
836
+ | Kind | Content |
837
+ | --- | --- |
838
+ | `text` | `content`: complete string, displayed as preformatted text |
839
+ | `markdown` | `content`: complete Markdown string, rendered by the shared Markdown owner |
840
+ | `html` | `content`: complete HTML string assigned unchanged to a titled iframe's `srcdoc` |
841
+ | `json` | `content`: value displayed as formatted JSON |
842
+ | `conversation` | `messages`: ordered `{role,content,timestamp,name?,status?}` records |
843
+ | `collection` | `items`: ordered descriptors, including nested collections |
844
+ | `image`, `audio`, `pdf`, `download` | `content`: a `Blob` or `File`, or a function receiving `{signal}` and resolving to one |
845
+
846
+ Conversation `role` and complete Markdown `content` are strings. Optional
847
+ `name` and `status` are displayed alongside the role and time. Valid supplied
848
+ timestamps are displayed in local time with their real ISO datetime; absent
849
+ timestamps display `Time unavailable`, and an unrecognized supplied timestamp
850
+ is displayed as supplied. No timestamp is invented.
851
+
852
+ Images may supply `alt`; downloads require `fileName`. A media/download
853
+ function is lazy: only that item's explicit **Load** button invokes it, with
854
+ the preview's abort signal. A failed item shows `Unable to load this item.`
855
+ and makes the same button available for retry; sibling items remain visible.
856
+ The shared logger receives the original error. Immediate
857
+ Blobs render directly. Audio exposes native controls without autoplay. The
858
+ component does not automatically read every related media variant.
859
+
860
+ Closing the preview, opening another file, or destroying the manager aborts
861
+ the preview signal, ignores late descriptor/loader results, stops owned audio,
862
+ removes iframe `srcdoc`, and revokes every owned object URL, including those
863
+ in nested collections.
864
+ Applications should observe the supplied signal in their asynchronous reads.
865
+ Descriptor and file-open failures show `Unable to open this file.` in the
866
+ current modal and send the original error to the shared logger.
867
+
868
+ When no descriptor is returned, the existing
869
+ `previewTransform(parsed,{directory,extension,fileName})` callback remains
870
+ available for JSON-family files. Native image, audio, PDF, HTML, Markdown,
871
+ JSON, and text presentation remains available. HTML and Markdown also use
872
+ `text/html` and `text/markdown` MIME routing when a filename has no matching
873
+ extension. Routing compares the lowercase MIME essence without its parameters;
874
+ the callback's `mimeType` and the file content remain unchanged.
875
+ HTML uses its complete original string in `srcdoc` without an
876
+ added sandbox policy; Markdown reads the complete original text before
877
+ rendering. Untransformed JSONL/NDJSON shows its complete original text,
878
+ including lines that are not JSON records. Other binary files offer a download
879
+ of the original `File`.
880
+ The larger file-preview dialog reuses `--modal-width`, `--modal-max-height`,
881
+ and `--modal-padding`; applications can override those existing modal values.
792
882
 
793
883
  Events: `file-manager-ready`, `file-manager-select`, `file-manager-open`, `file-manager-action`.
794
884
 
795
- Shared dependencies: [`DBOPFS.js`](runtime-modules.md#dbopfsjs), [`File.js`](runtime-entities.md#filejs), [`WaitForComponent.js`](runtime-modules.md#waitforcomponentjs).
885
+ Shared dependencies: [`DBOPFS.js`](runtime-modules.md#dbopfsjs), [`File.js`](runtime-entities.md#filejs), [`MD.js`](runtime-modules.md#mdjs), [`WaitForComponent.js`](runtime-modules.md#waitforcomponentjs).
796
886
 
797
887
  ### Availability and normalization
798
888
 
799
- **Browser and supported native WebViews.** Selection/filter state normalized; storage/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).
889
+ **Browser and supported native WebViews.** Selection/filter state, neutral
890
+ preview descriptors, complete content delivery, cancellation, and media
891
+ cleanup are normalized; storage/provider behavior remains mixed. HTMLImport
892
+ and DOM; injected Arcane/provider modules where listed. Native methods remain
893
+ subject to the bound app's capabilities. [Deep protocol details](protocols.md).
800
894
 
801
895
  ### Example
802
896
 
@@ -1633,25 +1727,29 @@ Events: `unified-inbox-ready`, `inbox-refresh`, `thread-select`.
1633
1727
 
1634
1728
  ### Overview
1635
1729
 
1636
- Records segmented microphone audio only after authoritative STT readiness,
1637
- exposes explicit selected-STT activation, transcribes with cancellation,
1638
- persists, and completes a combined transcript.
1730
+ Records manual clips by default, with optional continuous capture that cuts
1731
+ segments after quiet periods or at a periodic boundary. Transcription and
1732
+ application saves run in capture order while microphone capture continues.
1733
+ The component exposes explicit selected-STT activation, cancellation, retry,
1734
+ and completion of the combined transcript.
1639
1735
 
1640
1736
  ### Public surface
1641
1737
 
1642
1738
  Methods/properties: `configure()`, `requestSTTActivation()`, `startRecording()`,
1643
- `stopRecording()`, `save()`, `completeTranscription()/complete()`, `clear()`,
1644
- `reset()`, `destroy()`.
1739
+ `stopRecording()`, `retryTranscription()`, `cancelRecording()`, `save()`,
1740
+ `completeTranscription()/complete()`, `clear()`, `reset()`, `destroy()`.
1645
1741
 
1646
1742
  Events: `voice-transcription-ready`, `voice-transcription-state`,
1647
- `voice-transcription-segment`, `voice-transcription-change`,
1743
+ `voice-transcription-segment`, `voice-transcription-empty`,
1744
+ `voice-transcription-error`, `voice-transcription-change`,
1648
1745
  `voice-transcription-complete`, `speech-transcription-complete`,
1649
1746
  `speech-transcription-cancelled`, `speech-stt-activation-request`, and
1650
1747
  `speech-stt-activation-error`.
1651
1748
 
1652
1749
  Shared dependencies: [`MD.js`](runtime-modules.md#mdjs),
1653
1750
  [`ComponentContracts.js`](runtime-modules.md#componentcontractsjs),
1654
- [`AIRuntimeState.js`](runtime-modules.md#airuntimestatejs), and
1751
+ [`AIRuntimeState.js`](runtime-modules.md#airuntimestatejs),
1752
+ [`ContinuousVoiceCapture.js`](runtime-modules.md#continuousvoicecapturejs), and
1655
1753
  [`AI.js`](runtime-modules.md#aijs).
1656
1754
 
1657
1755
  ### Availability and normalization
@@ -1659,9 +1757,12 @@ Shared dependencies: [`MD.js`](runtime-modules.md#mdjs),
1659
1757
  **Browser and supported native WebViews.** The component subscribes
1660
1758
  synchronously to sticky `AIRuntimeState.roles.stt`; its recording Start button
1661
1759
  and public `startRecording()` both remain unavailable unless that role is exactly
1662
- `ready` and not busy. A configured `transcribe(file,context)` callback remains
1760
+ `ready` and not busy. Once continuous capture starts, a busy STT lane does not
1761
+ interrupt the microphone session.
1762
+ A configured `transcribe(file,context)` callback remains
1663
1763
  request plumbing rather than readiness authority. Its context now includes the
1664
- owned `signal` additively. The default route calls `AI.fetchSTT(file,signal)` so
1764
+ owned `signal` additively, and continuous clips also include their `sequence`.
1765
+ The default route calls `AI.fetchSTT(file,signal)` so
1665
1766
  readiness loss or destruction can abort delivery.
1666
1767
 
1667
1768
  For a selected `unloaded`, `loading`, `unloading`, or `error` role, the component
@@ -1682,7 +1783,7 @@ Unknown provider/runtime diagnostics remain complete in the developer console
1682
1783
  and error events, while controls use generic visible outcomes unless the Error
1683
1784
  owner explicitly marks nonblank copy with `userSafe:true`.
1684
1785
 
1685
- If sticky readiness is lost during microphone acquisition, capture, or the STT
1786
+ For the default manual mode, if sticky readiness is lost during microphone acquisition, capture, or the STT
1686
1787
  request, the component invalidates the session, aborts the owned request signal,
1687
1788
  releases media, discards late completion, and emits
1688
1789
  `speech-transcription-cancelled`. Its source-local reason is
@@ -1704,10 +1805,12 @@ advances its generation, aborts owned STT delivery, releases owned media, emits
1704
1805
  `speech-transcription-cancelled` with
1705
1806
  `reason:'transcript-replaced'`, and suppresses
1706
1807
  late settlement before publishing the assigned transcript. Assigning transcript
1707
- text during active recording preserves that recording and changes the transcript
1808
+ text during active manual recording preserves that recording and changes the transcript
1708
1809
  to which the captured segment will be appended.
1709
1810
  On a BFCache-persisted `pagehide`, the component and its owned state remain
1710
- live. A persisted `pageshow` rerenders the retained authoritative state without
1811
+ live. An active continuous microphone session requests its final stop and
1812
+ flush; the manual recording lifecycle is unchanged. A persisted `pageshow`
1813
+ rerenders the retained authoritative state without
1711
1814
  restarting capture, transcription, or activation. Nonpersisted `pagehide`
1712
1815
  retains terminal destruction.
1713
1816
  `destroy()` aborts the state subscription, cancels active work, removes the
@@ -1715,7 +1818,8 @@ activation listener, sets component `ready` to `false`, and returns `true`;
1715
1818
  repeated destruction is
1716
1819
  idempotent. Destruction is terminal: Start, activation, and Complete remain
1717
1820
  disabled and status remains unavailable. `voice-transcription-state` detail is
1718
- the mutable complete `{message,state,stt}` record, where `state` remains the component
1821
+ the mutable complete `{message,state,stt}` record, extended during a continuous
1822
+ session with `{capture,processing,queued,errorPhase,error}`, where `state` remains the component
1719
1823
  workflow and `stt` is the authoritative mutable role record. Transcript
1720
1824
  completion stays available when STT is unavailable before destruction.
1721
1825
  State/text, explicit activation, and request cancellation are normalized;
@@ -1723,6 +1827,69 @@ provider/model authority and media behavior remain external. HTMLImport + DOM;
1723
1827
  injected Arcane/provider modules where listed.
1724
1828
  Native methods remain subject to the bound app's capabilities. [Deep protocol details](protocols.md).
1725
1829
 
1830
+ ### Continuous capture and controls
1831
+
1832
+ `configure({capture:{mode:'continuous'}})` opts into the SDK's
1833
+ [`ContinuousVoiceCapture`](runtime-modules.md#continuousvoicecapturejs) owner.
1834
+ The default capture settings are `preRollMs:1500`, `quietMs:2000`,
1835
+ `chunkMs:30000`, and `activityThreshold:0.02`. These are audio amplitude and
1836
+ timing settings: the detector observes sound activity, including background
1837
+ noise, and does not perform semantic voice-activity recognition. The worklet
1838
+ keeps a rolling pre-roll, emits no clips containing only inactivity, and does
1839
+ not repeat samples across periodic segments. If `preRollMs` exceeds `chunkMs`,
1840
+ the first active clip preserves all that pre-roll and may exceed the periodic
1841
+ duration. Each emitted clip contains a
1842
+ complete mono Float32 WAV and a session-local sequence starting at one.
1843
+
1844
+ The component runs one clip's transcription and save before the next clip's
1845
+ transcription. Captured clips wait in memory while STT is busy. With the
1846
+ default `persist:true`, `onSave({transcript,segment,sequence,signal})` or the
1847
+ existing `host.save` callback must resolve before that segment's success event
1848
+ and before the next clip proceeds. Returning `false` from a continuous save or
1849
+ completion callback reports that the application did not accept the operation.
1850
+ Text is preserved completely; the
1851
+ configured separator joins successful segments. An STT failure retains its
1852
+ audio. A save failure retains the successful text and exact save payload so
1853
+ `retryTranscription()` repeats only that save and does not retranscribe or
1854
+ append the segment again. Retry resumes the ordered queue after the retained
1855
+ stage succeeds. Waiting clips remain available if the selected STT role becomes
1856
+ unready. An in-flight STT request is aborted if its selected provider/model
1857
+ changes or becomes unready; its clip remains at the failed stage for explicit
1858
+ retry. A provider result with no text emits
1859
+ `voice-transcription-empty` and advances the queue without appending text.
1860
+
1861
+ Continuous `stopRecording()` releases the microphone immediately, flushes the
1862
+ final active segment, and returns a promise that resolves `true` after the
1863
+ queue drains or `false` while a failure remains. Default manual
1864
+ `stopRecording()` keeps its synchronous boolean return. Complete waits for
1865
+ the continuous flush and all saves before calling
1866
+ `onComplete({transcript,signal})` or the existing `host.complete` callback.
1867
+ After a capture interruption, explicit completion can use the retained
1868
+ transcript once every queued clip has settled. A pending clip failure still
1869
+ prevents completion. Overlapping completion requests invoke the application
1870
+ callback once.
1871
+ `cancelRecording()` explicitly discards outstanding clips, aborts active
1872
+ callbacks, and suppresses late text, save, and completion delivery. Callbacks
1873
+ must observe the supplied signal to cancel their own external effects; an
1874
+ already accepted external save is not undone. Replacing configuration or the
1875
+ transcript explicitly cancels a continuous session and its outstanding clips.
1876
+ `clear()` refuses a retained queue; use the explicit Cancel action before
1877
+ discarding it.
1878
+
1879
+ `voice-transcription-segment` and `speech-transcription-complete` retain their
1880
+ complete `{text,transcript}` detail and add `sequence` for continuous clips.
1881
+ State events distinguish `capture`, `processing`, queued clips, `errorPhase`,
1882
+ and the complete `error` from the existing workflow `state` and selected `stt`
1883
+ role. Errors remain visible and retryable without implicitly discarding audio.
1884
+
1885
+ `controls:'simple'` uses one large primary Start/Stop button, and
1886
+ `showComplete:false` hides the secondary Complete action. Standard controls
1887
+ and the Complete action remain the defaults. `labels` can supply `start`,
1888
+ `stop`, `complete`, `retry`, and `cancel` strings. Applications can style the
1889
+ exposed parts `primary-action`, `stop-action`, `complete-action`,
1890
+ `retry-action`, `cancel-action`, `transcript`, `status`, `controls`, and
1891
+ `description` without reaching into the component's markup.
1892
+
1726
1893
  ### Example
1727
1894
 
1728
1895
  ```html
@@ -1732,6 +1899,19 @@ Native methods remain subject to the bound app's capabilities. [Deep protocol de
1732
1899
  </html-import>
1733
1900
  ```
1734
1901
 
1902
+ After the component is ready, configure the selected capture mode and the
1903
+ application's real persistence callback:
1904
+
1905
+ ```javascript
1906
+ voice.configure({
1907
+ capture:{mode:'continuous',preRollMs:1500,quietMs:2000,chunkMs:30000},
1908
+ controls:'simple',
1909
+ labels:{start:'Start recording',stop:'Stop recording'},
1910
+ onSave:saveTranscript,
1911
+ onComplete:completeTranscript
1912
+ });
1913
+ ```
1914
+
1735
1915
  ## weather-widget.html
1736
1916
 
1737
1917
  ### Overview