pushary 1.9.71 → 1.9.73

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 (127) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{api-HEIRLMTZ.js → api-JVWXPKEW.js} +10 -10
  3. package/dist/bin/pushary-bell-hook.js +25 -25
  4. package/dist/bin/pushary-bell.js +10 -10
  5. package/dist/bin/pushary-claude.js +202 -67
  6. package/dist/bin/pushary-clean.js +33 -33
  7. package/dist/bin/pushary-codex-bridge.js +23 -21
  8. package/dist/bin/pushary-codex-hook.js +30 -30
  9. package/dist/bin/pushary-codex-session.js +8 -8
  10. package/dist/bin/pushary-codex.js +13 -13
  11. package/dist/bin/pushary-connect.js +26 -26
  12. package/dist/bin/pushary-cowork.js +5 -5
  13. package/dist/bin/pushary-daemon.js +38 -38
  14. package/dist/bin/pushary-disconnect.js +25 -25
  15. package/dist/bin/pushary-doctor.js +41 -41
  16. package/dist/bin/pushary-elicitation-hook.js +25 -25
  17. package/dist/bin/pushary-gemini-bridge.js +45 -48
  18. package/dist/bin/pushary-gemini-hook.js +27 -27
  19. package/dist/bin/pushary-hook.js +29 -29
  20. package/dist/bin/pushary-login.js +20 -20
  21. package/dist/bin/pushary-logout.js +24 -24
  22. package/dist/bin/pushary-mcp.js +11 -11
  23. package/dist/bin/pushary-mode.js +15 -15
  24. package/dist/bin/pushary-notification-hook.js +24 -24
  25. package/dist/bin/pushary-opencode-hook.js +26 -26
  26. package/dist/bin/pushary-permission-denied-hook.js +29 -29
  27. package/dist/bin/pushary-permission-hook.js +29 -29
  28. package/dist/bin/pushary-post-hook.js +24 -24
  29. package/dist/bin/pushary-prompt-hook.js +24 -24
  30. package/dist/bin/pushary-session-end-hook.js +26 -26
  31. package/dist/bin/pushary-session-start-hook.js +34 -34
  32. package/dist/bin/pushary-setup.js +47 -46
  33. package/dist/bin/pushary-stats.js +5 -5
  34. package/dist/bin/pushary-status.js +31 -31
  35. package/dist/bin/pushary-stop-hook.js +24 -24
  36. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  37. package/dist/bin/pushary-suggestions.js +15 -15
  38. package/dist/bin/pushary-transcript-register.js +16 -16
  39. package/dist/bin/pushary-transcripts.js +20 -19
  40. package/dist/bin/pushary-upgrade.js +39 -39
  41. package/dist/bin/pushary-wait.js +15 -15
  42. package/dist/bin/pushary.js +7 -7
  43. package/dist/{chunk-EVJRITSI.js → chunk-2HFC4W6J.js} +1 -1
  44. package/dist/{chunk-4QPF4BGP.js → chunk-2JFEMKDG.js} +6 -6
  45. package/dist/{chunk-KGZH5RTB.js → chunk-2NG3ANMT.js} +6 -6
  46. package/dist/{chunk-JMACQEPU.js → chunk-2QB7HJVJ.js} +2 -2
  47. package/dist/{chunk-XJMUEOXT.js → chunk-3JJI5O5N.js} +1 -1
  48. package/dist/{chunk-BZ7XGS5L.js → chunk-3QBKMSOZ.js} +1 -1
  49. package/dist/{chunk-AN26S5DC.js → chunk-3RAWW5DH.js} +6 -6
  50. package/dist/{chunk-J7BLYQ7Z.js → chunk-4LAD5A2Q.js} +4 -4
  51. package/dist/{chunk-VSQDVH43.js → chunk-4UIR25GA.js} +1 -1
  52. package/dist/{chunk-AUOVB62W.js → chunk-56GK65Z6.js} +3 -3
  53. package/dist/{chunk-AERRQEWZ.js → chunk-7FROPPIH.js} +2 -2
  54. package/dist/{chunk-GIE7PLZD.js → chunk-7M4AA7QF.js} +4 -4
  55. package/dist/{chunk-SWQTCKLM.js → chunk-7RX5TOU3.js} +6 -6
  56. package/dist/{chunk-SMIU5URV.js → chunk-7S46LCKD.js} +2 -2
  57. package/dist/{chunk-IYMYGKFB.js → chunk-AC5TVOAH.js} +10 -11
  58. package/dist/{chunk-5NQ3SMVP.js → chunk-AJWGZJFS.js} +122 -35
  59. package/dist/{chunk-JGEPODEP.js → chunk-AVHL2ZTS.js} +85 -3
  60. package/dist/{chunk-3CN2EFKK.js → chunk-AXZ67XVN.js} +1 -1
  61. package/dist/{chunk-MZ6GL46A.js → chunk-BLX6KRK5.js} +1 -1
  62. package/dist/{chunk-ZBPBX656.js → chunk-CGWUVEOB.js} +3 -3
  63. package/dist/{chunk-YG3NFC5N.js → chunk-CMYFV3VC.js} +5 -5
  64. package/dist/{chunk-C3YAMEO2.js → chunk-DT6VCMXS.js} +2 -2
  65. package/dist/{chunk-7OYWCOVC.js → chunk-EITOMPFB.js} +4 -4
  66. package/dist/{chunk-QWCOMSDH.js → chunk-EUEGCEA7.js} +3 -3
  67. package/dist/{chunk-5WHSFMV2.js → chunk-EUHTC7K5.js} +1 -1
  68. package/dist/{chunk-HR6M44CX.js → chunk-F3WI32HG.js} +7 -7
  69. package/dist/{chunk-6W2ASRZO.js → chunk-FAKEKFCI.js} +3 -3
  70. package/dist/{chunk-FTOKESSK.js → chunk-FB262EOM.js} +1 -1
  71. package/dist/{chunk-4XFFGFHN.js → chunk-FK3JSDH5.js} +13 -13
  72. package/dist/{chunk-3FY5ZPIZ.js → chunk-GBR6E7AY.js} +1 -1
  73. package/dist/{chunk-NHC5YUH6.js → chunk-IN3MPEFA.js} +5 -5
  74. package/dist/{chunk-LA3MMHLO.js → chunk-JC7XUZST.js} +6 -3
  75. package/dist/{chunk-2XD4TTUM.js → chunk-JNTYPMVU.js} +10 -10
  76. package/dist/{chunk-B3KPRSCM.js → chunk-JWBZUTYF.js} +5 -5
  77. package/dist/{chunk-LKAO35SY.js → chunk-JYOR57ZW.js} +3 -3
  78. package/dist/{chunk-MGF7D2ZL.js → chunk-KDQLKND5.js} +36 -35
  79. package/dist/{chunk-DOMDCMGC.js → chunk-KSLBS3II.js} +5 -5
  80. package/dist/chunk-L2FQBHIR.js +74 -0
  81. package/dist/{chunk-JEZGDP55.js → chunk-N4VRSFRZ.js} +5 -5
  82. package/dist/chunk-N5P2FLOJ.js +82 -0
  83. package/dist/{chunk-D536PHXF.js → chunk-NGNBX3YH.js} +4 -4
  84. package/dist/{chunk-EZHM6I2V.js → chunk-NJSW2REO.js} +4 -4
  85. package/dist/{chunk-XSUWXBHF.js → chunk-O4EAMVSC.js} +3 -3
  86. package/dist/{chunk-YRWGCYHH.js → chunk-OJ3ZD5VX.js} +1 -1
  87. package/dist/{chunk-25W6AD3W.js → chunk-PGJMSREY.js} +6 -6
  88. package/dist/{chunk-OJFOIKRM.js → chunk-PM2MHBMF.js} +3 -3
  89. package/dist/{chunk-ITKAMUHG.js → chunk-PNXNWZ5P.js} +3 -3
  90. package/dist/{chunk-AZ56FPRG.js → chunk-PPKIL4EL.js} +1 -1
  91. package/dist/{chunk-WOZLV3LN.js → chunk-QAWWTRDD.js} +4 -4
  92. package/dist/{chunk-NPO3ZTR4.js → chunk-QMPM3CAN.js} +1 -1
  93. package/dist/{chunk-X2KK42JA.js → chunk-R5PZPROX.js} +1 -1
  94. package/dist/{chunk-T7FPZN5V.js → chunk-RZVWEDIS.js} +3 -3
  95. package/dist/{chunk-TATE22GH.js → chunk-S63VIM7E.js} +1 -1
  96. package/dist/{chunk-ZZ7VB6QC.js → chunk-S7VMHSJW.js} +3 -3
  97. package/dist/{chunk-X6CSZSSQ.js → chunk-SQ5XCMPB.js} +4 -4
  98. package/dist/{chunk-BJRLJJS2.js → chunk-TFDMJHAB.js} +1 -1
  99. package/dist/{chunk-VMQEB56V.js → chunk-TQ2L3ECX.js} +2 -2
  100. package/dist/{chunk-IPSO7DUB.js → chunk-TTGBS5JB.js} +3 -3
  101. package/dist/{chunk-YX6VQGLG.js → chunk-U3EBM73X.js} +2 -2
  102. package/dist/{chunk-LRS4TJU2.js → chunk-UIF7HWHX.js} +4 -4
  103. package/dist/{chunk-LWAYXE7G.js → chunk-UUCRWEEU.js} +2 -2
  104. package/dist/{chunk-LMP2FAS6.js → chunk-VBSPP4QY.js} +3 -3
  105. package/dist/{chunk-XZTFYFC7.js → chunk-VJUDBZGC.js} +2 -2
  106. package/dist/{chunk-ONZ3UGNY.js → chunk-W47XZJSH.js} +2 -2
  107. package/dist/{chunk-G3J5JKEJ.js → chunk-WJJVCDEU.js} +6 -6
  108. package/dist/{chunk-FA6INGK7.js → chunk-WXV7J3DG.js} +3 -3
  109. package/dist/{chunk-EBOGB7JR.js → chunk-XKQ7CQGG.js} +1 -1
  110. package/dist/{chunk-KEPESIIR.js → chunk-XMSDA5WA.js} +1 -70
  111. package/dist/{chunk-LKKIFFUC.js → chunk-YZ6DMGZZ.js} +1 -1
  112. package/dist/{chunk-YMBJU4CT.js → chunk-Z7AIYWZ2.js} +2 -2
  113. package/dist/{chunk-QSZQCKPB.js → chunk-ZBZBYUNZ.js} +5 -5
  114. package/dist/{codex-app-cards-switch-A77HUVKT.js → codex-app-cards-switch-M7VH7AZH.js} +11 -11
  115. package/dist/{codex-desktop-launch-FSHKRCRL.js → codex-desktop-launch-6DASTBBA.js} +1 -1
  116. package/dist/{codex-session-launch-VAXYRXK6.js → codex-session-launch-2XSMFA4K.js} +20 -18
  117. package/dist/{config-SMJ2QWQF.js → config-7QQOIFTW.js} +3 -3
  118. package/dist/{global-upgrade-63X4UFFP.js → global-upgrade-XAKX26AN.js} +10 -10
  119. package/dist/{identity-3L2YHAZP.js → identity-7AS5MBNM.js} +4 -4
  120. package/dist/{live-capabilities-QBQX7RFM.js → live-capabilities-DV4F7MIB.js} +5 -5
  121. package/dist/{paths-5VPGINSP.js → paths-GSMXYKT5.js} +3 -3
  122. package/dist/{reapply-MSIZJULX.js → reapply-MR7UWBXR.js} +27 -27
  123. package/dist/src/index.d.ts +2 -6
  124. package/dist/src/index.js +28 -28
  125. package/dist/{upgrade-lock-KKW6XZ7B.js → upgrade-lock-6OTHLCBZ.js} +4 -4
  126. package/dist/{usage-ICF3NG4F.js → usage-H53PO3VQ.js} +3 -3
  127. package/package.json +3 -1
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  registerTranscript
3
- } from "./chunk-IYMYGKFB.js";
3
+ } from "./chunk-AC5TVOAH.js";
4
4
  import {
5
5
  namedEvent
6
- } from "./chunk-LRS4TJU2.js";
6
+ } from "./chunk-UIF7HWHX.js";
7
7
  import {
8
8
  isBridgeLocator,
9
9
  liveBridgeProbe,
10
10
  pusharyHookExecutable,
11
11
  resolveBridgeStub
12
- } from "./chunk-WOZLV3LN.js";
12
+ } from "./chunk-QAWWTRDD.js";
13
13
  import {
14
14
  writeDegraded
15
- } from "./chunk-YG3NFC5N.js";
15
+ } from "./chunk-CMYFV3VC.js";
16
16
  import {
17
17
  cursorUserHooks
18
- } from "./chunk-SMIU5URV.js";
18
+ } from "./chunk-7S46LCKD.js";
19
19
  import {
20
20
  atLeast,
21
21
  parseVersion
22
- } from "./chunk-T7FPZN5V.js";
22
+ } from "./chunk-RZVWEDIS.js";
23
23
  import {
24
24
  CURSOR_GATE_COVERAGE,
25
25
  CURSOR_GATE_SCRIPT,
@@ -33,7 +33,7 @@ import {
33
33
  isGrokSessionEndStop,
34
34
  isRecord,
35
35
  toolsCoveredByGateEntry
36
- } from "./chunk-JGEPODEP.js";
36
+ } from "./chunk-AVHL2ZTS.js";
37
37
 
