pushary 1.8.0 → 1.8.2

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 (106) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +27 -19
  3. package/data/SKILL.md +8 -8
  4. package/data/cowork/SKILL.md +2 -2
  5. package/data/cursor-plugin/README.md +2 -2
  6. package/data/cursor-plugin/scripts/redaction.mjs +4 -2
  7. package/data/cursor-plugin/skills/pushary/SKILL.md +7 -7
  8. package/data/vscode-plugin/README.md +4 -4
  9. package/data/vscode-plugin/scripts/pushary-gate.mjs +2 -2
  10. package/data/vscode-plugin/scripts/redaction.mjs +4 -2
  11. package/data/vscode-plugin/skills/pushary/SKILL.md +7 -7
  12. package/dist/bin/pushary-bell-hook.js +24 -23
  13. package/dist/bin/pushary-bell.js +9 -9
  14. package/dist/bin/pushary-claude.js +27 -26
  15. package/dist/bin/pushary-clean.js +35 -32
  16. package/dist/bin/pushary-codex-bridge.js +23 -21
  17. package/dist/bin/pushary-codex-hook.js +32 -31
  18. package/dist/bin/pushary-codex.js +13 -13
  19. package/dist/bin/pushary-connect.js +13 -13
  20. package/dist/bin/pushary-cowork.js +5 -5
  21. package/dist/bin/pushary-daemon.js +100 -36
  22. package/dist/bin/pushary-disconnect.js +19 -18
  23. package/dist/bin/pushary-doctor.js +41 -38
  24. package/dist/bin/pushary-elicitation-hook.js +26 -25
  25. package/dist/bin/pushary-gemini-bridge.js +18 -15
  26. package/dist/bin/pushary-gemini-hook.js +29 -28
  27. package/dist/bin/pushary-hook.js +33 -32
  28. package/dist/bin/pushary-login.js +12 -12
  29. package/dist/bin/pushary-logout.js +7 -7
  30. package/dist/bin/pushary-mcp.js +9 -9
  31. package/dist/bin/pushary-mode.js +9 -9
  32. package/dist/bin/pushary-notification-hook.js +29 -28
  33. package/dist/bin/pushary-opencode-hook.js +28 -27
  34. package/dist/bin/pushary-permission-denied-hook.js +33 -32
  35. package/dist/bin/pushary-permission-hook.js +32 -31
  36. package/dist/bin/pushary-post-hook.js +29 -28
  37. package/dist/bin/pushary-prompt-hook.js +29 -28
  38. package/dist/bin/pushary-session-end-hook.js +29 -28
  39. package/dist/bin/pushary-session-start-hook.js +33 -32
  40. package/dist/bin/pushary-setup.js +52 -108
  41. package/dist/bin/pushary-stats.js +5 -5
  42. package/dist/bin/pushary-status.js +17 -15
  43. package/dist/bin/pushary-stop-hook.js +29 -28
  44. package/dist/bin/pushary-stopfailure-hook.js +29 -28
  45. package/dist/bin/pushary-suggestions.js +4 -4
  46. package/dist/bin/pushary-transcript-register.js +20 -19
  47. package/dist/bin/pushary-transcripts.js +7 -7
  48. package/dist/bin/pushary-upgrade.js +29 -27
  49. package/dist/bin/pushary-wait.js +9 -9
  50. package/dist/bin/pushary.js +6 -6
  51. package/dist/{chunk-2OY3ZZ5N.js → chunk-2SLCHCVN.js} +3 -3
  52. package/dist/{chunk-E4FJTUH4.js → chunk-35X5UDML.js} +7 -7
  53. package/dist/{chunk-LXQ5FBBD.js → chunk-4A3UQERT.js} +1 -1
  54. package/dist/{chunk-CJVVKOSR.js → chunk-5DGNEUXK.js} +2 -2
  55. package/dist/{chunk-DB3ONZB4.js → chunk-5Y2DY6X4.js} +2 -2
  56. package/dist/{chunk-NQTHFF4W.js → chunk-5YY3IJT4.js} +21 -19
  57. package/dist/{chunk-AXPCESYO.js → chunk-644AEX4T.js} +3 -3
  58. package/dist/{chunk-UI36QSBI.js → chunk-64H5IZZD.js} +2 -2
  59. package/dist/chunk-6ICPEJY5.js +20 -0
  60. package/dist/{chunk-OLQRRFBX.js → chunk-72WOCX22.js} +1 -1
  61. package/dist/{chunk-JU6W3XAU.js → chunk-7ITOAMCD.js} +1 -1
  62. package/dist/{chunk-JYG4B33G.js → chunk-7U7ZWUTR.js} +1 -1
  63. package/dist/{chunk-VQKRG3AC.js → chunk-B3UVRGYP.js} +11 -9
  64. package/dist/{chunk-KVQBWI5T.js → chunk-BDMC5H5L.js} +2 -2
  65. package/dist/{chunk-HZVVNGEW.js → chunk-CB23AO4D.js} +2 -2
  66. package/dist/{chunk-D2FX3EPW.js → chunk-CHMOVJ2M.js} +1 -1
  67. package/dist/{chunk-ZVSKMPBZ.js → chunk-DLEKCAQL.js} +1 -1
  68. package/dist/{chunk-JZTHGAPA.js → chunk-DUA5O6X5.js} +8 -8
  69. package/dist/{chunk-2ABTSGFT.js → chunk-DVW2MYCM.js} +3 -3
  70. package/dist/{chunk-TY4JT7W3.js → chunk-DXBS2EL7.js} +1 -1
  71. package/dist/{chunk-KGDWDSNL.js → chunk-EESPY5DG.js} +2 -2
  72. package/dist/{chunk-WE2J62NC.js → chunk-EIGJYCOE.js} +5 -5
  73. package/dist/{chunk-CULUZTWQ.js → chunk-F6NTWZZC.js} +9 -9
  74. package/dist/{chunk-IPVKH2ST.js → chunk-HMNR7B2F.js} +1 -1
  75. package/dist/{chunk-OKXS7WDZ.js → chunk-HOEB6AKG.js} +1 -1
  76. package/dist/{chunk-R7437YI3.js → chunk-HVDMGDYV.js} +2 -2
  77. package/dist/{chunk-DE4Y6TCC.js → chunk-I3XLHSOC.js} +8 -7
  78. package/dist/{chunk-M5ICYGHT.js → chunk-I4HKMUZQ.js} +3 -3
  79. package/dist/{chunk-M5JDZ45W.js → chunk-INSMZNS7.js} +5 -5
  80. package/dist/{chunk-CVQYGMSR.js → chunk-KB2FTO4O.js} +4 -4
  81. package/dist/{chunk-MDEPU45E.js → chunk-LK2S5XIV.js} +6 -6
  82. package/dist/{chunk-NGDD6TXY.js → chunk-MMVCI6DT.js} +5 -5
  83. package/dist/{chunk-J5TIV3J6.js → chunk-MOTNSXC3.js} +5 -5
  84. package/dist/{chunk-C2WCPBF7.js → chunk-MYHG7PX2.js} +1 -1
  85. package/dist/{chunk-7Z7Q4GGS.js → chunk-N6JJJTPH.js} +6 -3
  86. package/dist/{chunk-EX3GAPA4.js → chunk-NHCUXTEM.js} +1 -1
  87. package/dist/{chunk-Q7E4I6UA.js → chunk-NNWQ5VDB.js} +13 -10
  88. package/dist/{chunk-AHV4LNB5.js → chunk-NOLPURUI.js} +1 -1
  89. package/dist/{chunk-GPEGOGRJ.js → chunk-ON5JW2HP.js} +1 -1
  90. package/dist/{chunk-SIFVFP6T.js → chunk-RIVNNBEK.js} +2 -1
  91. package/dist/{chunk-3EVPNIBE.js → chunk-S2UNQQQS.js} +7 -20
  92. package/dist/{chunk-SLFABHW3.js → chunk-T55H6YEP.js} +2 -2
  93. package/dist/{chunk-P7WQEVWA.js → chunk-TJMAXQ5Q.js} +2 -2
  94. package/dist/{chunk-SAXBC4AZ.js → chunk-UMMCHS6P.js} +1 -1
  95. package/dist/{chunk-A2A2YTMG.js → chunk-UPLV5AJF.js} +1 -1
  96. package/dist/{chunk-MPWXGONV.js → chunk-URNXU3FO.js} +1 -1
  97. package/dist/{chunk-EPCXUP3P.js → chunk-VFFHQC7W.js} +1 -1
  98. package/dist/{chunk-RHR6NARM.js → chunk-W2LJ4O3A.js} +2 -2
  99. package/dist/{chunk-6J2JC2RT.js → chunk-XEGVVU5H.js} +3 -3
  100. package/dist/chunk-XQZEIWAV.js +150 -0
  101. package/dist/{chunk-EYK3GSRH.js → chunk-YNCGXHM4.js} +4 -4
  102. package/dist/{chunk-ZSZSSJCV.js → chunk-ZJYJAD52.js} +1 -1
  103. package/dist/{reapply-CW3MA66V.js → reapply-3UERAKQN.js} +10 -9
  104. package/dist/src/index.js +21 -20
  105. package/package.json +1 -1
  106. package/dist/chunk-HQ6G3B5R.js +0 -59
