arcane-os 0.29.1 → 0.31.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 +28 -0
- package/README.md +14 -11
- package/browser-runtime/ai/browser-device-settings.mjs +2 -2
- package/browser-runtime/ai/twin-cloud.mjs +230 -0
- package/docs/reference/ai/twin-cloud.md +120 -3
- package/docs/reference/availability-and-normalization.md +9 -0
- package/docs/reference/cli.md +25 -25
- package/docs/reference/inventory/package-api.json +99 -1
- package/docs/reference/mail.md +5 -5
- package/docs/reference/protocols.md +17 -26
- package/docs/reference/pwa.md +25 -45
- package/docs/reference/sdk-api.md +277 -11
- package/docs/reviews/mail-server-purpose-review.md +1 -1
- package/package.json +3 -2
- package/runtime/arcane/modules/AI.js +14 -154
- package/src/app-layout.mjs +0 -22
- package/src/cli/main.mjs +1 -1
- package/src/dev-server.mjs +4 -40
- package/src/import-map.mjs +1 -0
- package/src/mail-credentials.mjs +3 -3
- package/src/packager/core.mjs +5 -48
- package/src/pwa.mjs +0 -43
- package/src/scaffold.mjs +3 -2
- package/src/templates/workspace-template.mjs +3 -2
- package/src/toolchain.mjs +4 -39
|
@@ -60,12 +60,12 @@ export function createWorkspaceLockDocument({
|
|
|
60
60
|
|
|
61
61
|
export function workspaceTemplate({
|
|
62
62
|
appId,
|
|
63
|
-
|
|
63
|
+
appOnly=false,
|
|
64
|
+
appsRoot=appOnly?'apps':'.',
|
|
64
65
|
displayName,
|
|
65
66
|
sdkDependencyName=SDK_NAME,
|
|
66
67
|
sdkDependencySpecifier=SDK_VERSION,
|
|
67
68
|
sdkPackageSource=`node_modules/${sdkDependencyName}`,
|
|
68
|
-
appOnly=false,
|
|
69
69
|
namedImports=true,
|
|
70
70
|
minimumCoreVersion='0.8.12',
|
|
71
71
|
target='browser',
|
|
@@ -199,6 +199,7 @@ import map in every directly navigable descriptor-admitted \`.html\`/\`.htm\`
|
|
|
199
199
|
document. HTML component fragments remain package files but do not receive a
|
|
200
200
|
document-level base or managed import map.
|
|
201
201
|
Development, package, and build refresh that shared inventory when the selected operation needs it.
|
|
202
|
+
Commit generated import maps and enabled offline app files. Hosting workflows consume those committed files rather than generating them.
|
|
202
203
|
Named \`${directRuntime?'arcane-os/modules/* and arcane-os/entities/*':'arcane/*'}\` imports resolve through the managed map to the selected SDK files. Packaging copies the complete selected application, runtime, and specifier
|
|
203
204
|
map to \`dist/${appId}\` without running application tests. Run \`verify\` only when
|
|
204
205
|
the user explicitly selects verification or a release artifact that requires it;
|
package/src/toolchain.mjs
CHANGED
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
import {loadArcaneIntegratedProvider} from './integrated-provider-loader.mjs';
|
|
13
13
|
import {startDevServer} from './dev-server.mjs';
|
|
14
14
|
import {applyPwaEntryReferences,generateImportMap,readApplicationTestImportMapContext} from './import-map.mjs';
|
|
15
|
-
import {rootAppLegacyPath,rootAppNavigation} from './app-layout.mjs';
|
|
16
15
|
import {createPwaArtifacts} from './pwa.mjs';
|
|
17
16
|
import {readInstalledSdkLayout} from './sdk-runtime-layout.mjs';
|
|
18
17
|
import {withWorkspaceOperationLock} from './workspace-operation-lock.mjs';
|
|
@@ -327,48 +326,15 @@ async function refreshPreparedImportMap(prepared,{signal,onEvent,workspaceOperat
|
|
|
327
326
|
async function refreshRootApplicationFiles(prepared,inspected,importMap,{signal,onEvent}){
|
|
328
327
|
const {workspaceRoot,appId}=prepared;
|
|
329
328
|
const manifest=prepared.validation.app.manifest;
|
|
330
|
-
const legacyAppPath = rootAppLegacyPath(prepared.validation.config, appId);
|
|
331
|
-
const navigation = legacyAppPath ? rootAppNavigation(
|
|
332
|
-
appId,
|
|
333
|
-
manifest.entry,
|
|
334
|
-
inspected.browserDocuments.map(
|
|
335
|
-
function rootBrowserDocumentPath(document) {
|
|
336
|
-
return document.path;
|
|
337
|
-
}
|
|
338
|
-
)
|
|
339
|
-
) : [];
|
|
340
|
-
// These aliases belong to the SDK only after generation; retained app files stay authored.
|
|
341
|
-
for(const redirect of navigation){
|
|
342
|
-
throwIfAborted(signal);
|
|
343
|
-
try{
|
|
344
|
-
const current=await readFile(path.join(workspaceRoot,...redirect.path.split('/')),'utf8');
|
|
345
|
-
if(!current.includes('<!-- Arcane root application navigation -->')){
|
|
346
|
-
throw new ArcaneError(ERROR_CODES.workspaceInvalid,
|
|
347
|
-
`Root application navigation would replace authored content: ${redirect.path}.`);
|
|
348
|
-
}
|
|
349
|
-
}catch(error){if(error.code!=='ENOENT')throw error;}
|
|
350
|
-
}
|
|
351
329
|
const installed=await readInstalledSdkLayout(workspaceRoot,prepared.validation.config);
|
|
352
330
|
const entry=`/${manifest.entry.split('/').map(encodeURIComponent).join('/')}`;
|
|
353
331
|
const navigationAliases={
|
|
354
|
-
'/':entry
|
|
355
|
-
...(legacyAppPath ? {
|
|
356
|
-
[`/${legacyAppPath}`]:entry,
|
|
357
|
-
[`/${legacyAppPath}/`]:entry,
|
|
358
|
-
...Object.fromEntries(
|
|
359
|
-
navigation.map(
|
|
360
|
-
function rootNavigationAlias(redirect) {
|
|
361
|
-
return [`/${redirect.path}`,redirect.target];
|
|
362
|
-
}
|
|
363
|
-
)
|
|
364
|
-
)
|
|
365
|
-
} : {})
|
|
332
|
+
'/':entry
|
|
366
333
|
};
|
|
367
334
|
// The source host serves the installed files in place. There is no runtime projection.
|
|
368
335
|
const files=[...new Set([
|
|
369
336
|
...inspected.files.filter(file=>file!=='index.html'||manifest.include.includes('index.html')),
|
|
370
|
-
importMap.artifactRelativePath
|
|
371
|
-
...navigation.map(redirect=>redirect.path)
|
|
337
|
+
importMap.artifactRelativePath
|
|
372
338
|
])];
|
|
373
339
|
const pwa=installed?.direct&&manifest.pwa?.enabled?createPwaArtifacts({
|
|
374
340
|
app:{id:appId,displayName:manifest.displayName,version:manifest.version,entry},
|
|
@@ -378,12 +344,11 @@ async function refreshRootApplicationFiles(prepared,inspected,importMap,{signal,
|
|
|
378
344
|
basePath:'/',
|
|
379
345
|
appBase:'/',
|
|
380
346
|
installationId:`/apps/${appId}/`,
|
|
381
|
-
legacyAppPath,
|
|
382
347
|
runtimeBase:installed.browserRuntimeBase,
|
|
383
348
|
mode:'development',
|
|
384
349
|
navigationAliases
|
|
385
350
|
}):null;
|
|
386
|
-
for(const file of
|
|
351
|
+
for(const file of pwa?.files??[]){
|
|
387
352
|
throwIfAborted(signal);
|
|
388
353
|
const filePath=path.join(workspaceRoot,...file.path.split('/'));
|
|
389
354
|
await mkdir(path.dirname(filePath),{recursive:true});
|
|
@@ -402,7 +367,7 @@ async function refreshRootApplicationFiles(prepared,inspected,importMap,{signal,
|
|
|
402
367
|
}
|
|
403
368
|
await emit(onEvent,{
|
|
404
369
|
type:'import-map.root-files.completed',appId,
|
|
405
|
-
navigation:
|
|
370
|
+
navigation:[],
|
|
406
371
|
pwa:pwa?.files.map(file=>file.path)??[]
|
|
407
372
|
});
|
|
408
373
|
}
|