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