@pushary/agent-hooks 1.9.56 → 1.9.57

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 (116) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{api-JHBUZ7CV.js → api-RQAY3A5V.js} +10 -10
  3. package/dist/bin/pushary-bell-hook.js +27 -27
  4. package/dist/bin/pushary-bell.js +10 -10
  5. package/dist/bin/pushary-claude.js +26 -26
  6. package/dist/bin/pushary-clean.js +33 -33
  7. package/dist/bin/pushary-codex-bridge.js +21 -21
  8. package/dist/bin/pushary-codex-hook.js +32 -32
  9. package/dist/bin/pushary-codex-session.js +8 -8
  10. package/dist/bin/pushary-codex.js +14 -14
  11. package/dist/bin/pushary-connect.js +26 -26
  12. package/dist/bin/pushary-cowork.js +5 -5
  13. package/dist/bin/pushary-daemon.js +37 -37
  14. package/dist/bin/pushary-disconnect.js +26 -26
  15. package/dist/bin/pushary-doctor.js +37 -37
  16. package/dist/bin/pushary-elicitation-hook.js +27 -27
  17. package/dist/bin/pushary-gemini-bridge.js +15 -15
  18. package/dist/bin/pushary-gemini-hook.js +29 -29
  19. package/dist/bin/pushary-hook.js +31 -31
  20. package/dist/bin/pushary-login.js +13 -13
  21. package/dist/bin/pushary-logout.js +26 -26
  22. package/dist/bin/pushary-mcp.js +11 -11
  23. package/dist/bin/pushary-mode.js +13 -13
  24. package/dist/bin/pushary-notification-hook.js +26 -26
  25. package/dist/bin/pushary-opencode-hook.js +28 -28
  26. package/dist/bin/pushary-permission-denied-hook.js +31 -31
  27. package/dist/bin/pushary-permission-hook.js +30 -30
  28. package/dist/bin/pushary-post-hook.js +26 -26
  29. package/dist/bin/pushary-prompt-hook.js +26 -26
  30. package/dist/bin/pushary-session-end-hook.js +26 -26
  31. package/dist/bin/pushary-session-start-hook.js +33 -33
  32. package/dist/bin/pushary-setup.js +40 -40
  33. package/dist/bin/pushary-stats.js +5 -5
  34. package/dist/bin/pushary-status.js +29 -29
  35. package/dist/bin/pushary-stop-hook.js +26 -26
  36. package/dist/bin/pushary-stopfailure-hook.js +26 -26
  37. package/dist/bin/pushary-suggestions.js +13 -13
  38. package/dist/bin/pushary-transcript-register.js +18 -18
  39. package/dist/bin/pushary-transcripts.js +7 -7
  40. package/dist/bin/pushary-upgrade.js +35 -35
  41. package/dist/bin/pushary-wait.js +13 -13
  42. package/dist/bin/pushary.js +7 -7
  43. package/dist/{chunk-6U3L4K57.js → chunk-2NIRYGTK.js} +2 -2
  44. package/dist/{chunk-HTN7SMKB.js → chunk-2PJENKRJ.js} +2 -2
  45. package/dist/{chunk-PI2WWZQQ.js → chunk-3IBUZQKM.js} +2 -2
  46. package/dist/{chunk-X5FHQMUL.js → chunk-3TJLPABQ.js} +3 -3
  47. package/dist/{chunk-HR3DJWP2.js → chunk-4QD7VE4E.js} +2 -2
  48. package/dist/{chunk-V2AMLVMD.js → chunk-4YNNAF53.js} +2 -2
  49. package/dist/{chunk-724266XT.js → chunk-4YTFYILS.js} +9 -9
  50. package/dist/{chunk-T4IAMIX4.js → chunk-5SFM6XB4.js} +1 -1
  51. package/dist/{chunk-J5HQNZXQ.js → chunk-6QM54CSJ.js} +5 -5
  52. package/dist/{chunk-FBFPQLJG.js → chunk-7OQ4AJC7.js} +2 -2
  53. package/dist/{chunk-WW266XKU.js → chunk-7RZO6VWD.js} +2 -2
  54. package/dist/{chunk-WCPN3GVW.js → chunk-A54W5A74.js} +3 -3
  55. package/dist/{chunk-T6GEEMVC.js → chunk-AEXACKDR.js} +3 -3
  56. package/dist/{chunk-ILQARYXK.js → chunk-AN6TVB2H.js} +5 -5
  57. package/dist/{chunk-QWUWQBIJ.js → chunk-BAJ3A3BU.js} +2 -2
  58. package/dist/{chunk-4US3BCQJ.js → chunk-C3IWX6KU.js} +1 -1
  59. package/dist/{chunk-AKFTQT7P.js → chunk-CB565EVO.js} +2 -2
  60. package/dist/{chunk-74DKFWU2.js → chunk-CUEUANIU.js} +5 -5
  61. package/dist/{chunk-ECQNBLPS.js → chunk-D2EETYAL.js} +4 -4
  62. package/dist/{chunk-DWV3LTUH.js → chunk-DDQRYX2L.js} +3 -3
  63. package/dist/{chunk-MW3DD3S5.js → chunk-DS6OR5OS.js} +6 -6
  64. package/dist/{chunk-ZMRO6ESW.js → chunk-ECJJKDP7.js} +1 -1
  65. package/dist/{chunk-5HRXOANL.js → chunk-FBKVCODG.js} +3 -3
  66. package/dist/{chunk-WACFIQYA.js → chunk-GZL3KEPC.js} +51 -25
  67. package/dist/{chunk-32MSOGMD.js → chunk-HCIB4YNB.js} +3 -3
  68. package/dist/{chunk-5HMYW5W2.js → chunk-I43PY5G3.js} +1 -1
  69. package/dist/{chunk-AKBFNTJF.js → chunk-IBSRULIY.js} +10 -10
  70. package/dist/{chunk-YBE2KH2U.js → chunk-IRZ5FVWG.js} +3 -3
  71. package/dist/{chunk-M6DTXZQK.js → chunk-IUOUNRLH.js} +2 -2
  72. package/dist/{chunk-LTCNAIY2.js → chunk-JCMSISCC.js} +2 -2
  73. package/dist/{chunk-FXW3FW4A.js → chunk-JSQOHMNJ.js} +1 -1
  74. package/dist/{chunk-FLUKEZMH.js → chunk-JYXIARGW.js} +1 -1
  75. package/dist/{chunk-DFZTZRKL.js → chunk-K45CFSYV.js} +4 -4
  76. package/dist/{chunk-JPTFFZWY.js → chunk-K5SDLOFS.js} +11 -11
  77. package/dist/{chunk-MWBFB7WA.js → chunk-LVDC3RUE.js} +1 -1
  78. package/dist/{chunk-7QAL23TB.js → chunk-LVWXRXT7.js} +1 -1
  79. package/dist/{chunk-SM2DT5KP.js → chunk-LVZYIUSR.js} +1 -1
  80. package/dist/{chunk-KWAOOXSD.js → chunk-LW7IWGSV.js} +5 -5
  81. package/dist/{chunk-L66VPBS5.js → chunk-M7NX25ZA.js} +1 -1
  82. package/dist/{chunk-LW4ZEC3A.js → chunk-N3NSWWNU.js} +1 -1
  83. package/dist/{chunk-GWQ6T6JV.js → chunk-NQDEMRAS.js} +5 -5
  84. package/dist/{chunk-VRPDHJGB.js → chunk-OLNBYAPI.js} +4 -4
  85. package/dist/{chunk-RZF2GIPI.js → chunk-OZSP4RIQ.js} +2 -2
  86. package/dist/{chunk-JTQHC3RV.js → chunk-PZDMZ7LM.js} +5 -5
  87. package/dist/{chunk-MVW5WS6F.js → chunk-QLDTBZBP.js} +36 -28
  88. package/dist/{chunk-VZ3YPEMG.js → chunk-QQYUWTYS.js} +3 -3
  89. package/dist/{chunk-G63LBV4Y.js → chunk-QTCFEKLJ.js} +1 -1
  90. package/dist/{chunk-FJ7ZMR4N.js → chunk-RFAF3TOX.js} +5 -5
  91. package/dist/{chunk-M7ZXKMVX.js → chunk-S5LX25XE.js} +1 -1
  92. package/dist/{chunk-SMMDQXI2.js → chunk-SQ5G6A6K.js} +1 -1
  93. package/dist/{chunk-I6OGFHJT.js → chunk-T45PAPOG.js} +5 -5
  94. package/dist/{chunk-57EOP757.js → chunk-TWLWDIFB.js} +2 -2
  95. package/dist/{chunk-WNVQPGLH.js → chunk-UPFFO4F6.js} +4 -4
  96. package/dist/{chunk-FFGW45DJ.js → chunk-W6363YYZ.js} +8 -8
  97. package/dist/{chunk-JSS5RG65.js → chunk-WXZN5CS3.js} +2 -2
  98. package/dist/{chunk-OX5EYBOC.js → chunk-XTZHUIGJ.js} +1 -1
  99. package/dist/{chunk-S3CQBNUU.js → chunk-XXNT4FGA.js} +1 -1
  100. package/dist/{chunk-4OXULVUA.js → chunk-YKYVDHIY.js} +1 -1
  101. package/dist/{chunk-DUACX6E3.js → chunk-Z7Q36I4K.js} +6 -6
  102. package/dist/{chunk-OCYOOGXW.js → chunk-ZU6L34DQ.js} +4 -4
  103. package/dist/{chunk-6PUHW2FP.js → chunk-ZZB4J6CX.js} +4 -4
  104. package/dist/{codex-app-cards-switch-7UIGMEUE.js → codex-app-cards-switch-SVGTZ2UN.js} +11 -11
  105. package/dist/{codex-desktop-launch-66LZ6R4Y.js → codex-desktop-launch-SH7OUEEC.js} +1 -1
  106. package/dist/{codex-session-launch-3TGHFR7R.js → codex-session-launch-IQ57OL3N.js} +18 -18
  107. package/dist/{config-OBDZ2CL3.js → config-SYLUYZQE.js} +3 -3
  108. package/dist/{global-upgrade-6M2UXUUL.js → global-upgrade-SRCWQE7N.js} +7 -7
  109. package/dist/{identity-WJUPU3AK.js → identity-6KRUO2YO.js} +4 -4
  110. package/dist/{live-capabilities-GACO2VB6.js → live-capabilities-RKUHAWT6.js} +4 -4
  111. package/dist/{paths-5PWAQF63.js → paths-MUPQZNLG.js} +3 -3
  112. package/dist/{reapply-EYPT5EP2.js → reapply-YZXZCWCI.js} +26 -26
  113. package/dist/src/index.js +21 -21
  114. package/dist/{upgrade-lock-G2ZPV7ZO.js → upgrade-lock-JXP27UKI.js} +4 -4
  115. package/dist/{usage-PXBMEKSA.js → usage-OUV76AIY.js} +3 -3
  116. package/package.json +1 -1
