pushary 1.9.109 → 1.9.110

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 +4 -0
  2. package/dist/{api-YCDTPFT7.js → api-4MS4CPKY.js} +11 -10
  3. package/dist/bin/pushary-audit.js +3 -3
  4. package/dist/bin/pushary-bell-hook.js +27 -26
  5. package/dist/bin/pushary-bell.js +10 -10
  6. package/dist/bin/pushary-claude.js +25 -24
  7. package/dist/bin/pushary-clean.js +34 -33
  8. package/dist/bin/pushary-codex-bridge.js +21 -20
  9. package/dist/bin/pushary-codex-hook.js +32 -31
  10. package/dist/bin/pushary-codex-session.js +8 -8
  11. package/dist/bin/pushary-codex.js +15 -14
  12. package/dist/bin/pushary-connect.js +28 -27
  13. package/dist/bin/pushary-cowork.js +5 -5
  14. package/dist/bin/pushary-daemon.js +41 -40
  15. package/dist/bin/pushary-disconnect.js +27 -26
  16. package/dist/bin/pushary-display-hook.js +17 -16
  17. package/dist/bin/pushary-doctor.js +42 -41
  18. package/dist/bin/pushary-elicitation-hook.js +27 -26
  19. package/dist/bin/pushary-gemini-bridge.js +15 -14
  20. package/dist/bin/pushary-gemini-hook.js +29 -28
  21. package/dist/bin/pushary-hook.js +32 -31
  22. package/dist/bin/pushary-login.js +21 -20
  23. package/dist/bin/pushary-logout.js +26 -25
  24. package/dist/bin/pushary-mcp.js +12 -11
  25. package/dist/bin/pushary-mode.js +15 -15
  26. package/dist/bin/pushary-notification-hook.js +26 -25
  27. package/dist/bin/pushary-opencode-hook.js +28 -27
  28. package/dist/bin/pushary-permission-denied-hook.js +32 -31
  29. package/dist/bin/pushary-permission-hook.js +32 -31
  30. package/dist/bin/pushary-post-hook.js +26 -25
  31. package/dist/bin/pushary-prompt-hook.js +26 -25
  32. package/dist/bin/pushary-session-end-hook.js +26 -25
  33. package/dist/bin/pushary-session-start-hook.js +35 -34
  34. package/dist/bin/pushary-setup.js +46 -45
  35. package/dist/bin/pushary-stats.js +5 -5
  36. package/dist/bin/pushary-status.js +32 -31
  37. package/dist/bin/pushary-stop-hook.js +26 -25
  38. package/dist/bin/pushary-stopfailure-hook.js +26 -25
  39. package/dist/bin/pushary-suggestions.js +15 -15
  40. package/dist/bin/pushary-transcript-register.js +17 -16
  41. package/dist/bin/pushary-transcripts.js +25 -24
  42. package/dist/bin/pushary-upgrade.js +40 -39
  43. package/dist/bin/pushary-wait.js +15 -15
  44. package/dist/bin/pushary.js +7 -7
  45. package/dist/{chunk-3X3FNKAE.js → chunk-2MJL3ZVW.js} +1 -1
  46. package/dist/{chunk-S7LMAMMY.js → chunk-2Q4V4ZP4.js} +4 -4
  47. package/dist/{chunk-FIFSPMQZ.js → chunk-2U54YY4M.js} +3 -3
  48. package/dist/{chunk-U6LVSHBR.js → chunk-3FQTC27T.js} +7 -7
  49. package/dist/{chunk-II6M23WI.js → chunk-3OLVEVGW.js} +6 -6
  50. package/dist/{chunk-GNOSBEUB.js → chunk-3QZSG2L4.js} +1 -1
  51. package/dist/{chunk-GU7AN46G.js → chunk-4LRFQMTQ.js} +10 -10
  52. package/dist/{chunk-7VIJBCMF.js → chunk-5IRJERK2.js} +2 -2
  53. package/dist/{chunk-PEWTRW6S.js → chunk-5RWBSMCI.js} +17 -14
  54. package/dist/{chunk-MMHBNMHK.js → chunk-6ZPGNVXS.js} +3 -3
  55. package/dist/{chunk-UK4Z3X75.js → chunk-ALA2OMOM.js} +1 -1
  56. package/dist/{chunk-DYA7VIL6.js → chunk-AXOY7CKN.js} +14 -14
  57. package/dist/{chunk-3OPHZY7L.js → chunk-AZBKSMYC.js} +1 -1
  58. package/dist/{chunk-UC2NBQS3.js → chunk-BCZSRQ3L.js} +1 -1
  59. package/dist/{chunk-F7BLCVHZ.js → chunk-CTBH3E3Z.js} +2 -2
  60. package/dist/{chunk-KCKLLGMW.js → chunk-CUOFHW7F.js} +4 -4
  61. package/dist/{chunk-MYDTSPIZ.js → chunk-DLS43QDO.js} +1 -1
  62. package/dist/{chunk-I4THVOUC.js → chunk-DOHQKE4Y.js} +2 -2
  63. package/dist/{chunk-FYK7JV2R.js → chunk-DP62DH2Q.js} +11 -8
  64. package/dist/{chunk-MAWFWQLR.js → chunk-DQKTKMR3.js} +3 -3
  65. package/dist/{chunk-4BDOUP4B.js → chunk-DSA5E7IB.js} +5 -5
  66. package/dist/chunk-DZMKNP3I.js +81 -0
  67. package/dist/{chunk-YB2S73VZ.js → chunk-E4ZZMAWF.js} +1 -1
  68. package/dist/{chunk-S442423U.js → chunk-FBDUY6RN.js} +1 -1
  69. package/dist/{chunk-BDAT6H7J.js → chunk-FE4CSARF.js} +6 -3
  70. package/dist/{chunk-7KBKJ2KH.js → chunk-FLH5MJOS.js} +3 -3
  71. package/dist/{chunk-TKJJWIR4.js → chunk-FRY3LB5N.js} +2 -2
  72. package/dist/{chunk-KK5YNO2M.js → chunk-FYSQQW6Q.js} +2 -2
  73. package/dist/{chunk-J5EAU44S.js → chunk-G2TL4OEY.js} +1 -1
  74. package/dist/{chunk-QNUGTQKZ.js → chunk-GOUUFBBP.js} +3 -3
  75. package/dist/{chunk-ULTBTBMV.js → chunk-HENHPRJN.js} +6 -6
  76. package/dist/{chunk-XUKBMRT2.js → chunk-I2LPRMDP.js} +4 -4
  77. package/dist/{chunk-R7D2YAXW.js → chunk-JDIWIRUN.js} +6 -6
  78. package/dist/{chunk-BFXJUZUH.js → chunk-JMQORTFD.js} +2 -2
  79. package/dist/{chunk-M6SP3FZF.js → chunk-JPR4S254.js} +3 -3
  80. package/dist/{chunk-WU3TP2TP.js → chunk-KAG2BWDB.js} +6 -6
  81. package/dist/{chunk-JOF3TPDT.js → chunk-KS3OJ4C2.js} +2 -2
  82. package/dist/{chunk-BUBLUKJM.js → chunk-LJH2QDF3.js} +13 -10
  83. package/dist/{chunk-VKGSGULO.js → chunk-M6EYOBLJ.js} +5 -5
  84. package/dist/{chunk-HLZIHAUY.js → chunk-MOBSQM4B.js} +3 -3
  85. package/dist/{chunk-K6E24TJ6.js → chunk-MZDFTXXO.js} +1 -1
  86. package/dist/{chunk-ZMZG32RS.js → chunk-NBNWMQH4.js} +7 -3
  87. package/dist/{chunk-H3FRQS4V.js → chunk-NGZB5BVO.js} +6 -6
  88. package/dist/{chunk-SALM3IYQ.js → chunk-NMSRA7QO.js} +10 -0
  89. package/dist/{chunk-F3O5VDQL.js → chunk-NQAY6G3S.js} +4 -4
  90. package/dist/{chunk-FR25IWL7.js → chunk-OJZ3CVGK.js} +9 -6
  91. package/dist/{chunk-SDZBQQEK.js → chunk-OKZR3LFO.js} +4 -4
  92. package/dist/{chunk-3SFUJREU.js → chunk-PKN4XIBP.js} +2 -2
  93. package/dist/{chunk-RXRKX646.js → chunk-QYBQCMRP.js} +1 -1
  94. package/dist/{chunk-TIU3TP36.js → chunk-S2FLLNQI.js} +2 -2
  95. package/dist/{chunk-SCQRKKGL.js → chunk-S7ZX7V5S.js} +1 -1
  96. package/dist/{chunk-QMUSLBVA.js → chunk-SQR7GGOH.js} +5 -5
  97. package/dist/{chunk-3YY6CUU7.js → chunk-T72BV3CU.js} +4 -4
  98. package/dist/{chunk-EMEF7ALE.js → chunk-TBJ4OMO4.js} +5 -5
  99. package/dist/{chunk-V25XPPEY.js → chunk-TJUDVI2Y.js} +2 -2
  100. package/dist/{chunk-VZVEZILS.js → chunk-TKXM3QYK.js} +2 -2
  101. package/dist/{chunk-T3B2L64E.js → chunk-TR6AJV4Z.js} +2 -2
  102. package/dist/{chunk-P7LHBBM5.js → chunk-TTDJHOYY.js} +3 -3
  103. package/dist/{chunk-X5VHTPAD.js → chunk-UNHXJLHP.js} +5 -5
  104. package/dist/{chunk-7S262556.js → chunk-UWQKGWBF.js} +1 -1
  105. package/dist/{chunk-KCDWWT42.js → chunk-WEWTT7FE.js} +1 -1
  106. package/dist/{chunk-ANKVTTB3.js → chunk-WGQIJJIS.js} +1 -1
  107. package/dist/{chunk-S2NBNU4K.js → chunk-WKBXLLDY.js} +5 -5
  108. package/dist/{chunk-6OSRPTDX.js → chunk-WKXSLMKC.js} +4 -4
  109. package/dist/{chunk-4472LNSQ.js → chunk-X3ROGIHG.js} +1 -1
  110. package/dist/{chunk-4SUNBCR6.js → chunk-XF3K42EV.js} +3 -3
  111. package/dist/{chunk-G6PHMB3F.js → chunk-XNMSVXB4.js} +3 -3
  112. package/dist/{chunk-QPNYMNB7.js → chunk-YLLQZ6MR.js} +2 -2
  113. package/dist/{chunk-PZ3X6NFM.js → chunk-ZCFPKN72.js} +4 -4
  114. package/dist/{codex-app-cards-switch-CQIIZDPU.js → codex-app-cards-switch-MPIXI3DK.js} +11 -11
  115. package/dist/{codex-card-routing-KIFZHIHM.js → codex-card-routing-YQIWKPSG.js} +2 -2
  116. package/dist/{codex-desktop-launch-YPISWZJX.js → codex-desktop-launch-GTKUXNPD.js} +1 -1
  117. package/dist/{codex-session-launch-ZL5WZXD7.js → codex-session-launch-AHYAAGRT.js} +18 -17
  118. package/dist/{config-3V3AT3AR.js → config-XMZVS6DQ.js} +3 -3
  119. package/dist/{global-upgrade-DI4JAPW6.js → global-upgrade-CBBBQIWS.js} +9 -9
  120. package/dist/{identity-XP7JUJJR.js → identity-OQXQU2WN.js} +4 -4
  121. package/dist/{live-capabilities-TFDE3XNS.js → live-capabilities-3UHWJHLY.js} +4 -4
  122. package/dist/{paths-ZC5TUIHB.js → paths-GMKZGF5F.js} +3 -3
  123. package/dist/{reapply-T2BYF7XY.js → reapply-C3WFUQZA.js} +28 -27
  124. package/dist/src/index.js +31 -30
  125. package/dist/{upgrade-lock-IWVHMUXK.js → upgrade-lock-J6MD575X.js} +4 -4
  126. package/dist/{usage-Z6WWH3ED.js → usage-KYQUBGEW.js} +3 -3
  127. package/package.json +1 -1
