pushary 1.9.20 → 1.9.21

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 +6 -0
  2. package/dist/bin/pushary-bell-hook.js +27 -27
  3. package/dist/bin/pushary-bell.js +14 -12
  4. package/dist/bin/pushary-claude.js +26 -26
  5. package/dist/bin/pushary-clean.js +36 -33
  6. package/dist/bin/pushary-codex-bridge.js +18 -18
  7. package/dist/bin/pushary-codex-hook.js +32 -32
  8. package/dist/bin/pushary-codex.js +13 -13
  9. package/dist/bin/pushary-connect.js +25 -25
  10. package/dist/bin/pushary-cowork.js +5 -5
  11. package/dist/bin/pushary-daemon.js +33 -33
  12. package/dist/bin/pushary-disconnect.js +25 -25
  13. package/dist/bin/pushary-doctor.js +34 -34
  14. package/dist/bin/pushary-elicitation-hook.js +27 -27
  15. package/dist/bin/pushary-gemini-bridge.js +14 -14
  16. package/dist/bin/pushary-gemini-hook.js +29 -29
  17. package/dist/bin/pushary-hook.js +31 -31
  18. package/dist/bin/pushary-login.js +13 -13
  19. package/dist/bin/pushary-logout.js +36 -20
  20. package/dist/bin/pushary-mcp.js +10 -10
  21. package/dist/bin/pushary-mode.js +13 -13
  22. package/dist/bin/pushary-notification-hook.js +26 -26
  23. package/dist/bin/pushary-opencode-hook.js +28 -28
  24. package/dist/bin/pushary-permission-denied-hook.js +31 -31
  25. package/dist/bin/pushary-permission-hook.js +30 -30
  26. package/dist/bin/pushary-post-hook.js +26 -26
  27. package/dist/bin/pushary-prompt-hook.js +26 -26
  28. package/dist/bin/pushary-session-end-hook.js +26 -26
  29. package/dist/bin/pushary-session-start-hook.js +30 -30
  30. package/dist/bin/pushary-setup.js +53 -48
  31. package/dist/bin/pushary-stats.js +5 -5
  32. package/dist/bin/pushary-status.js +34 -29
  33. package/dist/bin/pushary-stop-hook.js +26 -26
  34. package/dist/bin/pushary-stopfailure-hook.js +26 -26
  35. package/dist/bin/pushary-suggestions.js +13 -13
  36. package/dist/bin/pushary-transcript-register.js +19 -19
  37. package/dist/bin/pushary-transcripts.js +9 -9
  38. package/dist/bin/pushary-upgrade.js +31 -31
  39. package/dist/bin/pushary-wait.js +13 -13
  40. package/dist/bin/pushary.js +7 -7
  41. package/dist/{chunk-YONHM5BQ.js → chunk-247PAUW6.js} +1 -1
  42. package/dist/{chunk-6W6UY4AJ.js → chunk-2V55RBUR.js} +5 -5
  43. package/dist/{chunk-N5K5H2AQ.js → chunk-4BKAZ4JN.js} +5 -5
  44. package/dist/{chunk-OZOD37XK.js → chunk-4RJQPI36.js} +5 -5
  45. package/dist/{chunk-XQ4HTTBB.js → chunk-4WHNRAOK.js} +1 -1
  46. package/dist/{chunk-LB4HVID5.js → chunk-5PW6GMQO.js} +3 -3
  47. package/dist/{chunk-2V2CCTGQ.js → chunk-6WBIQQHO.js} +1 -1
  48. package/dist/{chunk-XGHXQUDG.js → chunk-6WINXCXY.js} +1 -1
  49. package/dist/{chunk-7YTJOWYI.js → chunk-7AFLHL2R.js} +6 -3
  50. package/dist/{chunk-FT7UNIS3.js → chunk-AQFEP65J.js} +2 -1
  51. package/dist/{chunk-MMIN6VNU.js → chunk-AXBFNQG6.js} +1 -1
  52. package/dist/{chunk-LHGB64O2.js → chunk-B6KZME5D.js} +1 -1
  53. package/dist/{chunk-DF2FSJ7B.js → chunk-BDL6GJOQ.js} +4 -4
  54. package/dist/{chunk-XVNZHIVF.js → chunk-BERMVODT.js} +9 -8
  55. package/dist/{chunk-LXYNKZFP.js → chunk-BV5JPACQ.js} +2 -2
  56. package/dist/{chunk-YJWEQZJC.js → chunk-CEF4UQ3X.js} +4 -4
  57. package/dist/{chunk-MGW26CW7.js → chunk-ESHO7OC3.js} +1 -1
  58. package/dist/{chunk-4ABHSCFJ.js → chunk-FH4O3QGQ.js} +29 -26
  59. package/dist/{chunk-EP6FWWBY.js → chunk-FUXCWF4Y.js} +11 -8
  60. package/dist/{chunk-DBEJIFJD.js → chunk-G4TV5GYU.js} +2 -2
  61. package/dist/{chunk-DNSYWI7D.js → chunk-GMJOSAAP.js} +11 -11
  62. package/dist/{chunk-2YAHQ763.js → chunk-I52ALHOM.js} +5 -5
  63. package/dist/{chunk-ANPECDYL.js → chunk-IEYFFMTU.js} +3 -3
  64. package/dist/{chunk-LU7JPQKL.js → chunk-II6OFDB3.js} +4 -4
  65. package/dist/{chunk-ZNFARGEY.js → chunk-IIQ77WUJ.js} +6 -6
  66. package/dist/{chunk-ATDOYZXC.js → chunk-IM7EGZVH.js} +1 -1
  67. package/dist/{chunk-CRW4P7JU.js → chunk-JHAPJRAN.js} +1 -1
  68. package/dist/{chunk-HPMP6QQD.js → chunk-L5NPRGVE.js} +10 -9
  69. package/dist/{chunk-A6U4RRFM.js → chunk-LUDGBOLV.js} +2 -2
  70. package/dist/{chunk-XJGGGDHX.js → chunk-NBGJ3EOE.js} +2 -2
  71. package/dist/{chunk-MID7BURF.js → chunk-NVXC6ZBR.js} +2 -2
  72. package/dist/{chunk-SB2GN6OP.js → chunk-OYIN77HO.js} +3 -2
  73. package/dist/{chunk-Z4YQ7ZMO.js → chunk-PCF7JUTP.js} +3 -3
  74. package/dist/{chunk-6I4D3XZ3.js → chunk-PCVAK67W.js} +1 -1
  75. package/dist/{chunk-Q4EQHBA7.js → chunk-PYWZYM74.js} +5 -14
  76. package/dist/{chunk-422Z3LBB.js → chunk-QHY3UDYC.js} +3 -3
  77. package/dist/{chunk-OLJ4GIRP.js → chunk-RVP6COOQ.js} +2 -2
  78. package/dist/{chunk-R7SSVBHX.js → chunk-SVQOEVAT.js} +4 -4
  79. package/dist/{chunk-RZCTGLUJ.js → chunk-TBCXMW2C.js} +3 -3
  80. package/dist/{chunk-PPAMIQOV.js → chunk-TJ4KMPYO.js} +10 -10
  81. package/dist/{chunk-5C2GFTWE.js → chunk-TQIPIFL7.js} +1 -1
  82. package/dist/{chunk-RGSG2GYV.js → chunk-TVBEHME2.js} +4 -4
  83. package/dist/{chunk-AESHOWIB.js → chunk-U6GYFWT4.js} +8 -5
  84. package/dist/{chunk-736I6CBY.js → chunk-UKCRTTKF.js} +1 -1
  85. package/dist/{chunk-NESTNKCA.js → chunk-UZ2YEGIT.js} +3 -3
  86. package/dist/{chunk-6HMCOGKJ.js → chunk-VBPASZU7.js} +13 -8
  87. package/dist/{chunk-UVEIBBTR.js → chunk-VD2AWSER.js} +2 -2
  88. package/dist/{chunk-P77EIWBJ.js → chunk-VRXX2AY2.js} +2 -2
  89. package/dist/{chunk-6WEC3KZP.js → chunk-VTR4VRL2.js} +1 -1
  90. package/dist/{chunk-BIQF3C4H.js → chunk-XNO3CSVW.js} +1 -1
  91. package/dist/{chunk-K5PUP76V.js → chunk-Y2BOLNJV.js} +5 -5
  92. package/dist/{chunk-XDKZZSU6.js → chunk-Y6PZ3B5U.js} +2 -2
  93. package/dist/{chunk-CW4CF7NU.js → chunk-YCL2V5FD.js} +9 -9
  94. package/dist/{chunk-VOIN2NZW.js → chunk-YLLGKY7K.js} +3 -3
  95. package/dist/{chunk-DQTBQHB5.js → chunk-Z5EYCMJH.js} +2 -2
  96. package/dist/{chunk-HILWD7WM.js → chunk-ZNAGS7O7.js} +3 -3
  97. package/dist/{global-upgrade-EELV2YEK.js → global-upgrade-AHRKGQ7M.js} +7 -7
  98. package/dist/{paths-MDOKPY7A.js → paths-AGUCNYQ5.js} +2 -2
  99. package/dist/{reapply-22C75UEY.js → reapply-BUCDXIIM.js} +21 -21
  100. package/dist/src/index.js +20 -20
  101. package/dist/{upgrade-lock-VPL5AYPQ.js → upgrade-lock-7Z5WBZVH.js} +4 -4
  102. package/package.json +1 -1
