@pushary/agent-hooks 1.9.77 → 1.9.78

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 (124) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/{api-IGMCPM35.js → api-4WCUP47K.js} +10 -10
  3. package/dist/bin/pushary-bell-hook.js +25 -25
  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 +34 -34
  7. package/dist/bin/pushary-codex-bridge.js +21 -21
  8. package/dist/bin/pushary-codex-hook.js +30 -30
  9. package/dist/bin/pushary-codex-session.js +8 -8
  10. package/dist/bin/pushary-codex.js +13 -13
  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 +38 -38
  14. package/dist/bin/pushary-disconnect.js +25 -25
  15. package/dist/bin/pushary-display-hook.js +16 -16
  16. package/dist/bin/pushary-doctor.js +42 -42
  17. package/dist/bin/pushary-elicitation-hook.js +25 -25
  18. package/dist/bin/pushary-gemini-bridge.js +15 -15
  19. package/dist/bin/pushary-gemini-hook.js +27 -27
  20. package/dist/bin/pushary-hook.js +29 -29
  21. package/dist/bin/pushary-login.js +20 -20
  22. package/dist/bin/pushary-logout.js +24 -24
  23. package/dist/bin/pushary-mcp.js +11 -11
  24. package/dist/bin/pushary-mode.js +15 -15
  25. package/dist/bin/pushary-notification-hook.js +24 -24
  26. package/dist/bin/pushary-opencode-hook.js +26 -26
  27. package/dist/bin/pushary-permission-denied-hook.js +29 -29
  28. package/dist/bin/pushary-permission-hook.js +29 -29
  29. package/dist/bin/pushary-post-hook.js +24 -24
  30. package/dist/bin/pushary-prompt-hook.js +24 -24
  31. package/dist/bin/pushary-session-end-hook.js +26 -26
  32. package/dist/bin/pushary-session-start-hook.js +34 -34
  33. package/dist/bin/pushary-setup.js +57 -54
  34. package/dist/bin/pushary-stats.js +5 -5
  35. package/dist/bin/pushary-status.js +31 -31
  36. package/dist/bin/pushary-stop-hook.js +24 -24
  37. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  38. package/dist/bin/pushary-suggestions.js +15 -15
  39. package/dist/bin/pushary-transcript-register.js +16 -16
  40. package/dist/bin/pushary-transcripts.js +18 -18
  41. package/dist/bin/pushary-upgrade.js +40 -40
  42. package/dist/bin/pushary-wait.js +15 -15
  43. package/dist/bin/pushary.js +7 -7
  44. package/dist/{chunk-BUBC4R5J.js → chunk-22FLBWJH.js} +2 -2
  45. package/dist/{chunk-TK3XMPG2.js → chunk-3XH4YLCN.js} +4 -4
  46. package/dist/{chunk-EFHCTIFT.js → chunk-42Y7IZSV.js} +1 -1
  47. package/dist/{chunk-PUF3BL6C.js → chunk-4DOJLAGR.js} +1 -1
  48. package/dist/{chunk-P4IFREOO.js → chunk-4FYY6YW3.js} +1 -1
  49. package/dist/{chunk-LD5LSJ2B.js → chunk-4ZSQPGAU.js} +2 -2
  50. package/dist/{chunk-GL34UITI.js → chunk-56POFDRB.js} +3 -3
  51. package/dist/{chunk-GV7FB5L3.js → chunk-5F3L3QOO.js} +4 -4
  52. package/dist/{chunk-UBQ3TG3B.js → chunk-5QOMMZFZ.js} +1 -1
  53. package/dist/{chunk-UU2CQFSJ.js → chunk-5WU6534E.js} +2 -2
  54. package/dist/{chunk-CS5PJXL7.js → chunk-5YHI2FN4.js} +6 -6
  55. package/dist/{chunk-XYNQA6YC.js → chunk-6HDYWRCP.js} +1 -1
  56. package/dist/{chunk-GI3PX2JU.js → chunk-74NZ3CJQ.js} +1 -1
  57. package/dist/{chunk-P7CGVHH5.js → chunk-74R4IZ7N.js} +5 -5
  58. package/dist/{chunk-OXA2P5NJ.js → chunk-7BMBXTN4.js} +14 -14
  59. package/dist/{chunk-JJPBWBAF.js → chunk-7KMI2G24.js} +6 -6
  60. package/dist/{chunk-LIEPMKTX.js → chunk-AOGM34LL.js} +1 -1
  61. package/dist/{chunk-2IOQHB3C.js → chunk-B4MQSH3R.js} +5 -5
  62. package/dist/{chunk-PGZFXNRJ.js → chunk-BE5BA3GF.js} +1 -1
  63. package/dist/{chunk-Y5YJLBML.js → chunk-BM3AT5AF.js} +4 -4
  64. package/dist/{chunk-PZWC3JXW.js → chunk-C5LCOXAC.js} +5 -5
  65. package/dist/{chunk-FXQCSU4L.js → chunk-CHBK47DU.js} +3 -3
  66. package/dist/{chunk-ZZFYV26G.js → chunk-DLOUKVLM.js} +2 -2
  67. package/dist/{chunk-SNHAXVCJ.js → chunk-DQCQQ2PY.js} +1 -1
  68. package/dist/{chunk-A3BF7SGM.js → chunk-EDHOHS3C.js} +3 -3
  69. package/dist/{chunk-MRTGCXG4.js → chunk-FMDP5KWV.js} +6 -6
  70. package/dist/{chunk-FBLVK2WR.js → chunk-IVBQ5ISS.js} +13 -13
  71. package/dist/{chunk-CIMFZIGP.js → chunk-IVY6LYTO.js} +1 -1
  72. package/dist/{chunk-PKHNZTHY.js → chunk-JLBLEFBK.js} +3 -3
  73. package/dist/{chunk-UUX6Q3CB.js → chunk-JM4WO3JT.js} +2 -2
  74. package/dist/{chunk-6XOEYBWJ.js → chunk-KJYZXX7X.js} +5 -3
  75. package/dist/{chunk-2YRNRYZW.js → chunk-L2S7KWMF.js} +1 -1
  76. package/dist/{chunk-S2UHLCF5.js → chunk-LXSGNGK5.js} +3 -3
  77. package/dist/{chunk-GOJO2OLP.js → chunk-MJXP5MFI.js} +4 -4
  78. package/dist/{chunk-EV47UGDK.js → chunk-MPZFQP6O.js} +1 -1
  79. package/dist/{chunk-CKUFXQUJ.js → chunk-NFK5ZCLK.js} +3 -3
  80. package/dist/{chunk-DYDA77FS.js → chunk-NH7C6QBI.js} +4 -4
  81. package/dist/{chunk-INBG473K.js → chunk-OFJUHEEG.js} +4 -3
  82. package/dist/{chunk-NHIEDRZR.js → chunk-OFQACQDL.js} +27 -7
  83. package/dist/{chunk-D5NLXF72.js → chunk-OOODSAHW.js} +3 -3
  84. package/dist/{chunk-ESHMWZXX.js → chunk-PYW7VWVZ.js} +5 -5
  85. package/dist/{chunk-IHT33GZN.js → chunk-Q53QJQLY.js} +1 -1
  86. package/dist/{chunk-2OWG667E.js → chunk-RCDZ2XZ6.js} +1 -1
  87. package/dist/{chunk-RYDT6Y32.js → chunk-RDU5HWKU.js} +4 -4
  88. package/dist/{chunk-SUOW4HJB.js → chunk-RIVCTSYV.js} +5 -5
  89. package/dist/{chunk-NNV2XS3Y.js → chunk-RJEG3TUZ.js} +6 -6
  90. package/dist/{chunk-J2NPFRDI.js → chunk-SV2C7PZV.js} +6 -6
  91. package/dist/{chunk-PAPUUZOP.js → chunk-T2MJ5H2V.js} +10 -10
  92. package/dist/{chunk-H4GOJIOK.js → chunk-TDLK3ZU2.js} +4 -4
  93. package/dist/{chunk-3UYMJZXV.js → chunk-TKQGDSO4.js} +2 -2
  94. package/dist/{chunk-QVP6F6BX.js → chunk-TNNB7P6Z.js} +7 -7
  95. package/dist/{chunk-PZXQUV3P.js → chunk-TQYSBYYZ.js} +2 -2
  96. package/dist/{chunk-QS2IKPQW.js → chunk-TRTAYW7Z.js} +4 -4
  97. package/dist/{chunk-QBCV27CM.js → chunk-VIIQLZJS.js} +3 -3
  98. package/dist/{chunk-HGVUTO67.js → chunk-VYELSTZK.js} +3 -3
  99. package/dist/{chunk-JLYVYHD2.js → chunk-VZHDSUXK.js} +1 -1
  100. package/dist/{chunk-7CU7OGWP.js → chunk-WHTWHHE3.js} +218 -159
  101. package/dist/{chunk-CU65AFT4.js → chunk-WJTUCQ47.js} +1 -1
  102. package/dist/{chunk-7AQEWD2J.js → chunk-XCBKGQ6N.js} +3 -3
  103. package/dist/{chunk-ABAWD6QM.js → chunk-Y4I5YX3L.js} +3 -3
  104. package/dist/{chunk-7HYNAA6B.js → chunk-YH3RAWMV.js} +1 -1
  105. package/dist/{chunk-OJ4EEE2B.js → chunk-YJK3LBAJ.js} +6 -6
  106. package/dist/{chunk-4ZXFOT44.js → chunk-YOPFR22Y.js} +2 -2
  107. package/dist/{chunk-K2MW33DG.js → chunk-YP35CA5L.js} +2 -2
  108. package/dist/{chunk-WFSE7NRM.js → chunk-Z5VZWDGL.js} +2 -2
  109. package/dist/{chunk-QGOY3HNV.js → chunk-Z6DZHUCO.js} +6 -6
  110. package/dist/{chunk-MQBQRXTN.js → chunk-ZFS2Y5GK.js} +5 -5
  111. package/dist/{chunk-KUI2KGRZ.js → chunk-ZM3ELQPE.js} +9 -9
  112. package/dist/{codex-app-cards-switch-LTZCEFYB.js → codex-app-cards-switch-GUZ7XMPB.js} +11 -11
  113. package/dist/{codex-desktop-launch-DBJBV66U.js → codex-desktop-launch-Q5UINXU6.js} +1 -1
  114. package/dist/{codex-session-launch-6RTU73OP.js → codex-session-launch-4G5AFXXU.js} +18 -18
  115. package/dist/{config-YREUMA6Z.js → config-725HOJFK.js} +3 -3
  116. package/dist/{global-upgrade-EYLSJXXN.js → global-upgrade-AXTMEH3I.js} +10 -10
  117. package/dist/{identity-WIM6NVLP.js → identity-HLIZDGEN.js} +4 -4
  118. package/dist/{live-capabilities-SU3BEP2Z.js → live-capabilities-A74OIHWN.js} +5 -5
  119. package/dist/{paths-XV3FXWOM.js → paths-ZHDLQD25.js} +3 -3
  120. package/dist/{reapply-Q7QC3MWL.js → reapply-RC2AMGCQ.js} +27 -27
  121. package/dist/src/index.js +28 -28
  122. package/dist/{upgrade-lock-A2ALHHUG.js → upgrade-lock-4B3D3OCT.js} +4 -4
  123. package/dist/{usage-UNEATRXG.js → usage-VVPEFYKS.js} +3 -3
  124. package/package.json +1 -1
