@pushary/agent-hooks 1.9.167 → 1.9.169

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 (142) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/data/openclaw-plugin/README.md +2 -2
  3. package/data/openclaw-plugin/dist/openclaw-write-guard.js +4 -0
  4. package/data/openclaw-plugin/dist/protected-writes.js +12 -3
  5. package/data/openclaw-plugin/package.json +1 -1
  6. package/dist/{api-7DCJGW6H.js → api-2NP643KP.js} +15 -11
  7. package/dist/bin/pushary-audit.js +3 -3
  8. package/dist/bin/pushary-bell-hook.js +28 -28
  9. package/dist/bin/pushary-bell.js +11 -11
  10. package/dist/bin/pushary-calls.js +15 -15
  11. package/dist/bin/pushary-claude.js +27 -27
  12. package/dist/bin/pushary-clean.js +38 -38
  13. package/dist/bin/pushary-codex-bridge.js +23 -23
  14. package/dist/bin/pushary-codex-hook.js +36 -36
  15. package/dist/bin/pushary-codex-session.js +8 -8
  16. package/dist/bin/pushary-codex.js +16 -16
  17. package/dist/bin/pushary-connect.js +34 -34
  18. package/dist/bin/pushary-cowork.js +5 -5
  19. package/dist/bin/pushary-daemon.js +45 -45
  20. package/dist/bin/pushary-disconnect.js +29 -29
  21. package/dist/bin/pushary-doctor.js +46 -46
  22. package/dist/bin/pushary-elicitation-hook.js +28 -28
  23. package/dist/bin/pushary-gemini-bridge.js +17 -17
  24. package/dist/bin/pushary-gemini-hook.js +32 -32
  25. package/dist/bin/pushary-hook.js +36 -36
  26. package/dist/bin/pushary-login.js +22 -22
  27. package/dist/bin/pushary-logout.js +29 -29
  28. package/dist/bin/pushary-mcp.js +12 -12
  29. package/dist/bin/pushary-mode.js +16 -16
  30. package/dist/bin/pushary-notification-hook.js +27 -27
  31. package/dist/bin/pushary-opencode-hook.js +135 -40
  32. package/dist/bin/pushary-permission-denied-hook.js +36 -36
  33. package/dist/bin/pushary-permission-hook.js +36 -36
  34. package/dist/bin/pushary-post-hook.js +28 -28
  35. package/dist/bin/pushary-prompt-hook.js +27 -27
  36. package/dist/bin/pushary-session-end-hook.js +27 -27
  37. package/dist/bin/pushary-session-start-hook.js +38 -38
  38. package/dist/bin/pushary-setup.js +54 -54
  39. package/dist/bin/pushary-stats.js +5 -5
  40. package/dist/bin/pushary-status.js +35 -35
  41. package/dist/bin/pushary-stop-hook.js +27 -27
  42. package/dist/bin/pushary-stopfailure-hook.js +27 -27
  43. package/dist/bin/pushary-suggestions.js +16 -16
  44. package/dist/bin/pushary-transcript-register.js +17 -17
  45. package/dist/bin/pushary-transcripts.js +25 -25
  46. package/dist/bin/pushary-upgrade.js +43 -43
  47. package/dist/bin/pushary-wait.js +16 -16
  48. package/dist/bin/pushary.js +7 -7
  49. package/dist/{chunk-JIJVIP6B.js → chunk-2SMEEXDR.js} +1 -1
  50. package/dist/{chunk-OHB4XCZT.js → chunk-2TRYSF64.js} +1 -1
  51. package/dist/{chunk-XSHGKPWN.js → chunk-3M4ZOSR3.js} +1 -1
  52. package/dist/{chunk-J2SH6BMP.js → chunk-4HLSCBES.js} +1 -1
  53. package/dist/{chunk-7JPXLFTJ.js → chunk-5N7MRVM3.js} +4 -4
  54. package/dist/{chunk-SG45DOSW.js → chunk-5Q2UDUR6.js} +2 -2
  55. package/dist/{chunk-P4KKTV6I.js → chunk-66VZIS6R.js} +1 -1
  56. package/dist/{chunk-O7QQO22I.js → chunk-6B2YKVX3.js} +2 -2
  57. package/dist/{chunk-3AK7A275.js → chunk-6IZVL42W.js} +1 -1
  58. package/dist/{chunk-HR67NNCI.js → chunk-6PDBRLIH.js} +5 -5
  59. package/dist/{chunk-EQUF4YXM.js → chunk-752NWYBD.js} +5 -5
  60. package/dist/{chunk-FXKXPDQH.js → chunk-7AENNOGX.js} +1 -1
  61. package/dist/{chunk-4Q2BXJKI.js → chunk-7DEAVAAS.js} +3 -3
  62. package/dist/{chunk-GWVT4TQN.js → chunk-7GMTA5NR.js} +10 -10
  63. package/dist/{chunk-5WH6NFNY.js → chunk-AIUFZQAA.js} +1 -1
  64. package/dist/{chunk-B6MT6HZQ.js → chunk-AO4CKFQA.js} +2 -2
  65. package/dist/{chunk-EEIYR2PU.js → chunk-AVIQZSCU.js} +1 -1
  66. package/dist/{chunk-AG2WP3R5.js → chunk-BIEJHRZG.js} +6 -5
  67. package/dist/{chunk-65A5VPDE.js → chunk-CCQZGWSR.js} +6 -6
  68. package/dist/{chunk-DRZLGR3F.js → chunk-CFZUESTS.js} +1 -1
  69. package/dist/{chunk-YTWNOHNK.js → chunk-CRTNHB6F.js} +3 -3
  70. package/dist/{chunk-CGNNCVSC.js → chunk-DXUPOVJP.js} +1 -1
  71. package/dist/{chunk-ZOEMN4PT.js → chunk-DYZ26IPH.js} +3 -3
  72. package/dist/{chunk-U2LU6NXY.js → chunk-EDCDODWA.js} +5 -5
  73. package/dist/{chunk-2MJDREYL.js → chunk-EGPOBJZG.js} +1 -1
  74. package/dist/{chunk-Q7S6ITE4.js → chunk-F7N6LYGG.js} +5 -5
  75. package/dist/{chunk-OTEHOBCC.js → chunk-FAORXDJ4.js} +4 -4
  76. package/dist/{chunk-6FTP2IGU.js → chunk-FUK2DC53.js} +4 -4
  77. package/dist/{chunk-DHMTIS7B.js → chunk-GV3ZGKMK.js} +3 -3
  78. package/dist/{chunk-QS5A5WBR.js → chunk-GVIKF73A.js} +1 -1
  79. package/dist/{chunk-PZH43ICC.js → chunk-HFI6SU27.js} +3 -3
  80. package/dist/{chunk-Y6QXHWZZ.js → chunk-HV7KTGWF.js} +7 -7
  81. package/dist/{chunk-GRBUY5ZC.js → chunk-IWWKO4MP.js} +4 -4
  82. package/dist/{chunk-7FBLMKLW.js → chunk-K24RAOIO.js} +2 -2
  83. package/dist/{chunk-YMO2IWHO.js → chunk-KEC67NZF.js} +5 -5
  84. package/dist/{chunk-SMT3YD6D.js → chunk-KX4Q4CKZ.js} +2 -2
  85. package/dist/{chunk-U6XGBWHB.js → chunk-L77OIGRB.js} +4 -2
  86. package/dist/{chunk-AB265IBW.js → chunk-LDUK7D2I.js} +6 -6
  87. package/dist/{chunk-JD4PIFZA.js → chunk-LEDGOYZV.js} +3 -3
  88. package/dist/{chunk-L35WZXWE.js → chunk-LGQUJFVZ.js} +2 -2
  89. package/dist/{chunk-HP74S2AZ.js → chunk-LL4TMEDG.js} +4 -4
  90. package/dist/{chunk-3AICHW2O.js → chunk-LOUSA3NO.js} +6 -6
  91. package/dist/{chunk-UCQJA73V.js → chunk-LVF5IBS6.js} +1 -1
  92. package/dist/{chunk-SSPDI2AU.js → chunk-LZU7ZDY7.js} +2 -2
  93. package/dist/{chunk-NJTMQOLV.js → chunk-MK7T7MNB.js} +1 -1
  94. package/dist/{chunk-SCJZGEYG.js → chunk-MOQUKAVU.js} +1 -1
  95. package/dist/{chunk-U5SZI6GP.js → chunk-MRTJ54MC.js} +3 -3
  96. package/dist/{chunk-NA2P74E6.js → chunk-NOHOCNY6.js} +4 -4
  97. package/dist/{chunk-ZUDFZNBQ.js → chunk-NRXFFCNG.js} +2 -2
  98. package/dist/{chunk-SZYXBY2H.js → chunk-OBUKF3WP.js} +4 -4
  99. package/dist/{chunk-BILK2RDJ.js → chunk-OI5OOFUY.js} +5 -5
  100. package/dist/{chunk-T4LDWOIG.js → chunk-ORTEANZH.js} +3 -3
  101. package/dist/{chunk-G5NBQSB5.js → chunk-OU7PO32D.js} +3 -3
  102. package/dist/{chunk-4AYUAZEK.js → chunk-PG5N3FL5.js} +12 -12
  103. package/dist/{chunk-5HYHDR2D.js → chunk-QCQADUHN.js} +4 -4
  104. package/dist/{chunk-VFFJSYJQ.js → chunk-QMVUDNQR.js} +4 -4
  105. package/dist/{chunk-XJ23WHWH.js → chunk-RY5EPLCY.js} +5 -5
  106. package/dist/{chunk-63TOLXOC.js → chunk-SD5K34T2.js} +1 -1
  107. package/dist/{chunk-C2AXJZNA.js → chunk-SSKNRWWS.js} +1 -1
  108. package/dist/{chunk-GLPVQBG6.js → chunk-TGIWLQOV.js} +5 -5
  109. package/dist/{chunk-57JWFFEI.js → chunk-TTTMOX73.js} +1 -1
  110. package/dist/{chunk-G5TR3F6L.js → chunk-UCND4JHN.js} +101 -23
  111. package/dist/{chunk-3FQGK5XX.js → chunk-UCW24KPU.js} +2 -2
  112. package/dist/{chunk-A23GU72F.js → chunk-UN36O6U6.js} +3 -3
  113. package/dist/{chunk-PI3L74XD.js → chunk-VWVYDYCV.js} +25 -9
  114. package/dist/{chunk-N7IF5QJ5.js → chunk-VY22KT5X.js} +3 -3
  115. package/dist/{chunk-XANRM6TE.js → chunk-W4NCWOVL.js} +1 -1
  116. package/dist/{chunk-5FYS2WJI.js → chunk-WDLBF3PM.js} +1 -1
  117. package/dist/{chunk-GJRRTSKA.js → chunk-WI2WYKSE.js} +1 -1
  118. package/dist/{chunk-PNZ5DTOG.js → chunk-WIOC6L6Y.js} +2 -2
  119. package/dist/{chunk-FZLALNEW.js → chunk-WK6TE6U7.js} +2 -2
  120. package/dist/{chunk-5H7HNGXQ.js → chunk-WTUURSCO.js} +5 -5
  121. package/dist/{chunk-XG7VMTTL.js → chunk-X7RPRBZE.js} +2 -2
  122. package/dist/{chunk-Z4RNXOJM.js → chunk-X7RR2ZQH.js} +6 -6
  123. package/dist/{chunk-4QFWQ337.js → chunk-XGNOM3XC.js} +2 -2
  124. package/dist/{chunk-H44MW5CL.js → chunk-XWLSZNXW.js} +9 -9
  125. package/dist/{chunk-L7B5RMS3.js → chunk-ZKMXHG5G.js} +8 -8
  126. package/dist/{chunk-GYQER2XO.js → chunk-ZXRBGLTI.js} +6 -6
  127. package/dist/{chunk-SFMMWJLD.js → chunk-ZXZEETHT.js} +18 -18
  128. package/dist/{chunk-7RTMQPNV.js → chunk-ZYH4KTY5.js} +15 -13
  129. package/dist/{codex-app-cards-switch-MO6URXIW.js → codex-app-cards-switch-C6OKN3RA.js} +11 -11
  130. package/dist/{codex-card-routing-7C4NT6VL.js → codex-card-routing-QGOX4RNI.js} +2 -2
  131. package/dist/{codex-desktop-launch-B57GFBK6.js → codex-desktop-launch-5ISZYYGG.js} +1 -1
  132. package/dist/{codex-session-launch-GOUPFBK5.js → codex-session-launch-JWT76ONU.js} +20 -20
  133. package/dist/{config-KCJBXXFC.js → config-PWEPWMNF.js} +3 -3
  134. package/dist/{global-upgrade-CX5FWDDN.js → global-upgrade-ZAPGSH66.js} +9 -9
  135. package/dist/{identity-JMYE6VRO.js → identity-O57FDCPL.js} +4 -4
  136. package/dist/{live-capabilities-YZFB7SNI.js → live-capabilities-FVRWXQAC.js} +4 -4
  137. package/dist/{paths-26C7U354.js → paths-LCARWI3S.js} +3 -3
  138. package/dist/{reapply-7QZ5CZEH.js → reapply-T5JXYBH2.js} +31 -31
  139. package/dist/src/index.js +35 -35
  140. package/dist/{upgrade-lock-24S6DVKT.js → upgrade-lock-3P3VK6KQ.js} +4 -4
  141. package/dist/{usage-23YN2SGZ.js → usage-BKT5P2P3.js} +3 -3
  142. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.169