@@ -2,23 +2,23 @@ import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  GEMINI_HOOK_EVENTS,
4
4
  hasGeminiHooks
5
- } from "./chunk-VZ3YPEMG.js";
5
+ } from "./chunk-QQYUWTYS.js";
6
6
  import {
7
7
  AGENT_CHOICES
8
- } from "./chunk-ZMRO6ESW.js";
8
+ } from "./chunk-ECJJKDP7.js";
9
9
  import {
10
10
  BELL_HOOK_BINARY
11
- } from "./chunk-4OXULVUA.js";
11
+ } from "./chunk-YKYVDHIY.js";
12
12
  import {
13
13
  CODEX_HOOK_EVENTS,
14
14
  hasCodexHooks,
15
15
  holdBudgetOf
16
- } from "./chunk-57EOP757.js";
16
+ } from "./chunk-TWLWDIFB.js";
17
17
  import {
18
18
  CURSOR_GATE_EVENTS,
19
19
  HOOK_LOCATOR_BINARY,
20
20
  hookCommandHoldBudget
21
- } from "./chunk-WACFIQYA.js";
21
+ } from "./chunk-GZL3KEPC.js";
22
22
 
23
23
  // src/diagnostics/bridge.ts
24
24
  import { execFileSync } from "child_process";
@@ -14,19 +14,19 @@ import {
14
14
  } from "./chunk-FO3MDD26.js";
