@pushary/agent-hooks 0.81.0 → 0.83.0

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 (52) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/data/SKILL.md +14 -5
  3. package/data/cursor-plugin/skills/pushary/SKILL.md +13 -4
  4. package/data/vscode-plugin/skills/pushary/SKILL.md +13 -4
  5. package/dist/bin/pushary-bell-hook.js +4 -4
  6. package/dist/bin/pushary-bell.js +6 -6
  7. package/dist/bin/pushary-claude.js +4 -4
  8. package/dist/bin/pushary-clean.js +5 -5
  9. package/dist/bin/pushary-codex-hook.js +10 -6
  10. package/dist/bin/pushary-codex.js +3 -3
  11. package/dist/bin/pushary-connect.js +7 -7
  12. package/dist/bin/pushary-doctor.js +11 -11
  13. package/dist/bin/pushary-gemini-hook.js +5 -5
  14. package/dist/bin/pushary-hook.js +7 -7
  15. package/dist/bin/pushary-login.js +5 -5
  16. package/dist/bin/pushary-logout.js +5 -5
  17. package/dist/bin/pushary-mode.js +4 -4
  18. package/dist/bin/pushary-notification-hook.js +3 -3
  19. package/dist/bin/pushary-permission-denied-hook.js +7 -7
  20. package/dist/bin/pushary-permission-hook.js +7 -7
  21. package/dist/bin/pushary-post-hook.js +3 -3
  22. package/dist/bin/pushary-prompt-hook.js +3 -3
  23. package/dist/bin/pushary-session-end-hook.js +3 -3
  24. package/dist/bin/pushary-session-start-hook.js +3 -3
  25. package/dist/bin/pushary-setup.js +22 -17
  26. package/dist/bin/pushary-stats.js +2 -2
  27. package/dist/bin/pushary-status.js +6 -6
  28. package/dist/bin/pushary-stop-hook.js +3 -3
  29. package/dist/bin/pushary-stopfailure-hook.js +3 -3
  30. package/dist/bin/pushary-suggestions.js +1 -1
  31. package/dist/bin/pushary-upgrade.js +4 -4
  32. package/dist/bin/pushary-wait.js +4 -4
  33. package/dist/{chunk-MHA2WB7S.js → chunk-2R63XKLG.js} +1 -1
  34. package/dist/{chunk-U2PZKYZM.js → chunk-3JDIGKPV.js} +2 -2
  35. package/dist/{chunk-TX7KBKT7.js → chunk-5RUIFDTP.js} +1 -0
  36. package/dist/{chunk-PPD3HHNJ.js → chunk-BT7NTTIW.js} +1 -1
  37. package/dist/{chunk-FVVJ3FOW.js → chunk-C4SQY777.js} +2 -2
  38. package/dist/{chunk-EBP4YG75.js → chunk-CXGJTN74.js} +1 -1
  39. package/dist/{chunk-7DYFAM32.js → chunk-DMKSHZKF.js} +1 -1
  40. package/dist/{chunk-JU72KNUB.js → chunk-E7YX7CTM.js} +20 -8
  41. package/dist/{chunk-PVSCRRPA.js → chunk-FFT7L2VE.js} +2 -2
  42. package/dist/{chunk-WYVKPLVT.js → chunk-HKKERYZP.js} +1 -1
  43. package/dist/{chunk-Q4QULGAV.js → chunk-O55DONTG.js} +1 -1
  44. package/dist/{chunk-BOMF4C2Q.js → chunk-R3AEWBAZ.js} +23 -12
  45. package/dist/{chunk-E6I3DBJW.js → chunk-RZP3Z2WR.js} +1 -1
  46. package/dist/{chunk-R6AYBATA.js → chunk-U752S5RE.js} +1 -1
  47. package/dist/{chunk-DNFYUBRP.js → chunk-UAWTJMXA.js} +1 -1
  48. package/dist/{chunk-UBUPETEQ.js → chunk-V6MCBCUC.js} +2 -2
  49. package/dist/src/index.d.ts +2 -0
  50. package/dist/src/index.js +7 -7
  51. package/package.json +1 -1
  52. /package/dist/{chunk-T6BNEQ2A.js → chunk-QA5HP7CR.js} +0 -0
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handlePermissionRequest
4
- } from "../chunk-JU72KNUB.js";
5
- import "../chunk-R6AYBATA.js";
6
- import "../chunk-MHA2WB7S.js";
7
- import "../chunk-PVSCRRPA.js";
8
- import "../chunk-FVVJ3FOW.js";
4
+ } from "../chunk-E7YX7CTM.js";
5
+ import "../chunk-U752S5RE.js";
6
+ import "../chunk-2R63XKLG.js";
7
+ import "../chunk-FFT7L2VE.js";
8
+ import "../chunk-C4SQY777.js";
9
9
  import "../chunk-BSZYIAZL.js";
