pushary 1.9.249 → 1.9.252

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 (154) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +6 -16
  3. package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
  4. package/data/cursor-plugin/CHANGELOG.md +4 -0
  5. package/data/cursor-plugin/README.md +2 -2
  6. package/data/cursor-plugin/scripts/pushary-gate.mjs +1 -1
  7. package/data/openclaw-plugin/README.md +7 -2
  8. package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
  9. package/data/vscode-plugin/CHANGELOG.md +4 -0
  10. package/data/vscode-plugin/README.md +2 -2
  11. package/data/vscode-plugin/scripts/pushary-gate.mjs +1 -5
  12. package/dist/{api-NCCKFLNT.js → api-B3CCB7XF.js} +11 -11
  13. package/dist/bin/pushary-audit.js +3 -3
  14. package/dist/bin/pushary-bell-hook.js +29 -28
  15. package/dist/bin/pushary-bell.js +12 -12
  16. package/dist/bin/pushary-calls.js +15 -15
  17. package/dist/bin/pushary-claude.js +26 -26
  18. package/dist/bin/pushary-clean.js +43 -41
  19. package/dist/bin/pushary-codex-bridge.js +23 -23
  20. package/dist/bin/pushary-codex-hook.js +35 -34
  21. package/dist/bin/pushary-codex-session.js +8 -8
  22. package/dist/bin/pushary-codex.js +16 -16
  23. package/dist/bin/pushary-connect.js +36 -35
  24. package/dist/bin/pushary-cowork.js +5 -5
  25. package/dist/bin/pushary-daemon.js +47 -46
  26. package/dist/bin/pushary-disconnect.js +31 -30
  27. package/dist/bin/pushary-display-hook.js +306 -29
  28. package/dist/bin/pushary-doctor.js +48 -47
  29. package/dist/bin/pushary-elicitation-hook.js +28 -27
  30. package/dist/bin/pushary-gemini-bridge.js +18 -18
  31. package/dist/bin/pushary-gemini-hook.js +32 -31
  32. package/dist/bin/pushary-hook.js +36 -35
  33. package/dist/bin/pushary-login.js +23 -23
  34. package/dist/bin/pushary-logout.js +32 -31
  35. package/dist/bin/pushary-mcp.js +12 -12
  36. package/dist/bin/pushary-mode.js +16 -16
  37. package/dist/bin/pushary-notification-hook.js +28 -27
  38. package/dist/bin/pushary-opencode-bridge.js +22 -22
  39. package/dist/bin/pushary-opencode-hook.js +33 -32
  40. package/dist/bin/pushary-permission-denied-hook.js +35 -34
  41. package/dist/bin/pushary-permission-hook.js +36 -35
  42. package/dist/bin/pushary-post-hook.js +29 -28
  43. package/dist/bin/pushary-prompt-hook.js +28 -27
  44. package/dist/bin/pushary-session-end-hook.js +28 -27
  45. package/dist/bin/pushary-session-start-hook.js +40 -39
  46. package/dist/bin/pushary-sessions.js +12 -12
  47. package/dist/bin/pushary-setup.js +93 -71
  48. package/dist/bin/pushary-stats.js +5 -5
  49. package/dist/bin/pushary-status.js +37 -36
  50. package/dist/bin/pushary-stop-hook.js +28 -27
  51. package/dist/bin/pushary-stopfailure-hook.js +28 -27
  52. package/dist/bin/pushary-suggestions.js +16 -16
  53. package/dist/bin/pushary-transcript-register.js +17 -17
  54. package/dist/bin/pushary-transcripts.js +26 -26
  55. package/dist/bin/pushary-upgrade.js +48 -47
  56. package/dist/bin/pushary-wait.js +16 -16
  57. package/dist/bin/pushary.js +7 -7
  58. package/dist/{chunk-QLKUYP7Z.js → chunk-24MGJAU6.js} +1 -1
  59. package/dist/{chunk-WYIJA2GH.js → chunk-2ODXKLNT.js} +4 -4
  60. package/dist/{chunk-UNATZHHI.js → chunk-2U735XOK.js} +5 -5
  61. package/dist/{chunk-TM3WECNP.js → chunk-2XVTJAYB.js} +5 -5
  62. package/dist/{chunk-NLAT5MMY.js → chunk-3HGWR547.js} +12 -5
  63. package/dist/{chunk-XJR2JCWQ.js → chunk-3REBHADE.js} +6 -6
  64. package/dist/{chunk-2E23LSLT.js → chunk-4LTASS5P.js} +1 -1
  65. package/dist/{chunk-YRIECI5K.js → chunk-5IHGO436.js} +4 -4
  66. package/dist/{chunk-7SIC6DRK.js → chunk-5KYAO2GI.js} +6 -6
  67. package/dist/chunk-5LK3UY46.js +30 -0
  68. package/dist/{chunk-VSPTVHE2.js → chunk-5SRTZJ2A.js} +8 -8
  69. package/dist/{chunk-IA44JTLJ.js → chunk-5UXIPTWM.js} +2 -2
  70. package/dist/{chunk-USMEX5WO.js → chunk-6DQOFD25.js} +1 -1
  71. package/dist/{chunk-GFGSIDHQ.js → chunk-6HGAY3R6.js} +8 -29
  72. package/dist/{chunk-MAXV4AZR.js → chunk-6JVSKDBD.js} +2 -2
  73. package/dist/{chunk-TTUKVQTQ.js → chunk-6LB7PZLK.js} +3 -3
  74. package/dist/{chunk-ZPSLQQ4F.js → chunk-6OSGECAY.js} +6 -6
  75. package/dist/{chunk-KIYUQ2XZ.js → chunk-6S6ASGR3.js} +3 -3
  76. package/dist/{chunk-QTXUETWK.js → chunk-76NDZYJU.js} +12 -10
  77. package/dist/{chunk-BZJ22MT6.js → chunk-7D25WOPT.js} +1 -1
  78. package/dist/{chunk-PNZPLFKE.js → chunk-7OF777EU.js} +57 -18
  79. package/dist/{chunk-WE7TYQVB.js → chunk-AKHCR2EY.js} +3 -3
  80. package/dist/{chunk-Y4R3NQQG.js → chunk-AOPSJHTB.js} +4 -4
  81. package/dist/{chunk-GPGUGAO7.js → chunk-AYVW4G3V.js} +1 -1
  82. package/dist/{chunk-FJBU6OWM.js → chunk-BWDQ4WOH.js} +2 -2
  83. package/dist/{chunk-QLHSLYOR.js → chunk-C75GX2HY.js} +5 -5
  84. package/dist/{chunk-33IFGELL.js → chunk-CIJG74KZ.js} +1 -1
  85. package/dist/{chunk-BMVNMKVL.js → chunk-CVVHT4KY.js} +3 -3
  86. package/dist/{chunk-4QTDUXS5.js → chunk-CZ4EG35M.js} +1 -1
  87. package/dist/{chunk-MGKF5FLQ.js → chunk-DD5EW5IL.js} +7 -4
  88. package/dist/{chunk-WILH4LFK.js → chunk-DYTDYNKC.js} +6 -6
  89. package/dist/{chunk-UWVA7YWR.js → chunk-E5CTDUSW.js} +5 -5
  90. package/dist/{chunk-AKT3UR6S.js → chunk-ECXLAR6D.js} +2 -2
  91. package/dist/{chunk-QR2OSVGC.js → chunk-EIZXYIOM.js} +2 -2
  92. package/dist/{chunk-LRCWZNYY.js → chunk-EQ6VOXZU.js} +5 -5
  93. package/dist/{chunk-OD2I3DD6.js → chunk-EQDLUHZJ.js} +3 -3
  94. package/dist/{chunk-ZQYYPDFT.js → chunk-ERYXHBTE.js} +5 -5
  95. package/dist/{chunk-ACG4HJ27.js → chunk-FM4ULVPT.js} +1 -1
  96. package/dist/{chunk-3BFJF63Q.js → chunk-G5DP6O5R.js} +5 -5
  97. package/dist/{chunk-NFYD5TJK.js → chunk-GFFNJ3DO.js} +2 -2
  98. package/dist/{chunk-AV5QS5FQ.js → chunk-GK2EYDF2.js} +4 -4
  99. package/dist/{chunk-KFRYGJS5.js → chunk-GKT2SRRG.js} +4 -4
  100. package/dist/{chunk-3PWAFQCI.js → chunk-GM4CMN4A.js} +1 -1
  101. package/dist/{chunk-YONUK2EY.js → chunk-GQLHV36Q.js} +1 -1
  102. package/dist/{chunk-DRLY2ELW.js → chunk-IFQROMKD.js} +2 -2
  103. package/dist/{chunk-MQGFUEYG.js → chunk-IXLXPPSD.js} +1 -1
  104. package/dist/{chunk-S5VZAJZC.js → chunk-JIZNXYN5.js} +2 -2
  105. package/dist/{chunk-RRUZZQ74.js → chunk-JPHYKF6V.js} +5 -5
  106. package/dist/{chunk-JZCSXMWF.js → chunk-K3VUIJLP.js} +4 -4
  107. package/dist/{chunk-4E3KK4PH.js → chunk-L4ANPJUH.js} +3 -3
  108. package/dist/{chunk-5Y7CYSQO.js → chunk-LI7OGANI.js} +2 -2
  109. package/dist/{chunk-5L7YJPS2.js → chunk-LM7GN5SQ.js} +1 -1
  110. package/dist/{chunk-GISC7J7K.js → chunk-M4ZP7SGR.js} +1 -1
  111. package/dist/{chunk-V4DMA2GT.js → chunk-M773UCGU.js} +1 -1
  112. package/dist/{chunk-3S4OKDZR.js → chunk-MNUJYXAH.js} +1 -1
  113. package/dist/{chunk-K63QVFSB.js → chunk-MWYQVXAS.js} +4 -4
  114. package/dist/{chunk-AKGJQEGR.js → chunk-N7RKXLJR.js} +1 -1
  115. package/dist/{chunk-DT6NJLC3.js → chunk-NMADZVTC.js} +1 -1
  116. package/dist/{chunk-VUDAFOQU.js → chunk-NXKCIKW6.js} +16 -16
  117. package/dist/{chunk-FM7FNY5J.js → chunk-O5BD64JZ.js} +1 -1
  118. package/dist/{chunk-UE5QZNZO.js → chunk-P2CXRTW4.js} +7 -7
  119. package/dist/{chunk-SYYPELYT.js → chunk-Q3YKGLZ6.js} +2 -2
  120. package/dist/{chunk-SVHLXOER.js → chunk-QZESFXVG.js} +4 -4
  121. package/dist/{chunk-FS4VJTFC.js → chunk-R4JAJBHJ.js} +1 -1
  122. package/dist/{chunk-NLHVEM3C.js → chunk-RDRUCPFL.js} +7 -7
  123. package/dist/{chunk-UXXYHW6B.js → chunk-SJ2UBLL7.js} +2 -2
  124. package/dist/{chunk-ZCRO6HW2.js → chunk-SJWGQ5LF.js} +3 -3
  125. package/dist/{chunk-BDMNQBP4.js → chunk-SZMGZ3C5.js} +458 -65
  126. package/dist/{chunk-KT7COQH2.js → chunk-SZXRQXXN.js} +3 -3
  127. package/dist/{chunk-G76IPLDX.js → chunk-UKQ5MEOA.js} +1 -1
  128. package/dist/{chunk-3DGOI6YH.js → chunk-V2FIT7FQ.js} +5 -5
  129. package/dist/{chunk-NC24UL7K.js → chunk-VA573E2C.js} +1 -1
  130. package/dist/{chunk-DIGV5AQW.js → chunk-VAAODK2Q.js} +4 -4
  131. package/dist/{chunk-PFN76FSF.js → chunk-VFZEUKWI.js} +1 -1
  132. package/dist/{chunk-2R2LXG6H.js → chunk-VMUXNGA7.js} +11 -11
  133. package/dist/{chunk-S7CJ2L7L.js → chunk-WSROHGWN.js} +12 -12
  134. package/dist/{chunk-X37REV7T.js → chunk-XB4GIETP.js} +1 -1
  135. package/dist/{chunk-NQ6KV722.js → chunk-XCGE5N3Z.js} +2 -2
  136. package/dist/{chunk-ZGA2LFVD.js → chunk-XKF5SCK3.js} +3 -3
  137. package/dist/{chunk-IR6ZNTDK.js → chunk-XU4SUZX3.js} +10 -10
  138. package/dist/{chunk-FZBLNBFS.js → chunk-XY24PHAC.js} +6 -6
  139. package/dist/{chunk-WGZFBSXM.js → chunk-ZA4AJIOD.js} +3 -3
  140. package/dist/{codex-app-cards-switch-J3AR3LN3.js → codex-app-cards-switch-FBXQXZ4I.js} +14 -11
  141. package/dist/{codex-card-routing-K6LLM4TA.js → codex-card-routing-5CT7DOHG.js} +2 -2
  142. package/dist/{codex-desktop-launch-FK53DJ36.js → codex-desktop-launch-AYVX5Y6L.js} +3 -3
  143. package/dist/{codex-session-launch-PY52DUMW.js → codex-session-launch-UM3D3IX4.js} +20 -20
  144. package/dist/{config-2NISBOJX.js → config-SZ2H3UZ3.js} +3 -3
  145. package/dist/{global-upgrade-2CK75GFZ.js → global-upgrade-26NPVCAL.js} +9 -9
  146. package/dist/{identity-T2EYYWQJ.js → identity-5A6DVNBA.js} +4 -4
  147. package/dist/{live-capabilities-V4LJIPMB.js → live-capabilities-3MRTSUZ4.js} +4 -4
  148. package/dist/{paths-XULGFNML.js → paths-ZLR4ZVF4.js} +3 -3
  149. package/dist/reapply-T37X6H55.js +76 -0
  150. package/dist/src/index.js +34 -33
  151. package/dist/{upgrade-lock-TPOCYNQ3.js → upgrade-lock-27EWUBDP.js} +4 -4
  152. package/dist/{usage-SMB3WYHN.js → usage-ZZMBG3QZ.js} +3 -3
  153. package/package.json +2 -1
  154. package/dist/reapply-KAEIPK36.js +0 -75
