arcane-os 0.64.0 → 0.66.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 +50 -0
- package/README.md +1 -1
- package/browser-runtime/ai/browser-decisions.mjs +3 -2
- package/browser-runtime/ai/decision-runtime.mjs +14 -24
- package/browser-runtime/core/client.mjs +62 -5
- package/docs/guides/native-whisper-openvino.md +334 -0
- package/docs/publishing.md +39 -0
- package/docs/reference/README.md +11 -1
- package/docs/reference/ai/browser-decisions.md +7 -4
- package/docs/reference/arcane-ollama.md +1 -1
- package/docs/reference/codex-app-server.md +269 -0
- package/docs/reference/core-client.md +60 -2
- package/docs/reference/core-development.md +157 -0
- package/docs/reference/core-native-packaging.md +13 -0
- package/docs/reference/core-repositories.md +232 -4
- package/docs/reference/git-text-snapshot.md +15 -1
- package/docs/reference/inventory/package-api.json +174 -6
- package/docs/reference/inventory/runtime-modules.json +8 -6
- package/docs/reference/local-ai.md +80 -3
- package/docs/reference/local-image-generation.md +5 -0
- package/docs/reference/local-image-sdxl.md +1 -1
- package/docs/reference/local-whisper.md +7 -1
- package/docs/reference/mcp-stdio.md +263 -0
- package/docs/reference/native-speech.md +6 -0
- package/docs/reference/runtime-components.md +18 -1
- package/docs/reference/runtime-modules.md +10 -2
- package/docs/reference/sdk-api.md +346 -4
- package/package.json +6 -2
- package/runtime/arcane/modules/AI.js +156 -13
- package/runtime/arcane/modules/Ollama.js +1 -1
- package/runtime/arcane/modules/OllamaModelIdentifier.js +13 -0
- package/schemas/arcane-app.schema.json +8 -1
- package/schemas/arcane-package.schema.json +8 -1
- package/src/codex/app-server.mjs +845 -0
- package/src/core/development.mjs +457 -0
- package/src/core/repositories.mjs +178 -9
- package/src/core/services/local-ai.mjs +80 -10
- package/src/dev-server.mjs +3 -2
- package/src/git-identity.mjs +132 -0
- package/src/git-text-snapshot.mjs +5 -3
- package/src/index.mjs +1 -0
- package/src/local-ai/dev.mjs +80 -426
- package/src/local-ai/whisper/config.mjs +31 -3
- package/src/local-ai/whisper/index.mjs +62 -5
- package/src/local-ai/whisper/install.mjs +72 -14
- package/src/local-ai/whisper/native/main.cpp +33 -2
- package/src/local-ai/whisper/openvino-build.mjs +138 -0
- package/src/mcp/stdio-server.mjs +579 -0
- package/src/native/portable-layout.mjs +3 -1
- package/src/toolchain.mjs +19 -8
|
@@ -55,9 +55,12 @@ runtime layouts.
|
|
|
55
55
|
| `arcane-os/core/contracts` | Shared Core protocol, frame, method and diagnostic error contracts. |
|
|
56
56
|
| `arcane-os/core/classic-source` | Node generator for the canonical classic-script Core client projection. |
|
|
57
57
|
| `arcane-os/core/runtime` | App-neutral native Core dispatcher and service lifecycle. |
|
|
58
|
+
| `arcane-os/core/development` | App-service composition and document-owned Core transport during source development, independently of local AI. |
|
|
58
59
|
| `arcane-os/core/stdio` | Framed Node stdio transport with graceful runtime drain. |
|
|
59
60
|
| `arcane-os/core/host` | Node-only reusable Core host lifecycle with explicitly supplied services. |
|
|
60
|
-
| `arcane-os/
|
|
61
|
+
| `arcane-os/codex/app-server` | Explicit native Codex App Server session, complete live turns, server requests and recovery. |
|
|
62
|
+
| `arcane-os/mcp/stdio` | Node MCP STDIO server for app-owned tools and static resources. |
|
|
63
|
+
| `arcane-os/core/repositories` | Native persistent ArcaneData paths, connected working repositories and scoped non-secret Git identity configuration. |
|
|
61
64
|
| `arcane-os/core/packaged-web` | Core-owned packaged web listener with a persisted loopback origin and ready/failure events. |
|
|
62
65
|
| `arcane-os/core/preferences` | Existing preference RPC methods with an application-selected file, ordered writes and owned drain. |
|
|
63
66
|
| `arcane-os/core/diarization` | Lazy native speaker-diarization service, explicit stream methods and lifecycle/result events. |
|
|
@@ -71,6 +74,9 @@ runtime layouts.
|
|
|
71
74
|
| `arcane-os/ai/core-image` | Browser image lifecycle and complete PNG Blobs through an available Core service. |
|
|
72
75
|
| `arcane-os/core/image` | Native image Core service with independent runtime preparation and retained model ownership. |
|
|
73
76
|
| `arcane-os/core/speech` | Independent injected STT/TTS engine loading, request cancellation and joined Core service lifetime. |
|
|
77
|
+
| `arcane-os/local-ai/whisper` | Retained native Whisper model, complete recordings and joined helper lifetime. |
|
|
78
|
+
| `arcane-os/local-ai/whisper/build` | First-party persistent helper build against selected installed Whisper headers and libraries. |
|
|
79
|
+
| `arcane-os/local-ai/whisper/openvino-build` | Optional Windows x64 Intel NPU encoder runtime producer using selected installed sources and toolchain. |
|
|
74
80
|
| `arcane-os/ai/core-model-assets` | Complete stored browser model members projected through Core into native working files. |
|
|
75
81
|
| `arcane-os/core/model-assets` | Native working-file preparation, engine retain handles and joined cleanup. |
|
|
76
82
|
| `arcane-os/integrated-provider` | Fixed integrated shared-development provider. |
|
|
@@ -383,6 +389,13 @@ The remaining data-only subpaths are eight JSON Schemas and package metadata.
|
|
|
383
389
|
| `createCoreFacade()` | function | `arcane-os/core/client` | Core browser client | Browser and native WebView JavaScript hosts |
|
|
384
390
|
| `installCoreClient()` | function | `arcane-os/core/client` | Core browser client | Browser and native WebView JavaScript hosts |
|
|
385
391
|
| `getInstalledCoreClient()` | function | `arcane-os/core/client` | Core browser client | Browser and native WebView JavaScript hosts |
|
|
392
|
+
| `subscribeCoreClient()` | function | `arcane-os/core/client` | Core browser client | Browser and native WebView JavaScript hosts |
|
|
393
|
+
| `createDevelopmentCore()` | function | `arcane-os/core/development`, `arcane-os` | Core source development | Node on Windows, Linux and macOS; Android requires host adaptation |
|
|
394
|
+
| `createCodexAppServerSession()` | function | `arcane-os/codex/app-server` | Native Codex sessions | Node with an explicitly selected Codex App Server executable |
|
|
395
|
+
| `openCodexAppServerSession()` | function | `arcane-os/codex/app-server` | Native Codex sessions | Node with an explicitly selected Codex App Server executable |
|
|
396
|
+
| `createMcpStdioServer()` | function | `arcane-os/mcp/stdio` | MCP STDIO | Node streams on Windows, Linux and macOS; Android needs host adaptation |
|
|
397
|
+
| `MCP_PROTOCOL_VERSION` | constant | `arcane-os/mcp/stdio` | MCP STDIO | Node |
|
|
398
|
+
| `McpProtocolError` | class | `arcane-os/mcp/stdio` | MCP STDIO | Node |
|
|
386
399
|
| `createCoreClassicSource()` | function | `arcane-os/core/classic-source` | Core classic client projection | Node; generated source runs in browser and native WebView renderers |
|
|
387
400
|
| `createCoreRuntime()` | function | `arcane-os/core/runtime` | Native Core runtime | Node on Windows, Linux and macOS native hosts; Android requires host adaptation |
|
|
388
401
|
| `encodeCoreFrame()` | function | `arcane-os/core/stdio` | Native Core stdio transport | Node |
|
|
@@ -395,6 +408,7 @@ The remaining data-only subpaths are eight JSON Schemas and package metadata.
|
|
|
395
408
|
| `readCoreLaunchContext()` | function | `arcane-os/core/host` | Native Core host composition | Node; reads explicitly selected launch JSON |
|
|
396
409
|
| `resolveArcaneDataPaths()` | function | `arcane-os/core/repositories` | Native repository workspaces | Node on Windows, Linux and macOS; Android supplies its data root |
|
|
397
410
|
| `createRepositoryWorkspace()` | function | `arcane-os/core/repositories` | Native repository workspaces | Node with Git; Android requires host process adaptation |
|
|
411
|
+
| `readGitIdentity()` | function | `arcane-os/core/repositories` | Native repository workspaces | Node with Git; Android requires host process adaptation |
|
|
398
412
|
| `createWindowsNativeProvider()` | function | `arcane-os/native/windows-provider` | Windows native provider | Node assembly; Windows x64/WebView2 execution |
|
|
399
413
|
| `arcaneNativeBuilderProvider` | singleton | `arcane-os/native/windows-provider` | Windows native provider | Node assembly; Windows x64/WebView2 execution |
|
|
400
414
|
| `arcaneNativeBuilderProvider default export` | singleton | `arcane-os/native/windows-provider` | Windows native provider | Node assembly; Windows x64/WebView2 execution |
|
|
@@ -417,6 +431,10 @@ The remaining data-only subpaths are eight JSON Schemas and package metadata.
|
|
|
417
431
|
| `createLocalImageService()` | function | `arcane-os/core/image` | Core local images | Node Core with selected stable-diffusion.cpp requirements |
|
|
418
432
|
| `createLocalImageService default export` | function | `arcane-os/core/image` | Core local images | Same native image service factory |
|
|
419
433
|
| `createSpeechService()` | function | `arcane-os/core/speech` | Core native speech | Node Core with explicitly supplied speech engines |
|
|
434
|
+
| `createWhisperRuntime()` | function | `arcane-os/local-ai/whisper` | Core native speech | Node with a prepared matching helper, runtime, decoder and selected model |
|
|
435
|
+
| `createWhisperRuntime default export` | function | `arcane-os/local-ai/whisper` | Core native speech | Same retained native engine factory |
|
|
436
|
+
| `buildWhisperHelper()` | function | `arcane-os/local-ai/whisper/build` | Core native speech | Node with installed CMake/C++17 toolchain and matching Whisper source/runtime |
|
|
437
|
+
| `buildWhisperOpenVinoRuntime()` | function | `arcane-os/local-ai/whisper/openvino-build` | Core native speech | Windows x64 Node with installed matching Whisper/OpenVINO sources and CMake/MSVC toolchain |
|
|
420
438
|
| `createSpeechService default export` | function | `arcane-os/core/speech` | Core native speech | Same shared speech service factory |
|
|
421
439
|
| `prepareCoreModelAssets()` | function | `arcane-os/ai/core-model-assets` | Core model assets | Browser with complete Blob/File members and available Core service |
|
|
422
440
|
| `createModelAssetService()` | function | `arcane-os/core/model-assets` | Core model assets | Node Core with an application-selected working directory |
|
|
@@ -4138,6 +4156,11 @@ inspection is distinct from executing them or verifying a browser deployment.
|
|
|
4138
4156
|
|
|
4139
4157
|
Starts one owned browser development server with exact runtime/app route mappings and a caller-selected bind address.
|
|
4140
4158
|
|
|
4159
|
+
Source callers may pass `core`, a handle returned by
|
|
4160
|
+
[`createDevelopmentCore()`](#createdevelopmentcore). The server delegates the
|
|
4161
|
+
Core HTTP routes and closes that owner during shutdown. The existing internal
|
|
4162
|
+
`localAI` handle remains accepted; `core` takes precedence when explicitly supplied.
|
|
4163
|
+
|
|
4141
4164
|
HTTP and HTTPS serving use published `node-http-server` 10.0.0. The SDK
|
|
4142
4165
|
selects source routes and supplies generated representations; the module owns
|
|
4143
4166
|
static-file conditional GET/HEAD handling and response delivery. The SDK
|
|
@@ -4658,6 +4681,14 @@ async function usedescribeTargets(...arguments_) {
|
|
|
4658
4681
|
|
|
4659
4682
|
Starts one owned browser development server for the selected application.
|
|
4660
4683
|
|
|
4684
|
+
The selected descriptor's `native.services` composes application Core services
|
|
4685
|
+
independently of local AI. Programmatic `serviceModules:[{module,options}]`
|
|
4686
|
+
replaces that list; `services` adds constructed service definitions and `context`
|
|
4687
|
+
supplies app-owned launch fields. The result adds `core` when composed and retains
|
|
4688
|
+
`localAI` for selected native local AI. Page rendering and the listener do not
|
|
4689
|
+
wait for service readiness. See [source-development Core](core-development.md)
|
|
4690
|
+
for explicit `/arcane-core.js` loading, cancellation and current-state replay.
|
|
4691
|
+
|
|
4661
4692
|
`http`, `https`, `certPath`, `keyPath`, and `tls` follow the
|
|
4662
4693
|
[`startDevServer()` transport contract](#startdevserver), alongside `host`, `port`, and
|
|
4663
4694
|
`httpPort`. By default, `port` selects HTTPS and `httpPort` selects the HTTP `308`
|
|
@@ -5183,7 +5214,7 @@ a dedicated bare Git cache. It does not create or alter a working checkout.
|
|
|
5183
5214
|
### Signature, lifecycle, and result
|
|
5184
5215
|
|
|
5185
5216
|
```text
|
|
5186
|
-
createGitTextSnapshot({cacheDirectory,remote,ref,selectPath,onEvent,run=runProcess}={})
|
|
5217
|
+
createGitTextSnapshot({cacheDirectory,remote,ref,selectPath,gitIdentity,onEvent,run=runProcess}={})
|
|
5187
5218
|
```
|
|
5188
5219
|
|
|
5189
5220
|
Import from `arcane-os`. The application owns the cache location, remote, ref,
|
|
@@ -5195,6 +5226,11 @@ await accepted refresh/process cleanup. Errors remain observable instead of
|
|
|
5195
5226
|
returning stale or partial success. See [Git text snapshots](git-text-snapshot.md)
|
|
5196
5227
|
for complete inputs, text semantics, errors, events and Core service composition.
|
|
5197
5228
|
|
|
5229
|
+
Optional `gitIdentity:{name?,email?,username?}` captures a child-process-only
|
|
5230
|
+
selection for init/fetch and subsequent Git commands, preserving shared refresh
|
|
5231
|
+
cancellation and complete content. See [Git identity configuration](core-repositories.md#git-identity-configuration)
|
|
5232
|
+
for author precedence, scoped defaults and credential username semantics.
|
|
5233
|
+
|
|
5198
5234
|
### Example
|
|
5199
5235
|
|
|
5200
5236
|
```js
|
|
@@ -7062,6 +7098,46 @@ const client = getInstalledCoreClient();
|
|
|
7062
7098
|
console.log(client ? client.runtime.current() : 'No SDK client is installed.');
|
|
7063
7099
|
```
|
|
7064
7100
|
|
|
7101
|
+
## subscribeCoreClient()
|
|
7102
|
+
|
|
7103
|
+
### Overview
|
|
7104
|
+
|
|
7105
|
+
Observes the selected global's SDK client installation without creating a
|
|
7106
|
+
transport or delaying rendering. Applications can subscribe before independently
|
|
7107
|
+
loaded development or native bootstrap code installs the client.
|
|
7108
|
+
|
|
7109
|
+
### Signature and result
|
|
7110
|
+
|
|
7111
|
+
```text
|
|
7112
|
+
subscribeCoreClient(listener,{global=globalThis,emitCurrent=true,signal}={})
|
|
7113
|
+
```
|
|
7114
|
+
|
|
7115
|
+
Import from `arcane-os/core/client`. Returns an idempotent unsubscribe function.
|
|
7116
|
+
The listener receives `{client,previousClient,reason,error}` with the exact
|
|
7117
|
+
client and error objects. Reasons are `current`, `installed`, `closed` and
|
|
7118
|
+
`transport-failed`. Current state replays synchronously unless disabled; an
|
|
7119
|
+
already-aborted signal registers nothing. Close or terminal failure releases
|
|
7120
|
+
the prior installation before notification. A reentrant replacement is retained.
|
|
7121
|
+
|
|
7122
|
+
### Availability and normalization
|
|
7123
|
+
|
|
7124
|
+
**Browser and native WebView JavaScript hosts.** Installation is distinct from
|
|
7125
|
+
Core, service or model readiness. Read `client.runtime.current()` and subscribe
|
|
7126
|
+
to that client's authoritative runtime/service events for those states. This
|
|
7127
|
+
observer starts no service and uses the shared event owner, not polling. See
|
|
7128
|
+
[Core client](core-client.md) and [source-development Core](core-development.md).
|
|
7129
|
+
|
|
7130
|
+
### Example
|
|
7131
|
+
|
|
7132
|
+
```javascript
|
|
7133
|
+
import {subscribeCoreClient} from 'arcane-os/core/client';
|
|
7134
|
+
|
|
7135
|
+
const unsubscribe = subscribeCoreClient(function installationChanged({client}) {
|
|
7136
|
+
console.log(client ? client.runtime.current() : 'Core is not installed.');
|
|
7137
|
+
});
|
|
7138
|
+
// The application owner calls unsubscribe() when this observer is retired.
|
|
7139
|
+
```
|
|
7140
|
+
|
|
7065
7141
|
## createCoreClassicSource()
|
|
7066
7142
|
|
|
7067
7143
|
### Overview
|
|
@@ -7102,6 +7178,93 @@ const source = await createCoreClassicSource({
|
|
|
7102
7178
|
nativeHost.setDocumentCreatedScript(source);
|
|
7103
7179
|
```
|
|
7104
7180
|
|
|
7181
|
+
## createCodexAppServerSession()
|
|
7182
|
+
|
|
7183
|
+
Import from `arcane-os/codex/app-server`. Creates a synchronous session handle
|
|
7184
|
+
without starting a process. `connect()` starts the caller-selected executable
|
|
7185
|
+
and completes native JSONL initialization. The session owns explicit thread
|
|
7186
|
+
creation/resumption, complete native requests, live turn callbacks, exact-turn
|
|
7187
|
+
completion, interruption, real server-request replies and process retirement.
|
|
7188
|
+
Application-owned prompts, approvals and display policy stay with the caller.
|
|
7189
|
+
It neither attaches to desktop chats nor installs or authenticates Codex.
|
|
7190
|
+
See the complete [session options, methods, events, results, errors and recovery
|
|
7191
|
+
contract](codex-app-server.md).
|
|
7192
|
+
|
|
7193
|
+
## openCodexAppServerSession()
|
|
7194
|
+
|
|
7195
|
+
Import from `arcane-os/codex/app-server`. Creates the same session, awaits
|
|
7196
|
+
`connect()`, and returns it; failed opening disposes the owned process before
|
|
7197
|
+
rejecting. Prefer `createCodexAppServerSession()` when the caller must retain
|
|
7198
|
+
the handle during initialization. Neither factory creates or resumes a thread.
|
|
7199
|
+
See [connection ownership](codex-app-server.md#open-an-explicitly-selected-connection).
|
|
7200
|
+
|
|
7201
|
+
## createMcpStdioServer()
|
|
7202
|
+
|
|
7203
|
+
Import from `arcane-os/mcp/stdio`. Creates one optional Node STDIO session for
|
|
7204
|
+
application-owned tool and static-resource descriptors. `start()` attaches
|
|
7205
|
+
caller-owned streams; handlers receive complete arguments and return explicit
|
|
7206
|
+
MCP result containers. Requests run independently; protocol output writes are
|
|
7207
|
+
ordered. Normal EOF and `close()` drain accepted work. Cancellation is
|
|
7208
|
+
cooperative, and transport failures remain observable through `closed`.
|
|
7209
|
+
See [options, handlers, methods, errors and supported profile](mcp-stdio.md).
|
|
7210
|
+
|
|
7211
|
+
## MCP_PROTOCOL_VERSION
|
|
7212
|
+
|
|
7213
|
+
Import from `arcane-os/mcp/stdio`. The supported initialization profile is
|
|
7214
|
+
exactly `'2025-11-25'`. This does not claim later profiles or every optional
|
|
7215
|
+
capability. See [protocol support](mcp-stdio.md#mcp_protocol_version).
|
|
7216
|
+
|
|
7217
|
+
## McpProtocolError
|
|
7218
|
+
|
|
7219
|
+
Import from `arcane-os/mcp/stdio`. `new McpProtocolError(code,message,data)`
|
|
7220
|
+
represents an explicit JSON-RPC error with complete message and optional data.
|
|
7221
|
+
Ordinary domain tool failures use an explicit `CallToolResult` with `isError`.
|
|
7222
|
+
See [error outcomes](mcp-stdio.md#mcpprotocolerror).
|
|
7223
|
+
|
|
7224
|
+
## createDevelopmentCore()
|
|
7225
|
+
|
|
7226
|
+
### Overview
|
|
7227
|
+
|
|
7228
|
+
Composes application-selected Core services and the SDK-owned development HTTP
|
|
7229
|
+
transport independently of local AI. Import from `arcane-os/core/development`
|
|
7230
|
+
or `arcane-os`; ordinary applications normally use `developApplication()` with
|
|
7231
|
+
their descriptor's `native.services`.
|
|
7232
|
+
|
|
7233
|
+
### Signature and result
|
|
7234
|
+
|
|
7235
|
+
`createDevelopmentCore({appRoot=process.cwd(),application,version,services=[],serviceModules=[],context={},getReplayEvents,signal,onEvent}={})`
|
|
7236
|
+
returns `{ready,handler,current,close}` synchronously. Module default factories
|
|
7237
|
+
receive unchanged `(options,context)`. `ready` reports composed dispatcher
|
|
7238
|
+
startup, not readiness of every service. `current()` returns complete
|
|
7239
|
+
`{state,error,core}`; `handler(request,response)` owns `/rpc`, `/events` and both
|
|
7240
|
+
bootstrap aliases; idempotent `close()` joins accepted service work and output.
|
|
7241
|
+
|
|
7242
|
+
### Availability and example
|
|
7243
|
+
|
|
7244
|
+
Node on Windows, Linux and macOS. Browser callers use the public Core client.
|
|
7245
|
+
Android needs its host adapter. This adds no cross-process host discovery.
|
|
7246
|
+
|
|
7247
|
+
```javascript
|
|
7248
|
+
import {createDevelopmentCore, startDevServer} from 'arcane-os';
|
|
7249
|
+
|
|
7250
|
+
const core = createDevelopmentCore({
|
|
7251
|
+
appRoot: process.cwd(),
|
|
7252
|
+
serviceModules: [{module: 'bridge/moon-cheese.mjs', options: {shelf: 'Lunar cheddar'}}]
|
|
7253
|
+
});
|
|
7254
|
+
let server;
|
|
7255
|
+
try {
|
|
7256
|
+
server = await startDevServer({workspaceRoot: process.cwd(), core});
|
|
7257
|
+
await server.closed;
|
|
7258
|
+
} finally {
|
|
7259
|
+
await core.close();
|
|
7260
|
+
}
|
|
7261
|
+
```
|
|
7262
|
+
|
|
7263
|
+
The [complete guide](core-development.md) defines document cancellation,
|
|
7264
|
+
service-lifetime drain, diagnostics, optional explicit service snapshots and
|
|
7265
|
+
non-blocking page bootstrap. App policy and explicit native process activation
|
|
7266
|
+
remain app-owned.
|
|
7267
|
+
|
|
7105
7268
|
## createCoreRuntime()
|
|
7106
7269
|
|
|
7107
7270
|
### Overview
|
|
@@ -7728,10 +7891,10 @@ explicit existing path. The application owns the remote, branch and Core API.
|
|
|
7728
7891
|
### Signature and result
|
|
7729
7892
|
|
|
7730
7893
|
```text
|
|
7731
|
-
createRepositoryWorkspace({name,directory,dataRoot,remote,branch,onEvent,run=runProcess}={})
|
|
7894
|
+
createRepositoryWorkspace({name,directory,dataRoot,remote,branch,gitIdentity,onEvent,run=runProcess}={})
|
|
7732
7895
|
```
|
|
7733
7896
|
|
|
7734
|
-
Returns `{directory,open,status,pull,push,close,drain,dispose}`. Construction does
|
|
7897
|
+
Returns `{directory,open,status,pull,push,write,close,drain,dispose}`. Construction does
|
|
7735
7898
|
no I/O. Operations accept `{signal}`; a missing or empty destination clones once,
|
|
7736
7899
|
while existing checkout files, branches, remotes and local changes remain intact.
|
|
7737
7900
|
Same-directory calls are ordered within the process. Shutdown drains accepted
|
|
@@ -7739,6 +7902,20 @@ work and preserves the checkout. No CLI cwd, launch state, preference, snapshot
|
|
|
7739
7902
|
cache or existing user-data location changes. See the [complete inputs, results,
|
|
7740
7903
|
errors and lifecycle](core-repositories.md#one-connected-working-checkout).
|
|
7741
7904
|
|
|
7905
|
+
Optional `gitIdentity:{name?,email?,username?}` captures explicit non-secret
|
|
7906
|
+
settings for child Git operations without writing global/local configuration.
|
|
7907
|
+
Selected author fields override inherited child author/committer fields;
|
|
7908
|
+
omitted fields remain inherited. Username remains a credential hint, with
|
|
7909
|
+
authentication owned by ordinary Git and its configured helper.
|
|
7910
|
+
|
|
7911
|
+
`write({files:[{path,content}],message,signal})` snapshots the exact selected
|
|
7912
|
+
strings, writes those repository-relative files, commits only their literal
|
|
7913
|
+
paths and performs an ordinary non-force push. It retains unrelated staged
|
|
7914
|
+
paths and existing Git filters/hooks. Results and causal failures distinguish
|
|
7915
|
+
confirmed local writes, commits, pushes and uncertain attempted side effects;
|
|
7916
|
+
complete process output is retained. See [the complete writer outcome
|
|
7917
|
+
contract](core-repositories.md#write-commit-and-push-selected-text).
|
|
7918
|
+
|
|
7742
7919
|
```javascript
|
|
7743
7920
|
import {createRepositoryWorkspace} from 'arcane-os/core/repositories';
|
|
7744
7921
|
|
|
@@ -7750,6 +7927,45 @@ await repository.open({signal});
|
|
|
7750
7927
|
await repository.close();
|
|
7751
7928
|
```
|
|
7752
7929
|
|
|
7930
|
+
## readGitIdentity()
|
|
7931
|
+
|
|
7932
|
+
### Overview
|
|
7933
|
+
|
|
7934
|
+
Reads non-secret global, repository-local and effective Git configuration
|
|
7935
|
+
without changing files or querying credentials.
|
|
7936
|
+
|
|
7937
|
+
### Signature and result
|
|
7938
|
+
|
|
7939
|
+
```text
|
|
7940
|
+
readGitIdentity({directory,signal,onEvent,run=runProcess}={})
|
|
7941
|
+
```
|
|
7942
|
+
|
|
7943
|
+
Import from `arcane-os/core/repositories`. Returns a promise for
|
|
7944
|
+
`{global,local,effective}`, each observed scope containing `{name,email,githubUser}`.
|
|
7945
|
+
Fields preserve complete UTF-8 strings, including empty values, leading U+FEFF
|
|
7946
|
+
and newlines; unset fields are `null`. Git values outside UTF-8 fail with
|
|
7947
|
+
`ARCANE_GIT_IDENTITY_NOT_TEXT` instead of replacement characters.
|
|
7948
|
+
With no directory, only global configuration is read and local/effective
|
|
7949
|
+
are `null`. Existing repository directories, including bare caches, select the
|
|
7950
|
+
context for all three observations. Configured includes and ordinary Git
|
|
7951
|
+
precedence remain in effect. These are config observations, not authenticated
|
|
7952
|
+
accounts or environment-resolved commit identities.
|
|
7953
|
+
|
|
7954
|
+
Independent scope queries run concurrently and join cleanup before settlement.
|
|
7955
|
+
Raw stdout is parser-owned rather than emitted as text events; an injected
|
|
7956
|
+
`run` must honor the existing raw-output process contract. Lifecycle and stderr
|
|
7957
|
+
events retain their ordinary route. Errors preserve their original object,
|
|
7958
|
+
code, cause and process diagnostics, with complete captured output added as
|
|
7959
|
+
`rawStdout` (a Buffer). The raw-mode process result retains `stdout:null`.
|
|
7960
|
+
If that property already exists or cannot be attached, a wrapper retains the
|
|
7961
|
+
original as `cause`, its code/details/exit code and this observation's raw
|
|
7962
|
+
output; original causal failures remain on the cause. An attachment exception
|
|
7963
|
+
is retained as `attachmentError`. Existing property values remain untouched.
|
|
7964
|
+
Decoding failures include their cause, complete process details and raw output.
|
|
7965
|
+
Already-represented observer errors appear once; separate failures use
|
|
7966
|
+
`AggregateError`. See the [complete contract and
|
|
7967
|
+
per-process selection example](core-repositories.md#git-identity-configuration).
|
|
7968
|
+
|
|
7753
7969
|
## createCoreLocalAIProvider()
|
|
7754
7970
|
|
|
7755
7971
|
### Overview
|
|
@@ -7955,6 +8171,132 @@ selected model and native engine.
|
|
|
7955
8171
|
The default export from `arcane-os/core/image` is the same
|
|
7956
8172
|
`createLocalImageService` factory and lifecycle described above.
|
|
7957
8173
|
|
|
8174
|
+
## createWhisperRuntime()
|
|
8175
|
+
|
|
8176
|
+
### Overview
|
|
8177
|
+
|
|
8178
|
+
Creates one retained native Whisper engine from a prepared runtime or a lazy
|
|
8179
|
+
preparation function. Construction starts no helper, model load or inference.
|
|
8180
|
+
Import the named factory from `arcane-os/local-ai/whisper`.
|
|
8181
|
+
|
|
8182
|
+
### Syntax and inputs
|
|
8183
|
+
|
|
8184
|
+
```javascript
|
|
8185
|
+
createWhisperRuntime({runtime, prepare, modelId, temporaryDirectory, onEvent}={})
|
|
8186
|
+
```
|
|
8187
|
+
|
|
8188
|
+
Supply `runtime` or `prepare({signal,onEvent})`, and an application-owned
|
|
8189
|
+
`temporaryDirectory`. `modelId` selects a model from the prepared runtime;
|
|
8190
|
+
omitting it uses the runtime's selected model. `onEvent` receives complete
|
|
8191
|
+
native preparation/process diagnostics. The runtime describes matching helper,
|
|
8192
|
+
Whisper backend libraries, decoder and model files; see the complete
|
|
8193
|
+
[native Whisper preparation contract](local-whisper.md).
|
|
8194
|
+
|
|
8195
|
+
### Returned members and lifetime
|
|
8196
|
+
|
|
8197
|
+
| Member | Contract |
|
|
8198
|
+
| --- | --- |
|
|
8199
|
+
| `current()` | Returns `providerId`, `modelId`, `state`, `loaded`, `busy`, `requestId`, `requestedBackend`, `observedBackend`, `backendEvidence`, `requestedEncoder`, `observedEncoder`, `encoderEvidence` and `error`. State reports actual helper/model readiness; encoder and decoder initialization evidence remain separate. |
|
|
8200
|
+
| `subscribe(listener,{replay=true,signal}={})` | Observes the current snapshot immediately by default, then each state change; returns the unsubscribe closure. |
|
|
8201
|
+
| `load({modelId,signal}={})` | Prepares the selected runtime if necessary and retains its initialized helper/model. Same-model loading is shared; replacement remains explicit. |
|
|
8202
|
+
| `transcribe(request,{signal,onProgress,requestId}={})` | Accepts the complete `{audioBase64,mimeType?,model?,language?,translate?}` recording for the loaded model and returns `{text,language,duration,segments}`. `audioBase64` transports the original media; the decoder recognizes its actual format. Progress is ordered; control metadata stays outside the request. |
|
|
8203
|
+
| `unload()` | Cancels owned loading/transcription, joins decoder/helper work and releases the retained model before resolving its state snapshot. |
|
|
8204
|
+
| `close()` | Performs joined unload and disposes state observation. Repeated calls share the closing result. |
|
|
8205
|
+
|
|
8206
|
+
The decoder consumes the complete submitted media into native 16 kHz mono PCM
|
|
8207
|
+
without changing the caller's recording. The result preserves the engine's
|
|
8208
|
+
complete text and segment order. Temporary operation files remain until decoder
|
|
8209
|
+
and inference settle. The engine accepts one active recording; overlapping
|
|
8210
|
+
requests report `WHISPER_BUSY`, and unavailable/closing/model failures retain
|
|
8211
|
+
their explicit diagnostics. Caller cancellation retains its supplied reason.
|
|
8212
|
+
|
|
8213
|
+
With `backend: 'auto'`, an eligible accelerated native failure may drain that
|
|
8214
|
+
helper and retry the same complete recording and selected model once on the
|
|
8215
|
+
prepared CPU backend. Its snapshot is `recovering`, unloaded and busy during
|
|
8216
|
+
recovery. Cancellation, malformed input, observer/protocol failure and explicit
|
|
8217
|
+
backend selection do not cause that retry. `requestId` is the actual optional
|
|
8218
|
+
transport correlation, never a generated replacement or payload field; it
|
|
8219
|
+
remains through terminal error settlement and clears or changes on the next
|
|
8220
|
+
request/load/unload/close. The [shared speech adapter](native-speech.md) preserves
|
|
8221
|
+
only that continuing owned request, while new requests require actual readiness.
|
|
8222
|
+
|
|
8223
|
+
### Availability and example
|
|
8224
|
+
|
|
8225
|
+
Node on Windows, Linux and macOS with matching native resources; Android needs
|
|
8226
|
+
the corresponding host/process adaptation. Prepared files establish resource
|
|
8227
|
+
availability, not execution on every platform. This uses an already prepared
|
|
8228
|
+
runtime and the application's own temporary directory:
|
|
8229
|
+
|
|
8230
|
+
```javascript
|
|
8231
|
+
import {createWhisperRuntime} from 'arcane-os/local-ai/whisper';
|
|
8232
|
+
import {createSpeechService} from 'arcane-os/core/speech';
|
|
8233
|
+
|
|
8234
|
+
const stt = createWhisperRuntime({runtime, modelId: 'whisper-small', temporaryDirectory});
|
|
8235
|
+
const speech = createSpeechService({stt});
|
|
8236
|
+
// Register speech with the existing Core owner; it owns start/drain/dispose.
|
|
8237
|
+
```
|
|
8238
|
+
|
|
8239
|
+
## createWhisperRuntime default export
|
|
8240
|
+
|
|
8241
|
+
The default binding from `arcane-os/local-ai/whisper` is identical to the named
|
|
8242
|
+
[`createWhisperRuntime()`](#createwhisperruntime) factory and has the same inputs,
|
|
8243
|
+
members, readiness, cancellation and native-resource requirements.
|
|
8244
|
+
|
|
8245
|
+
## buildWhisperHelper()
|
|
8246
|
+
|
|
8247
|
+
`buildWhisperHelper({runtime,outputRoot,cmake='cmake',generator,cmakeArgs=[],env,
|
|
8248
|
+
signal,onEvent}={})` from `arcane-os/local-ai/whisper/build` builds the first-party
|
|
8249
|
+
persistent helper using the installed native toolchain. `runtime.directory`
|
|
8250
|
+
selects the prepared libraries and `runtime.sourceDirectory` selects their
|
|
8251
|
+
matching headers; `outputRoot` owns build/install output. Optional CMake
|
|
8252
|
+
arguments, generator and environment remain caller-selected.
|
|
8253
|
+
|
|
8254
|
+
The operation runs configure, Release build and install in order. It returns
|
|
8255
|
+
`{platform,architecture,root,executable,runtimeDirectory,diagnostics}`, with
|
|
8256
|
+
complete `configure`, `compile` and `install` process results. Cancellation and
|
|
8257
|
+
process errors use the existing owned process lifetime. It installs neither a
|
|
8258
|
+
toolchain nor a model and performs no inference. Windows helper installation
|
|
8259
|
+
includes the selected compiler's redistributable runtime closure. Use a
|
|
8260
|
+
toolchain and prepared runtime matching the target platform/architecture; a
|
|
8261
|
+
source package alone is not a compiled helper. See the [helper build procedure](local-whisper.md).
|
|
8262
|
+
|
|
8263
|
+
## buildWhisperOpenVinoRuntime()
|
|
8264
|
+
|
|
8265
|
+
`buildWhisperOpenVinoRuntime({sourceDirectory,openvinoDirectory,cudaDirectory,
|
|
8266
|
+
outputRoot,cmake='cmake',generator,cmakeArgs=[],env,signal,onEvent}={})` from
|
|
8267
|
+
`arcane-os/local-ai/whisper/openvino-build` produces the optional native Intel
|
|
8268
|
+
NPU encoder runtime on Windows x64. This producer uses an already installed
|
|
8269
|
+
compatible CMake/MSVC environment, Whisper 1.9.4 source and OpenVINO 2026.3.1
|
|
8270
|
+
development tree. Required `sourceDirectory`, `openvinoDirectory` and
|
|
8271
|
+
`outputRoot` name those inputs and the producer-owned output. It installs no
|
|
8272
|
+
driver, toolchain or model and performs no inference.
|
|
8273
|
+
|
|
8274
|
+
The producer copies Whisper source into `outputRoot/source`, applies its
|
|
8275
|
+
encoder-failure propagation and stderr diagnostic corrections there, and runs
|
|
8276
|
+
CMake configure/build into `outputRoot/build`. The original source stays
|
|
8277
|
+
unchanged. It assembles the runtime under `outputRoot/runtime`, retaining
|
|
8278
|
+
OpenVINO/NPU, CPU, TBB, import libraries and packaging notices. Optional
|
|
8279
|
+
`cudaDirectory` names the matching upstream b5130 CUDA library directory;
|
|
8280
|
+
its selected precompiled backend libraries add CUDA alongside CPU. Omission
|
|
8281
|
+
produces the NPU-plus-CPU tree. `cmake`, `generator`, `cmakeArgs` and `env`
|
|
8282
|
+
configure the existing build environment.
|
|
8283
|
+
|
|
8284
|
+
The result is `{version,openvinoVersion,platform,architecture,encoder,backend,
|
|
8285
|
+
backends,root,directory,libraryDirectory,sourceDirectory,diagnostics}`.
|
|
8286
|
+
`directory` equals `root`; the returned `sourceDirectory` is the copied source.
|
|
8287
|
+
`diagnostics` retains complete `configure` and `compile` process results.
|
|
8288
|
+
`signal` and `onEvent` use the existing process cancellation and diagnostic
|
|
8289
|
+
contract. Missing required strings produce a `TypeError`; an unsupported
|
|
8290
|
+
producer host or unmatched source correction reports an error. Filesystem,
|
|
8291
|
+
process, cancellation and observer failures remain observable, with partial
|
|
8292
|
+
producer output left for its owner.
|
|
8293
|
+
|
|
8294
|
+
Build the matching first-party helper separately with `buildWhisperHelper`,
|
|
8295
|
+
then retain its complete installed `bin` alongside this runtime. The
|
|
8296
|
+
[complete producer example](../guides/native-whisper-openvino.md#produce-the-optional-native-runtime)
|
|
8297
|
+
covers that composition. Applications normally select the precompiled asset
|
|
8298
|
+
through `encoder: 'openvino-npu'`; they do not run this producer at startup.
|
|
8299
|
+
|
|
7958
8300
|
## createSpeechService()
|
|
7959
8301
|
|
|
7960
8302
|
### Overview and usage
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arcane-os",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.66.0",
|
|
4
4
|
"description": "Arcane OS JavaScript SDK, project-local CLI, browser runtime, and repository-portable application packager.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.mjs",
|
|
@@ -59,8 +59,11 @@
|
|
|
59
59
|
"./core/contracts": "./browser-runtime/core/contracts.mjs",
|
|
60
60
|
"./core/classic-source": "./src/core-classic-source.mjs",
|
|
61
61
|
"./core/runtime": "./src/core/runtime.mjs",
|
|
62
|
+
"./core/development": "./src/core/development.mjs",
|
|
62
63
|
"./core/stdio": "./src/core/stdio.mjs",
|
|
63
64
|
"./core/host": "./src/core/host.mjs",
|
|
65
|
+
"./codex/app-server": "./src/codex/app-server.mjs",
|
|
66
|
+
"./mcp/stdio": "./src/mcp/stdio-server.mjs",
|
|
64
67
|
"./core/repositories": "./src/core/repositories.mjs",
|
|
65
68
|
"./core/packaged-web": "./src/core/services/packaged-web.mjs",
|
|
66
69
|
"./core/preferences": "./src/core/services/preferences.mjs",
|
|
@@ -76,6 +79,7 @@
|
|
|
76
79
|
"./local-ai/image": "./src/local-ai/image-runtime.mjs",
|
|
77
80
|
"./local-ai/whisper": "./src/local-ai/whisper/index.mjs",
|
|
78
81
|
"./local-ai/whisper/build": "./src/local-ai/whisper/build.mjs",
|
|
82
|
+
"./local-ai/whisper/openvino-build": "./src/local-ai/whisper/openvino-build.mjs",
|
|
79
83
|
"./integrated-provider": "./src/integrated-provider-loader.mjs",
|
|
80
84
|
"./packager": "./src/packager/core.mjs",
|
|
81
85
|
"./release-bundle": "./src/release-bundle.mjs",
|
|
@@ -117,7 +121,7 @@
|
|
|
117
121
|
"test": "npm run test:unit && npm run test:functional && npm run test:integration && npm run test:regression",
|
|
118
122
|
"test:release": "node ./bin/arcane-test.mjs test/npm-release.test.mjs",
|
|
119
123
|
"test:unit": "node ./bin/arcane-test.mjs test/app-descriptor.test.mjs test/app-schema.test.mjs test/app-selection.test.mjs test/contracts.test.mjs test/conversation-closing-report.test.mjs test/doctor.test.mjs test/mail-credentials.test.mjs test/mail-outbox.test.mjs test/mail-public-api.test.mjs test/mail-send.test.mjs test/mail-transport.test.mjs test/native-windows-icon.test.mjs test/targets.test.mjs test/workspace-operation-lock.test.mjs",
|
|
120
|
-
"test:functional": "node ./bin/arcane-test.mjs test/ai-request-model.test.mjs test/ai-request-retry.test.mjs test/ai-stream-cancellation.test.mjs test/browser-decisions.test.mjs test/browser-speech-providers.test.mjs test/browser-wasm-gpu-notice.test.mjs test/browser-wasm-download-resume.test.mjs test/chat-input.test.mjs test/chat-stream-speech.test.mjs test/chat-transcript-scroll.test.mjs test/chat-transient-retention.test.mjs test/cli.test.mjs test/continuous-voice-capture.test.mjs test/core-classic-source.test.mjs test/core-client.test.mjs test/core-host.test.mjs test/core-packaged-web.test.mjs test/core-runtime.test.mjs test/core-stdio.test.mjs test/dbopfs-document-library.test.mjs test/dbopfs-png.test.mjs test/dbopfs.test.mjs test/dev-server.test.mjs test/dev-pwa.test.mjs test/dom-event-instrumentation.test.mjs test/event-manager.test.mjs test/events.test.mjs test/file-preview.test.mjs test/import-map.test.mjs test/local-image-editing.test.mjs test/mail-cli.test.mjs test/mail-runtime.test.mjs test/mail-server.test.mjs test/markdown-editor.test.mjs test/markdown-media.test.mjs test/markdown-source-map.test.mjs test/modal.test.mjs test/native-module-packaging.test.mjs test/native-module-resource-references.test.mjs test/packaging.test.mjs test/pwa-packaging.test.mjs test/pwa-client.test.mjs test/pwa-install.test.mjs test/pwa-worker.test.mjs test/persistent-ai-chat-session.test.mjs test/reference-completeness.test.mjs test/rendered-print.test.mjs test/runtime-api-behavior.test.mjs test/runtime.test.mjs test/scaffold.test.mjs test/speech-playback.test.mjs test/site.test.mjs test/theme-manager.test.mjs test/twin-cloud-images.test.mjs test/twin-cloud.test.mjs test/websocket-client-import-map.test.mjs test/websocket.test.mjs test/update-check.test.mjs test/user-explicit-updates.test.mjs",
|
|
124
|
+
"test:functional": "node ./bin/arcane-test.mjs test/ai-ollama-readiness.test.mjs test/core-ollama-lifecycle.test.mjs test/ai-request-model.test.mjs test/ai-request-retry.test.mjs test/ai-stream-cancellation.test.mjs test/browser-decisions.test.mjs test/browser-speech-providers.test.mjs test/browser-wasm-gpu-notice.test.mjs test/browser-wasm-download-resume.test.mjs test/chat-input.test.mjs test/chat-stream-speech.test.mjs test/chat-transcript-scroll.test.mjs test/chat-transient-retention.test.mjs test/cli.test.mjs test/continuous-voice-capture.test.mjs test/codex-app-server.test.mjs test/mcp-stdio-server.test.mjs test/core-classic-source.test.mjs test/core-client.test.mjs test/core-client-installation.test.mjs test/core-development.test.mjs test/core-host.test.mjs test/core-packaged-web.test.mjs test/core-runtime.test.mjs test/core-stdio.test.mjs test/dbopfs-document-library.test.mjs test/dbopfs-png.test.mjs test/dbopfs.test.mjs test/dev-server.test.mjs test/dev-pwa.test.mjs test/dom-event-instrumentation.test.mjs test/event-manager.test.mjs test/events.test.mjs test/file-preview.test.mjs test/import-map.test.mjs test/local-image-editing.test.mjs test/mail-cli.test.mjs test/mail-runtime.test.mjs test/mail-server.test.mjs test/markdown-editor.test.mjs test/markdown-media.test.mjs test/markdown-source-map.test.mjs test/modal.test.mjs test/native-module-packaging.test.mjs test/native-module-resource-references.test.mjs test/packaging.test.mjs test/pwa-packaging.test.mjs test/pwa-client.test.mjs test/pwa-install.test.mjs test/pwa-worker.test.mjs test/persistent-ai-chat-session.test.mjs test/reference-completeness.test.mjs test/rendered-print.test.mjs test/runtime-api-behavior.test.mjs test/runtime.test.mjs test/scaffold.test.mjs test/speech-playback.test.mjs test/site.test.mjs test/theme-manager.test.mjs test/twin-cloud-images.test.mjs test/twin-cloud.test.mjs test/websocket-client-import-map.test.mjs test/websocket.test.mjs test/update-check.test.mjs test/user-explicit-updates.test.mjs",
|
|
121
125
|
"test:integration": "node ./bin/arcane-test.mjs test/installed-package-runtime.test.mjs test/root-app-layout.test.mjs test/integrated-shared.test.mjs test/integrated-workspace.test.mjs test/mail-browser.test.mjs test/native-macos-provider.test.mjs test/native-plan.test.mjs test/native-portable-provider.test.mjs test/native-provider-loader.test.mjs test/npm-release.test.mjs test/release-bundle.test.mjs test/release-capability-smoke.test.mjs test/shared-payload-batch.test.mjs test/tarball.test.mjs test/browser-wasm-cpu.test.mjs test/wllama-webgpu-runtime.test.mjs",
|
|
122
126
|
"test:regression": "node ./bin/arcane-test.mjs test/channel-workflows.test.mjs test/html-import-registration.test.mjs test/html-import-packaged-script.test.mjs test/logging-regression.test.mjs test/markdown-speech.test.mjs test/prepared-speech.test.mjs test/native-provider-generation.test.mjs test/speech-queue-regression.test.mjs test/testing.test.mjs test/test-sets.test.mjs",
|
|
123
127
|
"check": "node tools/check-source.mjs && npm test",
|