@pushary/agent-hooks 0.95.4 → 0.95.6

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 +14 -0
  2. package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
  3. package/data/cursor-plugin/CHANGELOG.md +5 -0
  4. package/data/cursor-plugin/README.md +1 -1
  5. package/data/cursor-plugin/scripts/pushary-gate.mjs +5 -2
  6. package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
  7. package/data/vscode-plugin/CHANGELOG.md +5 -0
  8. package/data/vscode-plugin/README.md +1 -1
  9. package/data/vscode-plugin/scripts/pushary-gate.mjs +14 -3
  10. package/dist/bin/pushary-bell-hook.js +20 -20
  11. package/dist/bin/pushary-bell.js +9 -9
  12. package/dist/bin/pushary-claude.js +29 -24
  13. package/dist/bin/pushary-clean.js +20 -20
  14. package/dist/bin/pushary-codex-bridge.js +10 -10
  15. package/dist/bin/pushary-codex-hook.js +24 -24
  16. package/dist/bin/pushary-codex.js +8 -8
  17. package/dist/bin/pushary-connect.js +8 -8
  18. package/dist/bin/pushary-cowork.js +5 -5
  19. package/dist/bin/pushary-daemon.js +26 -26
  20. package/dist/bin/pushary-disconnect.js +11 -10
  21. package/dist/bin/pushary-doctor.js +89 -35
  22. package/dist/bin/pushary-elicitation-hook.js +20 -20
  23. package/dist/bin/pushary-gemini-bridge.js +9 -9
  24. package/dist/bin/pushary-gemini-hook.js +23 -23
  25. package/dist/bin/pushary-hook.js +27 -27
  26. package/dist/bin/pushary-login.js +9 -9
  27. package/dist/bin/pushary-logout.js +6 -6
  28. package/dist/bin/pushary-mode.js +5 -5
  29. package/dist/bin/pushary-notification-hook.js +22 -22
  30. package/dist/bin/pushary-opencode-hook.js +23 -23
  31. package/dist/bin/pushary-permission-denied-hook.js +25 -25
  32. package/dist/bin/pushary-permission-hook.js +25 -25
  33. package/dist/bin/pushary-post-hook.js +22 -22
  34. package/dist/bin/pushary-prompt-hook.js +22 -22
  35. package/dist/bin/pushary-session-end-hook.js +22 -22
  36. package/dist/bin/pushary-session-start-hook.js +25 -25
  37. package/dist/bin/pushary-setup.js +62 -42
  38. package/dist/bin/pushary-stats.js +4 -4
  39. package/dist/bin/pushary-status.js +14 -10
  40. package/dist/bin/pushary-stop-hook.js +22 -22
  41. package/dist/bin/pushary-stopfailure-hook.js +22 -22
  42. package/dist/bin/pushary-suggestions.js +2 -2
  43. package/dist/bin/pushary-transcript-register.js +18 -18
  44. package/dist/bin/pushary-transcripts.js +7 -7
  45. package/dist/bin/pushary-upgrade.js +17 -17
  46. package/dist/bin/pushary-wait.js +5 -5
  47. package/dist/bin/pushary.js +1 -1
  48. package/dist/{chunk-EEJ6EQMI.js → chunk-32WFHA77.js} +1 -1
  49. package/dist/{chunk-YE37HYN3.js → chunk-32WWVRXN.js} +3 -14
  50. package/dist/{chunk-GGX5QTBG.js → chunk-3AJIK5AO.js} +4 -1
  51. package/dist/{chunk-PFRLYYF6.js → chunk-43TFQOAT.js} +1 -1
  52. package/dist/{chunk-MDDKA4QM.js → chunk-4XFBO3GW.js} +1 -1
  53. package/dist/{chunk-KT2CGUOE.js → chunk-6II5RBAS.js} +1 -1
  54. package/dist/{chunk-3N4FT4WQ.js → chunk-6MRPTYYH.js} +1 -1
  55. package/dist/{chunk-ND52YE7L.js → chunk-7N3D4GN7.js} +4 -4
  56. package/dist/{chunk-TMOCSYJK.js → chunk-A2M6FGUF.js} +3 -3
  57. package/dist/{chunk-HPM47TEO.js → chunk-AXECWTTZ.js} +2 -2
  58. package/dist/{chunk-MZOTKCNZ.js → chunk-BS5XR4J7.js} +4 -4
  59. package/dist/{chunk-O7ODXFII.js → chunk-C7BFOC35.js} +2 -2
  60. package/dist/{chunk-TKA2L2BU.js → chunk-CDBTCEKE.js} +5 -5
  61. package/dist/{chunk-JDNW6FTV.js → chunk-DH4INZW3.js} +1 -1
  62. package/dist/{chunk-6BNBW3M2.js → chunk-DSCGKZO5.js} +2 -2
  63. package/dist/{chunk-W5GH5GTX.js → chunk-FBO5WS3D.js} +1 -1
  64. package/dist/{chunk-U24ERDPE.js → chunk-FHIVWF4B.js} +13 -15
  65. package/dist/{chunk-HTWQH3VI.js → chunk-FVTFSYKB.js} +1 -1
  66. package/dist/{chunk-HJYGC7IR.js → chunk-GOPIMNVC.js} +1 -1
  67. package/dist/{chunk-DLLAWCQB.js → chunk-GOQHN2UH.js} +1 -1
  68. package/dist/{chunk-LVU3Q43J.js → chunk-HBBQO77U.js} +1 -1
  69. package/dist/{chunk-CVZP67ST.js → chunk-HHODMHTH.js} +4 -4
  70. package/dist/{chunk-3OXHYPZG.js → chunk-HKQ6CD32.js} +4 -1
  71. package/dist/{chunk-TGORRMOU.js → chunk-JZSWA3VT.js} +1 -1
  72. package/dist/{chunk-MNWDOXX6.js → chunk-KAWLZTRJ.js} +1 -1
  73. package/dist/{chunk-7W6E3C3I.js → chunk-KNIVXEW4.js} +1 -1
  74. package/dist/{chunk-D6PRC3YQ.js → chunk-LZQVAEWP.js} +2 -1
  75. package/dist/{chunk-JAKWHALW.js → chunk-O5RQ7RYJ.js} +90 -18
  76. package/dist/{chunk-TR6DBXO3.js → chunk-OIZVYUED.js} +1 -1
  77. package/dist/{chunk-V4G7BQZ6.js → chunk-R4MBUCPQ.js} +1 -1
  78. package/dist/{chunk-XDHJ4KZJ.js → chunk-RPHXG4HI.js} +2 -2
  79. package/dist/{chunk-J5KTLGO5.js → chunk-SLVXQOYU.js} +1 -1
  80. package/dist/{chunk-AGQA72IH.js → chunk-SRFA5BOO.js} +1 -1
  81. package/dist/{chunk-7VVX6HQG.js → chunk-VZADMT7R.js} +219 -17
  82. package/dist/{chunk-J6NAWJTQ.js → chunk-WRK6RAA5.js} +47 -4
  83. package/dist/{chunk-ZKDQ3QRP.js → chunk-WZ63WTAZ.js} +1 -1
  84. package/dist/{chunk-57NOPUBK.js → chunk-XJ6CXTSB.js} +8 -8
  85. package/dist/{chunk-4NJURLRP.js → chunk-XKIB2FQY.js} +8 -8
  86. package/dist/{chunk-2BE7ZVWP.js → chunk-XS33QBJA.js} +15 -3
  87. package/dist/{chunk-MQO7J2OJ.js → chunk-ZJ6QXXBC.js} +10 -7
  88. package/dist/{chunk-XIVPHGV4.js → chunk-ZQREURP6.js} +1 -1
  89. package/dist/src/index.d.ts +3 -0
  90. package/dist/src/index.js +11 -11
  91. package/package.json +1 -1