@@ -1,19 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  inspectConfiguredManagedProviders
4
- } from "../chunk-VQKRG3AC.js";
5
- import "../chunk-SIFVFP6T.js";
6
- import "../chunk-RHR6NARM.js";
4
+ } from "../chunk-B3UVRGYP.js";
5
+ import "../chunk-W2LJ4O3A.js";
7
6
  import {
8
7
  HEARTBEAT_INTERVAL_MS,
9
8
  sendHeartbeat
10
- } from "../chunk-DE4Y6TCC.js";
11
- import "../chunk-AXPCESYO.js";
9
+ } from "../chunk-I3XLHSOC.js";
10
+ import "../chunk-644AEX4T.js";
12
11
  import {
12
+ codexBinaryIsBroken,
13
+ detectLaunchableProviderCapabilities,
13
14
  detectProviderLiveCapabilities,
14
15
  hasSpawnProvider,
15
- resolveControlPolicy
16
- } from "../chunk-HQ6G3B5R.js";
16
+ launchAdvertisement,
17
+ launchableProviders,
18
+ resolveControlPolicy,
19
+ resolveProviderBinary
20
+ } from "../chunk-XQZEIWAV.js";
21
+ import "../chunk-RIVNNBEK.js";
17
22
  import {
18
23
  SESSION_REAP_SILENCE_MS,
19
24
  describeIdleWindow,
@@ -21,15 +26,15 @@ import {
21
26
  listProcessProofs,
22
27
  ownsLiveProcess,
23
28
  silentSpawnedProofs
24
- } from "../chunk-ZSZSSJCV.js";
29
+ } from "../chunk-ZJYJAD52.js";
25
30
  import {
26
31
  startRegisteredTranscripts
27
- } from "../chunk-JZTHGAPA.js";
32
+ } from "../chunk-DUA5O6X5.js";
28
33
  import "../chunk-SGZJ5LYH.js";