@@ -1,15 +1,19 @@
1
1
  import {
2
2
  resolveInstallSourceFor
3
- } from "./chunk-MID7BURF.js";
3
+ } from "./chunk-NVXC6ZBR.js";
4
4
  import {
5
5
  backupFile,
6
6
  readJsonSafe,
7
7
  writeFileAtomic,
8
8
  writeJsonAtomic
9
- } from "./chunk-FT7UNIS3.js";
9
+ } from "./chunk-AQFEP65J.js";
10
10
  import {
11
11
  configFilePath
12
- } from "./chunk-XQ4HTTBB.js";
12
+ } from "./chunk-4WHNRAOK.js";
13
+ import {
14
+ API_KEY_PREFIX_PATTERN,
15
+ isRecord
16
+ } from "./chunk-VBPASZU7.js";
13
17
 
14
18
  // src/shell-alias.ts
15
19
  import { homedir } from "os";
@@ -111,7 +115,6 @@ var isDisabledExport = (line) => {
111
115
  };
112
116
  var keyPrefix = (key) => key.split(".")[0] ?? key;
113
117
  var MAC_APP_KEY_PREFIX_FIELD = "macAppKeyPrefix";
114
- var KEY_PREFIX_SHAPE = /^pk_[a-f0-9]+$/;
115
118
  var findKeyExport = (contents) => {
116
119
  const lines = contents.split("\n");
117
120
  for (const [index, line] of lines.entries()) {
@@ -120,6 +123,10 @@ var findKeyExport = (contents) => {
120
123
  }
121
124
  return null;
122
125
  };
126
+ var readConfigRecord = (configPath) => {
127
+ const result = readJsonSafe(configPath);
128
+ return result.kind === "ok" && isRecord(result.value) ? result.value : null;
129
+ };
123
130
  var keepMacAppKeyPrefix = (current, apiKey) => {
124
131
  const { [MAC_APP_KEY_PREFIX_FIELD]: recorded, ...rest } = current;
125
132
  return recorded === keyPrefix(apiKey) ? { ...rest, [MAC_APP_KEY_PREFIX_FIELD]: recorded } : rest;
@@ -214,9 +221,9 @@ var writeKey = (apiKey, options = {}) => {
214
221
  `${configPath} exists but could not be read (${existing.error.message}). Fix its permissions or remove it, then re-run setup. Nothing was changed.`
215
222
  );
216
223
  }
217
- if (existing.kind === "ok") {
224
+ if (existing.kind === "ok" && isRecord(existing.value)) {
218
225
  current = existing.value;
219
- } else if (existing.kind === "unparseable") {
226
+ } else if (existing.kind === "ok" || existing.kind === "unparseable") {
220
227
  configBackupPath = backupFile(configPath);
221
228
  }
222
229
  writeJsonAtomic(
@@ -238,10 +245,10 @@ var writeKey = (apiKey, options = {}) => {
238
245
  };
239
246
  var clearKey = (options = {}) => {
240
247
  const configPath = configFilePath();
241
- const existing = readJsonSafe(configPath);
248
+ const existing = readConfigRecord(configPath);
242
249
  let removedFromConfig = false;
243
- if (existing.kind === "ok" && typeof existing.value.apiKey === "string") {
244
- const { apiKey: _dropped, [MAC_APP_KEY_PREFIX_FIELD]: _adopted, ...rest } = existing.value;
250
+ if (existing !== null && typeof existing.apiKey === "string") {
251
+ const { apiKey: _dropped, [MAC_APP_KEY_PREFIX_FIELD]: _adopted, ...rest } = existing;
245
252
  writeJsonAtomic(configPath, rest, KEY_FILE_MODE);
246
253
  restrictFile(configPath);
247
254
  removedFromConfig = true;
@@ -277,22 +284,18 @@ var restrictFile = (filePath) => {
277
284
  }
278
285
  };
279
286
  var readConfigKey = (configPath) => {
280
- const result = readJsonSafe(configPath);
281
- if (result.kind !== "ok") return null;
282
- const key = typeof result.value.apiKey === "string" ? result.value.apiKey.trim() : "";
287
+ const apiKey = readConfigRecord(configPath)?.apiKey;
288
+ const key = typeof apiKey === "string" ? apiKey.trim() : "";
283
289
  return key || null;
284
290
  };
285
291
  var readConfigFileKey = () => readConfigKey(configFilePath());
286
292
  var readControlMode = (configPath = configFilePath()) => {
287
- const result = readJsonSafe(configPath);
288
- if (result.kind !== "ok") return null;
289
- const value = result.value.controlMode;
293
+ const value = readConfigRecord(configPath)?.controlMode;
290
294
  return value === "auto" || value === "on" || value === "off" ? value : null;
291
295
  };
292
296
  var readTranscriptPreference = () => {
293
- const result = readJsonSafe(configFilePath());
294
- if (result.kind !== "ok") return null;
295
- return typeof result.value.transcriptsEnabled === "boolean" ? result.value.transcriptsEnabled : null;
297
+ const value = readConfigRecord(configFilePath())?.transcriptsEnabled;
298
+ return typeof value === "boolean" ? value : null;
296
299
  };
297
300
  var readKeySource = () => {
298
301
  const configPath = configFilePath();
@@ -304,16 +307,15 @@ var readKeySource = () => {
304
307
  return { kind: "none", key: null, origin: null, drift: null };
305
308
  };
306
309
  var readMacAppKeyPrefix = (configPath = configFilePath()) => {
307
- const result = readJsonSafe(configPath);
308
- if (result.kind !== "ok") return null;
309
- const recorded = result.value[MAC_APP_KEY_PREFIX_FIELD];
310
- return typeof recorded === "string" && KEY_PREFIX_SHAPE.test(recorded) ? recorded : null;
310
+ const recorded = readConfigRecord(configPath)?.[MAC_APP_KEY_PREFIX_FIELD];
311
+ return typeof recorded === "string" && API_KEY_PREFIX_PATTERN.test(recorded) ? recorded : null;
311
312
  };
313
+ var isAdoptedMacAppKey = (key, adoptedPrefix) => keyPrefix(key) === adoptedPrefix;
312
314
  var recordMacAppKeyPrefix = (apiKey, configPath = configFilePath()) => {
313
- const result = readJsonSafe(configPath);
314
- if (result.kind !== "ok" || result.value.apiKey !== apiKey) return false;
315
- if (result.value[MAC_APP_KEY_PREFIX_FIELD] === keyPrefix(apiKey)) return false;
316
- writeJsonAtomic(configPath, { ...result.value, [MAC_APP_KEY_PREFIX_FIELD]: keyPrefix(apiKey) }, KEY_FILE_MODE);
315
+ const config = readConfigRecord(configPath);
316
+ if (config === null || config.apiKey !== apiKey) return false;
317
+ if (config[MAC_APP_KEY_PREFIX_FIELD] === keyPrefix(apiKey)) return false;
318
+ writeJsonAtomic(configPath, { ...config, [MAC_APP_KEY_PREFIX_FIELD]: keyPrefix(apiKey) }, KEY_FILE_MODE);
317
319
  restrictFile(configPath);
318
320
  return true;
319
321
  };
@@ -354,6 +356,7 @@ export {
354
356
  readTranscriptPreference,
355
357
  readKeySource,
356
358
  readMacAppKeyPrefix,
359
+ isAdoptedMacAppKey,
357
360
  recordMacAppKeyPrefix,
358
361
  findExportedKeyLines,
359
362
  findExportedKeyLine
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-XDKZZSU6.js";
3
+ } from "./chunk-Y6PZ3B5U.js";
4
4
  import {
5
5
  detectClaudeVersion
6
6
  } from "./chunk-RIVNNBEK.js";
@@ -12,12 +12,12 @@ import {
12
12
  openCodeHookArgv,
13
13
  openCodePluginDir,
14
14
  openCodeWired
15
- } from "./chunk-XVNZHIVF.js";
15
+ } from "./chunk-BERMVODT.js";
16
16
  import {
17
17
  addClaudeMcpServer,
18
18
  addPusharyHooks,
19
19
  addPusharyToolPermissions
20
- } from "./chunk-DF2FSJ7B.js";
20
+ } from "./chunk-BDL6GJOQ.js";
21
21
  import {
22
22
  claudeUnprovenHolds,
23
23
  claudeWired,
@@ -25,7 +25,7 @@ import {
25
25
  codexWired,
26
26
  geminiWired,
27
27
  planHooks
28
- } from "./chunk-Q4EQHBA7.js";
28
+ } from "./chunk-PYWZYM74.js";
29
29
  import {
30
30
  CLAUDE_HOOK_BINARY,
31
31
  CLAUDE_HOOK_EVENTS,
@@ -36,7 +36,7 @@ import {
36
36
  needsReregistration,
37
37
  registrationSignatures,
38
38
  supportedClaudeEvents
39
- } from "./chunk-VOIN2NZW.js";
39
+ } from "./chunk-YLLGKY7K.js";
40
40
  import {
41
41
  formatVersion
42
42
  } from "./chunk-6ICPEJY5.js";
@@ -59,12 +59,15 @@ import {
59
59
  registrationHolderOf,
60
60
  resolveGlobalBinary,
61
61
  vscodePluginMcp
62
- } from "./chunk-YJWEQZJC.js";
62
+ } from "./chunk-CEF4UQ3X.js";
63
63
  import {
64
64
  readJsonSafe,
65
65
  writeFileAtomic,
66
66
  writeJsonAtomic
67
- } from "./chunk-FT7UNIS3.js";
67
+ } from "./chunk-AQFEP65J.js";
68
+ import {
69
+ isRecord
70
+ } from "./chunk-VBPASZU7.js";
68
71
 
69
72
  // src/reapply.ts
70
73
  import { dirname, join } from "path";
@@ -111,7 +114,7 @@ var CLAUDE_SETTINGS = join(homedir(), ".claude", "settings.json");
111
114
  var CLAUDE_JSON = join(homedir(), ".claude.json");
112
115
  var readJson = (filePath) => {
113
116
  const result = readJsonSafe(filePath);
114
- if (result.kind === "ok") return result.value;
117
+ if (result.kind === "ok") return isRecord(result.value) ? result.value : null;
115
118
  if (result.kind === "missing") return {};
116
119
  return null;
117
120
  };
@@ -6,12 +6,12 @@ import {
6
6
  permissionDeniedAction,
7
7
  releaseThrottle,
8
8
  reportEvent
9
- } from "./chunk-CW4CF7NU.js";
9
+ } from "./chunk-YCL2V5FD.js";
10
10
  import {
11
11
  machineDecisionFor,
12
12
  shouldDeferToNativeMode,
13
13
  wireVerdictFor
14
- } from "./chunk-6HMCOGKJ.js";
14
+ } from "./chunk-VBPASZU7.js";
15
15
 
