pushary 1.9.51 → 1.9.53

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 (91) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +9 -0
  3. package/dist/{api-PPNFRSJC.js → api-K6ZROHYB.js} +7 -7
  4. package/dist/bin/pushary-bell-hook.js +15 -15
  5. package/dist/bin/pushary-bell.js +3 -3
  6. package/dist/bin/pushary-claude.js +16 -16
  7. package/dist/bin/pushary-clean.js +28 -26
  8. package/dist/bin/pushary-codex-bridge.js +10 -10
  9. package/dist/bin/pushary-codex-hook.js +20 -20
  10. package/dist/bin/pushary-codex-session.js +6 -6
  11. package/dist/bin/pushary-codex.js +8 -8
  12. package/dist/bin/pushary-connect.js +16 -16
  13. package/dist/bin/pushary-daemon.js +23 -21
  14. package/dist/bin/pushary-disconnect.js +17 -17
  15. package/dist/bin/pushary-doctor.js +25 -25
  16. package/dist/bin/pushary-elicitation-hook.js +17 -17
  17. package/dist/bin/pushary-gemini-bridge.js +5 -5
  18. package/dist/bin/pushary-gemini-hook.js +18 -18
  19. package/dist/bin/pushary-hook.js +18 -18
  20. package/dist/bin/pushary-login.js +6 -6
  21. package/dist/bin/pushary-logout.js +16 -16
  22. package/dist/bin/pushary-mcp.js +12 -7
  23. package/dist/bin/pushary-mode.js +6 -6
  24. package/dist/bin/pushary-notification-hook.js +15 -15
  25. package/dist/bin/pushary-opencode-hook.js +17 -17
  26. package/dist/bin/pushary-permission-denied-hook.js +18 -18
  27. package/dist/bin/pushary-permission-hook.js +18 -18
  28. package/dist/bin/pushary-post-hook.js +15 -15
  29. package/dist/bin/pushary-prompt-hook.js +15 -15
  30. package/dist/bin/pushary-session-end-hook.js +15 -15
  31. package/dist/bin/pushary-session-start-hook.js +21 -19
  32. package/dist/bin/pushary-setup.js +97 -92
  33. package/dist/bin/pushary-status.js +18 -18
  34. package/dist/bin/pushary-stop-hook.js +15 -15
  35. package/dist/bin/pushary-stopfailure-hook.js +15 -15
  36. package/dist/bin/pushary-suggestions.js +6 -6
  37. package/dist/bin/pushary-transcript-register.js +8 -8
  38. package/dist/bin/pushary-upgrade.js +53 -27
  39. package/dist/bin/pushary-wait.js +6 -6
  40. package/dist/bin/pushary.js +4 -4
  41. package/dist/{chunk-WVSM3G4C.js → chunk-2LEH5IGX.js} +1 -1
  42. package/dist/{chunk-X5GHIFST.js → chunk-46TC24ET.js} +1 -1
  43. package/dist/{chunk-EJCPHLY2.js → chunk-56ZTIY6D.js} +1 -1
  44. package/dist/{chunk-AA2K3H7Y.js → chunk-63IQRYVP.js} +3 -3
  45. package/dist/{chunk-3ICRY72Q.js → chunk-6C4S3QYD.js} +1 -1
  46. package/dist/{chunk-PVDSN6TB.js → chunk-ABGN5RN2.js} +6 -3
  47. package/dist/{chunk-ZXGDBCIH.js → chunk-ALZZVC3E.js} +1 -1
  48. package/dist/{chunk-5CRQCIHR.js → chunk-BL3WAGIK.js} +3 -3
  49. package/dist/{chunk-26MUPAKS.js → chunk-DHJSBK63.js} +1 -1
  50. package/dist/{chunk-UR7XX2DV.js → chunk-EK7SZJ4K.js} +1 -1
  51. package/dist/{chunk-3YAOJEHG.js → chunk-EPOD7QHT.js} +4 -4
  52. package/dist/{chunk-6QPRQVQM.js → chunk-FCMWUYIE.js} +2 -2
  53. package/dist/{chunk-K3BIMGP4.js → chunk-H57DXSHR.js} +2 -2
  54. package/dist/{chunk-UKX5WIB5.js → chunk-IHUFRAHB.js} +3 -3
  55. package/dist/{chunk-VD2OAF7Q.js → chunk-JOWF4Y4P.js} +1 -1
  56. package/dist/{chunk-PMJEN6CX.js → chunk-JPABKXK6.js} +5 -5
  57. package/dist/{chunk-DT5Y55FI.js → chunk-K23WMLPY.js} +3 -3
  58. package/dist/{chunk-SRXBOMSR.js → chunk-L5YTS2BP.js} +1 -1
  59. package/dist/{chunk-GTSI6NG6.js → chunk-LD4MWJMD.js} +3 -3
  60. package/dist/{chunk-EGKD4S5H.js → chunk-LIESRXK5.js} +1 -1
  61. package/dist/{chunk-PTNSIGLB.js → chunk-MHQB62K5.js} +2 -2
  62. package/dist/{chunk-AZHTI5JX.js → chunk-MTKV4RUQ.js} +79 -13
  63. package/dist/{chunk-4JM2CK2A.js → chunk-N77BH7H2.js} +9 -3
  64. package/dist/{chunk-DUMZORSL.js → chunk-NECZKPJN.js} +27 -4
  65. package/dist/{chunk-43NXSBNZ.js → chunk-NELH25J7.js} +6 -6
  66. package/dist/{chunk-TQ6AGJVH.js → chunk-NHVEQLQC.js} +1 -1
  67. package/dist/{chunk-YQDZ7ZIL.js → chunk-OML4YFBN.js} +1 -1
  68. package/dist/{chunk-3OLEGCMU.js → chunk-P2546BBI.js} +2 -2
  69. package/dist/{chunk-2YSCVT6Q.js → chunk-Q7OXI6VS.js} +3 -3
  70. package/dist/{chunk-RLADRNPV.js → chunk-QKU46TK5.js} +1 -1
  71. package/dist/{chunk-7DBTOPOT.js → chunk-RH6KR6EH.js} +3 -3
  72. package/dist/{chunk-W26Q2DTD.js → chunk-RL7EOD6I.js} +80 -19
  73. package/dist/{chunk-7YAVKENV.js → chunk-SUIB4O3S.js} +53 -13
  74. package/dist/{chunk-KQBXPGXO.js → chunk-T6RIKJUO.js} +1 -1
  75. package/dist/{chunk-DT5CACWZ.js → chunk-U2L42GVI.js} +4 -4
  76. package/dist/{chunk-VZRCM362.js → chunk-VQPSWD3A.js} +3 -3
  77. package/dist/{chunk-LXRQLDGW.js → chunk-XDCXTDHH.js} +3 -3
  78. package/dist/{chunk-JZDRR7BL.js → chunk-XUW2DRAQ.js} +3 -3
  79. package/dist/{chunk-XQHPHJHR.js → chunk-XZRLFBEA.js} +1 -1
  80. package/dist/{chunk-2QPHUCXU.js → chunk-ZMPR436Z.js} +6 -6
  81. package/dist/{codex-app-cards-switch-ZQRT7MXB.js → codex-app-cards-switch-RENOSSDD.js} +14 -6
  82. package/dist/{codex-desktop-launch-X7UKQ4VR.js → codex-desktop-launch-I2D6QATK.js} +5 -1
  83. package/dist/{codex-session-launch-IX33LOQZ.js → codex-session-launch-KLH2FSSJ.js} +10 -10
  84. package/dist/{global-upgrade-DGP2E2NE.js → global-upgrade-AZN3BPI3.js} +5 -5
  85. package/dist/{identity-YISWVJ2A.js → identity-AQIMUWYN.js} +3 -3
  86. package/dist/{live-capabilities-44KFBOD4.js → live-capabilities-4IIFAMHU.js} +2 -2
  87. package/dist/{paths-VLGX4GJA.js → paths-X4IPV2WJ.js} +2 -2
  88. package/dist/{reapply-35F3WDTB.js → reapply-CXODG53B.js} +18 -15
  89. package/dist/src/index.js +13 -13
  90. package/dist/{upgrade-lock-LMO3DSSU.js → upgrade-lock-AHISGKER.js} +3 -3
  91. package/package.json +1 -1
