arcane-os 0.5.0 → 0.5.1

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.1
4
+
5
+ - Separated the TWiN Cloud LLM access key from the legacy OpenAI speech
6
+ credential so neither provider's key is sent to the other's endpoint while
7
+ retaining the established `ai.license` alias for TWiN Cloud chat.
8
+
3
9
  ## 0.5.0
4
10
 
5
11
  - Added bounded parallel Browser-WASM model downloads across split GGUF
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.0` SDK contract. Applications pin one exact npm
22
+ This checkout defines the `0.5.1` 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
 
@@ -88,7 +88,10 @@ OpenAI-compatible chat-completion requests to
88
88
  `globalThis.arcane.config.twinCloud.accessKey`. The established `ai.license`
89
89
  property and internal `OPENAI` route identifier remain compatibility aliases;
90
90
  applications should present the service and credential as **TWiN Cloud** and
91
- **TWiN access key**.
91
+ **TWiN access key**. The TWiN key is used only for remote LLM chat. Existing
92
+ OpenAI speech routes remain separate and read only their legacy
93
+ `globalThis.arcane.config.openAI.apiKey`; the SDK never sends a TWiN key to
94
+ those speech endpoints.
92
95
 
93
96
  ## Browser-local AI
94
97
 
@@ -162,7 +165,7 @@ uses the same controller for automatic memory extraction.
162
165
  Create a new repository-shaped Arcane application with the exact stable SDK:
163
166
 
164
167
  ```bash
165
- npx arcane-os@0.5.0 new my-app --path ./my-app --target portable --git
168
+ npx arcane-os@0.5.1 new my-app --path ./my-app --target portable --git
166
169
  cd my-app
167
170
  npm install
168
171
  npm run check
@@ -173,7 +176,7 @@ To enroll an existing repository, install the exact SDK and initialize only
173
176
  missing Arcane files:
174
177
 
175
178
  ```bash
176
- npm install --save-dev --save-exact arcane-os@0.5.0
179
+ npm install --save-dev --save-exact arcane-os@0.5.1
177
180
  npm exec -- arcane init my-app --target portable
178
181
  ```
179
182
 
@@ -189,7 +192,7 @@ npm exec -- arcane-os targets
189
192
  No global SDK install or standalone Arcane CLI is required. The application
190
193
  repository's exact npm dependency and lockfile own the CLI and toolchain version.
191
194
 
192
- Use `npx arcane-os@0.5.0` for the initial bootstrap because it names this npm
195
+ Use `npx arcane-os@0.5.1` for the initial bootstrap because it names this npm
193
196
  package explicitly; bare `npx arcane` outside an installed project could resolve
194
197
  a different package. Both installed commands invoke the same headless toolchain.
195
198
  Project-local npm scripts use the SDK pinned by that app's `package-lock.json`,
@@ -210,7 +213,7 @@ node ./bin/arcane.mjs new local-app --path ../local-app --target portable --git
210
213
 
211
214
  # From the generated app repository
212
215
  cd ../local-app
213
- npm install --save-dev --save-exact ../arcane-os-sdk/arcane-os-0.5.0.tgz
216
+ npm install --save-dev --save-exact ../arcane-os-sdk/arcane-os-0.5.1.tgz
214
217
  npm run check
215
218
  npm ci
216
219
  ```
@@ -220,7 +223,7 @@ same location. The lockfile retains the selected package dependency while
220
223
  Arcane uses the installed package name and version. Local directory `file:` dependencies are not
221
224
  accepted because npm may install them as links; use a packed `.tgz`. A GitHub
222
225
  runner also needs that tarball at the locked path. After publication, replace
223
- the local declaration with the exact `arcane-os@0.5.0` registry package and
226
+ the local declaration with the exact `arcane-os@0.5.1` registry package and
224
227
  commit the regenerated lock.
225
228
 
226
229
  Generated repositories use `npm ci --ignore-scripts` in CI. Run dependency
@@ -358,7 +361,7 @@ package installation, or assertions.
358
361
 
359
362
  ## Current target support
360
363
 
361
- Version `0.5.0` exposes one browser target and five explicitly paired
364
+ Version `0.5.1` exposes one browser target and five explicitly paired
362
365
  native development targets: a non-runnable portable directory, a
363
366
  Windows x64 unsigned-local-test EXE bundle, Linux x64 and Linux ARM64
364
367
  unsigned-local-test DEBs, and an Android development-signed APK. The
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arcane-os",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Arcane OS JavaScript SDK, project-local CLI, browser runtime, and repository-portable application packager.",
5
5
  "type": "module",
6
6
  "main": "./src/index.mjs",
@@ -969,16 +969,21 @@ class AI {
969
969
  return {
970
970
  OPENAI: {
971
971
  'Content-Type': 'application/json',
972
- 'Authorization': `Bearer ${this.license}`
972
+ 'Authorization': `Bearer ${this.twinKey}`
973
973
  }
974
974
  };
975
975
  }
976
976
 
977
+ get #legacyOpenAISpeechKey(){
978
+ const value=globalThis.arcane?.config?.openAI?.apiKey;
979
+ return typeof value==='string'?value:'';
980
+ }
981
+
977
982
  get #ttsHeaders(){
978
983
  return {
979
984
  OPENAI: {
980
985
  'Content-Type': 'application/json',
981
- 'Authorization': `Bearer ${this.license}`
986
+ 'Authorization': `Bearer ${this.#legacyOpenAISpeechKey}`
982
987
  },
983
988
  LOCAL_SPEACH: {
984
989
  'Content-Type': 'application/json',
@@ -989,7 +994,7 @@ class AI {
989
994
  get #sttHeaders(){
990
995
  return {
991
996
  OPENAI: {
992
- 'Authorization': `Bearer ${this.license}`,
997
+ 'Authorization': `Bearer ${this.#legacyOpenAISpeechKey}`,
993
998
  },
994
999
  LOCAL_SPEACH: {}
995
1000
  };
@@ -1160,7 +1165,6 @@ class AI {
1160
1165
  get twinKey(){
1161
1166
  return this.#license
1162
1167
  ||globalThis.arcane?.config?.twinCloud?.accessKey
1163
- ||globalThis.arcane?.config?.openAI?.apiKey
1164
1168
  ||'';
1165
1169
  }
1166
1170
 
@@ -1442,7 +1446,8 @@ class AI {
1442
1446
  return false;
1443
1447
  }
1444
1448
  if(providerId==='OPENAI'){
1445
- return Boolean(this.license)&&typeof globalThis.fetch==='function';
1449
+ return Boolean(this.#legacyOpenAISpeechKey)
1450
+ &&typeof globalThis.fetch==='function';
1446
1451
  }
1447
1452
  if(providerId==='LOCAL_SPEACH'){
1448
1453
  return Boolean(this.#nativeSpeech(service,role));
@@ -1870,7 +1875,11 @@ class AI {
1870
1875
  throw error;
1871
1876
  }
1872
1877
 
1873
- if(service==='OPENAI'&&this.license){
1878
+ if(service==='OPENAI'&&(
1879
+ role==='llm'
1880
+ ?Boolean(this.twinKey)
1881
+ :Boolean(this.#legacyOpenAISpeechKey)
1882
+ )){
1874
1883
  return true;
1875
1884
  }
1876
1885