arcane-os 0.25.0 → 0.27.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 +31 -0
- package/README.md +16 -2
- package/browser-runtime/pwa-install.mjs +3 -3
- package/docs/architecture.md +33 -12
- package/docs/reference/cli.md +39 -11
- package/docs/reference/protocols.md +94 -4
- package/docs/reference/pwa.md +21 -0
- package/docs/reference/sdk-api.md +53 -13
- package/package.json +17 -2
- package/runtime/arcane/components/dashboard-config.html +2 -1
- package/runtime/arcane/components/data-view.html +2 -1
- package/runtime/arcane/components/file-manager.html +7 -6
- package/runtime/arcane/modules/MailApi.mjs +19 -0
- package/src/app-descriptor.mjs +3 -1
- package/src/app-layout.mjs +32 -0
- package/src/application-tests.mjs +3 -1
- package/src/cli/main.mjs +9 -12
- package/src/dev-server.mjs +86 -24
- package/src/import-map.mjs +57 -14
- package/src/mail-api.mjs +2 -19
- package/src/packager/core.mjs +84 -29
- package/src/pwa-worker.mjs +18 -4
- package/src/pwa.mjs +2 -1
- package/src/scaffold.mjs +43 -7
- package/src/sdk-runtime-layout.mjs +112 -0
- package/src/templates/workspace-template.mjs +44 -36
- package/src/toolchain.mjs +75 -3
- package/src/workspace.mjs +54 -38
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.27.0
|
|
4
|
+
|
|
5
|
+
- Add optional standalone `appsRoot: "."` discovery and `new`/`init --apps-root .`.
|
|
6
|
+
Preserve declared app IDs, existing multi-app/integrated layouts, nested pages,
|
|
7
|
+
and the selected native/portable package interface.
|
|
8
|
+
- Serve and package direct installed SDK URLs under `/node_modules/<dependency>/`.
|
|
9
|
+
Managed bare and relative imports select the same module instances, including
|
|
10
|
+
npm aliases; dynamic component resources resolve from their own installed URL.
|
|
11
|
+
- Generate root static PWA files and prior `/apps/<id>/` navigation pages through
|
|
12
|
+
the existing `arcane import-map` operation. Preserve authored installation IDs,
|
|
13
|
+
source/package defaults, query strings, fragments, and complete app content.
|
|
14
|
+
Ordinary static hosts need no additional SDK server or copied runtime.
|
|
15
|
+
- Keep existing physical and virtual browser routes, Node mail APIs, listener
|
|
16
|
+
configuration, and server-consumer entrypoints unchanged.
|
|
17
|
+
|
|
18
|
+
## 0.26.0
|
|
19
|
+
|
|
20
|
+
- Add explicit installed-package browser runtime routes. Source development,
|
|
21
|
+
managed import maps, application test-map resolution, and PWA resource
|
|
22
|
+
selection can use the npm dependency directly without a generated workspace
|
|
23
|
+
runtime or lock. Keep existing browser URLs, aliases, and materialized layouts.
|
|
24
|
+
- Let a shared package route select its complete source directory with
|
|
25
|
+
`include: ["."]`. Portable app output includes the selected runtime,
|
|
26
|
+
dependencies, assets, and notices without requiring the SDK at deployment.
|
|
27
|
+
- Expose lowercase public module subpaths for shared AI preferences, provider
|
|
28
|
+
state, model definitions, conversation helpers, application data, document
|
|
29
|
+
libraries, and local AI readiness. Browser maps and Node package resolution
|
|
30
|
+
select the same canonical implementations; browser runtime requirements remain.
|
|
31
|
+
- Share the existing portable Mail aggregation with browser import maps while
|
|
32
|
+
preserving the `arcane-os/mail` API and Node mail CLI used by server consumers.
|
|
33
|
+
|
|
3
34
|
## 0.25.0
|
|
4
35
|
|
|
5
36
|
- Automatically skip configured mail subscription verification when the actual
|
package/README.md
CHANGED
|
@@ -19,10 +19,24 @@ 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.27.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
|
|
|
26
|
+
External browser apps can use the installed npm package directly, without a
|
|
27
|
+
generated workspace `arcane/` directory or `arcane.lock.json`. Select the
|
|
28
|
+
[four installed-package routes](docs/reference/protocols.md#installed-package-browser-routes)
|
|
29
|
+
in `arcane-packager.json`: development, managed import maps, and PWA resources
|
|
30
|
+
read the installed SDK at real `/node_modules/arcane-os/...` browser URLs when
|
|
31
|
+
each destination equals its source. An alias uses its actual installed folder.
|
|
32
|
+
Select `appsRoot: "."` for a standalone root app, or scaffold one with
|
|
33
|
+
`arcane new my-app --apps-root .`. After npm installation, `arcane import-map`
|
|
34
|
+
refreshes managed maps and the root app's static PWA/navigation files for ordinary
|
|
35
|
+
static hosting. Portable app packages still contain their selected runtime.
|
|
36
|
+
Existing `apps/<id>`, virtual `/arcane` routes, and materialized workspaces remain
|
|
37
|
+
supported. Node services continue to
|
|
38
|
+
use the installed CLI or public imports such as `arcane-os/mail`.
|
|
39
|
+
|
|
26
40
|
The [mail gateway](docs/reference/mail.md) serves HTTPS with HTTP/2 on port 4433
|
|
27
41
|
by default. Configure its host, port, origin list, certificate paths, and other
|
|
28
42
|
mail settings in `arcane.config.json.mail`; keep provider keys in the ignored
|
|
@@ -62,7 +76,7 @@ Create one browser application, install its pinned SDK, and start its source
|
|
|
62
76
|
server:
|
|
63
77
|
|
|
64
78
|
```bash
|
|
65
|
-
npx arcane-os@0.
|
|
79
|
+
npx arcane-os@0.26.0 new hello-speech --path ./hello-speech --target browser
|
|
66
80
|
cd hello-speech
|
|
67
81
|
npm install
|
|
68
82
|
```
|
|
@@ -273,8 +273,8 @@ export function mountPwaInstallPrompt({appName = ''} = {}) {
|
|
|
273
273
|
if (!globalThis.document) return null;
|
|
274
274
|
// Both modules may start independently; saved theme loading is not a barrier.
|
|
275
275
|
await Promise.all([
|
|
276
|
-
import(
|
|
277
|
-
import(
|
|
276
|
+
import('arcane/HTMLImport'),
|
|
277
|
+
import('arcane/ThemeBootstrap')
|
|
278
278
|
]);
|
|
279
279
|
if (owner.state.status === 'disposed') return null;
|
|
280
280
|
if (!document.body) {
|
|
@@ -295,7 +295,7 @@ export function mountPwaInstallPrompt({appName = ''} = {}) {
|
|
|
295
295
|
host.hidden = true;
|
|
296
296
|
host.dataset.appName = String(appName);
|
|
297
297
|
host.dataset.arcanePwaInstall = '';
|
|
298
|
-
host.setAttribute('href', new URL('../components/pwa-install.html', import.meta.
|
|
298
|
+
host.setAttribute('href', new URL('../components/pwa-install.html', import.meta.resolve('arcane/HTMLImport')).href);
|
|
299
299
|
return new Promise(function waitForInstallComponent(resolve, reject) {
|
|
300
300
|
const observer = new MutationObserver(function observeRemovedInstallComponent() {
|
|
301
301
|
if (!host.isConnected) cancelMount();
|
package/docs/architecture.md
CHANGED
|
@@ -84,13 +84,23 @@ runtime materialization, serving, and coordination with other writers. This
|
|
|
84
84
|
path requires no application descriptor or `apps/<id>/` layout and leaves the
|
|
85
85
|
app-scoped toolchain operation unchanged.
|
|
86
86
|
|
|
87
|
-
An external workspace
|
|
88
|
-
|
|
87
|
+
An external workspace can select `installed-v1` routes directly from its
|
|
88
|
+
`node_modules/arcane-os` installation, without a workspace `arcane/` tree or
|
|
89
|
+
`arcane.lock.json`. The SDK reads the installed package version and maps its
|
|
90
|
+
runtime, browser runtime, runtime dependency, and licenses to the configured
|
|
91
|
+
browser destinations. Direct destinations are the real npm paths. Existing
|
|
92
|
+
`physical-v1` workspaces, virtual installed routes, and the explicit materializer
|
|
93
|
+
remain supported. Root scaffolding selects direct npm routes; the existing
|
|
94
|
+
multi-app scaffold retains its physical layout. See [installed-package routes](reference/protocols.md#installed-package-browser-routes)
|
|
95
|
+
for the configuration and npm-alias form.
|
|
96
|
+
|
|
97
|
+
An Arcane OS checkout is an integrated SDK consumer, not the owner
|
|
89
98
|
of portable runtime source. For live shared development, the explicit
|
|
90
99
|
development-only SDK source mount maps the canonical SDK runtime and dependency
|
|
91
|
-
paths into that consumer. Without the mount,
|
|
92
|
-
projection
|
|
93
|
-
|
|
100
|
+
paths into that consumer. Without the mount, integrated workspaces retain their
|
|
101
|
+
physical projection; external workspaces select either layout above. The development server,
|
|
102
|
+
import-map generator, packager, and PWA inventory consume the same route
|
|
103
|
+
destinations, so app imports do not change. Integrated
|
|
94
104
|
initialization creates only app-owned files and never rewrites Arcane OS or SDK
|
|
95
105
|
root configuration.
|
|
96
106
|
|
|
@@ -235,13 +245,24 @@ exact schema-1 `arcane-package.json` for current consumers. Existing Arcane
|
|
|
235
245
|
apps synthesize that descriptor from their schema-1 package plus the current
|
|
236
246
|
native registry during migration.
|
|
237
247
|
|
|
238
|
-
An external app
|
|
239
|
-
|
|
240
|
-
`/node_modules/
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
248
|
+
An external app can use four `installed-v1` shared routes in
|
|
249
|
+
`arcane-packager.json`. With each destination equal to its source, browser URLs
|
|
250
|
+
point directly into `/node_modules/arcane-os/runtime/arcane`,
|
|
251
|
+
`/node_modules/arcane-os/browser-runtime`, and
|
|
252
|
+
`/node_modules/arcane-os/runtime/strong-type`; the three package license files
|
|
253
|
+
remain in `/node_modules/arcane-os`. An alias uses its actual installed folder.
|
|
254
|
+
Source serving and import-map generation read those
|
|
255
|
+
installed files without creating a workspace runtime copy. Distribution copies
|
|
256
|
+
the selected routes completely inside the portable artifact, preserving the
|
|
257
|
+
same URLs. Existing physical `arcane/` routes retain their behavior.
|
|
258
|
+
|
|
259
|
+
`appsRoot: "."` places one standalone application at the workspace root while
|
|
260
|
+
retaining its declared ID and app-relative entries. The existing `apps` option
|
|
261
|
+
keeps multi-app and integrated layouts. Root static hosting consumes the same
|
|
262
|
+
npm URLs, managed maps, generated PWA files, and compatibility navigation pages
|
|
263
|
+
as SDK development. TWiN's ordinary static host needs no additional server;
|
|
264
|
+
separate Node API hosts such as Stripe keep their existing server and SDK mail
|
|
265
|
+
imports. Application location does not change their listeners or configuration.
|
|
245
266
|
|
|
246
267
|
Release schema 1 and builder identity `arcane-app-packager-v1` remain unchanged
|
|
247
268
|
because current Arcane native consumers treat them as public contracts. Native
|
package/docs/reference/cli.md
CHANGED
|
@@ -109,7 +109,7 @@ Creates one repository-shaped external application workspace and the selected
|
|
|
109
109
|
app. It never creates more than one app or silently installs a global SDK.
|
|
110
110
|
|
|
111
111
|
```text
|
|
112
|
-
arcane new <id> [--path <directory>] [--display-name <name>] [--target <target>] [--git]
|
|
112
|
+
arcane new <id> [--path <directory>] [--apps-root apps|.] [--display-name <name>] [--target <target>] [--git]
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
### Options and result
|
|
@@ -120,6 +120,12 @@ directory as a repository. Native target scaffolds also retain `browser` and
|
|
|
120
120
|
include the required icon. The result reports the workspace, app, descriptor,
|
|
121
121
|
target, and created paths.
|
|
122
122
|
|
|
123
|
+
`--apps-root .` creates a standalone root application using its installed npm
|
|
124
|
+
SDK directly. The default `--apps-root apps` preserves `apps/<id>`. Root setup
|
|
125
|
+
does not install dependencies or copy a runtime: run `npm install`, then
|
|
126
|
+
`npm run import-map`. Until installation, its result reports the import map as
|
|
127
|
+
pending with reason `sdk-install-required`.
|
|
128
|
+
|
|
123
129
|
### Example
|
|
124
130
|
|
|
125
131
|
```bash
|
|
@@ -135,7 +141,7 @@ initialization writes only the selected `apps/<id>/` boundary and does not add
|
|
|
135
141
|
an SDK dependency to the Arcane OS repository.
|
|
136
142
|
|
|
137
143
|
```text
|
|
138
|
-
arcane init [id] [--workspace <directory>] [--app <id>] [--display-name <name>] [--target <target>]
|
|
144
|
+
arcane init [id] [--workspace <directory>] [--app <id>] [--apps-root apps|.] [--display-name <name>] [--target <target>]
|
|
139
145
|
```
|
|
140
146
|
|
|
141
147
|
### Errors and safety
|
|
@@ -145,6 +151,10 @@ incompatible workspace fail rather than being overwritten. Initialization is
|
|
|
145
151
|
idempotent only for files whose existing content satisfies the scaffold
|
|
146
152
|
contract.
|
|
147
153
|
|
|
154
|
+
`--apps-root .` selects root setup for a standalone workspace. Omission retains
|
|
155
|
+
the configured layout, or `apps` for a new configuration. `init` never moves an
|
|
156
|
+
existing application or converts the integrated Arcane OS layout.
|
|
157
|
+
|
|
148
158
|
### Example
|
|
149
159
|
|
|
150
160
|
```bash
|
|
@@ -184,7 +194,7 @@ npm exec -- arcane doctor --workspace . --arcane-root "../Arcane OS"
|
|
|
184
194
|
|
|
185
195
|
### Overview
|
|
186
196
|
|
|
187
|
-
Refreshes one selected application's
|
|
197
|
+
Refreshes one selected application's browser runtime map, generates
|
|
188
198
|
its standard browser import map, discovers every directly navigable
|
|
189
199
|
`.html`/`.htm` document admitted by the selected descriptor's existing
|
|
190
200
|
include/exclude rules, and commits the map artifact plus those managed documents
|
|
@@ -211,10 +221,10 @@ The generated artifact is
|
|
|
211
221
|
`apps/<id>/modules/arcane.importmap.json`. Its exact JSON is also installed in
|
|
212
222
|
the configured entry and every other admitted browser document as `<script
|
|
213
223
|
type="importmap" data-arcane-import-map>` before module loading. The complete
|
|
214
|
-
|
|
215
|
-
|
|
224
|
+
runtime map derives its entries from the selected runtime and browser-runtime
|
|
225
|
+
inventories. It intentionally has no package-root mapping;
|
|
216
226
|
portable runtime subpaths such as `arcane-os/preference-store` and
|
|
217
|
-
`arcane-os/speech-playback` instead map directly to their canonical
|
|
227
|
+
`arcane-os/speech-playback` instead map directly to their canonical runtime
|
|
218
228
|
modules. The result reports the complete map written to the selected
|
|
219
229
|
application; no fixed entry count is a release contract.
|
|
220
230
|
|
|
@@ -224,6 +234,15 @@ list. External and modern integrated routes require `components`, `css`,
|
|
|
224
234
|
may omit only an optional trailing `security` include. The external license
|
|
225
235
|
route remains separate and second.
|
|
226
236
|
|
|
237
|
+
External applications can instead select the four ordered
|
|
238
|
+
[`installed-v1` routes](protocols.md#installed-package-browser-routes) in
|
|
239
|
+
`arcane-packager.json`. This reads directly from the installed SDK package and
|
|
240
|
+
requires neither a workspace `arcane/` directory nor `arcane.lock.json`.
|
|
241
|
+
The generated browser destinations remain `arcane/`, `arcane/sdk/`, and
|
|
242
|
+
`arcane/dependencies/strong-type/`; an npm alias changes package source paths,
|
|
243
|
+
not those browser URLs. The SDK version comes from that installed package.
|
|
244
|
+
Existing physical workspaces and scaffold output remain supported unchanged.
|
|
245
|
+
|
|
227
246
|
### Result and safety
|
|
228
247
|
|
|
229
248
|
Success returns the normal selected-workspace wrapper:
|
|
@@ -308,11 +327,15 @@ Starts one development server for one selected app and maps the exact
|
|
|
308
327
|
workspace/runtime routes. It defaults to HTTPS on localhost; `--public` enables access
|
|
309
328
|
from other devices on the network, using HTTPS by default.
|
|
310
329
|
|
|
311
|
-
For an external workspace, the server exposes the selected
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
330
|
+
For an external workspace, the server exposes the selected SDK routes alongside
|
|
331
|
+
the application. Direct `installed-v1` routes serve the real
|
|
332
|
+
`/node_modules/<dependency>/...` URLs without creating a workspace runtime
|
|
333
|
+
directory. Earlier virtual `/arcane` installed routes remain supported.
|
|
334
|
+
Existing `physical-v1` workspaces serve
|
|
335
|
+
their projected `arcane/` root. Integrated workspaces retain their configured
|
|
336
|
+
physical routes.
|
|
337
|
+
An explicit live-source SDK mapping follows the selected browser destinations
|
|
338
|
+
while reading canonical SDK source; it never replaces installed files.
|
|
316
339
|
|
|
317
340
|
```text
|
|
318
341
|
arcane dev [--app <id>] [--public] [--http | --https] [--cert <file> --key <file>] [--host <address>] [--port 8000] [--http-port 0]
|
|
@@ -504,6 +527,11 @@ shared route destinations. When selected shared content supplies no root
|
|
|
504
527
|
Source document bases and resource URLs therefore retain their development
|
|
505
528
|
layout. Packaging does not run tests or checks automatically.
|
|
506
529
|
|
|
530
|
+
For `installed-v1`, the same four configured source routes supply the complete
|
|
531
|
+
selected SDK content directly from `node_modules`. Only the portable output
|
|
532
|
+
receives copies; no workspace `arcane/` projection is required. Its runtime URLs,
|
|
533
|
+
managed import-map targets, and PWA inventory destinations match source serving.
|
|
534
|
+
|
|
507
535
|
```text
|
|
508
536
|
arcane package [--app <id>] [--dry-run]
|
|
509
537
|
```
|
|
@@ -61,13 +61,19 @@ explicit identity fails, and the selected page then must pass exact path-relativ
|
|
|
61
61
|
base validation.
|
|
62
62
|
Included HTML with neither signal is a component fragment and remains a
|
|
63
63
|
complete package file.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
Public lowercase runtime subpaths resolve directly to canonical runtime-module
|
|
65
|
+
namespaces from both Node package exports and managed browser keys. These
|
|
66
|
+
include `arcane-os/preference-store`, `arcane-os/speech-playback`,
|
|
67
|
+
`arcane-os/ai-preference-tuple`, `arcane-os/ai-preference-runtime`,
|
|
68
|
+
`arcane-os/ai-provider-runtime`, `arcane-os/ai-runtime-state`,
|
|
69
|
+
`arcane-os/model-definition`, `arcane-os/conversation-timebox`,
|
|
70
|
+
`arcane-os/conversation-action-items`, `arcane-os/conversation-closing-report`,
|
|
71
|
+
and `arcane-os/chat-records`.
|
|
67
72
|
`arcane/PreferenceStore` and `arcane/SpeechPlayback` remain their established
|
|
68
73
|
browser import-map names. The additional portable `arcane-os/speech-text`
|
|
69
74
|
subpath owns shared speech-input cleanup and has the same
|
|
70
|
-
managed browser key.
|
|
75
|
+
managed browser key. `arcane-os/mail` remains the existing Mail aggregation.
|
|
76
|
+
There is
|
|
71
77
|
no exported `importMapApplication()` function, `generateImportMap()` function, or
|
|
72
78
|
`arcane-os/import-map` package subpath.
|
|
73
79
|
Explicit host document lists use the separate root-exported
|
|
@@ -90,6 +96,90 @@ materializes the complete required SDK runtime,
|
|
|
90
96
|
browser-runtime, and managed-import-map closure inside that app's own artifact.
|
|
91
97
|
No application polls for SDK changes.
|
|
92
98
|
|
|
99
|
+
## Installed-package browser routes
|
|
100
|
+
|
|
101
|
+
An external application can serve and package its installed SDK directly,
|
|
102
|
+
without creating a top-level `arcane/` directory or requiring
|
|
103
|
+
`arcane.lock.json`. Select `installed-v1` through these four ordered routes in
|
|
104
|
+
the existing schema-1 `arcane-packager.json`; no additional layout field is
|
|
105
|
+
needed:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"schemaVersion": 1,
|
|
110
|
+
"appsRoot": ".",
|
|
111
|
+
"distRoot": "dist",
|
|
112
|
+
"sharedPayloads": {
|
|
113
|
+
"browser-runtime": [
|
|
114
|
+
{
|
|
115
|
+
"source": "node_modules/arcane-os/runtime/arcane",
|
|
116
|
+
"destination": "node_modules/arcane-os/runtime/arcane",
|
|
117
|
+
"include": ["components", "css", "entities", "img", "modules"],
|
|
118
|
+
"exclude": []
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"source": "node_modules/arcane-os/browser-runtime",
|
|
122
|
+
"destination": "node_modules/arcane-os/browser-runtime",
|
|
123
|
+
"include": ["."],
|
|
124
|
+
"exclude": []
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"source": "node_modules/arcane-os/runtime/strong-type",
|
|
128
|
+
"destination": "node_modules/arcane-os/runtime/strong-type",
|
|
129
|
+
"include": ["."],
|
|
130
|
+
"exclude": []
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"source": "node_modules/arcane-os",
|
|
134
|
+
"destination": "node_modules/arcane-os",
|
|
135
|
+
"include": ["LICENSE", "COMMERCIAL-LICENSE.md", "NOTICE"],
|
|
136
|
+
"exclude": []
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The first include list also accepts a final `security` entry. An npm alias such
|
|
144
|
+
as `arcane-sdk` substitutes `node_modules/arcane-sdk` for the package prefix in
|
|
145
|
+
all four source and destination paths. Package selection and SDK
|
|
146
|
+
version come from the installed dependency, not a generated runtime lock.
|
|
147
|
+
|
|
148
|
+
`arcane import-map`, `arcane dev`, packaging, and generated PWA inventories use
|
|
149
|
+
the same actual npm destinations. For example, `arcane/HTMLImport` resolves to
|
|
150
|
+
`./node_modules/arcane-os/runtime/arcane/modules/HTMLImport.js`, and
|
|
151
|
+
`arcane-os/event-manager` resolves to
|
|
152
|
+
`./node_modules/arcane-os/browser-runtime/event-manager.mjs`. A normal static
|
|
153
|
+
server can serve those files directly. Source serving and map generation read installed
|
|
154
|
+
files without materializing them into the workspace. A selected portable
|
|
155
|
+
package copies its complete selected resources inside the artifact, preserving
|
|
156
|
+
the same browser URLs and saved managed import maps.
|
|
157
|
+
|
|
158
|
+
Existing `physical-v1` configurations whose first source is `arcane` remain
|
|
159
|
+
supported. The explicit materializer below still refreshes those projections,
|
|
160
|
+
and the default multi-app scaffold retains its existing physical layout. The
|
|
161
|
+
earlier installed routes with virtual `/arcane` destinations also remain
|
|
162
|
+
supported. Selecting `installed-v1`
|
|
163
|
+
does not delete any preexisting workspace files. The separate host-document
|
|
164
|
+
`generateDocumentImportMaps()` API continues to accept an already materialized
|
|
165
|
+
runtime; its input contract is unchanged.
|
|
166
|
+
|
|
167
|
+
### Optional standalone root application
|
|
168
|
+
|
|
169
|
+
`appsRoot: "."` selects one application whose `arcane-app.json`,
|
|
170
|
+
`arcane-package.json`, entry, and app-owned files occupy the workspace root.
|
|
171
|
+
The declared application ID remains unchanged. `appsRoot: "apps"` continues
|
|
172
|
+
to discover `apps/<id>` and supports the existing integrated and multi-app
|
|
173
|
+
layouts. Entries and include/exclude paths remain relative to the application.
|
|
174
|
+
|
|
175
|
+
Root HTML uses `<base href="./">`; nested navigable documents use their actual
|
|
176
|
+
depth back to the workspace. Managed bare imports remain the public interface;
|
|
177
|
+
their targets follow the selected npm routes. `arcane import-map` also writes
|
|
178
|
+
root-app navigation pages for the previous `/apps/<id>/` links, preserving
|
|
179
|
+
query strings and fragments. It preserves authored files at those destinations.
|
|
180
|
+
For a direct-installed root PWA it generates the static PWA records at the root,
|
|
181
|
+
so normal static hosting needs no SDK request handler or runtime copy.
|
|
182
|
+
|
|
93
183
|
## Installed SDK runtime materialization
|
|
94
184
|
|
|
95
185
|
`materializeInstalledSdkRuntime()` is the Node entrypoint for refreshing one
|
package/docs/reference/pwa.md
CHANGED
|
@@ -47,6 +47,18 @@ explicit `id` and `scope` values, resolve against `./apps/<id>/`; an icon such
|
|
|
47
47
|
as `img/library.png` therefore remains beneath the app directory. Absolute URL
|
|
48
48
|
fields retain their authored destination.
|
|
49
49
|
|
|
50
|
+
For `appsRoot: "."`, application URLs stay at the deployment root. Direct npm
|
|
51
|
+
routes keep runtime URLs under `/node_modules/<dependency>/...`. The public
|
|
52
|
+
`arcane import-map` operation generates static PWA files beside the root entry
|
|
53
|
+
and adds their links to the selected navigable documents. This works with an
|
|
54
|
+
ordinary static host; it does not copy the installed runtime into `arcane/`.
|
|
55
|
+
The source root defaults its installation ID to `/apps/<id>/` to preserve the
|
|
56
|
+
previous source identity while its start URL and scope move to the root. An
|
|
57
|
+
authored `manifest.id` remains authoritative. Packaged default identity remains
|
|
58
|
+
`./`. Existing `/apps/<id>/` navigation aliases retain query strings and
|
|
59
|
+
fragments and lead to the selected root document. No stored application data is
|
|
60
|
+
rewritten by changing the layout.
|
|
61
|
+
|
|
50
62
|
`offline.include` and `offline.exclude` select literal paths or directory
|
|
51
63
|
prefixes from the selected emitted inventory. An omitted or empty include list
|
|
52
64
|
selects that inventory; exclusions subtract from it. App files use app-relative
|
|
@@ -108,6 +120,15 @@ app's `arcane-app.json`. Startup refreshes that app's generated
|
|
|
108
120
|
maps and starting the server. No packaging or `dist` output is required.
|
|
109
121
|
Package-only applications retain their existing descriptor workflow.
|
|
110
122
|
|
|
123
|
+
With the external [`installed-v1` routes](protocols.md#installed-package-browser-routes),
|
|
124
|
+
the server inventories the selected SDK directly in `node_modules`. Runtime
|
|
125
|
+
resources retain their public `arcane/`, `arcane/sdk/`, and
|
|
126
|
+
`arcane/dependencies/strong-type/` URLs, so offline selections use those logical
|
|
127
|
+
paths rather than package filesystem paths. No workspace `arcane/` tree or
|
|
128
|
+
`arcane.lock.json` is needed. Packaging uses the same route selection and copies
|
|
129
|
+
the selected resources into the portable output; existing physical projections
|
|
130
|
+
remain supported.
|
|
131
|
+
|
|
111
132
|
Add a file or directory to `package.include` to make it part of the app's
|
|
112
133
|
resources. A new file inside an already included directory needs no separate
|
|
113
134
|
entry. `package.include` is an application resource selection, not a file list
|
|
@@ -5,11 +5,12 @@ The npm package exposes a Node.js ESM control plane, the portable
|
|
|
5
5
|
`arcane-os/preference-store`, `arcane-os/speech-playback`,
|
|
6
6
|
`arcane-os/speech-text`, `arcane-os/ai/tool-text-stream`, and `arcane-os/browser-device` entrypoints, and the browser-only
|
|
7
7
|
`arcane-os/pwa`, `arcane-os/ai/browser-wasm` and `arcane-os/ai/browser-speech` entrypoints.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
`arcane/
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
Lowercase runtime subpaths also expose existing module namespaces through both
|
|
9
|
+
Node package exports and managed browser imports, as listed below. Established
|
|
10
|
+
browser names such as `arcane/AIProviderRuntime`, `arcane/AIRuntimeState`, and
|
|
11
|
+
`arcane/ThemeBootstrap` remain managed-map names rather than Node package
|
|
12
|
+
entrypoints. Applications call `globalThis.Arcane` for capability-gated host
|
|
13
|
+
behavior.
|
|
13
14
|
|
|
14
15
|
This page is the canonical inventory for every JavaScript name reachable through `package.json#exports`. The same binding can appear at the root and a focused subpath; those entrypoints are listed together. The root workspace `discoverApps` and the low-level packager `discoverApps` are intentionally separate records because they are different functions.
|
|
15
16
|
|
|
@@ -19,7 +20,8 @@ This table is the Node `package.json#exports` map: it defines package
|
|
|
19
20
|
entrypoints for SDK/tooling code. It is distinct from the generated browser
|
|
20
21
|
import map that resolves application-facing `arcane/*` modules and the focused
|
|
21
22
|
EventManager entry. See [browser runtime delivery](protocols.md#browser-runtime-delivery)
|
|
22
|
-
for the
|
|
23
|
+
for the shared browser destinations used by installed-package and physical
|
|
24
|
+
runtime layouts.
|
|
23
25
|
|
|
24
26
|
| Specifier | Purpose |
|
|
25
27
|
| --- | --- |
|
|
@@ -36,6 +38,21 @@ for the installed-inventory-derived physical-runtime contract in SDK `0.5.18`.
|
|
|
36
38
|
| `arcane-os/event-manager` | Central synchronous events, complete time-travel history, playback, and optional DOM instrumentation. |
|
|
37
39
|
| `arcane-os/logging` | Shared console diagnostics controlled by the existing `user.developer` preference. |
|
|
38
40
|
| `arcane-os/preference-store` | Portable preference records and injected storage adapters. |
|
|
41
|
+
| `arcane-os/ai` | Existing `AI.js` provider-neutral inference and speech namespace. |
|
|
42
|
+
| `arcane-os/ai-preference-tuple` | Existing `AIPreferenceTuple.js` module namespace. |
|
|
43
|
+
| `arcane-os/ai-preference-runtime` | Existing `AIPreferenceRuntime.js` module namespace. |
|
|
44
|
+
| `arcane-os/ai-provider-runtime` | Existing `AIProviderRuntime.js` provider selection and lifecycle namespace. |
|
|
45
|
+
| `arcane-os/ai-runtime-state` | Existing `AIRuntimeState.js` state and event namespace. |
|
|
46
|
+
| `arcane-os/model-definition` | Existing `ModelDefinition.js` module namespace. |
|
|
47
|
+
| `arcane-os/conversation-timebox` | Existing `ConversationTimebox.js` module namespace. |
|
|
48
|
+
| `arcane-os/conversation-action-items` | Existing `ConversationActionItems.js` module namespace. |
|
|
49
|
+
| `arcane-os/conversation-closing-report` | Existing `ConversationClosingReport.js` module namespace. |
|
|
50
|
+
| `arcane-os/chat-records` | Existing `ChatRecords.js` module namespace. |
|
|
51
|
+
| `arcane-os/app-data-scope` | Existing `AppDataScope.js` application storage scope namespace. |
|
|
52
|
+
| `arcane-os/core-local-model-catalog` | Existing `CoreLocalModelCatalog.js` local model catalog namespace. |
|
|
53
|
+
| `arcane-os/dbopfs-document-library` | Existing `DBOPFSDocumentLibrary.js` document storage namespace. |
|
|
54
|
+
| `arcane-os/local-ai-readiness` | Existing `LocalAIReadiness.js` local AI readiness namespace. |
|
|
55
|
+
| `arcane-os/ollama-model-identifier` | Existing `OllamaModelIdentifier.js` model identifier namespace. |
|
|
39
56
|
| `arcane-os/speech-playback` | Portable speech preparation, playback state, and injected media adapters. |
|
|
40
57
|
| `arcane-os/speech-text` | Speech-input formatting cleanup for complete text and streamed chunks. |
|
|
41
58
|
| `arcane-os/browser-device` | Synchronous mobile or desktop identity hints for application-owned settings. |
|
|
@@ -45,6 +62,18 @@ for the installed-inventory-derived physical-runtime contract in SDK `0.5.18`.
|
|
|
45
62
|
| `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. |
|
|
46
63
|
| `arcane-os/mail` | Portable Mail runtime, durable outbox, complete transport responses, and provider-neutral acceptance contracts. |
|
|
47
64
|
|
|
65
|
+
These lowercase runtime-module entrypoints expose their existing exports; they
|
|
66
|
+
do not duplicate the module implementations or change their platform and
|
|
67
|
+
lifecycle requirements. Node resolves them inside the installed package, while
|
|
68
|
+
the managed browser map resolves the same names to the selected runtime URLs.
|
|
69
|
+
Node package resolution does not make browser-only operations available in
|
|
70
|
+
Node: a module still needs its documented browser globals, storage, media,
|
|
71
|
+
Worker, or host capabilities when its initialization or operation uses them.
|
|
72
|
+
Use `arcane-os/mail` for the existing Mail aggregation rather than importing a
|
|
73
|
+
private runtime file. Its package facade and managed browser entry both expose
|
|
74
|
+
the canonical `MailApi.mjs` aggregation and the same Mail, outbox, and transport
|
|
75
|
+
bindings.
|
|
76
|
+
|
|
48
77
|
Eight JSON schemas and `package.json` are data-only export subpaths. In Node ESM, import JSON with `with {type: 'json'}`, or resolve and read it explicitly.
|
|
49
78
|
|
|
50
79
|
### Managed AI narration
|
|
@@ -1496,6 +1525,11 @@ After full runtime replacement, it writes or replaces semantic
|
|
|
1496
1525
|
`arcane.lock.json` from the actual installed dependency name, package name,
|
|
1497
1526
|
package version, alias source, and projected roots.
|
|
1498
1527
|
|
|
1528
|
+
This operation remains available for physical workspace projections. External
|
|
1529
|
+
applications using [installed-package routes](protocols.md#installed-package-browser-routes)
|
|
1530
|
+
read directly from their installed dependency and do not need to call it or
|
|
1531
|
+
create `arcane.lock.json` before serving, refreshing app import maps, or packaging.
|
|
1532
|
+
|
|
1499
1533
|
### Signature and result
|
|
1500
1534
|
|
|
1501
1535
|
```text
|
|
@@ -3643,6 +3677,10 @@ certPath, keyPath, tls, signal, onEvent}` and serves one validated
|
|
|
3643
3677
|
workspace application plus its complete SDK or integrated runtime. Packaged mode uses
|
|
3644
3678
|
`{mode:'packaged', releaseRoot, workspaceRoot, host, port, httpPort, certPath, keyPath, tls,
|
|
3645
3679
|
signal, onEvent}` and serves the complete selected release files.
|
|
3680
|
+
External source mode accepts both the installed-package route layout and the
|
|
3681
|
+
existing physical runtime layout. Installed-package mode serves the configured
|
|
3682
|
+
SDK resources directly from `node_modules` at their logical browser URLs;
|
|
3683
|
+
it does not create a workspace `arcane/` directory or require `arcane.lock.json`.
|
|
3646
3684
|
`host` defaults to `127.0.0.1` and accepts an
|
|
3647
3685
|
explicit network address or hostname. Use `0.0.0.0` for all IPv4 interfaces or
|
|
3648
3686
|
`::` for the platform's IPv6 wildcard listeners. `port` selects the HTTPS
|
|
@@ -3866,8 +3904,10 @@ async validateWorkspace({
|
|
|
3866
3904
|
|
|
3867
3905
|
Import it from `arcane-os`. It resolves to a validation result with
|
|
3868
3906
|
`valid`, `workspaceMode`, `workspaceRoot`, `appId`, `appRoot`, the selected
|
|
3869
|
-
configuration/application, lock data
|
|
3870
|
-
|
|
3907
|
+
configuration/application, lock data where the layout uses it, and completed
|
|
3908
|
+
checks. External `installed-v1` selection reads package metadata directly and
|
|
3909
|
+
does not require a workspace `arcane.lock.json` or runtime projection. For an
|
|
3910
|
+
external workspace the result additionally includes the installed package:
|
|
3871
3911
|
|
|
3872
3912
|
```javascript
|
|
3873
3913
|
{
|
|
@@ -3876,17 +3916,17 @@ workspace it additionally returns the exact installed package authority:
|
|
|
3876
3916
|
packageSource,
|
|
3877
3917
|
canonicalPackageRoot,
|
|
3878
3918
|
packageName: 'arcane-os',
|
|
3879
|
-
packageVersion
|
|
3919
|
+
packageVersion,
|
|
3880
3920
|
runtimeRoot,
|
|
3881
3921
|
browserRuntimeRoot
|
|
3882
3922
|
}
|
|
3883
3923
|
}
|
|
3884
3924
|
```
|
|
3885
3925
|
|
|
3886
|
-
The dependency can be named `arcane-os` or
|
|
3887
|
-
`
|
|
3888
|
-
|
|
3889
|
-
|
|
3926
|
+
The dependency can be named `arcane-os` or use an npm alias for the selected
|
|
3927
|
+
`arcane-os` version. The configured package source must match that declaration;
|
|
3928
|
+
`packageVersion` reports the installed package's version. Duplicate
|
|
3929
|
+
canonical/alias declarations reject.
|
|
3890
3930
|
`allowMissingManagedImportMap` is an internal packaging/development seam. An
|
|
3891
3931
|
ordinary caller should leave it `false`.
|
|
3892
3932
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arcane-os",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.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",
|
|
@@ -17,6 +17,21 @@
|
|
|
17
17
|
"./browser-device": "./browser-runtime/browser-device.mjs",
|
|
18
18
|
"./pwa": "./browser-runtime/pwa.mjs",
|
|
19
19
|
"./preference-store": "./runtime/arcane/modules/PreferenceStore.js",
|
|
20
|
+
"./ai": "./runtime/arcane/modules/AI.js",
|
|
21
|
+
"./ai-preference-tuple": "./runtime/arcane/modules/AIPreferenceTuple.js",
|
|
22
|
+
"./ai-preference-runtime": "./runtime/arcane/modules/AIPreferenceRuntime.js",
|
|
23
|
+
"./ai-provider-runtime": "./runtime/arcane/modules/AIProviderRuntime.js",
|
|
24
|
+
"./ai-runtime-state": "./runtime/arcane/modules/AIRuntimeState.js",
|
|
25
|
+
"./model-definition": "./runtime/arcane/modules/ModelDefinition.js",
|
|
26
|
+
"./conversation-timebox": "./runtime/arcane/modules/ConversationTimebox.js",
|
|
27
|
+
"./conversation-action-items": "./runtime/arcane/modules/ConversationActionItems.js",
|
|
28
|
+
"./conversation-closing-report": "./runtime/arcane/modules/ConversationClosingReport.js",
|
|
29
|
+
"./chat-records": "./runtime/arcane/modules/ChatRecords.js",
|
|
30
|
+
"./app-data-scope": "./runtime/arcane/modules/AppDataScope.js",
|
|
31
|
+
"./core-local-model-catalog": "./runtime/arcane/modules/CoreLocalModelCatalog.js",
|
|
32
|
+
"./dbopfs-document-library": "./runtime/arcane/modules/DBOPFSDocumentLibrary.js",
|
|
33
|
+
"./local-ai-readiness": "./runtime/arcane/modules/LocalAIReadiness.js",
|
|
34
|
+
"./ollama-model-identifier": "./runtime/arcane/modules/OllamaModelIdentifier.js",
|
|
20
35
|
"./speech-playback": "./runtime/arcane/modules/SpeechPlayback.js",
|
|
21
36
|
"./speech-text": "./browser-runtime/speech-text.mjs",
|
|
22
37
|
"./ai/browser-wasm": "./browser-runtime/ai/browser-wasm.mjs",
|
|
@@ -69,7 +84,7 @@
|
|
|
69
84
|
"test:release": "node ./bin/arcane-test.mjs test/npm-release.test.mjs",
|
|
70
85
|
"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/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/targets.test.mjs test/workspace-operation-lock.test.mjs",
|
|
71
86
|
"test:functional": "node ./bin/arcane-test.mjs test/browser-speech-providers.test.mjs test/browser-wasm-gpu-notice.test.mjs test/browser-wasm-download-resume.test.mjs test/cli.test.mjs test/dbopfs-document-library.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/import-map.test.mjs test/mail-cli.test.mjs test/mail-runtime.test.mjs test/mail-server.test.mjs test/modal.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/runtime-api-behavior.test.mjs test/runtime.test.mjs test/scaffold.test.mjs test/speech-playback.test.mjs test/site.test.mjs test/update-check.test.mjs",
|
|
72
|
-
"test:integration": "node ./bin/arcane-test.mjs test/integrated-shared.test.mjs test/integrated-workspace.test.mjs test/mail-browser.test.mjs test/native-plan.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",
|
|
87
|
+
"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-plan.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",
|
|
73
88
|
"test:regression": "node ./bin/arcane-test.mjs test/channel-workflows.test.mjs test/html-import-registration.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",
|
|
74
89
|
"check": "node tools/check-source.mjs && npm test",
|
|
75
90
|
"check:release": "node tools/check-source.mjs --package-only && npm run test:release",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
const {arcaneLogging}=await import('arcane-os/logging');
|
|
17
17
|
|
|
18
18
|
const host=this;
|
|
19
|
+
const componentHref=new URL(host.getAttribute('href'),document.baseURI);
|
|
19
20
|
const {default:waitForComponent}=await import('../modules/WaitForComponent.js');
|
|
20
21
|
const {
|
|
21
22
|
effectiveDashboardVisibility,
|
|
@@ -232,7 +233,7 @@
|
|
|
232
233
|
const items=document.createElement('section');
|
|
233
234
|
|
|
234
235
|
styles.rel='stylesheet';
|
|
235
|
-
styles.href=new URL('
|
|
236
|
+
styles.href=new URL('../css/dashboard-config.css?v=2',componentHref).href;
|
|
236
237
|
heading.dataset.dashboardConfigHeading='';
|
|
237
238
|
message.dataset.dashboardConfigDescription='';
|
|
238
239
|
empty.className='dashboard-config-empty';
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
const {arcaneLogging}=await import('arcane-os/logging');
|
|
21
21
|
|
|
22
22
|
const host=this;
|
|
23
|
+
const componentHref=new URL(host.getAttribute('href'),document.baseURI);
|
|
23
24
|
const openButton=host.shadowRoot.querySelector('#openData');
|
|
24
25
|
const dataModal=host.shadowRoot.querySelector('#dataModal');
|
|
25
26
|
const {default:waitForComponent}=await import('../modules/WaitForComponent.js');
|
|
@@ -89,7 +90,7 @@
|
|
|
89
90
|
fileManager.dataset.layout=host.dataset.layout||'files';
|
|
90
91
|
fileManager.setAttribute(
|
|
91
92
|
'href',
|
|
92
|
-
'./
|
|
93
|
+
new URL('./file-manager.html?v=18',componentHref).href
|
|
93
94
|
);
|
|
94
95
|
|
|
95
96
|
content.append(heading,fileManager);
|