@join-pantheon/cli 0.35.1-rc.2 → 0.35.1-rc.3

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/mcp.js CHANGED
@@ -561,12 +561,8 @@ A goal for it (${left}) may be open with nothing in it — close it with pantheo
561
561
  }
562
562
  if (act === "ESCALATE" && role === "worker" && !ref) {
563
563
  const mine = client.myWork().filter((o) => o.kind !== "HUMAN" && (!goal || o.goal === goal) && o.claimed_by?.session === client.session);
564
- if (mine.length === 1) {
564
+ if (mine.length === 1)
565
565
  ref = mine[0].ref;
566
- const og = mine[0].goal;
567
- if (!goal && og && client.goals.get(og)?.state !== "CLOSED")
568
- goal = og;
569
- }
570
566
  }
571
567
  const baseSha = act === "DELIVERED" ? (base ?? process.env.PANTHEON_BASE) : undefined;
572
568
  const named = act === "HUMAN_REQUIRED" && named_by_requester === true;
package/dist/notify.js CHANGED
@@ -2,9 +2,9 @@ import { fenceBlock } from "./untrusted.js";
2
2
  import { chosenApproval, isVersionManagedPath } from "./install.js";
3
3
  import { parseJsonText } from "./text-file.js";
4
4
  import { toolsAllowed } from "./tools.js";
5
- import { readFileSync, writeFileSync, existsSync, mkdirSync, rmSync } from "node:fs";
5
+ import { readFileSync, writeFileSync, existsSync, mkdirSync, rmSync, statSync } from "node:fs";
6
6
  import { homedir, platform } from "node:os";
7
- import { dirname, join, resolve } from "node:path";
7
+ import { dirname, isAbsolute, join, resolve, win32 } from "node:path";
8
8
  import { fileURLToPath } from "node:url";
9
9
  import { whichPantheon } from "./service.js";
10
10
  import { managedLayout } from "./managed.js";
@@ -13,13 +13,24 @@ import { detectForHooks, agentById } from "./agents.js";
13
13
  import { codexHookState, cursorHookState, copilotHookState, kiroHookState, installCodexHooks, installCursorHooks, installCopilotHooks, installKiroHooks, removeCodexHooks, removeCursorHooks, removeCopilotHooks, removeKiroHooks, } from "./hooks-install.js";
14
14
  export const HOOK_MARKER = "pantheon hook";