10
10
  import "../chunk-SAF6HGAA.js";
11
- import "../chunk-PPD3HHNJ.js";
11
+ import "../chunk-BT7NTTIW.js";
12
12
  import "../chunk-7QLSKOSU.js";
13
- import "../chunk-T6BNEQ2A.js";
13
+ import "../chunk-QA5HP7CR.js";
14
14
  import "../chunk-RN3NOEJF.js";
15
15
  import "../chunk-2UMNXADU.js";
16
16
  import "../chunk-KZERVKTD.js";
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handlePostToolUse
4
- } from "../chunk-FVVJ3FOW.js";
4
+ } from "../chunk-C4SQY777.js";
5
5
  import "../chunk-BSZYIAZL.js";
6
6
  import "../chunk-SAF6HGAA.js";
7
- import "../chunk-PPD3HHNJ.js";
7
+ import "../chunk-BT7NTTIW.js";
8
8
  import "../chunk-7QLSKOSU.js";
9
- import "../chunk-T6BNEQ2A.js";
9
+ import "../chunk-QA5HP7CR.js";
10
10
  import "../chunk-RN3NOEJF.js";
11
11
  import "../chunk-2UMNXADU.js";
12
12
  import "../chunk-KZERVKTD.js";
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleUserPrompt
4
- } from "../chunk-FVVJ3FOW.js";
4
+ } from "../chunk-C4SQY777.js";
5
5
  import "../chunk-BSZYIAZL.js";
6
6
  import "../chunk-SAF6HGAA.js";
7
- import "../chunk-PPD3HHNJ.js";
7
+ import "../chunk-BT7NTTIW.js";
8
8
  import "../chunk-7QLSKOSU.js";
9
- import "../chunk-T6BNEQ2A.js";
9
+ import "../chunk-QA5HP7CR.js";
10
10
  import "../chunk-RN3NOEJF.js";
11
11
  import "../chunk-2UMNXADU.js";
12
12
  import "../chunk-KZERVKTD.js";
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleSessionEnd
4
- } from "../chunk-FVVJ3FOW.js";
4
+ } from "../chunk-C4SQY777.js";
5
5
  import "../chunk-BSZYIAZL.js";
6
6
  import "../chunk-SAF6HGAA.js";
7
- import "../chunk-PPD3HHNJ.js";
7
+ import "../chunk-BT7NTTIW.js";
8
8
  import "../chunk-7QLSKOSU.js";
9
- import "../chunk-T6BNEQ2A.js";
9
+ import "../chunk-QA5HP7CR.js";
10
10
  import "../chunk-RN3NOEJF.js";
11
11
  import "../chunk-2UMNXADU.js";
12
12
  import "../chunk-KZERVKTD.js";
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleSessionStart
4
- } from "../chunk-FVVJ3FOW.js";
4
+ } from "../chunk-C4SQY777.js";
5
5
  import "../chunk-BSZYIAZL.js";
6
6
  import "../chunk-SAF6HGAA.js";
7
- import "../chunk-PPD3HHNJ.js";
7
+ import "../chunk-BT7NTTIW.js";
8
8
  import "../chunk-7QLSKOSU.js";
9
- import "../chunk-T6BNEQ2A.js";
9
+ import "../chunk-QA5HP7CR.js";
10
10
  import "../chunk-RN3NOEJF.js";
