@pushary/agent-hooks 1.9.149 → 1.9.151

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 (155) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
  3. package/data/cursor-plugin/CHANGELOG.md +7 -0
  4. package/data/cursor-plugin/scripts/redaction.mjs +6 -1
  5. package/data/openclaw-plugin/README.md +39 -2
  6. package/data/openclaw-plugin/dist/approval-hook.js +8 -4
  7. package/data/openclaw-plugin/dist/approval-question.js +100 -33
  8. package/data/openclaw-plugin/dist/command-preview.js +65 -0
  9. package/data/openclaw-plugin/dist/file-change-preview.js +109 -0
  10. package/data/openclaw-plugin/dist/gate-result.js +11 -4
  11. package/data/openclaw-plugin/dist/parameter-redaction.js +28 -0
  12. package/data/openclaw-plugin/dist/protected-writes.js +18 -4
  13. package/data/openclaw-plugin/dist/redaction.js +6 -1
  14. package/data/openclaw-plugin/dist/settings.js +7 -1
  15. package/data/openclaw-plugin/dist/visible-text.js +5 -0
  16. package/data/openclaw-plugin/openclaw.plugin.json +1 -1
  17. package/data/openclaw-plugin/package.json +1 -1
  18. package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
  19. package/data/vscode-plugin/CHANGELOG.md +9 -0
  20. package/data/vscode-plugin/scripts/redaction.mjs +6 -1
  21. package/dist/{api-H7H75ARS.js → api-GHPLREAU.js} +11 -11
  22. package/dist/bin/pushary-audit.js +3 -3
  23. package/dist/bin/pushary-bell-hook.js +28 -28
  24. package/dist/bin/pushary-bell.js +10 -10
  25. package/dist/bin/pushary-claude.js +27 -27
  26. package/dist/bin/pushary-clean.js +36 -36
  27. package/dist/bin/pushary-codex-bridge.js +23 -23
  28. package/dist/bin/pushary-codex-hook.js +35 -35
  29. package/dist/bin/pushary-codex-session.js +8 -8
  30. package/dist/bin/pushary-codex.js +16 -16
  31. package/dist/bin/pushary-connect.js +32 -32
  32. package/dist/bin/pushary-cowork.js +5 -5
  33. package/dist/bin/pushary-daemon.js +44 -44
  34. package/dist/bin/pushary-disconnect.js +28 -28
  35. package/dist/bin/pushary-display-hook.js +33 -21
  36. package/dist/bin/pushary-doctor.js +44 -44
  37. package/dist/bin/pushary-elicitation-hook.js +28 -28
  38. package/dist/bin/pushary-gemini-bridge.js +17 -17
  39. package/dist/bin/pushary-gemini-hook.js +32 -32
  40. package/dist/bin/pushary-hook.js +35 -35
  41. package/dist/bin/pushary-login.js +21 -21
  42. package/dist/bin/pushary-logout.js +27 -27
  43. package/dist/bin/pushary-mcp.js +12 -12
  44. package/dist/bin/pushary-mode.js +15 -15
  45. package/dist/bin/pushary-notification-hook.js +27 -27
  46. package/dist/bin/pushary-opencode-hook.js +31 -31
  47. package/dist/bin/pushary-permission-denied-hook.js +35 -35
  48. package/dist/bin/pushary-permission-hook.js +35 -35
  49. package/dist/bin/pushary-post-hook.js +28 -28
  50. package/dist/bin/pushary-prompt-hook.js +27 -27
  51. package/dist/bin/pushary-session-end-hook.js +27 -27
  52. package/dist/bin/pushary-session-start-hook.js +37 -37
  53. package/dist/bin/pushary-setup.js +54 -53
  54. package/dist/bin/pushary-stats.js +5 -5
  55. package/dist/bin/pushary-status.js +33 -33
  56. package/dist/bin/pushary-stop-hook.js +27 -27
  57. package/dist/bin/pushary-stopfailure-hook.js +27 -27
  58. package/dist/bin/pushary-suggestions.js +15 -15
  59. package/dist/bin/pushary-transcript-register.js +17 -17
  60. package/dist/bin/pushary-transcripts.js +25 -25
  61. package/dist/bin/pushary-upgrade.js +42 -42
  62. package/dist/bin/pushary-wait.js +15 -15
  63. package/dist/bin/pushary.js +7 -7
  64. package/dist/{chunk-D3QT4S7U.js → chunk-3MXI37MS.js} +4 -4
  65. package/dist/{chunk-FQLS37AX.js → chunk-3TUSMGHE.js} +1 -1
  66. package/dist/{chunk-5IG3VPHT.js → chunk-3XIHKIDX.js} +4 -4
  67. package/dist/{chunk-4L2IYNLC.js → chunk-46IYOPZH.js} +1 -1
  68. package/dist/{chunk-NLED3JGR.js → chunk-4UDGVO6A.js} +1 -1
  69. package/dist/{chunk-F6ESGEWU.js → chunk-4ZH2PXDA.js} +1 -1
  70. package/dist/{chunk-3AAQJ75F.js → chunk-53Y4QQNF.js} +5 -5
  71. package/dist/{chunk-RYDDLS62.js → chunk-5D57GAKF.js} +3 -3
  72. package/dist/{chunk-RMBY7JGO.js → chunk-5TMW2X5I.js} +1 -1
  73. package/dist/{chunk-X4OEGFOG.js → chunk-6RMBTFDF.js} +3 -3
  74. package/dist/{chunk-T3CMGGNW.js → chunk-7357Q746.js} +1 -1
  75. package/dist/{chunk-UJUGFLVF.js → chunk-7FPKT5QJ.js} +5 -5
  76. package/dist/{chunk-KXNAB76Z.js → chunk-7L6IP3JA.js} +2 -2
  77. package/dist/{chunk-3OPXQK4D.js → chunk-7XFEV7ML.js} +5 -5
  78. package/dist/{chunk-3WD3BEPB.js → chunk-A3EV4C34.js} +2 -2
  79. package/dist/{chunk-6HO36P3A.js → chunk-ACC4YXJS.js} +1 -1
  80. package/dist/{chunk-PH3MVQCQ.js → chunk-AIKQFV6C.js} +4 -4
  81. package/dist/{chunk-6YX3VB5P.js → chunk-AWC7MXLX.js} +6 -6
  82. package/dist/{chunk-WQJ5NJ35.js → chunk-AYFOZBTD.js} +1 -1
  83. package/dist/{chunk-ZIPPDZ5B.js → chunk-BAH4LZL3.js} +5 -5
  84. package/dist/{chunk-JUEQUYAT.js → chunk-BANZ4GGS.js} +2 -2
  85. package/dist/{chunk-DHCJDYBT.js → chunk-BPSQLKTG.js} +6 -6
  86. package/dist/{chunk-RWTH5RYA.js → chunk-BRXPFM3U.js} +2 -2
  87. package/dist/{chunk-WQEJCDMR.js → chunk-C2JMTH45.js} +2 -2
  88. package/dist/{chunk-R2JRRCZK.js → chunk-CVQTLCVS.js} +1 -1
  89. package/dist/{chunk-M7HJZ7HO.js → chunk-DHP6SWVH.js} +3 -3
  90. package/dist/{chunk-KWJJYZ3T.js → chunk-DNK4E5CE.js} +4 -4
  91. package/dist/{chunk-QTQRQZIU.js → chunk-DQKT5KK5.js} +4 -4
  92. package/dist/{chunk-YWSIN7IH.js → chunk-DYUK6HYH.js} +1 -1
  93. package/dist/{chunk-ABTQG6XU.js → chunk-E5YEKJOM.js} +1 -1
  94. package/dist/{chunk-LC53HRZ6.js → chunk-E75OHUWM.js} +1 -1
  95. package/dist/{chunk-Q7GZKNMH.js → chunk-FHPLLUAZ.js} +1 -1
  96. package/dist/{chunk-JSZ6LKX5.js → chunk-FSEOIGZX.js} +13 -12
  97. package/dist/{chunk-HEOBF5H6.js → chunk-H4MHGLEB.js} +3 -3
  98. package/dist/{chunk-ZCB5SCYM.js → chunk-HQ3RFANL.js} +2 -2
  99. package/dist/{chunk-AQ7L2E2U.js → chunk-HY4GEW3T.js} +28 -21
  100. package/dist/{chunk-3T7RA7WJ.js → chunk-I3CN7BGN.js} +2 -2
  101. package/dist/{chunk-ENRL4WFD.js → chunk-I6DLNMUM.js} +4 -4
  102. package/dist/{chunk-NHZV2H63.js → chunk-ILEO4YWM.js} +1 -1
  103. package/dist/{chunk-A3URJPYH.js → chunk-IPRQFNPG.js} +1 -1
  104. package/dist/{chunk-UAHBSOO4.js → chunk-J6LZ4G5G.js} +2 -2
  105. package/dist/{chunk-ZOATPL53.js → chunk-JGYQ72A7.js} +4 -4
  106. package/dist/{chunk-QSZYHL7Z.js → chunk-JJKPQSEE.js} +2 -2
  107. package/dist/{chunk-O5ARO3JM.js → chunk-K3ORQ3KY.js} +13 -4
  108. package/dist/{chunk-S3MEI2D2.js → chunk-KAZ37TWD.js} +5 -5
  109. package/dist/{chunk-2CVRVHUQ.js → chunk-LRK2F63A.js} +8 -8
  110. package/dist/{chunk-X4OQ5UMH.js → chunk-NP6QILOY.js} +5 -5
  111. package/dist/{chunk-6RYJ3XCD.js → chunk-NPNBR4FS.js} +5 -5
  112. package/dist/{chunk-T4PX3DRF.js → chunk-NQUE54GA.js} +1 -1
  113. package/dist/{chunk-CMTDMZPV.js → chunk-NRMMXX62.js} +2 -2
  114. package/dist/{chunk-XSBW6TUH.js → chunk-OBIUHAXG.js} +2 -2
  115. package/dist/{chunk-35IODIBL.js → chunk-ODYF7VZZ.js} +1 -1
  116. package/dist/{chunk-YTD7RV6F.js → chunk-OZD5FIFS.js} +3 -3
  117. package/dist/{chunk-XZGQZDFP.js → chunk-P3E26UO5.js} +6 -6
  118. package/dist/{chunk-CABBLJD5.js → chunk-P3RRAH6J.js} +3 -3
  119. package/dist/{chunk-43NHQUCY.js → chunk-P6GCPJDQ.js} +3 -3
  120. package/dist/{chunk-H6FFNTSR.js → chunk-PS3O6LS2.js} +6 -6
  121. package/dist/{chunk-BP5HLKR6.js → chunk-PYH3KFLI.js} +12 -12
  122. package/dist/{chunk-MT4GBXLM.js → chunk-R2VVMSGM.js} +5 -5
  123. package/dist/{chunk-CIRTRWHM.js → chunk-RJAQ2447.js} +18 -7
  124. package/dist/{chunk-NRPQUU3D.js → chunk-S263JK6K.js} +2 -2
  125. package/dist/{chunk-KP6ERYOA.js → chunk-TQXKJX7X.js} +8 -8
  126. package/dist/{chunk-ZX2O66NS.js → chunk-TRDJICC7.js} +3 -3
  127. package/dist/{chunk-26TXJ35O.js → chunk-USN3OOHD.js} +19 -18
  128. package/dist/{chunk-CBIS7IYQ.js → chunk-WQ66RQRF.js} +5 -5
  129. package/dist/{chunk-CDQOARIF.js → chunk-WQVRDVMJ.js} +3 -3
  130. package/dist/{chunk-CU5SYUMK.js → chunk-WY4CM6TO.js} +3 -3
  131. package/dist/{chunk-CAHULQIO.js → chunk-XJLCZ24Y.js} +1 -1
  132. package/dist/{chunk-5HAA7C4X.js → chunk-XU45NUAV.js} +10 -10
  133. package/dist/{chunk-TXXAQRX4.js → chunk-XWMVKK54.js} +1 -1
  134. package/dist/{chunk-MUTMXSQZ.js → chunk-YUYBMCKF.js} +3 -3
  135. package/dist/{chunk-2VPRLAKF.js → chunk-YYEYPA3S.js} +4 -4
  136. package/dist/{chunk-VPADWVYD.js → chunk-ZBZ7CRGD.js} +1 -1
  137. package/dist/{chunk-MUSINFEU.js → chunk-ZLHPTXWU.js} +5 -5
  138. package/dist/{chunk-PUTX5BBE.js → chunk-ZMEI3EG4.js} +3 -3
  139. package/dist/{chunk-PVBDITRS.js → chunk-ZSX4XN6C.js} +5 -5
  140. package/dist/{chunk-DLPI45DF.js → chunk-ZUN37EG2.js} +6 -6
  141. package/dist/{codex-app-cards-switch-BCM547E6.js → codex-app-cards-switch-U77ZM22P.js} +11 -11
  142. package/dist/{codex-card-routing-222EKZJR.js → codex-card-routing-3L4XXUCK.js} +2 -2
  143. package/dist/{codex-desktop-launch-6AFOLMZ7.js → codex-desktop-launch-KRLBST55.js} +1 -1
  144. package/dist/{codex-session-launch-73EQE6IL.js → codex-session-launch-6LMMSNLA.js} +20 -20
  145. package/dist/{config-GWNPGS47.js → config-5YEZFF26.js} +3 -3
  146. package/dist/{global-upgrade-VRF6OSSU.js → global-upgrade-EWBY6BD5.js} +9 -9
  147. package/dist/{identity-PQIM7R2N.js → identity-D3SYIS5Z.js} +4 -4
  148. package/dist/{live-capabilities-G3LMKZUB.js → live-capabilities-QUNHPUFR.js} +4 -4
  149. package/dist/{paths-TFGIP5PU.js → paths-VI5KNBOY.js} +3 -3
  150. package/dist/{reapply-3IRAI6JF.js → reapply-AFG7K4KS.js} +30 -30
  151. package/dist/src/index.js +34 -34
  152. package/dist/{upgrade-lock-2G7ANYYO.js → upgrade-lock-COPTGES4.js} +4 -4
  153. package/dist/{usage-K3EGYCSU.js → usage-4367CHW4.js} +3 -3
  154. package/package.json +1 -1
  155. package/data/cursor-plugin/scripts/pushary-gate.test.mjs +0 -150
