arcane-os 0.1.0 → 0.1.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-2026 The ggml authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -16,19 +16,22 @@ dependency and invoke its local CLI with `npm exec -- arcane`. A separate
16
16
  global installer, standalone SDK executable, NuGet package, Homebrew formula,
17
17
  or OS package is not part of this release surface.
18
18
 
19
- `Check` validates the source once, then one unprivileged producer packs one
20
- `.tgz` under pinned Node and npm versions. The producer writes a canonical
21
- manifest containing the source SHA, clean-checkout flag, package inventory,
22
- byte length, SHA-256, npm SHA-1 shasum, and SHA-512 integrity. Windows x64,
23
- Linux x64, and a real macOS arm64 runner use the declared Node `22.23.2` floor
24
- and each download that same Actions
25
- artifact by immutable artifact id. They never repack it. Each runner verifies
26
- the receipt, installs the tarball into a disposable project, exercises
19
+ `Check` validates only package-publication authority once: package metadata,
20
+ the executable and `.gitattributes` boundary, both authenticated runtime
21
+ receipts, and the focused npm identity/channel/provenance contract. One
22
+ unprivileged producer then packs one `.tgz` under pinned Node and npm versions.
23
+ The producer writes a canonical manifest containing the source SHA,
24
+ clean-checkout flag, package inventory, byte length, SHA-256, npm SHA-1 shasum,
25
+ and SHA-512 integrity. One Ubuntu x64 consumer at the declared Node `22.23.2`
26
+ floor downloads that Actions artifact by immutable artifact id, verifies the
27
+ receipt, installs the tarball into a disposable project, exercises
27
28
  `npm exec --offline -- arcane`, and runs one small capability contract through
28
- the installed package's `arcane-test.mjs`. A final readiness job verifies the
29
- same artifact's identity, integrity, shasum, license inventory, and content
30
- boundary once. Browser/process simulations, Pages, Examples, and presentation
31
- work are post-registry follow-through rather than npm publication gates.
29
+ the installed package's `arcane-test.mjs`. It never repacks. A final readiness
30
+ job verifies the same artifact's identity, integrity, shasum, license inventory,
31
+ and content boundary once. Golden snapshots, broad integration/regression and
32
+ platform matrices, browser/process simulations, Pages, Examples, and
33
+ presentation work are normal or post-registry checks rather than npm
34
+ publication gates.
32
35
 
33
36
  `publish-dev.yml` can run only when manually dispatched from `main` in
34
37
  `TheWizardNexus/arcane-os-sdk`. Dispatch requires an authorized npm content
@@ -72,8 +75,9 @@ as `arcane-os@0.1.0-dev.5` and verifies the locked runtime. A local directory
72
75
 
73
76
  The first-version bootstrap established these permanent audit boundaries:
74
77
 
75
- 1. Push the intended clean `main` commit and require the complete Check workflow,
76
- including the exact-artifact Windows/Linux/macOS matrix, to pass.
78
+ 1. Push the intended clean `main` commit and require the npm-critical Check
79
+ workflow—package authority, one producer, one installed Linux capability
80
+ smoke, and one identity/legal verifier—to pass.
77
81
  2. Review the uploaded tarball inventory, manifest, checksum, and license
78
82
  notices. Ensure the Arcane OS monorepo package is private so it cannot publish
79
83
  the same npm name accidentally.
@@ -189,8 +193,9 @@ work and do not change the canonical source branch.
189
193
  ## Work-amplification record
190
194
 
191
195
  The release graph is one checked `main` SHA and one npm release candidate. One
192
- source-validation job runs the suite once; one producer creates the tarball;
193
- three small installed-package consumers execute those exact bytes on Windows,
194
- Linux, and macOS; and one readiness job verifies identity and legal inventory.
196
+ package-authority job runs the narrow source policy and publication contract;
197
+ one producer creates the tarball; one Ubuntu consumer executes those exact
198
+ installed bytes; and one readiness job verifies identity and legal inventory.
195
199
  OIDC publication reuses that successful exact-SHA artifact without rebuilding.
196
- Pages and broader presentation work follow registry verification separately.
200
+ Platform matrices, full product regressions, Pages, and broader presentation
201
+ work remain outside registry publication and run separately when warranted.
@@ -19,6 +19,7 @@ high-level page links to the relevant deep section instead of repeating it.
19
19
  | Use the Node.js package API | [SDK JavaScript API](sdk-api.md) |
20
20
  | Publish central events, capture bounded time-travel history, or observe the DOM | [EventManager and event-stack reference](event-manager.md) |
21
21
  | Use the `arcane` command | [CLI reference](cli.md) |