29
- import "../chunk-EYK3GSRH.js";
30
- import "../chunk-ZVSKMPBZ.js";
31
- import "../chunk-C2WCPBF7.js";
32
- import "../chunk-6J2JC2RT.js";
34
+ import "../chunk-YNCGXHM4.js";
35
+ import "../chunk-DLEKCAQL.js";
36
+ import "../chunk-MYHG7PX2.js";
37
+ import "../chunk-XEGVVU5H.js";
33
38
  import {
34
39
  DAEMON_LEASE_RENEW_INTERVAL_MS,
35
40
  acquireDaemonLease,
@@ -46,46 +51,47 @@ import {
46
51
  requestDaemonHandoff,
47
52
  stopDaemonRunning,
48
53
  writeDaemonNeedsLogin
49
- } from "../chunk-WE2J62NC.js";
50
- import "../chunk-3EVPNIBE.js";
51
- import "../chunk-OKXS7WDZ.js";
52
- import "../chunk-MPWXGONV.js";
53
- import "../chunk-SAXBC4AZ.js";
54
- import "../chunk-OLQRRFBX.js";
54
+ } from "../chunk-EIGJYCOE.js";
55
+ import "../chunk-S2UNQQQS.js";
56
+ import "../chunk-HOEB6AKG.js";
57
+ import "../chunk-URNXU3FO.js";
58
+ import "../chunk-UMMCHS6P.js";
59
+ import "../chunk-72WOCX22.js";
55
60
  import {
56
61
  spawnClaude
57
62
  } from "../chunk-XHKBHWLX.js";
58
- import "../chunk-EPCXUP3P.js";
63
+ import "../chunk-6ICPEJY5.js";
64
+ import "../chunk-VFFHQC7W.js";
59
65
  import {
60
66
  writeHuman
61
67
  } from "../chunk-QCGNGEGE.js";
62
68
  import {
63
69
  exitOnHelpFlag
64
- } from "../chunk-HZVVNGEW.js";
70
+ } from "../chunk-CB23AO4D.js";
65
71
  import "../chunk-GMXKITVA.js";
66
72
  import {
67
73
  readControlMode
68
- } from "../chunk-P7WQEVWA.js";
74
+ } from "../chunk-TJMAXQ5Q.js";
69
75
  import {
70
76
  getMachineId
71
- } from "../chunk-LXQ5FBBD.js";
77
+ } from "../chunk-4A3UQERT.js";
72
78
  import "../chunk-7QLSKOSU.js";
73
79
  import {
74
80
  EXIT
75
81
  } from "../chunk-KZERVKTD.js";
76
- import "../chunk-DB3ONZB4.js";
82
+ import "../chunk-5Y2DY6X4.js";
77
83
  import {
78
84
  resolveBinary
79
- } from "../chunk-A2A2YTMG.js";
85
+ } from "../chunk-UPLV5AJF.js";
80
86
  import "../chunk-T7E75EKA.js";
81
87
  import {
82
88
  getApiKey,
83
89
  getBaseUrl
84
- } from "../chunk-GPEGOGRJ.js";
90
+ } from "../chunk-ON5JW2HP.js";
85
91
  import {
86
92
  NPX_LATEST_COMMAND
87
- } from "../chunk-E4FJTUH4.js";
88
- import "../chunk-NQTHFF4W.js";
93
+ } from "../chunk-35X5UDML.js";
94
+ import "../chunk-5YY3IJT4.js";
89
95
 
90
96
  // src/spawn-daemon.ts
91
97
  import { execFileSync, spawn } from "child_process";
@@ -231,6 +237,37 @@ var providerLaunchError = (requestedAgent, binaries, configuredProviders) => {
231
237
  if (binaries[agent]) return null;
232
238
  return agent === "claude" ? "Claude Code is not installed on this machine" : `${agent === "codex" ? "Codex" : "Gemini"} CLI is not installed on this machine`;
233
239
  };