@@ -14,6 +14,8 @@ const FILE_REFERENCE_PREFIX = '@';
14
14
  const HOME_PREFIX = '~';
15
15
  const MISSING_PATH_CODES = new Set(['ENOENT', 'ENOTDIR']);
16
16
  const WORKSPACE_HOOKS_DIRECTORY = 'hooks';
17
+ const WORKSPACE_OPENCLAW_DIRECTORY = '.openclaw';
18
+ const WORKSPACE_FOLDERS_OPENCLAW_LOADS = [WORKSPACE_HOOKS_DIRECTORY, WORKSPACE_OPENCLAW_DIRECTORY];
17
19
  const RISKY_RELATIVE_STARTS = ['.pushary', '.config'];
18
20
  const errorCodeOf = (error) => typeof error === 'object' && error !== null && 'code' in error && typeof error.code === 'string' ? error.code : null;
19
21
  const canonicalPathOf = (path, system) => {
@@ -61,6 +63,7 @@ const comparablePathsFor = (locations, system, agentId) => {
61
63
  protectedTrees: spellingsOfAll(locations.protectedTrees, system),
62
64
  serviceFiles: locations.serviceFiles.flatMap(location => spellingsOfLocation(location.directory, system).map(directory => ({ directory, namePrefix: comparable(location.namePrefix, system) }))),
63
65
  workspace: workspaceCanonical === null ? null : comparable(workspaceCanonical, system),
66
+ workspaceFoldersOpenClawLoads: WORKSPACE_FOLDERS_OPENCLAW_LOADS.map(folder => comparable(folder, system)),
64
67
  riskyRelativeStarts: new Set([
65
68
  ...locations.stateDirectories.map(state => comparable(basename(state), system)),
66
69
  ...locations.configFiles.map(file => comparable(basename(file), system)),
@@ -69,7 +72,12 @@ const comparablePathsFor = (locations, system, agentId) => {
69
72
  };
70
73
  };
71
74
  const isServiceFile = (path, services) => services.some(service => firstComponentUnder(path, service.directory)?.startsWith(service.namePrefix) === true);
72
- const isInWorkspaceHooks = (path, workspace) => workspace !== null && firstComponentUnder(path, workspace) === WORKSPACE_HOOKS_DIRECTORY;
75
+ const isInAWorkspaceFolderOpenClawLoads = (path, paths) => {
76
+ if (paths.workspace === null)
77
+ return false;
78
+ const component = firstComponentUnder(path, paths.workspace);
79
+ return component !== null && paths.workspaceFoldersOpenClawLoads.includes(component);
80
+ };
73
81
  const isInWorkspaceUnderState = (path, paths) => {
74
82
  const { workspace } = paths;
75
83
  if (workspace === null || !isSameOrInside(path, workspace))
@@ -83,7 +91,7 @@ const isProtectedLocation = (path, paths) => {
83
91
  return true;
84
92
  if (isServiceFile(path, paths.serviceFiles))
85
93
  return true;
86
- if (isInWorkspaceHooks(path, paths.workspace))
94
+ if (isInAWorkspaceFolderOpenClawLoads(path, paths))
87
95
  return true;
88
96
  if (!paths.stateDirectories.some(state => isSameOrInside(path, state)))
89
97
  return false;
@@ -189,6 +197,12 @@ export const writesIntoOpenClaw = (locations, system, call) => {
189
197
  export const SESSIONS_SPAWN_TOOL = 'sessions_spawn';
190
198
  export const SPAWN_FOLDER_PARAMETER = 'cwd';
191
199
  const SPAWN_SOURCES_IT_CANNOT_SEE = ['projectId', 'projectGitUrl', 'worktree'];
200
+ const SPAWN_RUNTIME_PARAMETER = 'runtime';
201
+ const ACP_RUNTIME = 'acp';
202
+ export const startsAnAcpSession = (params) => {
203
+ const runtime = params[SPAWN_RUNTIME_PARAMETER];
204
+ return typeof runtime === 'string' && runtime.trim().toLowerCase() === ACP_RUNTIME;
205
+ };
192
206
  const namesAFolderItCannotSee = (params) => SPAWN_SOURCES_IT_CANNOT_SEE.some(name => params[name] !== undefined && params[name] !== false);
193
207
  const spawnFolderVerdict = (raw, paths, system) => {
194
208
  if (typeof raw !== 'string' || raw.trim().length === 0 || paths.workspace === null)
@@ -202,13 +216,13 @@ const spawnFolderVerdict = (raw, paths, system) => {
202
216
  const folder = comparable(canonical, system);
203
217
  if (!isSameOrInside(folder, paths.workspace))
204
218
  return 'protected';
205
- return isInWorkspaceHooks(folder, paths.workspace) ? 'protected' : 'clear';
219
+ return isInAWorkspaceFolderOpenClawLoads(folder, paths) ? 'protected' : 'clear';
206
220
  };
207
221
  export const spawnsOutsideTheWorkspace = (locations, system, call) => {
208
222
  if (call.toolId !== SESSIONS_SPAWN_TOOL)
209
223
  return false;
210
224
  const { params } = call.event;
211
- if (namesAFolderItCannotSee(params))
225
+ if (startsAnAcpSession(params) || namesAFolderItCannotSee(params))
212
226
  return true;
213
227
  if (params[SPAWN_FOLDER_PARAMETER] === undefined)
214
228
  return false;
@@ -24,7 +24,7 @@ const CUT_OFF_SECRET_SHAPES = {
24
24
  authorizationValue: String.raw `\S+`,
25
25
  credentialAssignment: credentialAssignmentRule(CREDENTIAL_KEY, String.raw `(?:\\[\s\S]|[^"\\])*(?:"|\\?$)`, "[^']*(?:'|$)", String.raw `\S+`),
26
26
  };
27
- const secretRedactionRules = (shapes) => [
27
+ const credentialTokenRules = (shapes) => [
28
28
  { pattern: /\bpk_[A-Za-z0-9_]+\.[A-Za-z0-9_]+/g, replacement: '[redacted]' },
29
29
  { pattern: new RegExp(String.raw `-----BEGIN[A-Z0-9 ]*PRIVATE KEY-----${shapes.privateKeyBody}-----END[A-Z0-9 ]*PRIVATE KEY-----`, 'g'), replacement: '[redacted key]' },
30
30
  { pattern: /\bsk-[A-Za-z0-9_-]{16,}\b/g, replacement: '[redacted]' },
@@ -40,14 +40,19 @@ const secretRedactionRules = (shapes) => [
40
40
  { pattern: /\bxai-[A-Za-z0-9]{16,}\b/g, replacement: '[redacted]' },
41
41
  { pattern: /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g, replacement: '[redacted]' },
42
42
  { pattern: new RegExp(String.raw `\b([a-z][a-z0-9+.-]*:\/\/[^\s:/@]+:)${shapes.urlPassword}@`, 'gi'), replacement: '$1[redacted]@' },
43
+ ];
44
+ const secretRedactionRules = (shapes) => [
45
+ ...credentialTokenRules(shapes),
43
46
  { pattern: new RegExp(String.raw `\bbearer${shapes.separator}+[A-Za-z0-9._~+/=-]+`, 'gi'), replacement: 'bearer [redacted]' },
44
47
  { pattern: new RegExp(String.raw `\bauthorization:${shapes.separator}*(?:${AUTHORIZATION_SCHEME}${shapes.separator}+)?${shapes.authorizationValue}`, 'gi'), replacement: 'authorization: [redacted]' },
45
48
  shapes.credentialAssignment,
46
49
  ];
47
50
  export const SECRET_REDACTION_RULES = secretRedactionRules(DISPLAYED_SECRET_SHAPES);
51
+ const CREDENTIAL_TOKEN_RULES = credentialTokenRules(DISPLAYED_SECRET_SHAPES);
48
52
  const CUT_OFF_TEXT_REDACTION_RULES = secretRedactionRules(CUT_OFF_SECRET_SHAPES);
49
53
  const HIGH_ENTROPY_RULE = { pattern: /[A-Za-z0-9+/]{40,}={0,2}/g, replacement: '[redacted]' };
50
54
  const applyRedactionRules = (rules, text) => rules.reduce((acc, rule) => acc.replace(rule.pattern, rule.replacement), text);
51
55
  export const redactSecrets = (text) => applyRedactionRules(SECRET_REDACTION_RULES, text);
56
+ export const containsCredentialToken = (text) => applyRedactionRules(CREDENTIAL_TOKEN_RULES, text) !== text;
52
57
  export const redactSecretsFromContent = (text) => applyRedactionRules(CUT_OFF_TEXT_REDACTION_RULES, text);
53
58
  export const redactSecretsDeep = (text) => redactSecrets(text).replace(HIGH_ENTROPY_RULE.pattern, HIGH_ENTROPY_RULE.replacement);
@@ -11,6 +11,7 @@ export const GATEWAY_TOOL = 'gateway';
11
11
  export const OPENCLAW_SYSTEM_TOOL = 'openclaw';
12
12
  export const AUTOMATIONS_TOOL = 'automations';
13
13
  export const TERMINAL_TOOL = 'terminal';
14
+ export const NODES_TOOL = 'nodes';
14
15
  export const TOOL_ACTION_PARAMETER = 'action';
15
16
  const TOOL_ID_PATTERN = /^[a-z0-9][a-z0-9_.:-]{0,99}$/;
16
17
  const AGENT_NAME_SEPARATOR = ' - ';
@@ -35,6 +36,10 @@ const OPENCLAW_SYSTEM_ACTIONS_WITHOUT_APPROVAL = new Set([
35
36
  ]);
36
37
  const AUTOMATIONS_ACTIONS_WITHOUT_APPROVAL = new Set(['status', 'list', 'get', 'runs', 'next_check']);
37
38
  const TERMINAL_ACTIONS_WITHOUT_APPROVAL = new Set(['read', 'list']);
39
+ const NODES_ACTIONS_WITHOUT_APPROVAL = new Set([
40
+ 'status', 'describe', 'pending', 'notify', 'camera_list', 'notifications_list',
41
+ 'device_status', 'device_info', 'device_permissions', 'device_health',
42
+ ]);
38
43
  const ACTIONS_WITHOUT_APPROVAL_BY_TOOL = new Map([
39
44
  [PROCESS_TOOL, PROCESS_ACTIONS_WITHOUT_APPROVAL],
40
45
  [PLUGINS_TOOL, PLUGINS_ACTIONS_WITHOUT_APPROVAL],
@@ -42,8 +47,9 @@ const ACTIONS_WITHOUT_APPROVAL_BY_TOOL = new Map([
42
47
  [OPENCLAW_SYSTEM_TOOL, OPENCLAW_SYSTEM_ACTIONS_WITHOUT_APPROVAL],
43
48
  [AUTOMATIONS_TOOL, AUTOMATIONS_ACTIONS_WITHOUT_APPROVAL],
44
49
  [TERMINAL_TOOL, TERMINAL_ACTIONS_WITHOUT_APPROVAL],
50
+ [NODES_TOOL, NODES_ACTIONS_WITHOUT_APPROVAL],
45
51
  ]);
46
- export const DEFAULT_GATED_TOOLS = [EXEC_TOOL, PROCESS_TOOL, PLUGINS_TOOL, GATEWAY_TOOL, OPENCLAW_SYSTEM_TOOL, AUTOMATIONS_TOOL, TERMINAL_TOOL];
52
+ export const DEFAULT_GATED_TOOLS = [EXEC_TOOL, PROCESS_TOOL, PLUGINS_TOOL, GATEWAY_TOOL, OPENCLAW_SYSTEM_TOOL, AUTOMATIONS_TOOL, TERMINAL_TOOL, NODES_TOOL];
47
53
  const isRecord = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
48
54
  export const hostToolId = (name) => {
49
55
  const lowered = name.trim().toLowerCase();
@@ -0,0 +1,5 @@
1
+ const WINDOWS_LINE_BREAK = /\r\n/g;
2
+ const HIDDEN_CHARACTERS = /[\u0000-\u0008\u000B-\u001F\u007F-\u009F­؜᠎​-‏‪-‮⁠-⁩\u{E0000}-\u{E007F}]/gu;
3
+ const CODE_POINT_DIGITS = 4;
4
+ const visibleCodeOf = (character) => `\\u{${(character.codePointAt(0) ?? 0).toString(16).toUpperCase().padStart(CODE_POINT_DIGITS, '0')}}`;
5
+ export const withHiddenCharactersShown = (text) => text.replace(WINDOWS_LINE_BREAK, '\n').replace(HIDDEN_CHARACTERS, visibleCodeOf);
@@ -11,7 +11,7 @@
11
11
  "uiHints": {
12
12
  "gatedTools": {
13
13
  "label": "More tools that need your approval",
14
- "help": "OpenClaw tool ids to gate on top of the defaults (exec, process input, and the plugins, gateway and openclaw actions that change OpenClaw), for example message or browser."
14
+ "help": "OpenClaw tool ids to gate on top of the defaults (exec, process input, the plugins, gateway and openclaw actions that change OpenClaw, automations, terminal input, and nodes actions such as run), for example message or browser."
15
15
  }
16
16
  },
17
17
  "configSchema": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushary/openclaw",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Phone approvals for OpenClaw. Pushary asks you before your AI agent runs a gated tool call, and blocks the call unless you approve it.",
5
5
  "author": "Pushary <business@pushary.com>",
6
6
  "homepage": "https://pushary.com/human-in-the-loop-openclaw",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pushary",
3
3
  "description": "Push notifications, human-in-the-loop questions, and permission gating for your AI agent. Get a push when a task finishes, answer the agent from your phone, and approve risky commands before they run.",
4
- "version": "0.2.6",
4
+ "version": "0.2.7",
5
5
  "author": {
6
6
  "name": "Pushary",
7
7
  "email": "business@pushary.com",
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.7
4
+
5
+ - The bundled Pushary skill is 0.13.4, from 0.13.1. One `ask_user` or `wait_for_answer` call waits at most 48 seconds, the server's real limit; it said 55. A question still pending keeps waiting with the same `correlationId`.
6
+ - When you ask the agent to call, phone or ring you if it gets stuck, it asks with `ask_user`. Pushary phones only when the reply includes `phoneCall`, and the agent does not promise a call otherwise. It tells you when the call rings in your own time (`ringsAtLocal`), not the UTC `ringsAt`.
7
+ - A computer whose key works but has no phone connected pairs one with `npx pushary@latest pair`, which keeps this computer's key. The agent runs it in the background and shows you the link, the QR code and the fingerprint while it waits up to 15 minutes for your phone.
8
+ - The gate uses the computer's id from `~/.pushary/machine-id` when it holds a valid UUID, the id the CLI and the Mac app use, so one computer no longer shows up as two. It only reads that file.
9
+ - The gate sends a git worktree's main checkout as the repository too, so a rule saved for a repository, a deny included, also applies in its linked worktrees. A rule saved for one worktree still applies there. On Windows the gate recognises the worktrees Git for Windows creates by default.
10
+ - The gate's redaction also hides the credential after `Authorization: Basic`, `Token`, `Negotiate` or `NTLM`, not only the scheme word, so a command that carries one shows `authorization: [redacted]`.
11
+
3
12
  ## 0.2.6
4
13
 
5
14
  - The bundled Pushary skill is 0.13.1. It gives the next step for each `status --json` exit code, lists every agent id setup accepts, and keeps the Mac app in charge of the agents it connected.
@@ -25,7 +25,7 @@ const CUT_OFF_SECRET_SHAPES = {
25
25
  authorizationValue: String.raw `\S+`,
26
26
  credentialAssignment: credentialAssignmentRule(CREDENTIAL_KEY, String.raw `(?:\\[\s\S]|[^"\\])*(?:"|\\?$)`, "[^']*(?:'|$)", String.raw `\S+`),
27
27
  };
28
- const secretRedactionRules = (shapes) => [
28
+ const credentialTokenRules = (shapes) => [
29
29
  { pattern: /\bpk_[A-Za-z0-9_]+\.[A-Za-z0-9_]+/g, replacement: '[redacted]' },
30
30
  { pattern: new RegExp(String.raw `-----BEGIN[A-Z0-9 ]*PRIVATE KEY-----${shapes.privateKeyBody}-----END[A-Z0-9 ]*PRIVATE KEY-----`, 'g'), replacement: '[redacted key]' },
31
31
  { pattern: /\bsk-[A-Za-z0-9_-]{16,}\b/g, replacement: '[redacted]' },
@@ -41,14 +41,19 @@ const secretRedactionRules = (shapes) => [
41
41
  { pattern: /\bxai-[A-Za-z0-9]{16,}\b/g, replacement: '[redacted]' },
42
42
  { pattern: /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g, replacement: '[redacted]' },
43
43
  { pattern: new RegExp(String.raw `\b([a-z][a-z0-9+.-]*:\/\/[^\s:/@]+:)${shapes.urlPassword}@`, 'gi'), replacement: '$1[redacted]@' },
44
+ ];
45
+ const secretRedactionRules = (shapes) => [
46
+ ...credentialTokenRules(shapes),
44
47
  { pattern: new RegExp(String.raw `\bbearer${shapes.separator}+[A-Za-z0-9._~+/=-]+`, 'gi'), replacement: 'bearer [redacted]' },
45
48
  { pattern: new RegExp(String.raw `\bauthorization:${shapes.separator}*(?:${AUTHORIZATION_SCHEME}${shapes.separator}+)?${shapes.authorizationValue}`, 'gi'), replacement: 'authorization: [redacted]' },
46
49
  shapes.credentialAssignment,
47
50
  ];
48
51
  export const SECRET_REDACTION_RULES = secretRedactionRules(DISPLAYED_SECRET_SHAPES);
52
+ const CREDENTIAL_TOKEN_RULES = credentialTokenRules(DISPLAYED_SECRET_SHAPES);
49
53
  const CUT_OFF_TEXT_REDACTION_RULES = secretRedactionRules(CUT_OFF_SECRET_SHAPES);
50
54
  const HIGH_ENTROPY_RULE = { pattern: /[A-Za-z0-9+/]{40,}={0,2}/g, replacement: '[redacted]' };
51
55
  const applyRedactionRules = (rules, text) => rules.reduce((acc, rule) => acc.replace(rule.pattern, rule.replacement), text);
52
56
  export const redactSecrets = (text) => applyRedactionRules(SECRET_REDACTION_RULES, text);
57
+ export const containsCredentialToken = (text) => applyRedactionRules(CREDENTIAL_TOKEN_RULES, text) !== text;
53
58
  export const redactSecretsFromContent = (text) => applyRedactionRules(CUT_OFF_TEXT_REDACTION_RULES, text);
54
59
  export const redactSecretsDeep = (text) => redactSecrets(text).replace(HIGH_ENTROPY_RULE.pattern, HIGH_ENTROPY_RULE.replacement);
@@ -19,25 +19,25 @@ import {
19
19
  waitRetryPauseMs,
20
20
  waitsForThePhone,
21
21
  withdrawQuestion
22
- } from "./chunk-DHCJDYBT.js";
22
+ } from "./chunk-BPSQLKTG.js";
23
23
  import "./chunk-POFBE6ZY.js";
24
- import "./chunk-MUSINFEU.js";
25
- import "./chunk-CABBLJD5.js";
26
- import "./chunk-CDQOARIF.js";
27
- import "./chunk-4L2IYNLC.js";
28
- import "./chunk-ABTQG6XU.js";
24
+ import "./chunk-ZLHPTXWU.js";
25
+ import "./chunk-P3RRAH6J.js";
26
+ import "./chunk-WQVRDVMJ.js";
27
+ import "./chunk-46IYOPZH.js";
28
+ import "./chunk-E5YEKJOM.js";
29
29
  import "./chunk-YU2EUD7O.js";
30
- import "./chunk-AQ7L2E2U.js";
31
- import "./chunk-43NHQUCY.js";
32
- import "./chunk-VPADWVYD.js";
30
+ import "./chunk-HY4GEW3T.js";
31
+ import "./chunk-P6GCPJDQ.js";
32
+ import "./chunk-ZBZ7CRGD.js";
33
33
  import "./chunk-BG4HHB7E.js";
34
34
  import "./chunk-TODDEIYG.js";
35
- import "./chunk-TXXAQRX4.js";
35
+ import "./chunk-XWMVKK54.js";
36
36
  import "./chunk-WIIMW5YO.js";
37
37
  import {
38
38
  DECISION_STOP_REASON,
39
39
  UNVERIFIABLE_APPROVAL_REASON
40
- } from "./chunk-O5ARO3JM.js";
40
+ } from "./chunk-K3ORQ3KY.js";
41
41
  import "./chunk-MLKGABMK.js";
42
42
  export {
43
43
  ABANDONED_WAIT,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  exitOnHelpFlag
4
- } from "../chunk-6HO36P3A.js";
4
+ } from "../chunk-ACC4YXJS.js";
5
5
  import {
6
6
  EXIT
7
7
  } from "../chunk-BG4HHB7E.js";
@@ -9,7 +9,7 @@ import {
9
9
  readJsonSafe,
10
10
  writeJsonAtomic
11
11
  } from "../chunk-TODDEIYG.js";
12
- import "../chunk-TXXAQRX4.js";
12
+ import "../chunk-XWMVKK54.js";
13
13
  import "../chunk-WIIMW5YO.js";
14
14
  import {
15
15
  AUDIT_CHAIN_FINDING_SEVERITY,
@@ -22,7 +22,7 @@ import {
22
22
  parseAuditChainExport,
23
23
  parseAuditKnownHead,
24
24
  verifyAuditChainSite
25
- } from "../chunk-O5ARO3JM.js";
25
+ } from "../chunk-K3ORQ3KY.js";
26
26
  import "../chunk-MLKGABMK.js";
27
27
 
28
28
  // src/audit-verify.ts
@@ -1,45 +1,45 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleBell
4
- } from "../chunk-T4PX3DRF.js";
4
+ } from "../chunk-NQUE54GA.js";
5
5
  import {
6
6
  readHookInput
7
- } from "../chunk-ZIPPDZ5B.js";
8
- import "../chunk-D3QT4S7U.js";
9
- import "../chunk-5HAA7C4X.js";
7
+ } from "../chunk-BAH4LZL3.js";
8
+ import "../chunk-3MXI37MS.js";
9
+ import "../chunk-XU45NUAV.js";
10
10
  import "../chunk-G66WIAST.js";
11
- import "../chunk-PVBDITRS.js";
12
- import "../chunk-XZGQZDFP.js";
13
- import "../chunk-QTQRQZIU.js";
14
- import "../chunk-BP5HLKR6.js";
15
- import "../chunk-WQJ5NJ35.js";
16
- import "../chunk-CAHULQIO.js";
17
- import "../chunk-R2JRRCZK.js";
11
+ import "../chunk-ZSX4XN6C.js";
12
+ import "../chunk-P3E26UO5.js";
13
+ import "../chunk-DQKT5KK5.js";
14
+ import "../chunk-PYH3KFLI.js";
15
+ import "../chunk-AYFOZBTD.js";
16
+ import "../chunk-XJLCZ24Y.js";
17
+ import "../chunk-CVQTLCVS.js";
18
18
  import "../chunk-YPY4YCIZ.js";
19
- import "../chunk-MUTMXSQZ.js";
19
+ import "../chunk-YUYBMCKF.js";
20
20
  import "../chunk-352FIVVH.js";
21
- import "../chunk-T3CMGGNW.js";
22
- import "../chunk-FQLS37AX.js";
23
- import "../chunk-DHCJDYBT.js";
21
+ import "../chunk-7357Q746.js";
22
+ import "../chunk-3TUSMGHE.js";
23
+ import "../chunk-BPSQLKTG.js";
24
24
  import "../chunk-POFBE6ZY.js";
25
- import "../chunk-MUSINFEU.js";
26
- import "../chunk-CABBLJD5.js";
27
- import "../chunk-CDQOARIF.js";
25
+ import "../chunk-ZLHPTXWU.js";
26
+ import "../chunk-P3RRAH6J.js";
27
+ import "../chunk-WQVRDVMJ.js";
28
28
  import "../chunk-H6CL3T2S.js";
29
- import "../chunk-A3URJPYH.js";
30
- import "../chunk-4L2IYNLC.js";
31
- import "../chunk-ABTQG6XU.js";
29
+ import "../chunk-IPRQFNPG.js";
30
+ import "../chunk-46IYOPZH.js";
31
+ import "../chunk-E5YEKJOM.js";
32
32
  import "../chunk-YU2EUD7O.js";
33
- import "../chunk-CU5SYUMK.js";
34
- import "../chunk-XSBW6TUH.js";
35
- import "../chunk-AQ7L2E2U.js";
36
- import "../chunk-43NHQUCY.js";
37
- import "../chunk-VPADWVYD.js";
33
+ import "../chunk-WY4CM6TO.js";
34
+ import "../chunk-OBIUHAXG.js";
35
+ import "../chunk-HY4GEW3T.js";
36
+ import "../chunk-P6GCPJDQ.js";
37
+ import "../chunk-ZBZ7CRGD.js";
38
38
  import "../chunk-BG4HHB7E.js";
39
39
  import "../chunk-TODDEIYG.js";
40
- import "../chunk-TXXAQRX4.js";
40
+ import "../chunk-XWMVKK54.js";
41
41
  import "../chunk-WIIMW5YO.js";
42
- import "../chunk-O5ARO3JM.js";
42
+ import "../chunk-K3ORQ3KY.js";
43
43
  import "../chunk-MLKGABMK.js";
44
44
 
45
45
  // bin/pushary-bell-hook.ts
@@ -5,29 +5,29 @@ import {
5
5
  liveAgentCount,
6
6
  ring,
7
7
  upgradeThreshold
8
- } from "../chunk-T4PX3DRF.js";
8
+ } from "../chunk-NQUE54GA.js";
9
9
  import {
10
10
  createIo
11
11
  } from "../chunk-YM2T76UM.js";
12
12
  import {
13
13
  exitOnHelpFlag
14
- } from "../chunk-6HO36P3A.js";
14
+ } from "../chunk-ACC4YXJS.js";
15
15
  import {
16
16
  addBellHooks,
17
17
  bellInstalled,
18
18
  removeBellHooks
19
- } from "../chunk-R2JRRCZK.js";
19
+ } from "../chunk-CVQTLCVS.js";
20
20
  import {
21
21
  parseFlags
22
22
  } from "../chunk-YPY4YCIZ.js";
23
23
  import "../chunk-YU2EUD7O.js";
24
- import "../chunk-CU5SYUMK.js";
25
- import "../chunk-XSBW6TUH.js";
24
+ import "../chunk-WY4CM6TO.js";
25
+ import "../chunk-OBIUHAXG.js";
26
26
  import {
27
27
  claudeSettings
28
- } from "../chunk-AQ7L2E2U.js";
29
- import "../chunk-43NHQUCY.js";
30
- import "../chunk-VPADWVYD.js";
28
+ } from "../chunk-HY4GEW3T.js";
29
+ import "../chunk-P6GCPJDQ.js";
30
+ import "../chunk-ZBZ7CRGD.js";
31
31
  import {
32
32
  EXIT
33
33
  } from "../chunk-BG4HHB7E.js";
@@ -35,11 +35,11 @@ import {
35
35
  readJsonSafe,
36
36
  writeJsonAtomic
37
37
  } from "../chunk-TODDEIYG.js";
38
- import "../chunk-TXXAQRX4.js";
38
+ import "../chunk-XWMVKK54.js";
39
39
  import "../chunk-WIIMW5YO.js";
40
40
  import {
41
41
  isRecord
42
- } from "../chunk-O5ARO3JM.js";
42
+ } from "../chunk-K3ORQ3KY.js";
43
43
  import "../chunk-MLKGABMK.js";
44
44
 
45
45
  // bin/pushary-bell.ts
@@ -6,30 +6,30 @@ import {
6
6
  import {
7
7
  CommandReceipts,
8
8
  controllerCommandSchema
9
- } from "../chunk-F6ESGEWU.js";
9
+ } from "../chunk-4ZH2PXDA.js";
10
10
  import {
11
11
  SESSION_IDLE_TIMEOUT_MS,
12
12
  describeIdleWindow,
13
13
  startProcessOwnership,
14
14
  withSpawnProcessOwnership
15
- } from "../chunk-3WD3BEPB.js";
15
+ } from "../chunk-A3EV4C34.js";
16
16
  import "../chunk-CYTPQDQY.js";
17
17
  import {
18
18
  announceSubscriptionRequired,
19
19
  isDeferAnswer
20
- } from "../chunk-NLED3JGR.js";
20
+ } from "../chunk-4UDGVO6A.js";
21
21
  import {
22
22
  claudeTranscriptPath,
23
23
  redactDraft,
24
24
  registerTranscript,
25
25
  registeredTranscriptEnabled,
26
26
  startDraftPublisher
27
- } from "../chunk-5HAA7C4X.js";
27
+ } from "../chunk-XU45NUAV.js";
28
28
  import "../chunk-G66WIAST.js";
29
29
  import {
30
30
  ensureDaemonRunning
31
- } from "../chunk-XZGQZDFP.js";
32
- import "../chunk-QTQRQZIU.js";
31
+ } from "../chunk-P3E26UO5.js";
32
+ import "../chunk-DQKT5KK5.js";
33
33
  import {
34
34
  DEFAULT_SESSION,
35
35
  PHONE_DRIVER,
@@ -44,28 +44,28 @@ import {
44
44
  removePendingCommand,
45
45
  reportEvent,
46
46
  savePendingCommand
47
- } from "../chunk-BP5HLKR6.js";
47
+ } from "../chunk-PYH3KFLI.js";
48
48
  import {
49
49
  UNNAMED_ACTION,
50
50
  deriveToolTarget,
51
51
  describeStopFailure,
52
52
  describeToolCall,
53
53
  scopePathFor
54
- } from "../chunk-WQJ5NJ35.js";
55
- import "../chunk-CAHULQIO.js";
56
- import "../chunk-R2JRRCZK.js";
54
+ } from "../chunk-AYFOZBTD.js";
55
+ import "../chunk-XJLCZ24Y.js";
56
+ import "../chunk-CVQTLCVS.js";
57
57
  import "../chunk-YPY4YCIZ.js";