4
+
5
+ - This CLI carries the OpenClaw plugin 0.1.7, which closes three more gaps in its write guard. All three are in 0.1.6 and earlier.
6
+ - On macOS, a `write`, `edit` or `apply_patch` to a path under `/System/Volumes/Data`, `/.vol` or `/.nofollow` asks. Each reaches the same files as the ordinary path, but `realpath` does not resolve it, so `/System/Volumes/Data/Users/name/.openclaw/openclaw.json` overwrote OpenClaw's config without asking.
7
+ - A `sessions_spawn` with `project_id` or `project_git_url` asks, as `projectId` and `projectGitUrl` do. OpenClaw reads both spellings, and before, the snake_case ones ran without asking.
8
+ - A `sessions_spawn` `cwd` that starts with `~\` is read as OpenClaw reads it on every platform, as a path next to the home folder. Before, with the gateway's working folder inside the workspace, it ran without asking.
9
+
10
+ ## 1.9.168
11
+
12
+ - OpenCode on Windows: a question you answer, dismiss or interrupt in OpenCode is now withdrawn from your phone and the Mac notch, and so is one whose turn ends or whose plugin unloads while OpenCode keeps running. A question still open when you quit OpenCode on Windows may stay on the phone, as before. The plugin told the hook to withdraw it with a signal, and on Windows a signal ends the hook before it can cancel, so the question stayed on the phone with no deadline. Enough of them used up the 8 open questions a session may have and the 25 a workspace may have, and after that every question on the workspace was refused. The plugin now tells the hook by closing its input, which works on every system, and sends a signal only to a hook still running 69 seconds later. Before a question it asks the hook whether it understands this, and asks again when the hook's files change, so an upgrade or a downgrade under a running OpenCode is picked up. A hook from an earlier release, or one that gives no clear answer, is run exactly as before, and a hook that was too slow to answer or failed is asked again at the next question. A withdrawal that fails or runs out of time is now reported to Pushary instead of being dropped without a trace, for a question on every system and for a permission ask on macOS and Linux. On Windows a permission ask is still withdrawn with a signal, and an approval left on the phone waits out its 10-minute deadline. Setup and `pushary upgrade` write the new plugin.
13
+ - `pushary upgrade` no longer rewrites OpenCode's `AGENTS.md` instructions when it cannot rewrite the OpenCode plugin. The instructions tell OpenCode to ask with its own question tool, which reaches your phone only through the new plugin, so a failed plugin write now leaves both as they were, and the next upgrade tries again.
14
+
3
15
  ## 1.9.167
4
16
 
5
17
  - Grok Build: its read-only tools no longer reach your phone. `grep`, `list_dir`, `glob`, `read_file`, `todo_write` and `search_tool` are now treated like Claude Code's reads: Pushary never asks about them, and a rule that denies one still blocks it without asking. Before, a rule that asked about every call sent each of them to your phone and held the call until you answered or the rule's timeout ran out. Shell commands, edits and MCP tools are asked as before.
@@ -56,8 +56,8 @@ Running `pushary setup` later installs the CLI's own copy over a ClawHub or npm
56
56
  - Every `terminal` action except `read` and `list`. `terminal input` types into a shared operator terminal.
57
57
  - Every `nodes` action except the reads: `status`, `describe`, `pending`, `notify`, `camera_list`, `notifications_list` and the `device_*` reads. `nodes run` runs a command on a paired machine, `approve` pairs a new one, and the camera, screen and location actions take data from it.
58
58
  - Every `sessions_spawn` with `runtime: "acp"`. An ACP session runs Codex, Claude Code or another harness, whose own tool calls never reach this plugin, so starting one asks.
59
- - A `sessions_spawn` with a `cwd` outside the agent's workspace or in its `hooks` or `.openclaw` folder, or with a `projectId`, `projectGitUrl` or `worktree`. The question names the folder. OpenClaw resolves a relative `cwd` from the gateway's working folder and expands `~` with `OPENCLAW_HOME` when it is set, so the plugin checks those readings as well as the workspace one.
60
- - Every `write`, `edit` or `apply_patch` into OpenClaw's own files: anything inside an OpenClaw state directory, `~/.config/openclaw` (where Linux keeps `gateway.env`), `~/.pushary`, the `.env` in the gateway's working folder, the config file set by `OPENCLAW_CONFIG_PATH`, and the launchd and systemd files OpenClaw installs for its gateway. The one exception is the agent's own workspace when it lives inside the state directory, which is OpenClaw's default (`~/.openclaw/workspace`). The workspace `hooks` and `.openclaw` folders always ask, wherever the workspace is, because OpenClaw loads code from them: hooks from `hooks`, and plugins from `.openclaw/extensions`, which it finds before the installed ones. The plugin resolves `~`, `@` references and symlinks before it decides, and lands a relative path in the agent's workspace both as OpenClaw names it and where its links lead. A path it cannot resolve asks, including one through a symbolic link whose target does not exist yet. A file with more than one name, a hard link, asks too, because a write changes it under every name; deleting or moving one asks as well. So does any path that is not plain: one with surrounding whitespace, a URL scheme such as `file://`, a `:` other than in a drive prefix, any of `% ? # < > | * "` or an ASCII control character, because OpenClaw resolves those differently in its default, workspace-only and sandbox setups. On macOS and Windows, a path asks when it, or a folder the plugin compares it with, has a character Node cannot compare the way macOS does, such as one newer than Node's Unicode tables. In a sandbox it does not map an absolute path inside the container, such as `/workspace/hooks/x.js`, to the host folder OpenClaw writes, so such a write does not ask. Writes anywhere else run without asking.
59
+ - A `sessions_spawn` with a `cwd` outside the agent's workspace or in its `hooks` or `.openclaw` folder, or with a `projectId`, `projectGitUrl` or `worktree`, in camelCase or snake_case. The question names the folder. OpenClaw resolves a relative `cwd` from the gateway's working folder and expands `~`, `~/` or `~\` with `OPENCLAW_HOME` when it is set, so the plugin checks those readings as well as the workspace one.
60
+ - Every `write`, `edit` or `apply_patch` into OpenClaw's own files: anything inside an OpenClaw state directory, `~/.config/openclaw` (where Linux keeps `gateway.env`), `~/.pushary`, the `.env` in the gateway's working folder, the config file set by `OPENCLAW_CONFIG_PATH`, and the launchd and systemd files OpenClaw installs for its gateway. The one exception is the agent's own workspace when it lives inside the state directory, which is OpenClaw's default (`~/.openclaw/workspace`). The workspace `hooks` and `.openclaw` folders always ask, wherever the workspace is, because OpenClaw loads code from them: hooks from `hooks`, and plugins from `.openclaw/extensions`, which it finds before the installed ones. The plugin resolves `~`, `@` references and symlinks before it decides, and lands a relative path in the agent's workspace both as OpenClaw names it and where its links lead. A path it cannot resolve asks, including one through a symbolic link whose target does not exist yet, and on macOS one under `/System/Volumes/Data`, `/.vol` or `/.nofollow`, which reach the same files by another name. A file with more than one name, a hard link, asks too, because a write changes it under every name; deleting or moving one asks as well. So does any path that is not plain: one with surrounding whitespace, a URL scheme such as `file://`, a `:` other than in a drive prefix, any of `% ? # < > | * "` or an ASCII control character, because OpenClaw resolves those differently in its default, workspace-only and sandbox setups. On macOS and Windows, a path asks when it, or a folder the plugin compares it with, has a character Node cannot compare the way macOS does, such as one newer than Node's Unicode tables. In a sandbox it does not map an absolute path inside the container, such as `/workspace/hooks/x.js`, to the host folder OpenClaw writes, so such a write does not ask. Writes anywhere else run without asking.
61
61
 
