@pushary/agent-hooks 1.9.11 → 1.9.13

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 (102) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/data/cursor-plugin/scripts/pushary-gate.mjs +7 -2
  3. package/dist/bin/pushary-bell-hook.js +25 -25
  4. package/dist/bin/pushary-bell.js +9 -9
  5. package/dist/bin/pushary-claude.js +26 -25
  6. package/dist/bin/pushary-clean.js +52 -30
  7. package/dist/bin/pushary-codex-bridge.js +17 -17
  8. package/dist/bin/pushary-codex-hook.js +30 -30
  9. package/dist/bin/pushary-codex.js +12 -12
  10. package/dist/bin/pushary-connect.js +24 -24
  11. package/dist/bin/pushary-cowork.js +5 -5
  12. package/dist/bin/pushary-daemon.js +42 -37
  13. package/dist/bin/pushary-disconnect.js +43 -29
  14. package/dist/bin/pushary-doctor.js +33 -33
  15. package/dist/bin/pushary-elicitation-hook.js +25 -25
  16. package/dist/bin/pushary-gemini-bridge.js +13 -13
  17. package/dist/bin/pushary-gemini-hook.js +27 -27
  18. package/dist/bin/pushary-hook.js +29 -29
  19. package/dist/bin/pushary-login.js +12 -12
  20. package/dist/bin/pushary-logout.js +10 -10
  21. package/dist/bin/pushary-mcp.js +9 -9
  22. package/dist/bin/pushary-mode.js +12 -12
  23. package/dist/bin/pushary-notification-hook.js +24 -24
  24. package/dist/bin/pushary-opencode-hook.js +26 -26
  25. package/dist/bin/pushary-permission-denied-hook.js +29 -29
  26. package/dist/bin/pushary-permission-hook.js +28 -28
  27. package/dist/bin/pushary-post-hook.js +24 -24
  28. package/dist/bin/pushary-prompt-hook.js +24 -24
  29. package/dist/bin/pushary-session-end-hook.js +24 -24
  30. package/dist/bin/pushary-session-start-hook.js +28 -28
  31. package/dist/bin/pushary-setup.js +69 -41
  32. package/dist/bin/pushary-stats.js +5 -5
  33. package/dist/bin/pushary-status.js +26 -26
  34. package/dist/bin/pushary-stop-hook.js +24 -24
  35. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  36. package/dist/bin/pushary-suggestions.js +12 -12
  37. package/dist/bin/pushary-transcript-register.js +17 -17
  38. package/dist/bin/pushary-transcripts.js +7 -7
  39. package/dist/bin/pushary-upgrade.js +30 -30
  40. package/dist/bin/pushary-wait.js +12 -12
  41. package/dist/bin/pushary.js +6 -6
  42. package/dist/{chunk-7RWQZQV2.js → chunk-226PID65.js} +5 -5
  43. package/dist/{chunk-N7HXP4PZ.js → chunk-3EOXZYUE.js} +1 -1
  44. package/dist/{chunk-MJLTABWF.js → chunk-3LSJ7YVM.js} +3 -3
  45. package/dist/{chunk-KEV2MOJH.js → chunk-3VSMTCXV.js} +10 -5
  46. package/dist/{chunk-PTGUJZSD.js → chunk-43IDNI4X.js} +7 -6
  47. package/dist/{chunk-2NAQRPZQ.js → chunk-43ORAXAL.js} +1 -1
  48. package/dist/{chunk-M54ATCOZ.js → chunk-4ATFPZ6X.js} +1 -1
  49. package/dist/{chunk-CZYMYM7X.js → chunk-4EAILOOQ.js} +3 -3
  50. package/dist/{chunk-MX3LPP3K.js → chunk-4ZSWBLVM.js} +6 -6
  51. package/dist/{chunk-XYCTS3WP.js → chunk-5QTQI3HL.js} +1 -1
  52. package/dist/{chunk-YETKAI5Q.js → chunk-6CM3B4PJ.js} +6 -6
  53. package/dist/{chunk-4HR2ICME.js → chunk-6MGD24SH.js} +1 -1
  54. package/dist/{chunk-A6J5Z2HO.js → chunk-6NL3LYUM.js} +8 -8
  55. package/dist/{chunk-KIVFWGG6.js → chunk-6QPQG3Q5.js} +5 -5
  56. package/dist/{chunk-FJCOOFT7.js → chunk-7JM6TCMA.js} +1 -1
  57. package/dist/{chunk-LX6EWNRK.js → chunk-7VWIBIDK.js} +4 -4
  58. package/dist/{chunk-TVVUJTUW.js → chunk-FWAXBC3P.js} +1 -1
  59. package/dist/{chunk-BZI7EBTB.js → chunk-G54VGPRX.js} +1 -1
  60. package/dist/{chunk-AIWZRRSK.js → chunk-G5K656XW.js} +4 -4
  61. package/dist/{chunk-WHRYW4P2.js → chunk-GFAVGG3X.js} +5 -5
  62. package/dist/{chunk-V6IW5WMK.js → chunk-GYR4G4WO.js} +1 -1
  63. package/dist/{chunk-N6GEI3PK.js → chunk-HHMMY6TB.js} +2 -2
  64. package/dist/{chunk-P7N7FJ7W.js → chunk-J2VNQSS6.js} +1 -1
  65. package/dist/{chunk-E6YQW43K.js → chunk-JRKUJOZL.js} +1 -1
  66. package/dist/{chunk-GUNZHSTL.js → chunk-JVUK5YFM.js} +5 -5
  67. package/dist/{chunk-2AQ4VZSA.js → chunk-LBNIISXH.js} +1 -1
  68. package/dist/{chunk-CHDAH4HP.js → chunk-LHLUKFJV.js} +8 -8
  69. package/dist/{chunk-EJVYEOKC.js → chunk-LUYAXSUS.js} +3 -3
  70. package/dist/{chunk-KBN3UP2R.js → chunk-LYDO2SS6.js} +3 -3
  71. package/dist/{chunk-WCELLK4P.js → chunk-MPDJJNGA.js} +2 -2
  72. package/dist/{chunk-C6QM5SJR.js → chunk-MWP65CZ3.js} +2 -2
  73. package/dist/{chunk-BMP2BLIR.js → chunk-N6XFGVNW.js} +3 -3
  74. package/dist/{chunk-CBDJ2X5P.js → chunk-NPRFA7YM.js} +2 -2
  75. package/dist/chunk-OOKRWBCG.js +111 -0
  76. package/dist/{chunk-PRJNUNCV.js → chunk-OOZ5RSEF.js} +2 -2
  77. package/dist/{chunk-MHHXR7DT.js → chunk-QIPDIZC5.js} +4 -4
  78. package/dist/{chunk-2GG77ADC.js → chunk-RI5E5JQS.js} +1 -1
  79. package/dist/{chunk-GA4J6YFN.js → chunk-RJAPOB34.js} +2 -2
  80. package/dist/{chunk-HX5TI6DP.js → chunk-RYKU62ZI.js} +1 -1
  81. package/dist/{chunk-Z4AOR6RZ.js → chunk-S2LDTUHS.js} +2 -2
  82. package/dist/{chunk-ERXY2SIW.js → chunk-TCVFNLMM.js} +20 -14
  83. package/dist/{chunk-MITMDERZ.js → chunk-TDSLVFG6.js} +1 -1
  84. package/dist/{chunk-VOP5U2VX.js → chunk-TVDI7SX2.js} +113 -16
  85. package/dist/{chunk-5WAYSUWV.js → chunk-U5SXTKZV.js} +2 -2
  86. package/dist/{chunk-I4I4UH62.js → chunk-U6QEHPEF.js} +3 -3
  87. package/dist/{chunk-OKSU74QH.js → chunk-UUBEEKT6.js} +2 -2
  88. package/dist/{chunk-STUJXZC2.js → chunk-VUHT6NYV.js} +4 -4
  89. package/dist/{chunk-ZTSMQYST.js → chunk-WIRM7ZLI.js} +2 -2
  90. package/dist/{chunk-BDRXDO25.js → chunk-WL4PVINO.js} +2 -2
  91. package/dist/{chunk-4FWWHCYM.js → chunk-WP57USIT.js} +13 -4
  92. package/dist/{chunk-P2EJN7UB.js → chunk-Y25RH4VF.js} +1 -1
  93. package/dist/{chunk-4RENRBSB.js → chunk-YI37QERZ.js} +4 -4
  94. package/dist/{chunk-LBAMPNDM.js → chunk-ZAH3CCEV.js} +4 -4
  95. package/dist/{global-upgrade-VT2JS7DR.js → global-upgrade-NIFOQFV4.js} +6 -6
  96. package/dist/{paths-WRBEUNEY.js → paths-QPBLO5Q2.js} +2 -2
  97. package/dist/{reapply-BCR6U7HO.js → reapply-TVMBJWJB.js} +20 -20
  98. package/dist/src/index.d.ts +1 -0
  99. package/dist/src/index.js +19 -19
  100. package/dist/{upgrade-lock-VRYMTPZQ.js → upgrade-lock-Z3LYROGK.js} +3 -3
  101. package/package.json +1 -1
  102. package/dist/chunk-LUHNNZSH.js +0 -50