240
+ var brokenCodexMessage = (binary) => `Codex at ${binary} cannot start: the program it launches is missing. Reinstall Codex on this machine, then try again.`;
241
+ var plural = (count, unit) => `${count} ${unit}${count === 1 ? "" : "s"}`;
242
+ var describeRunTime = (ms) => {
243
+ const seconds = Math.max(0, Math.floor(ms / 1e3));
244
+ if (seconds < 60) return `${seconds}s`;
245
+ const minutes = Math.floor(seconds / 60);
246
+ return minutes < 60 ? plural(minutes, "minute") : plural(Math.floor(minutes / 60), "hour");
247
+ };
248
+ var INTERRUPTED_EXIT_CODES = /* @__PURE__ */ new Set([130, 143]);
249
+ var exitedInterrupted = (code) => code !== null && INTERRUPTED_EXIT_CODES.has(code);
250
+ var describeSessionExit = (agent, exit) => {
251
+ const ranFor = describeRunTime(exit.ranForMs);
252
+ if (exit.stoppedByPushary) return `${agent} session was stopped from Pushary after ${ranFor}`;
253
+ if (exit.signal) return `${agent} session was stopped by ${exit.signal} after ${ranFor}`;
254
+ if (exitedInterrupted(exit.code)) return `${agent} session was interrupted (exit code ${exit.code}) after ${ranFor}`;
255
+ return exit.code === 0 ? `${agent} session finished after ${ranFor}` : `${agent} session exited with code ${exit.code} after ${ranFor}`;
256
+ };
257
+ var sessionExitFailed = (exit) => !exit.stoppedByPushary && exit.signal === null && exit.code !== 0 && !exitedInterrupted(exit.code);
258
+ var reportSessionExit = (child, report) => {
259
+ const launchedAt = report.now();
260
+ child.once("exit", (code, signal) => {
261
+ const exit = { code, signal, ranForMs: report.now() - launchedAt, stoppedByPushary: report.stoppedByPushary() };
262
+ const line = `spawn ${report.spawnId}: ${describeSessionExit(report.agent, exit)}`;
263
+ report.log(line);
264
+ if (sessionExitFailed(exit)) report.recordError(line);
265
+ });
266
+ };
267
+ var describeLaunchableProviders = (capabilities) => {
268
+ const providers = launchableProviders(capabilities);
269
+ return providers.length > 0 ? `the phone can start: ${providers.join(", ")}` : "the phone cannot start any agent on this machine";
270
+ };
234
271
  var resolveSpawnDirectory = (requested, options = {}) => {
235
272
  const fallbackDir = options.fallbackDir ?? process.cwd();
236
273
  const value = requested?.trim();
@@ -323,7 +360,7 @@ var runSpawnDaemon = async () => {
323
360
  const baseUrl = getBaseUrl();
324
361
  const pusharyBin = resolveBinary("pushary") ?? "pushary";
325
362
  const configuredProviders = inspectConfiguredManagedProviders();
326
- const providerCapabilities = detectProviderLiveCapabilities(configuredProviders);
363
+ let providerCapabilities = detectLaunchableProviderCapabilities(configuredProviders);
327
364
  const siblingEntry = process.argv[1] ? join(dirname(process.argv[1]), "pushary.js") : "";
328
365
  const codexBridgeEntry = process.argv[1] ? join(dirname(process.argv[1]), "pushary-codex-bridge.js") : "pushary-codex-bridge";
329
366
  const geminiBridgeEntry = process.argv[1] ? join(dirname(process.argv[1]), "pushary-gemini-bridge.js") : "pushary-gemini-bridge";
@@ -362,6 +399,7 @@ var runSpawnDaemon = async () => {
362
399
  let lastControlProbeAt = 0;
363
400
  const spawnTimestamps = [];
364
401
  const launchedProcesses = /* @__PURE__ */ new Map();
402
+ const stoppedByPushary = /* @__PURE__ */ new Set();
365
403
  const completedStops = /* @__PURE__ */ new Map();
366
404
  let timer;
367
405
  let inflight;
@@ -381,13 +419,16 @@ var runSpawnDaemon = async () => {
381
419
  if (!directory.ok) return Promise.reject(new Error(directory.message));
382
420
  const agent = normalizeLaunchAgent(req.agent);
383
421
  if (!agent) return Promise.reject(new Error(`Unsupported agent provider: ${req.agent}`));
384
- const providerBin = resolveBinary(agent);
422
+ const providerBin = resolveProviderBinary(agent);
385
423
  const unavailable = providerLaunchError(req.agent, {
386
424
  claude: agent === "claude" ? providerBin ?? null : null,
387
425
  codex: agent === "codex" ? providerBin ?? null : null,
388
426
  gemini: agent === "gemini" ? providerBin ?? null : null
389
427
  }, configuredProviders);
390
428
  if (unavailable) return Promise.reject(new Error(unavailable));
429
+ if (agent === "codex" && providerBin && codexBinaryIsBroken(providerBin)) {
430
+ return Promise.reject(new Error(brokenCodexMessage(providerBin)));
431
+ }
391
432
  spawnTimestamps.push(Date.now());
392
433
  const cwd = directory.cwd;
393
434
  const env = {
@@ -431,9 +472,20 @@ var runSpawnDaemon = async () => {
431
472
  });
432
473
  child.once("spawn", () => {
433
474
  started = true;
475
+ reportSessionExit(child, {
476
+ spawnId: req.id,
477
+ agent: plan.agent,
478
+ now: Date.now,
479
+ stoppedByPushary: () => typeof child.pid === "number" && stoppedByPushary.has(child.pid),
480
+ log,
481
+ recordError: (line) => daemonLease.recordError(line)
482
+ });
434
483
  if (typeof child.pid === "number") {
435
484
  launchedProcesses.set(child.pid, req.id);
436
- child.once("close", () => launchedProcesses.delete(child.pid));
485
+ child.once("close", () => {
486
+ launchedProcesses.delete(child.pid);
487
+ stoppedByPushary.delete(child.pid);
488
+ });
437
489
  }
438
490
  child.unref();
439
491
  log(`spawn ${req.id}: launched a phone-requested ${plan.agent} session in ${basename(cwd)} (pid ${child.pid ?? "unknown"})`);
@@ -448,7 +500,10 @@ var runSpawnDaemon = async () => {
448
500
  execFileSync("taskkill", windowsTaskkillArgs(pid), { stdio: "ignore" });
449
501
  } : process.kill.bind(process);
450
502
  const stopDeps = {
451
- kill,
503
+ kill: (pid, signal) => {
504
+ if (launchedProcesses.has(pid)) stoppedByPushary.add(pid);
505
+ kill(pid, signal);
506
+ },
452
507
  ownsProcess: (request) => {
453
508
  const launched = request.spawnId ? launchedProcesses.get(request.pid) === request.spawnId : !request.id && launchedProcesses.has(request.pid);
454
509
  return launched || ownsLiveProcess(request);
@@ -674,6 +729,13 @@ var runSpawnDaemon = async () => {
674
729
  log(`daemon could not release its local lease: ${errMsg(err)}`);
675
730
  }
676
731
  };
732
+ const refreshProviderCapabilities = () => {
733
+ const detected = detectLaunchableProviderCapabilities(configuredProviders);
734
+ const before = describeLaunchableProviders(providerCapabilities);
735
+ const after = describeLaunchableProviders(detected);
736
+ providerCapabilities = detected;
737
+ if (after !== before) log(`agents changed: ${after}`);
738
+ };
677
739
  const beat = async () => {
678
740
  if (stopped) return;
679
741
  if (!daemonLease.isOwner()) {
@@ -683,10 +745,9 @@ var runSpawnDaemon = async () => {
683
745
  const result = await sendHeartbeat(apiKey, {
684
746
  repoKey: basename(process.cwd()),
685
747
  capabilities: [
686
- ...hasSpawnProvider(providerCapabilities) ? ["spawn"] : [],
748
+ ...launchAdvertisement(providerCapabilities),
687
749
  STOP_CAPABILITY,
688
- STOP_ACK_CAPABILITY,
689
- ...providerCapabilities
750
+ STOP_ACK_CAPABILITY
690
751
  ]
691
752
  });
692
753
  if (result.kind === "ok") {
@@ -701,7 +762,10 @@ var runSpawnDaemon = async () => {
701
762
  }
702
763
  };
703
764
  void beat();
704
- heartbeat = setInterval(() => void beat(), HEARTBEAT_INTERVAL_MS);
765
+ heartbeat = setInterval(() => {
766
+ refreshProviderCapabilities();
767
+ void beat();
768
+ }, HEARTBEAT_INTERVAL_MS);
705
769
  leaseRenewal = setInterval(() => daemonLease.renew(), DAEMON_LEASE_RENEW_INTERVAL_MS);
706
770
  versionWatch = setInterval(() => {
707
771
  if (daemonLease.shouldYield()) finish();
@@ -8,40 +8,41 @@ import {
8
8
  openCodePluginDir,
9
9
  openCodePluginFile,
10
10
  removeOpenCodeMcpServer
11
- } from "../chunk-AHV4LNB5.js";
11
+ } from "../chunk-NOLPURUI.js";
12
12
  import {
13
13
  compatibleConfigFile,
14
14
  compatibleMcpFile,
15
15
  compatiblePermissionRuleFile,
16
16
  removeCompatibleHooks,
17
17
  removeCompatibleMcpServer
18
- } from "../chunk-J5TIV3J6.js";
18
+ } from "../chunk-MOTNSXC3.js";
19
19
  import {
20
20
  isClaudeMcpSnapshot,
21
21
  removeClaudeMcpServers,
22
22
  removePusharySettings,
23
23
  removePusharyToolPermissions,
24
24
  restoreClaudeMcpServer
25
- } from "../chunk-AXPCESYO.js";
25
+ } from "../chunk-644AEX4T.js";
26
26
  import {
27
27
  removeGeminiSettings
28
- } from "../chunk-3EVPNIBE.js";
29
- import "../chunk-CULUZTWQ.js";
28
+ } from "../chunk-S2UNQQQS.js";
29
+ import "../chunk-6ICPEJY5.js";
30
+ import "../chunk-F6NTWZZC.js";
30
31
  import "../chunk-N6IOSZOE.js";
31
- import "../chunk-EPCXUP3P.js";
32
- import "../chunk-NGDD6TXY.js";
33
- import "../chunk-CVQYGMSR.js";
32
+ import "../chunk-VFFHQC7W.js";
33
+ import "../chunk-MMVCI6DT.js";
34
+ import "../chunk-KB2FTO4O.js";
34
35
  import "../chunk-POFBE6ZY.js";
35
36
  import {
36
37
  exitOnHelpFlag
37
- } from "../chunk-HZVVNGEW.js";
38
- import "../chunk-M5ICYGHT.js";
39
- import "../chunk-2ABTSGFT.js";
40
- import "../chunk-2OY3ZZ5N.js";
41
- import "../chunk-LXQ5FBBD.js";
38
+ } from "../chunk-CB23AO4D.js";
39
+ import "../chunk-I4HKMUZQ.js";
40
+ import "../chunk-DVW2MYCM.js";
41
+ import "../chunk-2SLCHCVN.js";
42
+ import "../chunk-4A3UQERT.js";
42
43
  import "../chunk-7QLSKOSU.js";
43
44
  import "../chunk-KZERVKTD.js";
44
- import "../chunk-DB3ONZB4.js";
45
+ import "../chunk-5Y2DY6X4.js";
45
46
  import {
46
47
  claudeJson,
47
48
  claudeMcpReceipt,
@@ -55,14 +56,14 @@ import {
55
56
  geminiSettings,
56
57
  removeCodexHooks,
57
58
  removeCodexSettings
58
- } from "../chunk-A2A2YTMG.js";
59
+ } from "../chunk-UPLV5AJF.js";
59
60
  import "../chunk-T7E75EKA.js";
60
- import "../chunk-GPEGOGRJ.js";
61
- import "../chunk-E4FJTUH4.js";
61
+ import "../chunk-ON5JW2HP.js";
62
+ import "../chunk-35X5UDML.js";
62
63
  import {
63
64
  DISCONNECTABLE_AGENTS,
64
65
  hookCompatibleProfileBySource
65
- } from "../chunk-NQTHFF4W.js";
66
+ } from "../chunk-5YY3IJT4.js";
66
67
 
67
68
  // bin/pushary-disconnect.ts
68
69
  import { readdirSync, readFileSync, rmSync, writeFileSync } from "fs";
@@ -9,11 +9,11 @@ import {
9
9
  import {
10
10
  assessCodexHookTrust,
11
11
  readCodexTrustForPusharyHooks
12
- } from "../chunk-RHR6NARM.js";
12
+ } from "../chunk-W2LJ4O3A.js";
13
13
  import {
14
14
  readMachineReadiness,
15
15
  readManagedControlEvidence
16
- } from "../chunk-DE4Y6TCC.js";
16
+ } from "../chunk-I3XLHSOC.js";
17
17
  import {
18
18
  FX_PROFILE_REFUSALS,
19
19
  FX_PUSHARY_TOOLS_RULE,
@@ -33,27 +33,29 @@ import {
33
33
  retryAgentCommand,
34
34
  shortenHome,
35
35
  vscodeSettingsTargets
36
- } from "../chunk-MDEPU45E.js";
37
- import "../chunk-SLFABHW3.js";
36
+ } from "../chunk-LK2S5XIV.js";
37
+ import "../chunk-T55H6YEP.js";
38
38
  import {
39
39
  OPENCODE_PLUGIN_PLACEHOLDER,
40
40
  openCodePluginDir,
41
41
  openCodePluginFile,
42
42
  openCodeWired
43
- } from "../chunk-AHV4LNB5.js";
43
+ } from "../chunk-NOLPURUI.js";
44
44
  import {
45
45
  compatibleConfigFile,
46
46
  compatibleInstructionsFile,
47
47
  compatibleMcpFile,
48
48
  hasCompatibleHooks,
49
49
  missingCompatibleHookEvents
50
- } from "../chunk-J5TIV3J6.js";
51
- import "../chunk-AXPCESYO.js";
50
+ } from "../chunk-MOTNSXC3.js";
51
+ import "../chunk-644AEX4T.js";
52
52
  import {
53
53
  detectProviderLiveCapabilities,
54
+ expectedLaunchCapabilities,
54
55
  hasSpawnProvider,
55
56
  resolveControlPolicy
56
- } from "../chunk-HQ6G3B5R.js";
57
+ } from "../chunk-XQZEIWAV.js";
58
+ import "../chunk-RIVNNBEK.js";
57
59
  import {
58
60
  AUTO_UPDATE_DISABLE_ENV,
59
61
  autoUpdateOffReason,
@@ -61,16 +63,16 @@ import {
61
63
  describeAutoUpdateCheck,
62
64
  readAutoUpdateState,
63
65
  takeAutoUpdateAnnouncement
64
- } from "../chunk-UI36QSBI.js";
66
+ } from "../chunk-64H5IZZD.js";
65
67
  import {
66
68
  readLedgerSummary
67
- } from "../chunk-JU6W3XAU.js";
69
+ } from "../chunk-7ITOAMCD.js";
68
70
  import {
69
71
  describeBridgeResolution,
70
72
  isBridgeLocator,
71
73
  liveBridgeProbe,
72
74
  resolveBridgeStub
73
- } from "../chunk-C2WCPBF7.js";
75
+ } from "../chunk-MYHG7PX2.js";
74
76
  import {
75
77
  claudeOtherHolders,
76
78
  claudeUnprovenHolds,
@@ -87,7 +89,7 @@ import {
87
89
  geminiWired,
88
90
  holdsLong,
89
91
  pusharyHookExecutable
90
- } from "../chunk-6J2JC2RT.js";
92
+ } from "../chunk-XEGVVU5H.js";
91
93
  import {
92
94
  daemonHasRemoteProof,
93
95
  daemonServiceManagerAvailable,
@@ -96,18 +98,19 @@ import {
96
98
  readDaemonNeedsLogin,
97
99
  readDaemonStatus,
98
100
  readInstalledDaemonService
99
- } from "../chunk-WE2J62NC.js";
101
+ } from "../chunk-EIGJYCOE.js";
100
102
  import {
101
103
  GEMINI_HOOK_BINARY,
102
104
  hasGeminiHooks,
103
105
  missingGeminiHookEvents
104
- } from "../chunk-3EVPNIBE.js";
106
+ } from "../chunk-S2UNQQQS.js";
105
107
  import "../chunk-XHKBHWLX.js";
