diff --git a/index.ts b/index.ts index 5f0f368..c6c5e32 100644 --- a/index.ts +++ b/index.ts @@ -39,7 +39,7 @@ export default function subagentsExtension(pi: ExtensionAPI) { const tmuxRunner = createTmuxSingleRunner({ assertInsideTmux() { - if (!isInsideTmux()) throw new Error("tmux-backed subagents require pi to be running inside tmux."); + if (!isInsideTmux()) throw new Error('tmux runner requires pi to be running inside tmux.'); }, async getCurrentWindowId() { const result = await pi.exec("tmux", buildCurrentWindowArgs()); diff --git a/package-lock.json b/package-lock.json index 34ed7c1..657b755 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "pi-tmux-subagent", + "name": "pi-subagents", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "pi-tmux-subagent", + "name": "pi-subagents", "version": "0.1.0", "devDependencies": { "@mariozechner/pi-agent-core": "^0.66.1", diff --git a/src/agents.test.ts b/src/agents.test.ts index 299efbb..eea5079 100644 --- a/src/agents.test.ts +++ b/src/agents.test.ts @@ -7,7 +7,7 @@ import { BUILTIN_AGENTS } from "./builtin-agents.ts"; import { discoverAgents } from "./agents.ts"; test("discoverAgents returns built-ins and lets user markdown override by name", async () => { - const root = await mkdtemp(join(tmpdir(), "tmux-subagent-agents-")); + const root = await mkdtemp(join(tmpdir(), "pi-subagents-agents-")); const agentDir = join(root, "agent-home"); const userAgentsDir = join(agentDir, "agents"); await mkdir(userAgentsDir, { recursive: true }); @@ -30,7 +30,7 @@ test("discoverAgents returns built-ins and lets user markdown override by name", }); test("discoverAgents lets project agents override user agents when scope is both", async () => { - const root = await mkdtemp(join(tmpdir(), "tmux-subagent-agents-")); + const root = await mkdtemp(join(tmpdir(), "pi-subagents-agents-")); const repo = join(root, "repo"); const agentDir = join(root, "agent-home"); const userAgentsDir = join(agentDir, "agents"); diff --git a/src/artifacts.test.ts b/src/artifacts.test.ts index 4e49feb..7d444c4 100644 --- a/src/artifacts.test.ts +++ b/src/artifacts.test.ts @@ -6,7 +6,7 @@ import { tmpdir } from "node:os"; import { createRunArtifacts } from "./artifacts.ts"; test("createRunArtifacts writes metadata and reserves stable artifact paths", async () => { - const cwd = await mkdtemp(join(tmpdir(), "tmux-subagent-run-")); + const cwd = await mkdtemp(join(tmpdir(), "pi-subagents-run-")); const artifacts = await createRunArtifacts(cwd, { runId: "run-1", diff --git a/src/monitor.test.ts b/src/monitor.test.ts index 0191873..bebe45c 100644 --- a/src/monitor.test.ts +++ b/src/monitor.test.ts @@ -6,7 +6,7 @@ import { tmpdir } from "node:os"; import { monitorRun } from "./monitor.ts"; test("monitorRun streams normalized events and resolves when result.json appears", async () => { - const dir = await mkdtemp(join(tmpdir(), "tmux-subagent-monitor-")); + const dir = await mkdtemp(join(tmpdir(), "pi-subagents-monitor-")); const eventsPath = join(dir, "events.jsonl"); const resultPath = join(dir, "result.json"); await writeFile(eventsPath, "", "utf8"); diff --git a/src/tmux-runner.test.ts b/src/tmux-runner.test.ts index f090922..cb4a8f9 100644 --- a/src/tmux-runner.test.ts +++ b/src/tmux-runner.test.ts @@ -35,7 +35,7 @@ test("createTmuxSingleRunner always kills the pane after monitor completion", as test("createTmuxSingleRunner surfaces explicit tmux precondition errors", async () => { const runSingleTask = createTmuxSingleRunner({ assertInsideTmux() { - throw new Error("tmux-backed subagents require pi to be running inside tmux."); + throw new Error("tmux runner requires pi to be running inside tmux."); }, getCurrentWindowId: async () => "@1", createArtifacts: async () => ({ @@ -55,6 +55,6 @@ test("createTmuxSingleRunner surfaces explicit tmux precondition errors", async await assert.rejects( () => runSingleTask({ cwd: "/repo", meta: { task: "inspect auth" } as any }), - /tmux-backed subagents require pi to be running inside tmux/, + /tmux runner requires pi to be running inside tmux/, ); }); diff --git a/src/tmux.test.ts b/src/tmux.test.ts index bcadde0..7bcb6f0 100644 --- a/src/tmux.test.ts +++ b/src/tmux.test.ts @@ -14,13 +14,13 @@ test("isInsideTmux reads the TMUX environment variable", () => { test("buildWrapperShellCommand single-quotes paths safely", () => { const command = buildWrapperShellCommand({ nodePath: "/usr/local/bin/node", - wrapperPath: "/repo/tmux-subagent/src/wrapper/cli.mjs", + wrapperPath: "/repo/subagents/src/wrapper/cli.mjs", metaPath: "/repo/.pi/subagents/runs/run-1/meta.json", }); assert.equal( command, - "'/usr/local/bin/node' '/repo/tmux-subagent/src/wrapper/cli.mjs' '/repo/.pi/subagents/runs/run-1/meta.json'", + "'/usr/local/bin/node' '/repo/subagents/src/wrapper/cli.mjs' '/repo/.pi/subagents/runs/run-1/meta.json'", ); });