16
16
  // src/machine-decision-audit.ts
17
17
  import { basename } from "path";
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  defersToNativeMode,
3
3
  reportMachineDenial
4
- } from "./chunk-DBEJIFJD.js";
4
+ } from "./chunk-G4TV5GYU.js";
5
5
  import {
6
6
  isGatingMoment,
7
7
  recordKeylessMoment
8
- } from "./chunk-736I6CBY.js";
8
+ } from "./chunk-UKCRTTKF.js";
9
9
  import {
10
10
  announceSubscriptionRequired,
11
11
  denyReasonFrom,
12
12
  isDeferAnswer,
13
13
  oncePerSession
14
- } from "./chunk-6I4D3XZ3.js";
14
+ } from "./chunk-PCVAK67W.js";
15
15
  import {
16
16
  activeHookSource,
17
17
  activeIdentity
18
- } from "./chunk-DF2FSJ7B.js";
18
+ } from "./chunk-BDL6GJOQ.js";
19
19
  import {
20
20
  DEFAULT_SESSION,
21
21
  UNNAMED_ACTION,
@@ -40,7 +40,7 @@ import {
40
40
  reportEvent,
41
41
  scopePathFor,
42
42
  settleQuestionsForToolUse
43
- } from "./chunk-CW4CF7NU.js";
43
+ } from "./chunk-YCL2V5FD.js";
44
44
  import {
45
45
  askUser,
46
46
  cancelQuestion,
@@ -52,20 +52,20 @@ import {
52
52
  sendNotification,
53
53
  waitForQuestion,
54
54
  waitsForThePhone
55
- } from "./chunk-K5PUP76V.js";
55
+ } from "./chunk-Y2BOLNJV.js";
56
56
  import {
57
57
  SubscriptionRequiredError
58
- } from "./chunk-HILWD7WM.js";
58
+ } from "./chunk-ZNAGS7O7.js";
59
59
  import {
60
60
  getMachineId
61
- } from "./chunk-XJGGGDHX.js";
61
+ } from "./chunk-NBGJ3EOE.js";
62
62
  import {
63
63
  getApiKey,
64
64
  getBaseUrl
65
- } from "./chunk-XQ4HTTBB.js";
65
+ } from "./chunk-4WHNRAOK.js";
66
66
  import {
67
67
  NPX_LATEST_COMMAND
68
- } from "./chunk-LHGB64O2.js";
68
+ } from "./chunk-B6KZME5D.js";
69
69
  import {
70
70
  AGENT_QUESTION_STRATEGY,
71
71
  DECISION_STOP_REASON,
@@ -104,7 +104,7 @@ import {
104
104
  parseAgentQuestions,
105
105
  questionHandedToTheTerminal,
106
106
  resolveGate
107
- } from "./chunk-6HMCOGKJ.js";
107
+ } from "./chunk-VBPASZU7.js";
108
108
 