@@ -6,18 +6,21 @@ import {
6
6
  McpToolError,
7
7
  SubscriptionRequiredError,
8
8
  callMcpTool
9
- } from "./chunk-FR25IWL7.js";
9
+ } from "./chunk-OJZ3CVGK.js";
10
10
  import {
11
11
  installNetworkDefaults,
12
12
  isNetworkFailure
13
- } from "./chunk-G6PHMB3F.js";
13
+ } from "./chunk-XNMSVXB4.js";
14
+ import {
15
+ fetchAsCredential
16
+ } from "./chunk-DZMKNP3I.js";
14
17
  import {
15
18
  clientReportClaims
16
- } from "./chunk-KK5YNO2M.js";
19
+ } from "./chunk-FYSQQW6Q.js";
17
20
  import {
18
21
  getApiKey,
19
22
  getBaseUrl
20
- } from "./chunk-RXRKX646.js";
23
+ } from "./chunk-QYBQCMRP.js";
21
24
  import {
22
25
  ASK_AGENT_NAME_MAX,
23
26
  CLIENT_REPORT_PATH,
@@ -26,7 +29,7 @@ import {
26
29
  TOOL_FAILURE_CODES,
27
30
  degradedLine,
28
31
  truncateLine
29
- } from "./chunk-SALM3IYQ.js";
32
+ } from "./chunk-NMSRA7QO.js";
30
33
 
