arcane-os 0.54.0 → 0.55.0
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 +40 -0
- package/README.md +31 -26
- package/browser-runtime/ai/browser-decisions.mjs +2 -1
- package/browser-runtime/core/client.mjs +491 -0
- package/browser-runtime/core/contracts.mjs +84 -0
- package/docs/architecture.md +31 -23
- package/docs/compatibility.md +10 -1
- package/docs/platform-targets.md +20 -11
- package/docs/reference/README.md +8 -6
- package/docs/reference/ai/browser-decisions.md +1 -1
- package/docs/reference/availability-and-normalization.md +4 -2
- package/docs/reference/behavioral-testing.md +7 -6
- package/docs/reference/cli.md +12 -4
- package/docs/reference/core-client.md +120 -0
- package/docs/reference/core-native-packaging.md +149 -0
- package/docs/reference/core-runtime.md +175 -0
- package/docs/reference/inventory/package-api.json +257 -5
- package/docs/reference/protocols.md +16 -1
- package/docs/reference/sdk-api.md +772 -15
- package/package.json +10 -3
- package/schemas/native-build-plan.schema.json +8 -0
- package/src/cli/main.mjs +8 -6
- package/src/core/host.mjs +23 -0
- package/src/core/runtime.mjs +333 -0
- package/src/core/stdio.mjs +209 -0
- package/src/core-classic-source.mjs +43 -0
- package/src/import-map.mjs +62 -0
- package/src/native/portable-layout.mjs +184 -0
- package/src/native/portable-provider.mjs +211 -0
- package/src/native-plan.mjs +10 -4
- package/src/native-provider-loader.mjs +15 -4
- package/src/packager/core.mjs +47 -18
- package/src/targets/index.mjs +3 -1
- package/src/toolchain.mjs +20 -5
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# Native Core runtime
|
|
2
|
+
|
|
3
|
+
The SDK owns the reusable native dispatcher and framed stdio transport.
|
|
4
|
+
The composing application or native host supplies its identity, version and
|
|
5
|
+
services. Product prompts, model selections, filesystem locations, host
|
|
6
|
+
privileges and application policy remain with that owner.
|
|
7
|
+
|
|
8
|
+
```js
|
|
9
|
+
import {createCoreRuntime} from 'arcane-os/core/runtime';
|
|
10
|
+
import {startCoreStdio} from 'arcane-os/core/stdio';
|
|
11
|
+
import catalogStore from './catalog-store.mjs';
|
|
12
|
+
|
|
13
|
+
const runtime = createCoreRuntime({
|
|
14
|
+
application: {id: 'moon-cheese-catalog', name: 'Moon Cheese Catalog'},
|
|
15
|
+
version: '1.0.0',
|
|
16
|
+
services: [{
|
|
17
|
+
name: 'catalog',
|
|
18
|
+
methods: {
|
|
19
|
+
'catalog.save': {
|
|
20
|
+
lifetime: 'service',
|
|
21
|
+
async handle(record) {
|
|
22
|
+
// catalogStore is supplied by this application's native owner.
|
|
23
|
+
return catalogStore.save(record);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
async drain() {
|
|
28
|
+
await catalogStore.flush();
|
|
29
|
+
},
|
|
30
|
+
async dispose() {
|
|
31
|
+
await catalogStore.close();
|
|
32
|
+
}
|
|
33
|
+
}]
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const transport = startCoreStdio({runtime});
|
|
37
|
+
await transport.closed;
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The example's store is an application dependency, not an SDK-created database.
|
|
41
|
+
The runtime passes each request's `parameters` to its registered handler
|
|
42
|
+
unchanged. It preserves complete results and diagnostic errors; it neither
|
|
43
|
+
selects product data nor supplies replacement results.
|
|
44
|
+
|
|
45
|
+
## Registration and startup
|
|
46
|
+
|
|
47
|
+
`createCoreRuntime({application, version, services})` creates a dispatcher.
|
|
48
|
+
Supply the application's real descriptor and host release version. The built-in
|
|
49
|
+
`app.current` and `version.current` methods return those values; `system.ping`
|
|
50
|
+
returns `{ok:true}`. A ping establishes dispatcher responsiveness, not model,
|
|
51
|
+
service or application readiness.
|
|
52
|
+
|
|
53
|
+
`runtime.registerService({name, methods, start, drain, dispose})` registers one
|
|
54
|
+
native service. Method names are complete RPC names, such as `catalog.save`.
|
|
55
|
+
A method is either a handler function or `{handle, lifetime}`. A handler function
|
|
56
|
+
has request lifetime by default. Duplicate service or method names, including
|
|
57
|
+
the three built-in methods, are reported rather than replacing another owner.
|
|
58
|
+
Registration is a native composition API, not a browser command.
|
|
59
|
+
|
|
60
|
+
Registration returns `{ready, current}`. Reading `ready` starts that service and
|
|
61
|
+
returns its shared startup promise; `current()` exposes its state and actual
|
|
62
|
+
error. `runtime.start()` starts all registered services independently and returns
|
|
63
|
+
the current dispatcher state without waiting for them. A service registered
|
|
64
|
+
after startup starts independently as well. A method waits only for its own
|
|
65
|
+
service's startup before invoking its handler. State errors use the shared
|
|
66
|
+
complete diagnostic serialization; the startup promise retains its original
|
|
67
|
+
rejection value.
|
|
68
|
+
|
|
69
|
+
Each lifecycle hook receives `{application, service, emit}`. Each request handler
|
|
70
|
+
receives `(parameters, {application, service, emit, requestId, signal})`, with
|
|
71
|
+
`this` bound to its service definition. A hook or handler may publish a complete
|
|
72
|
+
service-owned event through `emit(event, data)`.
|
|
73
|
+
|
|
74
|
+
## State and frames
|
|
75
|
+
|
|
76
|
+
`runtime.current()` returns dispatcher state, application, version, per-service
|
|
77
|
+
state/errors and active request identities, methods and lifetimes.
|
|
78
|
+
`runtime.subscribe(listener, {emitCurrent:true, signal})` immediately replays the
|
|
79
|
+
current state and then observes changes through the canonical SDK event owner.
|
|
80
|
+
It returns an unsubscribe function. `runtime.onFrame(listener, {signal})`
|
|
81
|
+
observes outgoing protocol frames and also returns an unsubscribe function.
|
|
82
|
+
Attach transport listeners before starting the runtime to observe initial frames.
|
|
83
|
+
|
|
84
|
+
The shared `arcane-os/core/contracts` module owns `CORE_PROTOCOL` (`arcane/1`),
|
|
85
|
+
`CoreError` and `serializeCoreError`. Requests are:
|
|
86
|
+
|
|
87
|
+
```js
|
|
88
|
+
{
|
|
89
|
+
protocol: 'arcane/1',
|
|
90
|
+
type: 'request',
|
|
91
|
+
id: 'request-1',
|
|
92
|
+
method: 'catalog.save',
|
|
93
|
+
parameters: {name: 'Lunar cheddar', notes: 'Keep the complete supplied text.'}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
`await runtime.handle(frame)` returns and emits the correlated response:
|
|
98
|
+
`{protocol, type:'response', id, ok:true, result, time}` or
|
|
99
|
+
`{protocol, type:'response', id, ok:false, error, time}`. Framing and method
|
|
100
|
+
availability errors remain observable; unavailable services are not replaced
|
|
101
|
+
with browser behavior.
|
|
102
|
+
|
|
103
|
+
Events have `{protocol, type:'event', event, data, time}`:
|
|
104
|
+
|
|
105
|
+
- `core.ready`: the dispatcher is connected; service/model readiness is separate.
|
|
106
|
+
- `core.state`: the current complete runtime state.
|
|
107
|
+
- `core.service.state`: a service's name, state and serialized error when present.
|
|
108
|
+
- `core.error`: a lifecycle or transport diagnostic.
|
|
109
|
+
|
|
110
|
+
Service states are `registered`, `starting`, `ready`, `failed`, `draining` and
|
|
111
|
+
`closed`. Dispatcher states are `created`, `ready`, `draining` and `closed`.
|
|
112
|
+
Complete diagnostics belong in the host's developer-facing error handling, not
|
|
113
|
+
in ordinary chat history or a fabricated conversation turn.
|
|
114
|
+
|
|
115
|
+
## Cancellation and shutdown
|
|
116
|
+
|
|
117
|
+
The `request.cancel` control names `requestId`; `requests.cancelAll` applies to
|
|
118
|
+
active request-lifetime operations. Cancellation is cooperative. The handler's
|
|
119
|
+
signal is aborted. An otherwise successful cancelled operation returns
|
|
120
|
+
`REQUEST_ABORTED` after its owned work settles; a handler's own rejection remains
|
|
121
|
+
the actual reported error. If startup is still pending, cancellation is checked before
|
|
122
|
+
the handler runs. A service that does not finish or respond to cancellation is
|
|
123
|
+
still unfinished; the SDK does not report a forced timeout as successful cleanup.
|
|
124
|
+
|
|
125
|
+
Use `lifetime:'service'` for accepted work, such as a save, that must survive a
|
|
126
|
+
renderer cancellation or disconnect. These operations are not aborted by the
|
|
127
|
+
request cancellation controls or by normal Core shutdown. The service still
|
|
128
|
+
owns its persistence, queueing and failure semantics.
|
|
129
|
+
|
|
130
|
+
`runtime.close()` is idempotent and retains the same completion promise. It stops
|
|
131
|
+
accepting new requests, cancels request-lifetime operations, waits for accepted
|
|
132
|
+
responses, then drains and disposes services. Independent services close
|
|
133
|
+
concurrently; each service's startup, drain and dispose remain ordered.
|
|
134
|
+
Shutdown errors remain complete and reject the close promise. A failed drain
|
|
135
|
+
does not prevent the service's dispose hook from running.
|
|
136
|
+
|
|
137
|
+
The final closed state is published before event subscriptions are released.
|
|
138
|
+
`current()` remains available afterward; the disposed runtime is not restarted.
|
|
139
|
+
The host must observe completion before terminating Core. The SDK does not call
|
|
140
|
+
`process.exit()`, kill a host or claim durability after an operating-system crash
|
|
141
|
+
or a host-forced termination.
|
|
142
|
+
|
|
143
|
+
## Stdio transport
|
|
144
|
+
|
|
145
|
+
`startCoreStdio({runtime, input, output, onError})` attaches a runtime and starts
|
|
146
|
+
it. Streams default to `process.stdin` and `process.stdout`; diagnostics default
|
|
147
|
+
to `console.error`, leaving stdout for protocol frames. It returns
|
|
148
|
+
`{runtime, closed, close}`. Observe `closed` for final completion or failure.
|
|
149
|
+
|
|
150
|
+
Frames use the existing `Content-Length` header followed by UTF-8 JSON. Length
|
|
151
|
+
is transport-local framing only. `encodeCoreFrame(frame)` and
|
|
152
|
+
`createCoreFrameDecoder(onFrame)` are also exported for host adapters. The
|
|
153
|
+
decoder accepts fragmented or multiple frames through `push(chunk)`;
|
|
154
|
+
`finish()` reports an incomplete final frame rather than dropping it.
|
|
155
|
+
|
|
156
|
+
Requests dispatch concurrently. Outgoing frames preserve their queued order and
|
|
157
|
+
wait for each writable-stream callback. Input EOF starts runtime shutdown, waits
|
|
158
|
+
for accepted service work and queued output, and resolves `closed` afterward.
|
|
159
|
+
An input stream closed without its normal EOF event also initiates this drain;
|
|
160
|
+
an already ended or destroyed input is handled when attached. Transport failures
|
|
161
|
+
reach `onError` and reject `closed`. The transport detaches
|
|
162
|
+
its listeners and pauses its input; it does not end caller-owned output streams
|
|
163
|
+
or take ownership of the host process.
|
|
164
|
+
|
|
165
|
+
## Platform and delivery boundary
|
|
166
|
+
|
|
167
|
+
These modules use portable Node and JavaScript facilities for Windows, Linux
|
|
168
|
+
and macOS native hosts. Android requires its native transport/host adaptation;
|
|
169
|
+
the module is not a Node runtime embedded inside a WebView. Browser callers use
|
|
170
|
+
the separate [Core client](core-client.md).
|
|
171
|
+
|
|
172
|
+
The dispatcher/transport sources are one part of Core extraction. They do not
|
|
173
|
+
by themselves replace existing native host bundles, platform adapters, provider
|
|
174
|
+
loading, packaging or OS composition. Those owners must adopt the selected
|
|
175
|
+
published SDK boundary and preserve their real shutdown and service lifecycles.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"sdkVersion": "0.
|
|
3
|
+
"sdkVersion": "0.55.0",
|
|
4
4
|
"environment": {
|
|
5
5
|
"runtime": "Node.js for Node entrypoints; browser for browser-only entrypoints",
|
|
6
6
|
"minimumVersion": "22.23.2 for Node entrypoints",
|
|
7
7
|
"moduleSystem": "ESM"
|
|
8
8
|
},
|
|
9
|
-
"memberCount":
|
|
9
|
+
"memberCount": 244,
|
|
10
10
|
"runtimeSubpathPatterns": {
|
|
11
11
|
"arcane-os/modules/*": "./runtime/arcane/modules/*",
|
|
12
12
|
"arcane-os/entities/*": "./runtime/arcane/entities/*"
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
"name": "assertIntegratedNativeToolchain",
|
|
341
341
|
"displayName": "assertIntegratedNativeToolchain()",
|
|
342
342
|
"kind": "function",
|
|
343
|
-
"signature": "assertIntegratedNativeToolchain({workspaceMode, workspaceRoot, toolchainRoot, target}={})",
|
|
343
|
+
"signature": "assertIntegratedNativeToolchain({workspaceMode, workspaceRoot, toolchainRoot, target, providerSource='arcane-checkout'}={})",
|
|
344
344
|
"entrypoints": [
|
|
345
345
|
"arcane-os",
|
|
346
346
|
"arcane-os/toolchain"
|
|
@@ -540,7 +540,7 @@
|
|
|
540
540
|
"name": "createNativeBuildPlan",
|
|
541
541
|
"displayName": "createNativeBuildPlan()",
|
|
542
542
|
"kind": "function",
|
|
543
|
-
"signature": "async createNativeBuildPlan({ nativeBuilder, toolchainRoot,
|
|
543
|
+
"signature": "async createNativeBuildPlan({ nativeBuilder, toolchainRoot, toolchain, appReleaseRoot, release, appDescriptor, selectedSdk, dependencyReleases, minimumCoreVersion, protectedRoots=[], outputRoot, targetRequest, signal, onEvent }={})",
|
|
544
544
|
"entrypoints": [
|
|
545
545
|
"arcane-os",
|
|
546
546
|
"arcane-os/native"
|
|
@@ -1037,7 +1037,7 @@
|
|
|
1037
1037
|
"name": "loadArcaneNativeProvider",
|
|
1038
1038
|
"displayName": "loadArcaneNativeProvider()",
|
|
1039
1039
|
"kind": "function",
|
|
1040
|
-
"signature": "loadArcaneNativeProvider({ arcaneRoot, target, inspect=lstat, canonicalize=realpath,
|
|
1040
|
+
"signature": "async loadArcaneNativeProvider({ arcaneRoot, target, inspect=lstat, canonicalize=realpath, importModule=specifier=>import(specifier), signal, onEvent }={})",
|
|
1041
1041
|
"entrypoints": [
|
|
1042
1042
|
"arcane-os",
|
|
1043
1043
|
"arcane-os/native-provider"
|
|
@@ -3619,6 +3619,258 @@
|
|
|
3619
3619
|
"availability": "Node and Browser",
|
|
3620
3620
|
"protocol": "Shared AI cancellation",
|
|
3621
3621
|
"normalization": "Preserves an existing ARCANE_AI_REQUEST_ABORTED value or returns an AbortError with that code and the supplied cause"
|
|
3622
|
+
},
|
|
3623
|
+
{
|
|
3624
|
+
"id": "core-contracts:CORE_PROTOCOL",
|
|
3625
|
+
"name": "CORE_PROTOCOL",
|
|
3626
|
+
"displayName": "CORE_PROTOCOL",
|
|
3627
|
+
"kind": "constant",
|
|
3628
|
+
"signature": "const CORE_PROTOCOL = 'arcane/1'",
|
|
3629
|
+
"entrypoints": ["arcane-os/core/contracts"],
|
|
3630
|
+
"primaryImport": "arcane-os/core/contracts",
|
|
3631
|
+
"group": "Core protocol contracts",
|
|
3632
|
+
"summary": "Identifies Arcane Core request, response, event and control frames.",
|
|
3633
|
+
"availability": "Node and browser/bundler",
|
|
3634
|
+
"protocol": "arcane/1",
|
|
3635
|
+
"normalization": "Exact protocol string; it identifies a frame contract without granting a method, service, transport or model capability"
|
|
3636
|
+
},
|
|
3637
|
+
{
|
|
3638
|
+
"id": "core-contracts:CORE_READY_EVENTS",
|
|
3639
|
+
"name": "CORE_READY_EVENTS",
|
|
3640
|
+
"displayName": "CORE_READY_EVENTS",
|
|
3641
|
+
"kind": "constant",
|
|
3642
|
+
"signature": "const CORE_READY_EVENTS",
|
|
3643
|
+
"entrypoints": ["arcane-os/core/contracts"],
|
|
3644
|
+
"primaryImport": "arcane-os/core/contracts",
|
|
3645
|
+
"group": "Core protocol contracts",
|
|
3646
|
+
"summary": "Lists the transport and dispatcher events that the Core client treats as durable completions.",
|
|
3647
|
+
"availability": "Node and browser/bundler",
|
|
3648
|
+
"protocol": "arcane/1 client readiness",
|
|
3649
|
+
"normalization": "Contains transport.ready and core.ready; neither event asserts application-service, repository or model readiness"
|
|
3650
|
+
},
|
|
3651
|
+
{
|
|
3652
|
+
"id": "core-contracts:CORE_FRAME_CONTRACTS",
|
|
3653
|
+
"name": "CORE_FRAME_CONTRACTS",
|
|
3654
|
+
"displayName": "CORE_FRAME_CONTRACTS",
|
|
3655
|
+
"kind": "constant",
|
|
3656
|
+
"signature": "const CORE_FRAME_CONTRACTS",
|
|
3657
|
+
"entrypoints": ["arcane-os/core/contracts"],
|
|
3658
|
+
"primaryImport": "arcane-os/core/contracts",
|
|
3659
|
+
"group": "Core protocol contracts",
|
|
3660
|
+
"summary": "Describes the public fields on Core request, response, event and cancellation frames.",
|
|
3661
|
+
"availability": "Node and browser/bundler",
|
|
3662
|
+
"protocol": "arcane/1 wire descriptions",
|
|
3663
|
+
"normalization": "Descriptive data only; it does not admit methods, validate application policy or create a transport"
|
|
3664
|
+
},
|
|
3665
|
+
{
|
|
3666
|
+
"id": "core-contracts:CORE_METHOD_CONTRACTS",
|
|
3667
|
+
"name": "CORE_METHOD_CONTRACTS",
|
|
3668
|
+
"displayName": "CORE_METHOD_CONTRACTS",
|
|
3669
|
+
"kind": "constant",
|
|
3670
|
+
"signature": "const CORE_METHOD_CONTRACTS",
|
|
3671
|
+
"entrypoints": ["arcane-os/core/contracts"],
|
|
3672
|
+
"primaryImport": "arcane-os/core/contracts",
|
|
3673
|
+
"group": "Core protocol contracts",
|
|
3674
|
+
"summary": "Describes existing Core method input, output and semantic shapes.",
|
|
3675
|
+
"availability": "Node and browser/bundler",
|
|
3676
|
+
"protocol": "arcane/1 method descriptions",
|
|
3677
|
+
"normalization": "Descriptive data only; the active host and its registered services remain the authority for method availability"
|
|
3678
|
+
},
|
|
3679
|
+
{
|
|
3680
|
+
"id": "core-contracts:CoreError",
|
|
3681
|
+
"name": "CoreError",
|
|
3682
|
+
"displayName": "CoreError",
|
|
3683
|
+
"kind": "class",
|
|
3684
|
+
"signature": "new CoreError(value)",
|
|
3685
|
+
"entrypoints": ["arcane-os/core/contracts"],
|
|
3686
|
+
"primaryImport": "arcane-os/core/contracts",
|
|
3687
|
+
"group": "Core protocol contracts",
|
|
3688
|
+
"summary": "Creates the common Core error while retaining supplied native diagnostic fields.",
|
|
3689
|
+
"availability": "Node and browser/bundler",
|
|
3690
|
+
"protocol": "arcane/1 error response",
|
|
3691
|
+
"normalization": "Preserves own fields, stack and cause; supplies Arcane defaults for absent name, code, message, resolution and diagnostic metadata"
|
|
3692
|
+
},
|
|
3693
|
+
{
|
|
3694
|
+
"id": "core-contracts:serializeCoreError",
|
|
3695
|
+
"name": "serializeCoreError",
|
|
3696
|
+
"displayName": "serializeCoreError()",
|
|
3697
|
+
"kind": "function",
|
|
3698
|
+
"signature": "serializeCoreError(error)",
|
|
3699
|
+
"entrypoints": ["arcane-os/core/contracts"],
|
|
3700
|
+
"primaryImport": "arcane-os/core/contracts",
|
|
3701
|
+
"group": "Core protocol contracts",
|
|
3702
|
+
"summary": "Projects an error into a complete plain diagnostic record for Core responses and events.",
|
|
3703
|
+
"availability": "Node and browser/bundler",
|
|
3704
|
+
"protocol": "arcane/1 error response",
|
|
3705
|
+
"normalization": "Retains own properties and ordinary name, message, stack and cause fields; recursively projects Error causes and AggregateError members"
|
|
3706
|
+
},
|
|
3707
|
+
{
|
|
3708
|
+
"id": "core-client:createCoreClient",
|
|
3709
|
+
"name": "createCoreClient",
|
|
3710
|
+
"displayName": "createCoreClient()",
|
|
3711
|
+
"kind": "function",
|
|
3712
|
+
"signature": "createCoreClient({global=globalThis,transport=null,eventOwner=arcaneEvents,eventOwnerReady,autoConnect=true,onError}={})",
|
|
3713
|
+
"entrypoints": ["arcane-os/core/client"],
|
|
3714
|
+
"primaryImport": "arcane-os/core/client",
|
|
3715
|
+
"group": "Core browser client",
|
|
3716
|
+
"summary": "Creates one correlated Arcane Core RPC client with explicit transport, readiness, events, cancellation and lifetime ownership.",
|
|
3717
|
+
"availability": "Browser and native WebView JavaScript hosts; custom transports require a callable send(frame)",
|
|
3718
|
+
"protocol": "arcane/1 over the selected host transport",
|
|
3719
|
+
"normalization": "Preserves complete request, result and event data; rejects invalid transports before readiness, retains FIFO handoff to the shared event owner and reports transport failures that arrive after request settlement"
|
|
3720
|
+
},
|
|
3721
|
+
{
|
|
3722
|
+
"id": "core-client:createCoreFacade",
|
|
3723
|
+
"name": "createCoreFacade",
|
|
3724
|
+
"displayName": "createCoreFacade()",
|
|
3725
|
+
"kind": "function",
|
|
3726
|
+
"signature": "createCoreFacade(client)",
|
|
3727
|
+
"entrypoints": ["arcane-os/core/client"],
|
|
3728
|
+
"primaryImport": "arcane-os/core/client",
|
|
3729
|
+
"group": "Core browser client",
|
|
3730
|
+
"summary": "Projects a Core client into the established application-facing Arcane namespace.",
|
|
3731
|
+
"availability": "Browser and native WebView JavaScript hosts with a Core client",
|
|
3732
|
+
"protocol": "arcane/1 compatibility facade",
|
|
3733
|
+
"normalization": "Routes existing namespace methods through client.invoke while retaining operation-specific parameters, correlation, streaming callbacks, timeouts and cancellation"
|
|
3734
|
+
},
|
|
3735
|
+
{
|
|
3736
|
+
"id": "core-client:installCoreClient",
|
|
3737
|
+
"name": "installCoreClient",
|
|
3738
|
+
"displayName": "installCoreClient()",
|
|
3739
|
+
"kind": "function",
|
|
3740
|
+
"signature": "installCoreClient(global=globalThis,options={})",
|
|
3741
|
+
"entrypoints": ["arcane-os/core/client"],
|
|
3742
|
+
"primaryImport": "arcane-os/core/client",
|
|
3743
|
+
"group": "Core browser client",
|
|
3744
|
+
"summary": "Installs one synchronous global Arcane facade and native receive callback for the selected renderer lifetime.",
|
|
3745
|
+
"availability": "Browser and native WebView JavaScript hosts",
|
|
3746
|
+
"protocol": "arcane/1 renderer facade",
|
|
3747
|
+
"normalization": "Repeated installation returns the same client; closing releases subscriptions, callbacks, timers and pending renderer requests without killing Core"
|
|
3748
|
+
},
|
|
3749
|
+
{
|
|
3750
|
+
"id": "core-classic-source:createCoreClassicSource",
|
|
3751
|
+
"name": "createCoreClassicSource",
|
|
3752
|
+
"displayName": "createCoreClassicSource()",
|
|
3753
|
+
"kind": "function",
|
|
3754
|
+
"signature": "async createCoreClassicSource({eventOwnerModuleURL}={})",
|
|
3755
|
+
"entrypoints": ["arcane-os/core/classic-source"],
|
|
3756
|
+
"primaryImport": "arcane-os/core/classic-source",
|
|
3757
|
+
"group": "Core classic client projection",
|
|
3758
|
+
"summary": "Generates the native host's classic injection script from the installed canonical Core client and contracts.",
|
|
3759
|
+
"availability": "Node; generated source runs in browser and native WebView renderers",
|
|
3760
|
+
"protocol": "arcane/1 classic-script injection",
|
|
3761
|
+
"normalization": "Returns the complete canonical client projection; installs synchronous facade shapes while deferring only the shared event-owner module connection when document parsing is incomplete"
|
|
3762
|
+
},
|
|
3763
|
+
{
|
|
3764
|
+
"id": "core-runtime:createCoreRuntime",
|
|
3765
|
+
"name": "createCoreRuntime",
|
|
3766
|
+
"displayName": "createCoreRuntime()",
|
|
3767
|
+
"kind": "function",
|
|
3768
|
+
"signature": "createCoreRuntime({application,version,services=[]}={})",
|
|
3769
|
+
"entrypoints": ["arcane-os/core/runtime"],
|
|
3770
|
+
"primaryImport": "arcane-os/core/runtime",
|
|
3771
|
+
"group": "Native Core runtime",
|
|
3772
|
+
"summary": "Creates an app-neutral Core dispatcher with explicit services, request lifetimes, events and graceful drain.",
|
|
3773
|
+
"availability": "Node on Windows, Linux and macOS native hosts; Android requires its host adaptation",
|
|
3774
|
+
"protocol": "arcane/1 dispatcher and service lifecycle",
|
|
3775
|
+
"normalization": "Starts services independently, preserves request correlation and complete results/errors, cancels only request-lifetime work and waits accepted service-lifetime responses before ordered service drain and disposal"
|
|
3776
|
+
},
|
|
3777
|
+
{
|
|
3778
|
+
"id": "core-stdio:encodeCoreFrame",
|
|
3779
|
+
"name": "encodeCoreFrame",
|
|
3780
|
+
"displayName": "encodeCoreFrame()",
|
|
3781
|
+
"kind": "function",
|
|
3782
|
+
"signature": "encodeCoreFrame(frame)",
|
|
3783
|
+
"entrypoints": ["arcane-os/core/stdio"],
|
|
3784
|
+
"primaryImport": "arcane-os/core/stdio",
|
|
3785
|
+
"group": "Native Core stdio transport",
|
|
3786
|
+
"summary": "Encodes one Core frame as UTF-8 JSON with the native Content-Length transport header.",
|
|
3787
|
+
"availability": "Node",
|
|
3788
|
+
"protocol": "Content-Length framed arcane/1 stdio",
|
|
3789
|
+
"normalization": "Returns a Buffer containing one transport frame; framing length remains transport-local and the JSON payload retains the supplied frame fields"
|
|
3790
|
+
},
|
|
3791
|
+
{
|
|
3792
|
+
"id": "core-stdio:createCoreFrameDecoder",
|
|
3793
|
+
"name": "createCoreFrameDecoder",
|
|
3794
|
+
"displayName": "createCoreFrameDecoder()",
|
|
3795
|
+
"kind": "function",
|
|
3796
|
+
"signature": "createCoreFrameDecoder(onFrame)",
|
|
3797
|
+
"entrypoints": ["arcane-os/core/stdio"],
|
|
3798
|
+
"primaryImport": "arcane-os/core/stdio",
|
|
3799
|
+
"group": "Native Core stdio transport",
|
|
3800
|
+
"summary": "Creates the incremental decoder for fragmented or consecutive native Core frames.",
|
|
3801
|
+
"availability": "Node",
|
|
3802
|
+
"protocol": "Content-Length framed arcane/1 stdio",
|
|
3803
|
+
"normalization": "push(chunk) delivers each complete parsed JSON value in order; finish() reports an incomplete final header or body instead of dropping it"
|
|
3804
|
+
},
|
|
3805
|
+
{
|
|
3806
|
+
"id": "core-stdio:startCoreStdio",
|
|
3807
|
+
"name": "startCoreStdio",
|
|
3808
|
+
"displayName": "startCoreStdio()",
|
|
3809
|
+
"kind": "function",
|
|
3810
|
+
"signature": "startCoreStdio({runtime,input=process.stdin,output=process.stdout,onError}={})",
|
|
3811
|
+
"entrypoints": ["arcane-os/core/stdio"],
|
|
3812
|
+
"primaryImport": "arcane-os/core/stdio",
|
|
3813
|
+
"group": "Native Core stdio transport",
|
|
3814
|
+
"summary": "Attaches an existing Core runtime to framed input and output with concurrent dispatch and graceful shutdown.",
|
|
3815
|
+
"availability": "Node with readable input and writable output streams",
|
|
3816
|
+
"protocol": "Content-Length framed arcane/1 stdio",
|
|
3817
|
+
"normalization": "Returns {runtime,closed,close}; preserves queued output order, reports parser and stream failures, drains accepted runtime work on EOF and never exits the host or ends caller-owned output"
|
|
3818
|
+
},
|
|
3819
|
+
{
|
|
3820
|
+
"id": "native-portable-provider:createPortableNativeProvider",
|
|
3821
|
+
"name": "createPortableNativeProvider",
|
|
3822
|
+
"displayName": "createPortableNativeProvider()",
|
|
3823
|
+
"kind": "function",
|
|
3824
|
+
"signature": "createPortableNativeProvider({services=[]}={})",
|
|
3825
|
+
"entrypoints": ["arcane-os/native/portable-provider"],
|
|
3826
|
+
"primaryImport": "arcane-os/native/portable-provider",
|
|
3827
|
+
"group": "Portable native provider",
|
|
3828
|
+
"summary": "Creates the SDK-owned provider that assembles one selected app and explicit services into a portable Core payload.",
|
|
3829
|
+
"availability": "Node; produces a portable payload rather than an executable host",
|
|
3830
|
+
"protocol": "arcane-native-builder/1 portable provider",
|
|
3831
|
+
"normalization": "Preserves complete selected app and dependency releases, uses explicit service module factories, reports executable:false and never substitutes for an unavailable platform host"
|
|
3832
|
+
},
|
|
3833
|
+
{
|
|
3834
|
+
"id": "native-portable-provider:arcaneNativeBuilderProvider",
|
|
3835
|
+
"name": "arcaneNativeBuilderProvider",
|
|
3836
|
+
"displayName": "arcaneNativeBuilderProvider",
|
|
3837
|
+
"kind": "singleton",
|
|
3838
|
+
"signature": "const arcaneNativeBuilderProvider",
|
|
3839
|
+
"entrypoints": ["arcane-os/native/portable-provider"],
|
|
3840
|
+
"primaryImport": "arcane-os/native/portable-provider",
|
|
3841
|
+
"group": "Portable native provider",
|
|
3842
|
+
"summary": "Package-owned portable provider with no preconfigured application services.",
|
|
3843
|
+
"availability": "Node; produces a portable payload rather than an executable host",
|
|
3844
|
+
"protocol": "arcane-native-builder/1 portable provider",
|
|
3845
|
+
"normalization": "Binding identity is exactly equal to the subpath default export; describe, doctor, prepare, build and verify retain portable semantics while run reports unsupported"
|
|
3846
|
+
},
|
|
3847
|
+
{
|
|
3848
|
+
"id": "native-portable-provider:default",
|
|
3849
|
+
"name": "default",
|
|
3850
|
+
"displayName": "arcaneNativeBuilderProvider default export",
|
|
3851
|
+
"kind": "singleton",
|
|
3852
|
+
"signature": "default as arcaneNativeBuilderProvider",
|
|
3853
|
+
"entrypoints": ["arcane-os/native/portable-provider"],
|
|
3854
|
+
"primaryImport": "arcane-os/native/portable-provider",
|
|
3855
|
+
"group": "Portable native provider",
|
|
3856
|
+
"summary": "Default package binding for the same portable provider exposed by arcaneNativeBuilderProvider.",
|
|
3857
|
+
"availability": "Node; produces a portable payload rather than an executable host",
|
|
3858
|
+
"protocol": "arcane-native-builder/1 portable provider",
|
|
3859
|
+
"normalization": "Binding identity is exactly equal to the named arcaneNativeBuilderProvider export"
|
|
3860
|
+
},
|
|
3861
|
+
{
|
|
3862
|
+
"id": "core-host:startCoreHost",
|
|
3863
|
+
"name": "startCoreHost",
|
|
3864
|
+
"displayName": "startCoreHost()",
|
|
3865
|
+
"kind": "function",
|
|
3866
|
+
"signature": "startCoreHost({application,version,services=[],input,output,onError,signal}={})",
|
|
3867
|
+
"entrypoints": ["arcane-os/core/host"],
|
|
3868
|
+
"primaryImport": "arcane-os/core/host",
|
|
3869
|
+
"group": "Native Core host composition",
|
|
3870
|
+
"summary": "Composes explicitly supplied application services with the shared Core runtime and stdio lifecycle.",
|
|
3871
|
+
"availability": "Node with readable input and writable output streams",
|
|
3872
|
+
"protocol": "arcane/1 over Content-Length framed stdio",
|
|
3873
|
+
"normalization": "Returns the existing {runtime,closed,close} transport owner; an optional abort signal invokes the same idempotent drain without killing the process, replacing service readiness or cancelling accepted service-lifetime work"
|
|
3622
3874
|
}
|
|
3623
3875
|
]
|
|
3624
3876
|
}
|
|
@@ -39,7 +39,7 @@ a nonzero CLI status.
|
|
|
39
39
|
Machine output uses `arcane-cli-events/1`. Native planning and providers use:
|
|
40
40
|
|
|
41
41
|
- `arcane-target-adapter/1` for target adapters;
|
|
42
|
-
- `arcane-native-build-plan/1` for
|
|
42
|
+
- `arcane-native-build-plan/1` for native plans with complete selected release inputs;
|
|
43
43
|
- `arcane-native-builder/1` for injected native builders;
|
|
44
44
|
- `arcane-integrated-toolchain/1` for the fixed integrated shared/Core provider.
|
|
45
45
|
|
|
@@ -47,6 +47,15 @@ These protocols normalize orchestration and results. They do not normalize a
|
|
|
47
47
|
Windows EXE, Linux DEB, Android APK, and portable directory into the same
|
|
48
48
|
artifact kind.
|
|
49
49
|
|
|
50
|
+
Portable CLI operations load the installed SDK's
|
|
51
|
+
`arcane-os/native/portable-provider` by default. Explicit `--arcane-root`
|
|
52
|
+
selection retains the checkout provider route; executable targets still need
|
|
53
|
+
their platform provider/toolchain. `arcane-os/core/host` composes the reusable
|
|
54
|
+
native runtime with explicitly supplied app services. Neither export is a
|
|
55
|
+
browser import, executable host or installer. The synchronous classic facade
|
|
56
|
+
and browser-safe client retain their separate public entries. Integrated
|
|
57
|
+
shared checks keep their existing Arcane OS development provider.
|
|
58
|
+
|
|
50
59
|
App-scoped managed browser imports have three supported control-plane entrypoints. The CLI
|
|
51
60
|
uses `arcane import-map`; Node callers use
|
|
52
61
|
`executeOperation('import-map', options)` or
|
|
@@ -236,6 +245,12 @@ For an extension, select `browserPwa:false` for that artifact and place the
|
|
|
236
245
|
complete SDK-produced app beneath the app-owned extension root. The application
|
|
237
246
|
owns its manifest, toolbar/background launcher and permissions. Ordinary browser
|
|
238
247
|
PWA configuration and generated browser output remain independently available.
|
|
248
|
+
Before native-module processing, the stage removes active `data-arcane-pwa`
|
|
249
|
+
scripts and manifest relationships targeting the package's `arcane.webmanifest`
|
|
250
|
+
from the existing selected PWA document set. Authored bases resolve those links;
|
|
251
|
+
unrelated manifest URLs, other link relationships, comments, templates and other
|
|
252
|
+
inactive HTML retain their content. Source documents and saved PWA settings
|
|
253
|
+
remain unchanged; the operation does not sweep every packaged HTML file.
|
|
239
254
|
|
|
240
255
|
## Installed-package browser routes
|
|
241
256
|
|