58
- import "../chunk-MUTMXSQZ.js";
58
+ import "../chunk-YUYBMCKF.js";
59
59
  import {
60
60
  external_exports
61
61
  } from "../chunk-352FIVVH.js";
62
62
  import {
63
63
  transcriptsEnabled
64
- } from "../chunk-T3CMGGNW.js";
64
+ } from "../chunk-7357Q746.js";
65
65
  import {
66
66
  repoKeyFor,
67
67
  repositoryScopeFor
68
- } from "../chunk-FQLS37AX.js";
68
+ } from "../chunk-3TUSMGHE.js";
69
69
  import {
70
70
  askUser,
71
71
  cancelQuestion,
@@ -79,13 +79,13 @@ import {
79
79
  waitRetryPauseMs,
80
80
  waitsForThePhone,
81
81
  withdrawQuestion
82
- } from "../chunk-DHCJDYBT.js";
82
+ } from "../chunk-BPSQLKTG.js";
83
83
  import "../chunk-POFBE6ZY.js";
84
84
  import {
85
85
  SubscriptionRequiredError
86
- } from "../chunk-MUSINFEU.js";
87
- import "../chunk-CABBLJD5.js";
88
- import "../chunk-CDQOARIF.js";
86
+ } from "../chunk-ZLHPTXWU.js";
87
+ import "../chunk-P3RRAH6J.js";
88
+ import "../chunk-WQVRDVMJ.js";
89
89
  import {
90
90
  needsShell,
91
91
  spawnClaude
@@ -95,27 +95,27 @@ import {
95
95
  commandAckIsFinal,
96
96
  readCommandAck,
97
97
  refusedReceiptMessage
98
- } from "../chunk-A3URJPYH.js";
99
- import "../chunk-4L2IYNLC.js";
98
+ } from "../chunk-IPRQFNPG.js";
99
+ import "../chunk-46IYOPZH.js";
100
100
  import {
101
101
  getMachineId
102
- } from "../chunk-ABTQG6XU.js";
102
+ } from "../chunk-E5YEKJOM.js";
103
103
  import "../chunk-YU2EUD7O.js";