31
34
  // src/api.ts
32
35
  import { randomUUID } from "crypto";
@@ -153,12 +156,12 @@ var createClientErrorReporter = (deps) => {
153
156
  const signal = AbortSignal.timeout(CLIENT_REPORT_TIMEOUT_MS);
154
157
  for (let attempt = 0; attempt < CLIENT_REPORT_MAX_ATTEMPTS && !signal.aborted; attempt++) {
155
158
  try {
156
- const response = await deps.fetchImpl(`${deps.baseUrl()}${CLIENT_REPORT_PATH}`, {
159
+ const response = await fetchAsCredential(apiKey, `${deps.baseUrl()}${CLIENT_REPORT_PATH}`, {
157
160
  method: "POST",
158
161
  headers: { "Authorization": `Bearer ${apiKey}`, "Content-Type": "application/json" },
159
162
  body: JSON.stringify({ ...event, occurredAt: new Date(now).toISOString() }),
160
163
  signal
161
- });
164
+ }, deps.fetchImpl);
162
165
  await response.body?.cancel();
163
166
  if (response.ok || response.status < 500 && response.status !== 429) return;
164
167
  } catch {
@@ -295,7 +298,7 @@ var sendNotification = async (apiKey, params, timeoutMs = 15e3, signal) => {
295
298
  var GATE_PATH = "/api/agent/gate";
296
299
  var BLOCKED_ACTION_CLAIM_PATH = "/api/agent/blocked-action/claim";
297
300
  var postAgentRequest = async (apiKey, path, body, timeoutMs) => {
298
- const response = await fetch(`${getBaseUrl()}${path}`, {
301
+ const response = await fetchAsCredential(apiKey, `${getBaseUrl()}${path}`, {
299
302
  method: "POST",
300
303
  headers: { "Content-Type": "application/json", Authorization: `Bearer ${apiKey}` },
301
304
  body: JSON.stringify(body),
@@ -399,9 +399,9 @@ var installGlobally = (options) => {
399
399
  }
400
400
  const started = (async () => {
401
401
  if (!npmIsOnPath()) throw new NpmMissingError();
402
- const { withUpgradeLock } = await import("./global-upgrade-DI4JAPW6.js");
403
- const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-IWVHMUXK.js");
404
- const { autoUpdateLock } = await import("./paths-ZC5TUIHB.js");
402
+ const { withUpgradeLock } = await import("./global-upgrade-CBBBQIWS.js");
403
+ const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-J6MD575X.js");
404
+ const { autoUpdateLock } = await import("./paths-GMKZGF5F.js");
405
405
  let result = "skipped";
406
406
  const install = async () => {
407
407
  const platform = process.platform;
@@ -4,13 +4,13 @@ import {
4
4
  configFailureKind,
5
5
  retryAgentCommand,
6
6
  writeSetupConfigFile
7
- } from "./chunk-P7LHBBM5.js";
7
+ } from "./chunk-TTDJHOYY.js";
8
8
  import {
9
9
  MCP_BRIDGE_BINARY
10
- } from "./chunk-ZMZG32RS.js";
10
+ } from "./chunk-NBNWMQH4.js";
11
11
  import {
12
12
  KEY_FILE_MODE
13
- } from "./chunk-4SUNBCR6.js";
13
+ } from "./chunk-XF3K42EV.js";
14
14
  import {
15
15
  CLINE_SERVER_NAME_TAKEN,
16
16
  CLINE_SETTINGS_REFUSALS,
@@ -32,10 +32,10 @@ import {
32
32
  withClinePusharyServer,
33
33
  withRefreshedClineKey,
34
34
  withoutClinePusharyServer
35
- } from "./chunk-KK5YNO2M.js";
35
+ } from "./chunk-FYSQQW6Q.js";
36
36
  import {
37
37
  resolveGlobalBinary
38
- } from "./chunk-MAWFWQLR.js";
38
+ } from "./chunk-DQKTKMR3.js";
39
39
  import {
40
40
  readJsonSafe,
41
41
  writeFileAtomic,
@@ -0,0 +1,81 @@
1
+ import {
2
+ CREDENTIAL_REJECTED,
3
+ CREDENTIAL_REJECTION_HEADER,
4
+ CREDENTIAL_REJECTION_STATUS,
5
+ MCP_CREDENTIAL_REJECTION_BODY,
6
+ isRecord,
7
+ responseRejectsCredential
8
+ } from "./chunk-NMSRA7QO.js";
9
+
10
+ // src/credential-rejection.ts
11
+ import { createHash, randomUUID } from "crypto";
12
+ import { readFileSync, renameSync, unlinkSync, writeFileSync } from "fs";
13
+ import { tmpdir } from "os";
14
+ import { join } from "path";
15
+ var CREDENTIAL_REJECTION_TTL_MS = 6e4;
16
+ var REMEMBERED_REJECTION_MODE = 384;
17
+ var serverOf = (url) => {
18
+ try {
19
+ return new URL(url).origin;
20
+ } catch {
21
+ return url;
22
+ }
23
+ };
24
+ var credentialFingerprint = (credential, url) => createHash("sha256").update(`credential:${serverOf(url)}
25
+ ${credential}`).digest("hex");
26
+ var credentialRejectionFile = (credential, url) => join(tmpdir(), `pushary-credential-${credentialFingerprint(credential, url).slice(0, 12)}.json`);
27
+ var isRememberedRejection = (value) => isRecord(value) && typeof value.fingerprint === "string" && typeof value.rejectedAt === "number" && Number.isFinite(value.rejectedAt);
28
+ var readRememberedRejection = (credential, url) => {
29
+ try {
30
+ const parsed = JSON.parse(readFileSync(credentialRejectionFile(credential, url), "utf-8"));
31
+ return isRememberedRejection(parsed) ? parsed : null;
32
+ } catch {
33
+ return null;
34
+ }
35
+ };
36
+ var credentialRecentlyRejected = (credential, url, now) => {
37
+ const remembered = readRememberedRejection(credential, url);
38
+ if (!remembered || remembered.fingerprint !== credentialFingerprint(credential, url)) return false;
39
+ const age = (now ?? Date.now()) - remembered.rejectedAt;
40
+ return age >= 0 && age < CREDENTIAL_REJECTION_TTL_MS;
41
+ };
42
+ var discardStagedRejection = (staged) => {
43
+ try {
44
+ unlinkSync(staged);
45
+ } catch {
46
+ return;
47
+ }
48
+ };
49
+ var rememberRejectedCredential = (credential, url, now = Date.now()) => {
50
+ const remembered = { fingerprint: credentialFingerprint(credential, url), rejectedAt: now };
51
+ const file = credentialRejectionFile(credential, url);
52
+ const staged = `${file}.${randomUUID()}.tmp`;
53
+ try {
54
+ writeFileSync(staged, JSON.stringify(remembered), { encoding: "utf-8", mode: REMEMBERED_REJECTION_MODE, flag: "wx" });
55
+ } catch {
56
+ return;
57
+ }
58
+ try {
59
+ renameSync(staged, file);
60
+ } catch {
61
+ discardStagedRejection(staged);
62
+ }
63
+ };
64
+ var rememberedRejectionResponse = () => new Response(MCP_CREDENTIAL_REJECTION_BODY, {
65
+ status: CREDENTIAL_REJECTION_STATUS,
66
+ statusText: "Unauthorized",
67
+ headers: { "content-type": "application/json", [CREDENTIAL_REJECTION_HEADER]: CREDENTIAL_REJECTED }
68
+ });
69
+ var fetchAsCredential = async (credential, url, init, fetchImpl = fetch) => {
70
+ if (credentialRecentlyRejected(credential, url)) {
71
+ init.signal?.throwIfAborted();
72
+ return rememberedRejectionResponse();
73
+ }
74
+ const response = await fetchImpl(url, init);
75
+ if (responseRejectsCredential(response.status, response.headers)) rememberRejectedCredential(credential, url);
76
+ return response;
77
+ };
78
+
79
+ export {
80
+ fetchAsCredential
81
+ };
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-BG4HHB7E.js";
4
4
  import {
5
5
  renderCommandHelp
6
- } from "./chunk-MYDTSPIZ.js";
6
+ } from "./chunk-DLS43QDO.js";
7
7
  import {
8
8
  getPackageVersion
9
9
  } from "./chunk-ZVU6WMMU.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_HOLD_BUDGET_ENV,
3
3
  hookHoldBudgetProof
4
- } from "./chunk-SALM3IYQ.js";
4
+ } from "./chunk-NMSRA7QO.js";
5
5
 
6
6
  // src/hold-budget.ts
7
7
  var takeHookHoldBudget = (args = process.argv.slice(2), env = process.env) => {
@@ -1,14 +1,17 @@
1
1
  import {
2
2
  external_exports
3
3
  } from "./chunk-XMSDA5WA.js";
4
+ import {
5
+ fetchAsCredential
6
+ } from "./chunk-DZMKNP3I.js";
4
7
  import {
5
8
  getBaseUrl
6
- } from "./chunk-RXRKX646.js";
9
+ } from "./chunk-QYBQCMRP.js";
7
10
  import {
8
11
  compressTranscriptRecord,
9
12
  redactSecretsFromContent,
10
13
  transcriptRecordPlaintext
11
- } from "./chunk-SALM3IYQ.js";
14
+ } from "./chunk-NMSRA7QO.js";
12
15
 
13
16
  // src/transcript-api.ts
14
17
  var providerRecipientSchema = external_exports.object({
@@ -32,7 +35,7 @@ var retentionDaysOf = (sessionHistory) => {
32
35
  var fetchTranscriptRecipients = async (apiKey, baseUrl = getBaseUrl(), unavailable) => {
33
36
  unavailable?.("capture_failed");
34
37
  try {
35
- const res = await fetch(`${baseUrl}/api/agent/encryption-account`, {
38
+ const res = await fetchAsCredential(apiKey, `${baseUrl}/api/agent/encryption-account`, {
36
39
  headers: { Authorization: `Bearer ${apiKey}` },
37
40
  signal: AbortSignal.timeout(5e3)
38
41
  });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-K6E24TJ6.js";
3
+ } from "./chunk-MZDFTXXO.js";
4
4
  import {
5
5
  parseFlags
6
6
  } from "./chunk-YPY4YCIZ.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-YU2EUD7O.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-MYDTSPIZ.js";
12
+ } from "./chunk-DLS43QDO.js";
13
13
  import {
14
14
  CLAUDE_CONNECTOR_GUIDE,
15
15
  CLAUDE_CONNECTOR_STEPS,
@@ -17,7 +17,7 @@ import {
17
17
  CLAUDE_CONNECTOR_URL,
18
18
  COWORK_CONNECTOR_LIMIT,
19
19
  COWORK_STANDING_INSTRUCTIONS
20
- } from "./chunk-SALM3IYQ.js";
20
+ } from "./chunk-NMSRA7QO.js";
21
21
 
22
22
  // src/cli/cowork.ts
23
23
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-KK5YNO2M.js";
3
+ } from "./chunk-FYSQQW6Q.js";
4
4
  import {
5
5
  readRegularJsonFile,
6
6
  writeFileAtomic
@@ -13,7 +13,7 @@ import {
13
13
  serializeDeclinedAgents,
14
14
  withDeclinedAgent,
15
15
  withoutDeclinedAgent
16
- } from "./chunk-SALM3IYQ.js";
16
+ } from "./chunk-NMSRA7QO.js";
17
17
 
18
18
  // src/declined-agents-file.ts
19
19
  import { join } from "path";
@@ -3,7 +3,7 @@ import {
3
3
  formatVersion,
4
4
  quoteIfNeeded,
5
5
  shellDoubleQuoted
6
- } from "./chunk-MAWFWQLR.js";
6
+ } from "./chunk-DQKTKMR3.js";
7
7
  import {
8
8
  writeFileAtomic
9
9
  } from "./chunk-T5I4PKOQ.js";
@@ -17,7 +17,7 @@ import {
17
17
  HOOK_LOCATOR_BINARY,
18
18
  PRETOOLUSE_GATED_TOOLS,
19
19
  withHookHoldBudget
20
- } from "./chunk-SALM3IYQ.js";
20
+ } from "./chunk-NMSRA7QO.js";
21
21
 
22
22
  // src/setup/paths.ts
23
23
  import { createHash as createHash2 } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-KK5YNO2M.js";
3
+ } from "./chunk-FYSQQW6Q.js";
4
4
  import {
5
5
  writeFileAtomic
6
6
  } from "./chunk-T5I4PKOQ.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pusharyFetch
3
- } from "./chunk-G6PHMB3F.js";
3
+ } from "./chunk-XNMSVXB4.js";
4
4
  import {
5
5
  getBaseUrl
6
- } from "./chunk-RXRKX646.js";
6
+ } from "./chunk-QYBQCMRP.js";
7
7
  import {
8
8
  NetworkError
9
9
  } from "./chunk-YU2EUD7O.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-SALM3IYQ.js";
16
+ } from "./chunk-NMSRA7QO.js";
17
17
 
18
18
  // src/session.ts
19
19
  var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
@@ -4,7 +4,7 @@ import {
4
4
  postLiveSession,
5
5
  postLiveSessionUntilAccepted,
6
6
  startLiveSessionHeartbeat
7
- } from "./chunk-SCQRKKGL.js";
7
+ } from "./chunk-S7ZX7V5S.js";
8
8
  import {
9
9
  CommandReceipts,
10
10
  controllerCommandSchema
@@ -14,21 +14,21 @@ import {
14
14
  describeIdleWindow,
15
15
  idleDeadlinePassed,
16
16
  startProcessOwnership
17
- } from "./chunk-QPNYMNB7.js";
17
+ } from "./chunk-YLLQZ6MR.js";
18
18
  import {
19
19
  repositoryScopeFor
20
- } from "./chunk-UK4Z3X75.js";
20
+ } from "./chunk-ALA2OMOM.js";
21
21
  import {
22
22
  isAskUserResponse,
23
23
  isDecisionStopped,
24
24
  isWaitForAnswerResponse,
25
25
  withdrawQuestion,
26
26
  writeDegraded
27
- } from "./chunk-FYK7JV2R.js";
27
+ } from "./chunk-DP62DH2Q.js";
28
28
  import {
29
29
  callMcpTool,
30
30
  isRetryable
31
- } from "./chunk-FR25IWL7.js";
31
+ } from "./chunk-OJZ3CVGK.js";
32
32
  import {
33
33
  spawnClaude
34
34
  } from "./chunk-XHKBHWLX.js";
