sessionpipe-conformance 0.1.1 → 0.2.0

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // sessionpipe-conformance 0.1.1 · Apache-2.0 · https://sessionpipe.org
1
+ // sessionpipe-conformance 0.2.0 · Apache-2.0 · https://sessionpipe.org
2
2
 
3
3
  // src/index.ts
4
4
  import { readFileSync as readFileSync6 } from "node:fs";
@@ -262,7 +262,7 @@ function entryFor(event, harness, cmd, o) {
262
262
  const matcher = o.matcherFor(event);
263
263
  return {
264
264
  ...matcher !== void 0 ? { matcher } : {},
265
- hooks: [{ type: "command", command: cmd([harness, event]).command, timeout: o.timeout }]
265
+ hooks: [{ type: "command", command: cmd([harness, event]).command, timeout: o.timeoutFor?.(event) ?? o.timeout }]
266
266
  };
267
267
  }
268
268
  function installClaudeShaped(file, harness, events, cmd, o) {
@@ -686,7 +686,13 @@ var CLAUDE_EVENTS = [
686
686
  ];
687
687
  var LEAN_SKIP = /* @__PURE__ */ new Set(["PreToolUse", "PostToolUseFailure"]);
688
688
  var eventsFor = (lean) => lean ? CLAUDE_EVENTS.filter((e) => !LEAN_SKIP.has(e)) : [...CLAUDE_EVENTS];
689
- var OPTS = { matcherFor: (e) => /Tool|Permission/.test(e) ? "" : void 0, timeout: 5 };
689
+ var OPTS = {
690
+ matcherFor: (e) => /Tool|Permission/.test(e) ? "" : void 0,
691
+ timeout: 5,
692
+ // The hook waits up to 125 s for a verified control answer, and only when control
693
+ // is paired on this machine; everywhere else it exits in milliseconds as before.
694
+ timeoutFor: (e) => e === "PermissionRequest" ? 130 : void 0
695
+ };
690
696
  var DESKTOP_ID = /^local_[A-Za-z0-9-]{1,64}$/;
691
697
  function claudeDirs(env = process.env, home = HOME) {
692
698
  const out = [];