15
15
  export const HOOK_RE = /(?:pantheon(?:\.cmd|\.exe|\.bat)?["']?\s+hook\s|cli\.js["']?\s+hook\s+(?:stop|prompt|end|codex-stop|copilot-stop|cursor-stop|kiro-stop|kiro-prompt)\b)/i;
16
- const LAUNCH_BIN = /^(?:"(?:[^"]*[\\/])?pantheon(?:\.cmd|\.exe|\.bat)?"|'(?:[^']|'\\'')*?(?:[\\/])?pantheon(?:\.cmd|\.exe|\.bat)?'|(?:\S*[\\/])?pantheon(?:\.cmd|\.exe|\.bat)?)$/i;
16
+ const LAUNCH_BIN = /^(?:"(?:[^"]*[\\/])?pantheon(?:\.cmd|\.exe|\.bat)?"|'(?:[^']|'\\'')*?(?:[\\/])?pantheon(?:\.cmd|\.exe|\.bat)?'|(?:[^\s"'`;&|<>$()]*[\\/])?pantheon(?:\.cmd|\.exe|\.bat)?)$/i;
17
+ const BARE_ODD_BIN = /^\S*[\\/]pantheon(?:\.cmd|\.exe|\.bat)?$/i;
18
+ const isOldBarePantheon = (word) => {
19
+ if (!BARE_ODD_BIN.test(word) || !(isAbsolute(word) || win32.isAbsolute(word)))
20
+ return false;
21
+ try {
22
+ return statSync(word).isFile();
23
+ }
24
+ catch {
25
+ return false;
26
+ }
27
+ };
17
28
  const LAUNCH_NODE = /^(?:"[^"]*node(?:\.exe)?"|'(?:[^']|'\\'')*?node(?:\.exe)?'|[^\s"'`;&|<>$()]*node(?:\.exe)?)(?:\s+--use-system-ca)?\s+(?:"[^"]*cli\.js"|'(?:[^']|'\\'')*cli\.js'|[^\s"'`;&|<>$()]*cli\.js)$/i;
18
29
  const HOOK_VERBS = /^(?:stop|prompt|end|codex-stop|copilot-stop|cursor-stop|cursor-prompt|kiro-stop|kiro-prompt)$/i;
19
30
  const HOOK_SHAPE = /^\s*([\s\S]+?)\s+hook\s+([a-z][a-z-]*)(?:\s*>\s*\/dev\/null(?:\s+2>&1)?)?\s*$/i;
20
31
  export const isOurHookCommand = (cmd) => {
21
32
  const m = cmd ? HOOK_SHAPE.exec(cmd) : null;
22
- return !!m && (LAUNCH_BIN.test(m[1]) || (LAUNCH_NODE.test(m[1]) && HOOK_VERBS.test(m[2])));
33
+ return !!m && (LAUNCH_BIN.test(m[1]) || (isOldBarePantheon(m[1]) && HOOK_VERBS.test(m[2])) || (LAUNCH_NODE.test(m[1]) && HOOK_VERBS.test(m[2])));
23
34
  };
24
35
  export const hookBin = (bin, os = platform()) => {
25
36
  if (os === "win32")
package/dist/worker.js CHANGED
@@ -4258,8 +4258,18 @@ export class Worker {
4258
4258
  const settled = [...held.sent, ...held.waiting];
4259
4259
  const settledIds = new Set(settled.map((a) => a.id));
4260
4260
  const runId = this.runKey?.runId;
4261
+ const goalOf = new Map();
4262
+ if (o.goal != null && runId)
4263
+ for (const a of client.mineSince(startedAt)) {
4264
+ if (goalOf.size >= 8)
4265
+ break;
4266
+ if (a.goal == null && a.ref && a.ref !== o.ref && a.sig?.role === "run" && a.sig.cert?.run === runId && !goalOf.has(a.ref)) {
4267
+ const t = (client.seenAct(a.ref) ?? await this.fetchActById(a.ref).catch(() => null));
4268
+ goalOf.set(a.ref, t ? (t.goal ?? null) : undefined);
4269
+ }
4270
+ }
4261
4271
  const elsewhere = o.goal == null ? [] : client.mineSince(startedAt).filter((a) => a.goal !== o.goal && !settledIds.has(a.id)
4262
- && ((!!o.ref && a.ref === o.ref) || (!!runId && a.goal == null && a.sig?.role === "run" && a.sig.cert?.run === runId)));
4272
+ && ((!!o.ref && a.ref === o.ref) || (!!runId && a.goal == null && (a.ref == null || a.ref === o.ref || goalOf.get(a.ref) === o.goal) && a.sig?.role === "run" && a.sig.cert?.run === runId)));
4263
4273
  const sent = [...client.mineSince(startedAt, o.goal).filter((a) => !settledIds.has(a.id)), ...elsewhere, ...settled.filter((a) => o.goal == null || a.goal === o.goal)];
4264
4274
  const repliedWith = sent.find((a) => ["DELIVERED", "ANSWER", "ESCALATE", "ACCEPT", "OBJECT", "PROPOSE", "CONTRACT", "CLOSE", "WITHDRAW"].includes(a.act) || (a.act === "NOTE" && !!a.ref));
4265
4275
  const replied = requireReply ? client.repliedTo(o) || !!repliedWith : true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "format": 1,
3
- "built_at": "2026-10-20T11:04:26.036Z",
3
+ "built_at": "2026-10-20T19:34:39.842Z",
4
4
  "swiftc": "Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101)",
5
5
  "helpers": {
6
6
  "pantheon-tray": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@join-pantheon/cli",
3
- "version": "0.35.1-rc.2",
3
+ "version": "0.35.1-rc.3",
4
4
  "description": "Let your coding agent collaborate directly with your teammates' agents — ask, agree an interface, and deliver, without a human relaying messages.",
5
5
  "type": "module",
6
6
  "bin": {