@@ -5,13 +5,13 @@ import {
5
5
  } from "./chunk-OYIN77HO.js";
6
6
  import {
7
7
  readMacAppAgentKey
8
- } from "./chunk-AV5QS5FQ.js";
8
+ } from "./chunk-GK2EYDF2.js";
9
9
  import {
10
10
  API_KEYS_PATH
11
- } from "./chunk-UXXYHW6B.js";
11
+ } from "./chunk-SJ2UBLL7.js";
12
12
  import {
13
13
  absoluteUrl
14
- } from "./chunk-WGZFBSXM.js";
14
+ } from "./chunk-ZA4AJIOD.js";
15
15
  import {
16
16
  findExportedKeyLines,
17
17
  isAdoptedMacAppKey,
@@ -21,10 +21,10 @@ import {
21
21
  readConfigFileKey,
22
22
  readKeySource,
23
23
  readMacAppKeyPrefix
24
- } from "./chunk-KIYUQ2XZ.js";
24
+ } from "./chunk-6S6ASGR3.js";
25
25
  import {
26
26
  isValidApiKey
27
- } from "./chunk-BDMNQBP4.js";
27
+ } from "./chunk-SZMGZ3C5.js";
28
28
 
29
29
  // src/cli/held-key-revocation.ts
30
30
  var readCliHeldKeys = (profiles) => {
@@ -16,7 +16,7 @@ import {
16
16
  uninstallOpenClawPlugin,
17
17
  unsetOpenClawEntry,
18
18
  writeOpenClawEntry
19
- } from "./chunk-MGKF5FLQ.js";
19
+ } from "./chunk-DD5EW5IL.js";
20
20
  import {
21
21
  needsShell
22
22
  } from "./chunk-3PSNUHC5.js";
