arcane-os 0.3.0 → 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.
- package/CHANGELOG.md +27 -0
- package/README.md +86 -117
- package/bin/arcane-test.mjs +170 -46
- package/browser-runtime/ai/browser-speech-artifacts.mjs +887 -909
- package/browser-runtime/ai/browser-speech-providers.mjs +96 -152
- package/browser-runtime/ai/browser-wasm-llm-provider.mjs +627 -819
- package/browser-runtime/ai/browser-wasm.mjs +24 -35
- package/browser-runtime/ai/browser-wllama-runtime.mjs +64 -316
- package/browser-runtime/ai/model-controller.mjs +584 -181
- package/browser-runtime/ai/speech-worker-client.mjs +8 -146
- package/browser-runtime/ai/speech-worker-runtime.mjs +643 -363
- package/browser-runtime/dom-event-instrumentation.mjs +55 -147
- package/browser-runtime/event-manager.mjs +239 -624
- package/package.json +5 -6
- package/runtime/arcane/components/app-bar.html +3 -15
- package/runtime/arcane/components/assistant-panel.html +10 -10
- package/runtime/arcane/components/calculator.html +1 -1
- package/runtime/arcane/components/chat.html +1359 -135
- package/runtime/arcane/components/conversation-view.html +2 -2
- package/runtime/arcane/components/document-inspector.html +11 -17
- package/runtime/arcane/components/file-manager.html +13 -56
- package/runtime/arcane/components/markdown-document.html +82 -281
- package/runtime/arcane/components/markdown-editor.html +7 -10
- package/runtime/arcane/components/media-embed.html +6 -6
- package/runtime/arcane/components/screen-capture.html +4 -4
- package/runtime/arcane/components/source-explanation.html +2 -2
- package/runtime/arcane/components/speech.html +112 -68
- package/runtime/arcane/components/terminal-workspace.html +4 -4
- package/runtime/arcane/components/theme-editor.html +1 -1
- package/runtime/arcane/components/unified-inbox.html +2 -2
- package/runtime/arcane/components/voice-transcription.html +31 -21
- package/runtime/arcane/entities/Calculation.js +2 -3
- package/runtime/arcane/entities/Chat.js +228 -43
- package/runtime/arcane/entities/Preference.js +3 -5
- package/runtime/arcane/entities/Weather.js +5 -5
- package/runtime/arcane/modules/AI.js +1050 -427
- package/runtime/arcane/modules/AIProviderRuntime.js +658 -363
- package/runtime/arcane/modules/AIResponseLength.js +9 -19
- package/runtime/arcane/modules/AIRuntimeState.js +109 -72
- package/runtime/arcane/modules/ArcaneNavigationPolicy.js +45 -32
- package/runtime/arcane/modules/BrowserTestSuite.js +78 -122
- package/runtime/arcane/modules/CalculatorEngine.js +9 -9
- package/runtime/arcane/modules/CommunicationAppController.js +3 -7
- package/runtime/arcane/modules/ComponentContracts.js +30 -32
- package/runtime/arcane/modules/ConfiguredAIChatSession.js +281 -230
- package/runtime/arcane/modules/ConversationActionItems.js +26 -59
- package/runtime/arcane/modules/ConversationClosingReport.js +34 -61
- package/runtime/arcane/modules/ConversationTimebox.js +27 -15
- package/runtime/arcane/modules/DBOPFSDocumentLibrary.js +152 -344
- package/runtime/arcane/modules/DocumentLexicalSearch.js +25 -91
- package/runtime/arcane/modules/HTMLImport.js +54 -1
- package/runtime/arcane/modules/IsolatedModelQuestionRunner.js +40 -203
- package/runtime/arcane/modules/LocalAIReadiness.js +40 -60
- package/runtime/arcane/modules/LocalAIReadinessController.js +15 -13
- package/runtime/arcane/modules/MD.js +1 -45
- package/runtime/arcane/modules/Mail.js +51 -103
- package/runtime/arcane/modules/MailOutbox.mjs +95 -193
- package/runtime/arcane/modules/MailTransport.mjs +36 -57
- package/runtime/arcane/modules/ModelDefinition.js +22 -106
- package/runtime/arcane/modules/OpenMeteoWeatherProvider.js +39 -101
- package/runtime/arcane/modules/PersistentAIChatSession.js +281 -18
- package/runtime/arcane/modules/PreferenceStore.js +102 -30
- package/runtime/arcane/modules/RiskSignalAnalyzer.js +8 -9
- package/runtime/arcane/modules/ScopedOPFSCache.js +7 -42
- package/runtime/arcane/modules/ScreenCapture.js +175 -128
- package/runtime/arcane/modules/SpeechPlayback.js +46 -149
- package/runtime/arcane/modules/StaticDocumentCatalog.js +173 -407
- package/runtime/arcane/modules/ToolCallRouter.js +25 -12
- package/runtime/arcane/modules/YouTubeMedia.js +6 -5
- package/schemas/arcane-app-bundle.schema.json +13 -78
- package/schemas/arcane-app.schema.json +9 -25
- package/schemas/arcane-lock.schema.json +18 -151
- package/schemas/arcane-package.schema.json +2 -16
- package/schemas/native-build-plan.schema.json +119 -122
- package/src/app-descriptor.mjs +75 -132
- package/src/application-tests.mjs +200 -0
- package/src/cli/main.mjs +27 -46
- package/src/constants.mjs +3 -4
- package/src/dev-server.mjs +30 -324
- package/src/doctor.mjs +92 -154
- package/src/dom-event-instrumentation.mjs +55 -147
- package/src/errors.mjs +2 -3
- package/src/event-manager.mjs +239 -624
- package/src/event-queue.mjs +3 -3
- package/src/import-map.mjs +273 -1028
- package/src/index.mjs +14 -16
- package/src/installed-sdk-runtime.mjs +40 -62
- package/src/integrated-provider-loader.mjs +53 -382
- package/src/mail-api.mjs +0 -2
- package/src/mail-server.mjs +224 -580
- package/src/mail.mjs +4 -10
- package/src/native-plan.mjs +163 -598
- package/src/native-provider-loader.mjs +104 -1063
- package/src/packager/core.mjs +485 -3229
- package/src/process.mjs +5 -10
- package/src/release-bundle.mjs +292 -2405
- package/src/runtime.mjs +76 -396
- package/src/scaffold.mjs +30 -80
- package/src/sdk-browser-runtime.mjs +70 -626
- package/src/source-server.mjs +588 -0
- package/src/targets/index.mjs +78 -188
- package/src/templates/workspace-template.mjs +19 -135
- package/src/testing-loader.mjs +164 -0
- package/src/testing.mjs +1 -1
- package/src/toolchain.mjs +131 -544
- package/src/update-check.mjs +26 -64
- package/src/workspace-operation-lock.mjs +139 -430
- package/src/workspace-runtime.mjs +112 -779
- package/src/workspace.mjs +40 -302
- package/browser-runtime/ARCANE_SDK_BROWSER_RELEASE.json +0 -218
- package/browser-runtime/ai/ARCANE_AI_BROWSER_SPEECH_COMPONENTS.json +0 -203
- package/browser-runtime/ai/ARCANE_AI_BROWSER_WASM_COMPONENTS.json +0 -80
- package/browser-runtime/ai/internal/sha256.mjs +0 -166
- package/docs/architecture.md +0 -344
- package/docs/compatibility.md +0 -36
- package/docs/event-manager.md +0 -294
- package/docs/platform-targets.md +0 -108
- package/docs/publishing.md +0 -201
- package/docs/reference/README.md +0 -187
- package/docs/reference/ai/browser-speech-package-authority.json +0 -835
- package/docs/reference/ai/browser-speech.md +0 -1252
- package/docs/reference/ai/browser-wasm.md +0 -530
- package/docs/reference/arcane-ollama.md +0 -288
- package/docs/reference/availability-and-normalization.md +0 -183
- package/docs/reference/behavioral-testing.md +0 -133
- package/docs/reference/cli.md +0 -779
- package/docs/reference/core/README.md +0 -62
- package/docs/reference/core/arcane-ai-contracts.md +0 -907
- package/docs/reference/core/arcane-api.md +0 -601
- package/docs/reference/core/arcane-entities.md +0 -65
- package/docs/reference/core/arcane-events.md +0 -134
- package/docs/reference/core/ollama-module.md +0 -181
- package/docs/reference/core/reference/arcane-api/ai-and-ollama.md +0 -1909
- package/docs/reference/core/reference/arcane-api/applications-terminal-capabilities.md +0 -1057
- package/docs/reference/core/reference/arcane-api/core-and-events.md +0 -320
- package/docs/reference/core/reference/arcane-api/filesystem-storage-preferences-appearance.md +0 -610
- package/docs/reference/core/reference/arcane-api/namespaces.md +0 -1157
- package/docs/reference/core/reference/arcane-api/platform-installation-users-system.md +0 -1423
- package/docs/reference/core/reference/arcane-api/session-provisioning-diagnostics-development.md +0 -315
- package/docs/reference/event-manager.md +0 -1511
- package/docs/reference/inventory/package-api.json +0 -3284
- package/docs/reference/inventory/runtime-components.json +0 -1011
- package/docs/reference/inventory/runtime-entities.json +0 -26
- package/docs/reference/inventory/runtime-modules.json +0 -1431
- package/docs/reference/mail.md +0 -316
- package/docs/reference/protocols.md +0 -677
- package/docs/reference/runtime-components.md +0 -1366
- package/docs/reference/runtime-entities.md +0 -303
- package/docs/reference/runtime-modules.md +0 -2960
- package/docs/reference/sdk-api.md +0 -6694
- package/docs/roadmap.md +0 -79
- package/docs/work-amplification.md +0 -129
- package/runtime/ARCANE_RUNTIME_RELEASE.json +0 -826
package/docs/platform-targets.md
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
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 -> verify -> 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 binds an authenticated app release and
|
|
14
|
-
schema-2 descriptor, toolchain receipt, platform, architecture, format, signing
|
|
15
|
-
mode and identity, declared dependency releases, and destination. A paired
|
|
16
|
-
provider must verify the built artifact before build completion, and verify/run
|
|
17
|
-
reuse that exact artifact receipt.
|
|
18
|
-
|
|
19
|
-
Native targets are available by explicitly pairing the SDK with fixed provider
|
|
20
|
-
modules in a compatible Arcane OS checkout. Every native request also requires
|
|
21
|
-
the canonical app descriptor to declare the exact target selected on the
|
|
22
|
-
command line. The SDK package does not silently search for a toolchain, infer a
|
|
23
|
-
descriptor target, embed the Arcane machine bundle, or substitute browser
|
|
24
|
-
output. For example:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
# Choose one target when creating each app repository.
|
|
28
|
-
npx arcane-os@dev new my-app --path ./my-app --target portable --git
|
|
29
|
-
cd my-app
|
|
30
|
-
npm install
|
|
31
|
-
npm exec -- arcane native-doctor --target portable --arcane-root "../Arcane OS"
|
|
32
|
-
npm exec -- arcane build --target portable --arcane-root "../Arcane OS"
|
|
33
|
-
|
|
34
|
-
# In an app scaffolded with --target windows-x64:
|
|
35
|
-
npm exec -- arcane build --target windows-x64 --arcane-root "../Arcane OS"
|
|
36
|
-
npm exec -- arcane run --target windows-x64 --arcane-root "../Arcane OS"
|
|
37
|
-
|
|
38
|
-
# In an app scaffolded with --target linux-x64:
|
|
39
|
-
npm exec -- arcane build --target linux-x64 --arcane-root "../Arcane OS"
|
|
40
|
-
npm exec -- arcane run --target linux-x64 --arcane-root "../Arcane OS"
|
|
41
|
-
|
|
42
|
-
# In an app scaffolded with --target linux-arm64, on native ARM64 Linux:
|
|
43
|
-
npm exec -- arcane native-doctor --target linux-arm64 --arcane-root "../Arcane OS" --format deb --signing unsigned-local-test
|
|
44
|
-
npm exec -- arcane build --target linux-arm64 --arcane-root "../Arcane OS" --format deb --signing unsigned-local-test
|
|
45
|
-
npm exec -- arcane run --target linux-arm64 --arcane-root "../Arcane OS" --format deb --signing unsigned-local-test
|
|
46
|
-
|
|
47
|
-
# In an app scaffolded with --target android-arm64. The run command requires
|
|
48
|
-
# one connected physical Android device with native ARM64 support:
|
|
49
|
-
npm exec -- arcane native-doctor --target android-arm64 --arcane-root "../Arcane OS" --format apk --signing development
|
|
50
|
-
npm exec -- arcane build --target android-arm64 --arcane-root "../Arcane OS" --format apk --signing development
|
|
51
|
-
npm exec -- arcane run --target android-arm64 --arcane-root "../Arcane OS" --format apk --signing development
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Every native scaffold also declares the browser target, so one repository can
|
|
55
|
-
use the normal browser development loop and its one selected native build. It
|
|
56
|
-
includes the raster icon required by current Arcane native admission. Use the
|
|
57
|
-
matching scaffold target (`portable`, `windows-x64`, `linux-x64`, `linux-arm64`,
|
|
58
|
-
or `android-arm64`) before running the corresponding command.
|
|
59
|
-
|
|
60
|
-
`native-prepare` remains a standalone integrity diagnostic. A receipt cannot be
|
|
61
|
-
carried through a later CLI process, so the normal build recipe omits it and
|
|
62
|
-
lets `build` prepare and reuse one exact toolchain state.
|
|
63
|
-
|
|
64
|
-
The portable output is a verified app-scoped Arcane Core directory. It is an explicit
|
|
65
|
-
portable builder payload, not an executable, and it has no direct run operation.
|
|
66
|
-
The external workspace defaults to `build/portable/`; integrated Arcane work
|
|
67
|
-
must use the same canonical checkout for `--workspace` and `--arcane-root`, and
|
|
68
|
-
must name an `--output-root` outside that checkout.
|
|
69
|
-
|
|
70
|
-
Compatibility uses the highest minimum Core version declared by the SDK runtime,
|
|
71
|
-
selected app, and bundled app dependencies, plus each app's Arcane protocol and
|
|
72
|
-
required features, capabilities, and methods. Newer Core versions are accepted
|
|
73
|
-
when those contracts remain available. See [compatibility.md](compatibility.md)
|
|
74
|
-
for the complete admission and breaking-change rule.
|
|
75
|
-
|
|
76
|
-
| Target | Formats | Development status |
|
|
77
|
-
|---|---|---|
|
|
78
|
-
| `browser` | `directory` | Available |
|
|
79
|
-
| `portable` | `portable` directory | Available with explicit `--arcane-root`; verified, not executable |
|
|
80
|
-
| `windows-x64` | `exe` bundle | Available with explicit `--arcane-root`; unsigned local development only |
|
|
81
|
-
| `linux-x64` | `deb` | Available with explicit `--arcane-root`; unsigned local development only |
|
|
82
|
-
| `linux-arm64` | `deb` | Available with explicit `--arcane-root` on a compatible native ARM64 toolchain; unsigned local development only |
|
|
83
|
-
| `android-arm64` | `apk` | Available with explicit `--arcane-root`; development-signed, architecture-neutral, and physical/native ARM64 for run |
|
|
84
|
-
|
|
85
|
-
Every native target accepts one verified app release and its exact bundled
|
|
86
|
-
dependency closure through the provider boundary. The providers retain the
|
|
87
|
-
toolchain and artifact authority required for same-process verification and,
|
|
88
|
-
where supported, launch; app source and workspace paths are not supplied to the
|
|
89
|
-
provider. Linux run extracts to a user-owned development tree without package
|
|
90
|
-
installation or elevation.
|
|
91
|
-
|
|
92
|
-
Linux ARM64 uses the implemented Linux provider and is available only with a
|
|
93
|
-
compatible native ARM64 toolchain. The target-scoped workflow at Arcane revision
|
|
94
|
-
`4382043c09285ea203aa6daba1732660966ac409` built and retained-verified a native
|
|
95
|
-
ARM64 DEB, proved AArch64 host/Core/bridge identities, reached WebKit readiness,
|
|
96
|
-
and drained the owned process group. It loaded Ubuntu's packaged Bubblewrap
|
|
97
|
-
AppArmor profile while leaving the global user-namespace restriction enabled.
|
|
98
|
-
Android produces one development-signed APK with no native library or
|
|
99
|
-
ABI-specific payload. The APK is therefore architecture-neutral, while
|
|
100
|
-
`arcane run --target android-arm64` deliberately requires a physical device
|
|
101
|
-
with native ARM64 support. The hardened path has exact-SHA physical ARM64/API 37
|
|
102
|
-
build, readiness, cancellation, uninstall, and absence evidence. Both records
|
|
103
|
-
are development evidence, not production readiness.
|
|
104
|
-
|
|
105
|
-
Android AAB output, release signing, store publishing, and update continuity are
|
|
106
|
-
deferred. Windows and Linux production signing, installation, and update
|
|
107
|
-
acceptance also remain separate promotion work. The SDK never copies
|
|
108
|
-
proprietary application source into the Arcane checkout to bypass the boundary.
|
package/docs/publishing.md
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
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
|
-
`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
|
|
28
|
-
`npm exec --offline -- arcane`, and runs one small capability contract through
|
|
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.
|
|
35
|
-
|
|
36
|
-
`publish-dev.yml` can run only when manually dispatched from `main` in
|
|
37
|
-
`TheWizardNexus/arcane-os-sdk`. Dispatch requires an authorized npm content
|
|
38
|
-
classification. `unresolved` fails closed. `standard` permits the workflow's
|
|
39
|
-
direct trusted-publishing path only when the package has no conflicting
|
|
40
|
-
dual-use declaration. `dual-use` fails closed until the package includes npm's
|
|
41
|
-
persistent `contentPolicy.class=dual-use` metadata and root `DISCLOSURE`, and
|
|
42
|
-
the workflow is deliberately changed to `npm stage publish` plus human 2FA
|
|
43
|
-
promotion. Direct trusted publishing is not permitted for that class.
|
|
44
|
-
|
|
45
|
-
For the standard path, the workflow authenticates a successful `Check` push
|
|
46
|
-
run for that exact `main` SHA, downloads its immutable package artifact,
|
|
47
|
-
reverifies the manifest and bytes, derives `dev` or `latest` from the strict
|
|
48
|
-
version, and publishes the downloaded `.tgz`. It
|
|
49
|
-
never invokes `npm pack` or `npm publish .` under publication authority. A
|
|
50
|
-
repository-wide concurrency group prevents simultaneous publication jobs;
|
|
51
|
-
GitHub may replace an older pending dispatch, and each surviving dispatch is
|
|
52
|
-
safe to rerun. Preflight rejects byte mismatches, tag rollback, malformed
|
|
53
|
-
registry state, or any dist-tag other than `dev` and `latest`; an
|
|
54
|
-
already-published matching version is an idempotent success. The historical
|
|
55
|
-
first-version state where both tags identify `0.1.0-dev.5` is accepted only
|
|
56
|
-
with its recorded integrity and shasum and only while no stable version exists.
|
|
57
|
-
Post-publication verification preserves the other channel, checks integrity
|
|
58
|
-
and shasum, and validates trusted-publisher provenance. It tolerates npm's
|
|
59
|
-
publish-time scanning for up to 15 minutes. If
|
|
60
|
-
scanning or manual review remains pending, the workflow reports that state and
|
|
61
|
-
a rerun safely resumes verification without republishing immutable bytes.
|
|
62
|
-
|
|
63
|
-
The unscoped package installs both `arcane` and `arcane-os`. The short command
|
|
64
|
-
is the documented default; `arcane-os` is the collision-safe fallback. npm
|
|
65
|
-
package names are unique, but executable names are not globally reserved.
|
|
66
|
-
|
|
67
|
-
When `npm view arcane-os@dev version` reports the package unavailable, run
|
|
68
|
-
`npm run pack:local` in this SDK checkout for local development, scaffold with
|
|
69
|
-
`node ./bin/arcane.mjs new ...`, and install the resulting `.tgz` into the app
|
|
70
|
-
with `npm install --save-dev --save-exact <path>`. Keep the tarball at the path
|
|
71
|
-
recorded by `package-lock.json`; subsequent `npm ci` verifies its recorded npm
|
|
72
|
-
integrity. Arcane separately requires the installed package to identify exactly
|
|
73
|
-
as `arcane-os@0.1.0-dev.5` and verifies the locked runtime. A local directory
|
|
74
|
-
`file:` install is intentionally unsupported because it may be linked.
|
|
75
|
-
|
|
76
|
-
The first-version bootstrap established these permanent audit boundaries:
|
|
77
|
-
|
|
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.
|
|
81
|
-
2. Review the uploaded tarball inventory, manifest, checksum, and license
|
|
82
|
-
notices. Ensure the Arcane OS monorepo package is private so it cannot publish
|
|
83
|
-
the same npm name accidentally.
|
|
84
|
-
3. Make and record the npm content-policy decision before packing the bootstrap
|
|
85
|
-
bytes. A `standard` decision permits direct OIDC after bootstrap. A
|
|
86
|
-
`dual-use` decision requires `contentPolicy.class=dual-use`, a root
|
|
87
|
-
`DISCLOSURE` in the tarball, and staged publication with human 2FA promotion;
|
|
88
|
-
npm treats that declaration as persistent across versions.
|
|
89
|
-
4. Because npm requires a package to exist before trusted or staged publishing
|
|
90
|
-
can be configured, an authorized npm maintainer must download that exact
|
|
91
|
-
green Actions artifact and publish its `.tgz` once under `dev` through an
|
|
92
|
-
interactive session with 2FA. That method is permitted for either content
|
|
93
|
-
class; the dual-use metadata and disclosure must already be inside the exact
|
|
94
|
-
tarball. Do not rebuild or repack it for this bootstrap. After the package
|
|
95
|
-
exists, standard releases may publish directly through OIDC, while dual-use
|
|
96
|
-
releases must use `npm stage publish` and human 2FA promotion.
|
|
97
|
-
5. Verify the registry's `dist.integrity` and shasum. npm's required bootstrap
|
|
98
|
-
state has both `dev` and `latest` at the immutable `0.1.0-dev.5` bytes
|
|
99
|
-
until the first stable publish moves only `latest`. The sole trusted
|
|
100
|
-
publisher is the exact `publish-dev.yml` workflow and `npm` environment.
|
|
101
|
-
6. Later standard development versions may use the workflow's direct OIDC
|
|
102
|
-
authority. A dual-use version must be staged and promoted with human 2FA.
|
|
103
|
-
Any missing policy decision, package bootstrap, environment, publisher
|
|
104
|
-
binding, or exact-SHA artifact is a publication blocker rather than a reason
|
|
105
|
-
to fall back to a token or repack.
|
|
106
|
-
|
|
107
|
-
Generated app CI uses `npm ci --ignore-scripts`, so its lock must exist and its
|
|
108
|
-
dependency source must be reachable by the runner. A sibling local tarball is a
|
|
109
|
-
workstation workflow, not a portable GitHub dependency source; switch to the
|
|
110
|
-
exact registry release (or deliberately vendor the tarball) before remote CI.
|
|
111
|
-
|
|
112
|
-
## Reusable application release workflow
|
|
113
|
-
|
|
114
|
-
External app repositories can call `.github/workflows/release-app.yml` by an
|
|
115
|
-
immutable SDK repository revision. The reusable workflow checks out the exact
|
|
116
|
-
caller SHA, installs only the caller's committed dependency lock, requires
|
|
117
|
-
`arcane-os@0.1.0-dev.5`, and checks, packages, bundles, independently verifies,
|
|
118
|
-
and uploads one explicitly selected app. Every third-party action reference is
|
|
119
|
-
pinned to a full commit SHA. The workflow never publishes npm, creates a GitHub
|
|
120
|
-
Release, loops across apps, or changes Arcane admission state.
|
|
121
|
-
|
|
122
|
-
The build job holds only `contents: read`; its caller-owned checks, package
|
|
123
|
-
scripts, and adapters never receive `id-token: write` or `attestations: write`.
|
|
124
|
-
It uploads the exact bundle together with canonical metadata. A fresh
|
|
125
|
-
caller-code-free job downloads that upload by immutable artifact id, checks out
|
|
126
|
-
the called workflow's exact SDK revision, directly imports its verifier under
|
|
127
|
-
supported Node 24, binds the receipt app id to the requested app, and exposes
|
|
128
|
-
the independently reverified artifact, descriptor, and release identities as
|
|
129
|
-
the reusable workflow outputs. This post-upload boundary prevents a background
|
|
130
|
-
caller process from making the published outputs describe pre-upload bytes.
|
|
131
|
-
|
|
132
|
-
GitHub artifact attestation is an explicit `attest: true` input and is false by
|
|
133
|
-
default because availability for private repositories depends on the caller's
|
|
134
|
-
GitHub plan. A caller that requests an unsupported attestation fails instead of
|
|
135
|
-
silently producing weaker provenance. GitHub does not let a called workflow
|
|
136
|
-
raise the caller job's permission ceiling. An attesting caller must therefore
|
|
137
|
-
grant these permissions on the reusable-workflow job itself (prefer this
|
|
138
|
-
job-scoped grant over workflow-wide authority):
|
|
139
|
-
|
|
140
|
-
```yaml
|
|
141
|
-
jobs:
|
|
142
|
-
release-app:
|
|
143
|
-
permissions:
|
|
144
|
-
contents: read
|
|
145
|
-
id-token: write
|
|
146
|
-
attestations: write
|
|
147
|
-
uses: TheWizardNexus/arcane-os-sdk/.github/workflows/release-app.yml@<FULL_40_CHARACTER_COMMIT_SHA>
|
|
148
|
-
with:
|
|
149
|
-
app-id: example-app
|
|
150
|
-
attest: true
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Without that caller grant, `attest: true` fails even when the repository plan
|
|
154
|
-
supports artifact attestations. When requested, a fresh privileged job
|
|
155
|
-
depends on the successful post-upload verifier, downloads the same immutable
|
|
156
|
-
artifact id with the pinned `actions/download-artifact` revision, checks out only
|
|
157
|
-
`job.workflow_repository` at `job.workflow_sha`, selects supported Node 24 via
|
|
158
|
-
the pinned `actions/setup-node` revision, and directly imports the
|
|
159
|
-
dependency-free verifier from those trusted SDK source bytes. It rechecks the
|
|
160
|
-
app id, bundle structure, digest, byte length, complete
|
|
161
|
-
canonical metadata, and every post-upload workflow output. No package manager,
|
|
162
|
-
dependency resolution, caller checkout, or caller-owned code runs while that job
|
|
163
|
-
holds OIDC and attestation permissions. Whether attested or not, the upload is a
|
|
164
|
-
build output.
|
|
165
|
-
Arcane must verify an approved provenance or independent signature and an
|
|
166
|
-
Arcane-owned authorization-lock entry before installation; the archive's
|
|
167
|
-
internal checksums alone do not grant authority.
|
|
168
|
-
|
|
169
|
-
Stable versioning, the npm `latest` tag, and an official GitHub release remain a
|
|
170
|
-
separate explicit release decision. Current `main` development does not
|
|
171
|
-
silently convert a `-dev` package into an official release. A stable release
|
|
172
|
-
must publish the same source-validated and platform-smoked `.tgz` under
|
|
173
|
-
`latest`; only after registry
|
|
174
|
-
integrity matches may GitHub attach that `.tgz`, manifest, and checksum. Its Git
|
|
175
|
-
tag and GitHub release title must both be the same bare numeric
|
|
176
|
-
`MAJOR.MINOR.PATCH`. Prerelease versions do not get a misleading numeric
|
|
177
|
-
GitHub release, and no release creates a Git branch for an npm dist-tag.
|
|
178
|
-
|
|
179
|
-
## Documentation publication
|
|
180
|
-
|
|
181
|
-
GitHub Pages publishes the static `site/` tree from the newest successful
|
|
182
|
-
`main` push `Check`. A completed Check triggers the Pages job, which resolves
|
|
183
|
-
the newest successful receipt at deployment time so out-of-order completion
|
|
184
|
-
cannot roll the site backward. It checks out that authenticated SHA without
|
|
185
|
-
persistent credentials, validates the static tree, and uploads only `site/`.
|
|
186
|
-
It does not rerun the SDK test suite or execute repository build code.
|
|
187
|
-
|
|
188
|
-
The deployment job holds only the read, Pages, and OIDC permissions required by
|
|
189
|
-
that single checked artifact. The `github-pages` environment remains the final
|
|
190
|
-
deployment authority. Documentation channels are post-registry presentation
|
|
191
|
-
work and do not change the canonical source branch.
|
|
192
|
-
|
|
193
|
-
## Work-amplification record
|
|
194
|
-
|
|
195
|
-
The release graph is one checked `main` SHA and one npm release candidate. One
|
|
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.
|
|
199
|
-
OIDC publication reuses that successful exact-SHA artifact without rebuilding.
|
|
200
|
-
Platform matrices, full product regressions, Pages, and broader presentation
|
|
201
|
-
work remain outside registry publication and run separately when warranted.
|
package/docs/reference/README.md
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
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
|
-
## Reference map
|
|
16
|
-
|
|
17
|
-
| Need | Start here |
|
|
18
|
-
| --- | --- |
|
|
19
|
-
| Use the Node.js package API | [SDK JavaScript API](sdk-api.md) |
|
|
20
|
-
| Publish central events, capture bounded time-travel history, or observe the DOM | [EventManager and event-stack reference](event-manager.md) |
|
|
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) |
|
|
23
|
-
| Choose browser, native, cloud, or cross-host behavior | [Availability and normalization](availability-and-normalization.md) |
|
|
24
|
-
| Import a shipped renderer module | [Runtime module catalog](runtime-modules.md) |
|
|
25
|
-
| Use a shared entity | [Runtime entity modules](runtime-entities.md) and [exact export contracts](core/arcane-entities.md) |
|
|
26
|
-
| Load a reusable HTML component | [Runtime component catalog](runtime-components.md) |
|
|
27
|
-
| Call `globalThis.Arcane` | [Arcane Core API](core/arcane-api.md) |
|
|
28
|
-
| Subscribe to native events | [Arcane event reference](core/arcane-events.md) |
|
|
29
|
-
| Use provider-neutral AI lifecycle, chat, speech, persistence, or document context | [Normalized AI](#normalized-ai) |
|
|
30
|
-
| Run a caller-authenticated local LLM in the browser | [Browser-WASM local AI](ai/browser-wasm.md) |
|
|
31
|
-
| Run caller-authenticated Whisper or Kokoro in the browser | [Browser speech providers](ai/browser-speech.md) |
|
|
32
|
-
| Use Arcane Ollama | [Arcane Ollama guide](arcane-ollama.md) |
|
|
33
|
-
| Understand transports and protocol switching | [Protocol and host architecture](protocols.md) |
|
|
34
|
-
| Run contract and behavior tests | [Behavioral testing](behavioral-testing.md) |
|
|
35
|
-
|
|
36
|
-
## Version scope and provenance
|
|
37
|
-
|
|
38
|
-
This repository contains explicitly versioned surfaces with different owners:
|
|
39
|
-
|
|
40
|
-
| Surface | Source identity | Meaning |
|
|
41
|
-
| --- | --- | --- |
|
|
42
|
-
| SDK and CLI | `arcane-os` `0.3.0` | The Node.js toolchain plus the browser-only `arcane-os/ai/browser-wasm`, `arcane-os/ai/browser-speech`, and portable `arcane-os/mail` entrypoints in this checkout. |
|
|
43
|
-
| Browser runtime | `runtime/ARCANE_RUNTIME_RELEASE.json`, SDK `0.3.0`, protocol `arcane/1` | The SDK-canonical dynamic runtime inventory shipped under `runtime/`; the receipt binds its exact paths, bytes, inventory, and digest. |
|
|
44
|
-
| Browser SDK runtime | `browser-runtime/ARCANE_SDK_BROWSER_RELEASE.json`, SDK `0.3.0` | The dynamically derived browser closure for events, Wllama, and Browser Speech mechanisms. It contains no speech runtime, model, voice, third-party legal/notice, or corresponding-source payloads. |
|
|
45
|
-
| 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. |
|
|
46
|
-
|
|
47
|
-
The SDK runtime receipt and Core reference are distinct evidence and have
|
|
48
|
-
different current authorities. A browser module's bytes come from the SDK
|
|
49
|
-
runtime receipt. A native build selects one
|
|
50
|
-
explicit Arcane OS checkout and Core. This SDK version accepts that selection
|
|
51
|
-
only after its current native plan checks the exact declared protocol, version,
|
|
52
|
-
features, capabilities, methods, provider contract, and identity-bound
|
|
53
|
-
receipts. That current-build admission does not promise that a future SDK will
|
|
54
|
-
accept this Core or that this SDK will accept a future Core. A matching protocol
|
|
55
|
-
name or higher version alone is not compatibility or authority.
|
|
56
|
-
|
|
57
|
-
See [Core reference provenance](core/README.md) for the imported inventory and
|
|
58
|
-
the exact distinction between a documentation snapshot and shipped runtime
|
|
59
|
-
bytes.
|
|
60
|
-
|
|
61
|
-
## Published 0.2.3
|
|
62
|
-
|
|
63
|
-
The most recently verified published package before this 0.3.0 source candidate
|
|
64
|
-
is exactly `arcane-os@0.2.3` from source commit
|
|
65
|
-
`d717f21d45664d20e4ed6377596db87c47492e11`. The npm `latest` dist-tag resolves
|
|
66
|
-
to `0.2.3`; the separate `dev` dist-tag remains `0.1.0-dev.5`.
|
|
67
|
-
|
|
68
|
-
The singleton-event, Mail, warn-first Browser Speech, and mixed-route contracts
|
|
69
|
-
documented below are newer canonical source. They are not package authority in
|
|
70
|
-
`0.2.3`; consumers require the numeric 0.3.0 publication before relying on them.
|
|
71
|
-
|
|
72
|
-
| Evidence | Exact value |
|
|
73
|
-
| --- | --- |
|
|
74
|
-
| npm integrity | `sha512-TZewkGM7dh9PdVnOtnkBO7QalJ6qyWWdKruCmsTxoHyeoG5XpqVbkNgiJhtBLhrIzgUV3vydYplxZQkIbIWoHg==` |
|
|
75
|
-
| npm shasum | `8e978a23289a41db130253e6475a0c8bb0c0d73f` |
|
|
76
|
-
| Immutable release tarball | `arcane-os-0.2.3.tgz`; 6,999,078 bytes; SHA-256 `857f179c2f9d4549e7691b4e6cebc49e5ab5e18600816443b26319c61fc1f85d` |
|
|
77
|
-
| GitHub release | [`0.2.3`](https://github.com/TheWizardNexus/arcane-os-sdk/releases/tag/0.2.3) (tag and title are both exactly `0.2.3`) |
|
|
78
|
-
| Hosted source/artifact gate | [Check run 33052271534](https://github.com/TheWizardNexus/arcane-os-sdk/actions/runs/33052271534) |
|
|
79
|
-
| Trusted publication | [Run 33052383457](https://github.com/TheWizardNexus/arcane-os-sdk/actions/runs/33052383457) |
|
|
80
|
-
|
|
81
|
-
The npm SLSA provenance binds the published package to that exact source commit
|
|
82
|
-
and `.github/workflows/publish-dev.yml`. Hashes prove byte identity or
|
|
83
|
-
consistency; provenance establishes the recorded source/workflow relationship.
|
|
84
|
-
Neither claim alone proves browser hardware support, native admission, or a
|
|
85
|
-
particular application's provider/model policy.
|
|
86
|
-
|
|
87
|
-
## MDN-style page contract
|
|
88
|
-
|
|
89
|
-
Public reference entries follow the established Arcane documentation model:
|
|
90
|
-
|
|
91
|
-
- one canonical, mechanically readable inventory owns each public name;
|
|
92
|
-
- every public member or module has one guide entry headed by its exact name;
|
|
93
|
-
- each guide leads with an overview and the shortest safe working example;
|
|
94
|
-
- parameters, return values, errors, side effects, cancellation, and events are
|
|
95
|
-
stated when they apply;
|
|
96
|
-
- availability is summarized near the call, while transport mechanics are
|
|
97
|
-
folded into or deep-linked from the entry;
|
|
98
|
-
- normalized results are distinguished from provider- or platform-native
|
|
99
|
-
envelopes;
|
|
100
|
-
- examples do not trigger destructive, privileged, expensive, or external
|
|
101
|
-
actions merely by being copied.
|
|
102
|
-
|
|
103
|
-
## Public runtime inventory
|
|
104
|
-
|
|
105
|
-
The package exposes 200 semantic JavaScript records across 14 JavaScript
|
|
106
|
-
entrypoints, plus eight JSON Schemas, its exact runtime manifest, and package
|
|
107
|
-
metadata. Ten entrypoints are Node.js control-plane surfaces,
|
|
108
|
-
`arcane-os/event-manager` and `arcane-os/mail` run in Node and browsers, and
|
|
109
|
-
`arcane-os/ai/browser-wasm` plus `arcane-os/ai/browser-speech` are browser-only.
|
|
110
|
-
The [machine-readable package
|
|
111
|
-
inventory](inventory/package-api.json) and [SDK member reference](sdk-api.md)
|
|
112
|
-
are checked bidirectionally against every declared JavaScript export.
|
|
113
|
-
|
|
114
|
-
The seven update-check records are explicit on-demand checks; they do not poll,
|
|
115
|
-
download, install, or self-update.
|
|
116
|
-
|
|
117
|
-
The synchronized browser payload exposes:
|
|
118
|
-
|
|
119
|
-
- 84 JavaScript module artifacts under `runtime/arcane/modules/`, including
|
|
120
|
-
ESM modules, classic vendor globals, one worker protocol, and one Node-oriented
|
|
121
|
-
mail transport;
|
|
122
|
-
- 15 shared entity modules under `runtime/arcane/entities/`;
|
|
123
|
-
- 39 reusable HTML-import components under `runtime/arcane/components/`;
|
|
124
|
-
- seven shared CSS artifacts, security policy, images, and the vendored
|
|
125
|
-
`strong-type` dependency.
|
|
126
|
-
|
|
127
|
-
The module and component catalogs enumerate every shipped artifact, including
|
|
128
|
-
vendor support files that are not ESM imports. The runtime manifest remains the
|
|
129
|
-
byte-level source of truth; the catalogs explain what those bytes let a
|
|
130
|
-
developer do.
|
|
131
|
-
|
|
132
|
-
## Normalized AI
|
|
133
|
-
|
|
134
|
-
Portable applications start with the provider-neutral runtime rather than an
|
|
135
|
-
Ollama, Wllama, Whisper, Kokoro, native, or cloud transport:
|
|
136
|
-
|
|
137
|
-
| Need | Public surface | Availability |
|
|
138
|
-
| --- | --- | --- |
|
|
139
|
-
| 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. |
|
|
140
|
-
| Observe sticky role state and startup settlement | [`AIRuntimeState.js`](runtime-modules.md#airuntimestatejs) | Cross-host EventTarget state; observation grants no authority. |
|
|
141
|
-
| 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. |
|
|
142
|
-
| Use Core-normalized chat | [`globalThis.Arcane.ai`](core/arcane-ai-contracts.md) | Native/Core only when separately admitted. |
|
|
143
|
-
| Run a caller-selected GGUF LLM locally | [`arcane-os/ai/browser-wasm`](ai/browser-wasm.md) | Browser secure context with WebGPU/full-offload evidence, WebAssembly, and OPFS/DBOPFS. |
|
|
144
|
-
| Run caller-selected Whisper/Kokoro locally | [`arcane-os/ai/browser-speech`](ai/browser-speech.md) | Browser with DBOPFS, Web Locks, Workers, and caller-supplied immutable runtime/model bytes. |
|
|
145
|
-
| Add bounded persistent history and memory | [`PersistentAIChatSession.js`](runtime-modules.md#persistentaichatsessionjs) | Browser/native WebView runtime with ChatEntity/DBOPFS and a configured chat function. |
|
|
146
|
-
| 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. |
|
|
147
|
-
|
|
148
|
-
There is no automatic local-to-cloud, browser-to-Core, provider-to-provider, or
|
|
149
|
-
storage fallback. Tool calls remain structural data until application-owned
|
|
150
|
-
policy and code decide whether to execute them. App prompts, model defaults,
|
|
151
|
-
profiles, tools, business policy, and private data remain app-owned.
|
|
152
|
-
|
|
153
|
-
An explicitly selected but unloaded model is not “ready.” `chat.html` keeps
|
|
154
|
-
Send disabled and exposes a visible keyboard-operable LLM Start/Try again or
|
|
155
|
-
Cancel loading control. `speech.html` and `voice-transcription.html` keep their
|
|
156
|
-
recording operations unavailable and share the equivalent Start
|
|
157
|
-
transcription/Try again/Cancel loading control for STT. Applications can
|
|
158
|
-
override `requestAIActivation(intent)` or `requestSTTActivation(intent)`, or
|
|
159
|
-
cancel the corresponding activation-request event. Imports and state
|
|
160
|
-
observation emit no lifecycle intent, and default
|
|
161
|
-
`startTranscription=false` does not request an STT startup load or begin an
|
|
162
|
-
automatic model download. It does not unload a role started independently.
|
|
163
|
-
Compatibility availability never creates ready STT/TTS state without an
|
|
164
|
-
admitted, loaded provider. Shared STT cancel/destroy propagates an owned signal,
|
|
165
|
-
and TTS Mute/Unmute updates the shared lifecycle owner. The selected TTS
|
|
166
|
-
provider/model catalog owns its default voice; a saved OpenAI voice is not
|
|
167
|
-
forwarded to another provider route.
|
|
168
|
-
|
|
169
|
-
## Authority and feature detection
|
|
170
|
-
|
|
171
|
-
The presence of a JavaScript function is not permission to use it. Native
|
|
172
|
-
applications should inspect `Arcane.capabilities.list()` where available and
|
|
173
|
-
then call the relevant status method. Android callers with `system.read` obtain
|
|
174
|
-
the nested capability snapshot through `Arcane.platform.status()`.
|
|
175
|
-
|
|
176
|
-
Do not infer local-AI readiness from `Arcane.runtime.current().managedLocalAI`,
|
|
177
|
-
infer authorization from a transport name, or treat an Ollama model inventory
|
|
178
|
-
as package admission. Each method rechecks native policy at invocation time.
|
|
179
|
-
|
|
180
|
-
## Source, receipts, and licensing
|
|
181
|
-
|
|
182
|
-
- [Exact SDK runtime release manifest](../../runtime/ARCANE_RUNTIME_RELEASE.json)
|
|
183
|
-
- [SDK runtime authority record](../../tools/runtime-source.json)
|
|
184
|
-
- [Exact browser AI runtime receipt](../../browser-runtime/ARCANE_SDK_BROWSER_RELEASE.json)
|
|
185
|
-
- [AGPL license](../../LICENSE)
|
|
186
|
-
- [Commercial-license notice](../../COMMERCIAL-LICENSE.md)
|
|
187
|
-
- [Third-party and distribution notice](../../NOTICE)
|