@@ -52,7 +52,7 @@ import {
52
52
  parseCodexQuestions,
53
53
  planElicitationAsk,
54
54
  readElicitationFields
55
- } from "./chunk-SALM3IYQ.js";
55
+ } from "./chunk-NMSRA7QO.js";
56
56
 
57
57
  // src/codex-question-owner.ts
58
58
  import { createHash } from "crypto";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  notificationAnswerStep
3
- } from "./chunk-WU3TP2TP.js";
3
+ } from "./chunk-KAG2BWDB.js";
4
4
  import {
5
5
  canChangeApprovalSettings
6
- } from "./chunk-7VIJBCMF.js";
6
+ } from "./chunk-5IRJERK2.js";
7
7
  import {
8
8
  matchMacAccountStep,
9
9
  retryAgentCommand
10
- } from "./chunk-P7LHBBM5.js";
10
+ } from "./chunk-TTDJHOYY.js";
11
11
  import {
12
12
  EXIT
13
13
  } from "./chunk-BG4HHB7E.js";
14
14
  import {
15
15
  NPX_LATEST_COMMAND
16
- } from "./chunk-MYDTSPIZ.js";
16
+ } from "./chunk-DLS43QDO.js";
17
17
 
18
18
  // src/setup/closing.ts
19
19
  var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