@@ -4,24 +4,24 @@ import {
4
4
  outcomeOfFailedAsk,
5
5
  reportMachineDenial,
6
6
  storedWaitDeadline
7
- } from "./chunk-OJ4EEE2B.js";
7
+ } from "./chunk-YJK3LBAJ.js";
8
8
  import {
9
9
  isGatingMoment,
10
10
  recordKeylessMoment
11
- } from "./chunk-7HYNAA6B.js";
11
+ } from "./chunk-YH3RAWMV.js";
12
12
  import {
13
13
  isAdmitted,
14
14
  readAdmissionRules
15
- } from "./chunk-QVP6F6BX.js";
15
+ } from "./chunk-TNNB7P6Z.js";
16
16
  import {
17
17
  isDeferAnswer,
18
18
  oncePerSession
19
- } from "./chunk-GI3PX2JU.js";
19
+ } from "./chunk-74NZ3CJQ.js";
20
20
  import {
21
21
  activeHookSource,
22
22
  activeIdentity,
23
23
  namedSource
24
- } from "./chunk-H4GOJIOK.js";
24
+ } from "./chunk-TDLK3ZU2.js";
25
25
  import {
26
26
  DEFAULT_SESSION,
27
27
  UNNAMED_ACTION,
@@ -45,10 +45,10 @@ import {
45
45
  reportEvent,
46
46
  scopePathFor,
47
47
  settleQuestionsForToolUse
48
- } from "./chunk-KUI2KGRZ.js";
48
+ } from "./chunk-ZM3ELQPE.js";
49
49
  import {
50
50
  repoKeyFor
51
- } from "./chunk-XYNQA6YC.js";
51
+ } from "./chunk-6HDYWRCP.js";
52
52
  import {
53
53
  askUser,
54
54
  cancelQuestion,
@@ -65,20 +65,20 @@ import {
65
65
  waitForQuestion,
66
66
  waitsForThePhone,
67
67
  withdrawQuestion
68
- } from "./chunk-ESHMWZXX.js";
68
+ } from "./chunk-PYW7VWVZ.js";
69
69
  import {
70
70
  getMachineId
71
- } from "./chunk-LD5LSJ2B.js";
71
+ } from "./chunk-4ZSQPGAU.js";
72
72
  import {
73
73
  claudeConfigDir
74
- } from "./chunk-PZXQUV3P.js";
74
+ } from "./chunk-TQYSBYYZ.js";
75
75
  import {
76
76
  getApiKey,
77
77
  getBaseUrl
78
- } from "./chunk-IHT33GZN.js";
78
+ } from "./chunk-Q53QJQLY.js";
79
79
  import {
80
80
  NPX_LATEST_COMMAND
81
- } from "./chunk-2OWG667E.js";
81
+ } from "./chunk-RCDZ2XZ6.js";
82
82
  import {
83
83
  AGENT_QUESTION_STRATEGY,
84
84
  AGENT_QUESTION_TOOL,
@@ -133,7 +133,7 @@ import {
133
133
  terminalStaysLiveForTheCall,
134
134
  timeoutActionWithoutLocalPrompt,
135
135
  unansweredRefusalReason
136
- } from "./chunk-INBG473K.js";
136
+ } from "./chunk-OFJUHEEG.js";
137
137
 
