@pushary/agent-hooks 1.9.168 → 1.9.170

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 (134) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +15 -0
  3. package/data/openclaw-plugin/README.md +2 -2
  4. package/data/openclaw-plugin/dist/openclaw-write-guard.js +4 -0
  5. package/data/openclaw-plugin/dist/protected-writes.js +12 -3
  6. package/data/openclaw-plugin/package.json +1 -1
  7. package/dist/{api-2NP643KP.js → api-3KBPIGV4.js} +10 -10
  8. package/dist/bin/pushary-audit.js +2 -2
  9. package/dist/bin/pushary-bell-hook.js +25 -25
  10. package/dist/bin/pushary-bell.js +11 -11
  11. package/dist/bin/pushary-calls.js +15 -15
  12. package/dist/bin/pushary-claude.js +23 -23
  13. package/dist/bin/pushary-clean.js +33 -33
  14. package/dist/bin/pushary-codex-bridge.js +19 -19
  15. package/dist/bin/pushary-codex-hook.js +30 -30
  16. package/dist/bin/pushary-codex-session.js +8 -8
  17. package/dist/bin/pushary-codex.js +12 -12
  18. package/dist/bin/pushary-connect.js +28 -28
  19. package/dist/bin/pushary-cowork.js +6 -6
  20. package/dist/bin/pushary-daemon.js +43 -43
  21. package/dist/bin/pushary-disconnect.js +25 -25
  22. package/dist/bin/pushary-display-hook.js +6 -0
  23. package/dist/bin/pushary-doctor.js +43 -43
  24. package/dist/bin/pushary-elicitation-hook.js +25 -25
  25. package/dist/bin/pushary-gemini-bridge.js +13 -13
  26. package/dist/bin/pushary-gemini-hook.js +28 -28
  27. package/dist/bin/pushary-hook.js +31 -31
  28. package/dist/bin/pushary-login.js +21 -21
  29. package/dist/bin/pushary-logout.js +24 -24
  30. package/dist/bin/pushary-mcp.js +11 -11
  31. package/dist/bin/pushary-mode.js +15 -15
  32. package/dist/bin/pushary-notification-hook.js +24 -24
  33. package/dist/bin/pushary-opencode-hook.js +28 -28
  34. package/dist/bin/pushary-permission-denied-hook.js +30 -30
  35. package/dist/bin/pushary-permission-hook.js +30 -30
  36. package/dist/bin/pushary-post-hook.js +25 -25
  37. package/dist/bin/pushary-prompt-hook.js +24 -24
  38. package/dist/bin/pushary-session-end-hook.js +24 -24
  39. package/dist/bin/pushary-session-start-hook.js +34 -34
  40. package/dist/bin/pushary-sessions.d.ts +1 -0
  41. package/dist/bin/pushary-sessions.js +81 -0
  42. package/dist/bin/pushary-setup.js +51 -51
  43. package/dist/bin/pushary-stats.js +3 -3
  44. package/dist/bin/pushary-status.js +30 -30
  45. package/dist/bin/pushary-stop-hook.js +24 -24
  46. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  47. package/dist/bin/pushary-suggestions.js +15 -15
  48. package/dist/bin/pushary-transcript-register.js +16 -16
  49. package/dist/bin/pushary-transcripts.js +24 -24
  50. package/dist/bin/pushary-upgrade.js +39 -39
  51. package/dist/bin/pushary-wait.js +15 -15
  52. package/dist/bin/pushary.js +8 -7
  53. package/dist/{chunk-TGIWLQOV.js → chunk-2OMWK322.js} +4 -4
  54. package/dist/{chunk-K24RAOIO.js → chunk-3I3RUJRD.js} +1 -1
  55. package/dist/{chunk-ZXZEETHT.js → chunk-3UNQJ6AO.js} +13 -13
  56. package/dist/{chunk-OU7PO32D.js → chunk-3ZO7WCMV.js} +2 -2
  57. package/dist/{chunk-HV7KTGWF.js → chunk-57MF5I5V.js} +5 -5
  58. package/dist/{chunk-6PDBRLIH.js → chunk-5OI4EW6G.js} +3 -3
  59. package/dist/{chunk-5N7MRVM3.js → chunk-5TNFIUN3.js} +4 -4
  60. package/dist/{chunk-OBUKF3WP.js → chunk-65U6TH6P.js} +3 -3
  61. package/dist/{chunk-XWLSZNXW.js → chunk-6KL27ETS.js} +7 -7
  62. package/dist/{chunk-VWVYDYCV.js → chunk-7E4OSMST.js} +4 -4
  63. package/dist/{chunk-UCW24KPU.js → chunk-7RNLPI6H.js} +1 -1
  64. package/dist/{chunk-LVF5IBS6.js → chunk-A2DVMIX4.js} +1 -1
  65. package/dist/{chunk-6IZVL42W.js → chunk-AVN4A4A6.js} +1 -1
  66. package/dist/{chunk-3M4ZOSR3.js → chunk-BFZHRQJU.js} +1 -1
  67. package/dist/{chunk-CCQZGWSR.js → chunk-BX45H3DU.js} +4 -4
  68. package/dist/{chunk-YPY4YCIZ.js → chunk-BZIBNSQE.js} +1 -1
  69. package/dist/{chunk-AVIQZSCU.js → chunk-BZILLAPJ.js} +1 -1
  70. package/dist/{chunk-YU2EUD7O.js → chunk-CINBAX5G.js} +2 -0
  71. package/dist/{chunk-AIUFZQAA.js → chunk-CLT4J5N5.js} +2 -2
  72. package/dist/{chunk-NRXFFCNG.js → chunk-CNPTWWKJ.js} +2 -2
  73. package/dist/{chunk-WTUURSCO.js → chunk-CXKAP6DR.js} +3 -3
  74. package/dist/{chunk-UN36O6U6.js → chunk-DVBRMNFM.js} +2 -2
  75. package/dist/{chunk-7DEAVAAS.js → chunk-DXHRKDP7.js} +1 -1
  76. package/dist/{chunk-6B2YKVX3.js → chunk-EBHIVYSD.js} +2 -2
  77. package/dist/{chunk-LOUSA3NO.js → chunk-EPBS4KJR.js} +6 -6
  78. package/dist/{chunk-7GMTA5NR.js → chunk-FD7JHIET.js} +7 -7
  79. package/dist/{chunk-LEDGOYZV.js → chunk-FTE5ECGI.js} +2 -2
  80. package/dist/{chunk-QMVUDNQR.js → chunk-GFWQNXX7.js} +3 -3
  81. package/dist/{chunk-4HLSCBES.js → chunk-GZZ7XGL5.js} +12 -2
  82. package/dist/{chunk-LGQUJFVZ.js → chunk-HP5RU3OU.js} +1 -1
  83. package/dist/{chunk-ZXRBGLTI.js → chunk-HXVCULWA.js} +5 -5
  84. package/dist/{chunk-XGNOM3XC.js → chunk-HZANYISD.js} +1 -1
  85. package/dist/{chunk-MOQUKAVU.js → chunk-IGKHWARK.js} +1 -1
  86. package/dist/{chunk-ORTEANZH.js → chunk-IHNII3GT.js} +4 -4
  87. package/dist/{chunk-WDLBF3PM.js → chunk-IV7WDCKS.js} +6 -0
  88. package/dist/{chunk-MRTJ54MC.js → chunk-IWKEIVDF.js} +1 -1
  89. package/dist/{chunk-KX4Q4CKZ.js → chunk-JNUZYDUC.js} +2 -2
  90. package/dist/{chunk-DYZ26IPH.js → chunk-JTFD3KQ6.js} +2 -2
  91. package/dist/{chunk-IWWKO4MP.js → chunk-K5HACZJ3.js} +3 -3
  92. package/dist/{chunk-5Q2UDUR6.js → chunk-KE5ED475.js} +2 -2
  93. package/dist/{chunk-LL4TMEDG.js → chunk-L6UCFQKZ.js} +4 -4
  94. package/dist/{chunk-FUK2DC53.js → chunk-LEXVQXZU.js} +3 -3
  95. package/dist/{chunk-NOHOCNY6.js → chunk-LILP3T24.js} +3 -3
  96. package/dist/{chunk-AO4CKFQA.js → chunk-LML7I4FY.js} +1 -1
  97. package/dist/{chunk-MK7T7MNB.js → chunk-LT3B5432.js} +1 -1
  98. package/dist/{chunk-OI5OOFUY.js → chunk-MPCJB6I7.js} +4 -4
  99. package/dist/{chunk-ZKMXHG5G.js → chunk-MPJAXUN2.js} +4 -4
  100. package/dist/{chunk-WIOC6L6Y.js → chunk-MVWWEQQG.js} +1 -1
  101. package/dist/{chunk-66VZIS6R.js → chunk-NJSBHEEW.js} +1 -1
  102. package/dist/{chunk-WK6TE6U7.js → chunk-NWKXT7LC.js} +2 -2
  103. package/dist/{chunk-FAORXDJ4.js → chunk-NYDJHJIJ.js} +3 -3
  104. package/dist/{chunk-GV3ZGKMK.js → chunk-OHVQ75S7.js} +3 -3
  105. package/dist/{chunk-VY22KT5X.js → chunk-OKM76UDB.js} +4 -3
  106. package/dist/{chunk-BIEJHRZG.js → chunk-QJNI6MPV.js} +2 -2
  107. package/dist/{chunk-QCQADUHN.js → chunk-RGE64J2V.js} +3 -3
  108. package/dist/{chunk-752NWYBD.js → chunk-RSVW634O.js} +4 -4
  109. package/dist/{chunk-X7RR2ZQH.js → chunk-SADLXUUA.js} +4 -4
  110. package/dist/{chunk-X7RPRBZE.js → chunk-SDLL4YPS.js} +1 -1
  111. package/dist/{chunk-RY5EPLCY.js → chunk-SKDSU735.js} +5 -5
  112. package/dist/{chunk-F7N6LYGG.js → chunk-T33PQ3TE.js} +5 -5
  113. package/dist/{chunk-EDCDODWA.js → chunk-TBH5WLIA.js} +4 -4
  114. package/dist/{chunk-HFI6SU27.js → chunk-TIRZZCS4.js} +2 -2
  115. package/dist/{chunk-LZU7ZDY7.js → chunk-TNYOSIAY.js} +1 -1
  116. package/dist/{chunk-SD5K34T2.js → chunk-UDPXX6YR.js} +1 -1
  117. package/dist/{chunk-LDUK7D2I.js → chunk-VX6ZYAOA.js} +5 -5
  118. package/dist/{chunk-ZYH4KTY5.js → chunk-W4TTC7MU.js} +10 -10
  119. package/dist/{chunk-PG5N3FL5.js → chunk-XI7MSL4R.js} +7 -7
  120. package/dist/{chunk-CRTNHB6F.js → chunk-YEZL4T4K.js} +2 -2
  121. package/dist/{chunk-KEC67NZF.js → chunk-ZA7N6SUH.js} +4 -4
  122. package/dist/{codex-app-cards-switch-C6OKN3RA.js → codex-app-cards-switch-AKCQRBUP.js} +10 -10
  123. package/dist/{codex-desktop-launch-5ISZYYGG.js → codex-desktop-launch-SCQW4KAV.js} +1 -1
  124. package/dist/{codex-session-launch-JWT76ONU.js → codex-session-launch-4EVYIYEQ.js} +16 -16
  125. package/dist/{config-PWEPWMNF.js → config-QIHLQCEV.js} +2 -2
  126. package/dist/{global-upgrade-ZAPGSH66.js → global-upgrade-WHSNOE3E.js} +8 -8
  127. package/dist/{identity-O57FDCPL.js → identity-NEXDWMLO.js} +3 -3
  128. package/dist/{live-capabilities-FVRWXQAC.js → live-capabilities-CC7L4VDX.js} +3 -3
  129. package/dist/{paths-LCARWI3S.js → paths-J3MVJDQI.js} +2 -2
  130. package/dist/{reapply-T5JXYBH2.js → reapply-6FNUVXCL.js} +27 -27
  131. package/dist/src/index.js +30 -30
  132. package/dist/{upgrade-lock-3P3VK6KQ.js → upgrade-lock-7PPYIRBP.js} +3 -3
  133. package/dist/{usage-BKT5P2P3.js → usage-GDUDYZSV.js} +2 -2
  134. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.170