@@ -28,10 +28,10 @@ import {
28
28
  openClawDirectoriesToLookIn,
29
29
  openClawPluginFolder,
30
30
  openClawSetupReceiptDirectory
31
- } from "./chunk-NQ6KV722.js";
31
+ } from "./chunk-XCGE5N3Z.js";
32
32
  import {
33
33
  resolvePathBinary
34
- } from "./chunk-K63QVFSB.js";
34
+ } from "./chunk-MWYQVXAS.js";
35
35
  import {
36
36
  readJsonSafe,
37
37
  writeJsonAtomic
@@ -42,7 +42,7 @@ import {
42
42
  } from "./chunk-CXQWDQCJ.js";
43
43
  import {
44
44
  isRecord
45
- } from "./chunk-BDMNQBP4.js";
45
+ } from "./chunk-SZMGZ3C5.js";
46
46
 
47
47
  // src/hermes/plugin-payload.ts
48
48
  import { createHash } from "crypto";
@@ -3712,6 +3712,7 @@ var removeHermesWiring = async (request) => {
3712
3712
  };
3713
3713
 
3714
3714
  // src/openclaw/install.ts
3715
+ import JSON5 from "json5";
3715
3716
  import { createHash as createHash3 } from "crypto";
3716
3717
  import { existsSync as existsSync4, readdirSync as readdirSync2, rmSync as rmSync4 } from "fs";