11
11
  import "../chunk-2UMNXADU.js";
12
12
  import "../chunk-KZERVKTD.js";
@@ -3,7 +3,7 @@ import {
3
3
  claudeWired,
4
4
  codexWired,
5
5
  geminiWired
6
- } from "../chunk-UBUPETEQ.js";
6
+ } from "../chunk-V6MCBCUC.js";
7
7
  import {
8
8
  runBrowserLogin
9
9
  } from "../chunk-Z3Z4VK5F.js";
@@ -18,17 +18,17 @@ import {
18
18
  shortenHome,
19
19
  vscodeSettingsTargets,
20
20
  writeInstructionBlock
21
- } from "../chunk-WYVKPLVT.js";
21
+ } from "../chunk-HKKERYZP.js";
22
22
  import {
23
23
  GEMINI_HOOK_BINARY,
24
24
  addGeminiHooks,
25
25
  addGeminiMcpServer
26
- } from "../chunk-7DYFAM32.js";
26
+ } from "../chunk-DMKSHZKF.js";
27
27
  import {
28
28
  addClaudeMcpServer,
29
29
  addPusharyHooks,
30
30
  addPusharyToolPermissions
31
- } from "../chunk-R6AYBATA.js";
31
+ } from "../chunk-U752S5RE.js";
32
32
  import {
33
33
  addCodexHookTrust,
34
34
  addCodexHooks,
@@ -46,10 +46,10 @@ import {
46
46
  geminiSettings,
47
47
  pusharyConfigFile,
48
48
  vscodePluginDir
49
- } from "../chunk-Q4QULGAV.js";
49
+ } from "../chunk-O55DONTG.js";
50
50
  import {
51
51
  reportEvent
52
- } from "../chunk-FVVJ3FOW.js";
52
+ } from "../chunk-C4SQY777.js";
53
53
  import {
54
54
  confirmAppConnection,
55
55
  connectDevice,
@@ -58,12 +58,15 @@ import {
58
58
  printConnectInstructions,
59
59
  setHumanStream,
60
60
  verifyRoundTrip
61
- } from "../chunk-BOMF4C2Q.js";
61
+ } from "../chunk-R3AEWBAZ.js";
62
62
  import "../chunk-3EGEA4KH.js";