62
62
  To gate more tools, list their OpenClaw tool ids. The list adds to the defaults above; it never replaces them:
63
63
 
@@ -5,6 +5,9 @@ import { openClawEnvironmentOf, openClawPathsFrom, ownedPluginFolderIn } from '.
5
5
  import { nodeHasOtherNames, nodeMayBeSymbolicLink, nodeRealpath, spawnsOutsideTheWorkspace, writesIntoOpenClaw } from './protected-writes.js';
6
6
  import { DEFAULT_OPENCLAW_AGENT_ID } from './settings.js';
7
7
  const CASE_INSENSITIVE_PLATFORMS = new Set(['darwin', 'win32']);
8
+ const PATH_ALIAS_ROOTS_BY_PLATFORM = {
9
+ darwin: ['/System/Volumes/Data', '/.vol', '/.nofollow'],
10
+ };
8
11
  const EXTENSIONS_DIRECTORY_NAME = 'extensions';
9
12
  const PLUGIN_ROOT_DEPTH = 2;
10
13
  const USER_CONFIG_DIRECTORY = '.config';
@@ -89,6 +92,7 @@ export const openClawWriteGuardFor = (api) => {
89
92
  mayBeSymbolicLink: nodeMayBeSymbolicLink,
90
93
  hasOtherNames: nodeHasOtherNames,
91
94
  caseInsensitive: CASE_INSENSITIVE_PLATFORMS.has(process.platform),
95
+ pathAliasRoots: PATH_ALIAS_ROOTS_BY_PLATFORM[process.platform] ?? [],
92
96
  workspaceFor: workspaceFrom(api),
93
97
  otherWorkingDirectories: [process.cwd()],
94
98
  };