104
- import "../chunk-CU5SYUMK.js";
105
- import "../chunk-XSBW6TUH.js";
104
+ import "../chunk-WY4CM6TO.js";
105
+ import "../chunk-OBIUHAXG.js";
106
106
  import {
107
107
  claudeConfigDir
108
- } from "../chunk-AQ7L2E2U.js";
109
- import "../chunk-43NHQUCY.js";
108
+ } from "../chunk-HY4GEW3T.js";
109
+ import "../chunk-P6GCPJDQ.js";
110
110
  import {
111
111
  getApiKey,
112
112
  getBaseUrl
113
- } from "../chunk-VPADWVYD.js";
113
+ } from "../chunk-ZBZ7CRGD.js";
114
114
  import "../chunk-BG4HHB7E.js";
115
115
  import "../chunk-TODDEIYG.js";
116
116
  import {
117
117
  NPX_LATEST_COMMAND
118
- } from "../chunk-TXXAQRX4.js";
118
+ } from "../chunk-XWMVKK54.js";
119
119
  import "../chunk-WIIMW5YO.js";
120
120
  import {
121
121
  DECISION_STOP_REASON,
@@ -128,7 +128,7 @@ import {
128
128
  refusesWhenUnanswered,
129
129
  resolveGate,
130
130
  timeoutActionWithoutLocalPrompt
131
- } from "../chunk-O5ARO3JM.js";
131
+ } from "../chunk-K3ORQ3KY.js";
132
132
  import "../chunk-MLKGABMK.js";
133
133
 
134
134
  // src/wrapper/localPassthrough.ts