63
63
  import {
64
64
  checkApiKey,
65
65
  describeKeyCheck
66
- } from "../chunk-EBP4YG75.js";
66
+ } from "../chunk-CXGJTN74.js";
67
+ import {
68
+ useColor
69
+ } from "../chunk-5RUIFDTP.js";
67
70
  import {
68
71
  KEY_FILE_MODE,
69
72
  exportLine,
@@ -71,7 +74,7 @@ import {
71
74
  readConfigFileKey,
72
75
  readKeySource,
73
76
  writeKey
74
- } from "../chunk-E6I3DBJW.js";
77
+ } from "../chunk-RZP3Z2WR.js";
75
78
  import {
76
79
  backupFile,
77
80
  readJsonSafe,
@@ -87,13 +90,13 @@ import {
87
90
  } from "../chunk-BC3VCZ3E.js";
88
91
  import "../chunk-BSZYIAZL.js";
89
92
  import "../chunk-SAF6HGAA.js";
90
- import "../chunk-PPD3HHNJ.js";
93
+ import "../chunk-BT7NTTIW.js";
91
94
  import {
92
95
  UsageError
93
96
  } from "../chunk-7QLSKOSU.js";
94
97
  import {
95
98
  isValidApiKey
96
- } from "../chunk-T6BNEQ2A.js";
99
+ } from "../chunk-QA5HP7CR.js";
97
100
  import {
98
101
  installGlobally,
99
102
  npmErrorMessage,
@@ -526,11 +529,12 @@ var writeHuman = (text) => {
526
529
  humanStream.write(text);
527
530
  };
528
531
  var jsonMode = false;
529
- var dim = (s) => `\x1B[2m${s}\x1B[0m`;
530
- var bold = (s) => `\x1B[1m${s}\x1B[0m`;
531
- var green = (s) => `\x1B[32m${s}\x1B[0m`;
532
- var cyan = (s) => `\x1B[36m${s}\x1B[0m`;
533
- var yellow = (s) => `\x1B[33m${s}\x1B[0m`;
532
+ var paint = (open) => (s) => useColor({ json: jsonMode }) ? `${open}${s}\x1B[0m` : s;
533
+ var dim = paint("\x1B[2m");
534
+ var bold = paint("\x1B[1m");
535
+ var green = paint("\x1B[32m");
536
+ var cyan = paint("\x1B[36m");
537
+ var yellow = paint("\x1B[33m");
534
538
  var check = green("\u2713");
535
539
  var abortWith = async (reason, code, keyCheck) => {
536
540
  await reportSetupAbort(reason, code, keyCheck);
@@ -1627,7 +1631,8 @@ var main = async () => {
1627
1631
  process.exit(EXIT.OK);
1628
1632
  } else if (connectMode === "app" && canShowPairingQr() && !options.skipPhone) {
1629
1633
  console.log(` ${dim("Pairing with your Pushary app.")}`);
1630
- console.log(` ${dim("No app? Ctrl-C, then:")} ${cyan("npx @pushary/agent-hooks setup --connect browser")}`);
1634
+ console.log(` ${dim("No app yet? Get it at")} ${cyan("https://pushary.com/download")}${dim(", this keeps waiting.")}`);
1635
+ console.log(` ${dim("No phone? Ctrl-C, then:")} ${cyan("npx @pushary/agent-hooks setup --connect browser")}`);
1631
1636
  markStep("pair");
1632
1637
  const previous = readKeySource();
1633
1638
  const paired = await connectViaAppPairing({
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readLedgerSummary
4
- } from "../chunk-MHA2WB7S.js";
5
- import "../chunk-T6BNEQ2A.js";
4
+ } from "../chunk-2R63XKLG.js";
5
+ import "../chunk-QA5HP7CR.js";
6
6
  import {
7
7
  exitOnHelpFlag
8
8
  } from "../chunk-RRZZ7TFJ.js";
@@ -3,18 +3,18 @@ import {
3
3
  describeReach,
4
4
  fetchChannels,
5
5
  reachVerdict
6
- } from "../chunk-BOMF4C2Q.js";
6
+ } from "../chunk-R3AEWBAZ.js";
7
7
  import "../chunk-3EGEA4KH.js";
8
8
  import {
9
9
  checkApiKey,
10
10
  describeKeyCheck
11
- } from "../chunk-EBP4YG75.js";
11
+ } from "../chunk-CXGJTN74.js";
12
12
  import {
13
13
  createIo
14
- } from "../chunk-TX7KBKT7.js";
14
+ } from "../chunk-5RUIFDTP.js";
15
15
  import {
16
16
  readKeySource
17
- } from "../chunk-E6I3DBJW.js";
17
+ } from "../chunk-RZP3Z2WR.js";
18
18
  import "../chunk-6MTNS63X.js";
19
19
  import {
20
20
  rejectUnknownFlags
@@ -22,11 +22,11 @@ import {
22
22
  import "../chunk-BC3VCZ3E.js";
23
23
  import "../chunk-BSZYIAZL.js";
24
24
  import "../chunk-SAF6HGAA.js";
25
- import "../chunk-PPD3HHNJ.js";
25
+ import "../chunk-BT7NTTIW.js";
26
26
  import {
27
27
  UsageError
28
28
  } from "../chunk-7QLSKOSU.js";
29
- import "../chunk-T6BNEQ2A.js";
29
+ import "../chunk-QA5HP7CR.js";
30
30
  import {
31
31
  describeLastSeen,
32
32
  listMachines
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleStop
4
- } from "../chunk-FVVJ3FOW.js";
4
+ } from "../chunk-C4SQY777.js";
5
5
  import "../chunk-BSZYIAZL.js";
6
6
  import "../chunk-SAF6HGAA.js";
7
- import "../chunk-PPD3HHNJ.js";
7
+ import "../chunk-BT7NTTIW.js";
8
8
  import "../chunk-7QLSKOSU.js";
9
- import "../chunk-T6BNEQ2A.js";
9
+ import "../chunk-QA5HP7CR.js";
10
10
  import "../chunk-RN3NOEJF.js";
11
11
  import "../chunk-2UMNXADU.js";
12
12
  import "../chunk-KZERVKTD.js";
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleStopFailure
4
- } from "../chunk-FVVJ3FOW.js";
4
+ } from "../chunk-C4SQY777.js";
5
5
  import "../chunk-BSZYIAZL.js";