106
- import "../chunk-CULUZTWQ.js";
108
+ import "../chunk-6ICPEJY5.js";
109
+ import "../chunk-F6NTWZZC.js";
107
110
  import "../chunk-N6IOSZOE.js";
108
- import "../chunk-EPCXUP3P.js";
109
- import "../chunk-NGDD6TXY.js";
110
- import "../chunk-CVQYGMSR.js";
111
+ import "../chunk-VFFHQC7W.js";
112
+ import "../chunk-MMVCI6DT.js";
113
+ import "../chunk-KB2FTO4O.js";
111
114
  import "../chunk-POFBE6ZY.js";
112
115
  import {
113
116
  describeReach,
@@ -116,7 +119,7 @@ import {
116
119
  reachVerdict,
117
120
  roundTripEvidence,
118
121
  verifyRoundTrip
119
- } from "../chunk-M5JDZ45W.js";
122
+ } from "../chunk-INSMZNS7.js";
120
123
  import "../chunk-3EGEA4KH.js";
121
124
  import "../chunk-QCGNGEGE.js";
122
125
  import {
@@ -124,7 +127,7 @@ import {
124
127
  } from "../chunk-U4TMAANR.js";
125
128
  import {
126
129
  exitOnHelpFlag
127
- } from "../chunk-HZVVNGEW.js";
130
+ } from "../chunk-CB23AO4D.js";
128
131
  import {
129
132
  parseFlags
130
133
  } from "../chunk-GMXKITVA.js";
