mirror of
https://github.com/wassname/pi-goals.git
synced 2026-09-23 13:41:19 +08:00
Co-Authored-By: Pi/Codex <288921227+claudypoo@users.noreply.github.com>
24 lines
972 B
TypeScript
24 lines
972 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import { resolve } from "node:path";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
interface PackageManifest {
|
|
files: string[];
|
|
pi: { subagents: { agents: string[] } };
|
|
}
|
|
|
|
describe("packaged goal worker", () => {
|
|
it("exposes goal-worker through pi-subagents package discovery", () => {
|
|
const root = resolve(import.meta.dirname, "..");
|
|
const manifest = JSON.parse(readFileSync(resolve(root, "package.json"), "utf8")) as PackageManifest;
|
|
expect(manifest.files).toContain("agents");
|
|
expect(manifest.pi.subagents.agents).toEqual(["./agents"]);
|
|
|
|
const definition = readFileSync(resolve(root, "agents", "goal-worker.md"), "utf8");
|
|
expect(definition).toMatch(/^---\nname: goal-worker\n/);
|
|
expect(definition).toContain("tools: read, grep, find, ls, bash, edit, write, contact_supervisor");
|
|
expect(definition).toContain("defaultContext: fork");
|
|
expect(definition).toContain("retained implementation worker");
|
|
});
|
|
});
|