15
15
  import {
16
16
  callMcpTool
17
- } from "./chunk-WCPN3GVW.js";
17
+ } from "./chunk-A54W5A74.js";
18
18
  import {
19
19
  reportedInstallSource
20
- } from "./chunk-WW266XKU.js";
20
+ } from "./chunk-7RZO6VWD.js";
21
21
  import {
22
22
  NPX_LATEST_COMMAND
23
- } from "./chunk-T4IAMIX4.js";
23
+ } from "./chunk-5SFM6XB4.js";
24
24
  import {
25
25
  NO_PAIRING_COMPUTER,
26
26
  PAIR_TTL_SECONDS,
27
27
  classifyConfirmResponse,
28
28
  isAnswerSource
29
- } from "./chunk-WACFIQYA.js";
29
+ } from "./chunk-GZL3KEPC.js";
30
30
 
31
31
  // src/reach.ts
32
32
  var reachVerdict = (channels) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  realpath
3
- } from "./chunk-7QAL23TB.js";
3
+ } from "./chunk-LVWXRXT7.js";
4
4
  import {
5
5
  findNativeClaudeInstall
6
6
  } from "./chunk-VUFHYMSP.js";
@@ -13,10 +13,10 @@ import {
13
13
  resolvePackageVersionFromBinary,
14
14
  resolvePathBinary,
15
15
  resolvePathBinaryAsync
16
- } from "./chunk-T6GEEMVC.js";
16
+ } from "./chunk-AEXACKDR.js";
17
17
  import {
18
18
  MANAGED_PROVIDERS
19
- } from "./chunk-WACFIQYA.js";
19
+ } from "./chunk-GZL3KEPC.js";
20
20
 
21
21
  // src/live-capabilities.ts
22
22
  import { homedir } from "os";
@@ -4,30 +4,30 @@ import {
4
4
  postLiveSession,
5
5
  postLiveSessionUntilAccepted,
6
6
  startLiveSessionHeartbeat
7
- } from "./chunk-M6DTXZQK.js";
7
+ } from "./chunk-IUOUNRLH.js";
8
8
  import {
9
9
  SESSION_IDLE_TIMEOUT_MS,
10
10
  describeIdleWindow,
11
11
  idleDeadlinePassed,
12
12
  startProcessOwnership
13
- } from "./chunk-AKFTQT7P.js";
13
+ } from "./chunk-CB565EVO.js";
14
14
  import {
15
15
  spawnClaude
16
16
  } from "./chunk-XHKBHWLX.js";