38
38
  // src/tool-hook-input.ts
39
39
  var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode", "cursor_version"];
@@ -5,19 +5,19 @@ import {
5
5
  hermesAppWiringRecord,
6
6
  hermesConfigReceipt,
7
7
  hermesSetupReceipt
8
- } from "./chunk-SMIU5URV.js";
8
+ } from "./chunk-7S46LCKD.js";
9
9
  import {
10
10
  readJsonSafe,
11
11
  resolvePathBinary,
12
12
  writeJsonAtomic
13
- } from "./chunk-T7FPZN5V.js";
13
+ } from "./chunk-RZVWEDIS.js";
14
14
  import {
15
15
  isNewerVersion,
16
16
  isReleaseVersion
17
17
  } from "./chunk-QTOLNRET.js";
18
18
  import {
19
19
  isRecord
20
- } from "./chunk-JGEPODEP.js";
20
+ } from "./chunk-AVHL2ZTS.js";
21
21
 
22
22
  // src/hermes/plugin-payload.ts
23
23
  import { createHash } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeJsonAtomicDurable
3
- } from "./chunk-T7FPZN5V.js";
3
+ } from "./chunk-RZVWEDIS.js";
4
4
 
5
5
  // src/transcript-recipient-pin.ts
6
6
  import { existsSync, mkdirSync, readFileSync, rmSync } from "fs";
