@pushary/agent-hooks 0.85.0 → 0.85.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 (64) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/data/cursor-plugin/CHANGELOG.md +21 -0
  3. package/data/cursor-plugin/scripts/pushary-gate.mjs +54 -222
  4. package/data/cursor-plugin/scripts/pushary-gate.test.mjs +11 -106
  5. package/data/vscode-plugin/CHANGELOG.md +26 -0
  6. package/data/vscode-plugin/scripts/pushary-gate.mjs +66 -74
  7. package/dist/bin/pushary-bell-hook.js +4 -4
  8. package/dist/bin/pushary-bell.js +6 -6
  9. package/dist/bin/pushary-claude.js +12 -11
  10. package/dist/bin/pushary-clean.js +6 -6
  11. package/dist/bin/pushary-codex-bridge.js +5 -5
  12. package/dist/bin/pushary-codex-hook.js +9 -9
  13. package/dist/bin/pushary-codex.js +3 -3
  14. package/dist/bin/pushary-connect.js +6 -6
  15. package/dist/bin/pushary-daemon.js +4 -4
  16. package/dist/bin/pushary-disconnect.js +5 -5
  17. package/dist/bin/pushary-doctor.js +11 -11
  18. package/dist/bin/pushary-gemini-bridge.js +5 -5
  19. package/dist/bin/pushary-gemini-hook.js +17 -12
  20. package/dist/bin/pushary-hook.js +8 -8
  21. package/dist/bin/pushary-login.js +4 -4
  22. package/dist/bin/pushary-logout.js +4 -4
  23. package/dist/bin/pushary-mode.js +3 -3
  24. package/dist/bin/pushary-notification-hook.js +3 -3
  25. package/dist/bin/pushary-permission-denied-hook.js +8 -8
  26. package/dist/bin/pushary-permission-hook.js +8 -8
  27. package/dist/bin/pushary-post-hook.js +3 -3
  28. package/dist/bin/pushary-prompt-hook.js +3 -3
  29. package/dist/bin/pushary-session-end-hook.js +3 -3
  30. package/dist/bin/pushary-session-start-hook.js +3 -3
  31. package/dist/bin/pushary-setup.js +14 -14
  32. package/dist/bin/pushary-stats.js +2 -2
  33. package/dist/bin/pushary-status.js +5 -5
  34. package/dist/bin/pushary-stop-hook.js +3 -3
  35. package/dist/bin/pushary-stopfailure-hook.js +3 -3
  36. package/dist/bin/pushary-upgrade.js +6 -6
  37. package/dist/bin/pushary-wait.js +3 -3
  38. package/dist/{chunk-ADISVXZL.js → chunk-4U2YRHNF.js} +1 -1
  39. package/dist/{chunk-WEAQQSHQ.js → chunk-4YMWLMAP.js} +1 -1
  40. package/dist/{chunk-437T77TY.js → chunk-CWV4CMB6.js} +1 -1
  41. package/dist/{chunk-EXMUM226.js → chunk-DPDUB4XF.js} +62 -156
  42. package/dist/{chunk-7PZPJSWI.js → chunk-GM74DUMS.js} +1 -1
  43. package/dist/{chunk-DOXSWT4Q.js → chunk-GY3I353G.js} +6 -6
  44. package/dist/chunk-HSGEEBBL.js +37 -0
  45. package/dist/{chunk-ERYKGH4J.js → chunk-JBLRZGTT.js} +1 -1
  46. package/dist/{chunk-4QPOMJUB.js → chunk-JT5NQQCE.js} +2 -2
  47. package/dist/{chunk-MQMPG5X4.js → chunk-K337LIBD.js} +260 -10
  48. package/dist/{chunk-HVZIHTOO.js → chunk-KJW6NKF7.js} +7 -7
  49. package/dist/{chunk-K7CSRGKZ.js → chunk-KZIGJLOX.js} +1 -1
  50. package/dist/{chunk-6LC4WSCL.js → chunk-LCA2EQTK.js} +1 -1
  51. package/dist/{chunk-F52SIIDG.js → chunk-LSB6PFLN.js} +1 -1
  52. package/dist/{chunk-YKW6JCWI.js → chunk-LXWISFF3.js} +1 -1
  53. package/dist/{chunk-FBGBJXVC.js → chunk-NTIUQB3E.js} +1 -1
  54. package/dist/{chunk-NJ7JT26G.js → chunk-PKUNB3SN.js} +1 -1
  55. package/dist/{chunk-AXRATIS6.js → chunk-Q4URN3E7.js} +1 -1
  56. package/dist/{chunk-GCKAWHFP.js → chunk-T54OT7IY.js} +1 -1
  57. package/dist/{chunk-64PXDATC.js → chunk-XJDL3MUE.js} +17 -17
  58. package/dist/{chunk-GFM3STWO.js → chunk-Y7E2MC3G.js} +20 -49
  59. package/dist/chunk-YHG74UFF.js +12 -0
  60. package/dist/src/index.d.ts +7 -29
  61. package/dist/src/index.js +10 -9
  62. package/package.json +4 -2
  63. package/dist/chunk-GXIFADGD.js +0 -66
  64. package/dist/chunk-PWTKKQQI.js +0 -27
