@north-light/cli 0.3.569 → 0.3.571
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/bin/runtime-selector.mjs +15 -0
- package/dist/clients/attach/viewer.js +151 -151
- package/dist/clients/inbox/tui/render.js +2 -2
- package/dist/core/canvas/export-sqlite.js +2 -2
- package/dist/core/canvas/schema-pg/008-import.sql +126 -0
- package/dist/core/canvas/schema-version.d.ts +1 -1
- package/dist/core/canvas/schema-version.js +1 -1
- package/package.json +8 -3
- package/packages/crouter-identity/package.json +1 -1
- package/runtime.lock.json +17 -13
package/bin/runtime-selector.mjs
CHANGED
|
@@ -258,11 +258,26 @@ function findCompatibleSibling(entryName, excludeId) {
|
|
|
258
258
|
return best;
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
+
const RELEASE_ENTRIES = { broker: 'dist/core/runtime/broker-cli.js', cli: 'dist/cli.js', daemon: 'dist/daemon/crtrd-cli.js', launcher: 'dist/launcher/main.js' };
|
|
262
|
+
|
|
263
|
+
/** A fleet sandbox runs its installed release tree itself. `scripts/sandbox-bootstrap.sh` marks a finished release with `.complete`, so a
|
|
264
|
+
* `crtr` loaded from that tree needs no environment variable to know it (an agent's shell may not carry the broker's env). Staging a
|
|
265
|
+
* generation there would repeat a ~20 s `npm pack` and `npm ci` in every sandbox, and its safety check refuses the sandbox's layout. */
|
|
266
|
+
function releaseRuntime(entryName) {
|
|
267
|
+
if (!existsSync(join(PACKAGE_ROOT, '.complete'))) return null;
|
|
268
|
+
const entry = RELEASE_ENTRIES[entryName];
|
|
269
|
+
const entryPath = join(PACKAGE_ROOT, entry ?? '');
|
|
270
|
+
if (entry === undefined || !existsSync(entryPath)) return failure(`release ${PACKAGE_ROOT} has no ${entryName} entry`);
|
|
271
|
+
return { ok: true, runtime: { manifest: null, entryPath, generationId: 'release' } };
|
|
272
|
+
}
|
|
273
|
+
|
|
261
274
|
/** Resolve a runtime without changing process state or writing output. Falls
|
|
262
275
|
* back to the newest ABI-compatible sibling generation when `selected` is
|
|
263
276
|
* incompatible with the running Node; only fails outright when no compatible
|
|
264
277
|
* generation exists at all. */
|
|
265
278
|
export function tryResolveRuntime(entryName) {
|
|
279
|
+
const release = releaseRuntime(entryName);
|
|
280
|
+
if (release !== null) return release;
|
|
266
281
|
const selected = readSelection();
|
|
267
282
|
if (!selected.ok) return selected;
|
|
268
283
|
|