6
6
  import "../chunk-SAF6HGAA.js";
7
- import "../chunk-PPD3HHNJ.js";
7
+ import "../chunk-BT7NTTIW.js";
8
8
  import "../chunk-7QLSKOSU.js";
9
- import "../chunk-T6BNEQ2A.js";
9
+ import "../chunk-QA5HP7CR.js";
10
10
  import "../chunk-RN3NOEJF.js";
11
11
  import "../chunk-2UMNXADU.js";
12
12
  import "../chunk-KZERVKTD.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createIo
4
- } from "../chunk-TX7KBKT7.js";
4
+ } from "../chunk-5RUIFDTP.js";
5
5
  import {
6
6
  rejectUnknownFlags
7
7
  } from "../chunk-GMXKITVA.js";
@@ -4,12 +4,12 @@ import {
4
4
  addGeminiHooks,
5
5
  addGeminiMcpServer,
6
6
  hasGeminiHooks
7
- } from "../chunk-7DYFAM32.js";
7
+ } from "../chunk-DMKSHZKF.js";
8
8
  import {
9
9
  addClaudeMcpServer,
10
10
  addPusharyHooks,
11
11
  addPusharyToolPermissions
12
- } from "../chunk-R6AYBATA.js";
12
+ } from "../chunk-U752S5RE.js";
13
13
  import {
14
14
  CODEX_HOOK_BINARY,
15
15
  addCodexHookTrust,
@@ -23,11 +23,11 @@ import {
23
23
  hasCodexHooks,
24
24
  vscodePluginDir,
25
25
  vscodePluginMcp
26
- } from "../chunk-Q4QULGAV.js";
26
+ } from "../chunk-O55DONTG.js";
27
27
  import {
28
28
  readJsonSafe
29
29
  } from "../chunk-6MTNS63X.js";
30
- import "../chunk-T6BNEQ2A.js";
30
+ import "../chunk-QA5HP7CR.js";
31
31
  import {
32
32
  execNpm,
33
33
  npmErrorMessage,
@@ -4,11 +4,11 @@ import {
4
4
  } from "../chunk-IIENZE2J.js";
5
5
  import {
6
6
  exitOnFailedResponse
7
- } from "../chunk-U2PZKYZM.js";
8
- import "../chunk-EBP4YG75.js";
7
+ } from "../chunk-3JDIGKPV.js";
8
+ import "../chunk-CXGJTN74.js";
9
9
  import {
10
10
  createIo
11
- } from "../chunk-TX7KBKT7.js";
11
+ } from "../chunk-5RUIFDTP.js";
12
12
  import {
13
13
  rejectUnknownFlags
14
14
  } from "../chunk-GMXKITVA.js";
@@ -16,7 +16,7 @@ import "../chunk-SAF6HGAA.js";
16
16
  import {
17
17
  UsageError
18
18
  } from "../chunk-7QLSKOSU.js";
19
- import "../chunk-T6BNEQ2A.js";
19
+ import "../chunk-QA5HP7CR.js";
20
20
  import {
21
21
  exitOnHelpFlag
22
22
  } from "../chunk-RRZZ7TFJ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-T6BNEQ2A.js";
3
+ } from "./chunk-QA5HP7CR.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  describeKeyCheck,
3
3
  keyCheckFromResponse
4
- } from "./chunk-EBP4YG75.js";
4
+ } from "./chunk-CXGJTN74.js";
5
5
  import {
6
6
  createIo
7
- } from "./chunk-TX7KBKT7.js";
7
+ } from "./chunk-5RUIFDTP.js";
8
8
  import {
9
9
  EXIT
10
10
  } from "./chunk-KZERVKTD.js";