@@ -10,7 +10,7 @@ import "../chunk-PUZZELE6.js";
10
10
  import {
11
11
  clearDeclinedAgent,
12
12
  declinedAgentForSetupChoice
13
- } from "../chunk-ZXGDBCIH.js";
13
+ } from "../chunk-ALZZVC3E.js";
14
14
  import {
15
15
  CURSOR_GATE_SCRIPT,
16
16
  describeVersionManagerPin,
@@ -21,7 +21,7 @@ import {
21
21
  codexTrustOutcome,
22
22
  describeCodexTrustConfirmation,
23
23
  needsCodexTrustStep
24
- } from "../chunk-TQ6AGJVH.js";
24
+ } from "../chunk-NHVEQLQC.js";
25
25
  import {
26
26
  describeWaitLadder
27
27
  } from "../chunk-CVWG2N3Y.js";
@@ -39,15 +39,15 @@ import {
39
39
  roundTripEvidence,
40
40
  verifyRoundTrip,
41
41
  waitForYourPhone
42
- } from "../chunk-XQHPHJHR.js";
42
+ } from "../chunk-XZRLFBEA.js";
43
43
  import "../chunk-3EGEA4KH.js";
44
44
  import {
45
45
  readManagedControlEvidence,
46
46
  waitForMachineReadiness
47
- } from "../chunk-LXRQLDGW.js";
47
+ } from "../chunk-XDCXTDHH.js";
48
48
  import {
49
49
  ensureCodexTrustsPusharyHooks
50
- } from "../chunk-6QPRQVQM.js";
50
+ } from "../chunk-FCMWUYIE.js";
51
51
  import {
52
52
  describeSetupSideEffects,
53
53
  installAgentSkill,
@@ -55,7 +55,7 @@ import {
55
55
  } from "../chunk-EUW7JL2K.js";
56
56
  import {
57
57
  codexEngineBehindLauncher
58
- } from "../chunk-PVDSN6TB.js";
58
+ } from "../chunk-ABGN5RN2.js";
59
59
  import "../chunk-XCEN33UP.js";
60
60
  import {
61
61
  CURSOR_PLUGIN_BACKUP_INFIX,
@@ -65,7 +65,7 @@ import {
65
65
  soleGateFile,
66
66
  soleGateReceipt,
67
67
  soleGateReceiptFile
68
- } from "../chunk-AA2K3H7Y.js";
68
+ } from "../chunk-63IQRYVP.js";
69
69
  import {
70
70
  HERMES_PIP_PACKAGE,
71
71
  describeDetection,
@@ -78,18 +78,21 @@ import {
78
78
  runHermesConfigScript,
79
79
  shortenHome,
80
80
  vscodeSettingsTargets
81
- } from "../chunk-3YAOJEHG.js";
81
+ } from "../chunk-EPOD7QHT.js";
82
82
  import {
83
83
  mcpServerBearer,
84
84
  readMacAppAgentKey
85
- } from "../chunk-PTNSIGLB.js";
85
+ } from "../chunk-MHQB62K5.js";
86
86
  import {
87
87
  setHumanStream
88
88
  } from "../chunk-QCGNGEGE.js";