@@ -4,24 +4,24 @@ import {
4
4
  outcomeOfFailedAsk,
5
5
  reportMachineDenial,
6
6
  storedWaitDeadline
7
- } from "./chunk-4QPF4BGP.js";
7
+ } from "./chunk-2JFEMKDG.js";
8
8
  import {
9
9
  isGatingMoment,
10
10
  recordKeylessMoment
11
- } from "./chunk-XJMUEOXT.js";
11
+ } from "./chunk-3JJI5O5N.js";
12
12
  import {
13
13
  isAdmitted,
14
14
  readAdmissionRules
15
- } from "./chunk-HR6M44CX.js";
15
+ } from "./chunk-F3WI32HG.js";
16
16
  import {
17
17
  isDeferAnswer,
18
18
  oncePerSession
19
- } from "./chunk-3CN2EFKK.js";
19
+ } from "./chunk-AXZ67XVN.js";
20
20
  import {
21
21
  activeHookSource,
22
22
  activeIdentity,
23
23
  namedSource
24
- } from "./chunk-LRS4TJU2.js";
24
+ } from "./chunk-UIF7HWHX.js";
25
25
  import {
26
26
  DEFAULT_SESSION,
27
27
  UNNAMED_ACTION,
@@ -45,10 +45,10 @@ import {
45
45
  reportEvent,
46
46
  scopePathFor,
47
47
  settleQuestionsForToolUse
48
- } from "./chunk-5NQ3SMVP.js";
48
+ } from "./chunk-AJWGZJFS.js";
49
49
  import {
50
50
  repoKeyFor
51
- } from "./chunk-NPO3ZTR4.js";
51
+ } from "./chunk-QMPM3CAN.js";
52
52
  import {
53
53
  askUser,
54
54
  cancelQuestion,
@@ -65,20 +65,20 @@ import {
65
65
  waitForQuestion,
66
66
  waitsForThePhone,
67
67
  withdrawQuestion
68
- } from "./chunk-YG3NFC5N.js";
68
+ } from "./chunk-CMYFV3VC.js";
69
69
  import {
70
70
  getMachineId
71
- } from "./chunk-LWAYXE7G.js";
71
+ } from "./chunk-UUCRWEEU.js";
72
72
  import {
73
73
  claudeConfigDir
74
- } from "./chunk-SMIU5URV.js";
74
+ } from "./chunk-7S46LCKD.js";
75
75
  import {
76
76
  getApiKey,
77
77
  getBaseUrl
78
- } from "./chunk-X2KK42JA.js";
78
+ } from "./chunk-R5PZPROX.js";
79
79
  import {
80
80
  NPX_LATEST_COMMAND
81
- } from "./chunk-AZ56FPRG.js";
81
+ } from "./chunk-PPKIL4EL.js";
82
82
  import {
83
83
  AGENT_QUESTION_STRATEGY,
84
84
  AGENT_QUESTION_TOOL,
@@ -133,7 +133,7 @@ import {
133
133
  terminalStaysLiveForTheCall,
134
134
  timeoutActionWithoutLocalPrompt,
135
135
  unansweredRefusalReason
136
- } from "./chunk-JGEPODEP.js";
136
+ } from "./chunk-AVHL2ZTS.js";
137
137
 