@@ -2,7 +2,7 @@ import {
2
2
  IDLE_PROMPT_NOTIFICATION,
3
3
  NOTIFICATION_PUSH_TYPES,
4
4
  POSTTOOLUSE_MIRROR_ONLY_TOOLS
5
- } from "./chunk-E6YQW43K.js";
5
+ } from "./chunk-JRKUJOZL.js";
6
6
  import {
7
7
  cancelQuestion,
8
8
  clientErrorKindOf,
@@ -10,26 +10,26 @@ import {
10
10
  reportClientError,
11
11
  sendNotification,
12
12
  waitForAnswer
13
- } from "./chunk-GUNZHSTL.js";
13
+ } from "./chunk-JVUK5YFM.js";
14
14
  import {
15
15
  withRetry
16
- } from "./chunk-KBN3UP2R.js";
16
+ } from "./chunk-LYDO2SS6.js";
17
17
  import {
18
18
  getMachineId
19
- } from "./chunk-2NAQRPZQ.js";
19
+ } from "./chunk-43ORAXAL.js";
20
20
  import {
21
21
  reportedInstallSource
22
- } from "./chunk-CBDJ2X5P.js";
22
+ } from "./chunk-NPRFA7YM.js";
23
23
  import {
24
24
  canonicalJson
25
- } from "./chunk-4FWWHCYM.js";
25
+ } from "./chunk-WP57USIT.js";
26
26
  import {
27
27
  writeFileAtomic
28
28
  } from "./chunk-T7E75EKA.js";