@@ -80,6 +80,7 @@ const comparablePathsFor = (locations, system, agentId) => {
80
80
  workspace: comparableWorkspace,
81
81
  workspaceSpellings: workspace === null || comparableWorkspace === null ? [] : [...new Set([comparableWorkspace, resolve(workspace)])],
82
82
  workspaceFoldersOpenClawLoads: WORKSPACE_FOLDERS_OPENCLAW_LOADS.map(folder => comparable(folder, system)),
83
+ pathAliasRoots: system.pathAliasRoots.map(root => comparable(root, system)),
83
84
  riskyRelativeStarts: new Set([
84
85
  ...locations.stateDirectories.map(state => comparable(basename(state), system)),
85
86
  ...locations.configFiles.map(file => comparable(basename(file), system)),
@@ -114,11 +115,15 @@ const isProtectedLocation = (path, paths) => {
114
115
  return !isInWorkspaceUnderState(path, paths);
115
116
  };
116
117
  const foldCanBeTrustedFor = (path, paths, system) => !system.caseInsensitive || (paths.locationsFoldAsTheDiskDoes && foldsAsTheDiskDoes(path));
118
+ const isUnderAPathAlias = (location, paths) => paths.pathAliasRoots.some(root => isSameOrInside(location, root));
117
119
  const verdictForAbsolute = (path, paths, system) => {
118
120
  const canonical = canonicalPathOf(path, system);
119
121
  if (canonical === null || system.hasOtherNames(canonical) || !foldCanBeTrustedFor(canonical, paths, system))
120
122
  return 'uncertain';
121
- return isProtectedLocation(comparable(canonical, system), paths) ? 'protected' : 'clear';
123
+ const location = comparable(canonical, system);
124
+ if (isUnderAPathAlias(location, paths))
125
+ return 'uncertain';
126
+ return isProtectedLocation(location, paths) ? 'protected' : 'clear';
122
127
  };
123
128
  const firstComponentOf = (relativePath) => normalize(relativePath).split(/[\\/]/).find(part => part.length > 0) ?? '';
124
129
  const expandedHome = (path, osHome) => path === HOME_PREFIX || path.startsWith(`${HOME_PREFIX}/`) || (process.platform === 'win32' && path.startsWith(`${HOME_PREFIX}\\`))
@@ -222,20 +227,24 @@ export const writesIntoOpenClaw = (locations, system, call) => {
222
227
  export const SESSIONS_SPAWN_TOOL = 'sessions_spawn';
223
228
  export const SPAWN_FOLDER_PARAMETER = 'cwd';
224
229
  const SPAWN_SOURCES_IT_CANNOT_SEE = ['projectId', 'projectGitUrl', 'worktree'];
230
+ const snakeCaseOf = (name) => name.replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2').replace(/([a-z0-9])([A-Z])/g, '$1_$2').toLowerCase();
231
+ const SPAWN_SOURCE_SPELLINGS = [...new Set(SPAWN_SOURCES_IT_CANNOT_SEE.flatMap(name => [name, snakeCaseOf(name)]))];
225
232
  const SPAWN_RUNTIME_PARAMETER = 'runtime';
226
233
  const ACP_RUNTIME = 'acp';
227
234
  export const startsAnAcpSession = (params) => {
228
235
  const runtime = params[SPAWN_RUNTIME_PARAMETER];
229
236
  return typeof runtime === 'string' && runtime.trim().toLowerCase() === ACP_RUNTIME;
230
237
  };
231
- const namesAFolderItCannotSee = (params) => SPAWN_SOURCES_IT_CANNOT_SEE.some(name => params[name] !== undefined && params[name] !== false);
238
+ const namesAFolderItCannotSee = (params) => SPAWN_SOURCE_SPELLINGS.some(name => params[name] !== undefined && params[name] !== false);
239
+ const USER_PATH_HOME_PREFIX = /^~(?=$|[\\/])/;
240
+ const userPathExpandedFrom = (raw, home) => raw.replace(USER_PATH_HOME_PREFIX, () => home);
232
241
  const spawnFolderReadingsOf = (raw, system) => {
233
242
  const readings = [];
234
243
  for (const home of [system.osHome, system.openClawHome]) {
235
244
  const decoded = absoluteOrRelative(raw, home);
236
245
  if (decoded === null)
237
246
  return null;
238
- readings.push(decoded, expandedHome(raw, home));
247
+ readings.push(decoded, userPathExpandedFrom(raw, home));
239
248
  }
240
249
  return [...new Set(readings)];
241
250
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushary/openclaw",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
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,5 +1,6 @@
1
1
  import {
2
2
  ABANDONED_WAIT,
3
+ CANCEL_QUESTION_TIMEOUT_MS,
3
4
  WAIT_RESPONSE_GRACE_MS,
4
5
  askUser,
5
6
  cancelQuestion,
@@ -11,6 +12,7 @@ import {
11
12
  isTransientWaitFailure,
12
13
  nextLongPollMs,
13
14
  pollForAnswer,
15
+ reportFailedQuestionWithdrawal,
14
16
  requestGate,
15
17
  sendNotification,
16
18
  sleepUnlessAborted,
@@ -21,28 +23,29 @@ import {
21
23
  waitRetryPauseMs,
22
24
  waitsForThePhone,
23
25
  withdrawQuestion
24
- } from "./chunk-PI3L74XD.js";
26
+ } from "./chunk-VWVYDYCV.js";
25
27
  import "./chunk-POFBE6ZY.js";
26
- import "./chunk-HR67NNCI.js";
27
- import "./chunk-C2AXJZNA.js";
28
- import "./chunk-DHMTIS7B.js";
29
- import "./chunk-N7IF5QJ5.js";
30
- import "./chunk-SCJZGEYG.js";
31
- import "./chunk-XG7VMTTL.js";
32
- import "./chunk-NA2P74E6.js";
33
- import "./chunk-UCQJA73V.js";
28
+ import "./chunk-6PDBRLIH.js";
29
+ import "./chunk-SSKNRWWS.js";
30
+ import "./chunk-GV3ZGKMK.js";
31
+ import "./chunk-VY22KT5X.js";
32
+ import "./chunk-MOQUKAVU.js";
33
+ import "./chunk-X7RPRBZE.js";
34
+ import "./chunk-NOHOCNY6.js";
35
+ import "./chunk-LVF5IBS6.js";
34
36
  import "./chunk-YU2EUD7O.js";
35
37
  import "./chunk-TODDEIYG.js";
36
38
  import "./chunk-BG4HHB7E.js";
37
- import "./chunk-5FYS2WJI.js";
39
+ import "./chunk-WDLBF3PM.js";
38
40
  import "./chunk-UQTQ6HPO.js";
39
41
  import {
40
42
  DECISION_STOP_REASON,
41
43
  UNVERIFIABLE_APPROVAL_REASON
42
- } from "./chunk-U6XGBWHB.js";
44
+ } from "./chunk-L77OIGRB.js";
43
45
  import "./chunk-MLKGABMK.js";
44
46
  export {
45
47
  ABANDONED_WAIT,
48
+ CANCEL_QUESTION_TIMEOUT_MS,
46
49
  DECISION_STOP_REASON,
47
50
  UNVERIFIABLE_APPROVAL_REASON,
48
51
  WAIT_RESPONSE_GRACE_MS,
@@ -56,6 +59,7 @@ export {
56
59
  isTransientWaitFailure,
57
60
  nextLongPollMs,
58
61
  pollForAnswer,
62
+ reportFailedQuestionWithdrawal,
59
63
  requestGate,
60
64
  sendNotification,
61
65
  sleepUnlessAborted,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  exitOnHelpFlag
4
- } from "../chunk-3AK7A275.js";
4
+ } from "../chunk-6IZVL42W.js";
5
5
  import {
6
6
  readJsonSafe,
7
7
  writeJsonAtomic
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  EXIT
11
11
  } from "../chunk-BG4HHB7E.js";
12
- import "../chunk-5FYS2WJI.js";
12
+ import "../chunk-WDLBF3PM.js";
13
13
  import "../chunk-UQTQ6HPO.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-U6XGBWHB.js";
25
+ } from "../chunk-L77OIGRB.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-NJTMQOLV.js";
4
+ } from "../chunk-MK7T7MNB.js";
5
5
  import {
6
6
  readHookInput
7
- } from "../chunk-GLPVQBG6.js";
8
- import "../chunk-GRBUY5ZC.js";
9
- import "../chunk-GWVT4TQN.js";
7
+ } from "../chunk-TGIWLQOV.js";
8
+ import "../chunk-IWWKO4MP.js";
9
+ import "../chunk-7GMTA5NR.js";
10
10
  import "../chunk-WHB622LP.js";
11
- import "../chunk-5H7HNGXQ.js";
12
- import "../chunk-AB265IBW.js";
13
- import "../chunk-SZYXBY2H.js";
14
- import "../chunk-4AYUAZEK.js";
15
- import "../chunk-DRZLGR3F.js";
16
- import "../chunk-5WH6NFNY.js";
17
- import "../chunk-EEIYR2PU.js";
11
+ import "../chunk-WTUURSCO.js";
12
+ import "../chunk-LDUK7D2I.js";
13
+ import "../chunk-OBUKF3WP.js";
14
+ import "../chunk-PG5N3FL5.js";
15
+ import "../chunk-CFZUESTS.js";
16
+ import "../chunk-AIUFZQAA.js";
17
+ import "../chunk-AVIQZSCU.js";
18
18
  import "../chunk-YPY4YCIZ.js";
19
- import "../chunk-4Q2BXJKI.js";
19
+ import "../chunk-7DEAVAAS.js";
20
20
  import "../chunk-352FIVVH.js";
21
- import "../chunk-XSHGKPWN.js";
21
+ import "../chunk-3M4ZOSR3.js";
22
22
  import "../chunk-Y6ILCLKE.js";
23
- import "../chunk-OHB4XCZT.js";
24
- import "../chunk-PI3L74XD.js";
25
- import "../chunk-QS5A5WBR.js";
23
+ import "../chunk-2TRYSF64.js";
24
+ import "../chunk-VWVYDYCV.js";
25
+ import "../chunk-GVIKF73A.js";
26
26
  import "../chunk-POFBE6ZY.js";
27
- import "../chunk-HR67NNCI.js";
28
- import "../chunk-C2AXJZNA.js";
29
- import "../chunk-DHMTIS7B.js";
30
- import "../chunk-N7IF5QJ5.js";
31
- import "../chunk-SCJZGEYG.js";
32
- import "../chunk-ZOEMN4PT.js";
33
- import "../chunk-7FBLMKLW.js";
34
- import "../chunk-XG7VMTTL.js";
35
- import "../chunk-NA2P74E6.js";
36
- import "../chunk-UCQJA73V.js";
27
+ import "../chunk-6PDBRLIH.js";
28
+ import "../chunk-SSKNRWWS.js";
29
+ import "../chunk-GV3ZGKMK.js";
30
+ import "../chunk-VY22KT5X.js";
31
+ import "../chunk-MOQUKAVU.js";
32
+ import "../chunk-DYZ26IPH.js";
33
+ import "../chunk-K24RAOIO.js";
34
+ import "../chunk-X7RPRBZE.js";
35
+ import "../chunk-NOHOCNY6.js";
36
+ import "../chunk-LVF5IBS6.js";
37
37
  import "../chunk-YU2EUD7O.js";
38
38
  import "../chunk-TODDEIYG.js";
39
39
  import "../chunk-BG4HHB7E.js";
40
- import "../chunk-5FYS2WJI.js";
40
+ import "../chunk-WDLBF3PM.js";
41
41
  import "../chunk-UQTQ6HPO.js";
42
- import "../chunk-U6XGBWHB.js";
42
+ import "../chunk-L77OIGRB.js";
43
43
  import "../chunk-MLKGABMK.js";
44
44
 
45
45
  // bin/pushary-bell-hook.ts
@@ -5,28 +5,28 @@ import {
5
5
  liveAgentCount,
6
6
  ring,
7
7
  upgradeThreshold
8
- } from "../chunk-NJTMQOLV.js";
8
+ } from "../chunk-MK7T7MNB.js";
9
9
  import {
10
10
  createIo
11
- } from "../chunk-CGNNCVSC.js";
11
+ } from "../chunk-DXUPOVJP.js";
12
12
  import {
13
13
  exitOnHelpFlag
14
- } from "../chunk-3AK7A275.js";
14
+ } from "../chunk-6IZVL42W.js";
15
15
  import {
16
16
  addBellHooks,
17
17
  bellInstalled,
18
18
  removeBellHooks
19
- } from "../chunk-EEIYR2PU.js";
19
+ } from "../chunk-AVIQZSCU.js";
20
20
  import {
21
21
  parseFlags
22
22
  } from "../chunk-YPY4YCIZ.js";