17
17
  import {
18
18
  repoKeyFor
19
- } from "./chunk-S3CQBNUU.js";
19
+ } from "./chunk-XXNT4FGA.js";
20
20
  import {
21
21
  isAskUserResponse,
22
22
  isDecisionStopped,
23
23
  isWaitForAnswerResponse,
24
24
  withdrawQuestion,
25
25
  writeDegraded
26
- } from "./chunk-J5HQNZXQ.js";
26
+ } from "./chunk-6QM54CSJ.js";
27
27
  import {
28
28
  callMcpTool,
29
29
  isRetryable
30
- } from "./chunk-WCPN3GVW.js";
30
+ } from "./chunk-A54W5A74.js";
31
31
  import {
32
32
  AGENT_QUESTION_DESCRIPTION_MAX,
33
33
  AGENT_QUESTION_HEADER_MAX,
@@ -48,7 +48,7 @@ import {
48
48
  parseCodexQuestions,
49
49
  planElicitationAsk,
50
50
  readElicitationFields
51
- } from "./chunk-WACFIQYA.js";
51
+ } from "./chunk-GZL3KEPC.js";
52
52
 
53
53
  // src/codex-question-owner.ts
54
54
  import { createHash } from "crypto";
@@ -10,7 +10,7 @@ import {
10
10
  isSetupConnectMode,
11
11
  isValidApiKey,
12
12
  normalizeAgentId
13
- } from "./chunk-WACFIQYA.js";
13
+ } from "./chunk-GZL3KEPC.js";
14
14
 
15
15
  // src/setup/options.ts
16
16
  var AGENT_CHOICES = SETUP_AGENT_CHOICES;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyFetch
3
- } from "./chunk-32MSOGMD.js";
3
+ } from "./chunk-HCIB4YNB.js";
4
4
  import {
5
5
  NetworkError
6
6
  } from "./chunk-7QLSKOSU.js";
@@ -9,11 +9,11 @@ import {
9
9
  } from "./chunk-KZERVKTD.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-MWBFB7WA.js";
12
+ } from "./chunk-LVDC3RUE.js";
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-WACFIQYA.js";
16
+ } from "./chunk-GZL3KEPC.js";
17
17
 
18
18
  // src/session.ts
19
19
  var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
@@ -2885,30 +2885,32 @@ var timeoutActionWithoutLocalPrompt = ({ mode, timeoutAction }) => mode !== "pus
2885
2885
  var TIMEOUT_ACTIONS = ["approve", "deny", "escalate", "wait"];
2886
2886
  var isTimeoutAction = (value) => typeof value === "string" && TIMEOUT_ACTIONS.includes(value);
2887
2887
  var MAX_AGENT_QUESTIONS = 4;
2888
+ var MIN_AGENT_QUESTION_OPTIONS = 2;
2889
+ var MAX_AGENT_QUESTION_OPTIONS = 4;
2888
2890
  var AGENT_QUESTION_HEADER_MAX = 40;
2889
2891
  var AGENT_QUESTION_OPTION_MAX = 100;
2890
2892
  var AGENT_QUESTION_DESCRIPTION_MAX = 500;