@@ -1,27 +1,27 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  reportEvent
4
- } from "../chunk-MQO7J2OJ.js";
4
+ } from "../chunk-ZJ6QXXBC.js";
5
5
  import {
6
6
  askUser,
7
7
  isDecisionStopped,
8
8
  waitForAnswer
9
- } from "../chunk-2BE7ZVWP.js";
10
- import "../chunk-LVU3Q43J.js";
11
- import "../chunk-YE37HYN3.js";
9
+ } from "../chunk-XS33QBJA.js";
10
+ import "../chunk-HBBQO77U.js";
11
+ import "../chunk-32WWVRXN.js";
12
12
  import {
13
13
  getMachineId
14
- } from "../chunk-O7ODXFII.js";
15
- import "../chunk-W5GH5GTX.js";
14
+ } from "../chunk-C7BFOC35.js";
15
+ import "../chunk-FBO5WS3D.js";
16
16
  import "../chunk-EYRGBYZG.js";
17
17
  import "../chunk-SAF6HGAA.js";
18
18
  import "../chunk-7QLSKOSU.js";
19
19
  import "../chunk-KZERVKTD.js";
20
- import "../chunk-MNWDOXX6.js";
20
+ import "../chunk-KAWLZTRJ.js";
21
21
  import {
22
22
  getApiKey
23
23
  } from "../chunk-2UMNXADU.js";
24
- import "../chunk-7VVX6HQG.js";
24
+ import "../chunk-VZADMT7R.js";
25
25
 
26
26
  // bin/pushary-codex.ts
27
27
  import { basename } from "path";
@@ -1,31 +1,31 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  printKeyCheck
4
- } from "../chunk-XIVPHGV4.js";
4
+ } from "../chunk-ZQREURP6.js";
5
5
  import {
6
6
  connectDevice,
7
7
  connectExistingApp,
8
8
  printConnectInstructions
9
- } from "../chunk-JAKWHALW.js";
9
+ } from "../chunk-O5RQ7RYJ.js";
10
10
  import "../chunk-3EGEA4KH.js";
11
11
  import {
12
12
  checkApiKey
13
- } from "../chunk-KT2CGUOE.js";
13
+ } from "../chunk-6II5RBAS.js";
14
14
  import "../chunk-QCGNGEGE.js";
15
15
  import {
16
16
  createIo
17
17
  } from "../chunk-5RUIFDTP.js";
18
18
  import {
19
19
  exitOnHelpFlag
20
- } from "../chunk-DLLAWCQB.js";
21
- import "../chunk-D6PRC3YQ.js";
20
+ } from "../chunk-GOQHN2UH.js";
21
+ import "../chunk-LZQVAEWP.js";
22
22
  import {
23
23
  parseFlags
24
24
  } from "../chunk-GMXKITVA.js";
25
25
  import "../chunk-DINDL2CF.js";
26
26
  import {
27
27
  readKeySource
28
- } from "../chunk-3N4FT4WQ.js";
28
+ } from "../chunk-6MRPTYYH.js";
29
29
  import "../chunk-EYRGBYZG.js";
