@pushary/agent-hooks 0.95.2 → 0.95.5

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 (98) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +1 -1
  3. package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
  4. package/data/cursor-plugin/CHANGELOG.md +5 -0
  5. package/data/cursor-plugin/README.md +6 -8
  6. package/data/cursor-plugin/hooks/hooks.json +56 -1
  7. package/data/cursor-plugin/scripts/pushary-gate.mjs +120 -71
  8. package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
  9. package/data/vscode-plugin/CHANGELOG.md +5 -0
  10. package/data/vscode-plugin/README.md +7 -15
  11. package/data/vscode-plugin/hooks/hooks.json +49 -0
  12. package/data/vscode-plugin/scripts/pushary-gate.mjs +208 -88
  13. package/dist/bin/pushary-bell-hook.js +20 -22
  14. package/dist/bin/pushary-bell.js +9 -11
  15. package/dist/bin/pushary-claude.js +58 -46
  16. package/dist/bin/pushary-clean.js +21 -20
  17. package/dist/bin/pushary-codex-bridge.js +120 -25
  18. package/dist/bin/pushary-codex-hook.js +43 -63
  19. package/dist/bin/pushary-codex.js +11 -10
  20. package/dist/bin/pushary-connect.js +8 -10
  21. package/dist/bin/pushary-cowork.js +5 -5
  22. package/dist/bin/pushary-daemon.js +26 -28
  23. package/dist/bin/pushary-disconnect.js +11 -10
  24. package/dist/bin/pushary-doctor.js +25 -25
  25. package/dist/bin/pushary-elicitation-hook.js +30 -31
  26. package/dist/bin/pushary-gemini-bridge.js +9 -11
  27. package/dist/bin/pushary-gemini-hook.js +45 -79
  28. package/dist/bin/pushary-hook.js +27 -29
  29. package/dist/bin/pushary-login.js +57 -31
  30. package/dist/bin/pushary-logout.js +6 -8
  31. package/dist/bin/pushary-mode.js +5 -5
  32. package/dist/bin/pushary-notification-hook.js +22 -24
  33. package/dist/bin/pushary-opencode-hook.js +38 -74
  34. package/dist/bin/pushary-permission-denied-hook.js +25 -27
  35. package/dist/bin/pushary-permission-hook.js +25 -27
  36. package/dist/bin/pushary-post-hook.js +22 -24
  37. package/dist/bin/pushary-prompt-hook.js +22 -24
  38. package/dist/bin/pushary-session-end-hook.js +22 -24
  39. package/dist/bin/pushary-session-start-hook.js +25 -27
  40. package/dist/bin/pushary-setup.js +78 -55
  41. package/dist/bin/pushary-stats.js +4 -4
  42. package/dist/bin/pushary-status.js +10 -12
  43. package/dist/bin/pushary-stop-hook.js +22 -24
  44. package/dist/bin/pushary-stopfailure-hook.js +22 -24
  45. package/dist/bin/pushary-suggestions.js +2 -2
  46. package/dist/bin/pushary-transcript-register.js +18 -20
  47. package/dist/bin/pushary-transcripts.js +7 -9
  48. package/dist/bin/pushary-upgrade.js +17 -19
  49. package/dist/bin/pushary-wait.js +5 -5
  50. package/dist/bin/pushary.js +1 -1
  51. package/dist/{chunk-7LUFYRH4.js → chunk-2D7BAOMY.js} +7 -7
  52. package/dist/{chunk-3ZUTNTZA.js → chunk-2ZTL3PGN.js} +1 -1
  53. package/dist/{chunk-EPFDN2ZT.js → chunk-32RMQO5Z.js} +1 -1
  54. package/dist/{chunk-EZIEXHYM.js → chunk-3AJIK5AO.js} +5 -2
  55. package/dist/{chunk-IPHOUBTU.js → chunk-4PX4QK2Z.js} +1 -1
  56. package/dist/{chunk-UW4LWAWY.js → chunk-4RF52LSU.js} +8 -8
  57. package/dist/{chunk-UOTSWS5N.js → chunk-67YNQ3QA.js} +43 -98
  58. package/dist/{chunk-G4TL4YWH.js → chunk-6AEM5RCS.js} +1 -1
  59. package/dist/{chunk-G24SEVCI.js → chunk-6VANQN5Q.js} +3 -7
  60. package/dist/{chunk-CKOLDI47.js → chunk-BDI2MXTT.js} +2 -2
  61. package/dist/{chunk-YKLCWWEI.js → chunk-BMANRGJQ.js} +1 -1
  62. package/dist/{chunk-2XUPP4WM.js → chunk-CUEZMPLJ.js} +1 -1
  63. package/dist/{chunk-A4R6BZCK.js → chunk-D62EONG3.js} +1 -1
  64. package/dist/{chunk-ZDAT5KMU.js → chunk-D6PRC3YQ.js} +1 -1
  65. package/dist/{chunk-MOY5X6HJ.js → chunk-DLLAWCQB.js} +1 -1
  66. package/dist/{chunk-DSTLA2TC.js → chunk-GOPIMNVC.js} +1 -1
  67. package/dist/{chunk-CH6DTGQR.js → chunk-HBHEX3JQ.js} +3 -3
  68. package/dist/{chunk-DNVDKHQD.js → chunk-HCMM3BOW.js} +226 -58
  69. package/dist/{chunk-76XICHYT.js → chunk-HGUZOUB2.js} +4 -4
  70. package/dist/{chunk-E3NF5CL2.js → chunk-HQIVR7MM.js} +6 -3
  71. package/dist/{chunk-JDFB3YKG.js → chunk-I6GZX3FT.js} +3 -3
  72. package/dist/{chunk-3OXHYPZG.js → chunk-IM2A5H33.js} +4 -1
  73. package/dist/{chunk-V27AHID3.js → chunk-IVQMNLSA.js} +3 -14
  74. package/dist/{chunk-4LL6LG5X.js → chunk-KAVDAZ7A.js} +43 -1
  75. package/dist/chunk-KBITFQST.js +6 -0
  76. package/dist/{chunk-AMZJ3CKW.js → chunk-KI4PA7MQ.js} +1 -1
  77. package/dist/{chunk-IAEXPTXA.js → chunk-N4VNLISN.js} +2 -2
  78. package/dist/{chunk-VX3BWMC5.js → chunk-OEKFD5BC.js} +1 -1
  79. package/dist/{chunk-QF4RI5CD.js → chunk-OI3DJA7N.js} +1 -1
  80. package/dist/{chunk-WB2C7VPF.js → chunk-OW6AZDY2.js} +3 -3
  81. package/dist/{chunk-4XXUHWIK.js → chunk-QHWXUNMN.js} +1 -1
  82. package/dist/{chunk-M7WWEFG6.js → chunk-QQGNFHIK.js} +2 -2
  83. package/dist/{chunk-YJAQRKH5.js → chunk-RLXVW4AM.js} +1 -1
  84. package/dist/{chunk-GUVCYYDK.js → chunk-S5CMLR35.js} +94 -15
  85. package/dist/{chunk-EUAQ4YAN.js → chunk-UCS65VVR.js} +1 -1
  86. package/dist/{chunk-WM5XMCID.js → chunk-VOSGZ6PH.js} +4 -4
  87. package/dist/{chunk-QUE76J4H.js → chunk-VTO3TNIB.js} +1 -1
  88. package/dist/{chunk-6FAHPGCZ.js → chunk-WDKHZRAS.js} +183 -25
  89. package/dist/{chunk-5GLPYGKS.js → chunk-WRDLHR2F.js} +2 -2
  90. package/dist/{chunk-RVSEGFPD.js → chunk-XLOELLAS.js} +9 -4
  91. package/dist/chunk-XS33QBJA.js +112 -0
  92. package/dist/{chunk-FQUV5KTM.js → chunk-Z2UWFEJW.js} +8 -8
  93. package/dist/src/index.d.ts +8 -1
  94. package/dist/src/index.js +11 -12
  95. package/package.json +1 -1
  96. package/dist/chunk-BC3VCZ3E.js +0 -86
  97. package/dist/chunk-RER3FRTD.js +0 -265
  98. package/dist/chunk-X7YWD6IS.js +0 -44
