arcane-os 0.3.1 → 0.3.2

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 (153) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +86 -117
  3. package/bin/arcane-test.mjs +170 -46
  4. package/browser-runtime/ai/browser-speech-artifacts.mjs +855 -895
  5. package/browser-runtime/ai/browser-speech-providers.mjs +80 -204
  6. package/browser-runtime/ai/browser-wasm-llm-provider.mjs +627 -819
  7. package/browser-runtime/ai/browser-wasm.mjs +24 -35
  8. package/browser-runtime/ai/browser-wllama-runtime.mjs +64 -316
  9. package/browser-runtime/ai/model-controller.mjs +584 -181
  10. package/browser-runtime/ai/speech-worker-client.mjs +8 -148
  11. package/browser-runtime/ai/speech-worker-runtime.mjs +642 -374
  12. package/browser-runtime/dom-event-instrumentation.mjs +55 -147
  13. package/browser-runtime/event-manager.mjs +239 -624
  14. package/package.json +5 -6
  15. package/runtime/arcane/components/app-bar.html +3 -15
  16. package/runtime/arcane/components/assistant-panel.html +10 -10
  17. package/runtime/arcane/components/calculator.html +1 -1
  18. package/runtime/arcane/components/chat.html +1359 -135
  19. package/runtime/arcane/components/conversation-view.html +2 -2
  20. package/runtime/arcane/components/document-inspector.html +11 -17
  21. package/runtime/arcane/components/file-manager.html +13 -56
  22. package/runtime/arcane/components/markdown-document.html +82 -281
  23. package/runtime/arcane/components/markdown-editor.html +7 -10
  24. package/runtime/arcane/components/media-embed.html +6 -6
  25. package/runtime/arcane/components/screen-capture.html +4 -4
  26. package/runtime/arcane/components/source-explanation.html +2 -2
  27. package/runtime/arcane/components/speech.html +112 -68
  28. package/runtime/arcane/components/terminal-workspace.html +4 -4
  29. package/runtime/arcane/components/theme-editor.html +1 -1
  30. package/runtime/arcane/components/unified-inbox.html +2 -2
  31. package/runtime/arcane/components/voice-transcription.html +31 -21
  32. package/runtime/arcane/entities/Calculation.js +2 -3
  33. package/runtime/arcane/entities/Chat.js +228 -43
  34. package/runtime/arcane/entities/Preference.js +3 -5
  35. package/runtime/arcane/entities/Weather.js +5 -5
  36. package/runtime/arcane/modules/AI.js +1042 -427
  37. package/runtime/arcane/modules/AIProviderRuntime.js +618 -359
  38. package/runtime/arcane/modules/AIResponseLength.js +9 -19
  39. package/runtime/arcane/modules/AIRuntimeState.js +109 -72
  40. package/runtime/arcane/modules/ArcaneNavigationPolicy.js +45 -32
  41. package/runtime/arcane/modules/BrowserTestSuite.js +78 -122
  42. package/runtime/arcane/modules/CalculatorEngine.js +9 -9
  43. package/runtime/arcane/modules/CommunicationAppController.js +3 -7
  44. package/runtime/arcane/modules/ComponentContracts.js +30 -32
  45. package/runtime/arcane/modules/ConfiguredAIChatSession.js +281 -230
  46. package/runtime/arcane/modules/ConversationActionItems.js +26 -59
  47. package/runtime/arcane/modules/ConversationClosingReport.js +34 -61
  48. package/runtime/arcane/modules/ConversationTimebox.js +27 -15
  49. package/runtime/arcane/modules/DBOPFSDocumentLibrary.js +152 -344
  50. package/runtime/arcane/modules/DocumentLexicalSearch.js +25 -91
  51. package/runtime/arcane/modules/HTMLImport.js +54 -1
  52. package/runtime/arcane/modules/IsolatedModelQuestionRunner.js +40 -203
  53. package/runtime/arcane/modules/LocalAIReadiness.js +40 -60
  54. package/runtime/arcane/modules/LocalAIReadinessController.js +15 -13
  55. package/runtime/arcane/modules/MD.js +1 -45
  56. package/runtime/arcane/modules/Mail.js +51 -103
  57. package/runtime/arcane/modules/MailOutbox.mjs +95 -193
  58. package/runtime/arcane/modules/MailTransport.mjs +36 -57
  59. package/runtime/arcane/modules/ModelDefinition.js +22 -106
  60. package/runtime/arcane/modules/OpenMeteoWeatherProvider.js +39 -101
  61. package/runtime/arcane/modules/PersistentAIChatSession.js +281 -18
  62. package/runtime/arcane/modules/PreferenceStore.js +102 -30
  63. package/runtime/arcane/modules/RiskSignalAnalyzer.js +8 -9
  64. package/runtime/arcane/modules/ScopedOPFSCache.js +7 -42
  65. package/runtime/arcane/modules/ScreenCapture.js +175 -128
  66. package/runtime/arcane/modules/SpeechPlayback.js +46 -149
  67. package/runtime/arcane/modules/StaticDocumentCatalog.js +173 -407
  68. package/runtime/arcane/modules/ToolCallRouter.js +25 -12
  69. package/runtime/arcane/modules/YouTubeMedia.js +6 -5
  70. package/schemas/arcane-app-bundle.schema.json +13 -78
  71. package/schemas/arcane-app.schema.json +9 -25
  72. package/schemas/arcane-lock.schema.json +18 -151
  73. package/schemas/arcane-package.schema.json +2 -16
  74. package/schemas/native-build-plan.schema.json +119 -122
  75. package/src/app-descriptor.mjs +75 -132
  76. package/src/application-tests.mjs +200 -0
  77. package/src/cli/main.mjs +27 -46
  78. package/src/constants.mjs +3 -4
  79. package/src/dev-server.mjs +30 -324
  80. package/src/doctor.mjs +92 -154
  81. package/src/dom-event-instrumentation.mjs +55 -147
  82. package/src/errors.mjs +2 -3
  83. package/src/event-manager.mjs +239 -624
  84. package/src/event-queue.mjs +3 -3
  85. package/src/import-map.mjs +273 -1028
  86. package/src/index.mjs +14 -16
  87. package/src/installed-sdk-runtime.mjs +27 -67
  88. package/src/integrated-provider-loader.mjs +53 -382
  89. package/src/mail-api.mjs +0 -2
  90. package/src/mail-server.mjs +224 -580
  91. package/src/mail.mjs +4 -10
  92. package/src/native-plan.mjs +163 -598
  93. package/src/native-provider-loader.mjs +104 -1063
  94. package/src/packager/core.mjs +485 -3229
  95. package/src/process.mjs +5 -10
  96. package/src/release-bundle.mjs +292 -2405
  97. package/src/runtime.mjs +76 -396
  98. package/src/scaffold.mjs +30 -80
  99. package/src/sdk-browser-runtime.mjs +70 -626
  100. package/src/source-server.mjs +588 -0
  101. package/src/targets/index.mjs +78 -188
  102. package/src/templates/workspace-template.mjs +19 -135
  103. package/src/testing-loader.mjs +164 -0
  104. package/src/testing.mjs +1 -1
  105. package/src/toolchain.mjs +131 -544
  106. package/src/update-check.mjs +26 -64
  107. package/src/workspace-operation-lock.mjs +139 -430
  108. package/src/workspace-runtime.mjs +109 -1558
  109. package/src/workspace.mjs +40 -302
  110. package/browser-runtime/ARCANE_SDK_BROWSER_RELEASE.json +0 -218
  111. package/browser-runtime/ai/ARCANE_AI_BROWSER_SPEECH_COMPONENTS.json +0 -203
  112. package/browser-runtime/ai/ARCANE_AI_BROWSER_WASM_COMPONENTS.json +0 -80
  113. package/browser-runtime/ai/internal/sha256.mjs +0 -166
  114. package/docs/architecture.md +0 -344
  115. package/docs/compatibility.md +0 -36
  116. package/docs/event-manager.md +0 -294
  117. package/docs/platform-targets.md +0 -108
  118. package/docs/publishing.md +0 -201
  119. package/docs/reference/README.md +0 -185
  120. package/docs/reference/ai/browser-speech-package-authority.json +0 -835
  121. package/docs/reference/ai/browser-speech.md +0 -1295
  122. package/docs/reference/ai/browser-wasm.md +0 -530
  123. package/docs/reference/arcane-ollama.md +0 -288
  124. package/docs/reference/availability-and-normalization.md +0 -183
  125. package/docs/reference/behavioral-testing.md +0 -133
  126. package/docs/reference/cli.md +0 -779
  127. package/docs/reference/core/README.md +0 -62
  128. package/docs/reference/core/arcane-ai-contracts.md +0 -907
  129. package/docs/reference/core/arcane-api.md +0 -601
  130. package/docs/reference/core/arcane-entities.md +0 -65
  131. package/docs/reference/core/arcane-events.md +0 -134
  132. package/docs/reference/core/ollama-module.md +0 -181
  133. package/docs/reference/core/reference/arcane-api/ai-and-ollama.md +0 -1909
  134. package/docs/reference/core/reference/arcane-api/applications-terminal-capabilities.md +0 -1057
  135. package/docs/reference/core/reference/arcane-api/core-and-events.md +0 -320
  136. package/docs/reference/core/reference/arcane-api/filesystem-storage-preferences-appearance.md +0 -610
  137. package/docs/reference/core/reference/arcane-api/namespaces.md +0 -1157
  138. package/docs/reference/core/reference/arcane-api/platform-installation-users-system.md +0 -1423
  139. package/docs/reference/core/reference/arcane-api/session-provisioning-diagnostics-development.md +0 -315
  140. package/docs/reference/event-manager.md +0 -1511
  141. package/docs/reference/inventory/package-api.json +0 -3284
  142. package/docs/reference/inventory/runtime-components.json +0 -1011
  143. package/docs/reference/inventory/runtime-entities.json +0 -26
  144. package/docs/reference/inventory/runtime-modules.json +0 -1431
  145. package/docs/reference/mail.md +0 -316
  146. package/docs/reference/protocols.md +0 -719
  147. package/docs/reference/runtime-components.md +0 -1366
  148. package/docs/reference/runtime-entities.md +0 -303
  149. package/docs/reference/runtime-modules.md +0 -2965
  150. package/docs/reference/sdk-api.md +0 -6698
  151. package/docs/roadmap.md +0 -79
  152. package/docs/work-amplification.md +0 -129
  153. package/runtime/ARCANE_RUNTIME_RELEASE.json +0 -826