109
109
  // src/claude-permission-rules.ts
110
110
  import { readFileSync, statSync } from "fs";
@@ -1,12 +1,13 @@
1
1
  import {
2
2
  findExportedKeyLine,
3
+ isAdoptedMacAppKey,
3
4
  keyPrefix,
4
5
  readConfigFileKey,
5
6
  readMacAppKeyPrefix
6
- } from "./chunk-4ABHSCFJ.js";
7
+ } from "./chunk-FH4O3QGQ.js";
7
8
  import {
8
9
  NPX_LATEST_COMMAND
9
- } from "./chunk-LHGB64O2.js";
10
+ } from "./chunk-B6KZME5D.js";
10
11
 
11
12
  // src/key-signed-out.ts
12
13
  var VERDICT_BY_CHECK = {
@@ -18,15 +19,14 @@ var VERDICT_BY_CHECK = {
18
19
  };
19
20
  var activeKeyVerdictOf = (check) => check === null ? "unchecked" : VERDICT_BY_CHECK[check.kind];
20
21
  var NOT_SIGNED_OUT = { kind: "none" };
21
- var isMacAppKey = (key, macAppKeyPrefix) => keyPrefix(key) === macAppKeyPrefix;
22
22
  var diagnoseSignedOutKey = (evidence) => {
23
23
  const adopted = evidence.macAppKeyPrefix;
24
24
  if (evidence.configKey !== null || adopted === null) return NOT_SIGNED_OUT;
25
25
  if (evidence.activeKey !== null) {
26
- if (!isMacAppKey(evidence.activeKey, adopted) || evidence.activeKeyVerdict === "accepted") return NOT_SIGNED_OUT;
26
+ if (!isAdoptedMacAppKey(evidence.activeKey, adopted) || evidence.activeKeyVerdict === "accepted") return NOT_SIGNED_OUT;
27
27
  }
28
28
  const exported = evidence.exportedKey;
29
- return { kind: "signed_out_on_mac", deadExport: exported && isMacAppKey(exported.key, adopted) ? exported : null };
29
+ return { kind: "signed_out_on_mac", deadExport: exported && isAdoptedMacAppKey(exported.key, adopted) ? exported : null };
30
30
  };
31
31
  var SIGNED_OUT_ON_MAC_MESSAGE = "This computer used the key the Pushary Mac app signed in with, and it was signed out on this Mac, so it no longer works here.";
32
32
  var describeSignedOutKey = (diagnosis) => [
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-YJWEQZJC.js";
3
+ } from "./chunk-CEF4UQ3X.js";
4
4
  import {
5
5
  readJsonSafe,
6
6
  writeFileAtomic
7
- } from "./chunk-FT7UNIS3.js";
7
+ } from "./chunk-AQFEP65J.js";
8
8
  import {
9
9
  DECLINED_AGENTS_FILE,
10
10
  DISCONNECT_AGENT_IDS,
@@ -13,7 +13,7 @@ import {
13
13
  serializeDeclinedAgents,
14
14
  withDeclinedAgent,
15
15
  withoutDeclinedAgent
16
- } from "./chunk-6HMCOGKJ.js";
16
+ } from "./chunk-VBPASZU7.js";
17
17
 