22
+ | Generate named browser imports or inspect the authenticated physical runtime | [`arcane import-map`](cli.md#arcane-import-map) and [browser runtime delivery](protocols.md#browser-runtime-delivery) |
22
23
  | Choose browser, native, cloud, or cross-host behavior | [Availability and normalization](availability-and-normalization.md) |
23
24
  | Import a shipped renderer module | [Runtime module catalog](runtime-modules.md) |
24
25
  | Use a shared entity | [Runtime entity modules](runtime-entities.md) and [exact export contracts](core/arcane-entities.md) |
@@ -36,7 +37,7 @@ This repository contains two related, explicitly versioned surfaces:
36
37
 
37
38
  | Surface | Source identity | Meaning |
38
39
  | --- | --- | --- |
39
- | SDK and CLI | `arcane-os` `0.1.0-dev.5` | The Node.js toolchain and package exports in this checkout. |
40
+ | SDK and CLI | `arcane-os` `0.1.0` | The Node.js toolchain and package exports in this checkout. |
40
41
  | Browser runtime | Arcane OS commit `567ad110bf57a1c2d4a3daa22ae93716cc5f4d7e`, bundle `0.8.12`, protocol `arcane/1` | The exact 155-file runtime snapshot shipped under `runtime/`. |
41
42
  | Core reference snapshot | Arcane OS commit `567ad110bf57a1c2d4a3daa22ae93716cc5f4d7e`, protocol `arcane/1` | The application-facing Core contract derived into `docs/reference/core/`. Canonical inventory and focused-member content was verified unchanged at Arcane OS `main` commit `13f3ce0ae34f77a3495331c8b4c30b1bb105f8ed`; SDK-local provenance, link, and package-boundary annotations are added explicitly. |
42
43
 
@@ -16,6 +16,7 @@ and exits nonzero on failure. Machine output is defined by
16
16
  | `arcane new <id>` | Creates one external app workspace. |
17
17
  | `arcane init [id]` | Initializes one app in an external or integrated workspace without rewriting unrelated files. |
18
18
  | `arcane doctor` | Reads and reports Node/tooling, SDK runtime, workspace, optional Arcane source recognition, and supported managed ArcaneOllama readiness. |
19
+ | `arcane import-map` | Authenticates and refreshes one app's managed browser import map and matching HTML entry. |
19
20
  | `arcane dev` | Starts one owned browser development server for one selected app. |
20
21
  | `arcane test` | Runs one app test boundary or one explicit integrated shared test file. |
21
22
  | `arcane check` | Validates one app boundary or the canonical integrated shared check. |
@@ -162,6 +163,88 @@ failure into a failed doctor result.
162
163
  npm exec -- arcane doctor --workspace . --arcane-root "../Arcane OS"
163
164
  ```
164
165
 
166
+ ## `arcane import-map`
167
+
168
+ ### Overview
169
+
170
+ Authenticates one selected application's physical browser runtime, generates
171
+ its standard browser import map, and commits the map artifact and matching
172
+ managed HTML entry as one bounded refresh.
173
+
174
+ ```text
175
+ arcane import-map [--workspace <directory>] [--app <id>]
176
+ ```
177
+
178
+ `--workspace` defaults to the current directory. `--app` selects one app when
179
+ the workspace does not already identify exactly one. The command accepts no
180
+ positional arguments and supports app scope only. `arcane-os import-map` is the
181
+ identical executable alias.
182
+
183
+ The generated artifact is
184
+ `apps/<id>/modules/arcane.importmap.json`. Its exact JSON is also installed in
185
+ the app entry as `<script type="importmap" data-arcane-import-map>` before
186
+ module loading. In SDK `0.1.0`, the authenticated physical-v1 runtime produces
187
+ 85 entries and intentionally has no package-root mapping.
188
+
189
+ ### Result and safety
190
+
191
+ Success returns the normal selected-workspace wrapper:
192
+
193
+ ```javascript
194
+ {
195
+ workspaceRoot,
196
+ workspaceMode, // 'external' or 'integrated'
197
+ appId,
198
+ importMap:{
199
+ appId,
200
+ artifactPath,
201
+ artifactRelativePath,
202
+ entryPath,
203
+ imports,
204
+ entryCount:85,
205
+ excludedModules:['modules/CaseEvidenceIndexer.js'],
206
+ files:[
207
+ {role:'artifact',path,bytes,sha256},
208
+ {role:'entry',path,bytes,sha256}
209
+ ],
210
+ cleanupWarnings,
211
+ committed:true
212
+ }
213
+ }
214
+ ```
215
+
216
+ The two file records bind the committed byte length and SHA-256 for the artifact
217
+ and HTML entry. A post-commit observer failure preserves delivery as a successful
218
+ receipt with `eventDelivery.status === 'degraded'` and
219
+ `ARCANE_EVENT_DELIVERY_FAILED`; it does not roll back valid application bytes.
220
+ Packaging refuses a committed refresh that reports cleanup warnings.
221
+
222
+ The canonical integrated-legacy workspace has a deliberate compatibility
223
+ result instead of an artifact: `importMap.skipped` is `true`,
224
+ `importMap.compatibility` is `'integrated-legacy'`, and the reason states that
225
+ the physical two-route browser runtime is retained.
226
+
227
+ `new` and `init` generate the map during scaffolding. `dev` refreshes it once
228
+ before binding; non-dry-run `package` and browser `build` refresh it before
229
+ collection. Paired native packaging refreshes each packaged app. `test`,
230
+ `check`, `verify`, `bundle`, and browser `run` do not regenerate it. There is no
231
+ watcher, polling, scheduled refresh, download, or self-update behavior.
232
+
233
+ There is no supported `--dry-run` for `import-map`: do not pass that parser-wide
234
+ flag because this command performs the real commit. Import-map-specific failures
235
+ use `ARCANE_IMPORT_MAP_INVALID`, `ARCANE_IMPORT_MAP_UNRESOLVED`, or
236
+ `ARCANE_IMPORT_MAP_COLLISION`; packaging can additionally report
237
+ `ARCANE_IMPORT_MAP_CLEANUP_FAILED`. Workspace, policy, usage, busy, and
238
+ cancellation failures retain their normal SDK codes.
239
+
240
+ ### Example
241
+
242
+ ```bash
243
+ npm exec -- arcane import-map --workspace . --app hello-world --output json
244
+ ```
245
+
246
+ Deep details: [authenticated browser delivery and receipts](protocols.md#browser-runtime-delivery).
247
+
165
248
  ## `arcane dev`
166
249
 
167
250
  ### Overview
@@ -471,9 +554,9 @@ Success returns:
471
554
  ```javascript
472
555
  {
473
556
  packageName:'arcane-os',
474
- currentVersion:'0.1.0-dev.4',
475
- registryVersion:'0.1.0-dev.5',
476
- tag:'dev',
557
+ currentVersion:'0.1.0',
558
+ registryVersion:'0.1.1',
559
+ tag:'latest',
477
560
  status:'update-available', // or 'current' or 'ahead'
478
561
  updateAvailable:true,
479
562
  registry:'https://registry.npmjs.org',
@@ -16,7 +16,10 @@ The API is capability-first:
16
16
 
17
17
  All 20 JavaScript exports are available from both `arcane-os` and
18
18
  `arcane-os/event-manager`. The bindings are identical, so choose the focused
19
- subpath when event instrumentation is the only SDK capability you need.
19
+ subpath when event instrumentation is the only SDK capability you need. Node
20
+ can resolve either package entrypoint. The generated browser map intentionally
21
+ exposes only the focused `arcane-os/event-manager` entry, not the Node package
22
+ root.
20
23
 
21
24
  ## Quick start
22
25
 
@@ -53,15 +56,21 @@ bounded, export intentionally, then call `clearHistory()`.
53
56
 
54
57
  | Capability | Node | Browser renderer | Native/Core host | Remote or cloud | Normalization |
55
58
  | --- | --- | --- | --- | --- | --- |
56
- | Pub/sub, semantic instrumentation, parse/export, seek, playback | Yes | Yes, through a bundler or import map | Only when the SDK module runs in that JavaScript host | No automatic transport | Same synchronous API; optional immutable JSON-like snapshots |
59
+ | Pub/sub, semantic instrumentation, parse/export, seek, playback | Yes | Yes, through a bundler or the managed Arcane import map | Only when the SDK module runs in that JavaScript host | No automatic transport | Same synchronous API; optional immutable JSON-like snapshots |
57
60
  | DOM selectors and target descriptions | With DOM-like values or a test shim | Yes | No native UI observation | No | Stable diagnostic descriptors |
58
61
  | DOM interaction and mutation capture | No native DOM | Yes | No | No | DOM activity becomes semantic event-stack records |
59
62
  | Event-stack schema | Yes | Yes | Data contract only | Can be transported explicitly by the developer | `arcane-event-stack/1` |
60
63
 
61
- An unbundled browser must serve and map `arcane-os` and `event-pubsub`. The
62
- hash-pinned Arcane browser runtime does not automatically inject this SDK-authored
63
- module into Shell, Provisioner, Core, or built-in apps. There is no transparent
64
- fallback to `arcane/1`, HTTP, WebSocket, Ollama, or a cloud event service.
64
+ In an external or physical-v1 integrated workspace, the managed browser map
65
+ resolves `arcane-os/event-manager` to
66
+ `./arcane/sdk/event-manager.mjs` and its private bare dependency
67
+ `event-pubsub` to
68
+ `./arcane/sdk/dependencies/event-pubsub/index.js`. The canonical
69
+ integrated-legacy workspace retains its older physical routes instead. The
70
+ hash-pinned Arcane browser runtime does not inject this SDK-authored module into
71
+ Shell, Provisioner, Core, or built-in apps. There is no transparent fallback to
72
+ the Node package root, `arcane/1`, HTTP, WebSocket, Ollama, or a cloud event
73
+ service.
65
74
 
66
75
  ## Export summary
67
76
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "sdkVersion": "0.1.0-dev.5",
3
+ "sdkVersion": "0.1.0",
4
4
  "environment": {
5
5
  "runtime": "Node.js",
6
6
  "minimumVersion": "22.23.2",
@@ -47,6 +47,14 @@ These protocols normalize orchestration and evidence. They do not normalize a
47
47
  Windows EXE, Linux DEB, Android APK, and portable directory into the same
48
48
  artifact kind.
49
49
 
50
+ Managed browser imports have three supported control-plane entrypoints. The CLI
51
+ uses `arcane import-map`; Node callers use
52
+ `executeOperation('import-map', options)` or
53
+ `createToolchain(defaults).importMap(options)`. These are three routes to the
54
+ same app-scoped operation, not three import-map formats. There is no exported
55
+ `importMapApplication()` function, `generateImportMap()` function, or
56
+ `arcane-os/import-map` package subpath.
57
+
50
58
  ## Central events and time-travel data
51
59
 
52
60
  `arcane-os/event-manager` is host-neutral JavaScript. Its live event path is
@@ -83,18 +91,105 @@ surface, DOM privacy defaults, playback modes, and recovery behavior.
83
91
 
84
92
  ## Browser runtime delivery
85
93
 
86
- External and integrated workspaces keep the same application URLs. Runtime ESM
87
- is served beneath `/arcane`, the vendored dependency beneath
88
- `/node_modules/strong-type`, and license material beneath
89
- `/licenses/arcane-os`. A browser import such as:
94
+ External and modern integrated workspaces keep the same application URLs and a
95
+ browser-standard import map. Each selected app owns
96
+ `apps/<id>/modules/arcane.importmap.json`; the exact canonical JSON is also
97
+ embedded in its HTML entry as a managed `<script type="importmap"
98
+ data-arcane-import-map>`. The map follows `<base>` and precedes module scripts,
99
+ classic scripts, and module preloads, so application code can use stable named
100
+ imports such as:
90
101
 
91
102
  ```javascript
92
- import ollama from '/arcane/modules/Ollama.js';
103
+ import ollama from 'arcane/Ollama';
104
+ ```
105
+
106
+ The authenticated physical-v1 tree lives entirely beneath `arcane/`. It
107
+ contains 155 pinned Arcane runtime files plus eight SDK browser-runtime files:
108
+ 163 files in all. Runtime `strong-type` 1.1 stays under
109
+ `arcane/dependencies/strong-type/`; the focused SDK event surface lives under
110
+ `arcane/sdk/`, with `event-pubsub` 6.1 and its sibling `strong-type` 2.0 under
111
+ `arcane/sdk/dependencies/`. This URL-key separation prevents the runtime and SDK
112
+ dependency versions from aliasing one another. Development serves the selected
113
+ app plus that authenticated tree. Packaging copies the same map, app entry, and
114
+ physical bytes into `dist/<id>`; targets never resolve through the consumer
115
+ workspace's root `node_modules/`.
116
+
117
+ In SDK `0.1.0`, the generated map has exactly 85 entries: 73 named
118
+ `arcane/*` modules, nine `arcane/entities/*` modules, and these three focused or
119
+ compatibility mappings:
120
+
121
+ | Browser specifier | Physical target |
122
+ | --- | --- |
123
+ | `arcane-os/event-manager` | `./arcane/sdk/event-manager.mjs` |
124
+ | `event-pubsub` | `./arcane/sdk/dependencies/event-pubsub/index.js` |
125
+ | `./node_modules/strong-type/index.js` | `./arcane/dependencies/strong-type/index.js` |
126
+
127
+ There is no `arcane-os` package-root mapping, bare `strong-type` mapping, or
128
+ catch-all `arcane/` prefix. Host-internal `CaseEvidenceIndexer.js` is explicitly
129
+ excluded; classic scripts, workers, stylesheets, and other non-ESM assets use
130
+ their documented URL or host loading contract rather than invented package
131
+ bindings.
132
+
133
+ The imported module can be pure browser logic, standard-Web-API logic, or a
134
+ client of `globalThis.Arcane`. Import-map resolution is not a new Arcane wire
135
+ protocol, Core capability, network authority, or provider fallback. Import
136
+ transport and host RPC remain separate layers.
137
+
138
+ The canonical integrated-legacy Arcane OS root is the documented exception. It
139
+ retains its physical `/arcane` and `/node_modules/strong-type` routes, returns
140
+ an `integrated-legacy` skip receipt, and does not create the managed map pair.
141
+
142
+ <details>
143
+ <summary>Refresh lifecycle and two-file commit behavior</summary>
144
+
145
+ Scaffolding (`new` and `init`) creates the map. `dev` refreshes once before
146
+ binding. Non-dry-run `package`, browser `build`, and paired native packaging
147
+ refresh before collecting source. `test`, `check`, `verify`, `bundle`, and
148
+ browser `run` do not refresh. Dry-run packaging/build validates an existing map
149
+ without rewriting it, and `import-map` itself has no supported dry-run.
150
+
151
+ Generation stages the artifact and HTML entry beside their destinations,
152
+ checks directory and file identity under the workspace-operation lock, and
153
+ uses backups to restore the prior pair after a handled pre-commit failure.
154
+ Success reports `committed: true` and SHA-256/byte-length records for both
155
+ files. Cleanup failures after commit remain warnings on the valid receipt;
156
+ packaging rejects them rather than publishing ambiguous state. This is a
157
+ bounded handled-error transaction, not a claim of one filesystem-atomic rename
158
+ for both files and not a durable crash journal.
159
+
160
+ No app watches, polls, downloads, or self-updates this map. An active operation's
161
+ heartbeat is event telemetry only and never regenerates browser state.
162
+
163
+ </details>
164
+
165
+ <details>
166
+ <summary>SDK browser-runtime admission and exact receipt fields</summary>
167
+
168
+ `arcane.lock.json.sdkBrowserRuntime` persists the trusted manifest path,
169
+ `manifestSha256`, `contentSha256`, `builder`, `sdkVersion`, and `source` record.
170
+ For SDK `0.1.0` those identities are:
171
+
172
+ ```text
173
+ manifest: node_modules/arcane-os/browser-runtime/ARCANE_SDK_BROWSER_RELEASE.json
174
+ manifestSha256: 43baaec850291c28795f6c194001deb5febab88ccab1b033bce6597dd6f6f08f
175
+ contentSha256: 0caa302bc07d4a45f5290504ec62ddce98fdf5e3412f916c10aae3d51b1e5f7c
176
+ builder: arcane-sdk-browser-runtime-v1
177
+ sdkVersion: 0.1.0
178
+ source.protocol: arcane-sdk-browser-runtime/1
179
+ source.browserEntry: arcane-os/event-manager
93
180
  ```
94
181
 
95
- uses browser ESM in every renderer. The imported module can be pure browser
96
- logic, standard-Web-API logic, or a client of `globalThis.Arcane`. Import
97
- transport and host RPC are separate layers.
182
+ The `source` record also binds the `arcane-os-sdk` authority/repository and the
183
+ exact `event-pubsub` 6.1.0 and `strong-type` 2.0.0 package identities. Before a
184
+ workspace tree is admitted, the same-process verifier returns
185
+ `schemaVersion`, `kind`, `canonicalLocation`, `rootIdentity`, `manifestPath`,
186
+ `manifestSha256`, `manifestIdentity`, `builder`, `sdkVersion`, `source`,
187
+ `files`, `fileCount`, `totalBytes`, `contentSha256`, `identities`,
188
+ `sourceIdentities`, and `directories`. Those object-identity-bound verifier
189
+ receipts are authority inside the issuing process; reconstructing the same JSON
190
+ does not recreate authority.
191
+
192
+ </details>
98
193
 
99
194
  ## Arcane application protocol
100
195
 
@@ -190,7 +285,7 @@ Arcane normalizes the outer promise/error and stream lifecycle. `chatText`,
190
285
 
191
286
  ## Explicit cloud provider path
192
287
 
193
- `/arcane/modules/AI.js` can use an explicitly selected and configured cloud
288
+ `arcane/AI` can use an explicitly selected and configured cloud
194
289
  profile over HTTPS. That path is not Core transport fallback. The module adapts
195
290
  the selected provider into its high-level application behavior, while provider
196
291
  diagnostics and optional fields can remain provider-specific. Native policy and
@@ -231,11 +326,14 @@ The common contract ends where platform truth must remain different:
231
326
 
232
327
  ## Receipt and generation boundaries
233
328
 
234
- SDK runtime, app releases, bundles, native plans, providers, and artifacts use
235
- identity-bound receipts. A receipt binds the exact location, filesystem
236
- identity, bytes/inventory hashes, policy, toolchain, platform/architecture,
237
- signer/trust result where applicable, and generation. Mutation invalidates the
238
- receipt before bytes or authority change.
329
+ SDK runtime, app releases, import-map artifact/entry pairs, bundles, native
330
+ plans, providers, and artifacts use identity-bound receipts. The import-map
331
+ receipt binds each committed relative path, byte length, and SHA-256 in
332
+ addition to its exact imports, entry count, exclusions, and cleanup state. A
333
+ runtime or release receipt binds the exact location, filesystem identity,
334
+ bytes/inventory hashes, policy, toolchain, platform/architecture, signer/trust
335
+ result where applicable, and generation. Mutation invalidates the receipt
336
+ before bytes or authority change.
239
337
 
240
338
  Process-local receipts do not authorize reuse across Shell, Core, providers, or
241
339
  other processes. Cross-process reuse requires an authenticated shared host or
@@ -1,11 +1,17 @@
1
1
  # Arcane OS SDK JavaScript API
2
2
 
3
- The npm package exposes a Node.js ESM control plane. It is not a browser-importable renderer API. Use the synchronized modules under `/arcane/` for application code and use `globalThis.Arcane` for capability-gated native calls.
3
+ The npm package exposes a Node.js ESM control plane. It is not a browser-importable renderer API. Application code uses named modules from the managed browser map, such as `arcane/ThemeBootstrap`, uses the focused `arcane-os/event-manager` browser entry when needed, and calls `globalThis.Arcane` for capability-gated host behavior.
4
4
 
5
5
  This page is the canonical inventory for every JavaScript name reachable through `package.json#exports`. The same binding can appear at the root and a focused subpath; those entrypoints are listed together. The root workspace `discoverApps` and the low-level packager `discoverApps` are intentionally separate records because they are different functions.
6
6
 
7
7
  ## Import map
8
8
 
9
+ This table is the Node `package.json#exports` map: it defines package
10
+ entrypoints for SDK/tooling code. It is distinct from the generated browser
11
+ import map that resolves application-facing `arcane/*` modules and the focused
12
+ EventManager entry. See [browser runtime delivery](protocols.md#browser-runtime-delivery)
13
+ for that 85-entry physical-runtime contract.
14
+
9
15
  | Specifier | Purpose |
10
16
  | --- | --- |
11
17
  | `arcane-os` | Complete high-level SDK surface. |
@@ -2634,6 +2640,13 @@ Frozen registry of stable SDK error-code strings.
2634
2640
  registry, timeout, HTTP, or response failure; caller cancellation remains the
2635
2641
  separate `ERROR_CODES.cancelled` value.
2636
2642
 
2643
+ The import-map operation also reports the stable operation-specific strings
2644
+ `ARCANE_IMPORT_MAP_INVALID`, `ARCANE_IMPORT_MAP_UNRESOLVED`, and
2645
+ `ARCANE_IMPORT_MAP_COLLISION`; package assembly can additionally report
2646
+ `ARCANE_IMPORT_MAP_CLEANUP_FAILED`. They are normalized `ArcaneError.code`
2647
+ values, but are not properties added to this frozen general registry in SDK
2648
+ `0.1.0`.
2649
+
2637
2650
  ### Value and import
2638
2651
 
2639
2652
  ```text
@@ -3417,9 +3430,12 @@ async function usecreateApplication(...arguments_) {
3417
3430
 
3418
3431
  Returns a frozen convenience object that applies shared defaults to every headless application operation.
3419
3432
 
3420
- The object includes `updateCheck(options)`, which merges defaults with the
3421
- explicit call options and invokes `checkSdkUpdate()` once. Constructing the
3422
- toolchain does not check, poll, schedule, download, install, or mutate anything.
3433
+ The object includes `importMap(options)`, which merges defaults with explicit
3434
+ call options and performs one selected app's authenticated map refresh. The
3435
+ equivalent generic route is `execute('import-map', options)`. It also includes
3436
+ `updateCheck(options)`, which invokes `checkSdkUpdate()` once. Constructing the
3437
+ toolchain does not check, poll, schedule, download, install, regenerate, or
3438
+ mutate anything.
3423
3439
 
3424
3440
  ### Signature and result
3425
3441
 
@@ -3440,14 +3456,15 @@ import {createToolchain} from 'arcane-os';
3440
3456
 
3441
3457
  const toolchain = createToolchain({
3442
3458
  workspaceRoot: process.cwd(),
3459
+ appId:'hello-world',
3443
3460
  onEvent(event) {
3444
3461
  console.info(event.type);
3445
3462
  }
3446
3463
  });
3447
3464
 
3448
- // Only this explicit call performs the single bounded registry request.
3449
- const status = await toolchain.updateCheck();
3450
- console.log(status.status);
3465
+ // Only this explicit call refreshes the managed map and HTML entry.
3466
+ const result = await toolchain.importMap();
3467
+ console.log(result.importMap.entryCount); // 85 in SDK 0.1.0
3451
3468
  ```
3452
3469
 
3453
3470
  ## describeTargets()
@@ -3512,9 +3529,18 @@ async function usedevelopApplication(...arguments_) {
3512
3529
 
3513
3530
  Dispatches one named headless SDK operation with normalized acceptance, events, cancellation, and failure.
3514
3531
 
3532
+ The exact command `'import-map'` dispatches one app-scoped authenticated refresh
3533
+ and returns `{workspaceRoot, workspaceMode, appId, importMap}`. A normal
3534
+ `importMap` value binds the generated imports and the committed map/HTML file
3535
+ hashes; the canonical integrated-legacy layout returns its documented skip
3536
+ record instead. This route mutates the two managed application files and has no
3537
+ supported dry-run.
3538
+
3515
3539
  The exact command `'update-check'` dispatches one `checkSdkUpdate(options)`
3516
- call. Dispatch never installs a recurring task and never causes another command
3517
- to check for updates implicitly.
3540
+ call. Dispatch never installs a recurring task, polls application state, or
3541
+ causes another command to check for updates implicitly. There is no exported
3542
+ `importMapApplication()` or `generateImportMap()` binding and no
3543
+ `arcane-os/import-map` package subpath.
3518
3544
 
3519
3545
  ### Signature and result
3520
3546
 
@@ -3533,8 +3559,11 @@ Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states
3533
3559
  ```javascript
3534
3560
  import {executeOperation} from 'arcane-os';
3535
3561
 
3536
- const result = await executeOperation('update-check');
3537
- console.log(result.status, result.registryVersion);
3562
+ const result = await executeOperation('import-map', {
3563
+ workspaceRoot:process.cwd(),
3564
+ appId:'hello-world'
3565
+ });
3566
+ console.log(result.importMap.committed, result.importMap.entryCount);
3538
3567
  ```
3539
3568
 
3540
3569
  ## packageApplication()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arcane-os",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
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",
@@ -13,6 +13,7 @@
13
13
  "./toolchain": "./src/toolchain.mjs",
14
14
  "./events": "./src/events.mjs",
15
15
  "./event-manager": "./src/event-manager.mjs",
16
+ "./ai/browser-wasm": "./browser-runtime/ai/browser-wasm.mjs",
16
17
  "./testing": "./src/testing.mjs",
17
18
  "./targets": "./src/targets/index.mjs",
18
19
  "./native": "./src/native-plan.mjs",
@@ -46,14 +47,13 @@
46
47
  ],
47
48
  "scripts": {
48
49
  "test": "npm run test:unit && npm run test:functional && npm run test:integration && npm run test:regression",
49
- "test:release": "npm run test:unit && npm run test:functional:release && npm run test:integration && npm run test:regression",
50
+ "test:release": "node ./bin/arcane-test.mjs test/npm-release.test.mjs",
50
51
  "test:unit": "node ./bin/arcane-test.mjs test/app-descriptor.test.mjs test/app-schema.test.mjs test/contracts.test.mjs test/doctor.test.mjs test/targets.test.mjs test/workspace-operation-lock.test.mjs",
51
52
  "test:functional": "node ./bin/arcane-test.mjs test/cli.test.mjs test/dev-server.test.mjs test/dom-event-instrumentation.test.mjs test/event-manager.test.mjs test/events.test.mjs test/import-map.test.mjs test/packaging.test.mjs test/reference-completeness.test.mjs test/runtime-api-behavior.test.mjs test/runtime-sync.test.mjs test/runtime.test.mjs test/scaffold.test.mjs test/site.test.mjs test/update-check.test.mjs",
52
- "test:functional:release": "node ./bin/arcane-test.mjs test/cli.test.mjs test/dev-server.test.mjs test/dom-event-instrumentation.test.mjs test/event-manager.test.mjs test/events.test.mjs test/import-map.test.mjs test/packaging.test.mjs test/runtime-api-behavior.test.mjs test/runtime-sync.test.mjs test/runtime.test.mjs test/scaffold.test.mjs test/update-check.test.mjs",
53
53
  "test:integration": "node ./bin/arcane-test.mjs test/integrated-shared.test.mjs test/integrated-workspace.test.mjs test/native-plan.test.mjs test/native-provider-loader.test.mjs test/npm-release.test.mjs test/release-bundle.test.mjs test/release-capability-smoke.test.mjs test/shared-payload-batch.test.mjs test/tarball.test.mjs",
54
54
  "test:regression": "node ./bin/arcane-test.mjs test/channel-workflows.test.mjs test/native-provider-generation.test.mjs test/testing.test.mjs test/test-sets.test.mjs",
55
55
  "check": "node tools/check-source.mjs && node tools/runtime-manifest.mjs --verify && node tools/sdk-browser-runtime-manifest.mjs --verify && npm test",
56
- "check:release": "node tools/check-source.mjs && node tools/runtime-manifest.mjs --verify && node tools/sdk-browser-runtime-manifest.mjs --verify && npm run test:release",
56
+ "check:release": "node tools/check-source.mjs --package-only && node tools/runtime-manifest.mjs --verify && node tools/sdk-browser-runtime-manifest.mjs --verify && npm run test:release",
57
57
  "runtime:verify": "node tools/runtime-manifest.mjs --verify",
58
58
  "runtime:sync": "node tools/sync-runtime.mjs",
59
59
  "pack:local": "npm pack --ignore-scripts",
@@ -95,5 +95,8 @@
95
95
  "bundleDependencies": [
96
96
  "event-pubsub",
97
97
  "strong-type"
98
- ]
98
+ ],
99
+ "devDependencies": {
100
+ "@wllama/wllama": "3.6.0"
101
+ }
99
102
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "builder": "arcane-sdk-runtime-v1",
4
- "sdkVersion": "0.1.0",
4
+ "sdkVersion": "0.1.1",
5
5
  "source": {
6
6
  "repository": "https://github.com/TheWizardNexus/ARCANE-OS.git",
7
7
  "commit": "567ad110bf57a1c2d4a3daa22ae93716cc5f4d7e",
@@ -28,7 +28,7 @@
28
28
  "const": "arcane-os"
29
29
  },
30
30
  "version": {
31
- "const": "0.1.0"
31
+ "const": "0.1.1"
32
32
  }
33
33
  }
34
34
  },
@@ -69,16 +69,16 @@
69
69
  "const": "node_modules/arcane-os/browser-runtime/ARCANE_SDK_BROWSER_RELEASE.json"
70
70
  },
71
71
  "manifestSha256": {
72
- "const": "43baaec850291c28795f6c194001deb5febab88ccab1b033bce6597dd6f6f08f"
72
+ "const": "33396b3d35322b784929270e7ca0a2a8b31d899c6e77bcb227edc95b37d0ae7d"
73
73
  },
74
74
  "contentSha256": {
75
- "const": "0caa302bc07d4a45f5290504ec62ddce98fdf5e3412f916c10aae3d51b1e5f7c"
75
+ "const": "5e03f45a732db51cb5a2b2193cc79ecda34501d07a9b2e82e794e5fa37d55d00"
76
76
  },
77
77
  "builder": {
78
78
  "const": "arcane-sdk-browser-runtime-v1"
79
79
  },
80
80
  "sdkVersion": {
81
- "const": "0.1.0"
81
+ "const": "0.1.1"
82
82
  },
83
83
  "source": {
84
84
  "type": "object",
@@ -105,8 +105,8 @@
105
105
  },
106
106
  "dependencies": {
107
107
  "type": "array",
108
- "minItems": 2,
109
- "maxItems": 2,
108
+ "minItems": 3,
109
+ "maxItems": 3,
110
110
  "prefixItems": [
111
111
  {
112
112
  "type": "object",
@@ -129,6 +129,17 @@
129
129
  "resolved": {"const": "https://registry.npmjs.org/strong-type/-/strong-type-2.0.0.tgz"},
130
130
  "integrity": {"const": "sha512-HHrY9qYC7yn+5mlewiI3k9RQM9gZqGQsqbomZcd10Ks0h4RlX01nnkWbCe4AsVPCI6KaFvpkWm1nHMD+Ykup6g=="}
131
131
  }
132
+ },
133
+ {
134
+ "type": "object",
135
+ "additionalProperties": false,
136
+ "required": ["name", "version", "resolved", "integrity"],
137
+ "properties": {
138
+ "name": {"const": "@wllama/wllama"},
139
+ "version": {"const": "3.6.0"},
140
+ "resolved": {"const": "https://registry.npmjs.org/@wllama/wllama/-/wllama-3.6.0.tgz"},
141
+ "integrity": {"const": "sha512-NN3ZBXqaaUwGXTQubkNvsCaLPjN2XVa0bVS40OYCE8zquYmRc2W3oHYEgwvuSWWDB8aUqTLyMioySCXNkcnD1w=="}
142
+ }
132
143
  }
133
144
  ],
134
145
  "items": false