2891
- var parseAgentQuestion = (raw) => {
2892
- const q = raw;
2893
- if (!q || typeof q.question !== "string") return void 0;
2894
- const options = Array.isArray(q.options) ? q.options.flatMap((option) => {
2895
- if (!option || typeof option !== "object") return [];
2896
- const value = option;
2897
- if (typeof value.label !== "string" || value.label.length === 0) return [];
2898
- return [{
2899
- label: value.label,
2900
- ...typeof value.description === "string" ? { description: value.description } : {}
2901
- }];
2902
- }) : [];
2903
- if (options.length < 2) return void 0;
2893
+ var agentQuestionOptionIn = (raw) => {
2894
+ if (!isRecord(raw) || typeof raw.label !== "string" || raw.label.length === 0) return [];
2895
+ return [{
2896
+ label: raw.label,
2897
+ ...typeof raw.description === "string" ? { description: raw.description } : {}
2898
+ }];
2899
+ };
2900
+ var agentQuestionFieldsIn = (raw) => {
2901
+ if (!isRecord(raw) || typeof raw.question !== "string") return void 0;
2904
2902
  return {
2905
- question: q.question,
2906
- ...typeof q.header === "string" ? { header: q.header } : {},
2907
- multiSelect: q.multiSelect === true,
2908
- ...typeof q.allowOther === "boolean" ? { allowOther: q.allowOther } : {},
2909
- options
2903
+ question: raw.question,
2904
+ ...typeof raw.header === "string" ? { header: raw.header } : {},
2905
+ multiSelect: raw.multiSelect === true,
2906
+ ...typeof raw.allowOther === "boolean" ? { allowOther: raw.allowOther } : {},
2907
+ options: Array.isArray(raw.options) ? raw.options.flatMap(agentQuestionOptionIn) : []
2910
2908
  };
2911
2909
  };
2910
+ var parseAgentQuestion = (raw) => {
2911
+ const question = agentQuestionFieldsIn(raw);
2912
+ return question && question.options.length >= MIN_AGENT_QUESTION_OPTIONS ? question : void 0;
2913
+ };
2912
2914
  var parseAgentQuestions = (toolInput) => {
2913
2915
  const questions = toolInput.questions;
2914
2916
  if (!Array.isArray(questions) || questions.length === 0) return void 0;
@@ -2921,13 +2923,16 @@ var parseAgentQuestions = (toolInput) => {
2921
2923
  }
2922
2924
  return parsed;
2923
2925
  };
2926
+ var isTypedAnswerQuestion = (question) => question.options.length === 0;
2927
+ var typingCanAnswer = (question) => question.multiSelect === false && question.allowOther !== false;
2928
+ var optionCountCanBeAnswered = (question, optionCount) => optionCount === 0 ? typingCanAnswer(question) : optionCount >= MIN_AGENT_QUESTION_OPTIONS && optionCount <= MAX_AGENT_QUESTION_OPTIONS;
2924
2929
  var isAgentQuestionSet = (value) => {
2925
2930
  if (!Array.isArray(value) || value.length === 0 || value.length > 4) return false;
2926
2931
  const questions = /* @__PURE__ */ new Set();
2927
2932
  for (const item of value) {
2928
- if (!item || typeof item !== "object" || Array.isArray(item)) return false;
2933
+ if (!isRecord(item)) return false;
2929
2934
  const question = item;
2930
- if (typeof question.question !== "string" || question.question.length === 0 || questions.has(question.question) || question.header !== void 0 && typeof question.header !== "string" || typeof question.multiSelect !== "boolean" || question.allowOther !== void 0 && typeof question.allowOther !== "boolean" || !Array.isArray(question.options) || question.options.length < 2 || question.options.length > 4) return false;
2935
+ if (typeof question.question !== "string" || question.question.length === 0 || questions.has(question.question) || question.header !== void 0 && typeof question.header !== "string" || typeof question.multiSelect !== "boolean" || question.allowOther !== void 0 && typeof question.allowOther !== "boolean" || !Array.isArray(question.options) || !optionCountCanBeAnswered(question, question.options.length)) return false;
2931
2936
  const labels = /* @__PURE__ */ new Set();
2932
2937
  for (const option of question.options) {
2933
2938
  if (!option || typeof option !== "object" || Array.isArray(option)) return false;
@@ -2971,19 +2976,34 @@ var parseAgentQuestionAnswers = (questions, value) => {
2971
2976
  }
2972
2977
  return answers;
2973
2978
  };
2979
+ var noOptionsWhenAbsent = (options) => options ?? [];
2980
+ var optionsNamedByLabel = (options) => Array.isArray(options) ? options.map((label) => ({ label })) : options;
2981
+ var offersOnlyItsOptions = (raw, options) => raw.isOther === false && Array.isArray(options) && options.length > 0;
2974
2982
  var codexQuestionFields = (raw, toolName) => {
2975
2983
  if (!isRecord(raw) || raw.isSecret === true) return void 0;
2984
+ const options = noOptionsWhenAbsent(raw.options);
2976
2985
  if (toolName === CODEX_ASYNC_QUESTION_TOOL) {
2977
- const labels = Array.isArray(raw.options) ? raw.options : [];
2978
- return { question: raw.title, options: labels.map((label) => ({ label })), multiSelect: false };
2986
+ return { question: raw.title, options: optionsNamedByLabel(options), multiSelect: false };
2979
2987
  }
2980
- return { ...raw, multiSelect: raw.multiSelect ?? false, ...raw.isOther === false ? { allowOther: false } : {} };
2988
+ return { ...raw, options, multiSelect: raw.multiSelect ?? false, ...offersOnlyItsOptions(raw, options) ? { allowOther: false } : {} };
2981
2989
  };
2990
+ var agentQuestionsOf = (questions) => questions.flatMap((question) => agentQuestionFieldsIn(question) ?? []);
2982
2991
  var parseCodexQuestions = (toolName, toolInput) => {
2983
2992
  const raw = Array.isArray(toolInput.questions) ? toolInput.questions : [];
2984
2993
  const questions = raw.map((question) => codexQuestionFields(question, toolName));
2985
- return isAgentQuestionSet(questions) ? parseAgentQuestions({ questions }) : void 0;
2986
- };
2994
+ return isAgentQuestionSet(questions) ? agentQuestionsOf(questions) : void 0;
2995
+ };
2996
+ var typedTextAsAnswers = (questions, text2) => {
2997
+ const [only, ...others] = questions;
2998
+ if (!only || others.length > 0 || !isTypedAnswerQuestion(only)) return null;
2999
+ if (text2.trim().length === 0 || isHandBackAnswer(text2)) return null;
3000
+ return { [only.question]: text2 };
3001
+ };
3002
+ var plainAskOf = (question) => isTypedAnswerQuestion(question) ? { type: "input" } : { type: "select", options: question.options.map((option) => option.label) };
3003
+ var isLoneTypedAnswerQuestion = (questions) => questions.length === 1 && questions.every(isTypedAnswerQuestion);
3004
+ var questionsShownAsASet = (questions) => isLoneTypedAnswerQuestion(questions) ? void 0 : questions;
3005
+ var agentQuestionContext = (header, project) => header ? `${header}: your agent is asking in ${project}` : `Your agent is asking in ${project}`;
3006
+ var answersToQuestionsAsAsked = (questions, answer) => questionsShownAsASet(questions) ? parseAgentQuestionAnswers(questions, answer) : typedTextAsAnswers(questions, answer);
2987
3007
  var CODEX_QUESTION_ANSWERED_IN_PUSHARY = "The user already answered this question in Pushary, so it was not shown again";
2988
3008
  var CODEX_QUESTION_CONTINUE = "Continue with this answer and do not ask it again";
2989
3009
  var quotedAnswerPair = ([question, answer]) => `${JSON.stringify(question)}: ${JSON.stringify(answer)}`;
@@ -6138,6 +6158,7 @@ var elicitationContentFromAnswers = (ask, answers) => {
6138
6158
  }
6139
6159
  return content;
6140
6160
  };
6161
+ var isHandBackAnswer = (answer) => classifyConfirmResponse(answer) === "defer";
6141
6162
 
6142
6163
  // ../contracts/src/hook-activation.ts
6143
6164
  var hookWritePath = (toolName, input) => toolName === "Write" && typeof input.file_path === "string" && input.file_path.startsWith("/") && input.file_path.length <= 4096 ? input.file_path : void 0;
@@ -6237,8 +6258,13 @@ export {
6237
6258
  AGENT_QUESTION_OPTION_MAX,
6238
6259
  AGENT_QUESTION_DESCRIPTION_MAX,
6239
6260
  parseAgentQuestions,
6261
+ isTypedAnswerQuestion,
6240
6262
  parseAgentQuestionAnswers,
6241
6263
  parseCodexQuestions,
6264
+ plainAskOf,
6265
+ questionsShownAsASet,
6266
+ agentQuestionContext,
6267
+ answersToQuestionsAsAsked,
6242
6268
  codexQuestionAnswerReason,
6243
6269
  normalizeInstallSource,
6244
6270
  HOOK_BUDGETS,
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  readExistingMachineId
3
- } from "./chunk-SMMDQXI2.js";
3
+ } from "./chunk-SQ5G6A6K.js";
4
4
  import {
5
5
  NetworkError
6
6
  } from "./chunk-7QLSKOSU.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-MWBFB7WA.js";