@@ -132,26 +135,26 @@ import {
132
135
  keyPrefix,
133
136
  readControlMode,
134
137
  readKeySource
135
- } from "../chunk-P7WQEVWA.js";
138
+ } from "../chunk-TJMAXQ5Q.js";
136
139
  import {
137
140
  callMcpTool,
138
141
  sendMcpRequest
139
- } from "../chunk-M5ICYGHT.js";
142
+ } from "../chunk-I4HKMUZQ.js";
140
143
  import {
141
144
  checkApiKey,
142
145
  describeKeyCheck
143
- } from "../chunk-2ABTSGFT.js";
144
- import "../chunk-2OY3ZZ5N.js";
146
+ } from "../chunk-DVW2MYCM.js";
147
+ import "../chunk-2SLCHCVN.js";
145
148
  import {
146
149
  getMachineId
147
- } from "../chunk-LXQ5FBBD.js";
150
+ } from "../chunk-4A3UQERT.js";
148
151
  import {
149
152
  UsageError
150
153
  } from "../chunk-7QLSKOSU.js";
151
154
  import {
152
155
  EXIT
153
156
  } from "../chunk-KZERVKTD.js";
154
- import "../chunk-DB3ONZB4.js";
157
+ import "../chunk-5Y2DY6X4.js";
155
158
  import {
156
159
  CODEX_HOOK_EVENTS,
157
160
  autoUpdateState,
@@ -181,14 +184,14 @@ import {
181
184
  readGlobalCliInstall,
182
185
  resolvePathBinary,
183
186
  vscodePluginDir
184
- } from "../chunk-A2A2YTMG.js";
187
+ } from "../chunk-UPLV5AJF.js";
185
188
  import "../chunk-T7E75EKA.js";
