pushary 1.9.239 → 1.9.240

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 (143) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{api-TGQFNSNE.js → api-S3HQL4CV.js} +11 -11
  3. package/dist/bin/pushary-audit.js +3 -3
  4. package/dist/bin/pushary-bell-hook.js +28 -28
  5. package/dist/bin/pushary-bell.js +12 -12
  6. package/dist/bin/pushary-calls.js +15 -15
  7. package/dist/bin/pushary-claude.js +26 -26
  8. package/dist/bin/pushary-clean.js +40 -40
  9. package/dist/bin/pushary-codex-bridge.js +23 -23
  10. package/dist/bin/pushary-codex-hook.js +34 -34
  11. package/dist/bin/pushary-codex-session.js +8 -8
  12. package/dist/bin/pushary-codex.js +16 -16
  13. package/dist/bin/pushary-connect.js +35 -35
  14. package/dist/bin/pushary-cowork.js +5 -5
  15. package/dist/bin/pushary-daemon.js +46 -46
  16. package/dist/bin/pushary-disconnect.js +30 -30
  17. package/dist/bin/pushary-display-hook.js +10 -9
  18. package/dist/bin/pushary-doctor.js +48 -48
  19. package/dist/bin/pushary-elicitation-hook.js +27 -27
  20. package/dist/bin/pushary-gemini-bridge.js +18 -18
  21. package/dist/bin/pushary-gemini-hook.js +31 -31
  22. package/dist/bin/pushary-hook.js +35 -35
  23. package/dist/bin/pushary-login.js +23 -23
  24. package/dist/bin/pushary-logout.js +31 -31
  25. package/dist/bin/pushary-mcp.js +12 -12
  26. package/dist/bin/pushary-mode.js +16 -16
  27. package/dist/bin/pushary-notification-hook.js +27 -27
  28. package/dist/bin/pushary-opencode-bridge.js +22 -22
  29. package/dist/bin/pushary-opencode-hook.js +32 -32
  30. package/dist/bin/pushary-permission-denied-hook.js +34 -34
  31. package/dist/bin/pushary-permission-hook.js +35 -35
  32. package/dist/bin/pushary-post-hook.js +28 -28
  33. package/dist/bin/pushary-prompt-hook.js +27 -27
  34. package/dist/bin/pushary-session-end-hook.js +27 -27
  35. package/dist/bin/pushary-session-start-hook.js +39 -39
  36. package/dist/bin/pushary-sessions.js +12 -12
  37. package/dist/bin/pushary-setup.js +140 -173
  38. package/dist/bin/pushary-stats.js +5 -5
  39. package/dist/bin/pushary-status.js +41 -37
  40. package/dist/bin/pushary-stop-hook.js +27 -27
  41. package/dist/bin/pushary-stopfailure-hook.js +27 -27
  42. package/dist/bin/pushary-suggestions.js +16 -16
  43. package/dist/bin/pushary-transcript-register.js +17 -17
  44. package/dist/bin/pushary-transcripts.js +26 -26
  45. package/dist/bin/pushary-upgrade.js +47 -47
  46. package/dist/bin/pushary-wait.js +16 -16
  47. package/dist/bin/pushary.js +7 -7
  48. package/dist/{chunk-M5DTFZNE.js → chunk-2FKAQDIY.js} +2 -2
  49. package/dist/{chunk-M45LA6SN.js → chunk-3KR7IXGP.js} +4 -4
  50. package/dist/{chunk-F3RLSCGY.js → chunk-3RHUT4CT.js} +5 -5
  51. package/dist/{chunk-LB4TIIP6.js → chunk-3VGW6MMH.js} +4 -4
  52. package/dist/{chunk-O6QSYCV7.js → chunk-47PF7UUS.js} +3 -3
  53. package/dist/{chunk-2QKCDW7C.js → chunk-4ALCCCOW.js} +34 -16
  54. package/dist/{chunk-AXCHFAM2.js → chunk-4KA5FPCU.js} +2 -2
  55. package/dist/{chunk-WLKHQOWW.js → chunk-4SERWSEJ.js} +8 -8
  56. package/dist/{chunk-F7UH6EIK.js → chunk-54FAMVFU.js} +1 -1
  57. package/dist/{chunk-P6WHHGDL.js → chunk-5JEWS5WP.js} +1 -1
  58. package/dist/{chunk-WK6FLRWC.js → chunk-5MTDC25A.js} +6 -6
  59. package/dist/{chunk-TZ2JD5R2.js → chunk-5ONH6JSZ.js} +1 -1
  60. package/dist/{chunk-7LDSPVKG.js → chunk-6HCARNSZ.js} +23 -3
  61. package/dist/{chunk-QXPBSQAJ.js → chunk-6MK3OFFQ.js} +12 -12
  62. package/dist/{chunk-YXNVJ6QV.js → chunk-6O4LOD7E.js} +1 -1
  63. package/dist/{chunk-CUKCOSSW.js → chunk-6T3JNLXH.js} +1 -1
  64. package/dist/{chunk-AS5IBOCJ.js → chunk-7HX3GQ3J.js} +1 -1
  65. package/dist/{chunk-TSQUSQYM.js → chunk-AZ7I6F6U.js} +2 -2
  66. package/dist/{chunk-7DK5D7K5.js → chunk-B4U25UYA.js} +3 -3
  67. package/dist/{chunk-22KXKP3P.js → chunk-B7LTTHPP.js} +2 -2
  68. package/dist/{chunk-WO3XKRTP.js → chunk-B7TUAYY4.js} +7 -7
  69. package/dist/{chunk-OM4WDT5Q.js → chunk-BFFE3XUB.js} +11 -5
  70. package/dist/{chunk-YJ6PCUUZ.js → chunk-BWJ5XWOY.js} +1 -1
  71. package/dist/{chunk-U6UOY645.js → chunk-BXIW4PYY.js} +1 -1
  72. package/dist/{chunk-JSRQCQI4.js → chunk-C2G6EI42.js} +5 -5
  73. package/dist/{chunk-YMVC3ADR.js → chunk-CBNSLSTN.js} +16 -16
  74. package/dist/{chunk-6AT6CW76.js → chunk-CDP47IC4.js} +1 -1
  75. package/dist/{chunk-JUE3F3SH.js → chunk-CGNHFWTM.js} +10 -6
  76. package/dist/{chunk-CYRFUNSV.js → chunk-CP7FDXDR.js} +4 -4
  77. package/dist/{chunk-CM2CXLMV.js → chunk-DGF63IWR.js} +1 -1
  78. package/dist/{chunk-PPW3FH2O.js → chunk-EJIVYRYV.js} +6 -6
  79. package/dist/{chunk-2NFLU35D.js → chunk-EOIWK4T3.js} +2 -2
  80. package/dist/{chunk-PB2J2OH6.js → chunk-FIW3N3OO.js} +2 -2
  81. package/dist/{chunk-LAZTGJCP.js → chunk-FN6K5DJE.js} +1 -1
  82. package/dist/{chunk-VFFTSN5A.js → chunk-G7N3AMF2.js} +4 -4
  83. package/dist/{chunk-EW6MOHU7.js → chunk-GRDGIN5F.js} +1 -1
  84. package/dist/{chunk-D5IDQEUV.js → chunk-GUZHMUPZ.js} +2 -9
  85. package/dist/{chunk-KXIKVN4W.js → chunk-HYCSVBZU.js} +5 -5
  86. package/dist/{chunk-3OTL7RDO.js → chunk-I2PDVTLE.js} +14 -7
  87. package/dist/{chunk-MQ7TQFAM.js → chunk-IIHJRQUH.js} +4 -4
  88. package/dist/{chunk-ODQRIHHZ.js → chunk-IUGLAPOI.js} +7 -3
  89. package/dist/{chunk-7JVDYUXV.js → chunk-IVVAUS4X.js} +4 -4
  90. package/dist/{chunk-GHK2D2AY.js → chunk-JNGQTIM4.js} +2 -2
  91. package/dist/{chunk-MD35ZRMK.js → chunk-JVVVKMHW.js} +1 -1
  92. package/dist/{chunk-4XOSBQS3.js → chunk-KIY2LDOS.js} +1 -1
  93. package/dist/{chunk-PMZLFGA4.js → chunk-KNR4GPWC.js} +1 -1
  94. package/dist/{chunk-PWLZRTPN.js → chunk-MGGUU2HK.js} +5 -5
  95. package/dist/{chunk-XMCHE2KX.js → chunk-MN52HESI.js} +2 -2
  96. package/dist/{chunk-B2UVKWAC.js → chunk-MRRFHM5W.js} +3 -3
  97. package/dist/{chunk-QCWKDVGM.js → chunk-MUJQEBEI.js} +3 -3
  98. package/dist/{chunk-XULGWSCM.js → chunk-N27CCH7E.js} +3 -24
  99. package/dist/{chunk-OKSLHMMV.js → chunk-NSTSKANY.js} +1 -1
  100. package/dist/{chunk-ARDB6TVA.js → chunk-OCX3VPL7.js} +14 -12
  101. package/dist/{chunk-2CNBP34Z.js → chunk-OKAFHEJQ.js} +3 -3
  102. package/dist/{chunk-BCFJAUVD.js → chunk-ON7GUC77.js} +11 -11
  103. package/dist/{chunk-KEC6WMMH.js → chunk-OQMYK75R.js} +1 -1
  104. package/dist/{chunk-K3KDWSGN.js → chunk-OSQPNWK2.js} +3 -3
  105. package/dist/{chunk-775CXETC.js → chunk-PBAX5ZTC.js} +3 -3
  106. package/dist/{chunk-XFVILXWT.js → chunk-PIF4FJBM.js} +4 -4
  107. package/dist/{chunk-NIL4UMQO.js → chunk-QHZUGUXM.js} +4 -4
  108. package/dist/{chunk-FETLPBX4.js → chunk-R3KWJHV5.js} +5 -5
  109. package/dist/{chunk-P3M2TEIB.js → chunk-RRDNCZ5B.js} +1 -1
  110. package/dist/{chunk-K5QXVI6H.js → chunk-S5NZYFIW.js} +5 -5
  111. package/dist/{chunk-34WXXHZK.js → chunk-SFE3KYTV.js} +1 -1
  112. package/dist/{chunk-HFTEGMJQ.js → chunk-SHJTV4M2.js} +7 -7
  113. package/dist/{chunk-6YHIIZCD.js → chunk-SR3IJPFT.js} +5 -5
  114. package/dist/{chunk-HCUODMK4.js → chunk-T7BENAXJ.js} +2 -2
  115. package/dist/{chunk-HUB2GUFP.js → chunk-UPLB3UAG.js} +5 -5
  116. package/dist/{chunk-TBFF32OX.js → chunk-UZDOP52C.js} +3 -3
  117. package/dist/{chunk-OBCDZUDW.js → chunk-VBXEKGOD.js} +1 -1
  118. package/dist/{chunk-Y4FDXCBJ.js → chunk-VGPLLTWD.js} +1 -1
  119. package/dist/{chunk-DBYMWNEA.js → chunk-VWYNFCZZ.js} +9 -9
  120. package/dist/{chunk-43EGMRVL.js → chunk-W5RHKVDB.js} +10 -10
  121. package/dist/{chunk-NYW3IHWT.js → chunk-WSVJH327.js} +2 -2
  122. package/dist/{chunk-CU53UYPR.js → chunk-WVKLSWNF.js} +1 -1
  123. package/dist/{chunk-UOPOVQ2P.js → chunk-XNF5DVAF.js} +1 -3
  124. package/dist/{chunk-QFCZHHXE.js → chunk-YBEZ373R.js} +5 -5
  125. package/dist/{chunk-ZDI2GOT7.js → chunk-YMNUS2OX.js} +2 -2
  126. package/dist/{chunk-ENMJP2QR.js → chunk-Z3GHXUCO.js} +7 -5
  127. package/dist/{chunk-35IKDC3S.js → chunk-Z443YMGX.js} +5 -5
  128. package/dist/{chunk-URA3EVIO.js → chunk-ZOCOTPP5.js} +2 -2
  129. package/dist/{chunk-O2RFCZXX.js → chunk-ZVMQ5WJM.js} +1 -1
  130. package/dist/{codex-app-cards-switch-G66CLZF2.js → codex-app-cards-switch-JY256N6Q.js} +11 -11
  131. package/dist/{codex-card-routing-L564JCTO.js → codex-card-routing-GJFKRHFN.js} +2 -2
  132. package/dist/{codex-desktop-launch-WKHFUAT7.js → codex-desktop-launch-KADUT764.js} +3 -3
  133. package/dist/{codex-session-launch-EBEKNB5T.js → codex-session-launch-5UQLTCD6.js} +20 -20
  134. package/dist/{config-F46PJ6G2.js → config-BCLQDBDL.js} +3 -3
  135. package/dist/{global-upgrade-XK32FCB7.js → global-upgrade-GF52LKRB.js} +9 -9
  136. package/dist/{identity-MGMANSPJ.js → identity-KJUPRF7O.js} +4 -4
  137. package/dist/{live-capabilities-WZWQK6TQ.js → live-capabilities-3WYHLMMU.js} +4 -4
  138. package/dist/{paths-I3B3AESI.js → paths-M2JGTCLR.js} +3 -3
  139. package/dist/{reapply-FSHLY63O.js → reapply-UEQZ26JC.js} +34 -34
  140. package/dist/src/index.js +33 -33
  141. package/dist/{upgrade-lock-4TOOLEEM.js → upgrade-lock-EGMKQLIM.js} +4 -4
  142. package/dist/{usage-AMBJJOGG.js → usage-DN7WLHLX.js} +3 -3
  143. package/package.json +1 -1