@@ -1,16 +1,17 @@
1
1
  import {
2
2
  defersToNativeMode
3
- } from "./chunk-A4R6BZCK.js";
3
+ } from "./chunk-D62EONG3.js";
4
4
  import {
5
5
  isGatingMoment,
6
6
  recordKeylessMoment
7
- } from "./chunk-EUAQ4YAN.js";
7
+ } from "./chunk-UCS65VVR.js";
8
8
  import {
9
9
  denyReasonFrom,
10
10
  isDeferAnswer
11
11
  } from "./chunk-YHG74UFF.js";
12
12
  import {
13
13
  CLAUDE_CODE_AGENT,
14
+ DEFAULT_SESSION,
14
15
  fetchModeState,
15
16
  getPolicy,
16
17
  readLastPrompt,
@@ -19,15 +20,15 @@ import {
19
20
  reportEvent,
20
21
  settleQuestionsForToolUse,
21
22
  throttlePass
22
- } from "./chunk-DNVDKHQD.js";
23
+ } from "./chunk-HCMM3BOW.js";
23
24
  import {
24
- DEFAULT_SESSION,
25
+ DECISION_STOP_REASON,
25
26
  askUser,
26
- cancelQuestion,
27
- pollForAnswer,
28
- savePendingQuestion,
29
- sendNotification
30
- } from "./chunk-RER3FRTD.js";
27
+ isDecisionStopped,
28
+ isLocalQuestionHandoff,
29
+ sendNotification,
30
+ waitForQuestion
31
+ } from "./chunk-XS33QBJA.js";
31
32
  import {
32
33
  UNNAMED_ACTION,
33
34
  deriveAction,
@@ -37,14 +38,10 @@ import {
37
38
  describeToolCall,
38
39
  permissionDeniedAction,
39
40
  scopePathFor
40
- } from "./chunk-CKOLDI47.js";
41
- import {
42
- PRETOOLUSE_HANDLED_TOOLS,
43
- PRETOOLUSE_PHONE_ANSWERED_TOOLS
44
- } from "./chunk-V27AHID3.js";
41
+ } from "./chunk-BDI2MXTT.js";
45
42
  import {
46
43
  getMachineId
47
- } from "./chunk-IAEXPTXA.js";
44
+ } from "./chunk-N4VNLISN.js";
48
45
  import {
49
46
  getApiKey,
50
47
  getBaseUrl
@@ -56,12 +53,13 @@ import {
56
53
  effectiveWaitSeconds,
57
54
  hookWaitClamped,
58
55
  hookWaitDeadline,
56
+ isPermissionRequestOwnedByPreToolUse,
59
57
  isPusharyOwnTool,
60
58
  parseAgentQuestionAnswers,
61
59
  parseAgentQuestions,
62
60
  resolveGate,
63
61
  stoppedOutput
64
- } from "./chunk-6FAHPGCZ.js";
62
+ } from "./chunk-WDKHZRAS.js";
65
63
 