186
189
  import {
187
190
  getBaseUrl
188
- } from "../chunk-GPEGOGRJ.js";
191
+ } from "../chunk-ON5JW2HP.js";
189
192
  import {
190
193
  NPX_LATEST_COMMAND
191
- } from "../chunk-E4FJTUH4.js";
194
+ } from "../chunk-35X5UDML.js";
192
195
  import {
193
196
  AGENTS,
194
197
  CURSOR_GATE_EVENTS,
@@ -203,7 +206,7 @@ import {
203
206
  hookCompatibleProfile,
204
207
  isHookActivationReport,
205
208
  isNewerVersion
206
- } from "../chunk-NQTHFF4W.js";
209
+ } from "../chunk-5YY3IJT4.js";
207
210
 
208
211
  // bin/pushary-doctor.ts
209
212
  import { existsSync, readFileSync, writeFileSync } from "fs";
@@ -392,7 +395,7 @@ function inertRegistrations(configs, resolves) {
392
395
  return findings;
393
396
  }
394
397
  var describeInertRegistration = ({ named }) => `hooks here are registered for "${named}", which this CLI has no profile for, so every one of them stands aside`;
395
- var inertRegistrationRemedy = () => "Upgrade with npx @pushary/agent-hooks@latest upgrade, or re-run setup to rewrite them for an agent this version knows";
398
+ var inertRegistrationRemedy = () => `Upgrade with ${NPX_LATEST_COMMAND} upgrade, or re-run setup to rewrite them for an agent this version knows`;
396
399
 
397
400
  // src/hooks-spec.ts
398
401
  var CURSOR_GATE_SCRIPT = "pushary-gate.mjs";
@@ -710,10 +713,10 @@ var main = async () => {
710
713
  const configured = JSON.stringify(hooks?.[event] ?? []);
711
714
  const present = configured.includes(needle) || configured.includes(HOOK_LOCATOR_BINARY);
712
715
  if (!present) claudeHooksMissing += 1;
713
- check(present, `Claude Code: ${label}`, present ? void 0 : "missing \u2014 run npx @pushary/agent-hooks@latest upgrade");
716
+ check(present, `Claude Code: ${label}`, present ? void 0 : `missing: run ${NPX_LATEST_COMMAND} upgrade`);
714
717
  }
715
718
  for (const event of claudeUnprovenHolds(settings)) {
716
- console.log(` ${warn} Claude Code: ${event} hook carries no current hold budget ${dim("(an auto-mode block only notifies; run npx @pushary/agent-hooks@latest upgrade)")}`);
719
+ console.log(` ${warn} Claude Code: ${event} hook carries no current hold budget ${dim(`(an auto-mode block only notifies; run ${NPX_LATEST_COMMAND} upgrade)`)}`);
717
720
  }
718
721
  const preHookCommand = extractAgentHookCommand(hooks?.PreToolUse, "pushary-hook");
719
722
  if (preHookCommand) {
@@ -830,7 +833,7 @@ var main = async () => {
830
833
  }
831
834
  }
832
835
  for (const event of codexUnprovenHolds(codexHooksConfig)) {
833
- console.log(` ${warn} Codex: ${event} hook carries no current hold budget ${dim("(an auto-reviewer denial is not asked about; run npx @pushary/agent-hooks@latest upgrade)")}`);
836
+ console.log(` ${warn} Codex: ${event} hook carries no current hold budget ${dim(`(an auto-reviewer denial is not asked about; run ${NPX_LATEST_COMMAND} upgrade)`)}`);
834
837
  }