138
138
  // src/terminal-answer-watch.ts
139
139
  import { closeSync, openSync, readSync, statSync } from "fs";
@@ -7,7 +7,7 @@ import {
7
7
  recordSealerFor,
8
8
  uploadTranscriptRecords,
9
9
  wrapSessionKey
10
- } from "./chunk-LA3MMHLO.js";
10
+ } from "./chunk-JC7XUZST.js";
11
11
 
12
12
  // src/live-session.ts
13
13
  var MAX_TRANSCRIPT_QUEUE = 100;
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-AN26S5DC.js";
3
+ } from "./chunk-3RAWW5DH.js";
4
4
  import {
5
5
  nativeClaudeInstallPath
6
- } from "./chunk-BJRLJJS2.js";
6
+ } from "./chunk-TFDMJHAB.js";
7
7
  import {
8
8
  grokHome
9
- } from "./chunk-LRS4TJU2.js";
9
+ } from "./chunk-UIF7HWHX.js";
10
10
  import {
11
11
  claudeConfigDir,
12
12
  clineDataDirectory,
13
13
  codexHomeFrom
14
- } from "./chunk-SMIU5URV.js";
14
+ } from "./chunk-7S46LCKD.js";
15
15
  import {
16
16
  HOOK_COMPATIBLE_PROFILES
17
- } from "./chunk-JGEPODEP.js";
17
+ } from "./chunk-AVHL2ZTS.js";
18
18
 