66
64
  // src/decision-episode.ts
67
65
  var EPISODE_PATH = "/api/agent/decision-episode";
@@ -99,7 +97,6 @@ var storedWaitDeadline = (result, requestedDeadline) => {
99
97
  const stored = result.waitEndsAt ? Date.parse(result.waitEndsAt) : Number.NaN;
100
98
  return Number.isFinite(stored) ? Math.min(stored, requestedDeadline) : requestedDeadline;
101
99
  };
102
- var returnedAnswer = (result) => result.answered === true ? { answered: true, value: result.value, note: result.note } : null;
103
100
  var handlePushOnly = async (apiKey, description, projectName, timeoutSeconds, timeoutAction, sessionId, machineId, toolName, toolTarget, decision, signals) => {
104
101
  const effectiveWait = effectiveWaitSeconds(timeoutAction, timeoutSeconds, "claude");
105
102
  const now = Date.now();
@@ -120,43 +117,21 @@ var handlePushOnly = async (apiKey, description, projectName, timeoutSeconds, ti
120
117
  ...decision
121
118
  });
122
119
  } catch {
123
- switch (timeoutAction) {
124
- case "approve":
125
- return allow();
126
- case "deny":
127
- return deny("Push notification failed, denying per policy");
128
- default:
129
- return void 0;
130
- }
131
- }
132
- if (result.suppressed || result.status === "terminal") {
133
- await cancelQuestion(apiKey, result.correlationId).catch(() => {
134
- });
135
- return ask(result.suppressed ? "You are at the keyboard, approve here." : "Delivery mode is Terminal, approve here.");
136
- }
137
- if (result.noDevices) {
138
- await cancelQuestion(apiKey, result.correlationId).catch(() => {
139
- });
140
- switch (timeoutAction) {
141
- case "approve":
142
- return allow();
143
- case "deny":
144
- return deny("No device connected to approve on");
145
- default:
146
- return void 0;
147
- }
120
+ return halted("Pushary could not create a verifiable approval. Retry the action.");
148
121
  }
