arcane-os 0.33.1 → 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 +23 -0
- package/README.md +2 -2
- package/docs/reference/runtime-components.md +15 -0
- package/package.json +1 -1
- package/runtime/arcane/components/chat.html +31 -3
- package/runtime/arcane/components/file-manager.html +11 -10
- package/runtime/arcane/modules/IsolatedModelQuestionRunner.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
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
|
+
|
|
14
|
+
## 0.33.2
|
|
15
|
+
|
|
16
|
+
- Initialize the shared file manager's default tree provider before an
|
|
17
|
+
already-ready DBOPFS starts loading. Preserve deferred readiness, custom
|
|
18
|
+
providers, duplicate-ready handling and component disposal without adding
|
|
19
|
+
a startup wait.
|
|
20
|
+
- Correct the isolated-model question runner's sentence and Unicode matcher
|
|
21
|
+
literals so the public module imports successfully. Keep complete questions,
|
|
22
|
+
answers and provider metadata while adding the existing sentence count.
|
|
23
|
+
- Retain standalone app-root hosting through `/node_modules/arcane-os/...`;
|
|
24
|
+
this patch requires no app-local SDK changes or copied `/arcane` tree.
|
|
25
|
+
|
|
3
26
|
## 0.33.1
|
|
4
27
|
|
|
5
28
|
- Preserve application and pre-existing body classes when the shared header
|
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.
|
|
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.
|
|
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
|
|
@@ -753,6 +763,11 @@ Slots: `title`, `preview`, `metadata`, `actions`.
|
|
|
753
763
|
|
|
754
764
|
Browses, filters, selects, opens, and acts on app-scoped files.
|
|
755
765
|
|
|
766
|
+
The default tree provider is initialized before storage readiness starts the
|
|
767
|
+
first load. Already-ready DBOPFS loads immediately; otherwise the component
|
|
768
|
+
starts on `dbopfs-ready`. Both paths retain the same `file-manager-ready` event
|
|
769
|
+
and `destroy()` cleanup, without delaying unrelated component startup.
|
|
770
|
+
|
|
756
771
|
### Public surface
|
|
757
772
|
|
|
758
773
|
Methods/properties: `setProvider()`, `loadAll()`, `setFilter()`, `select()`, `clearSelection()`, `destroy()`.
|
package/package.json
CHANGED
|
@@ -610,7 +610,7 @@
|
|
|
610
610
|
role="status"
|
|
611
611
|
aria-live="polite"
|
|
612
612
|
data-state="idle"
|
|
613
|
-
>
|
|
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:'
|
|
1788
|
-
|
|
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({
|
|
@@ -452,16 +452,6 @@
|
|
|
452
452
|
return isVisibleEntry({name:fileName,path:fileName,kind:'file'});
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
-
window.addEventListener(
|
|
456
|
-
'dbopfs-ready',
|
|
457
|
-
init,
|
|
458
|
-
{once:true,signal:lifecycleController.signal}
|
|
459
|
-
);
|
|
460
|
-
|
|
461
|
-
if(window.dbopfs?.ready){
|
|
462
|
-
init();
|
|
463
|
-
}
|
|
464
|
-
|
|
465
455
|
fileUpload.addEventListener(
|
|
466
456
|
'change',
|
|
467
457
|
()=>uploadFiles().catch(
|
|
@@ -698,6 +688,17 @@
|
|
|
698
688
|
}
|
|
699
689
|
};
|
|
700
690
|
|
|
691
|
+
// Immediate readiness can enter loadTree before init reaches its first await.
|
|
692
|
+
window.addEventListener(
|
|
693
|
+
'dbopfs-ready',
|
|
694
|
+
init,
|
|
695
|
+
{once:true,signal:lifecycleController.signal}
|
|
696
|
+
);
|
|
697
|
+
|
|
698
|
+
if(window.dbopfs?.ready){
|
|
699
|
+
init();
|
|
700
|
+
}
|
|
701
|
+
|
|
701
702
|
function activeTreeProvider(){
|
|
702
703
|
return provider||dbopfsTreeProvider;
|
|
703
704
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Is from 'strong-type';
|
|
2
2
|
const is=new Is(false);
|
|
3
3
|
|
|
4
|
-
const SENTENCE_BOUNDARY
|
|
5
|
-
const WORD_OR_NUMBER
|
|
4
|
+
const SENTENCE_BOUNDARY = /[.!?]+(?:["'\u2019\u201d)\]}]+)?(?=\s|$)/gu;
|
|
5
|
+
const WORD_OR_NUMBER = /[\p{L}\p{N}]/u;
|
|
6
6
|
|
|
7
7
|
function codedError(code,message,ErrorType=Error){
|
|
8
8
|
const error=new ErrorType(message);
|