tamperward 2.39.14 → 2.39.16

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.
Files changed (2) hide show
  1. package/dist/cli/index.js +21 -3
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -21006,6 +21006,7 @@ var init_adapter3 = __esm({
21006
21006
  unsupported: [
21007
21007
  "pre-action deny enforcement not yet proven on a pinned Copilot CLI build (see probe:copilot-runtime)",
21008
21008
  "COMMAND preToolUse hook timeout fails OPEN on Copilot CLI: a timed-out hook lets the tool call proceed (crash / non-zero exit / exit 2 fail closed); an HTTP preToolUse hook fails OPEN on network error / timeout / non-2xx, so only the local command/exec transport is a qualification candidate",
21009
+ "a COMMAND preToolUse hook that exits 0 with empty or malformed stdout fails OPEN on Copilot CLI: no decision is read, so the default permission lets the tool call proceed",
21009
21010
  "preToolUse is the only PRE-EXECUTION tool veto; agentStop can only block turn completion and force continuation (a lifecycle control, not a filesystem veto), and Copilot overrides the hook after 8 consecutive blocks (stop_hook_active lifecycle); postToolUse observation is not yet consumed by this adapter",
21010
21011
  "apply_patch / str_replace_editor exact hook payloads are modelled from the published contract but not yet confirmed against a pinned real-run fixture (str_replace_editor sub-ops other than str_replace/create fail closed); a PascalCase Edit carrying a patch-style payload fails closed unless a fixture proves the Edit-field rewrite",
21011
21012
  "shell-session write tools (write_bash / write_powershell) are classified as mutation-capable shell ops; their exact hook payload is not yet confirmed against a pinned fixture, so an event carrying no reconstructable command/input fails closed",
@@ -21340,8 +21341,13 @@ function copilotSdkOperationKind(kind) {
21340
21341
  return "file-read";
21341
21342
  case "mcp":
21342
21343
  return "mcp";
21343
- default:
21344
+ case "":
21345
+ case "url":
21346
+ case "memory":
21347
+ case "hook":
21344
21348
  return "other";
21349
+ default:
21350
+ return "unknown";
21345
21351
  }
21346
21352
  }
21347
21353
  function str2(v) {
@@ -21379,8 +21385,13 @@ function argsFor(req2) {
21379
21385
  }
21380
21386
  return {};
21381
21387
  }
21388
+ function operationFrom(req2) {
21389
+ const kind = copilotSdkOperationKind(req2.kind);
21390
+ const name = kind === "unknown" ? req2.toolName || req2.kind || "" : req2.toolName ?? "";
21391
+ return { kind, name, args: argsFor(req2) };
21392
+ }
21382
21393
  function eventFrom4(req2, phase) {
21383
- const operation = phase === "end-of-turn" ? { kind: "other", name: "stop", args: {} } : { kind: copilotSdkOperationKind(req2.kind), name: req2.toolName ?? "", args: argsFor(req2) };
21394
+ const operation = phase === "end-of-turn" ? { kind: "other", name: "stop", args: {} } : operationFrom(req2);
21384
21395
  const identity2 = { claimedCwd: req2.cwd, sessionId: req2.sessionId };
21385
21396
  return { phase, operation, identity: identity2 };
21386
21397
  }
@@ -21488,7 +21499,8 @@ var init_adapter4 = __esm({
21488
21499
  * `onAgentStop` `{decision:"block",reason}` shape.
21489
21500
  * 5. `pre-action` + shell → the SAME `evaluate` engine over the reconstructed command.
21490
21501
  * 6. `pre-action` + file-edit → `unsupported` (content not surfaced; sweep is authority).
21491
- * 7. `pre-action` + read/mcp/other → no Change → allow.
21502
+ * 7. `pre-action` + an unmodelled permission kind → an `unknown-tool` deny.
21503
+ * 8. `pre-action` + read/mcp/other → no Change → allow.
21492
21504
  */
21493
21505
  decide(raw, phase, defaultCwd) {
21494
21506
  if (phase === "post-action") {
@@ -21517,6 +21529,12 @@ var init_adapter4 = __esm({
21517
21529
  const findings = swept.findings ? [...swept.findings] : [];
21518
21530
  return { outcome: "ok", wire: swept.stdout, decision: { verdict: swept.stdout ? "deny" : "allow", findings, reason: swept.stdout || void 0 } };
21519
21531
  }
21532
+ if (parsed.operation.kind === "unknown") {
21533
+ const detail = `unrecognized Copilot SDK permission request ${parsed.operation.name}; refusing to evaluate it as a no-op`;
21534
+ const findings = [unknownToolFinding("Copilot SDK", parsed.operation.name)];
21535
+ const wire = this.denyPayload(findings, "pre-action");
21536
+ return { outcome: "ok", wire, detail, decision: { verdict: "deny", findings, reason: wire } };
21537
+ }
21520
21538
  let stage = "repo-context";
21521
21539
  try {
21522
21540
  const root = idv.trustedRoot ?? repoRoot(defaultCwd ?? process.cwd());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamperward",
3
- "version": "2.39.14",
3
+ "version": "2.39.16",
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",