23
- import "../chunk-ZOEMN4PT.js";
24
- import "../chunk-7FBLMKLW.js";
23
+ import "../chunk-DYZ26IPH.js";
24
+ import "../chunk-K24RAOIO.js";
25
25
  import {
26
26
  claudeSettings
27
- } from "../chunk-XG7VMTTL.js";
28
- import "../chunk-NA2P74E6.js";
29
- import "../chunk-UCQJA73V.js";
27
+ } from "../chunk-X7RPRBZE.js";
28
+ import "../chunk-NOHOCNY6.js";
29
+ import "../chunk-LVF5IBS6.js";
30
30
  import "../chunk-YU2EUD7O.js";
31
31
  import {
32
32
  readJsonSafe,
@@ -35,11 +35,11 @@ import {
35
35
  import {
36
36
  EXIT
37
37
  } from "../chunk-BG4HHB7E.js";
38
- import "../chunk-5FYS2WJI.js";
38
+ import "../chunk-WDLBF3PM.js";
39
39
  import "../chunk-UQTQ6HPO.js";
40
40
  import {
41
41
  isRecord
42
- } from "../chunk-U6XGBWHB.js";
42
+ } from "../chunk-L77OIGRB.js";
43
43
  import "../chunk-MLKGABMK.js";
44
44
 
45
45
  // bin/pushary-bell.ts
@@ -1,31 +1,31 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  exitOnFailedResponse
4
- } from "../chunk-Y6QXHWZZ.js";
5
- import "../chunk-FZLALNEW.js";
6
- import "../chunk-B6MT6HZQ.js";
4
+ } from "../chunk-HV7KTGWF.js";
5
+ import "../chunk-WK6TE6U7.js";
6
+ import "../chunk-AO4CKFQA.js";
7
7
  import {
8
8
  createIo
9
- } from "../chunk-CGNNCVSC.js";
9
+ } from "../chunk-DXUPOVJP.js";
10
10
  import {
11
11
  exitOnHelpFlag
12
- } from "../chunk-3AK7A275.js";
12
+ } from "../chunk-6IZVL42W.js";
13
13
  import {
14
14
  parseFlags
15
15
  } from "../chunk-YPY4YCIZ.js";