@@ -5,13 +5,13 @@ import {
5
5
  OPENCLAW_ENVIRONMENT_KEYS,
6
6
  openClawEnvironmentOf,
7
7
  openClawPathsFrom
8
- } from "./chunk-D5IDQEUV.js";
8
+ } from "./chunk-GUZHMUPZ.js";
9
9
  import {
10
10
  resolvePathBinary
11
- } from "./chunk-MQ7TQFAM.js";
11
+ } from "./chunk-IIHJRQUH.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-JUE3F3SH.js";
14
+ } from "./chunk-CGNHFWTM.js";
15
15
 
16
16
  // src/openclaw/wiring-state.ts
17
17
  var OPENCLAW_PLUGIN_ID = "pushary";
@@ -19,6 +19,19 @@ var OPENCLAW_PLUGIN_PACKAGE = "@pushary/openclaw";
19
19
  var OPENCLAW_GATE_HOOK = "before_tool_call";
20
20
  var OPENCLAW_NOT_FOUND_MARKER = "Plugin not found";
21
21
  var OPENCLAW_MIN_VERSION = "2026.11.3";
22
+ var OPENCLAW_VERSION_PATTERN = /(?<![\d.])v?(20\d{2})\.(\d+)\.(\d+)(?![\d.])/;
23
+ var versionPartsOf = (text) => {
24
+ const match = OPENCLAW_VERSION_PATTERN.exec(text);
25
+ return match ? [Number(match[1]), Number(match[2]), Number(match[3])] : null;
26
+ };
27
+ var openClawVersionIn = (output) => OPENCLAW_VERSION_PATTERN.exec(output)?.[0] ?? null;
28
+ var openClawIsOlderThanSupported = (version) => {
29
+ const found = versionPartsOf(version);
30
+ const minimum = versionPartsOf(OPENCLAW_MIN_VERSION);
31
+ if (found === null || minimum === null) return false;
32
+ const differing = found.findIndex((part, index) => part !== minimum[index]);
33
+ return differing !== -1 && found[differing] < minimum[differing];
34
+ };
22
35
  var OPENCLAW_ENTRY_UNSET_MARKER = "Config path is valid but unset";