18
18
  // src/declined-agents-file.ts
19
19
  import { join } from "path";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  registerTranscript
3
- } from "./chunk-PPAMIQOV.js";
3
+ } from "./chunk-TJ4KMPYO.js";
4
4
  import {
5
5
  namedEvent
6
- } from "./chunk-DF2FSJ7B.js";
6
+ } from "./chunk-BDL6GJOQ.js";
7
7
  import {
8
8
  writeDegraded
9
- } from "./chunk-K5PUP76V.js";
9
+ } from "./chunk-Y2BOLNJV.js";
10
10
  import {
11
11
  claudeShapedHookInput,
12
12
  hookCompatibleProfileBySource
13
- } from "./chunk-6HMCOGKJ.js";
13
+ } from "./chunk-VBPASZU7.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"];
@@ -3,27 +3,27 @@ import {
3
3
  expectedLaunchCapabilities,
4
4
  hasSpawnProvider,
5
5
  resolveControlPolicy
6
- } from "./chunk-DQTBQHB5.js";
6
+ } from "./chunk-Z5EYCMJH.js";
7
7
  import {
8
8
  daemonHasRemoteProof,
9
9
  daemonServiceManagerAvailable,
10
10
  hasDaemonServiceDefinition,
11
11
  readDaemonNeedsLogin,
12
12
  readDaemonStatus
13
- } from "./chunk-HPMP6QQD.js";
13
+ } from "./chunk-L5NPRGVE.js";
14
14
  import {
15
15
  readControlMode,
16
16
  readKeySource
17
- } from "./chunk-4ABHSCFJ.js";
17
+ } from "./chunk-FH4O3QGQ.js";
18
18
  import {
19
19
  getMachineId
20
- } from "./chunk-XJGGGDHX.js";
20
+ } from "./chunk-NBGJ3EOE.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-XQ4HTTBB.js";
23
+ } from "./chunk-4WHNRAOK.js";
24
24
  import {
25
25
  getPackageVersion
26
- } from "./chunk-6HMCOGKJ.js";
26
+ } from "./chunk-VBPASZU7.js";
27
27
 