138
138
  // src/terminal-answer-watch.ts
139
139
  import { closeSync, openSync, readSync, statSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-DYDA77FS.js";
3
+ } from "./chunk-NH7C6QBI.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {
@@ -9,20 +9,20 @@ import {
9
9
  installedCodexApp,
10
10
  readCodexAppRuntime,
11
11
  shellQuoted
12
- } from "./chunk-NHIEDRZR.js";
12
+ } from "./chunk-OFQACQDL.js";
13
13
  import {
14
14
  writeHuman
15
15
  } from "./chunk-QCGNGEGE.js";
16
16
  import {
17
17
  xml
18
- } from "./chunk-JJPBWBAF.js";
18
+ } from "./chunk-7KMI2G24.js";
19
19
  import {
20
20
  CODEX_APP_LAUNCH_AT_LOGIN_VERB,
21
21
  CODEX_APP_LAUNCH_VARIABLE
22
22
  } from "./chunk-E46NE7FB.js";
23
23
  import {
24
24
  writeFileAtomic
25
- } from "./chunk-ABAWD6QM.js";
25
+ } from "./chunk-Y4I5YX3L.js";
26
26
 
27
27
  // src/codex-app-cards-switch.ts
28
28
  import { execFileSync as execFileSync2 } from "child_process";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  findNativeClaudeInstall