16
- import "../chunk-DHMTIS7B.js";
16
+ import "../chunk-GV3ZGKMK.js";
17
17
  import {
18
18
  pusharyFetch
19
- } from "../chunk-N7IF5QJ5.js";
20
- import "../chunk-SCJZGEYG.js";
21
- import "../chunk-ZOEMN4PT.js";
22
- import "../chunk-7FBLMKLW.js";
23
- import "../chunk-XG7VMTTL.js";
24
- import "../chunk-NA2P74E6.js";
19
+ } from "../chunk-VY22KT5X.js";
20
+ import "../chunk-MOQUKAVU.js";
21
+ import "../chunk-DYZ26IPH.js";
22
+ import "../chunk-K24RAOIO.js";
23
+ import "../chunk-X7RPRBZE.js";
24
+ import "../chunk-NOHOCNY6.js";
25
25
  import {
26
26
  getApiKey,
27
27
  getBaseUrl
28
- } from "../chunk-UCQJA73V.js";
28
+ } from "../chunk-LVF5IBS6.js";
29
29
  import {
30
30
  UsageError,
31
31
  exitCodeFor
@@ -36,14 +36,14 @@ import {
36
36
  } from "../chunk-BG4HHB7E.js";
37
37
  import {
38
38
  isInvocationOf
39
- } from "../chunk-5FYS2WJI.js";
39
+ } from "../chunk-WDLBF3PM.js";
40
40
  import "../chunk-UQTQ6HPO.js";
