arcane-os 0.80.0 → 0.82.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 (34) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +1 -1
  3. package/browser-runtime/ai/browser-wasm-llm-provider.mjs +97 -19
  4. package/browser-runtime/ai/dbopfs-model-parts.mjs +12 -5
  5. package/browser-runtime/ai/dbopfs-model-resources.mjs +2 -5
  6. package/browser-runtime/core/app-control.mjs +439 -0
  7. package/docs/reference/ai/browser-speech.md +11 -0
  8. package/docs/reference/ai/browser-wasm.md +21 -10
  9. package/docs/reference/cli.md +9 -1
  10. package/docs/reference/core-native-packaging.md +14 -0
  11. package/docs/reference/inventory/package-api.json +23 -9
  12. package/docs/reference/inventory/runtime-components.json +2 -1
  13. package/docs/reference/native-app-control.md +147 -0
  14. package/docs/reference/native-decisions.md +74 -16
  15. package/docs/reference/runtime-components.md +20 -0
  16. package/docs/reference/sdk-api.md +49 -6
  17. package/package.json +2 -1
  18. package/runtime/arcane/components/chat.html +140 -18
  19. package/runtime/arcane/modules/AI.js +10 -5
  20. package/src/cli/app-control.mjs +106 -0
  21. package/src/cli/main.mjs +5 -0
  22. package/src/core/app-control.mjs +23 -0
  23. package/src/core/hosts/windows/ArcaneAppControl.cs +525 -0
  24. package/src/core/hosts/windows/ArcaneCoreProcess.cs +2 -63
  25. package/src/core/hosts/windows/ArcaneFrameTransport.cs +80 -0
  26. package/src/core/hosts/windows/ArcaneHost.cs +45 -7
  27. package/src/core/hosts/windows/ArcaneLauncher.cs +5 -0
  28. package/src/core/hosts/windows/ArcaneWindowControl.cs +248 -0
  29. package/src/core/services/decisions.mjs +16 -2
  30. package/src/core/shared-host.mjs +7 -91
  31. package/src/core/socket-connection.mjs +109 -0
  32. package/src/local-ai/decision-tokenizer-worker.mjs +1 -1
  33. package/src/local-ai/decision-tokenizer.mjs +2 -2
  34. package/src/local-ai/decisions.mjs +33 -10
@@ -194,13 +194,14 @@
194
194
  "slots": [],
195
195
  "dependencies": [
196
196
  "MD.js",
197
+ "MarkdownMedia.js",
197
198
  "File.js",
198
199
  "ConversationTimebox.js",
199
200
  "AIRuntimeState.js"
200
201
  ],
201
202
  "availability": "Browser and supported native WebViews",
202
203
  "transport": "HTMLImport + DOM; injected Arcane/provider modules where listed",
203
- "normalization": "Default completed-transcription submit or opt-in transcriptionMode=draft, complete appendDraft text with preserved existing selection, native interim-range ownership, and rendered conversation print/printTitle are normalized. No-retention submissions stay outside transcript, recurring context, memory, and DBOPFS. UI/runtime state, honest model progress, complete timestamped transcript including ui_hidden stored records, exact saved nonblank assistant display names with AI fallback rather than current-name inference, live session name capture with host.aiName display fallback, user-facing structural arguments.message, nonblank all-ID tool-result restoration, collapsed complete raw inspection, ordered parallel-call replay validation, per-choice streamed/terminal complete-envelope correlation, complete nonstructural stream rendering, automatic repeated-formatting-mark removal from only the outbound speech-input copy while displayed and stored Markdown stays exact, generic visible failure outcomes with complete console diagnostics, atomic executed/declined/cancelled/not-executed result batches with one continuation, plural pending-call reload recovery, reentrant terminal-event ownership, and BFCache-preserving page lifecycle are normalized; destroy aborts observation and returns true once/false thereafter; AI/storage/media behavior remains mixed"
204
+ "normalization": "Default completed-transcription submit or opt-in transcriptionMode=draft, complete appendDraft text with preserved existing selection, native interim-range ownership, and rendered conversation print/printTitle are normalized. Local MarkdownMedia images hydrate independently in restored, new, streamed and final content without changing original Markdown or delaying text. Per-render ownership releases obsolete display URLs on replacement, removal and destruction; requested print snapshots retain them through afterprint, while explicit print awaits current image readiness. No-retention submissions stay outside transcript, recurring context, memory, and DBOPFS. UI/runtime state, honest model progress, complete timestamped transcript including ui_hidden stored records, exact saved nonblank assistant display names with AI fallback rather than current-name inference, live session name capture with host.aiName display fallback, user-facing structural arguments.message, nonblank all-ID tool-result restoration, collapsed complete raw inspection, ordered parallel-call replay validation, per-choice streamed/terminal complete-envelope correlation, complete nonstructural stream rendering, automatic repeated-formatting-mark removal from only the outbound speech-input copy while displayed and stored Markdown stays exact, generic visible failure outcomes with complete console diagnostics, atomic executed/declined/cancelled/not-executed result batches with one continuation, plural pending-call reload recovery, reentrant terminal-event ownership, and BFCache-preserving page lifecycle are normalized; destroy aborts observation and returns true once/false thereafter; AI/storage/media behavior remains mixed"
204
205
  },