@@ -1,719 +0,0 @@
1
- # Protocol and host architecture
2
-
3
- This is the deep reference behind the compact availability notes elsewhere.
4
- Application developers should start with the
5
- [availability and normalization guide](availability-and-normalization.md), call
6
- one documented API, and treat the protocols below as implementation detail.
7
-
8
- ## Layer map
9
-
10
- ```text
11
- application code
12
- |-- Node SDK API ----------------- arcane-cli-events/1 + SDK receipts
13
- |-- EventManager ----------------- synchronous bus + arcane-event-stack/1
14
- |-- browser-local AI ------------- WebGPU/WASM/Workers/DBOPFS; no Core grant
15
- `-- globalThis.Arcane
16
- |-- development host -------- development HTTP bridge
17
- |-- Microsoft NT native ----- WebView2 host bridge
18
- |-- Linux native ------------ WebKitGTK host bridge
19
- `-- Android native ---------- Android WebView message bridge
20
- |
21
- `-- Arcane Core/provider boundary
22
- |-- platform services
23
- |-- ArcaneOllama loopback service
24
- `-- explicitly selected cloud APIs
25
- ```
26
-
27
- Each downward boundary can add authority and platform capability. None can be
28
- inferred merely from a function existing in shared JavaScript.
29
-
30
- ## SDK package and CLI protocols
31
-
32
- The npm package API is ordinary Node.js ESM. The CLI and programmatic toolchain
33
- share one headless operation implementation. Long-running operations accept
34
- before blocking work, own their task, stream structured events with bounded
35
- backpressure, emit progress or heartbeats, support cancellation where the
36
- underlying operation can do so safely, and surface failure through rejection or
37
- a nonzero CLI status.
38
-
39
- Machine output uses `arcane-cli-events/1`. Native planning and providers use:
40
-
41
- - `arcane-target-adapter/1` for target adapters;
42
- - `arcane-native-build-plan/1` for immutable native plans;
43
- - `arcane-native-builder/1` for injected native builders;
44
- - `arcane-integrated-toolchain/1` for the fixed integrated shared/Core provider.
45
-
46
- These protocols normalize orchestration and evidence. They do not normalize a
47
- Windows EXE, Linux DEB, Android APK, and portable directory into the same
48
- artifact kind.
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
-
58
- ## Installed SDK runtime materialization
59
-
60
- `materializeInstalledSdkRuntime()` is the Node entrypoint for refreshing one
61
- external workspace's checked-in `arcane/` projection from its one exact
62
- installed SDK declaration. Import the function through the dependency key that
63
- the workspace actually declares: `arcane-os` for the canonical package name or,
64
- for example, `arcane-sdk` for the exact `npm:arcane-os@<version>` alias. No
65
- application- or Arcane OS-local copier owns this operation.
66
-
67
- The operation resolves that declaration again while holding the shared
68
- workspace-operation lock, authenticates the physical package plus its runtime
69
- and browser-runtime receipts, derives the destination inventory dynamically,
70
- and returns one of three statuses:
71
-
72
- - `created` when no prior `arcane/` projection or persistent receipt existed;
73
- - `reused` only after the current process reauthenticates the recorded physical
74
- package, both source receipts, and every destination byte;
75
- - `refreshed` when a safe legacy projection or an authenticated older generation
76
- is replaced.
77
-
78
- Each committed generation writes the canonical workspace-local receipt
79
- `.arcane/installed-sdk-runtime.json`. Its
80
- `arcane-installed-sdk-runtime-projection` schema binds a UUID generation, the
81
- workspace location identity, declared dependency name/group/specifier and
82
- package source, physical package location/name/version/identity, both source
83
- receipt identities and content hashes, and the exact projected path/byte/hash
84
- inventory. The file is durable evidence, not standalone authority: a later
85
- process must authenticate it against the current physical package, freshly
86
- issued source receipts, and the complete destination tree before reporting
87
- `reused`.
88
-
89
- Creation and refresh write and authenticate a complete staging tree and staged
90
- receipt before the commit boundary. Refresh moves the prior tree and receipt to
91
- owned backups, installs the new pair without invoking callbacks or observing
92
- cancellation inside that bounded commit, and restores the prior pair if commit
93
- or post-commit verification fails. Cancellation remains effective through the
94
- last pre-commit check; after commit begins the operation finishes verification
95
- or rollback. Successful whole-tree replacement removes bytes absent from the
96
- new dynamic inventory. Symbolic links, non-files, malformed receipts, receipt
97
- tampering, unsafe paths, and corrupt selected source bytes remain errors rather
98
- than refresh inputs.
99
-
100
- ## Central events and time-travel data
101
-
102
- `arcane-os/event-manager` is host-neutral JavaScript. Its live event path is
103
- synchronous, in-process `event-pubsub`; it does not select WebView2,
104
- WebKitGTK, Android, HTTP, Core, or a kernel boundary. Optional history uses the
105
- strict `arcane-event-stack/1` data format. That protocol names an immutable
106
- diagnostic document, not a network channel and not the `arcane/1` Core RPC
107
- protocol.
108
-
109
- Live listeners receive the original arguments. Recording separately snapshots
110
- payloads and metadata with explicit depth, entry, string, and history limits;
111
- redaction is enabled by default. Exported stacks can be moved between Node and
112
- browser hosts because `parseEventStack()` validates and canonicalizes the data
113
- before playback. Review mode emits immutable records, events mode deliberately
114
- re-emits recorded event types, and neither mode restores external host side
115
- effects or DOM state.
116
-
117
- <details>
118
- <summary>Event-stack identity, overflow, and trust boundary</summary>
119
-
120
- Each document carries `protocol`, `sessionId`, `createdAt`, and ordered
121
- `events`. Each record repeats the protocol/session and carries sequence,
122
- timing, nesting/causation, source/category, payload, metadata, status, and
123
- failure evidence. At `maxEvents`, the manager appends one terminal
124
- `arcane.time-travel.overflow` marker, disables recording, and stops DOM
125
- observation; this explicit marker is why a valid overflow document may contain
126
- `maxEvents + 1` records. Import is strict, rejects extra or unsafe structure,
127
- and grants no Core capability, app admission, or provider authority.
128
-
129
- </details>
130
-
131
- See [EventManager and time-travel review](event-manager.md) for the callable
132
- surface, DOM privacy defaults, playback modes, and recovery behavior.
133
-
134
- ## Browser runtime delivery
135
-
136
- External and modern integrated workspaces keep the same application URLs and a
137
- browser-standard import map. Each selected app owns
138
- `apps/<id>/modules/arcane.importmap.json`; the exact canonical JSON is also
139
- embedded in its HTML entry as a managed `<script type="importmap"
140
- data-arcane-import-map>`. The map follows `<base>` and precedes module scripts,
141
- classic scripts, and module preloads, so application code can use stable named
142
- imports such as:
143
-
144
- ```javascript
145
- import ollama from 'arcane/Ollama';
146
- ```
147
-
148
- The authenticated physical-v1 tree lives entirely beneath `arcane/`. SDK
149
- `0.3.1` projects it from two canonical release receipts:
150
-
151
- | Canonical receipt | Source authority and protocol | Receipt inventory |
152
- | --- | --- | --- |
153
- | `runtime/ARCANE_RUNTIME_RELEASE.json` | `sdk-canonical`; `arcane/1`; builder `arcane-sdk-runtime-v1` | 161 files; 4,161,715 bytes; content SHA-256 `9ed39694d9f286e0994404a82fb6002c3ba48be0d085a6b68d51c7facc17c56f` |
154
- | `browser-runtime/ARCANE_SDK_BROWSER_RELEASE.json` | `arcane-os-sdk`; `arcane-sdk-browser-runtime/1`; builder `arcane-sdk-browser-runtime-v1` | 26 files; 9,554,968 bytes; content SHA-256 `1493497265c330507abed847e52e65dc2ce22c15efaf5646ed7ae544b107ad6f` |
155
-
156
- The runtime receipt is the current byte authority. Its Arcane OS
157
- `c540014afe69f14cf5ae60493b7295f36dbcec64` / bundle `0.8.12` record is
158
- `legacyProjection` provenance, not a second or newer runtime authority. The
159
- browser receipt binds `event-pubsub` `6.1.0`, `strong-type` `2.0.0`, and
160
- `@wllama/wllama` `3.6.0`, as well as the browser entry
161
- `arcane-os/event-manager`. Runtime dependencies stay under
162
- `arcane/dependencies/`; the SDK event and browser-AI closure stays under
163
- `arcane/sdk/`. This URL-key separation prevents runtime and SDK dependency
164
- versions from aliasing one another.
165
-
166
- Those two receipt inventories contain 187 entries in total. That sum is a
167
- release-inventory fact, not an import-map entry count and not an assertion about
168
- one maintained example. The `0.3.1` map deterministically roots every admitted
169
- top-level runtime ESM plus the authenticated SDK browser roots, then follows
170
- those roots for runtime entities and dependency compatibility. Application
171
- source imports do not select a fixed entry count. Its public operation receipt is the
172
- authority for the exact `imports`, `entryCount`, and `excludedModules`;
173
- reached-file traversal is internal and is not exposed in that receipt. The
174
- managed graph exposes `arcane-os/event-manager`, `arcane-os/ai/browser-wasm`,
175
- and `arcane-os/ai/browser-speech`; dependency compatibility mappings are added
176
- only when authenticated runtime or SDK root traversal observes them.
177
-
178
- The focused physical targets remain stable when their bindings are reached:
179
-
180
- | Browser specifier | Physical target |
181
- | --- | --- |
182
- | `arcane-os/event-manager` | `./arcane/sdk/event-manager.mjs` |
183
- | `arcane-os/ai/browser-wasm` | `./arcane/sdk/ai/browser-wasm.mjs` |
184
- | `arcane-os/ai/browser-speech` | `./arcane/sdk/ai/browser-speech.mjs` |
185
- | `event-pubsub` | `./arcane/sdk/dependencies/event-pubsub/index.js` |
186
- | `./node_modules/strong-type/index.js` | `./arcane/dependencies/strong-type/index.js` |
187
-
188
- There is no `arcane-os` package-root mapping, bare `strong-type` mapping, or
189
- catch-all `arcane/` prefix. Host-internal `CaseEvidenceIndexer.js` is explicitly
190
- excluded; classic scripts, workers, stylesheets, and other non-ESM assets use
191
- their documented URL or host loading contract rather than invented package
192
- bindings. Development serves the selected app plus the authenticated tree.
193
- Packaging copies the same map, app entry, and physical bytes into `dist/<id>`;
194
- targets never resolve through the consumer workspace's root `node_modules/`.
195
-
196
- `generateImportMap()` is an internal toolchain operation, not a package export.
197
- Its package path accepts the configured entry plus the deterministic included
198
- `.html`/`.htm` document inventory. One transaction writes the artifact and the
199
- same managed JSON into every admitted document. The receipt binds
200
- `documentPaths`, `documentCount`, and `files`: artifact first, configured entry
201
- second, then additional documents as `role:"document"`. The public CLI keeps
202
- its existing two-option command and supplies only the selected entry; packaging
203
- owns multi-page discovery.
204
-
205
- An external package and development server expose the authenticated runtime
206
- inventory at `/ARCANE_RUNTIME_PROJECTION.json`:
207
-
208
- ```javascript
209
- {
210
- schemaVersion: 1,
211
- kind: 'arcane-app-runtime-projection',
212
- sdkVersion,
213
- pathPrefix: 'arcane/',
214
- fileCount,
215
- totalBytes,
216
- contentSha256,
217
- files: [{path, bytes, sha256}]
218
- }
219
- ```
220
-
221
- The projection contains public paths relative to its declared
222
- `pathPrefix:'arcane/'` (for example, `modules/...` and `sdk/...`), byte lengths,
223
- and SHA-256 values and is itself bound by the packaged release inventory. It does
224
- not expose the private `/ARCANE_APP_RELEASE.json` or replace the underlying
225
- runtime/browser receipts. Missing, changed, forged, duplicated, or internally
226
- inconsistent projection data fails `ARCANE_RUNTIME_PROJECTION_INVALID`.
227
-
228
- External `validateWorkspace()` results also expose a frozen `sdkInstallation`
229
- authority with exactly `dependencyName`, `packageSource`,
230
- `canonicalPackageRoot`, `packageName`, `packageVersion`, `runtimeRoot`,
231
- `browserRuntimeRoot`, `runtimeManifest`, and `browserRuntimeManifest`. A
232
- workspace may use the canonical dependency name or one exact npm alias such as
233
- `npm:arcane-os@0.3.1`; the physical package manifest must still identify
234
- exactly as `arcane-os@0.3.1`. Canonical-plus-alias duplicates, multiple aliases,
235
- links/junctions, indirect package roots, or version drift fail closed.
236
-
237
- The imported module can be pure browser logic, standard-Web-API logic, or a
238
- client of `globalThis.Arcane`. Import-map resolution is not a new Arcane wire
239
- protocol, Core capability, network authority, or provider fallback. Import
240
- transport and host RPC remain separate layers.
241
-
242
- The canonical integrated-legacy Arcane OS root is the documented exception. It
243
- retains its physical `/arcane` and `/node_modules/strong-type` routes, returns
244
- an `integrated-legacy` skip receipt, and does not create the managed map pair.
245
-
246
- <details>
247
- <summary>Refresh lifecycle and two-file commit behavior</summary>
248
-
249
- Scaffolding (`new` and `init`) creates the map. `dev` refreshes once before
250
- binding. Non-dry-run `package`, browser `build`, and paired native packaging
251
- refresh before collecting source. `test`, `check`, `verify`, `bundle`, and
252
- browser `run` do not refresh. Dry-run packaging/build validates an existing map
253
- without rewriting it, and `import-map` itself has no supported dry-run.
254
-
255
- Generation stages the artifact and HTML entry beside their destinations,
256
- checks directory and file identity under the workspace-operation lock, and
257
- uses backups to restore the prior pair after a handled pre-commit failure.
258
- Success reports `committed: true` and SHA-256/byte-length records for both
259
- files. Cleanup failures after commit remain warnings on the valid receipt;
260
- packaging rejects them rather than publishing ambiguous state. This is a
261
- bounded handled-error transaction, not a claim of one filesystem-atomic rename
262
- for both files and not a durable crash journal.
263
-
264
- No app watches, polls, downloads, or self-updates this map. An active operation's
265
- heartbeat is event telemetry only and never regenerates browser state.
266
-
267
- </details>
268
-
269
- <details>
270
- <summary>SDK 0.3.1 browser-runtime admission and exact receipt fields</summary>
271
-
272
- `arcane.lock.json.sdkBrowserRuntime` persists the trusted manifest path,
273
- `manifestSha256`, `contentSha256`, `builder`, `sdkVersion`, and `source` record.
274
- For SDK `0.3.1`, the manifest itself records:
275
-
276
- ```text
277
- manifest: node_modules/arcane-os/browser-runtime/ARCANE_SDK_BROWSER_RELEASE.json
278
- fileCount: 26
279
- totalBytes: 9554968
280
- contentSha256: 1493497265c330507abed847e52e65dc2ce22c15efaf5646ed7ae544b107ad6f
281
- builder: arcane-sdk-browser-runtime-v1
282
- sdkVersion: 0.3.1
283
- source.protocol: arcane-sdk-browser-runtime/1
284
- source.browserEntry: arcane-os/event-manager
285
- ```
286
-
287
- The verifier computes `manifestSha256` over the exact installed manifest and
288
- binds that value in its process-local receipt and the workspace lock; it must
289
- not be substituted with `contentSha256`. The `source` record also binds the
290
- `arcane-os-sdk` authority/repository and the exact `event-pubsub` 6.1.0,
291
- `strong-type` 2.0.0, and `@wllama/wllama` 3.6.0 package identities. Before a
292
- workspace tree is admitted, the same-process verifier returns
293
- `schemaVersion`, `kind`, `canonicalLocation`, `rootIdentity`, `manifestPath`,
294
- `manifestSha256`, `manifestIdentity`, `builder`, `sdkVersion`, `source`,
295
- `files`, `fileCount`, `totalBytes`, `contentSha256`, `identities`,
296
- `sourceIdentities`, and `directories`. Those object-identity-bound verifier
297
- receipts are authority inside the issuing process; reconstructing the same JSON
298
- does not recreate authority.
299
-
300
- </details>
301
-
302
- ## Portable AI provider runtime
303
-
304
- Application code should select a normalized role, not an internal protocol.
305
- The exported
306
- [`getAIProviderRuntime()` singleton](runtime-modules.md#aiproviderruntimejs)
307
- comes from authenticated runtime bytes and owns independent `llm`, `stt`, and
308
- `tts` selections. SDK `0.3.1` ships browser-WASM LLM and browser
309
- speech provider/2 adapters and also adapts selected legacy OpenAI LLM/STT/TTS,
310
- Core-backed Ollama LLM, and admitted Core speech STT/TTS routes into provider/2;
311
- other native, Core, or cloud routes require an externally supplied compatible
312
- adapter. The singleton itself is not an authentication or capability token. It
313
- normalizes inspection, model authority,
314
- load/unload/dispose, cancellation, stream cleanup, status, and startup
315
- barriers. Each selected provider retains its real execution requirements.
316
- `localOnly` fails closed, and failure in one role never authorizes a Core,
317
- cloud, or different-provider fallback.
318
-
319
- For a browser-only LLM,
320
- [`arcane-os/ai/browser-wasm`](ai/browser-wasm.md) exposes `createArcaneAI()`
321
- and an adapter into the same provider-neutral lifecycle. For browser speech,
322
- [`arcane-os/ai/browser-speech`](ai/browser-speech.md) creates independent
323
- Whisper STT and Kokoro TTS providers that register directly with the normalized
324
- runtime. The SDK supplies mechanism; applications retain model/runtime choice,
325
- provenance, licenses, prompts, tools, voices, and disclosure policy.
326
-
327
- ### Browser-WASM LLM lifecycle
328
-
329
- The shipped browser receipt contains the authenticated Wllama JavaScript/WASM
330
- engine and its provider/cache/controller mechanism. It contains no model
331
- weights, default model catalog, CDN fallback, native provider, speech model, or
332
- application profile. The caller supplies each model as a source authority with
333
- a nonempty ordered file list, so monolithic and split GGUF models use the same
334
- contract. HTTPS redirects are followed and the final HTTPS URL is recorded.
335
- Exact bytes are bound only by the optional expected byte lengths and SHA-256
336
- values whose matching fieldwise security checks are enabled.
337
-
338
- On load, the DBOPFS store admits all ordered members and commits the completion
339
- manifest last. A normal cache miss may fetch only the caller-supplied immutable
340
- HTTPS sources; `offline:true` performs no model request and admits only a
341
- compatible completed cache, otherwise it rejects with
342
- `ARCANE_AI_MODEL_OFFLINE_MISS`. Unload releases the active Wllama session but
343
- does not silently delete the app-owned cache.
344
-
345
- SDK `0.3.1` requires WebGPU. Load requests full offload with exactly 99,999 GPU
346
- layers and admits the model only after observing an adapter, full layer offload,
347
- buffer and queue work, and a settled fence. `navigator.gpu` presence alone is
348
- not readiness. There is no CPU fallback, partial-offload success mode, or
349
- silent switch to native/Core/cloud inference.
350
-
351
- ### Browser speech lifecycle
352
-
353
- The browser-speech package contains plain-JavaScript authority, DBOPFS store,
354
- provider, client, and Worker machinery. It redistributes no Whisper, Kokoro,
355
- ONNX, model, voice, third-party license, or corresponding-source payload.
356
- Default warn-first integrations use `createBrowserSpeechAuthority()` with a
357
- version-pinned npm/package runtime entry and optional upstream `wasmPaths`;
358
- the selected runtime then downloads models and voices through its normal
359
- provider fetch and browser cache behavior after explicit `load()`.
360
-
361
- `createBrowserSpeechArtifactGraph()` remains the explicit secure/offline option.
362
- It declares one caller-selected immutable closure with an explicit entrypoint
363
- and every auxiliary ESM, WASM, model, data, and voice file bound by canonical
364
- path, materialized media type, optional source media type, byte length, SHA-256,
365
- immutable starting source/revision, optional redirect-final-origin inventory,
366
- license declaration, and canonical graph identity.
367
-
368
- Graph construction rejects ambiguous paths and routes, mutable source
369
- authorities, undeclared or unmatched static imports, dynamic imports, fetches,
370
- Cache Storage opens, module Workers, undeclared executable-string construction,
371
- and incomplete file reachability. `edges.cacheOpens[]` binds the exact module,
372
- occurrence, policy, cache name, and readable non-JavaScript target paths. The
373
- two admitted transforms are the exact audited `Function("return this")()`
374
- compatibility site and typed-array constructor sites later bound to intrinsic
375
- typed-array prototypes.
376
-
377
- A source download rejects redirects by default. A file may opt in with a
378
- nonempty, graph-identity-bound `redirectFinalOrigins` inventory; only that file
379
- uses Fetch redirect following, and the final response must expose one declared
380
- HTTPS origin without credentials or a fragment. The immutable starting URL
381
- remains the source authority, and the final path, query, or signed/expiring URL
382
- is never persisted or admitted as authority. Fetch exposes only the final CORS
383
- response, so browser code cannot inspect or authenticate intermediate redirect
384
- hops. The store then checks the declared source media type, exact length, and
385
- SHA-256, persists and rehashes every file, rescans the closed module graph, and
386
- commits the completion manifest last.
387
-
388
- A valid warm admission performs no source request; it rehashes and rescans every
389
- cached file and returns `artifact-graph-dbopfs-cache-verified`. Strict
390
- `offline:true` never calls the source fetch function and returns only
391
- `artifact-graph-offline-dbopfs-cache-verified`; a miss rejects with
392
- `ARCANE_AI_ARTIFACT_GRAPH_OFFLINE_CACHE_MISS` /
393
- `artifact-graph-offline-cache-miss`. Cold and warm admissions are exactly
394
- `artifact-graph-network-dbopfs-verified` and
395
- `artifact-graph-dbopfs-cache-verified`. Both cached paths bind redirect origins
396
- and source media type through graph/manifest identity but never reuse a prior
397
- final URL.
398
-
399
- Every admission then uses module-captured native Blob URL functions, ignoring
400
- the legacy caller `objectUrlFactory`, and reads back each unique `blob:` URL to
401
- verify its exact identity, media type, byte length, and SHA-256 before
402
- execution. A fresh cryptographic guard capability binds every rewritten graph
403
- call for that materialization; it is not caller input, persisted authority, or
404
- part of the graph identity.
405
-
406
- The speech Worker establishes a private `MessageChannel` on its first load and
407
- routes subsequent request, progress, and cancellation settlement through that
408
- port. In explicit `secure:true` graph mode, scanned runtime edges are rewritten
409
- through one authenticated guard.
410
- Fetch and each declared cache-open edge can read only exact graph routes backed
411
- by already verified object URLs; raw fetch/cache calls and cache writes reject.
412
- The Worker also denies Function-family constructor escape, string timers,
413
- IndexedDB, OPFS, and raw `BroadcastChannel`, `EventSource`, `RTCPeerConnection`,
414
- `ShadowRealm`, `SharedWorker`, `WebSocket`, `WebSocketStream`, `WebTransport`,
415
- `Worker`, `XMLHttpRequest`, `eval`, and `importScripts` capability. Declared
416
- nested module Workers start through the SDK role Worker and receive the same
417
- authenticated graph. Default warn-first operation uses the direct runtime/model
418
- authority instead; these capability restrictions are not installed and the
419
- selected upstream runtime keeps ordinary browser fetch/cache behavior. An exact
420
- secure-graph runtime request alias, including Kokoro's audited
421
- mutable voice request, is a local route to caller-authenticated bytes and is
422
- never a source or network authority.
423
-
424
- Worker operations use `arcane-ai-speech-worker/1`. The public Worker client
425
- admits only `load`, `use`, `status`, `unload`, and `dispose`; the transport host
426
- additionally admits only its internal `cancel` control. Every other operation
427
- rejects with code `ARCANE_AI_INVALID_REQUEST`, message
428
- `The speech worker operation is not part of its protocol.`, and role-specific
429
- reason `stt-worker-operation-unknown` or `tts-worker-operation-unknown`.
430
- Failures use the separate
431
- `arcane-ai-speech-worker-error/1` envelope. Its exact own-key set is
432
- `code,message,protocol,reason`, all four must be data properties, and its
433
- registered code, fixed message, reason, role, and operation must agree. A
434
- foreign, incomplete, extra-keyed, accessor-bearing, cross-role, or
435
- cross-operation error envelope is rejected and terminates that role Worker.
436
- Nested module Workers use
437
- `arcane-ai-browser-speech-artifact-module-worker/1` and report bootstrap
438
- rejection only as `artifact-module-worker-bootstrap-rejected`.
439
-
440
- The exact redirect and source-media error registry is published in the
441
- [browser-speech reference](ai/browser-speech.md#graph-reasoncode-rule); graph
442
- errors retain the mechanical exact code pairing
443
- `ARCANE_AI_` plus the uppercased, underscore-normalized reason.
444
-
445
- Kokoro is configured through `namespace.env.wasmPaths`; Transformers is
446
- configured through `namespace.env.backends.onnx.wasm.wasmPaths`. Warn-first
447
- mode may use a caller-selected version-pinned upstream directory and preserves
448
- the runtime's browser cache. Secure graph mode uses materialized runtime files
449
- and its verified outer cache fields. Optional `numThreads` is caller-owned and
450
- Transformers-STT-only; a Kokoro declaration rejects with
451
- `ARCANE_AI_KOKORO_ENV_NUM_THREADS_FIELD_NOT_EXPOSED` /
452
- `kokoro-env-num-threads-field-not-exposed`. Missing or rejected namespace
453
- shapes fail closed with distinct `*-unavailable` and
454
- `*-assignment-rejected` reasons for each verified setting; the Worker never
455
- substitutes a different namespace. The caller also owns dtype, STT input sample
456
- rate, TTS output sample rate, default voice, and the complete voice inventory;
457
- the SDK selects no hardware default, runtime, model, or fallback.
458
-
459
- The SDK is not the distributor of the selected upstream speech packages or
460
- provider assets and does not republish their legal/source payloads. The
461
- component record at `browser-runtime/ai/ARCANE_AI_BROWSER_SPEECH_COMPONENTS.json`
462
- documents resolution only; it is not an execution or publication gate.
463
-
464
- Whisper `stt` and Kokoro `tts` each own catalog, inspect, status, load, request,
465
- unload, and dispose state. They load, cancel, unload, fail, and recover
466
- independently from the LLM and from one another. Cancellation after Worker use
467
- begins terminates that role's Worker slot and returns the provider to unloaded;
468
- a later use must load it again. If shared STT `Blob` decoding is cancelled
469
- before Worker use, the request rejects while the loaded provider remains ready.
470
- Speech failure neither disables text chat nor retries through another local,
471
- native, or cloud provider. The provider/Worker layer is event-neutral: it
472
- exposes promises, `AbortSignal`, precise lifecycle/status records, and one
473
- caller progress callback, but owns no event bus or listener registry. Progress
474
- is the provider-neutral record
475
- `{phase,completed,total,unit,heartbeat}`; role is encoded in Worker phase names,
476
- not added as a second field.
477
-
478
- ### Persistent chat and document context
479
-
480
- The SDK runtime owns
481
- [`DBOPFSDocumentLibrary`](runtime-modules.md#dbopfsdocumentlibraryjs),
482
- [`DocumentLexicalSearch`](runtime-modules.md#documentlexicalsearchjs), and
483
- [`PersistentAIChatSession`](runtime-modules.md#persistentaichatsessionjs).
484
- Document bootstrap is explicit and schema-driven, commits a completed
485
- generation last, and returns bounded search results with partial read failures
486
- disclosed. `evaluate()` can instead score a caller-owned source set without
487
- persisting its bodies, under separate corpus/scoring/output/document budgets.
488
- A chat session never searches the corpus unless the application
489
- deliberately wires a document context builder into the request; generated
490
- document context remains labeled untrusted.
491
-
492
- Persistent chat maintains bounded live model context plus `ChatEntity`
493
- history/memory according to the caller's persistence choice. A turn with
494
- `persist:false` remains coherent in the live session without entering durable
495
- history or memory. `createArcaneAI(...).createChatSession(options)` binds the
496
- session and automatic memory work to that same selected LLM controller; it does
497
- not select a second provider or storage fallback.
498
-
499
- ### Cancellation and structural tools
500
-
501
- Cancellation is part of the provider lifecycle, not just a UI decision.
502
- `AbortSignal`, the normalized role cancel operation, and stream-handle
503
- `cancel(reason)` propagate to the selected provider. Browser-WASM inference
504
- requires positive llama cancellation acknowledgement when cancellation is
505
- required. Browser speech cancellation terminates a Worker only after Worker use
506
- has begun; cancellation during shared browser decoding leaves the loaded Worker
507
- ready. Unload always cancels active role work before releasing that role's
508
- execution state, and superseded late results are rejected rather than committed
509
- or retried through another provider.
510
-
511
- Interactive request ownership is latest-request-wins independently for each
512
- role. A new valid request that reaches admission aborts the active role request
513
- and waits for its provider promise settlement; stream replacement additionally
514
- requires confirmed bounded handle cleanup. Only the newest waiting request may
515
- start after settlement, and request-specific generations prevent superseded
516
- callbacks from clearing or restoring newer state. The runtime revalidates
517
- selected-provider readiness and never reloads, switches, or falls back
518
- implicitly. Generic provider-promise settlement is not a claim that underlying
519
- work stopped; only a provider's documented positive acknowledgement or
520
- destructive worker teardown can prove that stronger fact.
521
-
522
- `startAIRuntime({startTranscription:false})` is the default startup boundary for
523
- STT. It declines to request a startup STT load; it does not unload a role already
524
- started through another explicit lifecycle action. A selected unloaded
525
- transcription provider remains selected and unloaded until a user lifecycle
526
- intent or explicit `startTranscription:true` opt-in asks the provider owner to
527
- load it. Neither state observation nor either shared speech component imports a
528
- model or selects a fallback. `speech.html` and `voice-transcription.html` consume
529
- one shared `createSTTActivationController()` contract for selected, unloaded,
530
- loading, unloading, error, and ready presentation plus cancelable user intent.
531
- Both keep capture fail-closed until sticky STT state is exactly ready.
532
-
533
- Each shared speech component owns an `AbortController` for its STT request and
534
- passes its signal through `AI.fetchSTT()`. `voice-transcription.html` also adds
535
- that signal to the existing injected `transcribe(file,context)` callback
536
- context. Cancel, readiness loss, superseding capture, and component teardown
537
- abort the owned signal and suppress late delivery. Whether the provider's
538
- underlying computation stops remains governed by its own cancellation contract.
539
- User TTS unmute calls `AI.setSpeechMuted(false)` before
540
- or with its load intent so the runtime records the unmuted lifecycle preference;
541
- mute calls `AI.setSpeechMuted(true)`, cancels active synthesis, and unloads TTS.
542
- The selected TTS model catalog owns `defaultVoice`. AI.js uses a saved OpenAI
543
- voice only for the OpenAI route and never forwards it to Core or browser Kokoro.
544
-
545
- LLM tool calls are structural result data only. The SDK never executes a
546
- handler. The application owns schema validation, authorization, side-effect
547
- policy, dispatch, and the matching tool-result turn.
548
-
549
- <details>
550
- <summary>Portable AI protocol disclosure</summary>
551
-
552
- The normalized runtime protocol is `arcane-ai-runtime/2`; registered adapters
553
- implement `arcane-ai-provider/2` and must prove matching model authority before
554
- load. The browser-WASM component receipt is `arcane-ai-browser-wasm/2`; its
555
- direct controller adapter uses `arcane-ai-adapter/1`, and
556
- `adaptV1LlmProvider()` projects that surface into the provider/2 LLM role.
557
- Browser speech stores identify themselves as
558
- `arcane-ai-browser-speech-artifacts/1`. Legacy authorities retain
559
- `arcane-ai-model-authority/1`. Authenticated browser-speech graphs use
560
- `arcane-ai-browser-speech-artifact-graph/1`, kind
561
- `browser-speech-authenticated-artifact-graph`, and a canonical SHA-256 graph
562
- identity. Those identifiers describe validation and lifecycle contracts; none
563
- is by itself a capability grant, publisher-authenticity claim, or complete
564
- cache receipt.
565
-
566
- These identifiers normalize lifecycle records. They do not erase provider
567
- availability: browser providers still require their browser capabilities,
568
- native providers still require an admitted host and Core method, and cloud
569
- providers still require explicit selection, network policy, and credentials.
570
-
571
- </details>
572
-
573
- ## Arcane application protocol
574
-
575
- `globalThis.Arcane.protocol` is `arcane/1`. The shared API wraps transport
576
- selection, request ids, JSON-safe values, promise settlement, `Arcane.Error`,
577
- and renderer events. The current transport snapshot is synchronous:
578
-
579
- ```javascript
580
- const {connected, transport, native, managedLocalAI} =
581
- globalThis.Arcane.runtime.current();
582
- ```
583
-
584
- Transport values are `webview2`, `webkitgtk`, `android-webview`,
585
- `development-http`, and `standalone`. `connected` means a callable transport
586
- was initialized. It does not prove that Core answered, the method is admitted,
587
- or a dependency is ready.
588
-
589
- ## Native host transports
590
-
591
- ### Microsoft NT / WebView2
592
-
593
- The renderer uses the WebView2 host messaging surface. The host binds one app
594
- identity and native policy to the session before Core dispatch. Microsoft NT
595
- can expose managed-service and privileged platform operations that do not exist
596
- in an ordinary browser.
597
-
598
- ### Linux / WebKitGTK
599
-
600
- The renderer uses the WebKitGTK host bridge with the same application-facing
601
- `Arcane` protocol. Linux can implement the same normalized methods through
602
- different host code. Some administrator-owned service settings intentionally
603
- return unsupported/manual guidance rather than imitating Microsoft NT mutation.
604
-
605
- ### Android / Android WebView
606
-
607
- Android injects a main-frame, origin-bound bridge for the packaged application.
608
- Its generated registry binds application identity, package version, entry,
609
- grants, and method policy. Android exposes a narrower surface, including an
610
- admitted user-managed local-AI chat projection where configured. Desktop model
611
- management is not projected merely because a user-managed Ollama listener is
612
- reachable.
613
-
614
- ### macOS
615
-
616
- No macOS target, native bridge, Core host, artifact, or run contract is exposed
617
- by this SDK version. A browser may still run browser-only application code, but
618
- that does not create a native Arcane host or satisfy a native capability.
619
-
620
- ## Development and remote HTTP transport
621
-
622
- The development HTTP bridge makes the same application-facing request shape
623
- available without pretending the browser is a native host. It is a development
624
- transport, not a production isolation or authority boundary. A remotely
625
- operated client can use an expressly configured web transport only when the
626
- host, origin, application identity, and policy admit it; Arcane does not silently
627
- swap native calls to arbitrary remote HTTP endpoints.
628
-
629
- When transport changes while the public method remains the same, request
630
- settlement and public errors stay normalized. Host-specific availability and
631
- result detail remain documented by the method.
632
-
633
- ## Core dispatch and capability admission
634
-
635
- The host binds the caller's application identity. Core checks the exact method,
636
- required capability, allowed application type/id, privilege, mutation
637
- exclusivity, request bounds, and relevant package policy. Renderer-supplied app
638
- ids or grants never replace that bound identity.
639
-
640
- `Arcane.capabilities.list()` is the Core-side application preflight. It reports
641
- current grants and admitted methods but does not reserve authority for a later
642
- call. Each call is checked again.
643
-
644
- ## Arcane Ollama protocol path
645
-
646
- The safe application path is:
647
-
648
- ```text
649
- renderer Ollama.js or Arcane.ollama
650
- -> arcane/1 host request
651
- -> Core capability and package-policy admission
652
- -> managed ArcaneOllama loopback service
653
- -> bounded Ollama HTTP operation
654
- ```
655
-
656
- Applications never connect directly to `localhost:11434`. Core owns loopback
657
- endpoint selection, method admission, request/response limits, stream ids,
658
- chunk events, model-policy checks, native resource admission, and managed
659
- mutation workflows.
660
-
661
- Direct Ollama methods preserve the bounded provider-native success envelope.
662
- Arcane normalizes the outer promise/error and stream lifecycle. `chatText`,
663
- `generateText`, and `readiness` are helper-level normalizers.
664
-
665
- ## Explicit cloud provider path
666
-
667
- `arcane/AI` can use an explicitly selected and configured cloud
668
- profile over HTTPS. That path is not Core transport fallback. The module adapts
669
- the selected provider into its high-level application behavior, while provider
670
- diagnostics and optional fields can remain provider-specific. Native policy and
671
- network policy still govern a native renderer's outbound access.
672
-
673
- Local failure never authorizes cloud disclosure. The user or owning application
674
- must select and configure the cloud provider explicitly.
675
-
676
- ## Events, streaming, and cancellation
677
-
678
- Renderer-visible Core events are listed in
679
- [the Arcane event reference](core/arcane-events.md). Durable
680
- `transport.ready` and `core.ready` completions can be observed after the fact
681
- with `Arcane.events.when()`. Ordinary progress, stream, terminal, and appearance
682
- events are future-only.
683
-
684
- Ollama streaming correlates chunks to the originating request. A renderer
685
- abort or timeout can stop observation without proving that a non-cooperative
686
- host mutation stopped. Method guides state whether Core cooperatively cancels,
687
- whether partial provider state can remain, and which status call must be
688
- refreshed before retry.
689
-
690
- ## Cross-kernel normalization boundary
691
-
692
- The common contract ends where platform truth must remain different:
693
-
694
- - API names, promise/error behavior, admission, request bounds, and public
695
- operation events are normalized;
696
- - host availability, privilege model, installation/service mechanism, native
697
- artifact kind, and some diagnostic/result fields remain platform-specific;
698
- - unsupported platforms fail or return a documented unsupported state; they do
699
- not run an unrelated browser implementation as a substitute;
700
- - this SDK version admits a selected checkout and Core only after the current
701
- native plan's exact protocol, version, feature, capability, method, provider,
702
- and identity-bound receipt checks all pass;
703
- - that current-build admission does not promise that a future SDK will accept
704
- this Core or that this SDK will accept a future Core.
705
-
706
- ## Receipt and generation boundaries
707
-
708
- SDK runtime, app releases, import-map artifact/entry pairs, bundles, native
709
- plans, providers, and artifacts use identity-bound receipts. The import-map
710
- receipt binds each committed relative path, byte length, and SHA-256 in
711
- addition to its exact imports, entry count, exclusions, and cleanup state. A
712
- runtime or release receipt binds the exact location, filesystem identity,
713
- bytes/inventory hashes, policy, toolchain, platform/architecture, signer/trust
714
- result where applicable, and generation. Mutation invalidates the receipt
715
- before bytes or authority change.
716
-
717
- Process-local receipts do not authorize reuse across Shell, Core, providers, or
718
- other processes. Cross-process reuse requires an authenticated shared host or
719
- broker with retained handles and peer-process/generation binding.