@inerrata-corporation/errata 2.0.8-dev.2973 → 2.0.8-dev.2985

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/errata.mjs +8 -5
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -80338,7 +80338,7 @@ function createWatchBreaker(deps) {
80338
80338
  }
80339
80339
 
80340
80340
  // src/engine.ts
80341
- var DAEMON_VERSION = true ? "2.0.8-dev.2973" : "2.0.0-alpha.0";
80341
+ var DAEMON_VERSION = true ? "2.0.8-dev.2985" : "2.0.0-alpha.0";
80342
80342
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
80343
80343
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
80344
80344
  var GIT_OP_MUTE_MS = 4e3;
@@ -88548,13 +88548,13 @@ function buildCodexHooksToml(port, options) {
88548
88548
  const platform = options.platform ?? process.platform;
88549
88549
  const quote = (value) => {
88550
88550
  if (platform === "win32") {
88551
- if (/["%\r\n]/.test(value)) throw new Error("Unsupported character in Codex hook path");
88552
- return '"' + value + '"';
88551
+ if (/["\r\n]/.test(value)) throw new Error("Unsupported character in Codex hook path");
88552
+ return "'" + value.replace(/'/g, "''") + "'";
88553
88553
  }
88554
88554
  return "'" + value.replace(/'/g, "'\\''") + "'";
88555
88555
  };
88556
88556
  if (!Number.isInteger(port) || port < 1 || port > 65535) throw new Error("Invalid hook port");
88557
- const command = quote(options.nodePath) + " " + quote(options.relayPath) + " " + port;
88557
+ const command = (platform === "win32" ? "& " : "") + quote(options.nodePath) + " " + quote(options.relayPath) + " " + port;
88558
88558
  const handlers = ["SessionStart", "UserPromptSubmit", "PreToolUse", "PostToolUse", "Stop"].map(
88559
88559
  (event) => "[[hooks." + event + "]]\n" + (["UserPromptSubmit", "Stop"].includes(event) ? "" : 'matcher = ".*"\n') + "\n[[hooks." + event + '.hooks]]\ntype = "command"\ncommand = ' + JSON.stringify(command) + "\ntimeout = 10\n" + (event === "Stop" ? "" : "additionalContextLimit = 5000\n")
88560
88560
  );
@@ -88699,7 +88699,7 @@ function readCodexHookState(cwd, options = {}) {
88699
88699
  });
88700
88700
  });
88701
88701
  }
88702
- function assessCodexHooks(state) {
88702
+ function assessCodexHooks(state, platform = process.platform) {
88703
88703
  const check2 = (status, detail) => [{ id: "codex_hooks", status, detail }];
88704
88704
  if (state.errors?.length) return check2("fail", `Codex could not load hook configuration. ${CODEX_HOOK_REVIEW_HELP}`);
88705
88705
  if ((state.features?.hooks ?? state.features?.codex_hooks) === false) {
@@ -88709,6 +88709,9 @@ function assessCodexHooks(state) {
88709
88709
  const required2 = ["sessionStart", "userPromptSubmit", "preToolUse", "postToolUse", "stop"];
88710
88710
  const missing = required2.filter((event) => !hooks.some((h) => h.eventName === event));
88711
88711
  const checks = [];
88712
+ if (platform === "win32" && hooks.some((h) => /^"[^"]+"\s+"[^"]*[/\\]errata-relay\.mjs"\s+\d+$/.test(h.command ?? ""))) {
88713
+ checks.push(...check2("fail", `Installed Errata hooks use obsolete cmd.exe quoting and cannot run in PowerShell; run errata install-hooks codex here, then review the updated commands. ${CODEX_HOOK_REVIEW_HELP}`));
88714
+ }
88712
88715
  if (missing.length) checks.push(...check2("fail", `Errata hooks missing or outdated in this checkout (${missing.join(", ")}); run errata install-hooks codex here`));
88713
88716
  if (hooks.some((h) => !h.enabled)) checks.push(...check2("fail", `Errata hooks are disabled in Codex; left unchanged. ${CODEX_HOOK_REVIEW_HELP}`));
88714
88717
  if (hooks.some((h) => !["trusted", "managed"].includes(h.trustStatus))) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.8-dev.2973",
3
+ "version": "2.0.8-dev.2985",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {