arcane-os 0.2.0 → 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 +35 -0
- package/README.md +8 -8
- package/browser-runtime/ARCANE_SDK_BROWSER_RELEASE.json +5 -5
- package/browser-runtime/ai/browser-speech-providers.mjs +331 -25
- 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 +19 -19
- package/runtime/arcane/components/chat.html +288 -52
- package/runtime/arcane/components/speech.html +339 -15
- package/runtime/arcane/modules/AI.js +1245 -136
- package/runtime/arcane/modules/AIProviderRuntime.js +299 -30
- package/runtime/arcane/modules/AIRuntimeState.js +23 -4
- package/runtime/arcane/modules/ConfiguredAIChatSession.js +93 -8
- package/runtime/arcane/modules/DBOPFSDocumentLibrary.js +448 -24
- package/runtime/arcane/modules/LocalAIReadinessController.js +1 -1
- package/schemas/arcane-lock.schema.json +6 -4
- package/src/dev-server.mjs +29 -13
- package/src/doctor.mjs +1 -3
- package/src/import-map.mjs +134 -83
- package/src/packager/core.mjs +311 -39
- package/src/scaffold.mjs +45 -17
- package/src/templates/workspace-template.mjs +23 -4
- package/src/toolchain.mjs +10 -2
- package/src/workspace.mjs +177 -24
package/docs/reference/cli.md
CHANGED
|
@@ -168,8 +168,10 @@ npm exec -- arcane doctor --workspace . --arcane-root "../Arcane OS"
|
|
|
168
168
|
### Overview
|
|
169
169
|
|
|
170
170
|
Authenticates one selected application's physical browser runtime, generates
|
|
171
|
-
its standard browser import map, and commits the map artifact and
|
|
172
|
-
managed HTML entry as one bounded refresh.
|
|
171
|
+
its standard browser import map, and commits the map artifact and configured
|
|
172
|
+
managed HTML entry as one bounded refresh. Packaging uses the same operation
|
|
173
|
+
with the complete included `.html`/`.htm` document inventory so every packaged
|
|
174
|
+
browser page receives byte-identical managed import-map JSON.
|
|
173
175
|
|
|
174
176
|
```text
|
|
175
177
|
arcane import-map [--workspace <directory>] [--app <id>]
|
|
@@ -183,8 +185,10 @@ identical executable alias.
|
|
|
183
185
|
The generated artifact is
|
|
184
186
|
`apps/<id>/modules/arcane.importmap.json`. Its exact JSON is also installed in
|
|
185
187
|
the app entry as `<script type="importmap" data-arcane-import-map>` before
|
|
186
|
-
module loading. In SDK `0.1
|
|
187
|
-
|
|
188
|
+
module loading. In SDK `0.2.1`, the complete authenticated physical-v1 runtime
|
|
189
|
+
produces 91 entries and intentionally has no package-root mapping. That count
|
|
190
|
+
describes the shipped SDK closure; the command receipt remains authoritative
|
|
191
|
+
for the exact map written to the selected application.
|
|
188
192
|
|
|
189
193
|
### Result and safety
|
|
190
194
|
|
|
@@ -200,8 +204,10 @@ Success returns the normal selected-workspace wrapper:
|
|
|
200
204
|
artifactPath,
|
|
201
205
|
artifactRelativePath,
|
|
202
206
|
entryPath,
|
|
207
|
+
documentPaths,
|
|
208
|
+
documentCount:1,
|
|
203
209
|
imports,
|
|
204
|
-
entryCount:
|
|
210
|
+
entryCount:91,
|
|
205
211
|
excludedModules:['modules/CaseEvidenceIndexer.js'],
|
|
206
212
|
files:[
|
|
207
213
|
{role:'artifact',path,bytes,sha256},
|
|
@@ -213,12 +219,25 @@ Success returns the normal selected-workspace wrapper:
|
|
|
213
219
|
}
|
|
214
220
|
```
|
|
215
221
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
222
|
+
For the direct CLI command, `documentPaths` contains the configured entry and
|
|
223
|
+
`documentCount` is one. The `files` array always places the artifact first, the
|
|
224
|
+
configured entry second, and any additional packaging documents afterward as
|
|
225
|
+
`{role:'document',path,bytes,sha256}` in deterministic order. Every record binds
|
|
226
|
+
the committed byte length and SHA-256. A post-commit observer failure preserves
|
|
227
|
+
delivery as a successful receipt with `eventDelivery.status === 'degraded'` and
|
|
219
228
|
`ARCANE_EVENT_DELIVERY_FAILED`; it does not roll back valid application bytes.
|
|
220
229
|
Packaging refuses a committed refresh that reports cleanup warnings.
|
|
221
230
|
|
|
231
|
+
An authenticated external package also publishes
|
|
232
|
+
`/ARCANE_RUNTIME_PROJECTION.json`. The immutable JSON is
|
|
233
|
+
`{schemaVersion:1,kind:'arcane-app-runtime-projection',sdkVersion,
|
|
234
|
+
pathPrefix:'arcane/',fileCount,totalBytes,contentSha256,
|
|
235
|
+
files:[{path,bytes,sha256}]}` and is bound by the packaged release inventory.
|
|
236
|
+
The development server exposes the same public route from its authenticated
|
|
237
|
+
workspace projection. The private `/ARCANE_APP_RELEASE.json` authority is not
|
|
238
|
+
served to application code. Invalid or forged projection data fails
|
|
239
|
+
`ARCANE_RUNTIME_PROJECTION_INVALID`.
|
|
240
|
+
|
|
222
241
|
The canonical integrated-legacy workspace has a deliberate compatibility
|
|
223
242
|
result instead of an artifact: `importMap.skipped` is `true`,
|
|
224
243
|
`importMap.compatibility` is `'integrated-legacy'`, and the reason states that
|
|
@@ -554,8 +573,8 @@ Success returns:
|
|
|
554
573
|
```javascript
|
|
555
574
|
{
|
|
556
575
|
packageName:'arcane-os',
|
|
557
|
-
currentVersion:'0.
|
|
558
|
-
registryVersion:'0.1
|
|
576
|
+
currentVersion:'0.2.0',
|
|
577
|
+
registryVersion:'0.2.1',
|
|
559
578
|
tag:'latest',
|
|
560
579
|
status:'update-available', // or 'current' or 'ahead'
|
|
561
580
|
updateAvailable:true,
|
|
@@ -7,6 +7,30 @@ APIs. Start with the method index in the [Arcane API Reference](arcane-api.md).
|
|
|
7
7
|
The type names below are documentation notation for plain JavaScript values.
|
|
8
8
|
They are not TypeScript declarations.
|
|
9
9
|
|
|
10
|
+
## Portable SDK AI and Core AI
|
|
11
|
+
|
|
12
|
+
The SDK `0.2.1` has two related but separate normalized boundaries:
|
|
13
|
+
|
|
14
|
+
| Boundary | Use | Host |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| [`AIProviderRuntime.js`](../runtime-modules.md#aiproviderruntimejs) plus [`AIRuntimeState.js`](../runtime-modules.md#airuntimestatejs) | Register and control independent LLM, STT, and TTS providers through `arcane-ai-provider/2`; observe sticky state and startup barriers. | Cross-host controller/state; each provider retains its own browser, native, or cloud requirements. |
|
|
17
|
+
| `globalThis.Arcane.ai` and `globalThis.Arcane.speech` | Call an admitted Core-normalized AI or native speech method. | Native/Core only when the current app, method, capability, provider, and host are admitted. |
|
|
18
|
+
|
|
19
|
+
The browser-only [`arcane-os/ai/browser-wasm`](../ai/browser-wasm.md)
|
|
20
|
+
entrypoint provides a caller-authenticated local LLM adapter, and
|
|
21
|
+
[`arcane-os/ai/browser-speech`](../ai/browser-speech.md) provides
|
|
22
|
+
caller-authenticated Whisper/Kokoro provider mechanisms. Neither browser
|
|
23
|
+
entrypoint grants Core authority or silently falls back to native/cloud.
|
|
24
|
+
|
|
25
|
+
[`PersistentAIChatSession.js`](../runtime-modules.md#persistentaichatsessionjs)
|
|
26
|
+
can bind the same chat API to existing ChatEntity/DBOPFS history and memory.
|
|
27
|
+
[`DBOPFSDocumentLibrary.js`](../runtime-modules.md#dbopfsdocumentlibraryjs)
|
|
28
|
+
provides explicit bounded retrieval context. Those mechanisms preserve the
|
|
29
|
+
existing storage semantics. Construction alone performs no search. When an
|
|
30
|
+
application explicitly supplies the document library's context builder, each
|
|
31
|
+
prepared send performs its bounded lexical retrieval automatically; neither
|
|
32
|
+
mechanism executes a tool.
|
|
33
|
+
|
|
10
34
|
## Contract conventions
|
|
11
35
|
|
|
12
36
|
| Input style | Unknown keys | Object rules |
|
|
@@ -57,15 +81,17 @@ For a provider-portable request, send only `messages`, optional
|
|
|
57
81
|
`expectedProvider`, and optional `format`.
|
|
58
82
|
|
|
59
83
|
```js
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
84
|
+
async function askAvailableModelsAfterUserChoice() {
|
|
85
|
+
const profile = await Arcane.ai.profile();
|
|
86
|
+
|
|
87
|
+
return Arcane.ai.chat({
|
|
88
|
+
expectedProvider: profile.provider,
|
|
89
|
+
messages: [
|
|
90
|
+
{ role: "system", content: "Answer briefly and accurately." },
|
|
91
|
+
{ role: "user", content: "What models are available?" }
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
}
|
|
69
95
|
```
|
|
70
96
|
|
|
71
97
|
### AI chat message
|
|
@@ -490,6 +516,14 @@ Successful mutating AI methods include `ArcaneOperation`.
|
|
|
490
516
|
|
|
491
517
|
## Speech
|
|
492
518
|
|
|
519
|
+
This section documents admitted, capability-gated Core/native speech calls.
|
|
520
|
+
For caller-owned browser-local STT/TTS providers, use the separate
|
|
521
|
+
[browser speech package](../ai/browser-speech.md). Those browser providers
|
|
522
|
+
directly implement the provider-neutral runtime contract. `Arcane.speech`
|
|
523
|
+
remains a separate Core/native API unless an application explicitly supplies
|
|
524
|
+
an adapter; their transport, artifact authority, capability, and error
|
|
525
|
+
boundaries are not interchangeable.
|
|
526
|
+
|
|
493
527
|
### Speech status
|
|
494
528
|
|
|
495
529
|
`Arcane.speech.status()` takes no arguments and returns `SpeechStatus`.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"sdkVersion": "0.2.
|
|
3
|
+
"sdkVersion": "0.2.1",
|
|
4
4
|
"environment": {
|
|
5
5
|
"runtime": "Node.js for Node entrypoints; browser for browser-only entrypoints",
|
|
6
6
|
"minimumVersion": "22.23.2 for Node entrypoints",
|
|
7
7
|
"moduleSystem": "ESM"
|
|
8
8
|
},
|
|
9
|
-
"memberCount":
|
|
9
|
+
"memberCount": 169,
|
|
10
10
|
"members": [
|
|
11
11
|
{
|
|
12
12
|
"id": "root:APP_BUNDLE_DESCRIPTOR_NAME",
|
|
@@ -2046,16 +2046,16 @@
|
|
|
2046
2046
|
"name": "validateWorkspace",
|
|
2047
2047
|
"displayName": "validateWorkspace()",
|
|
2048
2048
|
"kind": "function",
|
|
2049
|
-
"signature": "async validateWorkspace({workspaceRoot=process.cwd(), appId, signal, onEvent}={})",
|
|
2049
|
+
"signature": "async validateWorkspace({workspaceRoot=process.cwd(), appId, allowMissingManagedImportMap=false, signal, onEvent}={})",
|
|
2050
2050
|
"entrypoints": [
|
|
2051
2051
|
"arcane-os"
|
|
2052
2052
|
],
|
|
2053
2053
|
"primaryImport": "arcane-os",
|
|
2054
2054
|
"group": "Workspace, doctor, repository, and server",
|
|
2055
|
-
"summary": "Runs canonical workspace, runtime, descriptor,
|
|
2055
|
+
"summary": "Runs canonical workspace, runtime, descriptor, selected-app, and exact installed-SDK validation with progress events.",
|
|
2056
2056
|
"availability": "Node",
|
|
2057
2057
|
"protocol": "Node ESM",
|
|
2058
|
-
"normalization": "
|
|
2058
|
+
"normalization": "Returns a frozen workspace receipt and, for external workspaces, the exact canonical or npm-alias-bound SDK installation authority"
|
|
2059
2059
|
},
|
|
2060
2060
|
{
|
|
2061
2061
|
"id": "root:verifyApp",
|
|
@@ -2644,6 +2644,22 @@
|
|
|
2644
2644
|
"protocol": "arcane-ai-browser-wasm/2 over the provider-neutral arcane-ai-adapter/1 boundary",
|
|
2645
2645
|
"normalization": "Exact immutable runtime and component identity; it contains no model weights or model catalog"
|
|
2646
2646
|
},
|
|
2647
|
+
{
|
|
2648
|
+
"id": "browser-wasm:adaptV1LlmProvider",
|
|
2649
|
+
"name": "adaptV1LlmProvider",
|
|
2650
|
+
"displayName": "adaptV1LlmProvider()",
|
|
2651
|
+
"kind": "function",
|
|
2652
|
+
"signature": "adaptV1LlmProvider(provider)",
|
|
2653
|
+
"entrypoints": [
|
|
2654
|
+
"arcane-os/ai/browser-wasm"
|
|
2655
|
+
],
|
|
2656
|
+
"primaryImport": "arcane-os/ai/browser-wasm",
|
|
2657
|
+
"group": "Browser-WASM local AI",
|
|
2658
|
+
"summary": "Adapts one compatible browser LLM provider to the provider-neutral LLM role contract.",
|
|
2659
|
+
"availability": "Browser; the wrapped provider retains its own WebGPU, storage, model, and lifecycle requirements",
|
|
2660
|
+
"protocol": "arcane-ai-provider/2 adapted from the browser LLM adapter surface",
|
|
2661
|
+
"normalization": "Projects catalog, inspection, status, lifecycle, chat, stream, cancellation, and disposal without adding a provider or fallback"
|
|
2662
|
+
},
|
|
2647
2663
|
{
|
|
2648
2664
|
"id": "browser-wasm:createArcaneAI",
|
|
2649
2665
|
"name": "createArcaneAI",
|
|
@@ -2658,7 +2674,7 @@
|
|
|
2658
2674
|
"summary": "Creates the provider-neutral browser AI facade and LLM lifecycle controller around one compatible provider or controller.",
|
|
2659
2675
|
"availability": "Browser; the selected provider observes its own WebAssembly, storage, and model readiness",
|
|
2660
2676
|
"protocol": "arcane-ai-adapter/1",
|
|
2661
|
-
"normalization": "Normalizes lazy or manual load, fieldwise app/provider/load security inheritance from SDK secure:false, lifecycle status, cancellation, streaming completion, and structural tool-call visibility without executing tools"
|
|
2677
|
+
"normalization": "Normalizes lazy or manual load, fieldwise app/provider/load security inheritance from SDK secure:false, lifecycle status, cancellation, streaming completion, and structural tool-call visibility without executing tools; an existing ModelController retains its preconfigured security/load policy and rejects a new security option"
|
|
2662
2678
|
},
|
|
2663
2679
|
{
|
|
2664
2680
|
"id": "browser-wasm:createBrowserModelSource",
|
|
@@ -2671,24 +2687,24 @@
|
|
|
2671
2687
|
],
|
|
2672
2688
|
"primaryImport": "arcane-os/ai/browser-wasm",
|
|
2673
2689
|
"group": "Browser-WASM local AI",
|
|
2674
|
-
"summary": "Validates a
|
|
2675
|
-
"availability": "Browser with Fetch and a readable response body; each direct open
|
|
2676
|
-
"protocol": "Caller-supplied immutable HTTPS model
|
|
2677
|
-
"normalization": "Canonical frozen descriptor and download handle; expected fields are required and enforced only for their effective enabled checks, and model license is not runtime admission"
|
|
2690
|
+
"summary": "Validates a caller-supplied ordered multi-file model descriptor (or the legacy one-file shape) and creates cancellable no-credentials HTTPS member downloads.",
|
|
2691
|
+
"availability": "Browser with Fetch and a readable response body; each direct member open performs its configured HTTPS fetch",
|
|
2692
|
+
"protocol": "Caller-supplied immutable HTTPS model-file URLs with optional expected byte lengths and SHA-256 values",
|
|
2693
|
+
"normalization": "Canonical frozen ordered descriptor and per-member download handle; expected fields are required and enforced only for their effective enabled checks, and model license is not runtime admission"
|
|
2678
2694
|
},
|
|
2679
2695
|
{
|
|
2680
2696
|
"id": "browser-wasm:createBrowserWasmLlmProvider",
|
|
2681
2697
|
"name": "createBrowserWasmLlmProvider",
|
|
2682
2698
|
"displayName": "createBrowserWasmLlmProvider()",
|
|
2683
2699
|
"kind": "function",
|
|
2684
|
-
"signature": "createBrowserWasmLlmProvider({ source, store, loadDefaults={}, security, logger=console }={})",
|
|
2700
|
+
"signature": "createBrowserWasmLlmProvider({ source, sources, store, loadDefaults={}, security, logger=console }={})",
|
|
2685
2701
|
"entrypoints": [
|
|
2686
2702
|
"arcane-os/ai/browser-wasm"
|
|
2687
2703
|
],
|
|
2688
2704
|
"primaryImport": "arcane-os/ai/browser-wasm",
|
|
2689
2705
|
"group": "Browser-WASM local AI",
|
|
2690
2706
|
"summary": "Creates the packaged Wllama browser provider with effective-check disclosure, honest integrity status, serialized inference, streaming, abort, unload, and probe operations.",
|
|
2691
|
-
"availability": "Browser
|
|
2707
|
+
"availability": "Browser secure context with WebAssembly, OPFS/DBOPFS, WebGPU, and admitted full-offload/buffer/queue/fence evidence; no CPU fallback",
|
|
2692
2708
|
"protocol": "arcane-ai-adapter/1 with OpenAI-like chat completion and streaming envelopes",
|
|
2693
2709
|
"normalization": "Frozen lifecycle/status/security/integrity records and structured tool-call data; security fields inherit by scope and the SDK never invokes application tools"
|
|
2694
2710
|
},
|
|
@@ -2697,7 +2713,7 @@
|
|
|
2697
2713
|
"name": "createDbopfsModelStore",
|
|
2698
2714
|
"displayName": "createDbopfsModelStore()",
|
|
2699
2715
|
"kind": "function",
|
|
2700
|
-
"signature": "createDbopfsModelStore({ dbopfs, tableName='arcane_ai_browser_models' }={})",
|
|
2716
|
+
"signature": "createDbopfsModelStore({ dbopfs, tableName='arcane_ai_browser_models', estimateStorage=null }={})",
|
|
2701
2717
|
"entrypoints": [
|
|
2702
2718
|
"arcane-os/ai/browser-wasm"
|
|
2703
2719
|
],
|
|
@@ -2705,8 +2721,88 @@
|
|
|
2705
2721
|
"group": "Browser-WASM local AI",
|
|
2706
2722
|
"summary": "Adapts an existing DBOPFS instance into a model cache that records observed bytes, commits metadata last, and hashes only when SHA-256 checking is enabled.",
|
|
2707
2723
|
"availability": "Browser with a ready DBOPFS instance and OPFS support",
|
|
2708
|
-
"protocol": "arcane.ai.browser-wasm.model.
|
|
2724
|
+
"protocol": "arcane.ai.browser-wasm.model.v4 completion manifests over existing DBOPFS method semantics",
|
|
2709
2725
|
"normalization": "Returns cached or installed receipts with observed byte count and per-check outcomes; disabled expected-length and SHA-256 checks do not compare or hash, while enabled checks fail closed"
|
|
2726
|
+
},
|
|
2727
|
+
{
|
|
2728
|
+
"id": "browser-speech:BROWSER_SPEECH_ARTIFACT_PROTOCOL",
|
|
2729
|
+
"name": "BROWSER_SPEECH_ARTIFACT_PROTOCOL",
|
|
2730
|
+
"displayName": "BROWSER_SPEECH_ARTIFACT_PROTOCOL",
|
|
2731
|
+
"kind": "constant",
|
|
2732
|
+
"signature": "const BROWSER_SPEECH_ARTIFACT_PROTOCOL",
|
|
2733
|
+
"entrypoints": [
|
|
2734
|
+
"arcane-os/ai/browser-speech"
|
|
2735
|
+
],
|
|
2736
|
+
"primaryImport": "arcane-os/ai/browser-speech",
|
|
2737
|
+
"group": "Browser speech providers",
|
|
2738
|
+
"summary": "Stable protocol identifier for authenticated browser speech artifact stores.",
|
|
2739
|
+
"availability": "Browser metadata; model/runtime admission and use require DBOPFS, Web Locks, Workers, and caller-supplied immutable artifacts",
|
|
2740
|
+
"protocol": "arcane-ai-browser-speech-artifacts/1 over arcane-ai-provider/2",
|
|
2741
|
+
"normalization": "Exact immutable protocol value; it grants no model authority and names no model download"
|
|
2742
|
+
},
|
|
2743
|
+
{
|
|
2744
|
+
"id": "browser-speech:createBrowserKokoroProvider",
|
|
2745
|
+
"name": "createBrowserKokoroProvider",
|
|
2746
|
+
"displayName": "createBrowserKokoroProvider()",
|
|
2747
|
+
"kind": "function",
|
|
2748
|
+
"signature": "createBrowserKokoroProvider(options={})",
|
|
2749
|
+
"entrypoints": [
|
|
2750
|
+
"arcane-os/ai/browser-speech"
|
|
2751
|
+
],
|
|
2752
|
+
"primaryImport": "arcane-os/ai/browser-speech",
|
|
2753
|
+
"group": "Browser speech providers",
|
|
2754
|
+
"summary": "Creates a local-only Kokoro text-to-speech provider for the provider-neutral AI runtime.",
|
|
2755
|
+
"availability": "Browser with DBOPFS, Web Locks, Workers, object URLs, and a caller-admitted self-contained kokoro-js runtime/model closure",
|
|
2756
|
+
"protocol": "arcane-ai-provider/2 tts/synthesize",
|
|
2757
|
+
"normalization": "Independent load, status, request, unload, cancellation, and disposal; provider-native requests return 24000 Hz Float32Array PCM, while shared AI.js requests admit only wav and return frozen Uint8Array audio/wav data; never selects a cloud fallback"
|
|
2758
|
+
},
|
|
2759
|
+
{
|
|
2760
|
+
"id": "browser-speech:createBrowserSpeechAuthority",
|
|
2761
|
+
"name": "createBrowserSpeechAuthority",
|
|
2762
|
+
"displayName": "createBrowserSpeechAuthority()",
|
|
2763
|
+
"kind": "function",
|
|
2764
|
+
"signature": "createBrowserSpeechAuthority({ providerId, role, model, runtime, security }={})",
|
|
2765
|
+
"entrypoints": [
|
|
2766
|
+
"arcane-os/ai/browser-speech"
|
|
2767
|
+
],
|
|
2768
|
+
"primaryImport": "arcane-os/ai/browser-speech",
|
|
2769
|
+
"group": "Browser speech providers",
|
|
2770
|
+
"summary": "Validates and freezes one caller-owned Whisper or Kokoro model/runtime authority.",
|
|
2771
|
+
"availability": "Browser descriptor construction; using the authority requires the selected storage and provider Web APIs",
|
|
2772
|
+
"protocol": "arcane-ai-model-authority/1",
|
|
2773
|
+
"normalization": "Requires immutable URL identity, exact adapter role, unique paths/URLs, and caller-supplied revision with optional byte-length and SHA-256 checks"
|
|
2774
|
+
},
|
|
2775
|
+
{
|
|
2776
|
+
"id": "browser-speech:createBrowserWhisperProvider",
|
|
2777
|
+
"name": "createBrowserWhisperProvider",
|
|
2778
|
+
"displayName": "createBrowserWhisperProvider()",
|
|
2779
|
+
"kind": "function",
|
|
2780
|
+
"signature": "createBrowserWhisperProvider(options={})",
|
|
2781
|
+
"entrypoints": [
|
|
2782
|
+
"arcane-os/ai/browser-speech"
|
|
2783
|
+
],
|
|
2784
|
+
"primaryImport": "arcane-os/ai/browser-speech",
|
|
2785
|
+
"group": "Browser speech providers",
|
|
2786
|
+
"summary": "Creates a local-only Whisper speech-to-text provider for the provider-neutral AI runtime.",
|
|
2787
|
+
"availability": "Browser with DBOPFS, Web Locks, Workers, object URLs, and a caller-admitted self-contained transformers-whisper runtime/model closure",
|
|
2788
|
+
"protocol": "arcane-ai-provider/2 stt/transcribe",
|
|
2789
|
+
"normalization": "Independent load, status, request, unload, cancellation, and disposal; accepts provider-native Float32Array audio at exactly 16000 Hz or decodes the shared AI.js Blob/File payload to authoritative 16000 Hz mono PCM; never selects a cloud fallback"
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
"id": "browser-speech:createDbopfsSpeechArtifactStore",
|
|
2793
|
+
"name": "createDbopfsSpeechArtifactStore",
|
|
2794
|
+
"displayName": "createDbopfsSpeechArtifactStore()",
|
|
2795
|
+
"kind": "function",
|
|
2796
|
+
"signature": "createDbopfsSpeechArtifactStore({ dbopfs, tableName='arcane_ai_browser_speech', fetchImpl=null, objectUrlFactory=null }={})",
|
|
2797
|
+
"entrypoints": [
|
|
2798
|
+
"arcane-os/ai/browser-speech"
|
|
2799
|
+
],
|
|
2800
|
+
"primaryImport": "arcane-os/ai/browser-speech",
|
|
2801
|
+
"group": "Browser speech providers",
|
|
2802
|
+
"summary": "Adapts an existing DBOPFS instance into an authenticated, authority-scoped speech runtime/model artifact store.",
|
|
2803
|
+
"availability": "Browser with a ready DBOPFS instance, Web Locks, Fetch or an explicit fetch implementation, File/Blob, and object URLs",
|
|
2804
|
+
"protocol": "arcane.ai.browser-speech.assets.v1 completion manifests under arcane-ai-browser-speech-artifacts/1",
|
|
2805
|
+
"normalization": "Serializes each authority, commits its completion manifest last, deletes partial state on failure, and supports strict offline cache admission"
|
|
2710
2806
|
}
|
|
2711
2807
|
]
|
|
2712
2808
|
}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"source": {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
4
|
+
"authority": "sdk-canonical",
|
|
5
|
+
"repository": "https://github.com/TheWizardNexus/arcane-os-sdk.git",
|
|
6
|
+
"commit": "36fbe1418af3d5c343d105ee7c9456360c57785d",
|
|
7
|
+
"path": "runtime/arcane/components",
|
|
8
|
+
"sdkVersion": "0.2.1",
|
|
9
|
+
"legacyProjection": {
|
|
10
|
+
"repository": "https://github.com/TheWizardNexus/ARCANE-OS.git",
|
|
11
|
+
"commit": "c540014afe69f14cf5ae60493b7295f36dbcec64",
|
|
12
|
+
"bundleVersion": "0.8.12"
|
|
13
|
+
}
|
|
6
14
|
},
|
|
7
15
|
"componentCount": 39,
|
|
8
16
|
"loader": "/arcane/modules/HTMLImport.js",
|
|
@@ -117,7 +125,7 @@
|
|
|
117
125
|
{
|
|
118
126
|
"file": "runtime/arcane/components/chat.html",
|
|
119
127
|
"name": "chat.html",
|
|
120
|
-
"purpose": "Shared chat, file upload, streaming, speech, language, availability, and conversation-timebox surface.",
|
|
128
|
+
"purpose": "Shared chat, visible selected-model activation request, file upload, streaming, speech, language, availability, and conversation-timebox surface.",
|
|
121
129
|
"methods": [
|
|
122
130
|
"streamMessage()",
|
|
123
131
|
"setMessageProgress()",
|
|
@@ -127,7 +135,9 @@
|
|
|
127
135
|
"bindConversationTimebox()",
|
|
128
136
|
"submitMessage()",
|
|
129
137
|
"sendMessage()",
|
|
130
|
-
"languageChanged()"
|
|
138
|
+
"languageChanged()",
|
|
139
|
+
"requestAIActivation()",
|
|
140
|
+
"destroy()"
|
|
131
141
|
],
|
|
132
142
|
"events": [
|
|
133
143
|
"chat-ready",
|
|
@@ -135,17 +145,20 @@
|
|
|
135
145
|
"chat-send-error",
|
|
136
146
|
"chat-file-uploaded",
|
|
137
147
|
"chat-language-changed",
|
|
148
|
+
"chat-ai-activation-request",
|
|
149
|
+
"chat-ai-activation-error",
|
|
138
150
|
"conversation-timebox-error"
|
|
139
151
|
],
|
|
140
152
|
"slots": [],
|
|
141
153
|
"dependencies": [
|
|
142
154
|
"MD.js",
|
|
143
155
|
"File.js",
|
|
144
|
-
"ConversationTimebox.js"
|
|
156
|
+
"ConversationTimebox.js",
|
|
157
|
+
"AIRuntimeState.js"
|
|
145
158
|
],
|
|
146
159
|
"availability": "Browser and supported native WebViews",
|
|
147
160
|
"transport": "HTMLImport + DOM; injected Arcane/provider modules where listed",
|
|
148
|
-
"normalization": "UI state normalized; AI/storage/media behavior mixed"
|
|
161
|
+
"normalization": "UI/runtime state and explicit user activation intent/request normalized; destroy aborts state/activation observation, releases page/speech listeners, clears ready, returns undefined, and does not initiate provider lifecycle; the provider/runtime owner executes any load; AI/storage/media behavior mixed"
|
|
149
162
|
},
|
|
150
163
|
{
|
|
151
164
|
"file": "runtime/arcane/components/conversation-view.html",
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"source": {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
4
|
+
"authority": "sdk-canonical",
|
|
5
|
+
"repository": "https://github.com/TheWizardNexus/arcane-os-sdk.git",
|
|
6
|
+
"commit": "36fbe1418af3d5c343d105ee7c9456360c57785d",
|
|
7
|
+
"path": "runtime/arcane",
|
|
8
|
+
"sdkVersion": "0.2.1",
|
|
9
|
+
"legacyProjection": {
|
|
10
|
+
"repository": "https://github.com/TheWizardNexus/ARCANE-OS.git",
|
|
11
|
+
"commit": "c540014afe69f14cf5ae60493b7295f36dbcec64",
|
|
12
|
+
"bundleVersion": "0.8.12"
|
|
13
|
+
},
|
|
6
14
|
"protocol": "arcane/1"
|
|
7
15
|
},
|
|
8
|
-
"artifactCount":
|
|
9
|
-
"javascriptArtifactCount":
|
|
10
|
-
"esmExportCount":
|
|
16
|
+
"artifactCount": 85,
|
|
17
|
+
"javascriptArtifactCount": 83,
|
|
18
|
+
"esmExportCount": 318,
|
|
11
19
|
"artifacts": [
|
|
12
20
|
{
|
|
13
21
|
"file": "runtime/arcane/modules/AI.js",
|
|
@@ -18,9 +26,9 @@
|
|
|
18
26
|
],
|
|
19
27
|
"summary": "Provider-selectable chat, speech-to-text, text-to-speech, tool calling, structured output, streaming, and queued audio playback.",
|
|
20
28
|
"availability": "Browser + native bridge + cloud",
|
|
21
|
-
"protocol": "OpenAI HTTPS, Arcane.ollama, Arcane.speech, Android WebView bridge",
|
|
22
|
-
"normalization": "High-level chat/speech behavior
|
|
23
|
-
"surface": "default `AI`; `setAI()`, `streamRequest()`, `streamMessage()`, `fetchRequest()`, `fetch()`, `streamTTS()`, `finishTTS()`, `fetchSTT()`, `stopAudio()`, `resumeAudio()`, `playAudio()`; installs `window.ai
|
|
29
|
+
"protocol": "AIProviderRuntime arcane-ai-provider/2 routes, OpenAI HTTPS, Arcane.ollama, Arcane.speech, Android WebView bridge",
|
|
30
|
+
"normalization": "High-level chat/speech behavior, truthful legacy-route readiness, and shared browser speech request/result conversion are normalized; provider diagnostics and media errors remain mixed.",
|
|
31
|
+
"surface": "default `AI`; `providerRuntime`; `setAI()`, `configureProviders()`, `transitionAI()`, `transitionProviders()`, `startProviders()`, `setSpeechMuted()`, `streamRequest()`, `streamMessage()`, `fetchRequest()`, `fetch()`, `streamTTS()`, `finishTTS()`, `fetchSTT()`, `stopAudio()`, `resumeAudio()`, `playAudio()`; consumes `user-entity-loaded` and `arcane-ollama-ready`, installs `window.ai`, and emits `ai-ready`."
|
|
24
32
|
},
|
|
25
33
|
{
|
|
26
34
|
"file": "runtime/arcane/modules/AIPreferenceRuntime.js",
|
|
@@ -51,6 +59,24 @@
|
|
|
51
59
|
"normalization": "Fully normalized frozen tuple.",
|
|
52
60
|
"surface": "`AI_PREFERENCE_SLOT_KEYS`, `normalizeAIPreferenceTuple()`, `aiPreferenceTuplesEqual()`."
|
|
53
61
|
},
|
|
62
|
+
{
|
|
63
|
+
"file": "runtime/arcane/modules/AIProviderRuntime.js",
|
|
64
|
+
"name": "AIProviderRuntime.js",
|
|
65
|
+
"kind": "esm",
|
|
66
|
+
"exports": [
|
|
67
|
+
"AI_MODEL_AUTHORITY_PROTOCOL",
|
|
68
|
+
"AI_PROVIDER_PROTOCOL",
|
|
69
|
+
"AI_PROVIDER_RUNTIME_PROTOCOL",
|
|
70
|
+
"AIProviderRuntime",
|
|
71
|
+
"aiProviderRuntime",
|
|
72
|
+
"getAIProviderRuntime"
|
|
73
|
+
],
|
|
74
|
+
"summary": "Provider-neutral selection, lifecycle, routing, startup, request, streaming, cancellation, and independent LLM/STT/TTS state.",
|
|
75
|
+
"availability": "Cross-host in-process runtime; registered providers remain browser, native, or cloud specific",
|
|
76
|
+
"protocol": "arcane-ai-runtime/2, arcane-ai-provider/2, arcane-ai-model-authority/1",
|
|
77
|
+
"normalization": "Normalizes immutable per-role routes, lifecycle/status, cancellation, streaming cleanup, and local-only selection without creating a fallback.",
|
|
78
|
+
"surface": "Protocol constants; singleton-only `AIProviderRuntime`; `aiProviderRuntime`; `getAIProviderRuntime()`; provider registration/configuration, lifecycle, request, stream, speech, cancellation, and mute controls."
|
|
79
|
+
},
|
|
54
80
|
{
|
|
55
81
|
"file": "runtime/arcane/modules/AIResponseLength.js",
|
|
56
82
|
"name": "AIResponseLength.js",
|
|
@@ -84,6 +110,32 @@
|
|
|
84
110
|
"normalization": "Normalized frozen allowlist audit.",
|
|
85
111
|
"surface": "`auditAIResponseLinks()`, `extractAIResponseLinks()`, `normalizeAIResponseLink()`, `decodeHTMLCharacterReferences()`."
|
|
86
112
|
},
|
|
113
|
+
{
|
|
114
|
+
"file": "runtime/arcane/modules/AIRuntimeState.js",
|
|
115
|
+
"name": "AIRuntimeState.js",
|
|
116
|
+
"kind": "esm",
|
|
117
|
+
"exports": [
|
|
118
|
+
"AI_RUNTIME_INTENT_EVENT",
|
|
119
|
+
"AI_RUNTIME_PROTOCOL",
|
|
120
|
+
"AI_RUNTIME_ROLES",
|
|
121
|
+
"AI_RUNTIME_STARTUP_EVENT",
|
|
122
|
+
"AI_RUNTIME_STATES",
|
|
123
|
+
"AI_RUNTIME_STATE_EVENT",
|
|
124
|
+
"aiRuntimeEvents",
|
|
125
|
+
"getAIRuntimeState",
|
|
126
|
+
"publishAIRuntimeRoleState",
|
|
127
|
+
"publishAIRuntimeRolesState",
|
|
128
|
+
"requestAIRuntimeIntent",
|
|
129
|
+
"startAIRuntime",
|
|
130
|
+
"subscribeAIRuntimeIntents",
|
|
131
|
+
"subscribeAIRuntimeState"
|
|
132
|
+
],
|
|
133
|
+
"summary": "Sticky immutable LLM, speech-to-text, and text-to-speech lifecycle snapshots, intents, subscriptions, and startup-settlement barriers.",
|
|
134
|
+
"availability": "Cross-host in-process state contract; actual role readiness remains provider specific",
|
|
135
|
+
"protocol": "arcane-ai-runtime-state/1 over EventTarget",
|
|
136
|
+
"normalization": "Closed role records and monotonic revisions normalize state across providers; subscriptions never grant authority or load a provider.",
|
|
137
|
+
"surface": "Protocol/event/state constants; `aiRuntimeEvents`; snapshot, subscribe, publish, intent, and `startAIRuntime()` functions."
|
|
138
|
+
},
|
|
87
139
|
{
|
|
88
140
|
"file": "runtime/arcane/modules/AnsiText.js",
|
|
89
141
|
"name": "AnsiText.js",
|
|
@@ -382,7 +434,7 @@
|
|
|
382
434
|
"availability": "Native bridge by default; cross-host with injected chat",
|
|
383
435
|
"protocol": "Arcane.ai.chat or injected provider",
|
|
384
436
|
"normalization": "Normalized session/result; provider rejection preserved.",
|
|
385
|
-
"surface": "default `ConfiguredAIChatSession`; `history()`, `clear()`, `send()
|
|
437
|
+
"surface": "default `ConfiguredAIChatSession`; constructor accepts bounded coherent `initialMessages` plus configuration; `history()`, `clear()`, `prepare()`, `send()`; prior normalized and exactly-one-choice OpenAI-compatible responses normalize to one frozen session result."
|
|
386
438
|
},
|
|
387
439
|
{
|
|
388
440
|
"file": "runtime/arcane/modules/ConversationActionItems.js",
|
|
@@ -515,6 +567,22 @@
|
|
|
515
567
|
"normalization": "App scope normalized; DOM/storage errors preserved.",
|
|
516
568
|
"surface": "default `DBOPFS`; installs `window.dbopfs`, emits `dbopfs-ready`; table/file/backup APIs."
|
|
517
569
|
},
|
|
570
|
+
{
|
|
571
|
+
"file": "runtime/arcane/modules/DBOPFSDocumentLibrary.js",
|
|
572
|
+
"name": "DBOPFSDocumentLibrary.js",
|
|
573
|
+
"kind": "esm",
|
|
574
|
+
"exports": [
|
|
575
|
+
"DBOPFSDocumentLibrary",
|
|
576
|
+
"createDBOPFSDocumentLibrary",
|
|
577
|
+
"default",
|
|
578
|
+
"normalizeDBOPFSDocumentSchema"
|
|
579
|
+
],
|
|
580
|
+
"summary": "Application-defined document corpus bootstrap, caller-source evaluation, atomic DBOPFS generations, bounded lexical search, and untrusted request-context construction.",
|
|
581
|
+
"availability": "Browser or compatible host with an existing DBOPFS-style database adapter",
|
|
582
|
+
"protocol": "Existing DBOPFS get/set/getAllKeys/delete methods; no new storage protocol",
|
|
583
|
+
"normalization": "Preserves DBOPFS method semantics, commits a completion manifest last, validates every stored generation, exposes explicit reject or preserve-readable read-failure policy, and labels retrieved context as untrusted data.",
|
|
584
|
+
"surface": "`DBOPFSDocumentLibrary`, `createDBOPFSDocumentLibrary()`, `normalizeDBOPFSDocumentSchema()`; `schema`, `bootstrap()`, `search()`, `evaluate()`, `buildContext()`, and `createContextBuilder()`."
|
|
585
|
+
},
|
|
518
586
|
{
|
|
519
587
|
"file": "runtime/arcane/modules/DBOPFSWorker.js",
|
|
520
588
|
"name": "DBOPFSWorker.js",
|
|
@@ -557,6 +625,27 @@
|
|
|
557
625
|
"normalization": "Strict normalized selection and coded errors.",
|
|
558
626
|
"surface": "default `DirectoryPicker`, `normalizeDirectoryPickerOptions()`, `normalizeDirectorySelection()`."
|
|
559
627
|
},
|
|
628
|
+
{
|
|
629
|
+
"file": "runtime/arcane/modules/DocumentLexicalSearch.js",
|
|
630
|
+
"name": "DocumentLexicalSearch.js",
|
|
631
|
+
"kind": "esm",
|
|
632
|
+
"exports": [
|
|
633
|
+
"DOCUMENT_SEARCH_FIELD_ORDER",
|
|
634
|
+
"DocumentLexicalSearch",
|
|
635
|
+
"createDocumentLexicalIndex",
|
|
636
|
+
"default",
|
|
637
|
+
"documentContextExcerpt",
|
|
638
|
+
"documentSearchTokens",
|
|
639
|
+
"normalizedDocumentSearchText",
|
|
640
|
+
"scoreDocumentBody",
|
|
641
|
+
"scoreDocumentLexicalIndex"
|
|
642
|
+
],
|
|
643
|
+
"summary": "Dependency-free deterministic document indexing, ranked metadata/body search, bounded excerpts, and stable tie-breaking.",
|
|
644
|
+
"availability": "Cross-host in-process only",
|
|
645
|
+
"protocol": "In-process immutable record contract",
|
|
646
|
+
"normalization": "Normalizes text and filters, preserves deterministic field priority, and returns frozen results without network, storage, or provider side effects.",
|
|
647
|
+
"surface": "Search-field constant; `DocumentLexicalSearch`; index/token/score/excerpt helpers; `rank()` and bounded `search()`."
|
|
648
|
+
},
|
|
560
649
|
{
|
|
561
650
|
"file": "runtime/arcane/modules/DocumentNavigation.js",
|
|
562
651
|
"name": "DocumentNavigation.js",
|
|
@@ -851,6 +940,21 @@
|
|
|
851
940
|
"normalization": "Provider data normalized to entities; transport errors mixed.",
|
|
852
941
|
"surface": "Endpoint constants, default provider, `mapForecast()`; search/load methods and lifecycle events."
|
|
853
942
|
},
|
|
943
|
+
{
|
|
944
|
+
"file": "runtime/arcane/modules/PersistentAIChatSession.js",
|
|
945
|
+
"name": "PersistentAIChatSession.js",
|
|
946
|
+
"kind": "esm",
|
|
947
|
+
"exports": [
|
|
948
|
+
"PersistentAIChatSession",
|
|
949
|
+
"createPersistentAIChatSession",
|
|
950
|
+
"default"
|
|
951
|
+
],
|
|
952
|
+
"summary": "Composes bounded configured chat with an existing ChatEntity so each user, assistant, and structural tool turn has an explicit persistence policy.",
|
|
953
|
+
"availability": "Browser or native WebView with the projected ChatEntity, DBOPFS, and a configured chat function or normalized Arcane.ai surface",
|
|
954
|
+
"protocol": "Existing ChatEntity/DBOPFS methods plus provider-neutral chat request/result records",
|
|
955
|
+
"normalization": "Preserves existing chat/history/memory semantics, commits live context atomically, and keeps durable persistence coherent across structural tool-call/result pairs.",
|
|
956
|
+
"surface": "Default/named `PersistentAIChatSession`, `createPersistentAIChatSession()`; `create()`, `chatEntity`, `fileName`, `ready()`, `history()`, `settleMemory()`, and `send()`."
|
|
957
|
+
},
|
|
854
958
|
{
|
|
855
959
|
"file": "runtime/arcane/modules/PreferenceStore.js",
|
|
856
960
|
"name": "PreferenceStore.js",
|