tamperward 2.29.16 → 2.29.18
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/README.md +1 -1
- package/dist/cli/index.js +25 -10
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -10747,6 +10747,9 @@ function validate(r, where) {
|
|
|
10747
10747
|
const v = r.verify;
|
|
10748
10748
|
const { command, budget, inputs, backend, image } = v;
|
|
10749
10749
|
if (command !== void 0 && typeof command !== "string") bad2(`verify.command must be a string, got ${show(command)}`);
|
|
10750
|
+
if (typeof command !== "string" || command.trim() === "") {
|
|
10751
|
+
bad2(`verify.command is required and must be a non-empty command when a verify block is present, got ${show(command)}`);
|
|
10752
|
+
}
|
|
10750
10753
|
if (budget !== void 0 && !(typeof budget === "number" && Number.isFinite(budget) && budget > 0)) {
|
|
10751
10754
|
bad2(`verify.budget must be a positive number of seconds, got ${show(budget)}`);
|
|
10752
10755
|
}
|
|
@@ -14903,17 +14906,29 @@ function finish(extra) {
|
|
|
14903
14906
|
done = true;
|
|
14904
14907
|
if (descendantTracker) clearInterval(descendantTracker);
|
|
14905
14908
|
if (drainTimer) clearTimeout(drainTimer);
|
|
14909
|
+
// fd 1 is the reserved result channel (suite streams are separate pipes).
|
|
14910
|
+
// Write synchronously: process.stdout.write is async on a POSIX pipe, so an
|
|
14911
|
+
// immediate process.exit(0) can truncate the result before it flushes.
|
|
14912
|
+
const buf = Buffer.from(JSON.stringify({
|
|
14913
|
+
...exitInfo,
|
|
14914
|
+
timedOut,
|
|
14915
|
+
...extra,
|
|
14916
|
+
stdout: diag(stdout),
|
|
14917
|
+
stderr: diag(stderr),
|
|
14918
|
+
}), 'utf8');
|
|
14919
|
+
let offset = 0;
|
|
14906
14920
|
try {
|
|
14907
|
-
|
|
14908
|
-
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14921
|
+
while (offset < buf.length) {
|
|
14922
|
+
try {
|
|
14923
|
+
offset += fs.writeSync(1, buf, offset, buf.length - offset);
|
|
14924
|
+
} catch (e) {
|
|
14925
|
+
if (e && e.code === 'EAGAIN') continue;
|
|
14926
|
+
throw e;
|
|
14927
|
+
}
|
|
14928
|
+
}
|
|
14929
|
+
} catch {
|
|
14930
|
+
process.exit(1);
|
|
14931
|
+
}
|
|
14917
14932
|
process.exit(0);
|
|
14918
14933
|
}
|
|
14919
14934
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamperward",
|
|
3
|
-
"version": "2.29.
|
|
3
|
+
"version": "2.29.18",
|
|
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",
|