arcane-os 0.33.2 → 0.33.4

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,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.33.4
4
+
5
+ - Treat a repeated reader `AbortError` during intentional HTTP tool-text stream
6
+ cancellation as normal cancellation rather than a cleanup failure.
7
+ - Preserve reader cancellation, lock release, the public request-aborted result,
8
+ and full diagnostics for genuine reader cleanup failures. Request content,
9
+ tool selection, callback ordering, and application behavior are unchanged.
10
+
11
+ ## 0.33.3
12
+
13
+ - Show selected language-model readiness in the shared chat's callback mode
14
+ instead of leaving its initial session-connection message. Ready requires a
15
+ selected provider and model whose runtime role is ready and loaded; loading,
16
+ unloaded, unavailable, error, unloading and disposed states stay distinct.
17
+ - Refresh that status when the existing application-owned `modelName` label
18
+ changes, preserving asynchronous component startup without a new status API.
19
+ - Preserve session binding, message, tool and error status after binding begins.
20
+ Model readiness does not claim network connectivity or start model loading.
21
+
3
22
  ## 0.33.2
4
23
 
5
24
  - Initialize the shared file manager's default tree provider before an
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.33.2` SDK contract. Applications pin one exact npm
22
+ This checkout defines the `0.33.4` 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
 
@@ -85,7 +85,7 @@ Create one browser application, install its pinned SDK, and start its source
85
85
  server:
86
86
 
87
87
  ```bash
88
- npx arcane-os@0.33.2 new hello-speech --path ./hello-speech --target browser
88
+ npx arcane-os@0.33.4 new hello-speech --path ./hello-speech --target browser
89
89
  cd hello-speech
90
90
  npm install
