@tekmidian/pai 0.66.0 → 0.66.1
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.
- package/dist/{chain-D4PuQ2c-.mjs → chain-CZfKIEq9.mjs} +2 -2
- package/dist/{chain-D4PuQ2c-.mjs.map → chain-CZfKIEq9.mjs.map} +1 -1
- package/dist/cli/index.mjs +5 -5
- package/dist/cli/program.mjs +5 -5
- package/dist/daemon/index.mjs +3 -3
- package/dist/{daemon-BEoVgVfJ.mjs → daemon-DXlaVCkw.mjs} +3 -3
- package/dist/{daemon-BEoVgVfJ.mjs.map → daemon-DXlaVCkw.mjs.map} +1 -1
- package/dist/{daemon-DPAYU9hp.mjs → daemon-DyORmxZu.mjs} +3 -3
- package/dist/daemon-mcp/index.mjs +6 -4
- package/dist/daemon-mcp/index.mjs.map +1 -1
- package/dist/{fallback-B5svk75f.mjs → fallback-CIiq2Raw.mjs} +6 -4
- package/dist/fallback-CIiq2Raw.mjs.map +1 -0
- package/dist/hooks/block-sleep-poll.mjs.map +2 -2
- package/dist/hooks/load-project-context.mjs.map +2 -2
- package/dist/hooks/worker-guard.mjs +5 -0
- package/dist/hooks/worker-guard.mjs.map +2 -2
- package/dist/hooks/worker-status-line.mjs +1 -0
- package/dist/hooks/worker-status-line.mjs.map +2 -2
- package/dist/{planner-EJPZnnif.mjs → planner-Dm5Acyo1.mjs} +3 -3
- package/dist/{planner-EJPZnnif.mjs.map → planner-Dm5Acyo1.mjs.map} +1 -1
- package/dist/{program-DSETzrWg.mjs → program-JJ0TwSHI.mjs} +9 -6
- package/dist/{program-DSETzrWg.mjs.map → program-JJ0TwSHI.mjs.map} +1 -1
- package/dist/{run-Z4akoa8G.mjs → run-BCpbxqA5.mjs} +168 -6
- package/dist/run-BCpbxqA5.mjs.map +1 -0
- package/dist/{session-keepalive-BDhytXEo.mjs → session-keepalive-DxjTHGcK.mjs} +2 -2
- package/dist/{session-keepalive-BDhytXEo.mjs.map → session-keepalive-DxjTHGcK.mjs.map} +1 -1
- package/package.json +1 -1
- package/src/hooks/ts/lib/worker-guard.test.ts +12 -0
- package/src/hooks/ts/lib/worker-guard.ts +9 -0
- package/dist/fallback-B5svk75f.mjs.map +0 -1
- package/dist/run-Z4akoa8G.mjs.map +0 -1
|
@@ -7712,6 +7712,8 @@ function gitSub(args) {
|
|
|
7712
7712
|
}
|
|
7713
7713
|
return null;
|
|
7714
7714
|
}
|
|
7715
|
+
var PATTERN_KILL = /* @__PURE__ */ new Set(["pkill", "killall"]);
|
|
7716
|
+
var PATTERN_KILL_REASON = "pattern-based process kill blocked: kill only what you started, by PID (`cmd & echo $! > /tmp/x.pid`, then `kill $(cat /tmp/x.pid)`), never by name or pattern; other workers' command lines contain your spec text";
|
|
7715
7717
|
function decideSegment(seg, st, ctx) {
|
|
7716
7718
|
const words = stripPrefix(seg.words);
|
|
7717
7719
|
const [cmd, ...args] = words;
|
|
@@ -7726,6 +7728,9 @@ function decideSegment(seg, st, ctx) {
|
|
|
7726
7728
|
return decideCommand(args[1], { ...ctx, cwd: st.cwd });
|
|
7727
7729
|
}
|
|
7728
7730
|
const pos = args.filter((a) => !isFlag(a));
|
|
7731
|
+
if (PATTERN_KILL.has(cmd) || cmd === "xargs" && args.includes("kill") || cmd === "kill" && /pgrep|pidof/.test(args.join(" "))) {
|
|
7732
|
+
return deny(PATTERN_KILL_REASON);
|
|
7733
|
+
}
|
|
7729
7734
|
if (cmd === "cd") {
|
|
7730
7735
|
const p = pos[0] ? abs(pos[0], st.cwd, ctx.home) : null;
|
|
7731
7736
|
if (!p) return ALLOW;
|