122
+ if (isDecisionStopped(result)) return halted(DECISION_STOP_REASON);
149
123
  const deadline = storedWaitDeadline(result, requestedDeadline);
150
- announceWait(effectiveWait, result.answerUrl, sessionId);
151
- const answer = returnedAnswer(result) ?? await pollForAnswer(apiKey, result.correlationId, deadline);
124
+ if (!isLocalQuestionHandoff(result) && !result.answered) announceWait(effectiveWait, result.answerUrl, sessionId);
125
+ const answer = await waitForQuestion(apiKey, result, deadline);
126
+ if (isDecisionStopped(answer)) return halted(DECISION_STOP_REASON);
127
+ if (!answer.answered && isLocalQuestionHandoff(result)) return ask("Approve in the current client.");
152
128
  if (answer.answered) {
153
129
  if (isDeferAnswer(answer.value)) return ask("Handling on your machine");
154
130
  signals.humanDecision = true;
155
131
  return answer.value === "yes" ? allow() : deny(denyReasonFrom(answer.value, answer.note));
156
132
  }
157
- if (timeoutAction === "wait" || clampCut) {
158
- savePendingQuestion(sessionId || DEFAULT_SESSION, result.correlationId, decision.toolUseId);
159
- return ask(timeoutAction === "wait" ? "Still waiting on your phone. Answer here, or on your phone and it will be applied on the next step." : "This step cannot wait any longer. Answer here, or on your phone and it will be applied on the next step.");
133
+ if (timeoutAction === "wait" || clampCut || deadline < requestedDeadline) {
134
+ return ask("The phone question was withdrawn. Approve in the current client.");
160
135
  }
161
136
  switch (timeoutAction) {
162
137
  case "approve":
@@ -164,7 +139,6 @@ var handlePushOnly = async (apiKey, description, projectName, timeoutSeconds, ti
164
139
  case "deny":
165
140
  return deny("No response within timeout");
166
141
  default:
167
- savePendingQuestion(sessionId || DEFAULT_SESSION, result.correlationId, decision.toolUseId);
168
142
  return ask("No push response, asking in terminal");
169
143
  }
170
144
  };
@@ -188,28 +162,19 @@ var handlePushFirst = async (apiKey, description, projectName, pushFirstSeconds,
188
162
  ...decision
189
163
  });
190
164
  } catch {
191
- return void 0;
192
- }
193
- if (result.suppressed) {
194
- await cancelQuestion(apiKey, result.correlationId).catch(() => {
195
- });
196
- return ask("You are at the keyboard, approve here.");
165
+ return halted("Pushary could not create a verifiable approval. Retry the action.");
197
166
  }
198
- if (result.noDevices) {
199
- await cancelQuestion(apiKey, result.correlationId).catch(() => {
200
- });
201
- return void 0;
202
- }
203
- announceWait(pushFirstSeconds, result.answerUrl, sessionId);
167
+ if (isDecisionStopped(result)) return halted(DECISION_STOP_REASON);
168
+ if (!isLocalQuestionHandoff(result) && !result.answered) announceWait(pushFirstSeconds, result.answerUrl, sessionId);
204
169
  const deadline = storedWaitDeadline(result, requestedDeadline);
205
- const answer = returnedAnswer(result) ?? await pollForAnswer(apiKey, result.correlationId, deadline, 1500);
170
+ const answer = await waitForQuestion(apiKey, result, deadline, 1500);
171
+ if (isDecisionStopped(answer)) return halted(DECISION_STOP_REASON);
206
172
  if (answer.answered) {
207
173
  if (isDeferAnswer(answer.value)) return ask("Handling on your machine");
208
174
  signals.humanDecision = true;
209
175
  return answer.value === "yes" ? allow() : deny(denyReasonFrom(answer.value, answer.note));
210
176
  }
