open-pstack 0.9.162 → 0.9.163

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-pstack",
3
- "version": "0.9.162",
3
+ "version": "0.9.163",
4
4
  "description": "Install pstack into the agent harnesses on this machine: Claude Code, Codex, Pi, Copilot, Muse, OMP, Kimi, Grok, MiniMax, OpenCode, Antigravity, and the shared skills directory.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pstack",
3
- "version": "0.9.162",
3
+ "version": "0.9.163",
4
4
  "description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack to Antigravity. Original pstack by Lauren Tan (poteto).",
5
5
  "author": "Michael Denyer",
6
6
  "logo": "assets/pstack-icon.png",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pstack",
3
3
  "displayName": "pstack (Claude Code port)",
4
- "version": "0.9.162",
4
+ "version": "0.9.163",
5
5
  "description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack to Claude Code. Original pstack by Lauren Tan (poteto).",
6
6
  "author": {
7
7
  "name": "Michael Denyer",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pstack",
3
- "version": "0.9.162",
3
+ "version": "0.9.163",
4
4
  "description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Codex port of the Claude Code plugin; skills are shared, tool names resolve via skills/poteto-mode/references/codex-tools.md. Original pstack by Lauren Tan (poteto).",
5
5
  "author": {
6
6
  "name": "Michael Denyer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pstack",
3
3
  "displayName": "pstack (GitHub Copilot port)",
4
- "version": "0.9.162",
4
+ "version": "0.9.163",
5
5
  "description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack to GitHub Copilot CLI and app. Original pstack by Lauren Tan (poteto).",
6
6
  "author": {
7
7
  "name": "Michael Denyer",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pstack",
3
- "version": "0.9.162",
3
+ "version": "0.9.163",
4
4
  "description": "pstack workflows and skills for Grok Build",
5
5
  "skills": [
6
6
  "./skills",
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "name": "pstack",
4
4
  "displayName": "pstack (Muse port)",
5
- "version": "0.9.162",
5
+ "version": "0.9.163",
6
6
  "description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. Rigorous agent workflows you can parallelize with confidence. Muse port of the Claude Code plugin; skills are shared, tool names resolve via skills/poteto-mode/references/muse-tools.md. Original pstack by Lauren Tan (poteto).",
7
7
  "compat": {
8
8
  "source": "native",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pstack",
3
- "version": "0.9.162",
3
+ "version": "0.9.163",
4
4
  "private": true,
5
5
  "omp": {
6
6
  "extensions": ["./omp/index.mjs"]
@@ -30,6 +30,8 @@ function header({ agent, ...record }: EndedRecord, transcript: string | undefine
30
30
  // Not "orca worktree ...": on Linux a bare orca is the screen reader.
31
31
  const removal = agent.host === "t3" ? "T3 Code's cleanup settings decide when it is removed" : "Orca keeps it until you remove the workspace, e.g. with the Orca CLI's worktree rm";
32
32
  lines.push(`worktree: ${agent.hostWorktree.path} (${branch}${removal})`);
33
+ } else if (agent.hostWorktree && agent.t3ThreadId) {
34
+ lines.push(`worktree: not reported (isolation "worktree" was asked for, but T3 Code did not report a checkout for the agent's thread, so the agent may have run in the session thread's folder)`);
33
35
  }
34
36
  if (transcript) lines.push(`transcript: ${transcript}`);
35
37
  return lines.join("\n");
@@ -158,7 +158,10 @@ export class OrcaChild {
158
158
  if (this.ending) throw new Error("stopped before its tab opened");
159
159
  const head = stdout.trim();
160
160
  const args = ["worktree", "create", `--name=${name}`, `--parent-worktree=${selector(session.worktree)}`, `--base-branch=${head}`];
161
- const { id, path, branch } = (await this.orca(worktreeResult, args, { cwd, timeout: CREATE_TIMEOUT_MS })).result.worktree;
161
+ // A create whose reply was lost may still have made the workspace.
162
+ const made = await this.orca(worktreeResult, ["worktree", "show", `--worktree=name:${name}`], { cwd }).catch(() => undefined);
163
+ if (!made && this.ending) throw new Error("stopped before its tab opened");
164
+ const { id, path, branch } = (made ?? (await this.orca(worktreeResult, args, { cwd, timeout: CREATE_TIMEOUT_MS }))).result.worktree;
162
165
  onWorktree({ id, path, branch: branch.replace(/^refs\/heads\//, "") });
163
166
  if (this.ending) throw new Error("stopped before its tab opened");
164
167
  return { worktree: { id }, cwd: path };
@@ -7,6 +7,7 @@ import { alive, type ChildExit, type Fate, type HostCheckout } from "./child.ts"
7
7
 
8
8
  const PROTOCOL = "2025-06-18";
9
9
  const WAIT_MS = 30_000;
10
+ const STOPPED_READ_MS = 1_000;
10
11
  const LOST_LAUNCH = "pstack: the Pi session that started this agent ended before T3 Code answered its launch, so the task is cancelled.";
11
12
  const LATE_STEER = "T3 Code put it in the agent's thread after pstack stopped following the agent's run, so pstack does not read the reply.";
12
13
  // T3 Code's terminal task statuses (OrchestratorMcpTerminalDelegatedTaskStatus).
@@ -142,15 +143,15 @@ export class T3Child {
142
143
  private async drive(launch: T3Launch, prompt: string): Promise<ChildExit> {
143
144
  const exit = await this.run(launch, prompt);
144
145
  if (!launch.onWorktree || this.threadId === undefined) return exit;
145
- const checkout = await this.checkout(this.threadId, launch.graceMs);
146
+ const checkout = await this.checkout(this.threadId, this.ending ? STOPPED_READ_MS : launch.graceMs);
146
147
  if (checkout) launch.onWorktree(checkout);
147
148
  return exit;
148
149
  }
149
150
 
150
151
  // T3 Code may rename the branch after the first turn, so the thread is read after each run.
151
- private async checkout(threadId: string, graceMs: number): Promise<HostCheckout | undefined> {
152
+ private async checkout(threadId: string, timeoutMs: number): Promise<HostCheckout | undefined> {
152
153
  try {
153
- const { thread } = await this.mcp.call(threadRead, "t3_thread_read", { threadId, limit: 1, maxCharsPerItem: 1 }, AbortSignal.timeout(graceMs));
154
+ const { thread } = await this.mcp.call(threadRead, "t3_thread_read", { threadId, limit: 1, maxCharsPerItem: 1 }, AbortSignal.timeout(timeoutMs));
154
155
  return thread.worktreePath === null ? undefined : { path: thread.worktreePath, ...(thread.branch !== null && { branch: thread.branch }) };
155
156
  } catch {
156
157
  return undefined;