3
- } from "./chunk-SNHAXVCJ.js";
3
+ } from "./chunk-DQCQQ2PY.js";
4
4
  import {
5
5
  isFile
6
- } from "./chunk-ABAWD6QM.js";
6
+ } from "./chunk-Y4I5YX3L.js";
7
7
 
8
8
  // src/wrapper/claudeBinary.ts
9
9
  import { homedir } from "os";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-UU2CQFSJ.js";
3
+ } from "./chunk-5WU6534E.js";
4
4
  import {
5
5
  retryAgentCommand
6
- } from "./chunk-QBCV27CM.js";
6
+ } from "./chunk-VIIQLZJS.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-2OWG667E.js";
9
+ } from "./chunk-RCDZ2XZ6.js";
10
10
 
11
11
  // src/setup/codex-trust.ts
12
12
  var CODEX_TRUST_TELEMETRY = {
@@ -79,6 +79,8 @@ var describeHermesInstallFailure = (reason, pluginDirectory, receiptPath) => {
79
79
  return `${pluginDirectory} holds a pushary plugin that Pushary did not install. Remove that folder, then run setup again.`;
80
80
  case "plugin_write_failed":
81
81
  return `Could not write the Pushary plugin to ${pluginDirectory}.`;
82
+ case "plugin_load_timed_out":
83
+ return "Hermes did not finish loading the plugin in time, so it may be enabled without its tools. Run `hermes plugins disable pushary`, then run setup again.";
82
84
  case "settings_failed":
83
85
  return "The plugin is in place, but Hermes refused a settings change. Run `hermes plugins enable pushary`, then run setup again.";
84
86
  }
@@ -2,7 +2,7 @@ import {
2
2
  isApprovalMode,
3
3
  isRecord,
4
4
  isTimeoutAction
5
- } from "./chunk-INBG473K.js";
5
+ } from "./chunk-OFJUHEEG.js";
6
6
 
7
7
  // src/cli/settings-response.ts
8
8
  var isFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value);
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  readJsonSafe,
3
3
  writeJsonAtomic
4
- } from "./chunk-ABAWD6QM.js";
4
+ } from "./chunk-Y4I5YX3L.js";
5
5
  import {
6
6
  configFilePath
7
- } from "./chunk-IHT33GZN.js";
7
+ } from "./chunk-Q53QJQLY.js";
8
8
  import {
9
9
  readSetupOutcomeProperties
10
- } from "./chunk-INBG473K.js";
10
+ } from "./chunk-OFJUHEEG.js";
11
11
 
12
12
  // src/diagnostics/service-runtime.ts
13
13
  var unescapeXml = (value) => value.replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  compatibleConfigFile,
3
3
  hasCompatibleHooks
4
- } from "./chunk-H4GOJIOK.js";
4
+ } from "./chunk-TDLK3ZU2.js";
5
5
  import {
6
6
  pusharyHookExecutable
7
- } from "./chunk-TK3XMPG2.js";
7
+ } from "./chunk-3XH4YLCN.js";
8
8
  import {
9
9
  isProtectedByScope,
10
10
  registerHookEntry
11
- } from "./chunk-PZXQUV3P.js";
11
+ } from "./chunk-TQYSBYYZ.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-INBG473K.js";
14
+ } from "./chunk-OFJUHEEG.js";
15
15
 
16
16
  // src/cursor-config.ts
17
17
  var hookCommandOf = (entry) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeJsonAtomicDurable
3
- } from "./chunk-ABAWD6QM.js";
3
+ } from "./chunk-Y4I5YX3L.js";
4
4
 
5
5
  // src/transcript-recipient-pin.ts
6
6
  import { existsSync, mkdirSync, readFileSync, rmSync } from "fs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pusharyFetch
3
- } from "./chunk-7AQEWD2J.js";
3
+ } from "./chunk-XCBKGQ6N.js";
4
4
  import {
5
5
  getBaseUrl
6
- } from "./chunk-IHT33GZN.js";
6
+ } from "./chunk-Q53QJQLY.js";
7
7
  import {
8
8
  NetworkError
9
9
  } from "./chunk-PPY5N2E6.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-INBG473K.js";
