@firstpick/pi-package-webui 0.10.6 → 0.10.8
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/DEVELOPMENT.md +95 -15
- package/README.md +1 -1
- package/TECHNICAL.md +6 -4
- package/bin/pi-webui-launcher.mjs +6 -3
- package/bin/pi-webui-native-update-guardian.mjs +37 -0
- package/bin/pi-webui-native-update-runner.mjs +148 -0
- package/bin/pi-webui-rpc-supervisor.mjs +85 -10
- package/bin/pi-webui-update-context.mjs +83 -0
- package/bin/pi-webui.mjs +537 -339
- package/lib/component-update-state.mjs +4 -4
- package/lib/rpc-supervisor-client.mjs +4 -0
- package/lib/rpc-supervisor-protocol.mjs +17 -4
- package/lib/update/coordination.mjs +207 -0
- package/lib/update/discovery.mjs +58 -0
- package/lib/update/migration.mjs +115 -0
- package/lib/update/native-jobs.mjs +215 -0
- package/lib/update/native-targets.mjs +81 -0
- package/lib/update/path-pi.mjs +76 -0
- package/lib/update/supervisor.mjs +50 -29
- package/lib/update/verification.mjs +18 -0
- package/lib/update-commands.mjs +17 -27
- package/package.json +3 -3
- package/public/app.js +170 -201
- package/public/index.html +5 -3
- package/public/styles.css +29 -1
- package/tests/browser/control-deck-component-updates.spec.mjs +90 -141
- package/tests/browser/update-reconnect.spec.mjs +37 -1
- package/tests/component-update-api-static.test.mjs +13 -11
- package/tests/control-deck-component-updates-static.test.mjs +25 -25
- package/tests/cwd-footer-reliability-static.test.mjs +4 -1
- package/tests/http-endpoints-harness.test.mjs +32 -9
- package/tests/mobile-static.test.mjs +9 -6
- package/tests/native-update-discovery.test.mjs +69 -0
- package/tests/native-update-lifecycle.test.mjs +90 -0
- package/tests/native-update-shell-survival.test.mjs +68 -0
- package/tests/native-update-verification.test.mjs +17 -0
- package/tests/rpc-supervisor-host.test.mjs +63 -1
- package/tests/rpc-supervisor-protocol.test.mjs +8 -0
- package/tests/run-all.mjs +6 -2
- package/tests/update-api-harness.test.mjs +57 -50
- package/tests/update-commands.test.mjs +29 -15
- package/tests/update-executor-process-tree-harness.test.mjs +84 -1
- package/tests/update-journal-harness.test.mjs +9 -1
- package/tests/update-lock-multiprocess-harness.test.mjs +60 -1
- package/tests/update-owners.test.mjs +32 -0
- package/tests/update-plan.test.mjs +110 -0
- package/tests/update-resolver.test.mjs +36 -0
- package/tests/update-supervisor-harness.test.mjs +74 -1
- package/tests/update-tab-restore-harness.test.mjs +9 -2
- package/bin/pi-webui-update-supervisor.mjs +0 -86
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { randomUUID, createHash } from "node:crypto";
|
|
2
|
+
import { spawn } from "node:child_process";
|
|
3
|
+
import { copyFile, mkdir, open, readFile, realpath, rename, rm } from "node:fs/promises";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { acquireEffectLocks, affectedParticipants, persistSharedJob, readSharedJob, releaseEffectLocks } from "./coordination.mjs";
|
|
7
|
+
|
|
8
|
+
const sourceRunner = fileURLToPath(new URL("../../bin/pi-webui-native-update-runner.mjs", import.meta.url));
|
|
9
|
+
const sourceContext = fileURLToPath(new URL("../../bin/pi-webui-update-context.mjs", import.meta.url));
|
|
10
|
+
const sourceGuardian = fileURLToPath(new URL("../../bin/pi-webui-native-update-guardian.mjs", import.meta.url));
|
|
11
|
+
const hash = (value) => createHash("sha256").update(value).digest("hex");
|
|
12
|
+
|
|
13
|
+
async function privateJson(file, value) {
|
|
14
|
+
const temp = `${file}.${randomUUID()}.tmp`;
|
|
15
|
+
try {
|
|
16
|
+
const handle = await open(temp, "wx", 0o600);
|
|
17
|
+
try { await handle.writeFile(`${JSON.stringify(value)}\n`); await handle.sync(); }
|
|
18
|
+
finally { await handle.close(); }
|
|
19
|
+
await rename(temp, file);
|
|
20
|
+
} finally { await rm(temp, { force: true }); }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function createNativeUpdatePlan({ requested, targets, refusals = [], context, active = {}, pathPi = {} }) {
|
|
24
|
+
if (!(["pi", "webui"].includes(requested)) || !targets.length || targets.length > 2 || !context?.cwd || !context?.agentDir) {
|
|
25
|
+
throw new TypeError("A single proven update action and immutable execution context are required.");
|
|
26
|
+
}
|
|
27
|
+
const transactionId = randomUUID();
|
|
28
|
+
const records = [];
|
|
29
|
+
for (const target of targets) {
|
|
30
|
+
if (!target.eligible || !["pi", "webui:npm-global", "webui:pi-user"].includes(target.id)) {
|
|
31
|
+
throw new Error("An unproven or unrelated target cannot enter an update plan.");
|
|
32
|
+
}
|
|
33
|
+
if ((requested === "pi") !== (target.id === "pi")) throw new Error("Combined Pi/Web UI plans are forbidden.");
|
|
34
|
+
const driver = target.driver;
|
|
35
|
+
if (!driver || !path.isAbsolute(driver) || !path.isAbsolute(target.command?.command)) throw new Error("Command interpreter and driver must be absolute.");
|
|
36
|
+
const canonicalDriver = await realpath(driver);
|
|
37
|
+
if (await realpath(target.command.command) !== await realpath(process.execPath) ||
|
|
38
|
+
target.command.args[0] !== canonicalDriver) throw new Error("Node invocation must bind the confirmed command driver.");
|
|
39
|
+
const expectedArgs = target.id === "pi" ? [canonicalDriver, "update"] :
|
|
40
|
+
target.id === "webui:npm-global" ? [canonicalDriver, "-g", "update", "@firstpick/pi-package-webui"] :
|
|
41
|
+
[canonicalDriver, "update", "--extension", target.source, "--no-approve"];
|
|
42
|
+
if (JSON.stringify(target.command.args) !== JSON.stringify(expectedArgs) ||
|
|
43
|
+
target.id === "webui:pi-user" && !/^npm:@firstpick\/pi-package-webui(?:@[\w.^~<>= -]+)?$/.test(target.source || "")) {
|
|
44
|
+
throw new Error("Native command differs from the fixed validated update action.");
|
|
45
|
+
}
|
|
46
|
+
const driverDigest = hash(await readFile(canonicalDriver));
|
|
47
|
+
records.push({
|
|
48
|
+
id: target.id, source: target.source || "", command: target.command,
|
|
49
|
+
driver: canonicalDriver, driverDigest, packageName: target.id === "pi" ? "@earendil-works/pi-coding-agent" : "@firstpick/pi-package-webui",
|
|
50
|
+
beforeVersion: target.installed.version, manifestPath: path.join(target.installed.root, "package.json"),
|
|
51
|
+
installedRoot: target.installed.root, effectRoot: target.effectRoot,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
for (const field of ["contextDigest", "settingsDigest", "npmConfigDigest", "shellDigest", "nodeDigest"]) {
|
|
55
|
+
if (!/^[a-f0-9]{64}$/.test(context[field] || "")) throw new Error(`Native plan lacks a confirmed ${field}.`);
|
|
56
|
+
}
|
|
57
|
+
if (!path.isAbsolute(context.settingsPath) || !Array.isArray(context.npmConfigFiles) ||
|
|
58
|
+
!context.npmConfigFiles.every((file) => path.isAbsolute(file))) throw new Error("Native plan lacks bound settings and npm configuration paths.");
|
|
59
|
+
const unsigned = {
|
|
60
|
+
schemaVersion: 2, transactionId, requested, createdAt: new Date().toISOString(),
|
|
61
|
+
context: { ...context, npmPrefix: context.npmPrefix || "" },
|
|
62
|
+
active, pathPi, targets: records, refusals,
|
|
63
|
+
warning: "Native npm/Pi lifecycle scripts run with your existing configuration and are not sandboxed; permissions are not elevated.",
|
|
64
|
+
};
|
|
65
|
+
return { ...unsigned, digest: hash(JSON.stringify(unsigned)) };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function affectedActivePiDependency(plan, verifiedTargets) {
|
|
69
|
+
const piRoot = plan.active?.piRoot;
|
|
70
|
+
if (!piRoot) return null;
|
|
71
|
+
return verifiedTargets.find((target) => {
|
|
72
|
+
if (target.id === "pi" || !["healthy", "unchanged"].includes(target.status)) return false;
|
|
73
|
+
const relative = path.relative(target.effectRoot, piRoot);
|
|
74
|
+
return relative === "" || relative !== ".." && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);
|
|
75
|
+
}) || null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function validateNativePlan(plan, digest) {
|
|
79
|
+
if (plan?.schemaVersion !== 2 || plan.digest !== digest || hash(JSON.stringify(Object.fromEntries(Object.entries(plan).filter(([key]) => key !== "digest")))) !== digest) {
|
|
80
|
+
throw new Error("Confirmed native update plan changed or is invalid.");
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** Create an immutable private capsule before starting a shell; no imports follow the mutable installation. */
|
|
85
|
+
export async function launchNativeUpdate(plan, digest, { stateRoot, env, node = process.execPath, spawnImpl = spawn,
|
|
86
|
+
requiredParticipants = [] } = {}) {
|
|
87
|
+
validateNativePlan(plan, digest);
|
|
88
|
+
const lock = await acquireEffectLocks(stateRoot, plan.targets.map((item) => item.effectRoot), plan.transactionId);
|
|
89
|
+
const jobDir = path.join(stateRoot, "jobs", plan.transactionId);
|
|
90
|
+
let launched = false;
|
|
91
|
+
try {
|
|
92
|
+
const deadline = Date.now() + 10_000;
|
|
93
|
+
while (true) {
|
|
94
|
+
const participants = await affectedParticipants(stateRoot, lock);
|
|
95
|
+
const requiredPresent = requiredParticipants.every(({ token, pid, kind }) => participants.some((participant) =>
|
|
96
|
+
participant.kind === kind && (!token || participant.token === token) && (!pid || participant.pid === pid)));
|
|
97
|
+
if (requiredPresent && participants.length && participants.every((participant) =>
|
|
98
|
+
participant.ack?.lockToken === lock.token && participant.ack?.idle === true)) break;
|
|
99
|
+
if (Date.now() >= deadline) throw new Error("Known owned Web UI/RPC participants did not confirm idle admission; no command was launched.");
|
|
100
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
101
|
+
}
|
|
102
|
+
await mkdir(jobDir, { mode: 0o700 });
|
|
103
|
+
const runner = path.join(jobDir, "runner.mjs");
|
|
104
|
+
const copiedContext = path.join(jobDir, "pi-webui-update-context.mjs");
|
|
105
|
+
await copyFile(sourceRunner, runner);
|
|
106
|
+
await copyFile(sourceContext, copiedContext);
|
|
107
|
+
const guardian = path.join(jobDir, "guardian.mjs");
|
|
108
|
+
if (process.platform === "win32") await copyFile(sourceGuardian, guardian);
|
|
109
|
+
if (hash(await readFile(runner)) !== hash(await readFile(sourceRunner)) ||
|
|
110
|
+
hash(await readFile(copiedContext)) !== hash(await readFile(sourceContext)) ||
|
|
111
|
+
process.platform === "win32" && hash(await readFile(guardian)) !== hash(await readFile(sourceGuardian))) {
|
|
112
|
+
throw new Error("Private update capsule changed.");
|
|
113
|
+
}
|
|
114
|
+
if (hash(await readFile(plan.context.shell)) !== plan.context.shellDigest ||
|
|
115
|
+
hash(await readFile(node)) !== plan.context.nodeDigest) throw new Error("Confirmed shell or Node interpreter changed.");
|
|
116
|
+
// Credentials in npm/agent environment remain only in the detached
|
|
117
|
+
// process memory; the private on-disk intent contains nonsecret bindings.
|
|
118
|
+
const intent = {
|
|
119
|
+
transactionId: plan.transactionId, cwd: plan.context.cwd,
|
|
120
|
+
contextDigest: plan.context.contextDigest,
|
|
121
|
+
settingsPath: plan.context.settingsPath,
|
|
122
|
+
settingsDigest: plan.context.settingsDigest,
|
|
123
|
+
npmConfigFiles: plan.context.npmConfigFiles,
|
|
124
|
+
npmConfigDigest: plan.context.npmConfigDigest,
|
|
125
|
+
nodeDigest: plan.context.nodeDigest,
|
|
126
|
+
npmDriver: plan.context.npmDriver,
|
|
127
|
+
npmDriverDigest: plan.context.npmDriverDigest,
|
|
128
|
+
targets: plan.targets.map(({ id, command, driver, driverDigest, packageName, manifestPath, beforeVersion }) => ({
|
|
129
|
+
id, command, driver, driverDigest, packageName, manifestPath, beforeVersion,
|
|
130
|
+
})),
|
|
131
|
+
};
|
|
132
|
+
await privateJson(path.join(jobDir, "intent.json"), intent);
|
|
133
|
+
await persistSharedJob(stateRoot, { transactionId: plan.transactionId, plan, lock, phase: "launching", jobDir,
|
|
134
|
+
launchedAt: new Date().toISOString() });
|
|
135
|
+
const shell = plan.context.shell;
|
|
136
|
+
const shellEnv = { ...env, PI_WEBUI_UPDATE_NODE: node, PI_WEBUI_UPDATE_RUNNER: runner, PI_WEBUI_UPDATE_JOB: jobDir };
|
|
137
|
+
// PowerShell normalizes PATHEXT on startup. Restore the confirmed value
|
|
138
|
+
// before Node validates the frozen environment and executes a command.
|
|
139
|
+
if (process.platform === "win32") {
|
|
140
|
+
shellEnv.PI_WEBUI_UPDATE_PATHEXT = env.PATHEXT || env.PathExt || "";
|
|
141
|
+
shellEnv.PI_WEBUI_UPDATE_SHELL = shell;
|
|
142
|
+
shellEnv.PI_WEBUI_UPDATE_CWD = plan.context.cwd;
|
|
143
|
+
}
|
|
144
|
+
const args = process.platform === "win32"
|
|
145
|
+
? [guardian]
|
|
146
|
+
: ["--noprofile", "--norc", "-c", 'exec "$PI_WEBUI_UPDATE_NODE" "$PI_WEBUI_UPDATE_RUNNER" "$PI_WEBUI_UPDATE_JOB"'];
|
|
147
|
+
// A detached Node guardian owns ordinary hidden PowerShell on Windows;
|
|
148
|
+
// detached PowerShell itself silently skips -Command on this host.
|
|
149
|
+
const child = spawnImpl(process.platform === "win32" ? node : shell, args, { cwd: plan.context.cwd, env: shellEnv,
|
|
150
|
+
detached: true, windowsHide: true, stdio: "ignore" });
|
|
151
|
+
await new Promise((resolve, reject) => { child.once("spawn", resolve); child.once("error", reject); });
|
|
152
|
+
launched = true;
|
|
153
|
+
child.unref();
|
|
154
|
+
await persistSharedJob(stateRoot, { transactionId: plan.transactionId, plan, lock, phase: "running", jobDir,
|
|
155
|
+
launcherPid: child.pid, launchedAt: new Date().toISOString() });
|
|
156
|
+
return { transactionId: plan.transactionId, phase: "running", launcherPid: child.pid };
|
|
157
|
+
} catch (error) {
|
|
158
|
+
// A launch error before spawn proves no child was started. Any error after
|
|
159
|
+
// spawn cannot release the fence: a runner may still be mutating installs.
|
|
160
|
+
if (!launched) {
|
|
161
|
+
await releaseEffectLocks(lock, { completionVerified: true });
|
|
162
|
+
await persistSharedJob(stateRoot, { transactionId: plan.transactionId, plan, phase: "failed", outcome: "failed",
|
|
163
|
+
error: "Native update shell could not be launched; no command ran." });
|
|
164
|
+
}
|
|
165
|
+
throw error;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
async function claimState(file) {
|
|
170
|
+
let claim;
|
|
171
|
+
try { claim = JSON.parse(await readFile(file, "utf8")); }
|
|
172
|
+
catch (error) { return error?.code === "ENOENT" ? "absent" : "unknown"; }
|
|
173
|
+
if (!Number.isInteger(claim.pid) || !Number.isFinite(Date.parse(claim.startedAt)) ||
|
|
174
|
+
Date.now() - Date.parse(claim.startedAt) > 60_000) return "unknown";
|
|
175
|
+
try { process.kill(claim.pid, 0); return "running"; }
|
|
176
|
+
catch (error) { return error.code === "ESRCH" ? "unknown" : "running"; }
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export async function inspectNativeJob(stateRoot, transactionId) {
|
|
180
|
+
const job = await readSharedJob(stateRoot, transactionId);
|
|
181
|
+
if (!job) return null;
|
|
182
|
+
if (!job.jobDir) return { ...job, receipts: [] };
|
|
183
|
+
let complete = null;
|
|
184
|
+
try { complete = JSON.parse(await readFile(path.join(job.jobDir, "complete.json"), "utf8")); }
|
|
185
|
+
catch (error) { if (error?.code !== "ENOENT") throw error; }
|
|
186
|
+
const receipts = [];
|
|
187
|
+
for (let index = 0; index < job.plan.targets.length; index++) {
|
|
188
|
+
try { receipts.push(JSON.parse(await readFile(path.join(job.jobDir, `${index}.receipt.json`), "utf8"))); }
|
|
189
|
+
catch (error) { if (error?.code !== "ENOENT") throw error; }
|
|
190
|
+
}
|
|
191
|
+
const completeProven = complete?.transactionId === transactionId && Array.isArray(complete.receipts) &&
|
|
192
|
+
complete.receipts.length === job.plan.targets.length && receipts.length === job.plan.targets.length &&
|
|
193
|
+
receipts.every((receipt, index) => receipt.transactionId === transactionId &&
|
|
194
|
+
receipt.id === complete.receipts[index].id && receipt.status === complete.receipts[index].status &&
|
|
195
|
+
receipt.afterVersion === complete.receipts[index].afterVersion);
|
|
196
|
+
let heartbeatAt = 0;
|
|
197
|
+
try { heartbeatAt = Date.parse(JSON.parse(await readFile(path.join(job.jobDir, "heartbeat.json"), "utf8")).at) || 0; }
|
|
198
|
+
catch (error) { if (error?.code !== "ENOENT") throw error; }
|
|
199
|
+
const evidenceAt = heartbeatAt || Date.parse(job.launchedAt || "") || 0;
|
|
200
|
+
const missingRunnerEvidence = !complete && ["running", "launching"].includes(job.phase) && Date.now() - evidenceAt > 10_000;
|
|
201
|
+
const terminal = ["restart-authorized", "restart-pending", "success", "partial", "failed", "unchanged", "unknown"].includes(job.phase);
|
|
202
|
+
let guardianFailure = null;
|
|
203
|
+
try { guardianFailure = JSON.parse(await readFile(path.join(job.jobDir, "guardian-launch-failed.json"), "utf8")); }
|
|
204
|
+
catch (error) { if (error?.code !== "ENOENT") throw error; }
|
|
205
|
+
const noShellStarted = guardianFailure?.transactionId === transactionId && guardianFailure.noShellStarted === true &&
|
|
206
|
+
guardianFailure.guardianPid === job.launcherPid && !complete && receipts.length === 0;
|
|
207
|
+
const finalizer = await claimState(path.join(job.jobDir, "finalize.claim"));
|
|
208
|
+
const restart = job.phase === "restart-authorized" ? await claimState(path.join(job.jobDir, "restart-action.claim")) : "absent";
|
|
209
|
+
return { ...job, phase: restart !== "absent" ? restart === "running" ? "restart-in-progress" : "unknown" :
|
|
210
|
+
terminal ? job.phase : noShellStarted ? "launch-failed" : finalizer !== "absent" ? finalizer === "running" ? "finalizing" : "unknown" :
|
|
211
|
+
complete ? completeProven ? "command-complete" : "unknown" :
|
|
212
|
+
receipts.some((item) => item.status === "unknown") || missingRunnerEvidence ? "unknown" : job.phase,
|
|
213
|
+
receipts: receipts.map(({ id, status, exitCode, signal, afterVersion, stdout, stderr, error }) =>
|
|
214
|
+
({ id, status, exitCode, signal, afterVersion, stdout, stderr, error })) };
|
|
215
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { lstat, readFile, realpath } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
4
|
+
const WEBUI = "@firstpick/pi-package-webui";
|
|
5
|
+
const EXACT_PIN = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
|
|
6
|
+
const ALLOWED_RANGE = /^(?:\^|~|>=|>|<=|<)?\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\s+(?:>=|>|<=|<)\d+\.\d+\.\d+)?$/;
|
|
7
|
+
const ALLOWED_TAG = /^[A-Za-z][A-Za-z0-9._-]{0,63}$/;
|
|
8
|
+
|
|
9
|
+
function refusal(reason) { return { eligible: false, guidance: reason }; }
|
|
10
|
+
|
|
11
|
+
async function installedNpmWebui(nodeModulesRoot) {
|
|
12
|
+
const root = path.join(nodeModulesRoot, ...WEBUI.split("/"));
|
|
13
|
+
const info = await lstat(root);
|
|
14
|
+
if (!info.isDirectory() || info.isSymbolicLink()) return null;
|
|
15
|
+
const canonicalRoot = await realpath(root);
|
|
16
|
+
if (canonicalRoot !== path.resolve(root)) return null;
|
|
17
|
+
const manifest = JSON.parse(await readFile(path.join(root, "package.json"), "utf8"));
|
|
18
|
+
if (manifest.name !== WEBUI || !/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/.test(manifest.version)) return null;
|
|
19
|
+
return { root: canonicalRoot, version: manifest.version };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export async function npmGlobalWebuiTarget({ nodeModulesRoot, npmInvocation, prefix } = {}) {
|
|
23
|
+
if (!path.isAbsolute(nodeModulesRoot || "") || !path.isAbsolute(prefix || "") ||
|
|
24
|
+
!npmInvocation?.command || !path.isAbsolute(npmInvocation.command) || !Array.isArray(npmInvocation.args)) {
|
|
25
|
+
return refusal("The global npm executable, prefix or root cannot be proven.");
|
|
26
|
+
}
|
|
27
|
+
try {
|
|
28
|
+
const [canonicalModules, canonicalPrefix] = await Promise.all([realpath(nodeModulesRoot), realpath(prefix)]);
|
|
29
|
+
const expectedModules = path.join(canonicalPrefix, process.platform === "win32" ? "node_modules" : "lib", ...(process.platform === "win32" ? [] : ["node_modules"]));
|
|
30
|
+
if (canonicalModules !== expectedModules) return refusal("The npm-global root does not match the confirmed prefix.");
|
|
31
|
+
const installed = await installedNpmWebui(canonicalModules);
|
|
32
|
+
if (!installed) return refusal("npm-global Web UI is missing, linked or unproven.");
|
|
33
|
+
return {
|
|
34
|
+
eligible: true, id: "webui:npm-global", source: "npm-global", installed,
|
|
35
|
+
prefix: canonicalPrefix, effectRoot: canonicalPrefix,
|
|
36
|
+
command: { command: npmInvocation.command, args: [...npmInvocation.args, "-g", "update", WEBUI] },
|
|
37
|
+
};
|
|
38
|
+
} catch { return refusal("npm-global Web UI installation cannot be verified."); }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function userWebuiNpmSource(settings) {
|
|
42
|
+
const matching = [];
|
|
43
|
+
for (const entry of settings?.packages || []) {
|
|
44
|
+
const source = typeof entry === "string" ? entry : entry?.source;
|
|
45
|
+
if (typeof source !== "string" || !source.startsWith(`npm:${WEBUI}`)) continue;
|
|
46
|
+
const version = source.slice(`npm:${WEBUI}`.length);
|
|
47
|
+
if (version && !version.startsWith("@")) continue;
|
|
48
|
+
matching.push({ source, spec: version.slice(1) });
|
|
49
|
+
}
|
|
50
|
+
if (matching.length !== 1) return refusal(matching.length ? "Multiple user Web UI declarations need manual review." : "No Pi user-managed Web UI npm source was found.");
|
|
51
|
+
const { source, spec } = matching[0];
|
|
52
|
+
if (EXACT_PIN.test(spec)) return refusal("The Pi user Web UI npm version is exactly pinned; update it manually.");
|
|
53
|
+
if (spec && !ALLOWED_RANGE.test(spec) && !ALLOWED_TAG.test(spec)) return refusal("The Pi user Web UI npm source is unsupported or unproven.");
|
|
54
|
+
return { eligible: true, source };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export async function piUserWebuiTarget({ agentDir, settings, pathPi } = {}) {
|
|
58
|
+
const selected = userWebuiNpmSource(settings);
|
|
59
|
+
if (!selected.eligible) return selected;
|
|
60
|
+
if (!pathPi?.eligible) return refusal("The verified PATH Pi is required for Pi user-managed Web UI updates.");
|
|
61
|
+
const npmRoot = path.join(agentDir, "npm");
|
|
62
|
+
try {
|
|
63
|
+
const canonicalNpmRoot = await realpath(npmRoot);
|
|
64
|
+
const installed = await installedNpmWebui(path.join(canonicalNpmRoot, "node_modules"));
|
|
65
|
+
if (!installed) return refusal("Pi user-managed Web UI is missing, linked or unproven.");
|
|
66
|
+
return {
|
|
67
|
+
eligible: true, id: "webui:pi-user", source: selected.source, installed,
|
|
68
|
+
effectRoot: canonicalNpmRoot, agentDir: await realpath(agentDir),
|
|
69
|
+
command: { command: pathPi.invocation.command, args: [...pathPi.invocation.args, "update", "--extension", selected.source, "--no-approve"] },
|
|
70
|
+
};
|
|
71
|
+
} catch { return refusal("The Pi user-managed Web UI installation cannot be verified."); }
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function selfUpdateCommand(pathPi) {
|
|
75
|
+
if (!pathPi?.eligible) return refusal("No proven PATH Pi installation can self-update.");
|
|
76
|
+
return {
|
|
77
|
+
eligible: true, id: "pi", installed: { root: pathPi.packageRoot, version: pathPi.version },
|
|
78
|
+
effectRoot: pathPi.prefix,
|
|
79
|
+
command: { command: pathPi.invocation.command, args: [...pathPi.invocation.args, "update"] },
|
|
80
|
+
};
|
|
81
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { lstat, readFile, realpath, stat } from "node:fs/promises";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { resolveCommandDirectory } from "../npm-command.mjs";
|
|
5
|
+
|
|
6
|
+
const PI_PACKAGE = "@earendil-works/pi-coding-agent";
|
|
7
|
+
const VERIFIED_VERSION = "0.87.1";
|
|
8
|
+
|
|
9
|
+
function refusal(message) { return { eligible: false, guidance: message }; }
|
|
10
|
+
|
|
11
|
+
function inside(root, candidate) {
|
|
12
|
+
const relative = path.relative(root, candidate);
|
|
13
|
+
return relative === "" || (relative !== ".." && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Resolve the PATH npm shim, never the tab's bundled/explicit Pi selection. */
|
|
17
|
+
export async function resolveUpdatePathPi({ env = process.env, platform = process.platform, node = process.execPath, runVersion } = {}) {
|
|
18
|
+
const directory = resolveCommandDirectory("pi", { env, platform });
|
|
19
|
+
if (!directory) return refusal("PATH Pi is missing; update it manually. No bundled or selected Pi will be substituted.");
|
|
20
|
+
const api = platform === "win32" ? path.win32 : path.posix;
|
|
21
|
+
const shim = api.join(directory, platform === "win32" ? "pi.cmd" : "pi");
|
|
22
|
+
const prefix = platform === "win32" ? directory : api.dirname(directory);
|
|
23
|
+
const packageRoot = api.join(prefix, platform === "win32" ? "node_modules" : "lib/node_modules", ...PI_PACKAGE.split("/"));
|
|
24
|
+
try {
|
|
25
|
+
const packageInfo = await lstat(packageRoot);
|
|
26
|
+
if (!packageInfo.isDirectory() || packageInfo.isSymbolicLink()) {
|
|
27
|
+
return refusal("PATH Pi is linked rather than an owned npm installation.");
|
|
28
|
+
}
|
|
29
|
+
if (platform === "win32") {
|
|
30
|
+
for (const extension of [".com", ".exe", ".bat"]) {
|
|
31
|
+
try {
|
|
32
|
+
await lstat(api.join(directory, `pi${extension}`));
|
|
33
|
+
return refusal("PATH Pi resolves ambiguously before the npm pi.cmd shim.");
|
|
34
|
+
} catch (error) { if (error?.code !== "ENOENT") throw error; }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const [shimInfo, packageJsonText, canonicalRoot, canonicalNode] = await Promise.all([
|
|
38
|
+
lstat(shim), readFile(api.join(packageRoot, "package.json"), "utf8"),
|
|
39
|
+
realpath(packageRoot), realpath(node),
|
|
40
|
+
]);
|
|
41
|
+
const manifest = JSON.parse(packageJsonText);
|
|
42
|
+
if (manifest.name !== PI_PACKAGE || manifest.version !== VERIFIED_VERSION) {
|
|
43
|
+
return refusal("PATH Pi's installed version is unproven for targeted updates; update it manually (only 0.87.1 has verified command semantics).");
|
|
44
|
+
}
|
|
45
|
+
const binPath = manifest.bin?.pi;
|
|
46
|
+
if (typeof binPath !== "string" || !/^dist\/(?:bundle\/)?cli\.js$/.test(binPath)) return refusal("PATH Pi's CLI manifest is unproven.");
|
|
47
|
+
const cli = await realpath(api.join(packageRoot, binPath));
|
|
48
|
+
if (!inside(canonicalRoot, cli) || !(await stat(cli)).isFile()) return refusal("PATH Pi's CLI leaves the verified package root.");
|
|
49
|
+
// Unix npm installs a bin symlink; Windows npm writes a cmd shim. Reject
|
|
50
|
+
// symlinks for the package itself, but permit this exact verified bin link.
|
|
51
|
+
let shimText = "";
|
|
52
|
+
if (platform !== "win32" && shimInfo.isSymbolicLink()) {
|
|
53
|
+
if (await realpath(shim) !== cli) return refusal("PATH Pi symlink does not point to the manifest CLI.");
|
|
54
|
+
} else {
|
|
55
|
+
shimText = await readFile(shim, "utf8");
|
|
56
|
+
const shimPattern = platform === "win32"
|
|
57
|
+
? /%dp0%\\node_modules\\@earendil-works\\pi-coding-agent\\dist\\(?:bundle\\)?cli\.js/i
|
|
58
|
+
: /\$basedir\/node_modules\/@earendil-works\/pi-coding-agent\/dist\/(?:bundle\/)?cli\.js/;
|
|
59
|
+
if (shimInfo.isSymbolicLink() || !shimPattern.test(shimText) || !shimText.includes(api.basename(binPath))) {
|
|
60
|
+
return refusal("PATH Pi is not a recognized npm shim.");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const report = await runVersion(canonicalNode, [cli, "--version"], { timeoutMs: 10_000, maxOutputLength: 4_000 });
|
|
64
|
+
if (report?.exitCode !== 0 || report?.timedOut || report?.error || !new RegExp(`(?:^|\\s)v?${VERIFIED_VERSION.replaceAll(".", "\\.")}(?:\\s|$)`).test(`${report.stdout || ""}\n${report.stderr || ""}`)) {
|
|
65
|
+
return refusal("PATH Pi version could not be independently verified.");
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
eligible: true, version: VERIFIED_VERSION, executable: canonicalNode, cli,
|
|
69
|
+
packageRoot: canonicalRoot, prefix: await realpath(prefix),
|
|
70
|
+
canonicalId: `pi:${canonicalRoot}`, invocation: { command: canonicalNode, args: [cli] },
|
|
71
|
+
contextDigest: createHash("sha256").update([canonicalNode, cli, canonicalRoot, shimText, packageJsonText].join("\0")).digest("hex"),
|
|
72
|
+
};
|
|
73
|
+
} catch {
|
|
74
|
+
return refusal("PATH Pi's npm shim, executable or package ownership cannot be proven.");
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
|
-
import { chmod, mkdir, open, readFile, readdir, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
3
|
+
import { chmod, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
4
|
+
import { createServer as createNetServer } from "node:net";
|
|
5
|
+
import { tmpdir } from "node:os";
|
|
6
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
4
7
|
import path from "node:path";
|
|
5
8
|
import { updateStatePaths } from "./journal.mjs";
|
|
6
9
|
|
|
@@ -200,39 +203,57 @@ export async function probeCandidateRuntime(serverEntry, { expectedVersion, expe
|
|
|
200
203
|
});
|
|
201
204
|
}
|
|
202
205
|
|
|
203
|
-
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
async function freeLoopbackPort() {
|
|
207
|
+
const socket = createNetServer();
|
|
208
|
+
await new Promise((resolve, reject) => socket.once("error", reject).listen(0, "127.0.0.1", resolve));
|
|
209
|
+
const port = socket.address().port;
|
|
210
|
+
await new Promise((resolve) => socket.close(resolve));
|
|
211
|
+
return port;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** Exercise real candidate startup and restoration in an isolated disposable agent directory. */
|
|
215
|
+
export async function probeStartupRestore(serverEntry, { expectedVersion, spawnImpl = spawn, timeoutMs = 20_000, piCommand = "" } = {}) {
|
|
216
|
+
const temp = await mkdtemp(path.join(tmpdir(), "pi-webui-startup-probe-"));
|
|
217
|
+
const agentDir = path.join(temp, "agent");
|
|
218
|
+
const restore = await createRestoreFile(agentDir, [{ id: "probe-tab", title: "Temporary startup probe", cwd: temp }]);
|
|
219
|
+
const port = await freeLoopbackPort();
|
|
220
|
+
// Every verification probe needs its own coordination domain: an active
|
|
221
|
+
// update deliberately fences the real installation until this check passes.
|
|
222
|
+
const env = { ...process.env, PI_WEBUI_UPDATE_TEST_HOME: temp,
|
|
223
|
+
PI_CODING_AGENT_DIR: agentDir, PI_WEBUI_RESTORE_FILE: restore.file,
|
|
224
|
+
PI_WEBUI_STARTUP_PROBE: "1", PI_WEBUI_RPC_SUPERVISOR: "0", PI_WEBUI_NPM_BIN: path.join(temp, "absent-npm"),
|
|
225
|
+
PI_WEBUI_SETTINGS_FILE: path.join(temp, "webui-settings.json") };
|
|
226
|
+
const child = spawnImpl(process.execPath, [serverEntry, "--host", "127.0.0.1", "--port", String(port), "--cwd", temp, "--no-session", ...(piCommand ? ["--pi", piCommand] : [])],
|
|
227
|
+
{ cwd: temp, env, windowsHide: true, stdio: "ignore" });
|
|
228
|
+
let exited = false;
|
|
229
|
+
child.once("error", () => { exited = true; });
|
|
230
|
+
child.once("exit", () => { exited = true; });
|
|
231
|
+
const deadline = Date.now() + timeoutMs;
|
|
232
|
+
let result = { ok: false, error: "Candidate did not complete isolated startup and restored-tab health check." };
|
|
209
233
|
try {
|
|
210
|
-
|
|
211
|
-
if (!name.endsWith(".json")) continue;
|
|
234
|
+
while (Date.now() < deadline && !exited) {
|
|
212
235
|
try {
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
236
|
+
const response = await fetch(`http://127.0.0.1:${port}/api/update/startup-probe`, { signal: AbortSignal.timeout(600) });
|
|
237
|
+
const body = await response.json();
|
|
238
|
+
if (response.ok && body?.ok === true && body.data?.schemaVersion === 1 && body.data?.packageName === "@firstpick/pi-package-webui" &&
|
|
239
|
+
body.data?.version === expectedVersion && body.data?.restoredTabCount === 1 &&
|
|
240
|
+
body.data?.restoredProbeTabHealthy === true && body.data?.runningTabCount >= 1) {
|
|
241
|
+
result = { ok: true, version: body.data.version, bootIdentity: body.data.bootIdentity };
|
|
242
|
+
break;
|
|
217
243
|
}
|
|
218
|
-
} catch {}
|
|
244
|
+
} catch { /* Wait only for this disposable local candidate. */ }
|
|
245
|
+
await delay(150);
|
|
219
246
|
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
try {
|
|
229
|
-
const info = await stat(root);
|
|
230
|
-
if (now - info.mtimeMs < keepHealthyForMs) continue;
|
|
231
|
-
await rm(root, { recursive: true, force: true });
|
|
232
|
-
removed.push(root);
|
|
233
|
-
} catch {}
|
|
247
|
+
} finally {
|
|
248
|
+
if (!exited) child.kill("SIGTERM");
|
|
249
|
+
const closed = exited || await Promise.race([
|
|
250
|
+
new Promise((resolve) => child.once("exit", () => resolve(true))),
|
|
251
|
+
delay(5_000, false),
|
|
252
|
+
]);
|
|
253
|
+
if (closed) await rm(temp, { recursive: true, force: true });
|
|
254
|
+
else result = { ok: false, error: "Candidate probe did not stop; temporary session artifacts were retained for safe recovery." };
|
|
234
255
|
}
|
|
235
|
-
return
|
|
256
|
+
return Object.freeze(result);
|
|
236
257
|
}
|
|
237
258
|
|
|
238
259
|
export const UPDATE_RESTORE_LIMIT = MAX_RESTORE_TABS;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
|
|
3
|
+
export function nativeUpdateOutcome(targets) {
|
|
4
|
+
const changed = targets.some(({ status }) => status === "healthy");
|
|
5
|
+
const failed = targets.some(({ status }) => !["healthy", "unchanged"].includes(status));
|
|
6
|
+
if (changed) return failed ? "partial" : "success";
|
|
7
|
+
return failed ? "failed" : "unchanged";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** A spawned child is not a restored session until its own RPC state agrees. */
|
|
11
|
+
export function assertRestoredPiState(response, expectedSessionFile) {
|
|
12
|
+
if (response?.success === false || !response?.data || response.rpcRunning === false ||
|
|
13
|
+
response.data.rpcRunning === false) throw new Error("Restored Pi tab did not answer a healthy RPC state request.");
|
|
14
|
+
if (expectedSessionFile && (!response.data.sessionFile ||
|
|
15
|
+
path.resolve(response.data.sessionFile) !== path.resolve(expectedSessionFile))) {
|
|
16
|
+
throw new Error("Restored Pi tab did not load the expected session.");
|
|
17
|
+
}
|
|
18
|
+
}
|
package/lib/update-commands.mjs
CHANGED
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import { validateNativePlan } from "./update/native-jobs.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const exact = String(version || "").trim().replace(/^v/i, "");
|
|
6
|
-
if (!name || !EXACT_VERSION.test(exact)) throw new TypeError("packageName and an exact version are required");
|
|
7
|
-
return `${name}@${exact}`;
|
|
3
|
+
function invocation({ command, args }) {
|
|
4
|
+
return [command, ...args].map((part) => JSON.stringify(String(part))).join(" ");
|
|
8
5
|
}
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
7
|
+
/** Only confirmed native commands may be shown in an apply confirmation. */
|
|
8
|
+
export function nativeUpdateConfirmationText(plan) {
|
|
9
|
+
validateNativePlan(plan, plan?.digest);
|
|
10
|
+
const targets = plan.targets.map((target) =>
|
|
11
|
+
`${target.id}: ${target.packageName} ${target.beforeVersion} at ${target.installedRoot}\n` +
|
|
12
|
+
`Effects: ${target.effectRoot}\nCommand: ${invocation(target.command)}`);
|
|
17
13
|
return [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const refusals = (plan.refusals || []).map((item) => `${item.id}: ${item.guidance}`);
|
|
27
|
-
return [
|
|
28
|
-
targets.length ? `Exact targets: ${targets.join(" · ")}` : "No automatic targets were accepted.",
|
|
29
|
-
refusals.length ? `Refused: ${refusals.join(" · ")}` : "",
|
|
30
|
-
`Plan digest: ${plan.digest}`,
|
|
31
|
-
].filter(Boolean).join("\n");
|
|
14
|
+
...targets,
|
|
15
|
+
`Working directory: ${plan.context.cwd}`,
|
|
16
|
+
`Pi agent directory: ${plan.context.agentDir}`,
|
|
17
|
+
...(plan.context.npmPrefix ? [`npm prefix: ${plan.context.npmPrefix}`] : []),
|
|
18
|
+
...(plan.refusals || []).map((item) => `Skipped: ${item}`),
|
|
19
|
+
plan.warning,
|
|
20
|
+
`Confirmation digest: ${plan.digest}`,
|
|
21
|
+
].join("\n");
|
|
32
22
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firstpick/pi-package-webui",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.8",
|
|
4
4
|
"description": "Pi Web UI companion package with a local browser UI CLI plus /webui-start and /webui-status commands.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/Firstp1ck/pi-coding-agent-forge/tree/main/pi-package-webui#readme",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"pi-webui": "./bin/pi-webui-launcher.mjs"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
|
-
"check": "node --check public/app.js && node --check lib/app-runner-terminal.mjs && node --check public/middle-button-drag-scroll.mjs && node --check public/stream-output-controller.mjs && node --check public/theme-contract.mjs && node --check public/transcript-renderer.mjs && node --check public/syntax-highlight.mjs && node --check public/mobile-shell-state.mjs && node --check public/issue-wizard-state.mjs && node --check public/issue-bot-client.mjs && node --check public/workflow-status-stack.mjs && node --check public/fast-output-live.mjs && node --check public/subagent-launch-slot-state.mjs && node --check public/subagent-gate-visibility.mjs && node --check public/voice-conversation.mjs && node --check public/aur-review-payload.mjs && node --check public/guided-git-command-state.mjs && node --check public/guided-git-review-state.mjs && node --check bin/pi-webui.mjs && node --check bin/pi-webui-launcher.mjs && node --check bin/pi-webui-update-
|
|
33
|
+
"check": "node --check public/app.js && node --check lib/app-runner-terminal.mjs && node --check public/middle-button-drag-scroll.mjs && node --check public/stream-output-controller.mjs && node --check public/theme-contract.mjs && node --check public/transcript-renderer.mjs && node --check public/syntax-highlight.mjs && node --check public/mobile-shell-state.mjs && node --check public/issue-wizard-state.mjs && node --check public/issue-bot-client.mjs && node --check public/workflow-status-stack.mjs && node --check public/fast-output-live.mjs && node --check public/subagent-launch-slot-state.mjs && node --check public/subagent-gate-visibility.mjs && node --check public/voice-conversation.mjs && node --check public/aur-review-payload.mjs && node --check public/guided-git-command-state.mjs && node --check public/guided-git-review-state.mjs && node --check bin/pi-webui.mjs && node --check bin/pi-webui-launcher.mjs && node --check bin/pi-webui-native-update-runner.mjs && node --check bin/pi-webui-update-context.mjs && node --check lib/update/coordination.mjs && node --check lib/update/native-jobs.mjs && node --check lib/update/discovery.mjs && node --check lib/update/native-targets.mjs && node --check lib/update/path-pi.mjs && node --check lib/update/migration.mjs && node --check lib/update/supervisor.mjs && node --check bin/pi-webui-rpc-supervisor.mjs && node --check lib/rpc-supervisor-protocol.mjs && node --check lib/rpc-supervisor-state.mjs && node --check lib/rpc-supervisor-client.mjs && node --check webui-rpc-helper.mjs && node --check lib/subagent-launch-slots.mjs && node --check lib/git-live-watcher.mjs && node --check lib/workspace-files-live-watcher.mjs && node --check lib/git-message-artifacts.mjs && node --check lib/trust-boundaries.mjs && node --check lib/native-command-adapter.mjs && node --check lib/session-actions.mjs && node --check lib/auth-actions.mjs && node --check lib/temp-artifacts.mjs && node tests/run-all.mjs",
|
|
34
34
|
"test": "node tests/run-all.mjs",
|
|
35
35
|
"test:browser": "playwright test"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@earendil-works/pi-ai": "^0.83.0",
|
|
39
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
39
|
+
"@earendil-works/pi-coding-agent": "^0.87.0",
|
|
40
40
|
"@earendil-works/pi-tui": "^0.83.0",
|
|
41
41
|
"@firstpick/pi-utils": "^0.2.5",
|
|
42
42
|
"mermaid": "^11.15.0",
|