89
89
  import {
90
90
  AgentConfigError,
91
+ CODEX_INSTRUCTIONS_LABEL,
91
92
  FX_PUSHARY_TOOLS_RULE,
92
93
  FX_QUESTION_TOOL,
94
+ GEMINI_INSTRUCTIONS_LABEL,
95
+ OPENCODE_INSTRUCTIONS_LABEL,
93
96
  SHARED_AGENTS_MD_LABEL,
94
97
  afterAgentFailureNote,
95
98
  agentFailureFromError,
@@ -113,10 +116,10 @@ import {
113
116
  writeInstructionBlock,
114
117
  writeSetupConfigFile,
115
118
  writeSetupConfigJson
116
- } from "../chunk-AZHTI5JX.js";
119
+ } from "../chunk-MTKV4RUQ.js";
117
120
  import {
118
121
  MCP_BRIDGE_BINARY
119
- } from "../chunk-X5GHIFST.js";
122
+ } from "../chunk-46TC24ET.js";
120
123
  import {
121
124
  OPENCODE_HOOK_BINARY,
122
125
  addOpenCodeMcpServer,
@@ -132,7 +135,7 @@ import {
132
135
  openCodePluginDir,
133
136
  openCodePluginFile,
134
137
  openCodeWired
135
- } from "../chunk-DT5Y55FI.js";
138
+ } from "../chunk-K23WMLPY.js";
136
139
  import {
137
140
  ansiPainter,
138
141
  createIo,
@@ -147,14 +150,14 @@ import {
147
150
  nodeCodexInstallProbe,
148
151
  phoneStartIsRequired,
149
152
  resolveControlPolicy
150
- } from "../chunk-WVSM3G4C.js";
153
+ } from "../chunk-2LEH5IGX.js";
151
154
  import {
152
155
  detectClaudeVersion
153
156
  } from "../chunk-RIVNNBEK.js";
154
157
  import {
155
158
  describeAutoUpdateAnnouncement,
156
159
  takeAutoUpdateAnnouncement
157
- } from "../chunk-RLADRNPV.js";
160
+ } from "../chunk-QKU46TK5.js";
158
161
  import {
159
162
  addClaudeMcpServer,
160
163
  addCompatibleHooks,
@@ -169,11 +172,12 @@ import {
169
172
  compatibleInstructionsFile,
170
173
  compatibleMcpFile,
171
174
  compatiblePermissionRuleFile,
175
+ compatibleRecord,
172
176
  compatibleTargetPaths,
173
177
  hasCompatibleHooks,
174
178
  isClaudeMcpSnapshot,
175
179
  updateClaudeMcpSnapshot
176
- } from "../chunk-4JM2CK2A.js";
180
+ } from "../chunk-N77BH7H2.js";
177
181
  import {
178
182
  DAEMON_COLD_START_TIMEOUT_MS,
179
183
  clearDaemonNeedsLogin,
@@ -187,7 +191,7 @@ import {
187
191
  replaceDaemonService,
188
192
  stopDaemonService,
189
193
  waitForDaemonRemoteProof
190
- } from "../chunk-5CRQCIHR.js";
194
+ } from "../chunk-BL3WAGIK.js";
191
195
  import {
192
196
  KEEP_HINT,
193
197
  captureHookTakeover,
@@ -199,20 +203,20 @@ import {
199
203
  geminiWired,
200
204
  planHooks,
201
205
  pusharyHookExecutable
202
- } from "../chunk-2YSCVT6Q.js";
206
+ } from "../chunk-Q7OXI6VS.js";
203
207
  import {
204
208
  GEMINI_HOOK_BINARY,
205
209
  GEMINI_HOOK_EVENTS,
206
210
  addGeminiHooks,
207
211
  addGeminiMcpServer
208
- } from "../chunk-3ICRY72Q.js";
212
+ } from "../chunk-6C4S3QYD.js";
209
213
  import {
210
214
  AGENT_CHOICES,
211
215
  effectiveControlMode,
212
216
  effectiveVerify,
213
217
  parseSetupOptions
214
218
  } from "../chunk-BUXDR6US.js";
215
- import "../chunk-EGKD4S5H.js";
219
+ import "../chunk-LIESRXK5.js";
216
220
  import "../chunk-GMXKITVA.js";
217
221
  import {
218
222
  transcriptPreferenceForSetup
@@ -243,19 +247,19 @@ import {
243
247
  } from "../chunk-36NGFHE4.js";
244
248
  import {
245
249
  reportEvent
246
- } from "../chunk-DT5CACWZ.js";
250
+ } from "../chunk-U2L42GVI.js";
247
251
  import "../chunk-3RPN7AAT.js";
248
252
  import "../chunk-JBT3ZSJS.js";
249
- import "../chunk-2QPHUCXU.js";
253
+ import "../chunk-ZMPR436Z.js";
254
+ import "../chunk-P2546BBI.js";
250
255
  import "../chunk-POFBE6ZY.js";
251
- import "../chunk-3OLEGCMU.js";
252
256
  import {
253
257
  checkApiKey,
254
258
  describeKeyCheck,
255
259
  samePusharyAccount
256
- } from "../chunk-SRXBOMSR.js";
257
- import "../chunk-UR7XX2DV.js";
258
- import "../chunk-KQBXPGXO.js";
260
+ } from "../chunk-L5YTS2BP.js";
261
+ import "../chunk-EK7SZJ4K.js";
262
+ import "../chunk-T6RIKJUO.js";
259
263
  import {
260
264
  UsageError
261
265
  } from "../chunk-7QLSKOSU.js";