30
30
  import "../chunk-SAF6HGAA.js";
31
31
  import {
@@ -34,9 +34,9 @@ import {
34
34
  import {
35
35
  EXIT
36
36
  } from "../chunk-KZERVKTD.js";
37
- import "../chunk-MNWDOXX6.js";
37
+ import "../chunk-KAWLZTRJ.js";
38
38
  import "../chunk-2UMNXADU.js";
39
- import "../chunk-7VVX6HQG.js";
39
+ import "../chunk-VZADMT7R.js";
40
40
 
41
41
  // bin/pushary-connect.ts
42
42
  exitOnHelpFlag("connect");
@@ -2,16 +2,16 @@
2
2
  import {
3
3
  coworkOutput,
4
4
  parseCoworkOptions
5
- } from "../chunk-HPM47TEO.js";
5
+ } from "../chunk-AXECWTTZ.js";
6
6
  import {
7
7
  canOpenBrowser,
8
8
  openInBrowser
9
9
  } from "../chunk-PUZZELE6.js";
10
- import "../chunk-MDDKA4QM.js";
10
+ import "../chunk-4XFBO3GW.js";
11
11
  import {
12
12
  exitOnHelpFlag
13
- } from "../chunk-DLLAWCQB.js";
14
- import "../chunk-D6PRC3YQ.js";
13
+ } from "../chunk-GOQHN2UH.js";
14
+ import "../chunk-LZQVAEWP.js";
15
15
  import "../chunk-GMXKITVA.js";
16
16
  import "../chunk-DINDL2CF.js";
17
17
  import {
@@ -22,7 +22,7 @@ import {
22
22
  } from "../chunk-KZERVKTD.js";
23
23
  import {
24
24
  CLAUDE_CONNECTOR_GUIDE
25
- } from "../chunk-7VVX6HQG.js";
25
+ } from "../chunk-VZADMT7R.js";
26
26
 
27
27
  // bin/pushary-cowork.ts
28
28
  exitOnHelpFlag("cowork");
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  inspectConfiguredManagedProviders
4
- } from "../chunk-57NOPUBK.js";
5
- import "../chunk-TR6DBXO3.js";
4
+ } from "../chunk-XJ6CXTSB.js";
5
+ import "../chunk-OIZVYUED.js";
6
6
  import {
7
7
  HEARTBEAT_INTERVAL_MS,
8
8
  sendHeartbeat
9
- } from "../chunk-J6NAWJTQ.js";
10
- import "../chunk-CVZP67ST.js";
9
+ } from "../chunk-WRK6RAA5.js";
10
+ import "../chunk-HHODMHTH.js";
11
11
  import {
12
12
  detectProviderLiveCapabilities,
13
13
  hasSpawnProvider,
14
14
  resolveControlPolicy
15
- } from "../chunk-3OXHYPZG.js";
15
+ } from "../chunk-HKQ6CD32.js";
16
16
  import {
17
17
  SESSION_REAP_SILENCE_MS,
18
18
  describeIdleWindow,
@@ -20,15 +20,15 @@ import {
20
20
  listProcessProofs,
21
21
  ownsLiveProcess,
22
22
  silentSpawnedProofs
23
- } from "../chunk-6BNBW3M2.js";
23
+ } from "../chunk-DSCGKZO5.js";
24
24
  import {
25
25
  startRegisteredTranscripts
26
- } from "../chunk-4NJURLRP.js";
27
- import "../chunk-ZKDQ3QRP.js";
28
- import "../chunk-MZOTKCNZ.js";
29
- import "../chunk-MDDKA4QM.js";
30
- import "../chunk-HTWQH3VI.js";
31
- import "../chunk-TMOCSYJK.js";
26
+ } from "../chunk-XKIB2FQY.js";
27
+ import "../chunk-WZ63WTAZ.js";
28
+ import "../chunk-BS5XR4J7.js";
29
+ import "../chunk-4XFBO3GW.js";
30
+ import "../chunk-FVTFSYKB.js";
31
+ import "../chunk-A2M6FGUF.js";
32
32
  import {
33
33
  DAEMON_LEASE_RENEW_INTERVAL_MS,
34
34
  acquireDaemonLease,
@@ -45,46 +45,46 @@ import {
45
45
  requestDaemonHandoff,
46
46
  stopDaemonRunning,
47
47
  writeDaemonNeedsLogin
48
- } from "../chunk-ND52YE7L.js";
49
- import "../chunk-TKA2L2BU.js";
50
- import "../chunk-HJYGC7IR.js";
51
- import "../chunk-GGX5QTBG.js";
52
- import "../chunk-JDNW6FTV.js";
48
+ } from "../chunk-7N3D4GN7.js";
49
+ import "../chunk-CDBTCEKE.js";
50
+ import "../chunk-GOPIMNVC.js";
51
+ import "../chunk-3AJIK5AO.js";
52
+ import "../chunk-DH4INZW3.js";
53
53
  import "../chunk-EQRS3SGM.js";
54
- import "../chunk-TGORRMOU.js";
54
+ import "../chunk-JZSWA3VT.js";
55
55
  import {
56
56
  spawnClaude
57
57
  } from "../chunk-XHKBHWLX.js";
58
58
  import {
59
59
  resolveBinary
60
60
  } from "../chunk-L4ZCFMWW.js";
