tamperward 2.30.2 → 2.30.3
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/cli/index.js +48 -47
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -866,10 +866,10 @@ function headerPaths(line) {
|
|
|
866
866
|
first = rest.slice(0, mid);
|
|
867
867
|
rest = rest.slice(mid + 1);
|
|
868
868
|
} else {
|
|
869
|
-
const
|
|
870
|
-
if (
|
|
871
|
-
first =
|
|
872
|
-
rest =
|
|
869
|
+
const at = rest.lastIndexOf(" b/");
|
|
870
|
+
if (at < 0) return [null, null];
|
|
871
|
+
first = rest.slice(0, at);
|
|
872
|
+
rest = rest.slice(at + 1);
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
875
|
}
|
|
@@ -2874,7 +2874,6 @@ function expandShellPath(t, env = process.env) {
|
|
|
2874
2874
|
function hookTests(policy, ctx) {
|
|
2875
2875
|
const cwd = ctx?.cwd;
|
|
2876
2876
|
const diskCwd = cwd !== void 0 && existsSync3(cwd) ? cwd : void 0;
|
|
2877
|
-
const onDisk = diskCwd !== void 0;
|
|
2878
2877
|
const root = diskCwd !== void 0 ? canonicalPath(diskCwd) : cwd;
|
|
2879
2878
|
const memo = /* @__PURE__ */ new Map();
|
|
2880
2879
|
const rel = (t) => {
|
|
@@ -2938,7 +2937,7 @@ function shellHookTarget(seg, toks, policy, ctx) {
|
|
|
2938
2937
|
return null;
|
|
2939
2938
|
}
|
|
2940
2939
|
function shellWritesHook(seg, toks, policy, ctx) {
|
|
2941
|
-
const {
|
|
2940
|
+
const { hook, whole, holds, hookish } = hookTests(policy, ctx);
|
|
2942
2941
|
for (const m of seg.matchAll(REDIRECT_TARGET)) {
|
|
2943
2942
|
if (hook(m[1])) return "a redirect empties or rewrites a protected hook";
|
|
2944
2943
|
}
|
|
@@ -2947,7 +2946,6 @@ function shellWritesHook(seg, toks, policy, ctx) {
|
|
|
2947
2946
|
const cmd = (toks[at] ?? "").replace(/^.*\//, "");
|
|
2948
2947
|
const args = toks.slice(at + 1);
|
|
2949
2948
|
const positional = args.filter((a) => a !== "--" && !a.startsWith("-"));
|
|
2950
|
-
const last = positional[positional.length - 1] ?? "";
|
|
2951
2949
|
const anyHook = args.some(hook);
|
|
2952
2950
|
const inPlace = args.some((a) => /^-[A-Za-z]*i|^--in-place/.test(a));
|
|
2953
2951
|
const scripts = args.filter((_, i) => i > 0 && INLINE_FLAG.test(args[i - 1]));
|
|
@@ -11157,7 +11155,7 @@ function annotations(findings) {
|
|
|
11157
11155
|
});
|
|
11158
11156
|
}
|
|
11159
11157
|
function cell(s) {
|
|
11160
|
-
return stripControl(s).replace(/\s+/g, " ").replace(/\|/g, "\\|").trim();
|
|
11158
|
+
return stripControl(s).replace(/\s+/g, " ").replace(/\\/g, "\\\\").replace(/\|/g, "\\|").trim();
|
|
11161
11159
|
}
|
|
11162
11160
|
function mdCode(s) {
|
|
11163
11161
|
return s.replace(/`/g, "'").replace(/[\r\n]/g, " ");
|
|
@@ -14525,7 +14523,7 @@ function freezeRoot(kind, path) {
|
|
|
14525
14523
|
}
|
|
14526
14524
|
}
|
|
14527
14525
|
function shellTokens(command) {
|
|
14528
|
-
const matches = command.match(/(?:[^\s"'\\]
|
|
14526
|
+
const matches = command.match(/(?:[^\s"'\\]|"[^"\\]*(?:\\.[^"\\]*)*"|'[^']*')+/g) ?? [];
|
|
14529
14527
|
return matches.map((token) => {
|
|
14530
14528
|
if (token.startsWith("'") && token.endsWith("'") || token.startsWith('"') && token.endsWith('"')) return token.slice(1, -1);
|
|
14531
14529
|
return token;
|
|
@@ -15092,7 +15090,7 @@ if (child) {
|
|
|
15092
15090
|
// src/verifier-backend.ts
|
|
15093
15091
|
import { createHash as createHash11, randomUUID } from "node:crypto";
|
|
15094
15092
|
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
15095
|
-
import { accessSync as accessSync2, constants as constants3, readFileSync as
|
|
15093
|
+
import { accessSync as accessSync2, constants as constants3, readFileSync as readFileSync15, realpathSync as realpathSync7, statSync as statSync4 } from "node:fs";
|
|
15096
15094
|
import { delimiter as delimiter2, dirname as dirname7, join as join18, resolve as resolve7 } from "node:path";
|
|
15097
15095
|
function identity() {
|
|
15098
15096
|
const uid = typeof process.getuid === "function" ? process.getuid() : null;
|
|
@@ -15137,7 +15135,7 @@ function findExecutable(name) {
|
|
|
15137
15135
|
return null;
|
|
15138
15136
|
}
|
|
15139
15137
|
function fileSha256(path) {
|
|
15140
|
-
return createHash11("sha256").update(
|
|
15138
|
+
return createHash11("sha256").update(readFileSync15(path)).digest("hex");
|
|
15141
15139
|
}
|
|
15142
15140
|
function engineClientEnv() {
|
|
15143
15141
|
return {
|
|
@@ -15571,7 +15569,7 @@ var init_verifier_backend = __esm({
|
|
|
15571
15569
|
// src/cli/verify.ts
|
|
15572
15570
|
import { execFileSync as execFileSync8, spawnSync as spawnSync3 } from "node:child_process";
|
|
15573
15571
|
import { createHash as createHash12 } from "node:crypto";
|
|
15574
|
-
import { chmodSync as chmodSync2, cpSync, lstatSync as lstatSync9, mkdirSync as mkdirSync8, mkdtempSync as mkdtempSync3, readFileSync as
|
|
15572
|
+
import { chmodSync as chmodSync2, cpSync, lstatSync as lstatSync9, mkdirSync as mkdirSync8, mkdtempSync as mkdtempSync3, readFileSync as readFileSync16, readlinkSync as readlinkSync3, rmSync as rmSync7, symlinkSync, writeFileSync as writeFileSync9, existsSync as existsSync14 } from "node:fs";
|
|
15575
15573
|
import { tmpdir as tmpdir4 } from "node:os";
|
|
15576
15574
|
import { dirname as dirname8, isAbsolute as isAbsolute11, join as join19, relative as relative5, resolve as resolve8, sep as sep3 } from "node:path";
|
|
15577
15575
|
function oracleAssuranceReport() {
|
|
@@ -15792,7 +15790,7 @@ function overlayDigest(dest, paths) {
|
|
|
15792
15790
|
try {
|
|
15793
15791
|
const st = lstatSync9(p);
|
|
15794
15792
|
h.update(String(st.mode));
|
|
15795
|
-
h.update(st.isSymbolicLink() ? readlinkSync3(p) :
|
|
15793
|
+
h.update(st.isSymbolicLink() ? readlinkSync3(p) : readFileSync16(p));
|
|
15796
15794
|
} catch {
|
|
15797
15795
|
h.update("<gone>");
|
|
15798
15796
|
}
|
|
@@ -16506,7 +16504,7 @@ var init_verify = __esm({
|
|
|
16506
16504
|
// src/cli/run.ts
|
|
16507
16505
|
import { execFileSync as execFileSync9, spawn, spawnSync as spawnSync4 } from "node:child_process";
|
|
16508
16506
|
import { randomBytes as randomBytes3 } from "node:crypto";
|
|
16509
|
-
import { accessSync as accessSync3, constants as fsConstants, mkdtempSync as mkdtempSync4, readdirSync as readdirSync4, readFileSync as
|
|
16507
|
+
import { accessSync as accessSync3, constants as fsConstants, mkdtempSync as mkdtempSync4, readdirSync as readdirSync4, readFileSync as readFileSync17, readlinkSync as readlinkSync4, realpathSync as realpathSync8, rmSync as rmSync8, statSync as statSync5, writeFileSync as writeFileSync10 } from "node:fs";
|
|
16510
16508
|
import { tmpdir as tmpdir5 } from "node:os";
|
|
16511
16509
|
import { dirname as dirname9, join as join20, resolve as resolve9 } from "node:path";
|
|
16512
16510
|
function authoritativeRunLifecyclePlatform(platform = process.platform) {
|
|
@@ -16561,7 +16559,7 @@ function trustedLinuxPython(candidates = DEFAULT_TRUSTED_PYTHON_CANDIDATES) {
|
|
|
16561
16559
|
}
|
|
16562
16560
|
for (const candidate of candidates) {
|
|
16563
16561
|
try {
|
|
16564
|
-
const real =
|
|
16562
|
+
const real = realpathSync8(candidate);
|
|
16565
16563
|
const st = statSync5(real);
|
|
16566
16564
|
if (!st.isFile() || writableByCaller2(real)) continue;
|
|
16567
16565
|
const probe = spawnSync4(
|
|
@@ -16660,7 +16658,7 @@ function runAgentSupervised(argv, cwd, budgetSecs, linuxPythonCandidates, lifecy
|
|
|
16660
16658
|
}
|
|
16661
16659
|
let state = {};
|
|
16662
16660
|
try {
|
|
16663
|
-
state = JSON.parse(
|
|
16661
|
+
state = JSON.parse(readFileSync17(resultFile, "utf8"));
|
|
16664
16662
|
} catch {
|
|
16665
16663
|
return {
|
|
16666
16664
|
exit: 1,
|
|
@@ -16704,7 +16702,7 @@ function observerExited(pid) {
|
|
|
16704
16702
|
if (!pidAlive3(pid)) return true;
|
|
16705
16703
|
if (process.platform !== "linux") return false;
|
|
16706
16704
|
try {
|
|
16707
|
-
const stat =
|
|
16705
|
+
const stat = readFileSync17(`/proc/${pid}/stat`, "utf8");
|
|
16708
16706
|
const state = stat.slice(stat.lastIndexOf(")") + 2).split(" ")[0];
|
|
16709
16707
|
return state === "Z" || state === "X";
|
|
16710
16708
|
} catch (e) {
|
|
@@ -16826,7 +16824,7 @@ function git3(args, cwd) {
|
|
|
16826
16824
|
}
|
|
16827
16825
|
function nowTicks() {
|
|
16828
16826
|
try {
|
|
16829
|
-
return Math.floor(parseFloat(
|
|
16827
|
+
return Math.floor(parseFloat(readFileSync17("/proc/uptime", "utf8").split(" ")[0]) * 100);
|
|
16830
16828
|
} catch {
|
|
16831
16829
|
return Number.POSITIVE_INFINITY;
|
|
16832
16830
|
}
|
|
@@ -16835,7 +16833,7 @@ function survivorsHoldingTree(cwd, spawnedAfterTicks) {
|
|
|
16835
16833
|
const out3 = [];
|
|
16836
16834
|
let real;
|
|
16837
16835
|
try {
|
|
16838
|
-
real =
|
|
16836
|
+
real = realpathSync8(cwd);
|
|
16839
16837
|
} catch {
|
|
16840
16838
|
return out3;
|
|
16841
16839
|
}
|
|
@@ -16849,7 +16847,7 @@ function survivorsHoldingTree(cwd, spawnedAfterTicks) {
|
|
|
16849
16847
|
const n = Number(pid);
|
|
16850
16848
|
if (n === process.pid) continue;
|
|
16851
16849
|
try {
|
|
16852
|
-
const stat =
|
|
16850
|
+
const stat = readFileSync17(`/proc/${pid}/stat`, "utf8");
|
|
16853
16851
|
const startTicks = Number(stat.slice(stat.lastIndexOf(")") + 2).split(" ")[19]);
|
|
16854
16852
|
if (!Number.isFinite(startTicks) || startTicks < spawnedAfterTicks) continue;
|
|
16855
16853
|
} catch {
|
|
@@ -17421,7 +17419,7 @@ raise SystemExit(0)
|
|
|
17421
17419
|
|
|
17422
17420
|
// src/cli/doctor.ts
|
|
17423
17421
|
import { execFileSync as execFileSync10 } from "node:child_process";
|
|
17424
|
-
import { existsSync as existsSync15, readFileSync as
|
|
17422
|
+
import { existsSync as existsSync15, readFileSync as readFileSync18, readdirSync as readdirSync5 } from "node:fs";
|
|
17425
17423
|
import { join as join21, resolve as resolve10 } from "node:path";
|
|
17426
17424
|
function lifecyclePlatformCheck(platform = process.platform, linuxPython = platform === "linux" ? trustedLinuxPython() : null) {
|
|
17427
17425
|
if (platform === "linux") {
|
|
@@ -17480,7 +17478,7 @@ function pinsInFile(path) {
|
|
|
17480
17478
|
if (!existsSync15(path)) return [];
|
|
17481
17479
|
let src = "";
|
|
17482
17480
|
try {
|
|
17483
|
-
src =
|
|
17481
|
+
src = readFileSync18(path, "utf8");
|
|
17484
17482
|
} catch {
|
|
17485
17483
|
return [];
|
|
17486
17484
|
}
|
|
@@ -17507,7 +17505,7 @@ function workflowPermissionCheck(cwd, workflowRels = [".github/workflows/tamperw
|
|
|
17507
17505
|
}
|
|
17508
17506
|
let doc;
|
|
17509
17507
|
try {
|
|
17510
|
-
doc = yaml.parse(
|
|
17508
|
+
doc = yaml.parse(readFileSync18(path, "utf8"));
|
|
17511
17509
|
} catch (e) {
|
|
17512
17510
|
broken.push(`${rel} is not valid YAML (${e instanceof Error ? e.message : String(e)})`);
|
|
17513
17511
|
continue;
|
|
@@ -17931,7 +17929,7 @@ function diagnose(opts = {}) {
|
|
|
17931
17929
|
}
|
|
17932
17930
|
let doc;
|
|
17933
17931
|
try {
|
|
17934
|
-
doc = yaml.parse(
|
|
17932
|
+
doc = yaml.parse(readFileSync18(workflowPath, "utf8"));
|
|
17935
17933
|
} catch (e) {
|
|
17936
17934
|
return fail(
|
|
17937
17935
|
"ci-verifier",
|
|
@@ -18110,9 +18108,9 @@ import { execFileSync as execFileSync11, spawnSync as spawnSync5 } from "node:ch
|
|
|
18110
18108
|
import {
|
|
18111
18109
|
existsSync as existsSync16,
|
|
18112
18110
|
mkdtempSync as mkdtempSync5,
|
|
18113
|
-
readFileSync as
|
|
18111
|
+
readFileSync as readFileSync19,
|
|
18114
18112
|
readdirSync as readdirSync6,
|
|
18115
|
-
realpathSync as
|
|
18113
|
+
realpathSync as realpathSync9,
|
|
18116
18114
|
rmSync as rmSync9,
|
|
18117
18115
|
symlinkSync as symlinkSync2
|
|
18118
18116
|
} from "node:fs";
|
|
@@ -18129,7 +18127,7 @@ function parseStraceFileAccess(raw) {
|
|
|
18129
18127
|
const call = line.match(/\b(execveat|execve|openat2|openat|open|newfstatat|fstatat|statx|lstat|stat|access|readlinkat|readlink)\s*\(/);
|
|
18130
18128
|
if (!call) continue;
|
|
18131
18129
|
const afterCall = line.slice((call.index ?? 0) + call[0].length);
|
|
18132
|
-
const quoted = afterCall.match(/"((
|
|
18130
|
+
const quoted = afterCall.match(/"([^"\\]*(?:\\.[^"\\]*)*)"/);
|
|
18133
18131
|
if (!quoted) continue;
|
|
18134
18132
|
const path = unescapeStraceString(quoted[1]);
|
|
18135
18133
|
if (!path) continue;
|
|
@@ -18276,7 +18274,7 @@ function rewriteTraceRoot(accesses, actualRoot) {
|
|
|
18276
18274
|
if (!inside3(actualRoot, abs)) return { ...item, path: abs };
|
|
18277
18275
|
const rel = relative6(actualRoot, abs).split(sep4).join("/");
|
|
18278
18276
|
try {
|
|
18279
|
-
const real = resolve11(
|
|
18277
|
+
const real = resolve11(realpathSync9(abs));
|
|
18280
18278
|
if (!inside3(actualRoot, real)) return { ...item, path: real };
|
|
18281
18279
|
} catch {
|
|
18282
18280
|
}
|
|
@@ -18315,7 +18313,7 @@ function straceOnce(root, command, budget) {
|
|
|
18315
18313
|
}
|
|
18316
18314
|
);
|
|
18317
18315
|
const logs = traced.error ? [] : traceFiles(prefix);
|
|
18318
|
-
const accesses = logs.flatMap((path) => parseStraceFileAccess(
|
|
18316
|
+
const accesses = logs.flatMap((path) => parseStraceFileAccess(readFileSync19(path, "utf8")));
|
|
18319
18317
|
const raw = {
|
|
18320
18318
|
spawnError: traced.error ? traced.error.message : null,
|
|
18321
18319
|
status: traced.status,
|
|
@@ -18545,7 +18543,7 @@ var init_trace_verify = __esm({
|
|
|
18545
18543
|
});
|
|
18546
18544
|
|
|
18547
18545
|
// src/runtimes.ts
|
|
18548
|
-
import { existsSync as existsSync17, readFileSync as
|
|
18546
|
+
import { existsSync as existsSync17, readFileSync as readFileSync20 } from "node:fs";
|
|
18549
18547
|
import { join as join23 } from "node:path";
|
|
18550
18548
|
function isRecord4(x) {
|
|
18551
18549
|
return typeof x === "object" && x !== null && !Array.isArray(x);
|
|
@@ -18576,7 +18574,7 @@ function claudeSettingsBeyondTamperward(cwd) {
|
|
|
18576
18574
|
let raw;
|
|
18577
18575
|
try {
|
|
18578
18576
|
if (!existsSync17(path)) return false;
|
|
18579
|
-
raw =
|
|
18577
|
+
raw = readFileSync20(path, "utf8");
|
|
18580
18578
|
} catch {
|
|
18581
18579
|
return false;
|
|
18582
18580
|
}
|
|
@@ -18683,7 +18681,7 @@ var init_runtimes = __esm({
|
|
|
18683
18681
|
|
|
18684
18682
|
// src/cli/onboard.ts
|
|
18685
18683
|
import { execFileSync as execFileSync12 } from "node:child_process";
|
|
18686
|
-
import { lstatSync as lstatSync10, mkdtempSync as mkdtempSync6, readFileSync as
|
|
18684
|
+
import { lstatSync as lstatSync10, mkdtempSync as mkdtempSync6, readFileSync as readFileSync21, realpathSync as realpathSync10, rmSync as rmSync10 } from "node:fs";
|
|
18687
18685
|
import { tmpdir as tmpdir7 } from "node:os";
|
|
18688
18686
|
import { join as join24, relative as relative7, resolve as resolve12, sep as sep5 } from "node:path";
|
|
18689
18687
|
import { createInterface } from "node:readline";
|
|
@@ -18756,7 +18754,7 @@ function writeVerifyCommand(cwd, command) {
|
|
|
18756
18754
|
return `${POLICY_FILE} is not a regular file; refusing to follow or replace a symlink or special file`;
|
|
18757
18755
|
}
|
|
18758
18756
|
const mode = existingMode(path, 420);
|
|
18759
|
-
const original = kind === "file" ?
|
|
18757
|
+
const original = kind === "file" ? readFileSync21(path, "utf8") : null;
|
|
18760
18758
|
let next;
|
|
18761
18759
|
try {
|
|
18762
18760
|
const doc = parseDocument(original && original.trim() ? original : "version: 1\n");
|
|
@@ -18816,7 +18814,7 @@ async function runOnboard(opts, io = {}) {
|
|
|
18816
18814
|
const cwd = resolve12(rootText);
|
|
18817
18815
|
let sameRoot = cwd === requestedCwd;
|
|
18818
18816
|
try {
|
|
18819
|
-
sameRoot =
|
|
18817
|
+
sameRoot = realpathSync10(cwd) === realpathSync10(requestedCwd);
|
|
18820
18818
|
} catch {
|
|
18821
18819
|
}
|
|
18822
18820
|
if (!sameRoot) {
|
|
@@ -19156,8 +19154,8 @@ function runDemo(cwd, head, runners, out3) {
|
|
|
19156
19154
|
let worktreeRoot;
|
|
19157
19155
|
let realTarget;
|
|
19158
19156
|
try {
|
|
19159
|
-
worktreeRoot =
|
|
19160
|
-
realTarget =
|
|
19157
|
+
worktreeRoot = realpathSync10(wt);
|
|
19158
|
+
realTarget = realpathSync10(targetPath);
|
|
19161
19159
|
} catch {
|
|
19162
19160
|
out3("Demo skipped: the selected test could not be resolved safely inside the disposable worktree.");
|
|
19163
19161
|
return;
|
|
@@ -19341,8 +19339,8 @@ var init_capture = __esm({
|
|
|
19341
19339
|
});
|
|
19342
19340
|
|
|
19343
19341
|
// src/research/manifest.ts
|
|
19344
|
-
import { createHash as
|
|
19345
|
-
import { readFileSync as
|
|
19342
|
+
import { createHash as createHash13 } from "node:crypto";
|
|
19343
|
+
import { readFileSync as readFileSync22 } from "node:fs";
|
|
19346
19344
|
import { dirname as dirname10, resolve as resolve14 } from "node:path";
|
|
19347
19345
|
function taskFrom(raw, index, manifestDir) {
|
|
19348
19346
|
const where = `task #${index + 1}`;
|
|
@@ -19376,7 +19374,7 @@ function readManifest(path) {
|
|
|
19376
19374
|
const abs = resolve14(path);
|
|
19377
19375
|
let bytes;
|
|
19378
19376
|
try {
|
|
19379
|
-
bytes =
|
|
19377
|
+
bytes = readFileSync22(abs);
|
|
19380
19378
|
} catch (e) {
|
|
19381
19379
|
throw new ResearchError(`cannot read task manifest ${abs}: ${e instanceof Error ? e.message : String(e)}`);
|
|
19382
19380
|
}
|
|
@@ -19399,7 +19397,7 @@ function readManifest(path) {
|
|
|
19399
19397
|
if (seen.has(t.id)) throw new ResearchError(`task manifest ${abs}: duplicate task id "${t.id}"`);
|
|
19400
19398
|
seen.add(t.id);
|
|
19401
19399
|
}
|
|
19402
|
-
return { path: abs, sha256:
|
|
19400
|
+
return { path: abs, sha256: createHash13("sha256").update(bytes).digest("hex"), tasks };
|
|
19403
19401
|
}
|
|
19404
19402
|
var MANIFEST_VERSION;
|
|
19405
19403
|
var init_manifest = __esm({
|
|
@@ -19588,7 +19586,7 @@ var init_record = __esm({
|
|
|
19588
19586
|
|
|
19589
19587
|
// src/research/run.ts
|
|
19590
19588
|
import { execFileSync as execFileSync13 } from "node:child_process";
|
|
19591
|
-
import { existsSync as existsSync18, mkdirSync as mkdirSync9, readFileSync as
|
|
19589
|
+
import { existsSync as existsSync18, mkdirSync as mkdirSync9, readFileSync as readFileSync23, renameSync as renameSync4, rmSync as rmSync11, writeFileSync as writeFileSync11 } from "node:fs";
|
|
19592
19590
|
import { join as join25, resolve as resolve15 } from "node:path";
|
|
19593
19591
|
function git6(args, cwd) {
|
|
19594
19592
|
return execFileSync13("git", args, { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }).trim();
|
|
@@ -19599,7 +19597,7 @@ function pairRecordPath(ledger, task, pair) {
|
|
|
19599
19597
|
function resumableRecord(path, expected) {
|
|
19600
19598
|
let raw;
|
|
19601
19599
|
try {
|
|
19602
|
-
raw = JSON.parse(
|
|
19600
|
+
raw = JSON.parse(readFileSync23(path, "utf8"));
|
|
19603
19601
|
} catch (e) {
|
|
19604
19602
|
throw new ResearchError(`ledger record ${path} is malformed (${errorMessage(e).split("\n")[0]}); remove it to regenerate the pair, or use a new --out`);
|
|
19605
19603
|
}
|
|
@@ -19639,12 +19637,15 @@ function writeRecordAtomically(path, text) {
|
|
|
19639
19637
|
writeFileSync11(tmp, text);
|
|
19640
19638
|
renameSync4(tmp, path);
|
|
19641
19639
|
}
|
|
19640
|
+
function cloneArgs(repo, ws3) {
|
|
19641
|
+
return ["-c", "protocol.ext.allow=never", "clone", "-q", "--no-hardlinks", "--", repo, ws3];
|
|
19642
|
+
}
|
|
19642
19643
|
function freshWorkspace(ledger, task, pair, arm, sourceBase) {
|
|
19643
19644
|
const ws3 = join25(ledger, "workspaces", `${task.id}--${pair}--${arm}`);
|
|
19644
19645
|
rmSync11(ws3, { recursive: true, force: true });
|
|
19645
19646
|
mkdirSync9(join25(ledger, "workspaces"), { recursive: true });
|
|
19646
19647
|
try {
|
|
19647
|
-
execFileSync13("git",
|
|
19648
|
+
execFileSync13("git", cloneArgs(task.repo, ws3), { stdio: ["ignore", "ignore", "pipe"], encoding: "utf8" });
|
|
19648
19649
|
} catch (e) {
|
|
19649
19650
|
throw new ResearchError(`task "${task.id}": cannot clone ${task.repo}: ${errorMessage(e).split("\n")[0]}`);
|
|
19650
19651
|
}
|
|
@@ -20022,7 +20023,7 @@ var init_run2 = __esm({
|
|
|
20022
20023
|
});
|
|
20023
20024
|
|
|
20024
20025
|
// src/research/summarize.ts
|
|
20025
|
-
import { readdirSync as readdirSync7, readFileSync as
|
|
20026
|
+
import { readdirSync as readdirSync7, readFileSync as readFileSync24 } from "node:fs";
|
|
20026
20027
|
import { join as join26, resolve as resolve16 } from "node:path";
|
|
20027
20028
|
function readLedger2(dir) {
|
|
20028
20029
|
const pairsDir = join26(resolve16(dir), "pairs");
|
|
@@ -20037,7 +20038,7 @@ function readLedger2(dir) {
|
|
|
20037
20038
|
const path = join26(pairsDir, n);
|
|
20038
20039
|
let raw;
|
|
20039
20040
|
try {
|
|
20040
|
-
raw = JSON.parse(
|
|
20041
|
+
raw = JSON.parse(readFileSync24(path, "utf8"));
|
|
20041
20042
|
} catch (e) {
|
|
20042
20043
|
throw new ResearchError(`ledger record ${path} is not valid JSON: ${errorMessage(e)}`);
|
|
20043
20044
|
}
|
|
@@ -20744,7 +20745,7 @@ var init_main = __esm({
|
|
|
20744
20745
|
// src/cli/index.ts
|
|
20745
20746
|
init_hook_client();
|
|
20746
20747
|
init_exit();
|
|
20747
|
-
import { readFileSync as
|
|
20748
|
+
import { readFileSync as readFileSync25 } from "node:fs";
|
|
20748
20749
|
function loadMain() {
|
|
20749
20750
|
return Promise.resolve().then(() => (init_main(), main_exports));
|
|
20750
20751
|
}
|
|
@@ -20757,7 +20758,7 @@ async function launch(argv) {
|
|
|
20757
20758
|
if (kind && hookServiceEnabled()) {
|
|
20758
20759
|
let raw = null;
|
|
20759
20760
|
try {
|
|
20760
|
-
raw =
|
|
20761
|
+
raw = readFileSync25(0, "utf8");
|
|
20761
20762
|
} catch {
|
|
20762
20763
|
raw = null;
|
|
20763
20764
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamperward",
|
|
3
|
-
"version": "2.30.
|
|
3
|
+
"version": "2.30.3",
|
|
4
4
|
"description": "The deterministic agent-integrity gate. One ruleset, evaluated on the actual diff/commands as a verdict, enforced everywhere a change can be made.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "hexrift",
|