23
36
  var LOADED_STATUS = "loaded";
24
37
  var ERROR_STATUS = "error";
@@ -85,6 +98,7 @@ var OPENCLAW_LAUNCHER_NAME = "openclaw";
85
98
  var OPENCLAW_ENTRY_PATH = `plugins.entries.${OPENCLAW_PLUGIN_ID}`;
86
99
  var OPENCLAW_PATH_NOT_FOUND = "Config path not found";
87
100
  var OPENCLAW_INSPECT_TIMEOUT_MS = 6e4;
101
+ var OPENCLAW_VERSION_TIMEOUT_MS = 15e3;
88
102
  var OPENCLAW_CONFIG_TIMEOUT_MS = 6e4;
89
103
  var OPENCLAW_ENABLE_TIMEOUT_MS = 12e4;
90
104
  var OPENCLAW_INSTALL_TIMEOUT_MS = 6e5;
@@ -142,6 +156,10 @@ var inspectOpenClawPlugin = async (session, options) => {
142
156
  const result = await runOpenClawCommand(session, args, OPENCLAW_INSPECT_TIMEOUT_MS);
143
157
  return openClawPluginFactsFrom(result.kind === "ok" ? result : { kind: "failed", output: result.output });
144
158
  };
159
+ var readOpenClawVersion = async (session) => {
160
+ const result = await runOpenClawCommand(session, ["--version"], OPENCLAW_VERSION_TIMEOUT_MS);
161
+ return result.kind === "ok" ? openClawVersionIn(result.stdout) : null;
162
+ };
145
163
  var readOpenClawEntry = async (session) => {
146
164
  const result = await runOpenClawCommand(session, ["config", "get", OPENCLAW_ENTRY_PATH, "--json"], OPENCLAW_CONFIG_TIMEOUT_MS);
147
165
  return openClawEntryFrom(result.kind === "ok" ? result : { kind: "failed", output: result.output });
@@ -159,6 +177,7 @@ export {
159
177
  OPENCLAW_PLUGIN_ID,
160
178
  OPENCLAW_PLUGIN_PACKAGE,
161
179
  OPENCLAW_MIN_VERSION,
180
+ openClawIsOlderThanSupported,
162
181
  openClawWiringState,
163
182
  isOpenClawWired,
164
183
  isOursToRemove,
@@ -167,6 +186,7 @@ export {
167
186
  openClawLauncherCandidates,
168
187
  findOpenClawLauncher,
169
188
  inspectOpenClawPlugin,
189
+ readOpenClawVersion,
170
190
  readOpenClawEntry,
171
191
  writeOpenClawEntry,
172
192
  unsetOpenClawEntry,
@@ -5,7 +5,7 @@ import {
5
5
  ensureCodexTrustsPusharyHooks,
6
6
  hermesHistoryNeedsTheCliHelper,
7
7
  recordInstalledHermesHistoryHelper
8
- } from "./chunk-2CNBP34Z.js";
8
+ } from "./chunk-OKAFHEJQ.js";
9
9
  import {
10
10
  hermesReceiptPaths,
11
11
  hermesSetupPredatesThePluginFolder,
@@ -14,7 +14,7 @@ import {
14
14
  refreshHermesPluginFiles,
15
15
  refreshOpenClawPlugin,
16
16
  shippedHermesPlugin
17
- } from "./chunk-OM4WDT5Q.js";
17
+ } from "./chunk-BFFE3XUB.js";
18
18
  import {
19
19
  fxIgnoresInstructionsFile,
20
20
  fxInstructionsBody,
@@ -23,7 +23,7 @@ import {
23
23
  macAppFxBridge,
24
24
  refreshClineKey,
25
25
  switchFxHttpEntryToBridge
26
- } from "./chunk-K5QXVI6H.js";
26
+ } from "./chunk-S5NZYFIW.js";
27
27
  import {
28
28
  OPENCODE_HOOK_BINARY,
29
29
  agentHookOwner,
@@ -36,16 +36,16 @@ import {
36
36
  openCodePluginDir,
37
37
  openCodeWired,
38
38
  withOpenCodeAskRules
39
- } from "./chunk-HFTEGMJQ.js";
39
+ } from "./chunk-SHJTV4M2.js";
40
40
  import {
41
41
  detectClaudeVersion
42
- } from "./chunk-P6WHHGDL.js";
42
+ } from "./chunk-5JEWS5WP.js";
43
43
  import {
44
44
  addCompatibleHooks,
45
45
  compatibleConfigFile,
46
46
  compatibleInstructionsFile,
47
47
  hasCompatibleHooks
48
- } from "./chunk-F3RLSCGY.js";
48
+ } from "./chunk-3RHUT4CT.js";
49
49
  import {
50
50
  GEMINI_HOOK_BINARY,
51
51
  addGeminiHooks,
@@ -57,13 +57,13 @@ import {
57
57
  geminiWired,
58
58
  hasGeminiHooks,
59
59
  planHooks
60
- } from "./chunk-VFFTSN5A.js";
60
+ } from "./chunk-G7N3AMF2.js";
61
61
  import {
62
62
  transcriptsEnabled
63
- } from "./chunk-YJ6PCUUZ.js";
63
+ } from "./chunk-BWJ5XWOY.js";
64
64
  import {
65
65
  KEY_FILE_MODE
66
- } from "./chunk-XULGWSCM.js";
66
+ } from "./chunk-N27CCH7E.js";
67
67
  import {
68
68
  CLAUDE_CODE_PUSHARY_PERMISSION_RULES,
69
69
  CLAUDE_HOOK_BINARY,
@@ -110,7 +110,7 @@ import {
110
110
  renderAgentInstructions,
111
111
  supportedClaudeEvents,
112
112
  vscodePluginMcp
113
- } from "./chunk-D5IDQEUV.js";
113
+ } from "./chunk-GUZHMUPZ.js";
114
114
  import {
115
115
  formatVersion
116
116
  } from "./chunk-6ICPEJY5.js";
