tamperward 2.30.6 → 2.31.1
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 +10 -5
- package/package.json +4 -2
package/dist/cli/index.js
CHANGED
|
@@ -12476,7 +12476,7 @@ function verdict(blocks2, kind, audit) {
|
|
|
12476
12476
|
});
|
|
12477
12477
|
}
|
|
12478
12478
|
const reason = formatDenial(blocks2);
|
|
12479
|
-
return { exitCode: 0, stdout: denyWire(reason, kind) };
|
|
12479
|
+
return { exitCode: 0, stdout: denyWire(reason, kind), findings: blocks2 };
|
|
12480
12480
|
}
|
|
12481
12481
|
function fileChanges(changes) {
|
|
12482
12482
|
return changes.filter((c) => c.kind === "file");
|
|
@@ -19275,6 +19275,9 @@ function taskEnv(task) {
|
|
|
19275
19275
|
...task.model !== void 0 ? { TAMPERWARD_RESEARCH_MODEL: task.model } : {}
|
|
19276
19276
|
};
|
|
19277
19277
|
}
|
|
19278
|
+
function substitutePlaceholders(template, task) {
|
|
19279
|
+
return template.replace(PLACEHOLDER_PATTERN, (token) => PLACEHOLDERS[token](task));
|
|
19280
|
+
}
|
|
19278
19281
|
function normalizeCommandArgv(argv, cwd = process.cwd()) {
|
|
19279
19282
|
if (argv.length === 0) {
|
|
19280
19283
|
throw new ResearchError('the command adapter needs an agent command after "--"');
|
|
@@ -19288,9 +19291,7 @@ function commandAdapter(argv, cwd = process.cwd()) {
|
|
|
19288
19291
|
name: "command",
|
|
19289
19292
|
layers: ["envelope"],
|
|
19290
19293
|
launch(task) {
|
|
19291
|
-
const substituted = anchored.map(
|
|
19292
|
-
(arg) => Object.entries(PLACEHOLDERS).reduce((acc2, [token, value]) => acc2.split(token).join(value(task)), arg)
|
|
19293
|
-
);
|
|
19294
|
+
const substituted = anchored.map((arg) => substitutePlaceholders(arg, task));
|
|
19294
19295
|
return { argv: substituted, env: taskEnv(task) };
|
|
19295
19296
|
}
|
|
19296
19297
|
};
|
|
@@ -19319,7 +19320,7 @@ function resolveAdapter(name, argv, model) {
|
|
|
19319
19320
|
if (name === "claude-code") return claudeCodeAdapter(model);
|
|
19320
19321
|
throw new ResearchError(`unknown adapter "${name}" (built-in adapters: ${BUILTIN_ADAPTERS.join(", ")})`);
|
|
19321
19322
|
}
|
|
19322
|
-
var ADAPTER_LAYERS, RESEARCH_ARMS, BUILTIN_ADAPTERS, ResearchError, PLACEHOLDERS;
|
|
19323
|
+
var ADAPTER_LAYERS, RESEARCH_ARMS, BUILTIN_ADAPTERS, ResearchError, PLACEHOLDERS, PLACEHOLDER_PATTERN;
|
|
19323
19324
|
var init_adapter = __esm({
|
|
19324
19325
|
"src/research/adapter.ts"() {
|
|
19325
19326
|
"use strict";
|
|
@@ -19337,6 +19338,10 @@ var init_adapter = __esm({
|
|
|
19337
19338
|
"{arm}": (t) => t.arm,
|
|
19338
19339
|
"{model}": (t) => t.model ?? ""
|
|
19339
19340
|
};
|
|
19341
|
+
PLACEHOLDER_PATTERN = new RegExp(
|
|
19342
|
+
Object.keys(PLACEHOLDERS).map((token) => token.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"),
|
|
19343
|
+
"g"
|
|
19344
|
+
);
|
|
19340
19345
|
}
|
|
19341
19346
|
});
|
|
19342
19347
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamperward",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.31.1",
|
|
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",
|
|
@@ -48,7 +48,9 @@
|
|
|
48
48
|
"test:watch": "vitest",
|
|
49
49
|
"test:perf-smoke": "vitest run --config vitest.perf-smoke.config.ts --no-file-parallelism",
|
|
50
50
|
"check": "node dist/cli/index.js check",
|
|
51
|
-
"probe:codex-runtime": "node harness/adapters/codex-probe.mjs"
|
|
51
|
+
"probe:codex-runtime": "node harness/adapters/codex-probe.mjs",
|
|
52
|
+
"probe:copilot-runtime": "node harness/adapters/copilot-probe.mjs",
|
|
53
|
+
"spike:copilot-sdk": "node harness/adapters/copilot-sdk-spike.mjs"
|
|
52
54
|
},
|
|
53
55
|
"dependencies": {
|
|
54
56
|
"picomatch": "^4.0.2",
|