29
29
  import {
30
30
  getApiKey,
31
31
  getBaseUrl
32
- } from "./chunk-FJCOOFT7.js";
32
+ } from "./chunk-7JM6TCMA.js";
33
33
  import {
34
34
  ACTION_BODY_MAX,
35
35
  AGENT_LABELS_BY_TYPE,
@@ -58,7 +58,7 @@ import {
58
58
  resolvePolicy,
59
59
  toToolLookup,
60
60
  truncateLine
61
- } from "./chunk-VOP5U2VX.js";
61
+ } from "./chunk-TVDI7SX2.js";
62
62
 
63
63
  // ../hook-mapping/src/describe.ts
64
64
  import { isAbsolute, relative, resolve } from "path";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-KEV2MOJH.js";
3
+ } from "./chunk-3VSMTCXV.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands,
7
7
  liveBridgeProbe,
8
8
  resolveBridgeStub
9
- } from "./chunk-7RWQZQV2.js";
9
+ } from "./chunk-226PID65.js";
10
10
  import {
11
11
  AGENT_CHOICES
12
- } from "./chunk-4HR2ICME.js";
12
+ } from "./chunk-6MGD24SH.js";
13
13
  import {
14
14
  claudeSettings,
15
15
  codexHooksJson,
@@ -18,7 +18,7 @@ import {
18
18
  guardedArgv,
19
19
  pusharyDir,
20
20
  vscodePluginDir
21
- } from "./chunk-4FWWHCYM.js";
21
+ } from "./chunk-WP57USIT.js";
22
22
  import {
23
23
  readJsonSafe
24
24
  } from "./chunk-T7E75EKA.js";
@@ -28,7 +28,7 @@ import {
28
28
  HOOK_LOCATOR_BINARY,
29
29
  OPENCODE_APPROVAL_EVENT,
30
30
  hookCompatibleProfile
31
- } from "./chunk-VOP5U2VX.js";
31
+ } from "./chunk-TVDI7SX2.js";
32
32
 
33
33
  // src/opencode-plugin.ts