@@ -118,7 +118,7 @@ import {
118
118
  hookCommandsUseBareNames,
119
119
  resolveGlobalBinDir,
120
120
  resolveGlobalBinary
121
- } from "./chunk-MQ7TQFAM.js";
121
+ } from "./chunk-IIHJRQUH.js";
122
122
  import {
123
123
  readJsonSafe,
124
124
  writeFileAtomic,
@@ -128,7 +128,7 @@ import {
128
128
  HOOK_COMPATIBLE_PROFILES,
129
129
  isCompatibleAgentType,
130
130
  isRecord
131
- } from "./chunk-JUE3F3SH.js";
131
+ } from "./chunk-CGNHFWTM.js";
132
132
 
133
133
  // src/reapply.ts
134
134
  import { dirname, join } from "path";
@@ -2,7 +2,7 @@ import {
2
2
  isApprovalMode,
3
3
  isRecord,
4
4
  isTimeoutAction
5
- } from "./chunk-JUE3F3SH.js";
5
+ } from "./chunk-CGNHFWTM.js";
6
6
 
7
7
  // src/cli/settings-response.ts
8
8
  var isFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isFinalCommandAckRefusal
3
- } from "./chunk-JUE3F3SH.js";
3
+ } from "./chunk-CGNHFWTM.js";
4
4
 
