arcane-os 0.51.0 → 0.51.2

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.
@@ -71,17 +71,22 @@ version; WebKitGTK availability must not be generalized to macOS.
71
71
  | Build browser UI and app-local behavior | `/arcane/modules/*.js`, shared entities, and components | **Browser**; many modules also run inside every native renderer | Pure modules own their result contracts. Modules that call `Arcane` inherit the bridge boundary described below. |
72
72
  | Select and observe independent LLM/STT/TTS roles | `/arcane/modules/AIProviderRuntime.js` and `AIRuntimeState.js` | **Cross-host** controller/state; registered providers retain their own host requirements | Required/projected provider members, route/configuration records, and status fields; per-role lifecycle, cancellation, stream cleanup, sticky state, and startup barriers are normalized. `localOnly` creates no fallback. |
73
73
  | Run a caller-selected local LLM entirely in a browser renderer | `arcane-os/ai/browser-wasm` through `createArcaneAI()` | **Browser** only; secure context, WebAssembly, and OPFS/DBOPFS; full WebGPU offload by default or explicit CPU with `gpuLayers:0` | The public AI API module normalizes multi-model lifecycle, status, complete all-choice streaming, cancellation, exact ordered structural tool-call visibility, and session persistence. Model sources are canonical ordered file descriptors; licenses and model choice remain application policy. |
74
- | Run caller-selected Whisper or Kokoro in a browser renderer | `arcane-os/ai/browser-speech` registered with `AIProviderRuntime` | **Browser** only; DBOPFS, Web Locks, Workers, Fetch/object URLs, and a caller-supplied self-contained runtime/model closure are required | STT/TTS use independent provider/2 lifecycle and status. Kokoro adds bounded Worker/session concurrency and explicit `auto`, `webgpu`, or `wasm` execution. Complete model/runtime selection, offline behavior, cancellation, Worker teardown, and request/result shapes are normalized. No runtime/model content or cloud fallback is supplied. |
74
+ | Run caller-selected Whisper or Kokoro in a browser renderer | `arcane-os/ai/browser-speech` registered with `AIProviderRuntime` | **Browser** only; DBOPFS, Web Locks, Workers, Fetch/object URLs, and a caller-supplied self-contained runtime/model closure are required | Independent provider/2 lifecycle and status, with `auto`, `webnn-npu`, `webgpu`, or `wasm` execution. Whisper owns one Worker/session; Kokoro defaults to four and accepts one through four. Complete model/runtime selection, offline behavior, cancellation, Worker teardown, and request/result shapes are normalized. No runtime/model content or cloud fallback is supplied. |
75
75
  | Capture speech with the explicitly selected native browser service | `createBrowserSpeechRecognitionProvider` from `arcane-os/ai/browser-speech`, configured as STT | **Browser / native WebView**, conditional on `SpeechRecognition` or `webkitSpeechRecognition`; no SDK model, Worker, or storage required | `localOnly:false` because the browser may use a remote service. Factory/catalog remain usable without native support; inspect/load report availability. User-gesture start, exact final results, transient interim text, stop/drain and abort are owned by the provider/runtime and shared controls. No provider fallback. |