19
19
  // src/vscode-config.ts
20
20
  import { homedir } from "os";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getBaseUrl
3
- } from "./chunk-X2KK42JA.js";
3
+ } from "./chunk-R5PZPROX.js";
4
4
  import {
5
5
  compressTranscriptRecord,
6
6
  redactSecretsFromContent
7
- } from "./chunk-JGEPODEP.js";
7
+ } from "./chunk-AVHL2ZTS.js";
8
8
 
9
9
  // src/transcript-api.ts
10
10
  var fetchTranscriptRecipients = async (apiKey, baseUrl = getBaseUrl()) => {
@@ -174,7 +174,10 @@ var INTERNAL_TYPES = /* @__PURE__ */ new Set([
174
174
  "agent-name",
175
175
  "bridge-session",
176
176
  "artifact-autoreact-ledger",
177
- "artifact-comment-monitor"
177
+ "artifact-comment-monitor",
178
+ "api-request",
179
+ "api-request-blob",
180
+ "api-request-shape"
178
181
  ]);
179
182
  var redactDeep = (value) => {
180
183
  if (typeof value === "string") return redactSecretsFromContent(value);
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-XZTFYFC7.js";
3
+ } from "./chunk-VJUDBZGC.js";
4
4
  import {
5
5
  hermesReceiptPaths,
6
6
  hermesSetupPredatesThePluginFolder,
7
7
  installHermesPlugin,
8
8
  refreshHermesPluginFiles,
9
9
  shippedHermesPlugin
10
- } from "./chunk-6W2ASRZO.js";
10
+ } from "./chunk-FAKEKFCI.js";
11
11
  import {
12
12
  fxIgnoresInstructionsFile,
13
13
  fxInstructionsBody,
@@ -16,7 +16,7 @@ import {
16
16
  macAppFxBridge,
17
17
  refreshClineKey,
18
18
  switchFxHttpEntryToBridge
19
- } from "./chunk-DOMDCMGC.js";
19
+ } from "./chunk-KSLBS3II.js";
20
20
  import {
21
21
  OPENCODE_HOOK_BINARY,
22
22
  agentHookOwner,
@@ -28,16 +28,16 @@ import {
28
28
  openCodePluginDir,
29
29
  openCodeWired,
30
30
  withOpenCodeAskRules
31
- } from "./chunk-AN26S5DC.js";
31
+ } from "./chunk-3RAWW5DH.js";
32
32
  import {
33
33
  detectClaudeVersion
34
- } from "./chunk-LKAO35SY.js";
34
+ } from "./chunk-JYOR57ZW.js";
35
35
  import {
36
36
  addCompatibleHooks,
37
37
  compatibleConfigFile,
38
38
  compatibleInstructionsFile,
39
39
  hasCompatibleHooks
40
- } from "./chunk-LRS4TJU2.js";
40
+ } from "./chunk-UIF7HWHX.js";
41
41
  import {
42
42
  GEMINI_HOOK_BINARY,
43
43
  addGeminiHooks,
@@ -49,7 +49,7 @@ import {
49
49
  geminiWired,
50
50
  hasGeminiHooks,
51
51
  planHooks
52
- } from "./chunk-WOZLV3LN.js";
52
+ } from "./chunk-QAWWTRDD.js";
53
53
  import {
54
54
  CLAUDE_HOOK_BINARY,
55
55
  CLAUDE_HOOK_EVENTS,
@@ -94,7 +94,7 @@ import {
94
94
  renderAgentInstructions,
95
95
  supportedClaudeEvents,
96
96
  vscodePluginMcp
97
- } from "./chunk-SMIU5URV.js";
97
+ } from "./chunk-7S46LCKD.js";
98
98
  import {
99
99
  formatVersion,
100
100
  readJsonSafe,
@@ -102,12 +102,12 @@ import {
102
102
  resolveGlobalBinary,
103
103
  writeFileAtomic,
104
104
  writeJsonAtomic
105
- } from "./chunk-T7FPZN5V.js";
105
+ } from "./chunk-RZVWEDIS.js";
106
106
  import {
107
107
  HOOK_COMPATIBLE_PROFILES,
108
108
  isCompatibleAgentType,
109
109
  isRecord
110
- } from "./chunk-JGEPODEP.js";
110
+ } from "./chunk-AVHL2ZTS.js";
111
111
 