16
+ } from "./chunk-OFJUHEEG.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;
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  resolveInstallSourceFor
3
- } from "./chunk-K2MW33DG.js";
3
+ } from "./chunk-YP35CA5L.js";
4
4
  import {
5
5
  backupFile,
6
6
  readJsonSafe,
7
7
  writeFileAtomic,
8
8
  writeJsonAtomic
9
- } from "./chunk-ABAWD6QM.js";
9
+ } from "./chunk-Y4I5YX3L.js";
10
10
  import {
11
11
  configFilePath
12
- } from "./chunk-IHT33GZN.js";
12
+ } from "./chunk-Q53QJQLY.js";
13
13
  import {
14
14
  API_KEY_PREFIX_PATTERN,
15
15
  isRecord
16
- } from "./chunk-INBG473K.js";
16
+ } from "./chunk-OFJUHEEG.js";
17
17
 
18
18
  // src/shell-alias.ts
19
19
  import { homedir } from "os";
@@ -128,18 +128,19 @@ var codexQuestionAnswerReason = (answers) => {
128
128
  };
129
129
 
130
130
  // ../contracts/src/claude-connector.ts
131
+ var CLAUDE_DIRECTORY_URL = "https://claude.ai/directory/pushary";
131
132
  var CLAUDE_CONNECTOR_URL = "https://pushary.com/api/mcp/mcp";
132
133
  var CLAUDE_CONNECTOR_GUIDE = "https://pushary.com/docs/agents/guides/claude-desktop";
133
134
  var COWORK_CONNECTOR_LIMIT = "Pushary\u2019s Cowork connector is cooperative: Claude chooses when to ask. It does not intercept Claude\u2019s native permission prompts or start new Cowork tasks.";
134
135
  var CLAUDE_CONNECTOR_STEPS = [
135
- "In Claude, open Customize > Connectors > Add custom connector and paste the Pushary connector URL.",
136
- "Leave OAuth Client ID and Secret empty. Sign in with the same Pushary account used by your phone and Mac app.",
136
+ `Open ${CLAUDE_DIRECTORY_URL} and choose Connect.`,
137
+ "Sign in with the same Pushary account used by your phone and Mac app.",
137
138
  "Enable Pushary in the Chat or Cowork conversation. Approve access to its tools if Claude asks.",
138
139
  "For proactive Cowork use, install the Pushary Cowork plugin/skill or paste the standing instructions into Settings > Cowork.",
139
140
  "Ask Claude to send the test question below, answer it from Pushary, and confirm Claude receives your answer."
140
141
  ];
141
142
  var CLAUDE_CONNECTOR_TEST = "Use Pushary ask_user to ask \u201CDid this setup question reach you?\u201D with type \u201Cconfirm\u201D. Use agentName \u201CClaude Cowork - Setup check\u201D in Cowork or \u201CClaude Chat - Setup check\u201D in Chat. Wait for my answer and tell me which answer you received. Do not run a command or change any files.";
142
- var COWORK_STANDING_INSTRUCTIONS = `Pushary is connected as a custom connector. Use it proactively to reach me on my phone or Mac notch.
143
+ var COWORK_STANDING_INSTRUCTIONS = `Pushary is connected as a connector. Use it proactively to reach me on my phone or Mac notch.
143
144
 
144
145
  - When you need a decision or clarifying answer, call ask_user. Use type "confirm", "select", or "input" as appropriate. Ask once on one channel.
145
146
  - Before a risky or irreversible action outside my existing authorization, call ask_user with type "confirm" and wait for approval. Silence is never consent.
@@ -154,22 +154,38 @@ var probeCodexRuntime = (path) => new Promise((resolve2) => {
154
154
  });
155
155
  socket.on("close", () => finish(null));
156
156
  });