5
5
  // src/command-ack-outcome.ts
6
6
  var SETTLED_ACK = { outcome: "settled" };
@@ -27,7 +27,7 @@ import {
27
27
  reportableSessionId,
28
28
  toToolLookup,
29
29
  truncateLine
30
- } from "./chunk-JUE3F3SH.js";
30
+ } from "./chunk-CGNHFWTM.js";
31
31
 
32
32
  // ../hook-mapping/src/commit-receipt.ts
33
33
  var COMMIT_OUTPUT_MAX_LENGTH = 65536;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  projectNameFor
3
- } from "./chunk-34WXXHZK.js";
3
+ } from "./chunk-SFE3KYTV.js";
4
4
  import {
5
5
  readConfigFileKey
6
- } from "./chunk-XULGWSCM.js";
6
+ } from "./chunk-N27CCH7E.js";
7
7
 
8
8
  // src/bell/fleet.ts
9
9
  import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-P6DUWKAO.js";
5
5
  import {
6
6
  fetchAsCredential
7
- } from "./chunk-PMZLFGA4.js";
7
+ } from "./chunk-KNR4GPWC.js";
8
8
  import {
9
9
  getBaseUrl
10
- } from "./chunk-M5DTFZNE.js";
10
+ } from "./chunk-2FKAQDIY.js";
11
11
  import {
12
12
  writeJsonAtomicDurable
13
13
  } from "./chunk-PM2NRK6Y.js";
@@ -15,7 +15,7 @@ import {
15
15
  compressTranscriptRecord,
16
16
  redactSecretsFromContent,
17
17
  transcriptRecordPlaintext
18
- } from "./chunk-JUE3F3SH.js";
18
+ } from "./chunk-CGNHFWTM.js";
19
19
 
20
20
  // src/transcript-recipient-pin.ts
21
21
  import { createHash } from "crypto";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  absoluteUrl
3
- } from "./chunk-ODQRIHHZ.js";
3
+ } from "./chunk-IUGLAPOI.js";
4
4
  import {
5
5
  KEY_SCOPE
6
- } from "./chunk-JUE3F3SH.js";
6
+ } from "./chunk-CGNHFWTM.js";
7
7
 
8
8
  // src/cli/approval-settings-pages.ts
9
9
  var API_KEYS_PATH = "/dashboard/agent/settings";
@@ -2,31 +2,31 @@ import {
2
2
  SIGNED_OUT_ON_MAC_MESSAGE,
3
3
  describeSignedOutKey,
4
4
  readSignedOutDiagnosis
5
- } from "./chunk-URA3EVIO.js";
5
+ } from "./chunk-ZOCOTPP5.js";
6
6
  import {
7
7
  APPROVAL_RULES_PATH
8
- } from "./chunk-22KXKP3P.js";
8
+ } from "./chunk-B7LTTHPP.js";
9
9
  import {
10
10
  createIo
11
- } from "./chunk-OBCDZUDW.js";
11
+ } from "./chunk-VBXEKGOD.js";
12
12
  import {
13
13
  absoluteUrl,
14
14
  checkApiKey,
15
15
  describeKeyCheck,
16
16
  keyCheckFromResponse
17
- } from "./chunk-ODQRIHHZ.js";
17
+ } from "./chunk-IUGLAPOI.js";
18
18
  import {
19
19
  readKeySource
20
- } from "./chunk-XULGWSCM.js";
20
+ } from "./chunk-N27CCH7E.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-M5DTFZNE.js";
23
+ } from "./chunk-2FKAQDIY.js";
24
24
  import {
25
25
  EXIT
26
26
  } from "./chunk-BG4HHB7E.js";
27
27
  import {
28
28
  KEY_SCOPE
29
- } from "./chunk-JUE3F3SH.js";
29
+ } from "./chunk-CGNHFWTM.js";
30
30
 
31
31
  // src/cli/report-key.ts
32
32
  var { dim, yellow } = createIo();
@@ -7,13 +7,15 @@ import {
7
7
  inspectOpenClawPlugin,
8
8
  installOpenClawPluginFrom,
9
9
  isOursToRemove,
10
+ openClawIsOlderThanSupported,
10
11
  openClawPathsNow,
11
12
  openClawWiringState,
12
13
  readOpenClawEntry,
14
+ readOpenClawVersion,
13
15
  uninstallOpenClawPlugin,
14
16
  unsetOpenClawEntry,
15
17
  writeOpenClawEntry
16
- } from "./chunk-7LDSPVKG.js";
18
+ } from "./chunk-6HCARNSZ.js";
17
19
  import {
18
20
  needsShell
19
21
  } from "./chunk-3PSNUHC5.js";
