arcane-os 0.66.0 → 0.68.0

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +1 -1
  3. package/browser-runtime/ai/core-image.mjs +84 -34
  4. package/browser-runtime/ai/core-local.mjs +195 -43
  5. package/browser-runtime/ai/core-onnx.mjs +71 -12
  6. package/docs/reference/README.md +6 -0
  7. package/docs/reference/availability-and-normalization.md +1 -0
  8. package/docs/reference/core-native-packaging.md +11 -4
  9. package/docs/reference/core-repositories.md +93 -9
  10. package/docs/reference/core-runtime.md +46 -5
  11. package/docs/reference/inventory/package-api.json +62 -20
  12. package/docs/reference/inventory/runtime-components.json +2 -1
  13. package/docs/reference/inventory/runtime-modules.json +3 -3
  14. package/docs/reference/local-ai.md +112 -2
  15. package/docs/reference/local-image-generation.md +15 -4
  16. package/docs/reference/model-assets.md +50 -3
  17. package/docs/reference/native-decisions.md +181 -0
  18. package/docs/reference/runtime-components.md +62 -5
  19. package/docs/reference/runtime-modules.md +44 -7
  20. package/docs/reference/sdk-api.md +229 -19
  21. package/package.json +5 -2
  22. package/runtime/arcane/components/theme-switcher.html +112 -13
  23. package/runtime/arcane/modules/PreferenceStore.js +18 -13
  24. package/runtime/arcane/modules/SystemAppearance.js +24 -6
  25. package/src/core/repositories.mjs +27 -8
  26. package/src/core/runtime.mjs +26 -1
  27. package/src/core/services/decisions.mjs +144 -0
  28. package/src/core/services/local-ai.mjs +31 -9
  29. package/src/core/services/model-assets.mjs +98 -13
  30. package/src/git-identity.mjs +22 -58
  31. package/src/local-ai/decision-tokenizer-worker.mjs +31 -0
  32. package/src/local-ai/decision-tokenizer.mjs +109 -0
  33. package/src/local-ai/decisions.mjs +273 -0
  34. package/src/local-ai/dev.mjs +8 -2
  35. package/src/local-ai/onnx-worker.mjs +67 -7
  36. package/src/local-ai/onnx.mjs +23 -12
  37. package/src/native/portable-layout.mjs +8 -3
  38. package/src/repository.mjs +144 -4
@@ -24,7 +24,8 @@ The Android host also supplies Git/process execution through the existing
24
24
  process-adapter contract; this module does not install Git or choose shared
25
25
  Android storage.
26
26
 
27
- The factory's first actual operation creates necessary parent directories.
27
+ The factory's first operation that prepares a checkout creates necessary parent
28
+ directories. The read-only `configuration` operation never prepares one.
28
29
  No existing data is moved, copied, deleted, renamed or migrated. `appRoot`,
29
30
  `stateRoot`, preferences, OPFS and the existing CLI/workspace defaults remain
30
31
  independent and unchanged.