@@ -2,10 +2,10 @@ import {
2
2
  SIGNED_OUT_ON_MAC_MESSAGE,
3
3
  describeSignedOutKey,
4
4
  readSignedOutDiagnosis
5
- } from "./chunk-TIU3TP36.js";
5
+ } from "./chunk-S2FLLNQI.js";
6
6
  import {
7
7
  APPROVAL_RULES_PATH
8
- } from "./chunk-7VIJBCMF.js";
8
+ } from "./chunk-5IRJERK2.js";
9
9
  import {
10
10
  createIo
11
11
  } from "./chunk-FO3MDD26.js";
@@ -14,19 +14,19 @@ import {
14
14
  checkApiKey,
15
15
  describeKeyCheck,
16
16
  keyCheckFromResponse
17
- } from "./chunk-QNUGTQKZ.js";
17
+ } from "./chunk-GOUUFBBP.js";
18
18
  import {
19
19
  readKeySource
20
- } from "./chunk-4SUNBCR6.js";
20
+ } from "./chunk-XF3K42EV.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-RXRKX646.js";
23
+ } from "./chunk-QYBQCMRP.js";
24
24
  import {
25
25
  EXIT
26
26
  } from "./chunk-BG4HHB7E.js";
27
27
  import {
28
28
  KEY_SCOPE
29
- } from "./chunk-SALM3IYQ.js";
29
+ } from "./chunk-NMSRA7QO.js";
30
30
 