3717
3718
  import { join as join3 } from "path";
@@ -3972,7 +3973,13 @@ var pusharyPluginOnDisk = (environment) => {
3972
3973
  if (existsSync4(join3(where.stateDirectory, OPENCLAW_EXTENSIONS_FOLDER, OPENCLAW_PLUGIN_ID))) return "present";
3973
3974
  const config = readJsonSafe(where.configFile);
3974
3975
  if (config.kind === "missing") return "absent";
3975
- return config.kind === "ok" ? pusharyPluginInOpenClawConfig(config.value) : "unreadable";
3976
+ if (config.kind === "ok") return pusharyPluginInOpenClawConfig(config.value);
3977
+ if (config.kind !== "unparseable") return "unreadable";
3978
+ try {
3979
+ return pusharyPluginInOpenClawConfig(JSON5.parse(config.raw));
3980
+ } catch {
3981
+ return "unreadable";
3982
+ }
3976
3983
  };
3977
3984
  var neverSetUpHere = (receipt, environment) => receipt.kind === "missing" && pusharyPluginOnDisk(environment) === "absent";
3978
3985
  var removeFromOneOpenClaw = async (target, request) => {
@@ -8,21 +8,21 @@ import {
8
8
  SubscriptionRequiredError,
9
9
  callMcpTool,
10
10
  isRetryable
11
- } from "./chunk-UNATZHHI.js";
11
+ } from "./chunk-2U735XOK.js";
12
12
  import {
13
13
  fetchAsCredential
14
- } from "./chunk-V4DMA2GT.js";
14
+ } from "./chunk-M773UCGU.js";
15
15
  import {
16
16
  installNetworkDefaults,
17
17
  isNetworkFailure
18
- } from "./chunk-WE7TYQVB.js";
18
+ } from "./chunk-AKHCR2EY.js";
19
19
  import {
20
20
  clientReportClaims
21
- } from "./chunk-NQ6KV722.js";
21
+ } from "./chunk-XCGE5N3Z.js";
22
22
  import {
23
23
  getApiKey,
24
24
  getBaseUrl
25
- } from "./chunk-IA44JTLJ.js";
25
+ } from "./chunk-5UXIPTWM.js";
26
26
  import {
27
27
  ASK_AGENT_NAME_MAX,
28
28
  CLIENT_REPORT_PATH,
@@ -40,7 +40,7 @@ import {
40
40
  isRecord,
41
41
  truncateLine,
42
42
  waitEndAnswered
43
- } from "./chunk-BDMNQBP4.js";
43
+ } from "./chunk-SZMGZ3C5.js";
44
44
 
45
45
  // src/api.ts
46
46
  import { randomUUID } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  renderCommandHelp
3
- } from "./chunk-NC24UL7K.js";
3
+ } from "./chunk-VA573E2C.js";
4
4
  import {
5
5
  EXIT
6
6
  } from "./chunk-BG4HHB7E.js";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS,
3
3
  HERMES_HISTORY_HELPER_COMMAND
4
- } from "./chunk-ZGA2LFVD.js";
4
+ } from "./chunk-XKF5SCK3.js";
5
5
  import {
6
6
  HERMES_ALWAYS_ALLOWED_SHELL_RULE,
7
7
  HERMES_COMMAND_ALLOWLIST_KEY,
8
8
  HERMES_GATE_TOOLS_KEY,
9
9
  HERMES_SHELL_TOOL
10
- } from "./chunk-NLAT5MMY.js";
10
+ } from "./chunk-3HGWR547.js";
11
11
  import {
12
12
  retryAgentCommand
13
- } from "./chunk-TTUKVQTQ.js";
13
+ } from "./chunk-6LB7PZLK.js";
14
14
  import {
15
15
  NPX_LATEST_COMMAND
16
- } from "./chunk-NC24UL7K.js";
16
+ } from "./chunk-VA573E2C.js";
17
17
 
18
18
  // src/setup/codex-trust.ts
19
19
  var CODEX_TRUST_TELEMETRY = {
@@ -3,10 +3,10 @@ import {
3
3
  forkFinishWithUpgradeLock,
4
4
  installWithUpgradeLock,
5
5
  releaseAutoUpdateLock
6
- } from "./chunk-QR2OSVGC.js";
6
+ } from "./chunk-EIZXYIOM.js";
7
7
  import {
8
8
  phoneStartIsRequired
9
- } from "./chunk-4E3KK4PH.js";
9
+ } from "./chunk-L4ANPJUH.js";
10
10
  import {
11
11
  describeAutoUpdateCheck,
12
12
  globalInstallLocation,
@@ -18,12 +18,12 @@ import {
18
18
  readAutoUpdateState,
19
19
  updateAutoUpdateState,
20
20
  upgradeEntryFor
21
- } from "./chunk-SYYPELYT.js";
21
+ } from "./chunk-Q3YKGLZ6.js";
22
22
  import {
23
23
  autoUpdateLock,
24
24
  autoUpdateLog,
25
25
  autoUpdateState
26
- } from "./chunk-NQ6KV722.js";
26
+ } from "./chunk-XCGE5N3Z.js";
27
27
  import {
28
28
  describeReleaseNpmHolds,
29
29
  execNpm,
@@ -33,10 +33,10 @@ import {
33
33
  npmExitedOnReleaseAge,
34
34
  readGlobalCliInstallAt,
35
35
  readGlobalPrefix
36
- } from "./chunk-K63QVFSB.js";
36
+ } from "./chunk-MWYQVXAS.js";
37
37
  import {
38
38
  NPX_LATEST_COMMAND
39
- } from "./chunk-NC24UL7K.js";
39
+ } from "./chunk-VA573E2C.js";
40
40
  import {
41
41
  EXIT
42
42
  } from "./chunk-BG4HHB7E.js";