205
206
  {
206
207
  "file": "runtime/arcane/components/conversation-view.html",
@@ -0,0 +1,147 @@
1
+ # Native application control
2
+
3
+ `connectAppControl` from `arcane-os/core/app-control` connects to one explicitly
4
+ selected running application window. The Windows WebView2 host provides document
5
+ inspection, a PNG of its rendered viewport, and targeted DOM actions through its
6
+ own local named pipe. The application keeps its existing Core child, profile,
7
+ origin and window lifecycle. These operations do not activate the desktop window
8
+ or send global keyboard or pointer input.
9
+
10
+ The Node client uses the SDK's existing `arcane/1` framing and local pipe/socket
11
+ transport on Windows, Linux and macOS. The native window adapter described here
12
+ is Windows WebView2; macOS, Linux and Android hosts do not yet expose these
13
+ operations. An installed generic browser tool does not automatically discover
14
+ this endpoint. A caller must use this public client or CLI explicitly.
15
+
16
+ ## Select the running instance
17
+
18
+ Add an explicit endpoint to the application's existing native launch context:
19
+
20
+ ```json
21
+ {
22
+ "native": {
23
+ "launchContext": {
24
+ "appControl": {
25
+ "endpoint": "\\\\.\\pipe\\arcane-pm-control"
26
+ }
27
+ }
28
+ }
29
+ }
30
+ ```
31
+
32
+ The same `appControl` record can be supplied in the launch JSON already selected
33
+ by `--arcane-launch-config`. That record is merged by the existing launcher; it
34
+ does not select a different profile or Core topology. Omission starts the usual
35
+ application without a control listener. Each simultaneous application instance
36
+ needs its own endpoint. An occupied endpoint reports the actual startup failure;
37
+ the host does not silently attach to another window or choose another name.
38
+
39
+ Use a matching published Windows host asset when assembling the application.
40
+ The host producer generates `arcane-app-control.js` from the canonical standalone
41
+ DOM operation function and includes it beside `Arcane.exe`. Direct C# composition
42
+ uses `ArcaneHostOptions.ApplicationId`, `AppControlEndpoint`, and
43
+ `AppControlSource` with the same generated source. Ordinary composition leaves
44
+ the two control options unset.
45
+
46
+ ## Public client
47
+
48
+ ```js
49
+ import {connectAppControl} from 'arcane-os/core/app-control';
50
+
51
+ const app = await connectAppControl({
52
+ endpoint: String.raw`\\.\pipe\arcane-pm-control`
53
+ });
54
+ try {
55
+ const page = await app.inspect();
56
+ await app.act({
57
+ documentGeneration: page.documentGeneration,
58
+ selector: 'a[data-route="connections"]',
59
+ action: 'click'
60
+ });
61
+ const contents = await app.inspect({selector: '#pm-content'});
62
+ console.log(contents);
63
+ } finally {
64
+ await app.close();
65
+ }
66
+ ```
67
+
68
+ This example selects an existing navigation link. Its returned action result
69
+ describes the immediate DOM operation. Inspect the resulting page to establish
70
+ the application outcome; a click alone does not establish an asynchronous save,
71
+ connection or other business result.
72
+
73
+ | Member | Contract |
74
+ | --- | --- |
75
+ | `connectAppControl({endpoint, signal?, onError?})` | Connect once to the explicit running host. It never launches an app, creates Core, changes a profile or reconnects automatically. |
76
+ | `status(options?)` | Returns app identity, platform/host, current URL, document generation, readiness, window title/state/client dimensions and available operations. Readiness describes the document, not models or application services. |
77
+ | `inspect(parameters={}, options?)` | Optional CSS `selector` selects zero or more roots; omission selects the document. Optional `documentGeneration` selects the expected document. Returns complete HTML/text, live control state and DOM-derived role/name hints. |
78
+ | `capture(parameters={}, options?)` | Returns `{mimeType:'image/png', data, documentGeneration, url}`. `data` contains the complete base64 PNG. Optional `documentGeneration` selects the expected document. |
79
+ | `act(parameters, options?)` | Requires `documentGeneration`, one unambiguous CSS `selector`, and the action fields below. |
80
+ | `close()` | Closes this caller's connection and cancels its pending requests. It never closes the app or Core. Returns the connection's completion promise. |
81
+ | `closed` | Connection lifetime promise; actual transport failures remain observable. |
82
+ | `endpoint` | The caller-selected local endpoint. |
83
+
84
+ Each operation's separate `options` uses the existing Core client request
85
+ contract, including `signal` and `timeoutMs`. Connection cancellation closes only
86
+ that connection. Cancellation before UI dispatch prevents execution. Once a
87
+ script or capture has been dispatched, cancellation cannot reverse its effects;
88
+ the host still observes its completion. A disconnected caller's completed result
89
+ is retained in the host diagnostics instead of being represented as delivered.
90
+
91
+ ## Document operations
92
+
93
+ Inspection covers the top-level light DOM. Its result contains `scope`, `title`,
94
+ `readyState`, `doctype`, `roots`, `controls`, `frames`, `shadowHosts`,
95
+ `activeElement`, `scrollingElement`, `selection`, `documentGeneration`, and
96
+ `url`. Each root retains its complete `html` and `text`; controls retain their
97
+ attributes and current form, selection, disabled, scrolling and related state.
98
+ Generated CSS selectors are useful for the inspected document; a later DOM edit
99
+ can change their meaning. Application-authored stable selectors are preferable
100
+ when available.
101
+
102
+ Role/name hints are derived from DOM attributes and labels, not a native
103
+ accessibility-tree computation. Frame documents and shadow-root contents are
104
+ outside this selector scope. Frame elements and open-shadow hosts are described;
105
+ closed shadow roots cannot be discovered. Capture is the current rendered
106
+ viewport, not an offscreen full-document rendering. Covered and minimized-window
107
+ capture behavior requires execution evidence in the selected environment.
108
+
109
+ | Action | Parameters and immediate behavior |
110
+ | --- | --- |
111
+ | `click` | Calls the uniquely selected element's DOM `click()` method. |
112
+ | `fill` | Exact string `value` replaces an input, textarea or contenteditable value; input/change events are dispatched. Read-only, disabled and non-text input controls report their actual unsupported state. |
113
+ | `select` | Exact `value` string or `values` string array selects native `<select>` options and dispatches input/change. Multiple values require a multiple-select control. |
114
+ | `scroll` | Absolute numeric `left`, `top`, or both in CSS pixels; the omitted axis retains its position. Returns the resulting scroll state, including browser clamping. |
115
+
116
+ DOM actions use programmatic, untrusted events. They do not supply physical user
117
+ activation for browser features that require it. Results describe the actual
118
+ immediate state, including browser value sanitization; input is not silently
119
+ rewritten by the SDK.
120
+
121
+ The host publishes a new generation when an actual replacement document becomes
122
+ ready. A creation-time document marker is also checked inside the executing
123
+ script so a queued action cannot run against a successor page. During navigation,
124
+ operations report that the document is not ready. A change during completion
125
+ reports the actual result with that failure; actions are never retried. These
126
+ markers are transient document lifecycle state and are not written to saved data.
127
+
128
+ ## CLI
129
+
130
+ ```powershell
131
+ arcane app-control status --endpoint '\\.\pipe\arcane-pm-control'
132
+ arcane app-control inspect --endpoint '\\.\pipe\arcane-pm-control' --selector '#pm-content'
133
+ arcane app-control capture --endpoint '\\.\pipe\arcane-pm-control' --output '.arcane\view.png'
134
+ arcane app-control act --endpoint '\\.\pipe\arcane-pm-control' --request '.arcane\action.json'
135
+ ```
136
+
137
+ The action file is the complete action parameter object, including the actual
138
+ `documentGeneration` returned by the preceding status or inspection. The CLI
139
+ reads that file completely. Paths are relative to the current directory. Capture
140
+ writes the PNG to the explicitly selected file and prints its metadata. The other
141
+ operations print complete JSON. `app-control --help` describes this command's
142
+ options; other Arcane commands retain their existing global output-format option.
143
+
144
+ Pipe startup, framing, document, image and output-file errors remain observable.
145
+ Host shutdown stops new control work and observes accepted operations alongside
146
+ the existing Core drain. It does not wait for desktop input or leave an
147
+ independent controller process running.
@@ -1,7 +1,7 @@
1
- # Native Laya typed decisions
1
+ # Native typed decisions
2
2
 
3
3
  `arcane-os/local-ai/decisions` and `arcane-os/core/decisions` run the selected
4
- Laya FP32 graph through the SDK's existing native ONNX owner. Tokenization runs
4
+ Laya FP32, Laya FP16 or Julia FP32 graph through the SDK's existing native ONNX owner. Tokenization runs
5
5
  in its own Node Worker. A Core service can load and evaluate decisions without
6
6
  a renderer, browser session, WebGPU browser context or chat provider.
7
7
 
@@ -58,7 +58,7 @@ name to `decisions`. It exposes `load`, `evaluate`, `classify` (an alias for
58
58
  | Method | Parameters and result |
59
59
  | --- | --- |
60
60
  | `decisions.status` | Current lifecycle snapshot; does not load anything. |
61
- | `decisions.load` | `{assetProjectionId?, resourcePaths?, executionTarget?}`; explicit activation or source/device replacement, returning the ready lifecycle snapshot. The request signal cancels activation. A target is `{deviceId:string}` or `null`. |
61
+ | `decisions.load` | `{family?, model?, revision?, dtype?, assetProjectionId?, resourcePaths?, executionTarget?}`; explicit activation or model/source/device replacement, returning the ready lifecycle snapshot. The request signal cancels activation. A target is `{deviceId:string}` or `null`. |
62
62
  | `decisions.evaluate` | `{rows, runOptions?}`; returns `{decisions, outputs}`. The request signal cancels the active model operation. |
63
63
  | `decisions.unload` | Releases the activation. Service-lifetime cleanup continues after the caller disconnects. |
64
64
 
@@ -94,11 +94,18 @@ const decisions = createNativeDecisionModel({
94
94
  These direct paths are native filesystem paths. Keep the graph's external data
95
95
  beside it under the exact filename required by the graph. The Core service
96
96
  resolves configured `paths` relative to `appRoot`; it does not copy or remove
97
- caller-owned files. For SDK-prepared files, the default selected upstream is
98
- `onnx-community/laya-typed-decisions-ONNX`, revision `main`, with exactly:
97
+ caller-owned files. Factory defaults remain `family:'laya'`,
98
+ `model:'onnx-community/laya-typed-decisions-ONNX'`, `revision:'main'` and
99
+ `dtype:'fp32'`. SDK upstream preparation selects these exact layouts:
99
100
 
100
- - `onnx/model.onnx` and `onnx/model.onnx_data`;
101
- - `tokenizer.json` and `tokenizer_config.json`.
101
+ | Family and dtype | Graph | Complete external data |
102
+ | --- | --- | --- |
103
+ | `laya`, `fp32` | `onnx/model.onnx` | `onnx/model.onnx_data` |
104
+ | `laya`, `fp16` | `onnx/model_fp16.onnx` | `onnx/model_fp16.onnx_data` |
105
+ | `julia`, `fp32` | `model.onnx` | `model.onnx.data` |
106
+
107
+ Each selection uses `tokenizer.json` and `tokenizer_config.json` from its own
108
+ selected repository. Julia's public repository is `SupersonicLabs/Julia-1-ONNX`.
102
109
 
103
110
  ## Load complete files already stored in DBOPFS
104
111
 
@@ -144,7 +151,7 @@ After loading, invoke `decisions.evaluate` with the complete `rows`, then
144
151
  `decisions.unload` when that native activation is no longer needed.
145
152
 
146
153
  Direct model and service calls accept
147
- `load({assetProjectionId, resourcePaths, executionTarget, signal})`; their
154
+ `load({family, model, revision, dtype, assetProjectionId, resourcePaths, executionTarget, signal})`; their
148
155
  factory configuration accepts the same source selection. A direct model needs
149
156
  the existing `modelAssets` owner when selecting a projection. `resourcePaths`
150
157
  maps all three roles (`model`, `tokenizer`, `tokenizerConfig`) to exact
@@ -161,7 +168,8 @@ Omitted or `undefined` source fields retain the selected source and mappings.
161
168
  `assetProjectionId: null` returns to the factory's configured `paths`, or its
162
169
  existing upstream preparation when no paths were configured. Selecting another
163
170
  projection or changing any resource mapping replaces the activation even when
164
- the execution target stays the same. Equal source, mapping and device selections
171
+ the execution target stays the same. Equal family, model, revision, dtype,
172
+ source, mapping and device selections
165
173
  coalesce. The incoming retain is acquired before the prior activation retires,
166
174
  so device replacement can reuse a projection after the caller has released its
167
175
  preparation ownership. Superseded pending retains are released as their cleanup
@@ -178,8 +186,12 @@ model store. The approved `@huggingface/tokenizers@0.2.0` dependency reads the
178
186
  selected tokenizer files in its Worker. No Transformers or second ONNX runtime
179
187
  is loaded by this API.
180
188
 
181
- This graph selection requires `dtype:'fp32'`, which is also the default; another
182
- dtype reports the incompatible selection rather than substituting a graph.
189
+ Native graph selections support Laya `fp32` and `fp16`, and Julia `fp32`.
190
+ Other family/precision combinations report an unsupported selection. Laya FP16
191
+ uses the published mixed-precision graph, which retains selected operations
192
+ and outputs in FP32; it does not claim every graph operation uses FP16. Julia
193
+ uses its typed five-input ONNX graph and raw option logits, without the upstream
194
+ display-rounded `predict()` wrapper or invented action outputs.
183
195
  `sessionOptions` and `runOptions` pass to the existing native ONNX API unchanged.
184
196
  With no `executionTarget` selection, `executionPreference` defaults to `gpu`
185
197
  here: actual advertised native GPU provider creation is attempted, followed by
@@ -189,6 +201,49 @@ continues to default to CPU. Accepted provider configuration is not evidence
189
201
  that GPU nodes executed. Full provider-attempt diagnostics remain in
190
202
  `execution`; see [native ONNX sessions](local-ai.md#native-onnx-sessions).
191
203
 
204
+ ## Select an activation's model
205
+
206
+ Both factories and each direct/Core `load` accept `family`, `model`, `revision`
207
+ and `dtype`. The same service persists while its selected activation changes:
208
+
209
+ ```js
210
+ await client.invoke('decisions.load', {
211
+ family: 'julia',
212
+ model: 'SupersonicLabs/Julia-1-ONNX',
213
+ revision: 'main',
214
+ dtype: 'fp32',
215
+ assetProjectionId: juliaProjection.id,
216
+ resourcePaths: {
217
+ model: 'model.onnx',
218
+ tokenizer: 'tokenizer.json',
219
+ tokenizerConfig: 'tokenizer_config.json'
220
+ }
221
+ }, {signal, timeoutMs: 0});
222
+ ```
223
+
224
+ Here `juliaProjection` is the caller's ready projection containing Julia's
225
+ complete graph, `model.onnx.data` and its own tokenizer files. The caller may
226
+ release its preparation ownership after loading, as in the projection example.
227
+ For upstream preparation without configured paths, select the same four model
228
+ fields with `assetProjectionId: null`.
229
+
230
+ Omitting a model field, or supplying `undefined`, retains its most recent
231
+ selection, initially the factory default. The selection survives unload for a
232
+ later explicit load. Changing any field replaces the activation; equal complete
233
+ selections share it. Supply the complete new model selection when changing
234
+ family, including its matching projection/mapping or configured native files.
235
+ Changing `family` alone does not infer a repository, change precision, replace
236
+ configured files, or rewrite a projection. Metadata describes the caller's
237
+ selection; the SDK does not inspect weights to establish checkpoint identity.
238
+ Configured `paths` and a selected projection keep their existing precedence
239
+ over upstream preparation.
240
+
241
+ Top-level `current().family`, `model`, `revision` and `dtype` follow the
242
+ activation being loaded, used or retired. While replacement waits for prior
243
+ cleanup, those fields and `execution` still describe the prior activation;
244
+ `pendingActivation` carries the requested successor separately. The new
245
+ selection takes ownership when its activation begins.
246
+
192
247
  ## Select an activation's execution device
193
248
 
194
249
  Both factories accept `executionTarget: {deviceId:string}` or `null` in their
@@ -228,15 +283,16 @@ resolution, accepted configuration and actual execution evidence. An unknown
228
283
  `observedTarget` remains `null`; successful configuration alone does not establish
229
284
  which device executed graph nodes.
230
285
 
231
- `pendingActivation` is separately `null` or `{executionTarget}` while a load or
232
- replacement is pending; its `executionTarget` property is omitted at JSON
286
+ `pendingActivation` is separately `null` or a selection containing `family`,
287
+ `model`, `revision`, `dtype` and `executionTarget` while a load or replacement
288
+ is pending; its `executionTarget` property is omitted at JSON
233
289
  transport when the selection is `undefined`. A projected selection also includes
234
290
  `assetProjectionId` and its complete `resourcePaths` mapping. A pending target never overwrites the previous
235
291
  activation's `execution` record. The old record remains attributable to the
236
292
  retiring activation until its cleanup completes, then the new activation owns
237
293
  its own record. A request is not a claim that the requested device is running.
238
294
 
239
- Concurrent loads for the same source, resource mapping and target share their
295
+ Concurrent loads for the same family, model, revision, dtype, source, resource mapping and target share their
240
296
  pending activation. A different selection supersedes the earlier pending request, which rejects with
241
297
  cancellation instead of returning another target's ready result. Replacement
242
298
  joins this model's actual tokenizer/native cleanup before creating its
@@ -280,7 +336,8 @@ progress includes model preparation, tokenization and evaluation; downloaded
280
336
  members report files, not byte progress. Complete technical errors belong in
281
337
  developer diagnostics, while the application owns its user-facing status.
282
338
 
283
- Concurrent callers selecting the same source, mapping and target share one explicit activation.
339
+ Concurrent callers selecting the same family, model, revision, dtype, source,
340
+ mapping and target share one explicit activation.
284
341
  Cancelling a load or evaluation cancels that activation and its outstanding operations, because the
285
342
  native session and tokenizer have one owner. Use separately owned models when
286
343
  independent cancellation is required. The construction `signal` governs the
@@ -304,5 +361,6 @@ availability. Android requires the host's supported native adaptation. Static
304
361
  source review and synthetic authored fixtures are not model execution or a
305
362
  claim of tested platform, precision or accelerator behavior.
306
363
 
307
- Upstream selection: [Laya FP32 model files](https://huggingface.co/onnx-community/laya-typed-decisions-ONNX/tree/main),
364
+ Upstream selection: [Laya model files](https://huggingface.co/onnx-community/laya-typed-decisions-ONNX/tree/main),
365
+ [Julia-1 model files](https://huggingface.co/SupersonicLabs/Julia-1-ONNX/tree/main),
308
366
  [Tokenizer package](https://www.npmjs.com/package/@huggingface/tokenizers).
@@ -372,6 +372,26 @@ reach developer diagnostics and a concise recovery status stays outside the
372
372
  transcript. Destruction cancels pending preparation, while an already requested
373
373
  print retains its snapshot through `afterprint`.
374
374
 
375
+ Markdown images with local `arcane-media:` references saved through
376
+ [`MarkdownMedia`](runtime-modules.md#markdownmediajs) display automatically in
377
+ new messages, live response chunks, final responses, and restored history.
378
+ Chat resolves references through the existing application-scoped DBOPFS owner
379
+ while preserving the complete original Markdown, model payloads, saved history,
380
+ image descriptions, and ordinary image URLs. Text appears immediately; local
381
+ image reads and decoding proceed independently without delaying streaming or
382
+ session readiness. Failed images retain complete developer diagnostics and show
383
+ a concise message beside that card; successful sibling images remain visible.
384
+
385
+ Each rendered card owns its display URLs. Re-rendering, history replacement,
386
+ transient-message removal, and destruction cancel obsolete display work and
387
+ release those URLs without deleting stored images. Back/Forward Cache retains
388
+ the existing component lifecycle. Explicit `print()` awaits the current images;
389
+ native Print reports images that are still loading or failed instead of claiming
390
+ they are ready. A requested print snapshot retains its image URLs across later
391
+ message changes or component destruction until `afterprint` releases them.
392
+ Applications continue to own image-record names, associations, and cleanup;
393
+ Chat introduces no renderer callback or additional storage API.
394
+
375
395
  Before any session binding begins, callback-mode `sessionStatus` follows the
376
396
  selected sticky LLM role and the existing application-owned `modelName` label
377
397
  (or the selected model ID). Assigning `modelName` refreshes that status even
@@ -58,6 +58,7 @@ runtime layouts.
58
58
  | `arcane-os/core/development` | App-service composition and document-owned Core transport during source development, independently of local AI. |
59
59
  | `arcane-os/core/stdio` | Framed Node stdio transport with graceful runtime drain. |
60
60
  | `arcane-os/core/host` | Node-only reusable Core host lifecycle, app-selected native launch defaults and shared native location resolution. |
61
+ | `arcane-os/core/app-control` | Explicit connection to an existing native window for background document inspection, capture and DOM actions. |
61
62
  | `arcane-os/codex/app-server` | Explicit native Codex App Server session, complete live turns, server requests and recovery. |
62
63
  | `arcane-os/mcp/stdio` | Node MCP STDIO server for app-owned tools and static resources. |
63
64
  | `arcane-os/core/repositories` | Native persistent ArcaneData paths, connected working repositories and scoped non-secret Git identity configuration. |
@@ -69,7 +70,7 @@ runtime layouts.
69
70
  | `arcane-os/core/local-ai` | Native llama.cpp, Ollama and ONNX Core service, model readiness, complete responses and owned lifecycle. See [local AI through Core](local-ai.md). |
70
71
  | `arcane-os/local-ai` | Official runtime installation and native artifact bundling for selected llama.cpp/Ollama/ONNX/image requirements and NeMo libraries. |
71
72
  | `arcane-os/local-ai/onnx` | Retained native ONNX worker sessions with explicit graph loading and complete tensor inference. |
72
- | `arcane-os/local-ai/decisions` | Explicit native Laya FP32 decisions using the existing ONNX owner and a tokenizer Worker. |
73
+ | `arcane-os/local-ai/decisions` | Explicit native Laya FP32/FP16 and Julia FP32 decisions using the existing ONNX owner and a tokenizer Worker. |
73
74
  | `arcane-os/core/decisions` | Renderer-independent typed-decision service composed with existing local-AI and model-assets owners. |
74
75
  | `arcane-os/ai/core-onnx` | Optional browser access to system ONNX through an existing Core connection. |
75
76
  | `arcane-os/local-ai/image` | Retained native stable-diffusion.cpp context, complete PNG generation and owned worker lifetime. |
@@ -186,7 +187,7 @@ The remaining data-only subpaths are eight JSON Schemas and package metadata.
186
187
  | `acceptWebSocket()` | function | `arcane-os`, `arcane-os/websocket` | WebSocket protocol | Node; browser-native client interoperability |
187
188
  | `WS` | class | `arcane-os`, `arcane-os/websocket-client` | Shared WebSocket clients | Node and native-WebSocket browser hosts |
188
189
  | `createBrowserDecisionModel()` | function | `arcane-os/ai/browser-decisions` | Browser typed decisions | Browser module Workers and the caller-selected inference backend |
189
- | `createNativeDecisionModel()` | function | `arcane-os/local-ai/decisions` | Native typed decisions | Node with an existing native ONNX owner and selected Laya FP32 files |
190
+ | `createNativeDecisionModel()` | function | `arcane-os/local-ai/decisions` | Native typed decisions | Node with an existing native ONNX owner and selected Laya FP32/FP16 or Julia FP32 files |
190
191
  | `createNativeDecisionService()` | function | `arcane-os/core/decisions` | Native typed decisions | Node Core with existing local-AI and model-assets services |
191
192
  | `createNativeDecisionService default export` | function | `arcane-os/core/decisions` | Native typed decisions | Same native decision service factory |
192
193
  | `fetchRequest()` | function | `arcane-os/ai/twin-cloud` | TWiN Cloud requests | Node and Browser; remote HTTPS provider |
@@ -428,6 +429,7 @@ The remaining data-only subpaths are eight JSON Schemas and package metadata.
428
429
  | `startCoreHost()` | function | `arcane-os/core/host` | Native Core host composition | Node with readable input and writable output streams |
429
430
  | `startSharedCoreHost()` | function | `arcane-os/core/host` | Shared Core host | Node local IPC on Windows, Linux and macOS |
430
431
  | `connectSharedCoreHost()` | function | `arcane-os/core/host` | Shared Core host | Node local IPC and optional explicit headless startup |
432
+ | `connectAppControl()` | function | `arcane-os/core/app-control` | Native application control | Node local IPC; current window adapter is Windows WebView2 |
431
433
  | `runSharedCoreHost()` | function | `arcane-os/core/host` | Shared Core host | Node headless entry and optional parent startup IPC |
432
434
  | `startSharedCoreBridge()` | function | `arcane-os/core/host` | Shared Core host | Node readable/writable streams and local IPC |
433
435
  | `readCoreLaunchContext()` | function | `arcane-os/core/host` | Native Core host composition | Node; combines packaged defaults, host state and explicitly selected launch JSON |
@@ -8886,6 +8888,31 @@ try {
8886
8888
  }
8887
8889
  ```
8888
8890
 
8891
+ ## connectAppControl()
8892
+
8893
+ ```text
8894
+ connectAppControl({endpoint,signal,onError}={})
8895
+ ```
8896
+
8897
+ Connects once to the explicit running native window and resolves
8898
+ `{endpoint,closed,status,inspect,capture,act,close}`. The Windows host selects its
8899
+ own listener through `native.launchContext.appControl.endpoint` and preserves the
8900
+ existing Core child, origin, profile and application lifetime. The client uses
8901
+ portable Node local IPC; other native host adapters do not yet implement these
8902
+ document operations. No application is launched, no desktop window is activated,
8903
+ and no automatic reconnect or action retry occurs.
8904
+
8905
+ `status(options)` reports current app/window/document readiness.
8906
+ `inspect(parameters={},options)` returns complete selected light-DOM HTML/text
8907
+ and live control state. `capture(parameters={},options)` returns a full base64 PNG
8908
+ of the rendered viewport. `act(parameters,options)` requires a returned
8909
+ `documentGeneration`, one CSS selector, and `click`, `fill`, `select` or `scroll`
8910
+ fields. Options preserve the Core client signal/timeout contract. `close()`
8911
+ cancels this connection's requests and returns `closed`, without closing the app.
8912
+ Document changes and actual errors remain observable; a dispatched action is
8913
+ not reversed by later cancellation. Full parameter/result, CLI and platform
8914
+ contracts are in [native application control](native-app-control.md).
8915
+
8889
8916
  ## runSharedCoreHost()
8890
8917
 
8891
8918
  Accepts the same options as `startSharedCoreHost(options)` and adds the headless
@@ -9505,23 +9532,35 @@ native installation eligibility and URL-bar promotion.
9505
9532
 
9506
9533
  ### Overview
9507
9534
 
9508
- Runs explicitly selected Laya FP32 option scoring through an existing native
9535
+ Runs explicitly selected Laya FP32/FP16 or Julia FP32 option scoring through an existing native
9509
9536
  ONNX owner, with tokenization in a Node Worker. It creates no second inference
9510
9537
  engine and starts no model download at construction.
9511
9538
 
9512
9539
  ### Signature and result
9513
9540
 
9514
9541
  ```text
9515
- createNativeDecisionModel({onnx,modelAssets,workingDirectory,paths,model='onnx-community/laya-typed-decisions-ONNX',revision='main',dtype='fp32',sessionOptions,executionPreference='gpu',signal}={})
9542
+ createNativeDecisionModel({onnx,modelAssets,workingDirectory,paths,assetProjectionId,resourcePaths,family='laya',model='onnx-community/laya-typed-decisions-ONNX',revision='main',dtype='fp32',sessionOptions,executionPreference='gpu',executionTarget,signal}={})
9516
9543
  ```
9517
9544
 
9518
9545
  Import from `arcane-os/local-ai/decisions`. Supply the existing `onnx` owner and
9519
9546
  either `modelAssets` plus `workingDirectory`, or native `paths` for the model,
9520
- tokenizer and tokenizer configuration. The selected graph requires FP32. The
9547
+ tokenizer and tokenizer configuration, or a ready `assetProjectionId` with
9548
+ `resourcePaths` for those three roles. Supported selections are Laya `fp32`,
9549
+ Laya `fp16` and Julia `fp32`; constructor defaults remain Laya FP32. The
9521
9550
  handle exposes `load`, `evaluate`, `classify`, `current`, `status`, `subscribe`,
9522
9551
  `unload` and terminal `dispose`; `classify` aliases `evaluate` and `status`
9523
9552
  aliases `current`.
9524
9553
 
9554
+ `load({family,model,revision,dtype,assetProjectionId,resourcePaths,executionTarget,signal})`
9555
+ selects each activation. Omitted or `undefined` fields retain their prior
9556
+ selection. A changed model field, source, mapping or device replaces the
9557
+ activation after actual cleanup; equal complete selections coalesce. Supply
9558
+ all matching model fields and files when changing family: metadata does not
9559
+ infer a repository or rewrite a supplied projection. Top-level model metadata
9560
+ continues to describe the retiring activation while `pendingActivation` records
9561
+ its successor. See [model selection](native-decisions.md#select-an-activations-model)
9562
+ for exact upstream graph/companion layouts and retained projection ownership.
9563
+
9525
9564
  `evaluate(rows,{signal,runOptions})` preserves each complete `state`, `question`,
9526
9565
  `options` and optional `type` separately. It returns `{decisions,outputs}` with
9527
9566
  original rows, typed values, raw logits, unrounded probabilities and every
@@ -9574,7 +9613,11 @@ reacquires `getONNXRuntime()` after any recovery. Native members are `load`,
9574
9613
  `start(context)`.
9575
9614
 
9576
9615
  RPC exposes `decisions.status`, `decisions.load`, `decisions.evaluate` and
9577
- `decisions.unload`. Evaluation accepts `{rows,runOptions?}` and returns complete
9616
+ `decisions.unload`. Load accepts optional `family`, `model`, `revision`, `dtype`,
9617
+ `assetProjectionId`, `resourcePaths` and `executionTarget`, with the same
9618
+ per-activation selection and omission behavior as direct native load; the Core
9619
+ request signal owns cancellation. The service persists across model changes.
9620
+ Evaluation accepts `{rows,runOptions?}` and returns complete
9578
9621
  `{decisions,outputs}` using the existing tensor codec at the JSON boundary.
9579
9622
  `decisions.state` and replaying `subscribe(listener,{emitCurrent:true,signal})`
9580
9623
  report lifecycle. Unload is accepted service-lifetime cleanup; host shutdown
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arcane-os",
3
- "version": "0.80.0",
3
+ "version": "0.82.0",
4
4
  "description": "Arcane OS JavaScript SDK, project-local CLI, browser runtime, and repository-portable application packager.",
5
5
  "type": "module",
6
6
  "main": "./src/index.mjs",
@@ -62,6 +62,7 @@
62
62
  "./core/development": "./src/core/development.mjs",
63
63
  "./core/stdio": "./src/core/stdio.mjs",
64
64
  "./core/host": "./src/core/host.mjs",
65
+ "./core/app-control": "./src/core/app-control.mjs",
65
66
  "./codex/app-server": "./src/codex/app-server.mjs",
66
67
  "./mcp/stdio": "./src/mcp/stdio-server.mjs",
67
68
  "./core/repositories": "./src/core/repositories.mjs",