@@ -47,7 +48,7 @@ await repository.close();
47
48
  ```
48
49
 
49
50
  `createRepositoryWorkspace({name,directory,dataRoot,remote,branch,gitIdentity,onEvent,run}={})`
50
- returns `{directory,open,status,pull,push,write,close,drain,dispose}`. The `directory`
51
+ returns `{directory,open,status,configuration,pull,push,write,close,drain,dispose}`. The `directory`
51
52
  property is the absolute selected working path.
52
53
 
53
54
  - Omit `directory` to select `<repositoriesRoot>/<name>`. The application supplies
@@ -67,15 +68,17 @@ property is the absolute selected working path.
67
68
  authentication remain with Git and the native host. The SDK adds no download,
68
69
  credential store, polling, network retry or process supervisor.
69
70
 
70
- The open/status/pull/push methods accept `{signal}={}` and return promises;
71
+ The open/status/configuration methods accept `{signal}={}` and return promises;
72
+ pull/push accept `{target,signal}={}` with an optional captured destination.
71
73
  `write` accepts the complete file/message request described below:
72
74
 
73
75
  | Method | Result and side effect |
74
76
  |---|---|
75
77
  | `open` | For a missing/empty destination, runs one clone and returns `{directory,cloned:true,stdout,stderr}` with complete process output. For an existing working repository root, returns `{directory,cloned:false}` after read-only inspection. Later opens on that owner reuse preparation. |
76
78
  | `status` | Prepares the checkout if needed, then returns the existing `repositoryStatus` result unchanged. |
77
- | `pull` | Prepares the checkout if needed, then runs the existing clean-checkout, fast-forward-only `repositoryPull` operation unchanged. |
78
- | `push` | Prepares the checkout if needed, then runs the existing `repositoryPush` operation unchanged, preserving its support for unrelated uncommitted working files. |
79
+ | `configuration` | Observes the existing working root, symbolic HEAD, origin and configured upstream. It never clones, initializes or fetches. |
80
+ | `pull` | Prepares the checkout if needed, then runs clean-checkout, fast-forward-only `repositoryPull`, optionally using the operation's selected target. |
81
+ | `push` | Prepares the checkout if needed, then runs `repositoryPush`, optionally using the operation's selected target, preserving support for unrelated uncommitted working files. |
79
82
  | `write` | Writes exact caller-selected text files, stages and commits only their literal paths, then performs one ordinary non-force push. Returns confirmed operation outcomes; see below. |
80
83
  | `close`, `drain`, `dispose` | The same idempotent operation: stop accepting new calls and await accepted work and its process/event cleanup. They retain the repository on disk. |
81
84
 
@@ -87,6 +90,83 @@ A failed or cancelled clone reports the actual failure; any remaining directory
87
90
  is retained for application-owned inspection. There is no automatic deletion or
88
91
  destructive retry. Filesystem failures and complete Git diagnostics propagate.
89
92
 
93
+ ## Existing checkout configuration and selected targets
94
+
95
+ `configuration({signal}={})` observes an existing checkout without invoking
96
+ `open`, creating directories, cloning, initializing, fetching or changing Git
97
+ configuration. A missing repository reports the actual Git failure. A bare
98
+ cache or nested checkout directory reports `ARCANE_REPOSITORY_DIRECTORY_INVALID`.
99
+ Its result is:
100
+
101
+ ```text
102
+ {
103
+ repositoryRoot,
104
+ headRef: fullSymbolicRef | null,
105
+ origin: {urls: [...], pushUrls: [...]},
106
+ upstream: {remoteNames: [...], mergeRefs: [...], urls: [...], pushUrls: [...]} | null
107
+ }
108
+ ```
109
+
110
+ `repositoryRoot` is this owner's absolute selected working root. `headRef` is
111
+ the complete symbolic HEAD, including an unborn branch, or `null` for detached
112
+ HEAD. `upstream` is `null` when HEAD does not name a local branch. Otherwise its
113
+ arrays contain that branch's configured `remote` and `merge` values; `urls` and
114
+ `pushUrls` observe the effective last configured remote name. A `.` remote
115
+ means the local repository and has no remote URL arrays. Origin is observed
116
+ independently, even when it is not the upstream.
117
+
118
+ Arrays retain configured order, repeated values, complete UTF-8 strings and
119
+ empty strings. `[]` means unset; `['']` means an explicit empty value. The
120
+ reader honors configured includes and ordinary Git configuration precedence.
121
+ Unset push URLs do not imply that Git cannot push: Git retains its normal URL
122
+ fallback and rewrite behavior. These are configuration observations, not
123
+ resolved endpoints, authentication, account identity or ownership proof.
124
+ The SDK neither queries a credential helper nor changes configuration here.
125
+
126
+ Metadata uses the shared raw-Git-text reader. Lifecycle/stderr events remain
127
+ with the process owner, raw stdout remains parser-owned, and undecodable text
128
+ reports `ARCANE_GIT_CONFIGURATION_NOT_TEXT`. Failures retain complete raw
129
+ stdout, process diagnostics and causal errors using the identity reader's
130
+ documented attachment behavior. One observation uses four read-only Git
131
+ commands for an attached local branch, or three otherwise. Results are not a
132
+ transaction with later work or external Git activity. The app owns any decision
133
+ that the current checkout corresponds to its selected repository and branch.
134
+
135
+ The optional `target:{remote,ref}` on `pull`, `push` and `write` selects that
136
+ operation's Git destination. Both fields are nonempty strings representable by
137
+ the native process transport. The SDK captures their exact strings when the
138
+ call is accepted; later edits to the target object or UI selection cannot
139
+ redirect queued or active work. Git owns ref parsing, URL interpretation,
140
+ credentials, hooks and remote outcomes. This target is independent of the
141
+ factory's `remote`/`branch`, which remain initial-clone inputs only.
142
+
143
+ ```javascript
144
+ const observed = await repository.configuration({signal});
145
+ // The app decides whether observed.headRef and configured URLs match its choice.
146
+ const target = {remote: connection.locator, ref: connection.ref};
147
+ await repository.pull({target, signal});
148
+ const result = await repository.write({files: selectedFiles, message, target, signal});
149
+ ```
150
+
151
+ A targeted pull uses `git pull --ff-only -- <remote> <ref>:`. The trailing colon
152
+ is Git's source-only fetch framing; the fetched history is integrated into the
153
+ current branch. It does not switch branches or reset files/history. The existing
154
+ clean-checkout requirement remains. A targeted push uses
155
+ `git push --no-follow-tags -- <remote> HEAD:<ref>`: current HEAD is published to
156
+ the selected ref, without force or implicit configured tag following. Existing
157
+ history is still sent when Git needs it. Ordinary conflicting Git settings or
158
+ remote rejection remain actual failures; no settings are rewritten.
159
+
160
+ Omitting `target` preserves ordinary configured pull/push behavior and its
161
+ existing result shape. Targeted pull/push results add the captured `target` and
162
+ complete `stdout`/`stderr` alongside the existing `action`, `repositoryRoot`,
163
+ `branch` and compatibility `output` field. Writer results and failure outcomes
164
+ add that same captured `target`. There is no hidden pre-write pull, branch
165
+ selection, retry, reset, force, reversal or recommit. The app decides when to
166
+ observe, refresh, write and publish. See Git's [pull](https://git-scm.com/docs/git-pull),
167
+ [push](https://git-scm.com/docs/git-push) and [configuration](https://git-scm.com/docs/git-config)
168
+ contracts.
169
+
90
170
  ## Git identity configuration
91
171
 
92
172
  ```javascript