@@ -25,10 +27,10 @@ import {
25
27
  openClawDirectoriesToLookIn,
26
28
  openClawPluginFolder,
27
29
  openClawSetupReceiptDirectory
28
- } from "./chunk-D5IDQEUV.js";
30
+ } from "./chunk-GUZHMUPZ.js";
29
31
  import {
30
32
  resolvePathBinary
31
- } from "./chunk-MQ7TQFAM.js";
33
+ } from "./chunk-IIHJRQUH.js";
32
34
  import {
33
35
  readJsonSafe,
34
36
  writeJsonAtomic
@@ -39,7 +41,7 @@ import {
39
41
  } from "./chunk-CXQWDQCJ.js";
40
42
  import {
41
43
  isRecord
42
- } from "./chunk-JUE3F3SH.js";
44
+ } from "./chunk-CGNHFWTM.js";
43
45
 
44
46
  // src/hermes/plugin-payload.ts
45
47
  import { createHash } from "crypto";
@@ -3903,6 +3905,10 @@ var recordInstalled = (bundle, folder) => {
3903
3905
  return;
3904
3906
  }
3905
3907
  };
3908
+ var unreadableInspectFailure = async (session) => {
3909
+ const version = await readOpenClawVersion(session);
3910
+ return version !== null && openClawIsOlderThanSupported(version) ? { kind: "failed", reason: "openclaw_too_old", detail: version } : { kind: "failed", reason: "inspect_unreadable", detail: "" };
3911
+ };
3906
3912
  var installOpenClawPlugin = async (request) => {
3907
3913
  const launcher = launcherFor(request.launcher, findOpenClawLauncher);
3908
3914
  if (launcher === null) return { kind: "no_launcher" };
@@ -3911,7 +3917,7 @@ var installOpenClawPlugin = async (request) => {
3911
3917
  const environment = currentOpenClawEnvironment();
3912
3918
  const session = sessionFor(launcher, environment);
3913
3919
  const before = await inspectOpenClawPlugin(session, { runtime: false });
3914
- if (before.kind === "unreadable") return { kind: "failed", reason: "inspect_unreadable", detail: "" };
3920
+ if (before.kind === "unreadable") return await unreadableInspectFailure(session);
3915
3921
  if (pluginIdTakenBySomeoneElse(before)) {
3916
3922
  return { kind: "failed", reason: "plugin_id_taken", detail: before.kind === "installed" ? before.packageName ?? "" : "" };
3917
3923
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-XULGWSCM.js";
3
+ } from "./chunk-N27CCH7E.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  renderCommandHelp
3
- } from "./chunk-CM2CXLMV.js";
3
+ } from "./chunk-DGF63IWR.js";
4
4
  import {
5
5
  EXIT
6
6
  } from "./chunk-BG4HHB7E.js";
@@ -5,13 +5,13 @@ import {
5
5
  } from "./chunk-OYIN77HO.js";
6
6
  import {
7
7
  readMacAppAgentKey
8
- } from "./chunk-7JVDYUXV.js";
8
+ } from "./chunk-IVVAUS4X.js";
9
9
  import {
10
10
  API_KEYS_PATH
11
- } from "./chunk-22KXKP3P.js";
11
+ } from "./chunk-B7LTTHPP.js";
12
12
  import {
13
13
  absoluteUrl
14
- } from "./chunk-ODQRIHHZ.js";
14
+ } from "./chunk-IUGLAPOI.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-XULGWSCM.js";
24
+ } from "./chunk-N27CCH7E.js";
25
25
  import {
26
26
  isValidApiKey
27
- } from "./chunk-JUE3F3SH.js";
27
+ } from "./chunk-CGNHFWTM.js";
28
28
 
29
29
  // src/cli/held-key-revocation.ts
30
30
  var readCliHeldKeys = (profiles) => {
@@ -4,30 +4,30 @@ import {
4
4
  phoneApprovalSourceFor,
5
5
  rememberPhoneApproval,
6
6
  takePhoneApproval
7
- } from "./chunk-O6QSYCV7.js";
7
+ } from "./chunk-47PF7UUS.js";
8
8
  import {
9
9
  claudeSettingsLocationFor,
10
10
  readClaudePermissionRules
11
- } from "./chunk-NYW3IHWT.js";
11
+ } from "./chunk-WSVJH327.js";
12
12
  import {
13
13
  defersToNativeMode
14
- } from "./chunk-EW6MOHU7.js";
14
+ } from "./chunk-GRDGIN5F.js";
15
15
  import {
16
16
  reportMachineDenial
17
- } from "./chunk-CYRFUNSV.js";
17
+ } from "./chunk-CP7FDXDR.js";
18
18
  import {
19
19
  isGatingMoment,
20
20
  recordKeylessMoment
21
- } from "./chunk-KEC6WMMH.js";
21
+ } from "./chunk-OQMYK75R.js";
22
22
  import {
23
23
  isAdmitted,
24
24
  readAdmissionRules
25
- } from "./chunk-QFCZHHXE.js";
25
+ } from "./chunk-YBEZ373R.js";
26
26
  import {
27
27
  activeHookSource,
28
28
  activeIdentity,
29
29
  namedSource
30
- } from "./chunk-F3RLSCGY.js";
30
+ } from "./chunk-3RHUT4CT.js";
31
31
  import {
32
32
  DEFAULT_SESSION,
33
33
  allow,
@@ -68,7 +68,7 @@ import {
68
68
  storedWaitDeadline,
69
69
  sweepFilesOlderThan,
70
70
  userScope
71
- } from "./chunk-BCFJAUVD.js";
71
+ } from "./chunk-ON7GUC77.js";
72
72
  import {
73
73
  UNNAMED_ACTION,
74
74
  deriveAction,
@@ -79,7 +79,7 @@ import {
79
79
  patchDeletesFiles,
80
80
  permissionDeniedAction,
81
81
  scopePathFor
82
- } from "./chunk-AS5IBOCJ.js";
82
+ } from "./chunk-7HX3GQ3J.js";
83
83
  import {
84
84
  askUser,
85
85
  cancelQuestion,
@@ -93,30 +93,30 @@ import {
93
93
  sendNotification,
94
94
  waitForQuestion,
95
95
  withdrawQuestion
96
- } from "./chunk-PPW3FH2O.js";
96
+ } from "./chunk-EJIVYRYV.js";
97
97
  import {
98
98
  branchFor,
99
99
  projectNameFor,
100
100
  repoKeyFor,
101
101
  repositoryScopeFor
102
- } from "./chunk-34WXXHZK.js";
102
+ } from "./chunk-SFE3KYTV.js";
103
103
  import {
104
104
  getMachineId
105
- } from "./chunk-O2RFCZXX.js";
105
+ } from "./chunk-ZVMQ5WJM.js";
106
106
  import {
107
107
  POSTTOOLUSE_MIRRORED_TOOLS
108
- } from "./chunk-D5IDQEUV.js";
108
+ } from "./chunk-GUZHMUPZ.js";
109
109
  import {
110
110
  getApiKey,
111
111
  getBaseUrl,
112
112
  isMalformedApiKeyError
113
- } from "./chunk-M5DTFZNE.js";
113
+ } from "./chunk-2FKAQDIY.js";
114
114
  import {
115
115
  writeFileAtomic
116
116
  } from "./chunk-PM2NRK6Y.js";