@@ -40,20 +40,17 @@
40
40
  // 60s timeout fires.
41
41
 
42
42
  import { createHash } from 'node:crypto'
43
- import { homedir, hostname, tmpdir } from 'node:os'
44
- import { existsSync, readFileSync, writeFileSync } from 'node:fs'
43
+ import { homedir, hostname } from 'node:os'
44
+ import { existsSync, readFileSync } from 'node:fs'
45
45
  import { basename, dirname, join } from 'node:path'
46
46
  import { fileURLToPath } from 'node:url'
47
47
 
48
48
  const BASE_URL = process.env.PUSHARY_BASE_URL?.trim() || process.env.PUSHARY_API_URL?.trim() || 'https://pushary.com'
49
49
  const MCP_URL = `${BASE_URL}/api/mcp/mcp`
50
- const POLICY_CACHE_TTL_MS = 5 * 60 * 1000
51
50
  const MAX_BLOCK_MS = 45_000 // longest we can wait inside VS Code's hook timeout
52
51
  const WAIT_CHUNK_MS = 20_000 // per wait_for_answer long-poll
53
52
  const POLL_GAP_MS = 1_500 // pause between polls after a transient error
54
53
  const NET_TIMEOUT_MS = 27_000 // abort a single MCP request
55
- const POLICY_TIMEOUT_MS = 10_000
56
- const MODE_TIMEOUT_MS = 3_000
57
54
  const HARD_GUARD_MS = 55_000 // force a graceful "ask" before the 60s hook timeout
58
55
 
59
56
  // Which commands are worth a phone approval. This is the only place the set is
@@ -217,73 +214,63 @@ const callTool = async (apiKey, name, args) => {
217
214
  return JSON.parse(payload)
218
215
  }
219
216
 