76
- | Prepare ordered speech playback or reuse the speech-input formatting filter | `arcane-os/speech-playback` and `arcane-os/speech-text` | **Node** with injected media adapters, or **Browser / Native WebView** media; the text filter itself is **Cross-host** | Stored and caller-owned text stays exact. Only the outbound synthesis copy automatically loses repeated same formatting marks. A capacity-advertising provider receives complete segments immediately while retaining indexed playback; native/custom synthesis stays serialized. |
77
- | Preserve complete chat history and memory | `/arcane/modules/PersistentAIChatSession.js` | **Browser / native WebView** with ChatEntity/DBOPFS and a configured chat function | Existing DBOPFS names and memory semantics are preserved. Live-context commit is atomic; durable persistence is explicit and coherent across user/assistant turns and atomic all-ID tool-result batches. |
76
+ | Speak with the explicitly selected browser voice service | `createBrowserSpeechSynthesisProvider` from `arcane-os/ai/browser-speech`, configured as TTS | **Browser / native WebView**, conditional on `speechSynthesis` and `SpeechSynthesisUtterance` | `localOnly:false`; actual voice metadata and a replaying catalog subscription, synchronous `setDefaultVoice(voiceURI\|null)`, silent preparation, and explicit playback controls. Native completion and resource release are distinct. Native speech provides playback descriptors; exporting audio requires a provider that returns real audio. |
77
+ | Prepare ordered speech playback or reuse the speech-input formatting filter | `arcane-os/speech-playback`, `AI.prepareTTSPlayback`, and `arcane-os/speech-text` | **Node** with injected media adapters, or **Browser / native WebView** media; the text filter itself is **Cross-host** | Stored and caller-owned text stays exact. Only the outbound synthesis copy loses repeated same formatting marks. Complete Blob segments or inert native descriptors keep their original order. Provider capacity owns synthesis admission; actual native release controls when the playback lane is free. |
78
+ | Compose editable speech drafts and print a conversation | Shared [`chat.html`](runtime-components.md#chathtml) | **Browser / native WebView** with the selected AI/speech runtime | `transcriptionMode='draft'` places confirmed and interim recognition in the editable composer for manual Send. `appendDraft(text)` preserves existing text and selection. `print()` requests the complete rendered conversation with optional `printTitle`; a successful return confirms the dialog request only. |
79
+ | Preserve complete chat history and memory | `/arcane/modules/PersistentAIChatSession.js` | **Browser / native WebView** with ChatEntity/DBOPFS and a configured chat function | Live-context commit is atomic; new durable records contain complete visible content and timestamps with optional application display metadata. Per-turn `persist:false` and entity-wide `persist=false` keep the operation's input and response outside retained context, transcript, memory, and DBOPFS. Existing saved records remain unchanged. |
80
+ | Store and display images referenced by Markdown | `/arcane/modules/MarkdownMedia.js` and shared Markdown views | **Browser / native WebView** with application-owned DBOPFS storage | Complete image records stay in the selected table; raw Markdown holds stable `arcane-media:` references. Hydration owns temporary display URLs, cancellation, per-image errors, and print-resource retention. Pure record decoding performs no storage or network work. |
81
+ | Print rendered editor content or file previews | `/arcane/modules/PrintView.js`, editor `print()`, and file/history `printPreview()` | **Browser / native WebView** with DOM and browser printing | Complete current rendered content, fonts, and resolved media are captured for print. Explicit requests await view preparation; native Print captures synchronously. Shared `print.css` supplies a light paper palette and one-inch margins; snapshots stay owned through `afterprint`. |
78
82
  | Search an app-owned document corpus for explicit chat context | `/arcane/modules/DBOPFSDocumentLibrary.js` | **Browser** or compatible injected DBOPFS adapter | Generation/manifest completion, complete lexical search, partial read failures, and untrusted context labels are normalized. Construction does not search; an explicitly wired context builder performs retrieval for each prepared chat send. |
79
83
  | Read host identity, capabilities, storage, preferences, appearance, or platform state | `globalThis.Arcane` | **Cross-host** where the method is implemented and admitted | Promise behavior and `Arcane.Error` are normalized. Result fields are normalized unless the method explicitly documents a platform-dependent snapshot. |
80
84
  | Use local AI without coupling app code to Ollama HTTP | `Arcane.localAI`, `Arcane.ai`, or `/arcane/modules/Ollama.js` | Primarily **Native**; Android exposes a narrower admitted inference projection | Admission, errors, and managed-operation events are normalized. Direct Ollama response envelopes remain **Provider-native**. |
81
85
  | Use TWiN Cloud from the renderer profile | `/arcane/modules/AI.js` | **Cloud** from an allowed browser/native renderer | High-level chat behavior is normalized by the module. The TWiN access key authenticates remote LLM chat; raw provider diagnostics remain provider-specific. No automatic cloud fallback is inferred from local failure. |
82
86
  | Send one TWiN Cloud request with an explicit key and model | `fetchRequest` from `arcane-os/ai/twin-cloud` | **Node** and **Browser**, using standard Fetch and a remote HTTPS provider | Keeps complete messages and returns the full parsed provider JSON. Rejected Fetch and HTTP 529 share three retries after 3000 ms; HTTP 429 overload retains unlimited three-second retries. Optional `onRetry` reports waiting/requesting phases without blocking recovery. Shared structured-output mapping and cancellation match browser TWiN transport. No browser profile, AI/user singleton, DBOPFS, or retained request history is created. |
83
87
  | Evaluate caller-owned state and questions with TWiN System One | `fetchSystemOneRequest` from `arcane-os/ai/twin-cloud` | **Node** and **Browser**, using standard Fetch and a remote HTTPS provider | Posts the explicit model and complete state/questions through the existing JSON transport. Returns the entire parsed provider result and shares its retry, diagnostic, and cancellation behavior. Model choice, question definitions, answer interpretation, and scoring policy stay with the caller; no conversation state is retained. |
84
- | Use speech through one application helper | `/arcane/modules/AI.js` and `Arcane.speech` | **Browser** or **Native** | Whisper and Kokoro keep their on-device paths; explicitly selected Web Speech STT and TWiN Cloud TTS declare their non-local behavior. The helper automatically cleans only the outbound synthesis-input copy and normalizes application-facing audio/text behavior while request/response plumbing differs below that boundary. |
88
+ | Generate images from a complete caller-owned prompt | `generateImages` from `arcane-os/ai/twin-cloud` | **Node** and **Browser**, using standard Fetch, Blob, and a remote HTTPS provider | Caller selects `fal-ai/flux/schnell` or `stable-diffusion-3.5-large`, credentials, and provider parameters. Returns every image as a Blob with media metadata in provider order; owns progress, job polling, and cancellation. Submission is not automatically replayed after an ambiguous failure. Display and storage stay application-owned. |
89
+ | Use speech through one application helper | `/arcane/modules/AI.js` and `Arcane.speech` | **Browser** or **Native** | Whisper and Kokoro keep their on-device paths; explicitly selected Web Speech STT/TTS and TWiN Cloud TTS declare their non-local behavior. `prepareTTSPlayback` supports real audio and silent native descriptors; `fetchTTS` and durable `prepareTTS` require real audio. Provider choice, model, voice, and credentials stay application-owned. |
85
90
  | Inspect or manage raw Ollama models | `Arcane.ollama` or `/arcane/modules/Ollama.js` | **Native** desktop Core for management; narrower Android inference only | Wrapper method names, errors, streaming correlation, and admission are Arcane-controlled. Direct Ollama success envelopes are intentionally provider-native. |
86
91
  | Use native terminal, installation, user, provisioning, or machine controls | matching `Arcane.*` namespace | **Native** and app/capability restricted | Calls and errors use the common bridge contract. Platform results can be host-specific and are marked in the method guide. |
87
92
 
@@ -189,18 +194,22 @@ status, and error state. The SDK supplies neither speech adapter runtime nor
189
194
  model/voice content; every selected file is application-owned and stored
190
195
  through the SDK-created DBOPFS adapter.
191
196
 
192
- Kokoro defaults to `{device:'auto',maxConcurrentRequests:4}`. Automatic
193
- selection attempts the complete Worker/session pool on WebGPU when exposed and
194
- recreates the complete pool on WASM if WebGPU loading rejects. Explicit
195
- `webgpu` or `wasm` disables that fallback. Each accepted synthesis owns one
196
- pool slot, and provider-neutral FIFO backpressure preserves later requests.
197
- Whisper remains one WASM Worker.
197
+ Both speech roles default to `device:'auto'`: try `webnn-npu` when
198
+ `navigator.ml.createContext` exists, then exposed WebGPU, then WASM. A failed
199
+ backend load releases its Worker/session pool before a fresh pool tries the
200
+ same prepared model and precision on the next backend. Explicit `webnn-npu`,
201
+ `webgpu`, or `wasm` selects only that backend. Whisper accepts exactly one
202
+ Worker/session. Kokoro defaults to `maxConcurrentRequests:4` and accepts one
203
+ through four; its FIFO queue preserves later requests while those slots are
204
+ occupied.
198
205
 
199
206
  For high-level speech, read
200
- `ai.providerRuntime.status('tts', {execution:true}).execution` after load.
201
- Kokoro reports `requestedDevice`, `selectedDevice`, `maxConcurrentRequests`,
202
- and `activeRequestCount`; requested `auto` with selected `wasm` identifies
203
- fallback. `selectedDevice` is `null` while unloaded. The default `status()`
207
+ `ai.providerRuntime.status(role, {execution:true}).execution` for `stt` or `tts`
208
+ after load. Both report `requestedDevice`, `selectedDevice`,
209
+ `maxConcurrentRequests`, and `activeRequestCount`. `selectedDevice` is `null`
210
+ while unloaded and identifies the successful session backend after load.
211
+ WebNN may use WASM for unsupported operations, so that field does not establish
212
+ that every operation ran on a physical NPU. The default `status()`
204
213
  remains the sticky lifecycle snapshot; execution is an explicit provider read,
205
214
  and inspection errors propagate. Neither state proves physical GPU kernel
206
215
  overlap. See the [copyable speech quick start](ai/browser-speech.md).
@@ -215,12 +224,14 @@ The projected [`AIProviderRuntime`](runtime-modules.md#aiproviderruntimejs)
215
224
  normalizes those browser providers and can admit an externally supplied native
216
225
  or cloud provider/2 adapter. `AI.js` also supplies built-in adapters for
217
226
  an already-selected TWiN Cloud LLM route, Ollama route, or admitted local Core
218
- speech route. Its built-in audio selections are on-device only: saved `OPENAI`
219
- speech selections migrate to `LOCAL_SPEACH` with `whisper-small` for STT and
220
- `kokoro` for TTS. The SDK publishes no privileged Core implementation,
221
- credential,
222
- model, or speech-runtime authority, and those adapters never probe, select,
223
- download, or fall back. The sticky
227
+ speech route. Application-selected Web Speech recognition, Web Speech
228
+ synthesis, and TWiN Cloud/FAL synthesis can be registered through
229
+ `ai.configureSpeechProvider(role,provider,{modelId})`; configuration owns only
230
+ the selected role and performs no network request. Saved selections remain
231
+ application-owned, including selections waiting for provider registration.
232
+ The SDK publishes no privileged Core implementation, credential, model, or
233
+ speech-runtime authority. Capability-only built-in adapters report their
234
+ existing routes without probing, downloading, or changing providers. The sticky
224
235
  [`AIRuntimeState`](runtime-modules.md#airuntimestatejs) surface keeps
225
236
  application UI independent of transport. A selected route remains explicit:
226
237
  browser failure is not permission to invoke Core or cloud.
@@ -47,6 +47,8 @@ meaning and cardinality rules:
47
47
  | `--display-name` | string | `new`, `init` |
48
48
  | `--workspace` | directory | Commands that select an external or integrated workspace; defaults to `.`. |
49
49
  | `--app` | app id or label | Workspace/app operations except shared scope and `verify-bundle`; optional diagnostic label for `mail serve`. |
50
+ | `--apps-root` | `.` or `apps` | `new`, `init`; standalone setup defaults to the repository root. |
51
+ | `--sdk-runtime-source` | SDK checkout directory | `dev` only; maps live SDK source through the selected browser destinations for that server process. |
50
52
  | `--arcane-root` | directory | `doctor`, native `build`/`run`, `native-doctor`, `native-prepare` |
51
53
  | `--host` / `--port` | host / integer 0–65535 | Browser `dev`/`run` default to HTTPS at `127.0.0.1:8000`; `mail serve` defaults to HTTPS with HTTP/2 at `0.0.0.0:4433` and accepts an explicit bind host. |
52
54
  | `--http-port` | integer 0–65535 | Browser `dev`/`run` HTTP redirect listener; defaults to `0`, which selects an available port. |
@@ -198,8 +200,8 @@ npm exec -- arcane doctor --workspace . --arcane-root "../Arcane OS"
198
200
  Refreshes one selected application's browser runtime map, generates
199
201
  its standard browser import map, discovers every directly navigable
200
202
  `.html`/`.htm` document admitted by the selected descriptor's existing
201
- include/exclude rules, and commits the map artifact plus those managed documents
202
- as one transactional refresh. A directly navigable entry document declares exactly
203
+ include/exclude rules, and prepares the map artifact plus those managed documents
204
+ before writing them in order. A directly navigable entry document declares exactly
203
205
  one `<meta name="arcane-app-id" content="<selected-id>">`; an unmarked secondary
204
206
  document may instead carry an active `<base>`.
205
207
  Wrong or duplicate explicit app identity fails. The renderer then requires one
@@ -238,8 +240,8 @@ files remain unchanged. The same layout applies to `arcane dev` and
238
240
  `arcane package`. Generated and offline app files are committed; GitHub Actions
239
241
  consume those committed files. See [root generated output](pwa.md#root-generated-output).
240
242
 
241
- SDK `0.5.17` preserves the physical workspace route count and ordered include
242
- list. External and modern integrated routes require `components`, `css`,
243
+ The supported physical layout preserves its route count and ordered include
244
+ list. External and modern integrated physical routes require `components`, `css`,
243
245
  `dependencies`, `entities`, `img`, `modules`, and `sdk`; a physical workspace
244
246
  may omit only an optional trailing `security` include. The external license
245
247
  route remains separate and second.
@@ -248,10 +250,11 @@ External applications can instead select the four ordered
248
250
  [`installed-v1` routes](protocols.md#installed-package-browser-routes) in
249
251
  `arcane-packager.json`. This reads directly from the installed SDK package and
250
252
  requires neither a workspace `arcane/` directory nor `arcane.lock.json`.
251
- The generated browser destinations remain `arcane/`, `arcane/sdk/`, and
252
- `arcane/dependencies/strong-type/`; an npm alias changes package source paths,
253
- not those browser URLs. The SDK version comes from that installed package.
254
- Existing physical workspaces and scaffold output remain supported unchanged.
253
+ Direct routes use the actual `node_modules/<dependency>/...` browser paths;
254
+ an npm alias selects that alias's folder. Earlier virtual routes retain
255
+ `arcane/`, `arcane/sdk/`, and `arcane/dependencies/strong-type/` destinations.
256
+ The SDK version comes from the installed package. Existing physical workspaces
257
+ and explicitly selected nested scaffolds remain supported.
255
258
 
256
259
  ### Result and safety
257
260
 
@@ -278,12 +281,16 @@ Success returns the normal selected-workspace wrapper:
278
281
 
279
282
  For the direct CLI command, `documentPaths` contains the configured entry first
280
283
  and every other descriptor-selected HTML/HTM document afterward in
281
- deterministic order. The generated artifact and selected documents are written
282
- together. A post-commit observer failure preserves delivery with
284
+ deterministic order. The generated artifact is written first, followed by the
285
+ selected documents. A write failure or cancellation can leave earlier writes
286
+ in place; the operation does not restore them automatically. After successful
287
+ writes, an observer failure preserves delivery with
283
288
  `eventDelivery.status === 'degraded'` and `ARCANE_EVENT_DELIVERY_FAILED`; it
284
289
  does not roll back complete application content.
285
290
 
286
- `new` and `init` generate the map during scaffolding. `dev` refreshes all
291
+ Root `new` reports a pending map until the SDK is installed. Root `init` generates
292
+ the map when the installation is available and otherwise reports the same pending
293
+ state; explicit nested scaffolds generate it during setup. `dev` refreshes all
287
294
  selected documents once before binding. `package` consumes the saved source
288
295
  and maps; use `import-map` to refresh them explicitly before selecting output
289
296
  that needs updated maps. Packaging does not run tests or checks automatically.
@@ -293,10 +300,9 @@ Explicit `test` and `check` operations read the existing map without regeneratin
293
300
  watcher, polling, scheduled refresh, download, or self-update behavior.
294
301
 
295
302
  There is no supported `--dry-run` for `import-map`: do not pass that parser-wide
296
- flag because this command performs the real commit. Import-map-specific failures
303
+ flag because this command writes the selected files. Import-map-specific failures
297
304
  use `ARCANE_IMPORT_MAP_INVALID`, `ARCANE_IMPORT_MAP_UNRESOLVED`, or
298
- `ARCANE_IMPORT_MAP_COLLISION`; packaging can additionally report
299
- `ARCANE_IMPORT_MAP_CLEANUP_FAILED`. Workspace, policy, usage, busy, and
305
+ `ARCANE_IMPORT_MAP_COLLISION`. Workspace, policy, usage, busy, and
300
306
  cancellation failures retain their normal SDK codes.
301
307
 
302
308
  ### Example
@@ -348,7 +354,7 @@ An explicit live-source SDK mapping follows the selected browser destinations
348
354
  while reading canonical SDK source; it never replaces installed files.
349
355
 
350
356
  ```text
351
- arcane dev [--app <id>] [--public] [--http | --https] [--cert <file> --key <file>] [--host <address>] [--port 8000] [--http-port 0]
357
+ arcane dev [--app <id>] [--public] [--http | --https] [--cert <file> --key <file>] [--host <address>] [--port 8000] [--http-port 0] [--sdk-runtime-source <sdk-root>]
352
358
  ```
353
359
 
354
360
  ### Lifecycle
@@ -374,6 +380,10 @@ HTTPS is the default for development and required for packaged browser previews.
374
380
  The published `node-http-server` 10.0.0 integration negotiates HTTP/2 or HTTP/1.1
375
381
  on the same HTTPS port using the configured PEM pair. Source routes, generated
376
382
  PWA resources, and conditional responses use the same serving pipeline.
383
+ Static files retain the module's complete MIME map, including PDF, Markdown,
384
+ audio and video. Generated representations use the same published map;
385
+ unknown extensions retain `application/octet-stream`. No application MIME
386
+ override is needed for these supported types.
377
387
  `--https` remains accepted but is no longer needed to select the transport.
378
388
  `--port` selects the HTTPS application port. A second HTTP listener returns
379
389
  `308` redirects to that HTTPS port, preserving the requested path and query.
@@ -565,8 +575,9 @@ arcane package [--app <id>] [--dry-run]
565
575
 
566
576
  The result includes the release root, manifest, and complete selected inventory.
567
577
  `ARCANE_APP_RELEASE.json` keeps the authored app-relative `app.entry` and records
568
- the package launch URL in `app.start`, such as `./apps/hello-world/index.html`.
569
- The file inventory includes that app tree and the root `index.html`.
578
+ the package launch URL in `app.start`: `./index.html` for a root app with that
579
+ entry, or `./apps/hello-world/index.html` for a nested app. The complete file
580
+ inventory follows the selected layout and includes the root `index.html`.
570
581
  `--dry-run` plans the package without refreshing source, running tests, or
571
582
  replacing output.
572
583
 
@@ -738,6 +749,8 @@ The preview always uses HTTPS with the workspace certificate pair. Supply
738
749
  `--port` selects the HTTPS application port, and `--http-port` selects the
739
750
  paired HTTP `308` redirect port. The HTTP port defaults to an available port;
740
751
  the CLI prints its actual redirect URL and reports both listener endpoints.
752
+ The preview uses the same complete `node-http-server` MIME map as source
753
+ development, including PDF, Markdown and supported audio/video types.
741
754
  For a paired native target, it performs package, prepare, plan, build, launch,
742
755
  readiness, and owned cancellation in one process.
743
756
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "sdkVersion": "0.5.18",
3
+ "sdkVersion": "0.51.1",
4
4
  "environment": {
5
5
  "runtime": "Node.js for Node entrypoints; browser for browser-only entrypoints",
6
6
  "minimumVersion": "22.23.2 for Node entrypoints",
7
7
  "moduleSystem": "ESM"
8
8
  },
9
- "memberCount": 220,
9
+ "memberCount": 223,
10
10
  "runtimeSubpathPatterns": {
11
11
  "arcane-os/modules/*": "./runtime/arcane/modules/*",
12
12
  "arcane-os/entities/*": "./runtime/arcane/entities/*"
@@ -3118,7 +3118,7 @@
3118
3118
  "summary": "Compatibility export of createTwinCloudTTSProvider using the same function and implementation.",
3119
3119
  "availability": "Browser or Node with Fetch, Blob, AbortController, and an application-owned DigitalOcean inference key",
3120
3120
  "protocol": "arcane-ai-provider/2 tts/synthesize",
3121
- "normalization": "Same TWiN Cloud options, queued follow-ups, complete audio Blob results, and cancellation contract. Existing imports, stored provider IDs, and credentials remain valid without migration."
3121
+ "normalization": "Same TWiN Cloud options, complete-job and submission queues, shared rate-limit cooldown, queued follow-ups, complete audio Blob results and cancellation contract. Existing imports, stored provider IDs and credentials remain valid without migration."
3122
3122
  },
3123
3123
  {
3124
3124
  "id": "browser-speech:createTwinCloudTTSProvider",
@@ -3129,10 +3129,10 @@
3129
3129
  "entrypoints": ["arcane-os/ai/browser-speech"],
3130
3130
  "primaryImport": "arcane-os/ai/browser-speech",
3131
3131
  "group": "Browser speech providers",
3132
- "summary": "Creates an explicitly selected TWiN Cloud remote TTS provider with immediate synthesis submission and configurable queued audio follow-ups.",
3132
+ "summary": "Creates an explicitly selected TWiN Cloud remote TTS provider with complete-job queues and independently configurable follow-up HTTP scheduling.",
3133
3133
  "availability": "Browser or Node with Fetch, Blob, AbortController, and an application-owned inference key",
3134
3134
  "protocol": "arcane-ai-provider/2 tts/synthesize",
3135
- "normalization": "Construction and activation make no adapter network requests. SDK initial POSTs bypass the provider-local js-queue; follow-up status/result/audio GETs use followUpQueue capacity and cadence through complete body consumption. Retry-After affects only its job. Whole-job maxConcurrentRequests remains independent. Local Kokoro and Whisper paths are unchanged. Applications own model, voice, credentials, activation, and queue settings."
3135
+ "normalization": "Construction and activation make no adapter network requests. Whole-job slots cover credentials, submission, remote completion and complete audio. Initial POST attempts and eligible retries are queued; HTTP 429 sets a shared cooldown. Follow-up status/result/audio reads use independent capacity and cadence through complete body consumption. Ambiguous paid POST failures are surfaced without replay. Applications own model, voice, credentials, activation and queue settings."
3136
3136
  },
3137
3137
  {
3138
3138
  "id": "browser-speech:createBrowserSpeechRecognitionProvider",
@@ -3162,7 +3162,7 @@
3162
3162
  "summary": "Creates a local-only Kokoro text-to-speech provider for the provider-neutral AI runtime.",
3163
3163
  "availability": "Browser with DBOPFS, Web Locks, Workers, object URLs, and caller-selected kokoro-js runtime/model content",
3164
3164
  "protocol": "arcane-ai-provider/2 tts/synthesize",
3165
- "normalization": "Independent load, status, request, unload, cancellation, and disposal; provider-native requests return 24000 Hz Float32Array PCM, while shared AI.js requests use wav and return complete Uint8Array audio/wav data; never selects a cloud fallback"
3165
+ "normalization": "Independent load, status, request, unload, cancellation and disposal; optional ordinary model.voices records remain complete in the synchronous catalog without loading or constraining synthesis. Provider-native requests return 24000 Hz Float32Array PCM, while shared AI.js requests use wav and return complete Uint8Array audio/wav data; never selects a cloud fallback"
3166
3166
  },
3167
3167
  {
3168
3168
  "id": "browser-speech:createBrowserSpeechArtifactGraph",
@@ -3466,6 +3466,34 @@
3466
3466
  "protocol": "TWiN Cloud native System One request",
3467
3467
  "normalization": "Preserves complete state and questions within JSON transport and returns the full parsed provider result; shares existing JSON transport retry, diagnostics, and cancellation; leaves model choice, scales, and answer interpretation with the caller and retains no history"
3468
3468
  },
3469
+ {
3470
+ "id": "browser-speech:createBrowserSpeechSynthesisProvider",
3471
+ "name": "createBrowserSpeechSynthesisProvider",
3472
+ "displayName": "createBrowserSpeechSynthesisProvider()",
3473
+ "kind": "function",
3474
+ "signature": "createBrowserSpeechSynthesisProvider({id,model,language}={})",
3475
+ "entrypoints": ["arcane-os/ai/browser-speech"],
3476
+ "primaryImport": "arcane-os/ai/browser-speech",
3477
+ "group": "Native browser speech",
3478
+ "summary": "Creates a native browser TTS provider with silent voice discovery and preparation, live catalog subscriptions, and owned playback.",
3479
+ "availability": "Browser with speechSynthesis and SpeechSynthesisUtterance; no SDK model, Worker or storage required",
3480
+ "protocol": "arcane-ai-provider/2 tts/synthesize with native-speech playback descriptors",
3481
+ "normalization": "Preserves complete input and native voiceURI/language metadata; setDefaultVoice changes future preparations without replacing the provider; explicit playback owns order, pause, resume, stop, completion and release; browser voices may use remote services and no audio file is fabricated"
3482
+ },
3483
+ {
3484
+ "id": "twin-cloud:generateImages",
3485
+ "name": "generateImages",
3486
+ "displayName": "generateImages()",
3487
+ "kind": "function",
3488
+ "signature": "async generateImages({model,prompt,parameters={},twinKey,getApiKey,signal=null,id=Date.now(),onRequest,onResponse,onProgress}={})",
3489
+ "entrypoints": ["arcane-os/ai/twin-cloud"],
3490
+ "primaryImport": "arcane-os/ai/twin-cloud",
3491
+ "group": "TWiN Cloud image generation",
3492
+ "summary": "Generates caller-selected images and returns every image as a Blob in provider order.",
3493
+ "availability": "Node and Browser with Fetch, Blob and AbortController; remote HTTPS provider",
3494
+ "protocol": "TWiN Cloud async FAL Flux Schnell or Stable Diffusion image generation",
3495
+ "normalization": "Returns {images:[{blob,mediaType,width?,height?}]}; preserves complete prompts and provider parameters, observes semantic progress and complete diagnostics, submits once, polls accepted jobs, propagates cancellation and retains no history or durable media"
3496
+ },
3469
3497
  {
3470
3498
  "id": "twin-cloud:fetchHTTPResponse",
3471
3499
  "name": "fetchHTTPResponse",
@@ -5,7 +5,7 @@
5
5
  "repository": "https://github.com/TheWizardNexus/arcane-os-sdk.git",
6
6
  "branch": "main",
7
7
  "path": "runtime/arcane/components",
8
- "sdkVersion": "0.7.2"
8
+ "sdkVersion": "0.51.1"
9
9
  },
10
10
  "componentCount": 41,
11
11
  "loader": "/arcane/modules/HTMLImport.js",
@@ -149,7 +149,7 @@
149
149
  {
150
150
  "file": "runtime/arcane/components/chat.html",
151
151
  "name": "chat.html",
152
- "purpose": "Shared chat, visible selected-model activation/progress, masked auto-scrolling transcript, structural tool inspection/settlement, speech, language, and conversation-timebox surface.",
152
+ "purpose": "Shared chat, selected-model activation/progress, complete streamed transcript, structural tool settlement, editable speech drafts, rendered printing, language, and conversation timeboxes.",
153
153
  "methods": [
154
154
  "streamMessage()",
155
155
  "setMessageProgress()",
@@ -166,6 +166,11 @@
166
166
  "pendingToolCall",
167
167
  "pendingToolCalls",
168
168
  "sendMessage()",
169
+ "appendDraft()",
170
+ "transcriptionMode",
171
+ "recognitionLanguage",
172
+ "print()",
173
+ "printTitle",
169
174
  "languageChanged()",
170
175
  "requestAIActivation()",
171
176
  "destroy()"
@@ -195,7 +200,7 @@
195
200
  ],
196
201
  "availability": "Browser and supported native WebViews",
197
202
  "transport": "HTMLImport + DOM; injected Arcane/provider modules where listed",
198
- "normalization": "UI/runtime state, honest model progress, complete timestamped transcript including ui_hidden stored records, exact saved nonblank assistant display names with AI fallback rather than current-name inference, live session name capture with host.aiName display fallback, user-facing structural arguments.message, nonblank all-ID tool-result restoration, collapsed complete raw inspection, ordered parallel-call replay validation, per-choice streamed/terminal complete-envelope correlation, complete nonstructural stream rendering, automatic repeated-formatting-mark removal from only the outbound speech-input copy while displayed and stored Markdown stays exact, generic visible failure outcomes with complete console diagnostics, atomic executed/declined/cancelled/not-executed result batches with one continuation, plural pending-call reload recovery, reentrant terminal-event ownership, and BFCache-preserving page lifecycle are normalized; destroy aborts observation and returns true once/false thereafter; AI/storage/media behavior remains mixed"
203
+ "normalization": "Default completed-transcription submit or opt-in transcriptionMode=draft, complete appendDraft text with preserved existing selection, native interim-range ownership, and rendered conversation print/printTitle are normalized. No-retention submissions stay outside transcript, recurring context, memory, and DBOPFS. UI/runtime state, honest model progress, complete timestamped transcript including ui_hidden stored records, exact saved nonblank assistant display names with AI fallback rather than current-name inference, live session name capture with host.aiName display fallback, user-facing structural arguments.message, nonblank all-ID tool-result restoration, collapsed complete raw inspection, ordered parallel-call replay validation, per-choice streamed/terminal complete-envelope correlation, complete nonstructural stream rendering, automatic repeated-formatting-mark removal from only the outbound speech-input copy while displayed and stored Markdown stays exact, generic visible failure outcomes with complete console diagnostics, atomic executed/declined/cancelled/not-executed result batches with one continuation, plural pending-call reload recovery, reentrant terminal-event ownership, and BFCache-preserving page lifecycle are normalized; destroy aborts observation and returns true once/false thereafter; AI/storage/media behavior remains mixed"
199
204
  },
200
205
  {
201
206
  "file": "runtime/arcane/components/conversation-view.html",
@@ -276,6 +281,8 @@
276
281
  "methods": [
277
282
  "beforeOpen()",
278
283
  "open()",
284
+ "close()",
285
+ "printPreview()",
279
286
  "destroy()"
280
287
  ],
281
288
  "events": [
@@ -287,7 +294,7 @@
287
294
  ],
288
295
  "availability": "Browser and supported native WebViews",
289
296
  "transport": "HTMLImport + DOM; injected Arcane/provider modules where listed",
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."
297
+ "normalization": "DOM-native result. close() closes the child preview before the containing dialog and preserves the settled preview if closure is refused; printPreview() delegates to the active child print view. 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
298
  },
292
299
  {
293
300
  "file": "runtime/arcane/components/directory-picker.html",
@@ -404,6 +411,8 @@
404
411
  "setDirectoryFilter()",
405
412
  "select()",
406
413
  "clearSelection()",
414
+ "close()",
415
+ "printPreview()",
407
416
  "destroy()"
408
417
  ],
409
418
  "events": [
@@ -421,7 +430,7 @@
421
430
  ],
422
431
  "availability": "Browser and supported native WebViews",
423
432
  "transport": "HTMLImport + DOM; injected Arcane/provider modules where listed",
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. Assistant conversation labels use the exact nonblank string name or AI without a role suffix; other role labels retain existing name/role presentation. User and assistant cards have distinct theme backgrounds and preserve data-role. 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."
433
+ "normalization": "Rendered printPreview() awaits selected-view readiness and preserves resources through afterprint. close() cancels pending opening and releases the settled preview only after successful closure. Declared image records in JSON-family files decode through MarkdownMedia while ordinary JSON and application preview hooks keep their presentation. 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. Assistant conversation labels use the exact nonblank string name or AI without a role suffix; other role labels retain existing name/role presentation. User and assistant cards have distinct theme backgrounds and preserve data-role. 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."
425
434
  },
426
435
  {
427
436
  "file": "runtime/arcane/components/header.html",
@@ -515,11 +524,13 @@
515
524
  {
516
525
  "file": "runtime/arcane/components/markdown-editor.html",
517
526
  "name": "markdown-editor.html",
518
- "purpose": "Configurable Markdown authoring, toolbar, preview, plain-text title, and save surface with optional bounded input/preview panes and edit-position following.",
527
+ "purpose": "Markdown authoring, toolbar, live media preview, plain-text title, insertion, rendered printing, and saving, with optional input/preview panes and edit-position following.",
519
528
  "methods": [
520
529
  "configure()",
521
530
  "focus()",
522
531
  "clear()",
532
+ "insertMarkdown()",
533
+ "print()",
523
534
  "saveEntry()",
524
535
  "destroy()"
525
536
  ],
@@ -535,7 +546,7 @@
535
546
  ],
536
547
  "availability": "Browser and supported native WebViews",
537
548
  "transport": "HTMLImport + DOM; injected Arcane/provider modules where listed",
538
- "normalization": "Editor values and optional presentation behavior normalized; injected save result mixed. fit and followPreview default false, preserve omitted prior configuration, and accept explicit false resets; data-fit and data-follow-preview select the initial options. Fit requires an application-bounded host and provides independent input/preview scrolling in roomy columns or narrow stacked panes without changing the application shell. Following responds to body typing/format edits, leaves manual preview scrolling independent until the next edit, and does not treat title edits or programmatic value replacement as follow requests. Preview rendering preserves the current source viewport and selection; configuration/value replacement retain source offsets and applicable selection positions, and layout changes never reattach the textarea. Formatting selects the formatted text without panning the source or its ancestors. Native typing, keyboard selection, and manual source scrolling remain independent without deferred scroll restoration. Public parts editor/title/toolbar/input/preview/actions/status/save-action allow application styling while the title stays native plain text. Existing controls, complete save payload, save cancellation, and destruction behavior remain."
549
+ "normalization": "insertMarkdown(text) replaces the current selection through the existing complete change lifecycle; print() captures the rendered preview without saving. Local MarkdownMedia images hydrate independently and remain owned through print. Editor values and optional presentation behavior normalized; injected save result mixed. fit and followPreview default false, preserve omitted prior configuration, and accept explicit false resets; data-fit and data-follow-preview select the initial options. Fit requires an application-bounded host and provides independent input/preview scrolling in roomy columns or narrow stacked panes without changing the application shell. Following responds to body typing/format edits, leaves manual preview scrolling independent until the next edit, and does not treat title edits or programmatic value replacement as follow requests. Preview rendering preserves the current source viewport and selection; configuration/value replacement retain source offsets and applicable selection positions, and layout changes never reattach the textarea. Formatting selects the formatted text without panning the source or its ancestors. Native typing, keyboard selection, and manual source scrolling remain independent without deferred scroll restoration. Public parts editor/title/toolbar/input/preview/actions/status/save-action allow application styling while the title stays native plain text. Existing controls, complete save payload, save cancellation, and destruction behavior remain."
539
550
  },
540
551
  {
541
552
  "file": "runtime/arcane/components/media-embed.html",
@@ -789,7 +800,7 @@
789
800
  {
790
801
  "file": "runtime/arcane/components/speech.html",
791
802
  "name": "speech.html",
792
- "purpose": "Coordinates explicit speech-to-text activation, request cancellation, speech controls, transcription completion, mute state, and microphone availability.",
803
+ "purpose": "Coordinates selected speech providers, native recognition language and live progress, transcription completion, cancellation, TTS mute state, and microphone availability.",
793
804
  "methods": [
794
805
  "configure()",
795
806
  "setMuted()",
@@ -799,10 +810,13 @@
799
810
  "availability",
800
811
  "muted",
801
812
  "initialMuted",
813
+ "recognitionLanguage",
814
+ "displayTranscription",
802
815
  "componentReady"
803
816
  ],
804
817
  "events": [
805
818
  "speech-ready",
819
+ "speech-transcription-progress",
806
820
  "speech-transcription-complete",
807
821
  "speech-transcription-error",
808
822
  "speech-transcription-cancelled",
@@ -821,7 +835,7 @@
821
835
  ],
822
836
  "availability": "Browser and supported native WebViews",
823
837
  "transport": "HTMLImport + DOM; injected Arcane/provider modules where listed",
824
- "normalization": "UI/runtime state, explicit STT activation intent, request-owned cancellation, capture generation/operation correlation, and BFCache-preserving page lifecycle are normalized; pending release retires only its generation and stale permission settlement cannot clear a newer retry; persisted pageshow resynchronizes mute state and rerenders retained controls/status, while nonpersisted pagehide destroys; provider/model authority and media behavior remain external"
838
+ "normalization": "Explicit native recognition emits cumulative final text and transient interim hypotheses with the original capture operationId. recognitionLanguage accepts exact BCP47 tags independently of conversation language; the desktop live-mode picker opens with all suggestions and filters only after editing. displayTranscription defaults true and may be disabled when Chat owns its editable draft. UI/runtime state, explicit STT activation intent, request-owned cancellation, capture generation/operation correlation, and BFCache-preserving page lifecycle are normalized; pending release retires only its generation and stale permission settlement cannot clear a newer retry; persisted pageshow resynchronizes mute state and rerenders retained controls/status, while nonpersisted pagehide destroys; provider/model authority and media behavior remain external"
825
839
  },
826
840
  {
827
841
  "file": "runtime/arcane/components/summary-strip.html",
@@ -992,7 +1006,7 @@
992
1006
  {
993
1007
  "file": "runtime/arcane/components/voice-transcription.html",
994
1008
  "name": "voice-transcription.html",
995
- "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.",
1009
+ "purpose": "Records manual or continuous microphone input, including explicitly selected native recognition, with complete live output, ordered transcription and saves, retained failures, retry, and cancellation.",
996
1010
  "methods": [
997
1011
  "configure()",
998
1012
  "requestSTTActivation()",
@@ -1029,7 +1043,7 @@
1029
1043
  ],
1030
1044
  "availability": "Browser and supported native WebViews",
1031
1045
  "transport": "HTMLImport + DOM; injected Arcane/provider modules where listed",
1032
- "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."
1046
+ "normalization": "Selected native recognition puts canonical text, queued final segments, and transient interim text in the existing live output in order; only confirmed text enters value and the ordered save queue. Native stop drains final results; browser end does not restart capture. 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."
1033
1047
  },
1034
1048
  {
1035
1049
  "file": "runtime/arcane/components/weather-widget.html",
@@ -1,15 +1,18 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "source": {
4
- "commit": "567ad110bf57a1c2d4a3daa22ae93716cc5f4d7e",
5
- "bundleVersion": "0.8.12"
4
+ "authority": "sdk-canonical",
5
+ "repository": "https://github.com/TheWizardNexus/arcane-os-sdk.git",
6
+ "branch": "main",
7
+ "path": "runtime/arcane/entities",
8
+ "sdkVersion": "0.51.1"
6
9
  },
7
10
  "moduleCount": 14,
8
11
  "exportCount": 30,
9
12
  "modules": [
10
13
  {"file":"runtime/arcane/entities/ApiModelRecord.js","exports":["default"],"availability":"cross-host","normalization":"normalized"},
11
14
  {"file":"runtime/arcane/entities/Calculation.js","exports":["default"],"availability":"cross-host","normalization":"normalized"},
12
- {"file":"runtime/arcane/entities/Chat.js","exports":["default"],"availability":"browser/native-webview","normalization":"New default filenames combine the timestamp with an independent random identifier; explicit and saved filenames remain unchanged. Provider-facing recurring messages preserve raw structural protocol only for the one active matching continuation, then replace settled exchanges with complete ordinary visible content; transcript records remain sanitized and readable, including ui_hidden rows. aiName defaults to empty; addAIMessage and addTurn capture an optional exact nonblank application-owned name on new assistant records only. Provider names do not establish display attribution; assistant display names stay out of messages and memory extraction, and existing records are never renamed or rewritten. ordered parallel structural calls require one exact nonblank result for every pending ID in one atomic turn, with rollback-safe persistence."},
15
+ {"file":"runtime/arcane/entities/Chat.js","exports":["default"],"availability":"browser/native-webview","normalization":"Per-message persist:false and entity-wide persist=false skip new retained messages, transcript records, memory extraction, and DBOPFS writes; prior retained history and already accepted writes remain untouched. Requested tool records use the call message; settled tool records use the supplied public result message. New default filenames combine the timestamp with an independent random identifier; explicit and saved filenames remain unchanged. Provider-facing recurring messages preserve raw structural protocol only for the one active matching continuation, then replace settled exchanges with complete ordinary visible content; transcript records remain sanitized and readable, including ui_hidden rows. aiName defaults to empty; addAIMessage and addTurn capture an optional exact nonblank application-owned name on new assistant records only. Provider names do not establish display attribution; assistant display names stay out of messages and memory extraction, and existing records are never renamed or rewritten. ordered parallel structural calls require one exact nonblank result for every pending ID in one atomic turn, with rollback-safe persistence."},
13
16
  {"file":"runtime/arcane/entities/CommunicationMessage.js","exports":["communicationChannels","default"],"availability":"cross-host","normalization":"normalized"},
14
17
  {"file":"runtime/arcane/entities/CommunicationThread.js","exports":["default"],"availability":"cross-host","normalization":"normalized"},
15
18
  {"file":"runtime/arcane/entities/Document.js","exports":["default"],"availability":"browser/native-webview","normalization":"mixed"},