112
112
  // src/reapply.ts
113
113
  import { dirname, join } from "path";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  macAppBridgeAvailable
3
- } from "./chunk-AN26S5DC.js";
3
+ } from "./chunk-3RAWW5DH.js";
4
4
  import {
5
5
  keyPrefix
6
- } from "./chunk-D536PHXF.js";
6
+ } from "./chunk-NGNBX3YH.js";
7
7
  import {
8
8
  bridgeAgentKey
9
- } from "./chunk-SMIU5URV.js";
9
+ } from "./chunk-7S46LCKD.js";
10
10
  import {
11
11
  readJsonSafe
12
- } from "./chunk-T7FPZN5V.js";
12
+ } from "./chunk-RZVWEDIS.js";
13
13
  import {
14
14
  isRecord,
15
15
  isValidApiKey
16
- } from "./chunk-JGEPODEP.js";
16
+ } from "./chunk-AVHL2ZTS.js";
17
17
 
18
18
  // src/shared-mcp-key.ts
19
19
  var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  findNativeClaudeInstall
3
- } from "./chunk-BJRLJJS2.js";
3
+ } from "./chunk-TFDMJHAB.js";
4
4
  import {
5
5
  parseVersion
6
- } from "./chunk-T7FPZN5V.js";
6
+ } from "./chunk-RZVWEDIS.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-JGEPODEP.js";
9
+ } from "./chunk-AVHL2ZTS.js";
10
10
 
11
11
  // src/setup/agent-probe.ts
12
12
  import { execSync } from "child_process";
@@ -4,30 +4,34 @@ import {
4
4
  postLiveSession,
5
5
  postLiveSessionUntilAccepted,
6
6
  startLiveSessionHeartbeat
7
- } from "./chunk-3FY5ZPIZ.js";
7
+ } from "./chunk-GBR6E7AY.js";
8
+ import {
9
+ CommandReceipts,
10
+ controllerCommandSchema
11
+ } from "./chunk-N5P2FLOJ.js";
8
12
  import {
9
13
  SESSION_IDLE_TIMEOUT_MS,
10
14
  describeIdleWindow,
11
15
  idleDeadlinePassed,
12
16
  startProcessOwnership
13
- } from "./chunk-ITKAMUHG.js";
17
+ } from "./chunk-PNXNWZ5P.js";
14
18
  import {
15
19
  spawnClaude
16
20
  } from "./chunk-XHKBHWLX.js";
17
21
  import {
18
22
  repoKeyFor
19
- } from "./chunk-NPO3ZTR4.js";
23
+ } from "./chunk-QMPM3CAN.js";
20
24
  import {
21
25
  isAskUserResponse,
22
26
  isDecisionStopped,
23
27
  isWaitForAnswerResponse,
24
28
  withdrawQuestion,
25
29
  writeDegraded
26
- } from "./chunk-YG3NFC5N.js";
30
+ } from "./chunk-CMYFV3VC.js";
27
31
  import {
28
32
  callMcpTool,
29
33
  isRetryable
30
- } from "./chunk-GIE7PLZD.js";
34
+ } from "./chunk-7M4AA7QF.js";
31
35
  import {
32
36
  AGENT_QUESTION_DESCRIPTION_MAX,
33
37
  AGENT_QUESTION_HEADER_MAX,
@@ -48,7 +52,7 @@ import {
48
52
  parseCodexQuestions,
49
53
  planElicitationAsk,
50
54
  readElicitationFields
51
- } from "./chunk-JGEPODEP.js";
55
+ } from "./chunk-AVHL2ZTS.js";
52
56
 
53
57
  // src/codex-question-owner.ts
54
58
  import { createHash } from "crypto";
@@ -777,49 +781,42 @@ var runCodexBridge = async (options) => {
777
781
  if (startedTurnId && startedTurnId !== lastCompletedTurnId) activeTurnId = startedTurnId;
778
782
  };
779
783
  if (options.prompt) await startTurn(options.prompt, `spawn-${options.spawnId}`);
