arcane-os 0.5.9 → 0.5.11

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 (55) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +117 -26
  3. package/browser-runtime/ai/browser-speech-providers.mjs +1 -1
  4. package/browser-runtime/ai/browser-wasm-llm-provider.mjs +63 -39
  5. package/docs/architecture.md +303 -0
  6. package/docs/compatibility.md +38 -0
  7. package/docs/event-manager.md +263 -0
  8. package/docs/platform-targets.md +104 -0
  9. package/docs/publishing.md +126 -0
  10. package/docs/reference/README.md +206 -0
  11. package/docs/reference/ai/browser-speech.md +813 -0
  12. package/docs/reference/ai/browser-wasm.md +637 -0
  13. package/docs/reference/ai/twin-cloud.md +156 -0
  14. package/docs/reference/arcane-ollama.md +288 -0
  15. package/docs/reference/availability-and-normalization.md +224 -0
  16. package/docs/reference/behavioral-testing.md +129 -0
  17. package/docs/reference/cli.md +820 -0
  18. package/docs/reference/core/README.md +61 -0
  19. package/docs/reference/core/arcane-ai-contracts.md +907 -0
  20. package/docs/reference/core/arcane-api.md +601 -0
  21. package/docs/reference/core/arcane-entities.md +59 -0
  22. package/docs/reference/core/arcane-events.md +134 -0
  23. package/docs/reference/core/ollama-module.md +181 -0
  24. package/docs/reference/core/reference/arcane-api/ai-and-ollama.md +1909 -0
  25. package/docs/reference/core/reference/arcane-api/applications-terminal-capabilities.md +1057 -0
  26. package/docs/reference/core/reference/arcane-api/core-and-events.md +320 -0
  27. package/docs/reference/core/reference/arcane-api/filesystem-storage-preferences-appearance.md +610 -0
  28. package/docs/reference/core/reference/arcane-api/namespaces.md +1157 -0
  29. package/docs/reference/core/reference/arcane-api/platform-installation-users-system.md +1423 -0
  30. package/docs/reference/core/reference/arcane-api/session-provisioning-diagnostics-development.md +315 -0
  31. package/docs/reference/event-manager.md +1409 -0
  32. package/docs/reference/inventory/package-api.json +3194 -0
  33. package/docs/reference/inventory/runtime-components.json +1015 -0
  34. package/docs/reference/inventory/runtime-entities.json +25 -0
  35. package/docs/reference/inventory/runtime-modules.json +1367 -0
  36. package/docs/reference/mail.md +309 -0
  37. package/docs/reference/protocols.md +749 -0
  38. package/docs/reference/runtime-components.md +1529 -0
  39. package/docs/reference/runtime-entities.md +305 -0
  40. package/docs/reference/runtime-modules.md +3275 -0
  41. package/docs/reference/sdk-api.md +6733 -0
  42. package/docs/roadmap.md +79 -0
  43. package/docs/work-amplification.md +66 -0
  44. package/examples/wasm-ai-demo/README.md +80 -0
  45. package/examples/wasm-ai-demo/app.js +787 -0
  46. package/examples/wasm-ai-demo/index.html +343 -0
  47. package/examples/wasm-ai-demo/profile-tools.js +217 -0
  48. package/examples/wasm-ai-demo/profiles/BOSS.Modelfile +106 -0
  49. package/examples/wasm-ai-demo/profiles/PreCrisis.Modelfile +693 -0
  50. package/examples/wasm-ai-demo/rag/boss-library.json +3006 -0
  51. package/examples/wasm-ai-demo/rag.js +295 -0
  52. package/examples/wasm-ai-demo/server.mjs +71 -0
  53. package/package.json +11 -2
  54. package/runtime/arcane/modules/AI.js +1 -1
  55. package/runtime/arcane/modules/AIProviderRuntime.js +26 -5
