arcane-os 0.96.0 → 0.97.1
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 +22 -0
- package/README.md +1 -1
- package/browser-runtime/ai/core-model-assets.mjs +5 -0
- package/docs/reference/README.md +5 -0
- package/docs/reference/core-native-packaging.md +13 -3
- package/docs/reference/inventory/package-api.json +111 -15
- package/docs/reference/model-assets.md +71 -29
- package/docs/reference/native-speech.md +30 -7
- package/docs/reference/sdk-api.md +229 -15
- package/package.json +1 -1
- package/src/core/host.mjs +22 -18
- package/src/core/services/model-assets.mjs +461 -94
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.97.1
|
|
4
|
+
|
|
5
|
+
- Extract repeated selected TAR members in order, retaining the last complete
|
|
6
|
+
occurrence instead of rejecting valid upstream model companion archives.
|
|
7
|
+
- Preserve earlier extracted files through interrupted replacements and replay
|
|
8
|
+
unfinished archive selections on retry. Completed archive selections remain
|
|
9
|
+
reusable while independent model files resume their own transfers.
|
|
10
|
+
|
|
11
|
+
## 0.97.0
|
|
12
|
+
|
|
13
|
+
- Share native model storage across applications for the same operating-system
|
|
14
|
+
user on Windows, Linux and macOS. Preserve explicit model locations and
|
|
15
|
+
app-private settings, profiles and chat history without moving existing data.
|
|
16
|
+
- Retain completed model companions and interrupted partial downloads. Explicit
|
|
17
|
+
retries resume compatible HTTP transfers or restart only the affected member;
|
|
18
|
+
completed shards are reused and selected TAR companions remain preserved.
|
|
19
|
+
- Coordinate same-selection acquisition across processes, recover after an
|
|
20
|
+
exited transfer owner, and preserve independent caller cancellation.
|
|
21
|
+
- Expose actual activity, waiting, stalled, resumed and terminal download states
|
|
22
|
+
through the shared model-assets API. Deliver queued failure progress before
|
|
23
|
+
browser cleanup, with complete technical errors in developer inspection.
|
|
24
|
+
|
|
3
25
|
## 0.96.0
|
|
4
26
|
|
|
5
27
|
- Publish successful portable, Windows and macOS native builds to one stable
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ selected SDK projection or an explicit live SDK source mount. Both profiles
|
|
|
25
25
|
share the theme, packaging, event, cancellation,
|
|
26
26
|
and browser run contracts while retaining their selected application layout.
|
|
27
27
|
|
|
28
|
-
This checkout defines the `0.
|
|
28
|
+
This checkout defines the `0.97.1` SDK contract. Development applications declare
|
|
29
29
|
`arcane-os` as `latest` and retain their lockfile. Exact SDK pins begin when Roshi
|
|
30
30
|
designates a production build. Follow [Consumer updates](docs/consumer-updates.md)
|
|
31
31
|
to refresh and compare the installed SDK and lockfile with the published channel;
|
|
@@ -63,6 +63,11 @@ async function prepareNativeProjection(client, method, params, {signal, onProgre
|
|
|
63
63
|
operationSignal.throwIfAborted();
|
|
64
64
|
return {id, directory: projection.directory, members: projection.members, release};
|
|
65
65
|
} catch (error) {
|
|
66
|
+
// Core publishes the terminal transfer state before rejecting prepare.
|
|
67
|
+
// Deliver that queued state before our cleanup cancellation can suppress
|
|
68
|
+
// it. Explicit caller cancellation still owns its existing boundary.
|
|
69
|
+
try { await delivery; }
|
|
70
|
+
catch (deliveryError) { callbackFailure ??= deliveryError; }
|
|
66
71
|
const reason = callbackFailure ?? (error?.code === 'ARCANE_REQUEST_ABORTED' && operationSignal.aborted ? operationSignal.reason : error);
|
|
67
72
|
controller.abort(reason);
|
|
68
73
|
const errors = [reason];
|
package/docs/reference/README.md
CHANGED
|
@@ -84,6 +84,10 @@ alone does not make bare module names resolve in a browser.
|
|
|
84
84
|
| Edit an original PNG with a complete prompt and explicit strength | [Local image editing](local-image-editing.md) |
|
|
85
85
|
| Project complete stored model files into native working files | [Model assets through Core](model-assets.md) |
|
|
86
86
|
| Prepare selected upstream model members in native services | [Native preparation and retained lifetime](model-assets.md#native-ownership) |
|
|
87
|
+
| Discover installed models, ordered GGUF shards and required companion files | [Model discovery and existing-file projections](model-assets.md) |
|
|
88
|
+
| Download selected model members with visible file progress and joined cancellation | [downloadCoreModelAssets()](sdk-api.md#downloadcoremodelassets) and [native model assets](model-assets.md) |
|
|
89
|
+
| Prepare the complete Nemotron or Magpie model selection | [Shared native speech catalog](sdk-api.md#preparenemotronmodels) |
|
|
90
|
+
| Use same-user shared native model storage or explicit directory overrides and prepare engines on demand | [Model locations and activation](model-assets.md) |
|
|
87
91
|
| Retain a Nemotron model and diarize caller-fed audio streams | [Native speaker diarization](diarization.md) |
|
|
88
92
|
| Persist application-selected preferences through Core | [Core preferences service](core-preferences.md) |
|
|
89
93
|
| Read complete selected Git text without changing a checkout | [Git text snapshots](git-text-snapshot.md) |
|
|
@@ -92,6 +96,7 @@ alone does not make bare module names resolve in a browser.
|
|
|
92
96
|
| Write, commit and push complete selected repository text | [Selected-text repository writing](core-repositories.md#write-commit-and-push-selected-text) |
|
|
93
97
|
| Observe existing checkout configuration and capture an explicit remote/ref | [Repository configuration and selected targets](core-repositories.md#existing-checkout-configuration-and-selected-targets) |
|
|
94
98
|
| Build an installed-SDK portable Core payload | [Portable Core packaging](core-native-packaging.md) |
|
|
99
|
+
| Replace only the selected app's successful native build while preserving model storage | [Stable native output](core-native-packaging.md#output-and-host-contract) |
|
|
95
100
|
| Resolve matching native state/workspace/endpoint defaults and preserve explicit launch values | [Launch-time locations](core-native-packaging.md#launch-time-locations) and [resolveNativeLaunchContext()](sdk-api.md#resolvenativelaunchcontext) |
|
|
96
101
|
| Build a Windows executable without an OS checkout | [Windows executable packaging](core-native-packaging.md#windows-executable) |
|
|
97
102
|
| Compose a Mac application with an architecture-matched host | [macOS application composition](core-native-packaging.md#macos-application-composition) |
|
|
@@ -341,6 +341,10 @@ It returns a new complete context and fills only omitted fields:
|
|
|
341
341
|
| `stateRoot` on Windows | `%LOCALAPPDATA%/Arcane/<appId>`; standard home `AppData/Local` fallback when the environment value is absent |
|
|
342
342
|
| `stateRoot` on macOS | `~/Library/Application Support/Arcane/<appId>` |
|
|
343
343
|
| `stateRoot` on Linux | Absolute `$XDG_DATA_HOME/Arcane/<appId>`, otherwise `~/.local/share/Arcane/<appId>` |
|
|
344
|
+
| `modelsDirectory` on Windows | `%LOCALAPPDATA%/Arcane/Models`, with the same standard home fallback |
|
|
345
|
+
| `modelsDirectory` on macOS | `~/Library/Application Support/Arcane/Models` |
|
|
346
|
+
| `modelsDirectory` on Linux | Absolute `$XDG_DATA_HOME/Arcane/Models`, otherwise `~/.local/share/Arcane/Models` |
|
|
347
|
+
| `modelsDirectory` on other adapted hosts | `<resolved stateRoot>/Models` unless the host supplies an explicit shared location |
|
|
344
348
|
| `workspaceRoot` | `<resolved stateRoot>/Workspace` |
|
|
345
349
|
| `sharedHost.endpoint`, only when `sharedHost` is selected | Windows named pipe `\\.\pipe\Arcane-` followed by the URL-encoded complete resolved state path; Linux/macOS socket `<resolved stateRoot>/core.sock` |
|
|
346
350
|
| `sharedHost.logFile`, only when `sharedHost` is selected | `<resolved stateRoot>/Core.log` |
|
|
@@ -355,9 +359,15 @@ shared entry creates its selected state directory because its socket/log need
|
|
|
355
359
|
that parent; application services continue to own workspace I/O. Custom
|
|
356
360
|
endpoint/log parent directories retain the existing shared-host requirements.
|
|
357
361
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
362
|
+
Models default to one directory per operating-system user, independent of the
|
|
363
|
+
application ID or app-private state root. Apps selecting the same sources and
|
|
364
|
+
shared model store reuse the SDK acquisition owner. Preferences, profiles,
|
|
365
|
+
chat history, workspace and IPC remain app-scoped. Existing app-local models
|
|
366
|
+
are not moved or deleted: callers can discover and open them in place.
|
|
367
|
+
|
|
368
|
+
Explicit `stateRoot`, `modelsDirectory`, `workspaceRoot`, endpoint, log filename
|
|
369
|
+
and additional fields remain authored values. The resolver derives app-private
|
|
370
|
+
paths from the absolute selected state location. Relative explicit paths retain the caller's
|
|
361
371
|
working-directory meaning, so UI and MCP callers must select the same location.
|
|
362
372
|
No hashing, app-local OS path composition, directory scanning, or new repository
|
|
363
373
|
location rule is involved. `resolveArcaneDataPaths()` continues to own its
|
|
@@ -1,17 +1,113 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"sdkVersion": "0.
|
|
3
|
+
"sdkVersion": "0.97.0",
|
|
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": 328,
|
|
10
10
|
"runtimeSubpathPatterns": {
|
|
11
11
|
"arcane-os/modules/*": "./runtime/arcane/modules/*",
|
|
12
12
|
"arcane-os/entities/*": "./runtime/arcane/entities/*"
|
|
13
13
|
},
|
|
14
14
|
"members": [
|
|
15
|
+
{
|
|
16
|
+
"id": "local-ai-nemotron:NEMO_SPEECH_MODELS",
|
|
17
|
+
"name": "NEMO_SPEECH_MODELS",
|
|
18
|
+
"displayName": "NEMO_SPEECH_MODELS",
|
|
19
|
+
"kind": "constant",
|
|
20
|
+
"signature": "NEMO_SPEECH_MODELS",
|
|
21
|
+
"entrypoints": [
|
|
22
|
+
"arcane-os/local-ai/nemotron"
|
|
23
|
+
],
|
|
24
|
+
"primaryImport": "arcane-os/local-ai/nemotron",
|
|
25
|
+
"group": "Core native speech",
|
|
26
|
+
"summary": "Describes the selected complete Nemotron and Magpie upstream model companions.",
|
|
27
|
+
"availability": "Node; importing this catalog performs no I/O",
|
|
28
|
+
"protocol": "Selected NVIDIA NeMo-Speech.cpp 0.2.0 model catalog",
|
|
29
|
+
"normalization": "stt selects ASR and diarization; tts selects Magpie, NanoCodec and ten tokenizer/configuration members. Each record exposes modelId, providerId, name, members, resourcePaths and optional archives. No acquisition, runtime install, device choice or inference occurs at import."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "local-ai-nemotron:prepareNemotronModels",
|
|
33
|
+
"name": "prepareNemotronModels",
|
|
34
|
+
"displayName": "prepareNemotronModels()",
|
|
35
|
+
"kind": "function",
|
|
36
|
+
"signature": "prepareNemotronModels({modelAssets,workingDirectory,directories,id,signal,onProgress,refresh=false}={})",
|
|
37
|
+
"entrypoints": [
|
|
38
|
+
"arcane-os/local-ai/nemotron"
|
|
39
|
+
],
|
|
40
|
+
"primaryImport": "arcane-os/local-ai/nemotron",
|
|
41
|
+
"group": "Core native speech",
|
|
42
|
+
"summary": "Explicitly prepares the complete ASR and diarization catalog selection.",
|
|
43
|
+
"availability": "Node with the existing model-assets service",
|
|
44
|
+
"protocol": "Native model-assets discovery and persistent preparation",
|
|
45
|
+
"normalization": "Resolves assetProjectionId, directory, members, resourcePaths and idempotent asynchronous release(). An omitted id is generated. Optional directories are searched first unless refresh:true; the first complete matching catalog selection is borrowed, otherwise shared prepare acquires the complete set beneath workingDirectory/model-assets. Ordered asynchronous onProgress forwards native acquisition resume/restart/wait/activity and terminal records. Direct installed-directory reuse retains phase/completed/total/unit:'files' records for reuse then ready. The shared owner retains completed members and closed partials after interruption/cancellation; explicit retry follows its conditional HTTP continuation and single-member restart rules, with same-selection cross-process coordination. Caller cancellation is independent while another interested caller remains; final cancellation joins I/O and retains resumable data. Engines retain actual use; callers release preparation ownership after retention. Borrowed originals and complete acquisitions remain stored. No runtime install, device choice, microphone or inference."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "local-ai-nemotron:prepareMagpieModels",
|
|
49
|
+
"name": "prepareMagpieModels",
|
|
50
|
+
"displayName": "prepareMagpieModels()",
|
|
51
|
+
"kind": "function",
|
|
52
|
+
"signature": "prepareMagpieModels({modelAssets,workingDirectory,directories,id,signal,onProgress,refresh=false}={})",
|
|
53
|
+
"entrypoints": [
|
|
54
|
+
"arcane-os/local-ai/nemotron"
|
|
55
|
+
],
|
|
56
|
+
"primaryImport": "arcane-os/local-ai/nemotron",
|
|
57
|
+
"group": "Core native speech",
|
|
58
|
+
"summary": "Explicitly prepares Magpie, NanoCodec and all matching tokenizer companions.",
|
|
59
|
+
"availability": "Node with the existing model-assets service",
|
|
60
|
+
"protocol": "Native model-assets discovery and persistent preparation",
|
|
61
|
+
"normalization": "Same discovery, preparation, cancellation, ordered progress and release contract as prepareNemotronModels, using NEMO_SPEECH_MODELS.tts. Resolves assetProjectionId, directory, members, resourcePaths and release; resourcePaths contains model, codec and tokenizerConfig. The shared TAR owner extracts ten selected tokenizer/configuration members from upstream ranges while preserving complete files. Retry preserves completed companions and replays required TAR segment framing; ordinary model members use the shared conditional HTTP resume rules. Native acquisition reports its semantic states while direct installed-directory reuse keeps the existing phase/file-count records. Voice, language and device remain caller-owned; preparation performs no synthesis."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "core-model-assets:discoverCoreModelAssets",
|
|
65
|
+
"name": "discoverCoreModelAssets",
|
|
66
|
+
"displayName": "discoverCoreModelAssets()",
|
|
67
|
+
"kind": "function",
|
|
68
|
+
"signature": "discoverCoreModelAssets({client=getInstalledCoreClient(),directories,catalog,recursive,signal}={})",
|
|
69
|
+
"entrypoints": [
|
|
70
|
+
"arcane-os/ai/core-model-assets"
|
|
71
|
+
],
|
|
72
|
+
"primaryImport": "arcane-os/ai/core-model-assets",
|
|
73
|
+
"group": "Core model assets",
|
|
74
|
+
"summary": "Discovers installed native model sets and companions in explicit directories.",
|
|
75
|
+
"availability": "Browser with an available model-assets Core service",
|
|
76
|
+
"protocol": "arcane/1 modelAssets.discover",
|
|
77
|
+
"normalization": "Resolves the native directories/models result unchanged, including ordered GGUF shards, missingMembers, completeness and catalog/acquisition source records. Directories and catalogs remain application-owned; filesystem availability does not establish model selection or readiness. No download, copy, move or engine load. Missing Core reports ARCANE_MODEL_ASSETS_CORE_UNAVAILABLE; actual operation and cancellation failures remain observable."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "core-model-assets:openExistingCoreModelAssets",
|
|
81
|
+
"name": "openExistingCoreModelAssets",
|
|
82
|
+
"displayName": "openExistingCoreModelAssets()",
|
|
83
|
+
"kind": "function",
|
|
84
|
+
"signature": "openExistingCoreModelAssets({client=getInstalledCoreClient(),directory,members,signal}={})",
|
|
85
|
+
"entrypoints": [
|
|
86
|
+
"arcane-os/ai/core-model-assets"
|
|
87
|
+
],
|
|
88
|
+
"primaryImport": "arcane-os/ai/core-model-assets",
|
|
89
|
+
"group": "Core model assets",
|
|
90
|
+
"summary": "Opens a complete borrowed projection without copying installed model originals.",
|
|
91
|
+
"availability": "Browser with an available model-assets Core service",
|
|
92
|
+
"protocol": "arcane/1 modelAssets.openExisting and modelAssets.release",
|
|
93
|
+
"normalization": "Generates its projection id and resolves id, directory, members and idempotent asynchronous release(). Native engines retain their own use; borrowed originals remain intact. Missing members report MODEL_ASSET_MEMBERS_MISSING with the complete list. Cancellation joins uncancelled release before rejecting; actual Core and cleanup failures remain observable."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "core-model-assets:downloadCoreModelAssets",
|
|
97
|
+
"name": "downloadCoreModelAssets",
|
|
98
|
+
"displayName": "downloadCoreModelAssets()",
|
|
99
|
+
"kind": "function",
|
|
100
|
+
"signature": "downloadCoreModelAssets({client=getInstalledCoreClient(),workingDirectory,members,archives,refresh=false,signal,onProgress}={})",
|
|
101
|
+
"entrypoints": [
|
|
102
|
+
"arcane-os/ai/core-model-assets"
|
|
103
|
+
],
|
|
104
|
+
"primaryImport": "arcane-os/ai/core-model-assets",
|
|
105
|
+
"group": "Core model assets",
|
|
106
|
+
"summary": "Acquires a complete native model selection with correlated progress and joined cancellation.",
|
|
107
|
+
"availability": "Browser with an available model-assets Core service",
|
|
108
|
+
"protocol": "arcane/1 modelAssets.prepare/cancelPrepare/release and modelAssets.progress",
|
|
109
|
+
"normalization": "Generates its projection id and resolves id, directory, members and idempotent asynchronous release(). The native owner acquires complete ordinary and TAR-selected companions; full request-correlated semantic progress awaits asynchronous callbacks in order, including actual wait/resume/restart/heartbeat/stall and terminal states. Cancellation or callback failure joins native cancelPrepare cleanup and callback delivery before settlement; actual cleanup failures remain observable. On Core preparation failure, already queued terminal progress is delivered before internal cleanup cancellation and helper rejection. Explicit caller cancellation preserves the no-late-callback boundary. Release relinquishes preparation ownership while completed downloads remain stored; interrupted/cancelled transfers retain completed members and closed partials for explicit retry under the native owner's conditional HTTP continuation/member-restart rules. Same-selection cross-process acquisition is owned by the native service, not a separate browser downloader. No implicit model, runtime or device selection."
|
|
110
|
+
},
|
|
15
111
|
{
|
|
16
112
|
"id": "core-document-acquisition:createDocumentAcquisitionService",
|
|
17
113
|
"name": "createDocumentAcquisitionService",
|
|
@@ -255,7 +351,7 @@
|
|
|
255
351
|
"name": "createNemotronRuntime",
|
|
256
352
|
"displayName": "createNemotronRuntime()",
|
|
257
353
|
"kind": "function",
|
|
258
|
-
"signature": "createNemotronRuntime({runtime,prepare,modelId='nemotron-3.5-asr-streaming-0.6b',modelPath,diarizationModelPath,gpu,onEvent}={})",
|
|
354
|
+
"signature": "createNemotronRuntime({runtime,prepare,modelId='nemotron-3.5-asr-streaming-0.6b',modelPath,diarizationModelPath,modelAssets,assetProjectionId,resourcePaths,gpu,onEvent}={})",
|
|
259
355
|
"entrypoints": [
|
|
260
356
|
"arcane-os/local-ai/nemotron"
|
|
261
357
|
],
|
|
@@ -264,7 +360,7 @@
|
|
|
264
360
|
"summary": "Retains one native recognizer and optional diarizer across explicit utterance endpoints.",
|
|
265
361
|
"availability": "Node with a matching first-party helper, selected NeMo ASR runtime and models; Windows/Linux/macOS source, Android host adaptation",
|
|
266
362
|
"protocol": "Native ASR C ABI through one retained helper and replaying nemotron.state",
|
|
267
|
-
"normalization": "Returns current/subscribe/load/unload/transcribe/openStream/close. Exact ordered Float32 or f32le input uses the actual declared sample rate; complete snapshots retain alternatives, words, timestamps and speaker scope. forceEndpoint preserves the native stream; finish drains terminally. Callback joins reject NEMOTRON_CALLBACK_WAIT. Cancellation joins cleanup and exposes resetRequired when an in-flight native call requires helper termination; explicit load is required afterward. No microphone, semantic completion or fallback."
|
|
363
|
+
"normalization": "Returns current/subscribe/load/unload/transcribe/openStream/close. Exact ordered Float32 or f32le input uses the actual declared sample rate; complete snapshots retain alternatives, words, timestamps and speaker scope. forceEndpoint preserves the native stream; finish drains terminally. Callback joins reject NEMOTRON_CALLBACK_WAIT. Cancellation joins cleanup and exposes resetRequired when an in-flight native call requires helper termination; explicit load is required afterward. No microphone, semantic completion or fallback. Optional modelAssets and completed assetProjectionId select exact resourcePaths.model and optional resourcePaths.diarization members. Load retains that projection before yielding through actual helper cleanup; callers may release preparation ownership after loading begins. An active selection must be unloaded before replacement; direct paths remain supported."
|
|
268
364
|
},
|
|
269
365
|
{
|
|
270
366
|
"id": "local-ai-nemotron:default",
|
|
@@ -551,14 +647,14 @@
|
|
|
551
647
|
"name": "createSpeechService",
|
|
552
648
|
"displayName": "createSpeechService()",
|
|
553
649
|
"kind": "function",
|
|
554
|
-
"signature": "createSpeechService({stt,tts,signal}={})",
|
|
650
|
+
"signature": "createSpeechService({stt,tts,signal,autoLoad=true}={})",
|
|
555
651
|
"entrypoints": ["arcane-os/core/speech"],
|
|
556
652
|
"primaryImport": "arcane-os/core/speech",
|
|
557
653
|
"group": "Core native speech",
|
|
558
654
|
"summary": "Composes host-supplied transcription and synthesis engines with independent loading and role readiness.",
|
|
559
655
|
"availability": "Node Core with explicitly supplied engines; engine platform, model and format support remain engine-owned",
|
|
560
656
|
"protocol": "arcane/1 speech.status/load/unload/transcribe/synthesize; optional open/push/endpoint/finish/cancel/synthesizeStream/audioConsumed/cancelSynthesis with speech.state/progress/opened/transcription/audio",
|
|
561
|
-
"normalization": "Returns current/subscribe/close/start/methods/drain/dispose; forwards complete requests and results unchanged; replaying service state, synchronous accepted Thinking, combined request/lifetime cancellation and concurrent joined engine shutdown. Explicit load/unload require role stt or tts and forward the remaining activation fields and complete result through that role's configured engine; supported preparation remains with that engine. Per-role supportsStreaming reflects actual engine methods independently of readiness. Request-scoped streaming retains exact PCM and unchanged snapshots; endpoint preserves stream scope, terminal finish drains, and cancellation joins native ownership. Awaited TTS audio acknowledgements apply producer backpressure without blocking control traffic. ASR finals do not decide conversation completion. Startup waiting is independently owned from caller cancellation; no automatic provider selection is introduced."
|
|
657
|
+
"normalization": "Returns current/subscribe/close/start/methods/drain/dispose; forwards complete requests and results unchanged; replaying service state, synchronous accepted Thinking, combined request/lifetime cancellation and concurrent joined engine shutdown. Explicit load/unload require role stt or tts and forward the remaining activation fields and complete result through that role's configured engine; supported preparation remains with that engine. Per-role supportsStreaming reflects actual engine methods independently of readiness. Request-scoped streaming retains exact PCM and unchanged snapshots; endpoint preserves stream scope, terminal finish drains, and cancellation joins native ownership. Awaited TTS audio acknowledgements apply producer backpressure without blocking control traffic. ASR finals do not decide conversation completion. Startup waiting is independently owned from caller cancellation; no automatic provider selection is introduced. autoLoad:false exposes subscriptions and role capabilities without startup loads; explicit speech.load activates the selected role. Omission preserves independent automatic startup loading."
|
|
562
658
|
},
|
|
563
659
|
{
|
|
564
660
|
"id": "core-speech:default",
|
|
@@ -655,8 +751,8 @@
|
|
|
655
751
|
"group": "Core model assets",
|
|
656
752
|
"summary": "Owns persistent native model acquisitions, temporary browser projections and actual engine retain lifetimes.",
|
|
657
753
|
"availability": "Node Core with an application-selected working directory",
|
|
658
|
-
"protocol": "arcane/1 modelAssets.open/write/complete/release/status and modelAssets.
|
|
659
|
-
"normalization": "Returns current/prepare/retain/release/dispose and Core service lifecycle. Explicit prepare({id,workingDirectory,members
|
|
754
|
+
"protocol": "arcane/1 modelAssets.open/write/complete/release/status/discover/openExisting/prepare/cancelPrepare, modelAssets.state and modelAssets.progress",
|
|
755
|
+
"normalization": "Returns current/discover/openExisting/prepare/retain/release/dispose and Core service lifecycle. Explicit prepare({id,workingDirectory,members=[],archives=[],signal,onProgress,refresh=false}) acquires complete ordered ordinary {path,url} members and optional {url,format:'tar',ranges?,members:[{path,member}]} archive selections, including PAX paths. Complete exact ordered source selections beneath workingDirectory/model-assets are reused without a network freshness check and persist through release, disposal and restart; refresh:true selects a separate acquisition. Interrupted/cancelled transfers retain completed final members and closed partials; retry resumes the same recorded attempt and downloads only missing members. Ordinary HTTP continuation uses retained strong ETag or Last-Modified with Range/If-Range; matching 206 appends, while 200/416/no validator/prior encoded content restarts only that member and retains one earlier partial until replacement succeeds. TAR segment replay preserves completed companions. Transport framing remains internal. Same-process matching callers share acquisition with independent callbacks/cancellation; cancelling one leaves others running, and the final cancellation joins I/O while retaining resumable data. Same-selection processes coordinate their recorded transfer owner, wait, then reuse/resume after release or exit; unrelated transfers stay concurrent. Complete member promotion follows stream/file close; readiness follows all members. Native progress includes phase/state/message/completed/total/unit:'files' and optional memberIndex/path/reason/recovery/error/activity. Phases open/download/reuse/resume/restart/complete/ready/waiting/heartbeat/stalled/interrupted/cancelled/failed expose actual work; five-second heartbeat and stalled after fifteen seconds without source activity do not diagnose an outage or invent percentages. Plain message/recovery are user-facing; complete error remains diagnostic. discover reads explicit directories/catalogs and reports complete model records, ordered GGUF shards and missing companions without load/download/origin claims beyond supplied selections. Readable symlinks use real-path cycle detection. openExisting borrows complete originals, reports MODEL_ASSET_MEMBERS_MISSING with full missing members, and never removes originals. release relinquishes preparation ownership while native retains continue through actual use; browser open/write/complete projections retain their original temporary cleanup. Core exposes discover/openExisting/prepare/cancelPrepare and request-correlated modelAssets.progress; cancelPrepare joins cleanup. Startup downloads nothing; no automatic migration or eviction."
|
|
660
756
|
},
|
|
661
757
|
{
|
|
662
758
|
"id": "core-model-assets-service:default",
|
|
@@ -789,14 +885,14 @@
|
|
|
789
885
|
"name": "createLocalAIService",
|
|
790
886
|
"displayName": "createLocalAIService()",
|
|
791
887
|
"kind": "function",
|
|
792
|
-
"signature": "createLocalAIService(configuration,{appRoot,runtimes=[],signal,onEvent,prepare,executionDevices}={})",
|
|
888
|
+
"signature": "createLocalAIService(configuration,{appRoot,runtimes=[],signal,onEvent,prepare,executionDevices,autoStart=true}={})",
|
|
793
889
|
"entrypoints": ["arcane-os/core/local-ai"],
|
|
794
890
|
"primaryImport": "arcane-os/core/local-ai",
|
|
795
891
|
"group": "Core local AI",
|
|
796
892
|
"summary": "Composes selected native llama.cpp, Ollama and ONNX engines as a Core service with retained process/worker ownership and model lifecycle.",
|
|
797
893
|
"availability": "Node with selected upstream runtime distributions or available configured system services",
|
|
798
894
|
"protocol": "arcane/1 methods and events; llama.cpp OpenAI HTTP/SSE, Ollama native HTTP/NDJSON and ONNX tensor transport",
|
|
799
|
-
"normalization": "Application-owned runtime and model requirements; optional prepare supplies installed records during this service startup. Optional executionDevices supplies a borrowed catalog to ONNX and llama.cpp; its supplying owner retains catalog disposal responsibility. onnx.load forwards executionPreference and executionTarget with existing model-path resolution, cancellation and omitted-target behavior. getONNXRuntime() returns the actual prepared ONNX owner for native composition after context.getService('local-ai'); callers reacquire after recovery and retain the acquired handle for cleanup. llama.load({model,assetProjectionId,resourcePaths,executionTarget}) retains resourcePaths.model from the existing model-assets owner through actual managed process exit. Omitted target retains the same model's selection or configured default; null requests the runtime default. Explicit Windows NVIDIA targets resolve this host's deviceId to its CUDA device identity; unsupported or unavailable selections report their actual failure without substitution. execution distinguishes requested/resolved/configured targets from observedTarget:null. Existing external listeners retain their model/device ownership and reject managed reconfiguration. llama.status/models observe without starting or restarting an engine. Independent services, complete responses and exact owned-process cleanup remain unchanged."
|
|
895
|
+
"normalization": "Application-owned runtime and model requirements; optional prepare supplies installed records during this service startup. Optional executionDevices supplies a borrowed catalog to ONNX and llama.cpp; its supplying owner retains catalog disposal responsibility. onnx.load forwards executionPreference and executionTarget with existing model-path resolution, cancellation and omitted-target behavior. getONNXRuntime() returns the actual prepared ONNX owner for native composition after context.getService('local-ai'); callers reacquire after recovery and retain the acquired handle for cleanup. llama.load({model,assetProjectionId,resourcePaths,executionTarget}) retains resourcePaths.model from the existing model-assets owner through actual managed process exit. Omitted target retains the same model's selection or configured default; null requests the runtime default. Explicit Windows NVIDIA targets resolve this host's deviceId to its CUDA device identity; unsupported or unavailable selections report their actual failure without substitution. execution distinguishes requested/resolved/configured targets from observedTarget:null. Existing external listeners retain their model/device ownership and reject managed reconfiguration. llama.status/models observe without starting or restarting an engine. Independent services, complete responses and exact owned-process cleanup remain unchanged. autoStart:false leaves selected engines unprepared and unstarted at Core startup. Explicit localai.prepare invokes configured preparation, emits complete localai.preparation events, starts configured engines and returns current state. Concurrent callers share preparation and completed preparation is reused; engine/model readiness remains separate. Omission preserves startup preparation."
|
|
800
896
|
},
|
|
801
897
|
{
|
|
802
898
|
"id": "core-local-ai:default",
|
|
@@ -4712,7 +4808,7 @@
|
|
|
4712
4808
|
"summary": "Creates the SDK-owned provider that assembles one selected app and explicit services into a portable Core payload.",
|
|
4713
4809
|
"availability": "Node; produces a portable payload rather than an executable host",
|
|
4714
4810
|
"protocol": "arcane-native-builder/1 portable provider",
|
|
4715
|
-
"normalization": "Preserves complete selected app and dependency releases; an explicit services selection overrides appDescriptor.native.services, otherwise the descriptor selection is used; optional appDescriptor.native.window carries positive integral logical client width/height, optional resizable and optional state normal/maximized/fullscreen into manifest.window with omitted fields preserved; the selected platform host owns the applied behavior. Generated coreListener opt-in composes one passive model-observation service from the existing host.runtime and actual services exposing localai.status/image.status/decisions.status before listener binding, with absent owners null and renderer attachment separate. Ordinary stdio and sharedHost/headless behavior remains unchanged; no model creation, getService or readiness barrier. Generated runtime/arcane-core.mjs accepts --arcane-app-entry <app-relative-module> through the host's supported Node executable. It imports the packaged app/ module's top-level work with complete process.argv unchanged and no automatic export call; the app owns launch-context reads, services, signals and shutdown. Include the entry and complete source closure through package.nativeResources. The flag skips ordinary Core startup; omission retains it. See mcp-stdio.md#launch-from-a-native-package and core-native-packaging.md#app-owned-runtime-entry. Reports executable:false and never substitutes for an unavailable platform host"
|
|
4811
|
+
"normalization": "Preserves complete selected app and dependency releases; an explicit services selection overrides appDescriptor.native.services, otherwise the descriptor selection is used; optional appDescriptor.native.window carries positive integral logical client width/height, optional resizable and optional state normal/maximized/fullscreen into manifest.window with omitted fields preserved; the selected platform host owns the applied behavior. Generated coreListener opt-in composes one passive model-observation service from the existing host.runtime and actual services exposing localai.status/image.status/decisions.status before listener binding, with absent owners null and renderer attachment separate. Ordinary stdio and sharedHost/headless behavior remains unchanged; no model creation, getService or readiness barrier. Generated runtime/arcane-core.mjs accepts --arcane-app-entry <app-relative-module> through the host's supported Node executable. It imports the packaged app/ module's top-level work with complete process.argv unchanged and no automatic export call; the app owns launch-context reads, services, signals and shutdown. Include the entry and complete source closure through package.nativeResources. The flag skips ordinary Core startup; omission retains it. See mcp-stdio.md#launch-from-a-native-package and core-native-packaging.md#app-owned-runtime-entry. Reports executable:false and never substitutes for an unavailable platform host Build assembles temporarily then publishes at outputRoot/app-id; later successful builds replace only that app. Previous output is retained through completion callback and cancellation acceptance and restored on publication failure. Models and saved state remain in separate persistent directories."
|
|
4716
4812
|
},
|
|
4717
4813
|
{
|
|
4718
4814
|
"id": "native-portable-provider:arcaneNativeBuilderProvider",
|
|
@@ -4754,7 +4850,7 @@
|
|
|
4754
4850
|
"summary": "Assembles selected application services and browser content with the SDK-owned Windows x64 WebView2 and SEA host.",
|
|
4755
4851
|
"availability": "Node for assembly; Windows x64 with WebView2 Runtime for execution",
|
|
4756
4852
|
"protocol": "arcane-native-builder/1 windows-x64 provider",
|
|
4757
|
-
"normalization": "Uses a selected hostDirectory or the exact installed SDK version's numeric release asset; preserves complete payloads; app displayName plus .exe (app ID fallback) and matching .exe.config use Windows filename substitutions only; manifest.host.executable owns inventory, icon, verify and run while generic cache/Core names remain unchanged; native.icon PNG/ICO derives the copied executable and host.icon without an app compiler, while other formats retain assembly with native.icon.unsupported and executableIcon:false; the matching host loads the selected window/taskbar icon and handles window.setTheme with per-field applied/unsupported results; native.window selects initial 96-DPI logical client width/height, optional resizable and optional state normal/maximized/fullscreen through manifest.window. The matching host scales dimensions to actual DPI, fits initial placement to the usable screen and applies an explicit state afterward; omitted fields preserve existing host behavior. Fullscreen fills the selected monitor without a frame and retains normal bounds/frame controls for restoration. Requesting-window window.state/window.setState observe actual minimized/maximized state and prevent activation/focus assignment during visible transitions without selecting TopMost or changing Core, origin or profile. Saved Settings remain application-owned; no saved-bounds subsystem is added and initial-fit logic is not reapplied during later resizing; run cancellation closes stdin and waits for host-owned graceful shutdown. Packaged runtime/ArcaneCore.exe accepts --arcane-app-entry <app-relative-module> directly, without a script argument or GUI launcher; it imports the packaged app/ module's top-level work, preserves complete process.argv and invokes no export. Include the entry and complete source closure through package.nativeResources. The app owns launch-context reads, services, signals and shutdown; the flag skips ordinary Core startup, while omission preserves it. See mcp-stdio.md#launch-from-a-native-package and core-native-packaging.md#app-owned-runtime-entry"
|
|
4853
|
+
"normalization": "Uses a selected hostDirectory or the exact installed SDK version's numeric release asset; preserves complete payloads; app displayName plus .exe (app ID fallback) and matching .exe.config use Windows filename substitutions only; manifest.host.executable owns inventory, icon, verify and run while generic cache/Core names remain unchanged; native.icon PNG/ICO derives the copied executable and host.icon without an app compiler, while other formats retain assembly with native.icon.unsupported and executableIcon:false; the matching host loads the selected window/taskbar icon and handles window.setTheme with per-field applied/unsupported results; native.window selects initial 96-DPI logical client width/height, optional resizable and optional state normal/maximized/fullscreen through manifest.window. The matching host scales dimensions to actual DPI, fits initial placement to the usable screen and applies an explicit state afterward; omitted fields preserve existing host behavior. Fullscreen fills the selected monitor without a frame and retains normal bounds/frame controls for restoration. Requesting-window window.state/window.setState observe actual minimized/maximized state and prevent activation/focus assignment during visible transitions without selecting TopMost or changing Core, origin or profile. Saved Settings remain application-owned; no saved-bounds subsystem is added and initial-fit logic is not reapplied during later resizing; run cancellation closes stdin and waits for host-owned graceful shutdown. Packaged runtime/ArcaneCore.exe accepts --arcane-app-entry <app-relative-module> directly, without a script argument or GUI launcher; it imports the packaged app/ module's top-level work, preserves complete process.argv and invokes no export. Include the entry and complete source closure through package.nativeResources. The app owns launch-context reads, services, signals and shutdown; the flag skips ordinary Core startup, while omission preserves it. See mcp-stdio.md#launch-from-a-native-package and core-native-packaging.md#app-owned-runtime-entry Successful builds publish at outputRoot/app-id through the shared joined replacement lifecycle, retaining previous output through completion/cancellation acceptance and restoring it on failure. Separate runtime caches, models, profiles and unrelated outputs are preserved."
|
|
4758
4854
|
},
|
|
4759
4855
|
{
|
|
4760
4856
|
"id": "native-windows-provider:arcaneNativeBuilderProvider",
|
|
@@ -4796,7 +4892,7 @@
|
|
|
4796
4892
|
"summary": "Composes a complete selected portable payload with the architecture-selected SDK Mac host in an application bundle.",
|
|
4797
4893
|
"availability": "Node assembly; matching Darwin architecture and selected host artifact for execution",
|
|
4798
4894
|
"protocol": "arcane-native-builder/1 macos-arm64 and macos-x64 provider",
|
|
4799
|
-
"normalization": "Resources remains target.rootDir; bundleRoot names the app bundle; selected hostDirectory or exact-version host assets; run closes stdin and awaits graceful drain; source availability does not establish artifact publication or Mac execution"
|
|
4895
|
+
"normalization": "Resources remains target.rootDir; bundleRoot names the app bundle; selected hostDirectory or exact-version host assets; run closes stdin and awaits graceful drain; source availability does not establish artifact publication or Mac execution Accepted bundles use outputRoot/app-id.app; later successful builds replace only that bundle through the joined publication lifecycle, preserving separate model and saved-state directories."
|
|
4800
4896
|
},
|
|
4801
4897
|
{
|
|
4802
4898
|
"id": "native-macos-provider:arcaneNativeBuilderProvider",
|
|
@@ -4877,10 +4973,10 @@
|
|
|
4877
4973
|
"entrypoints": ["arcane-os/core/host"],
|
|
4878
4974
|
"primaryImport": "arcane-os/core/host",
|
|
4879
4975
|
"group": "Native Core host composition",
|
|
4880
|
-
"summary": "Resolves
|
|
4976
|
+
"summary": "Resolves app-private native state/workspace, same-user shared model storage and optional shared endpoint defaults for packaged UI and external MCP.",
|
|
4881
4977
|
"availability": "Node native locations on Windows/Linux/macOS; Android and other hosts supply stateRoot and native adaptation",
|
|
4882
4978
|
"protocol": "Pure native launch-context resolution and existing local IPC",
|
|
4883
|
-
"normalization": "Returns a new complete context with only omitted stateRoot/workspaceRoot and selected sharedHost endpoint/log fields filled; preserves explicit values and additional payloads. Native launchContext presence opts generated entry into resolution; omitted sharedHost retains stdio. Optional coreListener:{endpoint} is preserved without endpoint defaults and attaches to that same window-owned runtime in the generated entry; selecting it together with sharedHost reports TypeError there. No I/O, saved-state discovery, process startup, migration or ArcaneData/Repos change. Malformed selected appId/stateRoot/sharedHost inputs report TypeError; platform IPC errors remain operation-owned."
|
|
4979
|
+
"normalization": "Returns a new complete context with only omitted stateRoot/workspaceRoot/modelsDirectory and selected sharedHost endpoint/log fields filled; preserves explicit values and additional payloads. Native launchContext presence opts generated entry into resolution; omitted sharedHost retains stdio. Optional coreListener:{endpoint} is preserved without endpoint defaults and attaches to that same window-owned runtime in the generated entry; selecting it together with sharedHost reports TypeError there. No I/O, saved-state discovery, process startup, migration or ArcaneData/Repos change. Malformed selected appId/stateRoot/sharedHost inputs report TypeError; platform IPC errors remain operation-owned. On Windows/Linux/macOS an omitted modelsDirectory resolves to the operating-system user's shared Arcane/Models directory, independently of app-private stateRoot/workspaceRoot and disposable native output. An explicit stateRoot does not redirect this shared default; explicit modelsDirectory remains unchanged. Other adapted hosts may supply a shared directory, with omitted modelsDirectory retaining absolute stateRoot/Models. This resolver affects its consumers rather than every provider store and creates, moves or migrates no files; applications may separately discover prior app-local originals."
|
|
4884
4980
|
},
|
|
4885
4981
|
{
|
|
4886
4982
|
"id": "core-host:readCoreLaunchContext",
|
|
@@ -119,8 +119,9 @@ file, without a whole-model buffer or base64 conversion. No model or runtime
|
|
|
119
119
|
is selected or downloaded by service startup. The result remains the ready
|
|
120
120
|
projection snapshot with ordered `members: [{path,nativePath}]`.
|
|
121
121
|
|
|
122
|
-
Complete acquisitions persist under
|
|
123
|
-
release, native unload, service disposal
|
|
122
|
+
Complete acquisitions and interrupted transfer state persist under
|
|
123
|
+
`workingDirectory/model-assets/` across release, native unload, service disposal
|
|
124
|
+
and process restart. Relative working
|
|
124
125
|
directories resolve from `appRoot`. Reuse matches the entire ordered
|
|
125
126
|
`[{path,url}]` selection in that actual store; the operation `id` is a separate
|
|
126
127
|
live lifetime, not the stored selection. Different URLs, relative paths, member
|
|
@@ -136,9 +137,14 @@ untouched. Later ordinary preparations reuse the newer completed selection.
|
|
|
136
137
|
A failed refresh leaves the earlier completed acquisition available. Refresh
|
|
137
138
|
does not change the selected URLs or imply upstream revision discovery.
|
|
138
139
|
|
|
139
|
-
Progress
|
|
140
|
-
`
|
|
141
|
-
|
|
140
|
+
Progress includes `open`, `download`, `resume`, `restart`, `complete`, `reuse`
|
|
141
|
+
and `ready`, plus waiting, heartbeat, stalled and terminal interruption states.
|
|
142
|
+
Records carry `state`, a user-facing `message`, `completed`, `total` and
|
|
143
|
+
`unit:'files'`; member progress additionally includes `memberIndex` and `path`.
|
|
144
|
+
Recovery guidance belongs in `recovery`; a complete serialized `error` belongs
|
|
145
|
+
in developer inspection. A stalled state means no recent transfer activity was
|
|
146
|
+
observed, not that the SDK has established an Internet outage. Render active
|
|
147
|
+
transfers without inventing a per-file percentage. Progress callbacks may return a promise, which the
|
|
142
148
|
preparation observes in order. Each caller owns its callbacks; a slow or failed
|
|
143
149
|
callback does not hold another caller's transfer or result. Callbacks must not
|
|
144
150
|
await cleanup of the preparation currently calling them. Callback failures
|
|
@@ -177,6 +183,13 @@ path records select members; a leading `./` is archive path framing. Missing
|
|
|
177
183
|
selected members reject preparation and identify the missing names. Gzip and
|
|
178
184
|
other archive formats are outside this reader's contract.
|
|
179
185
|
|
|
186
|
+
Repeated selected TAR names follow sequential extraction: the last complete
|
|
187
|
+
occurrence replaces the earlier file only after closing its temporary output.
|
|
188
|
+
An interrupted archive pass retains those files and replays its selected
|
|
189
|
+
segments on retry, so an earlier occurrence is never mistaken for the final
|
|
190
|
+
one. Fully completed archive selections are reused while other model files
|
|
191
|
+
continue their own resumable downloads.
|
|
192
|
+
|
|
180
193
|
When the upstream catalog supplies aligned TAR segments, an archive may include
|
|
181
194
|
`ranges:[{start,end,stopBefore?}]`. The reader requests each inclusive HTTP range
|
|
182
195
|
once and parses its TAR framing; `stopBefore` ends that segment before the
|
|
@@ -245,21 +258,41 @@ build output. The native launch context exposes its platform-specific
|
|
|
245
258
|
The model-assets service creates no platform directory policy of its own.
|
|
246
259
|
|
|
247
260
|
`resolveNativeLaunchContext({appId,context})` defaults `modelsDirectory` to
|
|
248
|
-
|
|
249
|
-
supplied `modelsDirectory` unchanged and creates
|
|
261
|
+
one shared location for the operating-system user, independent of the app ID.
|
|
262
|
+
It preserves an explicitly supplied `modelsDirectory` unchanged and creates,
|
|
263
|
+
moves or migrates no files:
|
|
250
264
|
|
|
251
|
-
| Host | Default
|
|
265
|
+
| Host | Default shared model directory |
|
|
252
266
|
| --- | --- |
|
|
253
|
-
| Windows | `%LOCALAPPDATA%/Arcane
|
|
254
|
-
| macOS | `~/Library/Application Support/Arcane
|
|
255
|
-
| Linux | `$XDG_DATA_HOME/Arcane
|
|
256
|
-
| Android or another host adaptation |
|
|
267
|
+
| Windows | `%LOCALAPPDATA%/Arcane/Models`; the user's `AppData/Local` when that environment variable is absent |
|
|
268
|
+
| macOS | `~/Library/Application Support/Arcane/Models` |
|
|
269
|
+
| Linux | `$XDG_DATA_HOME/Arcane/Models` when absolute, otherwise `~/.local/share/Arcane/Models` |
|
|
270
|
+
| Android or another host adaptation | `<stateRoot>/Models`; the host supplies an explicit shared `modelsDirectory` when its platform allows sharing |
|
|
257
271
|
|
|
258
272
|
Pass this `modelsDirectory` as the acquisition `workingDirectory` and as one
|
|
259
273
|
discovery directory. Completed files then live beneath its `model-assets`
|
|
260
274
|
subdirectory, separate from replaceable application builds. Additional selected
|
|
261
275
|
application directories can participate in the same discovery call.
|
|
262
276
|
|
|
277
|
+
```javascript
|
|
278
|
+
import {resolveNativeLaunchContext} from 'arcane-os/core/host';
|
|
279
|
+
|
|
280
|
+
const {modelsDirectory} = resolveNativeLaunchContext({appId: 'moon-radio'});
|
|
281
|
+
const projection = await modelAssets.prepare({
|
|
282
|
+
id: selectedOperationId,
|
|
283
|
+
workingDirectory: modelsDirectory,
|
|
284
|
+
members: selectedMembers,
|
|
285
|
+
signal,
|
|
286
|
+
onProgress: renderPreparationProgress
|
|
287
|
+
});
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
App settings, profiles, chat history, workspace and IPC retain their app-private
|
|
291
|
+
locations. This default applies to applications using the native launch resolver;
|
|
292
|
+
explicit acquisition directories and other provider-owned model stores keep
|
|
293
|
+
their existing contracts. Discover existing app-local models and open them in
|
|
294
|
+
place rather than copying or removing them.
|
|
295
|
+
|
|
263
296
|
### Prepare a selected local runtime on demand
|
|
264
297
|
|
|
265
298
|
`createLocalAIService(configuration,{autoStart:false,...options})` registers the
|
|
@@ -290,8 +323,10 @@ record above; opening and downloading return `{id,directory,members,release}`.
|
|
|
290
323
|
The existing Blob-based `prepareCoreModelAssets` keeps its original contract.
|
|
291
324
|
|
|
292
325
|
Download progress callbacks receive the complete semantic progress record,
|
|
293
|
-
correlated to this preparation and observed in order.
|
|
294
|
-
|
|
326
|
+
correlated to this preparation and observed in order. On request failure, queued
|
|
327
|
+
terminal progress is delivered before internal cleanup cancellation and promise
|
|
328
|
+
rejection. Explicit caller cancellation retains its no-late-callback boundary.
|
|
329
|
+
Callback failure cancels the operation. Cancellation joins explicit native cleanup and local callback
|
|
295
330
|
delivery before the helper settles; cleanup failures remain observable.
|
|
296
331
|
Callbacks must not await their own enclosing preparation or cancellation join.
|
|
297
332
|
Applications initiate downloads explicitly and display actual phases, selected
|
|
@@ -303,24 +338,31 @@ refresh mode share an acquisition, including across service instances. They
|
|
|
303
338
|
keep independent operation IDs, retain handles, cancellation and callbacks.
|
|
304
339
|
Cancelling, releasing or disposing one interested caller leaves the others
|
|
305
340
|
running. The final interested caller aborts the acquisition and joins its
|
|
306
|
-
streams, writes and closes
|
|
341
|
+
streams, writes and closes while preserving completed members and resumable
|
|
342
|
+
partial transfers. Original
|
|
307
343
|
failures and cleanup failures remain observable. A completed acquisition stays
|
|
308
344
|
available even if a caller cancels or its callback fails after completion.
|
|
309
345
|
|
|
310
|
-
The service
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
346
|
+
The service promotes each file from its partial-transfer location only after
|
|
347
|
+
the complete response and file close finish. It records whole-acquisition
|
|
348
|
+
completion after every selected member is complete. These records describe
|
|
349
|
+
ordinary transfer and cache state, not content hashes or admission receipts.
|
|
350
|
+
Retry reuses completed members and resumes saved ordinary-file transfers with
|
|
351
|
+
HTTP Range and available HTTP continuation metadata. HTTP offsets and validators
|
|
352
|
+
remain transport-local and never become progress or model policy. If the source
|
|
353
|
+
cannot continue the saved representation, the SDK reports a restart of that
|
|
354
|
+
member; completed siblings remain available. Selected TAR companions preserve
|
|
355
|
+
completed files; an interrupted member may require replaying its TAR segment to
|
|
356
|
+
restore the archive parser's framing. No full-archive substitute is selected.
|
|
357
|
+
|
|
358
|
+
Processes selecting the same ordered sources and actual store coordinate a
|
|
359
|
+
short selection operation and one transfer owner. Another process waits with
|
|
360
|
+
observable status rather than starting a duplicate transfer. Cancelling a
|
|
361
|
+
waiting request stops its wait; it does not cancel the other process. If a
|
|
362
|
+
transfer owner exits, a later contender can reclaim its recorded operation and
|
|
363
|
+
continue retained data. This requires no additional application server, copied
|
|
364
|
+
cache implementation or new shared Core process. Existing completed models and
|
|
365
|
+
unrelated attempts are never swept or migrated automatically.
|
|
324
366
|
|
|
325
367
|
```javascript
|
|
326
368
|
import {createModelAssetService} from 'arcane-os/core/model-assets';
|
|
@@ -350,11 +350,24 @@ before downloading. `openExisting()` borrows its original files and never
|
|
|
350
350
|
deletes them. Incomplete selections stay visible through the owner's discovery
|
|
351
351
|
results and are not mistaken for a complete model. When no complete match is
|
|
352
352
|
available, the existing acquisition path prepares the complete selected set;
|
|
353
|
-
its completed
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
353
|
+
its completed members and closed partial files remain available after an
|
|
354
|
+
interruption or cancellation. Explicit retry reuses those members and resumes
|
|
355
|
+
ordinary HTTP transfers when the source accepts their conditional range;
|
|
356
|
+
otherwise only that member restarts with an explicit progress event. TAR
|
|
357
|
+
segments replay while completed tokenizer companions remain reusable.
|
|
358
|
+
Matching cross-process selections wait for the actual transfer owner, then
|
|
359
|
+
reuse or resume its recorded attempt; unrelated downloads remain concurrent.
|
|
360
|
+
See [native acquisition and recovery](model-assets.md#native-ownership) for the
|
|
361
|
+
shared owner's complete contract. Explicit `refresh: true` requests a
|
|
362
|
+
fresh acquisition. The host chooses the roots: on Windows, Linux and macOS its
|
|
363
|
+
portable native launch-context resolver defaults `modelsDirectory` to the
|
|
364
|
+
operating-system user's shared `Arcane/Models` directory, independently of
|
|
365
|
+
app-private state and workspace. Explicit directory overrides remain unchanged;
|
|
366
|
+
other adapted hosts supply their shared directory explicitly or retain the
|
|
367
|
+
resolver's app-state fallback. This location applies to services using that
|
|
368
|
+
resolver value, not every provider store. Resolution moves no existing files.
|
|
369
|
+
An application may include its own `models` directory and prior app-local
|
|
370
|
+
model locations among the discovery roots, borrowing those originals in place.
|
|
358
371
|
|
|
359
372
|
The result is `{assetProjectionId, directory, members, resourcePaths, release}`.
|
|
360
373
|
`release()` is idempotent and releases preparation ownership. Each engine
|
|
@@ -369,8 +382,18 @@ native work and helper exit have joined. Load failures also join asset cleanup,
|
|
|
369
382
|
and cleanup failures remain observable.
|
|
370
383
|
|
|
371
384
|
`onProgress` receives ordered, awaited shared-owner phase and file-completion
|
|
372
|
-
events
|
|
373
|
-
|
|
385
|
+
events. Native acquisition includes `state`, plain `message`, file counts and
|
|
386
|
+
optional member, reason, recovery, error or other-owner activity. Its five-second
|
|
387
|
+
heartbeat and fifteen-second no-source-activity `stalled` state describe actual
|
|
388
|
+
transfer observations, not an inferred outage or percentage. `interrupted`,
|
|
389
|
+
`cancelled`, `failed` and `ready` are distinct terminal states. Direct
|
|
390
|
+
installed-directory reuse retains the existing `reuse`/`ready` records with
|
|
391
|
+
`completed`, `total` and `unit:'files'`.
|
|
392
|
+
|
|
393
|
+
Signal cancellation stops that caller's preparation interest; another interested
|
|
394
|
+
caller may continue the shared acquisition. The final cancellation joins I/O
|
|
395
|
+
and retains resumable data; cancelled subscribers keep their existing callback
|
|
396
|
+
boundary. An abort after projection creation releases preparation ownership
|
|
374
397
|
before rejecting. Engine load cancellation remains separate: cancelling the
|
|
375
398
|
caller's wait does not cancel a shared activation; explicit engine unload/close
|
|
376
399
|
owns that cancellation.
|