780
- let pendingAck = null;
784
+ const receipts = new CommandReceipts({
785
+ submit: async (command) => {
786
+ await startTurn(command.text, command.id);
787
+ return "delivered";
788
+ },
789
+ log: (message) => process.stderr.write(`${message}
790
+ `)
791
+ });
781
792
  while (!options.signal.aborted && !rpc.isClosed) {
782
793
  if (idleDeadlineReached()) {
783
794
  idledOut = true;
784
795
  break;
785
796
  }
786
797
  try {
787
- if (pendingAck) {
788
- const acknowledged = await postLiveSession(options, "/api/agent/command/ack", pendingAck);
789
- if (acknowledged.ok) pendingAck = null;
790
- }
791
- if (pendingAck) {
792
- await liveSessionSleep(options.pollIntervalMs ?? 2e3, options.signal);
793
- continue;
794
- }
798
+ await receipts.flush();
795
799
  const response = await postLiveSession(options, "/api/agent/command/drain", {
796
800
  sessionId: threadId,
797
801
  machineId: options.machineId,
798
- ackMode: true
802
+ ackMode: true,
803
+ receiptVersion: 1
799
804
  });
800
805
  if (response.ok) {
801
- const command = object((await response.json()).command);
802
- const commandId = string(command?.id);
803
- const text = string(command?.text);
804
- if (commandId && text) {
806
+ const body = await response.json();
807
+ const parsed = controllerCommandSchema.safeParse(object(body)?.command);
808
+ if (parsed.success) {
805
809
  idleSince = now();
806
- try {
807
- await startTurn(text, commandId);
808
- pendingAck = {
809
- commandId,
810
+ await receipts.receive(parsed.data, async (state, dispatchId) => {
811
+ const response2 = await postLiveSession(options, "/api/agent/command/ack", {
812
+ commandId: parsed.data.id,
810
813
  sessionId: threadId,
811
814
  machineId: options.machineId,
812
- state: "delivered"
813
- };
814
- } catch {
815
- pendingAck = {
816
- commandId,
817
- sessionId: threadId,
818
- machineId: options.machineId,
819
- state: "failed",
820
- failureCode: "codex_rejected"
821
- };
822
- }
815
+ state,
816
+ dispatchId
817
+ });
818
+ return response2.ok;
819
+ });
823
820
  }
824
821
  }
825
822
  } catch {
@@ -856,6 +853,10 @@ var runCodexBridge = async (options) => {
856
853
  await liveSessionSleep(200 * (attempt + 1), options.signal);
857
854
  }
858
855
  }
856
+ if (options.signal.aborted) {
857
+ await report("session_closed", "Session stopped").catch(() => null);
858
+ return "stopped";
859
+ }
859
860
  await report("error", `Live bridge failed: ${message}`.slice(0, FAILURE_MESSAGE_MAX)).catch(() => null);
860
861
  return "failed";
861
862
  } finally {
@@ -4,13 +4,13 @@ import {
4
4
  configFailureKind,
5
5
  retryAgentCommand,
6
6
  writeSetupConfigFile
7
- } from "./chunk-QWCOMSDH.js";
7
+ } from "./chunk-EUEGCEA7.js";
8
8
  import {
9
9
  MCP_BRIDGE_BINARY
10
- } from "./chunk-ONZ3UGNY.js";
10
+ } from "./chunk-W47XZJSH.js";
11
11
  import {
12
12
  KEY_FILE_MODE
13
- } from "./chunk-D536PHXF.js";
13
+ } from "./chunk-NGNBX3YH.js";
14
14
  import {
15
15
  CLINE_SERVER_NAME_TAKEN,
16
16
  CLINE_SETTINGS_REFUSALS,
@@ -32,13 +32,13 @@ import {
32
32
  withClinePusharyServer,
33
33
  withRefreshedClineKey,
34
34
  withoutClinePusharyServer
35
- } from "./chunk-SMIU5URV.js";
35
+ } from "./chunk-7S46LCKD.js";
36
36
  import {
37
37
  readJsonSafe,
38
38
  resolveGlobalBinary,
39
39
  writeFileAtomic,
40
40
  writeJsonAtomic
41
- } from "./chunk-T7FPZN5V.js";
41
+ } from "./chunk-RZVWEDIS.js";
42
42
 
43
43
  // src/fx-config.ts
44
44
  var FX_SERVER_NAME = "pushary";
