@a2f0/agent-tool 0.1.18 → 0.1.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a2f0/agent-tool",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "packageManager": "bun@1.4.3",
5
5
  "type": "module",
6
6
  "description": "Portable cross-agent review, PR workflows, and shared skills",
@@ -1,10 +1,13 @@
1
- /** Disable object substitution and hooks, retaining existing Git config overrides. */
1
+ /** Keep machine reads free of hooks, object substitution, and signature display. */
2
2
  export function gitEnvironment(): NodeJS.ProcessEnv {
3
3
  const env: NodeJS.ProcessEnv = { ...process.env, GIT_NO_REPLACE_OBJECTS: "1" };
4
4
  const count = Number(env.GIT_CONFIG_COUNT ?? "0");
5
5
  if (!Number.isSafeInteger(count) || count < 0 || count > 1000) throw new Error("Invalid GIT_CONFIG_COUNT.");
6
- env.GIT_CONFIG_COUNT = String(count + 1);
6
+ env.GIT_CONFIG_COUNT = String(count + 2);
7
7
  env[`GIT_CONFIG_KEY_${count}`] = "core.hooksPath";
8
8
  env[`GIT_CONFIG_VALUE_${count}`] = "/dev/null";
9
+ // Display banners corrupt --format output; %G? still verifies signatures.
10
+ env[`GIT_CONFIG_KEY_${count + 1}`] = "log.showSignature";
11
+ env[`GIT_CONFIG_VALUE_${count + 1}`] = "false";
9
12
  return env;
10
13
  }
@@ -102,7 +102,7 @@ export function toolchainCommand(args: string[]): number {
102
102
  const supported = /^[a-z][a-z0-9-]*$/.test(executable) && expected !== null && /^\d+(?:\.\d+){1,3}$/.test(expected);
103
103
  const resolved = supported ? Bun.which(executable) : null;
104
104
  const version = resolved ? spawnSync(resolved, ["--version"], { encoding: "utf8", timeout: 5000, maxBuffer: 65536 }) : null;
105
- const actual = `${version?.stdout ?? ""}\n${version?.stderr ?? ""}`.match(/\b\d+\.\d+(?:\.\d+){0,2}\b/)?.[0] ?? null;
105
+ const actual = `${version?.stdout ?? ""}\n${version?.stderr ?? ""}`.match(/\bv?(\d+\.\d+(?:\.\d+){0,2})\b/)?.[1] ?? null;
106
106
  return { name, expected, resolved, actual, ok: supported && version?.status === 0 && (actual === expected || actual?.startsWith(`${expected}.`) === true), ...(supported ? {} : { reason: "Unsupported pin syntax; inspect manually." }) };
107
107
  });
108
108
  output({ ok: tools.length > 0 && tools.every(tool => tool.ok), file, tools }); return tools.length && tools.every(tool => tool.ok) ? 0 : 1;