@@ -75,5 +75,6 @@ var createIo = (stream = process.stdout, context = {}) => {
75
75
  };
76
76
 
77
77
  export {
78
+ useColor,
78
79
  createIo
79
80
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeInstallSource
3
- } from "./chunk-T6BNEQ2A.js";
3
+ } from "./chunk-QA5HP7CR.js";
4
4
  import {
5
5
  configFilePath
6
6
  } from "./chunk-2UMNXADU.js";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-SAF6HGAA.js";
8
8
  import {
9
9
  reportedInstallSource
10
- } from "./chunk-PPD3HHNJ.js";
10
+ } from "./chunk-BT7NTTIW.js";
11
11
  import {
12
12
  ACTION_BODY_MAX,
13
13
  DECISION_LINE_MAX,
@@ -23,7 +23,7 @@ import {
23
23
  policyArgForms,
24
24
  redactSecrets,
25
25
  redactSecretsDeep
26
- } from "./chunk-T6BNEQ2A.js";
26
+ } from "./chunk-QA5HP7CR.js";
27
27
  import {
28
28
  getMachineId
29
29
  } from "./chunk-RN3NOEJF.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-7QLSKOSU.js";
7
7
  import {
8
8
  isValidApiKey
9
- } from "./chunk-T6BNEQ2A.js";
9
+ } from "./chunk-QA5HP7CR.js";
10
10
  import {
11
11
  getBaseUrl
12
12
  } from "./chunk-2UMNXADU.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HOOK_BUDGETS
3
- } from "./chunk-T6BNEQ2A.js";
3
+ } from "./chunk-QA5HP7CR.js";
4
4
 
5
5
  // src/gemini-config.ts
6
6
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  PRETOOLUSE_HANDLED_TOOLS
3
- } from "./chunk-R6AYBATA.js";
3
+ } from "./chunk-U752S5RE.js";
4
4
  import {
5
5
  isGatingMoment,
6
6
  recordKeylessMoment
7
- } from "./chunk-MHA2WB7S.js";
7
+ } from "./chunk-2R63XKLG.js";
8
8
  import {
9
9
  denyReasonFrom,
10
10
  isDeferAnswer,
11
11
  resolveGate
12
- } from "./chunk-PVSCRRPA.js";
12
+ } from "./chunk-FFT7L2VE.js";
13
13
  import {
14
14
  DEFAULT_SESSION,
15
15
  askUser,
@@ -29,13 +29,13 @@ import {
29
29
  sendNotification,
30
30
  throttlePass,
31
31
  waitForAnswer
32
- } from "./chunk-FVVJ3FOW.js";
32
+ } from "./chunk-C4SQY777.js";
33
33
  import {
34
34
  buildDecisionEpisodeFeatures,
35
35
  effectiveWaitSeconds,
36
36
  hookWaitClamped,
37
37
  hookWaitDeadline
38
- } from "./chunk-T6BNEQ2A.js";
38
+ } from "./chunk-QA5HP7CR.js";
39
39
  import {
40
40
  getMachineId
41
41
  } from "./chunk-RN3NOEJF.js";
@@ -273,7 +273,11 @@ var dispatchModeHandler = async (apiKey, input, toolPolicy, machineId, trainingC
273
273
  actionBody: deriveActionBody(input.tool_name, input.tool_input),
274
274
  // Only when the breach is what caused the question, so an ordinary approval
275
275
  // can never silently widen a scope.
276
- scopePath: scopeReason ? scopePath : void 0
276
+ scopePath: scopeReason ? scopePath : void 0,
277
+ // The gate asks at most one question per tool call, so the runtime's id needs
278
+ // no suffix here. Absent on runtimes that do not send one, and the server then
279
+ // creates a fresh decision exactly as before.
280
+ toolUseId: input.tool_use_id
277
281
  };
278
282
  const signals = {};