61
- import "../chunk-YE37HYN3.js";
61
+ import "../chunk-32WWVRXN.js";
62
62
  import {
63
63
  getMachineId
64
- } from "../chunk-O7ODXFII.js";
65
- import "../chunk-W5GH5GTX.js";
64
+ } from "../chunk-C7BFOC35.js";
65
+ import "../chunk-FBO5WS3D.js";
66
66
  import {
67
67
  writeHuman
68
68
  } from "../chunk-QCGNGEGE.js";
69
69
  import {
70
70
  exitOnHelpFlag
71
- } from "../chunk-DLLAWCQB.js";
72
- import "../chunk-D6PRC3YQ.js";
71
+ } from "../chunk-GOQHN2UH.js";
72
+ import "../chunk-LZQVAEWP.js";
73
73
  import "../chunk-GMXKITVA.js";
74
74
  import "../chunk-DINDL2CF.js";
75
75
  import {
76
76
  readControlMode
77
- } from "../chunk-3N4FT4WQ.js";
77
+ } from "../chunk-6MRPTYYH.js";
78
78
  import "../chunk-7QLSKOSU.js";
79
79
  import {
80
80
  EXIT
81
81
  } from "../chunk-KZERVKTD.js";
82
- import "../chunk-MNWDOXX6.js";
82
+ import "../chunk-KAWLZTRJ.js";
83
83
  import {
84
84
  getApiKey,
85
85
  getBaseUrl
86
86
  } from "../chunk-2UMNXADU.js";
87
- import "../chunk-7VVX6HQG.js";
87
+ import "../chunk-VZADMT7R.js";
88
88
 
89
89
  // src/spawn-daemon.ts
90
90
  import { execFileSync, spawn } from "child_process";
@@ -8,19 +8,19 @@ import {
8
8
  openCodePluginDir,
9
9
  openCodePluginFile,
10
10
  removeOpenCodeMcpServer
11
- } from "../chunk-PFRLYYF6.js";
11
+ } from "../chunk-43TFQOAT.js";
12
12
  import {
13
13
  isClaudeMcpSnapshot,
14
14
  removeClaudeMcpServers,
15
15
  removePusharySettings,
16
16
  restoreClaudeMcpServer
17
- } from "../chunk-CVZP67ST.js";
17
+ } from "../chunk-HHODMHTH.js";
18
18
  import {
19
19
  removeGeminiSettings
20
- } from "../chunk-TKA2L2BU.js";
21
- import "../chunk-GGX5QTBG.js";
20
+ } from "../chunk-CDBTCEKE.js";
21
+ import "../chunk-3AJIK5AO.js";
22
22
  import "../chunk-L4ZCFMWW.js";
23
- import "../chunk-YE37HYN3.js";
23
+ import "../chunk-32WWVRXN.js";
24
24
  import {
25
25
  claudeJson,
26
26
  claudeMcpReceipt,
@@ -34,14 +34,16 @@ import {
34
34
  geminiSettings,
35
35
  removeCodexHooks,
36
36
  removeCodexSettings
37
- } from "../chunk-W5GH5GTX.js";
37
+ } from "../chunk-FBO5WS3D.js";
38
38
  import {
39
39
  exitOnHelpFlag
40
- } from "../chunk-DLLAWCQB.js";
41
- import "../chunk-D6PRC3YQ.js";
40
+ } from "../chunk-GOQHN2UH.js";
41
+ import "../chunk-LZQVAEWP.js";
42
42
  import "../chunk-DINDL2CF.js";
43
43
  import "../chunk-KZERVKTD.js";
44
- import "../chunk-7VVX6HQG.js";
44
+ import {
45
+ DISCONNECTABLE_AGENTS
46
+ } from "../chunk-VZADMT7R.js";
45
47
 
46
48
  // bin/pushary-disconnect.ts
47
49
  import { readdirSync, readFileSync, rmSync, writeFileSync } from "fs";
@@ -49,7 +51,6 @@ import { parse as parseTOML, stringify as stringifyTOML } from "smol-toml";
49
51
 
50
52
  // src/disconnect.ts
51
53
  import { dirname } from "path";
52
- var DISCONNECTABLE_AGENTS = ["claude", "codex", "gemini", "cursor", "opencode"];
53
54
  var isDisconnectableAgent = (value) => DISCONNECTABLE_AGENTS.includes(value);
54
55
  var removeCursorHooks = (config) => {
55
56
  const hooks = config.hooks;
@@ -7,8 +7,9 @@ import {
7
7
  versionManagerOf
8
8
  } from "../chunk-GU3EJCVV.js";
9
9
  import {
10
- readMachineReadiness
11
- } from "../chunk-J6NAWJTQ.js";
10
+ readMachineReadiness,
11
+ readManagedControlEvidence
12
+ } from "../chunk-WRK6RAA5.js";
12
13
  import {
13
14
  CURSOR_GATE_SCRIPT
14
15
  } from "../chunk-KBITFQST.js";
