arcane-os 0.5.7 → 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 +25 -0
- package/README.md +39 -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 +569 -402
- 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,30 @@
|
|
|
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
|
+
|
|
19
|
+
## 0.5.8
|
|
20
|
+
|
|
21
|
+
- Added provider-neutral `reasoningEffort` to `AI.fetchRequest()` and
|
|
22
|
+
`AI.streamRequest()`, accepting `none`, `low`, `medium`, `high`, or
|
|
23
|
+
`max`. TWiN Cloud forwards an explicit value as `reasoning_effort`, omits
|
|
24
|
+
the field when unspecified, and preserves explicit
|
|
25
|
+
`openai-gpt-oss-120b` or `openai-gpt-oss-20b` model selection with the
|
|
26
|
+
existing streaming and structural-tool behavior.
|
|
27
|
+
|
|
3
28
|
## 0.5.7
|
|
4
29
|
|
|
5
30
|
- Added `PersistentAIChatSession.open()` for model-authored conversation
|
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,37 @@ 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.
|
|
97
|
+
|
|
98
|
+
`fetchRequest()` and `streamRequest()` accept the provider-neutral
|
|
99
|
+
`reasoningEffort` option with `none`, `low`, `medium`, `high`, or `max`. TWiN
|
|
100
|
+
Cloud maps it to DigitalOcean Serverless Inference `reasoning_effort`; omitting
|
|
101
|
+
it preserves the provider default. TWiN Cloud defaults to
|
|
102
|
+
`openai-gpt-oss-120b`, and applications may explicitly select
|
|
103
|
+
`openai-gpt-oss-20b` without changing streaming or structural-tool behavior.
|
|
95
104
|
|
|
96
105
|
## Browser-local AI
|
|
97
106
|
|
|
@@ -129,9 +138,6 @@ workers (four by default) over deterministic, resumable HTTP range parts of
|
|
|
129
138
|
roughly 4 MB each, up to 4,096 parts, when the server confirms `206` responses
|
|
130
139
|
and the total comes from `Content-Range` or, when that header is not exposed,
|
|
131
140
|
optional declared `bytes`.
|
|
132
|
-
An incomplete cache written by 0.5.3 keeps its completed coarse parts and
|
|
133
|
-
subdivides only the missing intervals into the smaller current parts, so an SDK
|
|
134
|
-
update preserves existing progress while reducing later refresh loss.
|
|
135
141
|
When a followed redirect turns the first Range probe into `200`, the SDK probes
|
|
136
142
|
the final URL directly before reusing that original response as the single-fetch
|
|
137
143
|
fallback. Completed range parts survive restart and are presented to Wllama as
|
|
@@ -140,8 +146,8 @@ Range worker per member, so completed parts within a shard can also resume
|
|
|
140
146
|
without multiplying the configured transfer bound. A probe without an
|
|
141
147
|
observable or declared total falls back to one full fetch. Once a complete
|
|
142
148
|
whole file or Range set is available, the store removes superseded fragments
|
|
143
|
-
|
|
144
|
-
|
|
149
|
+
when DBOPFS deletion succeeds; cleanup failure is warned without hiding the
|
|
150
|
+
usable model.
|
|
145
151
|
Capability reports evaluate each
|
|
146
152
|
app-supplied model as `compatible`, `incompatible`, or `unknown`; the app can
|
|
147
153
|
render that result without the SDK inventing or filtering its catalog.
|
|
@@ -151,7 +157,10 @@ provider factories. The package contains the plain-JavaScript provider and
|
|
|
151
157
|
Worker machinery, not speech runtimes, models, voices, or a CDN default. An app
|
|
152
158
|
must supply each runtime/model selection explicitly. Speech roles
|
|
153
159
|
load, cancel, unload, fail, and recover independently, so speech failure never
|
|
154
|
-
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.
|
|
155
164
|
|
|
156
165
|
Applications that need faster spoken-response onset can configure the shared
|
|
157
166
|
TTS stream without taking over synthesis or playback:
|
|
@@ -165,7 +174,10 @@ ai.configureTTSSegmentation({
|
|
|
165
174
|
|
|
166
175
|
The compatibility default remains sentence punctuation with no word cadence.
|
|
167
176
|
The configured stream preserves every character and punctuation mark, chooses
|
|
168
|
-
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.
|
|
169
181
|
Any-punctuation mode recognizes boundaries without requiring whitespace while
|
|
170
182
|
keeping apostrophes, commas, and hyphens that join Unicode letters or numbers
|
|
171
183
|
inside the same segment.
|
|
@@ -192,7 +204,7 @@ uses the same controller for automatic memory extraction.
|
|
|
192
204
|
Create a new repository-shaped Arcane application with the exact stable SDK:
|
|
193
205
|
|
|
194
206
|
```bash
|
|
195
|
-
npx arcane-os@0.5.
|
|
207
|
+
npx arcane-os@0.5.9 new my-app --path ./my-app --target portable --git
|
|
196
208
|
cd my-app
|
|
197
209
|
npm install
|
|
198
210
|
npm run check
|
|
@@ -203,7 +215,7 @@ To enroll an existing repository, install the exact SDK and initialize only
|
|
|
203
215
|
missing Arcane files:
|
|
204
216
|
|
|
205
217
|
```bash
|
|
206
|
-
npm install --save-dev --save-exact arcane-os@0.5.
|
|
218
|
+
npm install --save-dev --save-exact arcane-os@0.5.9
|
|
207
219
|
npm exec -- arcane init my-app --target portable
|
|
208
220
|
```
|
|
209
221
|
|
|
@@ -219,7 +231,7 @@ npm exec -- arcane-os targets
|
|
|
219
231
|
No global SDK install or standalone Arcane CLI is required. The application
|
|
220
232
|
repository's exact npm dependency and lockfile own the CLI and toolchain version.
|
|
221
233
|
|
|
222
|
-
Use `npx arcane-os@0.5.
|
|
234
|
+
Use `npx arcane-os@0.5.9` for the initial bootstrap because it names this npm
|
|
223
235
|
package explicitly; bare `npx arcane` outside an installed project could resolve
|
|
224
236
|
a different package. Both installed commands invoke the same headless toolchain.
|
|
225
237
|
Project-local npm scripts use the SDK pinned by that app's `package-lock.json`,
|
|
@@ -240,7 +252,7 @@ node ./bin/arcane.mjs new local-app --path ../local-app --target portable --git
|
|
|
240
252
|
|
|
241
253
|
# From the generated app repository
|
|
242
254
|
cd ../local-app
|
|
243
|
-
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
|
|
244
256
|
npm run check
|
|
245
257
|
npm ci
|
|
246
258
|
```
|
|
@@ -250,7 +262,7 @@ same location. The lockfile retains the selected package dependency while
|
|
|
250
262
|
Arcane uses the installed package name and version. Local directory `file:` dependencies are not
|
|
251
263
|
accepted because npm may install them as links; use a packed `.tgz`. A GitHub
|
|
252
264
|
runner also needs that tarball at the locked path. After publication, replace
|
|
253
|
-
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
|
|
254
266
|
commit the regenerated lock.
|
|
255
267
|
|
|
256
268
|
Generated repositories use `npm ci --ignore-scripts` in CI. Run dependency
|
|
@@ -388,7 +400,7 @@ package installation, or assertions.
|
|
|
388
400
|
|
|
389
401
|
## Current target support
|
|
390
402
|
|
|
391
|
-
Version `0.5.
|
|
403
|
+
Version `0.5.9` exposes one browser target and five explicitly paired
|
|
392
404
|
native development targets: a non-runnable portable directory, a
|
|
393
405
|
Windows x64 unsigned-local-test EXE bundle, Linux x64 and Linux ARM64
|
|
394
406
|
unsigned-local-test DEBs, and an Android development-signed APK. The
|