28
28
  // src/machines.ts
29
29
  import { hostname } from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getBaseUrl
3
- } from "./chunk-XQ4HTTBB.js";
3
+ } from "./chunk-4WHNRAOK.js";
4
4
 
5
5
  // src/transcript-api.ts
6
6
  var fetchTranscriptRecipients = async (apiKey, baseUrl = getBaseUrl()) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PRETOOLUSE_GATED_TOOLS
3
- } from "./chunk-6HMCOGKJ.js";
3
+ } from "./chunk-VBPASZU7.js";
4
4
 
5
5
  // src/claude-tools.ts
6
6
  var POSTTOOLUSE_MIRROR_ONLY_TOOLS = ["TodoWrite", "Task", "WebFetch", "WebSearch"];
@@ -4,30 +4,31 @@ import {
4
4
  } from "./chunk-XHKBHWLX.js";
5
5
  import {
6
6
  readControlMode
7
- } from "./chunk-4ABHSCFJ.js";
7
+ } from "./chunk-FH4O3QGQ.js";
8
8
  import {
9
9
  getMachineId
10
- } from "./chunk-XJGGGDHX.js";
10
+ } from "./chunk-NBGJ3EOE.js";
11
11
  import {
12
12
  pusharyDir,
13
13
  resolveGlobalBinary
14
- } from "./chunk-YJWEQZJC.js";
14
+ } from "./chunk-CEF4UQ3X.js";
15
15
  import {
16
16
  readJsonSafe,
17
17
  writeFileAtomic,
18
18
  writeJsonAtomic,
19
19
  writeJsonAtomicDurable
20
- } from "./chunk-FT7UNIS3.js";
20
+ } from "./chunk-AQFEP65J.js";
21
21
  import {
22
22
  getApiKey
23
- } from "./chunk-XQ4HTTBB.js";
23
+ } from "./chunk-4WHNRAOK.js";
24
24
  import {
25
25
  CLI_PACKAGE_NAMES,
26
26
  cmdShimTarget,
27
27
  getPackageVersion,
28
28
  globalPackageFolder,
29
- globalRootFor
30
- } from "./chunk-6HMCOGKJ.js";
29
+ globalRootFor,
30
+ isRecord
31
+ } from "./chunk-VBPASZU7.js";
31
32
 