211
- savePendingQuestion(sessionId || DEFAULT_SESSION, result.correlationId, decision.toolUseId);
212
- return ask("Sent as push notification. You can also approve here.");
177
+ return ask("The phone question was withdrawn. Approve in the current client.");
213
178
  };
214
179
  var handleNotifyOnly = async (apiKey, description, projectName, sessionId, machineId) => {
215
180
  try {
@@ -327,7 +292,6 @@ var keylessNoticeOnce = (sessionId) => {
327
292
  }
328
293
  };
329
294
  var shouldDeferToNativeMode = defersToNativeMode;
330
- var handedToTerminal = (result) => result.suppressed === true || result.noDevices === true || result.status === "terminal";
331
295
  var withLabels = (question) => ({
332
296
  ...question,
333
297
  labels: question.options.map((option) => option.label)
@@ -356,17 +320,13 @@ var askAsOneCard = async (apiKey, input, parsed, projectName, deadline) => {
356
320
  waitEndsAt: new Date(deadline).toISOString()
357
321
  });
358
322
  } catch {
359
- return void 0;
360
- }
361
- if (handedToTerminal(result)) {
362
- await cancelQuestion(apiKey, result.correlationId).catch(() => {
363
- });
364
- return void 0;
323
+ return null;
365
324
  }
366
- const answer = returnedAnswer(result) ?? await pollForAnswer(apiKey, result.correlationId, storedWaitDeadline(result, deadline));
325
+ if (isDecisionStopped(result)) return null;
326
+ const answer = await waitForQuestion(apiKey, result, storedWaitDeadline(result, deadline));
327
+ if (isDecisionStopped(answer)) return null;
367
328
  const values = answer.answered && answer.value ? parseAgentQuestionAnswers(parsed, answer.value) : null;
368
329
  if (!values || isDeferAnswer(answer.value)) {
369
- savePendingQuestion(input.session_id || DEFAULT_SESSION, result.correlationId, input.tool_use_id);
370
330
  return void 0;
371
331
  }
372
332
  return values;
@@ -393,21 +353,17 @@ var askQuestionByQuestion = async (apiKey, input, parsed, projectName, deadline)
393
353
  waitEndsAt: new Date(deadline).toISOString()
394
354
  });
395
355
  } catch {
396
- return void 0;
356
+ return null;
397
357
  }
398
- if (handedToTerminal(result)) {
399
- await cancelQuestion(apiKey, result.correlationId).catch(() => {
400
- });
401
- return void 0;
402
- }
403
- const answer = returnedAnswer(result) ?? await pollForAnswer(apiKey, result.correlationId, storedWaitDeadline(result, deadline));
358
+ if (isDecisionStopped(result)) return null;
359
+ const answer = await waitForQuestion(apiKey, result, storedWaitDeadline(result, deadline));
360
+ if (isDecisionStopped(answer)) return null;
404
361
  const legacyValue = answer.answered ? answer.value?.trim() : void 0;
405
362
  const values = legacyValue ? parseAgentQuestionAnswers([question], legacyValue) ?? parseAgentQuestionAnswers([question], JSON.stringify({
406
363
  [question.question]: question.multiSelect ? JSON.stringify([legacyValue]) : legacyValue
407
364
  })) : null;
408
365
  const value = values?.[question.question];
409
366
  if (!value || isDeferAnswer(answer.value)) {
410
- savePendingQuestion(input.session_id || DEFAULT_SESSION, result.correlationId, input.tool_use_id);
411
367
  return void 0;
412
368
  }
413
369
  answers[question.question] = value;
@@ -421,6 +377,7 @@ var handleAskUserQuestion = async (apiKey, input, modeState) => {
421
377
  const projectName = basename(input.cwd ?? process.cwd());
422
378
  const deadline = hookWaitDeadline(START_MS, effectiveWaitSeconds("wait", 0, "claude"), "claude", Date.now());
423
379
  const answers = parsed.length === 1 ? await askAsOneCard(apiKey, input, parsed, projectName, deadline) : await askQuestionByQuestion(apiKey, input, parsed, projectName, deadline);
380
+ if (answers === null) return halted(DECISION_STOP_REASON);
424
381
  if (!answers) return void 0;
425
382
  return allowWithInput({ ...input.tool_input ?? {}, answers });
426
383
  };