4
+
5
+ - `pushary sessions --json` prints your agent sessions and the questions waiting on them as one JSON object: each session's agent, status, machine, folder and subagents, whether it needs your approval, and each pending question with the session and machine it belongs to. It also prints this computer's machine id, so a script can pick out the sessions running here. It uses the key setup saved and reads the same session list the Mac notch shows. When Pushary cannot read your sessions, the command fails with an error instead of printing an empty list.
6
+
7
+ ## 1.9.169
8
+
9
+ - 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.
10
+ - 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.
11
+ - 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.
12
+ - 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.
13
+
3
14
  ## 1.9.168
4
15
 
5
16
  - 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.
package/README.md CHANGED
@@ -210,6 +210,7 @@ setup Configure Claude Code, Codex, Gemini CLI, Hermes, OpenClaw, Cursor,
210
210
  claude Run Claude Code through Pushary, reachable from your phone even when idle
211
211
  daemon Keep this machine reachable so your phone can START a new session
212
212
  status One screen: which key is in force, whether the server accepts it, what can receive an approval
213
+ sessions List agent sessions, their locations, and pending decisions as JSON
213
214
  login Sign in from this terminal, no key to copy (--with-token to pipe one in)
214
215
  sign-out Sign out: remove the key this machine stores, and say what it does not remove (also: logout)