279
283
  const runHandler = () => {
@@ -386,7 +390,11 @@ var handleAskUserQuestion = async (apiKey, input) => {
386
390
  agentName: `Claude Code - ${projectName}`,
387
391
  sessionId: input.session_id,
388
392
  machineId: getMachineId(),
389
- toolName: "AskUserQuestion"
393
+ toolName: "AskUserQuestion",
394
+ // One AskUserQuestion call raises several questions, and their payload
395
+ // fingerprints are identical (same tool, no target, no body). Without the
396
+ // index they would all collapse onto the first decision.
397
+ toolUseId: input.tool_use_id ? `${input.tool_use_id}#q${index}` : void 0
390
398
  });
391
399
  } catch {
392
400
  return void 0;
@@ -561,7 +569,11 @@ var handlePermissionDenied = async (input) => {
561
569
  agentName: `Claude Code - ${projectName}`,
562
570
  sessionId: input.session_id,
563
571
  machineId: getMachineId(),
564
- toolName: input.tool_name
572
+ toolName: input.tool_name,
573
+ // Suffixed because the PreToolUse gate may already have asked about this
574
+ // same tool call. Without it, the retry prompt would collide with that
575
+ // decision and hand back its answer instead of asking a new question.
576
+ toolUseId: input.tool_use_id ? `${input.tool_use_id}#retry` : void 0
565
577
  });
566
578
  } catch {
567
579
  return void 0;
@@ -4,12 +4,12 @@ import {
4
4
  isModeStateDegraded,
5
5
  resolveAutoResolveOrigin,
6
6
  resolvePolicyAcross
7
- } from "./chunk-FVVJ3FOW.js";
7
+ } from "./chunk-C4SQY777.js";
8
8
  import {
9
9
  evaluateScope,
10
10
  scopeChangeReason,
11
11
  scopeRequiresHuman
12
- } from "./chunk-T6BNEQ2A.js";
12
+ } from "./chunk-QA5HP7CR.js";
13
13
 
14
14
  // src/answer.ts
15
15
  var denyReasonFrom = (value, note) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  codexHomeFrom
3
- } from "./chunk-Q4QULGAV.js";
3
+ } from "./chunk-O55DONTG.js";
4
4
 
5
5
  // src/vscode-config.ts
6
6
  import { homedir } from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HOOK_BUDGETS
3
- } from "./chunk-T6BNEQ2A.js";
3
+ } from "./chunk-QA5HP7CR.js";
4
4
 
5
5
  // src/codex-config.ts
6
6
  import { createHash } from "crypto";
@@ -3,12 +3,15 @@ import {
3
3
  openSealedKey,
4
4
  publicKeyFingerprint
5
5
  } from "./chunk-3EGEA4KH.js";
6
+ import {
7
+ useColor
8
+ } from "./chunk-5RUIFDTP.js";
6
9
  import {
7
10
  callMcpTool
8
11
  } from "./chunk-BSZYIAZL.js";
9
12
  import {
10
13
  reportedInstallSource
11
- } from "./chunk-PPD3HHNJ.js";
14
+ } from "./chunk-BT7NTTIW.js";
12
15
 
13
16
  // src/reach.ts
14
17
  var reachVerdict = (channels) => {
@@ -263,11 +266,12 @@ var humanIsTty = () => stream === process.stdout && process.stdout.isTTY === tru
263
266
 
264
267
  // src/onboarding.ts
265
268
  import qrcodeTerminal from "qrcode-terminal";
266
- var dim = (s) => `\x1B[2m${s}\x1B[0m`;
267
- var bold = (s) => `\x1B[1m${s}\x1B[0m`;
268
- var green = (s) => `\x1B[32m${s}\x1B[0m`;
269
- var cyan = (s) => `\x1B[36m${s}\x1B[0m`;
270
- var yellow = (s) => `\x1B[33m${s}\x1B[0m`;
269
+ var paint = (open) => (s) => useColor() ? `${open}${s}\x1B[0m` : s;
270
+ var dim = paint("\x1B[2m");
271
+ var bold = paint("\x1B[1m");
272
+ var green = paint("\x1B[32m");
273
+ var cyan = paint("\x1B[36m");
274
+ var yellow = paint("\x1B[33m");
271
275
  var check = green("\u2713");
272
276
  var apiBase = () => process.env.PUSHARY_API_URL?.trim() || process.env.PUSHARY_BASE_URL?.trim() || "https://pushary.com";
273
277
  var EXIT_ABORTED = 130;
@@ -631,7 +635,8 @@ var startPairing = async (cliPublicKey) => {
631
635
  });