31
31
  // src/cli/report-key.ts
32
32
  var { dim, yellow } = createIo();
@@ -7,10 +7,10 @@ import {
7
7
  codexHome,
8
8
  codexHooksJsonIn,
9
9
  isPusharyCodexCommand
10
- } from "./chunk-KK5YNO2M.js";
10
+ } from "./chunk-FYSQQW6Q.js";
11
11
  import {
12
12
  resolvePathBinary
13
- } from "./chunk-MAWFWQLR.js";
13
+ } from "./chunk-DQKTKMR3.js";
14
14
  import {
15
15
  getPackageVersion
16
16
  } from "./chunk-ZVU6WMMU.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  realpath
3
- } from "./chunk-V25XPPEY.js";
3
+ } from "./chunk-TJUDVI2Y.js";
4
4
  import {
5
5
  findNativeClaudeInstall
6
6
  } from "./chunk-ROVLRXBI.js";
@@ -13,10 +13,10 @@ import {
13
13
  resolvePackageVersionFromBinary,
14
14
  resolvePathBinary,
15
15
  resolvePathBinaryAsync
16
- } from "./chunk-MAWFWQLR.js";
16
+ } from "./chunk-DQKTKMR3.js";
17
17
  import {
18
18
  MANAGED_PROVIDERS
19
- } from "./chunk-SALM3IYQ.js";
19
+ } from "./chunk-NMSRA7QO.js";
20
20
 