34
34
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-M54ATCOZ.js";
3
+ } from "./chunk-4ATFPZ6X.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  registerTranscript
3
- } from "./chunk-CHDAH4HP.js";
3
+ } from "./chunk-LHLUKFJV.js";
4
4
  import {
5
5
  namedEvent
6
- } from "./chunk-KEV2MOJH.js";
6
+ } from "./chunk-3VSMTCXV.js";
7
7
  import {
8
8
  writeDegraded
9
- } from "./chunk-GUNZHSTL.js";
9
+ } from "./chunk-JVUK5YFM.js";
10
10
  import {
11
11
  claudeShapedHookInput,
12
12
  hookCompatibleProfileBySource
13
- } from "./chunk-VOP5U2VX.js";
13
+ } from "./chunk-TVDI7SX2.js";
14
14
 
15
15
  // src/tool-hook-input.ts
16
16
  var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-4FWWHCYM.js";
3
+ } from "./chunk-WP57USIT.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-Z4AOR6RZ.js";
3
+ } from "./chunk-S2LDTUHS.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-4FWWHCYM.js";
3
+ } from "./chunk-WP57USIT.js";
4
4
  import {
5
5
  readJsonSafe,
6
6
  writeFileAtomic
7
7
  } from "./chunk-T7E75EKA.js";
8
8
  import {
9
9
  DECLINED_AGENTS_FILE,
10
- HOOK_SOURCES,
10
+ DISCONNECT_AGENT_IDS,
11
11
  normalizeAgentId,
12
12
  parseDeclinedAgents,
13
13
  serializeDeclinedAgents,
14
14
  withDeclinedAgent,
15
15
  withoutDeclinedAgent
16
- } from "./chunk-VOP5U2VX.js";
16
+ } from "./chunk-TVDI7SX2.js";
17
17
 
18
18
  // src/declined-agents-file.ts
19
19
  import { join } from "path";
@@ -36,7 +36,7 @@ var changeDeclinedAgents = (file, applies, next) => {
36
36
  };
37
37
  var recordDeclinedAgent = (agent, file = declinedAgentsFile()) => changeDeclinedAgents(file, (current) => !current.includes(agent), (current) => withDeclinedAgent(current, agent));
38
38
  var clearDeclinedAgent = (agent, file = declinedAgentsFile()) => changeDeclinedAgents(file, (current) => current.includes(agent), (current) => withoutDeclinedAgent(current, agent));
39
- var declinedAgentForSetupChoice = (choice) => normalizeAgentId(choice, HOOK_SOURCES);
39
+ var declinedAgentForSetupChoice = (choice) => normalizeAgentId(choice, DISCONNECT_AGENT_IDS);
40
40
 
41
41
  export {
42
42
  declinedAgentsFile,
@@ -4,7 +4,7 @@ import {
4
4
  forkFinishWithUpgradeLock,
5
5
  installWithUpgradeLock,
6
6
  releaseAutoUpdateLock
7
- } from "./chunk-P2EJN7UB.js";
7
+ } from "./chunk-Y25RH4VF.js";
8
8
  import {
9
9
  describeAutoUpdateCheck,
10
10
  globalInstallLocation,
@@ -14,7 +14,7 @@ import {
14
14
  readAutoUpdateState,
15
15
  updateAutoUpdateState,
16
16
  upgradeEntryFor
17
- } from "./chunk-WCELLK4P.js";
17
+ } from "./chunk-MPDJJNGA.js";
18
18
  import {
19
19
  EXIT
20
20
  } from "./chunk-KZERVKTD.js";
@@ -27,10 +27,10 @@ import {
27
27
  npmErrorMessage,
28
28
  readGlobalCliInstallAt,
29
29
  readGlobalPrefix
30
- } from "./chunk-4FWWHCYM.js";
30
+ } from "./chunk-WP57USIT.js";
31
31
  import {
32
32
  NPX_LATEST_COMMAND
33
- } from "./chunk-M54ATCOZ.js";
33
+ } from "./chunk-4ATFPZ6X.js";
34
34
  import {
35
35
  commandsPackage,
36
36
  globalUpgradeEntry,
@@ -39,7 +39,7 @@ import {
39
39
  isSameMajorVersion,
40
40
  ownPackageRoot,
41
41
  packageVersionAt
42
- } from "./chunk-VOP5U2VX.js";
42
+ } from "./chunk-TVDI7SX2.js";
43
43
 