215
216
  pair Pair a phone without re-running setup: the Pushary app, or --browser for web push (also: connect)
@@ -230,6 +231,20 @@ transcripts Turn transcript sync on or off, or show and re-trust the keys it se
230
231
 
231
232
  Run `pushary <command> --help` for one command's options.
232
233
 
234
+ ### Session fleet
235
+
236
+ ```bash
237
+ pushary sessions --json
238
+ ```
239
+
240
+ Uses your CLI sign-in to read the fleet and pending decisions available to its API
241
+ key. `data.sessions` includes the server-computed status and subagent grouping.
242
+ `data.pendingQuestions` contains the pending requests and their reported session
243
+ and machine IDs. Compare a session's `machineId` with `data.localMachineId` to
244
+ find sessions reported by this computer, and read `cwd` for the project directory
245
+ when available. The command works from your existing terminal and leaves focus
246
+ where it is.
247
+
233
248
  ### Non-interactive setup
234
249
 
235
250
  `setup` asks which agents you use at a terminal. With no terminal on stdin it asks
@@ -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",
@@ -23,20 +23,20 @@ import {
23
23
  waitRetryPauseMs,
24
24
  waitsForThePhone,
25
25
  withdrawQuestion
26
- } from "./chunk-VWVYDYCV.js";
26
+ } from "./chunk-7E4OSMST.js";
27
27
  import "./chunk-POFBE6ZY.js";
