@codyswann/lisa 6.0.5 → 6.0.7
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/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +73 -1
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/scripts/lib/docker-cli.mjs +40 -0
- package/scripts/verify-packaged-apply.mjs +28 -13
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the Docker CLI once, to an absolute path, the way `execFile` would
|
|
3
|
+
* resolve a bare `docker`: the first executable `docker` on `PATH`.
|
|
4
|
+
*
|
|
5
|
+
* The packaged-apply controller and its fixtures each used to name a bare
|
|
6
|
+
* `docker` (or guess fixed locations) on every call, so the binary that
|
|
7
|
+
* started a container and the one that removed it could differ. Resolving
|
|
8
|
+
* once and passing the one absolute path to every caller keeps start and
|
|
9
|
+
* cleanup on the same CLI.
|
|
10
|
+
* @module scripts/lib/docker-cli
|
|
11
|
+
*/
|
|
12
|
+
import { accessSync, constants } from "node:fs";
|
|
13
|
+
import path from "node:path";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Find the Docker CLI on a `PATH` value.
|
|
17
|
+
* @param {string | undefined} [pathValue] - The `PATH` to search, in order;
|
|
18
|
+
* this process's own `PATH` when omitted, which is what a bare `docker`
|
|
19
|
+
* handed to `execFile` would search
|
|
20
|
+
* @returns {string} Absolute path of the first executable `docker`
|
|
21
|
+
* @throws {Error} When no directory on `PATH` holds an executable `docker`
|
|
22
|
+
*/
|
|
23
|
+
export function resolveDockerCli(pathValue = process.env.PATH) {
|
|
24
|
+
const directories = (pathValue ?? "")
|
|
25
|
+
.split(path.delimiter)
|
|
26
|
+
.filter(directory => path.isAbsolute(directory));
|
|
27
|
+
const found = directories
|
|
28
|
+
.map(directory => path.join(directory, "docker"))
|
|
29
|
+
.find(candidate => {
|
|
30
|
+
try {
|
|
31
|
+
accessSync(candidate, constants.X_OK);
|
|
32
|
+
return true;
|
|
33
|
+
} catch {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
if (found === undefined)
|
|
38
|
+
throw new Error("Docker CLI not found on PATH; install Docker first");
|
|
39
|
+
return found;
|
|
40
|
+
}
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
refuseHostApply,
|
|
16
16
|
snapshotFiles,
|
|
17
17
|
} from "./lib/packaged-apply-isolation.mjs";
|
|
18
|
+
import { resolveDockerCli } from "./lib/docker-cli.mjs";
|
|
18
19
|
|
|
19
20
|
const execute = promisify(execFile);
|
|
20
21
|
const packageRoot = path.resolve(import.meta.dirname, "..");
|
|
@@ -32,11 +33,12 @@ const harnesses = [
|
|
|
32
33
|
/**
|
|
33
34
|
* Bounded native command; no shell interpolation or operator credentials passed
|
|
34
35
|
* to the container. Docker itself retains its normal local daemon access.
|
|
36
|
+
* @param {string} cli - Absolute Docker CLI path, resolved once per run.
|
|
35
37
|
* @param {string[]} args - Literal Docker arguments.
|
|
36
38
|
* @returns {Promise<string>} Native stdout.
|
|
37
39
|
*/
|
|
38
|
-
async function docker(args) {
|
|
39
|
-
const result = await execute(
|
|
40
|
+
async function docker(cli, args) {
|
|
41
|
+
const result = await execute(cli, args, {
|
|
40
42
|
encoding: "utf8",
|
|
41
43
|
timeout: 25 * 60_000,
|
|
42
44
|
maxBuffer: 32 * 1024 * 1024,
|
|
@@ -92,12 +94,13 @@ async function main() {
|
|
|
92
94
|
output: { type: "string" },
|
|
93
95
|
preserve: { type: "string", multiple: true, default: [] },
|
|
94
96
|
"failure-control": { type: "boolean", default: false },
|
|
97
|
+
docker: { type: "string" },
|
|
95
98
|
help: { type: "boolean", default: false },
|
|
96
99
|
},
|
|
97
100
|
});
|
|
98
101
|
if (values.help) {
|
|
99
102
|
console.log(
|
|
100
|
-
"Usage: node scripts/verify-packaged-apply.mjs --backend docker --archive FILE --image IMAGE --output NEW_DIRECTORY [--harness codex|fleet|claude|cursor|opencode|agy|copilot|devin] [--preserve FILE ...] [--failure-control]"
|
|
103
|
+
"Usage: node scripts/verify-packaged-apply.mjs --backend docker --archive FILE --image IMAGE --output NEW_DIRECTORY [--docker ABSOLUTE_CLI] [--harness codex|fleet|claude|cursor|opencode|agy|copilot|devin] [--preserve FILE ...] [--failure-control]"
|
|
101
104
|
);
|
|
102
105
|
console.log(
|
|
103
106
|
"Default host preflight refuses without spawning apply. Build scripts/fixtures/packaged-apply/Dockerfile first. No host mounts or operator environment are forwarded."
|
|
@@ -125,6 +128,12 @@ async function main() {
|
|
|
125
128
|
"Docker verification requires --archive FILE --image IMAGE --output NEW_DIRECTORY"
|
|
126
129
|
);
|
|
127
130
|
}
|
|
131
|
+
// One absolute CLI for every Docker call in this run, so the binary that
|
|
132
|
+
// starts the container is the one that removes it. A caller that also cleans
|
|
133
|
+
// up passes the path it resolved; otherwise resolve it here, the same way.
|
|
134
|
+
const dockerCli = values.docker ?? resolveDockerCli();
|
|
135
|
+
if (!path.isAbsolute(dockerCli))
|
|
136
|
+
throw new Error("--docker must be an absolute path to the Docker CLI");
|
|
128
137
|
const archive = path.resolve(values.archive);
|
|
129
138
|
const archiveBytes = await readFile(archive);
|
|
130
139
|
const output = path.resolve(values.output);
|
|
@@ -157,7 +166,9 @@ async function main() {
|
|
|
157
166
|
];
|
|
158
167
|
const before = await snapshotFiles(files, path.join(output, "before-images"));
|
|
159
168
|
await record(output, "before.json", before);
|
|
160
|
-
const image = JSON.parse(
|
|
169
|
+
const image = JSON.parse(
|
|
170
|
+
await docker(dockerCli, ["image", "inspect", values.image])
|
|
171
|
+
)[0];
|
|
161
172
|
if (!/^sha256:[a-f0-9]{64}$/u.test(image?.Id ?? ""))
|
|
162
173
|
throw new Error("Unresolved Docker image identity");
|
|
163
174
|
let id;
|
|
@@ -166,7 +177,7 @@ async function main() {
|
|
|
166
177
|
let preservation = false;
|
|
167
178
|
try {
|
|
168
179
|
id = (
|
|
169
|
-
await docker([
|
|
180
|
+
await docker(dockerCli, [
|
|
170
181
|
"create",
|
|
171
182
|
"--name",
|
|
172
183
|
`lisa-verify-${randomUUID()}`,
|
|
@@ -202,7 +213,7 @@ async function main() {
|
|
|
202
213
|
...(values["failure-control"] ? ["failure-control"] : []),
|
|
203
214
|
])
|
|
204
215
|
).trim();
|
|
205
|
-
const inspected = JSON.parse(await docker(["inspect", id]))[0];
|
|
216
|
+
const inspected = JSON.parse(await docker(dockerCli, ["inspect", id]))[0];
|
|
206
217
|
assertDisposableContainer(inspected, id);
|
|
207
218
|
await record(output, "preflight.json", {
|
|
208
219
|
container_id: id,
|
|
@@ -241,13 +252,17 @@ async function main() {
|
|
|
241
252
|
operator_credentials_forwarded: false,
|
|
242
253
|
host_destinations: files,
|
|
243
254
|
});
|
|
244
|
-
await docker(["cp", ownedArchive, `${id}:/lisa-input.tgz`]);
|
|
245
|
-
await docker(
|
|
246
|
-
|
|
255
|
+
await docker(dockerCli, ["cp", ownedArchive, `${id}:/lisa-input.tgz`]);
|
|
256
|
+
await docker(dockerCli, [
|
|
257
|
+
"cp",
|
|
258
|
+
driverCopy,
|
|
259
|
+
`${id}:/lisa-verify-driver.mjs`,
|
|
260
|
+
]);
|
|
261
|
+
await docker(dockerCli, ["cp", casesCopy, `${id}:/lisa-guard-cases.json`]);
|
|
247
262
|
let stdout = "";
|
|
248
263
|
let childFailure;
|
|
249
264
|
try {
|
|
250
|
-
stdout = await docker(["start", "--attach", id]);
|
|
265
|
+
stdout = await docker(dockerCli, ["start", "--attach", id]);
|
|
251
266
|
} catch (error) {
|
|
252
267
|
stdout = error.stdout ?? "";
|
|
253
268
|
childFailure = error;
|
|
@@ -256,9 +271,9 @@ async function main() {
|
|
|
256
271
|
mode: 0o600,
|
|
257
272
|
flag: "wx",
|
|
258
273
|
});
|
|
259
|
-
const terminal = JSON.parse(await docker(["inspect", id]))[0];
|
|
274
|
+
const terminal = JSON.parse(await docker(dockerCli, ["inspect", id]))[0];
|
|
260
275
|
await record(output, "terminal.json", terminal.State);
|
|
261
|
-
await docker([
|
|
276
|
+
await docker(dockerCli, [
|
|
262
277
|
"cp",
|
|
263
278
|
`${id}:/lisa-proof.json`,
|
|
264
279
|
path.join(output, "native-proof.json"),
|
|
@@ -279,7 +294,7 @@ async function main() {
|
|
|
279
294
|
} finally {
|
|
280
295
|
// Stop every process in the owned namespace before examining host state.
|
|
281
296
|
try {
|
|
282
|
-
if (id) await docker(["rm", "--force", "--volumes", id]);
|
|
297
|
+
if (id) await docker(dockerCli, ["rm", "--force", "--volumes", id]);
|
|
283
298
|
} catch (error) {
|
|
284
299
|
cleanupError = error;
|
|
285
300
|
}
|