@@ -0,0 +1,30 @@
1
+ import {
2
+ isRecord
3
+ } from "./chunk-SZMGZ3C5.js";
4
+
5
+ // src/config-document.ts
6
+ import { parse, stringify } from "smol-toml";
7
+ var parseConfigDocument = (text, format) => {
8
+ if (text === null) return { kind: "missing" };
9
+ try {
10
+ const value = format === "toml" ? parse(text) : JSON.parse(text);
11
+ return isRecord(value) ? { kind: "parsed", value } : { kind: "unreadable" };
12
+ } catch {
13
+ return { kind: "unreadable" };
14
+ }
15
+ };
16
+ var readConfigDocument = (path, format, files) => {
17
+ try {
18
+ return parseConfigDocument(files.read(path), format);
19
+ } catch {
20
+ return { kind: "unreadable" };
21
+ }
22
+ };
23
+ var serializeConfigDocument = (value, format) => format === "toml" ? stringify(value) : `${JSON.stringify(value, null, 2)}
24
+ `;
25
+
26
+ export {
27
+ parseConfigDocument,
28
+ readConfigDocument,
29
+ serializeConfigDocument
30
+ };
@@ -6,17 +6,17 @@ import {
6
6
  postLiveSession,
7
7
  postLiveSessionUntilAccepted,
8
8
  startLiveSessionHeartbeat
9
- } from "./chunk-BZJ22MT6.js";
9
+ } from "./chunk-7D25WOPT.js";
10
10
  import {
11
11
  CommandReceipts,
12
12
  controllerCommandSchema
13
- } from "./chunk-PFN76FSF.js";
13
+ } from "./chunk-VFZEUKWI.js";
14
14
  import {
15
15
  SESSION_IDLE_TIMEOUT_MS,
16
16
  describeIdleWindow,
17
17
  idleDeadlinePassed,
18
18
  startProcessOwnership
19
- } from "./chunk-5Y7CYSQO.js";
19
+ } from "./chunk-LI7OGANI.js";
20
20
  import {
21
21
  spawnClaude
22
22
  } from "./chunk-3PSNUHC5.js";
@@ -25,18 +25,18 @@ import {
25
25
  isWaitForAnswerResponse,
26
26
  withdrawQuestion,
27
27
  writeDegraded
28
- } from "./chunk-XJR2JCWQ.js";
28
+ } from "./chunk-3REBHADE.js";
29
29
  import {
30
30
  readCommandAck
31
- } from "./chunk-X37REV7T.js";
31
+ } from "./chunk-XB4GIETP.js";
32
32
  import {
33
33
  callMcpTool,
34
34
  isRetryable
35
- } from "./chunk-UNATZHHI.js";
35
+ } from "./chunk-2U735XOK.js";
36
36
  import {
37
37
  projectNameFor,
38
38
  repositoryScopeFor
39
- } from "./chunk-FS4VJTFC.js";
39
+ } from "./chunk-R4JAJBHJ.js";
40
40
  import {
41
41
  AGENT_QUESTION_DESCRIPTION_MAX,
42
42
  AGENT_QUESTION_HEADER_MAX,
@@ -58,7 +58,7 @@ import {
58
58
  parseCodexQuestions,
59
59
  planElicitationAsk,
60
60
  readElicitationFields
61
- } from "./chunk-BDMNQBP4.js";
61
+ } from "./chunk-SZMGZ3C5.js";
62
62
 
63
63
  // src/codex-question-owner.ts
64
64
  import { createHash } from "crypto";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-NC24UL7K.js";
3
+ } from "./chunk-VA573E2C.js";
4
4
  import {
5
5
  isValidApiKey
6
- } from "./chunk-BDMNQBP4.js";
6
+ } from "./chunk-SZMGZ3C5.js";
7
7
 
8
8
  // src/config.ts