157
- var codexRuntimeProcesses = (output) => {
157
+ var codexRuntimeProcesses = (output, commands = "") => {
158
+ const commandLines = /* @__PURE__ */ new Map();
159
+ for (const line of commands.trim() ? commands.trim().split("\n") : []) {
160
+ const match = /^\s*(\d+)\s+(.+)$/.exec(line);
161
+ if (!match) return null;
162
+ const pid = Number(match[1]);
163
+ if (!Number.isSafeInteger(pid) || pid <= 0 || commandLines.has(pid)) return null;
164
+ commandLines.set(pid, match[2]);
165
+ }
158
166
  const processes = [];
159
167
  for (const line of output.trim().split("\n")) {
160
168
  const match = /^\s*(\d+)\s+(\d+)\s+(.+)$/.exec(line);
161
169
  if (!match) return null;
162
170
  const pid = Number(match[1]), parent = Number(match[2]);
163
171
  if (!Number.isSafeInteger(pid) || pid <= 0 || !Number.isSafeInteger(parent) || parent < 0 || processes.some((process2) => process2.pid === pid)) return null;
164
- processes.push({ pid, parent, executable: match[3] });
172
+ const commandLine = commandLines.get(pid);
173
+ processes.push({ pid, parent, executable: match[3], ...commandLine === void 0 ? {} : { commandLine } });
165
174
  }
166
175
  return processes;
167
176
  };
177
+ var isCodexRuntimeEngine = (app, process2) => process2.executable.startsWith(`${app}/Contents/Resources/codex-cli/`) && process2.executable.endsWith("/codex");
178
+ var isCodexCloudExecServer = (process2) => {
179
+ const prefix = `${process2.executable} `;
180
+ if (!process2.commandLine?.startsWith(prefix)) return false;
181
+ const args = process2.commandLine.slice(prefix.length).trimStart();
182
+ return /^(?:(?:-c|--config)(?:\s+|=)forced_login_method=(?:"chatgpt"|'chatgpt'|chatgpt)\s+)*exec-server(?:\s+--remote(?:\s+|=)https?:\/\/[^\s'"]+)?(?:\s+--environment-id(?:\s+|=)[\w-]+)?\s*$/.test(args);
183
+ };
168
184
  var codexRuntimeStatus = (app, processes, replies) => {
169
185
  const byPid = new Map(processes.map((process2) => [process2.pid, process2]));
170
186
  const desktops = new Set(processes.filter((process2) => process2.executable.startsWith(`${app}/Contents/MacOS/`)).map((process2) => process2.pid));
171
187
  if (desktops.size === 0) return "closed";
172
- const isEngine = (process2) => process2.executable.startsWith(`${app}/Contents/Resources/codex-cli/`) && process2.executable.endsWith("/codex");
188
+ const isEngine = (process2) => isCodexRuntimeEngine(app, process2);
173
189
  const owningDesktop = (engine) => {
174
190
  const visited = /* @__PURE__ */ new Set([engine.pid]);
175
191
  let parent = byPid.get(engine.parent);
@@ -181,7 +197,7 @@ var codexRuntimeStatus = (app, processes, replies) => {
181
197
  }
182
198
  return null;
183
199
  };
184
- const engines = processes.filter((process2) => isEngine(process2) && owningDesktop(process2) !== null);
200
+ const engines = processes.filter((process2) => isEngine(process2) && !isCodexCloudExecServer(process2) && owningDesktop(process2) !== null);
185
201
  const owners = new Set(engines.map(owningDesktop));
186
202
  if ([...desktops].some((pid) => !owners.has(pid))) return "unknown";
187
203
  const observed = engines.map((engine) => replies.find((reply) => reply.enginePid === engine.pid && reply.pid === engine.parent));
@@ -193,7 +209,11 @@ var readCodexAppRuntime = async (app, directory = codexRuntimeDirectory()) => {
193
209
  if (app === null || process.platform !== "darwin" || uid === void 0) return "unknown";
194
210
  try {
195
211
  const snapshot = execFileSync("/bin/ps", ["-U", String(uid), "-o", "pid=,ppid=,comm="], { encoding: "utf8", timeout: 1e3, maxBuffer: 2 * 1024 * 1024 });
196
- const processes = codexRuntimeProcesses(snapshot);
212
+ const identities = codexRuntimeProcesses(snapshot);
213
+ if (identities === null) return "unknown";
214
+ const enginePids = identities.filter((process2) => isCodexRuntimeEngine(app, process2)).map((process2) => process2.pid);
215
+ const commands = enginePids.length === 0 ? "" : execFileSync("/bin/ps", ["-ww", "-p", enginePids.join(","), "-o", "pid=,args="], { encoding: "utf8", timeout: 1e3, maxBuffer: 2 * 1024 * 1024 });
216
+ const processes = codexRuntimeProcesses(snapshot, commands);
197
217
  if (processes === null) return "unknown";
198
218
  const livePids = new Set(processes.map((process2) => process2.pid));
199
219
  const names = privateDirectory(directory) ? readdirSync(directory).filter((name) => {
@@ -501,7 +521,7 @@ var loadedOnce = (load) => {
501
521
  };
502
522
 
503
523
  // src/codex-desktop-proxy.ts
504
- var loadThePhone = () => import("./api-IGMCPM35.js");
524
+ var loadThePhone = () => import("./api-4WCUP47K.js");
505
525
  var theFirstCardLoadsAgain = () => {
506
526
  };
507
527
  var APP_SERVER_COMMAND = "app-server";
@@ -1042,7 +1062,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
1042
1062
  return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
1043
1063
  }
1044
1064
  if (args[0] === APP_CARDS_FLAG) {
1045
- const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-LTZCEFYB.js");
1065
+ const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-GUZ7XMPB.js");
1046
1066
  return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
1047
1067
  }
1048
1068
  if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-POFBE6ZY.js";
4
4
  import {
5
5
  autoUpdateState
6
- } from "./chunk-PZXQUV3P.js";
6
+ } from "./chunk-TQYSBYYZ.js";
7
7
  import {
8
8
  readJsonSafe,
9
9
  writeJsonAtomic
10
- } from "./chunk-ABAWD6QM.js";
10
+ } from "./chunk-Y4I5YX3L.js";
11
11
  import {
12
12
  CLI_PACKAGE_NAMES,
13
13
  POSIX_GLOBAL_ROOT_SEGMENTS,
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-QTOLNRET.js";
18
18
  import {
19
19
  isAutoUpdateResult
20
- } from "./chunk-INBG473K.js";
20
+ } from "./chunk-OFJUHEEG.js";
21
21
 
22
22
  // src/auto-update.ts
23
23
  import { spawn } from "child_process";
@@ -6,18 +6,18 @@ import {
6
6
  McpToolError,
7
7
  SubscriptionRequiredError,
8
8
  callMcpTool
9
- } from "./chunk-GV7FB5L3.js";
9
+ } from "./chunk-5F3L3QOO.js";
10
10
  import {
11
11
  installNetworkDefaults,
12
12
  isNetworkFailure
13
- } from "./chunk-7AQEWD2J.js";
13
+ } from "./chunk-XCBKGQ6N.js";
14
14
  import {
15
15
  clientReportClaims
16
- } from "./chunk-PZXQUV3P.js";
16
+ } from "./chunk-TQYSBYYZ.js";
17
17
  import {
18
18
  getApiKey,
19
19
  getBaseUrl
20
- } from "./chunk-IHT33GZN.js";
20
+ } from "./chunk-Q53QJQLY.js";
21
21
  import {
22
22
  ASK_AGENT_NAME_MAX,
23
23
  CLIENT_REPORT_PATH,
@@ -26,7 +26,7 @@ import {
26
26
  TOOL_FAILURE_CODES,
27
27
  degradedLine,
28
28
  truncateLine
29
- } from "./chunk-INBG473K.js";
29
+ } from "./chunk-OFJUHEEG.js";
30
30
 
31
31
  // src/api.ts
32
32
  import { randomUUID } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-2OWG667E.js";
3
+ } from "./chunk-RCDZ2XZ6.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -2,7 +2,7 @@ import {
2
2
  DISCONNECT_AGENT_IDS,