9
+ } from "./chunk-LVDC3RUE.js";
10
10
  import {
11
11
  getPackageVersion
12
12
  } from "./chunk-QTOLNRET.js";
13
13
  import {
14
14
  clientContextHeaders
15
- } from "./chunk-WACFIQYA.js";
15
+ } from "./chunk-GZL3KEPC.js";
16
16
 
17
17
  // src/cli/net.ts
18
18
  import { createRequire } from "module";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_HOLD_BUDGET_ENV,
3
3
  hookHoldBudgetProof
4
- } from "./chunk-WACFIQYA.js";
4
+ } from "./chunk-GZL3KEPC.js";
5
5
 
6
6
  // src/hold-budget.ts
7
7
  var takeHookHoldBudget = (args = process.argv.slice(2), env = process.env) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-6U3L4K57.js";
3
+ } from "./chunk-2NIRYGTK.js";
4
4
  import {
5
5
  CODEX_INSTRUCTIONS_LABEL,
6
6
  GEMINI_INSTRUCTIONS_LABEL,
@@ -11,7 +11,7 @@ import {
11
11
  macAppFxBridge,
12
12
  refreshInstructionBlock,
13
13
  renderAgentInstructions
14
- } from "./chunk-GWQ6T6JV.js";
14
+ } from "./chunk-NQDEMRAS.js";
15
15
  import {
16
16
  OPENCODE_HOOK_BINARY,
17
17
  agentHookOwner,
@@ -21,10 +21,10 @@ import {
21
21
  openCodeInstructionsFile,
22
22
  openCodePluginDir,
23
23
  openCodeWired
24
- } from "./chunk-JTQHC3RV.js";
24
+ } from "./chunk-PZDMZ7LM.js";
25
25
  import {
26
26
  detectClaudeVersion
27
- } from "./chunk-7QAL23TB.js";
27
+ } from "./chunk-LVWXRXT7.js";
28
28
  import {
29
29
  addClaudeMcpServer,
30
30
  addCompatibleHooks,
@@ -33,7 +33,7 @@ import {
33
33
  compatibleConfigFile,
34
34
  compatibleInstructionsFile,
35
35
  hasCompatibleHooks
36
- } from "./chunk-WNVQPGLH.js";
36
+ } from "./chunk-UPFFO4F6.js";
37
37
  import {
38
38
  claudeUnprovenHolds,
39
39
  claudeWired,
@@ -41,7 +41,7 @@ import {
41
41
  codexWired,
42
42
  geminiWired,
43
43
  planHooks
44
- } from "./chunk-74DKFWU2.js";
44
+ } from "./chunk-CUEUANIU.js";
45
45
  import {
46
46
  CLAUDE_HOOK_BINARY,
47
47
  CLAUDE_HOOK_EVENTS,
@@ -52,7 +52,7 @@ import {
52
52
  needsReregistration,
53
53
  registrationSignatures,
54
54
  supportedClaudeEvents
55
- } from "./chunk-VZ3YPEMG.js";
55
+ } from "./chunk-QQYUWTYS.js";
56
56
  import {
57
57
  formatVersion
58
58
  } from "./chunk-6ICPEJY5.js";