@@ -450,17 +407,13 @@ var handleExitPlanMode = async (apiKey, input) => {
450
407
  waitEndsAt: new Date(deadline).toISOString()
451
408
  });
452
409
  } catch {
453
- return void 0;
454
- }
455
- if (handedToTerminal(result)) {
456
- await cancelQuestion(apiKey, result.correlationId).catch(() => {
457
- });
458
- return void 0;
410
+ return halted(DECISION_STOP_REASON);
459
411
  }
460
- const answer = returnedAnswer(result) ?? await pollForAnswer(apiKey, result.correlationId, storedWaitDeadline(result, deadline));
412
+ if (isDecisionStopped(result)) return halted(DECISION_STOP_REASON);
413
+ const answer = await waitForQuestion(apiKey, result, storedWaitDeadline(result, deadline));
414
+ if (isDecisionStopped(answer)) return halted(DECISION_STOP_REASON);
461
415
  const value = answer.answered ? (answer.value ?? "").trim() : "";
462
416
  if (!value || isDeferAnswer(answer.value)) {
463
- savePendingQuestion(input.session_id || DEFAULT_SESSION, result.correlationId, input.tool_use_id);
464
417
  return void 0;
465
418
  }
466
419
  if (value === PLAN_APPROVE) return allow();
@@ -545,10 +498,7 @@ var toPermissionRequestOutput = (hookOutput) => {
545
498
  return void 0;
546
499
  };
547
500
  var handlePermissionRequest = async (input) => {
548
- if (PRETOOLUSE_HANDLED_TOOLS.has(input.tool_name)) {
549
- const reclaimDeferredExec = !PRETOOLUSE_PHONE_ANSWERED_TOOLS.includes(input.tool_name) && shouldDeferToNativeMode(input.permission_mode, input.tool_name);
550
- if (!reclaimDeferredExec) return void 0;
551
- }
501
+ if (isPermissionRequestOwnedByPreToolUse(input.tool_name, input.permission_mode, shouldDeferToNativeMode)) return void 0;
552
502
  if (isPusharyOwnTool(input.tool_name)) return void 0;
553
503
  let apiKey;
554
504
  try {
@@ -640,13 +590,8 @@ var handlePermissionDenied = async (input) => {
640
590
  } catch {
641
591
  return void 0;
642
592
  }
643
- if (handedToTerminal(result)) {
644
- await cancelQuestion(apiKey, result.correlationId).catch(() => {
645
- });
646
- return void 0;
647
- }
648
593
  const deadline = hookWaitDeadline(START_MS, PERMISSION_DENIED_WAIT_SECONDS, "claude", Date.now());
649
- const answer = await pollForAnswer(apiKey, result.correlationId, deadline);
594
+ const answer = await waitForQuestion(apiKey, result, deadline);
650
595
  if (answer.answered && answer.value === "yes") {
651
596
  return { hookSpecificOutput: { hookEventName: "PermissionDenied", retry: true } };
652
597
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseVersion
3
- } from "./chunk-7LUFYRH4.js";
3
+ } from "./chunk-2D7BAOMY.js";
4
4
 
5
5
  // src/setup/agent-probe.ts
6
6
  import { execSync } from "child_process";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-E3NF5CL2.js";
3
+ } from "./chunk-HQIVR7MM.js";
4
4
  import {
5
5
  codexHomeFrom
6
- } from "./chunk-WB2C7VPF.js";
6
+ } from "./chunk-OW6AZDY2.js";
7
7
 
8
8
  // src/vscode-config.ts
9
9
  import { homedir } from "os";
@@ -327,9 +327,6 @@ var hasInstructionBlock = (filePath) => {
327
327
  }
328
328
  };
329
329
 