41
41
  import {
42
42
  PHONE_CALL_SETUP_PATH,
43
43
  PHONE_CALL_SETUP_TEST_CALL_PARAM,
44
44
  parsePhoneCallSetupReply,
45
45
  parseTestCallReply
46
- } from "../chunk-U6XGBWHB.js";
46
+ } from "../chunk-L77OIGRB.js";
47
47
  import "../chunk-MLKGABMK.js";
48
48
 
49
49
  // bin/pushary-calls.ts
@@ -6,30 +6,30 @@ import {
6
6
  import {
7
7
  CommandReceipts,
8
8
  controllerCommandSchema
9
- } from "../chunk-57JWFFEI.js";
9
+ } from "../chunk-TTTMOX73.js";
10
10
  import {
11
11
  SESSION_IDLE_TIMEOUT_MS,
12
12
  describeIdleWindow,
13
13
  startProcessOwnership,
14
14
  withSpawnProcessOwnership
15
- } from "../chunk-3FQGK5XX.js";
15
+ } from "../chunk-UCW24KPU.js";
16
16
  import "../chunk-CYTPQDQY.js";
17
17
  import {
18
18
  announceSubscriptionRequired,
19
19
  isDeferAnswer
20
- } from "../chunk-P4KKTV6I.js";
20
+ } from "../chunk-66VZIS6R.js";
21
21
  import {
22
22
  claudeTranscriptPath,
23
23
  redactDraft,
24
24
  registerTranscript,
25
25
  registeredTranscriptEnabled,
26
26
  startDraftPublisher
27
- } from "../chunk-GWVT4TQN.js";
27
+ } from "../chunk-7GMTA5NR.js";
28
28
  import "../chunk-WHB622LP.js";