3
3
  SETUP_AGENT_CHOICES,
4
4
  isApprovalMode
5
- } from "./chunk-INBG473K.js";
5
+ } from "./chunk-OFJUHEEG.js";
6
6
 
7
7
  // src/cli/mode-request.ts
8
8
  var parseDuration = (value) => {
@@ -12,7 +12,7 @@ import {
12
12
  reachVerdict,
13
13
  reachesYou,
14
14
  verifyDelivery
15
- } from "./chunk-QGOY3HNV.js";
15
+ } from "./chunk-Z6DZHUCO.js";
16
16
  import {
17
17
  humanIsTty,
18
18
  writeHuman
@@ -24,14 +24,14 @@ import {
24
24
  } from "./chunk-FO3MDD26.js";
25
25
  import {
26
26
  reportedInstallSource
27
- } from "./chunk-K2MW33DG.js";
27
+ } from "./chunk-YP35CA5L.js";
28
28
  import {
29
29
  NPX_LATEST_COMMAND
30
- } from "./chunk-2OWG667E.js";
30
+ } from "./chunk-RCDZ2XZ6.js";
31
31
  import {
32
32
  NO_PAIRING_COMPUTER,
33
33
  PAIR_TTL_SECONDS
34
- } from "./chunk-INBG473K.js";
34
+ } from "./chunk-OFJUHEEG.js";
35
35
 
36
36
  // src/onboarding.ts
37
37
  import qrcodeTerminal from "qrcode-terminal";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  readMacAppAgentKey
3
- } from "./chunk-MQBQRXTN.js";
3
+ } from "./chunk-ZFS2Y5GK.js";
4
4
  import {
5
5
  API_KEYS_PATH
6
- } from "./chunk-ZZFYV26G.js";
6
+ } from "./chunk-DLOUKVLM.js";
7
7
  import {
8
8
  findExportedKeyLines,
9
9
  isAdoptedMacAppKey,
@@ -13,13 +13,13 @@ import {
13
13
  readConfigFileKey,
14
14
  readKeySource,
15
15
  readMacAppKeyPrefix
16
- } from "./chunk-DYDA77FS.js";
16
+ } from "./chunk-NH7C6QBI.js";
17
17
  import {
18
18
  absoluteUrl
19
- } from "./chunk-CKUFXQUJ.js";
19
+ } from "./chunk-NFK5ZCLK.js";
20
20
  import {
21
21
  isValidApiKey
22
- } from "./chunk-INBG473K.js";
22
+ } from "./chunk-OFJUHEEG.js";
23
23
 
24
24
  // src/key-revocation.ts
25
25
  var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
@@ -3,10 +3,10 @@ import {
3
3
  forkFinishWithUpgradeLock,
4
4
  installWithUpgradeLock,
5
5
  releaseAutoUpdateLock
6
- } from "./chunk-BUBC4R5J.js";
6
+ } from "./chunk-22FLBWJH.js";
7
7
  import {
8
8
  phoneStartIsRequired
9
- } from "./chunk-Y5YJLBML.js";
9
+ } from "./chunk-BM3AT5AF.js";
10
10
  import {
11
11
  describeAutoUpdateCheck,
12
12
  globalInstallLocation,
@@ -18,25 +18,25 @@ import {
18
18
  readAutoUpdateState,
19
19
  updateAutoUpdateState,
20
20
  upgradeEntryFor
21
- } from "./chunk-D5NLXF72.js";
21
+ } from "./chunk-OOODSAHW.js";
22
22
  import {
23
23
  autoUpdateLock,
24
24
  autoUpdateLog,
25
25
  autoUpdateState
26
- } from "./chunk-PZXQUV3P.js";
26
+ } from "./chunk-TQYSBYYZ.js";
27
27
  import {
28
28
  execNpm,
29
29
  fetchLatestPublishedVersion,
30
30
  npmErrorMessage,
31
31
  readGlobalCliInstallAt,
32
32
  readGlobalPrefix
33
- } from "./chunk-ABAWD6QM.js";
33
+ } from "./chunk-Y4I5YX3L.js";
34
34
  import {
35
35
  EXIT
36
36
  } from "./chunk-KZERVKTD.js";
