arcane-os 0.33.2 → 0.33.3

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,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.33.3
4
+
5
+ - Show selected language-model readiness in the shared chat's callback mode
6
+ instead of leaving its initial session-connection message. Ready requires a
7
+ selected provider and model whose runtime role is ready and loaded; loading,
8
+ unloaded, unavailable, error, unloading and disposed states stay distinct.
9
+ - Refresh that status when the existing application-owned `modelName` label
10
+ changes, preserving asynchronous component startup without a new status API.
11
+ - Preserve session binding, message, tool and error status after binding begins.
12
+ Model readiness does not claim network connectivity or start model loading.
13
+
3
14
  ## 0.33.2
4
15
 
5
16
  - 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.3` 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.3 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arcane-os",
3
- "version": "0.33.2",
3
+ "version": "0.33.3",
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",
@@ -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({