28
- import "./chunk-6PDBRLIH.js";
28
+ import "./chunk-5OI4EW6G.js";
29
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";
36
- import "./chunk-YU2EUD7O.js";
30
+ import "./chunk-OHVQ75S7.js";
31
+ import "./chunk-OKM76UDB.js";
32
+ import "./chunk-IGKHWARK.js";
33
+ import "./chunk-SDLL4YPS.js";
34
+ import "./chunk-LILP3T24.js";
35
+ import "./chunk-A2DVMIX4.js";
36
+ import "./chunk-CINBAX5G.js";
37
37
  import "./chunk-TODDEIYG.js";
38
38
  import "./chunk-BG4HHB7E.js";
39
- import "./chunk-WDLBF3PM.js";
39
+ import "./chunk-IV7WDCKS.js";
40
40
  import "./chunk-UQTQ6HPO.js";
41
41
  import {
42
42
  DECISION_STOP_REASON,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  exitOnHelpFlag
4
- } from "../chunk-6IZVL42W.js";
4
+ } from "../chunk-AVN4A4A6.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-WDLBF3PM.js";
12
+ import "../chunk-IV7WDCKS.js";
13
13
  import "../chunk-UQTQ6HPO.js";
14
14
  import {
15
15
  AUDIT_CHAIN_FINDING_SEVERITY,
@@ -1,43 +1,43 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleBell
4
- } from "../chunk-MK7T7MNB.js";
4
+ } from "../chunk-LT3B5432.js";
5
5
  import {
6
6
  readHookInput
7
- } from "../chunk-TGIWLQOV.js";
8
- import "../chunk-IWWKO4MP.js";
9
- import "../chunk-7GMTA5NR.js";
7
+ } from "../chunk-2OMWK322.js";
8
+ import "../chunk-K5HACZJ3.js";
9
+ import "../chunk-FD7JHIET.js";
10
10
  import "../chunk-WHB622LP.js";