44
44
  // src/global-upgrade.ts
45
45
  import { existsSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-A6J5Z2HO.js";
3
+ } from "./chunk-6NL3LYUM.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var denyReasonFrom = (value, note) => {
@@ -10,10 +10,10 @@ import {
10
10
  resolvePackageVersionFromBinary,
11
11
  resolvePathBinary,
12
12
  resolvePathBinaryAsync
13
- } from "./chunk-4FWWHCYM.js";
13
+ } from "./chunk-WP57USIT.js";
14
14
  import {
15
15
  MANAGED_PROVIDERS
16
- } from "./chunk-VOP5U2VX.js";
16
+ } from "./chunk-TVDI7SX2.js";
17
17
 
18
18
  // src/setup/codex-install.ts
19
19
  var NATIVE_BINARY_MIN_BYTES = 20 * 1024 * 1024;
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-3EGEA4KH.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-FJCOOFT7.js";
12
+ } from "./chunk-7JM6TCMA.js";
13
13
 
14
14
  // src/cli/login-ui.ts
15
15
  import { hostname } from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PRETOOLUSE_GATED_TOOLS
3
- } from "./chunk-VOP5U2VX.js";
3
+ } from "./chunk-TVDI7SX2.js";
4
4
 
5
5
  // src/claude-tools.ts
6
6
  var POSTTOOLUSE_MIRROR_ONLY_TOOLS = ["TodoWrite", "Task", "WebFetch", "WebSearch"];
@@ -5,18 +5,18 @@ import {
5
5
  import {
6
6
  SubscriptionRequiredError,
7
7
  callMcpTool
8
- } from "./chunk-KBN3UP2R.js";
8
+ } from "./chunk-LYDO2SS6.js";
9
9
  import {
10
10
  installNetworkDefaults,
11
11
  isNetworkFailure
12
- } from "./chunk-EJVYEOKC.js";
12
+ } from "./chunk-LUYAXSUS.js";
13
13
  import {
14
14
  clientReportClaims
15
- } from "./chunk-4FWWHCYM.js";
15
+ } from "./chunk-WP57USIT.js";
16
16
  import {
17
17
  getApiKey,
18
18
  getBaseUrl
19
- } from "./chunk-FJCOOFT7.js";
19
+ } from "./chunk-7JM6TCMA.js";
20
20
  import {
21
21
  ASK_AGENT_NAME_MAX,
22
22
  ASK_QUESTION_MAX,
@@ -24,7 +24,7 @@ import {
24
24
  DECISION_LINE_MAX,
25
25
  degradedLine,
26
26
  truncateLine
27
- } from "./chunk-VOP5U2VX.js";
27
+ } from "./chunk-TVDI7SX2.js";
28
28
 
29
29
  // src/client-report-claim.ts
30
30
  import { createHash } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-VOP5U2VX.js";
3
+ } from "./chunk-TVDI7SX2.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -6,38 +6,38 @@ import {
6
6
  } from "./chunk-SGZJ5LYH.js";
7
7
  import {
8
8
  ensureDaemonRunning
9
- } from "./chunk-PTGUJZSD.js";
9
+ } from "./chunk-43IDNI4X.js";
10
10
  import {
11
11
  buildTranscriptRecords,
12
12
  decodePublicKey,
13
13
  generateSessionKey,
14
14
  wrapSessionKey
15
- } from "./chunk-2GG77ADC.js";
15
+ } from "./chunk-RI5E5JQS.js";
16
16
  import {
17
17
  fetchTranscriptRecipients,
18
18
  uploadTranscriptRecords
19
- } from "./chunk-N7HXP4PZ.js";
19
+ } from "./chunk-3EOXZYUE.js";
20
20
  import {
21
21
  transcriptEnvironmentPreference,
22
22
  transcriptsEnabled
23
- } from "./chunk-BZI7EBTB.js";
23
+ } from "./chunk-G54VGPRX.js";
24
24
  import {
25
25
  hookOwnerOf
26
- } from "./chunk-7RWQZQV2.js";
26
+ } from "./chunk-226PID65.js";
27
27
  import {
28
28
  readTranscriptPreference
29
- } from "./chunk-Z4AOR6RZ.js";
29
+ } from "./chunk-S2LDTUHS.js";
30
30
  import {
31
31
  codexHome,
32
32
  pusharyDir
33
- } from "./chunk-4FWWHCYM.js";
33
+ } from "./chunk-WP57USIT.js";
34
34
  import {
35
35
  writeJsonAtomic
36
36
  } from "./chunk-T7E75EKA.js";