@@ -277,6 +281,7 @@ import {
277
281
  codexConfigToml,
278
282
  codexHome,
279
283
  codexHookPositions,
284
+ codexHooksJson,
280
285
  codexSkillDir2 as codexSkillDir,
281
286
  codexVacatedIndexes,
282
287
  cursorPluginDir,
@@ -300,7 +305,7 @@ import {
300
305
  readCodexMcpAuth,
301
306
  vscodePluginDir,
302
307
  vscodePluginMcp
303
- } from "../chunk-YQDZ7ZIL.js";
308
+ } from "../chunk-OML4YFBN.js";
304
309
  import {
305
310
  NpmMissingError,
306
311
  fetchLatestPublishedVersion,
@@ -309,7 +314,7 @@ import {
309
314
  plannedGlobalPackage,
310
315
  resolveGlobalBinDir,
311
316
  resolveGlobalBinary
312
- } from "../chunk-JZDRR7BL.js";
317
+ } from "../chunk-XUW2DRAQ.js";
313
318
  import {
314
319
  backupFile,
315
320
  readJsonSafe
@@ -342,7 +347,7 @@ import {
342
347
 
343
348
  // bin/pushary-setup.ts
344
349
  import { existsSync, readFileSync, writeFileSync, mkdirSync, cpSync, rmSync, renameSync, realpathSync, statSync, openSync, readSync, closeSync } from "fs";
345
- import { join as join3, dirname as dirname3, basename } from "path";
350
+ import { join as join4, dirname as dirname3, basename } from "path";
346
351
  import { homedir, hostname } from "os";
347
352
  import { execSync } from "child_process";
348
353
  import { checkbox, input, confirm } from "@inquirer/prompts";
@@ -352,6 +357,26 @@ import { parse as parseTOML, stringify as stringifyTOML } from "smol-toml";
352
357
  // src/cli/exit.ts
353
358
  var isExitPromptError = (err) => err instanceof Error && (err.name === "ExitPromptError" || err.message.includes("User force closed") || /force closed the prompt/i.test(err.message));
354
359
 
360
+ // src/setup/agent-targets.ts
361
+ import { join } from "path";
362
+ var agentSetupTargets = (exists) => ({
363
+ claude_code: [claudeJson(), claudeSettings(), join(claudeSkillDir(), "SKILL.md")],
364
+ codex: [join(codexHome(), "config.toml"), codexHooksJson(), join(codexSkillDir(), "SKILL.md"), codexAgentsMd()],
365
+ gemini_cli: [geminiSettings(), geminiMd()],
366
+ hermes: [`the Hermes virtualenv (pip install ${HERMES_PIP_PACKAGE})`],
367
+ cursor: [join(cursorPluginDir(), "mcp.json"), cursorUserHooks()],
368
+ vscode: [vscodePluginMcp(), ...vscodeSettingsTargets(exists)],
369
+ opencode: [
370
+ openCodePluginFile(),
371
+ join(openCodePluginDir(), "package.json"),
372
+ openCodeConfigFile(),
373
+ openCodeInstructionsFile()
374
+ ],
375
+ fx: [fxMcpProfile(), fxSettings(), fxAgentsMd()],
376
+ ...compatibleRecord((profile) => compatibleTargetPaths(profile)),
377
+ custom: ["nothing (prints connection details only)"]
378
+ });
379
+
355
380
  // src/cli/enter-key.ts
356
381
  var enterKeyListener = (input2 = process.stdin) => {
357
382
  if (input2.isTTY !== true) return null;
@@ -896,7 +921,7 @@ var unverifiedKeyClosingReason = (facts) => {
896
921
  };
897
922
 
898
923
  // src/setup/codex-version.ts
899
- import { dirname, join } from "path";
924
+ import { dirname, join as join2 } from "path";
900
925
  var parseCodexVersion = parseVersion;
901
926
  var compareCodexVersion = compareVersion;
902
927
  var versionFromManifest = (probe, binPath) => {
@@ -911,10 +936,10 @@ var versionFromManifest = (probe, binPath) => {
911
936
  }
912
937
  };
913
938
  let dir = dirname(binPath);
914
- const shimVersion = readVersion(join(dir, "node_modules", "@openai", "codex", "package.json"));
939
+ const shimVersion = readVersion(join2(dir, "node_modules", "@openai", "codex", "package.json"));
915
940
  if (shimVersion) return shimVersion;
916
941
  for (let depth = 0; depth < 4; depth++) {
917
- const version = readVersion(join(dir, "package.json"));
942
+ const version = readVersion(join2(dir, "package.json"));
918
943
  if (version) return version;
919
944
  const parent = dirname(dir);
920
945
  if (parent === dir) break;
@@ -938,7 +963,7 @@ var readCodexVersion = (probe) => {
938
963
  };
939
964
 
940
965
  // src/setup/codex-bundled.ts
941
- import { dirname as dirname2, join as join2 } from "path";
966
+ import { dirname as dirname2, join as join3 } from "path";
942
967
  var asRecord = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
943
968
  var codexCliPathFromConfig = (config) => {
944
969
  const servers = asRecord(config.mcp_servers);
@@ -950,12 +975,12 @@ var codexCliPathFromConfig = (config) => {
950
975
  return null;
951
976
  };
952
977
  var SYSTEM_CHATGPT_APP = "/Applications/ChatGPT.app";
953
- var userChatGptApp = (home) => join2(home, "Applications", "ChatGPT.app");
978
+ var userChatGptApp = (home) => join3(home, "Applications", "ChatGPT.app");
954
979
  var bundledCodexCandidates = (home, platform) => platform === "darwin" ? [
955
980
  codexEngineInside(SYSTEM_CHATGPT_APP),
956
981
  codexEngineInside(userChatGptApp(home)),
957
- join2(SYSTEM_CHATGPT_APP, "Contents", "Resources", "codex"),
958
- join2(userChatGptApp(home), "Contents", "Resources", "codex")
982
+ join3(SYSTEM_CHATGPT_APP, "Contents", "Resources", "codex"),
983
+ join3(userChatGptApp(home), "Contents", "Resources", "codex")
959
984
  ] : [];
960
985
  var findBundledCodex = (probe) => {
961
986
  const config = probe.config();
@@ -966,7 +991,7 @@ var findBundledCodex = (probe) => {
966
991
  };
967
992
  var ENGINE_ENTRYPOINT_INSIDE_THE_APP = `/${CODEX_ENGINE_DIRECTORY}/${CODEX_ENGINE_ENTRYPOINT}`;
968
993
  var MANIFEST_VERSION = /^\d+\.\d+\.\d+/;
969
- var codexEngineManifestBeside = (codex) => codex.endsWith(ENGINE_ENTRYPOINT_INSIDE_THE_APP) ? join2(dirname2(dirname2(codex)), CODEX_ENGINE_MANIFEST) : null;
994
+ var codexEngineManifestBeside = (codex) => codex.endsWith(ENGINE_ENTRYPOINT_INSIDE_THE_APP) ? join3(dirname2(dirname2(codex)), CODEX_ENGINE_MANIFEST) : null;
970
995
  var parseCodexEngineManifestVersion = (contents) => {
971
996
  let manifest;
972
997
  try {
@@ -1271,8 +1296,8 @@ var fetchSkillContent = async () => {
1271
1296
  if (_cachedSkillContent) return _cachedSkillContent;
1272
1297
  const __dirname = dirname3(fileURLToPath(import.meta.url));
1273
1298
  const candidates = [
1274
- join3(__dirname, "..", "..", "data", "SKILL.md"),
1275
- join3(__dirname, "..", "data", "SKILL.md")
1299
+ join4(__dirname, "..", "..", "data", "SKILL.md"),
1300
+ join4(__dirname, "..", "data", "SKILL.md")
1276
1301
  ];
1277
1302
  const source = candidates.find((path) => existsSync(path));
1278
1303
  if (!source) throw new Error("packaged skill not found");
@@ -1282,12 +1307,12 @@ var fetchSkillContent = async () => {
1282
1307
  var writePackagedSkill = async (dir) => {
1283
1308
  const content = await fetchSkillContent();
1284
1309
  if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
1285
- writeFileSync(join3(dir, "SKILL.md"), content, "utf-8");
1310
+ writeFileSync(join4(dir, "SKILL.md"), content, "utf-8");
1286
1311
  };
1287
- var skillsCliInUse = () => isInstalled("skills") || existsSync(join3(homedir(), ".agents", "skills"));
1312
+ var skillsCliInUse = () => isInstalled("skills") || existsSync(join4(homedir(), ".agents", "skills"));
1288
1313
  var skillInstallEffects = {
1289
1314
  runSkillsCli: installSkillViaSkillsCli,
1290
- skillModifiedAt: (dir) => statSync(join3(dir, "SKILL.md"), { throwIfNoEntry: false })?.mtimeMs ?? null,
1315
+ skillModifiedAt: (dir) => statSync(join4(dir, "SKILL.md"), { throwIfNoEntry: false })?.mtimeMs ?? null,
1291
1316
  writePackagedSkill,
1292
1317
  now: () => Date.now()
1293
1318
  };
@@ -1393,7 +1418,7 @@ var setupHermes = async (_apiKey) => {
1393
1418
  console.log(` ${dim("To send approvals back to the terminal:")} remove ${bold("security.approval.transport")} from ~/.hermes/config.yaml`);
1394
1419
  console.log(` ${dim("To re-enable terminal questions:")} remove ${bold("clarify")} from ${dim("agent.disabled_toolsets")}`);
1395
1420
  };
1396
- var CODEX_HOOKS_JSON = join3(CODEX_HOME, "hooks.json");
1421
+ var CODEX_HOOKS_JSON = join4(CODEX_HOME, "hooks.json");
1397
1422
  var CODEX_HOOKS_MIN_VERSION = [0, 122, 0];
1398
1423
  var codexOnPath = () => {
1399
1424
  const whichCmd = IS_WINDOWS ? "where" : "which";
@@ -1621,7 +1646,7 @@ var setupCodex = async (apiKey) => {
1621
1646
  }
1622
1647
  await installSkill("codex", CODEX_SKILL_DIR);
1623
1648
  await spinner("Teaching Codex to ask via push (~/.codex/AGENTS.md)", async () => {
1624
- writeInstructionBlock(CODEX_AGENTS_MD, renderAgentInstructions("Codex"));
1649
+ writeInstructionBlock(CODEX_AGENTS_MD, renderAgentInstructions(CODEX_INSTRUCTIONS_LABEL));
1625
1650
  });
1626
1651
  const confirmation = hooksSupported ? await confirmCodexTrust() : null;
1627
1652
  const trustOutcome = confirmation === null ? null : codexTrustOutcome(confirmation, portedTrustWritten);
@@ -1671,15 +1696,15 @@ var setupCodex = async (apiKey) => {
1671
1696
  var resolveBundledPlugin = () => {
1672
1697
  const dir = dirname3(fileURLToPath(import.meta.url));
1673
1698
  const candidates = [
1674
- join3(dir, "..", "..", "data", "cursor-plugin"),
1675
- join3(dir, "..", "data", "cursor-plugin"),
1676
- join3(dir, "..", "..", "..", "cursor-plugin"),
1677
- join3(dir, "..", "..", "cursor-plugin")
1699
+ join4(dir, "..", "..", "data", "cursor-plugin"),
1700
+ join4(dir, "..", "data", "cursor-plugin"),
1701
+ join4(dir, "..", "..", "..", "cursor-plugin"),
1702
+ join4(dir, "..", "..", "cursor-plugin")
1678
1703
  ];
1679
- return candidates.find((p) => existsSync(join3(p, ".cursor-plugin", "plugin.json"))) ?? null;
1704
+ return candidates.find((p) => existsSync(join4(p, ".cursor-plugin", "plugin.json"))) ?? null;
1680
1705
  };
1681
1706
  var installCursorUserHooks = (gateScript) => {
1682
- const bundled = readJson(join3(CURSOR_PLUGIN_DIR, "hooks", "hooks.json")).hooks ?? {};
1707
+ const bundled = readJson(join4(CURSOR_PLUGIN_DIR, "hooks", "hooks.json")).hooks ?? {};
1683
1708
  let userHooks = {};
1684
1709
  if (existsSync(CURSOR_USER_HOOKS)) {
1685
1710
  const result = readJsonSafe(CURSOR_USER_HOOKS);
@@ -1707,7 +1732,7 @@ var installCursorUserHooks = (gateScript) => {
1707
1732
  writeJson(CURSOR_USER_HOOKS, { ...userHooks, version: userHooks.version ?? 1, hooks });
1708
1733
  };
1709
1734
  var neutralizePluginGate = () => {
1710
- const path = join3(CURSOR_PLUGIN_DIR, "hooks", "hooks.json");
1735
+ const path = join4(CURSOR_PLUGIN_DIR, "hooks", "hooks.json");
1711
1736
  if (!existsSync(path)) return;
1712
1737
  const data = readJson(path);
1713
1738
  if (!data.hooks) return;
@@ -1730,7 +1755,7 @@ var setupCursor = async (apiKey) => {
1730
1755
  const source = resolveBundledPlugin();
1731
1756
  if (!source) throw new Error("bundled Cursor plugin not found in this package");
1732
1757
  await spinner("Installing Pushary plugin", async () => {
1733
- const staging = join3(dirname3(CURSOR_PLUGIN_DIR), `${CURSOR_PLUGIN_STAGING_PREFIX}${process.pid}`);
1758
+ const staging = join4(dirname3(CURSOR_PLUGIN_DIR), `${CURSOR_PLUGIN_STAGING_PREFIX}${process.pid}`);
1734
1759
  const backup = `${CURSOR_PLUGIN_DIR}${CURSOR_PLUGIN_BACKUP_INFIX}${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
1735
1760
  rmSync(staging, { recursive: true, force: true });
1736
1761
  try {
@@ -1738,7 +1763,7 @@ var setupCursor = async (apiKey) => {
1738
1763
  recursive: true,
1739
1764
  filter: (p) => !["tools", "node_modules", ".git", ".DS_Store"].includes(basename(p))
1740
1765
  });
1741
- const staged = readJsonSafe(join3(staging, ".cursor-plugin", "plugin.json"));
1766
+ const staged = readJsonSafe(join4(staging, ".cursor-plugin", "plugin.json"));
1742
1767
  if (staged.kind !== "ok") {
1743
1768
  throw new Error("staged Cursor plugin is missing or has an unreadable plugin.json");
1744
1769
  }
@@ -1756,7 +1781,7 @@ var setupCursor = async (apiKey) => {
1756
1781
  }
1757
1782
  });
1758
1783
  await spinner("Linking your API key", async () => {
1759
- const mcpPath = join3(CURSOR_PLUGIN_DIR, "mcp.json");
1784
+ const mcpPath = join4(CURSOR_PLUGIN_DIR, "mcp.json");
1760
1785
  const mcp = readAgentJson(mcpPath);
1761
1786
  const servers = mcp.mcpServers ?? {};
1762
1787
  if (servers.pushary) {
@@ -1766,7 +1791,7 @@ var setupCursor = async (apiKey) => {
1766
1791
  }
1767
1792
  });
1768
1793
  await spinner("Registering permission gate (~/.cursor/hooks.json)", async () => {
1769
- installCursorUserHooks(join3(CURSOR_PLUGIN_DIR, "scripts", "pushary-gate.mjs"));
1794
+ installCursorUserHooks(join4(CURSOR_PLUGIN_DIR, "scripts", "pushary-gate.mjs"));
1770
1795
  neutralizePluginGate();
1771
1796
  });
1772
1797
  console.log();
@@ -1780,16 +1805,16 @@ var setupCursor = async (apiKey) => {
1780
1805
  var resolveBundledVsCodePlugin = () => {
1781
1806
  const dir = dirname3(fileURLToPath(import.meta.url));
1782
1807
  const candidates = [
1783
- join3(dir, "..", "..", "data", "vscode-plugin"),
1784
- join3(dir, "..", "data", "vscode-plugin"),
1785
- join3(dir, "..", "..", "..", "vscode-plugin"),
1786
- join3(dir, "..", "..", "vscode-plugin")
1808
+ join4(dir, "..", "..", "data", "vscode-plugin"),
1809
+ join4(dir, "..", "data", "vscode-plugin"),
1810
+ join4(dir, "..", "..", "..", "vscode-plugin"),
1811
+ join4(dir, "..", "..", "vscode-plugin")
1787
1812
  ];
1788
- return candidates.find((p) => existsSync(join3(p, ".claude-plugin", "plugin.json"))) ?? null;
1813
+ return candidates.find((p) => existsSync(join4(p, ".claude-plugin", "plugin.json"))) ?? null;
1789
1814
  };
1790
1815
  var pinGuardedVsCodeGate = (pluginDir) => {
1791
- const hooksPath = join3(pluginDir, "hooks", "hooks.json");
1792
- const guarded = guardVsCodeGateHooks(readJson(hooksPath), join3(pluginDir, "scripts", CURSOR_GATE_SCRIPT));
1816
+ const hooksPath = join4(pluginDir, "hooks", "hooks.json");
1817
+ const guarded = guardVsCodeGateHooks(readJson(hooksPath), join4(pluginDir, "scripts", CURSOR_GATE_SCRIPT));
1793
1818
  if (guarded.kind === "invalid") throw new Error(guarded.reason);
1794
1819
  writeJson(hooksPath, guarded.document);
1795
1820
  };
@@ -1818,7 +1843,7 @@ var setupVsCode = async (apiKey) => {
1818
1843
  const source = resolveBundledVsCodePlugin();
1819
1844
  if (!source) throw new Error("bundled VS Code plugin not found in this package");
1820
1845
  await spinner("Installing Pushary plugin", async () => {
1821
- const staging = join3(dirname3(VSCODE_PLUGIN_DIR), `.pushary-staging-vscode-${process.pid}`);
1846
+ const staging = join4(dirname3(VSCODE_PLUGIN_DIR), `.pushary-staging-vscode-${process.pid}`);
1822
1847
  const backup = `${VSCODE_PLUGIN_DIR}.pushary-backup-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
1823
1848
  mkdirSync(dirname3(VSCODE_PLUGIN_DIR), { recursive: true });
1824
1849
  rmSync(staging, { recursive: true, force: true });
@@ -1827,7 +1852,7 @@ var setupVsCode = async (apiKey) => {
1827
1852
  recursive: true,
1828
1853
  filter: (p) => !["tools", "node_modules", ".git", ".DS_Store"].includes(basename(p))
1829
1854
  });
1830
- const staged = readJsonSafe(join3(staging, ".claude-plugin", "plugin.json"));
1855
+ const staged = readJsonSafe(join4(staging, ".claude-plugin", "plugin.json"));
1831
1856
  if (staged.kind !== "ok") {
1832
1857
  throw new Error("staged VS Code plugin is missing or has an unreadable plugin.json");
1833
1858
  }
@@ -2054,7 +2079,7 @@ var setupGemini = async (apiKey) => {
2054
2079
  writeSetupConfigJson(GEMINI_SETTINGS, settings, KEY_FILE_MODE);
2055
2080
  });
2056
2081
  await spinner("Teaching Gemini to ask via push (~/.gemini/GEMINI.md)", async () => {
2057
- writeInstructionBlock(GEMINI_MD, renderAgentInstructions("Gemini"));
2082
+ writeInstructionBlock(GEMINI_MD, renderAgentInstructions(GEMINI_INSTRUCTIONS_LABEL));
2058
2083
  });
2059
2084
  console.log();
2060
2085
  console.log(` ${dim("What this configured:")}`);
@@ -2086,7 +2111,7 @@ var setupOpenCode = async (apiKey) => {
2086
2111
  writeSetupConfigJson(openCodeConfigFile(), config, KEY_FILE_MODE);
2087
2112
  });
2088
2113
  await spinner("Teaching OpenCode to ask via push", async () => {
2089
- writeInstructionBlock(OPENCODE_INSTRUCTIONS(), renderAgentInstructions("OpenCode"));
2114
+ writeInstructionBlock(OPENCODE_INSTRUCTIONS(), renderAgentInstructions(OPENCODE_INSTRUCTIONS_LABEL));
2090
2115
  });
2091
2116
  console.log();
2092
2117
  console.log(` ${dim("What this configured:")}`);
@@ -2099,10 +2124,6 @@ var setupOpenCode = async (apiKey) => {
2099
2124
  noteManual("Restart OpenCode to load the plugin.");
2100
2125
  return "configured";
2101
2126
  };
2102
- var compatibleRecord = (of) => HOOK_COMPATIBLE_PROFILES.reduce(
2103
- (record, profile) => ({ ...record, [profile.agentType]: of(profile) }),
2104
- {}
2105
- );
2106
2127
  var clearSetupChoiceDecline = (agent) => {
2107
2128
  const declined = declinedAgentForSetupChoice(agent);
2108
2129
  if (declined) clearDeclinedAgent(declined);
@@ -2172,25 +2193,25 @@ var agentIsWired = (agent) => {
2172
2193
  return claudeWired({
2173
2194
  claudeJson: readJson2(CLAUDE_JSON),
2174
2195
  settings: readJson2(CLAUDE_SETTINGS),
2175
- skillExists: existsSync(join3(CLAUDE_SKILL_DIR, "SKILL.md"))
2196
+ skillExists: existsSync(join4(CLAUDE_SKILL_DIR, "SKILL.md"))
2176
2197
  });
2177
2198
  case "codex": {
2178
2199
  let config = null;
2179
2200
  try {
2180
- config = parseTOML(readFileSync(join3(CODEX_HOME, "config.toml"), "utf-8"));
2201
+ config = parseTOML(readFileSync(join4(CODEX_HOME, "config.toml"), "utf-8"));
2181
2202
  } catch {
2182
2203
  config = null;
2183
2204
  }
2184
2205
  return codexWired({
2185
2206
  config,
2186
2207
  hooks: readJson2(CODEX_HOOKS_JSON),
2187
- skillExists: existsSync(join3(CODEX_SKILL_DIR, "SKILL.md"))
2208
+ skillExists: existsSync(join4(CODEX_SKILL_DIR, "SKILL.md"))
2188
2209
  });
2189
2210
  }
2190
2211
  case "gemini_cli":
2191
2212
  return geminiWired({ settings: readJson2(GEMINI_SETTINGS) });
2192
2213
  case "cursor":
2193
- return existsSync(join3(CURSOR_PLUGIN_DIR, "mcp.json"));
2214
+ return existsSync(join4(CURSOR_PLUGIN_DIR, "mcp.json"));
2194
2215
  case "vscode":
2195
2216
  return existsSync(VSCODE_PLUGIN_MCP);
2196
2217
  case "opencode":
@@ -2340,8 +2361,8 @@ var offerProjectInstructions = async (agents, options) => {
2340
2361
  });
2341
2362
  if (!wanted) return;
2342
2363
  for (const target of targets) {
2343
- await spinner(`Writing managed block to ${join3(process.cwd(), target.file)}`, async () => {
2344
- writeInstructionBlock(join3(process.cwd(), target.file), renderProjectAgentInstructions(target.label));
2364
+ await spinner(`Writing managed block to ${join4(process.cwd(), target.file)}`, async () => {
2365
+ writeInstructionBlock(join4(process.cwd(), target.file), renderProjectAgentInstructions(target.label));
2345
2366
  }, { optional: true });
2346
2367
  }
2347
2368
  console.log(` ${dim("Commit the file to share it. Teammates without a key fall back to the terminal.")}`);
@@ -2533,23 +2554,7 @@ var resolveAgents = async (options) => {
2533
2554
  validate: (picked) => picked.length > 0 || "Select at least one agent, or re-run with --agents none."
2534
2555
  });
2535
2556
  };
2536
- var AGENT_TARGETS = {
2537
- claude_code: [CLAUDE_JSON, CLAUDE_SETTINGS, join3(CLAUDE_SKILL_DIR, "SKILL.md")],
2538
- codex: [join3(CODEX_HOME, "config.toml"), CODEX_HOOKS_JSON, join3(CODEX_SKILL_DIR, "SKILL.md"), CODEX_AGENTS_MD],
2539
- gemini_cli: [GEMINI_SETTINGS, GEMINI_MD],
2540
- hermes: [`the Hermes virtualenv (pip install ${HERMES_PIP_PACKAGE})`],
2541
- cursor: [join3(CURSOR_PLUGIN_DIR, "mcp.json"), CURSOR_USER_HOOKS],
2542
- vscode: [VSCODE_PLUGIN_MCP, ...vscodeSettingsTargets(existsSync)],
2543
- opencode: [
2544
- openCodePluginFile(),
2545
- join3(openCodePluginDir(), "package.json"),
2546
- openCodeConfigFile(),
2547
- OPENCODE_INSTRUCTIONS()
2548
- ],
2549
- fx: [fxMcpProfile(), fxSettings(), fxAgentsMd()],
2550
- ...compatibleRecord((profile) => compatibleTargetPaths(profile)),
2551
- custom: ["nothing (prints connection details only)"]
2552
- };
2557
+ var AGENT_TARGETS = agentSetupTargets(existsSync);
2553
2558
  var reportDryRun = (apiKey, agents, keyCheck, controlMode) => {
2554
2559
  console.log();
2555
2560
  console.log(` ${bold("Dry run.")} ${dim("Nothing below has been written.")}`);
@@ -3,16 +3,16 @@ import {
3
3
  describeReach,
4
4
  fetchChannels,
5
5
  reachVerdict
6
- } from "../chunk-XQHPHJHR.js";
6
+ } from "../chunk-XZRLFBEA.js";
7
7
  import "../chunk-3EGEA4KH.js";
8
8
  import {
9
9
  describeLastSeen,
10
10
  listMachines
11
- } from "../chunk-LXRQLDGW.js";
11
+ } from "../chunk-XDCXTDHH.js";
12
12
  import {
13
13
  CONNECTED_THROUGH_MAC_APP,
14
14
  readMacAppConnectionWhenKeyless
15
- } from "../chunk-PTNSIGLB.js";
15
+ } from "../chunk-MHQB62K5.js";
16
16
  import "../chunk-QCGNGEGE.js";
17
17
  import {
18
18
  SIGNED_OUT_ON_MAC_MESSAGE,
@@ -20,21 +20,21 @@ import {
20
20
  describeSignedOutKey,
21
21
  readSignedOutDiagnosis
22
22
  } from "../chunk-6SWMKF5E.js";
23
- import "../chunk-DT5Y55FI.js";
23
+ import "../chunk-K23WMLPY.js";
24
24
  import {
25
25
  createIo
26
26
  } from "../chunk-FO3MDD26.js";
27
27
  import {
28
28
  exitOnHelpFlag
29
29
  } from "../chunk-S6RNS4UL.js";
30
- import "../chunk-WVSM3G4C.js";
30
+ import "../chunk-2LEH5IGX.js";
31
31
  import "../chunk-RIVNNBEK.js";
32
- import "../chunk-4JM2CK2A.js";
33
- import "../chunk-5CRQCIHR.js";
34
- import "../chunk-2YSCVT6Q.js";
35
- import "../chunk-3ICRY72Q.js";
32
+ import "../chunk-N77BH7H2.js";
33
+ import "../chunk-BL3WAGIK.js";
34
+ import "../chunk-Q7OXI6VS.js";
35
+ import "../chunk-6C4S3QYD.js";
36
36
  import "../chunk-BUXDR6US.js";
37
- import "../chunk-EGKD4S5H.js";
37
+ import "../chunk-LIESRXK5.js";
38
38
  import {
39
39
  rejectUnknownFlags
40
40
  } from "../chunk-GMXKITVA.js";
@@ -43,18 +43,18 @@ import "../chunk-6ICPEJY5.js";
43
43
  import {
44
44
  readKeySource
45
45
  } from "../chunk-VYBH6D4X.js";
46
- import "../chunk-DT5CACWZ.js";
46
+ import "../chunk-U2L42GVI.js";
47
47
  import "../chunk-3RPN7AAT.js";
48
48
  import "../chunk-JBT3ZSJS.js";
49
- import "../chunk-2QPHUCXU.js";
49
+ import "../chunk-ZMPR436Z.js";
50
+ import "../chunk-P2546BBI.js";
50
51
  import "../chunk-POFBE6ZY.js";
51
- import "../chunk-3OLEGCMU.js";
52
52
  import {
53
53
  checkApiKey,
54
54
  describeKeyCheck
55
- } from "../chunk-SRXBOMSR.js";
56
- import "../chunk-UR7XX2DV.js";
57
- import "../chunk-KQBXPGXO.js";
55
+ } from "../chunk-L5YTS2BP.js";
56
+ import "../chunk-EK7SZJ4K.js";
57
+ import "../chunk-T6RIKJUO.js";
58
58
  import {
59
59
  UsageError
60
60
  } from "../chunk-7QLSKOSU.js";
@@ -62,8 +62,8 @@ import {
62
62
  EXIT
63
63
  } from "../chunk-KZERVKTD.js";
64
64
  import "../chunk-4QQEUJL4.js";
65
- import "../chunk-YQDZ7ZIL.js";
66
- import "../chunk-JZDRR7BL.js";
65
+ import "../chunk-OML4YFBN.js";
66
+ import "../chunk-XUW2DRAQ.js";
67
67
  import "../chunk-AQFEP65J.js";
68
68
  import "../chunk-CQ5JGRML.js";
69
69
  import "../chunk-MC4VY5LK.js";