@@ -0,0 +1,104 @@
1
+ # Platform target contract
2
+
3
+ Every target adapter implements protocol `arcane-target-adapter/1` with these
4
+ named operations:
5
+
6
+ ```text
7
+ describe -> doctor -> prepare -> plan -> build -> run
8
+ ```
9
+
10
+ The available browser adapter plans from the selected workspace and schema-1
11
+ release manifest. The SDK also implements the process-local
12
+ `arcane-native-build-plan/1` and `arcane-native-builder/1` boundary for an
13
+ explicitly injected provider. It selects an app release and schema-2 descriptor,
14
+ toolchain, platform, architecture, format, signing mode, declared dependency
15
+ releases, and destination. Verification is a separate operation only when the
16
+ user explicitly selects it for the release artifact.
17
+
18
+ Native targets are available by explicitly pairing the SDK with fixed provider
19
+ modules in a compatible Arcane OS checkout. Every native request also requires
20
+ the canonical app descriptor to declare the exact target selected on the
21
+ command line. The SDK package does not silently search for a toolchain, infer a
22
+ descriptor target, embed the Arcane machine bundle, or substitute browser
23
+ output. For example:
24
+
25
+ ```bash
26
+ # Choose one target when creating each app repository.
27
+ npx arcane-os@dev new my-app --path ./my-app --target portable --git
28
+ cd my-app
29
+ npm install
30
+ npm exec -- arcane native-doctor --target portable --arcane-root "../Arcane OS"
31
+ npm exec -- arcane build --target portable --arcane-root "../Arcane OS"
32
+
33
+ # In an app scaffolded with --target windows-x64:
34
+ npm exec -- arcane build --target windows-x64 --arcane-root "../Arcane OS"
35
+ npm exec -- arcane run --target windows-x64 --arcane-root "../Arcane OS"
36
+
37
+ # In an app scaffolded with --target linux-x64:
38
+ npm exec -- arcane build --target linux-x64 --arcane-root "../Arcane OS"
39
+ npm exec -- arcane run --target linux-x64 --arcane-root "../Arcane OS"
40
+
41
+ # In an app scaffolded with --target linux-arm64, on native ARM64 Linux:
42
+ npm exec -- arcane native-doctor --target linux-arm64 --arcane-root "../Arcane OS" --format deb --signing unsigned-local-test
43
+ npm exec -- arcane build --target linux-arm64 --arcane-root "../Arcane OS" --format deb --signing unsigned-local-test
44
+ npm exec -- arcane run --target linux-arm64 --arcane-root "../Arcane OS" --format deb --signing unsigned-local-test
45
+
46
+ # In an app scaffolded with --target android-arm64. The run command requires
47
+ # one connected physical Android device with native ARM64 support:
48
+ npm exec -- arcane native-doctor --target android-arm64 --arcane-root "../Arcane OS" --format apk --signing development
49
+ npm exec -- arcane build --target android-arm64 --arcane-root "../Arcane OS" --format apk --signing development
50
+ npm exec -- arcane run --target android-arm64 --arcane-root "../Arcane OS" --format apk --signing development
51
+ ```
52
+
53
+ Every native scaffold also declares the browser target, so one repository can
54
+ use the normal browser development loop and its one selected native build. It
55
+ includes the raster icon required by the current native platform. Use the
56
+ matching scaffold target (`portable`, `windows-x64`, `linux-x64`, `linux-arm64`,
57
+ or `android-arm64`) before running the corresponding command.
58
+
59
+ `native-prepare` remains a standalone diagnostic. The normal build recipe omits
60
+ it and lets `build` prepare the selected toolchain state.
61
+
62
+ The portable output is an app-scoped Arcane Core directory. It is an explicit
63
+ portable builder payload, not an executable, and it has no direct run operation.
64
+ The external workspace defaults to `build/portable/`; integrated Arcane work
65
+ must use the same canonical checkout for `--workspace` and `--arcane-root`, and
66
+ must name an `--output-root` outside that checkout.
67
+
68
+ Compatibility uses the highest minimum Core version declared by the SDK runtime,
69
+ selected app, and bundled app dependencies, plus each app's Arcane protocol and
70
+ required features, capabilities, and methods. Newer Core versions are accepted
71
+ when those contracts remain available. See [compatibility.md](compatibility.md)
72
+ for the complete compatibility and breaking-change rule.
73
+
74
+ | Target | Formats | Development status |
75
+ |---|---|---|
76
+ | `browser` | `directory` | Available |
77
+ | `portable` | `portable` directory | Available with explicit `--arcane-root`; not executable |
78
+ | `windows-x64` | `exe` bundle | Available with explicit `--arcane-root`; unsigned local development only |
79
+ | `linux-x64` | `deb` | Available with explicit `--arcane-root`; unsigned local development only |
80
+ | `linux-arm64` | `deb` | Available with explicit `--arcane-root` on a compatible native ARM64 toolchain; unsigned local development only |
81
+ | `android-arm64` | `apk` | Available with explicit `--arcane-root`; development-signed, architecture-neutral, and physical/native ARM64 for run |
82
+
83
+ Every native target accepts one selected app release and its complete bundled
84
+ dependency closure through the provider boundary. The providers retain the
85
+ toolchain state required for build and, where supported, launch; app source and
86
+ workspace paths are not supplied to the provider. Linux run extracts to a
87
+ user-owned development tree without package installation or elevation.
88
+
89
+ Linux ARM64 uses the implemented Linux provider and is available only with a
90
+ compatible native ARM64 toolchain. The recorded target-scoped workflow built a
91
+ native ARM64 DEB, exercised the AArch64 host/Core/bridge, reached WebKit readiness,
92
+ and drained the owned process group. It loaded Ubuntu's packaged Bubblewrap
93
+ AppArmor profile while leaving the global user-namespace restriction enabled.
94
+ Android produces one development-signed APK with no native library or
95
+ ABI-specific payload. The APK is therefore architecture-neutral, while
96
+ `arcane run --target android-arm64` deliberately requires a physical device
97
+ with native ARM64 support. The recorded development path exercised physical
98
+ ARM64 build, readiness, cancellation, uninstall, and absence behavior. Both records
99
+ are development evidence, not production readiness.
100
+
101
+ Android AAB output, release signing, store publishing, and update continuity are
102
+ deferred. Windows and Linux production signing, installation, and update
103
+ acceptance also remain separate promotion work. The SDK never copies
104
+ proprietary application source into the Arcane checkout to bypass the boundary.
@@ -0,0 +1,126 @@
1
+ # npm publication
2
+
3
+ ## Canonical main and npm channels
4
+
5
+ `main` is the single canonical working and publication branch before and after
6
+ the first release. Do not create a development branch. `-dev` versions select
7
+ the npm `dev` dist-tag, while bare numeric stable versions select
8
+ `latest`. These are registry channels, not Git branches.
9
+
10
+ ## Stable and development npm publication
11
+
12
+ The package version and `publishConfig.tag` must agree exactly: `-dev` uses
13
+ `dev`, and a bare numeric stable version uses `latest`. npm is the canonical
14
+ SDK distribution: application repositories add an exact `arcane-os` project
15
+ dependency and invoke its local CLI with `npm exec -- arcane`. A separate
16
+ global installer, standalone SDK executable, NuGet package, Homebrew formula,
17
+ or OS package is not part of this release surface.
18
+
19
+ Publication checks run only after the user explicitly selects an npm release.
20
+ That selected-release workflow validates package metadata, the executable and
21
+ `.gitattributes` boundary, the complete package inventory, version/channel
22
+ agreement, and required license notices. One unprivileged producer packs one
23
+ `.tgz` under the selected Node and npm versions and uploads it as one Actions
24
+ artifact with a recorded run id, artifact id, version, and source commit. It
25
+ does not impose byte counts, hashes, digests, provenance receipts, or unrelated
26
+ test suites as ordinary development gates. Broader integration, regression,
27
+ platform, browser, presentation, and documentation work remains separately
28
+ user selected.
29
+
30
+ `publish-dev.yml` can run only when manually dispatched from `main` in
31
+ `TheWizardNexus/arcane-os-sdk`. Dispatch supplies the exact successful Check
32
+ run id, artifact id, and numeric version. The workflow downloads that exact Check
33
+ artifact, derives `dev` or `latest` from its version, and publishes the selected
34
+ `.tgz`. It may check out current source only for the publication controller; it
35
+ never repacks current source and never invokes `npm pack` or `npm publish .`
36
+ under publication authority. A
37
+ repository-wide concurrency group prevents simultaneous publication jobs;
38
+ GitHub may replace an older pending dispatch, and each surviving dispatch is
39
+ safe to rerun. Preflight rejects tag rollback, malformed registry state, or any
40
+ dist-tag other than `dev` and `latest`; an already-published matching version
41
+ is an idempotent success. Post-publication status preserves the other channel
42
+ and reports npm's response. It tolerates npm's publish-time scanning. If
43
+ scanning or manual review remains pending, the workflow reports that state and
44
+ a rerun safely resumes without republishing the version.
45
+
46
+ The public `0.3.2` release is fixed to package-source commit
47
+ `445bd2d982f12e6ef8dd2b615c70512000cc5224`, selected Check run
48
+ `33264677687`, and publication/registry run `33264829711`. Its numeric Git tag
49
+ and GitHub release title are both `0.3.2`. Later documentation or example
50
+ commits do not replace that package authority.
51
+
52
+ The unscoped package installs both `arcane` and `arcane-os`. The short command
53
+ is the documented default; `arcane-os` is the collision-safe fallback. npm
54
+ package names are unique, but executable names are not globally reserved.
55
+
56
+ When `npm view arcane-os@dev version` reports the package unavailable, run
57
+ `npm run pack:local` in this SDK checkout for local development, scaffold with
58
+ `node ./bin/arcane.mjs new ...`, and install the resulting `.tgz` into the app
59
+ with `npm install --save-dev --save-exact <path>`. Keep the tarball at the path
60
+ recorded by `package-lock.json`; subsequent `npm ci` uses that declared package.
61
+ Arcane reads the installed package's name and version against the root
62
+ dependency declaration. A local directory `file:` install is intentionally unsupported because
63
+ it may be linked.
64
+
65
+ The npm package already has its trusted-publishing relationship. Each later
66
+ release therefore follows the same direct selected-artifact path: push the
67
+ intended `main` source, manually run Check for that exact revision, review the
68
+ resulting package inventory and legal notices, then manually dispatch
69
+ publication with that Check run and artifact. Confirm the selected version and
70
+ dist-tag after publication. Never rebuild or repack the artifact under
71
+ publication authority, and never substitute a different source revision.
72
+
73
+ Generated app CI uses `npm ci --ignore-scripts`, so its lock must exist and its
74
+ dependency source must be reachable by the runner. A sibling local tarball is a
75
+ workstation workflow, not a portable GitHub dependency source; switch to the
76
+ exact registry release (or deliberately vendor the tarball) before remote CI.
77
+
78
+ ## Reusable application release workflow
79
+
80
+ The checked-in reusable workflow is not an ordinary supported release path
81
+ until its implementation matches the governing contract below.
82
+
83
+ External app repositories can call `.github/workflows/release-app.yml` from a
84
+ selected SDK repository revision. The reusable workflow checks out the selected
85
+ caller commit, installs only the caller's committed dependency lock, packages,
86
+ bundles, and uploads one explicitly selected app. Any tests, checks, or artifact
87
+ verification run only because that release output was explicitly selected.
88
+ The workflow never publishes npm, creates a GitHub Release, loops across apps,
89
+ or changes Arcane runtime policy.
90
+
91
+ The one build job holds only `contents: read`. It uses the caller's normal
92
+ locked installation, runs one selected `arcane package`, creates one selected
93
+ `arcane bundle`, and uploads that complete bundle. It creates no hashes, byte
94
+ identities, receipts, provenance records, or attestation sidecars and does not
95
+ run a second admission job.
96
+
97
+ Stable versioning, the npm `latest` tag, and an official GitHub release remain a
98
+ separate explicit release decision. Current `main` development does not
99
+ silently convert a `-dev` package into an official release. A stable release
100
+ must publish the exact selected Check artifact under `latest`; GitHub may then
101
+ attach that same package. Its Git
102
+ tag and GitHub release title must both be the same bare numeric
103
+ `MAJOR.MINOR.PATCH`. Prerelease versions do not get a misleading numeric
104
+ GitHub release, and no release creates a Git branch for an npm dist-tag.
105
+
106
+ ## Documentation publication
107
+
108
+ Documentation publication occurs only when the user explicitly selects it. The
109
+ Pages job checks out that selected `main` revision without persistent
110
+ credentials and uploads only the static `site/` tree. It does not automatically
111
+ run the SDK test suite, checks, generators, or repository build code.
112
+
113
+ The deployment job holds only the read, Pages, and OIDC permissions required by
114
+ that selected artifact. The `github-pages` environment remains the final
115
+ deployment authority. Documentation channels are post-registry presentation
116
+ work and do not change the canonical source branch.
117
+
118
+ ## Work-amplification record
119
+
120
+ The release graph is one selected `main` revision and one npm release candidate.
121
+ One producer creates the tarball. Publication names that producer's exact Check
122
+ run, artifact, and version and does not rebuild from a later checkout. The
123
+ release workflow checks only the publication contract and required legal
124
+ inventory for that selected output.
125
+ Platform matrices, full product regressions, Pages, and broader presentation
126
+ work remain separate user-selected operations.
@@ -0,0 +1,206 @@
1
+ # Arcane OS SDK developer reference
2
+
3
+ This reference answers developer questions in this order:
4
+
5
+ 1. **What can the application or tool do?**
6
+ 2. **What should I import or call?**
7
+ 3. **What does a successful result look like?**
8
+ 4. **Where does it run?**
9
+ 5. **Only when needed: which transport, host, provider, or kernel boundary implements it?**
10
+
11
+ The default path is capability-first. Transport and implementation detail is
12
+ kept in the [protocol and host architecture guide](protocols.md), and every
13
+ high-level page links to the relevant deep section instead of repeating it.
14
+
15
+ ## Start with one working request
16
+
17
+ Install the SDK in your application:
18
+
19
+ ```sh
20
+ npm install --save-exact arcane-os@0.5.11
21
+ ```
22
+
23
+ For your first AI call, follow the [TWiN Cloud quick start](ai/twin-cloud.md).
24
+ For on-device speech, follow the [browser speech quick start](ai/browser-speech.md)
25
+ and the complete [browser AI demo](https://github.com/TheWizardNexus/arcane-os-sdk/tree/main/examples/wasm-ai-demo).
26
+ Each guide names the application configuration you supply and shows the public
27
+ call, response, cancellation, and error handling. Browser module imports use
28
+ the SDK's [materialized import map](cli.md#arcane-import-map); installing npm
29
+ alone does not make bare module names resolve in a browser.
30
+
31
+ ## Reference map
32
+
33
+ | Need | Start here |
34
+ | --- | --- |
35
+ | Use the Node.js package API | [SDK JavaScript API](sdk-api.md) |
36
+ | Publish central events, capture complete time-travel history, or observe the DOM | [EventManager and event-stack reference](event-manager.md) |
37
+ | Use the `arcane` command | [CLI reference](cli.md) |
38
+ | Generate named browser imports or inspect the selected physical runtime | [`arcane import-map`](cli.md#arcane-import-map) and [browser runtime delivery](protocols.md#browser-runtime-delivery) |
39
+ | Choose browser, native, cloud, or cross-host behavior | [Availability and normalization](availability-and-normalization.md) |
40
+ | Import a shipped renderer module | [Runtime module catalog](runtime-modules.md) |
41
+ | Use a shared entity | [Runtime entity modules](runtime-entities.md) and [exact export contracts](core/arcane-entities.md) |
42
+ | Load a reusable HTML component | [Runtime component catalog](runtime-components.md) |
43
+ | Call `globalThis.Arcane` | [Arcane Core API](core/arcane-api.md) |
44
+ | Subscribe to native events | [Arcane event reference](core/arcane-events.md) |
45
+ | Use provider-neutral AI lifecycle, chat, speech, persistence, or document context | [Normalized AI](#normalized-ai) |
46
+ | Run a caller-selected local LLM in the browser | [Browser-WASM local AI](ai/browser-wasm.md) |
47
+ | Run caller-selected Whisper or Kokoro in the browser | [Browser speech providers](ai/browser-speech.md) |
48
+ | Send one TWiN Cloud request or migrate saved LLM preferences | [TWiN Cloud quick start](ai/twin-cloud.md) |
49
+ | Use Arcane Ollama | [Arcane Ollama guide](arcane-ollama.md) |
50
+ | Understand transports and protocol switching | [Protocol and host architecture](protocols.md) |
51
+ | Run contract and behavior tests | [Behavioral testing](behavioral-testing.md) |
52
+
53
+ ## Version scope and source ownership
54
+
55
+ This repository contains explicitly versioned surfaces with different owners:
56
+
57
+ | Surface | Source identity | Meaning |
58
+ | --- | --- | --- |
59
+ | SDK and CLI | `arcane-os` `0.5.11` | The Node.js toolchain, portable `arcane-os/event-manager`, `arcane-os/mail`, `arcane-os/preference-store`, and `arcane-os/speech-playback` entrypoints, plus the browser-only `arcane-os/ai/browser-wasm` and `arcane-os/ai/browser-speech` entrypoints in this checkout. |
60
+ | Browser runtime | SDK `0.5.11`, protocol `arcane/1`, `runtime/` | The SDK-canonical runtime tree. `listRuntimeFiles()`, `readRuntimeFile()`, and `loadRuntimeRelease()` derive its current inventory directly from the selected directory. |
61
+ | Browser SDK runtime | SDK `0.5.11`, `browser-runtime/` | The browser closure for events, Wllama, and Browser Speech mechanisms. `listSdkBrowserRuntimeFiles()`, `readSdkBrowserRuntimeFile()`, and `loadSdkBrowserRuntimeRelease()` derive its current inventory directly from the selected directory. |
62
+ | Core reference snapshot | Arcane OS commit `567ad110bf57a1c2d4a3daa22ae93716cc5f4d7e`, protocol `arcane/1` | The application-facing Core contract imported into `docs/reference/core/`, with SDK-local links and package-boundary notes added explicitly. |
63
+
64
+ The SDK runtime source and Core reference have different owners. A browser
65
+ module comes from the selected SDK runtime tree. A native build selects one
66
+ explicit Arcane OS checkout and Core, then checks the declared protocol,
67
+ version, features, capabilities, methods, and provider contract needed by that
68
+ build. A matching protocol name or higher version alone does not promise
69
+ functional compatibility.
70
+
71
+ See the [Core reference source notes](core/README.md) for the imported inventory
72
+ and the distinction between a documentation snapshot and the selected runtime.
73
+
74
+ ## Installed documentation and release identity
75
+
76
+ This reference accompanies `arcane-os@0.5.11`. The installed package includes
77
+ the maintained `docs/` tree and `examples/wasm-ai-demo/` source alongside
78
+ README and CHANGELOG. Open `node_modules/arcane-os/docs/reference/README.md`
79
+ for the matching local reference. The generated website and test suites remain
80
+ repository surfaces.
81
+
82
+ Read the installed version and current registry channel separately:
83
+
84
+ ```sh
85
+ npm list arcane-os
86
+ npm view arcane-os@latest version
87
+ ```
88
+
89
+ The [changelog](../../CHANGELOG.md) records changes by version; the
90
+ [GitHub releases](https://github.com/TheWizardNexus/arcane-os-sdk/releases)
91
+ identify the corresponding published package source. A newer website does not
92
+ change the version installed in your application.
93
+
94
+ ### Historical 0.3.4 publication record
95
+
96
+ The following records describe that earlier release only. They do not identify
97
+ the current registry channel or the package covered by this reference.
98
+
99
+ | Release boundary | Exact value |
100
+ | --- | --- |
101
+ | npm package | `arcane-os@0.3.4` |
102
+ | Package source | `9e657b31f758a2c7943446533fe87afda206ac49` |
103
+ | GitHub release | [`0.3.4`](https://github.com/TheWizardNexus/arcane-os-sdk/releases/tag/0.3.4) (tag and title are both exactly `0.3.4`) |
104
+ | Selected package run | [Check run 33268940871](https://github.com/TheWizardNexus/arcane-os-sdk/actions/runs/33268940871) |
105
+ | Selected publication run | [Publish run 33268987444](https://github.com/TheWizardNexus/arcane-os-sdk/actions/runs/33268987444) |
106
+
107
+ ## MDN-style page contract
108
+
109
+ Public reference entries follow the established Arcane documentation model:
110
+
111
+ - one canonical, mechanically readable inventory owns each public name;
112
+ - every public member or module has one guide entry headed by its exact name;
113
+ - each guide leads with an overview and the shortest safe working example;
114
+ - parameters, return values, errors, side effects, cancellation, and events are
115
+ stated when they apply;
116
+ - availability is summarized near the call, while transport mechanics are
117
+ folded into or deep-linked from the entry;
118
+ - normalized results are distinguished from provider- or platform-native
119
+ envelopes;
120
+ - examples do not trigger destructive, privileged, expensive, or external
121
+ actions merely by being copied.
122
+
123
+ ## Public runtime inventory
124
+
125
+ The package exposes 204 semantic JavaScript records across 16 JavaScript
126
+ entrypoints, plus eight JSON Schemas and package metadata. Ten entrypoints are
127
+ Node.js control-plane surfaces,
128
+ `arcane-os/event-manager`, `arcane-os/mail`, `arcane-os/preference-store`, and
129
+ `arcane-os/speech-playback` run in Node and browsers, and
130
+ `arcane-os/ai/browser-wasm` plus `arcane-os/ai/browser-speech` are browser-only.
131
+ The [machine-readable package
132
+ inventory](inventory/package-api.json) and [SDK member reference](sdk-api.md)
133
+ are checked bidirectionally against every declared JavaScript export.
134
+
135
+ The seven update-check records are explicit on-demand checks; they do not poll,
136
+ download, install, or self-update.
137
+
138
+ The synchronized browser payload exposes:
139
+
140
+ - 82 JavaScript module artifacts under `runtime/arcane/modules/`, including
141
+ ESM modules, classic vendor globals, one worker protocol, and one Node-oriented
142
+ mail transport;
143
+ - 14 shared entity modules under `runtime/arcane/entities/`;
144
+ - 39 reusable HTML-import components under `runtime/arcane/components/`;
145
+ - seven shared CSS artifacts, images, optional physical-workspace security
146
+ files where present, and the vendored `strong-type` dependency.
147
+
148
+ The module and component catalogs enumerate every shipped artifact, including
149
+ vendor support files that are not ESM imports. The selected runtime directories
150
+ and their current source inventories remain authoritative; the catalogs explain
151
+ what those artifacts let a developer do.
152
+
153
+ ## Normalized AI
154
+
155
+ Portable applications start with the provider-neutral runtime rather than an
156
+ Ollama, Wllama, Whisper, Kokoro, native, or cloud transport:
157
+
158
+ | Need | Public surface | Availability |
159
+ | --- | --- | --- |
160
+ | Select, load, unload, inspect, cancel, and use LLM/STT/TTS independently | [`AIProviderRuntime.js`](runtime-modules.md#aiproviderruntimejs) | Cross-host controller; each registered provider declares its own host requirements. |
161
+ | Observe sticky role state and startup settlement | [`AIRuntimeState.js`](runtime-modules.md#airuntimestatejs) | Cross-host EventTarget state; observation grants no authority. |
162
+ | Offer explicit selected-model start/cancel UI | [`chat.html`](runtime-components.md#chathtml), [`speech.html`](runtime-components.md#speechhtml), and [`voice-transcription.html`](runtime-components.md#voice-transcriptionhtml) | Browser/native WebView components; user activation emits a cancelable request before any LLM or STT load intent, and recording stays disabled without sticky ready STT. |
163
+ | Use Core-normalized chat | [`globalThis.Arcane.ai`](core/arcane-ai-contracts.md) | Native/Core only when separately admitted. |
164
+ | Run a caller-selected GGUF LLM locally | [`arcane-os/ai/browser-wasm`](ai/browser-wasm.md) | Browser secure context with WebGPU full-offload availability, WebAssembly, and OPFS/DBOPFS. |
165
+ | Run caller-selected Whisper/Kokoro locally | [`arcane-os/ai/browser-speech`](ai/browser-speech.md) | Browser with DBOPFS, Web Locks, Workers, and caller-supplied runtime and model sources; Kokoro supports bounded Worker/session concurrency with automatic WebGPU-first execution and complete WASM-pool fallback. |
166
+ | Add bounded persistent history and memory | [`PersistentAIChatSession.js`](runtime-modules.md#persistentaichatsessionjs) | Browser/native WebView runtime with ChatEntity/DBOPFS and a configured chat function. |
167
+ | Add explicit document search/context | [`DBOPFSDocumentLibrary.js`](runtime-modules.md#dbopfsdocumentlibraryjs) | Existing DBOPFS-style adapter; search occurs only after the app calls it or deliberately wires its context builder into chat. |
168
+
169
+ There is no automatic local-to-cloud, browser-to-Core, provider-to-provider, or
170
+ storage fallback. Tool calls remain structural data until application-owned
171
+ policy and code decide whether to execute them. App prompts, model defaults,
172
+ profiles, tools, business policy, and private data remain app-owned.
173
+
174
+ An explicitly selected but unloaded model is not “ready.” `chat.html` keeps
175
+ Send disabled and exposes a visible keyboard-operable LLM Start/Try again or
176
+ Cancel loading control. `speech.html` and `voice-transcription.html` keep their
177
+ recording operations unavailable and share the equivalent Start
178
+ transcription/Try again/Cancel loading control for STT. Applications can
179
+ override `requestAIActivation(intent)` or `requestSTTActivation(intent)`, or
180
+ cancel the corresponding activation-request event. Imports and state
181
+ observation emit no lifecycle intent, and default
182
+ `startTranscription=false` does not request an STT startup load or begin an
183
+ automatic model download. It does not unload a role started independently.
184
+ Reported availability never creates ready STT/TTS state without an
185
+ admitted, loaded provider. Shared STT cancel/destroy propagates an owned signal,
186
+ and TTS Mute/Unmute updates the shared lifecycle owner. The selected local TTS
187
+ provider/model catalog owns its default voice; a saved OpenAI-route voice is not
188
+ forwarded to Core or browser speech.
189
+
190
+ ## Authority and feature detection
191
+
192
+ The presence of a JavaScript function is not permission to use it. Native
193
+ applications should inspect `Arcane.capabilities.list()` where available and
194
+ then call the relevant status method. Android callers with `system.read` obtain
195
+ the nested capability snapshot through `Arcane.platform.status()`.
196
+
197
+ Do not infer local-AI readiness from `Arcane.runtime.current().managedLocalAI`,
198
+ infer authorization from a transport name, or treat an Ollama model inventory
199
+ as package admission. Each method rechecks native policy at invocation time.
200
+
201
+ ## Source and licensing
202
+
203
+ - [SDK runtime source](../../runtime/arcane)
204
+ - [AGPL license](../../LICENSE)
205
+ - [Commercial-license notice](../../COMMERCIAL-LICENSE.md)
206
+ - [Third-party and distribution notice](../../NOTICE)