37
37
  import {
38
38
  NPX_LATEST_COMMAND
39
- } from "./chunk-2OWG667E.js";
39
+ } from "./chunk-RCDZ2XZ6.js";
40
40
  import {
41
41
  commandsPackage,
42
42
  globalUpgradeEntry,
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-H4GOJIOK.js";
3
+ } from "./chunk-TDLK3ZU2.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands,
7
7
  liveBridgeProbe,
8
8
  resolveBridgeStub
9
- } from "./chunk-TK3XMPG2.js";
9
+ } from "./chunk-3XH4YLCN.js";
10
10
  import {
11
11
  AGENT_CHOICES
12
- } from "./chunk-PUF3BL6C.js";
12
+ } from "./chunk-4DOJLAGR.js";
13
13
  import {
14
14
  claudeSettings,
15
15
  codexHooksJson,
@@ -18,10 +18,10 @@ import {
18
18
  guardedArgv,
19
19
  pusharyDir,
20
20
  vscodePluginDir
21
- } from "./chunk-PZXQUV3P.js";
21
+ } from "./chunk-TQYSBYYZ.js";
22
22
  import {
23
23
  readJsonSafe
24
- } from "./chunk-ABAWD6QM.js";
24
+ } from "./chunk-Y4I5YX3L.js";
25
25
  import {
26
26
  HOOK_BUDGETS,
27
27
  HOOK_COMPATIBLE_PROFILES,
@@ -29,7 +29,7 @@ import {
29
29
  OPENCODE_APPROVAL_EVENT,
30
30
  hookCompatibleProfile,
31
31
  isRecord
32
- } from "./chunk-INBG473K.js";
32
+ } from "./chunk-OFJUHEEG.js";
33
33
 
34
34
  // src/opencode-plugin.ts
35
35
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -3,16 +3,16 @@ import {
3
3
  loadPin,
4
4
  savePin,
5
5
  verifyRecipients
6
- } from "./chunk-EV47UGDK.js";
6
+ } from "./chunk-MPZFQP6O.js";
7
7
  import {
8
8
  SESSION_HISTORY_RETENTION_DAYS
9
9
  } from "./chunk-MHUKYYYR.js";
10
10
  import {
11
11
  ensureDaemonRunning
12
- } from "./chunk-JJPBWBAF.js";
12
+ } from "./chunk-7KMI2G24.js";
13
13
  import {
14
14
  hookOwnerOf
15
- } from "./chunk-TK3XMPG2.js";
15
+ } from "./chunk-3XH4YLCN.js";
16
16
  import {
17
17
  buildTranscriptRecords,
18
18
  decodePublicKey,
@@ -23,37 +23,37 @@ import {
23
23
  recordSealerFor,
24
24
  uploadTranscriptRecords,
25
25
  wrapSessionKey
26
- } from "./chunk-WFSE7NRM.js";
26
+ } from "./chunk-Z5VZWDGL.js";
27
27
  import {
28
28
  external_exports
29
29
  } from "./chunk-XMSDA5WA.js";
30
30
  import {
31
31
  transcriptEnvironmentPreference,
32
32
  transcriptsEnabled
33
- } from "./chunk-CIMFZIGP.js";
33
+ } from "./chunk-IVY6LYTO.js";
34
34
  import {
35
35
  readTranscriptPreference
36
- } from "./chunk-DYDA77FS.js";
36
+ } from "./chunk-NH7C6QBI.js";
37
37
  import {
38
38
  claudeConfigDir,
39
39
  codexHome,
40
40
  pusharyDir
41
- } from "./chunk-PZXQUV3P.js";
41
+ } from "./chunk-TQYSBYYZ.js";
42
42
  import {
43
43
  writeJsonAtomic,
44
44
  writeJsonAtomicDurable
45
- } from "./chunk-ABAWD6QM.js";
45
+ } from "./chunk-Y4I5YX3L.js";
46
46
  import {
47
47
  getApiKey,
48
48
  getBaseUrl
49
- } from "./chunk-IHT33GZN.js";
49
+ } from "./chunk-Q53QJQLY.js";
50
50
  import {
51
51
  PENDING_COMMAND_PREFIX,
52
52
  SESSION_HISTORY_BACKFILL_LIMIT_BYTES,
53
53
  canonicalJsonText,
54
54
  isRecord,
55
55
  redactSecretsFromContent
56
- } from "./chunk-INBG473K.js";
56
+ } from "./chunk-OFJUHEEG.js";
57
57
 
58
58
  // src/transcript-registration.ts
59
59
  import { createHash as createHash4 } from "crypto";