mirror of
https://github.com/nexu-io/open-design.git
synced 2026-09-20 06:15:06 +08:00
8ab7c3d5f1
* feat(standalone): add shell-neutral exact lifecycle * feat(terminal): add native exact cold-start carrier * test(terminal): exercise mutable exact channel heads * feat(standalone): model synced blobs and Shell updates * feat(terminal): exercise the complete Shell lifecycle * feat(release): add the independent exact Terminal line * test(exact): run the full local Terminal release line * feat(terminal): harden exact Sidecar lifecycle * feat(standalone): prove exact update transactions * refactor(standalone): separate shell lifecycle dimensions * refactor(e2e): decouple terminal exact drivers * refactor(terminal): isolate exact sidecar fixture host * feat(terminal): gate handoff on physical retirement * refactor(release): gate exact activation on public acceptance * test(terminal): formalize guarded lifecycle algebra * fix(terminal): guard shell installer handoff * feat(terminal): add exact bootloader handoff * feat(terminal): integrate exact sidecar lifecycle * refactor(exact): rename validation channels * test(terminal): harden exact release acceptance * fix(postinstall): build standalone dependencies first Generated-By: looper 0.11.2 (runner=fixer, agent=codex) * fix(ci): build the native Terminal scene Generated-By: looper 0.11.2 (runner=fixer, agent=codex) * test(ci): cover exact convergence handoff routing Generated-By: looper 0.11.2 (runner=fixer, agent=codex) * fix(exact): isolate terminal validation from main CI * fix(terminal): complete shell update confirmation Generated-By: looper 0.11.2 (runner=fixer, agent=codex) * fix(exact): bind acceptance to installed manifest Generated-By: looper 0.11.2 (runner=fixer, agent=codex) * fix(standalone): block occupied shell installs Generated-By: looper 0.11.2 (runner=fixer, agent=codex) --------- Co-authored-by: Looper <looper@noreply.github.com>
40 lines
1.3 KiB
JavaScript
40 lines
1.3 KiB
JavaScript
import { resolve } from "node:path";
|
|
|
|
import { bootstrapSidecarProcess, handoffCurrentSidecarGeneration } from "@open-design/sidecar";
|
|
|
|
const CONFIG_ENV = "OD_TERMINAL_SIDECAR_CONFIG_V1";
|
|
const serialized = process.env[CONFIG_ENV];
|
|
if (serialized == null) throw new Error(`${CONFIG_ENV} is required`);
|
|
const config = JSON.parse(serialized);
|
|
if (
|
|
config?.schemaVersion !== 1
|
|
|| typeof config.storeRoot !== "string"
|
|
|| typeof config.runtimeRoot !== "string"
|
|
|| typeof config.sidecarHost !== "string"
|
|
|| !/^[a-z0-9]{1,12}$/.test(config.channel)
|
|
|| !/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(config.namespace)
|
|
) throw new Error("Terminal Sidecar bootstrap configuration is invalid");
|
|
|
|
const stamp = Object.freeze({
|
|
channel: config.channel,
|
|
namespace: config.namespace,
|
|
source: "standalone",
|
|
mode: "runtime",
|
|
app: "standalone",
|
|
});
|
|
const resources = Object.freeze({
|
|
dataRoot: resolve(config.storeRoot),
|
|
ownerPid: null,
|
|
port: 0,
|
|
runtimeRoot: resolve(config.runtimeRoot),
|
|
});
|
|
|
|
if (await bootstrapSidecarProcess(stamp, resources)) process.exit(0);
|
|
|
|
await handoffCurrentSidecarGeneration({
|
|
args: [resolve(config.sidecarHost)],
|
|
command: process.execPath,
|
|
cwd: process.cwd(),
|
|
env: { ...process.env, OD_TERMINAL_BOOTSTRAP_PID: String(process.pid) },
|
|
});
|