32
33
  // src/daemon-lifecycle.ts
33
34
  import { dirname, join, win32 as win32Path } from "path";
@@ -615,7 +616,7 @@ var acquireDaemonLease = (options = {}) => {
615
616
  let currentState = state;
616
617
  const isOwner = () => {
617
618
  const owner = readJsonSafe(lockPath(dir));
618
- return owner.kind === "ok" && owner.value.instanceId === instanceId;
619
+ return owner.kind === "ok" && isRecord(owner.value) && owner.value.instanceId === instanceId;
619
620
  };
620
621
  const updateState = (next) => {
621
622
  if (!isOwner()) return;
@@ -659,7 +660,7 @@ var acquireDaemonLease = (options = {}) => {
659
660
  shouldYield: () => {
660
661
  if (!isOwner()) return true;
661
662
  const target = readJsonSafe(targetPath(dir));
662
- return target.kind === "ok" && (typeof target.value.version === "string" && target.value.version !== installedVersion || isTimestamp(target.value.requestedAt) && Date.parse(target.value.requestedAt) > Date.parse(startedAt));
663
+ return target.kind === "ok" && isRecord(target.value) && (typeof target.value.version === "string" && target.value.version !== installedVersion || isTimestamp(target.value.requestedAt) && Date.parse(target.value.requestedAt) > Date.parse(startedAt));
663
664
  },
664
665
  release: () => {
665
666
  if (!isOwner()) return;
@@ -3,11 +3,11 @@ import {
3
3
  decodePublicKey,
4
4
  generateSessionKey,
5
5
  wrapSessionKey
6
- } from "./chunk-XGHXQUDG.js";
6
+ } from "./chunk-6WINXCXY.js";
7
7
  import {
8
8
  fetchTranscriptRecipients,
9
9
  uploadTranscriptRecords
10
- } from "./chunk-ATDOYZXC.js";
10
+ } from "./chunk-IM7EGZVH.js";
11
11
 
12
12
  // src/live-session.ts
13
13
  var MAX_TRANSCRIPT_QUEUE = 100;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-YJWEQZJC.js";
3
+ } from "./chunk-CEF4UQ3X.js";
4
4
  import {
5
5
  writeFileAtomic
6
- } from "./chunk-FT7UNIS3.js";
6
+ } from "./chunk-AQFEP65J.js";
7
7
 
8
8
  // src/identity.ts
9
9
  import { randomUUID } from "crypto";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  configFilePath
3
- } from "./chunk-XQ4HTTBB.js";
3
+ } from "./chunk-4WHNRAOK.js";
4
4
  import {
5
5
  normalizeInstallSource
6
- } from "./chunk-6HMCOGKJ.js";
6
+ } from "./chunk-VBPASZU7.js";
7
7
 
8
8
  // src/install-source.ts
9
9
  import { readFileSync } from "fs";
@@ -20,7 +20,7 @@ var revokeAgentKey = async (apiKey, baseUrl, fetchImpl) => {
20
20
  });
21
21
  if (!response.ok) return { kind: "refused", status: response.status };
22
22
  const revoked = await readRevokedCount(response);
23
- if (revoked === null) return { kind: "refused", status: response.status };
23
+ if (revoked === null) return { kind: "unconfirmed", status: response.status };
24
24
  return revoked > 0 ? { kind: "revoked" } : { kind: "not_accepted" };
25
25
  };