11
- import "../chunk-WTUURSCO.js";
12
- import "../chunk-LDUK7D2I.js";
13
- import "../chunk-OBUKF3WP.js";
14
- import "../chunk-PG5N3FL5.js";
11
+ import "../chunk-CXKAP6DR.js";
12
+ import "../chunk-VX6ZYAOA.js";
13
+ import "../chunk-65U6TH6P.js";
14
+ import "../chunk-XI7MSL4R.js";
15
15
  import "../chunk-CFZUESTS.js";
16
- import "../chunk-AIUFZQAA.js";
17
- import "../chunk-AVIQZSCU.js";
18
- import "../chunk-YPY4YCIZ.js";
19
- import "../chunk-7DEAVAAS.js";
16
+ import "../chunk-CLT4J5N5.js";
17
+ import "../chunk-BZILLAPJ.js";
18
+ import "../chunk-BZIBNSQE.js";
19
+ import "../chunk-DXHRKDP7.js";
20
20
  import "../chunk-352FIVVH.js";
21
- import "../chunk-3M4ZOSR3.js";
21
+ import "../chunk-BFZHRQJU.js";
22
22
  import "../chunk-Y6ILCLKE.js";
23
23
  import "../chunk-2TRYSF64.js";
24
- import "../chunk-VWVYDYCV.js";
24
+ import "../chunk-7E4OSMST.js";
25
25
  import "../chunk-GVIKF73A.js";
26
26
  import "../chunk-POFBE6ZY.js";
27
- import "../chunk-6PDBRLIH.js";
27
+ import "../chunk-5OI4EW6G.js";
28
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
- import "../chunk-YU2EUD7O.js";
29
+ import "../chunk-OHVQ75S7.js";
30
+ import "../chunk-OKM76UDB.js";
31
+ import "../chunk-IGKHWARK.js";
32
+ import "../chunk-JTFD3KQ6.js";
33
+ import "../chunk-3I3RUJRD.js";
34
+ import "../chunk-SDLL4YPS.js";
35
+ import "../chunk-LILP3T24.js";
36
+ import "../chunk-A2DVMIX4.js";
37
+ import "../chunk-CINBAX5G.js";
38
38
  import "../chunk-TODDEIYG.js";
39
39
  import "../chunk-BG4HHB7E.js";
40
- import "../chunk-WDLBF3PM.js";
40
+ import "../chunk-IV7WDCKS.js";
41
41
  import "../chunk-UQTQ6HPO.js";
42
42
  import "../chunk-L77OIGRB.js";
43
43
  import "../chunk-MLKGABMK.js";
@@ -5,29 +5,29 @@ import {
5
5
  liveAgentCount,
6
6
  ring,
7
7
  upgradeThreshold
8
- } from "../chunk-MK7T7MNB.js";
8
+ } from "../chunk-LT3B5432.js";
9
9
  import {
10
10
  createIo
11
11
  } from "../chunk-DXUPOVJP.js";