220
- const getJson = async (path, apiKey, timeoutMs) => {
221
- const response = await fetch(`${BASE_URL}${path}`, {
222
- headers: { Authorization: `Bearer ${apiKey}` },
223
- signal: AbortSignal.timeout(timeoutMs),
224
- })
225
- if (!response.ok) throw new Error(`GET ${path} ${response.status}`)
226
- return response.json()
227
- }
228
-
229
- // ── Policy (mirrors @pushary/agent-hooks policy.ts) ───────────────────────────
230
- const isPolicyConfig = (d) =>
231
- !!d && typeof d === 'object' && Array.isArray(d.policies) && typeof d.defaultTimeoutSeconds === 'number' && typeof d.defaultTimeoutAction === 'string'
232
-
233
- const policyCacheFile = (apiKey) => join(tmpdir(), `pushary-policy-vscode-${createHash('sha256').update(apiKey).digest('hex').slice(0, 12)}.json`)
234
-
235
- const getPolicy = async (apiKey) => {
236
- const path = policyCacheFile(apiKey)
237
- let stale = null
238
- if (existsSync(path)) {
239
- try {
240
- const cached = JSON.parse(readFileSync(path, 'utf-8'))
241
- if (isPolicyConfig(cached)) {
242
- if (!cached._cachedAt || Date.now() - cached._cachedAt < POLICY_CACHE_TTL_MS) return cached
243
- stale = cached
244
- }
245
- } catch {}
246
- }
247
- try {
248
- const fresh = await withRetry(async () => {
249
- const raw = await getJson('/api/mcp/policy', apiKey, POLICY_TIMEOUT_MS)
250
- if (!isPolicyConfig(raw)) throw new Error('invalid policy')
251
- return raw
252
- }, 2)
253
- try {
254
- writeFileSync(path, JSON.stringify({ ...fresh, _cachedAt: Date.now() }), 'utf-8')
255
- } catch {}
256
- return fresh
257
- } catch (error) {
258
- if (stale) return stale
259
- throw error
260
- }
261
- }
262
-
263
- const resolvePolicy = (config, toolName, modeOverride) => {
264
- const base =
265
- config.policies.find((p) => p.tool === toolName) ??
266
- config.policies.find((p) => p.tool === '*') ??
267
- {
268
- tool: toolName,
269
- timeoutSeconds: config.defaultTimeoutSeconds,
270
- timeoutAction: config.defaultTimeoutAction,
271
- mode: config.defaultMode ?? 'push_first',
272
- pushFirstSeconds: config.defaultPushFirstSeconds ?? 20,
273
- }
274
- const effective = modeOverride ?? config.modeOverride
275
- return effective ? { ...base, mode: effective } : base
276
- }
277
-
278
- const APPROVAL_MODES = ['push_only', 'terminal_only', 'push_first', 'notify_only']
279
- const fetchModeState = async (apiKey, sessionId) => {
217
+ // ── The verdict ─────────────────────────────────────────────────────────────
218
+ // Asked for, not worked out here.
219
+ //
220
+ // The copy this replaces matched on tool NAME alone: it looked for a rule whose
221
+ // `tool` equalled "Bash", so every argument-scoped rule a user had written --
222
+ // `Bash(rm:*)`, `Bash(git push)` -- was skipped entirely and the broad rule or
223
+ // the default applied instead. A deny written to stop `rm -rf` did nothing here
224
+ // while it worked in Claude Code and Cursor, and it never gained
225
+ // `isSafeReadOnlyCommand` either, so `git status` reached the phone.
226
+ //
227
+ // Its mode fetch also read an unreachable server as `kill: false`, which is not
228
+ // "you are not halted" but "we could not ask". A remote stop nobody could fetch
229
+ // looked like a clean bill of health.
230
+ //
231
+ // The server now answers with the same `resolveGate` the CLI runs, over the same
232
+ // state, and it distinguishes state it could not establish from state that says
233
+ // no. This asks it.
234
+
235
+ const GATE_TIMEOUT_MS = 5000
236
+
237
+ /**
238
+ * The verdict for one command, or null if we could not get one.
239
+ *
240
+ * Null is not a denial and not an approval: every failure hands the call back to
241
+ * VS Code's own prompt, exactly as if this gate were not installed.
242
+ *
243
+ * Sent as `cursor`, which is the wire's identity for an editor gate: a caller
244
+ * with a hard block budget and no hook config of its own. The only consequence
245
+ * is which policy profile answers, and a site without an explicit Cursor profile
246
+ * falls back to the all-agents one, which is what this gate already received.
247
+ *
248
+ * No `repoKey` is sent, because deriving one means walking parent directories
249
+ * for a `.git` and parsing its config, and a second implementation of that rule
250
+ * is how the last drift started. Without one the server correctly declines to
251
+ * apply repo-scoped rules, since an unknown repository is not evidence of a
252
+ * match -- which is what this gate already got, by being filtered server-side.
253
+ */
254
+ const decide = async (apiKey, command, cwd, sessionId) => {
280
255
  try {
281
- const path = sessionId ? `/api/mcp/mode?session=${encodeURIComponent(sessionId)}` : '/api/mcp/mode'
282
- const data = await getJson(path, apiKey, MODE_TIMEOUT_MS)
283
- const mode = data?.override?.mode
284
- return { mode: APPROVAL_MODES.includes(mode) ? mode : null, kill: data?.kill === true }
256
+ const response = await fetch(`${BASE_URL}/api/agent/gate`, {
257
+ method: 'POST',
258
+ headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${apiKey}` },
259
+ body: JSON.stringify({
260
+ v: 1,
261
+ source: 'cursor',
262
+ toolName: 'Bash',
263
+ toolInputs: [{ command }],
264
+ cwd,
265
+ sessionId,
266
+ }),
267
+ signal: AbortSignal.timeout(GATE_TIMEOUT_MS),
268
+ })
269
+ if (!response.ok) return null
270
+ const verdict = await response.json()
271
+ return verdict && typeof verdict.kind === 'string' ? verdict : null
285
272
  } catch {
286
- return { mode: null, kill: false }
273
+ return null
287
274
  }
288
275
  }
289
276
 
@@ -523,12 +510,17 @@ const main = async () => {
523
510
  const ident = { agentName: `VS Code - ${project}`, sessionId, machineId: getMachineId() }
524
511
 
525
512
  try {
526
- const [policy, modeState] = await Promise.all([getPolicy(apiKey), fetchModeState(apiKey, sessionId)])
513
+ const verdict = await decide(apiKey, command, input.cwd, sessionId)
527
514
 
528
- if (modeState.kill) return respond(deny('Stopped by user. This agent was halted from Pushary. Do not run this command.'))
515
+ // No verdict, or one that says nothing: VS Code's own prompt decides, exactly
516
+ // as if this gate were not installed. Never a forced denial on an outage.
517
+ if (!verdict || verdict.kind === 'no_opinion') return respond(ask())
518
+ if (verdict.kind === 'kill') return respond(deny(verdict.reason))
519
+ if (verdict.kind === 'allow') return respond(ALLOW)
520
+ if (verdict.kind === 'deny') return respond(deny(verdict.reason))
521
+ if (verdict.kind !== 'ask') return respond(ask())
529
522
 
530
- const tool = resolvePolicy(policy, 'Bash', modeState.mode)
531
- if (tool.timeoutSeconds === 0 && tool.timeoutAction === 'approve') return respond(ALLOW)
523
+ const tool = verdict.policy
532
524
 
533
525
  switch (tool.mode) {
534
526
  case 'terminal_only':
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleBell
4
- } from "../chunk-7PZPJSWI.js";
4
+ } from "../chunk-GM74DUMS.js";
5
5
  import {
6
6
  readHookInput
7
7
  } from "../chunk-6CUUA7HO.js";
8
- import "../chunk-K7CSRGKZ.js";
8
+ import "../chunk-KZIGJLOX.js";
9
9
  import "../chunk-BC3VCZ3E.js";
10
10
  import "../chunk-6MTNS63X.js";
11
- import "../chunk-437T77TY.js";
11
+ import "../chunk-CWV4CMB6.js";
12
12
  import "../chunk-2UMNXADU.js";
13
- import "../chunk-MQMPG5X4.js";
13
+ import "../chunk-K337LIBD.js";
14
14
 
15
15
  // bin/pushary-bell-hook.ts
16
16
  var main = async () => {
@@ -5,18 +5,18 @@ import {
5
5
  liveAgentCount,
6
6
  ring,
7
7
  upgradeThreshold
8
- } from "../chunk-7PZPJSWI.js";
8
+ } from "../chunk-GM74DUMS.js";
9
9
  import {
10
10
  guardBinary
11
- } from "../chunk-PWTKKQQI.js";
11
+ } from "../chunk-HSGEEBBL.js";
12
12
  import "../chunk-VT4IVERX.js";
13
13
  import {
14
14
  claudeSettings
15
- } from "../chunk-HVZIHTOO.js";
15
+ } from "../chunk-KJW6NKF7.js";
16
16
  import {
17
17
  createIo
18
18
  } from "../chunk-5RUIFDTP.js";
19
- import "../chunk-K7CSRGKZ.js";
19
+ import "../chunk-KZIGJLOX.js";
20
20
  import {
21
21
  parseFlags
22
22
  } from "../chunk-GMXKITVA.js";
@@ -30,13 +30,13 @@ import {
30
30
  readJsonSafe,
31
31
  writeJsonAtomic
32
32
  } from "../chunk-6MTNS63X.js";
33
- import "../chunk-437T77TY.js";
33
+ import "../chunk-CWV4CMB6.js";
34
34
  import "../chunk-7QLSKOSU.js";
35
35
  import {
36
36
  EXIT
37
37
  } from "../chunk-KZERVKTD.js";
38
38
  import "../chunk-2UMNXADU.js";
39
- import "../chunk-MQMPG5X4.js";
39
+ import "../chunk-K337LIBD.js";
40
40
 
41
41
  // src/bell/install.ts
42
42
  import { join } from "path";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ensureDaemonRunning
4
- } from "../chunk-WEAQQSHQ.js";
4
+ } from "../chunk-4YMWLMAP.js";
5
5
  import {
6
6
  buildTranscriptRecords,
7
7
  decodePublicKey,
@@ -9,22 +9,20 @@ import {
9
9
  generateSessionKey,
10
10
  uploadTranscriptRecords,
11
11
  wrapSessionKey
12
- } from "../chunk-GCKAWHFP.js";
12
+ } from "../chunk-T54OT7IY.js";
13
13
  import {
14
14
  startProcessOwnership,
15
15
  withSpawnProcessOwnership
16
- } from "../chunk-YKW6JCWI.js";
16
+ } from "../chunk-LXWISFF3.js";
17
17
  import {
18
18
  needsShell,
19
19
  spawnClaude
20
20
  } from "../chunk-XHKBHWLX.js";
21
21
  import "../chunk-VT4IVERX.js";
22
- import "../chunk-HVZIHTOO.js";
22
+ import "../chunk-KJW6NKF7.js";
23
23
  import {
24
- KILL_REASON,
25
- isDeferAnswer,
26
- resolveGate
27
- } from "../chunk-GXIFADGD.js";
24
+ isDeferAnswer
25
+ } from "../chunk-YHG74UFF.js";
28
26
  import {
29
27
  askUser,
30
28
  cancelQuestion,
@@ -36,7 +34,7 @@ import {
36
34
  reportEvent,
37
35
  scopePathFor,
38
36
  waitForAnswer
39
- } from "../chunk-EXMUM226.js";
37
+ } from "../chunk-DPDUB4XF.js";
40
38
  import {
41
39
  getMachineId
42
40
  } from "../chunk-RN3NOEJF.js";
@@ -44,14 +42,17 @@ import "../chunk-DINDL2CF.js";
44
42
  import "../chunk-6MTNS63X.js";
45
43
  import "../chunk-BSZYIAZL.js";
46
44
  import "../chunk-SAF6HGAA.js";
47
- import "../chunk-437T77TY.js";
45
+ import "../chunk-CWV4CMB6.js";
48
46
  import "../chunk-7QLSKOSU.js";
49
47
  import "../chunk-KZERVKTD.js";
50
48
  import {
51
49
  getApiKey,
52
50
  getBaseUrl
53
51
  } from "../chunk-2UMNXADU.js";
54
- import "../chunk-MQMPG5X4.js";
52
+ import {
53
+ KILL_REASON,
54
+ resolveGate
55
+ } from "../chunk-K337LIBD.js";
55
56
 
56
57
  // src/wrapper/claudeBinary.ts
57
58
  import { statSync } from "fs";
@@ -4,15 +4,15 @@ import {
4
4
  shortenHome,
5
5
  unregisterPluginLocation,
6
6
  vscodeSettingsTargets
7
- } from "../chunk-ADISVXZL.js";
7
+ } from "../chunk-4U2YRHNF.js";
8
8
  import {
9
9
  removeGeminiSettings
10
- } from "../chunk-DOXSWT4Q.js";
10
+ } from "../chunk-GY3I353G.js";
11
11
  import {
12
12
  removeClaudeMcpServers,
13
13
  removePusharySettings
14
- } from "../chunk-64PXDATC.js";
15
- import "../chunk-PWTKKQQI.js";
14
+ } from "../chunk-XJDL3MUE.js";
15
+ import "../chunk-HSGEEBBL.js";
16
16
  import {
17
17
  execNpm
18
18
  } from "../chunk-VT4IVERX.js";
@@ -33,7 +33,7 @@ import {
33
33
  pusharyDir,
34
34
  removeCodexHooks,
35
35
  vscodePluginDir
36
- } from "../chunk-HVZIHTOO.js";
36
+ } from "../chunk-KJW6NKF7.js";
37
37
  import {
38
38
  rejectUnknownFlags
39
39
  } from "../chunk-GMXKITVA.js";
@@ -49,7 +49,7 @@ import "../chunk-7QLSKOSU.js";
49
49
  import {
50
50
  EXIT
51
51
  } from "../chunk-KZERVKTD.js";
52
- import "../chunk-MQMPG5X4.js";
52
+ import "../chunk-K337LIBD.js";
53
53
 
54
54
  // bin/pushary-clean.ts
55
55
  import { existsSync, readFileSync, copyFileSync, readdirSync } from "fs";
@@ -6,19 +6,19 @@ import {
6
6
  postLiveSession,
7
7
  postLiveSessionUntilAccepted,
8
8
  startLiveSessionHeartbeat
9
- } from "../chunk-ERYKGH4J.js";
10
- import "../chunk-GCKAWHFP.js";
9
+ } from "../chunk-JBLRZGTT.js";
10
+ import "../chunk-T54OT7IY.js";
11
11
  import {
12
12
  startProcessOwnership,
13
13
  withSpawnProcessOwnership
14
- } from "../chunk-YKW6JCWI.js";
14
+ } from "../chunk-LXWISFF3.js";
15
15
  import {
16
16
  spawnClaude
17
17
  } from "../chunk-XHKBHWLX.js";
18
18
  import {
19
19
  resolveBinary
20
20
  } from "../chunk-VT4IVERX.js";
21
- import "../chunk-HVZIHTOO.js";
21
+ import "../chunk-KJW6NKF7.js";
22
22
  import {
23
23
  getMachineId
24
24
  } from "../chunk-RN3NOEJF.js";
@@ -27,7 +27,7 @@ import {
27
27
  getApiKey,
28
28
  getBaseUrl
29
29
  } from "../chunk-2UMNXADU.js";
30
- import "../chunk-MQMPG5X4.js";
30
+ import "../chunk-K337LIBD.js";
31
31
 
32
32
  // bin/pushary-codex-bridge.ts
33
33
  import { existsSync } from "fs";
@@ -2,16 +2,14 @@
2
2
  import {
3
3
  isGatingMoment,
4
4
  recordKeylessMoment
5
- } from "../chunk-NJ7JT26G.js";
5
+ } from "../chunk-PKUNB3SN.js";
6
6
  import {
7
7
  readHookInput
8
8
  } from "../chunk-6CUUA7HO.js";
9
9
  import {
10
- KILL_REASON,
11
10
  denyReasonFrom,
12
- isDeferAnswer,
13
- resolveGate
14
- } from "../chunk-GXIFADGD.js";
11
+ isDeferAnswer
12
+ } from "../chunk-YHG74UFF.js";
15
13
  import {
16
14
  CODEX_AGENT,
17
15
  DEFAULT_SESSION,
@@ -43,13 +41,13 @@ import {
43
41
  toPolicyLookup,
44
42
  toPolicyLookups,
45
43
  waitForAnswer
46
- } from "../chunk-EXMUM226.js";
44
+ } from "../chunk-DPDUB4XF.js";
47
45
  import {
48
46
  getMachineId
49
47
  } from "../chunk-RN3NOEJF.js";
50
48
  import "../chunk-BSZYIAZL.js";
51
49
  import "../chunk-SAF6HGAA.js";
52
- import "../chunk-437T77TY.js";
50
+ import "../chunk-CWV4CMB6.js";
53
51
  import "../chunk-7QLSKOSU.js";
54
52
  import "../chunk-KZERVKTD.js";
55
53
  import {
@@ -57,10 +55,12 @@ import {
57
55
  } from "../chunk-2UMNXADU.js";
58
56
  import {
59
57
  DECISION_LINE_MAX,
58
+ KILL_REASON,
60
59
  effectiveWaitSeconds,
61
60
  hookWaitClamped,
62
- hookWaitDeadline
63
- } from "../chunk-MQMPG5X4.js";
61
+ hookWaitDeadline,
62
+ resolveGate
63
+ } from "../chunk-K337LIBD.js";
64
64
 
65
65
  // bin/pushary-codex-hook.ts
66
66
  import { basename, join } from "path";
@@ -3,19 +3,19 @@ import {
3
3
  askUser,
4
4
  reportEvent,
5
5
  waitForAnswer
6
- } from "../chunk-EXMUM226.js";
6
+ } from "../chunk-DPDUB4XF.js";
7
7
  import {
8
8
  getMachineId
9
9
  } from "../chunk-RN3NOEJF.js";
10
10
  import "../chunk-BSZYIAZL.js";
11
11
  import "../chunk-SAF6HGAA.js";
12
- import "../chunk-437T77TY.js";
12
+ import "../chunk-CWV4CMB6.js";
13
13
  import "../chunk-7QLSKOSU.js";
14
14
  import "../chunk-KZERVKTD.js";
15
15
  import {
16
16
  getApiKey
17
17
  } from "../chunk-2UMNXADU.js";
18
- import "../chunk-MQMPG5X4.js";
18
+ import "../chunk-K337LIBD.js";
19
19
 
20
20
  // bin/pushary-codex.ts
21
21
  import { basename } from "path";
@@ -1,22 +1,22 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  printKeyCheck
4
- } from "../chunk-FBGBJXVC.js";
4
+ } from "../chunk-NTIUQB3E.js";
5
5
  import {
6
6
  confirmAppConnection,
7
7
  connectDevice,
8
8
  printConnectInstructions
9
- } from "../chunk-6LC4WSCL.js";
9
+ } from "../chunk-LCA2EQTK.js";
10
10
  import "../chunk-3EGEA4KH.js";
11
11
  import {
12
12
  checkApiKey
13
- } from "../chunk-F52SIIDG.js";
13
+ } from "../chunk-LSB6PFLN.js";
14
14
  import {
15
15
  createIo
16
16
  } from "../chunk-5RUIFDTP.js";
17
17
  import {
18
18
  readKeySource
19
- } from "../chunk-K7CSRGKZ.js";
19
+ } from "../chunk-KZIGJLOX.js";
20
20
  import {
21
21
  parseFlags
22
22
  } from "../chunk-GMXKITVA.js";
@@ -29,7 +29,7 @@ import "../chunk-DINDL2CF.js";
29
29
  import "../chunk-6MTNS63X.js";
30
30
  import "../chunk-BSZYIAZL.js";
31
31
  import "../chunk-SAF6HGAA.js";
32
- import "../chunk-437T77TY.js";
32
+ import "../chunk-CWV4CMB6.js";
33
33
  import {
34
34
  UsageError
35
35
  } from "../chunk-7QLSKOSU.js";
@@ -37,7 +37,7 @@ import {
37
37
  EXIT
38
38
  } from "../chunk-KZERVKTD.js";
39
39
  import "../chunk-2UMNXADU.js";
40
- import "../chunk-MQMPG5X4.js";
40
+ import "../chunk-K337LIBD.js";
41
41
 
42
42
  // bin/pushary-connect.ts
43
43
  exitOnHelpFlag("connect");
@@ -8,7 +8,7 @@ import {
8
8
  acquireDaemonLease,
9
9
  readDaemonStatus,
10
10
  requestDaemonHandoff
11
- } from "../chunk-WEAQQSHQ.js";
11
+ } from "../chunk-4YMWLMAP.js";
12
12
  import {
13
13
  CODEX_BRIDGE_CAPABILITY,
14
14
  CODEX_RESUME_CAPABILITY,
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  findLiveProcessBySpawnId,
19
19
  ownsLiveProcess
20
- } from "../chunk-YKW6JCWI.js";
20
+ } from "../chunk-LXWISFF3.js";
21
21
  import {
22
22
  spawnClaude
23
23
  } from "../chunk-XHKBHWLX.js";
@@ -26,7 +26,7 @@ import {
26
26
  resolveGlobalPackageVersion,
27
27
  resolvePackageVersionFromBinary
28
28
  } from "../chunk-VT4IVERX.js";
29
- import "../chunk-HVZIHTOO.js";
29
+ import "../chunk-KJW6NKF7.js";
30
30
  import {
31
31
  getMachineId
32
32
  } from "../chunk-RN3NOEJF.js";
@@ -43,7 +43,7 @@ import {
43
43
  getApiKey,
44
44
  getBaseUrl
45
45
  } from "../chunk-2UMNXADU.js";
46
- import "../chunk-MQMPG5X4.js";
46
+ import "../chunk-K337LIBD.js";
47
47
 
48
48
  // src/spawn-daemon.ts
49
49
  import { execFileSync, spawn } from "child_process";
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  removeGeminiSettings
4
- } from "../chunk-DOXSWT4Q.js";
4
+ } from "../chunk-GY3I353G.js";
5
5
  import {
6
6
  removeClaudeMcpServers,
7
7
  removePusharySettings
8
- } from "../chunk-64PXDATC.js";
9
- import "../chunk-PWTKKQQI.js";
8
+ } from "../chunk-XJDL3MUE.js";
9
+ import "../chunk-HSGEEBBL.js";
10
10
  import "../chunk-VT4IVERX.js";
11
11
  import {
12
12
  claudeJson,
@@ -19,14 +19,14 @@ import {
19
19
  geminiSettings,
20
20
  removeCodexHooks,
21
21
  removeCodexSettings
22
- } from "../chunk-HVZIHTOO.js";
22
+ } from "../chunk-KJW6NKF7.js";
23
23
  import {
24
24
  exitOnHelpFlag
25
25
  } from "../chunk-SQOFGPNX.js";
26
26
  import "../chunk-GOEXZ5QJ.js";
27
27
  import "../chunk-DINDL2CF.js";
28
28
  import "../chunk-KZERVKTD.js";
29
- import "../chunk-MQMPG5X4.js";
29
+ import "../chunk-K337LIBD.js";
30
30
 
31
31
  // bin/pushary-disconnect.ts
32
32
  import { readFileSync, writeFileSync } from "fs";
@@ -3,13 +3,13 @@ import {
3
3
  claudeWired,
4
4
  codexWired,
5
5
  geminiWired
6
- } from "../chunk-4QPOMJUB.js";
6
+ } from "../chunk-JT5NQQCE.js";
7
7
  import {
8
8
  describeWaitLadder
9
9
  } from "../chunk-IIENZE2J.js";
10
10
  import {
11
11
  readDaemonStatus
12
- } from "../chunk-WEAQQSHQ.js";
12
+ } from "../chunk-4YMWLMAP.js";
13
13
  import {
14
14
  agentProbes,
15
15
  detectAgent,
@@ -18,12 +18,12 @@ import {
18
18
  isDetected,
19
19
  isPluginRegistered,
20
20
  vscodeSettingsTargets
21
- } from "../chunk-ADISVXZL.js";
21
+ } from "../chunk-4U2YRHNF.js";
22
22
  import {
23
23
  GEMINI_HOOK_BINARY,
24
24
  hasGeminiHooks,
25
25
  missingGeminiHookEvents
26
- } from "../chunk-DOXSWT4Q.js";
26
+ } from "../chunk-GY3I353G.js";
27
27
  import "../chunk-XHKBHWLX.js";
28
28
  import {
29
29
  execNpm
@@ -46,10 +46,10 @@ import {
46
46
  readCodexMcpAuth,
47
47
  untrustedCodexHookEvents,
48
48
  vscodePluginDir
49
- } from "../chunk-HVZIHTOO.js";
49
+ } from "../chunk-KJW6NKF7.js";
50
50
  import {
51
51
  readLedgerSummary
52
- } from "../chunk-NJ7JT26G.js";
52
+ } from "../chunk-PKUNB3SN.js";
53
53
  import {
54
54
  getMachineId
55
55
  } from "../chunk-RN3NOEJF.js";
@@ -59,19 +59,19 @@ import {
59
59
  fetchChannels,
60
60
  reachVerdict,
61
61
  verifyRoundTrip
62
- } from "../chunk-6LC4WSCL.js";
62
+ } from "../chunk-LCA2EQTK.js";
63
63
  import "../chunk-3EGEA4KH.js";
64
64
  import {
65
65
  checkApiKey,
66
66
  describeKeyCheck
67
- } from "../chunk-F52SIIDG.js";
67
+ } from "../chunk-LSB6PFLN.js";
68
68
  import {
69
69
  createIo
70
70
  } from "../chunk-5RUIFDTP.js";
71
71
  import {
72
72
  keyPrefix,
73
73
  readKeySource
74
- } from "../chunk-K7CSRGKZ.js";
74
+ } from "../chunk-KZIGJLOX.js";
75
75
  import {
76
76
  parseFlags
77
77
  } from "../chunk-GMXKITVA.js";
@@ -89,7 +89,7 @@ import {
89
89
  sendMcpRequest
90
90
  } from "../chunk-BSZYIAZL.js";
91
91
  import "../chunk-SAF6HGAA.js";
92
- import "../chunk-437T77TY.js";
92
+ import "../chunk-CWV4CMB6.js";
93
93
  import {
94
94
  UsageError
95
95
  } from "../chunk-7QLSKOSU.js";
@@ -99,7 +99,7 @@ import {
99
99
  import {
100
100
  getBaseUrl
101
101
  } from "../chunk-2UMNXADU.js";
102
- import "../chunk-MQMPG5X4.js";
102
+ import "../chunk-K337LIBD.js";
103
103
 
104
104
  // bin/pushary-doctor.ts
105
105
  import { existsSync, readFileSync, writeFileSync } from "fs";