@dylanpiercey/work 0.0.14 → 0.0.15

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 (2) hide show
  1. package/bin/work.mjs +11 -5
  2. package/package.json +1 -1
package/bin/work.mjs CHANGED
@@ -208,16 +208,22 @@ function serviceEnv() {
208
208
  return env;
209
209
  }
210
210
 
211
- /** True when `cmd` is a work *server* (not `work setup` / `work update`). */
211
+ /** True when `cmd` is a work *server* (not `work setup` / `work update`).
212
+ * Must not match the tmux that hosts agent sessions: `tmux -L work
213
+ * start-server` used to hit `\bwork\s+start\b` because `\b` fires on the
214
+ * `t`/`-` boundary in `start-server`, so `work update` killed tmux mid-
215
+ * setup and never reached `systemctl restart`. */
212
216
  function isWorkServerCmd(cmd) {
217
+ if (/\btmux\b/.test(cmd)) return false;
213
218
  if (/\bwork(\.mjs)?\s+(setup|update|version)\b/.test(cmd)) return false;
214
219
  return (
215
- /\bwork\.mjs\s+start\b/.test(cmd) ||
216
- /\bwork\s+start\b/.test(cmd) ||
220
+ /\bwork\.mjs\s+start(?:\s|$)/.test(cmd) ||
221
+ /(?:^|[\s/])work\s+start(?:\s|$)/.test(cmd) ||
217
222
  /run-prod\.sh/.test(cmd) ||
218
- /work server is running/.test(cmd) ||
223
+ /--why=work server is running/.test(cmd) ||
224
+ /--why="work server is running"/.test(cmd) ||
219
225
  (/@dylanpiercey\/work\//.test(cmd) && !/\bnpm\b/.test(cmd)) ||
220
- /\/work\/\S*\/dist\/index\.mjs/.test(cmd)
226
+ /\/work\/(?:\S*\/)?dist\/index\.mjs/.test(cmd)
221
227
  );
222
228
  }
223
229
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dylanpiercey/work",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "type": "module",
5
5
  "description": "Web GUI for agentic dev workspaces",
6
6
  "license": "MIT",