@@ -215,7 +295,7 @@ const result = await repository.write({
215
295
  });
216
296
  ```
217
297
 
218
- `write({files:[{path,content}],message,signal}={})` requires at least one explicit
298
+ `write({files:[{path,content}],message,target,signal}={})` requires at least one explicit
219
299
  file, a nonempty commit message and string content (including an empty string).
220
300
  Paths name working files relative to this repository, not its root, outside
221
301
  paths or Git-owned `.git` metadata. Strings must be representable as UTF-8;
@@ -239,9 +319,10 @@ native host.
239
319
  One `git --literal-pathspecs add -- <paths>` stages only those exact names.
240
320
  One `git --literal-pathspecs commit --only --cleanup=verbatim --file - -- <paths>`
241
321
  commits only those paths, leaving unrelated staged paths staged. The original
242
- message is streamed unchanged through standard input. One ordinary `git push`
243
- then uses that repository's existing remote/ref configuration, the optional
322
+ message is streamed unchanged through standard input. Without `target`, one
323
+ ordinary `git push` then uses that repository's existing remote/ref configuration, the optional
244
324
  process-local identity selection above, existing credentials and hooks.
325
+ With `target`, the final push uses the selected current-HEAD mapping above.
245
326
  There is no implicit pull, branch switch, forced push,
246
327
  hook bypass, automatic retry, rollback or reset. If Git reports no changes to
247
328
  commit, that actual failure is returned; the SDK creates no empty commit.
@@ -252,7 +333,8 @@ Existing Git attributes, clean filters, EOL settings and hooks continue to apply
252
333
  when Git stages/commits content. The filesystem write preserves the original
253
334
  text; this API does not claim that repository-configured filters leave Git blob
254
335
  text identical. It preserves those settings. A push may also send existing history or other
255
- refs selected by the repository's ordinary push configuration.
336
+ refs selected by the repository's ordinary push configuration when no explicit
337
+ target is supplied.
256
338
 
257
339
  ### Result and failure outcomes
258
340
 
@@ -275,6 +357,8 @@ Successful completion returns:
275
357
 
276
358
  Each output record retains complete stdout/stderr. `code` and the process
277
359
  termination `signal` are included when a completed process result is available.
360
+ When supplied, `target:{remote,ref}` is included in the result or failure outcome
361
+ with the original accepted strings.
278
362
  An in-progress write also records its current `path` on a failure outcome.
279
363
  `writtenPaths` records successful filesystem writes in input order; `written`
280
364
  becomes true only after every requested write succeeds. The other booleans
@@ -66,11 +66,34 @@ service's startup before invoking its handler. State errors use the shared
66
66
  complete diagnostic serialization; the startup promise retains its original
67
67
  rejection value.
68
68
 
69
- Each lifecycle hook receives `{application, service, emit}`. Each request handler
70
- receives `(parameters, {application, service, emit, requestId, signal})`, with
69
+ Each lifecycle hook receives `{application, service, emit, getService}`. Each request handler
70
+ receives `(parameters, {application, service, emit, getService, requestId, signal})`, with
71
71
  `this` bound to its service definition. A hook or handler may publish a complete
72
72
  service-owned event through `emit(event, data)`.
73
73
 
74
+ ### Native service composition
75
+
76
+ `await runtime.getService(name)` and `await context.getService(name)` return the
77
+ actual registered service definition after that service's shared startup
78
+ promise. A lookup can start its selected dependency before `runtime.start()`;
79
+ it waits for that dependency alone, with no renderer, transport request or
80
+ all-service readiness barrier. Concurrent lookups reuse the same startup and
81
+ return the same object. Applications keep their service dependencies acyclic.
82
+
83
+ Use the returned service's documented native members, such as
84
+ [`getONNXRuntime()`](local-ai.md#native-service-owners), for same-process
85
+ composition. RPC handlers remain owned by the dispatcher; calling entries in
86
+ `service.methods` directly does not supply request tracking or cancellation.
87
+ No service lookup is exposed over the browser protocol.
88
+
89
+ An unregistered name rejects with `CORE_SERVICE_UNAVAILABLE`. Startup failure
90
+ rejects with the original error. New lookups reject with `CORE_CLOSING` once
91
+ shutdown begins; an already accepted lookup still settles with its startup.
92
+ Lookup provides readiness, not a lifetime lease or ownership transfer. Retain
93
+ each acquired native owner according to its own documented cleanup contract,
94
+ and use that retained handle during disposal rather than requesting a new one.
95
+ Independent services still dispose concurrently.
96
+
74
97
  ## State and frames
75
98
 
76
99
  `runtime.current()` returns dispatcher state, application, version, per-service
@@ -100,6 +123,20 @@ The shared `arcane-os/core/contracts` module owns `CORE_PROTOCOL` (`arcane/1`),
100
123
  availability errors remain observable; unavailable services are not replaced
101
124
  with browser behavior.
102
125
 
126
+ A request with no registered handler retains code `METHOD_NOT_ALLOWED` and
127
+ adds the exact `method`, its first dotted `namespace`, and a `reason`.
128
+ `core-namespace-unavailable` means the dispatcher has neither a service with
129
+ that name nor any registered method in that namespace. Otherwise the reason is
130
+ `core-method-unavailable`; the built-in `system`, `app`, and `version`
131
+ namespaces also count as present. This is a dispatch lookup result before any
132
+ handler or permission decision, not a capability-discovery call. A read-only
133
+ or partially registered service therefore never appears wholly absent.
134
+ Handler/startup/permission errors remain unchanged and acquire none of these
135
+ lookup markers. Generic or older `METHOD_NOT_ALLOWED` errors do not establish
136
+ namespace absence. An optional browser adapter may recognize the exact absent
137
+ namespace and method according to its own documented contract; the dispatcher
138
+ does not select or create another implementation.
139
+
103
140
  Events have `{protocol, type:'event', event, data, time}`:
104
141
 
105
142
  - `core.ready`: the dispatcher is connected; service/model readiness is separate.
@@ -133,9 +170,13 @@ the handler runs. A service that does not finish or respond to cancellation is
133
170
  still unfinished; the SDK does not report a forced timeout as successful cleanup.
134
171
 
135
172
  Use `lifetime:'service'` for accepted work, such as a save, that must survive a
136
- renderer cancellation or disconnect. These operations are not aborted by the
137
- request cancellation controls or by normal Core shutdown. The service still
138
- owns its persistence, queueing and failure semantics.
173
+ renderer cancellation or disconnect. The dispatcher does not abort these
174
+ operations through request cancellation controls or its own shutdown. The
175
+ service still owns its persistence, queueing and failure semantics. A composing
176
+ host or native service can abort its own lifetime signal during shutdown;
177
+ in-flight native inference can therefore be cancelled even when the dispatcher
178
+ retains a service-lifetime response. Service lifetime does not promise survival
179
+ of native host shutdown.
139
180
 
140
181
  `runtime.close()` is idempotent and retains the same completion promise. It stops
141
182
  accepting new requests, cancels request-lifetime operations, waits for accepted
@@ -1,17 +1,59 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "sdkVersion": "0.65.0",
3
+ "sdkVersion": "0.67.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": 290,
9
+ "memberCount": 293,
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-decisions:createNativeDecisionModel",
17
+ "name": "createNativeDecisionModel",
18
+ "displayName": "createNativeDecisionModel()",
19
+ "kind": "function",
20
+ "signature": "createNativeDecisionModel({onnx,modelAssets,workingDirectory,paths,model='onnx-community/laya-typed-decisions-ONNX',revision='main',dtype='fp32',sessionOptions,executionPreference='gpu',signal}={})",
21
+ "entrypoints": ["arcane-os/local-ai/decisions"],
22
+ "primaryImport": "arcane-os/local-ai/decisions",
23
+ "group": "Native typed decisions",
24
+ "summary": "Explicit native Laya FP32 option scoring through an existing ONNX owner and a tokenizer Worker.",
25
+ "availability": "Node on Windows/Linux/macOS with selected ONNX Runtime and model files; Android needs host adaptation",
26
+ "protocol": "Shared browser/native decision encoding with native named tensor results",
27
+ "normalization": "Returns load/evaluate/classify/current/status/subscribe/unload/dispose; preserves complete separate state/question/options/type and original rows, raw scores and every graph output. Explicit load prepares selected upstream files or uses caller-owned paths; GPU preference attempts advertised providers then CPU. Cancellation retires the shared activation; files remain retained through actual ONNX and tokenizer Worker exit. No chat history or duplicate inference engine."
28
+ },
29
+ {
30
+ "id": "core-decisions:createNativeDecisionService",
31
+ "name": "createNativeDecisionService",
32
+ "displayName": "createNativeDecisionService()",
33
+ "kind": "function",
34
+ "signature": "createNativeDecisionService(configuration={}, {appRoot=process.cwd()}={})",
35
+ "entrypoints": ["arcane-os/core/decisions"],
36
+ "primaryImport": "arcane-os/core/decisions",
37
+ "group": "Native typed decisions",
38
+ "summary": "Renderer-independent native Laya service reusing the registered local-AI and model-assets owners.",
39
+ "availability": "Node Core with selected native ONNX and model files",
40
+ "protocol": "arcane/1 decisions.status/load/evaluate/unload and decisions.state",
41
+ "normalization": "Registration starts no model or tokenizer. Explicit load obtains dependency-ready same-process owners and reacquires getONNXRuntime after recovery. Native load/evaluate/classify/current/subscribe/unload/dispose preserve complete results; RPC uses the existing tensor codec. Unload has accepted service lifetime; host shutdown cancels request-lifetime load/evaluation."
42
+ },
43
+ {
44
+ "id": "core-decisions:default",
45
+ "name": "default",
46
+ "displayName": "createNativeDecisionService default export",
47
+ "kind": "function",
48
+ "signature": "default as createNativeDecisionService",
49
+ "entrypoints": ["arcane-os/core/decisions"],
50
+ "primaryImport": "arcane-os/core/decisions",
51
+ "group": "Native typed decisions",
52
+ "summary": "Default binding for the same native decision Core service factory.",
53
+ "availability": "Node Core runtime",
54
+ "protocol": "arcane/1 service definition",
55
+ "normalization": "Binding identity equals the named createNativeDecisionService export"
56
+ },
15
57
  {
16
58
  "id": "local-ai-whisper:createWhisperRuntime",
17
59
  "name": "createWhisperRuntime",
@@ -164,7 +206,7 @@
164
206
  "summary": "Owns one selected native working checkout with ArcaneData/Repos defaults and existing Git/process lifecycle.",
165
207
  "availability": "Node with Git on Windows, Linux and macOS; Android requires host process adaptation",
166
208
  "protocol": "Git working repository and SDK process adapter",
167
- "normalization": "Returns directory, open, status, pull, push, write and identical close/drain/dispose hooks. Only missing or empty destinations clone; existing roots are inspected without rewriting, resetting or pulling. Explicit paths remain selected. Same-directory operations serialize within the process; cancellation and shutdown join accepted process work. write snapshots exact selected text and paths, writes files, stages/commits only literal owned paths and non-force pushes, preserving unrelated staged files and ordinary Git filters. Complete outputs and causal failures retain confirmed local/committed/pushed and uncertain outcomes. Optional gitIdentity captures name/email/username for child Git operations only; omitted fields remain inherited and no config file is written."
209
+ "normalization": "Returns directory, open, status, configuration, pull, push, write and identical close/drain/dispose hooks. Only missing or empty destinations clone; existing roots are preserved. configuration observes the existing root, symbolic HEAD, origin URL/pushURL arrays and branch remote/merge/upstream URL arrays without clone/init/fetch, preserving unset, empty and repeated values. Explicit paths remain selected. Same-directory operations serialize within the process; cancellation and shutdown join accepted process work. pull/push/write accept a captured target {remote,ref} for current-branch fast-forward pull or non-force current-HEAD selected-ref push; omission retains ordinary configured behavior. write snapshots exact text and paths, stages/commits only literal owned paths and preserves unrelated staged files and Git filters. Complete outputs and causal failures retain confirmed local/committed/pushed and uncertain outcomes plus the supplied target. Optional gitIdentity captures name/email/username for child Git operations only; omitted fields remain inherited and no config file is written."
168
210
  },
169
211
  {
170
212
  "id": "core-repositories:readGitIdentity",
@@ -227,14 +269,14 @@
227
269
  "name": "createCoreImageRuntime",
228
270
  "displayName": "createCoreImageRuntime()",
229
271
  "kind": "function",
230
- "signature": "createCoreImageRuntime({client=getInstalledCoreClient(),signal,onEvent}={})",
272
+ "signature": "createCoreImageRuntime({client,signal,onEvent}={})",
231
273
  "entrypoints": ["arcane-os/ai/core-image"],
232
274
  "primaryImport": "arcane-os/ai/core-image",
233
275
  "group": "Core local images",
234
276
  "summary": "Uses an available Core image service for generation and original-PNG editing with synchronous Thinking acknowledgement, lifecycle replay and complete PNG Blobs.",
235
277
  "availability": "Browser/native WebView with an available Core image service; construction opens no connection or model",
236
278
  "protocol": "arcane/1 image.status/load/generate/edit/unload and image.state/progress",
237
- "normalization": "Returns load/generate/edit/unload/inspect/current/subscribe/close; edit preserves the complete original PNG Blob/File through transport with explicit strength; timeoutMs is zero, close cancels only this accessor and explicit unload owns the shared model"
279
+ "normalization": "Returns load/generate/edit/unload/inspect/current/subscribe/close; omitted client follows installation/replacement/retirement, explicit client including null remains fixed. Retirement cancels owned work and clears readiness; late old-client output is suppressed. Edit preserves the complete original PNG Blob/File through transport with explicit strength; timeoutMs is zero, close cancels only this accessor and explicit unload owns the shared model"
238
280
  },
239
281
  {
240
282
  "id": "core-image-service:createLocalImageService",
@@ -290,7 +332,7 @@
290
332
  "summary": "Owns selected native working-file projections and engine retain handles while original stored model files remain unchanged.",
291
333
  "availability": "Node Core with an application-selected working directory",
292
334
  "protocol": "arcane/1 modelAssets.open/write/complete/release/status and modelAssets.state",
293
- "normalization": "Returns current/retain/dispose and Core service lifecycle; final native release joins writes and closes before deleting only its working projection"
335
+ "normalization": "Returns current/prepare/retain/release/dispose and Core service lifecycle. Explicit prepare({id,workingDirectory,members:[{path,url}],signal,onProgress}) streams complete upstream members through the existing file owner and reports file/phase progress. release(id) relinquishes preparation ownership; cancellation and cleanup join fetches/writes. Native retains survive until actual engine release before deleting only the owned working projection. Startup downloads nothing."
294
336
  },
295
337
  {
296
338
  "id": "core-model-assets-service:default",
@@ -318,21 +360,21 @@
318
360
  "summary": "Owns explicitly loaded ONNX graphs and complete named tensor inference in retained native workers.",
319
361
  "availability": "Node on Windows/Linux/macOS x64/arm64 with prepared onnxruntime-node; Android needs host adaptation",
320
362
  "protocol": "Per-session worker lifecycle with structured-clone tensors and replaying state",
321
- "normalization": "Returns load/run/unload/current/subscribe/close; explicit model and session IDs; native calls may delay worker termination, and close observes actual exit"
363
+ "normalization": "Returns load/run/unload/current/subscribe/close; load accepts executionPreference gpu for advertised provider creation attempts then CPU, while explicit sessionOptions.executionProviders takes precedence. Complete execution diagnostics distinguish configured providers from physical acceleration. stopping revokes new runs while exited records actual Worker exit; recoverable run errors preserve the session. Cleanup joins exit and output delivery even when termination fails."
322
364
  },
323
365
  {
324
366
  "id": "core-onnx:createCoreONNXRuntime",
325
367
  "name": "createCoreONNXRuntime",
326
368
  "displayName": "createCoreONNXRuntime()",
327
369
  "kind": "function",
328
- "signature": "createCoreONNXRuntime({client=getInstalledCoreClient()}={})",
370
+ "signature": "createCoreONNXRuntime({client}={})",
329
371
  "entrypoints": ["arcane-os/ai/core-onnx"],
330
372
  "primaryImport": "arcane-os/ai/core-onnx",
331
373
  "group": "Core local AI",
332
374
  "summary": "Accesses local system ONNX through an existing Core client with complete tensor transport.",
333
375
  "availability": "Browser with available Core ONNX service; construction installs no runtime or model",
334
376
  "protocol": "arcane/1 onnx.status/load/run/unload and localai.state",
335
- "normalization": "Returns load/run/unload/inspect/current/subscribe/close; preserves typed and string tensors; accessor close cancels its requests without closing shared Core or implicitly unloading shared models"
377
+ "normalization": "Returns load/run/unload/inspect/current/subscribe/close; omitted client follows late installation/replacement/retirement and reads current status, while explicit client including null stays fixed. Retirement clears readiness and cancels owned work; late old-client results are suppressed. Preserves typed and string tensors; close removes subscriptions and cancels requests without closing shared Core or implicitly unloading shared models"
336
378
  },
337
379
  {
338
380
  "id": "root:createGitTextSnapshot",
@@ -409,14 +451,14 @@
409
451
  "name": "createCoreLocalAIProvider",
410
452
  "displayName": "createCoreLocalAIProvider()",
411
453
  "kind": "function",
412
- "signature": "createCoreLocalAIProvider({client=getInstalledCoreClient(),id='llama.cpp'}={})",
454
+ "signature": "createCoreLocalAIProvider({client,id='llama.cpp'}={})",
413
455
  "entrypoints": ["arcane-os/ai/core-local"],
414
456
  "primaryImport": "arcane-os/ai/core-local",
415
457
  "group": "Core local AI",
416
458
  "summary": "Browser llama.cpp provider through an explicitly connected Core, with application-owned model selection and complete response streaming.",
417
459
  "availability": "Browser with an available Core local AI service; construction installs no runtime or model",
418
460
  "protocol": "arcane-ai-provider/2 LLM lifecycle over arcane/1",
419
- "normalization": "Preserves complete payloads and original parsed chunks; waits for the exact requested model and cancels on observed readiness loss"
461
+ "normalization": "Preserves complete payloads and original parsed chunks; waits for the exact requested model and cancels on observed readiness loss. Omitted client follows installation/replacement/retirement; explicit client including null stays fixed. Inspect reports load capability separately from loaded readiness; disposal releases only an actually retained selection through its captured client. Provider/2 role state reconciles at existing operation boundaries, not through an idle state subscription."
420
462
  },
421
463
  {
422
464
  "id": "core-local-ai:createLocalAIService",
@@ -430,7 +472,7 @@
430
472
  "summary": "Composes selected native llama.cpp, Ollama and ONNX engines as a Core service with retained process/worker ownership and model lifecycle.",
431
473
  "availability": "Node with selected upstream runtime distributions or available configured system services",
432
474
  "protocol": "arcane/1 methods and events; llama.cpp OpenAI HTTP/SSE, Ollama native HTTP/NDJSON and ONNX tensor transport",
433
- "normalization": "Application-owned runtime and model requirements; optional prepare supplies installed records during this service startup; independent services, complete responses and exact owned-process cleanup"
475
+ "normalization": "Application-owned runtime and model requirements; optional prepare supplies installed records during this service startup. 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.status/models observe without starting or restarting an engine. Independent services, complete responses and exact owned-process cleanup remain unchanged."
434
476
  },
435
477
  {
436
478
  "id": "core-local-ai:default",
@@ -493,14 +535,14 @@
493
535
  "name": "createBrowserDecisionModel",
494
536
  "displayName": "createBrowserDecisionModel()",
495
537
  "kind": "function",
496
- "signature": "createBrowserDecisionModel({family,model,revision,device,runtime})",
538
+ "signature": "createBrowserDecisionModel({family,model,revision,device,dtype,runtime}={})",
497
539
  "entrypoints": ["arcane-os/ai/browser-decisions"],
498
540
  "primaryImport": "arcane-os/ai/browser-decisions",
499
541
  "group": "Browser typed decisions",
500
- "summary": "Explicit-load Laya FP16 and Julia-1 FP32 decisions with complete inputs and graph results.",
542
+ "summary": "Explicit-load Laya and Julia-1 decisions with caller-selected precision, complete inputs and graph results.",
501
543
  "availability": "Browser module Workers and the selected Transformers.js backend; import/construction starts no model load",
502
544
  "protocol": "Caller-owned state/question/options rows; five-input decision graph; native Worker request/result lifecycle",
503
- "normalization": "Full field tokenization, raw logits and unrounded softmax; no policy thresholds, storage or precision fallback"
545
+ "normalization": "Full field tokenization, raw logits and unrounded softmax; dtype defaults to fp16 for Laya and fp32 for Julia, with explicit values forwarded unchanged to the upstream loader; no policy thresholds, storage or precision fallback"
504
546
  },
505
547
  {
506
548
  "id": "root:acceptWebSocket",
@@ -2106,13 +2148,13 @@
2106
2148
  "name": "repositoryPull",
2107
2149
  "displayName": "repositoryPull()",
2108
2150
  "kind": "function",
2109
- "signature": "async repositoryPull({ workspaceRoot=process.cwd(), signal, onEvent, run=runProcess }={})",
2151
+ "signature": "async repositoryPull({ workspaceRoot=process.cwd(), target, signal, onEvent, run=runProcess }={})",
2110
2152
  "entrypoints": [
2111
2153
  "arcane-os"
2112
2154
  ],
2113
2155
  "primaryImport": "arcane-os",
2114
2156
  "group": "Workspace, doctor, repository, and server",
2115
- "summary": "Runs one fast-forward-only pull after proving the selected repository worktree is clean.",
2157
+ "summary": "Runs one fast-forward-only pull into the selected clean worktree, optionally from a captured remote/ref target.",
2116
2158
  "availability": "Node; network-assisted Git",
2117
2159
  "protocol": "Node ESM",
2118
2160
  "normalization": "SDK-normalized inputs, errors, events, and documented result"
@@ -2122,13 +2164,13 @@
2122
2164
  "name": "repositoryPush",
2123
2165
  "displayName": "repositoryPush()",
2124
2166
  "kind": "function",
2125
- "signature": "async repositoryPush({ workspaceRoot=process.cwd(), signal, onEvent, run=runProcess }={})",
2167
+ "signature": "async repositoryPush({ workspaceRoot=process.cwd(), target, signal, onEvent, run=runProcess }={})",
2126
2168
  "entrypoints": [
2127
2169
  "arcane-os"
2128
2170
  ],
2129
2171
  "primaryImport": "arcane-os",
2130
2172
  "group": "Workspace, doctor, repository, and server",
2131
- "summary": "Pushes the selected attached branch through the repository's configured remote and credentials.",
2173
+ "summary": "Pushes the attached branch through ordinary configured Git or an explicit captured current-HEAD destination without force.",
2132
2174
  "availability": "Node; network-assisted Git",
2133
2175
  "protocol": "Node ESM",
2134
2176
  "normalization": "SDK-normalized inputs, errors, events, and documented result"
@@ -4276,7 +4318,7 @@
4276
4318
  "summary": "Creates an app-neutral Core dispatcher with explicit services, request lifetimes, events and graceful drain.",
4277
4319
  "availability": "Node on Windows, Linux and macOS native hosts; Android requires its host adaptation",
4278
4320
  "protocol": "arcane/1 dispatcher and service lifecycle",
4279
- "normalization": "Starts services independently, preserves complete results/errors, cancels only request-lifetime work and drains accepted service work; runtime.replay publishes current dispatcher/service state without restart and preserves reentrant lifecycle publication order"
4321
+ "normalization": "Starts services independently; runtime.getService(name) and context.getService(name) return the same registered object after only its shared startup, without a renderer or global barrier. Lookup is readiness, not a lifetime lease; new lookups reject during shutdown. Preserves complete results/errors, cancels request-lifetime work and drains accepted service work; runtime.replay publishes current dispatcher/service state without restart and preserves reentrant lifecycle publication order"
4280
4322
  },
4281
4323
  {
4282
4324
  "id": "core-stdio:encodeCoreFrame",
@@ -967,8 +967,9 @@
967
967
  {
968
968
  "file": "runtime/arcane/components/theme-switcher.html",
969
969
  "name": "theme-switcher.html",
970
- "purpose": "Selects and refreshes system, light, dark, or custom theme mode.",
970
+ "purpose": "Selects and refreshes system, light, dark, or custom theme mode with per-instance choices and labels.",
971
971
  "methods": [
972
+ "configure()",
972
973
  "setMode()",
973
974
  "refresh()"
974
975
  ],
@@ -1083,7 +1083,7 @@
1083
1083
  "summary": "Loads and updates schema-defined app preferences through native storage with a narrow browser fallback.",
1084
1084
  "availability": "Browser/native hybrid",
1085
1085
  "protocol": "Arcane.preferences or app-scoped localStorage + per-realm globalThis.arcaneEvents authority",
1086
- "normalization": "Complete ordinary values remain mutable; setAll uses one optional atomic adapter batch for every selected value when advertised, otherwise retains complete serial per-key compatibility, never retries a rejected dispatched batch serially, and only exact unsupported native capability changes future operations to the browser fallback.",
1086
+ "normalization": "Complete values and operation context retained; the default adapter recognizes only exact missing preferences namespace/matching method or existing Android unsupported capability before selecting existing app-scoped localStorage. Single operations retry once after disposal/cancellation checks; partial-service and genuine failures reject unchanged. An advertised rejected batch is never retried serially, and its original rejection is preserved before later local operations.",
1087
1087
  "surface": "Event/error constants, default `PreferenceStore`, re-exported `Preference`/schema; load/set/setAll/reset APIs, required adapter get/set/delete plus optional setMany, state-free EventTarget/on compatibility, and `dispose()`."
1088
1088
  },
1089
1089
  {
@@ -1291,10 +1291,10 @@
1291
1291
  "exports": [
1292
1292
  "default"
1293
1293
  ],
1294
- "summary": "Reads or applies native appearance, returning an explicit unsupported browser state when no bridge exists.",
1294
+ "summary": "Reads or applies native appearance, returning an explicit unsupported result when the bridge or optional namespace is absent.",
1295
1295
  "availability": "Browser/native hybrid",
1296
1296
  "protocol": "Arcane.appearance",
1297
- "normalization": "Absent bridge normalized; native result/error preserved.",
1297
+ "normalization": "Absent bridge keeps its browser result. Exact missing appearance namespace/matching method returns supported:false with the complete original diagnostic; no platform guess or cached absence. Partial-method, permission, transport, cancellation and other genuine errors reject unchanged; available() is callable bridge presence only.",
1298
1298
  "surface": "default `SystemAppearance`; `available()`, `current()`, `apply()`."
1299
1299
  },
1300
1300
  {