37
37
  import {
38
38
  getApiKey,
39
39
  getBaseUrl
40
- } from "./chunk-FJCOOFT7.js";
40
+ } from "./chunk-7JM6TCMA.js";
41
41
 
42
42
  // src/transcript-registration.ts
43
43
  import { createHash } from "crypto";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  readExistingMachineId
3
- } from "./chunk-2NAQRPZQ.js";
3
+ } from "./chunk-43ORAXAL.js";
4
4
  import {
5
5
  NetworkError
6
6
  } from "./chunk-7QLSKOSU.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-FJCOOFT7.js";
9
+ } from "./chunk-7JM6TCMA.js";
10
10
  import {
11
11
  clientContextHeaders,
12
12
  getPackageVersion
13
- } from "./chunk-VOP5U2VX.js";
13
+ } from "./chunk-TVDI7SX2.js";
14
14
 
15
15
  // src/cli/net.ts
16
16
  import { createRequire } from "module";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  keyCheckFromResponse
3
- } from "./chunk-I4I4UH62.js";
3
+ } from "./chunk-U6QEHPEF.js";
4
4
  import {
5
5
  installNetworkDefaults
6
- } from "./chunk-EJVYEOKC.js";
6
+ } from "./chunk-LUYAXSUS.js";
7
7
  import {
8
8
  getBaseUrl
9
- } from "./chunk-FJCOOFT7.js";
9
+ } from "./chunk-7JM6TCMA.js";
10
10
 
11
11
  // src/retry.ts
12
12
  var isRetryable = (err) => {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-POFBE6ZY.js";
4
4
  import {
5
5
  autoUpdateState
6
- } from "./chunk-4FWWHCYM.js";
6
+ } from "./chunk-WP57USIT.js";
7
7
  import {
8
8
  readJsonSafe,
9
9
  writeJsonAtomic
@@ -14,7 +14,7 @@ import {
14
14
  cliPackagePathSegments,
15
15
  globalUpgradeEntry,
16
16
  ownPackageRoot
17
- } from "./chunk-VOP5U2VX.js";
17
+ } from "./chunk-TVDI7SX2.js";
18
18
 
19
19
  // src/auto-update.ts
20
20
  import { spawn } from "child_process";
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-KZERVKTD.js";
4
4
  import {
5
5
  renderCommandHelp
6
- } from "./chunk-M54ATCOZ.js";
6
+ } from "./chunk-4ATFPZ6X.js";
7
7
  import {
8
8
  getPackageVersion
9
- } from "./chunk-VOP5U2VX.js";
9
+ } from "./chunk-TVDI7SX2.js";
10
10
 
11
11
  // src/cli/usage.ts
12
12
  var exitOnHelpFlag = (command) => {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-KIVFWGG6.js";
3
+ } from "./chunk-6QPQG3Q5.js";
4
4
  import {
5
5
  codexHomeFrom,
6
6
  resolvePathBinary
7
- } from "./chunk-4FWWHCYM.js";
7
+ } from "./chunk-WP57USIT.js";
8
8
  import {
9
9
  HOOK_COMPATIBLE_PROFILES
10
- } from "./chunk-VOP5U2VX.js";
10
+ } from "./chunk-TVDI7SX2.js";
11
11
 
12
12
  // src/hermes-config.ts
13
13
  import { execFileSync } from "child_process";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  configFilePath
3
- } from "./chunk-FJCOOFT7.js";
3
+ } from "./chunk-7JM6TCMA.js";
4
4
  import {
5
5
  normalizeInstallSource
6
- } from "./chunk-VOP5U2VX.js";
6
+ } from "./chunk-TVDI7SX2.js";
7
7
 
8
8
  // src/install-source.ts
9
9
  import { readFileSync } from "fs";