21
21
  // src/live-capabilities.ts
22
22
  import { homedir } from "os";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  APPROVAL_RULES_PATH,
3
3
  canChangeApprovalSettings
4
- } from "./chunk-7VIJBCMF.js";
4
+ } from "./chunk-5IRJERK2.js";
5
5
  import {
6
6
  callMcpTool
7
- } from "./chunk-FR25IWL7.js";
7
+ } from "./chunk-OJZ3CVGK.js";
8
8
  import {
9
9
  absoluteUrl
10
- } from "./chunk-QNUGTQKZ.js";
10
+ } from "./chunk-GOUUFBBP.js";
11
11
  import {
12
12
  getBaseUrl
13
- } from "./chunk-RXRKX646.js";
13
+ } from "./chunk-QYBQCMRP.js";
14
14
  import {
15
15
  NPX_LATEST_COMMAND
16
- } from "./chunk-MYDTSPIZ.js";
16
+ } from "./chunk-DLS43QDO.js";
17
17
  import {
18
18
  AGENT_STOP_DEFAULT_SECONDS,
19
19
  APPROVAL_MODE_META,
@@ -21,7 +21,7 @@ import {
21
21
  classifyConfirmResponse,
22
22
  isAnswerSource,
23
23
  roundTripAsk
24
- } from "./chunk-SALM3IYQ.js";
24
+ } from "./chunk-NMSRA7QO.js";
25
25
 
26
26
  // src/reach.ts
27
27
  var reachVerdict = (channels) => {
@@ -9,13 +9,13 @@ import {
9
9
  installedCodexApp,
10
10
  readCodexAppRuntime,
11
11
  shellQuoted
12
- } from "./chunk-MMHBNMHK.js";
12
+ } from "./chunk-6ZPGNVXS.js";
13
13
  import {
14
14
  writeHuman
15
15
  } from "./chunk-QCGNGEGE.js";
16
16
  import {
17
17
  xml
18
- } from "./chunk-II6M23WI.js";
18
+ } from "./chunk-3OLVEVGW.js";
19
19
  import {
20
20
  writeFileAtomic
21
21
  } from "./chunk-T5I4PKOQ.js";
@@ -7,13 +7,13 @@ import {
7
7
  } from "./chunk-G66WIAST.js";
