arcane-os 0.2.1 → 0.2.2
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 +17 -0
- package/README.md +8 -8
- package/browser-runtime/ARCANE_SDK_BROWSER_RELEASE.json +5 -5
- package/browser-runtime/ai/browser-speech-providers.mjs +1 -0
- package/docs/architecture.md +2 -2
- package/docs/reference/README.md +79 -13
- package/docs/reference/ai/browser-speech.md +336 -0
- package/docs/reference/ai/browser-wasm.md +207 -82
- package/docs/reference/availability-and-normalization.md +30 -4
- package/docs/reference/behavioral-testing.md +4 -1
- package/docs/reference/cli.md +29 -10
- package/docs/reference/core/arcane-ai-contracts.md +43 -9
- package/docs/reference/inventory/package-api.json +110 -14
- package/docs/reference/inventory/runtime-components.json +19 -6
- package/docs/reference/inventory/runtime-modules.json +113 -9
- package/docs/reference/protocols.md +260 -38
- package/docs/reference/runtime-components.md +108 -15
- package/docs/reference/runtime-modules.md +422 -8
- package/docs/reference/sdk-api.md +626 -85
- package/package.json +1 -1
- package/runtime/ARCANE_RUNTIME_RELEASE.json +15 -15
- package/runtime/arcane/components/chat.html +17 -52
- package/runtime/arcane/components/speech.html +339 -15
- package/runtime/arcane/modules/AI.js +556 -128
- package/runtime/arcane/modules/AIProviderRuntime.js +299 -30
- package/runtime/arcane/modules/AIRuntimeState.js +23 -4
- package/runtime/arcane/modules/LocalAIReadinessController.js +1 -1
- package/schemas/arcane-lock.schema.json +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"builder": "arcane-sdk-runtime-v1",
|
|
4
|
-
"sdkVersion": "0.2.
|
|
4
|
+
"sdkVersion": "0.2.2",
|
|
5
5
|
"source": {
|
|
6
6
|
"authority": "sdk-canonical",
|
|
7
7
|
"repository": "https://github.com/TheWizardNexus/arcane-os-sdk.git",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"fileCount": 160,
|
|
17
|
-
"totalBytes":
|
|
18
|
-
"contentSha256": "
|
|
17
|
+
"totalBytes": 3643083,
|
|
18
|
+
"contentSha256": "0b09b1fd548152416f583d5e117197c7886b5a9e63071e43493577b4090e4a8c",
|
|
19
19
|
"files": [
|
|
20
20
|
{
|
|
21
21
|
"path": "arcane/components/app-bar.html",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"path": "arcane/components/chat.html",
|
|
42
|
-
"bytes":
|
|
43
|
-
"sha256": "
|
|
42
|
+
"bytes": 60478,
|
|
43
|
+
"sha256": "2f3a7f454c1e3da64c9eaeedb0869d49f04636b20ff59e5116a671e0d0a17973"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"path": "arcane/components/conversation-view.html",
|
|
@@ -159,8 +159,8 @@
|
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
"path": "arcane/components/speech.html",
|
|
162
|
-
"bytes":
|
|
163
|
-
"sha256": "
|
|
162
|
+
"bytes": 49596,
|
|
163
|
+
"sha256": "2a8b2929d28699ab9011f358b09b5fd2d53a0703542b2fee5cda8334261c6c86"
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
166
|
"path": "arcane/components/summary-strip.html",
|
|
@@ -374,8 +374,8 @@
|
|
|
374
374
|
},
|
|
375
375
|
{
|
|
376
376
|
"path": "arcane/modules/AI.js",
|
|
377
|
-
"bytes":
|
|
378
|
-
"sha256": "
|
|
377
|
+
"bytes": 120607,
|
|
378
|
+
"sha256": "703a5342ed0c0758cccdfd8469fbae6d86e91de8c43ec01c893619daf97c2d34"
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
381
|
"path": "arcane/modules/AIPreferenceRuntime.js",
|
|
@@ -389,8 +389,8 @@
|
|
|
389
389
|
},
|
|
390
390
|
{
|
|
391
391
|
"path": "arcane/modules/AIProviderRuntime.js",
|
|
392
|
-
"bytes":
|
|
393
|
-
"sha256": "
|
|
392
|
+
"bytes": 93507,
|
|
393
|
+
"sha256": "d1b33f678431128cefe6f43daabe177794e758c770394098871cf4ac726926b8"
|
|
394
394
|
},
|
|
395
395
|
{
|
|
396
396
|
"path": "arcane/modules/AIResponseLength.js",
|
|
@@ -404,8 +404,8 @@
|
|
|
404
404
|
},
|
|
405
405
|
{
|
|
406
406
|
"path": "arcane/modules/AIRuntimeState.js",
|
|
407
|
-
"bytes":
|
|
408
|
-
"sha256": "
|
|
407
|
+
"bytes": 25379,
|
|
408
|
+
"sha256": "492162cec5e6a8b9e9b437833172905b2cb4e352ca1ef30104c65ec29cf3fa29"
|
|
409
409
|
},
|
|
410
410
|
{
|
|
411
411
|
"path": "arcane/modules/AnsiText.js",
|
|
@@ -599,8 +599,8 @@
|
|
|
599
599
|
},
|
|
600
600
|
{
|
|
601
601
|
"path": "arcane/modules/LocalAIReadinessController.js",
|
|
602
|
-
"bytes":
|
|
603
|
-
"sha256": "
|
|
602
|
+
"bytes": 4340,
|
|
603
|
+
"sha256": "f80d51d0ad499664f265b4f2d52a46ede521a78d56714fecb0e13b939b261007"
|
|
604
604
|
},
|
|
605
605
|
{
|
|
606
606
|
"path": "arcane/modules/MD.js",
|
|
@@ -719,8 +719,7 @@
|
|
|
719
719
|
?speech.initialMuted
|
|
720
720
|
:true;
|
|
721
721
|
let initialSpeechMuteListenerInstalled=false;
|
|
722
|
-
let
|
|
723
|
-
let speechAvailabilityListenerInstalled=false;
|
|
722
|
+
let latestAIRuntimeRoles=null;
|
|
724
723
|
const hostSubmissionBarrier=new ConversationSubmissionBarrier();
|
|
725
724
|
const aiRuntimeStateAbortController=new AbortController();
|
|
726
725
|
let programmaticSubmissionQueue=Promise.resolve(true);
|
|
@@ -910,36 +909,32 @@
|
|
|
910
909
|
}
|
|
911
910
|
|
|
912
911
|
function setAIAvailability(input={}){
|
|
913
|
-
const explicitSpeechAvailability={};
|
|
914
912
|
const availability={
|
|
915
|
-
llm:
|
|
913
|
+
llm:hasSelectedAIRuntimeRole('llm')
|
|
914
|
+
?latestAIRuntimeRoles.llm.state==='ready'
|
|
915
|
+
:Object.prototype.hasOwnProperty.call(input,'llm')
|
|
916
916
|
?Boolean(input.llm)
|
|
917
917
|
:host.aiAvailability.llm,
|
|
918
|
-
stt:
|
|
919
|
-
?
|
|
918
|
+
stt:latestAIRuntimeRoles
|
|
919
|
+
?latestAIRuntimeRoles.stt.state==='ready'
|
|
920
920
|
:host.aiAvailability.stt,
|
|
921
|
-
tts:
|
|
922
|
-
?
|
|
921
|
+
tts:latestAIRuntimeRoles
|
|
922
|
+
?latestAIRuntimeRoles.tts.state==='ready'
|
|
923
923
|
:host.aiAvailability.tts
|
|
924
924
|
};
|
|
925
925
|
|
|
926
|
-
if(Object.prototype.hasOwnProperty.call(input,'stt')){
|
|
927
|
-
explicitSpeechAvailability.stt=availability.stt;
|
|
928
|
-
}
|
|
929
|
-
if(Object.prototype.hasOwnProperty.call(input,'tts')){
|
|
930
|
-
explicitSpeechAvailability.tts=availability.tts;
|
|
931
|
-
}
|
|
932
926
|
applyAIAvailability(availability);
|
|
933
|
-
if(Object.keys(explicitSpeechAvailability).length){
|
|
934
|
-
pendingSpeechAvailability={
|
|
935
|
-
...(pendingSpeechAvailability||{}),
|
|
936
|
-
...explicitSpeechAvailability
|
|
937
|
-
};
|
|
938
|
-
synchronizeSpeechCompatibilityAvailability();
|
|
939
|
-
}
|
|
940
927
|
return {...availability};
|
|
941
928
|
}
|
|
942
929
|
|
|
930
|
+
function hasSelectedAIRuntimeRole(role){
|
|
931
|
+
const record=latestAIRuntimeRoles?.[role];
|
|
932
|
+
return typeof record?.providerId==='string'
|
|
933
|
+
&&record.providerId.length>0
|
|
934
|
+
&&typeof record?.modelId==='string'
|
|
935
|
+
&&record.modelId.length>0;
|
|
936
|
+
}
|
|
937
|
+
|
|
943
938
|
function applyAIAvailability(availability){
|
|
944
939
|
host.aiAvailability={...availability};
|
|
945
940
|
send.disabled=host.conversationComplete||!availability.llm;
|
|
@@ -1131,6 +1126,7 @@
|
|
|
1131
1126
|
}
|
|
1132
1127
|
|
|
1133
1128
|
function synchronizeAIRuntimeState(snapshot){
|
|
1129
|
+
latestAIRuntimeRoles=snapshot.roles;
|
|
1134
1130
|
aiActivationController.synchronize(snapshot.roles.llm);
|
|
1135
1131
|
applyAIAvailability({
|
|
1136
1132
|
llm:snapshot.roles.llm.state==='ready',
|
|
@@ -1139,37 +1135,6 @@
|
|
|
1139
1135
|
});
|
|
1140
1136
|
}
|
|
1141
1137
|
|
|
1142
|
-
function synchronizeSpeechCompatibilityAvailability(){
|
|
1143
|
-
if(!pendingSpeechAvailability){
|
|
1144
|
-
return;
|
|
1145
|
-
}
|
|
1146
|
-
if(speech.componentReady){
|
|
1147
|
-
const availability=pendingSpeechAvailability;
|
|
1148
|
-
pendingSpeechAvailability=null;
|
|
1149
|
-
speech.setAvailability?.({...availability});
|
|
1150
|
-
return;
|
|
1151
|
-
}
|
|
1152
|
-
if(speechAvailabilityListenerInstalled){
|
|
1153
|
-
return;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
speechAvailabilityListenerInstalled=true;
|
|
1157
|
-
speech.addEventListener(
|
|
1158
|
-
'speech-ready',
|
|
1159
|
-
applyPendingSpeechAvailability,
|
|
1160
|
-
{once:true}
|
|
1161
|
-
);
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
function applyPendingSpeechAvailability(){
|
|
1165
|
-
speechAvailabilityListenerInstalled=false;
|
|
1166
|
-
if(pendingSpeechAvailability){
|
|
1167
|
-
const availability=pendingSpeechAvailability;
|
|
1168
|
-
pendingSpeechAvailability=null;
|
|
1169
|
-
speech.setAvailability?.({...availability});
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
1138
|
function formatConversationTime(milliseconds=0){
|
|
1174
1139
|
const totalSeconds=Math.max(0,Math.floor(milliseconds/1000));
|
|
1175
1140
|
const hours=Math.floor(totalSeconds/3600);
|