632
636
  if (!res.ok) return null;
633
637
  const data = await res.json().catch(() => null);
634
- return data && typeof data.pairId === "string" ? data.pairId : null;
638
+ if (!data || typeof data.pairId !== "string") return null;
639
+ return { pairId: data.pairId, code: typeof data.code === "string" ? data.code : null };
635
640
  } catch {
636
641
  return null;
637
642
  }
@@ -682,22 +687,28 @@ var ackPairing = async (pairId) => {
682
687
  } catch {
683
688
  }
684
689
  };
685
- var buildPairLinks = (pairId, publicKeyB64, baseUrl = apiBase()) => {
690
+ var buildPairLinks = (pairId, publicKeyB64, baseUrl = apiBase(), code = null) => {
686
691
  const id = encodeURIComponent(pairId);
687
692
  const pk = encodeURIComponent(publicKeyB64);
693
+ const origin = baseUrl.replace(/\/+$/, "");
688
694
  return {
689
- universalLink: `${baseUrl.replace(/\/+$/, "")}/pair?id=${id}&pk=${pk}`,
695
+ // 33 characters against 114, so 16 rows of QR against 22. Without a code this
696
+ // is the exact URL every published CLI already encodes.
697
+ universalLink: code ? `${origin}/pair/${encodeURIComponent(code)}` : `${origin}/pair?id=${id}&pk=${pk}`,
698
+ // Never shortened: the scheme reaches an installed app with no server round
699
+ // trip, which is the path that has to survive the short code failing.
690
700
  deepLink: `pushary://pair?pk=${pk}&id=${id}`
691
701
  };
692
702
  };
693
703
  var connectViaAppPairing = async (options = {}) => {
694
704
  const keypair = generateKeypair();
695
- const pairId = await startPairing(keypair.publicKeyB64);
696
- if (!pairId) {
705
+ const started = await startPairing(keypair.publicKeyB64);
706
+ if (!started) {
697
707
  console.log(` ${yellow("!")} Couldn't start pairing. Check your connection and try again.`);
698
708
  return null;
699
709
  }
700
- const { universalLink, deepLink } = buildPairLinks(pairId, keypair.publicKeyB64);
710
+ const { pairId, code } = started;
711
+ const { universalLink, deepLink } = buildPairLinks(pairId, keypair.publicKeyB64, apiBase(), code);
701
712
  console.log();
702
713
  console.log(` ${bold("Connect your Pushary app")}`);
703
714
  console.log(` ${dim("Scan this with your phone camera:")}`);
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-BC3VCZ3E.js";
10
10
  import {
11
11
  resolveInstallSourceFor
12
- } from "./chunk-PPD3HHNJ.js";
12
+ } from "./chunk-BT7NTTIW.js";
13
13
  import {
14
14
  configFilePath
15
15
  } from "./chunk-2UMNXADU.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HOOK_BUDGETS
3
- } from "./chunk-T6BNEQ2A.js";
3
+ } from "./chunk-QA5HP7CR.js";
4
4
 
5
5
  // src/claude-config.ts
6
6
  import { join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readConfigFileKey
3
- } from "./chunk-E6I3DBJW.js";
3
+ } from "./chunk-RZP3Z2WR.js";
4
4
 
5
5
  // src/bell/fleet.ts
6
6
  import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  hasGeminiHooks
3
- } from "./chunk-7DYFAM32.js";
3
+ } from "./chunk-DMKSHZKF.js";
4
4
  import {
5
5
  hasCodexHooks
6
- } from "./chunk-Q4QULGAV.js";
6
+ } from "./chunk-O55DONTG.js";
7
7
 
8
8
  // src/diagnostics/wiring.ts
9
9
  var record = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : null;