91
91
  ```
@@ -314,6 +314,16 @@ extension callbacks. The component installs warning-only defaults when the host
314
314
  does not supply them; applications may instead consume the corresponding
315
315
  `chat-send-message` and `chat-language-changed` events.
316
316
 
317
+ Before any session binding begins, callback-mode `sessionStatus` follows the
318
+ selected sticky LLM role and the existing application-owned `modelName` label
319
+ (or the selected model ID). Assigning `modelName` refreshes that status even
320
+ after component initialization. It reports Ready only for a selected provider and
321
+ model whose role is both ready and loaded; loading, unloaded, error, unloading,
322
+ unavailable, and disposed states remain distinct. The initial status waits for
323
+ runtime replay. This describes model readiness, not network connectivity.
324
+ Once `bindSession()` begins, session binding, message, tool, and error status
325
+ remain owned by that session lifecycle; runtime updates do not replace them.
326
+
317
327
  `submitMessage(textOverride='',context={})` returns `Promise<boolean>`.
318
328
  `context` accepts `source`, `preserveDraft`, `synthetic`, an optional exact
319
329
  `operationId`, and an optional caller-owned `AbortSignal`. The component owns a
@@ -465,6 +465,11 @@ preserves the existing callback path. Invalid selection or callback input throws
465
465
  `ARCANE_AI_TOOL_TEXT_INVALID`. Callback errors reach the request owner and
466
466
  cancellation prevents later delivery.
467
467
 
468
+ Cancelling an HTTP tool-text stream still cancels and releases its reader and
469
+ rejects with the ordinary request `AbortError`. If reader cancellation repeats
470
+ that expected abort, it is not reported as a cleanup failure. Other reader
471
+ cleanup errors remain visible in developer-console diagnostics.
472
+
468
473
  Request observers receive
469
474
  `onRequest(request,id,metadata)` and any transport metadata supplied by the
470
475
  selected route is forwarded unchanged. Every async native, HTTP, provider, and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arcane-os",
3
- "version": "0.33.2",
3
+ "version": "0.33.4",
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",
@@ -86,7 +86,7 @@
86
86
  "test": "npm run test:unit && npm run test:functional && npm run test:integration && npm run test:regression",
87
87
  "test:release": "node ./bin/arcane-test.mjs test/npm-release.test.mjs",
88
88
  "test:unit": "node ./bin/arcane-test.mjs test/app-descriptor.test.mjs test/app-schema.test.mjs test/app-selection.test.mjs test/contracts.test.mjs test/doctor.test.mjs test/mail-credentials.test.mjs test/mail-outbox.test.mjs test/mail-public-api.test.mjs test/mail-send.test.mjs test/mail-transport.test.mjs test/targets.test.mjs test/workspace-operation-lock.test.mjs",
89
- "test:functional": "node ./bin/arcane-test.mjs test/browser-speech-providers.test.mjs test/browser-wasm-gpu-notice.test.mjs test/browser-wasm-download-resume.test.mjs test/cli.test.mjs test/dbopfs-document-library.test.mjs test/dbopfs.test.mjs test/dev-server.test.mjs test/dev-pwa.test.mjs test/dom-event-instrumentation.test.mjs test/event-manager.test.mjs test/events.test.mjs test/import-map.test.mjs test/mail-cli.test.mjs test/mail-runtime.test.mjs test/mail-server.test.mjs test/modal.test.mjs test/packaging.test.mjs test/pwa-packaging.test.mjs test/pwa-client.test.mjs test/pwa-install.test.mjs test/pwa-worker.test.mjs test/persistent-ai-chat-session.test.mjs test/reference-completeness.test.mjs test/runtime-api-behavior.test.mjs test/runtime.test.mjs test/scaffold.test.mjs test/speech-playback.test.mjs test/site.test.mjs test/twin-cloud.test.mjs test/update-check.test.mjs",
89
+ "test:functional": "node ./bin/arcane-test.mjs test/ai-stream-cancellation.test.mjs test/browser-speech-providers.test.mjs test/browser-wasm-gpu-notice.test.mjs test/browser-wasm-download-resume.test.mjs test/cli.test.mjs test/dbopfs-document-library.test.mjs test/dbopfs.test.mjs test/dev-server.test.mjs test/dev-pwa.test.mjs test/dom-event-instrumentation.test.mjs test/event-manager.test.mjs test/events.test.mjs test/import-map.test.mjs test/mail-cli.test.mjs test/mail-runtime.test.mjs test/mail-server.test.mjs test/modal.test.mjs test/packaging.test.mjs test/pwa-packaging.test.mjs test/pwa-client.test.mjs test/pwa-install.test.mjs test/pwa-worker.test.mjs test/persistent-ai-chat-session.test.mjs test/reference-completeness.test.mjs test/runtime-api-behavior.test.mjs test/runtime.test.mjs test/scaffold.test.mjs test/speech-playback.test.mjs test/site.test.mjs test/twin-cloud.test.mjs test/update-check.test.mjs",
90
90
  "test:integration": "node ./bin/arcane-test.mjs test/installed-package-runtime.test.mjs test/root-app-layout.test.mjs test/integrated-shared.test.mjs test/integrated-workspace.test.mjs test/mail-browser.test.mjs test/native-plan.test.mjs test/native-provider-loader.test.mjs test/npm-release.test.mjs test/release-bundle.test.mjs test/release-capability-smoke.test.mjs test/shared-payload-batch.test.mjs test/tarball.test.mjs test/browser-wasm-cpu.test.mjs test/wllama-webgpu-runtime.test.mjs",
91
91
  "test:regression": "node ./bin/arcane-test.mjs test/channel-workflows.test.mjs test/html-import-registration.test.mjs test/logging-regression.test.mjs test/markdown-speech.test.mjs test/prepared-speech.test.mjs test/native-provider-generation.test.mjs test/speech-queue-regression.test.mjs test/testing.test.mjs test/test-sets.test.mjs",
92
92
  "check": "node tools/check-source.mjs && npm test",
@@ -610,7 +610,7 @@
610
610
  role="status"
611
611
  aria-live="polite"
612
612
  data-state="idle"
613
- >Chat session is not connected.</output>
613
+ >Waiting for language model status.</output>
614
614
  <section
615
615
  id="ai_activation"
616
616
  class="ai_activation"
@@ -1784,8 +1784,17 @@
1784
1784
  });
1785
1785
  host.destroy=destroy;
1786
1786
  host.session=null;
1787
- host.sessionStatus={state:'idle',message:'Chat session is not connected.'};
1788
- host.modelName=is.string(host.modelName)?host.modelName:'';
1787
+ host.sessionStatus={state:'idle',message:'Waiting for language model status.'};
1788
+ let modelName=is.string(host.modelName)?host.modelName:'';
1789
+ Object.defineProperty(host,'modelName',{
1790
+ configurable:true,
1791
+ enumerable:true,
1792
+ get:function getModelName(){return modelName;},
1793
+ set:function setModelName(value){
1794
+ modelName=value;
1795
+ applyAIAvailability(host.aiAvailability);
1796
+ }
1797
+ });
1789
1798
  host.aiAvailability={llm:false,stt:false,tts:false};
1790
1799
  host.conversationComplete=false;
1791
1800
  applyAIAvailability(host.aiAvailability);
@@ -2019,6 +2028,25 @@
2019
2028
  ?'Send message'
2020
2029
  :'The selected language model service is unavailable.';
2021
2030
  send.setAttribute('aria-label',send.title);
2031
+ if(!destroyed&&sessionBindingGeneration===0&&!boundChatSession&&!sessionBindingPending){
2032
+ const state=selectedRole?.state==='ready'&&selectedRole.loaded!==true
2033
+ ?'unloaded'
2034
+ :selectedRole?.state??(latestAIRuntimeRoles?'unavailable':'idle');
2035
+ const label=is.string(host.modelName)&&host.modelName
2036
+ ?host.modelName
2037
+ :selectedRole?.modelId||'Language model';
2038
+ const status={
2039
+ idle:'Waiting for language model status.',
2040
+ unavailable:'Unavailable',
2041
+ unloaded:'Not loaded',
2042
+ loading:'Loading',
2043
+ ready:'Ready',
2044
+ unloading:'Unloading',
2045
+ error:'Error',
2046
+ disposed:'Disposed'
2047
+ };
2048
+ setSessionStatus(state,state==='idle'?status.idle:`${label} — ${status[state]}`);
2049
+ }
2022
2050
  }
2023
2051
 
2024
2052
  function createAIActivationController({
@@ -5176,7 +5176,9 @@ class AI {
5176
5176
  if(observeToolText){
5177
5177
  await reader.cancel(error).catch(
5178
5178
  function reportToolTextReaderCleanupFailure(cleanupError){
5179
- arcaneLogging.error('Arcane tool text reader cleanup failed.',cleanupError);
5179
+ if(!isAIRequestAbort(error,signal)||!isAIRequestAbort(cleanupError)){
5180
+ arcaneLogging.error('Arcane tool text reader cleanup failed.',cleanupError);
5181
+ }
5180
5182
  }
5181
5183
  );
5182
5184
  }