12
12
  import {
13
13
  exitOnHelpFlag
14
- } from "../chunk-6IZVL42W.js";
14
+ } from "../chunk-AVN4A4A6.js";
15
15
  import {
16
16
  addBellHooks,
17
17
  bellInstalled,
18
18
  removeBellHooks
19
- } from "../chunk-AVIQZSCU.js";
19
+ } from "../chunk-BZILLAPJ.js";
20
20
  import {
21
21
  parseFlags
22
- } from "../chunk-YPY4YCIZ.js";
23
- import "../chunk-DYZ26IPH.js";
24
- import "../chunk-K24RAOIO.js";
22
+ } from "../chunk-BZIBNSQE.js";
23
+ import "../chunk-JTFD3KQ6.js";
24
+ import "../chunk-3I3RUJRD.js";
25
25
  import {
26
26
  claudeSettings
27
- } from "../chunk-X7RPRBZE.js";
28
- import "../chunk-NOHOCNY6.js";
29
- import "../chunk-LVF5IBS6.js";
30
- import "../chunk-YU2EUD7O.js";
27
+ } from "../chunk-SDLL4YPS.js";
28
+ import "../chunk-LILP3T24.js";
29
+ import "../chunk-A2DVMIX4.js";
30
+ import "../chunk-CINBAX5G.js";
31
31
  import {
32
32
  readJsonSafe,
33
33
  writeJsonAtomic
@@ -35,7 +35,7 @@ import {
35
35
  import {
36
36
  EXIT
37
37
  } from "../chunk-BG4HHB7E.js";
38
- import "../chunk-WDLBF3PM.js";
38
+ import "../chunk-IV7WDCKS.js";
39
39
  import "../chunk-UQTQ6HPO.js";
40
40
  import {
41
41
  isRecord
@@ -1,42 +1,42 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  exitOnFailedResponse
4
- } from "../chunk-HV7KTGWF.js";
5
- import "../chunk-WK6TE6U7.js";
6
- import "../chunk-AO4CKFQA.js";
4
+ } from "../chunk-57MF5I5V.js";
5
+ import "../chunk-NWKXT7LC.js";
6
+ import "../chunk-LML7I4FY.js";
7
7
  import {
8
8
  createIo
9
9
  } from "../chunk-DXUPOVJP.js";
10
10
  import {
11
11
  exitOnHelpFlag
12
- } from "../chunk-6IZVL42W.js";
12
+ } from "../chunk-AVN4A4A6.js";
13
13
  import {
14
14
  parseFlags
15
- } from "../chunk-YPY4YCIZ.js";
16
- import "../chunk-GV3ZGKMK.js";
15
+ } from "../chunk-BZIBNSQE.js";
16
+ import "../chunk-OHVQ75S7.js";
17
17
  import {
18
18
  pusharyFetch
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";
19
+ } from "../chunk-OKM76UDB.js";
20
+ import "../chunk-IGKHWARK.js";
21
+ import "../chunk-JTFD3KQ6.js";
22
+ import "../chunk-3I3RUJRD.js";
23
+ import "../chunk-SDLL4YPS.js";
24
+ import "../chunk-LILP3T24.js";
25
25
  import {
26
26
  getApiKey,
27
27
  getBaseUrl
28
- } from "../chunk-LVF5IBS6.js";
28
+ } from "../chunk-A2DVMIX4.js";
29
29
  import {
30
30
  UsageError,
31
31
  exitCodeFor
32
- } from "../chunk-YU2EUD7O.js";
32
+ } from "../chunk-CINBAX5G.js";
33
33
  import "../chunk-TODDEIYG.js";
34
34
  import {
35
35
  EXIT
36
36
  } from "../chunk-BG4HHB7E.js";
37
37
  import {
38
38
  isInvocationOf
39
- } from "../chunk-WDLBF3PM.js";
39
+ } from "../chunk-IV7WDCKS.js";
40
40
  import "../chunk-UQTQ6HPO.js";
41
41
  import {
42
42
  PHONE_CALL_SETUP_PATH,
@@ -12,24 +12,24 @@ import {
12
12
  describeIdleWindow,
13
13
  startProcessOwnership,
14
14
  withSpawnProcessOwnership
15
- } from "../chunk-UCW24KPU.js";
15
+ } from "../chunk-7RNLPI6H.js";
16
16
  import "../chunk-CYTPQDQY.js";
17
17
  import {
18
18
  announceSubscriptionRequired,
19
19
  isDeferAnswer
20
- } from "../chunk-66VZIS6R.js";
20
+ } from "../chunk-NJSBHEEW.js";
21
21
  import {
22
22
  claudeTranscriptPath,
23
23
  redactDraft,
24
24
  registerTranscript,
25
25
  registeredTranscriptEnabled,
26
26
  startDraftPublisher
27
- } from "../chunk-7GMTA5NR.js";
27
+ } from "../chunk-FD7JHIET.js";
28
28
  import "../chunk-WHB622LP.js";
