arcane-os 0.5.8 → 0.5.9
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 +16 -0
- package/README.md +32 -27
- package/browser-runtime/ai/browser-speech-artifacts.mjs +23 -1683
- package/browser-runtime/ai/browser-speech-providers.mjs +353 -143
- package/browser-runtime/ai/browser-wasm-llm-provider.mjs +32 -324
- package/browser-runtime/ai/speech-worker-client.mjs +51 -14
- package/browser-runtime/ai/speech-worker-runtime.mjs +45 -1072
- package/browser-runtime/dependencies/strong-type/package.json +22 -23
- package/browser-runtime/event-manager.mjs +27 -41
- package/package.json +2 -3
- package/runtime/arcane/components/chat.html +1 -1
- package/runtime/arcane/components/speech.html +8 -38
- package/runtime/arcane/components/voice-transcription.html +1 -1
- package/runtime/arcane/css/theme.css +1 -1
- package/runtime/arcane/entities/Chat.js +12 -7
- package/runtime/arcane/modules/AI.js +506 -391
- package/runtime/arcane/modules/AIPreferenceTuple.js +1 -1
- package/runtime/arcane/modules/AIProviderRuntime.js +129 -68
- package/runtime/arcane/modules/AIRuntimeState.js +2 -18
- package/runtime/arcane/modules/BrowserTestSuite.js +2 -5
- package/runtime/arcane/modules/CalculatorEngine.js +0 -4
- package/runtime/arcane/modules/ChatRecords.js +169 -1
- package/runtime/arcane/modules/CommunicationHub.js +0 -19
- package/runtime/arcane/modules/ConfiguredAIChatSession.js +28 -25
- package/runtime/arcane/modules/DBOPFSDocumentLibrary.js +4 -5
- package/runtime/arcane/modules/DocumentLexicalSearch.js +1 -1
- package/runtime/arcane/modules/Errors.js +6 -19
- package/runtime/arcane/modules/Mail.js +1 -2
- package/runtime/arcane/modules/MailTransport.mjs +1 -3
- package/runtime/arcane/modules/OllamaModelIdentifier.js +1 -1
- package/runtime/arcane/modules/PersistentAIChatSession.js +5 -5
- package/runtime/arcane/modules/ScreenCapture.js +2 -4
- package/runtime/arcane/modules/SpeechPlayback.js +0 -27
- package/runtime/arcane/modules/WaitForComponent.js +0 -1
- package/src/app-descriptor.mjs +1 -1
- package/src/doctor.mjs +1 -3
- package/src/event-manager.mjs +27 -41
- package/src/import-map.mjs +1 -1
- package/src/index.mjs +2 -9
- package/src/installed-sdk-runtime.mjs +1 -11
- package/src/mail-api.mjs +0 -1
- package/src/native-provider-loader.mjs +0 -9
- package/src/scaffold.mjs +9 -21
- package/src/toolchain.mjs +5 -28
- package/src/workspace-runtime.mjs +0 -4
- package/src/workspace.mjs +2 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.9
|
|
4
|
+
|
|
5
|
+
- Renamed the built-in TWiN Cloud provider and default-model preference sentinel
|
|
6
|
+
to `TWIN`. Applications must explicitly update saved `OPENAI` LLM selections;
|
|
7
|
+
the SDK does not alias the old identifier or rewrite persisted preferences.
|
|
8
|
+
Real upstream model names, wire behavior, and on-device speech remain intact.
|
|
9
|
+
- Restored immediate streamed-speech synthesis admission with bounded,
|
|
10
|
+
provider-declared TTS concurrency and FIFO overflow while retaining exact
|
|
11
|
+
chunk text, cancellation, lifecycle ownership, and original playback order.
|
|
12
|
+
- Added a bounded Kokoro Worker/model-session pool with GPU-first WebGPU loading,
|
|
13
|
+
explicit WebGPU or WASM selection, and an honest automatic WASM fallback that
|
|
14
|
+
preserves the caller-selected model, dtype, and voice.
|
|
15
|
+
- Scheduled each contiguous ready audio buffer directly after its predecessor
|
|
16
|
+
on the `AudioContext` clock, removing callback-added stitching gaps without
|
|
17
|
+
trimming, crossfading, resampling, merging, or rewriting speech content.
|
|
18
|
+
|
|
3
19
|
## 0.5.8
|
|
4
20
|
|
|
5
21
|
- Added provider-neutral `reasoningEffort` to `AI.fetchRequest()` and
|
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 preserve the same app URLs, theme, packaging,
|
|
20
20
|
event, cancellation, and browser run contracts.
|
|
21
21
|
|
|
22
|
-
This checkout defines the `0.5.
|
|
22
|
+
This checkout defines the `0.5.9` 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
|
|
|
@@ -70,28 +70,30 @@ is coordinated separately and cannot become a second source authority.
|
|
|
70
70
|
|
|
71
71
|
The source-authority cutover is complete. `runtime/arcane/` is authored here,
|
|
72
72
|
and applications copy the complete portable inventory selected by the package.
|
|
73
|
-
The old Arcane OS-to-SDK synchronization direction is retired; it cannot
|
|
74
|
-
overwrite SDK-canonical source.
|
|
75
|
-
|
|
76
|
-
`tools/runtime-source.json` declares the SDK authority and retains the prior
|
|
77
|
-
Arcane OS commit only as migration history.
|
|
78
73
|
Arcane OS must consume the same locked SDK projection as other applications;
|
|
79
|
-
|
|
80
|
-
authority
|
|
74
|
+
an OS-side duplicate is consumer projection state, not source authority. Git
|
|
75
|
+
history records the completed source-authority migration; the current tree has
|
|
76
|
+
no OS-to-SDK synchronization command or migration-only runtime-source record.
|
|
81
77
|
|
|
82
78
|
## TWiN Cloud
|
|
83
79
|
|
|
84
|
-
TWiN Cloud is the SDK's default remote language-model service
|
|
85
|
-
|
|
80
|
+
TWiN Cloud is the SDK's default remote language-model service, identified by
|
|
81
|
+
`TWIN`. It sends chat-completion requests to
|
|
86
82
|
`https://inference.do-ai.run/v1/chat/completions` with model
|
|
87
83
|
`openai-gpt-oss-120b`. Supply the bearer credential through `ai.twinKey` or
|
|
88
84
|
`globalThis.arcane.config.twinCloud.accessKey`. The established `ai.license`
|
|
89
|
-
property
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
property remains available. Applications should present the service and
|
|
86
|
+
credential as **TWiN Cloud** and **TWiN access key**. The TWiN key is used only
|
|
87
|
+
for remote LLM chat. Audio stays
|
|
92
88
|
on device: Whisper (`LOCAL_SPEACH` / `whisper-small`) owns transcription and
|
|
93
89
|
Kokoro (`LOCAL_SPEACH` / `kokoro`) owns speech synthesis. Neither audio route
|
|
94
|
-
uses the TWiN key, and
|
|
90
|
+
uses the TWiN key, and neither requires a cloud audio key.
|
|
91
|
+
|
|
92
|
+
The built-in provider and default-model preference sentinel are both `TWIN`.
|
|
93
|
+
Applications upgrading saved `OPENAI` LLM selections must explicitly update
|
|
94
|
+
those app-owned settings to `TWIN`. The SDK provides no built-in `OPENAI` alias
|
|
95
|
+
and does not rewrite saved preferences. Actual upstream model identifiers remain
|
|
96
|
+
unchanged.
|
|
95
97
|
|
|
96
98
|
`fetchRequest()` and `streamRequest()` accept the provider-neutral
|
|
97
99
|
`reasoningEffort` option with `none`, `low`, `medium`, `high`, or `max`. TWiN
|
|
@@ -136,9 +138,6 @@ workers (four by default) over deterministic, resumable HTTP range parts of
|
|
|
136
138
|
roughly 4 MB each, up to 4,096 parts, when the server confirms `206` responses
|
|
137
139
|
and the total comes from `Content-Range` or, when that header is not exposed,
|
|
138
140
|
optional declared `bytes`.
|
|
139
|
-
An incomplete cache written by 0.5.3 keeps its completed coarse parts and
|
|
140
|
-
subdivides only the missing intervals into the smaller current parts, so an SDK
|
|
141
|
-
update preserves existing progress while reducing later refresh loss.
|
|
142
141
|
When a followed redirect turns the first Range probe into `200`, the SDK probes
|
|
143
142
|
the final URL directly before reusing that original response as the single-fetch
|
|
144
143
|
fallback. Completed range parts survive restart and are presented to Wllama as
|
|
@@ -147,8 +146,8 @@ Range worker per member, so completed parts within a shard can also resume
|
|
|
147
146
|
without multiplying the configured transfer bound. A probe without an
|
|
148
147
|
observable or declared total falls back to one full fetch. Once a complete
|
|
149
148
|
whole file or Range set is available, the store removes superseded fragments
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
when DBOPFS deletion succeeds; cleanup failure is warned without hiding the
|
|
150
|
+
usable model.
|
|
152
151
|
Capability reports evaluate each
|
|
153
152
|
app-supplied model as `compatible`, `incompatible`, or `unknown`; the app can
|
|
154
153
|
render that result without the SDK inventing or filtering its catalog.
|
|
@@ -158,7 +157,10 @@ provider factories. The package contains the plain-JavaScript provider and
|
|
|
158
157
|
Worker machinery, not speech runtimes, models, voices, or a CDN default. An app
|
|
159
158
|
must supply each runtime/model selection explicitly. Speech roles
|
|
160
159
|
load, cancel, unload, fail, and recover independently, so speech failure never
|
|
161
|
-
silently falls back or prevents text chat.
|
|
160
|
+
silently falls back or prevents text chat. Kokoro defaults to a two-slot Worker
|
|
161
|
+
and model-session pool: it selects WebGPU when the browser can load the complete
|
|
162
|
+
pool and otherwise recreates that pool on WASM. Apps may select `webgpu` or
|
|
163
|
+
`wasm` explicitly and may set the bounded TTS capacity from one through four.
|
|
162
164
|
|
|
163
165
|
Applications that need faster spoken-response onset can configure the shared
|
|
164
166
|
TTS stream without taking over synthesis or playback:
|
|
@@ -172,7 +174,10 @@ ai.configureTTSSegmentation({
|
|
|
172
174
|
|
|
173
175
|
The compatibility default remains sentence punctuation with no word cadence.
|
|
174
176
|
The configured stream preserves every character and punctuation mark, chooses
|
|
175
|
-
the earliest complete boundary,
|
|
177
|
+
the earliest complete boundary, begins synthesis as each segment becomes
|
|
178
|
+
available, and plays the completed audio in exact segment order. Ready adjacent
|
|
179
|
+
buffers are scheduled consecutively on the browser audio clock rather than
|
|
180
|
+
waiting for an `ended` callback before the next start.
|
|
176
181
|
Any-punctuation mode recognizes boundaries without requiring whitespace while
|
|
177
182
|
keeping apostrophes, commas, and hyphens that join Unicode letters or numbers
|
|
178
183
|
inside the same segment.
|
|
@@ -199,7 +204,7 @@ uses the same controller for automatic memory extraction.
|
|
|
199
204
|
Create a new repository-shaped Arcane application with the exact stable SDK:
|
|
200
205
|
|
|
201
206
|
```bash
|
|
202
|
-
npx arcane-os@0.5.
|
|
207
|
+
npx arcane-os@0.5.9 new my-app --path ./my-app --target portable --git
|
|
203
208
|
cd my-app
|
|
204
209
|
npm install
|
|
205
210
|
npm run check
|
|
@@ -210,7 +215,7 @@ To enroll an existing repository, install the exact SDK and initialize only
|
|
|
210
215
|
missing Arcane files:
|
|
211
216
|
|
|
212
217
|
```bash
|
|
213
|
-
npm install --save-dev --save-exact arcane-os@0.5.
|
|
218
|
+
npm install --save-dev --save-exact arcane-os@0.5.9
|
|
214
219
|
npm exec -- arcane init my-app --target portable
|
|
215
220
|
```
|
|
216
221
|
|
|
@@ -226,7 +231,7 @@ npm exec -- arcane-os targets
|
|
|
226
231
|
No global SDK install or standalone Arcane CLI is required. The application
|
|
227
232
|
repository's exact npm dependency and lockfile own the CLI and toolchain version.
|
|
228
233
|
|
|
229
|
-
Use `npx arcane-os@0.5.
|
|
234
|
+
Use `npx arcane-os@0.5.9` for the initial bootstrap because it names this npm
|
|
230
235
|
package explicitly; bare `npx arcane` outside an installed project could resolve
|
|
231
236
|
a different package. Both installed commands invoke the same headless toolchain.
|
|
232
237
|
Project-local npm scripts use the SDK pinned by that app's `package-lock.json`,
|
|
@@ -247,7 +252,7 @@ node ./bin/arcane.mjs new local-app --path ../local-app --target portable --git
|
|
|
247
252
|
|
|
248
253
|
# From the generated app repository
|
|
249
254
|
cd ../local-app
|
|
250
|
-
npm install --save-dev --save-exact ../arcane-os-sdk/arcane-os-0.5.
|
|
255
|
+
npm install --save-dev --save-exact ../arcane-os-sdk/arcane-os-0.5.9.tgz
|
|
251
256
|
npm run check
|
|
252
257
|
npm ci
|
|
253
258
|
```
|
|
@@ -257,7 +262,7 @@ same location. The lockfile retains the selected package dependency while
|
|
|
257
262
|
Arcane uses the installed package name and version. Local directory `file:` dependencies are not
|
|
258
263
|
accepted because npm may install them as links; use a packed `.tgz`. A GitHub
|
|
259
264
|
runner also needs that tarball at the locked path. After publication, replace
|
|
260
|
-
the local declaration with the exact `arcane-os@0.5.
|
|
265
|
+
the local declaration with the exact `arcane-os@0.5.9` registry package and
|
|
261
266
|
commit the regenerated lock.
|
|
262
267
|
|
|
263
268
|
Generated repositories use `npm ci --ignore-scripts` in CI. Run dependency
|
|
@@ -395,7 +400,7 @@ package installation, or assertions.
|
|
|
395
400
|
|
|
396
401
|
## Current target support
|
|
397
402
|
|
|
398
|
-
Version `0.5.
|
|
403
|
+
Version `0.5.9` exposes one browser target and five explicitly paired
|
|
399
404
|
native development targets: a non-runnable portable directory, a
|
|
400
405
|
Windows x64 unsigned-local-test EXE bundle, Linux x64 and Linux ARM64
|
|
401
406
|
unsigned-local-test DEBs, and an Android development-signed APK. The
|