117
117
  import {
118
118
  NPX_LATEST_COMMAND
119
- } from "./chunk-CM2CXLMV.js";
119
+ } from "./chunk-DGF63IWR.js";
120
120
  import {
121
121
  AGENT_QUESTION_STRATEGY,
122
122
  AGENT_QUESTION_TOOL,
@@ -185,7 +185,7 @@ import {
185
185
  terminalStaysLiveForTheCall,
186
186
  timeoutActionWithoutLocalPrompt,
187
187
  unapprovedScopeReason
188
- } from "./chunk-JUE3F3SH.js";
188
+ } from "./chunk-CGNHFWTM.js";
189
189
 
190
190
  // src/terminal-answer-watch.ts
191
191
  import { closeSync, openSync, readSync, statSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  canonicalGateInputs,
3
3
  patchDeletesFiles
4
- } from "./chunk-AS5IBOCJ.js";
4
+ } from "./chunk-7HX3GQ3J.js";
5
5
 
6
6
  // src/gate-call-reading.ts
7
7
  var gateCallReadingOf = (profile, raw) => {
@@ -3275,6 +3275,12 @@ var AGENT_ENFORCEMENT = {
3275
3275
  http: NO_HOOK
3276
3276
  };
3277
3277
 
3278
+ // ../contracts/src/policy-reuse.ts
3279
+ var POLICY_CACHE_TTL_SECONDS = 60;
3280
+ var POLICY_REUSE_CEILING_SECONDS = 60 * 60;
3281
+ var POLICY_REUSE_KEY_MAX_LENGTH = 64;
3282
+ var isPolicyReuseKey = (value) => typeof value === "string" && value.length > 0 && value.length <= POLICY_REUSE_KEY_MAX_LENGTH;
3283
+
3278
3284
  // ../contracts/src/approval-risk.ts
3279
3285
  var APPROVAL_RISK_LEVEL = {
3280
3286
  normal: "normal",
@@ -4732,10 +4738,6 @@ var CLI_POLICY_REQUEST_CAPABILITIES = [
4732
4738
  var POLICY_REQUEST_CAPABILITY_SEPARATOR = ",";
4733
4739
  var policyRequestCapabilitiesHeaderValue = (capabilities) => capabilities.join(POLICY_REQUEST_CAPABILITY_SEPARATOR);
4734
4740
 
4735
- // ../contracts/src/policy-reuse.ts
4736
- var POLICY_CACHE_TTL_SECONDS = 60;
4737
- var POLICY_REUSE_CEILING_SECONDS = 60 * 60;
4738
-
4739
4741
  // ../contracts/src/declined-agents.ts
4740
4742
  var DECLINED_AGENTS_FILE = "declined-agents.json";
4741
4743
  var DECLINED_AGENTS_VERSION = 1;
@@ -10918,6 +10920,7 @@ var aChosenRuleHoldsTheCall = (input) => aChosenRuleGovernsInEitherRepository(in
10918
10920
  var claudePromptTakesTheCall = (facts, input, verdict) => verdict.kind === "gate" && !verdict.scopeReason && terminalStaysLiveForTheCall(facts) && noModeOverrideIsActive(input) && !aChosenRuleHoldsTheCall(input) && !editGoesToTheAgentsPrompt({ source: facts.source, event: "PreToolUse", permissionMode: facts.permissionMode }, input, verdict);
10919
10921
  var isProvenModeResponse = (value) => isRecord(value) && typeof value.kill === "boolean";
10920
10922
  var toPolicyVersion = (value) => typeof value === "string" || typeof value === "number" ? String(value) : null;
10923
+ var policyReuseKeyFieldOf = (value) => isPolicyReuseKey(value) ? { policyReuseKey: value } : {};
10921
10924
  var modeStateFromResponse = (data) => {
10922
10925
  const mode = data.override?.mode;
10923
10926
  return {
@@ -10930,7 +10933,8 @@ var modeStateFromResponse = (data) => {
10930
10933
  // never as one that silently matches nothing.
10931
10934
  scope: isScopeContract(data.scope) ? data.scope : null,
10932
10935
  degraded: false,
10933
- askHandoff: data.askHandoff === true
10936
+ askHandoff: data.askHandoff === true,
10937
+ ...policyReuseKeyFieldOf(data.policyReuseKey)
10934
10938
  };
10935
10939
  };
10936
10940
  var GATE_WIRE = 1;
@@ -11383,6 +11387,7 @@ export {
11383
11387
  isLocalQuestionHandoff,
11384
11388
  waitsForThePhone,
11385
11389
  isAskUserReply,
11390
+ POLICY_CACHE_TTL_SECONDS,
11386
11391
  DECISION_LINE_MAX,
11387
11392
  truncateLine,
11388
11393
  CURSOR_GATE_EVENTS,
@@ -11442,7 +11447,6 @@ export {
11442
11447
  POLICY_REQUEST_CAPABILITIES_HEADER,
11443
11448
  CLI_POLICY_REQUEST_CAPABILITIES,
11444
11449
  policyRequestCapabilitiesHeaderValue,
11445
- POLICY_CACHE_TTL_SECONDS,
11446
11450
  DECLINED_AGENTS_FILE,
11447
11451
  parseDeclinedAgents,
11448
11452
  serializeDeclinedAgents,
@@ -4,21 +4,21 @@ import {
4
4
  claimThrottle,
5
5
  releaseThrottle,
6
6
  reportEvent
7
- } from "./chunk-BCFJAUVD.js";
7
+ } from "./chunk-ON7GUC77.js";
8
8
  import {
9
9
  deriveToolTarget,
10
10
  permissionDeniedAction
11
- } from "./chunk-AS5IBOCJ.js";
11
+ } from "./chunk-7HX3GQ3J.js";
12
12
  import {
13
13
  projectNameFor
14
- } from "./chunk-34WXXHZK.js";
14
+ } from "./chunk-SFE3KYTV.js";
15
15
  import {
16
16
  PERMISSION_ALLOWED_EVENT,
17
17
  PERMISSION_DENIED_EVENT,
18
18
  machineApprovalFor,
19
19
  machineDecisionFor,
20
20
  wireVerdictFor
21
- } from "./chunk-JUE3F3SH.js";
21
+ } from "./chunk-CGNHFWTM.js";
22
22
 
23
23
  // src/machine-decision-audit.ts
24
24
  var MACHINE_DECISION_REPORT_TIMEOUT_MS = 800;
@@ -8,7 +8,7 @@ import {
8
8
  PUSHARY_CLI_LATEST_FOR_POWERSHELL,
9
9
  SETUP_AGENT_CHOICES,
10
10
  isApprovalMode
11
- } from "./chunk-JUE3F3SH.js";
11
+ } from "./chunk-CGNHFWTM.js";
12
12
 
13
13
  // src/cli/mode-request.ts
14
14
  var parseDuration = (value) => {
@@ -8,21 +8,21 @@ import {
8
8
  SubscriptionRequiredError,
9
9
  callMcpTool,
10
10
  isRetryable
11
- } from "./chunk-35IKDC3S.js";
11
+ } from "./chunk-Z443YMGX.js";
12
12
  import {
13
13
  fetchAsCredential
14
- } from "./chunk-PMZLFGA4.js";
14
+ } from "./chunk-KNR4GPWC.js";
15
15
  import {
16
16
  installNetworkDefaults,
17
17
  isNetworkFailure
18
- } from "./chunk-TBFF32OX.js";
18
+ } from "./chunk-UZDOP52C.js";
19
19
  import {
20
20
  clientReportClaims
21
- } from "./chunk-D5IDQEUV.js";
21
+ } from "./chunk-GUZHMUPZ.js";
22
22
  import {
23
23
  getApiKey,
24
24
  getBaseUrl
25
- } from "./chunk-M5DTFZNE.js";
25
+ } from "./chunk-2FKAQDIY.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-JUE3F3SH.js";
43
+ } from "./chunk-CGNHFWTM.js";
44
44
 