@@ -0,0 +1,74 @@
1
+ import {
2
+ external_exports
3
+ } from "./chunk-XMSDA5WA.js";
4
+
5
+ // src/native-transcript-account.ts
6
+ import { createHash } from "crypto";
7
+ import { existsSync, lstatSync, readFileSync } from "fs";
8
+ import { homedir } from "os";
9
+ import { join } from "path";
10
+ var MAXIMUM_OWNER_DOCUMENT_BYTES = 16384;
11
+ var MAXIMUM_READ_POSITIONS_BYTES = 4 * 1024 * 1024;
12
+ var OWNER_ONLY_FILE_MODE = 384;
13
+ var OWNER_ONLY_DIRECTORY_MODE = 448;
14
+ var LOOPBACK_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "[::1]"]);
15
+ var credentialSchema = external_exports.object({
16
+ key: external_exports.string().min(1).max(1024),
17
+ siteID: external_exports.string().min(1),
18
+ machineID: external_exports.string().min(1),
19
+ baseURL: external_exports.string().url(),
20
+ keyScope: external_exports.literal("agent")
21
+ });
22
+ var consentSchema = credentialSchema.pick({ siteID: true, machineID: true, baseURL: true }).extend({ enabled: external_exports.literal(true), grantedAtMs: external_exports.number().int().positive() });
23
+ var readPositionSchema = external_exports.object({
24
+ identity: external_exports.string().nullable(),
25
+ offset: external_exports.number().int().nonnegative(),
26
+ startedBeforeEpoch: external_exports.boolean()
27
+ });
28
+ var readPositionsSchema = external_exports.object({
29
+ epochStartedAtMs: external_exports.number().int().positive(),
30
+ positions: external_exports.record(external_exports.string(), readPositionSchema)
31
+ });
32
+ var ownerDocument = (path, maximumBytes = MAXIMUM_OWNER_DOCUMENT_BYTES) => {
33
+ const info = lstatSync(path);
34
+ if (!info.isFile() || info.nlink !== 1 || info.uid !== process.getuid?.() || (info.mode & 511) !== OWNER_ONLY_FILE_MODE || info.size > maximumBytes) return null;
35
+ return JSON.parse(readFileSync(path, "utf8"));
36
+ };
37
+ var acceptsServer = (baseURL) => {
38
+ const url = new URL(baseURL);
39
+ return url.protocol === "https:" || url.protocol === "http:" && LOOPBACK_HOSTS.has(url.hostname);
40
+ };
41
+ var nativeConsentFile = (home) => join(home, ".pushary", "native-transcript-consent.json");
42
+ var nativeBridgeAccount = (home = homedir()) => {
43
+ try {
44
+ const root = join(home, ".pushary");
45
+ const directory = lstatSync(join(root, "bridge-auth"));
46
+ if (!directory.isDirectory() || directory.uid !== process.getuid?.() || (directory.mode & 511) !== OWNER_ONLY_DIRECTORY_MODE) return null;
47
+ const account = credentialSchema.parse(ownerDocument(join(root, "bridge-auth", "agent-key.json")));
48
+ const machineId = readFileSync(join(root, "machine-id"), "utf8").trim();
49
+ if (machineId !== account.machineID || !acceptsServer(account.baseURL)) return null;
50
+ return account;
51
+ } catch {
52
+ return null;
53
+ }
54
+ };
55
+ var nativeTranscriptGrant = (home = homedir()) => {
56
+ try {
57
+ const account = nativeBridgeAccount(home);
58
+ if (!account) return null;
59
+ const consent = consentSchema.parse(ownerDocument(nativeConsentFile(home)));
60
+ if (account.siteID !== consent.siteID || account.machineID !== consent.machineID || account.baseURL !== consent.baseURL) return null;
61
+ return { account, grantedAtMs: consent.grantedAtMs };
62
+ } catch {
63
+ return null;
64
+ }
65
+ };
66
+ var macAppHistoryDecision = (home = homedir()) => {
67
+ if (nativeTranscriptGrant(home)) return "saves";
68
+ return existsSync(nativeConsentFile(home)) ? "does_not_save" : "none";
69
+ };
70
+
71
+ export {
72
+ nativeBridgeAccount,
73
+ macAppHistoryDecision
74
+ };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  readMacAppAgentKey
3
- } from "./chunk-B3KPRSCM.js";
3
+ } from "./chunk-JWBZUTYF.js";
4
4
  import {
5
5
  API_KEYS_PATH
6
- } from "./chunk-VMQEB56V.js";
6
+ } from "./chunk-TQ2L3ECX.js";
7
7
  import {
8
8
  findExportedKeyLines,
9
9
  isAdoptedMacAppKey,
@@ -13,13 +13,13 @@ import {
13
13
  readConfigFileKey,
14
14
  readKeySource,
15
15
  readMacAppKeyPrefix
16
- } from "./chunk-D536PHXF.js";
16
+ } from "./chunk-NGNBX3YH.js";
17
17
  import {
18
18
  absoluteUrl
19
- } from "./chunk-ZZ7VB6QC.js";
19
+ } from "./chunk-S7VMHSJW.js";
20
20
  import {
21
21
  isValidApiKey
22
- } from "./chunk-JGEPODEP.js";
22
+ } from "./chunk-AVHL2ZTS.js";
23
23
 
24
24
  // src/key-revocation.ts
25
25
  var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";