835
838
  } else {
836
839
  check(!!codexNotifyPath, "Codex: notify handler configured (deprecated)", codexNotifyPath ? "upgrade Codex and re-run setup for native hooks" : "missing, re-run setup");
@@ -982,7 +985,7 @@ var main = async () => {
982
985
  }
983
986
  let serverProof = null;
984
987
  if (controlPolicy === "enabled" && apiKey && daemon.machineId) {
985
- serverProof = await readMachineReadiness(apiKey, ["spawn", ...controlCapabilities], {
988
+ serverProof = await readMachineReadiness(apiKey, expectedLaunchCapabilities(configuredManagedProviders), {
986
989
  machineId: daemon.machineId
987
990
  });
988
991
  if (serverProof.kind === "unsupported") {
@@ -1169,7 +1172,7 @@ var main = async () => {
1169
1172
  check(
1170
1173
  agentsChecked.length > 0,
1171
1174
  "Wired to at least one agent",
1172
- agentsChecked.length > 0 ? agentsChecked.join(", ") : "Pushary is installed but configured for no agent \u2014 run npx @pushary/agent-hooks@latest setup"
1175
+ agentsChecked.length > 0 ? agentsChecked.join(", ") : `Pushary is installed but configured for no agent. Run ${NPX_LATEST_COMMAND} setup`
1173
1176
  );
1174
1177
  if (claudeInPlay) {
1175
1178
  check(existsSync(SKILL_PATH), "Skill installed", existsSync(SKILL_PATH) ? SKILL_PATH : "not found");
@@ -1237,7 +1240,7 @@ var main = async () => {
1237
1240
  check(false, "MCP handshake", "skipped");
1238
1241
  const keylessSummary = readLedgerSummary(7);
1239
1242
  if (keylessSummary.count > 0) {
1240
- check(false, "Keyless approval moments (7d)", `${keylessSummary.count} counted locally \u2014 npx @pushary/agent-hooks@latest stats`);
1243
+ check(false, "Keyless approval moments (7d)", `${keylessSummary.count} counted locally. See them with ${NPX_LATEST_COMMAND} stats`);
1241
1244
  }
1242
1245
  } else {
1243
1246
  let sessionId = "";
@@ -1380,7 +1383,7 @@ var main = async () => {
1380
1383
  console.log(` ${fail} ${f.label}${f.detail ? ` \u2014 ${f.detail}` : ""}`);
1381
1384
  }
1382
1385
  console.log();
1383
- console.log(` ${dim("Run")} ${cyan("npx @pushary/agent-hooks@latest clean")} ${dim("then")} ${cyan("setup")} ${dim("to fix.")}`);
1386
+ console.log(` ${dim("Run")} ${cyan(`${NPX_LATEST_COMMAND} clean`)} ${dim("then")} ${cyan("setup")} ${dim("to fix.")}`);
1384
1387
  console.log(` ${dim("Still failing after that? Send this report to")} ${cyan(SUPPORT_EMAIL)} ${dim("or ask on")} ${cyan(SUPPORT_DISCORD)}`);
1385
1388
  }
1386
1389
  console.log();
@@ -1,52 +1,53 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readHookInput
4
- } from "../chunk-KGDWDSNL.js";
4
+ } from "../chunk-EESPY5DG.js";
5
5
  import {
6
6
  announceSubscriptionRequired,
7
7
  isDeferAnswer
8
8
  } from "../chunk-5OP5MQI7.js";
9
- import "../chunk-JZTHGAPA.js";
9
+ import "../chunk-DUA5O6X5.js";
10
10
  import "../chunk-SGZJ5LYH.js";
11
- import "../chunk-EYK3GSRH.js";
12
- import "../chunk-ZVSKMPBZ.js";
13
- import "../chunk-C2WCPBF7.js";
14
- import "../chunk-6J2JC2RT.js";
15
- import "../chunk-WE2J62NC.js";
16
- import "../chunk-3EVPNIBE.js";
17
- import "../chunk-OKXS7WDZ.js";
18
- import "../chunk-MPWXGONV.js";
19
- import "../chunk-SAXBC4AZ.js";
20
- import "../chunk-OLQRRFBX.js";
11
+ import "../chunk-YNCGXHM4.js";
12
+ import "../chunk-DLEKCAQL.js";
13
+ import "../chunk-MYHG7PX2.js";
14
+ import "../chunk-XEGVVU5H.js";
15
+ import "../chunk-EIGJYCOE.js";
16
+ import "../chunk-S2UNQQQS.js";
17
+ import "../chunk-HOEB6AKG.js";
18
+ import "../chunk-URNXU3FO.js";
19
+ import "../chunk-UMMCHS6P.js";
20
+ import "../chunk-72WOCX22.js";
21
21
  import "../chunk-XHKBHWLX.js";
22
+ import "../chunk-6ICPEJY5.js";
22
23
  import "../chunk-N6IOSZOE.js";
23
- import "../chunk-EPCXUP3P.js";
24
+ import "../chunk-VFFHQC7W.js";
24
25
  import {
25
26
  askUser,
26
27
  isDecisionStopped,
27
28
  waitForQuestion
28
- } from "../chunk-NGDD6TXY.js";
29
- import "../chunk-CVQYGMSR.js";
29
+ } from "../chunk-MMVCI6DT.js";
30
+ import "../chunk-KB2FTO4O.js";
30
31
  import "../chunk-POFBE6ZY.js";
31
32
  import "../chunk-GMXKITVA.js";
32
- import "../chunk-P7WQEVWA.js";
33
+ import "../chunk-TJMAXQ5Q.js";
33
34
  import {
34
35
  SubscriptionRequiredError
35
- } from "../chunk-M5ICYGHT.js";
36
- import "../chunk-2ABTSGFT.js";
37
- import "../chunk-2OY3ZZ5N.js";
36
+ } from "../chunk-I4HKMUZQ.js";
37
+ import "../chunk-DVW2MYCM.js";
38
+ import "../chunk-2SLCHCVN.js";
38
39
  import {
39
40
  getMachineId
40
- } from "../chunk-LXQ5FBBD.js";
41
+ } from "../chunk-4A3UQERT.js";
41
42
  import "../chunk-7QLSKOSU.js";
42
43
  import "../chunk-KZERVKTD.js";
43
- import "../chunk-DB3ONZB4.js";
44
- import "../chunk-A2A2YTMG.js";
44
+ import "../chunk-5Y2DY6X4.js";
45
+ import "../chunk-UPLV5AJF.js";
45
46
  import "../chunk-T7E75EKA.js";
46
47
  import {
47
48
  getApiKey
48
- } from "../chunk-GPEGOGRJ.js";
49
- import "../chunk-E4FJTUH4.js";
49
+ } from "../chunk-ON5JW2HP.js";
50
+ import "../chunk-35X5UDML.js";
50
51
  import {
51
52
  ELICITATION_ANSWERABLE_MODE,
52
53
  effectiveWaitSeconds,
@@ -57,7 +58,7 @@ import {
57
58
  planElicitationAsk,
58
59
  readElicitationFields,
59
60
  renderElicitationOutput
60
- } from "../chunk-NQTHFF4W.js";
61
+ } from "../chunk-5YY3IJT4.js";
61
62
 
62
63
  // bin/pushary-elicitation-hook.ts
63
64
  import { basename } from "path";