arcane-os 0.1.0-dev.5
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 +154 -0
- package/COMMERCIAL-LICENSE.md +13 -0
- package/LICENSE +661 -0
- package/NOTICE +70 -0
- package/README.md +448 -0
- package/bin/arcane-test.mjs +741 -0
- package/bin/arcane.mjs +5 -0
- package/docs/architecture.md +234 -0
- package/docs/compatibility.md +36 -0
- package/docs/event-manager.md +166 -0
- package/docs/platform-targets.md +108 -0
- package/docs/publishing.md +203 -0
- package/docs/reference/README.md +117 -0
- package/docs/reference/arcane-ollama.md +288 -0
- package/docs/reference/availability-and-normalization.md +123 -0
- package/docs/reference/behavioral-testing.md +86 -0
- package/docs/reference/cli.md +569 -0
- package/docs/reference/core/README.md +62 -0
- package/docs/reference/core/arcane-ai-contracts.md +873 -0
- package/docs/reference/core/arcane-api.md +601 -0
- package/docs/reference/core/arcane-entities.md +65 -0
- package/docs/reference/core/arcane-events.md +134 -0
- package/docs/reference/core/ollama-module.md +181 -0
- package/docs/reference/core/reference/arcane-api/ai-and-ollama.md +1909 -0
- package/docs/reference/core/reference/arcane-api/applications-terminal-capabilities.md +1057 -0
- package/docs/reference/core/reference/arcane-api/core-and-events.md +320 -0
- package/docs/reference/core/reference/arcane-api/filesystem-storage-preferences-appearance.md +610 -0
- package/docs/reference/core/reference/arcane-api/namespaces.md +1157 -0
- package/docs/reference/core/reference/arcane-api/platform-installation-users-system.md +1423 -0
- package/docs/reference/core/reference/arcane-api/session-provisioning-diagnostics-development.md +315 -0
- package/docs/reference/event-manager.md +957 -0
- package/docs/reference/inventory/package-api.json +2632 -0
- package/docs/reference/inventory/runtime-components.json +934 -0
- package/docs/reference/inventory/runtime-entities.json +26 -0
- package/docs/reference/inventory/runtime-modules.json +1249 -0
- package/docs/reference/protocols.md +242 -0
- package/docs/reference/runtime-components.md +1098 -0
- package/docs/reference/runtime-entities.md +303 -0
- package/docs/reference/runtime-modules.md +2010 -0
- package/docs/reference/sdk-api.md +4901 -0
- package/docs/roadmap.md +79 -0
- package/docs/work-amplification.md +124 -0
- package/node_modules/event-pubsub/CHANGELOG.md +55 -0
- package/node_modules/event-pubsub/MIGRATION.md +70 -0
- package/node_modules/event-pubsub/README.md +363 -0
- package/node_modules/event-pubsub/SECURITY.md +37 -0
- package/node_modules/event-pubsub/index.js +141 -0
- package/node_modules/event-pubsub/licence +21 -0
- package/node_modules/event-pubsub/package.json +59 -0
- package/node_modules/strong-type/README.md +408 -0
- package/node_modules/strong-type/assets/strong-type-header.png +0 -0
- package/node_modules/strong-type/index.js +1151 -0
- package/node_modules/strong-type/licence +21 -0
- package/node_modules/strong-type/node.js +125 -0
- package/node_modules/strong-type/package.json +61 -0
- package/package.json +95 -0
- package/runtime/ARCANE_RUNTIME_RELEASE.json +791 -0
- package/runtime/arcane/components/app-bar.html +468 -0
- package/runtime/arcane/components/assistant-panel.html +715 -0
- package/runtime/arcane/components/calculator.html +8 -0
- package/runtime/arcane/components/chart.html +655 -0
- package/runtime/arcane/components/chat.html +1225 -0
- package/runtime/arcane/components/conversation-view.html +13 -0
- package/runtime/arcane/components/dashboard-config.html +341 -0
- package/runtime/arcane/components/data-maintenance.html +112 -0
- package/runtime/arcane/components/data-view.html +92 -0
- package/runtime/arcane/components/directory-picker.html +197 -0
- package/runtime/arcane/components/document-inspector.html +252 -0
- package/runtime/arcane/components/file-drop.html +264 -0
- package/runtime/arcane/components/file-inspector.html +293 -0
- package/runtime/arcane/components/file-manager.html +1715 -0
- package/runtime/arcane/components/header.html +142 -0
- package/runtime/arcane/components/integration-settings.html +14 -0
- package/runtime/arcane/components/local-ai-status.html +360 -0
- package/runtime/arcane/components/markdown-document.html +1048 -0
- package/runtime/arcane/components/markdown-editor.html +360 -0
- package/runtime/arcane/components/media-embed.html +8 -0
- package/runtime/arcane/components/modal.html +402 -0
- package/runtime/arcane/components/output-panel.html +259 -0
- package/runtime/arcane/components/preferences-form.html +135 -0
- package/runtime/arcane/components/record-timeline.html +105 -0
- package/runtime/arcane/components/relationship-board.html +116 -0
- package/runtime/arcane/components/screen-capture.html +8 -0
- package/runtime/arcane/components/source-code-viewer.html +441 -0
- package/runtime/arcane/components/source-explanation.html +124 -0
- package/runtime/arcane/components/speech.html +365 -0
- package/runtime/arcane/components/summary-strip.html +177 -0
- package/runtime/arcane/components/table.html +77 -0
- package/runtime/arcane/components/task-progress.html +282 -0
- package/runtime/arcane/components/terminal-workspace.html +65 -0
- package/runtime/arcane/components/theme-editor.html +41 -0
- package/runtime/arcane/components/theme-switcher.html +46 -0
- package/runtime/arcane/components/unified-inbox.html +20 -0
- package/runtime/arcane/components/voice-transcription.html +476 -0
- package/runtime/arcane/components/weather-widget.html +8 -0
- package/runtime/arcane/components/web-navigator.html +239 -0
- package/runtime/arcane/css/communications.css +1 -0
- package/runtime/arcane/css/dashboard-config.css +45 -0
- package/runtime/arcane/css/document-site.css +981 -0
- package/runtime/arcane/css/layout.css +438 -0
- package/runtime/arcane/css/primitives.css +321 -0
- package/runtime/arcane/css/theme.css +112 -0
- package/runtime/arcane/css/utility-workspace.css +1 -0
- package/runtime/arcane/entities/ApiModelRecord.js +20 -0
- package/runtime/arcane/entities/Calculation.js +13 -0
- package/runtime/arcane/entities/Chat.js +581 -0
- package/runtime/arcane/entities/CommunicationMessage.js +29 -0
- package/runtime/arcane/entities/CommunicationThread.js +21 -0
- package/runtime/arcane/entities/Document.js +10 -0
- package/runtime/arcane/entities/File.js +143 -0
- package/runtime/arcane/entities/Image.js +135 -0
- package/runtime/arcane/entities/IntentEnvelope.js +834 -0
- package/runtime/arcane/entities/Preference.js +83 -0
- package/runtime/arcane/entities/TWiNPolicyDecision.js +1092 -0
- package/runtime/arcane/entities/TerminalSession.js +46 -0
- package/runtime/arcane/entities/Theme.js +107 -0
- package/runtime/arcane/entities/User.js +1046 -0
- package/runtime/arcane/entities/Weather.js +23 -0
- package/runtime/arcane/img/arcane-os-everywhere.png +0 -0
- package/runtime/arcane/img/arrow-left.png +0 -0
- package/runtime/arcane/img/arrow-right.png +0 -0
- package/runtime/arcane/img/doc.svg +5 -0
- package/runtime/arcane/img/folder.svg +4 -0
- package/runtime/arcane/img/image.svg +5 -0
- package/runtime/arcane/img/refresh.png +0 -0
- package/runtime/arcane/img/send.svg +9 -0
- package/runtime/arcane/img/trash.svg +5 -0
- package/runtime/arcane/img/upload.svg +5 -0
- package/runtime/arcane/modules/AI.js +2048 -0
- package/runtime/arcane/modules/AIPreferenceRuntime.js +32 -0
- package/runtime/arcane/modules/AIPreferenceTuple.js +92 -0
- package/runtime/arcane/modules/AIResponseLength.js +42 -0
- package/runtime/arcane/modules/AIResponseURLPolicy.js +626 -0
- package/runtime/arcane/modules/AnsiText.js +53 -0
- package/runtime/arcane/modules/ApiModelDatabase.js +25 -0
- package/runtime/arcane/modules/AppDataScope.js +245 -0
- package/runtime/arcane/modules/AppearancePreferences.js +28 -0
- package/runtime/arcane/modules/ArcaneCommunicationBridge.js +22 -0
- package/runtime/arcane/modules/ArcaneNavigationPolicy.js +135 -0
- package/runtime/arcane/modules/ArcaneNetworkPolicy.js +255 -0
- package/runtime/arcane/modules/AsyncBoundary.js +161 -0
- package/runtime/arcane/modules/BrowserTestSuite.js +326 -0
- package/runtime/arcane/modules/CalculatorEngine.js +20 -0
- package/runtime/arcane/modules/CaseEvidenceIndexer.js +134 -0
- package/runtime/arcane/modules/ChartLibrary.js +35 -0
- package/runtime/arcane/modules/ChatRecords.js +13 -0
- package/runtime/arcane/modules/CommunicationAppController.js +43 -0
- package/runtime/arcane/modules/CommunicationHub.js +16 -0
- package/runtime/arcane/modules/CommunicationPreferences.js +13 -0
- package/runtime/arcane/modules/CommunicationProviderRegistry.js +16 -0
- package/runtime/arcane/modules/ComponentContracts.js +586 -0
- package/runtime/arcane/modules/ConfiguredAIChatSession.js +288 -0
- package/runtime/arcane/modules/ConversationActionItems.js +488 -0
- package/runtime/arcane/modules/ConversationClosingReport.js +274 -0
- package/runtime/arcane/modules/ConversationTimebox.js +527 -0
- package/runtime/arcane/modules/CoreLocalModelCatalog.js +255 -0
- package/runtime/arcane/modules/DBLS.js +171 -0
- package/runtime/arcane/modules/DBOPFS.js +1154 -0
- package/runtime/arcane/modules/DBOPFSWorker.js +116 -0
- package/runtime/arcane/modules/DataMaintenance.js +91 -0
- package/runtime/arcane/modules/DevelopmentWorkspace.js +74 -0
- package/runtime/arcane/modules/DirectoryPicker.js +109 -0
- package/runtime/arcane/modules/DocumentNavigation.js +223 -0
- package/runtime/arcane/modules/Errors.js +1025 -0
- package/runtime/arcane/modules/GifEncoder.js +29 -0
- package/runtime/arcane/modules/HTMLImport.js +114 -0
- package/runtime/arcane/modules/InMemoryCommunicationProvider.js +14 -0
- package/runtime/arcane/modules/IsolatedModelQuestionRunner.js +275 -0
- package/runtime/arcane/modules/LocalAIReadiness.js +870 -0
- package/runtime/arcane/modules/LocalAIReadinessController.js +156 -0
- package/runtime/arcane/modules/MD.js +111 -0
- package/runtime/arcane/modules/Mail.js +352 -0
- package/runtime/arcane/modules/MailTransport.mjs +180 -0
- package/runtime/arcane/modules/Marked.min.js +71 -0
- package/runtime/arcane/modules/MemoryRecords.js +44 -0
- package/runtime/arcane/modules/MessageAdvisory.js +38 -0
- package/runtime/arcane/modules/ModelDefinition.js +189 -0
- package/runtime/arcane/modules/Ollama.js +74 -0
- package/runtime/arcane/modules/OllamaModelIdentifier.js +21 -0
- package/runtime/arcane/modules/OllamaSettings.js +24 -0
- package/runtime/arcane/modules/OpenMeteoWeatherProvider.js +14 -0
- package/runtime/arcane/modules/PreferenceStore.js +109 -0
- package/runtime/arcane/modules/QRCode.min.js +1 -0
- package/runtime/arcane/modules/Questionnaire.js +61 -0
- package/runtime/arcane/modules/RecordLinkIndex.js +24 -0
- package/runtime/arcane/modules/RecordPassageIndex.js +222 -0
- package/runtime/arcane/modules/RecordReviewStore.js +94 -0
- package/runtime/arcane/modules/RevocableProjectionLedger.js +1623 -0
- package/runtime/arcane/modules/RiskSignalAnalyzer.js +37 -0
- package/runtime/arcane/modules/ScamRiskPolicy.js +62 -0
- package/runtime/arcane/modules/ScopedOPFSCache.js +183 -0
- package/runtime/arcane/modules/ScreenCapture.js +20 -0
- package/runtime/arcane/modules/SpeechPlayback.js +581 -0
- package/runtime/arcane/modules/StaticDocumentCatalog.js +1248 -0
- package/runtime/arcane/modules/SystemAppearance.js +20 -0
- package/runtime/arcane/modules/SystemPlatformPresentation.js +51 -0
- package/runtime/arcane/modules/SystemToolRegistry.js +28 -0
- package/runtime/arcane/modules/TerminalClient.js +52 -0
- package/runtime/arcane/modules/TerminalCommandRegistry.js +50 -0
- package/runtime/arcane/modules/ThemeBootstrap.js +26 -0
- package/runtime/arcane/modules/ThemeManager.js +131 -0
- package/runtime/arcane/modules/TimeGuard.js +149 -0
- package/runtime/arcane/modules/ToolCallRouter.js +83 -0
- package/runtime/arcane/modules/WaitForComponent.js +102 -0
- package/runtime/arcane/modules/YouTubeMedia.js +16 -0
- package/runtime/arcane/modules/uPlot.LICENSE.txt +21 -0
- package/runtime/arcane/modules/uPlot.iife.min.js +2 -0
- package/runtime/arcane/modules/uPlot.min.css +1 -0
- package/runtime/arcane/security/arcane-network-policy.json +6 -0
- package/runtime/strong-type/index.js +352 -0
- package/runtime/strong-type/licence +21 -0
- package/runtime/strong-type/package.json +45 -0
- package/schemas/arcane-app-bundle.schema.json +125 -0
- package/schemas/arcane-app.schema.json +329 -0
- package/schemas/arcane-lock.schema.json +86 -0
- package/schemas/arcane-package.schema.json +224 -0
- package/schemas/cli-event.schema.json +122 -0
- package/schemas/event-stack.schema.json +152 -0
- package/schemas/native-build-plan.schema.json +176 -0
- package/schemas/target-adapter.schema.json +117 -0
- package/src/app-descriptor.mjs +500 -0
- package/src/cli/main.mjs +561 -0
- package/src/constants.mjs +31 -0
- package/src/dev-server.mjs +718 -0
- package/src/doctor.mjs +315 -0
- package/src/dom-event-instrumentation.mjs +594 -0
- package/src/errors.mjs +75 -0
- package/src/event-manager.mjs +1342 -0
- package/src/event-queue.mjs +138 -0
- package/src/events.mjs +219 -0
- package/src/index.mjs +177 -0
- package/src/integrated-provider-loader.mjs +432 -0
- package/src/native-plan.mjs +698 -0
- package/src/native-provider-loader.mjs +1126 -0
- package/src/packager/core.mjs +2691 -0
- package/src/process.mjs +353 -0
- package/src/release-bundle.mjs +2523 -0
- package/src/repository.mjs +90 -0
- package/src/runtime.mjs +452 -0
- package/src/scaffold.mjs +380 -0
- package/src/targets/index.mjs +436 -0
- package/src/templates/assets/app-icon.png +0 -0
- package/src/templates/workspace-template.mjs +388 -0
- package/src/testing-loader.mjs +9 -0
- package/src/testing.mjs +427 -0
- package/src/toolchain.mjs +1335 -0
- package/src/update-check.mjs +307 -0
- package/src/workspace.mjs +449 -0
|
@@ -0,0 +1,4901 @@
|
|
|
1
|
+
# Arcane OS SDK JavaScript API
|
|
2
|
+
|
|
3
|
+
The npm package exposes a Node.js ESM control plane. It is not a browser-importable renderer API. Use the synchronized modules under `/arcane/` for application code and use `globalThis.Arcane` for capability-gated native calls.
|
|
4
|
+
|
|
5
|
+
This page is the canonical inventory for every JavaScript name reachable through `package.json#exports`. The same binding can appear at the root and a focused subpath; those entrypoints are listed together. The root workspace `discoverApps` and the low-level packager `discoverApps` are intentionally separate records because they are different functions.
|
|
6
|
+
|
|
7
|
+
## Import map
|
|
8
|
+
|
|
9
|
+
| Specifier | Purpose |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `arcane-os` | Complete high-level SDK surface. |
|
|
12
|
+
| `arcane-os/toolchain` | Headless application operations. |
|
|
13
|
+
| `arcane-os/events` | CLI/event reporter. |
|
|
14
|
+
| `arcane-os/testing` | Isolated test registration and execution. |
|
|
15
|
+
| `arcane-os/targets` | Target adapters and dispatch. |
|
|
16
|
+
| `arcane-os/native` | Native plan and builder protocol. |
|
|
17
|
+
| `arcane-os/native-provider` | Fixed native provider loaders. |
|
|
18
|
+
| `arcane-os/integrated-provider` | Fixed integrated shared-development provider. |
|
|
19
|
+
| `arcane-os/packager` | Low-level browser app packager. |
|
|
20
|
+
| `arcane-os/release-bundle` | Deterministic external release bundles. |
|
|
21
|
+
| `arcane-os/event-manager` | Central synchronous events, bounded time-travel history, playback, and optional DOM instrumentation. |
|
|
22
|
+
|
|
23
|
+
JSON schemas, the runtime manifest, and `package.json` are data-only export subpaths. In Node ESM, import JSON with `with {type: 'json'}`, or resolve and read it explicitly.
|
|
24
|
+
|
|
25
|
+
## Shared operation contract
|
|
26
|
+
|
|
27
|
+
High-level operations accept one options object. Common fields are `workspaceRoot`, `appId`, `target`, `signal`, and `onEvent`; only fields meaningful to that operation are consumed. Long work acknowledges first, owns its child tasks, keeps event delivery ordered and backpressured, emits progress or heartbeats, observes cancellation where safe, and rejects with `ArcaneError` on failure.
|
|
28
|
+
|
|
29
|
+
One invocation selects one workspace, app, operation, target, architecture, format, signing profile, and output root. No API silently loops over all apps or targets. Receipt-returning APIs issue same-process authority: receipts cannot be serialized, reconstructed, or treated as cross-process authorization.
|
|
30
|
+
|
|
31
|
+
Protocol mechanics are intentionally kept in the [deep protocol guide](protocols.md). The compact availability and normalization sentence beneath each member is the normal application-facing view.
|
|
32
|
+
|
|
33
|
+
## Canonical member inventory
|
|
34
|
+
|
|
35
|
+
| Member | Kind | Import | Group | Availability |
|
|
36
|
+
| --- | --- | --- | --- | --- |
|
|
37
|
+
| `APP_BUNDLE_DESCRIPTOR_NAME` | constant | `arcane-os` | Packaging and release bundles | Node |
|
|
38
|
+
| `APP_BUNDLE_EXTENSION` | constant | `arcane-os` | Packaging and release bundles | Node |
|
|
39
|
+
| `APP_BUNDLE_FORMAT` | constant | `arcane-os` | Packaging and release bundles | Node |
|
|
40
|
+
| `APP_BUNDLE_KIND` | constant | `arcane-os` | Packaging and release bundles | Node |
|
|
41
|
+
| `APP_BUNDLE_LIMITS` | constant | `arcane-os` | Packaging and release bundles | Node |
|
|
42
|
+
| `APP_BUNDLE_MANIFEST_NAME` | constant | `arcane-os` | Packaging and release bundles | Node |
|
|
43
|
+
| `APP_BUNDLE_RELEASE_PATH` | constant | `arcane-os` | Packaging and release bundles | Node |
|
|
44
|
+
| `APP_BUNDLE_SCHEMA_VERSION` | constant | `arcane-os` | Packaging and release bundles | Node |
|
|
45
|
+
| `APP_BUNDLE_SUPPORTED_SDK_VERSIONS` | constant | `arcane-os/release-bundle` | Packaging and release bundles | Node |
|
|
46
|
+
| `APP_CONFIG_NAME` | constant | `arcane-os/packager` | Packaging and release bundles | Node |
|
|
47
|
+
| `APP_DESCRIPTOR_NAME` | constant | `arcane-os` | Runtime and app descriptors | Node |
|
|
48
|
+
| `APP_DESCRIPTOR_SCHEMA_VERSION` | constant | `arcane-os` | Runtime and app descriptors | Node |
|
|
49
|
+
| `appDescriptorSha256()` | function | `arcane-os` | Runtime and app descriptors | Node |
|
|
50
|
+
| `ARCANE_INTEGRATED_PROVIDER_RELATIVE_PATH` | constant | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
51
|
+
| `ARCANE_MACHINE_BUNDLE_VERSION` | constant | `arcane-os` | Identity and protocol constants | Node |
|
|
52
|
+
| `ARCANE_NATIVE_PROVIDER_PATHS` | constant | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
53
|
+
| `ARCANE_PORTABLE_PROVIDER_PATH` | constant | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
54
|
+
| `ARCANE_PROTOCOL` | constant | `arcane-os` | Identity and protocol constants | Node |
|
|
55
|
+
| `ARCANE_UPSTREAM_COMMIT` | constant | `arcane-os` | Identity and protocol constants | Node |
|
|
56
|
+
| `ARCANE_UPSTREAM_REPOSITORY` | constant | `arcane-os` | Identity and protocol constants | Node |
|
|
57
|
+
| `ArcaneError` | class | `arcane-os` | Errors | Node |
|
|
58
|
+
| `assertIntegratedNativeToolchain()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
59
|
+
| `assertIntegratedPortableToolchain()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
60
|
+
| `assertNativeApplicationToolchainCompatibility()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
61
|
+
| `assertNativeToolchainCompatibility()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
62
|
+
| `assertPortableToolchainCompatibility()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
63
|
+
| `assessArcaneOllama()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node; Microsoft NT managed-service assessment |
|
|
64
|
+
| `authenticateAppReleaseAuthority()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
65
|
+
| `authenticateAppReleaseReceipt()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
66
|
+
| `authenticateNativeBuildPlan()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
67
|
+
| `authenticateRuntimeReceipt()` | function | `arcane-os` | Runtime and app descriptors | Node |
|
|
68
|
+
| `authenticateSharedPayloadSnapshot()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
69
|
+
| `buildApplication()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
70
|
+
| `buildTarget()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
71
|
+
| `bumpVersion()` | function | `arcane-os/packager` | Packaging and release bundles | Node |
|
|
72
|
+
| `bundleApplication()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
73
|
+
| `checkApplication()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
74
|
+
| `CLI_EVENT_PROTOCOL` | constant | `arcane-os` | Identity and protocol constants | Node |
|
|
75
|
+
| `CLI_NAME` | constant | `arcane-os` | Identity and protocol constants | Node |
|
|
76
|
+
| `createApplication()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
77
|
+
| `createAppReleaseBundle()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
78
|
+
| `createCanonicalUstarHeader()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
79
|
+
| `createNativeBuildPlan()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
80
|
+
| `createNativeTargetAdapter()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
81
|
+
| `createReporter()` | function | `arcane-os` | Events, processes, and testing | Node |
|
|
82
|
+
| `createToolchain()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
83
|
+
| `createWorkspace()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node |
|
|
84
|
+
| `default()` | function | `arcane-os/testing` | Events, processes, and testing | Node |
|
|
85
|
+
| `DEFAULT_TEST_TIMEOUT_MS` | constant | `arcane-os` | Events, processes, and testing | Node |
|
|
86
|
+
| `describeTargets()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
87
|
+
| `developApplication()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
88
|
+
| `discoverPackagerApps()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
89
|
+
| `doctorApplication()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node |
|
|
90
|
+
| `doctorNativeTarget()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
91
|
+
| `ERROR_CODES` | constant | `arcane-os` | Errors | Node |
|
|
92
|
+
| `errorRecord()` | function | `arcane-os` | Errors | Node |
|
|
93
|
+
| `executeNativeBuildPlan()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
94
|
+
| `executeOperation()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
95
|
+
| `fail()` | function | `arcane-os` | Errors | Node |
|
|
96
|
+
| `getSdkRoot()` | function | `arcane-os` | Runtime and app descriptors | Node |
|
|
97
|
+
| `getTargetAdapter()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
98
|
+
| `incrementSemver()` | function | `arcane-os/packager` | Packaging and release bundles | Node |
|
|
99
|
+
| `initializeApplication()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node |
|
|
100
|
+
| `initWorkspace()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node |
|
|
101
|
+
| `inspectApp()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
102
|
+
| `inspectWorkspaceProfile()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node |
|
|
103
|
+
| `INTEGRATED_TOOLCHAIN_PROTOCOL` | constant | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
104
|
+
| `listTargets()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
105
|
+
| `loadAppDescriptor()` | function | `arcane-os` | Runtime and app descriptors | Node |
|
|
106
|
+
| `loadArcaneIntegratedProvider()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
107
|
+
| `loadArcaneNativeProvider()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
108
|
+
| `loadArcanePortableProvider()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
109
|
+
| `loadRuntimeRelease()` | function | `arcane-os` | Runtime and app descriptors | Node |
|
|
110
|
+
| `NATIVE_BUILD_PLAN_PROTOCOL` | constant | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
111
|
+
| `NATIVE_BUILDER_PROTOCOL` | constant | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
112
|
+
| `normalizeError()` | function | `arcane-os` | Errors | Node |
|
|
113
|
+
| `normalizeRelativePath()` | function | `arcane-os/packager` | Packaging and release bundles | Node |
|
|
114
|
+
| `OUTPUT_MODES` | constant | `arcane-os` | Identity and protocol constants | Node |
|
|
115
|
+
| `packageApp()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
116
|
+
| `packageApplication()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
117
|
+
| `PACKAGER_VERSION` | constant | `arcane-os/packager` | Packaging and release bundles | Node |
|
|
118
|
+
| `packager.discoverApps()` | function | `arcane-os/packager` | Packaging and release bundles | Node |
|
|
119
|
+
| `parseSemver()` | function | `arcane-os/packager` | Packaging and release bundles | Node |
|
|
120
|
+
| `planApplication()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
121
|
+
| `prepareNativeTarget()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
122
|
+
| `prepareSharedPayloadSnapshot()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
123
|
+
| `projectNativeDescriptor()` | function | `arcane-os` | Runtime and app descriptors | Node |
|
|
124
|
+
| `projectPackageManifest()` | function | `arcane-os` | Runtime and app descriptors | Node |
|
|
125
|
+
| `readVerifiedAppReleaseFile()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
126
|
+
| `readVerifiedRuntimeFile()` | function | `arcane-os` | Runtime and app descriptors | Node |
|
|
127
|
+
| `registeredTestCount()` | function | `arcane-os` | Events, processes, and testing | Node |
|
|
128
|
+
| `RELEASE_MANIFEST_NAME` | constant | `arcane-os/packager` | Packaging and release bundles | Node |
|
|
129
|
+
| `repositoryApplication()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
130
|
+
| `repositoryPull()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node; network-assisted Git |
|
|
131
|
+
| `repositoryPush()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node; network-assisted Git |
|
|
132
|
+
| `repositoryStatus()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node |
|
|
133
|
+
| `resolveNativeBuildOutputRoot()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
134
|
+
| `resolvePortableBuildOutputRoot()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
135
|
+
| `resolveWorkspace()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node |
|
|
136
|
+
| `ROOT_CONFIG_NAME` | constant | `arcane-os/packager` | Packaging and release bundles | Node |
|
|
137
|
+
| `discoverApps()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node |
|
|
138
|
+
| `runApplication()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
139
|
+
| `runDoctor()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node |
|
|
140
|
+
| `runProcess()` | function | `arcane-os` | Events, processes, and testing | Node |
|
|
141
|
+
| `runRegisteredTests()` | function | `arcane-os` | Events, processes, and testing | Node |
|
|
142
|
+
| `runRepositoryAction()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node |
|
|
143
|
+
| `runTarget()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
144
|
+
| `RUNTIME_ROOT` | constant | `arcane-os` | Identity and protocol constants | Node |
|
|
145
|
+
| `SDK_NAME` | constant | `arcane-os` | Identity and protocol constants | Node |
|
|
146
|
+
| `SDK_ROOT` | constant | `arcane-os` | Identity and protocol constants | Node |
|
|
147
|
+
| `SDK_VERSION` | constant | `arcane-os` | Identity and protocol constants | Node |
|
|
148
|
+
| `selectApp()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node |
|
|
149
|
+
| `startDevServer()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node control plane; browser data plane |
|
|
150
|
+
| `TARGET_ADAPTER_PROTOCOL` | constant | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
151
|
+
| `TARGET_IDS` | constant | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
152
|
+
| `test()` | function | `arcane-os` | Events, processes, and testing | Node |
|
|
153
|
+
| `testApplication()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
154
|
+
| `throwIfAborted()` | function | `arcane-os` | Errors | Node |
|
|
155
|
+
| `validateAppBundlePath()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
156
|
+
| `validateAppConfig()` | function | `arcane-os/packager` | Packaging and release bundles | Node |
|
|
157
|
+
| `validateAppDescriptor()` | function | `arcane-os` | Runtime and app descriptors | Node |
|
|
158
|
+
| `validateNativeBuilder()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
159
|
+
| `validateRootConfig()` | function | `arcane-os/packager` | Packaging and release bundles | Node |
|
|
160
|
+
| `validateWorkspace()` | function | `arcane-os` | Workspace, doctor, repository, and server | Node |
|
|
161
|
+
| `verifyApp()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
162
|
+
| `verifyApplication()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
163
|
+
| `verifyAppReleaseBundle()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
164
|
+
| `verifyBundleApplication()` | function | `arcane-os` | Headless toolchain operations | Node; selected operation may produce browser or native output |
|
|
165
|
+
| `verifyNativeArtifact()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
166
|
+
| `verifyRuntime()` | function | `arcane-os` | Runtime and app descriptors | Node |
|
|
167
|
+
| `verifyTarget()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
168
|
+
| `SDK_UPDATE_REGISTRY` | constant | `arcane-os` | Explicit SDK update checks | Node; on-demand CLI or maintainer check only |
|
|
169
|
+
| `SDK_UPDATE_TIMEOUT_MS` | constant | `arcane-os` | Explicit SDK update checks | Node; on-demand CLI or maintainer check only |
|
|
170
|
+
| `checkForSdkUpdate()` | function | `arcane-os` | Explicit SDK update checks | Node; on-demand CLI or maintainer check only |
|
|
171
|
+
| `checkSdkUpdate()` | function | `arcane-os` | Explicit SDK update checks | Node; on-demand CLI or maintainer check only |
|
|
172
|
+
| `compareSdkVersions()` | function | `arcane-os` | Explicit SDK update checks | Node; on-demand CLI or maintainer check only |
|
|
173
|
+
| `updateTagForVersion()` | function | `arcane-os` | Explicit SDK update checks | Node; on-demand CLI or maintainer check only |
|
|
174
|
+
| `validateUpdateRegistry()` | function | `arcane-os` | Explicit SDK update checks | Node; on-demand CLI or maintainer check only |
|
|
175
|
+
| `ARCANE_EVENT_STACK_PROTOCOL` | constant | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Node and browser/bundler |
|
|
176
|
+
| `DEFAULT_DOM_EVENT_TYPES` | constant | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Node and browser/bundler; meaningful to browser DOM instrumentation |
|
|
177
|
+
| `DOM_INTERACTION_EVENT` | constant | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Browser DOM or a DOM-compatible test host; constant imports in Node |
|
|
178
|
+
| `DOM_MUTATION_EVENT` | constant | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Browser DOM or a DOM-compatible test host; constant imports in Node |
|
|
179
|
+
| `DOM_OBSERVATION_STARTED_EVENT` | constant | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Browser DOM or a DOM-compatible test host; constant imports in Node |
|
|
180
|
+
| `DOM_OBSERVATION_STOPPED_EVENT` | constant | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Browser DOM or a DOM-compatible test host; constant imports in Node |
|
|
181
|
+
| `EventManager` | class | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Node and browser/bundler; DOM capture requires a compatible DOM |
|
|
182
|
+
| `PLAYBACK_CANCELLED_EVENT` | constant | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Node and browser/bundler |
|
|
183
|
+
| `PLAYBACK_COMPLETED_EVENT` | constant | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Node and browser/bundler |
|
|
184
|
+
| `PLAYBACK_FAILED_EVENT` | constant | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Node and browser/bundler |
|
|
185
|
+
| `PLAYBACK_RECORD_EVENT` | constant | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Node and browser/bundler |
|
|
186
|
+
| `PLAYBACK_STARTED_EVENT` | constant | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Node and browser/bundler |
|
|
187
|
+
| `TIME_TRAVEL_OVERFLOW_EVENT` | constant | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Node and browser/bundler |
|
|
188
|
+
| `TIME_TRAVEL_SEEK_EVENT` | constant | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Node and browser/bundler |
|
|
189
|
+
| `arcaneEvents` | singleton | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Node and browser/bundler; DOM capture requires a compatible DOM |
|
|
190
|
+
| `createDOMInstrumentation()` | function | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Browser DOM or a DOM-compatible test host |
|
|
191
|
+
| `createEventManager()` | function | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Node and browser/bundler; DOM capture requires a compatible DOM |
|
|
192
|
+
| `describeDOMTarget()` | function | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Browser DOM or DOM-compatible objects; importable in Node |
|
|
193
|
+
| `domSelector()` | function | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Browser DOM or DOM-compatible objects; importable in Node |
|
|
194
|
+
| `parseEventStack()` | function | `arcane-os/event-manager` | Central events, time travel, and DOM instrumentation | Node and browser/bundler |
|
|
195
|
+
|
|
196
|
+
# Packaging and release bundles
|
|
197
|
+
|
|
198
|
+
## APP_BUNDLE_DESCRIPTOR_NAME
|
|
199
|
+
|
|
200
|
+
### Overview
|
|
201
|
+
|
|
202
|
+
Canonical descriptor filename stored in an external application release bundle.
|
|
203
|
+
|
|
204
|
+
### Value and import
|
|
205
|
+
|
|
206
|
+
```text
|
|
207
|
+
const APP_BUNDLE_DESCRIPTOR_NAME
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Import it from `arcane-os` or `arcane-os/release-bundle`. Treat arrays and records as immutable public values.
|
|
211
|
+
|
|
212
|
+
### Availability and normalization
|
|
213
|
+
|
|
214
|
+
**Node.** Exact immutable SDK value. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
215
|
+
|
|
216
|
+
### Example
|
|
217
|
+
|
|
218
|
+
```javascript
|
|
219
|
+
import {APP_BUNDLE_DESCRIPTOR_NAME} from 'arcane-os';
|
|
220
|
+
|
|
221
|
+
console.log(APP_BUNDLE_DESCRIPTOR_NAME);
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## APP_BUNDLE_EXTENSION
|
|
225
|
+
|
|
226
|
+
### Overview
|
|
227
|
+
|
|
228
|
+
Required filename extension for deterministic external application release bundles.
|
|
229
|
+
|
|
230
|
+
### Value and import
|
|
231
|
+
|
|
232
|
+
```text
|
|
233
|
+
const APP_BUNDLE_EXTENSION
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Import it from `arcane-os` or `arcane-os/release-bundle`. Treat arrays and records as immutable public values.
|
|
237
|
+
|
|
238
|
+
### Availability and normalization
|
|
239
|
+
|
|
240
|
+
**Node.** Exact immutable SDK value. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
241
|
+
|
|
242
|
+
### Example
|
|
243
|
+
|
|
244
|
+
```javascript
|
|
245
|
+
import {APP_BUNDLE_EXTENSION} from 'arcane-os';
|
|
246
|
+
|
|
247
|
+
console.log(APP_BUNDLE_EXTENSION);
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## APP_BUNDLE_FORMAT
|
|
251
|
+
|
|
252
|
+
### Overview
|
|
253
|
+
|
|
254
|
+
Canonical archive encoding used by external application release bundles.
|
|
255
|
+
|
|
256
|
+
### Value and import
|
|
257
|
+
|
|
258
|
+
```text
|
|
259
|
+
const APP_BUNDLE_FORMAT
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Import it from `arcane-os` or `arcane-os/release-bundle`. Treat arrays and records as immutable public values.
|
|
263
|
+
|
|
264
|
+
### Availability and normalization
|
|
265
|
+
|
|
266
|
+
**Node.** Exact immutable SDK value. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
267
|
+
|
|
268
|
+
### Example
|
|
269
|
+
|
|
270
|
+
```javascript
|
|
271
|
+
import {APP_BUNDLE_FORMAT} from 'arcane-os';
|
|
272
|
+
|
|
273
|
+
console.log(APP_BUNDLE_FORMAT);
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## APP_BUNDLE_KIND
|
|
277
|
+
|
|
278
|
+
### Overview
|
|
279
|
+
|
|
280
|
+
Stable manifest kind identifying an Arcane application release bundle.
|
|
281
|
+
|
|
282
|
+
### Value and import
|
|
283
|
+
|
|
284
|
+
```text
|
|
285
|
+
const APP_BUNDLE_KIND
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Import it from `arcane-os` or `arcane-os/release-bundle`. Treat arrays and records as immutable public values.
|
|
289
|
+
|
|
290
|
+
### Availability and normalization
|
|
291
|
+
|
|
292
|
+
**Node.** Exact immutable SDK value. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
293
|
+
|
|
294
|
+
### Example
|
|
295
|
+
|
|
296
|
+
```javascript
|
|
297
|
+
import {APP_BUNDLE_KIND} from 'arcane-os';
|
|
298
|
+
|
|
299
|
+
console.log(APP_BUNDLE_KIND);
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
## APP_BUNDLE_LIMITS
|
|
303
|
+
|
|
304
|
+
### Overview
|
|
305
|
+
|
|
306
|
+
Frozen compressed-size, expanded-size, entry-count, and path limits enforced by bundle creation and verification.
|
|
307
|
+
|
|
308
|
+
### Value and import
|
|
309
|
+
|
|
310
|
+
```text
|
|
311
|
+
const APP_BUNDLE_LIMITS
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Import it from `arcane-os` or `arcane-os/release-bundle`. Treat arrays and records as immutable public values.
|
|
315
|
+
|
|
316
|
+
### Availability and normalization
|
|
317
|
+
|
|
318
|
+
**Node.** Exact immutable SDK value. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
319
|
+
|
|
320
|
+
### Example
|
|
321
|
+
|
|
322
|
+
```javascript
|
|
323
|
+
import {APP_BUNDLE_LIMITS} from 'arcane-os';
|
|
324
|
+
|
|
325
|
+
console.log(APP_BUNDLE_LIMITS);
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
## APP_BUNDLE_MANIFEST_NAME
|
|
329
|
+
|
|
330
|
+
### Overview
|
|
331
|
+
|
|
332
|
+
Canonical bundle-envelope manifest filename.
|
|
333
|
+
|
|
334
|
+
### Value and import
|
|
335
|
+
|
|
336
|
+
```text
|
|
337
|
+
const APP_BUNDLE_MANIFEST_NAME
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Import it from `arcane-os` or `arcane-os/release-bundle`. Treat arrays and records as immutable public values.
|
|
341
|
+
|
|
342
|
+
### Availability and normalization
|
|
343
|
+
|
|
344
|
+
**Node.** Exact immutable SDK value. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
345
|
+
|
|
346
|
+
### Example
|
|
347
|
+
|
|
348
|
+
```javascript
|
|
349
|
+
import {APP_BUNDLE_MANIFEST_NAME} from 'arcane-os';
|
|
350
|
+
|
|
351
|
+
console.log(APP_BUNDLE_MANIFEST_NAME);
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
## APP_BUNDLE_RELEASE_PATH
|
|
355
|
+
|
|
356
|
+
### Overview
|
|
357
|
+
|
|
358
|
+
Canonical path of the packaged release manifest inside a bundle payload.
|
|
359
|
+
|
|
360
|
+
### Value and import
|
|
361
|
+
|
|
362
|
+
```text
|
|
363
|
+
const APP_BUNDLE_RELEASE_PATH
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
Import it from `arcane-os` or `arcane-os/release-bundle`. Treat arrays and records as immutable public values.
|
|
367
|
+
|
|
368
|
+
### Availability and normalization
|
|
369
|
+
|
|
370
|
+
**Node.** Exact immutable SDK value. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
371
|
+
|
|
372
|
+
### Example
|
|
373
|
+
|
|
374
|
+
```javascript
|
|
375
|
+
import {APP_BUNDLE_RELEASE_PATH} from 'arcane-os';
|
|
376
|
+
|
|
377
|
+
console.log(APP_BUNDLE_RELEASE_PATH);
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
## APP_BUNDLE_SCHEMA_VERSION
|
|
381
|
+
|
|
382
|
+
### Overview
|
|
383
|
+
|
|
384
|
+
Current immutable bundle-envelope schema version.
|
|
385
|
+
|
|
386
|
+
### Value and import
|
|
387
|
+
|
|
388
|
+
```text
|
|
389
|
+
const APP_BUNDLE_SCHEMA_VERSION
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
Import it from `arcane-os` or `arcane-os/release-bundle`. Treat arrays and records as immutable public values.
|
|
393
|
+
|
|
394
|
+
### Availability and normalization
|
|
395
|
+
|
|
396
|
+
**Node.** Exact immutable SDK value. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
397
|
+
|
|
398
|
+
### Example
|
|
399
|
+
|
|
400
|
+
```javascript
|
|
401
|
+
import {APP_BUNDLE_SCHEMA_VERSION} from 'arcane-os';
|
|
402
|
+
|
|
403
|
+
console.log(APP_BUNDLE_SCHEMA_VERSION);
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
## APP_BUNDLE_SUPPORTED_SDK_VERSIONS
|
|
407
|
+
|
|
408
|
+
### Overview
|
|
409
|
+
|
|
410
|
+
Exact SDK generations accepted by this bundle verifier.
|
|
411
|
+
|
|
412
|
+
### Value and import
|
|
413
|
+
|
|
414
|
+
```text
|
|
415
|
+
const APP_BUNDLE_SUPPORTED_SDK_VERSIONS
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
Import it from `arcane-os/release-bundle`. Treat arrays and records as immutable public values.
|
|
419
|
+
|
|
420
|
+
### Availability and normalization
|
|
421
|
+
|
|
422
|
+
**Node.** Exact immutable SDK value. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
423
|
+
|
|
424
|
+
### Example
|
|
425
|
+
|
|
426
|
+
```javascript
|
|
427
|
+
import {APP_BUNDLE_SUPPORTED_SDK_VERSIONS} from 'arcane-os/release-bundle';
|
|
428
|
+
|
|
429
|
+
console.log(APP_BUNDLE_SUPPORTED_SDK_VERSIONS);
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
## APP_CONFIG_NAME
|
|
433
|
+
|
|
434
|
+
### Overview
|
|
435
|
+
|
|
436
|
+
Canonical schema-1 application package configuration filename used by the packager.
|
|
437
|
+
|
|
438
|
+
### Value and import
|
|
439
|
+
|
|
440
|
+
```text
|
|
441
|
+
const APP_CONFIG_NAME
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
Import it from `arcane-os/packager`. Treat arrays and records as immutable public values.
|
|
445
|
+
|
|
446
|
+
### Availability and normalization
|
|
447
|
+
|
|
448
|
+
**Node.** Exact immutable SDK value. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
449
|
+
|
|
450
|
+
### Example
|
|
451
|
+
|
|
452
|
+
```javascript
|
|
453
|
+
import {APP_CONFIG_NAME} from 'arcane-os/packager';
|
|
454
|
+
|
|
455
|
+
console.log(APP_CONFIG_NAME);
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
## authenticateAppReleaseAuthority()
|
|
459
|
+
|
|
460
|
+
### Overview
|
|
461
|
+
|
|
462
|
+
Authenticates that a same-process app release receipt also carries authored descriptor authority for external delivery.
|
|
463
|
+
|
|
464
|
+
### Signature and result
|
|
465
|
+
|
|
466
|
+
```text
|
|
467
|
+
async authenticateAppReleaseAuthority(receipt, { releaseRoot, expectedPackageConfig, expectedDescriptor, signal }={})
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
Import it from `arcane-os` or `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
471
|
+
|
|
472
|
+
### Availability and normalization
|
|
473
|
+
|
|
474
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
475
|
+
|
|
476
|
+
### Example
|
|
477
|
+
|
|
478
|
+
```javascript
|
|
479
|
+
import {authenticateAppReleaseAuthority} from 'arcane-os';
|
|
480
|
+
|
|
481
|
+
async function useauthenticateAppReleaseAuthority(...arguments_) {
|
|
482
|
+
return authenticateAppReleaseAuthority(...arguments_);
|
|
483
|
+
}
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
## authenticateAppReleaseReceipt()
|
|
487
|
+
|
|
488
|
+
### Overview
|
|
489
|
+
|
|
490
|
+
Authenticates a same-process verified application release receipt against its exact current filesystem state.
|
|
491
|
+
|
|
492
|
+
### Signature and result
|
|
493
|
+
|
|
494
|
+
```text
|
|
495
|
+
async authenticateAppReleaseReceipt(receipt, options={})
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
Import it from `arcane-os` or `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
499
|
+
|
|
500
|
+
### Availability and normalization
|
|
501
|
+
|
|
502
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
503
|
+
|
|
504
|
+
### Example
|
|
505
|
+
|
|
506
|
+
```javascript
|
|
507
|
+
import {authenticateAppReleaseReceipt} from 'arcane-os';
|
|
508
|
+
|
|
509
|
+
async function useauthenticateAppReleaseReceipt(...arguments_) {
|
|
510
|
+
return authenticateAppReleaseReceipt(...arguments_);
|
|
511
|
+
}
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
## authenticateSharedPayloadSnapshot()
|
|
515
|
+
|
|
516
|
+
### Overview
|
|
517
|
+
|
|
518
|
+
Authenticates the same-process immutable shared-payload snapshot consumed by app packaging.
|
|
519
|
+
|
|
520
|
+
### Signature and result
|
|
521
|
+
|
|
522
|
+
```text
|
|
523
|
+
async authenticateSharedPayloadSnapshot(receipt, options={})
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
Import it from `arcane-os` or `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
527
|
+
|
|
528
|
+
### Availability and normalization
|
|
529
|
+
|
|
530
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
531
|
+
|
|
532
|
+
### Example
|
|
533
|
+
|
|
534
|
+
```javascript
|
|
535
|
+
import {authenticateSharedPayloadSnapshot} from 'arcane-os';
|
|
536
|
+
|
|
537
|
+
async function useauthenticateSharedPayloadSnapshot(...arguments_) {
|
|
538
|
+
return authenticateSharedPayloadSnapshot(...arguments_);
|
|
539
|
+
}
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
## bumpVersion()
|
|
543
|
+
|
|
544
|
+
### Overview
|
|
545
|
+
|
|
546
|
+
Updates the authored `arcane-package.json` version for one selected application.
|
|
547
|
+
This is a development-time metadata operation. It never updates the Arcane SDK,
|
|
548
|
+
the synchronized runtime, an installed application, or an Arcane OS host.
|
|
549
|
+
|
|
550
|
+
### Signature, parameters, and result
|
|
551
|
+
|
|
552
|
+
```text
|
|
553
|
+
async bumpVersion(options)
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
Import it from `arcane-os/packager`. `options.workspaceRoot` and `options.appId`
|
|
557
|
+
select one configured app. Supply exactly one of `bump` (`"major"`, `"minor"`,
|
|
558
|
+
`"patch"`, or `"prerelease"`) and `exactVersion`; `preid` customizes a
|
|
559
|
+
prerelease bump and defaults to `"rc"`. `dryRun` defaults to `false`.
|
|
560
|
+
|
|
561
|
+
The promise resolves to
|
|
562
|
+
`{app, currentVersion, version, bump, dryRun}`. `bump` is `null` when an exact
|
|
563
|
+
version was selected. A dry run validates and calculates the result without
|
|
564
|
+
writing or acquiring the operation lock. A non-dry run acquires the selected
|
|
565
|
+
app's packager lock under `dist/`, then atomically replaces only its
|
|
566
|
+
`arcane-package.json` version through temporary and backup files.
|
|
567
|
+
|
|
568
|
+
This function has no `signal`, `onEvent`, or receipt parameter: once started it
|
|
569
|
+
has no public cancellation or progress-event contract. It rejects invalid or
|
|
570
|
+
unchanged versions, conflicting `bump`/`exactVersion` inputs, an invalid
|
|
571
|
+
workspace/app, an active or stale packager lock, and filesystem failures. The
|
|
572
|
+
lock is released in `finally`; an unrecoverable replacement failure can leave
|
|
573
|
+
the documented backup file for manual recovery.
|
|
574
|
+
|
|
575
|
+
### Availability and normalization
|
|
576
|
+
|
|
577
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
578
|
+
|
|
579
|
+
### Example
|
|
580
|
+
|
|
581
|
+
```javascript
|
|
582
|
+
import {bumpVersion} from 'arcane-os/packager';
|
|
583
|
+
|
|
584
|
+
async function previewNextPrerelease(workspaceRoot) {
|
|
585
|
+
const result = await bumpVersion({
|
|
586
|
+
workspaceRoot,
|
|
587
|
+
appId: 'example-app',
|
|
588
|
+
bump: 'prerelease',
|
|
589
|
+
preid: 'beta',
|
|
590
|
+
dryRun: true
|
|
591
|
+
});
|
|
592
|
+
|
|
593
|
+
console.log(`${result.currentVersion} -> ${result.version}`);
|
|
594
|
+
return result;
|
|
595
|
+
}
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
## createAppReleaseBundle()
|
|
599
|
+
|
|
600
|
+
### Overview
|
|
601
|
+
|
|
602
|
+
Writes one deterministic USTAR+gzip external application bundle from an authenticated authored release receipt.
|
|
603
|
+
|
|
604
|
+
### Signature and result
|
|
605
|
+
|
|
606
|
+
```text
|
|
607
|
+
async createAppReleaseBundle({ receipt, releaseRoot, outputPath, overwrite=false, signal, onEvent }={})
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
Import it from `arcane-os` or `arcane-os/release-bundle`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
611
|
+
|
|
612
|
+
### Availability and normalization
|
|
613
|
+
|
|
614
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
615
|
+
|
|
616
|
+
### Example
|
|
617
|
+
|
|
618
|
+
```javascript
|
|
619
|
+
import {createAppReleaseBundle} from 'arcane-os';
|
|
620
|
+
|
|
621
|
+
async function usecreateAppReleaseBundle(...arguments_) {
|
|
622
|
+
return createAppReleaseBundle(...arguments_);
|
|
623
|
+
}
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
## createCanonicalUstarHeader()
|
|
627
|
+
|
|
628
|
+
### Overview
|
|
629
|
+
|
|
630
|
+
Builds the exact 512-byte canonical USTAR header for one validated bundle entry.
|
|
631
|
+
|
|
632
|
+
### Signature and result
|
|
633
|
+
|
|
634
|
+
```text
|
|
635
|
+
createCanonicalUstarHeader(entryPath, size)
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
Import it from `arcane-os` or `arcane-os/release-bundle`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
639
|
+
|
|
640
|
+
### Availability and normalization
|
|
641
|
+
|
|
642
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
643
|
+
|
|
644
|
+
### Example
|
|
645
|
+
|
|
646
|
+
```javascript
|
|
647
|
+
import {createCanonicalUstarHeader} from 'arcane-os';
|
|
648
|
+
|
|
649
|
+
async function usecreateCanonicalUstarHeader(...arguments_) {
|
|
650
|
+
return createCanonicalUstarHeader(...arguments_);
|
|
651
|
+
}
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
## discoverPackagerApps()
|
|
655
|
+
|
|
656
|
+
### Overview
|
|
657
|
+
|
|
658
|
+
Root-entry alias for the packager-specific application discovery function.
|
|
659
|
+
|
|
660
|
+
### Signature and result
|
|
661
|
+
|
|
662
|
+
```text
|
|
663
|
+
async discoverPackagerApps({workspaceRoot:requestedWorkspaceRoot})
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
667
|
+
|
|
668
|
+
### Availability and normalization
|
|
669
|
+
|
|
670
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
671
|
+
|
|
672
|
+
### Example
|
|
673
|
+
|
|
674
|
+
```javascript
|
|
675
|
+
import {discoverPackagerApps} from 'arcane-os';
|
|
676
|
+
|
|
677
|
+
async function usediscoverPackagerApps(...arguments_) {
|
|
678
|
+
return discoverPackagerApps(...arguments_);
|
|
679
|
+
}
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
## incrementSemver()
|
|
683
|
+
|
|
684
|
+
### Overview
|
|
685
|
+
|
|
686
|
+
Returns a validated semantic version incremented by the requested bump and optional prerelease id.
|
|
687
|
+
|
|
688
|
+
### Signature and result
|
|
689
|
+
|
|
690
|
+
```text
|
|
691
|
+
incrementSemver(value, bump, preid)
|
|
692
|
+
```
|
|
693
|
+
|
|
694
|
+
Import it from `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
695
|
+
|
|
696
|
+
### Availability and normalization
|
|
697
|
+
|
|
698
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
699
|
+
|
|
700
|
+
### Example
|
|
701
|
+
|
|
702
|
+
```javascript
|
|
703
|
+
import {incrementSemver} from 'arcane-os/packager';
|
|
704
|
+
|
|
705
|
+
console.log(incrementSemver('1.2.3', 'minor'));
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
## inspectApp()
|
|
709
|
+
|
|
710
|
+
### Overview
|
|
711
|
+
|
|
712
|
+
Loads and validates one packager app configuration, shared mappings, descriptor, and release inputs.
|
|
713
|
+
|
|
714
|
+
### Signature and result
|
|
715
|
+
|
|
716
|
+
```text
|
|
717
|
+
async inspectApp({workspaceRoot, appId})
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
Import it from `arcane-os` or `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
721
|
+
|
|
722
|
+
### Availability and normalization
|
|
723
|
+
|
|
724
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
725
|
+
|
|
726
|
+
### Example
|
|
727
|
+
|
|
728
|
+
```javascript
|
|
729
|
+
import {inspectApp} from 'arcane-os';
|
|
730
|
+
|
|
731
|
+
async function useinspectApp(...arguments_) {
|
|
732
|
+
return inspectApp(...arguments_);
|
|
733
|
+
}
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
## normalizeRelativePath()
|
|
737
|
+
|
|
738
|
+
### Overview
|
|
739
|
+
|
|
740
|
+
Normalizes one portable repository-relative path and rejects traversal, aliases, links, and unsafe names.
|
|
741
|
+
|
|
742
|
+
### Signature and result
|
|
743
|
+
|
|
744
|
+
```text
|
|
745
|
+
normalizeRelativePath(value, label='path')
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
Import it from `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
749
|
+
|
|
750
|
+
### Availability and normalization
|
|
751
|
+
|
|
752
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
753
|
+
|
|
754
|
+
### Example
|
|
755
|
+
|
|
756
|
+
```javascript
|
|
757
|
+
import {normalizeRelativePath} from 'arcane-os/packager';
|
|
758
|
+
|
|
759
|
+
console.log(normalizeRelativePath('apps/example/index.html'));
|
|
760
|
+
```
|
|
761
|
+
|
|
762
|
+
## packageApp()
|
|
763
|
+
|
|
764
|
+
### Overview
|
|
765
|
+
|
|
766
|
+
Builds and authenticates one browser application release through the low-level packager API.
|
|
767
|
+
|
|
768
|
+
### Signature and result
|
|
769
|
+
|
|
770
|
+
```text
|
|
771
|
+
async packageApp(options)
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
Import it from `arcane-os` or `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
775
|
+
|
|
776
|
+
### Availability and normalization
|
|
777
|
+
|
|
778
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
779
|
+
|
|
780
|
+
### Example
|
|
781
|
+
|
|
782
|
+
```javascript
|
|
783
|
+
import {packageApp} from 'arcane-os';
|
|
784
|
+
|
|
785
|
+
async function usepackageApp(...arguments_) {
|
|
786
|
+
return packageApp(...arguments_);
|
|
787
|
+
}
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
## PACKAGER_VERSION
|
|
791
|
+
|
|
792
|
+
### Overview
|
|
793
|
+
|
|
794
|
+
Builder identity written into schema-1 application release manifests.
|
|
795
|
+
|
|
796
|
+
### Value and import
|
|
797
|
+
|
|
798
|
+
```text
|
|
799
|
+
const PACKAGER_VERSION
|
|
800
|
+
```
|
|
801
|
+
|
|
802
|
+
Import it from `arcane-os/packager`. Treat arrays and records as immutable public values.
|
|
803
|
+
|
|
804
|
+
### Availability and normalization
|
|
805
|
+
|
|
806
|
+
**Node.** Exact immutable SDK value. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
807
|
+
|
|
808
|
+
### Example
|
|
809
|
+
|
|
810
|
+
```javascript
|
|
811
|
+
import {PACKAGER_VERSION} from 'arcane-os/packager';
|
|
812
|
+
|
|
813
|
+
console.log(PACKAGER_VERSION);
|
|
814
|
+
```
|
|
815
|
+
|
|
816
|
+
## packager.discoverApps()
|
|
817
|
+
|
|
818
|
+
### Overview
|
|
819
|
+
|
|
820
|
+
Discovers packager application configurations and release boundaries beneath one workspace root.
|
|
821
|
+
|
|
822
|
+
### Signature and result
|
|
823
|
+
|
|
824
|
+
```text
|
|
825
|
+
async discoverApps({workspaceRoot:requestedWorkspaceRoot})
|
|
826
|
+
```
|
|
827
|
+
|
|
828
|
+
Import it from `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
829
|
+
|
|
830
|
+
### Availability and normalization
|
|
831
|
+
|
|
832
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
833
|
+
|
|
834
|
+
### Example
|
|
835
|
+
|
|
836
|
+
```javascript
|
|
837
|
+
import {discoverApps} from 'arcane-os/packager';
|
|
838
|
+
|
|
839
|
+
async function usediscoverApps(...arguments_) {
|
|
840
|
+
return discoverApps(...arguments_);
|
|
841
|
+
}
|
|
842
|
+
```
|
|
843
|
+
|
|
844
|
+
## parseSemver()
|
|
845
|
+
|
|
846
|
+
### Overview
|
|
847
|
+
|
|
848
|
+
Parses one strict three-part semantic version with optional prerelease metadata.
|
|
849
|
+
|
|
850
|
+
### Signature and result
|
|
851
|
+
|
|
852
|
+
```text
|
|
853
|
+
parseSemver(value)
|
|
854
|
+
```
|
|
855
|
+
|
|
856
|
+
Import it from `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
857
|
+
|
|
858
|
+
### Availability and normalization
|
|
859
|
+
|
|
860
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
861
|
+
|
|
862
|
+
### Example
|
|
863
|
+
|
|
864
|
+
```javascript
|
|
865
|
+
import {parseSemver} from 'arcane-os/packager';
|
|
866
|
+
|
|
867
|
+
console.log(parseSemver('1.2.3'));
|
|
868
|
+
```
|
|
869
|
+
|
|
870
|
+
## prepareSharedPayloadSnapshot()
|
|
871
|
+
|
|
872
|
+
### Overview
|
|
873
|
+
|
|
874
|
+
Verifies and snapshots the shared runtime/dependency payload once for reuse by one packaging generation.
|
|
875
|
+
|
|
876
|
+
### Signature and result
|
|
877
|
+
|
|
878
|
+
```text
|
|
879
|
+
async prepareSharedPayloadSnapshot({ workspaceRoot:requestedWorkspaceRoot, sharedPayloadIds, signal, onEvent }={})
|
|
880
|
+
```
|
|
881
|
+
|
|
882
|
+
Import it from `arcane-os` or `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
883
|
+
|
|
884
|
+
### Availability and normalization
|
|
885
|
+
|
|
886
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
887
|
+
|
|
888
|
+
### Example
|
|
889
|
+
|
|
890
|
+
```javascript
|
|
891
|
+
import {prepareSharedPayloadSnapshot} from 'arcane-os';
|
|
892
|
+
|
|
893
|
+
async function useprepareSharedPayloadSnapshot(...arguments_) {
|
|
894
|
+
return prepareSharedPayloadSnapshot(...arguments_);
|
|
895
|
+
}
|
|
896
|
+
```
|
|
897
|
+
|
|
898
|
+
## readVerifiedAppReleaseFile()
|
|
899
|
+
|
|
900
|
+
### Overview
|
|
901
|
+
|
|
902
|
+
Reads one bounded file through an authenticated app-release receipt and rechecks its identity and digest.
|
|
903
|
+
|
|
904
|
+
### Signature and result
|
|
905
|
+
|
|
906
|
+
```text
|
|
907
|
+
async readVerifiedAppReleaseFile(receipt, { releaseRoot, relativePath, signal }={})
|
|
908
|
+
```
|
|
909
|
+
|
|
910
|
+
Import it from `arcane-os` or `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
911
|
+
|
|
912
|
+
### Availability and normalization
|
|
913
|
+
|
|
914
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
915
|
+
|
|
916
|
+
### Example
|
|
917
|
+
|
|
918
|
+
```javascript
|
|
919
|
+
import {readVerifiedAppReleaseFile} from 'arcane-os';
|
|
920
|
+
|
|
921
|
+
async function usereadVerifiedAppReleaseFile(...arguments_) {
|
|
922
|
+
return readVerifiedAppReleaseFile(...arguments_);
|
|
923
|
+
}
|
|
924
|
+
```
|
|
925
|
+
|
|
926
|
+
## RELEASE_MANIFEST_NAME
|
|
927
|
+
|
|
928
|
+
### Overview
|
|
929
|
+
|
|
930
|
+
Canonical packaged application release manifest filename.
|
|
931
|
+
|
|
932
|
+
### Value and import
|
|
933
|
+
|
|
934
|
+
```text
|
|
935
|
+
const RELEASE_MANIFEST_NAME
|
|
936
|
+
```
|
|
937
|
+
|
|
938
|
+
Import it from `arcane-os/packager`. Treat arrays and records as immutable public values.
|
|
939
|
+
|
|
940
|
+
### Availability and normalization
|
|
941
|
+
|
|
942
|
+
**Node.** Exact immutable SDK value. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
943
|
+
|
|
944
|
+
### Example
|
|
945
|
+
|
|
946
|
+
```javascript
|
|
947
|
+
import {RELEASE_MANIFEST_NAME} from 'arcane-os/packager';
|
|
948
|
+
|
|
949
|
+
console.log(RELEASE_MANIFEST_NAME);
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
## ROOT_CONFIG_NAME
|
|
953
|
+
|
|
954
|
+
### Overview
|
|
955
|
+
|
|
956
|
+
Canonical root packager configuration filename.
|
|
957
|
+
|
|
958
|
+
### Value and import
|
|
959
|
+
|
|
960
|
+
```text
|
|
961
|
+
const ROOT_CONFIG_NAME
|
|
962
|
+
```
|
|
963
|
+
|
|
964
|
+
Import it from `arcane-os/packager`. Treat arrays and records as immutable public values.
|
|
965
|
+
|
|
966
|
+
### Availability and normalization
|
|
967
|
+
|
|
968
|
+
**Node.** Exact immutable SDK value. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
969
|
+
|
|
970
|
+
### Example
|
|
971
|
+
|
|
972
|
+
```javascript
|
|
973
|
+
import {ROOT_CONFIG_NAME} from 'arcane-os/packager';
|
|
974
|
+
|
|
975
|
+
console.log(ROOT_CONFIG_NAME);
|
|
976
|
+
```
|
|
977
|
+
|
|
978
|
+
## validateAppBundlePath()
|
|
979
|
+
|
|
980
|
+
### Overview
|
|
981
|
+
|
|
982
|
+
Validates and normalizes one portable path admitted inside an external app bundle.
|
|
983
|
+
|
|
984
|
+
### Signature and result
|
|
985
|
+
|
|
986
|
+
```text
|
|
987
|
+
validateAppBundlePath(value, label='bundle path')
|
|
988
|
+
```
|
|
989
|
+
|
|
990
|
+
Import it from `arcane-os` or `arcane-os/release-bundle`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
991
|
+
|
|
992
|
+
### Availability and normalization
|
|
993
|
+
|
|
994
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
995
|
+
|
|
996
|
+
### Example
|
|
997
|
+
|
|
998
|
+
```javascript
|
|
999
|
+
import {validateAppBundlePath} from 'arcane-os';
|
|
1000
|
+
|
|
1001
|
+
console.log(validateAppBundlePath('payload/apps/example/index.html'));
|
|
1002
|
+
```
|
|
1003
|
+
|
|
1004
|
+
## validateAppConfig()
|
|
1005
|
+
|
|
1006
|
+
### Overview
|
|
1007
|
+
|
|
1008
|
+
Validates one schema-1 packager app configuration and its relationship to the root config.
|
|
1009
|
+
|
|
1010
|
+
### Signature and result
|
|
1011
|
+
|
|
1012
|
+
```text
|
|
1013
|
+
validateAppConfig(value, appId, rootConfig, configPath=`apps/${appId}/${APP_CONFIG_NAME}`)
|
|
1014
|
+
```
|
|
1015
|
+
|
|
1016
|
+
Import it from `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1017
|
+
|
|
1018
|
+
### Availability and normalization
|
|
1019
|
+
|
|
1020
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
1021
|
+
|
|
1022
|
+
### Example
|
|
1023
|
+
|
|
1024
|
+
```javascript
|
|
1025
|
+
import {validateAppConfig} from 'arcane-os/packager';
|
|
1026
|
+
|
|
1027
|
+
async function usevalidateAppConfig(...arguments_) {
|
|
1028
|
+
return validateAppConfig(...arguments_);
|
|
1029
|
+
}
|
|
1030
|
+
```
|
|
1031
|
+
|
|
1032
|
+
## validateRootConfig()
|
|
1033
|
+
|
|
1034
|
+
### Overview
|
|
1035
|
+
|
|
1036
|
+
Validates one root packager mapping and its fixed shared-route boundaries.
|
|
1037
|
+
|
|
1038
|
+
### Signature and result
|
|
1039
|
+
|
|
1040
|
+
```text
|
|
1041
|
+
validateRootConfig(value, configPath=ROOT_CONFIG_NAME)
|
|
1042
|
+
```
|
|
1043
|
+
|
|
1044
|
+
Import it from `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1045
|
+
|
|
1046
|
+
### Availability and normalization
|
|
1047
|
+
|
|
1048
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
1049
|
+
|
|
1050
|
+
### Example
|
|
1051
|
+
|
|
1052
|
+
```javascript
|
|
1053
|
+
import {validateRootConfig} from 'arcane-os/packager';
|
|
1054
|
+
|
|
1055
|
+
async function usevalidateRootConfig(...arguments_) {
|
|
1056
|
+
return validateRootConfig(...arguments_);
|
|
1057
|
+
}
|
|
1058
|
+
```
|
|
1059
|
+
|
|
1060
|
+
## verifyApp()
|
|
1061
|
+
|
|
1062
|
+
### Overview
|
|
1063
|
+
|
|
1064
|
+
Authenticates one existing browser app release through the low-level packager API.
|
|
1065
|
+
|
|
1066
|
+
### Signature and result
|
|
1067
|
+
|
|
1068
|
+
```text
|
|
1069
|
+
async verifyApp({workspaceRoot, appId, signal, onEvent})
|
|
1070
|
+
```
|
|
1071
|
+
|
|
1072
|
+
Import it from `arcane-os` or `arcane-os/packager`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1073
|
+
|
|
1074
|
+
### Availability and normalization
|
|
1075
|
+
|
|
1076
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
1077
|
+
|
|
1078
|
+
### Example
|
|
1079
|
+
|
|
1080
|
+
```javascript
|
|
1081
|
+
import {verifyApp} from 'arcane-os';
|
|
1082
|
+
|
|
1083
|
+
async function useverifyApp(...arguments_) {
|
|
1084
|
+
return verifyApp(...arguments_);
|
|
1085
|
+
}
|
|
1086
|
+
```
|
|
1087
|
+
|
|
1088
|
+
## verifyAppReleaseBundle()
|
|
1089
|
+
|
|
1090
|
+
### Overview
|
|
1091
|
+
|
|
1092
|
+
Parses and authenticates one deterministic app bundle without extraction.
|
|
1093
|
+
|
|
1094
|
+
### Signature and result
|
|
1095
|
+
|
|
1096
|
+
```text
|
|
1097
|
+
async verifyAppReleaseBundle({bundlePath, signal, onEvent}={})
|
|
1098
|
+
```
|
|
1099
|
+
|
|
1100
|
+
Import it from `arcane-os` or `arcane-os/release-bundle`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1101
|
+
|
|
1102
|
+
### Availability and normalization
|
|
1103
|
+
|
|
1104
|
+
**Node.** Normalized SDK validation and receipt; canonical archive/release bytes preserved. Deep protocol: [SDK packager, receipt, or deterministic bundle contract](protocols.md).
|
|
1105
|
+
|
|
1106
|
+
### Example
|
|
1107
|
+
|
|
1108
|
+
```javascript
|
|
1109
|
+
import {verifyAppReleaseBundle} from 'arcane-os';
|
|
1110
|
+
|
|
1111
|
+
async function useverifyAppReleaseBundle(...arguments_) {
|
|
1112
|
+
return verifyAppReleaseBundle(...arguments_);
|
|
1113
|
+
}
|
|
1114
|
+
```
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
# Runtime and app descriptors
|
|
1118
|
+
|
|
1119
|
+
## APP_DESCRIPTOR_NAME
|
|
1120
|
+
|
|
1121
|
+
### Overview
|
|
1122
|
+
|
|
1123
|
+
Canonical schema-2 application descriptor filename.
|
|
1124
|
+
|
|
1125
|
+
### Value and import
|
|
1126
|
+
|
|
1127
|
+
```text
|
|
1128
|
+
const APP_DESCRIPTOR_NAME
|
|
1129
|
+
```
|
|
1130
|
+
|
|
1131
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
1132
|
+
|
|
1133
|
+
### Availability and normalization
|
|
1134
|
+
|
|
1135
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
1136
|
+
|
|
1137
|
+
### Example
|
|
1138
|
+
|
|
1139
|
+
```javascript
|
|
1140
|
+
import {APP_DESCRIPTOR_NAME} from 'arcane-os';
|
|
1141
|
+
|
|
1142
|
+
console.log(APP_DESCRIPTOR_NAME);
|
|
1143
|
+
```
|
|
1144
|
+
|
|
1145
|
+
## APP_DESCRIPTOR_SCHEMA_VERSION
|
|
1146
|
+
|
|
1147
|
+
### Overview
|
|
1148
|
+
|
|
1149
|
+
Current authored application descriptor schema version.
|
|
1150
|
+
|
|
1151
|
+
### Value and import
|
|
1152
|
+
|
|
1153
|
+
```text
|
|
1154
|
+
const APP_DESCRIPTOR_SCHEMA_VERSION
|
|
1155
|
+
```
|
|
1156
|
+
|
|
1157
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
1158
|
+
|
|
1159
|
+
### Availability and normalization
|
|
1160
|
+
|
|
1161
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
1162
|
+
|
|
1163
|
+
### Example
|
|
1164
|
+
|
|
1165
|
+
```javascript
|
|
1166
|
+
import {APP_DESCRIPTOR_SCHEMA_VERSION} from 'arcane-os';
|
|
1167
|
+
|
|
1168
|
+
console.log(APP_DESCRIPTOR_SCHEMA_VERSION);
|
|
1169
|
+
```
|
|
1170
|
+
|
|
1171
|
+
## appDescriptorSha256()
|
|
1172
|
+
|
|
1173
|
+
### Overview
|
|
1174
|
+
|
|
1175
|
+
Returns the SHA-256 digest of the canonical validated schema-2 application descriptor.
|
|
1176
|
+
|
|
1177
|
+
### Signature and result
|
|
1178
|
+
|
|
1179
|
+
```text
|
|
1180
|
+
appDescriptorSha256(descriptor)
|
|
1181
|
+
```
|
|
1182
|
+
|
|
1183
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1184
|
+
|
|
1185
|
+
### Availability and normalization
|
|
1186
|
+
|
|
1187
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
1188
|
+
|
|
1189
|
+
### Example
|
|
1190
|
+
|
|
1191
|
+
```javascript
|
|
1192
|
+
import {appDescriptorSha256} from 'arcane-os';
|
|
1193
|
+
|
|
1194
|
+
async function useappDescriptorSha256(...arguments_) {
|
|
1195
|
+
return appDescriptorSha256(...arguments_);
|
|
1196
|
+
}
|
|
1197
|
+
```
|
|
1198
|
+
|
|
1199
|
+
## authenticateRuntimeReceipt()
|
|
1200
|
+
|
|
1201
|
+
### Overview
|
|
1202
|
+
|
|
1203
|
+
Authenticates a same-process runtime receipt against the exact runtime root and current file identities.
|
|
1204
|
+
|
|
1205
|
+
### Signature and result
|
|
1206
|
+
|
|
1207
|
+
```text
|
|
1208
|
+
async authenticateRuntimeReceipt(receipt, { runtimeRoot=path.join(sdkRoot, 'runtime'), signal }={})
|
|
1209
|
+
```
|
|
1210
|
+
|
|
1211
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1212
|
+
|
|
1213
|
+
### Availability and normalization
|
|
1214
|
+
|
|
1215
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
1216
|
+
|
|
1217
|
+
### Example
|
|
1218
|
+
|
|
1219
|
+
```javascript
|
|
1220
|
+
import {authenticateRuntimeReceipt} from 'arcane-os';
|
|
1221
|
+
|
|
1222
|
+
async function useauthenticateRuntimeReceipt(...arguments_) {
|
|
1223
|
+
return authenticateRuntimeReceipt(...arguments_);
|
|
1224
|
+
}
|
|
1225
|
+
```
|
|
1226
|
+
|
|
1227
|
+
## getSdkRoot()
|
|
1228
|
+
|
|
1229
|
+
### Overview
|
|
1230
|
+
|
|
1231
|
+
Returns the absolute installed SDK package root.
|
|
1232
|
+
|
|
1233
|
+
### Signature and result
|
|
1234
|
+
|
|
1235
|
+
```text
|
|
1236
|
+
getSdkRoot()
|
|
1237
|
+
```
|
|
1238
|
+
|
|
1239
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1240
|
+
|
|
1241
|
+
### Availability and normalization
|
|
1242
|
+
|
|
1243
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
1244
|
+
|
|
1245
|
+
### Example
|
|
1246
|
+
|
|
1247
|
+
```javascript
|
|
1248
|
+
import {getSdkRoot} from 'arcane-os';
|
|
1249
|
+
|
|
1250
|
+
console.log(getSdkRoot());
|
|
1251
|
+
```
|
|
1252
|
+
|
|
1253
|
+
## loadAppDescriptor()
|
|
1254
|
+
|
|
1255
|
+
### Overview
|
|
1256
|
+
|
|
1257
|
+
Loads an authored schema-2 descriptor or a bounded legacy projection with explicit provenance.
|
|
1258
|
+
|
|
1259
|
+
### Signature and result
|
|
1260
|
+
|
|
1261
|
+
```text
|
|
1262
|
+
async loadAppDescriptor({workspaceRoot, appRoot, appId, packageManifest})
|
|
1263
|
+
```
|
|
1264
|
+
|
|
1265
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1266
|
+
|
|
1267
|
+
### Availability and normalization
|
|
1268
|
+
|
|
1269
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
1270
|
+
|
|
1271
|
+
### Example
|
|
1272
|
+
|
|
1273
|
+
```javascript
|
|
1274
|
+
import {loadAppDescriptor} from 'arcane-os';
|
|
1275
|
+
|
|
1276
|
+
async function useloadAppDescriptor(...arguments_) {
|
|
1277
|
+
return loadAppDescriptor(...arguments_);
|
|
1278
|
+
}
|
|
1279
|
+
```
|
|
1280
|
+
|
|
1281
|
+
## loadRuntimeRelease()
|
|
1282
|
+
|
|
1283
|
+
### Overview
|
|
1284
|
+
|
|
1285
|
+
Reads and structurally validates the synchronized runtime release manifest.
|
|
1286
|
+
|
|
1287
|
+
### Signature and result
|
|
1288
|
+
|
|
1289
|
+
```text
|
|
1290
|
+
async loadRuntimeRelease({runtimeRoot=path.join(sdkRoot, 'runtime')}={})
|
|
1291
|
+
```
|
|
1292
|
+
|
|
1293
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1294
|
+
|
|
1295
|
+
### Availability and normalization
|
|
1296
|
+
|
|
1297
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
1298
|
+
|
|
1299
|
+
### Example
|
|
1300
|
+
|
|
1301
|
+
```javascript
|
|
1302
|
+
import {loadRuntimeRelease} from 'arcane-os';
|
|
1303
|
+
|
|
1304
|
+
async function useloadRuntimeRelease(...arguments_) {
|
|
1305
|
+
return loadRuntimeRelease(...arguments_);
|
|
1306
|
+
}
|
|
1307
|
+
```
|
|
1308
|
+
|
|
1309
|
+
## projectNativeDescriptor()
|
|
1310
|
+
|
|
1311
|
+
### Overview
|
|
1312
|
+
|
|
1313
|
+
Projects the canonical app descriptor into the native registry shape consumed by paired builders.
|
|
1314
|
+
|
|
1315
|
+
### Signature and result
|
|
1316
|
+
|
|
1317
|
+
```text
|
|
1318
|
+
projectNativeDescriptor(descriptor, {source}={})
|
|
1319
|
+
```
|
|
1320
|
+
|
|
1321
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1322
|
+
|
|
1323
|
+
### Availability and normalization
|
|
1324
|
+
|
|
1325
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
1326
|
+
|
|
1327
|
+
### Example
|
|
1328
|
+
|
|
1329
|
+
```javascript
|
|
1330
|
+
import {projectNativeDescriptor} from 'arcane-os';
|
|
1331
|
+
|
|
1332
|
+
async function useprojectNativeDescriptor(...arguments_) {
|
|
1333
|
+
return projectNativeDescriptor(...arguments_);
|
|
1334
|
+
}
|
|
1335
|
+
```
|
|
1336
|
+
|
|
1337
|
+
## projectPackageManifest()
|
|
1338
|
+
|
|
1339
|
+
### Overview
|
|
1340
|
+
|
|
1341
|
+
Projects a schema-2 descriptor into the compatible schema-1 application package contract.
|
|
1342
|
+
|
|
1343
|
+
### Signature and result
|
|
1344
|
+
|
|
1345
|
+
```text
|
|
1346
|
+
projectPackageManifest(descriptor)
|
|
1347
|
+
```
|
|
1348
|
+
|
|
1349
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1350
|
+
|
|
1351
|
+
### Availability and normalization
|
|
1352
|
+
|
|
1353
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
1354
|
+
|
|
1355
|
+
### Example
|
|
1356
|
+
|
|
1357
|
+
```javascript
|
|
1358
|
+
import {projectPackageManifest} from 'arcane-os';
|
|
1359
|
+
|
|
1360
|
+
async function useprojectPackageManifest(...arguments_) {
|
|
1361
|
+
return projectPackageManifest(...arguments_);
|
|
1362
|
+
}
|
|
1363
|
+
```
|
|
1364
|
+
|
|
1365
|
+
## readVerifiedRuntimeFile()
|
|
1366
|
+
|
|
1367
|
+
### Overview
|
|
1368
|
+
|
|
1369
|
+
Reads one bounded runtime file through an authenticated runtime receipt and rechecks its identity and digest.
|
|
1370
|
+
|
|
1371
|
+
### Signature and result
|
|
1372
|
+
|
|
1373
|
+
```text
|
|
1374
|
+
async readVerifiedRuntimeFile(receipt, { runtimeRoot=path.join(sdkRoot, 'runtime'), relativePath, signal }={})
|
|
1375
|
+
```
|
|
1376
|
+
|
|
1377
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1378
|
+
|
|
1379
|
+
### Availability and normalization
|
|
1380
|
+
|
|
1381
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
1382
|
+
|
|
1383
|
+
### Example
|
|
1384
|
+
|
|
1385
|
+
```javascript
|
|
1386
|
+
import {readVerifiedRuntimeFile} from 'arcane-os';
|
|
1387
|
+
|
|
1388
|
+
async function usereadVerifiedRuntimeFile(...arguments_) {
|
|
1389
|
+
return readVerifiedRuntimeFile(...arguments_);
|
|
1390
|
+
}
|
|
1391
|
+
```
|
|
1392
|
+
|
|
1393
|
+
## validateAppDescriptor()
|
|
1394
|
+
|
|
1395
|
+
### Overview
|
|
1396
|
+
|
|
1397
|
+
Strictly validates and freezes one schema-2 app descriptor, including runtime-only cross-field rules.
|
|
1398
|
+
|
|
1399
|
+
### Signature and result
|
|
1400
|
+
|
|
1401
|
+
```text
|
|
1402
|
+
validateAppDescriptor(value, {appId}={})
|
|
1403
|
+
```
|
|
1404
|
+
|
|
1405
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1406
|
+
|
|
1407
|
+
### Availability and normalization
|
|
1408
|
+
|
|
1409
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
1410
|
+
|
|
1411
|
+
### Example
|
|
1412
|
+
|
|
1413
|
+
```javascript
|
|
1414
|
+
import {validateAppDescriptor} from 'arcane-os';
|
|
1415
|
+
|
|
1416
|
+
async function usevalidateAppDescriptor(...arguments_) {
|
|
1417
|
+
return validateAppDescriptor(...arguments_);
|
|
1418
|
+
}
|
|
1419
|
+
```
|
|
1420
|
+
|
|
1421
|
+
## verifyRuntime()
|
|
1422
|
+
|
|
1423
|
+
### Overview
|
|
1424
|
+
|
|
1425
|
+
Verifies every synchronized runtime file and returns a deeply frozen same-process receipt.
|
|
1426
|
+
|
|
1427
|
+
### Signature and result
|
|
1428
|
+
|
|
1429
|
+
```text
|
|
1430
|
+
async verifyRuntime({ runtimeRoot=path.join(sdkRoot, 'runtime'), signal, onEvent }={})
|
|
1431
|
+
```
|
|
1432
|
+
|
|
1433
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1434
|
+
|
|
1435
|
+
### Availability and normalization
|
|
1436
|
+
|
|
1437
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
1438
|
+
|
|
1439
|
+
### Example
|
|
1440
|
+
|
|
1441
|
+
```javascript
|
|
1442
|
+
import {verifyRuntime} from 'arcane-os';
|
|
1443
|
+
|
|
1444
|
+
async function useverifyRuntime(...arguments_) {
|
|
1445
|
+
return verifyRuntime(...arguments_);
|
|
1446
|
+
}
|
|
1447
|
+
```
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
# Targets, native plans, and providers
|
|
1451
|
+
|
|
1452
|
+
## ARCANE_INTEGRATED_PROVIDER_RELATIVE_PATH
|
|
1453
|
+
|
|
1454
|
+
### Overview
|
|
1455
|
+
|
|
1456
|
+
Frozen repository-relative path of Arcane OS's integrated shared-development provider.
|
|
1457
|
+
|
|
1458
|
+
### Value and import
|
|
1459
|
+
|
|
1460
|
+
```text
|
|
1461
|
+
const ARCANE_INTEGRATED_PROVIDER_RELATIVE_PATH
|
|
1462
|
+
```
|
|
1463
|
+
|
|
1464
|
+
Import it from `arcane-os` or `arcane-os/integrated-provider`. Treat arrays and records as immutable public values.
|
|
1465
|
+
|
|
1466
|
+
### Availability and normalization
|
|
1467
|
+
|
|
1468
|
+
**Node; selected browser/native target or provider as documented.** Exact immutable SDK value. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1469
|
+
|
|
1470
|
+
### Example
|
|
1471
|
+
|
|
1472
|
+
```javascript
|
|
1473
|
+
import {ARCANE_INTEGRATED_PROVIDER_RELATIVE_PATH} from 'arcane-os';
|
|
1474
|
+
|
|
1475
|
+
console.log(ARCANE_INTEGRATED_PROVIDER_RELATIVE_PATH);
|
|
1476
|
+
```
|
|
1477
|
+
|
|
1478
|
+
## ARCANE_NATIVE_PROVIDER_PATHS
|
|
1479
|
+
|
|
1480
|
+
### Overview
|
|
1481
|
+
|
|
1482
|
+
Frozen target-to-provider path registry for native development providers.
|
|
1483
|
+
|
|
1484
|
+
### Value and import
|
|
1485
|
+
|
|
1486
|
+
```text
|
|
1487
|
+
const ARCANE_NATIVE_PROVIDER_PATHS
|
|
1488
|
+
```
|
|
1489
|
+
|
|
1490
|
+
Import it from `arcane-os` or `arcane-os/native-provider`. Treat arrays and records as immutable public values.
|
|
1491
|
+
|
|
1492
|
+
### Availability and normalization
|
|
1493
|
+
|
|
1494
|
+
**Node; selected browser/native target or provider as documented.** Exact immutable SDK value. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1495
|
+
|
|
1496
|
+
### Example
|
|
1497
|
+
|
|
1498
|
+
```javascript
|
|
1499
|
+
import {ARCANE_NATIVE_PROVIDER_PATHS} from 'arcane-os';
|
|
1500
|
+
|
|
1501
|
+
console.log(ARCANE_NATIVE_PROVIDER_PATHS);
|
|
1502
|
+
```
|
|
1503
|
+
|
|
1504
|
+
## ARCANE_PORTABLE_PROVIDER_PATH
|
|
1505
|
+
|
|
1506
|
+
### Overview
|
|
1507
|
+
|
|
1508
|
+
Compatibility alias for the portable provider path.
|
|
1509
|
+
|
|
1510
|
+
### Value and import
|
|
1511
|
+
|
|
1512
|
+
```text
|
|
1513
|
+
const ARCANE_PORTABLE_PROVIDER_PATH
|
|
1514
|
+
```
|
|
1515
|
+
|
|
1516
|
+
Import it from `arcane-os` or `arcane-os/native-provider`. Treat arrays and records as immutable public values.
|
|
1517
|
+
|
|
1518
|
+
### Availability and normalization
|
|
1519
|
+
|
|
1520
|
+
**Node; selected browser/native target or provider as documented.** Exact immutable SDK value. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1521
|
+
|
|
1522
|
+
### Example
|
|
1523
|
+
|
|
1524
|
+
```javascript
|
|
1525
|
+
import {ARCANE_PORTABLE_PROVIDER_PATH} from 'arcane-os';
|
|
1526
|
+
|
|
1527
|
+
console.log(ARCANE_PORTABLE_PROVIDER_PATH);
|
|
1528
|
+
```
|
|
1529
|
+
|
|
1530
|
+
## assertIntegratedNativeToolchain()
|
|
1531
|
+
|
|
1532
|
+
### Overview
|
|
1533
|
+
|
|
1534
|
+
Requires an integrated workspace and selected native toolchain root to resolve to the same canonical Arcane checkout.
|
|
1535
|
+
|
|
1536
|
+
### Signature and result
|
|
1537
|
+
|
|
1538
|
+
```text
|
|
1539
|
+
assertIntegratedNativeToolchain({workspaceMode, workspaceRoot, toolchainRoot, target}={})
|
|
1540
|
+
```
|
|
1541
|
+
|
|
1542
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1543
|
+
|
|
1544
|
+
### Availability and normalization
|
|
1545
|
+
|
|
1546
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1547
|
+
|
|
1548
|
+
### Example
|
|
1549
|
+
|
|
1550
|
+
```javascript
|
|
1551
|
+
import {assertIntegratedNativeToolchain} from 'arcane-os';
|
|
1552
|
+
|
|
1553
|
+
async function useassertIntegratedNativeToolchain(...arguments_) {
|
|
1554
|
+
return assertIntegratedNativeToolchain(...arguments_);
|
|
1555
|
+
}
|
|
1556
|
+
```
|
|
1557
|
+
|
|
1558
|
+
## assertIntegratedPortableToolchain()
|
|
1559
|
+
|
|
1560
|
+
### Overview
|
|
1561
|
+
|
|
1562
|
+
Portable-target compatibility wrapper for the integrated native checkout assertion.
|
|
1563
|
+
|
|
1564
|
+
### Signature and result
|
|
1565
|
+
|
|
1566
|
+
```text
|
|
1567
|
+
assertIntegratedPortableToolchain(options={})
|
|
1568
|
+
```
|
|
1569
|
+
|
|
1570
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1571
|
+
|
|
1572
|
+
### Availability and normalization
|
|
1573
|
+
|
|
1574
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1575
|
+
|
|
1576
|
+
### Example
|
|
1577
|
+
|
|
1578
|
+
```javascript
|
|
1579
|
+
import {assertIntegratedPortableToolchain} from 'arcane-os';
|
|
1580
|
+
|
|
1581
|
+
async function useassertIntegratedPortableToolchain(...arguments_) {
|
|
1582
|
+
return assertIntegratedPortableToolchain(...arguments_);
|
|
1583
|
+
}
|
|
1584
|
+
```
|
|
1585
|
+
|
|
1586
|
+
## assertNativeApplicationToolchainCompatibility()
|
|
1587
|
+
|
|
1588
|
+
### Overview
|
|
1589
|
+
|
|
1590
|
+
Checks a prepared native toolchain receipt against the selected application's declared Core requirements.
|
|
1591
|
+
|
|
1592
|
+
### Signature and result
|
|
1593
|
+
|
|
1594
|
+
```text
|
|
1595
|
+
assertNativeApplicationToolchainCompatibility({prepared, toolchainReceipt}={})
|
|
1596
|
+
```
|
|
1597
|
+
|
|
1598
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1599
|
+
|
|
1600
|
+
### Availability and normalization
|
|
1601
|
+
|
|
1602
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1603
|
+
|
|
1604
|
+
### Example
|
|
1605
|
+
|
|
1606
|
+
```javascript
|
|
1607
|
+
import {assertNativeApplicationToolchainCompatibility} from 'arcane-os';
|
|
1608
|
+
|
|
1609
|
+
async function useassertNativeApplicationToolchainCompatibility(...arguments_) {
|
|
1610
|
+
return assertNativeApplicationToolchainCompatibility(...arguments_);
|
|
1611
|
+
}
|
|
1612
|
+
```
|
|
1613
|
+
|
|
1614
|
+
## assertNativeToolchainCompatibility()
|
|
1615
|
+
|
|
1616
|
+
### Overview
|
|
1617
|
+
|
|
1618
|
+
Validates that a toolchain receipt provides the required Core version, protocol, features, capabilities, and methods.
|
|
1619
|
+
|
|
1620
|
+
### Signature and result
|
|
1621
|
+
|
|
1622
|
+
```text
|
|
1623
|
+
assertNativeToolchainCompatibility({ appDescriptor, toolchainReceipt, minimumCoreVersion }={})
|
|
1624
|
+
```
|
|
1625
|
+
|
|
1626
|
+
Import it from `arcane-os` or `arcane-os/native`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1627
|
+
|
|
1628
|
+
### Availability and normalization
|
|
1629
|
+
|
|
1630
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1631
|
+
|
|
1632
|
+
### Example
|
|
1633
|
+
|
|
1634
|
+
```javascript
|
|
1635
|
+
import {assertNativeToolchainCompatibility} from 'arcane-os';
|
|
1636
|
+
|
|
1637
|
+
async function useassertNativeToolchainCompatibility(...arguments_) {
|
|
1638
|
+
return assertNativeToolchainCompatibility(...arguments_);
|
|
1639
|
+
}
|
|
1640
|
+
```
|
|
1641
|
+
|
|
1642
|
+
## assertPortableToolchainCompatibility()
|
|
1643
|
+
|
|
1644
|
+
### Overview
|
|
1645
|
+
|
|
1646
|
+
Portable-target compatibility wrapper for native application/toolchain admission.
|
|
1647
|
+
|
|
1648
|
+
### Signature and result
|
|
1649
|
+
|
|
1650
|
+
```text
|
|
1651
|
+
assertPortableToolchainCompatibility(options={})
|
|
1652
|
+
```
|
|
1653
|
+
|
|
1654
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1655
|
+
|
|
1656
|
+
### Availability and normalization
|
|
1657
|
+
|
|
1658
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1659
|
+
|
|
1660
|
+
### Example
|
|
1661
|
+
|
|
1662
|
+
```javascript
|
|
1663
|
+
import {assertPortableToolchainCompatibility} from 'arcane-os';
|
|
1664
|
+
|
|
1665
|
+
async function useassertPortableToolchainCompatibility(...arguments_) {
|
|
1666
|
+
return assertPortableToolchainCompatibility(...arguments_);
|
|
1667
|
+
}
|
|
1668
|
+
```
|
|
1669
|
+
|
|
1670
|
+
## authenticateNativeBuildPlan()
|
|
1671
|
+
|
|
1672
|
+
### Overview
|
|
1673
|
+
|
|
1674
|
+
Authenticates an immutable same-process native build plan and its bound receipts before execution.
|
|
1675
|
+
|
|
1676
|
+
### Signature and result
|
|
1677
|
+
|
|
1678
|
+
```text
|
|
1679
|
+
async authenticateNativeBuildPlan(plan, { expectedNativeBuilder, expectedTarget, signal, onEvent }={})
|
|
1680
|
+
```
|
|
1681
|
+
|
|
1682
|
+
Import it from `arcane-os` or `arcane-os/native`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1683
|
+
|
|
1684
|
+
### Availability and normalization
|
|
1685
|
+
|
|
1686
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1687
|
+
|
|
1688
|
+
### Example
|
|
1689
|
+
|
|
1690
|
+
```javascript
|
|
1691
|
+
import {authenticateNativeBuildPlan} from 'arcane-os';
|
|
1692
|
+
|
|
1693
|
+
async function useauthenticateNativeBuildPlan(...arguments_) {
|
|
1694
|
+
return authenticateNativeBuildPlan(...arguments_);
|
|
1695
|
+
}
|
|
1696
|
+
```
|
|
1697
|
+
|
|
1698
|
+
## buildTarget()
|
|
1699
|
+
|
|
1700
|
+
### Overview
|
|
1701
|
+
|
|
1702
|
+
Invokes one target adapter build with explicit app, target, and artifact inputs.
|
|
1703
|
+
|
|
1704
|
+
### Signature and result
|
|
1705
|
+
|
|
1706
|
+
```text
|
|
1707
|
+
async buildTarget(options={})
|
|
1708
|
+
```
|
|
1709
|
+
|
|
1710
|
+
Import it from `arcane-os` or `arcane-os/targets`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1711
|
+
|
|
1712
|
+
### Availability and normalization
|
|
1713
|
+
|
|
1714
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1715
|
+
|
|
1716
|
+
### Example
|
|
1717
|
+
|
|
1718
|
+
```javascript
|
|
1719
|
+
import {buildTarget} from 'arcane-os';
|
|
1720
|
+
|
|
1721
|
+
async function usebuildTarget(...arguments_) {
|
|
1722
|
+
return buildTarget(...arguments_);
|
|
1723
|
+
}
|
|
1724
|
+
```
|
|
1725
|
+
|
|
1726
|
+
## createNativeBuildPlan()
|
|
1727
|
+
|
|
1728
|
+
### Overview
|
|
1729
|
+
|
|
1730
|
+
Creates one immutable, authenticated, single-attempt native plan binding app, dependencies, toolchain, request, and output roots.
|
|
1731
|
+
|
|
1732
|
+
### Signature and result
|
|
1733
|
+
|
|
1734
|
+
```text
|
|
1735
|
+
async createNativeBuildPlan({ nativeBuilder, toolchainRoot, toolchainReceipt, appReleaseRoot, appReleaseReceipt, appDescriptor, dependencyReleases=[], providerGeneration, minimumCoreVersion, protectedRoots=[], outputRoot, targetRequest, signal, onEvent }={})
|
|
1736
|
+
```
|
|
1737
|
+
|
|
1738
|
+
Import it from `arcane-os` or `arcane-os/native`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1739
|
+
|
|
1740
|
+
### Availability and normalization
|
|
1741
|
+
|
|
1742
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1743
|
+
|
|
1744
|
+
### Example
|
|
1745
|
+
|
|
1746
|
+
```javascript
|
|
1747
|
+
import {createNativeBuildPlan} from 'arcane-os';
|
|
1748
|
+
|
|
1749
|
+
async function usecreateNativeBuildPlan(...arguments_) {
|
|
1750
|
+
return createNativeBuildPlan(...arguments_);
|
|
1751
|
+
}
|
|
1752
|
+
```
|
|
1753
|
+
|
|
1754
|
+
## createNativeTargetAdapter()
|
|
1755
|
+
|
|
1756
|
+
### Overview
|
|
1757
|
+
|
|
1758
|
+
Adapts one validated native builder to the common target-adapter contract.
|
|
1759
|
+
|
|
1760
|
+
### Signature and result
|
|
1761
|
+
|
|
1762
|
+
```text
|
|
1763
|
+
createNativeTargetAdapter({targetId, nativeBuilder}={})
|
|
1764
|
+
```
|
|
1765
|
+
|
|
1766
|
+
Import it from `arcane-os` or `arcane-os/targets`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1767
|
+
|
|
1768
|
+
### Availability and normalization
|
|
1769
|
+
|
|
1770
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1771
|
+
|
|
1772
|
+
### Example
|
|
1773
|
+
|
|
1774
|
+
```javascript
|
|
1775
|
+
import {createNativeTargetAdapter} from 'arcane-os';
|
|
1776
|
+
|
|
1777
|
+
async function usecreateNativeTargetAdapter(...arguments_) {
|
|
1778
|
+
return createNativeTargetAdapter(...arguments_);
|
|
1779
|
+
}
|
|
1780
|
+
```
|
|
1781
|
+
|
|
1782
|
+
## doctorNativeTarget()
|
|
1783
|
+
|
|
1784
|
+
### Overview
|
|
1785
|
+
|
|
1786
|
+
Loads and diagnoses one explicit native provider and target without building an application.
|
|
1787
|
+
|
|
1788
|
+
### Signature and result
|
|
1789
|
+
|
|
1790
|
+
```text
|
|
1791
|
+
async doctorNativeTarget(options={})
|
|
1792
|
+
```
|
|
1793
|
+
|
|
1794
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1795
|
+
|
|
1796
|
+
### Availability and normalization
|
|
1797
|
+
|
|
1798
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1799
|
+
|
|
1800
|
+
### Example
|
|
1801
|
+
|
|
1802
|
+
```javascript
|
|
1803
|
+
import {doctorNativeTarget} from 'arcane-os';
|
|
1804
|
+
|
|
1805
|
+
async function usedoctorNativeTarget(...arguments_) {
|
|
1806
|
+
return doctorNativeTarget(...arguments_);
|
|
1807
|
+
}
|
|
1808
|
+
```
|
|
1809
|
+
|
|
1810
|
+
## executeNativeBuildPlan()
|
|
1811
|
+
|
|
1812
|
+
### Overview
|
|
1813
|
+
|
|
1814
|
+
Consumes one authenticated single-attempt native plan through its bound builder and event/cancellation lifecycle.
|
|
1815
|
+
|
|
1816
|
+
### Signature and result
|
|
1817
|
+
|
|
1818
|
+
```text
|
|
1819
|
+
async executeNativeBuildPlan(plan, { expectedNativeBuilder, expectedTarget, signal, onEvent }={})
|
|
1820
|
+
```
|
|
1821
|
+
|
|
1822
|
+
Import it from `arcane-os` or `arcane-os/native`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1823
|
+
|
|
1824
|
+
### Availability and normalization
|
|
1825
|
+
|
|
1826
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1827
|
+
|
|
1828
|
+
### Example
|
|
1829
|
+
|
|
1830
|
+
```javascript
|
|
1831
|
+
import {executeNativeBuildPlan} from 'arcane-os';
|
|
1832
|
+
|
|
1833
|
+
async function useexecuteNativeBuildPlan(...arguments_) {
|
|
1834
|
+
return executeNativeBuildPlan(...arguments_);
|
|
1835
|
+
}
|
|
1836
|
+
```
|
|
1837
|
+
|
|
1838
|
+
## getTargetAdapter()
|
|
1839
|
+
|
|
1840
|
+
### Overview
|
|
1841
|
+
|
|
1842
|
+
Returns the registered adapter for one exact target id or fails for an unknown target.
|
|
1843
|
+
|
|
1844
|
+
### Signature and result
|
|
1845
|
+
|
|
1846
|
+
```text
|
|
1847
|
+
getTargetAdapter(targetId)
|
|
1848
|
+
```
|
|
1849
|
+
|
|
1850
|
+
Import it from `arcane-os` or `arcane-os/targets`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1851
|
+
|
|
1852
|
+
### Availability and normalization
|
|
1853
|
+
|
|
1854
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1855
|
+
|
|
1856
|
+
### Example
|
|
1857
|
+
|
|
1858
|
+
```javascript
|
|
1859
|
+
import {getTargetAdapter} from 'arcane-os';
|
|
1860
|
+
|
|
1861
|
+
async function usegetTargetAdapter(...arguments_) {
|
|
1862
|
+
return getTargetAdapter(...arguments_);
|
|
1863
|
+
}
|
|
1864
|
+
```
|
|
1865
|
+
|
|
1866
|
+
## INTEGRATED_TOOLCHAIN_PROTOCOL
|
|
1867
|
+
|
|
1868
|
+
### Overview
|
|
1869
|
+
|
|
1870
|
+
Protocol required from the fixed integrated shared-development provider.
|
|
1871
|
+
|
|
1872
|
+
### Value and import
|
|
1873
|
+
|
|
1874
|
+
```text
|
|
1875
|
+
const INTEGRATED_TOOLCHAIN_PROTOCOL
|
|
1876
|
+
```
|
|
1877
|
+
|
|
1878
|
+
Import it from `arcane-os` or `arcane-os/integrated-provider`. Treat arrays and records as immutable public values.
|
|
1879
|
+
|
|
1880
|
+
### Availability and normalization
|
|
1881
|
+
|
|
1882
|
+
**Node; selected browser/native target or provider as documented.** Exact immutable SDK value. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1883
|
+
|
|
1884
|
+
### Example
|
|
1885
|
+
|
|
1886
|
+
```javascript
|
|
1887
|
+
import {INTEGRATED_TOOLCHAIN_PROTOCOL} from 'arcane-os';
|
|
1888
|
+
|
|
1889
|
+
console.log(INTEGRATED_TOOLCHAIN_PROTOCOL);
|
|
1890
|
+
```
|
|
1891
|
+
|
|
1892
|
+
## listTargets()
|
|
1893
|
+
|
|
1894
|
+
### Overview
|
|
1895
|
+
|
|
1896
|
+
Returns the frozen target descriptors without running an operation lifecycle.
|
|
1897
|
+
|
|
1898
|
+
### Signature and result
|
|
1899
|
+
|
|
1900
|
+
```text
|
|
1901
|
+
listTargets()
|
|
1902
|
+
```
|
|
1903
|
+
|
|
1904
|
+
Import it from `arcane-os` or `arcane-os/targets`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1905
|
+
|
|
1906
|
+
### Availability and normalization
|
|
1907
|
+
|
|
1908
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1909
|
+
|
|
1910
|
+
### Example
|
|
1911
|
+
|
|
1912
|
+
```javascript
|
|
1913
|
+
import {listTargets} from 'arcane-os';
|
|
1914
|
+
|
|
1915
|
+
console.table(listTargets());
|
|
1916
|
+
```
|
|
1917
|
+
|
|
1918
|
+
## loadArcaneIntegratedProvider()
|
|
1919
|
+
|
|
1920
|
+
### Overview
|
|
1921
|
+
|
|
1922
|
+
Loads and authenticates the fixed Arcane-owned integrated development provider generation.
|
|
1923
|
+
|
|
1924
|
+
### Signature and result
|
|
1925
|
+
|
|
1926
|
+
```text
|
|
1927
|
+
loadArcaneIntegratedProvider({ arcaneRoot, signal, onEvent, run=runProcess }={})
|
|
1928
|
+
```
|
|
1929
|
+
|
|
1930
|
+
Import it from `arcane-os` or `arcane-os/integrated-provider`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1931
|
+
|
|
1932
|
+
### Availability and normalization
|
|
1933
|
+
|
|
1934
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1935
|
+
|
|
1936
|
+
### Example
|
|
1937
|
+
|
|
1938
|
+
```javascript
|
|
1939
|
+
import {loadArcaneIntegratedProvider} from 'arcane-os';
|
|
1940
|
+
|
|
1941
|
+
async function useloadArcaneIntegratedProvider(...arguments_) {
|
|
1942
|
+
return loadArcaneIntegratedProvider(...arguments_);
|
|
1943
|
+
}
|
|
1944
|
+
```
|
|
1945
|
+
|
|
1946
|
+
## loadArcaneNativeProvider()
|
|
1947
|
+
|
|
1948
|
+
### Overview
|
|
1949
|
+
|
|
1950
|
+
Loads the fixed provider for one target from an explicitly selected Arcane OS
|
|
1951
|
+
checkout and authenticates that provider generation for the current SDK process.
|
|
1952
|
+
|
|
1953
|
+
### Signature and result
|
|
1954
|
+
|
|
1955
|
+
```text
|
|
1956
|
+
loadArcaneNativeProvider({ arcaneRoot, target, inspect=lstat, canonicalize=realpath, readModule=readFile, importModule=specifier=>import(specifier), generationCache=providerGenerationCache, signal, onEvent }={})
|
|
1957
|
+
```
|
|
1958
|
+
|
|
1959
|
+
Import it from `arcane-os` or `arcane-os/native-provider`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1960
|
+
|
|
1961
|
+
### Availability and normalization
|
|
1962
|
+
|
|
1963
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1964
|
+
|
|
1965
|
+
### Example
|
|
1966
|
+
|
|
1967
|
+
```javascript
|
|
1968
|
+
import {loadArcaneNativeProvider} from 'arcane-os';
|
|
1969
|
+
|
|
1970
|
+
async function useloadArcaneNativeProvider(...arguments_) {
|
|
1971
|
+
return loadArcaneNativeProvider(...arguments_);
|
|
1972
|
+
}
|
|
1973
|
+
```
|
|
1974
|
+
|
|
1975
|
+
## loadArcanePortableProvider()
|
|
1976
|
+
|
|
1977
|
+
### Overview
|
|
1978
|
+
|
|
1979
|
+
Compatibility wrapper that loads the portable native provider.
|
|
1980
|
+
|
|
1981
|
+
### Signature and result
|
|
1982
|
+
|
|
1983
|
+
```text
|
|
1984
|
+
loadArcanePortableProvider(options={})
|
|
1985
|
+
```
|
|
1986
|
+
|
|
1987
|
+
Import it from `arcane-os` or `arcane-os/native-provider`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
1988
|
+
|
|
1989
|
+
### Availability and normalization
|
|
1990
|
+
|
|
1991
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
1992
|
+
|
|
1993
|
+
### Example
|
|
1994
|
+
|
|
1995
|
+
```javascript
|
|
1996
|
+
import {loadArcanePortableProvider} from 'arcane-os';
|
|
1997
|
+
|
|
1998
|
+
async function useloadArcanePortableProvider(...arguments_) {
|
|
1999
|
+
return loadArcanePortableProvider(...arguments_);
|
|
2000
|
+
}
|
|
2001
|
+
```
|
|
2002
|
+
|
|
2003
|
+
## NATIVE_BUILD_PLAN_PROTOCOL
|
|
2004
|
+
|
|
2005
|
+
### Overview
|
|
2006
|
+
|
|
2007
|
+
Protocol identifier for immutable authenticated native build plans.
|
|
2008
|
+
|
|
2009
|
+
### Value and import
|
|
2010
|
+
|
|
2011
|
+
```text
|
|
2012
|
+
const NATIVE_BUILD_PLAN_PROTOCOL
|
|
2013
|
+
```
|
|
2014
|
+
|
|
2015
|
+
Import it from `arcane-os` or `arcane-os/native`. Treat arrays and records as immutable public values.
|
|
2016
|
+
|
|
2017
|
+
### Availability and normalization
|
|
2018
|
+
|
|
2019
|
+
**Node; selected browser/native target or provider as documented.** Exact immutable SDK value. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
2020
|
+
|
|
2021
|
+
### Example
|
|
2022
|
+
|
|
2023
|
+
```javascript
|
|
2024
|
+
import {NATIVE_BUILD_PLAN_PROTOCOL} from 'arcane-os';
|
|
2025
|
+
|
|
2026
|
+
console.log(NATIVE_BUILD_PLAN_PROTOCOL);
|
|
2027
|
+
```
|
|
2028
|
+
|
|
2029
|
+
## NATIVE_BUILDER_PROTOCOL
|
|
2030
|
+
|
|
2031
|
+
### Overview
|
|
2032
|
+
|
|
2033
|
+
Protocol identifier required from injected native builders.
|
|
2034
|
+
|
|
2035
|
+
### Value and import
|
|
2036
|
+
|
|
2037
|
+
```text
|
|
2038
|
+
const NATIVE_BUILDER_PROTOCOL
|
|
2039
|
+
```
|
|
2040
|
+
|
|
2041
|
+
Import it from `arcane-os` or `arcane-os/native`. Treat arrays and records as immutable public values.
|
|
2042
|
+
|
|
2043
|
+
### Availability and normalization
|
|
2044
|
+
|
|
2045
|
+
**Node; selected browser/native target or provider as documented.** Exact immutable SDK value. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
2046
|
+
|
|
2047
|
+
### Example
|
|
2048
|
+
|
|
2049
|
+
```javascript
|
|
2050
|
+
import {NATIVE_BUILDER_PROTOCOL} from 'arcane-os';
|
|
2051
|
+
|
|
2052
|
+
console.log(NATIVE_BUILDER_PROTOCOL);
|
|
2053
|
+
```
|
|
2054
|
+
|
|
2055
|
+
## prepareNativeTarget()
|
|
2056
|
+
|
|
2057
|
+
### Overview
|
|
2058
|
+
|
|
2059
|
+
Runs one provider toolchain preparation and returns its authenticated process-owned receipt.
|
|
2060
|
+
|
|
2061
|
+
### Signature and result
|
|
2062
|
+
|
|
2063
|
+
```text
|
|
2064
|
+
async prepareNativeTarget(options={})
|
|
2065
|
+
```
|
|
2066
|
+
|
|
2067
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2068
|
+
|
|
2069
|
+
### Availability and normalization
|
|
2070
|
+
|
|
2071
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
2072
|
+
|
|
2073
|
+
### Example
|
|
2074
|
+
|
|
2075
|
+
```javascript
|
|
2076
|
+
import {prepareNativeTarget} from 'arcane-os';
|
|
2077
|
+
|
|
2078
|
+
async function useprepareNativeTarget(...arguments_) {
|
|
2079
|
+
return prepareNativeTarget(...arguments_);
|
|
2080
|
+
}
|
|
2081
|
+
```
|
|
2082
|
+
|
|
2083
|
+
## resolveNativeBuildOutputRoot()
|
|
2084
|
+
|
|
2085
|
+
### Overview
|
|
2086
|
+
|
|
2087
|
+
Resolves and validates one native output root, including integrated-checkout non-overlap.
|
|
2088
|
+
|
|
2089
|
+
### Signature and result
|
|
2090
|
+
|
|
2091
|
+
```text
|
|
2092
|
+
resolveNativeBuildOutputRoot({target, workspaceMode, workspaceRoot, outputRoot}={})
|
|
2093
|
+
```
|
|
2094
|
+
|
|
2095
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2096
|
+
|
|
2097
|
+
### Availability and normalization
|
|
2098
|
+
|
|
2099
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
2100
|
+
|
|
2101
|
+
### Example
|
|
2102
|
+
|
|
2103
|
+
```javascript
|
|
2104
|
+
import {resolveNativeBuildOutputRoot} from 'arcane-os';
|
|
2105
|
+
|
|
2106
|
+
async function useresolveNativeBuildOutputRoot(...arguments_) {
|
|
2107
|
+
return resolveNativeBuildOutputRoot(...arguments_);
|
|
2108
|
+
}
|
|
2109
|
+
```
|
|
2110
|
+
|
|
2111
|
+
## resolvePortableBuildOutputRoot()
|
|
2112
|
+
|
|
2113
|
+
### Overview
|
|
2114
|
+
|
|
2115
|
+
Portable-target compatibility wrapper for native output-root resolution.
|
|
2116
|
+
|
|
2117
|
+
### Signature and result
|
|
2118
|
+
|
|
2119
|
+
```text
|
|
2120
|
+
resolvePortableBuildOutputRoot(options={})
|
|
2121
|
+
```
|
|
2122
|
+
|
|
2123
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2124
|
+
|
|
2125
|
+
### Availability and normalization
|
|
2126
|
+
|
|
2127
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
2128
|
+
|
|
2129
|
+
### Example
|
|
2130
|
+
|
|
2131
|
+
```javascript
|
|
2132
|
+
import {resolvePortableBuildOutputRoot} from 'arcane-os';
|
|
2133
|
+
|
|
2134
|
+
async function useresolvePortableBuildOutputRoot(...arguments_) {
|
|
2135
|
+
return resolvePortableBuildOutputRoot(...arguments_);
|
|
2136
|
+
}
|
|
2137
|
+
```
|
|
2138
|
+
|
|
2139
|
+
## runTarget()
|
|
2140
|
+
|
|
2141
|
+
### Overview
|
|
2142
|
+
|
|
2143
|
+
Invokes one target adapter run method and fails honestly when the artifact kind is not runnable.
|
|
2144
|
+
|
|
2145
|
+
### Signature and result
|
|
2146
|
+
|
|
2147
|
+
```text
|
|
2148
|
+
async runTarget(options={})
|
|
2149
|
+
```
|
|
2150
|
+
|
|
2151
|
+
Import it from `arcane-os` or `arcane-os/targets`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2152
|
+
|
|
2153
|
+
### Availability and normalization
|
|
2154
|
+
|
|
2155
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
2156
|
+
|
|
2157
|
+
### Example
|
|
2158
|
+
|
|
2159
|
+
```javascript
|
|
2160
|
+
import {runTarget} from 'arcane-os';
|
|
2161
|
+
|
|
2162
|
+
async function userunTarget(...arguments_) {
|
|
2163
|
+
return runTarget(...arguments_);
|
|
2164
|
+
}
|
|
2165
|
+
```
|
|
2166
|
+
|
|
2167
|
+
## TARGET_ADAPTER_PROTOCOL
|
|
2168
|
+
|
|
2169
|
+
### Overview
|
|
2170
|
+
|
|
2171
|
+
Protocol required from target adapter descriptors and implementations.
|
|
2172
|
+
|
|
2173
|
+
### Value and import
|
|
2174
|
+
|
|
2175
|
+
```text
|
|
2176
|
+
const TARGET_ADAPTER_PROTOCOL
|
|
2177
|
+
```
|
|
2178
|
+
|
|
2179
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2180
|
+
|
|
2181
|
+
### Availability and normalization
|
|
2182
|
+
|
|
2183
|
+
**Node; selected browser/native target or provider as documented.** Exact immutable SDK value. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
2184
|
+
|
|
2185
|
+
### Example
|
|
2186
|
+
|
|
2187
|
+
```javascript
|
|
2188
|
+
import {TARGET_ADAPTER_PROTOCOL} from 'arcane-os';
|
|
2189
|
+
|
|
2190
|
+
console.log(TARGET_ADAPTER_PROTOCOL);
|
|
2191
|
+
```
|
|
2192
|
+
|
|
2193
|
+
## TARGET_IDS
|
|
2194
|
+
|
|
2195
|
+
### Overview
|
|
2196
|
+
|
|
2197
|
+
Frozen list of currently exposed target identifiers.
|
|
2198
|
+
|
|
2199
|
+
### Value and import
|
|
2200
|
+
|
|
2201
|
+
```text
|
|
2202
|
+
const TARGET_IDS
|
|
2203
|
+
```
|
|
2204
|
+
|
|
2205
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2206
|
+
|
|
2207
|
+
### Availability and normalization
|
|
2208
|
+
|
|
2209
|
+
**Node; selected browser/native target or provider as documented.** Exact immutable SDK value. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
2210
|
+
|
|
2211
|
+
### Example
|
|
2212
|
+
|
|
2213
|
+
```javascript
|
|
2214
|
+
import {TARGET_IDS} from 'arcane-os';
|
|
2215
|
+
|
|
2216
|
+
console.log(TARGET_IDS);
|
|
2217
|
+
```
|
|
2218
|
+
|
|
2219
|
+
## validateNativeBuilder()
|
|
2220
|
+
|
|
2221
|
+
### Overview
|
|
2222
|
+
|
|
2223
|
+
Validates a native builder's protocol and required describe/doctor/prepare/build/verify/run methods.
|
|
2224
|
+
|
|
2225
|
+
### Signature and result
|
|
2226
|
+
|
|
2227
|
+
```text
|
|
2228
|
+
validateNativeBuilder(provider)
|
|
2229
|
+
```
|
|
2230
|
+
|
|
2231
|
+
Import it from `arcane-os` or `arcane-os/native`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2232
|
+
|
|
2233
|
+
### Availability and normalization
|
|
2234
|
+
|
|
2235
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
2236
|
+
|
|
2237
|
+
### Example
|
|
2238
|
+
|
|
2239
|
+
```javascript
|
|
2240
|
+
import {validateNativeBuilder} from 'arcane-os';
|
|
2241
|
+
|
|
2242
|
+
async function usevalidateNativeBuilder(...arguments_) {
|
|
2243
|
+
return validateNativeBuilder(...arguments_);
|
|
2244
|
+
}
|
|
2245
|
+
```
|
|
2246
|
+
|
|
2247
|
+
## verifyNativeArtifact()
|
|
2248
|
+
|
|
2249
|
+
### Overview
|
|
2250
|
+
|
|
2251
|
+
Authenticates one target artifact through the exact prepared provider/toolchain receipt.
|
|
2252
|
+
|
|
2253
|
+
### Signature and result
|
|
2254
|
+
|
|
2255
|
+
```text
|
|
2256
|
+
async verifyNativeArtifact(options={})
|
|
2257
|
+
```
|
|
2258
|
+
|
|
2259
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2260
|
+
|
|
2261
|
+
### Availability and normalization
|
|
2262
|
+
|
|
2263
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
2264
|
+
|
|
2265
|
+
### Example
|
|
2266
|
+
|
|
2267
|
+
```javascript
|
|
2268
|
+
import {verifyNativeArtifact} from 'arcane-os';
|
|
2269
|
+
|
|
2270
|
+
async function useverifyNativeArtifact(...arguments_) {
|
|
2271
|
+
return verifyNativeArtifact(...arguments_);
|
|
2272
|
+
}
|
|
2273
|
+
```
|
|
2274
|
+
|
|
2275
|
+
## verifyTarget()
|
|
2276
|
+
|
|
2277
|
+
### Overview
|
|
2278
|
+
|
|
2279
|
+
Invokes one target adapter's artifact verification boundary.
|
|
2280
|
+
|
|
2281
|
+
### Signature and result
|
|
2282
|
+
|
|
2283
|
+
```text
|
|
2284
|
+
async verifyTarget(options={})
|
|
2285
|
+
```
|
|
2286
|
+
|
|
2287
|
+
Import it from `arcane-os` or `arcane-os/targets`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2288
|
+
|
|
2289
|
+
### Availability and normalization
|
|
2290
|
+
|
|
2291
|
+
**Node; selected browser/native target or provider as documented.** Normalized plan/admission/receipt; target-specific artifact detail preserved. Deep protocol: [arcane-target-adapter/1, arcane-native-build-plan/1, or provider protocol](protocols.md).
|
|
2292
|
+
|
|
2293
|
+
### Example
|
|
2294
|
+
|
|
2295
|
+
```javascript
|
|
2296
|
+
import {verifyTarget} from 'arcane-os';
|
|
2297
|
+
|
|
2298
|
+
async function useverifyTarget(...arguments_) {
|
|
2299
|
+
return verifyTarget(...arguments_);
|
|
2300
|
+
}
|
|
2301
|
+
```
|
|
2302
|
+
|
|
2303
|
+
|
|
2304
|
+
# Identity and protocol constants
|
|
2305
|
+
|
|
2306
|
+
## ARCANE_MACHINE_BUNDLE_VERSION
|
|
2307
|
+
|
|
2308
|
+
### Overview
|
|
2309
|
+
|
|
2310
|
+
Exact Arcane machine-bundle generation paired with this SDK runtime.
|
|
2311
|
+
|
|
2312
|
+
### Value and import
|
|
2313
|
+
|
|
2314
|
+
```text
|
|
2315
|
+
const ARCANE_MACHINE_BUNDLE_VERSION
|
|
2316
|
+
```
|
|
2317
|
+
|
|
2318
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2319
|
+
|
|
2320
|
+
### Availability and normalization
|
|
2321
|
+
|
|
2322
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
2323
|
+
|
|
2324
|
+
### Example
|
|
2325
|
+
|
|
2326
|
+
```javascript
|
|
2327
|
+
import {ARCANE_MACHINE_BUNDLE_VERSION} from 'arcane-os';
|
|
2328
|
+
|
|
2329
|
+
console.log(ARCANE_MACHINE_BUNDLE_VERSION);
|
|
2330
|
+
```
|
|
2331
|
+
|
|
2332
|
+
## ARCANE_PROTOCOL
|
|
2333
|
+
|
|
2334
|
+
### Overview
|
|
2335
|
+
|
|
2336
|
+
Application-facing Arcane bridge protocol required by this SDK.
|
|
2337
|
+
|
|
2338
|
+
### Value and import
|
|
2339
|
+
|
|
2340
|
+
```text
|
|
2341
|
+
const ARCANE_PROTOCOL
|
|
2342
|
+
```
|
|
2343
|
+
|
|
2344
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2345
|
+
|
|
2346
|
+
### Availability and normalization
|
|
2347
|
+
|
|
2348
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
2349
|
+
|
|
2350
|
+
### Example
|
|
2351
|
+
|
|
2352
|
+
```javascript
|
|
2353
|
+
import {ARCANE_PROTOCOL} from 'arcane-os';
|
|
2354
|
+
|
|
2355
|
+
console.log(ARCANE_PROTOCOL);
|
|
2356
|
+
```
|
|
2357
|
+
|
|
2358
|
+
## ARCANE_UPSTREAM_COMMIT
|
|
2359
|
+
|
|
2360
|
+
### Overview
|
|
2361
|
+
|
|
2362
|
+
Exact Arcane OS source commit from which the synchronized runtime was built.
|
|
2363
|
+
|
|
2364
|
+
### Value and import
|
|
2365
|
+
|
|
2366
|
+
```text
|
|
2367
|
+
const ARCANE_UPSTREAM_COMMIT
|
|
2368
|
+
```
|
|
2369
|
+
|
|
2370
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2371
|
+
|
|
2372
|
+
### Availability and normalization
|
|
2373
|
+
|
|
2374
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
2375
|
+
|
|
2376
|
+
### Example
|
|
2377
|
+
|
|
2378
|
+
```javascript
|
|
2379
|
+
import {ARCANE_UPSTREAM_COMMIT} from 'arcane-os';
|
|
2380
|
+
|
|
2381
|
+
console.log(ARCANE_UPSTREAM_COMMIT);
|
|
2382
|
+
```
|
|
2383
|
+
|
|
2384
|
+
## ARCANE_UPSTREAM_REPOSITORY
|
|
2385
|
+
|
|
2386
|
+
### Overview
|
|
2387
|
+
|
|
2388
|
+
Canonical upstream Arcane OS repository URL.
|
|
2389
|
+
|
|
2390
|
+
### Value and import
|
|
2391
|
+
|
|
2392
|
+
```text
|
|
2393
|
+
const ARCANE_UPSTREAM_REPOSITORY
|
|
2394
|
+
```
|
|
2395
|
+
|
|
2396
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2397
|
+
|
|
2398
|
+
### Availability and normalization
|
|
2399
|
+
|
|
2400
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
2401
|
+
|
|
2402
|
+
### Example
|
|
2403
|
+
|
|
2404
|
+
```javascript
|
|
2405
|
+
import {ARCANE_UPSTREAM_REPOSITORY} from 'arcane-os';
|
|
2406
|
+
|
|
2407
|
+
console.log(ARCANE_UPSTREAM_REPOSITORY);
|
|
2408
|
+
```
|
|
2409
|
+
|
|
2410
|
+
## CLI_EVENT_PROTOCOL
|
|
2411
|
+
|
|
2412
|
+
### Overview
|
|
2413
|
+
|
|
2414
|
+
Version identifier for normalized CLI JSON and NDJSON event envelopes.
|
|
2415
|
+
|
|
2416
|
+
### Value and import
|
|
2417
|
+
|
|
2418
|
+
```text
|
|
2419
|
+
const CLI_EVENT_PROTOCOL
|
|
2420
|
+
```
|
|
2421
|
+
|
|
2422
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2423
|
+
|
|
2424
|
+
### Availability and normalization
|
|
2425
|
+
|
|
2426
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
2427
|
+
|
|
2428
|
+
### Example
|
|
2429
|
+
|
|
2430
|
+
```javascript
|
|
2431
|
+
import {CLI_EVENT_PROTOCOL} from 'arcane-os';
|
|
2432
|
+
|
|
2433
|
+
console.log(CLI_EVENT_PROTOCOL);
|
|
2434
|
+
```
|
|
2435
|
+
|
|
2436
|
+
## CLI_NAME
|
|
2437
|
+
|
|
2438
|
+
### Overview
|
|
2439
|
+
|
|
2440
|
+
Primary command name presented by the SDK.
|
|
2441
|
+
|
|
2442
|
+
### Value and import
|
|
2443
|
+
|
|
2444
|
+
```text
|
|
2445
|
+
const CLI_NAME
|
|
2446
|
+
```
|
|
2447
|
+
|
|
2448
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2449
|
+
|
|
2450
|
+
### Availability and normalization
|
|
2451
|
+
|
|
2452
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
2453
|
+
|
|
2454
|
+
### Example
|
|
2455
|
+
|
|
2456
|
+
```javascript
|
|
2457
|
+
import {CLI_NAME} from 'arcane-os';
|
|
2458
|
+
|
|
2459
|
+
console.log(CLI_NAME);
|
|
2460
|
+
```
|
|
2461
|
+
|
|
2462
|
+
## OUTPUT_MODES
|
|
2463
|
+
|
|
2464
|
+
### Overview
|
|
2465
|
+
|
|
2466
|
+
Frozen supported CLI output modes: human, JSON, and NDJSON.
|
|
2467
|
+
|
|
2468
|
+
### Value and import
|
|
2469
|
+
|
|
2470
|
+
```text
|
|
2471
|
+
const OUTPUT_MODES
|
|
2472
|
+
```
|
|
2473
|
+
|
|
2474
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2475
|
+
|
|
2476
|
+
### Availability and normalization
|
|
2477
|
+
|
|
2478
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
2479
|
+
|
|
2480
|
+
### Example
|
|
2481
|
+
|
|
2482
|
+
```javascript
|
|
2483
|
+
import {OUTPUT_MODES} from 'arcane-os';
|
|
2484
|
+
|
|
2485
|
+
console.log(OUTPUT_MODES);
|
|
2486
|
+
```
|
|
2487
|
+
|
|
2488
|
+
## RUNTIME_ROOT
|
|
2489
|
+
|
|
2490
|
+
### Overview
|
|
2491
|
+
|
|
2492
|
+
Absolute installed SDK runtime directory for the current process.
|
|
2493
|
+
|
|
2494
|
+
### Value and import
|
|
2495
|
+
|
|
2496
|
+
```text
|
|
2497
|
+
const RUNTIME_ROOT
|
|
2498
|
+
```
|
|
2499
|
+
|
|
2500
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2501
|
+
|
|
2502
|
+
### Availability and normalization
|
|
2503
|
+
|
|
2504
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
2505
|
+
|
|
2506
|
+
### Example
|
|
2507
|
+
|
|
2508
|
+
```javascript
|
|
2509
|
+
import {RUNTIME_ROOT} from 'arcane-os';
|
|
2510
|
+
|
|
2511
|
+
console.log(RUNTIME_ROOT);
|
|
2512
|
+
```
|
|
2513
|
+
|
|
2514
|
+
## SDK_NAME
|
|
2515
|
+
|
|
2516
|
+
### Overview
|
|
2517
|
+
|
|
2518
|
+
Published npm package name.
|
|
2519
|
+
|
|
2520
|
+
### Value and import
|
|
2521
|
+
|
|
2522
|
+
```text
|
|
2523
|
+
const SDK_NAME
|
|
2524
|
+
```
|
|
2525
|
+
|
|
2526
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2527
|
+
|
|
2528
|
+
### Availability and normalization
|
|
2529
|
+
|
|
2530
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
2531
|
+
|
|
2532
|
+
### Example
|
|
2533
|
+
|
|
2534
|
+
```javascript
|
|
2535
|
+
import {SDK_NAME} from 'arcane-os';
|
|
2536
|
+
|
|
2537
|
+
console.log(SDK_NAME);
|
|
2538
|
+
```
|
|
2539
|
+
|
|
2540
|
+
## SDK_ROOT
|
|
2541
|
+
|
|
2542
|
+
### Overview
|
|
2543
|
+
|
|
2544
|
+
Absolute installed package root for the current process.
|
|
2545
|
+
|
|
2546
|
+
### Value and import
|
|
2547
|
+
|
|
2548
|
+
```text
|
|
2549
|
+
const SDK_ROOT
|
|
2550
|
+
```
|
|
2551
|
+
|
|
2552
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2553
|
+
|
|
2554
|
+
### Availability and normalization
|
|
2555
|
+
|
|
2556
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
2557
|
+
|
|
2558
|
+
### Example
|
|
2559
|
+
|
|
2560
|
+
```javascript
|
|
2561
|
+
import {SDK_ROOT} from 'arcane-os';
|
|
2562
|
+
|
|
2563
|
+
console.log(SDK_ROOT);
|
|
2564
|
+
```
|
|
2565
|
+
|
|
2566
|
+
## SDK_VERSION
|
|
2567
|
+
|
|
2568
|
+
### Overview
|
|
2569
|
+
|
|
2570
|
+
Exact SDK package version.
|
|
2571
|
+
|
|
2572
|
+
### Value and import
|
|
2573
|
+
|
|
2574
|
+
```text
|
|
2575
|
+
const SDK_VERSION
|
|
2576
|
+
```
|
|
2577
|
+
|
|
2578
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2579
|
+
|
|
2580
|
+
### Availability and normalization
|
|
2581
|
+
|
|
2582
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
2583
|
+
|
|
2584
|
+
### Example
|
|
2585
|
+
|
|
2586
|
+
```javascript
|
|
2587
|
+
import {SDK_VERSION} from 'arcane-os';
|
|
2588
|
+
|
|
2589
|
+
console.log(SDK_VERSION);
|
|
2590
|
+
```
|
|
2591
|
+
|
|
2592
|
+
|
|
2593
|
+
# Errors
|
|
2594
|
+
|
|
2595
|
+
## ArcaneError
|
|
2596
|
+
|
|
2597
|
+
### Overview
|
|
2598
|
+
|
|
2599
|
+
Normalized SDK error class carrying a stable code, human message, optional resolution details, cause, and exit status.
|
|
2600
|
+
|
|
2601
|
+
### Signature and result
|
|
2602
|
+
|
|
2603
|
+
```text
|
|
2604
|
+
new ArcaneError(code, message, {details, cause, exitCode}={})
|
|
2605
|
+
```
|
|
2606
|
+
|
|
2607
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2608
|
+
|
|
2609
|
+
### Availability and normalization
|
|
2610
|
+
|
|
2611
|
+
**Node.** ArcaneError and JSON-safe error normalization. Deep protocol: [Node ESM](protocols.md).
|
|
2612
|
+
|
|
2613
|
+
### Example
|
|
2614
|
+
|
|
2615
|
+
```javascript
|
|
2616
|
+
import {ArcaneError, ERROR_CODES} from 'arcane-os';
|
|
2617
|
+
|
|
2618
|
+
const error = new ArcaneError(
|
|
2619
|
+
ERROR_CODES.usage,
|
|
2620
|
+
'Choose one documented target.'
|
|
2621
|
+
);
|
|
2622
|
+
|
|
2623
|
+
console.log(error.code, error.message);
|
|
2624
|
+
```
|
|
2625
|
+
|
|
2626
|
+
## ERROR_CODES
|
|
2627
|
+
|
|
2628
|
+
### Overview
|
|
2629
|
+
|
|
2630
|
+
Frozen registry of stable SDK error-code strings.
|
|
2631
|
+
|
|
2632
|
+
`ERROR_CODES.updateCheckFailed` is exactly
|
|
2633
|
+
`'ARCANE_UPDATE_CHECK_FAILED'`. It identifies a bounded update-check validation,
|
|
2634
|
+
registry, timeout, HTTP, or response failure; caller cancellation remains the
|
|
2635
|
+
separate `ERROR_CODES.cancelled` value.
|
|
2636
|
+
|
|
2637
|
+
### Value and import
|
|
2638
|
+
|
|
2639
|
+
```text
|
|
2640
|
+
const ERROR_CODES
|
|
2641
|
+
```
|
|
2642
|
+
|
|
2643
|
+
Import it from `arcane-os`. Treat arrays and records as immutable public values.
|
|
2644
|
+
|
|
2645
|
+
### Availability and normalization
|
|
2646
|
+
|
|
2647
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM](protocols.md).
|
|
2648
|
+
|
|
2649
|
+
### Example
|
|
2650
|
+
|
|
2651
|
+
```javascript
|
|
2652
|
+
import {ERROR_CODES} from 'arcane-os';
|
|
2653
|
+
|
|
2654
|
+
console.log(ERROR_CODES.updateCheckFailed); // ARCANE_UPDATE_CHECK_FAILED
|
|
2655
|
+
```
|
|
2656
|
+
|
|
2657
|
+
## errorRecord()
|
|
2658
|
+
|
|
2659
|
+
### Overview
|
|
2660
|
+
|
|
2661
|
+
Projects an error into the JSON-safe normalized public error record.
|
|
2662
|
+
|
|
2663
|
+
### Signature and result
|
|
2664
|
+
|
|
2665
|
+
```text
|
|
2666
|
+
errorRecord(error)
|
|
2667
|
+
```
|
|
2668
|
+
|
|
2669
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2670
|
+
|
|
2671
|
+
### Availability and normalization
|
|
2672
|
+
|
|
2673
|
+
**Node.** ArcaneError and JSON-safe error normalization. Deep protocol: [Node ESM](protocols.md).
|
|
2674
|
+
|
|
2675
|
+
### Example
|
|
2676
|
+
|
|
2677
|
+
```javascript
|
|
2678
|
+
import {errorRecord} from 'arcane-os';
|
|
2679
|
+
|
|
2680
|
+
console.log(errorRecord(new Error('Example failure.')));
|
|
2681
|
+
```
|
|
2682
|
+
|
|
2683
|
+
## fail()
|
|
2684
|
+
|
|
2685
|
+
### Overview
|
|
2686
|
+
|
|
2687
|
+
Synchronously throws an `ArcaneError` with the supplied code, message, and
|
|
2688
|
+
optional diagnostic context. It never returns a value or a promise.
|
|
2689
|
+
|
|
2690
|
+
### Signature, parameters, and error
|
|
2691
|
+
|
|
2692
|
+
```text
|
|
2693
|
+
fail(code, message, options)
|
|
2694
|
+
```
|
|
2695
|
+
|
|
2696
|
+
Import it from `arcane-os`. `code` is normally one of `ERROR_CODES`; a falsy
|
|
2697
|
+
code becomes `ARCANE_OPERATION_FAILED`. `message` is the public error message.
|
|
2698
|
+
`options` can contain `details`, `cause`, and `exitCode`. `details` is preserved
|
|
2699
|
+
for structured recovery, `cause` is attached through the standard `Error`
|
|
2700
|
+
cause, and an integer `exitCode` is preserved; otherwise the exit code is `1`.
|
|
2701
|
+
|
|
2702
|
+
Calling `fail()` has no filesystem, event, cancellation, or receipt side
|
|
2703
|
+
effect. Catch the thrown `ArcaneError` synchronously, or let it reject the
|
|
2704
|
+
surrounding asynchronous operation naturally. Do not wrap it merely to make it
|
|
2705
|
+
look asynchronous.
|
|
2706
|
+
|
|
2707
|
+
### Availability and normalization
|
|
2708
|
+
|
|
2709
|
+
**Node.** ArcaneError and JSON-safe error normalization. Deep protocol: [Node ESM](protocols.md).
|
|
2710
|
+
|
|
2711
|
+
### Example
|
|
2712
|
+
|
|
2713
|
+
```javascript
|
|
2714
|
+
import {ERROR_CODES, fail} from 'arcane-os';
|
|
2715
|
+
|
|
2716
|
+
function requireSelectedApp(appId) {
|
|
2717
|
+
if (typeof appId !== 'string' || appId.length === 0) {
|
|
2718
|
+
fail(ERROR_CODES.usage, 'Select one application.', {
|
|
2719
|
+
details: {field: 'appId'}
|
|
2720
|
+
});
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
return appId;
|
|
2724
|
+
}
|
|
2725
|
+
```
|
|
2726
|
+
|
|
2727
|
+
## normalizeError()
|
|
2728
|
+
|
|
2729
|
+
### Overview
|
|
2730
|
+
|
|
2731
|
+
Converts an unknown thrown value into an `ArcaneError` while preserving an existing normalized error.
|
|
2732
|
+
|
|
2733
|
+
### Signature and result
|
|
2734
|
+
|
|
2735
|
+
```text
|
|
2736
|
+
normalizeError(error, fallbackCode=ERROR_CODES.operationFailed)
|
|
2737
|
+
```
|
|
2738
|
+
|
|
2739
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2740
|
+
|
|
2741
|
+
### Availability and normalization
|
|
2742
|
+
|
|
2743
|
+
**Node.** ArcaneError and JSON-safe error normalization. Deep protocol: [Node ESM](protocols.md).
|
|
2744
|
+
|
|
2745
|
+
### Example
|
|
2746
|
+
|
|
2747
|
+
```javascript
|
|
2748
|
+
import {normalizeError} from 'arcane-os';
|
|
2749
|
+
|
|
2750
|
+
console.log(normalizeError(new Error('Example failure.')));
|
|
2751
|
+
```
|
|
2752
|
+
|
|
2753
|
+
## throwIfAborted()
|
|
2754
|
+
|
|
2755
|
+
### Overview
|
|
2756
|
+
|
|
2757
|
+
Throws the signal reason or a normalized cancellation error when an AbortSignal is already aborted.
|
|
2758
|
+
|
|
2759
|
+
### Signature and result
|
|
2760
|
+
|
|
2761
|
+
```text
|
|
2762
|
+
throwIfAborted(signal)
|
|
2763
|
+
```
|
|
2764
|
+
|
|
2765
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2766
|
+
|
|
2767
|
+
### Availability and normalization
|
|
2768
|
+
|
|
2769
|
+
**Node.** ArcaneError and JSON-safe error normalization. Deep protocol: [Node ESM](protocols.md).
|
|
2770
|
+
|
|
2771
|
+
### Example
|
|
2772
|
+
|
|
2773
|
+
```javascript
|
|
2774
|
+
import {throwIfAborted} from 'arcane-os';
|
|
2775
|
+
|
|
2776
|
+
const controller = new AbortController();
|
|
2777
|
+
throwIfAborted(controller.signal);
|
|
2778
|
+
```
|
|
2779
|
+
|
|
2780
|
+
|
|
2781
|
+
# Workspace, doctor, repository, and server
|
|
2782
|
+
|
|
2783
|
+
## assessArcaneOllama()
|
|
2784
|
+
|
|
2785
|
+
### Overview
|
|
2786
|
+
|
|
2787
|
+
Performs a read-only Microsoft NT assessment of the managed ArcaneOllama service and reports unsupported hosts honestly.
|
|
2788
|
+
|
|
2789
|
+
### Signature and result
|
|
2790
|
+
|
|
2791
|
+
```text
|
|
2792
|
+
async assessArcaneOllama({ signal, onEvent, platform=process.platform, run=runProcess, fileExists=exists }={})
|
|
2793
|
+
```
|
|
2794
|
+
|
|
2795
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2796
|
+
|
|
2797
|
+
### Availability and normalization
|
|
2798
|
+
|
|
2799
|
+
**Node; Microsoft NT managed-service assessment.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
2800
|
+
|
|
2801
|
+
### Example
|
|
2802
|
+
|
|
2803
|
+
```javascript
|
|
2804
|
+
import {assessArcaneOllama} from 'arcane-os';
|
|
2805
|
+
|
|
2806
|
+
async function useassessArcaneOllama(...arguments_) {
|
|
2807
|
+
return assessArcaneOllama(...arguments_);
|
|
2808
|
+
}
|
|
2809
|
+
```
|
|
2810
|
+
|
|
2811
|
+
## createWorkspace()
|
|
2812
|
+
|
|
2813
|
+
### Overview
|
|
2814
|
+
|
|
2815
|
+
Scaffolds one new external repository-shaped workspace and one selected application.
|
|
2816
|
+
|
|
2817
|
+
### Signature and result
|
|
2818
|
+
|
|
2819
|
+
```text
|
|
2820
|
+
async createWorkspace({ targetPath, appId, displayName, target='browser', initializeGit=false, signal, onEvent })
|
|
2821
|
+
```
|
|
2822
|
+
|
|
2823
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2824
|
+
|
|
2825
|
+
### Availability and normalization
|
|
2826
|
+
|
|
2827
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
2828
|
+
|
|
2829
|
+
### Example
|
|
2830
|
+
|
|
2831
|
+
```javascript
|
|
2832
|
+
import {createWorkspace} from 'arcane-os';
|
|
2833
|
+
|
|
2834
|
+
async function usecreateWorkspace(...arguments_) {
|
|
2835
|
+
return createWorkspace(...arguments_);
|
|
2836
|
+
}
|
|
2837
|
+
```
|
|
2838
|
+
|
|
2839
|
+
## doctorApplication()
|
|
2840
|
+
|
|
2841
|
+
### Overview
|
|
2842
|
+
|
|
2843
|
+
Runs the read-only SDK/runtime/workspace and optional local-AI diagnostic operation.
|
|
2844
|
+
|
|
2845
|
+
### Signature and result
|
|
2846
|
+
|
|
2847
|
+
```text
|
|
2848
|
+
async doctorApplication(options={})
|
|
2849
|
+
```
|
|
2850
|
+
|
|
2851
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2852
|
+
|
|
2853
|
+
### Availability and normalization
|
|
2854
|
+
|
|
2855
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
2856
|
+
|
|
2857
|
+
### Example
|
|
2858
|
+
|
|
2859
|
+
```javascript
|
|
2860
|
+
import {doctorApplication} from 'arcane-os';
|
|
2861
|
+
|
|
2862
|
+
async function usedoctorApplication(...arguments_) {
|
|
2863
|
+
return doctorApplication(...arguments_);
|
|
2864
|
+
}
|
|
2865
|
+
```
|
|
2866
|
+
|
|
2867
|
+
## initializeApplication()
|
|
2868
|
+
|
|
2869
|
+
### Overview
|
|
2870
|
+
|
|
2871
|
+
Initializes missing Arcane files for one app in an existing external or integrated workspace.
|
|
2872
|
+
|
|
2873
|
+
### Signature and result
|
|
2874
|
+
|
|
2875
|
+
```text
|
|
2876
|
+
async initializeApplication(options={})
|
|
2877
|
+
```
|
|
2878
|
+
|
|
2879
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2880
|
+
|
|
2881
|
+
### Availability and normalization
|
|
2882
|
+
|
|
2883
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
2884
|
+
|
|
2885
|
+
### Example
|
|
2886
|
+
|
|
2887
|
+
```javascript
|
|
2888
|
+
import {initializeApplication} from 'arcane-os';
|
|
2889
|
+
|
|
2890
|
+
async function useinitializeApplication(...arguments_) {
|
|
2891
|
+
return initializeApplication(...arguments_);
|
|
2892
|
+
}
|
|
2893
|
+
```
|
|
2894
|
+
|
|
2895
|
+
## initWorkspace()
|
|
2896
|
+
|
|
2897
|
+
### Overview
|
|
2898
|
+
|
|
2899
|
+
Adds one application scaffold to an existing workspace without overwriting incompatible files.
|
|
2900
|
+
|
|
2901
|
+
### Signature and result
|
|
2902
|
+
|
|
2903
|
+
```text
|
|
2904
|
+
async initWorkspace({ workspaceRoot=process.cwd(), appId, displayName, target='browser', signal, onEvent })
|
|
2905
|
+
```
|
|
2906
|
+
|
|
2907
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2908
|
+
|
|
2909
|
+
### Availability and normalization
|
|
2910
|
+
|
|
2911
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
2912
|
+
|
|
2913
|
+
### Example
|
|
2914
|
+
|
|
2915
|
+
```javascript
|
|
2916
|
+
import {initWorkspace} from 'arcane-os';
|
|
2917
|
+
|
|
2918
|
+
async function useinitWorkspace(...arguments_) {
|
|
2919
|
+
return initWorkspace(...arguments_);
|
|
2920
|
+
}
|
|
2921
|
+
```
|
|
2922
|
+
|
|
2923
|
+
## inspectWorkspaceProfile()
|
|
2924
|
+
|
|
2925
|
+
### Overview
|
|
2926
|
+
|
|
2927
|
+
Classifies one canonical workspace as external or integrated and reports its fixed layout.
|
|
2928
|
+
|
|
2929
|
+
### Signature and result
|
|
2930
|
+
|
|
2931
|
+
```text
|
|
2932
|
+
async inspectWorkspaceProfile(workspaceRoot=process.cwd())
|
|
2933
|
+
```
|
|
2934
|
+
|
|
2935
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2936
|
+
|
|
2937
|
+
### Availability and normalization
|
|
2938
|
+
|
|
2939
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
2940
|
+
|
|
2941
|
+
### Example
|
|
2942
|
+
|
|
2943
|
+
```javascript
|
|
2944
|
+
import {inspectWorkspaceProfile} from 'arcane-os';
|
|
2945
|
+
|
|
2946
|
+
async function useinspectWorkspaceProfile(...arguments_) {
|
|
2947
|
+
return inspectWorkspaceProfile(...arguments_);
|
|
2948
|
+
}
|
|
2949
|
+
```
|
|
2950
|
+
|
|
2951
|
+
## repositoryPull()
|
|
2952
|
+
|
|
2953
|
+
### Overview
|
|
2954
|
+
|
|
2955
|
+
Runs one fast-forward-only pull after proving the selected repository worktree is clean.
|
|
2956
|
+
|
|
2957
|
+
### Signature and result
|
|
2958
|
+
|
|
2959
|
+
```text
|
|
2960
|
+
async repositoryPull({ workspaceRoot=process.cwd(), signal, onEvent, run=runProcess }={})
|
|
2961
|
+
```
|
|
2962
|
+
|
|
2963
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
2964
|
+
|
|
2965
|
+
### Availability and normalization
|
|
2966
|
+
|
|
2967
|
+
**Node; network-assisted Git.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
2968
|
+
|
|
2969
|
+
### Example
|
|
2970
|
+
|
|
2971
|
+
```javascript
|
|
2972
|
+
import {repositoryPull} from 'arcane-os';
|
|
2973
|
+
|
|
2974
|
+
async function userepositoryPull(...arguments_) {
|
|
2975
|
+
return repositoryPull(...arguments_);
|
|
2976
|
+
}
|
|
2977
|
+
```
|
|
2978
|
+
|
|
2979
|
+
## repositoryPush()
|
|
2980
|
+
|
|
2981
|
+
### Overview
|
|
2982
|
+
|
|
2983
|
+
Pushes the selected attached branch through the repository's configured remote and credentials.
|
|
2984
|
+
|
|
2985
|
+
### Signature, parameters, and result
|
|
2986
|
+
|
|
2987
|
+
```text
|
|
2988
|
+
async repositoryPush({ workspaceRoot=process.cwd(), signal, onEvent, run=runProcess }={})
|
|
2989
|
+
```
|
|
2990
|
+
|
|
2991
|
+
Import it from `arcane-os`. `workspaceRoot` selects the Git worktree. `signal`
|
|
2992
|
+
cancels the owned Git process tree. The awaited `onEvent` callback receives the
|
|
2993
|
+
ordered `process.*` events for the three status probes and the push. `run` is an
|
|
2994
|
+
injectable process runner intended for deterministic tests; ordinary callers
|
|
2995
|
+
should keep the default.
|
|
2996
|
+
|
|
2997
|
+
Before pushing, the SDK runs `git rev-parse --show-toplevel`,
|
|
2998
|
+
`git branch --show-current`, and `git status --short --branch` in order. It rejects a
|
|
2999
|
+
detached HEAD, then runs plain `git push`; the repository's current branch,
|
|
3000
|
+
configured upstream/remote, Git credentials, hooks, and server policy remain
|
|
3001
|
+
authoritative. Unlike `repositoryPull()`, this function does **not** require a
|
|
3002
|
+
clean worktree. It does not create a commit or select a remote/refspec for you.
|
|
3003
|
+
|
|
3004
|
+
The promise resolves to
|
|
3005
|
+
`{action:'push', repositoryRoot, branch, output}`. `output` is trimmed stdout,
|
|
3006
|
+
or trimmed stderr when stdout is empty. A missing Git executable, failed status
|
|
3007
|
+
probe, rejected/nonzero push, cancellation, or event-callback failure rejects
|
|
3008
|
+
with the normalized process error. Cancellation stops the local process tree;
|
|
3009
|
+
it cannot prove that a remote accepted no objects before the interruption.
|
|
3010
|
+
|
|
3011
|
+
### Availability and normalization
|
|
3012
|
+
|
|
3013
|
+
**Node; network-assisted Git.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
3014
|
+
|
|
3015
|
+
### Example
|
|
3016
|
+
|
|
3017
|
+
```javascript
|
|
3018
|
+
import {repositoryPush} from 'arcane-os';
|
|
3019
|
+
|
|
3020
|
+
// Call only after the user has chosen to publish the attached branch.
|
|
3021
|
+
async function pushAttachedBranch(workspaceRoot, signal) {
|
|
3022
|
+
const result = await repositoryPush({
|
|
3023
|
+
workspaceRoot,
|
|
3024
|
+
signal,
|
|
3025
|
+
onEvent(event) {
|
|
3026
|
+
if (event.type === 'process.stderr') console.error(event.message);
|
|
3027
|
+
}
|
|
3028
|
+
});
|
|
3029
|
+
|
|
3030
|
+
console.log(`Pushed ${result.branch} from ${result.repositoryRoot}`);
|
|
3031
|
+
return result;
|
|
3032
|
+
}
|
|
3033
|
+
```
|
|
3034
|
+
|
|
3035
|
+
## repositoryStatus()
|
|
3036
|
+
|
|
3037
|
+
### Overview
|
|
3038
|
+
|
|
3039
|
+
Reads one repository's branch and short worktree status through an owned child process.
|
|
3040
|
+
|
|
3041
|
+
### Signature and result
|
|
3042
|
+
|
|
3043
|
+
```text
|
|
3044
|
+
async repositoryStatus({ workspaceRoot=process.cwd(), signal, onEvent, run=runProcess }={})
|
|
3045
|
+
```
|
|
3046
|
+
|
|
3047
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3048
|
+
|
|
3049
|
+
### Availability and normalization
|
|
3050
|
+
|
|
3051
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
3052
|
+
|
|
3053
|
+
### Example
|
|
3054
|
+
|
|
3055
|
+
```javascript
|
|
3056
|
+
import {repositoryStatus} from 'arcane-os';
|
|
3057
|
+
|
|
3058
|
+
async function userepositoryStatus(...arguments_) {
|
|
3059
|
+
return repositoryStatus(...arguments_);
|
|
3060
|
+
}
|
|
3061
|
+
```
|
|
3062
|
+
|
|
3063
|
+
## resolveWorkspace()
|
|
3064
|
+
|
|
3065
|
+
### Overview
|
|
3066
|
+
|
|
3067
|
+
Resolves one workspace profile and selected app into canonical SDK paths.
|
|
3068
|
+
|
|
3069
|
+
### Signature and result
|
|
3070
|
+
|
|
3071
|
+
```text
|
|
3072
|
+
async resolveWorkspace({workspaceRoot=process.cwd(), appId}={})
|
|
3073
|
+
```
|
|
3074
|
+
|
|
3075
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3076
|
+
|
|
3077
|
+
### Availability and normalization
|
|
3078
|
+
|
|
3079
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
3080
|
+
|
|
3081
|
+
### Example
|
|
3082
|
+
|
|
3083
|
+
```javascript
|
|
3084
|
+
import {resolveWorkspace} from 'arcane-os';
|
|
3085
|
+
|
|
3086
|
+
async function useresolveWorkspace(...arguments_) {
|
|
3087
|
+
return resolveWorkspace(...arguments_);
|
|
3088
|
+
}
|
|
3089
|
+
```
|
|
3090
|
+
|
|
3091
|
+
## discoverApps()
|
|
3092
|
+
|
|
3093
|
+
### Overview
|
|
3094
|
+
|
|
3095
|
+
Discovers application ids in one external or integrated workspace without selecting one.
|
|
3096
|
+
|
|
3097
|
+
### Signature and result
|
|
3098
|
+
|
|
3099
|
+
```text
|
|
3100
|
+
async discoverApps(workspaceRoot=process.cwd())
|
|
3101
|
+
```
|
|
3102
|
+
|
|
3103
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3104
|
+
|
|
3105
|
+
### Availability and normalization
|
|
3106
|
+
|
|
3107
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
3108
|
+
|
|
3109
|
+
### Example
|
|
3110
|
+
|
|
3111
|
+
```javascript
|
|
3112
|
+
import {discoverApps} from 'arcane-os';
|
|
3113
|
+
|
|
3114
|
+
async function usediscoverApps(...arguments_) {
|
|
3115
|
+
return discoverApps(...arguments_);
|
|
3116
|
+
}
|
|
3117
|
+
```
|
|
3118
|
+
|
|
3119
|
+
## runDoctor()
|
|
3120
|
+
|
|
3121
|
+
### Overview
|
|
3122
|
+
|
|
3123
|
+
Runs the underlying read-only doctor checks and returns their normalized report.
|
|
3124
|
+
|
|
3125
|
+
### Signature and result
|
|
3126
|
+
|
|
3127
|
+
```text
|
|
3128
|
+
async runDoctor({ workspaceRoot, appId, arcaneRoot, requireLocalAI=false, signal, onEvent, platform=process.platform, run=runProcess }={})
|
|
3129
|
+
```
|
|
3130
|
+
|
|
3131
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3132
|
+
|
|
3133
|
+
### Availability and normalization
|
|
3134
|
+
|
|
3135
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
3136
|
+
|
|
3137
|
+
### Example
|
|
3138
|
+
|
|
3139
|
+
```javascript
|
|
3140
|
+
import {runDoctor} from 'arcane-os';
|
|
3141
|
+
|
|
3142
|
+
async function userunDoctor(...arguments_) {
|
|
3143
|
+
return runDoctor(...arguments_);
|
|
3144
|
+
}
|
|
3145
|
+
```
|
|
3146
|
+
|
|
3147
|
+
## runRepositoryAction()
|
|
3148
|
+
|
|
3149
|
+
### Overview
|
|
3150
|
+
|
|
3151
|
+
Selects and runs one repository action by name.
|
|
3152
|
+
|
|
3153
|
+
### Signature and result
|
|
3154
|
+
|
|
3155
|
+
```text
|
|
3156
|
+
async runRepositoryAction(action, options={})
|
|
3157
|
+
```
|
|
3158
|
+
|
|
3159
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3160
|
+
|
|
3161
|
+
### Availability and normalization
|
|
3162
|
+
|
|
3163
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
3164
|
+
|
|
3165
|
+
### Example
|
|
3166
|
+
|
|
3167
|
+
```javascript
|
|
3168
|
+
import {runRepositoryAction} from 'arcane-os';
|
|
3169
|
+
|
|
3170
|
+
async function userunRepositoryAction(...arguments_) {
|
|
3171
|
+
return runRepositoryAction(...arguments_);
|
|
3172
|
+
}
|
|
3173
|
+
```
|
|
3174
|
+
|
|
3175
|
+
## selectApp()
|
|
3176
|
+
|
|
3177
|
+
### Overview
|
|
3178
|
+
|
|
3179
|
+
Selects one exact app id, or requires an unambiguous single discovered application.
|
|
3180
|
+
|
|
3181
|
+
### Signature and result
|
|
3182
|
+
|
|
3183
|
+
```text
|
|
3184
|
+
async selectApp(workspaceRoot=process.cwd(), appId)
|
|
3185
|
+
```
|
|
3186
|
+
|
|
3187
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3188
|
+
|
|
3189
|
+
### Availability and normalization
|
|
3190
|
+
|
|
3191
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
3192
|
+
|
|
3193
|
+
### Example
|
|
3194
|
+
|
|
3195
|
+
```javascript
|
|
3196
|
+
import {selectApp} from 'arcane-os';
|
|
3197
|
+
|
|
3198
|
+
async function useselectApp(...arguments_) {
|
|
3199
|
+
return selectApp(...arguments_);
|
|
3200
|
+
}
|
|
3201
|
+
```
|
|
3202
|
+
|
|
3203
|
+
## startDevServer()
|
|
3204
|
+
|
|
3205
|
+
### Overview
|
|
3206
|
+
|
|
3207
|
+
Starts one bounded browser development server with exact runtime/app route mappings and an unguessable session capability.
|
|
3208
|
+
|
|
3209
|
+
### Signature, modes, and result
|
|
3210
|
+
|
|
3211
|
+
```text
|
|
3212
|
+
async startDevServer(options={})
|
|
3213
|
+
```
|
|
3214
|
+
|
|
3215
|
+
Import it from `arcane-os`. Source mode accepts
|
|
3216
|
+
`{workspaceRoot=process.cwd(), appId, mode='source', host='127.0.0.1', port=0,
|
|
3217
|
+
runtimeReceipt, signal, onEvent}` and serves one validated workspace application
|
|
3218
|
+
plus its verified SDK or integrated runtime. Packaged mode uses
|
|
3219
|
+
`{mode:'packaged', releaseRoot, releaseReceipt, host, port, signal, onEvent}` and
|
|
3220
|
+
serves only files admitted by that same-process release receipt. `host` must be
|
|
3221
|
+
numeric loopback `127.0.0.1` or `::1`; port `0` asks the operating system for an
|
|
3222
|
+
available port.
|
|
3223
|
+
|
|
3224
|
+
The promise settles after the listener is ready and resolves to
|
|
3225
|
+
`{server, mode, workspaceRoot, appId, host, port, origin, cleanUrl, url, close,
|
|
3226
|
+
closed, lifecycle}`. `server` is the raw Node HTTP server. `url` contains the
|
|
3227
|
+
unguessable bootstrap capability that establishes an HttpOnly session
|
|
3228
|
+
cookie; do not log, persist, or disclose it. `cleanUrl` contains no capability
|
|
3229
|
+
but does not bootstrap a new browser session by itself. In packaged mode,
|
|
3230
|
+
`workspaceRoot` and `appId` are `null`.
|
|
3231
|
+
|
|
3232
|
+
Starting the server opens a loopback listener and emits awaited,
|
|
3233
|
+
backpressured `server.starting` and `server.started` events. Request failures
|
|
3234
|
+
emit `server.request.failed`; shutdown emits `server.stopped` after owned
|
|
3235
|
+
requests and event delivery drain. Call `await result.close()` in a `finally`
|
|
3236
|
+
block, or abort `signal`; `close()` is idempotent and returns the
|
|
3237
|
+
same settlement represented by both `closed` and `lifecycle`. A listener error
|
|
3238
|
+
or event-callback failure closes the server and rejects its lifecycle. Invalid
|
|
3239
|
+
mode/host/port, workspace or receipt authentication failure, an occupied port,
|
|
3240
|
+
or an already-aborted signal rejects startup.
|
|
3241
|
+
|
|
3242
|
+
### Availability and normalization
|
|
3243
|
+
|
|
3244
|
+
**Node control plane; browser data plane.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
3245
|
+
|
|
3246
|
+
### Example
|
|
3247
|
+
|
|
3248
|
+
```javascript
|
|
3249
|
+
import {startDevServer} from 'arcane-os';
|
|
3250
|
+
|
|
3251
|
+
async function inspectSourceServer(workspaceRoot, signal) {
|
|
3252
|
+
const running = await startDevServer({
|
|
3253
|
+
workspaceRoot,
|
|
3254
|
+
appId: 'example-app',
|
|
3255
|
+
mode: 'source',
|
|
3256
|
+
host: '127.0.0.1',
|
|
3257
|
+
port: 0,
|
|
3258
|
+
signal
|
|
3259
|
+
});
|
|
3260
|
+
|
|
3261
|
+
try {
|
|
3262
|
+
// Hand running.url directly to the intended development browser.
|
|
3263
|
+
console.log(`Serving on ${running.origin}`);
|
|
3264
|
+
return {origin: running.origin, port: running.port};
|
|
3265
|
+
} finally {
|
|
3266
|
+
await running.close();
|
|
3267
|
+
}
|
|
3268
|
+
}
|
|
3269
|
+
```
|
|
3270
|
+
|
|
3271
|
+
## validateWorkspace()
|
|
3272
|
+
|
|
3273
|
+
### Overview
|
|
3274
|
+
|
|
3275
|
+
Runs canonical workspace, runtime, descriptor, and selected-app validation with progress events.
|
|
3276
|
+
|
|
3277
|
+
### Signature and result
|
|
3278
|
+
|
|
3279
|
+
```text
|
|
3280
|
+
async validateWorkspace({workspaceRoot=process.cwd(), appId, signal, onEvent}={})
|
|
3281
|
+
```
|
|
3282
|
+
|
|
3283
|
+
Import it from `arcane-os`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3284
|
+
|
|
3285
|
+
### Availability and normalization
|
|
3286
|
+
|
|
3287
|
+
**Node.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Node ESM](protocols.md).
|
|
3288
|
+
|
|
3289
|
+
### Example
|
|
3290
|
+
|
|
3291
|
+
```javascript
|
|
3292
|
+
import {validateWorkspace} from 'arcane-os';
|
|
3293
|
+
|
|
3294
|
+
async function usevalidateWorkspace(...arguments_) {
|
|
3295
|
+
return validateWorkspace(...arguments_);
|
|
3296
|
+
}
|
|
3297
|
+
```
|
|
3298
|
+
|
|
3299
|
+
|
|
3300
|
+
# Headless toolchain operations
|
|
3301
|
+
|
|
3302
|
+
## buildApplication()
|
|
3303
|
+
|
|
3304
|
+
### Overview
|
|
3305
|
+
|
|
3306
|
+
Builds and retained-verifies one explicitly selected native target through one paired provider.
|
|
3307
|
+
|
|
3308
|
+
### Signature and result
|
|
3309
|
+
|
|
3310
|
+
```text
|
|
3311
|
+
async buildApplication(options={})
|
|
3312
|
+
```
|
|
3313
|
+
|
|
3314
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3315
|
+
|
|
3316
|
+
### Availability and normalization
|
|
3317
|
+
|
|
3318
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3319
|
+
|
|
3320
|
+
### Example
|
|
3321
|
+
|
|
3322
|
+
```javascript
|
|
3323
|
+
import {buildApplication} from 'arcane-os';
|
|
3324
|
+
|
|
3325
|
+
async function usebuildApplication(...arguments_) {
|
|
3326
|
+
return buildApplication(...arguments_);
|
|
3327
|
+
}
|
|
3328
|
+
```
|
|
3329
|
+
|
|
3330
|
+
## bundleApplication()
|
|
3331
|
+
|
|
3332
|
+
### Overview
|
|
3333
|
+
|
|
3334
|
+
Creates one deterministic external application bundle from one authenticated packaged release.
|
|
3335
|
+
|
|
3336
|
+
### Signature and result
|
|
3337
|
+
|
|
3338
|
+
```text
|
|
3339
|
+
async bundleApplication(options={})
|
|
3340
|
+
```
|
|
3341
|
+
|
|
3342
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3343
|
+
|
|
3344
|
+
### Availability and normalization
|
|
3345
|
+
|
|
3346
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3347
|
+
|
|
3348
|
+
### Example
|
|
3349
|
+
|
|
3350
|
+
```javascript
|
|
3351
|
+
import {bundleApplication} from 'arcane-os';
|
|
3352
|
+
|
|
3353
|
+
async function usebundleApplication(...arguments_) {
|
|
3354
|
+
return bundleApplication(...arguments_);
|
|
3355
|
+
}
|
|
3356
|
+
```
|
|
3357
|
+
|
|
3358
|
+
## checkApplication()
|
|
3359
|
+
|
|
3360
|
+
### Overview
|
|
3361
|
+
|
|
3362
|
+
Runs the selected application or integrated shared validation boundary.
|
|
3363
|
+
|
|
3364
|
+
### Signature and result
|
|
3365
|
+
|
|
3366
|
+
```text
|
|
3367
|
+
async checkApplication(options={})
|
|
3368
|
+
```
|
|
3369
|
+
|
|
3370
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3371
|
+
|
|
3372
|
+
### Availability and normalization
|
|
3373
|
+
|
|
3374
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3375
|
+
|
|
3376
|
+
### Example
|
|
3377
|
+
|
|
3378
|
+
```javascript
|
|
3379
|
+
import {checkApplication} from 'arcane-os';
|
|
3380
|
+
|
|
3381
|
+
async function usecheckApplication(...arguments_) {
|
|
3382
|
+
return checkApplication(...arguments_);
|
|
3383
|
+
}
|
|
3384
|
+
```
|
|
3385
|
+
|
|
3386
|
+
## createApplication()
|
|
3387
|
+
|
|
3388
|
+
### Overview
|
|
3389
|
+
|
|
3390
|
+
Creates one new external application workspace through the shared headless toolchain.
|
|
3391
|
+
|
|
3392
|
+
### Signature and result
|
|
3393
|
+
|
|
3394
|
+
```text
|
|
3395
|
+
async createApplication(options={})
|
|
3396
|
+
```
|
|
3397
|
+
|
|
3398
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3399
|
+
|
|
3400
|
+
### Availability and normalization
|
|
3401
|
+
|
|
3402
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3403
|
+
|
|
3404
|
+
### Example
|
|
3405
|
+
|
|
3406
|
+
```javascript
|
|
3407
|
+
import {createApplication} from 'arcane-os';
|
|
3408
|
+
|
|
3409
|
+
async function usecreateApplication(...arguments_) {
|
|
3410
|
+
return createApplication(...arguments_);
|
|
3411
|
+
}
|
|
3412
|
+
```
|
|
3413
|
+
|
|
3414
|
+
## createToolchain()
|
|
3415
|
+
|
|
3416
|
+
### Overview
|
|
3417
|
+
|
|
3418
|
+
Returns a frozen convenience object that applies shared defaults to every headless application operation.
|
|
3419
|
+
|
|
3420
|
+
The object includes `updateCheck(options)`, which merges defaults with the
|
|
3421
|
+
explicit call options and invokes `checkSdkUpdate()` once. Constructing the
|
|
3422
|
+
toolchain does not check, poll, schedule, download, install, or mutate anything.
|
|
3423
|
+
|
|
3424
|
+
### Signature and result
|
|
3425
|
+
|
|
3426
|
+
```text
|
|
3427
|
+
createToolchain(defaults={})
|
|
3428
|
+
```
|
|
3429
|
+
|
|
3430
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3431
|
+
|
|
3432
|
+
### Availability and normalization
|
|
3433
|
+
|
|
3434
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3435
|
+
|
|
3436
|
+
### Example
|
|
3437
|
+
|
|
3438
|
+
```javascript
|
|
3439
|
+
import {createToolchain} from 'arcane-os';
|
|
3440
|
+
|
|
3441
|
+
const toolchain = createToolchain({
|
|
3442
|
+
workspaceRoot: process.cwd(),
|
|
3443
|
+
onEvent(event) {
|
|
3444
|
+
console.info(event.type);
|
|
3445
|
+
}
|
|
3446
|
+
});
|
|
3447
|
+
|
|
3448
|
+
// Only this explicit call performs the single bounded registry request.
|
|
3449
|
+
const status = await toolchain.updateCheck();
|
|
3450
|
+
console.log(status.status);
|
|
3451
|
+
```
|
|
3452
|
+
|
|
3453
|
+
## describeTargets()
|
|
3454
|
+
|
|
3455
|
+
### Overview
|
|
3456
|
+
|
|
3457
|
+
Returns the normalized target catalog through the headless operation lifecycle.
|
|
3458
|
+
|
|
3459
|
+
### Signature and result
|
|
3460
|
+
|
|
3461
|
+
```text
|
|
3462
|
+
async describeTargets(options={})
|
|
3463
|
+
```
|
|
3464
|
+
|
|
3465
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3466
|
+
|
|
3467
|
+
### Availability and normalization
|
|
3468
|
+
|
|
3469
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3470
|
+
|
|
3471
|
+
### Example
|
|
3472
|
+
|
|
3473
|
+
```javascript
|
|
3474
|
+
import {describeTargets} from 'arcane-os';
|
|
3475
|
+
|
|
3476
|
+
async function usedescribeTargets(...arguments_) {
|
|
3477
|
+
return describeTargets(...arguments_);
|
|
3478
|
+
}
|
|
3479
|
+
```
|
|
3480
|
+
|
|
3481
|
+
## developApplication()
|
|
3482
|
+
|
|
3483
|
+
### Overview
|
|
3484
|
+
|
|
3485
|
+
Starts one owned browser development server for the selected application.
|
|
3486
|
+
|
|
3487
|
+
### Signature and result
|
|
3488
|
+
|
|
3489
|
+
```text
|
|
3490
|
+
async developApplication(options={})
|
|
3491
|
+
```
|
|
3492
|
+
|
|
3493
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3494
|
+
|
|
3495
|
+
### Availability and normalization
|
|
3496
|
+
|
|
3497
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3498
|
+
|
|
3499
|
+
### Example
|
|
3500
|
+
|
|
3501
|
+
```javascript
|
|
3502
|
+
import {developApplication} from 'arcane-os';
|
|
3503
|
+
|
|
3504
|
+
async function usedevelopApplication(...arguments_) {
|
|
3505
|
+
return developApplication(...arguments_);
|
|
3506
|
+
}
|
|
3507
|
+
```
|
|
3508
|
+
|
|
3509
|
+
## executeOperation()
|
|
3510
|
+
|
|
3511
|
+
### Overview
|
|
3512
|
+
|
|
3513
|
+
Dispatches one named headless SDK operation with normalized acceptance, events, cancellation, and failure.
|
|
3514
|
+
|
|
3515
|
+
The exact command `'update-check'` dispatches one `checkSdkUpdate(options)`
|
|
3516
|
+
call. Dispatch never installs a recurring task and never causes another command
|
|
3517
|
+
to check for updates implicitly.
|
|
3518
|
+
|
|
3519
|
+
### Signature and result
|
|
3520
|
+
|
|
3521
|
+
```text
|
|
3522
|
+
async executeOperation(command, options={})
|
|
3523
|
+
```
|
|
3524
|
+
|
|
3525
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3526
|
+
|
|
3527
|
+
### Availability and normalization
|
|
3528
|
+
|
|
3529
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3530
|
+
|
|
3531
|
+
### Example
|
|
3532
|
+
|
|
3533
|
+
```javascript
|
|
3534
|
+
import {executeOperation} from 'arcane-os';
|
|
3535
|
+
|
|
3536
|
+
const result = await executeOperation('update-check');
|
|
3537
|
+
console.log(result.status, result.registryVersion);
|
|
3538
|
+
```
|
|
3539
|
+
|
|
3540
|
+
## packageApplication()
|
|
3541
|
+
|
|
3542
|
+
### Overview
|
|
3543
|
+
|
|
3544
|
+
Runs the high-level package operation for one selected application.
|
|
3545
|
+
|
|
3546
|
+
### Signature and result
|
|
3547
|
+
|
|
3548
|
+
```text
|
|
3549
|
+
async packageApplication(options={})
|
|
3550
|
+
```
|
|
3551
|
+
|
|
3552
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3553
|
+
|
|
3554
|
+
### Availability and normalization
|
|
3555
|
+
|
|
3556
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3557
|
+
|
|
3558
|
+
### Example
|
|
3559
|
+
|
|
3560
|
+
```javascript
|
|
3561
|
+
import {packageApplication} from 'arcane-os';
|
|
3562
|
+
|
|
3563
|
+
async function usepackageApplication(...arguments_) {
|
|
3564
|
+
return packageApplication(...arguments_);
|
|
3565
|
+
}
|
|
3566
|
+
```
|
|
3567
|
+
|
|
3568
|
+
## planApplication()
|
|
3569
|
+
|
|
3570
|
+
### Overview
|
|
3571
|
+
|
|
3572
|
+
Creates one authenticated native build plan without executing the provider build.
|
|
3573
|
+
|
|
3574
|
+
### Signature and result
|
|
3575
|
+
|
|
3576
|
+
```text
|
|
3577
|
+
async planApplication(options={})
|
|
3578
|
+
```
|
|
3579
|
+
|
|
3580
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3581
|
+
|
|
3582
|
+
### Availability and normalization
|
|
3583
|
+
|
|
3584
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3585
|
+
|
|
3586
|
+
### Example
|
|
3587
|
+
|
|
3588
|
+
```javascript
|
|
3589
|
+
import {planApplication} from 'arcane-os';
|
|
3590
|
+
|
|
3591
|
+
async function useplanApplication(...arguments_) {
|
|
3592
|
+
return planApplication(...arguments_);
|
|
3593
|
+
}
|
|
3594
|
+
```
|
|
3595
|
+
|
|
3596
|
+
## repositoryApplication()
|
|
3597
|
+
|
|
3598
|
+
### Overview
|
|
3599
|
+
|
|
3600
|
+
Dispatches one selected repository status, pull, or push operation through the headless lifecycle.
|
|
3601
|
+
|
|
3602
|
+
### Signature and result
|
|
3603
|
+
|
|
3604
|
+
```text
|
|
3605
|
+
async repositoryApplication(options={})
|
|
3606
|
+
```
|
|
3607
|
+
|
|
3608
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3609
|
+
|
|
3610
|
+
### Availability and normalization
|
|
3611
|
+
|
|
3612
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3613
|
+
|
|
3614
|
+
### Example
|
|
3615
|
+
|
|
3616
|
+
```javascript
|
|
3617
|
+
import {repositoryApplication} from 'arcane-os';
|
|
3618
|
+
|
|
3619
|
+
async function userepositoryApplication(...arguments_) {
|
|
3620
|
+
return repositoryApplication(...arguments_);
|
|
3621
|
+
}
|
|
3622
|
+
```
|
|
3623
|
+
|
|
3624
|
+
## runApplication()
|
|
3625
|
+
|
|
3626
|
+
### Overview
|
|
3627
|
+
|
|
3628
|
+
Runs a browser app or performs the retained native build/verify/launch lifecycle for one target.
|
|
3629
|
+
|
|
3630
|
+
### Signature and result
|
|
3631
|
+
|
|
3632
|
+
```text
|
|
3633
|
+
async runApplication(options={})
|
|
3634
|
+
```
|
|
3635
|
+
|
|
3636
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3637
|
+
|
|
3638
|
+
### Availability and normalization
|
|
3639
|
+
|
|
3640
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3641
|
+
|
|
3642
|
+
### Example
|
|
3643
|
+
|
|
3644
|
+
```javascript
|
|
3645
|
+
import {runApplication} from 'arcane-os';
|
|
3646
|
+
|
|
3647
|
+
async function userunApplication(...arguments_) {
|
|
3648
|
+
return runApplication(...arguments_);
|
|
3649
|
+
}
|
|
3650
|
+
```
|
|
3651
|
+
|
|
3652
|
+
## testApplication()
|
|
3653
|
+
|
|
3654
|
+
### Overview
|
|
3655
|
+
|
|
3656
|
+
Runs the selected application's exact test boundary or one integrated shared test.
|
|
3657
|
+
|
|
3658
|
+
### Signature and result
|
|
3659
|
+
|
|
3660
|
+
```text
|
|
3661
|
+
async testApplication(options={})
|
|
3662
|
+
```
|
|
3663
|
+
|
|
3664
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3665
|
+
|
|
3666
|
+
### Availability and normalization
|
|
3667
|
+
|
|
3668
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3669
|
+
|
|
3670
|
+
### Example
|
|
3671
|
+
|
|
3672
|
+
```javascript
|
|
3673
|
+
import {testApplication} from 'arcane-os';
|
|
3674
|
+
|
|
3675
|
+
async function usetestApplication(...arguments_) {
|
|
3676
|
+
return testApplication(...arguments_);
|
|
3677
|
+
}
|
|
3678
|
+
```
|
|
3679
|
+
|
|
3680
|
+
## verifyApplication()
|
|
3681
|
+
|
|
3682
|
+
### Overview
|
|
3683
|
+
|
|
3684
|
+
Runs the high-level verification operation for one selected browser release.
|
|
3685
|
+
|
|
3686
|
+
### Signature and result
|
|
3687
|
+
|
|
3688
|
+
```text
|
|
3689
|
+
async verifyApplication(options={})
|
|
3690
|
+
```
|
|
3691
|
+
|
|
3692
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3693
|
+
|
|
3694
|
+
### Availability and normalization
|
|
3695
|
+
|
|
3696
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3697
|
+
|
|
3698
|
+
### Example
|
|
3699
|
+
|
|
3700
|
+
```javascript
|
|
3701
|
+
import {verifyApplication} from 'arcane-os';
|
|
3702
|
+
|
|
3703
|
+
async function useverifyApplication(...arguments_) {
|
|
3704
|
+
return verifyApplication(...arguments_);
|
|
3705
|
+
}
|
|
3706
|
+
```
|
|
3707
|
+
|
|
3708
|
+
## verifyBundleApplication()
|
|
3709
|
+
|
|
3710
|
+
### Overview
|
|
3711
|
+
|
|
3712
|
+
Runs the high-level external bundle verification operation.
|
|
3713
|
+
|
|
3714
|
+
### Signature and result
|
|
3715
|
+
|
|
3716
|
+
```text
|
|
3717
|
+
async verifyBundleApplication(options={})
|
|
3718
|
+
```
|
|
3719
|
+
|
|
3720
|
+
Import it from `arcane-os` or `arcane-os/toolchain`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3721
|
+
|
|
3722
|
+
### Availability and normalization
|
|
3723
|
+
|
|
3724
|
+
**Node; selected operation may produce browser or native output.** SDK-normalized inputs, errors, events, and documented result. Deep protocol: [Shared headless operation API + arcane-cli-events/1](protocols.md).
|
|
3725
|
+
|
|
3726
|
+
### Example
|
|
3727
|
+
|
|
3728
|
+
```javascript
|
|
3729
|
+
import {verifyBundleApplication} from 'arcane-os';
|
|
3730
|
+
|
|
3731
|
+
async function useverifyBundleApplication(...arguments_) {
|
|
3732
|
+
return verifyBundleApplication(...arguments_);
|
|
3733
|
+
}
|
|
3734
|
+
```
|
|
3735
|
+
|
|
3736
|
+
|
|
3737
|
+
# Events, processes, and testing
|
|
3738
|
+
|
|
3739
|
+
## createReporter()
|
|
3740
|
+
|
|
3741
|
+
### Overview
|
|
3742
|
+
|
|
3743
|
+
Creates the ordered CLI reporter that normalizes accepted, progress, terminal, JSON, and NDJSON event delivery.
|
|
3744
|
+
|
|
3745
|
+
### Signature, state, and output
|
|
3746
|
+
|
|
3747
|
+
```text
|
|
3748
|
+
createReporter({ command, output='human', stdout=process.stdout, stderr=process.stderr, operationId=randomUUID(), clock=()=>new Date() }={})
|
|
3749
|
+
```
|
|
3750
|
+
|
|
3751
|
+
Import it from `arcane-os` or `arcane-os/events`. This function returns
|
|
3752
|
+
synchronously. `output` must be `"human"`, `"json"`, or `"ndjson"`.
|
|
3753
|
+
`stdout` and `stderr` are writable streams; `operationId` and `clock` can be
|
|
3754
|
+
injected for deterministic tests.
|
|
3755
|
+
|
|
3756
|
+
The returned object is
|
|
3757
|
+
`{operationId, output, accept, emit, forward, complete, reject, accepted,
|
|
3758
|
+
terminal}`. `accepted` and `terminal` are live getters. Call `accept(data)`
|
|
3759
|
+
before `emit(type, data, message)` or `forward(value, data)`. Acceptance happens
|
|
3760
|
+
once; later `accept()` calls return `null`. `complete(result)` and
|
|
3761
|
+
`reject(error)` are mutually terminal, and later progress or terminal calls
|
|
3762
|
+
return `null`. Each emitted event contains `arcane-cli-events/1`, the operation
|
|
3763
|
+
id, a strictly increasing sequence, an ISO timestamp, the command, type, status,
|
|
3764
|
+
and JSON-safe data. Circular members and unsupported JSON values are omitted;
|
|
3765
|
+
errors are reduced through `errorRecord()`.
|
|
3766
|
+
|
|
3767
|
+
Human mode writes work events to stderr, readable results to stdout, and a
|
|
3768
|
+
completion line to stderr. JSON mode writes work events to stderr and exactly
|
|
3769
|
+
one final success/error envelope to stdout. NDJSON mode writes every event to
|
|
3770
|
+
stdout. Reporter methods write synchronously to the supplied streams; they do
|
|
3771
|
+
not provide backpressure promises, cancellation, or receipts. An unsupported
|
|
3772
|
+
mode, `emit()` before acceptance, an invalid clock result, or a stream write
|
|
3773
|
+
failure throws synchronously.
|
|
3774
|
+
|
|
3775
|
+
### Availability and normalization
|
|
3776
|
+
|
|
3777
|
+
**Node.** SDK event/error/report normalization. Deep protocol: [arcane-cli-events/1](protocols.md).
|
|
3778
|
+
|
|
3779
|
+
### Example
|
|
3780
|
+
|
|
3781
|
+
```javascript
|
|
3782
|
+
import {createReporter} from 'arcane-os';
|
|
3783
|
+
|
|
3784
|
+
const reporter = createReporter({command: 'check', output: 'human'});
|
|
3785
|
+
|
|
3786
|
+
reporter.accept({appId: 'example-app'});
|
|
3787
|
+
reporter.emit(
|
|
3788
|
+
'workspace.validate.check',
|
|
3789
|
+
{name: 'descriptor', ok: true},
|
|
3790
|
+
'Validated the application descriptor.'
|
|
3791
|
+
);
|
|
3792
|
+
reporter.complete({ok: true});
|
|
3793
|
+
```
|
|
3794
|
+
|
|
3795
|
+
## default()
|
|
3796
|
+
|
|
3797
|
+
### Overview
|
|
3798
|
+
|
|
3799
|
+
Default-export alias of the public `test` registration function.
|
|
3800
|
+
|
|
3801
|
+
### Signature and result
|
|
3802
|
+
|
|
3803
|
+
```text
|
|
3804
|
+
default(name, optionsOrCallback, maybeCallback)
|
|
3805
|
+
```
|
|
3806
|
+
|
|
3807
|
+
Import it from `arcane-os/testing`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3808
|
+
|
|
3809
|
+
### Availability and normalization
|
|
3810
|
+
|
|
3811
|
+
**Node.** SDK event/error/report normalization. Deep protocol: [Node ESM / owned process or test lifecycle](protocols.md).
|
|
3812
|
+
|
|
3813
|
+
### Example
|
|
3814
|
+
|
|
3815
|
+
```javascript
|
|
3816
|
+
import test from 'arcane-os/testing';
|
|
3817
|
+
|
|
3818
|
+
test('adds two values', () => {
|
|
3819
|
+
if (1 + 1 !== 2) throw new Error('Unexpected result.');
|
|
3820
|
+
});
|
|
3821
|
+
```
|
|
3822
|
+
|
|
3823
|
+
## DEFAULT_TEST_TIMEOUT_MS
|
|
3824
|
+
|
|
3825
|
+
### Overview
|
|
3826
|
+
|
|
3827
|
+
Default timeout applied by the public isolated test API.
|
|
3828
|
+
|
|
3829
|
+
### Value and import
|
|
3830
|
+
|
|
3831
|
+
```text
|
|
3832
|
+
const DEFAULT_TEST_TIMEOUT_MS
|
|
3833
|
+
```
|
|
3834
|
+
|
|
3835
|
+
Import it from `arcane-os` or `arcane-os/testing`. Treat arrays and records as immutable public values.
|
|
3836
|
+
|
|
3837
|
+
### Availability and normalization
|
|
3838
|
+
|
|
3839
|
+
**Node.** Exact immutable SDK value. Deep protocol: [Node ESM / owned process or test lifecycle](protocols.md).
|
|
3840
|
+
|
|
3841
|
+
### Example
|
|
3842
|
+
|
|
3843
|
+
```javascript
|
|
3844
|
+
import {DEFAULT_TEST_TIMEOUT_MS} from 'arcane-os';
|
|
3845
|
+
|
|
3846
|
+
console.log(DEFAULT_TEST_TIMEOUT_MS);
|
|
3847
|
+
```
|
|
3848
|
+
|
|
3849
|
+
## registeredTestCount()
|
|
3850
|
+
|
|
3851
|
+
### Overview
|
|
3852
|
+
|
|
3853
|
+
Returns the number of tests registered in the current isolated test realm.
|
|
3854
|
+
|
|
3855
|
+
### Signature and result
|
|
3856
|
+
|
|
3857
|
+
```text
|
|
3858
|
+
registeredTestCount()
|
|
3859
|
+
```
|
|
3860
|
+
|
|
3861
|
+
Import it from `arcane-os` or `arcane-os/testing`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
3862
|
+
|
|
3863
|
+
### Availability and normalization
|
|
3864
|
+
|
|
3865
|
+
**Node.** SDK event/error/report normalization. Deep protocol: [Node ESM / owned process or test lifecycle](protocols.md).
|
|
3866
|
+
|
|
3867
|
+
### Example
|
|
3868
|
+
|
|
3869
|
+
```javascript
|
|
3870
|
+
import {registeredTestCount} from 'arcane-os';
|
|
3871
|
+
|
|
3872
|
+
console.log(registeredTestCount());
|
|
3873
|
+
```
|
|
3874
|
+
|
|
3875
|
+
## runProcess()
|
|
3876
|
+
|
|
3877
|
+
### Overview
|
|
3878
|
+
|
|
3879
|
+
Runs one shell-free child command with bounded output tails, ordered stream events, heartbeats, and process-tree cancellation.
|
|
3880
|
+
|
|
3881
|
+
### Signature, parameters, and result
|
|
3882
|
+
|
|
3883
|
+
```text
|
|
3884
|
+
async runProcess(command, args=[], { cwd, env, signal, onEvent, heartbeatMs=5000, terminationGraceMs=DEFAULT_TERMINATION_GRACE_MS, allowNonzero=false, input }={})
|
|
3885
|
+
```
|
|
3886
|
+
|
|
3887
|
+
Import it from `arcane-os`. `command` is executed directly with `shell:false`;
|
|
3888
|
+
`args` must be a fixed array of strings, so shell expansion, pipelines, and
|
|
3889
|
+
redirection never occur. `cwd` selects the child directory. `env` is shallowly
|
|
3890
|
+
merged over `process.env`. When supplied, `input` is written once and stdin is
|
|
3891
|
+
closed; otherwise stdin is closed immediately. On Microsoft NT, `npm` and `npx`
|
|
3892
|
+
are normalized to their Node CLI entrypoints.
|
|
3893
|
+
|
|
3894
|
+
`onEvent` is awaited in order for `process.starting`, nonempty
|
|
3895
|
+
`process.stdout`/`process.stderr` lines, coalesced `process.heartbeat`, and the
|
|
3896
|
+
terminal process event. Stream delivery pauses the corresponding child stream
|
|
3897
|
+
while the callback owns that chunk. `heartbeatMs` defaults to 5 seconds; the
|
|
3898
|
+
timer applies a 1-second floor to ordinary numeric values.
|
|
3899
|
+
`terminationGraceMs` defaults to 1,500 ms and must
|
|
3900
|
+
be an integer from 100 through 30,000. `allowNonzero:false` rejects a nonzero
|
|
3901
|
+
exit; `true` returns it as data.
|
|
3902
|
+
|
|
3903
|
+
The promise resolves to
|
|
3904
|
+
`{command, args, cwd, code, signal, stdout, stderr}`. Here `signal` is the
|
|
3905
|
+
child's terminating signal name or `null`, not the input `AbortSignal`. `args`
|
|
3906
|
+
is copied, `cwd` defaults to the current process directory, and each captured
|
|
3907
|
+
text stream keeps a bounded recent tail using a 4 MiB threshold. A missing executable rejects with
|
|
3908
|
+
`ARCANE_PREREQUISITE_MISSING`; invalid arguments, a disallowed nonzero exit,
|
|
3909
|
+
and spawn/runtime failures use the normalized SDK error boundary, with the
|
|
3910
|
+
nonzero result retained in error details.
|
|
3911
|
+
|
|
3912
|
+
Aborting `signal` emits cancellation-requested state, terminates the owned
|
|
3913
|
+
process tree, escalates to a forced tree termination after the grace interval,
|
|
3914
|
+
drains event delivery, and rejects with `ARCANE_CANCELLED` and exit code 130.
|
|
3915
|
+
An `onEvent` failure also stops the tree and rejects with that callback failure.
|
|
3916
|
+
Cancellation proves only that the local process tree was stopped; it cannot
|
|
3917
|
+
reverse external effects already performed by the command.
|
|
3918
|
+
|
|
3919
|
+
### Availability and normalization
|
|
3920
|
+
|
|
3921
|
+
**Node.** SDK event/error/report normalization. Deep protocol: [Node ESM / owned process or test lifecycle](protocols.md).
|
|
3922
|
+
|
|
3923
|
+
### Example
|
|
3924
|
+
|
|
3925
|
+
```javascript
|
|
3926
|
+
import {runProcess} from 'arcane-os';
|
|
3927
|
+
|
|
3928
|
+
const result = await runProcess(process.execPath, ['--version'], {
|
|
3929
|
+
cwd: process.cwd(),
|
|
3930
|
+
onEvent(event) {
|
|
3931
|
+
if (event.type === 'process.stderr') console.error(event.message);
|
|
3932
|
+
}
|
|
3933
|
+
});
|
|
3934
|
+
|
|
3935
|
+
console.log(result.stdout.trim(), result.code);
|
|
3936
|
+
```
|
|
3937
|
+
|
|
3938
|
+
## runRegisteredTests()
|
|
3939
|
+
|
|
3940
|
+
### Overview
|
|
3941
|
+
|
|
3942
|
+
Executes the current isolated realm's registered tests once and returns the normalized Vanilla Test report.
|
|
3943
|
+
|
|
3944
|
+
### Signature, lifecycle, and result
|
|
3945
|
+
|
|
3946
|
+
```text
|
|
3947
|
+
async runRegisteredTests({signal, requireTests=true, onPhase}={})
|
|
3948
|
+
```
|
|
3949
|
+
|
|
3950
|
+
Import it from `arcane-os` or `arcane-os/testing`. Register every top-level test
|
|
3951
|
+
with `test()` before this call. One module realm can run its registry only once;
|
|
3952
|
+
a second call rejects with `ReferenceError`. With `requireTests:true`, an empty
|
|
3953
|
+
registry becomes one failed report outcome. Set it to `false` only when an empty
|
|
3954
|
+
suite is intentional.
|
|
3955
|
+
|
|
3956
|
+
Tests run sequentially. A test callback receives
|
|
3957
|
+
`{signal, after(callback), test(name, options?, callback)}` for cooperative
|
|
3958
|
+
cancellation, FIFO cleanup, and owned nested tests. Each test uses its declared
|
|
3959
|
+
timeout or `DEFAULT_TEST_TIMEOUT_MS`; test timeouts can abort the remainder of
|
|
3960
|
+
the run, cleanup and report phases have their own bounded timeouts, and cleanup
|
|
3961
|
+
is skipped after fatal timeout or cancellation because JavaScript promises
|
|
3962
|
+
cannot be preempted safely. The awaited `onPhase` callback receives started and
|
|
3963
|
+
completed records for test, cleanup, and report phases. A phase-callback failure
|
|
3964
|
+
is authoritative and can reject the run.
|
|
3965
|
+
|
|
3966
|
+
The promise resolves to the frozen Vanilla Test snapshot
|
|
3967
|
+
`{passed, failed, total, failureCount, ok, report}`. `passed` and `failed` are
|
|
3968
|
+
frozen description arrays and `report` is the rendered text. Ordinary assertion
|
|
3969
|
+
failures produce `ok:false`; invalid API use, cancellation, a fatal timeout, or
|
|
3970
|
+
an authoritative phase/report failure rejects. Aborting `signal` propagates to
|
|
3971
|
+
the currently owned test and stops later tests, but test callbacks must observe
|
|
3972
|
+
their supplied signal to stop host work cooperatively.
|
|
3973
|
+
|
|
3974
|
+
### Availability and normalization
|
|
3975
|
+
|
|
3976
|
+
**Node.** SDK event/error/report normalization. Deep protocol: [Node ESM / owned process or test lifecycle](protocols.md).
|
|
3977
|
+
|
|
3978
|
+
### Example
|
|
3979
|
+
|
|
3980
|
+
```javascript
|
|
3981
|
+
import {runRegisteredTests, test} from 'arcane-os/testing';
|
|
3982
|
+
|
|
3983
|
+
test('normalizes an application id', () => {
|
|
3984
|
+
const value = 'example-app'.trim();
|
|
3985
|
+
if (value !== 'example-app') throw new Error('Unexpected id.');
|
|
3986
|
+
});
|
|
3987
|
+
|
|
3988
|
+
const report = await runRegisteredTests({
|
|
3989
|
+
onPhase(phase) {
|
|
3990
|
+
if (phase.status === 'started') console.log(phase.name);
|
|
3991
|
+
}
|
|
3992
|
+
});
|
|
3993
|
+
|
|
3994
|
+
if (!report.ok) process.exitCode = 1;
|
|
3995
|
+
```
|
|
3996
|
+
|
|
3997
|
+
## test()
|
|
3998
|
+
|
|
3999
|
+
### Overview
|
|
4000
|
+
|
|
4001
|
+
Registers one public test, optional timeout, callback, nested cases, and FIFO cleanup in the isolated runner.
|
|
4002
|
+
|
|
4003
|
+
### Signature and result
|
|
4004
|
+
|
|
4005
|
+
```text
|
|
4006
|
+
test(name, optionsOrCallback, maybeCallback)
|
|
4007
|
+
```
|
|
4008
|
+
|
|
4009
|
+
Import it from `arcane-os` or `arcane-os/testing`. The signature above states whether settlement is synchronous or promise-based. The overview and owning group define result authority, side effects, callbacks, events, cancellation, and receipt lifetime.
|
|
4010
|
+
|
|
4011
|
+
### Availability and normalization
|
|
4012
|
+
|
|
4013
|
+
**Node.** SDK event/error/report normalization. Deep protocol: [Node ESM / owned process or test lifecycle](protocols.md).
|
|
4014
|
+
|
|
4015
|
+
### Example
|
|
4016
|
+
|
|
4017
|
+
```javascript
|
|
4018
|
+
import {test} from 'arcane-os';
|
|
4019
|
+
|
|
4020
|
+
test('adds two values', () => {
|
|
4021
|
+
if (1 + 1 !== 2) throw new Error('Unexpected result.');
|
|
4022
|
+
});
|
|
4023
|
+
```
|
|
4024
|
+
|
|
4025
|
+
# Explicit SDK update checks
|
|
4026
|
+
|
|
4027
|
+
This is an on-demand Node.js control-plane and CLI maintainer surface. It never
|
|
4028
|
+
runs from renderer application code automatically. One call can make one
|
|
4029
|
+
bounded, credential-free HTTPS GET to an approved npm registry; there is no
|
|
4030
|
+
polling, recurrence, interval, background agent, download, install, dependency
|
|
4031
|
+
mutation, runtime replacement, or self-update. The only timer is the timeout
|
|
4032
|
+
owned and cleared by that one request.
|
|
4033
|
+
|
|
4034
|
+
## SDK_UPDATE_REGISTRY
|
|
4035
|
+
|
|
4036
|
+
### Overview
|
|
4037
|
+
|
|
4038
|
+
Approved default npm registry root for an explicit SDK update check.
|
|
4039
|
+
|
|
4040
|
+
### Value
|
|
4041
|
+
|
|
4042
|
+
```text
|
|
4043
|
+
const SDK_UPDATE_REGISTRY = 'https://registry.npmjs.org/'
|
|
4044
|
+
```
|
|
4045
|
+
|
|
4046
|
+
The request builder appends the fixed
|
|
4047
|
+
`-/package/arcane-os/dist-tags` endpoint only after validating the root.
|
|
4048
|
+
|
|
4049
|
+
### Availability and normalization
|
|
4050
|
+
|
|
4051
|
+
**Node; on-demand CLI or maintainer check only.** Exact immutable HTTPS origin
|
|
4052
|
+
string. Importing it performs no request and starts no timer.
|
|
4053
|
+
|
|
4054
|
+
### Example
|
|
4055
|
+
|
|
4056
|
+
```javascript
|
|
4057
|
+
import {SDK_UPDATE_REGISTRY, validateUpdateRegistry} from 'arcane-os';
|
|
4058
|
+
|
|
4059
|
+
const registry = validateUpdateRegistry(SDK_UPDATE_REGISTRY);
|
|
4060
|
+
console.log(registry.origin);
|
|
4061
|
+
```
|
|
4062
|
+
|
|
4063
|
+
## SDK_UPDATE_TIMEOUT_MS
|
|
4064
|
+
|
|
4065
|
+
### Overview
|
|
4066
|
+
|
|
4067
|
+
Default timeout for the single registry request owned by an explicit update check.
|
|
4068
|
+
|
|
4069
|
+
### Value
|
|
4070
|
+
|
|
4071
|
+
```text
|
|
4072
|
+
const SDK_UPDATE_TIMEOUT_MS = 2500
|
|
4073
|
+
```
|
|
4074
|
+
|
|
4075
|
+
### Availability and normalization
|
|
4076
|
+
|
|
4077
|
+
**Node; on-demand CLI or maintainer check only.** Exact immutable millisecond
|
|
4078
|
+
integer. Accepted per-call timeouts are safe integers from 100 through 10,000
|
|
4079
|
+
milliseconds.
|
|
4080
|
+
|
|
4081
|
+
### Example
|
|
4082
|
+
|
|
4083
|
+
```javascript
|
|
4084
|
+
import {SDK_UPDATE_TIMEOUT_MS} from 'arcane-os';
|
|
4085
|
+
|
|
4086
|
+
console.log(`Update-check timeout: ${SDK_UPDATE_TIMEOUT_MS} ms`);
|
|
4087
|
+
```
|
|
4088
|
+
|
|
4089
|
+
## checkForSdkUpdate()
|
|
4090
|
+
|
|
4091
|
+
### Overview
|
|
4092
|
+
|
|
4093
|
+
Performs exactly one bounded registry read and reports whether the npm dist-tag
|
|
4094
|
+
selected for the installed SDK is newer. It only checks metadata; it does not
|
|
4095
|
+
download, install, mutate, or schedule anything.
|
|
4096
|
+
|
|
4097
|
+
### Signature and parameters
|
|
4098
|
+
|
|
4099
|
+
```text
|
|
4100
|
+
async checkForSdkUpdate({
|
|
4101
|
+
packageName=SDK_NAME,
|
|
4102
|
+
currentVersion=SDK_VERSION,
|
|
4103
|
+
registry=SDK_UPDATE_REGISTRY,
|
|
4104
|
+
allowedRegistryHosts,
|
|
4105
|
+
timeoutMs=SDK_UPDATE_TIMEOUT_MS,
|
|
4106
|
+
fetchImpl=globalThis.fetch,
|
|
4107
|
+
signal,
|
|
4108
|
+
onEvent,
|
|
4109
|
+
clock=()=>new Date()
|
|
4110
|
+
}={})
|
|
4111
|
+
```
|
|
4112
|
+
|
|
4113
|
+
`packageName` must be exactly `arcane-os`. `currentVersion` must be strict
|
|
4114
|
+
semantic version text: prereleases select npm `dev`, while stable versions
|
|
4115
|
+
select `latest`. `registry` must pass `validateUpdateRegistry()`; the default
|
|
4116
|
+
hostname allowlist contains only `registry.npmjs.org`. `allowedRegistryHosts`,
|
|
4117
|
+
`fetchImpl`, and `clock` are explicit test or controlled-host injection points,
|
|
4118
|
+
not discovery mechanisms. `timeoutMs` is 100-10,000. `signal` provides caller
|
|
4119
|
+
cancellation, and each supplied `onEvent` callback is awaited.
|
|
4120
|
+
|
|
4121
|
+
The request is one `GET` with `credentials:'omit'`, `redirect:'error'`,
|
|
4122
|
+
`cache:'no-store'`, and `referrerPolicy:'no-referrer'`. The response must retain
|
|
4123
|
+
the exact endpoint identity, return HTTP 200 and JSON media type, contain at
|
|
4124
|
+
most 32 KiB of valid UTF-8, and decode to 1-64 safe dist-tags whose values are
|
|
4125
|
+
strict semantic versions no longer than 128 characters.
|
|
4126
|
+
|
|
4127
|
+
### Result, events, and errors
|
|
4128
|
+
|
|
4129
|
+
The promise resolves to a frozen object:
|
|
4130
|
+
|
|
4131
|
+
```text
|
|
4132
|
+
{
|
|
4133
|
+
packageName,
|
|
4134
|
+
currentVersion,
|
|
4135
|
+
registryVersion,
|
|
4136
|
+
tag, // 'dev' or 'latest'
|
|
4137
|
+
status, // 'update-available', 'current', or 'ahead'
|
|
4138
|
+
updateAvailable,
|
|
4139
|
+
registry, // normalized origin
|
|
4140
|
+
checkedAt // clock().toISOString()
|
|
4141
|
+
}
|
|
4142
|
+
```
|
|
4143
|
+
|
|
4144
|
+
After initial validation it emits awaited `update.check.started`. Success emits
|
|
4145
|
+
`update.check.completed`; a non-cancellation request or response failure emits
|
|
4146
|
+
`update.check.failed` with the normalized failure code.
|
|
4147
|
+
Registry, timeout, HTTP, redirect, content, JSON, dist-tag, version, or clock
|
|
4148
|
+
failures reject with `ARCANE_UPDATE_CHECK_FAILED`. Caller cancellation rejects
|
|
4149
|
+
with `ARCANE_CANCELLED`; it is distinct from the per-request timeout. Event
|
|
4150
|
+
callbacks are awaited, and a callback rejection can reject or replace the
|
|
4151
|
+
operation's normal settlement; it is never ignored. The owned timeout is cleared
|
|
4152
|
+
in `finally`.
|
|
4153
|
+
|
|
4154
|
+
### Availability and normalization
|
|
4155
|
+
|
|
4156
|
+
**Node; on-demand CLI or maintainer check only.** Registry data is reduced to
|
|
4157
|
+
one frozen status result. No provider payload becomes installation authority,
|
|
4158
|
+
and applications never invoke this function automatically.
|
|
4159
|
+
|
|
4160
|
+
### Example
|
|
4161
|
+
|
|
4162
|
+
```javascript
|
|
4163
|
+
import {checkForSdkUpdate} from 'arcane-os';
|
|
4164
|
+
|
|
4165
|
+
// Defined for an explicit maintainer action; this function is not scheduled.
|
|
4166
|
+
async function checkInstalledSdkOnce(signal) {
|
|
4167
|
+
const result = await checkForSdkUpdate({
|
|
4168
|
+
signal,
|
|
4169
|
+
onEvent(event) {
|
|
4170
|
+
console.info(event.type, event.message);
|
|
4171
|
+
}
|
|
4172
|
+
});
|
|
4173
|
+
|
|
4174
|
+
console.log(result.status, result.registryVersion);
|
|
4175
|
+
return result;
|
|
4176
|
+
}
|
|
4177
|
+
```
|
|
4178
|
+
|
|
4179
|
+
## checkSdkUpdate()
|
|
4180
|
+
|
|
4181
|
+
### Overview
|
|
4182
|
+
|
|
4183
|
+
High-level toolchain/CLI wrapper for exactly one `checkForSdkUpdate()` call.
|
|
4184
|
+
|
|
4185
|
+
### Signature and result
|
|
4186
|
+
|
|
4187
|
+
```text
|
|
4188
|
+
async checkSdkUpdate(options={})
|
|
4189
|
+
```
|
|
4190
|
+
|
|
4191
|
+
Import it from `arcane-os` or `arcane-os/toolchain`.
|
|
4192
|
+
|
|
4193
|
+
It forwards the options unchanged and preserves the direct result, events,
|
|
4194
|
+
errors, cancellation, timeout, and security boundary. `executeOperation()`
|
|
4195
|
+
routes the exact command `'update-check'` here, and `createToolchain()` exposes
|
|
4196
|
+
it as `updateCheck(options)`. Neither route polls or schedules a later call.
|
|
4197
|
+
|
|
4198
|
+
### Availability and normalization
|
|
4199
|
+
|
|
4200
|
+
**Node; on-demand CLI or maintainer check only.** Same normalized contract as
|
|
4201
|
+
`checkForSdkUpdate()` with no additional request or mutation.
|
|
4202
|
+
|
|
4203
|
+
### Example
|
|
4204
|
+
|
|
4205
|
+
```javascript
|
|
4206
|
+
import {checkSdkUpdate} from 'arcane-os';
|
|
4207
|
+
|
|
4208
|
+
async function runRequestedUpdateCheck(signal) {
|
|
4209
|
+
const result = await checkSdkUpdate({signal});
|
|
4210
|
+
return result.updateAvailable;
|
|
4211
|
+
}
|
|
4212
|
+
```
|
|
4213
|
+
|
|
4214
|
+
## compareSdkVersions()
|
|
4215
|
+
|
|
4216
|
+
### Overview
|
|
4217
|
+
|
|
4218
|
+
Synchronously compares two strict semantic SDK versions without network access.
|
|
4219
|
+
|
|
4220
|
+
### Signature and result
|
|
4221
|
+
|
|
4222
|
+
```text
|
|
4223
|
+
compareSdkVersions(leftValue, rightValue)
|
|
4224
|
+
```
|
|
4225
|
+
|
|
4226
|
+
Returns `-1` when the left version has lower precedence, `0` when precedence is
|
|
4227
|
+
equal, and `1` when it is higher. Major, minor, patch, then semantic prerelease
|
|
4228
|
+
identifiers are compared. A stable version outranks a prerelease at the same
|
|
4229
|
+
core version; build metadata does not affect precedence. Invalid input throws
|
|
4230
|
+
the packager's semantic-version validation error synchronously.
|
|
4231
|
+
|
|
4232
|
+
### Availability and normalization
|
|
4233
|
+
|
|
4234
|
+
**Node; on-demand CLI or maintainer check only.** Pure in-process comparison;
|
|
4235
|
+
no request, timer, event, mutation, or cancellation contract.
|
|
4236
|
+
|
|
4237
|
+
### Example
|
|
4238
|
+
|
|
4239
|
+
```javascript
|
|
4240
|
+
import {compareSdkVersions} from 'arcane-os';
|
|
4241
|
+
|
|
4242
|
+
console.log(compareSdkVersions('0.1.0-dev.4', '0.1.0-dev.5')); // -1
|
|
4243
|
+
console.log(compareSdkVersions('1.0.0+local', '1.0.0+registry')); // 0
|
|
4244
|
+
```
|
|
4245
|
+
|
|
4246
|
+
## updateTagForVersion()
|
|
4247
|
+
|
|
4248
|
+
### Overview
|
|
4249
|
+
|
|
4250
|
+
Selects the one npm dist-tag appropriate for an installed SDK version.
|
|
4251
|
+
|
|
4252
|
+
### Signature and result
|
|
4253
|
+
|
|
4254
|
+
```text
|
|
4255
|
+
updateTagForVersion(value)
|
|
4256
|
+
```
|
|
4257
|
+
|
|
4258
|
+
Returns `'dev'` when the strict semantic version contains any prerelease
|
|
4259
|
+
identifier and `'latest'` otherwise. Invalid input synchronously throws
|
|
4260
|
+
`ARCANE_UPDATE_CHECK_FAILED` with the semantic-version error as its cause.
|
|
4261
|
+
|
|
4262
|
+
### Availability and normalization
|
|
4263
|
+
|
|
4264
|
+
**Node; on-demand CLI or maintainer check only.** Pure `dev`/`latest`
|
|
4265
|
+
normalization; no registry request or state change.
|
|
4266
|
+
|
|
4267
|
+
### Example
|
|
4268
|
+
|
|
4269
|
+
```javascript
|
|
4270
|
+
import {updateTagForVersion} from 'arcane-os';
|
|
4271
|
+
|
|
4272
|
+
console.log(updateTagForVersion('0.1.0-dev.4')); // dev
|
|
4273
|
+
console.log(updateTagForVersion('1.0.0')); // latest
|
|
4274
|
+
```
|
|
4275
|
+
|
|
4276
|
+
## validateUpdateRegistry()
|
|
4277
|
+
|
|
4278
|
+
### Overview
|
|
4279
|
+
|
|
4280
|
+
Synchronously validates one credential-free HTTPS registry root against an
|
|
4281
|
+
explicit hostname allowlist.
|
|
4282
|
+
|
|
4283
|
+
### Signature and result
|
|
4284
|
+
|
|
4285
|
+
```text
|
|
4286
|
+
validateUpdateRegistry(value, {
|
|
4287
|
+
allowedHosts=new Set(['registry.npmjs.org'])
|
|
4288
|
+
}={})
|
|
4289
|
+
```
|
|
4290
|
+
|
|
4291
|
+
The URL must use HTTPS, have no username, password, query, or fragment, use the
|
|
4292
|
+
root path `/`, and use no explicit port other than 443. The lowercase hostname
|
|
4293
|
+
must be admitted by the supplied Set-like `allowedHosts`. It returns the
|
|
4294
|
+
normalized `URL` object. Validation performs no DNS lookup or request and does
|
|
4295
|
+
not claim trust in registry content.
|
|
4296
|
+
|
|
4297
|
+
Invalid syntax, credentials, scheme, path, port, or hostname throws
|
|
4298
|
+
synchronously with `ARCANE_UPDATE_CHECK_FAILED`; the error can contain the
|
|
4299
|
+
parsed origin as diagnostic detail.
|
|
4300
|
+
|
|
4301
|
+
### Availability and normalization
|
|
4302
|
+
|
|
4303
|
+
**Node; on-demand CLI or maintainer check only.** Exact origin validation; no
|
|
4304
|
+
fallback, redirect acceptance, host discovery, polling, or mutation.
|
|
4305
|
+
|
|
4306
|
+
### Example
|
|
4307
|
+
|
|
4308
|
+
```javascript
|
|
4309
|
+
import {SDK_UPDATE_REGISTRY, validateUpdateRegistry} from 'arcane-os';
|
|
4310
|
+
|
|
4311
|
+
const registry = validateUpdateRegistry(SDK_UPDATE_REGISTRY);
|
|
4312
|
+
console.log(registry.href); // https://registry.npmjs.org/
|
|
4313
|
+
```
|
|
4314
|
+
|
|
4315
|
+
# Central events, time travel, and DOM instrumentation
|
|
4316
|
+
|
|
4317
|
+
## ARCANE_EVENT_STACK_PROTOCOL
|
|
4318
|
+
|
|
4319
|
+
### Overview
|
|
4320
|
+
|
|
4321
|
+
The exact discriminator for serialized Arcane event-stack documents and every record they contain. Use it to reject incompatible diagnostic files before review or playback.
|
|
4322
|
+
|
|
4323
|
+
### Value and use
|
|
4324
|
+
|
|
4325
|
+
```text
|
|
4326
|
+
const ARCANE_EVENT_STACK_PROTOCOL = 'arcane-event-stack/1'
|
|
4327
|
+
```
|
|
4328
|
+
|
|
4329
|
+
This is a data-format version, not the Core `arcane/1` RPC protocol and not a network transport. `parseEventStack()` enforces it on the document and each retained record. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4330
|
+
|
|
4331
|
+
### Availability and normalization
|
|
4332
|
+
|
|
4333
|
+
**Node and browser/bundler.** Exact host-neutral protocol string; it grants no capability or authority.
|
|
4334
|
+
|
|
4335
|
+
### Example
|
|
4336
|
+
|
|
4337
|
+
```javascript
|
|
4338
|
+
import {ARCANE_EVENT_STACK_PROTOCOL} from 'arcane-os/event-manager';
|
|
4339
|
+
|
|
4340
|
+
if (document.protocol !== ARCANE_EVENT_STACK_PROTOCOL) {
|
|
4341
|
+
throw new Error('Unsupported event stack.');
|
|
4342
|
+
}
|
|
4343
|
+
```
|
|
4344
|
+
|
|
4345
|
+
## DEFAULT_DOM_EVENT_TYPES
|
|
4346
|
+
|
|
4347
|
+
### Overview
|
|
4348
|
+
|
|
4349
|
+
The frozen default list of capture-phase browser interaction names observed by DOM instrumentation. Pass a smaller `eventTypes` array when a debugger needs only a focused interaction class.
|
|
4350
|
+
|
|
4351
|
+
### Value and use
|
|
4352
|
+
|
|
4353
|
+
```text
|
|
4354
|
+
const DEFAULT_DOM_EVENT_TYPES
|
|
4355
|
+
```
|
|
4356
|
+
|
|
4357
|
+
The list is configuration, not an event source. Observation begins only after a controller starts, normally because time travel is enabled on a manager with attached DOM instrumentation. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4358
|
+
|
|
4359
|
+
### Availability and normalization
|
|
4360
|
+
|
|
4361
|
+
**Node and browser/bundler; meaningful to browser DOM instrumentation.** The exact frozen strings are normalized; live host event objects are never stored in this value.
|
|
4362
|
+
|
|
4363
|
+
### Example
|
|
4364
|
+
|
|
4365
|
+
```javascript
|
|
4366
|
+
import {DEFAULT_DOM_EVENT_TYPES} from 'arcane-os/event-manager';
|
|
4367
|
+
|
|
4368
|
+
console.log(DEFAULT_DOM_EVENT_TYPES.includes('click'));
|
|
4369
|
+
```
|
|
4370
|
+
|
|
4371
|
+
## DOM_INTERACTION_EVENT
|
|
4372
|
+
|
|
4373
|
+
### Overview
|
|
4374
|
+
|
|
4375
|
+
The event name used for bounded diagnostics of captured clicks, keys, pointer actions, form activity, and the other configured DOM interactions. Its payload describes the target and path without retaining DOM nodes.
|
|
4376
|
+
|
|
4377
|
+
### Value and use
|
|
4378
|
+
|
|
4379
|
+
```text
|
|
4380
|
+
const DOM_INTERACTION_EVENT = 'arcane.dom.interaction'
|
|
4381
|
+
```
|
|
4382
|
+
|
|
4383
|
+
Listen on the EventManager to update a debugger in real time. Recording snapshots the diagnostic into `arcane-event-stack/1`; privacy defaults omit input values and redact sensitive event detail. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4384
|
+
|
|
4385
|
+
### Availability and normalization
|
|
4386
|
+
|
|
4387
|
+
**Browser DOM or a DOM-compatible test host; constant imports in Node.** Target, path, flags, and enabled details are normalized diagnostics, not replayable browser event objects.
|
|
4388
|
+
|
|
4389
|
+
### Example
|
|
4390
|
+
|
|
4391
|
+
```javascript
|
|
4392
|
+
import {DOM_INTERACTION_EVENT, arcaneEvents} from 'arcane-os/event-manager';
|
|
4393
|
+
|
|
4394
|
+
arcaneEvents.on(DOM_INTERACTION_EVENT, diagnostic => {
|
|
4395
|
+
console.log(diagnostic.eventType, diagnostic.target?.selector);
|
|
4396
|
+
});
|
|
4397
|
+
```
|
|
4398
|
+
|
|
4399
|
+
## DOM_MUTATION_EVENT
|
|
4400
|
+
|
|
4401
|
+
### Overview
|
|
4402
|
+
|
|
4403
|
+
The event name used for normalized attribute, character-data, and child-list mutation diagnostics. It lets review tools correlate observable DOM changes with the interaction that preceded them.
|
|
4404
|
+
|
|
4405
|
+
### Value and use
|
|
4406
|
+
|
|
4407
|
+
```text
|
|
4408
|
+
const DOM_MUTATION_EVENT = 'arcane.dom.mutation'
|
|
4409
|
+
```
|
|
4410
|
+
|
|
4411
|
+
Mutation capture uses `MutationObserver` and is enabled by default when DOM instrumentation starts. Markup is omitted by default; sensitive attributes, private elements, and URLs remain redacted. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4412
|
+
|
|
4413
|
+
### Availability and normalization
|
|
4414
|
+
|
|
4415
|
+
**Browser DOM or a DOM-compatible test host; constant imports in Node.** The payload is a bounded diagnostic projection and cannot reconstruct or authorize changes to the DOM.
|
|
4416
|
+
|
|
4417
|
+
### Example
|
|
4418
|
+
|
|
4419
|
+
```javascript
|
|
4420
|
+
import {DOM_MUTATION_EVENT, arcaneEvents} from 'arcane-os/event-manager';
|
|
4421
|
+
|
|
4422
|
+
arcaneEvents.on(DOM_MUTATION_EVENT, mutation => {
|
|
4423
|
+
console.log(mutation.mutationType, mutation.target?.selector);
|
|
4424
|
+
});
|
|
4425
|
+
```
|
|
4426
|
+
|
|
4427
|
+
## DOM_OBSERVATION_STARTED_EVENT
|
|
4428
|
+
|
|
4429
|
+
### Overview
|
|
4430
|
+
|
|
4431
|
+
The lifecycle event emitted after the requested DOM listeners and mutation observer start successfully. The payload identifies the root and records the active capture options.
|
|
4432
|
+
|
|
4433
|
+
### Value and use
|
|
4434
|
+
|
|
4435
|
+
```text
|
|
4436
|
+
const DOM_OBSERVATION_STARTED_EVENT = 'arcane.dom.observation.started'
|
|
4437
|
+
```
|
|
4438
|
+
|
|
4439
|
+
A failed start cleans up partial listeners and does not emit this event. The event is recorded only when the owning EventManager currently has time travel enabled. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4440
|
+
|
|
4441
|
+
### Availability and normalization
|
|
4442
|
+
|
|
4443
|
+
**Browser DOM or a DOM-compatible test host; constant imports in Node.** The payload is a normalized diagnostic of configuration, not proof of host capability outside the current controller.
|
|
4444
|
+
|
|
4445
|
+
### Example
|
|
4446
|
+
|
|
4447
|
+
```javascript
|
|
4448
|
+
import {DOM_OBSERVATION_STARTED_EVENT, arcaneEvents} from 'arcane-os/event-manager';
|
|
4449
|
+
|
|
4450
|
+
arcaneEvents.once(DOM_OBSERVATION_STARTED_EVENT, state => {
|
|
4451
|
+
console.log(state.eventTypes.length);
|
|
4452
|
+
});
|
|
4453
|
+
```
|
|
4454
|
+
|
|
4455
|
+
## DOM_OBSERVATION_STOPPED_EVENT
|
|
4456
|
+
|
|
4457
|
+
### Overview
|
|
4458
|
+
|
|
4459
|
+
The lifecycle event emitted after normal shutdown of active DOM observation. It supports debugger state and teardown assertions without exposing listener internals.
|
|
4460
|
+
|
|
4461
|
+
### Value and use
|
|
4462
|
+
|
|
4463
|
+
```text
|
|
4464
|
+
const DOM_OBSERVATION_STOPPED_EVENT = 'arcane.dom.observation.stopped'
|
|
4465
|
+
```
|
|
4466
|
+
|
|
4467
|
+
Calling `stop()` when already inactive is idempotent and emits nothing. Retention overflow stops DOM observation with lifecycle emission suppressed so the terminal overflow marker remains the last stack record. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4468
|
+
|
|
4469
|
+
### Availability and normalization
|
|
4470
|
+
|
|
4471
|
+
**Browser DOM or a DOM-compatible test host; constant imports in Node.** Its root payload is a normalized descriptor and contains no live DOM node.
|
|
4472
|
+
|
|
4473
|
+
### Example
|
|
4474
|
+
|
|
4475
|
+
```javascript
|
|
4476
|
+
import {DOM_OBSERVATION_STOPPED_EVENT, arcaneEvents} from 'arcane-os/event-manager';
|
|
4477
|
+
|
|
4478
|
+
arcaneEvents.on(DOM_OBSERVATION_STOPPED_EVENT, ({root}) => {
|
|
4479
|
+
console.log(root?.kind);
|
|
4480
|
+
});
|
|
4481
|
+
```
|
|
4482
|
+
|
|
4483
|
+
## EventManager
|
|
4484
|
+
|
|
4485
|
+
### Overview
|
|
4486
|
+
|
|
4487
|
+
A synchronous pub/sub manager with opt-in bounded time-travel recording, strict event-stack import/export, cursor review, playback, and optional DOM instrumentation. Create an instance for an isolated subsystem or use `arcaneEvents` for the package singleton.
|
|
4488
|
+
|
|
4489
|
+
### Syntax and result
|
|
4490
|
+
|
|
4491
|
+
```text
|
|
4492
|
+
new EventManager({
|
|
4493
|
+
timeTravel=false,
|
|
4494
|
+
dom=null,
|
|
4495
|
+
captureStacks=false,
|
|
4496
|
+
redactSensitive=true,
|
|
4497
|
+
maxEvents=10_000,
|
|
4498
|
+
maxSnapshotDepth=50,
|
|
4499
|
+
maxSnapshotEntries=1_000,
|
|
4500
|
+
maxSnapshotStringLength=10_000,
|
|
4501
|
+
clock=()=>new Date(),
|
|
4502
|
+
now,
|
|
4503
|
+
sessionId
|
|
4504
|
+
}={})
|
|
4505
|
+
```
|
|
4506
|
+
|
|
4507
|
+
Listeners receive the original live arguments synchronously. When recording is enabled, the manager separately stores deeply frozen bounded snapshots, parent/causation structure, timing, status, and a redacted error snapshot. See the [central events guide](event-manager.md) for every getter, method, default, failure, and recovery path. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4508
|
+
|
|
4509
|
+
### Availability and normalization
|
|
4510
|
+
|
|
4511
|
+
**Node and browser/bundler; DOM capture requires a compatible DOM.** Pub/sub is host-neutral. Recorded values are normalized snapshots; live payload identity and listener side effects remain application-defined.
|
|
4512
|
+
|
|
4513
|
+
### Example
|
|
4514
|
+
|
|
4515
|
+
```javascript
|
|
4516
|
+
import {EventManager} from 'arcane-os/event-manager';
|
|
4517
|
+
|
|
4518
|
+
const events = new EventManager({timeTravel:true, maxEvents:100});
|
|
4519
|
+
events.on('cart.updated', cart => console.log(cart.total));
|
|
4520
|
+
events.emit('cart.updated', {total:42});
|
|
4521
|
+
console.log(events.history.at(-1).status);
|
|
4522
|
+
```
|
|
4523
|
+
|
|
4524
|
+
## PLAYBACK_CANCELLED_EVENT
|
|
4525
|
+
|
|
4526
|
+
### Overview
|
|
4527
|
+
|
|
4528
|
+
The playback lifecycle event emitted when an AbortSignal aborts an active review. Its frozen summary reports the source session, number delivered, current cursor, `completed:false`, and a bounded error snapshot.
|
|
4529
|
+
|
|
4530
|
+
### Value and use
|
|
4531
|
+
|
|
4532
|
+
```text
|
|
4533
|
+
const PLAYBACK_CANCELLED_EVENT = 'arcane.time-travel.playback.cancelled'
|
|
4534
|
+
```
|
|
4535
|
+
|
|
4536
|
+
The playback promise rejects with the abort reason after emitting this event. Already delivered callbacks or event handlers are not rolled back. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4537
|
+
|
|
4538
|
+
### Availability and normalization
|
|
4539
|
+
|
|
4540
|
+
**Node and browser/bundler.** The lifecycle summary is normalized; cancellation remains cooperative and local to playback.
|
|
4541
|
+
|
|
4542
|
+
### Example
|
|
4543
|
+
|
|
4544
|
+
```javascript
|
|
4545
|
+
import {PLAYBACK_CANCELLED_EVENT, arcaneEvents} from 'arcane-os/event-manager';
|
|
4546
|
+
|
|
4547
|
+
arcaneEvents.on(PLAYBACK_CANCELLED_EVENT, result => {
|
|
4548
|
+
console.log(result.delivered, result.completed);
|
|
4549
|
+
});
|
|
4550
|
+
```
|
|
4551
|
+
|
|
4552
|
+
## PLAYBACK_COMPLETED_EVENT
|
|
4553
|
+
|
|
4554
|
+
### Overview
|
|
4555
|
+
|
|
4556
|
+
The playback lifecycle event emitted after every selected record and `onRecord` callback completes. The same frozen summary shape is returned from `playback()`.
|
|
4557
|
+
|
|
4558
|
+
### Value and use
|
|
4559
|
+
|
|
4560
|
+
```text
|
|
4561
|
+
const PLAYBACK_COMPLETED_EVENT = 'arcane.time-travel.playback.completed'
|
|
4562
|
+
```
|
|
4563
|
+
|
|
4564
|
+
Completion means the local review loop finished. It does not mean original external side effects were reproduced, acknowledged, or committed. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4565
|
+
|
|
4566
|
+
### Availability and normalization
|
|
4567
|
+
|
|
4568
|
+
**Node and browser/bundler.** Session, delivered count, cursor, and completion state are normalized.
|
|
4569
|
+
|
|
4570
|
+
### Example
|
|
4571
|
+
|
|
4572
|
+
```javascript
|
|
4573
|
+
import {PLAYBACK_COMPLETED_EVENT, arcaneEvents} from 'arcane-os/event-manager';
|
|
4574
|
+
|
|
4575
|
+
arcaneEvents.once(PLAYBACK_COMPLETED_EVENT, result => {
|
|
4576
|
+
console.log(`Reviewed ${result.delivered} records`);
|
|
4577
|
+
});
|
|
4578
|
+
```
|
|
4579
|
+
|
|
4580
|
+
## PLAYBACK_FAILED_EVENT
|
|
4581
|
+
|
|
4582
|
+
### Overview
|
|
4583
|
+
|
|
4584
|
+
The playback lifecycle event emitted when parsing, timing, event delivery, or the caller's `onRecord` callback fails for a non-cancellation reason. The playback promise then rejects with the original error.
|
|
4585
|
+
|
|
4586
|
+
### Value and use
|
|
4587
|
+
|
|
4588
|
+
```text
|
|
4589
|
+
const PLAYBACK_FAILED_EVENT = 'arcane.time-travel.playback.failed'
|
|
4590
|
+
```
|
|
4591
|
+
|
|
4592
|
+
The diagnostic error in the lifecycle payload is a bounded snapshot and may not preserve object identity. Records delivered before failure are not undone. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4593
|
+
|
|
4594
|
+
### Availability and normalization
|
|
4595
|
+
|
|
4596
|
+
**Node and browser/bundler.** The failure summary is normalized and redacted; the thrown error remains the local failure value.
|
|
4597
|
+
|
|
4598
|
+
### Example
|
|
4599
|
+
|
|
4600
|
+
```javascript
|
|
4601
|
+
import {PLAYBACK_FAILED_EVENT, arcaneEvents} from 'arcane-os/event-manager';
|
|
4602
|
+
|
|
4603
|
+
arcaneEvents.on(PLAYBACK_FAILED_EVENT, result => {
|
|
4604
|
+
console.error(result.error);
|
|
4605
|
+
});
|
|
4606
|
+
```
|
|
4607
|
+
|
|
4608
|
+
## PLAYBACK_RECORD_EVENT
|
|
4609
|
+
|
|
4610
|
+
### Overview
|
|
4611
|
+
|
|
4612
|
+
The event emitted once per selected stack record in the safe default `review` playback mode. Debuggers can render the immutable record without re-emitting the record's original application event.
|
|
4613
|
+
|
|
4614
|
+
### Value and use
|
|
4615
|
+
|
|
4616
|
+
```text
|
|
4617
|
+
const PLAYBACK_RECORD_EVENT = 'arcane.time-travel.playback.record'
|
|
4618
|
+
```
|
|
4619
|
+
|
|
4620
|
+
Use `review` for inspection. `mode:'events'` deliberately re-emits original types and payload snapshots and can trigger application side effects; `mode:'none'` invokes only `onRecord`. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4621
|
+
|
|
4622
|
+
### Availability and normalization
|
|
4623
|
+
|
|
4624
|
+
**Node and browser/bundler.** Each delivered value is a validated immutable `arcane-event-stack/1` record.
|
|
4625
|
+
|
|
4626
|
+
### Example
|
|
4627
|
+
|
|
4628
|
+
```javascript
|
|
4629
|
+
import {PLAYBACK_RECORD_EVENT, arcaneEvents} from 'arcane-os/event-manager';
|
|
4630
|
+
|
|
4631
|
+
arcaneEvents.on(PLAYBACK_RECORD_EVENT, record => {
|
|
4632
|
+
console.log(record.sequence, record.type, record.status);
|
|
4633
|
+
});
|
|
4634
|
+
```
|
|
4635
|
+
|
|
4636
|
+
## PLAYBACK_STARTED_EVENT
|
|
4637
|
+
|
|
4638
|
+
### Overview
|
|
4639
|
+
|
|
4640
|
+
The lifecycle event emitted before the first selected record is delivered. It reports the source session, selected count and range, playback speed, and delivery mode.
|
|
4641
|
+
|
|
4642
|
+
### Value and use
|
|
4643
|
+
|
|
4644
|
+
```text
|
|
4645
|
+
const PLAYBACK_STARTED_EVENT = 'arcane.time-travel.playback.started'
|
|
4646
|
+
```
|
|
4647
|
+
|
|
4648
|
+
The event is emitted even when the selected range contains no records; a successful empty review then completes with `delivered:0`. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4649
|
+
|
|
4650
|
+
### Availability and normalization
|
|
4651
|
+
|
|
4652
|
+
**Node and browser/bundler.** The lifecycle payload is a normalized local playback summary.
|
|
4653
|
+
|
|
4654
|
+
### Example
|
|
4655
|
+
|
|
4656
|
+
```javascript
|
|
4657
|
+
import {PLAYBACK_STARTED_EVENT, arcaneEvents} from 'arcane-os/event-manager';
|
|
4658
|
+
|
|
4659
|
+
arcaneEvents.on(PLAYBACK_STARTED_EVENT, run => {
|
|
4660
|
+
console.log(run.mode, run.count);
|
|
4661
|
+
});
|
|
4662
|
+
```
|
|
4663
|
+
|
|
4664
|
+
## TIME_TRAVEL_OVERFLOW_EVENT
|
|
4665
|
+
|
|
4666
|
+
### Overview
|
|
4667
|
+
|
|
4668
|
+
The exact type of the terminal record appended when history already contains `maxEvents` records and another string event arrives. The marker preserves explicit truncation evidence instead of silently dropping or rotating history.
|
|
4669
|
+
|
|
4670
|
+
### Value and use
|
|
4671
|
+
|
|
4672
|
+
```text
|
|
4673
|
+
const TIME_TRAVEL_OVERFLOW_EVENT = 'arcane.time-travel.overflow'
|
|
4674
|
+
```
|
|
4675
|
+
|
|
4676
|
+
Overflow leaves at most `maxEvents + 1` records, disables time travel, and stops DOM observation without a stop lifecycle record. The marker is not dispatched on the live event bus. Call `clearHistory()` before enabling time travel again. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4677
|
+
|
|
4678
|
+
### Availability and normalization
|
|
4679
|
+
|
|
4680
|
+
**Node and browser/bundler.** The marker has fixed event-manager source/category and normalized retention evidence.
|
|
4681
|
+
|
|
4682
|
+
### Example
|
|
4683
|
+
|
|
4684
|
+
```javascript
|
|
4685
|
+
import {TIME_TRAVEL_OVERFLOW_EVENT} from 'arcane-os/event-manager';
|
|
4686
|
+
|
|
4687
|
+
const overflowed = stack.events.at(-1)?.type === TIME_TRAVEL_OVERFLOW_EVENT;
|
|
4688
|
+
```
|
|
4689
|
+
|
|
4690
|
+
## TIME_TRAVEL_SEEK_EVENT
|
|
4691
|
+
|
|
4692
|
+
### Overview
|
|
4693
|
+
|
|
4694
|
+
The event emitted when `seek()` moves the review cursor. Its payload carries the current session, requested sequence, and the matching retained record—or `null` for sequence zero or an unretained sequence gap.
|
|
4695
|
+
|
|
4696
|
+
### Value and use
|
|
4697
|
+
|
|
4698
|
+
```text
|
|
4699
|
+
const TIME_TRAVEL_SEEK_EVENT = 'arcane.time-travel.seek'
|
|
4700
|
+
```
|
|
4701
|
+
|
|
4702
|
+
Seeking never dispatches the selected record's original type and never mutates history. It is a review cursor operation only. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4703
|
+
|
|
4704
|
+
### Availability and normalization
|
|
4705
|
+
|
|
4706
|
+
**Node and browser/bundler.** The cursor payload is normalized and contains an immutable retained record when one exists.
|
|
4707
|
+
|
|
4708
|
+
### Example
|
|
4709
|
+
|
|
4710
|
+
```javascript
|
|
4711
|
+
import {TIME_TRAVEL_SEEK_EVENT, arcaneEvents} from 'arcane-os/event-manager';
|
|
4712
|
+
|
|
4713
|
+
arcaneEvents.on(TIME_TRAVEL_SEEK_EVENT, ({sequence}) => {
|
|
4714
|
+
console.log('Cursor:', sequence);
|
|
4715
|
+
});
|
|
4716
|
+
```
|
|
4717
|
+
|
|
4718
|
+
## arcaneEvents
|
|
4719
|
+
|
|
4720
|
+
### Overview
|
|
4721
|
+
|
|
4722
|
+
The package-scoped EventManager singleton exposed from both the package root and `arcane-os/event-manager`. It provides one shared bus when explicit per-subsystem ownership is unnecessary.
|
|
4723
|
+
|
|
4724
|
+
### Value and use
|
|
4725
|
+
|
|
4726
|
+
```text
|
|
4727
|
+
const arcaneEvents = new EventManager()
|
|
4728
|
+
```
|
|
4729
|
+
|
|
4730
|
+
The singleton starts with time travel disabled and no DOM instrumentation. Its listeners and history are process/module state, so tests should remove handlers and clear history they create. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4731
|
+
|
|
4732
|
+
### Availability and normalization
|
|
4733
|
+
|
|
4734
|
+
**Node and browser/bundler; DOM capture requires a compatible DOM.** It is the same ESM singleton across documented entrypoints in one module graph.
|
|
4735
|
+
|
|
4736
|
+
### Example
|
|
4737
|
+
|
|
4738
|
+
```javascript
|
|
4739
|
+
import {arcaneEvents} from 'arcane-os/event-manager';
|
|
4740
|
+
|
|
4741
|
+
const handler = value => console.log(value);
|
|
4742
|
+
arcaneEvents.on('status', handler).emit('status', 'ready');
|
|
4743
|
+
arcaneEvents.off('status', handler);
|
|
4744
|
+
```
|
|
4745
|
+
|
|
4746
|
+
## createDOMInstrumentation()
|
|
4747
|
+
|
|
4748
|
+
### Overview
|
|
4749
|
+
|
|
4750
|
+
Creates a frozen controller that projects DOM interactions and mutations into an EventManager. The returned controller owns `start()`, `stop()`, `active`, `observedRootCount`, and the configured `root`.
|
|
4751
|
+
|
|
4752
|
+
### Syntax and result
|
|
4753
|
+
|
|
4754
|
+
```text
|
|
4755
|
+
createDOMInstrumentation({
|
|
4756
|
+
eventManager,
|
|
4757
|
+
root=document,
|
|
4758
|
+
eventTypes=DEFAULT_DOM_EVENT_TYPES,
|
|
4759
|
+
MutationObserver,
|
|
4760
|
+
captureEventDetails=false,
|
|
4761
|
+
captureInputValues=false,
|
|
4762
|
+
captureNodeMarkup=false,
|
|
4763
|
+
captureMutations=true,
|
|
4764
|
+
maxValueLength=10_000,
|
|
4765
|
+
maxSerializedNodeLength=100_000,
|
|
4766
|
+
observeOpenShadowRoots=true
|
|
4767
|
+
}={})
|
|
4768
|
+
```
|
|
4769
|
+
|
|
4770
|
+
The factory validates configuration but does not start automatically. Sensitive fields, private elements, sensitive attributes, and URLs are redacted; enabling ordinary input or markup capture does not override private-element redaction. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4771
|
+
|
|
4772
|
+
### Availability and normalization
|
|
4773
|
+
|
|
4774
|
+
**Browser DOM or a DOM-compatible test host.** It normalizes diagnostics only; it does not serialize a complete DOM or synthesize browser interactions during review.
|
|
4775
|
+
|
|
4776
|
+
### Example
|
|
4777
|
+
|
|
4778
|
+
```javascript
|
|
4779
|
+
import {createDOMInstrumentation, EventManager} from 'arcane-os/event-manager';
|
|
4780
|
+
|
|
4781
|
+
const events = new EventManager({timeTravel:true});
|
|
4782
|
+
const observation = createDOMInstrumentation({eventManager:events, root:document});
|
|
4783
|
+
observation.start();
|
|
4784
|
+
// Later: observation.stop();
|
|
4785
|
+
```
|
|
4786
|
+
|
|
4787
|
+
## createEventManager()
|
|
4788
|
+
|
|
4789
|
+
### Overview
|
|
4790
|
+
|
|
4791
|
+
Constructs an independent EventManager using the same options and validation as the class constructor. Prefer it when factory-based dependency injection reads more clearly than `new EventManager()`.
|
|
4792
|
+
|
|
4793
|
+
### Syntax and result
|
|
4794
|
+
|
|
4795
|
+
```text
|
|
4796
|
+
createEventManager(options)
|
|
4797
|
+
```
|
|
4798
|
+
|
|
4799
|
+
The returned manager does not share listeners, history, session, cursor, DOM controller, or retention state with `arcaneEvents` or any other instance. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4800
|
+
|
|
4801
|
+
### Availability and normalization
|
|
4802
|
+
|
|
4803
|
+
**Node and browser/bundler; DOM capture requires a compatible DOM.** Constructor validation and snapshot normalization are identical to `EventManager`.
|
|
4804
|
+
|
|
4805
|
+
### Example
|
|
4806
|
+
|
|
4807
|
+
```javascript
|
|
4808
|
+
import {createEventManager} from 'arcane-os/event-manager';
|
|
4809
|
+
|
|
4810
|
+
const events = createEventManager({timeTravel:true, sessionId:'checkout-test'});
|
|
4811
|
+
events.instrument('checkout.started', {cartId:'cart-1'}, {source:'test'});
|
|
4812
|
+
```
|
|
4813
|
+
|
|
4814
|
+
## describeDOMTarget()
|
|
4815
|
+
|
|
4816
|
+
### Overview
|
|
4817
|
+
|
|
4818
|
+
Returns a frozen content-free descriptor for a document, shadow root, text node, element, global object, or generic event target. It is useful for diagnostic UI and behavioral assertions without retaining the target.
|
|
4819
|
+
|
|
4820
|
+
### Syntax and result
|
|
4821
|
+
|
|
4822
|
+
```text
|
|
4823
|
+
describeDOMTarget(target, root)
|
|
4824
|
+
```
|
|
4825
|
+
|
|
4826
|
+
Element descriptors include a best-effort selector, tag, id, role, name, type, and private marker. Text descriptors never include text content; shadow-root descriptors may include their host descriptor. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4827
|
+
|
|
4828
|
+
### Availability and normalization
|
|
4829
|
+
|
|
4830
|
+
**Browser DOM or DOM-compatible objects; importable in Node.** The result is a normalized diagnostic identity, not a stable locator or capability token.
|
|
4831
|
+
|
|
4832
|
+
### Example
|
|
4833
|
+
|
|
4834
|
+
```javascript
|
|
4835
|
+
import {describeDOMTarget} from 'arcane-os/event-manager';
|
|
4836
|
+
|
|
4837
|
+
const descriptor = describeDOMTarget(document.querySelector('button'), document);
|
|
4838
|
+
console.log(descriptor.selector, descriptor.role);
|
|
4839
|
+
```
|
|
4840
|
+
|
|
4841
|
+
## domSelector()
|
|
4842
|
+
|
|
4843
|
+
### Overview
|
|
4844
|
+
|
|
4845
|
+
Builds a best-effort diagnostic selector from IDs, Arcane/test IDs, element names, and sibling positions. Open shadow-root boundaries are separated with ` >>> `.
|
|
4846
|
+
|
|
4847
|
+
### Syntax and result
|
|
4848
|
+
|
|
4849
|
+
```text
|
|
4850
|
+
domSelector(target, root)
|
|
4851
|
+
```
|
|
4852
|
+
|
|
4853
|
+
The helper returns `:document`, `:shadow-root`, an element selector, a text node's parent selector, or `null` for an unsupported target. Generated selectors are for diagnostics and are not guaranteed unique after DOM changes. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4854
|
+
|
|
4855
|
+
### Availability and normalization
|
|
4856
|
+
|
|
4857
|
+
**Browser DOM or DOM-compatible objects; importable in Node.** Selector text is normalized locally and grants no access to the described target.
|
|
4858
|
+
|
|
4859
|
+
### Example
|
|
4860
|
+
|
|
4861
|
+
```javascript
|
|
4862
|
+
import {domSelector} from 'arcane-os/event-manager';
|
|
4863
|
+
|
|
4864
|
+
console.log(domSelector(document.activeElement, document));
|
|
4865
|
+
```
|
|
4866
|
+
|
|
4867
|
+
## parseEventStack()
|
|
4868
|
+
|
|
4869
|
+
### Overview
|
|
4870
|
+
|
|
4871
|
+
Parses a JSON string or object and strictly validates an `arcane-event-stack/1` document. It returns a deeply frozen canonical data object suitable for review or playback.
|
|
4872
|
+
|
|
4873
|
+
### Syntax and result
|
|
4874
|
+
|
|
4875
|
+
```text
|
|
4876
|
+
parseEventStack(source, {
|
|
4877
|
+
maxEvents=10_000,
|
|
4878
|
+
maxSnapshotDepth=50,
|
|
4879
|
+
maxSnapshotEntries=1_000,
|
|
4880
|
+
maxSnapshotStringLength=10_000
|
|
4881
|
+
}={})
|
|
4882
|
+
```
|
|
4883
|
+
|
|
4884
|
+
Validation rejects unknown keys, accessors, sparse arrays, unsafe or oversized values, invalid timestamps/statuses/nesting, inconsistent sessions/protocols, non-increasing sequences, and malformed overflow history. A valid terminal overflow document may contain `maxEvents + 1` records. Full operational guidance: [central events, DOM instrumentation, and time-travel review](event-manager.md).
|
|
4885
|
+
|
|
4886
|
+
### Availability and normalization
|
|
4887
|
+
|
|
4888
|
+
**Node and browser/bundler.** The result is canonical immutable diagnostic data. Parsing never dispatches events, restores live objects, or confers host authority.
|
|
4889
|
+
|
|
4890
|
+
### Example
|
|
4891
|
+
|
|
4892
|
+
```javascript
|
|
4893
|
+
import {parseEventStack} from 'arcane-os/event-manager';
|
|
4894
|
+
|
|
4895
|
+
const stack = parseEventStack(serialized);
|
|
4896
|
+
console.log(stack.sessionId, stack.events.length);
|
|
4897
|
+
```
|
|
4898
|
+
|
|
4899
|
+
## Data export subpaths
|
|
4900
|
+
|
|
4901
|
+
The package also exposes the exact runtime manifest, eight JSON Schemas (including `arcane-os/schemas/event-stack.json`), and its package manifest. These are data contracts, not callable JavaScript members. See [schema and manifest contracts](../architecture.md) and the files under `schemas/`.
|