@@ -0,0 +1,111 @@
1
+ import {
2
+ compatibleConfigFile,
3
+ hasCompatibleHooks
4
+ } from "./chunk-3VSMTCXV.js";
5
+ import {
6
+ pusharyHookExecutable
7
+ } from "./chunk-226PID65.js";
8
+ import {
9
+ isProtectedByScope,
10
+ registerHookEntry
11
+ } from "./chunk-WP57USIT.js";
12
+
13
+ // src/cursor-config.ts
14
+ var hookCommandOf = (entry) => {
15
+ const command = entry && typeof entry === "object" && !Array.isArray(entry) ? entry.command : void 0;
16
+ return typeof command === "string" ? command : "";
17
+ };
18
+ var isPusharyCursorEntry = (entry) => pusharyHookExecutable(hookCommandOf(entry)) !== null;
19
+ var registerCursorGate = (existing, entry) => registerHookEntry(existing, isPusharyCursorEntry, entry);
20
+ var withoutPusharyCursorHooks = (hooks, scope) => {
21
+ let removed = 0;
22
+ const kept = {};
23
+ for (const [event, entries] of Object.entries(hooks)) {
24
+ if (!Array.isArray(entries)) {
25
+ kept[event] = entries;
26
+ continue;
27
+ }
28
+ const others = entries.filter((entry) => !isPusharyCursorEntry(entry) || isProtectedByScope(hookCommandOf(entry), scope));
29
+ removed += entries.length - others.length;
30
+ if (others.length > 0 || entries.length === 0) kept[event] = others;
31
+ }
32
+ return { hooks: kept, removed };
33
+ };
34
+ var CURSOR_PLUGIN_NAME = "pushary";
35
+ var CURSOR_PLUGIN_STAGING_PREFIX = ".pushary-staging-";
36
+ var CURSOR_PLUGIN_BACKUP_INFIX = ".pushary-backup-";
37
+ var isCursorPluginLeftover = (name) => name.startsWith(`${CURSOR_PLUGIN_NAME}${CURSOR_PLUGIN_BACKUP_INFIX}`) || name.startsWith(CURSOR_PLUGIN_STAGING_PREFIX);
38
+ var isPusharyCursorPluginManifest = (contents) => {
39
+ try {
40
+ const manifest = JSON.parse(contents);
41
+ return typeof manifest === "object" && manifest !== null && !Array.isArray(manifest) && manifest.name === CURSOR_PLUGIN_NAME;
42
+ } catch {
43
+ return false;
44
+ }
45
+ };
46
+
47
+ // src/sole-gate.ts
48
+ import { homedir } from "os";
49
+ import { join } from "path";
50
+ var soleGateFile = (gate, home = homedir()) => join(home, ...gate.file);
51
+ var soleGateReceiptFile = (gate, home = homedir()) => join(home, ...gate.receipt);
52
+ var soleGateReceipt = (gate) => ({ key: gate.key, value: gate.value });
53
+ var isJsonRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
54
+ var isSoleGateReceipt = (value, gate) => isJsonRecord(value) && value.key === gate.key && value.value === gate.value;
55
+ var parseJsonRecord = (raw) => {
56
+ if (raw === null) return { kind: "missing" };
57
+ try {
58
+ const value = JSON.parse(raw);
59
+ return isJsonRecord(value) ? { kind: "record", value } : { kind: "unreadable" };
60
+ } catch {
61
+ return { kind: "unreadable" };
62
+ }
63
+ };
64
+ var claimSoleGate = (settings, gate) => {
65
+ const current = settings[gate.key];
66
+ if (current === void 0) {
67
+ settings[gate.key] = gate.value;
68
+ return { kind: "claimed" };
69
+ }
70
+ return current === gate.value ? { kind: "already_sole_gate" } : { kind: "agent_prompt_chosen", current: String(current) };
71
+ };
72
+ var releaseSoleGateSetting = (settings, gate) => {
73
+ if (settings[gate.key] !== gate.value) return false;
74
+ delete settings[gate.key];
75
+ return true;
76
+ };
77
+ var stillGatedByPushary = (profile, files, home) => {
78
+ const hooks = parseJsonRecord(files.read(compatibleConfigFile(profile, home)));
79
+ if (hooks.kind === "missing") return false;
80
+ return hooks.kind === "unreadable" || hasCompatibleHooks(hooks.value, profile);
81
+ };
82
+ var releaseSoleGate = (profile, files, home) => {
83
+ const gate = profile.soleGate;
84
+ if (!gate) return null;
85
+ if (stillGatedByPushary(profile, files, home)) return { kind: "still_gated" };
86
+ const receiptPath = soleGateReceiptFile(gate, home);
87
+ const receipt = parseJsonRecord(files.read(receiptPath));
88
+ if (receipt.kind !== "record" || !isSoleGateReceipt(receipt.value, gate)) return { kind: "not_set_by_pushary" };
89
+ const path = soleGateFile(gate, home);
90
+ const settings = parseJsonRecord(files.read(path));
91
+ if (settings.kind === "unreadable") return { kind: "unreadable", path };
92
+ const restored = settings.kind === "record" && releaseSoleGateSetting(settings.value, gate);
93
+ if (restored) files.write(path, `${JSON.stringify(settings.value, null, 2)}
94
+ `);
95
+ files.remove(receiptPath);
96
+ return restored ? { kind: "restored", path } : { kind: "changed_since", path };
97
+ };
98
+
99
+ export {
100
+ registerCursorGate,
101
+ withoutPusharyCursorHooks,
102
+ CURSOR_PLUGIN_STAGING_PREFIX,
103
+ CURSOR_PLUGIN_BACKUP_INFIX,
104
+ isCursorPluginLeftover,
105
+ isPusharyCursorPluginManifest,
106
+ soleGateFile,
107
+ soleGateReceiptFile,
108
+ soleGateReceipt,
109
+ claimSoleGate,
110
+ releaseSoleGate
111
+ };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-GA4J6YFN.js";
3
+ } from "./chunk-RJAPOB34.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-M54ATCOZ.js";
6
+ } from "./chunk-4ATFPZ6X.js";
7
7
 