@@ -80,11 +80,11 @@ import {
80
80
  registeredCommands,
81
81
  registrationHolderOf,
82
82
  vscodePluginMcp
83
- } from "./chunk-57EOP757.js";
83
+ } from "./chunk-TWLWDIFB.js";
84
84
  import {
85
85
  resolveGlobalBinDir,
86
86
  resolveGlobalBinary
87
- } from "./chunk-T6GEEMVC.js";
87
+ } from "./chunk-AEXACKDR.js";
88
88
  import {
89
89
  readJsonSafe,
90
90
  writeFileAtomic,
@@ -94,7 +94,7 @@ import {
94
94
  HOOK_COMPATIBLE_PROFILES,
95
95
  isCompatibleAgentType,
96
96
  isRecord
97
- } from "./chunk-WACFIQYA.js";
97
+ } from "./chunk-GZL3KEPC.js";
98
98
 
99
99
  // src/reapply.ts
100
100
  import { dirname, join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveInstallSourceFor
3
- } from "./chunk-WW266XKU.js";
3
+ } from "./chunk-7RZO6VWD.js";
4
4
  import {
5
5
  backupFile,
6
6
  readJsonSafe,
@@ -9,11 +9,11 @@ import {
9
9
  } from "./chunk-QENTGE75.js";
10
10
  import {
11
11
  configFilePath
12
- } from "./chunk-MWBFB7WA.js";
12
+ } from "./chunk-LVDC3RUE.js";
13
13
  import {
14
14
  API_KEY_PREFIX_PATTERN,
15
15
  isRecord
16
- } from "./chunk-WACFIQYA.js";
16
+ } from "./chunk-GZL3KEPC.js";
17
17
 
18
18
  // src/shell-alias.ts
19
19
  import { homedir } from "os";
@@ -3,11 +3,11 @@ import {
3
3
  decodePublicKey,
4
4
  generateSessionKey,
5
5
  wrapSessionKey
6
- } from "./chunk-FXW3FW4A.js";
6
+ } from "./chunk-JSQOHMNJ.js";
7
7
  import {
8
8
  fetchTranscriptRecipients,
9
9
  uploadTranscriptRecords
10
- } from "./chunk-LW4ZEC3A.js";
10
+ } from "./chunk-N3NSWWNU.js";
11
11
 
12
12
  // src/live-session.ts
13
13
  var MAX_TRANSCRIPT_QUEUE = 100;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-WCPN3GVW.js";
3
+ } from "./chunk-A54W5A74.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-T4IAMIX4.js";
6
+ } from "./chunk-5SFM6XB4.js";
7
7
 
8
8
  // src/mcp-stdio-bridge.ts
9
9
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  redactSecretsFromContent
3
- } from "./chunk-WACFIQYA.js";
3
+ } from "./chunk-GZL3KEPC.js";
4
4
 
5
5
  // src/crypto.ts
6
6
  import nacl from "tweetnacl";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-WACFIQYA.js";
3
+ } from "./chunk-GZL3KEPC.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -2,25 +2,25 @@ import {
2
2
  SIGNED_OUT_ON_MAC_MESSAGE,
3
3
  describeSignedOutKey,
4
4
  readSignedOutDiagnosis
5
- } from "./chunk-V2AMLVMD.js";
5
+ } from "./chunk-4YNNAF53.js";
6
6
  import {
7
7
  createIo
8
8
  } from "./chunk-FO3MDD26.js";
9
9
  import {
10
10
  readKeySource
11
- } from "./chunk-YBE2KH2U.js";
11
+ } from "./chunk-IRZ5FVWG.js";
12
12
  import {
13
13
  absoluteUrl,
14
14
  checkApiKey,
15
15
  describeKeyCheck,
16
16
  keyCheckFromResponse
17
- } from "./chunk-5HRXOANL.js";
17
+ } from "./chunk-FBKVCODG.js";
18
18
  import {
19
19
  EXIT
20
20
  } from "./chunk-KZERVKTD.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-MWBFB7WA.js";
23
+ } from "./chunk-LVDC3RUE.js";
24
24
 
25
25
  // src/cli/report-key.ts
