chore: rename package to pi-subagents
This commit is contained in:
@@ -7,8 +7,8 @@ import { fileURLToPath } from "node:url";
|
||||
const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const pkg = JSON.parse(readFileSync(resolve(packageRoot, "package.json"), "utf8"));
|
||||
|
||||
test("package.json exposes pi-tmux-subagent as a standalone pi package", () => {
|
||||
assert.equal(pkg.name, "pi-tmux-subagent");
|
||||
test("package.json exposes pi-subagents as a standalone pi package", () => {
|
||||
assert.equal(pkg.name, "pi-subagents");
|
||||
assert.equal(pkg.type, "module");
|
||||
assert.ok(Array.isArray(pkg.keywords));
|
||||
assert.ok(pkg.keywords.includes("pi-package"));
|
||||
|
||||
@@ -77,7 +77,7 @@ export function createSubagentTool(deps: {
|
||||
return {
|
||||
name: "subagent",
|
||||
label: "Subagent",
|
||||
description: "Delegate tasks to specialized agents running in tmux panes.",
|
||||
description: "Delegate tasks to specialized agents running in separate child sessions.",
|
||||
parameters: deps.parameters ?? SubagentParamsSchema,
|
||||
async execute(_toolCallId: string, params: any, _signal: AbortSignal | undefined, onUpdate: any, ctx: any) {
|
||||
const hasSingle = Boolean(params.agent && params.task);
|
||||
|
||||
@@ -4,7 +4,7 @@ function shortenCommand(command) {
|
||||
|
||||
export function renderHeader(meta) {
|
||||
return [
|
||||
"=== tmux subagent ===",
|
||||
"=== subagent ===",
|
||||
`Agent: ${meta.agent}`,
|
||||
`Task: ${meta.task}`,
|
||||
`CWD: ${meta.cwd}`,
|
||||
|
||||
@@ -2,7 +2,7 @@ import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { renderHeader, renderEventLine } from "./render.mjs";
|
||||
|
||||
test("renderHeader prints the key wrapper metadata", () => {
|
||||
test("renderHeader prints generic subagent metadata", () => {
|
||||
const header = renderHeader({
|
||||
agent: "scout",
|
||||
task: "Inspect authentication code",
|
||||
@@ -12,12 +12,13 @@ test("renderHeader prints the key wrapper metadata", () => {
|
||||
sessionPath: "/repo/.pi/subagents/runs/run-1/child-session.jsonl",
|
||||
});
|
||||
|
||||
assert.match(header, /^=== subagent ===/m);
|
||||
assert.match(header, /Agent: scout/);
|
||||
assert.match(header, /Task: Inspect authentication code/);
|
||||
assert.match(header, /Session: \/repo\/\.pi\/subagents\/runs\/run-1\/child-session\.jsonl/);
|
||||
});
|
||||
|
||||
test("renderEventLine makes tool calls readable for a tmux pane", () => {
|
||||
test("renderEventLine makes tool calls readable for subagent transcript output", () => {
|
||||
const line = renderEventLine({
|
||||
type: "tool_call",
|
||||
toolName: "bash",
|
||||
|
||||
Reference in New Issue
Block a user