26
26
  var revokeOwnKey = async (apiKey, baseUrl, fetchImpl = fetch) => {
@@ -42,10 +42,11 @@ var REVOKE_DETAIL = {
42
42
  revoked: "Revoked the key on pushary.com.",
43
43
  not_accepted: "pushary.com had already stopped accepting the key.",
44
44
  refused: "pushary.com refused to revoke the key",
45
+ unconfirmed: "pushary.com did not confirm the key was revoked",
45
46
  unreachable: "Could not reach pushary.com to revoke the key"
46
47
  };
47
48
  var describeRevokeAttempt = (attempt) => {
48
- if (attempt.kind === "refused") return `${REVOKE_DETAIL.refused} (HTTP ${attempt.status}).`;
49
+ if (attempt.kind === "refused" || attempt.kind === "unconfirmed") return `${REVOKE_DETAIL[attempt.kind]} (HTTP ${attempt.status}).`;
49
50
  if (attempt.kind === "unreachable") return `${REVOKE_DETAIL.unreachable}: ${attempt.detail}`;
50
51
  return REVOKE_DETAIL[attempt.kind];
51
52
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SETUP_FLAGS
3
- } from "./chunk-YONHM5BQ.js";
3
+ } from "./chunk-247PAUW6.js";
4
4
  import {
5
5
  parseFlags
6
6
  } from "./chunk-GMXKITVA.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-7QLSKOSU.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-LHGB64O2.js";
12
+ } from "./chunk-B6KZME5D.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-6HMCOGKJ.js";
20
+ } from "./chunk-VBPASZU7.js";
21
21
 
22
22
  // src/cli/cowork.ts
23
23
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-CW4CF7NU.js";
3
+ } from "./chunk-YCL2V5FD.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var denyReasonFrom = (value, note) => {
@@ -2,23 +2,23 @@ import {
2
2
  CLAUDE_HOOK_EVENTS,
3
3
  GEMINI_HOOK_EVENTS,
4
4
  hasGeminiHooks
5
- } from "./chunk-VOIN2NZW.js";
5
+ } from "./chunk-YLLGKY7K.js";
6
6
  import {
7
7
  AGENT_CHOICES
8
- } from "./chunk-YONHM5BQ.js";
8
+ } from "./chunk-247PAUW6.js";
9
9
  import {
10
10
  BELL_HOOK_BINARY
11
- } from "./chunk-MMIN6VNU.js";
11
+ } from "./chunk-AXBFNQG6.js";
12
12
  import {
13
13
  CODEX_HOOK_EVENTS,
14
14
  hasCodexHooks,
15
15
  holdBudgetOf
16
- } from "./chunk-YJWEQZJC.js";
16
+ } from "./chunk-CEF4UQ3X.js";
17
17
  import {
18
18
  CURSOR_GATE_EVENTS,
19
19
  HOOK_LOCATOR_BINARY,
20
20
  hookCommandHoldBudget
21
- } from "./chunk-6HMCOGKJ.js";
21
+ } from "./chunk-VBPASZU7.js";
22
22
 
23
23
  // src/diagnostics/bridge.ts
24
24
  import { execFileSync } from "child_process";
@@ -228,14 +228,6 @@ var hasAppCommand = (value) => commandsIn(value).some((command) => {
228
228
  const executable = pusharyHookExecutable(command);
229
229
  return executable !== null && isBridgeLocator(executable);
230
230
  });
231
- var mcpBearerKey = (document, containerKey, headersKey) => {
232
- const servers = isRecord(document?.[containerKey]) ? document[containerKey] : null;
233
- const pushary = isRecord(servers?.pushary) ? servers.pushary : null;
234
- const headers = isRecord(pushary?.[headersKey]) ? pushary[headersKey] : null;
235
- const authorization = headers?.Authorization;
236
- const match = typeof authorization === "string" ? authorization.trim().match(/^Bearer\s+(\S+)$/) : null;
237
- return match?.[1] ?? null;
238
- };
239
231
  var captureMcpServer = (document, containerKey) => {
240
232
  const container = document[containerKey];
241
233
  const servers = isRecord(container) ? container : null;
@@ -347,7 +339,6 @@ export {
347
339
  holdsLong,
348
340
  describeOtherHolder,
349
341
  describeHoldSentence,
350
- mcpBearerKey,
351
342
  captureMcpServer,
352
343
  restoreMcpServer,
353
344
  captureHookTakeover,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-XVNZHIVF.js";
3
+ } from "./chunk-BERMVODT.js";
4
4
  import {
5
5
  codexHomeFrom,
6
6
  resolvePathBinary
7
- } from "./chunk-YJWEQZJC.js";
7
+ } from "./chunk-CEF4UQ3X.js";
8
8
  import {
9
9
  HOOK_COMPATIBLE_PROFILES
10
- } from "./chunk-6HMCOGKJ.js";
10
+ } from "./chunk-VBPASZU7.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
  CODEX_HOOK_STATUS
3
- } from "./chunk-XDKZZSU6.js";
3
+ } from "./chunk-Y6PZ3B5U.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-LHGB64O2.js";
6
+ } from "./chunk-B6KZME5D.js";
7
7
 
8
8
  // src/setup/codex-trust.ts
9
9
  var CODEX_TRUST_TELEMETRY = {