45
45
  // src/api.ts
46
46
  import { randomUUID } from "crypto";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  configFilePath
3
- } from "./chunk-M5DTFZNE.js";
3
+ } from "./chunk-2FKAQDIY.js";
4
4
  import {
5
5
  normalizeInstallSource
6
- } from "./chunk-JUE3F3SH.js";
6
+ } from "./chunk-CGNHFWTM.js";
7
7
 
8
8
  // src/install-source.ts
9
9
  import { readFileSync } from "fs";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-POFBE6ZY.js";
4
4
  import {
5
5
  autoUpdateState
6
- } from "./chunk-D5IDQEUV.js";
6
+ } from "./chunk-GUZHMUPZ.js";
7
7
  import {
8
8
  readJsonSafe,
9
9
  writeJsonAtomic
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-CXQWDQCJ.js";
18
18
  import {
19
19
  isAutoUpdateResult
20
- } from "./chunk-JUE3F3SH.js";
20
+ } from "./chunk-CGNHFWTM.js";
21
21
 
22
22
  // src/auto-update.ts
23
23
  import { spawn } from "child_process";
@@ -9,7 +9,7 @@ import {
9
9
  isSetupConnectMode,
10
10
  isValidApiKey,
11
11
  normalizeAgentId
12
- } from "./chunk-JUE3F3SH.js";
12
+ } from "./chunk-CGNHFWTM.js";
13
13
 
14
14
  // src/setup/options.ts
15
15
  var AGENT_CHOICES = SETUP_AGENT_CHOICES;