arcane-os 0.8.1 → 0.9.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 +11 -0
- package/README.md +8 -8
- package/browser-runtime/browser-device.mjs +13 -0
- package/docs/architecture.md +1 -1
- package/docs/reference/README.md +3 -2
- package/docs/reference/ai/browser-wasm.md +19 -0
- package/docs/reference/inventory/package-api.json +17 -1
- package/docs/reference/sdk-api.md +41 -2
- package/package.json +2 -1
- package/src/import-map.mjs +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
- Add `getBrowserDeviceClass()` through the dependency-free
|
|
6
|
+
`arcane-os/browser-device` entrypoint and managed browser import map. Return
|
|
7
|
+
`mobile` or `desktop` from browser identity hints, including Android tablets
|
|
8
|
+
and iPadOS Mac-platform touch identity, for application-owned settings.
|
|
9
|
+
- Keep classification independent of model imports, GPU requests, network,
|
|
10
|
+
storage, listeners, and viewport changes. Missing or unrecognized identity
|
|
11
|
+
defaults to `desktop`; the result does not claim hardware capability or
|
|
12
|
+
model readiness, and existing provider defaults remain unchanged.
|
|
13
|
+
|
|
3
14
|
## 0.8.1
|
|
4
15
|
|
|
5
16
|
- Use `arcaneVersion` as the sole local resource version field across import maps,
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ version-locked SDK runtime, while an integrated Arcane checkout uses its live
|
|
|
19
19
|
`arcane/` runtime. Both profiles preserve the same app URLs, theme, packaging,
|
|
20
20
|
event, cancellation, and browser run contracts.
|
|
21
21
|
|
|
22
|
-
This checkout defines the `0.
|
|
22
|
+
This checkout defines the `0.9.0` SDK contract. Applications pin one exact npm
|
|
23
23
|
version and lockfile; registry state is deliberately not baked into application
|
|
24
24
|
artifacts.
|
|
25
25
|
|
|
@@ -35,7 +35,7 @@ Create one browser application, install its pinned SDK, and start its source
|
|
|
35
35
|
server:
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
npx arcane-os@0.
|
|
38
|
+
npx arcane-os@0.9.0 new hello-speech --path ./hello-speech --target browser
|
|
39
39
|
cd hello-speech
|
|
40
40
|
npm install
|
|
41
41
|
npm run dev
|
|
@@ -386,7 +386,7 @@ uses the same controller for automatic memory extraction.
|
|
|
386
386
|
Create a new repository-shaped Arcane application with the exact stable SDK:
|
|
387
387
|
|
|
388
388
|
```bash
|
|
389
|
-
npx arcane-os@0.
|
|
389
|
+
npx arcane-os@0.9.0 new my-app --path ./my-app --target portable --git
|
|
390
390
|
cd my-app
|
|
391
391
|
npm install
|
|
392
392
|
npm run dev
|
|
@@ -396,7 +396,7 @@ To enroll an existing repository, install the exact SDK and initialize only
|
|
|
396
396
|
missing Arcane files:
|
|
397
397
|
|
|
398
398
|
```bash
|
|
399
|
-
npm install --save-dev --save-exact arcane-os@0.
|
|
399
|
+
npm install --save-dev --save-exact arcane-os@0.9.0
|
|
400
400
|
npm exec -- arcane init my-app --target portable
|
|
401
401
|
```
|
|
402
402
|
|
|
@@ -412,7 +412,7 @@ npm exec -- arcane-os targets
|
|
|
412
412
|
No global SDK install or standalone Arcane CLI is required. The application
|
|
413
413
|
repository's exact npm dependency and lockfile own the CLI and toolchain version.
|
|
414
414
|
|
|
415
|
-
Use `npx arcane-os@0.
|
|
415
|
+
Use `npx arcane-os@0.9.0` for the initial bootstrap because it names this npm
|
|
416
416
|
package explicitly; bare `npx arcane` outside an installed project could resolve
|
|
417
417
|
a different package. Both installed commands invoke the same headless toolchain.
|
|
418
418
|
Project-local npm scripts use the SDK pinned by that app's `package-lock.json`,
|
|
@@ -432,7 +432,7 @@ node ./bin/arcane.mjs new local-app --path ../local-app --target portable --git
|
|
|
432
432
|
|
|
433
433
|
# From the generated app repository
|
|
434
434
|
cd ../local-app
|
|
435
|
-
npm install --save-dev --save-exact ../arcane-os-sdk/arcane-os-0.
|
|
435
|
+
npm install --save-dev --save-exact ../arcane-os-sdk/arcane-os-0.9.0.tgz
|
|
436
436
|
npm ci
|
|
437
437
|
```
|
|
438
438
|
|
|
@@ -441,7 +441,7 @@ same location. The lockfile retains the selected package dependency while
|
|
|
441
441
|
Arcane uses the installed package name and version. Local directory `file:` dependencies are not
|
|
442
442
|
accepted because npm may install them as links; use a packed `.tgz`. A GitHub
|
|
443
443
|
runner also needs that tarball at the locked path. After publication, replace
|
|
444
|
-
the local declaration with the exact `arcane-os@0.
|
|
444
|
+
the local declaration with the exact `arcane-os@0.9.0` registry package and
|
|
445
445
|
commit the regenerated lock.
|
|
446
446
|
|
|
447
447
|
Generated repositories use `npm ci --ignore-scripts` in CI. Run dependency
|
|
@@ -580,7 +580,7 @@ package installation, or assertions.
|
|
|
580
580
|
|
|
581
581
|
## Current target support
|
|
582
582
|
|
|
583
|
-
Version `0.
|
|
583
|
+
Version `0.9.0` exposes one browser target and five explicitly paired
|
|
584
584
|
native development targets: a non-runnable portable directory, a
|
|
585
585
|
Windows x64 unsigned-local-test EXE bundle, Linux x64 and Linux ARM64
|
|
586
586
|
unsigned-local-test DEBs, and an Android development-signed APK. The
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Selects application settings from browser identity hints, including tablets. */
|
|
2
|
+
export function getBrowserDeviceClass(navigatorObject = globalThis.navigator) {
|
|
3
|
+
const userAgent = String(navigatorObject?.userAgent ?? '');
|
|
4
|
+
const clientHints = navigatorObject?.userAgentData;
|
|
5
|
+
const platform = String(clientHints?.platform || navigatorObject?.platform || '');
|
|
6
|
+
const mobile = clientHints?.mobile === true
|
|
7
|
+
|| /\b(?:Android|iOS|iPhone|iPad|iPod)\b/iu.test(platform)
|
|
8
|
+
|| /\b(?:Android|iPhone|iPad|iPod|Mobile)\b/iu.test(userAgent)
|
|
9
|
+
// iPadOS can identify as a Mac while retaining its touch capabilities.
|
|
10
|
+
|| (/\b(?:MacIntel|Macintosh|macOS)\b/iu.test(platform)
|
|
11
|
+
&& navigatorObject?.maxTouchPoints > 1);
|
|
12
|
+
return mobile ? 'mobile' : 'desktop';
|
|
13
|
+
}
|
package/docs/architecture.md
CHANGED
|
@@ -289,7 +289,7 @@ paths are withheld from the native provider. The provider copies the complete
|
|
|
289
289
|
selected release rather than accepting an unrelated source path. Verification
|
|
290
290
|
is a separate explicit operation for a selected release artifact.
|
|
291
291
|
|
|
292
|
-
The SDK `0.
|
|
292
|
+
The SDK `0.9.0` runtime requires Arcane `0.8.12` or newer. Compatibility
|
|
293
293
|
is contractual rather than exact-version pinning: the prepared Core must meet
|
|
294
294
|
the highest minimum declared by the runtime, selected app, and bundled app
|
|
295
295
|
dependencies; keep each app's Arcane protocol generation; and provide every
|
package/docs/reference/README.md
CHANGED
|
@@ -124,11 +124,12 @@ Public reference entries follow the established Arcane documentation model:
|
|
|
124
124
|
|
|
125
125
|
## Public runtime inventory
|
|
126
126
|
|
|
127
|
-
The package exposes
|
|
127
|
+
The package exposes 203 semantic JavaScript records across 19 JavaScript
|
|
128
128
|
entrypoints, plus eight JSON Schemas and package metadata. Ten entrypoints are
|
|
129
129
|
Node.js control-plane surfaces,
|
|
130
130
|
`arcane-os/event-manager`, `arcane-os/logging`, `arcane-os/mail`, `arcane-os/preference-store`, and
|
|
131
|
-
`arcane-os/speech-playback
|
|
131
|
+
`arcane-os/speech-playback`, `arcane-os/speech-text`, and `arcane-os/browser-device`
|
|
132
|
+
run in Node and browsers, and
|
|
132
133
|
`arcane-os/ai/browser-wasm` plus `arcane-os/ai/browser-speech` are browser-only.
|
|
133
134
|
The [machine-readable package
|
|
134
135
|
inventory](inventory/package-api.json) and [SDK member reference](sdk-api.md)
|
|
@@ -61,6 +61,25 @@ model source. Each file needs only a name and HTTPS URL. A positive optional
|
|
|
61
61
|
`bytes` value supplies observational progress and transport-planning metadata;
|
|
62
62
|
it never validates, admits, identifies, or decides cache reuse for content.
|
|
63
63
|
|
|
64
|
+
## Mobile and desktop settings
|
|
65
|
+
|
|
66
|
+
`getBrowserDeviceClass(navigatorObject = globalThis.navigator)`, exported from
|
|
67
|
+
`arcane-os/browser-device`, returns `mobile` or `desktop` for choosing
|
|
68
|
+
application-owned settings. Mobile includes a positive mobile client hint,
|
|
69
|
+
Android or iOS platform information, mobile user-agent identifiers, and iPadOS
|
|
70
|
+
reporting a Mac platform with multiple touch points. Missing or unrecognized
|
|
71
|
+
identity defaults to `desktop`; a browser hiding all mobile hints may therefore
|
|
72
|
+
receive that profile. This classification is a settings hint, not evidence of
|
|
73
|
+
GPU capability, available memory, or model readiness.
|
|
74
|
+
|
|
75
|
+
Keep complete mobile and desktop load profiles at the application owner and
|
|
76
|
+
pass the selected profile as `createBrowserWasmLlmProvider({loadDefaults})`.
|
|
77
|
+
Choose it once before provider creation so catalog inspection and model loading
|
|
78
|
+
use the same settings. The helper reads identity synchronously and starts no
|
|
79
|
+
GPU request, model operation, listener, or viewport-dependent reload. Its
|
|
80
|
+
dependency-free entrypoint does not import the inference runtime. Profile
|
|
81
|
+
selection does not alter prompts, documents, history, or output limits.
|
|
82
|
+
|
|
64
83
|
## Lifecycle at a glance
|
|
65
84
|
|
|
66
85
|
`createArcaneAI()` owns one LLM controller. Its default `loadPolicy` is
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"minimumVersion": "22.23.2 for Node entrypoints",
|
|
7
7
|
"moduleSystem": "ESM"
|
|
8
8
|
},
|
|
9
|
-
"memberCount":
|
|
9
|
+
"memberCount": 203,
|
|
10
10
|
"members": [
|
|
11
11
|
{
|
|
12
12
|
"id": "root:APP_BUNDLE_DESCRIPTOR_NAME",
|
|
@@ -2952,6 +2952,22 @@
|
|
|
2952
2952
|
"protocol": "Resumable ordered model members and deterministic per-member Range parts over existing DBOPFS method semantics",
|
|
2953
2953
|
"normalization": "Uses one bounded transfer axis, preserves ordered completed shards and deterministic current Range parts within any member across interruption, emits coalesced additive loaded/total/remaining/rate/ETA/active-worker telemetry, rolls discarded partial writes back out of progress, cleans superseded current Range parts after a complete replacement exists, and settles failed or cancelled peers while retaining completed work for retry"
|
|
2954
2954
|
},
|
|
2955
|
+
{
|
|
2956
|
+
"id": "browser-device:getBrowserDeviceClass",
|
|
2957
|
+
"name": "getBrowserDeviceClass",
|
|
2958
|
+
"displayName": "getBrowserDeviceClass()",
|
|
2959
|
+
"kind": "function",
|
|
2960
|
+
"signature": "getBrowserDeviceClass(navigatorObject = globalThis.navigator)",
|
|
2961
|
+
"entrypoints": [
|
|
2962
|
+
"arcane-os/browser-device"
|
|
2963
|
+
],
|
|
2964
|
+
"primaryImport": "arcane-os/browser-device",
|
|
2965
|
+
"group": "Browser device settings",
|
|
2966
|
+
"summary": "Returns a mobile or desktop browser identity hint for application-owned settings.",
|
|
2967
|
+
"availability": "Node and Browser; no model, storage, or GPU capability required",
|
|
2968
|
+
"protocol": "Synchronous optional navigator-like identity input and mobile or desktop string result",
|
|
2969
|
+
"normalization": "Positive mobile hints, Android or iOS identity, and iPadOS Mac-platform touch identity select mobile; missing or unrecognized identity selects desktop. Importing the dependency-free entrypoint loads no AI runtime, and classification performs no model, GPU, storage, network, or listener operation."
|
|
2970
|
+
},
|
|
2955
2971
|
{
|
|
2956
2972
|
"id": "browser-speech:BROWSER_SPEECH_ARTIFACT_GRAPH_PROTOCOL",
|
|
2957
2973
|
"name": "BROWSER_SPEECH_ARTIFACT_GRAPH_PROTOCOL",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The npm package exposes a Node.js ESM control plane, the portable
|
|
4
4
|
`arcane-os/event-manager`, `arcane-os/logging`, `arcane-os/mail`,
|
|
5
|
-
`arcane-os/preference-store`, `arcane-os/speech-playback`,
|
|
6
|
-
`arcane-os/speech-text` entrypoints, and the browser-only
|
|
5
|
+
`arcane-os/preference-store`, `arcane-os/speech-playback`,
|
|
6
|
+
`arcane-os/speech-text`, and `arcane-os/browser-device` entrypoints, and the browser-only
|
|
7
7
|
`arcane-os/ai/browser-wasm` and `arcane-os/ai/browser-speech` entrypoints.
|
|
8
8
|
Those package subpaths are distinct from application-facing projection modules
|
|
9
9
|
in the managed browser map, such as `arcane/AIProviderRuntime`,
|
|
@@ -38,6 +38,7 @@ for the installed-inventory-derived physical-runtime contract in SDK `0.5.18`.
|
|
|
38
38
|
| `arcane-os/preference-store` | Portable preference records and injected storage adapters. |
|
|
39
39
|
| `arcane-os/speech-playback` | Portable speech preparation, playback state, and injected media adapters. |
|
|
40
40
|
| `arcane-os/speech-text` | Speech-input formatting cleanup for complete text and streamed chunks. |
|
|
41
|
+
| `arcane-os/browser-device` | Synchronous mobile or desktop identity hints for application-owned settings. |
|
|
41
42
|
| `arcane-os/ai/browser-wasm` | Caller-selected browser-local Wllama inference, complete DBOPFS model storage, streaming, cancellation, and structural tool-call results. |
|
|
42
43
|
| `arcane-os/ai/browser-speech` | Caller-selected browser-local Whisper STT and Kokoro TTS provider mechanisms, ordinary upstream assets, materialized/native routing, Workers, and cancellation. |
|
|
43
44
|
| `arcane-os/mail` | Portable Mail runtime, durable outbox, complete transport responses, and provider-neutral acceptance contracts. |
|
|
@@ -124,6 +125,7 @@ browser map are cataloged separately in [Runtime modules](runtime-modules.md).
|
|
|
124
125
|
| `createBrowserWhisperProvider()` | function | `arcane-os/ai/browser-speech` | Browser speech providers | Browser with Workers, object URLs, caller-selected Whisper runtime/model artifacts, and an SDK DBOPFS speech store |
|
|
125
126
|
| `createCanonicalUstarHeader()` | function | `arcane-os` | Packaging and release bundles | Node |
|
|
126
127
|
| `createDbopfsModelStore()` | function | `arcane-os/ai/browser-wasm` | Browser-WASM local AI | Browser with a ready DBOPFS instance and OPFS |
|
|
128
|
+
| `getBrowserDeviceClass()` | function | `arcane-os/browser-device` | Browser device settings | Node and Browser; synchronous identity hint with no model, storage, or GPU operation |
|
|
127
129
|
| `createDbopfsSpeechArtifactStore()` | function | `arcane-os/ai/browser-speech` | Browser speech providers | Browser with ready DBOPFS, Web Locks, Fetch, File/Blob, and object URLs |
|
|
128
130
|
| `removeBrowserSpeechModelCache()` | function | `arcane-os/ai/browser-speech` | Browser speech providers | Browser CacheStorage; explicit removal of one selected upstream model |
|
|
129
131
|
| `createNativeBuildPlan()` | function | `arcane-os` | Targets, native plans, and providers | Node; selected browser/native target or provider as documented |
|
|
@@ -6007,6 +6009,43 @@ const source = createBrowserModelSource({
|
|
|
6007
6009
|
});
|
|
6008
6010
|
```
|
|
6009
6011
|
|
|
6012
|
+
## getBrowserDeviceClass()
|
|
6013
|
+
|
|
6014
|
+
### Overview
|
|
6015
|
+
|
|
6016
|
+
Returns `mobile` or `desktop` to select application-owned settings. Phones and
|
|
6017
|
+
tablets use `mobile` when browser client hints, platform, user-agent information,
|
|
6018
|
+
or the iPadOS Mac-platform/touch combination identifies them. Missing or
|
|
6019
|
+
unrecognized identity uses `desktop`.
|
|
6020
|
+
|
|
6021
|
+
### Signature and result
|
|
6022
|
+
|
|
6023
|
+
```text
|
|
6024
|
+
getBrowserDeviceClass(navigatorObject = globalThis.navigator)
|
|
6025
|
+
```
|
|
6026
|
+
|
|
6027
|
+
The optional navigator-like object supplies `userAgentData`, `userAgent`,
|
|
6028
|
+
`platform`, and `maxTouchPoints`. The synchronous string result reports a
|
|
6029
|
+
settings class, not hardware capability or readiness.
|
|
6030
|
+
|
|
6031
|
+
### Availability and normalization
|
|
6032
|
+
|
|
6033
|
+
Import from `arcane-os/browser-device` in Node or a browser. The dependency-free
|
|
6034
|
+
entrypoint reads only the supplied or global browser identity and does not load
|
|
6035
|
+
an AI runtime. No model, GPU, storage, network, or listener operation runs.
|
|
6036
|
+
Missing or unrecognized identity returns `desktop`; browser identity masking
|
|
6037
|
+
can affect classification. Existing provider defaults remain unchanged unless
|
|
6038
|
+
the caller selects and supplies its own profile.
|
|
6039
|
+
|
|
6040
|
+
### Example
|
|
6041
|
+
|
|
6042
|
+
```javascript
|
|
6043
|
+
import {getBrowserDeviceClass} from 'arcane-os/browser-device';
|
|
6044
|
+
|
|
6045
|
+
const deviceClass = getBrowserDeviceClass();
|
|
6046
|
+
console.log(deviceClass); // mobile or desktop
|
|
6047
|
+
```
|
|
6048
|
+
|
|
6010
6049
|
## createBrowserWasmLlmProvider()
|
|
6011
6050
|
|
|
6012
6051
|
### Overview
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arcane-os",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.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",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"./events": "./src/events.mjs",
|
|
15
15
|
"./event-manager": "./src/event-manager.mjs",
|
|
16
16
|
"./logging": "./browser-runtime/logging.mjs",
|
|
17
|
+
"./browser-device": "./browser-runtime/browser-device.mjs",
|
|
17
18
|
"./preference-store": "./runtime/arcane/modules/PreferenceStore.js",
|
|
18
19
|
"./speech-playback": "./runtime/arcane/modules/SpeechPlayback.js",
|
|
19
20
|
"./speech-text": "./browser-runtime/speech-text.mjs",
|
package/src/import-map.mjs
CHANGED
|
@@ -23,6 +23,7 @@ const STATIC_RUNTIME_PACKAGE_IMPORTS=new Map([
|
|
|
23
23
|
const SDK_BROWSER_SELF_IMPORTS=new Map([
|
|
24
24
|
['arcane-os/event-manager',SDK_BROWSER_ENTRY],
|
|
25
25
|
['arcane-os/logging','sdk/logging.mjs'],
|
|
26
|
+
['arcane-os/browser-device','sdk/browser-device.mjs'],
|
|
26
27
|
['arcane-os/speech-text','sdk/speech-text.mjs'],
|
|
27
28
|
['arcane-os/ai/browser-wasm',SDK_BROWSER_AI_ENTRY],
|
|
28
29
|
['arcane-os/ai/browser-speech',SDK_BROWSER_SPEECH_ENTRY]
|