8
8
  import {
9
9
  ensureDaemonRunning
10
- } from "./chunk-II6M23WI.js";
10
+ } from "./chunk-3OLVEVGW.js";
11
11
  import {
12
12
  hookOwnerOf
13
- } from "./chunk-3YY6CUU7.js";
13
+ } from "./chunk-T72BV3CU.js";
14
14
  import {
15
15
  hookMeaning
16
- } from "./chunk-UC2NBQS3.js";
16
+ } from "./chunk-BCZSRQ3L.js";
17
17
  import {
18
18
  buildTranscriptRecords,
19
19
  decodePublicKey,
@@ -24,26 +24,29 @@ import {
24
24
  recordSealerFor,
25
25
  uploadTranscriptRecords,
26
26
  wrapSessionKey
27
- } from "./chunk-BDAT6H7J.js";
27
+ } from "./chunk-FE4CSARF.js";
28
28
  import {
29
29
  external_exports
30
30
  } from "./chunk-XMSDA5WA.js";
31
31
  import {
32
32
  transcriptEnvironmentPreference,
33
33
  transcriptsEnabled
34
- } from "./chunk-7S262556.js";
34
+ } from "./chunk-UWQKGWBF.js";
35
+ import {
36
+ fetchAsCredential
37
+ } from "./chunk-DZMKNP3I.js";
35
38
  import {
36
39
  readTranscriptPreference
37
- } from "./chunk-4SUNBCR6.js";
40
+ } from "./chunk-XF3K42EV.js";
38
41
  import {
39
42
  claudeConfigDir,
40
43
  codexHome,
41
44
  pusharyDir
42
- } from "./chunk-KK5YNO2M.js";
45
+ } from "./chunk-FYSQQW6Q.js";
43
46
  import {
44
47
  getApiKey,
45
48
  getBaseUrl
46
- } from "./chunk-RXRKX646.js";
49
+ } from "./chunk-QYBQCMRP.js";
47
50
  import {
48
51
  writeJsonAtomic,
49
52
  writeJsonAtomicDurable
@@ -55,7 +58,7 @@ import {
55
58
  isHookSource,
56
59
  isRecord,
57
60
  redactSecretsFromContent
58
- } from "./chunk-SALM3IYQ.js";
61
+ } from "./chunk-NMSRA7QO.js";
59
62
 
60
63
  // src/transcript-recipient-pin.ts
61
64
  import { createHash } from "crypto";
@@ -1493,7 +1496,7 @@ var startRegisteredTranscripts = (apiKey, machineId, options = {}) => {
1493
1496
  if (raw.expectedSiteId && !verifiedSiteId && Date.now() >= nextVerification && raw.expectedBaseUrl && sameServer(raw.expectedBaseUrl, registry)) {
1494
1497
  nextVerification = Date.now() + 3e4;
1495
1498
  try {
1496
- const response = await fetch(`${registry.baseUrl}/api/agent/encryption-account`, {
1499
+ const response = await fetchAsCredential(apiKey, `${registry.baseUrl}/api/agent/encryption-account`, {
1497
1500
  headers: { Authorization: `Bearer ${apiKey}` },
1498
1501
  signal: AbortSignal.timeout(5e3)
1499
1502
  });
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-S2NBNU4K.js";
3
+ } from "./chunk-WKBXLLDY.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands
7
- } from "./chunk-3YY6CUU7.js";
7
+ } from "./chunk-T72BV3CU.js";
8
8
  import {
9
9
  AGENT_CHOICES
10
- } from "./chunk-K6E24TJ6.js";
10
+ } from "./chunk-MZDFTXXO.js";
11
11
  import {
12
12
  bridgeStub,
13
13
  claudeSettings,
@@ -19,7 +19,7 @@ import {
19
19
  resolveBridgeStub,
20
20
  vscodePluginDir,
21
21
  windowsNodeLauncherFor
22
- } from "./chunk-KK5YNO2M.js";
22
+ } from "./chunk-FYSQQW6Q.js";
23
23
  import {
24
24
  readJsonSafe
25
25
  } from "./chunk-T5I4PKOQ.js";
@@ -29,7 +29,7 @@ import {
29
29
  OPENCODE_APPROVAL_EVENT,
30
30
  hookCompatibleProfile,
31
31
  isRecord
32
- } from "./chunk-SALM3IYQ.js";
32
+ } from "./chunk-NMSRA7QO.js";
33
33
 
34
34
  // src/opencode-plugin.ts
35
35
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-BFXJUZUH.js";
3
+ } from "./chunk-JMQORTFD.js";
4
4
  import {
5
5
  retryAgentCommand
6
- } from "./chunk-P7LHBBM5.js";
6
+ } from "./chunk-TTDJHOYY.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-MYDTSPIZ.js";
9
+ } from "./chunk-DLS43QDO.js";
10
10
 
11
11
  // src/setup/codex-trust.ts
12
12
  var CODEX_TRUST_TELEMETRY = {
@@ -9,7 +9,7 @@ import {
9
9
  isSetupConnectMode,
10
10
  isValidApiKey,
11
11
  normalizeAgentId
12
- } from "./chunk-SALM3IYQ.js";
12
+ } from "./chunk-NMSRA7QO.js";
13
13
 
14
14
  // src/setup/options.ts
15
15
  var AGENT_CHOICES = SETUP_AGENT_CHOICES;