29
29
  import {
30
30
  ensureDaemonRunning
31
- } from "../chunk-LDUK7D2I.js";
32
- import "../chunk-OBUKF3WP.js";
31
+ } from "../chunk-VX6ZYAOA.js";
32
+ import "../chunk-65U6TH6P.js";
33
33
  import {
34
34
  DEFAULT_SESSION,
35
35
  PHONE_DRIVER,
@@ -44,7 +44,7 @@ import {
44
44
  removePendingCommand,
45
45
  reportEvent,
46
46
  savePendingCommand
47
- } from "../chunk-PG5N3FL5.js";
47
+ } from "../chunk-XI7MSL4R.js";
48
48
  import {
49
49
  UNNAMED_ACTION,
50
50
  deriveToolTarget,
@@ -52,16 +52,16 @@ import {
52
52
  describeToolCall,
53
53
  scopePathFor
54
54
  } from "../chunk-CFZUESTS.js";
55
- import "../chunk-AIUFZQAA.js";
56
- import "../chunk-AVIQZSCU.js";
57
- import "../chunk-YPY4YCIZ.js";
58
- import "../chunk-7DEAVAAS.js";
55
+ import "../chunk-CLT4J5N5.js";
56
+ import "../chunk-BZILLAPJ.js";
57
+ import "../chunk-BZIBNSQE.js";
58
+ import "../chunk-DXHRKDP7.js";
59
59
  import {
60
60
  external_exports
61
61
  } from "../chunk-352FIVVH.js";
62
62
  import {
63
63
  transcriptsEnabled
64
- } from "../chunk-3M4ZOSR3.js";
64
+ } from "../chunk-BFZHRQJU.js";
65
65
  import {
66
66
  needsShell,
67
67
  spawnClaude
@@ -83,7 +83,7 @@ import {
83
83
  waitRetryPauseMs,
84
84
  waitsForThePhone,
85
85
  withdrawQuestion
86
- } from "../chunk-VWVYDYCV.js";
86
+ } from "../chunk-7E4OSMST.js";
87
87
  import {
88
88
  RETRY_ACK,
89
89
  commandAckIsFinal,
@@ -93,29 +93,29 @@ import {
93
93
  import "../chunk-POFBE6ZY.js";
94
94
  import {
95
95
  SubscriptionRequiredError
96
- } from "../chunk-6PDBRLIH.js";
96
+ } from "../chunk-5OI4EW6G.js";
97
97
  import "../chunk-SSKNRWWS.js";
98
- import "../chunk-GV3ZGKMK.js";
99
- import "../chunk-VY22KT5X.js";
98
+ import "../chunk-OHVQ75S7.js";
99
+ import "../chunk-OKM76UDB.js";
100
100
  import {
101
101
  getMachineId
102
- } from "../chunk-MOQUKAVU.js";
103
- import "../chunk-DYZ26IPH.js";
104
- import "../chunk-K24RAOIO.js";
102
+ } from "../chunk-IGKHWARK.js";
103
+ import "../chunk-JTFD3KQ6.js";
104
+ import "../chunk-3I3RUJRD.js";
105
105
  import {
106
106
  claudeConfigDir
107
- } from "../chunk-X7RPRBZE.js";
108
- import "../chunk-NOHOCNY6.js";
107
+ } from "../chunk-SDLL4YPS.js";
108
+ import "../chunk-LILP3T24.js";
109
109
  import {
110
110
  getApiKey,
111
111
  getBaseUrl
112
- } from "../chunk-LVF5IBS6.js";
113
- import "../chunk-YU2EUD7O.js";
112
+ } from "../chunk-A2DVMIX4.js";
113
+ import "../chunk-CINBAX5G.js";
114
114
  import "../chunk-TODDEIYG.js";
115
115
  import "../chunk-BG4HHB7E.js";
116
116
  import {
117
117
  NPX_LATEST_COMMAND
118
- } from "../chunk-WDLBF3PM.js";
118
+ } from "../chunk-IV7WDCKS.js";
119
119
  import "../chunk-UQTQ6HPO.js";
120
120
  import {
121
121
  DECISION_STOP_REASON,