@@ -20,28 +21,28 @@ import {
20
21
  isDetected,
21
22
  isPluginRegistered,
22
23
  vscodeSettingsTargets
23
- } from "../chunk-XDHJ4KZJ.js";
24
+ } from "../chunk-RPHXG4HI.js";
24
25
  import {
25
26
  OPENCODE_PLUGIN_PLACEHOLDER,
26
27
  openCodePluginDir,
27
28
  openCodePluginFile,
28
29
  openCodeWired
29
- } from "../chunk-PFRLYYF6.js";
30
- import "../chunk-CVZP67ST.js";
30
+ } from "../chunk-43TFQOAT.js";
31
+ import "../chunk-HHODMHTH.js";
31
32
  import {
32
33
  detectProviderLiveCapabilities,
33
34
  hasSpawnProvider,
34
35
  resolveControlPolicy
35
- } from "../chunk-3OXHYPZG.js";
36
+ } from "../chunk-HKQ6CD32.js";
36
37
  import {
37
38
  readLedgerSummary
38
- } from "../chunk-EEJ6EQMI.js";
39
+ } from "../chunk-32WFHA77.js";
39
40
  import {
40
41
  describeBridgeResolution,
41
42
  isBridgeLocator,
42
43
  liveBridgeProbe,
43
44
  resolveBridgeStub
44
- } from "../chunk-HTWQH3VI.js";
45
+ } from "../chunk-FVTFSYKB.js";
45
46
  import {
46
47
  claudeOtherHolders,
47
48
  claudeWired,
@@ -56,7 +57,7 @@ import {
56
57
  geminiWired,
57
58
  holdsLong,
58
59
  pusharyHookExecutable
59
- } from "../chunk-TMOCSYJK.js";
60
+ } from "../chunk-A2M6FGUF.js";
60
61
  import {
61
62
  daemonHasRemoteProof,
62
63
  daemonServiceManagerAvailable,
@@ -65,22 +66,22 @@ import {
65
66
  readDaemonNeedsLogin,
66
67
  readDaemonStatus,
67
68
  readInstalledDaemonService
68
- } from "../chunk-ND52YE7L.js";
69
+ } from "../chunk-7N3D4GN7.js";
69
70
  import {
70
71
  GEMINI_HOOK_BINARY,
71
72
  hasGeminiHooks,
72
73
  missingGeminiHookEvents
73
- } from "../chunk-TKA2L2BU.js";
74
- import "../chunk-GGX5QTBG.js";
74
+ } from "../chunk-CDBTCEKE.js";
75
+ import "../chunk-3AJIK5AO.js";
75
76
  import "../chunk-XHKBHWLX.js";
76
77
  import {
77
78
  execNpm
78
79
  } from "../chunk-L4ZCFMWW.js";
79
- import "../chunk-LVU3Q43J.js";
80
- import "../chunk-YE37HYN3.js";
80
+ import "../chunk-HBBQO77U.js";
81
+ import "../chunk-32WWVRXN.js";
81
82
  import {
82
83
  getMachineId
83
- } from "../chunk-O7ODXFII.js";
84
+ } from "../chunk-C7BFOC35.js";
84
85
  import {
85
86
  CODEX_HOOK_EVENTS,
86
87
  claudeJson,
@@ -102,27 +103,28 @@ import {
102
103
  pusharyConfigFile,
103
104
  readCodexMcpAuth,
104
105
  vscodePluginDir
105
- } from "../chunk-W5GH5GTX.js";
106
+ } from "../chunk-FBO5WS3D.js";
106
107
  import {
107
108
  describeReach,
108
109
  describeRoundTrip,
109
110
  fetchChannels,
110
111
  reachVerdict,
112
+ roundTripEvidence,
111
113
  verifyRoundTrip
112
- } from "../chunk-JAKWHALW.js";
114
+ } from "../chunk-O5RQ7RYJ.js";
113
115
  import "../chunk-3EGEA4KH.js";
114
116
  import {
115
117
  checkApiKey,
116
118
  describeKeyCheck
117
- } from "../chunk-KT2CGUOE.js";
119
+ } from "../chunk-6II5RBAS.js";
118
120
  import "../chunk-QCGNGEGE.js";
119
121
  import {
120
122
  createIo
121
123
  } from "../chunk-5RUIFDTP.js";
122
124
  import {
123
125
  exitOnHelpFlag
124
- } from "../chunk-DLLAWCQB.js";
125
- import "../chunk-D6PRC3YQ.js";
126
+ } from "../chunk-GOQHN2UH.js";
127
+ import "../chunk-LZQVAEWP.js";
126
128
  import {
127
129
  parseFlags
128
130
  } from "../chunk-GMXKITVA.js";