330
- // src/hooks-spec.ts
331
- var CURSOR_GATE_SCRIPT = "pushary-gate.mjs";
332
-
333
330
  export {
334
331
  registerPluginLocation,
335
332
  unregisterPluginLocation,
@@ -346,6 +343,5 @@ export {
346
343
  renderProjectAgentInstructions,
347
344
  writeInstructionBlock,
348
345
  removeInstructionBlock,
349
- hasInstructionBlock,
350
- CURSOR_GATE_SCRIPT
346
+ hasInstructionBlock
351
347
  };
@@ -5,7 +5,7 @@ import {
5
5
  FILE_TARGET_TOOLS,
6
6
  redactSecrets,
7
7
  redactSecretsDeep
8
- } from "./chunk-6FAHPGCZ.js";
8
+ } from "./chunk-WDKHZRAS.js";
9
9
 
10
10
  // ../hook-mapping/src/describe.ts
11
11
  import { isAbsolute, relative, resolve } from "path";
@@ -382,7 +382,7 @@ var permissionDeniedAction = (toolName) => {
382
382
  return tool ? `Auto-mode blocked ${tool}` : "Auto-mode blocked a tool call";
383
383
  };
384
384
  var sessionIdentityOf = (payload) => {
385
- const sessionId = asString(payload.session_id);
385
+ const sessionId = asString(payload.session_id ?? payload.sessionId ?? payload.conversation_id);
386
386
  const agentId = asString(payload.agent_id);
387
387
  if (!agentId) return { sessionId };
388
388
  return { sessionId: agentId, parentSessionId: sessionId };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeJsonAtomicDurable
3
- } from "./chunk-4LL6LG5X.js";
3
+ } from "./chunk-KAVDAZ7A.js";
4
4
 
5
5
  // src/transcript-recipient-pin.ts
6
6
  import { existsSync, mkdirSync, readFileSync, rmSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HOOK_LOCATOR_BINARY
3
- } from "./chunk-6FAHPGCZ.js";
3
+ } from "./chunk-WDKHZRAS.js";
4
4
 
5
5
  // src/diagnostics/bridge.ts
6
6
  import { execFileSync } from "child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  shouldDeferToNativeMode
3
- } from "./chunk-6FAHPGCZ.js";
3
+ } from "./chunk-WDKHZRAS.js";
4
4
 
5
5
  // src/native-defer.ts
6
6
  var nativeDeferOptions = () => {
@@ -60,7 +60,7 @@ var COMMAND_LIST = [
60
60
  { name: "doctor", module: "pushary-doctor", summary: "Verify your Pushary installation is working" },
61
61
  { name: "disconnect", module: "pushary-disconnect", summary: "Turn off one agent (claude|codex|gemini|cursor)" },
62
62
  { name: "clean", module: "pushary-clean", summary: "Remove all Pushary configuration (--yes for non-interactive)" },
63
- { name: "mode", module: "pushary-mode", summary: "Switch approval mode (push_only, push_first, terminal_only)" },
63
+ { name: "mode", module: "pushary-mode", summary: "Choose where approval requests appear" },
64
64
  { name: "wait", module: "pushary-wait", summary: 'Show or set the "wait for your phone" ladder (pushary wait 45)' },
65
65
  { name: "stats", module: "pushary-stats", summary: "Show the approval moments your agents hit while not connected" },
66
66
  {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  renderCommandHelp
3
- } from "./chunk-ZDAT5KMU.js";
3
+ } from "./chunk-D6PRC3YQ.js";
4
4
  import {
5
5
  getPackageVersion
6
6
  } from "./chunk-DINDL2CF.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-EZIEXHYM.js";
3
+ } from "./chunk-3AJIK5AO.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -2,15 +2,15 @@ import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  GEMINI_HOOK_EVENTS,
4
4
  hasGeminiHooks
5
- } from "./chunk-7LUFYRH4.js";
5
+ } from "./chunk-2D7BAOMY.js";
6
6
  import {
7
7
  CODEX_HOOK_EVENTS,
8
8
  hasCodexHooks
9
- } from "./chunk-WB2C7VPF.js";
9
+ } from "./chunk-OW6AZDY2.js";
10
10
  import {
11
11
  CURSOR_GATE_EVENTS,
12
12
  HOOK_LOCATOR_BINARY
13
- } from "./chunk-6FAHPGCZ.js";
13
+ } from "./chunk-WDKHZRAS.js";
14
14
 
15
15
  // src/diagnostics/wiring.ts
16
16
  var record = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : null;