9
9
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-NQ6KV722.js";
3
+ } from "./chunk-XCGE5N3Z.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -1,13 +1,16 @@
1
+ import {
2
+ parseConfigDocument
3
+ } from "./chunk-5LK3UY46.js";
1
4
  import {
2
5
  addGeminiMcpServer,
3
6
  removeGeminiMcpServer
4
- } from "./chunk-WYIJA2GH.js";
7
+ } from "./chunk-2ODXKLNT.js";
5
8
  import {
6
9
  CLAUDE_CODE_AGENT
7
- } from "./chunk-2R2LXG6H.js";
10
+ } from "./chunk-VMUXNGA7.js";
8
11
  import {
9
12
  compatibleToolLookup
10
- } from "./chunk-MQGFUEYG.js";
13
+ } from "./chunk-IXLXPPSD.js";
11
14
  import {
12
15
  CLAUDE_HOOK_EVENTS,
13
16
  PUSHARY_MCP_URL,
@@ -19,7 +22,7 @@ import {
19
22
  isPusharyHook,
20
23
  registerHookEntry,
21
24
  removeClaudeMcpServers
22
- } from "./chunk-NQ6KV722.js";
25
+ } from "./chunk-XCGE5N3Z.js";
23
26
  import {
24
27
  AGENT_ENFORCEMENT,
25
28
  HOOK_COMPATIBLE_PROFILES,
@@ -33,28 +36,7 @@ import {
33
36
  pusharyMissingReason,
34
37
  refusalOutput,
35
38
  withHookHoldBudget
36
- } from "./chunk-BDMNQBP4.js";
37
-
38
- // src/config-document.ts
39
- import { parse, stringify } from "smol-toml";
40
- var parseConfigDocument = (text, format) => {
41
- if (text === null) return { kind: "missing" };
42
- try {
43
- const value = format === "toml" ? parse(text) : JSON.parse(text);
44
- return isRecord(value) ? { kind: "parsed", value } : { kind: "unreadable" };
45
- } catch {
46
- return { kind: "unreadable" };
47
- }
48
- };
49
- var readConfigDocument = (path, format, files) => {
50
- try {
51
- return parseConfigDocument(files.read(path), format);
52
- } catch {
53
- return { kind: "unreadable" };
54
- }
55
- };
56
- var serializeConfigDocument = (value, format) => format === "toml" ? stringify(value) : `${JSON.stringify(value, null, 2)}
57
- `;
39
+ } from "./chunk-SZMGZ3C5.js";
58
40
 
59
41
  // src/compatible-config.ts
60
42
  import { homedir } from "os";
@@ -372,9 +354,6 @@ var removeCompatibleMcpServer = (config, profile) => {
372
354
  };
373
355
 
374
356
  export {
375
- parseConfigDocument,
376
- readConfigDocument,
377
- serializeConfigDocument,
378
357
  hasCompatibleMcpServer,
379
358
  profileFromArgv,
380
359
  activeIdentity,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  configFilePath
3
- } from "./chunk-IA44JTLJ.js";
3
+ } from "./chunk-5UXIPTWM.js";
4
4
  import {
5
5
  normalizeInstallSource
6
- } from "./chunk-BDMNQBP4.js";
6
+ } from "./chunk-SZMGZ3C5.js";
7
7
 
8
8
  // src/install-source.ts
9
9
  import { readFileSync } from "fs";
@@ -4,16 +4,16 @@ import {
4
4
  NpmMissingError,
5
5
  NpmPermissionError,
6
6
  NpmReleaseAgeError
7
- } from "./chunk-K63QVFSB.js";
7
+ } from "./chunk-MWYQVXAS.js";
8
8
  import {
9
9
  writeFileAtomic
10
10
  } from "./chunk-PM2NRK6Y.js";
11
11
  import {
12
12
  NPX_LATEST_COMMAND
13
- } from "./chunk-NC24UL7K.js";
13
+ } from "./chunk-VA573E2C.js";
14
14
  import {
15
15
  readSetupAgentFailures
16
- } from "./chunk-BDMNQBP4.js";
16
+ } from "./chunk-SZMGZ3C5.js";
17
17
 
18
18
  // src/setup/config-write.ts
19
19
  var AgentConfigWriteError = class extends Error {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  APPROVAL_RULES_PATH,
3
3
  canChangeApprovalSettings
4
- } from "./chunk-UXXYHW6B.js";
4
+ } from "./chunk-SJ2UBLL7.js";
5
5
  import {
6
6
  callMcpTool
7
- } from "./chunk-UNATZHHI.js";
7
+ } from "./chunk-2U735XOK.js";
8
8
  import {
9
9
  absoluteUrl
10
- } from "./chunk-WGZFBSXM.js";
10
+ } from "./chunk-ZA4AJIOD.js";
11
11
  import {
12
12
  getBaseUrl
13
- } from "./chunk-IA44JTLJ.js";
13
+ } from "./chunk-5UXIPTWM.js";
14
14
  import {
15
15
  NPX_LATEST_COMMAND
16
- } from "./chunk-NC24UL7K.js";
16
+ } from "./chunk-VA573E2C.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-BDMNQBP4.js";
24
+ } from "./chunk-SZMGZ3C5.js";
25
25
 
26
26
  // src/reach.ts
27
27
  var PUSHARY_APP_DOWNLOAD_URL = "https://pushary.com/download";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  resolveInstallSourceFor
3
- } from "./chunk-MAXV4AZR.js";
3
+ } from "./chunk-6JVSKDBD.js";
4
4
  import {
5
5
  apiKeyInForce,
6
6
  configFilePath,
7
7
  keyPrefixToShow
8
- } from "./chunk-IA44JTLJ.js";
8
+ } from "./chunk-5UXIPTWM.js";
9
9
  import {
10
10
  backupFile,
11
11
  backupFileInto,
@@ -17,7 +17,7 @@ import {
17
17
  API_KEY_PREFIX_PATTERN,
18
18
  isRecord,
19
19
  isValidApiKey
20
- } from "./chunk-BDMNQBP4.js";
20
+ } from "./chunk-SZMGZ3C5.js";
21
21
 
22
22
  // src/shell-alias.ts
23
23
  import { homedir } from "os";