8
8
  // src/setup/codex-trust.ts
9
9
  var CODEX_TRUST_TELEMETRY = {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  MCP_BRIDGE_BINARY
3
- } from "./chunk-BDRXDO25.js";
3
+ } from "./chunk-WL4PVINO.js";
4
4
  import {
5
5
  KEY_FILE_MODE
6
- } from "./chunk-Z4AOR6RZ.js";
6
+ } from "./chunk-S2LDTUHS.js";
7
7
  import {
8
8
  NpmMissingError
9
- } from "./chunk-4FWWHCYM.js";
9
+ } from "./chunk-WP57USIT.js";
10
10
  import {
11
11
  readJsonSafe,
12
12
  writeFileAtomic,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-T7E75EKA.js";
15
15
  import {
16
16
  NPX_LATEST_COMMAND
17
- } from "./chunk-M54ATCOZ.js";
17
+ } from "./chunk-4ATFPZ6X.js";
18
18
 
19
19
  // src/instruction-file.ts
20
20
  import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  redactSecretsFromContent
3
- } from "./chunk-VOP5U2VX.js";
3
+ } from "./chunk-TVDI7SX2.js";
4
4
 
5
5
  // src/crypto.ts
6
6
  import nacl from "tweetnacl";
@@ -8,10 +8,10 @@ import {
8
8
  codexHooksJsonIn,
9
9
  isPusharyCodexCommand,
10
10
  resolvePathBinary
11
- } from "./chunk-4FWWHCYM.js";
11
+ } from "./chunk-WP57USIT.js";
12
12
  import {
13
13
  getPackageVersion
14
- } from "./chunk-VOP5U2VX.js";
14
+ } from "./chunk-TVDI7SX2.js";
15
15
 
16
16
  // src/codex-app-server.ts
17
17
  import { existsSync, realpathSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_HOLD_BUDGET_ENV,
3
3
  hookHoldBudgetProof
4
- } from "./chunk-VOP5U2VX.js";
4
+ } from "./chunk-TVDI7SX2.js";
5
5
 
6
6
  // src/hold-budget.ts
7
7
  var takeHookHoldBudget = (args = process.argv.slice(2), env = process.env) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveInstallSourceFor
3
- } from "./chunk-CBDJ2X5P.js";
3
+ } from "./chunk-NPRFA7YM.js";
4
4
  import {
5
5
  backupFile,
6
6
  readJsonSafe,
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-T7E75EKA.js";
10
10
  import {
11
11
  configFilePath
12
- } from "./chunk-FJCOOFT7.js";
12
+ } from "./chunk-7JM6TCMA.js";
13
13
 
14
14
  // src/shell-alias.ts
15
15
  import { homedir } from "os";