29
29
  import {
30
30
  ensureDaemonRunning
31
- } from "../chunk-AB265IBW.js";
32
- import "../chunk-SZYXBY2H.js";
31
+ } from "../chunk-LDUK7D2I.js";
32
+ import "../chunk-OBUKF3WP.js";
33
33
  import {
34
34
  DEFAULT_SESSION,
35
35
  PHONE_DRIVER,
@@ -44,24 +44,24 @@ import {
44
44
  removePendingCommand,
45
45
  reportEvent,
46
46
  savePendingCommand
47
- } from "../chunk-4AYUAZEK.js";
47
+ } from "../chunk-PG5N3FL5.js";
48
48
  import {
49
49
  UNNAMED_ACTION,
50
50
  deriveToolTarget,
51
51
  describeStopFailure,
52
52
  describeToolCall,
53
53
  scopePathFor
54
- } from "../chunk-DRZLGR3F.js";
55
- import "../chunk-5WH6NFNY.js";
56
- import "../chunk-EEIYR2PU.js";
54
+ } from "../chunk-CFZUESTS.js";
55
+ import "../chunk-AIUFZQAA.js";
56
+ import "../chunk-AVIQZSCU.js";
57
57
  import "../chunk-YPY4YCIZ.js";
58
- import "../chunk-4Q2BXJKI.js";
58
+ import "../chunk-7DEAVAAS.js";
59
59
  import {
60
60
  external_exports
61
61
  } from "../chunk-352FIVVH.js";
62
62
  import {
63
63
  transcriptsEnabled
64
- } from "../chunk-XSHGKPWN.js";
64
+ } from "../chunk-3M4ZOSR3.js";
65
65
  import {
66
66
  needsShell,
67
67
  spawnClaude
@@ -69,7 +69,7 @@ import {
69
69
  import {
70
70
  repoKeyFor,
71
71
  repositoryScopeFor
72
- } from "../chunk-OHB4XCZT.js";
72
+ } from "../chunk-2TRYSF64.js";
73
73
  import {
74
74
  askUser,
75
75
  cancelQuestion,
@@ -83,39 +83,39 @@ import {
83
83
  waitRetryPauseMs,
84
84
  waitsForThePhone,
85
85
  withdrawQuestion
86
- } from "../chunk-PI3L74XD.js";
86
+ } from "../chunk-VWVYDYCV.js";
87
87
  import {
88
88
  RETRY_ACK,
89
89
  commandAckIsFinal,
90
90
  readCommandAck,
91
91
  refusedReceiptMessage
92
- } from "../chunk-QS5A5WBR.js";
92
+ } from "../chunk-GVIKF73A.js";
93
93
  import "../chunk-POFBE6ZY.js";
94
94
  import {
95
95
  SubscriptionRequiredError
96
- } from "../chunk-HR67NNCI.js";
97
- import "../chunk-C2AXJZNA.js";
98
- import "../chunk-DHMTIS7B.js";
99
- import "../chunk-N7IF5QJ5.js";
96
+ } from "../chunk-6PDBRLIH.js";
97
+ import "../chunk-SSKNRWWS.js";
98
+ import "../chunk-GV3ZGKMK.js";
99
+ import "../chunk-VY22KT5X.js";
100
100
  import {
101
101
  getMachineId
102
- } from "../chunk-SCJZGEYG.js";
103
- import "../chunk-ZOEMN4PT.js";
104
- import "../chunk-7FBLMKLW.js";
102
+ } from "../chunk-MOQUKAVU.js";
103
+ import "../chunk-DYZ26IPH.js";
104
+ import "../chunk-K24RAOIO.js";
105
105
  import {
106
106
  claudeConfigDir
107
- } from "../chunk-XG7VMTTL.js";
108
- import "../chunk-NA2P74E6.js";
107
+ } from "../chunk-X7RPRBZE.js";
108
+ import "../chunk-NOHOCNY6.js";
109
109
  import {
110
110
  getApiKey,
111
111
  getBaseUrl
112
- } from "../chunk-UCQJA73V.js";
112
+ } from "../chunk-LVF5IBS6.js";
113
113
  import "../chunk-YU2EUD7O.js";
114
114
  import "../chunk-TODDEIYG.js";
115
115
  import "../chunk-BG4HHB7E.js";
116
116
  import {
117
117
  NPX_LATEST_COMMAND
118
- } from "../chunk-5FYS2WJI.js";
118
+ } from "../chunk-WDLBF3PM.js";
119
119
  import "../chunk-UQTQ6HPO.js";
120
120
  import {
121
121
  DECISION_STOP_REASON,
@@ -129,7 +129,7 @@ import {
129
129
  refusesWhenUnanswered,
130
130
  resolveGate,
131
131
  timeoutActionWithoutLocalPrompt
132
- } from "../chunk-U6XGBWHB.js";
132
+ } from "../chunk-L77OIGRB.js";
133
133
  import "../chunk-MLKGABMK.js";
134
134
 
135
135
  // src/wrapper/localPassthrough.ts