@@ -133,7 +135,7 @@ import {
133
135
  keyPrefix,
134
136
  readControlMode,
135
137
  readKeySource
136
- } from "../chunk-3N4FT4WQ.js";
138
+ } from "../chunk-6MRPTYYH.js";
137
139
  import {
138
140
  callMcpTool,
139
141
  sendMcpRequest
@@ -145,18 +147,21 @@ import {
145
147
  import {
146
148
  EXIT
147
149
  } from "../chunk-KZERVKTD.js";
148
- import "../chunk-MNWDOXX6.js";
150
+ import "../chunk-KAWLZTRJ.js";
149
151
  import {
150
152
  getBaseUrl
151
153
  } from "../chunk-2UMNXADU.js";
152
154
  import {
155
+ AGENTS,
153
156
  CURSOR_GATE_EVENTS,
154
- HOOK_LOCATOR_BINARY
155
- } from "../chunk-7VVX6HQG.js";
157
+ HOOK_LOCATOR_BINARY,
158
+ hookActivationResult,
159
+ isHookActivationReport
160
+ } from "../chunk-VZADMT7R.js";
156
161
 
157
162
  // bin/pushary-doctor.ts
158
163
  import { existsSync, readFileSync, writeFileSync } from "fs";
159
- import { join } from "path";
164
+ import { join, resolve } from "path";
160
165
  import { homedir as homedir2 } from "os";
161
166
  import { execFileSync } from "child_process";
162
167
  import { confirm } from "@inquirer/prompts";
@@ -215,6 +220,29 @@ var resolveDoctorExit = ({ keyExit, failures }) => {
215
220
  return EXIT.PROBLEMS_FOUND;
216
221
  };
217
222
 
223
+ // src/diagnostics/activation.ts
224
+ var readHookActivation = async (apiKey, agentType, target, deps = {}) => {
225
+ const machineId = deps.machineId ?? getMachineId();
226
+ const url = new URL("/api/agent/onboarding/activation", deps.baseUrl ?? getBaseUrl());
227
+ url.searchParams.set("machineId", machineId);
228
+ url.searchParams.set("agent", agentType);
229
+ url.searchParams.set("target", target);
230
+ try {
231
+ const response = await (deps.fetchImpl ?? fetch)(url, {
232
+ headers: { Authorization: `Bearer ${apiKey}` },
233
+ signal: AbortSignal.timeout(1e4)
234
+ });
235
+ if (!response.ok) return { kind: "unavailable", detail: response.status === 404 ? "This server does not report hook activation yet." : `Evidence request returned HTTP ${response.status}.` };
236
+ const body = await response.json();
237
+ if (!isHookActivationReport(body) || body.machineId !== machineId || body.agentType !== agentType || body.target !== target) {
238
+ return { kind: "unavailable", detail: "The server returned invalid or mismatched activation evidence." };
239
+ }
240
+ return { kind: "ok", report: body };
241
+ } catch {
242
+ return { kind: "unavailable", detail: "Activation evidence could not be read. Retry when the connection is available." };
243
+ }
244
+ };
245
+
218
246
  // src/diagnostics/roundtrip-plan.ts
219
247
  var planRoundTrip = (context) => {
220
248
  if (context.roundtrip) return { kind: "always" };
@@ -238,17 +266,25 @@ var firstToken = (command) => {
238
266
  // bin/pushary-doctor.ts
239
267
  exitOnHelpFlag("doctor");
240
268
  var parseDoctorOptions = (argv) => {
241
- const flags = parseFlags(argv, { bools: ["json", "roundtrip", "no-push", "bundle", "help", "h"], values: [] });
269
+ const flags = parseFlags(argv, { bools: ["json", "roundtrip", "no-push", "bundle", "help", "h"], values: ["activation", "activation-target"] });
242
270
  if (flags.command !== void 0 && flags.command !== "doctor") {
243
271
  throw new UsageError(`doctor takes no positional arguments (got ${flags.command})`);
244
272
  }
245
273
  const roundtrip = flags.bools.has("roundtrip");
246
- const noPush = flags.bools.has("no-push");
274
+ const activation2 = flags.values.get("activation") ?? null;
275
+ if (activation2 && (!Object.hasOwn(AGENTS, activation2) || !AGENTS[activation2].activationGuide)) throw new UsageError("This build supports --activation claude_code. Other integrations remain unverified.");
276
+ const rawTarget = flags.values.get("activation-target");
277
+ if (Boolean(activation2) !== Boolean(rawTarget)) throw new UsageError("--activation requires --activation-target with the unique scratch-file path used for this check.");
278
+ const activationTarget = rawTarget ? resolve(rawTarget) : null;
279
+ const noPush = flags.bools.has("no-push") || activation2 !== null && !roundtrip;
247
280
  if (roundtrip && noPush) {
248
281
  throw new UsageError("--roundtrip needs to send a push, so it cannot be combined with --no-push");
249
282
  }
250
- return { json: flags.bools.has("json"), roundtrip, noPush, bundle: flags.bools.has("bundle") };
283
+ return { activationTarget, activation: activation2, json: flags.bools.has("json"), roundtrip, noPush, bundle: flags.bools.has("bundle") };
251
284
  };
285
+ var activation = null;
286
+ var hookActivation = "unverified";
287
+ var roundTrip = null;
252
288
  var options;
253
289
  try {
254
290
  options = parseDoctorOptions(process.argv.slice(2));
@@ -642,8 +678,8 @@ var main = async () => {
642
678
  const controlUnsupported = controlMode === "on" && controlPolicy !== "enabled";
643
679
  const daemonOk = controlUnsupported ? false : controlPolicy === "disabled" ? daemon.kind === "absent" && !serviceDefined : controlPolicy === "enabled" ? daemonHasRemoteProof(daemon) : controlPolicy === "legacy" ? false : daemon.kind === "absent" && !serviceDefined;
644
680
  const needsLogin = loginBlock.kind === "blocked" ? `needs login: ${describeDaemonLoginBlock(loginBlock.record)}` : null;
645
- const daemonFailure = daemonOk ? null : needsLogin ?? (controlUnsupported ? "control is required but no usable provider/service-manager pair is available" : controlPolicy === "enabled" && daemon.kind === "running" ? "the daemon has not completed an authenticated heartbeat and control poll" : controlPolicy === "disabled" ? `control is disabled but ${serviceDefined ? "the service definition remains" : `local state is ${daemon.kind}`}` : controlPolicy === "legacy" ? "a legacy service exists without a usable provider/service-manager pair" : `local state is ${daemon.kind}`);
646
- const daemonDetail = daemonFailure ? needsLogin ? daemonFailure : controlUnsupported ? `${daemonFailure}; re-run setup with \`--control off\`, or restore both requirements` : controlPolicy === "disabled" ? `${daemonFailure}; re-run setup with \`--control off\`` : controlPolicy === "legacy" ? `${daemonFailure}; run setup with \`--control off\`, or restore both requirements` : `${daemonFailure}; run \`pushary daemon install\` to install or repair the background service` : controlPolicy === "disabled" ? "disabled by setup" : controlPolicy === "preserve-absent" ? "legacy absence preserved" : !controlRequired && daemon.kind === "absent" ? "managed control is unsupported on this provider or operating-system session" : null;
681
+ const daemonFailure = daemonOk ? null : needsLogin ?? (controlUnsupported ? !controlSupported ? "install and configure a supported Claude Code, Codex or Gemini provider" : "no native background-service manager is available in this OS session" : controlPolicy === "enabled" && daemon.kind === "running" ? "the daemon has not completed an authenticated heartbeat and control poll" : controlPolicy === "disabled" ? `control is disabled but ${serviceDefined ? "the service definition remains" : `local state is ${daemon.kind}`}` : controlPolicy === "legacy" ? "a legacy service exists without a usable provider/service-manager pair" : `local state is ${daemon.kind}`);
682
+ const daemonDetail = daemonFailure ? needsLogin ? daemonFailure : controlUnsupported ? `${daemonFailure}; re-run setup with \`--control off\`, or repair the missing prerequisite` : controlPolicy === "disabled" ? `${daemonFailure}; re-run setup with \`--control off\`` : controlPolicy === "legacy" ? `${daemonFailure}; run setup with \`--control off\`, or repair the missing prerequisite` : `${daemonFailure}; run \`pushary daemon install\` to install or repair the background service` : controlPolicy === "disabled" ? "disabled by setup" : controlPolicy === "preserve-absent" ? "legacy absence preserved" : !controlRequired && daemon.kind === "absent" ? "managed control is unsupported on this provider or operating-system session" : null;
647
683
  check(
648
684
  daemonOk,
649
685
  "Remote-control daemon",
@@ -672,8 +708,9 @@ var main = async () => {
672
708
  } else if (serviceFile) {
673
709
  console.log(` ${warn} Remote-control service runtime ${dim(`(could not read the node path out of ${serviceFile.path})`)}`);
674
710
  }
711
+ let serverProof = null;
675
712
  if (controlPolicy === "enabled" && apiKey && daemon.machineId) {
676
- const serverProof = await readMachineReadiness(apiKey, ["spawn", ...controlCapabilities], {
713
+ serverProof = await readMachineReadiness(apiKey, ["spawn", ...controlCapabilities], {
677
714
  machineId: daemon.machineId
678
715
  });
679
716
  if (serverProof.kind === "unsupported") {
@@ -975,7 +1012,7 @@ var main = async () => {
975
1012
  stdinIsTty: process.stdin.isTTY === true
976
1013
  });
977
1014
  const testQuestion = roundTripPlan.kind === "always" ? true : roundTripPlan.kind === "never" ? false : await confirm({
978
- message: "Test question roundtrip? (sends a push notification; the only check that proves you can answer one)",
1015
+ message: "Test a synthetic question and answer? (sends a notification; does not test agent hooks)",
979
1016
  default: roundTripPlan.defaultAnswer
980
1017
  });
981
1018
  if (testQuestion) {
@@ -983,8 +1020,9 @@ var main = async () => {
983
1020
  console.log(` ${dim("Question Roundtrip")}`);
984
1021
  console.log(` ${dim("\u2192")} Question sent, waiting for your answer...`);
985
1022
  const outcome = await verifyRoundTrip(apiKey, "Pushary Doctor");
1023
+ roundTrip = outcome;
986
1024
  const report = describeRoundTrip(outcome);
987
- check(report.ok, "Answer received", outcome.kind === "answered" ? `"${outcome.value}" (${(outcome.latencyMs / 1e3).toFixed(1)}s roundtrip)` : report.message);
1025
+ check(report.ok, "Synthetic answer test", report.message);
988
1026
  for (const line of report.next) console.log(` ${dim(line)}`);
989
1027
  }
990
1028
  }
@@ -1013,7 +1051,19 @@ var main = async () => {
1013
1051
  } catch {
1014
1052
  }
1015
1053
  }
1054
+ if (options.activation) {
1055
+ activation = apiKey ? await readHookActivation(apiKey, options.activation, options.activationTarget) : { kind: "unavailable", detail: "Sign in before reading this workspace\u2019s hook evidence." };
1056
+ const latest = activation.kind === "ok" ? activation.report.evidence[0] : void 0;
1057
+ hookActivation = hookActivationResult(activation.kind === "ok" ? activation.report : null);
1058
+ const observed = hookActivation === "approved_executed" || hookActivation === "denied_observed";
1059
+ check(observed, "Approval for the selected scratch file (last 10 minutes)", activation.kind !== "ok" ? activation.detail : activation.report.truncated ? "Too many recent decisions to establish a unique correlation. Start a quiet test session and retry." : activation.report.evidence.length > 1 ? `${hookActivation}: multiple decisions for this target. Use a new scratch file for each attempt; inspect hookActivationEvidence for all results.` : latest ? `${latest.result}; answer source: ${latest.answerSource ?? "unknown"}; decision ${latest.correlationId}; session ${latest.sessionId}; tool call ${latest.toolUseId}` : "Unverified: no recent runtime-tagged Write approval for this scratch file on this machine.");
1060
+ const guide = AGENTS[options.activation].activationGuide;
1061
+ console.log(` ${dim(`Real-agent check: https://pushary.com${guide}`)}`);
1062
+ }
1063
+ const managedControl = readManagedControlEvidence(apiKey, configuredManagedProviders, serverProof);
1064
+ console.log(` ${dim(`Phone-start and steering: ${managedControl.ready ? "local and server checks passed for this run" : "unverified; hook approvals are a separate capability"}.`)}`);
1016
1065
  console.log();
1066
+ if (!options.activation) console.log(` ${dim("Agent hook activation is unverified by these checks. Use --activation claude_code --activation-target <unique scratch file> after one real approval.")}`);
1017
1067
  const failed = results.filter((r) => !r.passed);
1018
1068
  if (failed.length === 0) {
1019
1069
  console.log(` ${green(bold("All checks passed."))}`);
@@ -1050,18 +1100,22 @@ var main = async () => {
1050
1100
  }
1051
1101
  }
1052
1102
  if (options.json) {
1053
- process.stdout.write(`${JSON.stringify({
1103
+ await new Promise((resolve2, reject) => process.stdout.write(`${JSON.stringify({
1054
1104
  ok: exitCode === EXIT.OK,
1055
1105
  exitCode,
1056
1106
  keyCheck: keyVerdict?.kind ?? null,
1107
+ roundTripEvidence: roundTripEvidence(roundTrip),
1108
+ hookActivation,
1109
+ hookActivationEvidence: activation,
1057
1110
  daemon,
1111
+ managedControl,
1058
1112
  daemonNeedsLogin: loginBlock.kind === "blocked" ? loginBlock.record : null,
1059
1113
  passed: results.filter((r) => r.passed).length,
1060
1114
  failed: failed.length,
1061
1115
  checks: results.map((r) => ({ label: r.label, passed: r.passed, detail: r.detail ?? null })),
1062
1116
  otherHolders: otherHoldersByAgent
1063
1117
  }, null, 2)}
1064
- `);
1118
+ `, (error) => error ? reject(error) : resolve2()));
1065
1119
  }
1066
1120
  process.exit(exitCode);
1067
1121
  };
@@ -1,43 +1,43 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readHookInput
4
- } from "../chunk-V4G7BQZ6.js";
4
+ } from "../chunk-R4MBUCPQ.js";
5
5
  import {
6
6
  isDeferAnswer
7
7
  } from "../chunk-YHG74UFF.js";
8
- import "../chunk-4NJURLRP.js";
9
- import "../chunk-ZKDQ3QRP.js";
10
- import "../chunk-MZOTKCNZ.js";
11
- import "../chunk-MDDKA4QM.js";
12
- import "../chunk-HTWQH3VI.js";
13
- import "../chunk-TMOCSYJK.js";
14
- import "../chunk-ND52YE7L.js";
15
- import "../chunk-TKA2L2BU.js";
16
- import "../chunk-HJYGC7IR.js";
17
- import "../chunk-GGX5QTBG.js";
18
- import "../chunk-JDNW6FTV.js";
8
+ import "../chunk-XKIB2FQY.js";
9
+ import "../chunk-WZ63WTAZ.js";
10
+ import "../chunk-BS5XR4J7.js";
11
+ import "../chunk-4XFBO3GW.js";
12
+ import "../chunk-FVTFSYKB.js";
13
+ import "../chunk-A2M6FGUF.js";
14
+ import "../chunk-7N3D4GN7.js";
15
+ import "../chunk-CDBTCEKE.js";
16
+ import "../chunk-GOPIMNVC.js";
17
+ import "../chunk-3AJIK5AO.js";
18
+ import "../chunk-DH4INZW3.js";
19
19
  import "../chunk-EQRS3SGM.js";
20
- import "../chunk-TGORRMOU.js";
20
+ import "../chunk-JZSWA3VT.js";
21
21
  import "../chunk-XHKBHWLX.js";
22
22
  import "../chunk-L4ZCFMWW.js";
23
23
  import {
24
24
  askUser,
25
25
  isDecisionStopped,
26
26
  waitForQuestion
27
- } from "../chunk-2BE7ZVWP.js";
28
- import "../chunk-YE37HYN3.js";
27
+ } from "../chunk-XS33QBJA.js";
28
+ import "../chunk-32WWVRXN.js";
29
29
  import {
30
30
  getMachineId
31
- } from "../chunk-O7ODXFII.js";
32
- import "../chunk-W5GH5GTX.js";
31
+ } from "../chunk-C7BFOC35.js";
32
+ import "../chunk-FBO5WS3D.js";
33
33
  import "../chunk-GMXKITVA.js";
34
34
  import "../chunk-DINDL2CF.js";
35
- import "../chunk-3N4FT4WQ.js";
35
+ import "../chunk-6MRPTYYH.js";
36
36
  import "../chunk-EYRGBYZG.js";
37
37
  import "../chunk-SAF6HGAA.js";
38
38
  import "../chunk-7QLSKOSU.js";
39
39
  import "../chunk-KZERVKTD.js";
40
- import "../chunk-MNWDOXX6.js";
40
+ import "../chunk-KAWLZTRJ.js";
41
41
  import {
42
42
  getApiKey
43
43
  } from "../chunk-2UMNXADU.js";
@@ -51,7 +51,7 @@ import {
51
51
  planElicitationAsk,
52
52
  readElicitationFields,
53
53
  renderElicitationOutput
54
- } from "../chunk-7VVX6HQG.js";
54
+ } from "../chunk-VZADMT7R.js";
55
55
 
56
56
  // bin/pushary-elicitation-hook.ts
57
57
  import { basename } from "path";