26
26
  var { dim, yellow } = createIo();
@@ -4,19 +4,19 @@ import {
4
4
  outcomeOfFailedAsk,
5
5
  reportMachineDenial,
6
6
  storedWaitDeadline
7
- } from "./chunk-MVW5WS6F.js";
7
+ } from "./chunk-QLDTBZBP.js";
8
8
  import {
9
9
  isGatingMoment,
10
10
  recordKeylessMoment
11
- } from "./chunk-FLUKEZMH.js";
11
+ } from "./chunk-JYXIARGW.js";
12
12
  import {
13
13
  isDeferAnswer,
14
14
  oncePerSession
15
- } from "./chunk-SM2DT5KP.js";
15
+ } from "./chunk-LVZYIUSR.js";
16
16
  import {
17
17
  activeHookSource,
18
18
  activeIdentity
19
- } from "./chunk-WNVQPGLH.js";
19
+ } from "./chunk-UPFFO4F6.js";
20
20
  import {
21
21
  DEFAULT_SESSION,
22
22
  UNNAMED_ACTION,
@@ -40,10 +40,10 @@ import {
40
40
  reportEvent,
41
41
  scopePathFor,
42
42
  settleQuestionsForToolUse
43
- } from "./chunk-724266XT.js";
43
+ } from "./chunk-4YTFYILS.js";
44
44
  import {
45
45
  repoKeyFor
46
- } from "./chunk-S3CQBNUU.js";
46
+ } from "./chunk-XXNT4FGA.js";
47
47
  import {
48
48
  askUser,
49
49
  cancelQuestion,
@@ -56,17 +56,17 @@ import {
56
56
  sendNotification,
57
57
  waitForQuestion,
58
58
  waitsForThePhone
59
- } from "./chunk-J5HQNZXQ.js";
59
+ } from "./chunk-6QM54CSJ.js";
60
60
  import {
61
61
  getMachineId
62
- } from "./chunk-SMMDQXI2.js";
62
+ } from "./chunk-SQ5G6A6K.js";
63
63
  import {
64
64
  getApiKey,
65
65
  getBaseUrl
66
- } from "./chunk-MWBFB7WA.js";
66
+ } from "./chunk-LVDC3RUE.js";
67
67
  import {
68
68
  NPX_LATEST_COMMAND
69
- } from "./chunk-T4IAMIX4.js";
69
+ } from "./chunk-5SFM6XB4.js";
70
70
  import {
71
71
  AGENT_QUESTION_STRATEGY,
72
72
  AGENT_QUESTION_TOOL,
@@ -111,7 +111,7 @@ import {
111
111
  resolveGate,
112
112
  timeoutActionWithoutLocalPrompt,
113
113
  unansweredRefusalReason
114
- } from "./chunk-WACFIQYA.js";
114
+ } from "./chunk-GZL3KEPC.js";
115
115
 
116
116
  // src/claude-permission-rules.ts
117
117
  import { readFileSync, statSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-T4IAMIX4.js";
3
+ } from "./chunk-5SFM6XB4.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-6ICPEJY5.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-WACFIQYA.js";
9
+ } from "./chunk-GZL3KEPC.js";
10
10
 
11
11
  // src/setup/agent-probe.ts
12
12
  import { execSync } from "child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-724266XT.js";
3
+ } from "./chunk-4YTFYILS.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-JTQHC3RV.js";
3
+ } from "./chunk-PZDMZ7LM.js";
4
4
  import {
5
5
  nativeClaudeInstallPath
6
6
  } from "./chunk-VUFHYMSP.js";
7
7
  import {
8
8
  grokHome
9
- } from "./chunk-WNVQPGLH.js";
9
+ } from "./chunk-UPFFO4F6.js";
10
10
  import {
11
11
  codexHomeFrom
12
- } from "./chunk-57EOP757.js";
12
+ } from "./chunk-TWLWDIFB.js";
13
13
  import {
14
14
  resolvePathBinary
15
- } from "./chunk-T6GEEMVC.js";
15
+ } from "./chunk-AEXACKDR.js";
16
16
  import {
17
17
  HOOK_COMPATIBLE_PROFILES
18
- } from "./chunk-WACFIQYA.js";
18
+ } from "./chunk-GZL3KEPC.js";
19
19
 
20
20
  // src/hermes-config.ts
21
21
  import { execFileSync } from "child_process";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-KZERVKTD.js";
4
4
  import {
5
5
  renderCommandHelp
6
- } from "./chunk-T4IAMIX4.js";
6
+ } from "./chunk-5SFM6XB4.js";
7
7
  import {
8
8
  getPackageVersion
9
9
  } from "./chunk-QTOLNRET.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getBaseUrl
3
- } from "./chunk-MWBFB7WA.js";
3
+ } from "./chunk-LVDC3RUE.js";
4
4
 
5
5
  // src/transcript-api.ts
6
6
  var fetchTranscriptRecipients = async (apiKey, baseUrl = getBaseUrl()) => {