@@ -1,33 +1,35 @@
1
1
  import {
2
2
  MANAGED_CLAUDE_SETTINGS_BY_PLATFORM
3
- } from "./chunk-NFYD5TJK.js";
3
+ } from "./chunk-GFFNJ3DO.js";
4
4
  import {
5
5
  declinedAgentsFile,
6
6
  readDeclinedAgents
7
- } from "./chunk-FJBU6OWM.js";
7
+ } from "./chunk-BWDQ4WOH.js";
8
8
  import {
9
9
  OPENCODE_HOOK_BINARY,
10
10
  openCodeConfigDir,
11
11
  openCodePluginFile
12
- } from "./chunk-UE5QZNZO.js";
12
+ } from "./chunk-P2CXRTW4.js";
13
13
  import {
14
14
  openCodePluginArgv
15
- } from "./chunk-33IFGELL.js";
15
+ } from "./chunk-CIJG74KZ.js";
16
16
  import {
17
17
  liveCursorGateCoverage
18
- } from "./chunk-KT7COQH2.js";
18
+ } from "./chunk-SZXRQXXN.js";
19
19
  import {
20
20
  compatibleConfigFile,
21
21
  compatibleHookEvents,
22
- grokHome,
22
+ grokHome
23
+ } from "./chunk-6HGAY3R6.js";
24
+ import {
23
25
  parseConfigDocument
24
- } from "./chunk-GFGSIDHQ.js";
26
+ } from "./chunk-5LK3UY46.js";
25
27
  import {
26
28
  DEFAULT_HOOKS_KEY_PATH,
27
29
  GEMINI_HOOK_BINARY,
28
30
  GEMINI_HOOK_EVENTS,
29
31
  hooksAt
30
- } from "./chunk-WYIJA2GH.js";
32
+ } from "./chunk-2ODXKLNT.js";
31
33
  import {
32
34
  CODEX_EARLIER_APPROVAL_MATCHERS,
33
35
  CODEX_HOOK_BINARY,
@@ -55,7 +57,7 @@ import {
55
57
  parseHookArgv,
56
58
  parseHookCommand,
57
59
  supportedClaudeEvents
58
- } from "./chunk-NQ6KV722.js";
60
+ } from "./chunk-XCGE5N3Z.js";
59
61
  import {
60
62
  readRegularJsonFile,
61
63
  readRegularTextFile
@@ -69,7 +71,7 @@ import {
69
71
  OPENCODE_APPROVAL_EVENT,
70
72
  isRecord,
71
73
  matcherMatchesEveryCall
72
- } from "./chunk-BDMNQBP4.js";
74
+ } from "./chunk-SZMGZ3C5.js";
73
75
 
74
76
  // src/hook-wiring.ts
75
77
  import { createHash } from "crypto";
@@ -10,7 +10,7 @@ import {
10
10
  uploadTranscriptRecords,
11
11
  verifyAnchoredRecipients,
12
12
  wrapSessionKey
13
- } from "./chunk-BMVNMKVL.js";
13
+ } from "./chunk-CVVHT4KY.js";
14
14
 
15
15
  // src/live-session.ts
16
16
  var LIVE_TRANSCRIPT_LIMITS = { queuedRecords: 100, recordCharacters: 32 * 1024 };
@@ -9,7 +9,7 @@ import {
9
9
  installedCodexApp,
10
10
  readCodexAppRuntime,
11
11
  shellQuoted
12
- } from "./chunk-KFRYGJS5.js";
12
+ } from "./chunk-GKT2SRRG.js";
13
13
  import {
14
14
  CODEX_APP_LAUNCH_AT_LOGIN_VERB,
15
15
  CODEX_APP_LAUNCH_VARIABLE,
@@ -18,19 +18,26 @@ import {
18
18
  import {
19
19
  writeHuman
20
20
  } from "./chunk-QCGNGEGE.js";
21
+ import {
22
+ parseConfigDocument
23
+ } from "./chunk-5LK3UY46.js";
21
24
  import {
22
25
  xml
23
- } from "./chunk-WILH4LFK.js";
26
+ } from "./chunk-DYTDYNKC.js";
24
27
  import {
25
28
  codexHomeFrom
26
- } from "./chunk-NQ6KV722.js";
29
+ } from "./chunk-XCGE5N3Z.js";
27
30
  import {
28
31
  writeFileAtomic
29
32
  } from "./chunk-PM2NRK6Y.js";
33
+ import {
34
+ isRecord
35
+ } from "./chunk-SZMGZ3C5.js";
30
36
 
31
37
  // src/codex-app-cards-switch.ts
32
38
  import { execFileSync as execFileSync2 } from "child_process";
33
39
  import { existsSync as existsSync2, mkdirSync, readFileSync, rmSync } from "fs";
40
+ import { isDeepStrictEqual } from "util";
34
41
  import { homedir as homedir2 } from "os";
35
42
  import { isAbsolute as isAbsolute2, join as join2 } from "path";
36
43
 
@@ -383,14 +390,36 @@ var codexAppCardsReport = (paths, machine) => {
383
390
  var isKeptOnForTheMacApp = (request, paths, machine) => request.keepWhatTheMacAppTurnedOn && turnedOnByTheMacApp(codexAppCardsReceiptFrom(machine.readFile(paths.receiptPath))) && codexAppCardsStatus(paths, machine).kind !== "off";
384
391
  var isKeptOffForTheMacApp = (request, paths, machine) => request.keepWhatTheMacAppTurnedOn && machine.exists(paths.turnedOffPath);
385
392
  var CODEX_CONFIG_FILE = "config.toml";
386
- var CODEX_LAUNCH_SETTING = new RegExp(`^(\\s*${CODEX_APP_LAUNCH_VARIABLE}\\s*=\\s*)(["'])(.*)\\2(\\s*(?:#.*)?\\r?)$`);
393
+ var CODEX_LAUNCH_SETTING = new RegExp(`^(\\s*${CODEX_APP_LAUNCH_VARIABLE}\\s*=\\s*)(["'])(.*?)\\2(\\s*(?:#.*)?\\r?)$`);
394
+ var replaceLaunchSettings = (value, launcher, engine) => {
395
+ if (!isRecord(value) && !Array.isArray(value)) return false;
396
+ let changed = false;
397
+ for (const [name, entry] of Object.entries(value)) {
398
+ if (isRecord(value) && name === CODEX_APP_LAUNCH_VARIABLE && entry === launcher) {
399
+ value[name] = engine;
400
+ changed = true;
401
+ } else if (replaceLaunchSettings(entry, launcher, engine)) changed = true;
402
+ }
403
+ return changed;
404
+ };
387
405
  var codexConfigLaunchingTheEngine = (config, launcher, engine) => {
406
+ const expected = parseConfigDocument(config, "toml");
407
+ if (expected.kind !== "parsed") {
408
+ if (config.includes(launcher)) throw new Error("Could not check the launcher settings in Codex config.toml.");
409
+ return null;
410
+ }
411
+ if (!replaceLaunchSettings(expected.value, launcher, engine)) return null;
388
412
  const lines = config.split("\n");
389
413
  const repointed = lines.map((line) => {
390
414
  const setting = CODEX_LAUNCH_SETTING.exec(line);
391
415
  return setting !== null && setting[3] === launcher ? `${setting[1]}${JSON.stringify(engine)}${setting[4]}` : line;
392
416
  });
393
- return repointed.some((line, index) => line !== lines[index]) ? repointed.join("\n") : null;
417
+ const rewritten = repointed.join("\n");
418
+ const checked = parseConfigDocument(rewritten, "toml");
419
+ if (checked.kind !== "parsed" || !isDeepStrictEqual(checked.value, expected.value)) {
420
+ throw new Error("Codex config.toml still needs its launcher setting updated.");
421
+ }
422
+ return rewritten;
394
423
  };
395
424
  var enginesToLaunchInstead = (paths, machine) => {
396
425
  const launcher = machine.readFile(paths.launcherPath);
@@ -403,11 +432,17 @@ var enginesToLaunchInstead = (paths, machine) => {
403
432
  };
404
433
  var engineToLaunchInstead = (paths, machine) => enginesToLaunchInstead(paths, machine).find((engine) => engine !== null && machine.exists(engine)) ?? null;
405
434
  var pointCodexBackAtItsEngine = (request, paths, machine) => {
406
- const engine = engineToLaunchInstead(paths, machine);
407
- if (engine === null) return;
408
435
  const codexConfig = join2(codexHomeFrom(request.homeDir), CODEX_CONFIG_FILE);
409
436
  const config = machine.readFile(codexConfig);
410
437
  if (config === null) return;
438
+ const engine = engineToLaunchInstead(paths, machine);
439
+ if (engine === null) {
440
+ const parsed = parseConfigDocument(config, "toml");
441
+ if (parsed.kind === "parsed" ? replaceLaunchSettings(parsed.value, paths.launcherPath, "") : config.includes(paths.launcherPath)) {
442
+ throw new Error("Could not find the Codex engine to replace the launcher in config.toml.");
443
+ }
444
+ return;
445
+ }
411
446
  const repointed = codexConfigLaunchingTheEngine(config, paths.launcherPath, engine);
412
447
  if (repointed !== null) machine.writeFile(codexConfig, repointed, PRIVATE_FILE_MODE);
413
448
  };
@@ -477,6 +512,19 @@ var fileContents = (path) => {
477
512
  return null;
478
513
  }
479
514
  };
515
+ var codexAppCardsFileAccessOnThisMac = {
516
+ exists: existsSync2,
517
+ readFile: fileContents,
518
+ makeDirectory: (path, mode) => {
519
+ mkdirSync(path, { recursive: true, mode });
520
+ },
521
+ writeFile: (path, contents, mode) => {
522
+ writeFileAtomic(path, contents, mode);
523
+ },
524
+ remove: (path) => {
525
+ rmSync(path, { recursive: true, force: true });
526
+ }
527
+ };
480
528
  var thisMacsCodexAppCardsMachine = () => ({
481
529
  runtime: readCodexAppRuntime,
482
530
  codexApp: codexAppOnThisMac,
@@ -490,17 +538,7 @@ var thisMacsCodexAppCardsMachine = () => ({
490
538
  unloadLoginItem: (target) => {
491
539
  launchctlIgnoringFailure(["bootout", target]);
492
540
  },
493
- exists: existsSync2,
494
- readFile: fileContents,
495
- makeDirectory: (path, mode) => {
496
- mkdirSync(path, { recursive: true, mode });
497
- },
498
- writeFile: (path, contents, mode) => {
499
- writeFileAtomic(path, contents, mode);
500
- },
501
- remove: (path) => {
502
- rmSync(path, { recursive: true, force: true });
503
- }
541
+ ...codexAppCardsFileAccessOnThisMac
504
542
  });
505
543
  var cleanUpCodexAppCardsOnThisMac = (request) => cleanUpCodexAppCards(request, thisMacsCodexAppCardsMachine());
506
544
  var setCodexAppLaunchAtLoginOnThisMac = () => {
@@ -607,6 +645,7 @@ export {
607
645
  cleanUpCodexAppCards,
608
646
  codexAppCardsFolderInTheLastSweep,
609
647
  whyLaunchctlFailed,
648
+ codexAppCardsFileAccessOnThisMac,
610
649
  cleanUpCodexAppCardsOnThisMac,
611
650
  setCodexAppLaunchAtLoginOnThisMac,
612
651
  runsFromATemporaryFolder,