@astrofoundry/astrogate 0.0.0-stage → 0.1.2
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/README.md +13 -2
- package/agents/foreman.md +27 -0
- package/cli/astro-install.sh +242 -0
- package/cli/astro.sh +449 -0
- package/cli/astro.test.ts +65 -0
- package/cli/astrogate.sh +309 -0
- package/cli/astrogate.test.ts +113 -0
- package/cli/verify-release.sh +77 -0
- package/cli/verify-release.test.ts +140 -0
- package/dist/bridge.js +9950 -0
- package/dist/claude.js +7899 -0
- package/dist/extensions/bridge/index.js +9937 -0
- package/dist/extensions/gate/index.js +286 -0
- package/dist/extensions/guard/index.js +364 -0
- package/dist/extensions/subagents/index.js +8458 -0
- package/extensions/bridge/admin.ts +86 -0
- package/extensions/bridge/approvals.ts +147 -0
- package/extensions/bridge/attachments.ts +65 -0
- package/extensions/bridge/chunk.ts +50 -0
- package/extensions/bridge/claude-run.test.ts +62 -0
- package/extensions/bridge/claude-run.ts +301 -0
- package/extensions/bridge/commands.ts +89 -0
- package/extensions/bridge/config.ts +263 -0
- package/extensions/bridge/conversations.ts +144 -0
- package/extensions/bridge/daemon.ts +60 -0
- package/extensions/bridge/discord.test.ts +547 -0
- package/extensions/bridge/gateway.ts +222 -0
- package/extensions/bridge/index.ts +951 -0
- package/extensions/bridge/launcher.ts +36 -0
- package/extensions/bridge/lifecycle.test.ts +78 -0
- package/extensions/bridge/open-work.ts +74 -0
- package/extensions/bridge/plugin.ts +172 -0
- package/extensions/bridge/quote.ts +39 -0
- package/extensions/bridge/reports.ts +65 -0
- package/extensions/bridge/rest.ts +217 -0
- package/extensions/bridge/setup.ts +218 -0
- package/extensions/gate/approvals.test.ts +40 -0
- package/extensions/gate/config.ts +110 -0
- package/extensions/gate/core.ts +114 -0
- package/extensions/gate/index.test.ts +202 -0
- package/extensions/gate/index.ts +114 -0
- package/extensions/gate/risky.ts +14 -0
- package/extensions/gate/types.ts +19 -0
- package/extensions/guard/config.test.ts +107 -0
- package/extensions/guard/config.ts +120 -0
- package/extensions/guard/defaults.ts +40 -0
- package/extensions/guard/index.test.ts +313 -0
- package/extensions/guard/index.ts +183 -0
- package/extensions/guard/rules.test.ts +118 -0
- package/extensions/guard/rules.ts +101 -0
- package/extensions/guard/types.ts +12 -0
- package/extensions/subagents/agents.test.ts +137 -0
- package/extensions/subagents/agents.ts +207 -0
- package/extensions/subagents/bundled.test.ts +29 -0
- package/extensions/subagents/child.test.ts +202 -0
- package/extensions/subagents/child.ts +367 -0
- package/extensions/subagents/index.test.ts +123 -0
- package/extensions/subagents/index.ts +352 -0
- package/extensions/subagents/pi-paths.test.ts +39 -0
- package/extensions/subagents/pi-paths.ts +58 -0
- package/extensions/subagents/render.ts +221 -0
- package/extensions/subagents/sessions.test.ts +32 -0
- package/extensions/subagents/sessions.ts +34 -0
- package/extensions/subagents/ticker.test.ts +40 -0
- package/extensions/subagents/ticker.ts +36 -0
- package/harness/claude/agents.ts +93 -0
- package/harness/claude/claude.test.ts +171 -0
- package/harness/claude/hook.ts +77 -0
- package/harness/claude/main.ts +122 -0
- package/harness/claude/mcp.ts +174 -0
- package/harness/claude/settings.ts +63 -0
- package/package.json +71 -4
- package/release.sha256 +99 -0
- package/release.sha256.sig +6 -0
- package/specialists/AGENTS.md +67 -0
- package/specialists/README.md +81 -0
- package/specialists/entry/specialist-cli.sh +22 -0
- package/specialists/entry/specialist-install.sh +861 -0
- package/specialists/entry/specialist-install.test.ts +305 -0
- package/specialists/lib/argv.ts +19 -0
- package/specialists/lib/audit.ts +20 -0
- package/specialists/lib/config.ts +27 -0
- package/specialists/lib/errors.ts +8 -0
- package/specialists/lib/flush.test.ts +21 -0
- package/specialists/lib/lib.test.ts +87 -0
- package/specialists/lib/lock.test.ts +42 -0
- package/specialists/lib/lock.ts +67 -0
- package/specialists/lib/main.ts +40 -0
- package/specialists/lib/output.ts +11 -0
- package/specialists/lib/paths.ts +22 -0
- package/specialists/lib/pinned.test.ts +55 -0
- package/specialists/lib/pinned.ts +67 -0
- package/specialists/lib/proc.ts +49 -0
- package/specialists/lib/repo.ts +198 -0
- package/specialists/lib/runtime.test.ts +81 -0
- package/specialists/lib/sanitize.ts +43 -0
- package/specialists/lib/secrets.ts +28 -0
- package/specialists/lib/ssh.ts +38 -0
- package/specialists/lib/tunnel.test.ts +44 -0
- package/specialists/lib/tunnel.ts +76 -0
- package/specialists/provision/provision.sh +96 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Claude Code PreToolUse hook of the specialist gate: the same guard as the
|
|
3
|
+
* Pi gate (no direct call of the entry point, no access to the specialist's
|
|
4
|
+
* home), each specialist tool only inside its own subagent, and a risky call
|
|
5
|
+
* only after the owner's yes: Claude Code's own prompt in a session that can
|
|
6
|
+
* ask, the chat bridge's approval when the bridge started the run. A headless
|
|
7
|
+
* run denies an "ask" without asking anyone, so for the bridge the hook itself
|
|
8
|
+
* waits for the owners' decision.
|
|
9
|
+
*/
|
|
10
|
+
import { isAbsolute, resolve } from "node:path";
|
|
11
|
+
import { APPROVAL_TASK_ENV, APPROVAL_TOKEN_ENV, APPROVAL_URL_ENV, type ApprovalRequest, blockedCommandMarker, buildGuard, delegateHint, isProtectedPath, isRisky } from "../../extensions/gate/core.ts";
|
|
12
|
+
import type { SpecialistsConfig } from "../../extensions/gate/types.ts";
|
|
13
|
+
|
|
14
|
+
export interface HookInput {
|
|
15
|
+
tool_name?: string;
|
|
16
|
+
tool_input?: Record<string, unknown>;
|
|
17
|
+
agent_type?: string;
|
|
18
|
+
permission_mode?: string;
|
|
19
|
+
cwd?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface HookOutput {
|
|
23
|
+
hookSpecificOutput: { hookEventName: "PreToolUse"; permissionDecision: "allow" | "deny" | "ask"; permissionDecisionReason: string };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** A risky call in a run the chat bridge started: the hook asks the bridge's owners before it answers. */
|
|
27
|
+
export interface BridgeApproval {
|
|
28
|
+
url: string;
|
|
29
|
+
token: string;
|
|
30
|
+
request: ApprovalRequest;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Claude Code tools that take a path, and the input field that holds it. */
|
|
34
|
+
const PATH_FIELDS: Readonly<Record<string, string>> = { Read: "file_path", Write: "file_path", Edit: "file_path", MultiEdit: "file_path", NotebookEdit: "notebook_path", Grep: "path", Glob: "path" };
|
|
35
|
+
/** Permission modes in which Claude Code shows a prompt for "ask"; in auto mode a hook's "ask" goes to the prompt, not to the classifier (hooks docs, PreToolUse). */
|
|
36
|
+
const ASKING_MODES = new Set(["default", "acceptEdits", "plan", "auto"]);
|
|
37
|
+
export const TOOL = /^mcp__astro-([a-z][a-z0-9-]{0,30})__run$/;
|
|
38
|
+
|
|
39
|
+
export function agentName(service: string): string {
|
|
40
|
+
return `astro-${service}`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function verdict(permissionDecision: "allow" | "deny" | "ask", reason: string): HookOutput {
|
|
44
|
+
return { hookSpecificOutput: { hookEventName: "PreToolUse", permissionDecision, permissionDecisionReason: reason } };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** The hook's decision for one tool call, a bridge approval to wait for, or null to leave it to Claude Code's permission rules. */
|
|
48
|
+
export function decide(input: HookInput, config: SpecialistsConfig | null, env: Readonly<Record<string, string | undefined>>): HookOutput | BridgeApproval | null {
|
|
49
|
+
const tool = input.tool_name ?? "";
|
|
50
|
+
const toolInput = input.tool_input ?? {};
|
|
51
|
+
const guard = buildGuard(config);
|
|
52
|
+
if (tool === "Bash") {
|
|
53
|
+
const marker = blockedCommandMarker(typeof toolInput.command === "string" ? toolInput.command : "", guard);
|
|
54
|
+
return marker ? verdict("deny", `specialist gate: "${marker}" is reserved for specialists. ${delegateHint(config)}`) : null;
|
|
55
|
+
}
|
|
56
|
+
const field = PATH_FIELDS[tool];
|
|
57
|
+
if (field) {
|
|
58
|
+
const raw = toolInput[field];
|
|
59
|
+
if (typeof raw !== "string") return null;
|
|
60
|
+
const path = isAbsolute(raw) ? raw : resolve(input.cwd ?? "/", raw);
|
|
61
|
+
return isProtectedPath(resolve(path), guard) ? verdict("deny", `specialist gate: ${guard.protectedRoot} holds specialist credentials. ${delegateHint(config)}`) : null;
|
|
62
|
+
}
|
|
63
|
+
const match = TOOL.exec(tool);
|
|
64
|
+
if (!match) return null;
|
|
65
|
+
const service = match[1];
|
|
66
|
+
const entry = config?.specialists.find((s) => s.service === service);
|
|
67
|
+
if (!entry) return verdict("deny", `specialist gate: no ${service} specialist is configured on this host.`);
|
|
68
|
+
if (input.agent_type !== agentName(service)) return verdict("deny", `specialist gate: only the ${agentName(service)} subagent runs ${tool}. ${delegateHint(config)}`);
|
|
69
|
+
const args = Array.isArray(toolInput.args) && toolInput.args.every((a) => typeof a === "string") ? (toolInput.args as string[]) : null;
|
|
70
|
+
if (!args) return verdict("deny", "specialist gate: args must be a list of strings.");
|
|
71
|
+
if (!isRisky(args, entry.risky ?? [])) return null;
|
|
72
|
+
const url = env[APPROVAL_URL_ENV];
|
|
73
|
+
if (url) return { url, token: env[APPROVAL_TOKEN_ENV] ?? "", request: { agent: entry.agent, service: entry.service, args, ...(env[APPROVAL_TASK_ENV] ? { task: env[APPROVAL_TASK_ENV] } : {}) } };
|
|
74
|
+
const command = `${service} ${args.join(" ")}`;
|
|
75
|
+
if (ASKING_MODES.has(input.permission_mode ?? "default")) return verdict("ask", `Risky specialist call: ${command}. Approve only if you asked for this change.`);
|
|
76
|
+
return verdict("deny", `specialist gate: ${command} needs an owner's approval, which a session in ${input.permission_mode} mode cannot ask. Run it from a session with prompts or from Discord.`);
|
|
77
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Claude Code harness of the specialists, bundled into the core.s
|
|
3
|
+
* `dist/claude.js` (Node does not strip types inside node_modules).
|
|
4
|
+
*
|
|
5
|
+
* claude.js serve <service> the specialist's MCP server on stdio
|
|
6
|
+
* claude.js hook the PreToolUse hook: JSON on stdin, a decision on stdout
|
|
7
|
+
* claude.js agents <agents dir> <node> writes astro-<service>.md for every pack specialist
|
|
8
|
+
* claude.js settings <settings.json> <node> adds the hook, allow rules, and time limits
|
|
9
|
+
*
|
|
10
|
+
* `<node>` is the Node the files name, such as /opt/homebrew/bin/node: a stable link, because
|
|
11
|
+
* Homebrew replaces the versioned folder that `process.execPath` points into on every upgrade.
|
|
12
|
+
*/
|
|
13
|
+
import { existsSync, readdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
14
|
+
import { join } from "node:path";
|
|
15
|
+
import { createInterface } from "node:readline";
|
|
16
|
+
import { fileURLToPath } from "node:url";
|
|
17
|
+
import { getAgentDir } from "../../extensions/subagents/pi-paths.ts";
|
|
18
|
+
import { loadConfig } from "../../extensions/gate/config.ts";
|
|
19
|
+
import { deniedText, requestApproval } from "../../extensions/gate/core.ts";
|
|
20
|
+
import { claudeSettings, GENERATED_FIELD, type PackFile, renderAgent } from "./agents.ts";
|
|
21
|
+
import { agentName, decide, type HookInput, verdict } from "./hook.ts";
|
|
22
|
+
import { SpecialistServer } from "./mcp.ts";
|
|
23
|
+
import { mergeSettings, type Settings } from "./settings.ts";
|
|
24
|
+
|
|
25
|
+
const BUNDLE = fileURLToPath(import.meta.url);
|
|
26
|
+
/** The installed pack, which every harness reads its agents and skills from. */
|
|
27
|
+
const PACK = join(getAgentDir(), "pack");
|
|
28
|
+
const SERVICE = /^[a-z][a-z0-9-]{0,30}$/;
|
|
29
|
+
|
|
30
|
+
function usage(): never {
|
|
31
|
+
process.stderr.write("usage: claude.js serve <service> | hook | agents <agents dir> <node> | settings <settings.json> <node>\n");
|
|
32
|
+
process.exit(2);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function readJson<T>(path: string): T {
|
|
36
|
+
return JSON.parse(readFileSync(path, "utf-8")) as T;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function writeAtomic(path: string, text: string): void {
|
|
40
|
+
const tmp = `${path}.tmp`;
|
|
41
|
+
writeFileSync(tmp, text, { mode: 0o644 });
|
|
42
|
+
renameSync(tmp, path);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function packFile(): PackFile & { version: string } {
|
|
46
|
+
return readJson<PackFile & { version: string }>(join(PACK, "pack.json"));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
async function serve(service: string): Promise<void> {
|
|
50
|
+
const server = new SpecialistServer({ service, config: loadConfig().config, version: packFile().version });
|
|
51
|
+
const lines = createInterface({ input: process.stdin });
|
|
52
|
+
for await (const line of lines) {
|
|
53
|
+
if (line.trim().length === 0) continue;
|
|
54
|
+
void server.handle(line).then((response) => {
|
|
55
|
+
if (response) process.stdout.write(`${JSON.stringify(response)}\n`);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function hook(): Promise<void> {
|
|
61
|
+
const chunks: Buffer[] = [];
|
|
62
|
+
for await (const chunk of process.stdin) chunks.push(chunk as Buffer);
|
|
63
|
+
const input = JSON.parse(Buffer.concat(chunks).toString("utf-8")) as HookInput;
|
|
64
|
+
const config = loadConfig().config;
|
|
65
|
+
const decided = decide(input, config, process.env);
|
|
66
|
+
if (decided === null) return;
|
|
67
|
+
if ("hookSpecificOutput" in decided) {
|
|
68
|
+
process.stdout.write(`${JSON.stringify(decided)}\n`);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const entry = config?.specialists.find((s) => s.service === decided.request.service);
|
|
72
|
+
if (!entry) throw new Error(`no ${decided.request.service} specialist is configured`);
|
|
73
|
+
const decision = await requestApproval(decided.url, decided.token, decided.request);
|
|
74
|
+
const output = decision === "approve" ? verdict("allow", "An owner approved this call in Discord.") : verdict("deny", deniedText(entry, decision, decided.request.args));
|
|
75
|
+
process.stdout.write(`${JSON.stringify(output)}\n`);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function agents(dir: string, node: string): void {
|
|
79
|
+
const pack = packFile();
|
|
80
|
+
for (const name of readdirSync(dir).filter((n) => n.startsWith("astro-") && n.endsWith(".md"))) {
|
|
81
|
+
if (readFileSync(join(dir, name), "utf-8").includes(`\n${GENERATED_FIELD}\n`)) rmSync(join(dir, name));
|
|
82
|
+
}
|
|
83
|
+
for (const { service } of pack.specialists) {
|
|
84
|
+
const agentPath = join(PACK, "agents", `${service}.md`);
|
|
85
|
+
const skillPath = join(PACK, "skills", service, "SKILL.md");
|
|
86
|
+
const text = renderAgent({
|
|
87
|
+
service,
|
|
88
|
+
agent: readFileSync(agentPath, "utf-8"),
|
|
89
|
+
skill: existsSync(skillPath) ? readFileSync(skillPath, "utf-8") : null,
|
|
90
|
+
settings: claudeSettings(pack, service),
|
|
91
|
+
node,
|
|
92
|
+
bundle: BUNDLE,
|
|
93
|
+
});
|
|
94
|
+
writeAtomic(join(dir, `${agentName(service)}.md`), text);
|
|
95
|
+
}
|
|
96
|
+
process.stdout.write(`${pack.specialists.length} Claude Code agents from pack ${pack.version} in ${dir}\n`);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function settings(path: string, node: string): void {
|
|
100
|
+
const config = loadConfig().config;
|
|
101
|
+
if (!config) throw new Error("~/.pi/agent/specialists.json is missing or invalid");
|
|
102
|
+
const current = existsSync(path) ? readJson<Settings>(path) : {};
|
|
103
|
+
if (existsSync(path) && !existsSync(`${path}.before-astro`)) writeFileSync(`${path}.before-astro`, readFileSync(path));
|
|
104
|
+
const services = config.specialists.map((s) => s.service);
|
|
105
|
+
const longest = Math.max(...config.specialists.map((s) => s.timeoutMs));
|
|
106
|
+
writeAtomic(path, `${JSON.stringify(mergeSettings(current, services, `${node} ${BUNDLE} hook`, longest), null, 2)}\n`);
|
|
107
|
+
process.stdout.write(`${path}: the specialist gate hook, ${services.length} allow rules, MCP time limits\n`);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const [mode, arg, node] = process.argv.slice(2);
|
|
111
|
+
const nodeOk = typeof node === "string" && node.startsWith("/") && !/\s/.test(node);
|
|
112
|
+
if (mode === "serve" && arg && SERVICE.test(arg)) await serve(arg);
|
|
113
|
+
else if (mode === "hook" && !arg) {
|
|
114
|
+
// Exit code 2 blocks the call; a hook that cannot decide must not let it through.
|
|
115
|
+
await hook().catch((err: unknown) => {
|
|
116
|
+
process.stderr.write(`specialist gate hook failed: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
117
|
+
process.exit(2);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
else if (mode === "agents" && arg && nodeOk) agents(arg, node);
|
|
121
|
+
else if (mode === "settings" && arg && nodeOk) settings(arg, node);
|
|
122
|
+
else usage();
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Model Context Protocol server over stdio for one specialist, with one tool,
|
|
3
|
+
* `run`. Claude Code starts it inside that specialist's subagent only (inline
|
|
4
|
+
* `mcpServers` in the agent file), so the main session never has the tool. It
|
|
5
|
+
* speaks the 2026-07-28 revision (no handshake, version in `_meta`) and the
|
|
6
|
+
* earlier ones (`initialize`, `ping`), and answers each request on one line.
|
|
7
|
+
* It never decides about risk: the PreToolUse hook asks before a risky call
|
|
8
|
+
* reaches it, in a terminal and for the chat bridge alike.
|
|
9
|
+
*/
|
|
10
|
+
import { spawn } from "node:child_process";
|
|
11
|
+
import { entryArgs, failedText, stoppedText } from "../../extensions/gate/core.ts";
|
|
12
|
+
import type { SpecialistEntry, SpecialistsConfig } from "../../extensions/gate/types.ts";
|
|
13
|
+
|
|
14
|
+
export const MODERN_VERSION = "2026-07-28";
|
|
15
|
+
const LEGACY_VERSIONS = ["2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"];
|
|
16
|
+
const SUPPORTED = [MODERN_VERSION, ...LEGACY_VERSIONS];
|
|
17
|
+
const VERSION_META = "io.modelcontextprotocol/protocolVersion";
|
|
18
|
+
/** Output beyond this ends the call; a wrapper's answer is far smaller. */
|
|
19
|
+
const MAX_OUTPUT = 20 * 1024 * 1024;
|
|
20
|
+
|
|
21
|
+
type Id = string | number;
|
|
22
|
+
|
|
23
|
+
interface Request {
|
|
24
|
+
jsonrpc?: unknown;
|
|
25
|
+
id?: unknown;
|
|
26
|
+
method?: unknown;
|
|
27
|
+
params?: Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type Message = { jsonrpc: "2.0"; id: Id | null; result: Record<string, unknown> } | { jsonrpc: "2.0"; id: Id | null; error: { code: number; message: string; data?: unknown } };
|
|
31
|
+
|
|
32
|
+
export interface RunResult {
|
|
33
|
+
code: number | null;
|
|
34
|
+
stdout: string;
|
|
35
|
+
stderr: string;
|
|
36
|
+
killed: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type Runner = (file: string, args: string[], timeoutMs: number, signal: AbortSignal) => Promise<RunResult>;
|
|
40
|
+
|
|
41
|
+
export interface ServerOptions {
|
|
42
|
+
service: string;
|
|
43
|
+
config: SpecialistsConfig | null;
|
|
44
|
+
version: string;
|
|
45
|
+
run?: Runner;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Runs a program with an argument list and a time limit, never a shell. */
|
|
49
|
+
export const runProgram: Runner = (file, args, timeoutMs, signal) =>
|
|
50
|
+
new Promise((resolve) => {
|
|
51
|
+
const child = spawn(file, args, { stdio: ["ignore", "pipe", "pipe"] });
|
|
52
|
+
let stdout = "";
|
|
53
|
+
let stderr = "";
|
|
54
|
+
let killed = false;
|
|
55
|
+
const stop = () => {
|
|
56
|
+
killed = true;
|
|
57
|
+
child.kill("SIGTERM");
|
|
58
|
+
};
|
|
59
|
+
const timer = setTimeout(stop, timeoutMs);
|
|
60
|
+
signal.addEventListener("abort", stop, { once: true });
|
|
61
|
+
child.stdout.on("data", (chunk: Buffer) => {
|
|
62
|
+
stdout += chunk.toString("utf-8");
|
|
63
|
+
if (stdout.length > MAX_OUTPUT) stop();
|
|
64
|
+
});
|
|
65
|
+
child.stderr.on("data", (chunk: Buffer) => {
|
|
66
|
+
stderr += chunk.toString("utf-8");
|
|
67
|
+
if (stderr.length > MAX_OUTPUT) stop();
|
|
68
|
+
});
|
|
69
|
+
const finish = (code: number | null) => {
|
|
70
|
+
clearTimeout(timer);
|
|
71
|
+
signal.removeEventListener("abort", stop);
|
|
72
|
+
resolve({ code, stdout, stderr, killed });
|
|
73
|
+
};
|
|
74
|
+
child.on("error", (err) => {
|
|
75
|
+
stderr += err.message;
|
|
76
|
+
finish(null);
|
|
77
|
+
});
|
|
78
|
+
child.on("close", (code) => finish(code));
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
function inputSchema(): Record<string, unknown> {
|
|
82
|
+
return {
|
|
83
|
+
type: "object",
|
|
84
|
+
properties: { args: { type: "array", items: { type: "string" }, description: "Subcommand and arguments for the specialist CLI, one array element per argument." } },
|
|
85
|
+
required: ["args"],
|
|
86
|
+
additionalProperties: false,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export class SpecialistServer {
|
|
91
|
+
private readonly options: ServerOptions;
|
|
92
|
+
private readonly entry: SpecialistEntry | undefined;
|
|
93
|
+
private readonly running = new Map<Id, AbortController>();
|
|
94
|
+
|
|
95
|
+
constructor(options: ServerOptions) {
|
|
96
|
+
this.options = options;
|
|
97
|
+
this.entry = options.config?.specialists.find((s) => s.service === options.service);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
private tool(): Record<string, unknown> {
|
|
101
|
+
return {
|
|
102
|
+
name: "run",
|
|
103
|
+
title: `${this.options.service} specialist`,
|
|
104
|
+
description: `Runs the ${this.options.service} specialist CLI. Pass the subcommand and its arguments as an array; start with ["--help"] when unsure which subcommands exist. Output is JSON on success; errors carry the CLI's stderr.`,
|
|
105
|
+
inputSchema: inputSchema(),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
private info(): { name: string; version: string } {
|
|
110
|
+
return { name: `astro-${this.options.service}`, version: this.options.version };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** One message from the client; resolves to the response, or null for a notification. */
|
|
114
|
+
async handle(raw: string): Promise<Message | null> {
|
|
115
|
+
let request: Request;
|
|
116
|
+
try {
|
|
117
|
+
request = JSON.parse(raw) as Request;
|
|
118
|
+
} catch {
|
|
119
|
+
return { jsonrpc: "2.0", id: null, error: { code: -32700, message: "Parse error" } };
|
|
120
|
+
}
|
|
121
|
+
const id = typeof request.id === "string" || typeof request.id === "number" ? request.id : null;
|
|
122
|
+
const method = typeof request.method === "string" ? request.method : "";
|
|
123
|
+
const params = request.params ?? {};
|
|
124
|
+
if (id === null) {
|
|
125
|
+
if (method === "notifications/cancelled") this.running.get((params.requestId as Id | undefined) ?? "")?.abort();
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
const meta = (params._meta ?? {}) as Record<string, unknown>;
|
|
129
|
+
const requested = meta[VERSION_META];
|
|
130
|
+
if (typeof requested === "string" && !SUPPORTED.includes(requested)) {
|
|
131
|
+
return { jsonrpc: "2.0", id, error: { code: -32022, message: "Unsupported protocol version", data: { supported: SUPPORTED, requested } } };
|
|
132
|
+
}
|
|
133
|
+
const result = (value: Record<string, unknown>): Message => ({ jsonrpc: "2.0", id, result: { resultType: "complete", ...value } });
|
|
134
|
+
switch (method) {
|
|
135
|
+
case "initialize": {
|
|
136
|
+
const asked = typeof params.protocolVersion === "string" ? params.protocolVersion : "";
|
|
137
|
+
return { jsonrpc: "2.0", id, result: { protocolVersion: LEGACY_VERSIONS.includes(asked) ? asked : LEGACY_VERSIONS[0], capabilities: { tools: {} }, serverInfo: this.info() } };
|
|
138
|
+
}
|
|
139
|
+
case "server/discover":
|
|
140
|
+
return result({ supportedVersions: SUPPORTED, capabilities: { tools: {} }, _meta: { "io.modelcontextprotocol/serverInfo": this.info() } });
|
|
141
|
+
case "ping":
|
|
142
|
+
return { jsonrpc: "2.0", id, result: {} };
|
|
143
|
+
case "tools/list":
|
|
144
|
+
return result({ tools: [this.tool()] });
|
|
145
|
+
case "tools/call":
|
|
146
|
+
if (params.name !== "run") return { jsonrpc: "2.0", id, error: { code: -32602, message: `Unknown tool: ${String(params.name)}` } };
|
|
147
|
+
return result(await this.call(id, params.arguments));
|
|
148
|
+
default:
|
|
149
|
+
return { jsonrpc: "2.0", id, error: { code: -32601, message: `Method not found: ${method}` } };
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
private async call(id: Id, input: unknown): Promise<Record<string, unknown>> {
|
|
154
|
+
const text = (value: string, isError: boolean) => ({ content: [{ type: "text", text: value }], isError });
|
|
155
|
+
const config = this.options.config;
|
|
156
|
+
const entry = this.entry;
|
|
157
|
+
if (!config || !entry) return text(`no ${this.options.service} specialist is configured on this host`, true);
|
|
158
|
+
const args = (input as { args?: unknown } | undefined)?.args;
|
|
159
|
+
if (!Array.isArray(args) || !args.every((a) => typeof a === "string")) return text("args must be a list of strings", true);
|
|
160
|
+
const controller = new AbortController();
|
|
161
|
+
this.running.set(id, controller);
|
|
162
|
+
try {
|
|
163
|
+
const run = this.options.run ?? runProgram;
|
|
164
|
+
const outcome = await run("/usr/bin/sudo", entryArgs(config, entry, args), entry.timeoutMs, controller.signal);
|
|
165
|
+
if (outcome.killed) return text(stoppedText(entry), true);
|
|
166
|
+
if (outcome.code !== 0) return text(failedText(entry, outcome.code ?? 1, outcome.stderr, outcome.stdout), true);
|
|
167
|
+
return text(outcome.stdout.trim() || "(no output)", false);
|
|
168
|
+
} catch (err) {
|
|
169
|
+
return text(`${entry.service}: ${err instanceof Error ? err.message : String(err)}`, true);
|
|
170
|
+
} finally {
|
|
171
|
+
this.running.delete(id);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The parts of `~/.claude/settings.json` that the specialist gate owns: the
|
|
3
|
+
* PreToolUse hook, an allow rule per specialist tool (the hook still asks for
|
|
4
|
+
* risky calls), and the time limits a specialist call can need. Everything else
|
|
5
|
+
* in the file stays as it is.
|
|
6
|
+
*/
|
|
7
|
+
import { agentName } from "./hook.ts";
|
|
8
|
+
|
|
9
|
+
/** Earlier gates ran the pack's `harness/claude.js`, later ones pi-astro's `dist/claude.js`; both are replaced. */
|
|
10
|
+
const HOOK_MARKS = ["harness/claude.js hook", "dist/claude.js hook"];
|
|
11
|
+
/** Bash for the guard's command markers, the file tools for the specialist's home, and the specialist tools. */
|
|
12
|
+
export const HOOK_MATCHER = "^(Bash|Read|Write|Edit|MultiEdit|NotebookEdit|Grep|Glob|mcp__astro-[a-z0-9-]+__run)$";
|
|
13
|
+
/** Seconds a hook may take: in a bridge run it waits for the owners, up to the bridge's longest approval time (240 minutes). */
|
|
14
|
+
export const HOOK_TIMEOUT_S = 240 * 60 + 60;
|
|
15
|
+
|
|
16
|
+
interface HookCommand {
|
|
17
|
+
type?: unknown;
|
|
18
|
+
command?: unknown;
|
|
19
|
+
timeout?: unknown;
|
|
20
|
+
onFailure?: unknown;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface HookGroup {
|
|
24
|
+
matcher?: unknown;
|
|
25
|
+
hooks?: HookCommand[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface Settings {
|
|
29
|
+
env?: Record<string, string>;
|
|
30
|
+
permissions?: { allow?: unknown[] } & Record<string, unknown>;
|
|
31
|
+
hooks?: { PreToolUse?: HookGroup[] } & Record<string, unknown>;
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function ours(group: HookGroup): boolean {
|
|
36
|
+
return (group.hooks ?? []).some((h) => typeof h.command === "string" && HOOK_MARKS.some((mark) => (h.command as string).includes(mark)));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** The settings with the gate's entries for these services; earlier gate entries are replaced. */
|
|
40
|
+
export function mergeSettings(current: Settings, services: readonly string[], hookCommand: string, longestCallMs: number): Settings {
|
|
41
|
+
const allow = (current.permissions?.allow ?? []).filter((rule) => !(typeof rule === "string" && /^mcp__astro-[a-z0-9-]+__run$/.test(rule)));
|
|
42
|
+
const preToolUse = (current.hooks?.PreToolUse ?? []).filter((group) => !ours(group));
|
|
43
|
+
return {
|
|
44
|
+
...current,
|
|
45
|
+
env: {
|
|
46
|
+
...(current.env ?? {}),
|
|
47
|
+
// Claude Code moves an MCP call longer than two minutes to the background and drops an idle stdio server after 30; an Arcane stack update takes up to 135.
|
|
48
|
+
CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS: "0",
|
|
49
|
+
CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT: "0",
|
|
50
|
+
MCP_TOOL_TIMEOUT: String(longestCallMs + 60_000),
|
|
51
|
+
},
|
|
52
|
+
permissions: { ...(current.permissions ?? {}), allow: [...allow, ...services.map((s) => `mcp__${agentName(s)}__run`)] },
|
|
53
|
+
hooks: {
|
|
54
|
+
...(current.hooks ?? {}),
|
|
55
|
+
PreToolUse: [...preToolUse, { matcher: HOOK_MATCHER, hooks: [{ type: "command", command: hookCommand, timeout: HOOK_TIMEOUT_S, onFailure: "block" }] }],
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Whether the settings carry the gate's hook. */
|
|
61
|
+
export function hasGate(settings: Settings): boolean {
|
|
62
|
+
return (settings.hooks?.PreToolUse ?? []).some(ours);
|
|
63
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,73 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrofoundry/astrogate",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Astrogate core: isolated agent workspaces with specialists, a foreman, and chat bridges, for the pi coding agent and Claude Code.",
|
|
5
|
+
"packageManager": "pnpm@12.23.0",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "vitest run --coverage",
|
|
8
|
+
"lint": "eslint .",
|
|
9
|
+
"build": "node scripts/build.ts",
|
|
10
|
+
"prepack": "node scripts/build.ts",
|
|
11
|
+
"typecheck": "tsc --noEmit",
|
|
12
|
+
"check": "tsc --noEmit && eslint . && node scripts/build.ts && vitest run --coverage",
|
|
13
|
+
"release:patch": "node scripts/release.ts patch",
|
|
14
|
+
"release:minor": "node scripts/release.ts minor",
|
|
15
|
+
"release:major": "node scripts/release.ts major"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"pi-package"
|
|
19
|
+
],
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"pi": {
|
|
26
|
+
"extensions": [
|
|
27
|
+
"./dist/extensions"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"README.md",
|
|
32
|
+
"agents",
|
|
33
|
+
"cli",
|
|
34
|
+
"dist",
|
|
35
|
+
"extensions",
|
|
36
|
+
"harness",
|
|
37
|
+
"release.sha256",
|
|
38
|
+
"release.sha256.sig",
|
|
39
|
+
"specialists"
|
|
40
|
+
],
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "git+https://github.com/astrofoundry/astrogate.git"
|
|
44
|
+
},
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/astrofoundry/astrogate/issues"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/astrofoundry/astrogate#readme",
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@earendil-works/pi-agent-core": "*",
|
|
51
|
+
"@earendil-works/pi-ai": "*",
|
|
52
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
53
|
+
"@earendil-works/pi-tui": "*",
|
|
54
|
+
"typebox": "*"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@earendil-works/pi-agent-core": "1.3.0",
|
|
58
|
+
"@earendil-works/pi-ai": "1.3.0",
|
|
59
|
+
"@earendil-works/pi-coding-agent": "1.3.0",
|
|
60
|
+
"@earendil-works/pi-tui": "1.3.0",
|
|
61
|
+
"@eslint/js": "^10.0.1",
|
|
62
|
+
"@types/node": "^26.6.11",
|
|
63
|
+
"@vitest/coverage-v8": "^5.1.2",
|
|
64
|
+
"esbuild": "0.28.2",
|
|
65
|
+
"eslint": "^10.16.0",
|
|
66
|
+
"globals": "^17.15.0",
|
|
67
|
+
"typebox": "1.3.30",
|
|
68
|
+
"typescript": "^6.0.3",
|
|
69
|
+
"typescript-eslint": "^8.74.0",
|
|
70
|
+
"vitest": "^5.1.2",
|
|
71
|
+
"yaml": "2.9.0"
|
|
72
|
+
}
|
|
73
|
+
}
|
package/release.sha256
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
18e5d7d16e71779794629880e19fd14d28d6fb7b5db9ccdc64511e8b6c69a4a9 README.md
|
|
2
|
+
b9b0f9fa90b9a230157de1fefef1aa5a624bfd7b50527b67ad86ecc62414aadb agents/foreman.md
|
|
3
|
+
4091f50a5a9ff72e2f1571c6de054d9c891dbe294aa58e6a55ad9a1bff2f766a cli/astro-install.sh
|
|
4
|
+
9f371247fdaea09e1551f940fd91eacb7d242baea343fce66f12fc8e22ba064b cli/astro.sh
|
|
5
|
+
8e054f8286876b77e0887d0b0e2a62d4a048fd41bfa0048d126e0c9171869cf6 cli/astro.test.ts
|
|
6
|
+
a41c87a4a7ed07382a58de6e8f382e2dba9123de2aca6aa8275bd31df8985a48 cli/astrogate.sh
|
|
7
|
+
08d772b724401f59988b99ad3cadd381c2280975fda38f76a7dfc7853188e117 cli/astrogate.test.ts
|
|
8
|
+
07b9aef7e5d0ee43959e0c16e00ec3a202769c94faea4167257513bf15b9383c cli/verify-release.sh
|
|
9
|
+
29614fd0eb1ad08215baf827b00ee2b98ccb73ca0ccf770bc5a0084c71da5926 cli/verify-release.test.ts
|
|
10
|
+
369bc39629e3997f35ea22a4ba4d37f84da52c60ca3bf6fa5c623861a1a58329 dist/bridge.js
|
|
11
|
+
720dd00d15a39fca7b869896d7e79e2b2265497ce03f69bda2aa87522b95635d dist/claude.js
|
|
12
|
+
28270cc310f685e03ca53449030571a85fab3f9e41c57839f85f58c36ff92543 dist/extensions/bridge/index.js
|
|
13
|
+
d407e536d0f10651db55f095203d299f5eea7c570f5eed1543b86e106f3bdc42 dist/extensions/gate/index.js
|
|
14
|
+
ebdfe69e12247c6d240d0e3e5350ab2c9f1af7c520c6cf8202f60c3e2842f5c3 dist/extensions/guard/index.js
|
|
15
|
+
0298f1593f8e59463d750a3806c5f5044f22f376b46006710fb9bd3ffded7dac dist/extensions/subagents/index.js
|
|
16
|
+
ada0e5ec8e5486c1b0626acb8268c1ffb3abea052386f858b2158150b09249f5 extensions/bridge/admin.ts
|
|
17
|
+
44cf837740bc68818d59e316170799f5ca9ed5c4c1a45a154d0d38e5401ddb7d extensions/bridge/approvals.ts
|
|
18
|
+
0eca3cb4fe2962f5ad2a2300dc12f9c9c2ca6ccfa709e6fa0c177664b4e29f56 extensions/bridge/attachments.ts
|
|
19
|
+
3e663a0fd267ac98361a1689fda4c268e60e13dca228509e90f239bd5d009059 extensions/bridge/chunk.ts
|
|
20
|
+
d67c42282ef42aa2b6a3ca127dfb9ab5b5d66d7acc4b3c6b48cf8173e183d8cb extensions/bridge/claude-run.test.ts
|
|
21
|
+
263f5524047e1120eaf93827f458d4fcd5618e09336d974a631db525896e130f extensions/bridge/claude-run.ts
|
|
22
|
+
69862e1bd196ef57e9d4270dd96c2c80fdacbbfc176de713d859d06879fd021d extensions/bridge/commands.ts
|
|
23
|
+
697ba3f4e717be569cbc4848c611c9387ffb44cb5a34d621ce02efec8a1b2b5b extensions/bridge/config.ts
|
|
24
|
+
8fca01ea1d0852dae579dccaa699d7b309095117bab2978fbc13286b1aaed34e extensions/bridge/conversations.ts
|
|
25
|
+
b37b20c17e4637a5aa338429b65e2f634e1a30722caee117fd432d61318758ab extensions/bridge/daemon.ts
|
|
26
|
+
870ede448665e0fbbc540074a9e76f653b7badf74baa8c35ac56d02197b0d5cc extensions/bridge/discord.test.ts
|
|
27
|
+
48427d32a6a4b54c9098c982d14754c80fc33b764faea8749b30ca8ba10a87a1 extensions/bridge/gateway.ts
|
|
28
|
+
0e12b739ba8ffee746512014e0ab16f941928e14bc9624c5b414ba22e22c7f60 extensions/bridge/index.ts
|
|
29
|
+
df97cc953c7c1004aee608bcecd7b3c4969b4f868c63b0320baf3f30540bf4ad extensions/bridge/launcher.ts
|
|
30
|
+
423cf0c6aaf2b9d9d8bdcbdec0f5264c1cac088a31c0d11e7027cb65bc3d8fb5 extensions/bridge/lifecycle.test.ts
|
|
31
|
+
77e2ed89d19006eaa9a2c5664beee3c5978e15417ed47f2788e42b1af24b123b extensions/bridge/open-work.ts
|
|
32
|
+
d0f754707cc55e93bfe6be5a8c88024f04835ab7b773aa04e946c454a185fd58 extensions/bridge/plugin.ts
|
|
33
|
+
8480d9e436f0860c28b2d5fc48f1c980f8df836be6748cadcf8791b95c4c7fbc extensions/bridge/quote.ts
|
|
34
|
+
4a59af4706e9135eba697f5ffcba653965145129a589168e7ef6cb18df55a64a extensions/bridge/reports.ts
|
|
35
|
+
b3fafef4d97eb9aa8bcfe68c766b87f4f6c6fc002fd127676074838529b0d875 extensions/bridge/rest.ts
|
|
36
|
+
9829b1bca17dd996ee59cf9bfdb607850eb0c2533fe957a4194eb584b7bc6e65 extensions/bridge/setup.ts
|
|
37
|
+
d2d4da86f4c50fa9a11a01b3b8472291aebe06967e78305c3c8bdeaf85529756 extensions/gate/approvals.test.ts
|
|
38
|
+
1ddb62a2cda06be47351cfd1dc503b3c70a58f47fe4d0aad571de6858d4fe914 extensions/gate/config.ts
|
|
39
|
+
35240326c32034445c71351fa9a01cf96281ff98dafa6d44d345a56f55079a26 extensions/gate/core.ts
|
|
40
|
+
7d64f3e52b8cf2f26c68ce5052acd7c5fc8cc8ce569b6cc799d24553e27ad5b5 extensions/gate/index.test.ts
|
|
41
|
+
04c74b8e463c40ad0a9e9b5a5aa47f6a09dbbd6a4ca0aa11a3b91f204ec84bf4 extensions/gate/index.ts
|
|
42
|
+
0c057b323df66f581af6016ac77cfbacfe375a61f1b631ec4ef015e59b34be65 extensions/gate/risky.ts
|
|
43
|
+
559a9501f03859338a92d98599d0ade324ebce55b339913ec5d49ad9d658c61e extensions/gate/types.ts
|
|
44
|
+
b92ccbd7f0f1ceb803dac7a1a8997b6eaa001677e69b3be8b3f02262cf2fd3ef extensions/guard/config.test.ts
|
|
45
|
+
a812df246395578ed0bead749a1344838f24566abf75062a277ceb781e30d989 extensions/guard/config.ts
|
|
46
|
+
a203a51a4421abb7383718326ee319b2c7cbecafda204942bee822825de8f239 extensions/guard/defaults.ts
|
|
47
|
+
31d78773c9ea8fc30959ad17269815988e0adca85235299f45822ab184766bd0 extensions/guard/index.test.ts
|
|
48
|
+
23f0189de8d54a27299c87643fd1eea100fdd9a82be3f4207fbb232e9713be5d extensions/guard/index.ts
|
|
49
|
+
8f6ac74fee5735c3813f1dad015bdf59ea0d97b6892144aabe3ade54285c9efe extensions/guard/rules.test.ts
|
|
50
|
+
f05fdb8f0b448574e9d1f8b15b32b11376f8239b6093331e01c5e37280ab2038 extensions/guard/rules.ts
|
|
51
|
+
de7ebef106b75390f99c9e44156a4a387cd3d9042a1860ba511f0376a87ce66a extensions/guard/types.ts
|
|
52
|
+
5486e1937676a0aa46c8c8aff5f743000ee7e45005b856bab789f0e002560392 extensions/subagents/agents.test.ts
|
|
53
|
+
33b24a0ef5bfdee73fc64da363200d9d1c5a7b29106349aedf762ff484b4f57c extensions/subagents/agents.ts
|
|
54
|
+
cab7630fde372c4231c72aedc9b59e229687d9c7fe52a2990a9be351dab4e0f8 extensions/subagents/bundled.test.ts
|
|
55
|
+
ef7abeaa3d011af5b5fdcb7f61ff368b11b7b3dcfd3b705bcba99d45c4d77f61 extensions/subagents/child.test.ts
|
|
56
|
+
0f75d0481e0ec897c4a4cc62ad258e9ff6e49ae33def2004d784e8817ef0ba5b extensions/subagents/child.ts
|
|
57
|
+
f8f371e3a528b9cf13578b3c7128405dc8ea2077c0273eb2e9fa2aa3f2f759c7 extensions/subagents/index.test.ts
|
|
58
|
+
f686f06e24cbd4d3ae20f11460889bf4a951ac2443d84293acf48ff66315b94a extensions/subagents/index.ts
|
|
59
|
+
bdac6115c899f1eb8fbfd8d021afa0413a363471d1ab99774b994b3f3497eaa3 extensions/subagents/pi-paths.test.ts
|
|
60
|
+
4940f6e7f05e496109c7aa165b8590f3cb14fd4a2e072c30273aa636bce8654b extensions/subagents/pi-paths.ts
|
|
61
|
+
5af222b47922e154cb48369e193d819cbd4dbbc834df50c335b0231dc193a3b7 extensions/subagents/render.ts
|
|
62
|
+
e2bbd377a4fa2adf212246b735cdf2df24652422f366cba7a90c7f926722a2da extensions/subagents/sessions.test.ts
|
|
63
|
+
ff2638595576521db52d5a4c22e485aae21c48fd1d463f2740e9f956320d989d extensions/subagents/sessions.ts
|
|
64
|
+
e76423d9c09263e064e48e6608c6eb07f70bc350841153f7c251376b8b424dc6 extensions/subagents/ticker.test.ts
|
|
65
|
+
54ecfb600920d76eb5ec877c9b8ecc5fc61cb3d865f31bd3893aa5bea6b72fb6 extensions/subagents/ticker.ts
|
|
66
|
+
5a11fadeded4848e0f75657eaef93804b4097f4977e533b15dff80a82ef2a628 harness/claude/agents.ts
|
|
67
|
+
742eaa3eb708bb1e2e507cf468fbff88107a2d97f47191d1a8de6ea51e70a6d8 harness/claude/claude.test.ts
|
|
68
|
+
91fa7a981f8ac4436a6377680a6081570af304efbf1cac21a661122ebaf8a2ba harness/claude/hook.ts
|
|
69
|
+
484c52d2e9d93dbe4aec878b5afc494f0076f5b79b5f4d24423933b39913bc3b harness/claude/main.ts
|
|
70
|
+
e1d07bd981bd4ff6385246b6c1ad41349718c1e490b2bff675291dc7b568cd69 harness/claude/mcp.ts
|
|
71
|
+
194b623038d56a2565ad42d30d1db72ca453e654bfc84996800362e8a972282b harness/claude/settings.ts
|
|
72
|
+
916cc870de3aa2881387ef4a95c25f7d9145b0f97ea2b940326eb85ea29f4868 package.json
|
|
73
|
+
642383b14db5dbfb7caa6a185591263e4294a73323bf4c78606f7b85f0817fd0 specialists/AGENTS.md
|
|
74
|
+
a385cf5e3b59de30b5ed9b0840d6cf6198b577668f18dfd5de13a714fb047c3e specialists/README.md
|
|
75
|
+
729f8c29d7cf716be5b01d5df869eeda6d4683f86a4915a52fb8adfdebe1f9d2 specialists/entry/specialist-cli.sh
|
|
76
|
+
d5f31c5a1a0dea35966cbbc57001b626320826b92c423379e2c852ae89d1ad3d specialists/entry/specialist-install.sh
|
|
77
|
+
8918c907fe01b40253b77a2ece0e6dca21d3cde2454211b531cbfbf2498d1750 specialists/entry/specialist-install.test.ts
|
|
78
|
+
485d11e6bef5daca8fcebfeb0cb2c0efeef5c55e00d4999c067b6f2deca4c903 specialists/lib/argv.ts
|
|
79
|
+
8ead6691d5864495359d2be6589695828d8202c71292038ad492c76ba1e56ada specialists/lib/audit.ts
|
|
80
|
+
2b1bf1a898fd42adaeb43c9c578d3427d6f05afe58cdf984424c934c6115d2f8 specialists/lib/config.ts
|
|
81
|
+
5593e9c8acbe022982ed910b78ceafd0fd67abe7942495cee2affb579217090d specialists/lib/errors.ts
|
|
82
|
+
270a5a21f88d8035b0819c5f1a3313eef795e26f409e6014f77f45e84468fd44 specialists/lib/flush.test.ts
|
|
83
|
+
863006914c4175a20255ec6f13034d8a0092591de06f6cf16d275fa82dbc085b specialists/lib/lib.test.ts
|
|
84
|
+
2d832633d9409ea12f5a6f7b1f7368d130f28b54254697fb799ebbc3058e1e69 specialists/lib/lock.test.ts
|
|
85
|
+
5736fc438cccdd2e564adcc8bbde9fc6a5f1816915150b99a9d55bdb2799ad91 specialists/lib/lock.ts
|
|
86
|
+
149e10ba9993d24a70e29ac9d4325180e7912a328e1f55eb52f17b9d5e2f4a0a specialists/lib/main.ts
|
|
87
|
+
223b9fb71943a9beacd92ffd43268574bd10105fa029a2bde53ec086f38c8cab specialists/lib/output.ts
|
|
88
|
+
1e8f2eebd14850bef95c4153bb98675fc3a0680c74b91aa0c3fa14f6f84a2eb2 specialists/lib/paths.ts
|
|
89
|
+
4c30606cc711d90e200e70d2423f85b06b8362a0d3877accb72b4d8af0fb8d86 specialists/lib/pinned.test.ts
|
|
90
|
+
8bd65852d1fffdf918a03ce4952ef8a195c48ac356e9ff66778c6a1dcf6e493b specialists/lib/pinned.ts
|
|
91
|
+
f89bb9f0d33231f4b1c63ecce91171552f92e200c9f3f893e885a8c7a28c2121 specialists/lib/proc.ts
|
|
92
|
+
7449e0cbb992c6863bb552bcee48160f9893a77ea8c5645101a5484363856cf3 specialists/lib/repo.ts
|
|
93
|
+
3e08e45f7e8244d308942ff0155c3c2a078a76d22c5f6019dfea41dbda42341b specialists/lib/runtime.test.ts
|
|
94
|
+
cf173051f31cc92bc3715cf05c27e78ad000148136eca2deb402a0565a955c63 specialists/lib/sanitize.ts
|
|
95
|
+
79897f82c93a36ea100a376c471789697d3bd94f080ca25c9c269d2615dc24cd specialists/lib/secrets.ts
|
|
96
|
+
c1abde1e550c0f4703fd0b2536cc4002c7edf6468c18a03ebaa516fd1ce093c3 specialists/lib/ssh.ts
|
|
97
|
+
31959f525a0b0aff070b4a19a9677d446d3425481e936dcd9ca2d957f4e51142 specialists/lib/tunnel.test.ts
|
|
98
|
+
ed93bfcef355a0a3aa7d679395b2f6ce9ce4c5709253fda7f63c1f3927f5d324 specialists/lib/tunnel.ts
|
|
99
|
+
7a36850a90c3a5e8c2a02fe386f93a0b6e664431799154f548e7ac9f33e84a90 specialists/provision/provision.sh
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
-----BEGIN SSH SIGNATURE-----
|
|
2
|
+
U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgUteIwPdKqPwfNc4vHQPUE+JWMC
|
|
3
|
+
nmuMUwttLeX5wtyIoAAAAOYXN0cm9nYXRlLWNvcmUAAAAAAAAABnNoYTUxMgAAAFMAAAAL
|
|
4
|
+
c3NoLWVkMjU1MTkAAABA1taMKjBlPVP2TGVWp2cWTZZg0JKYd8T3E72x2KrpeX9nZazV3p
|
|
5
|
+
TvxaRwQhZeJlqy0k1VRXRZiO5y6W1+M9e6Dw==
|
|
6
|
+
-----END SSH SIGNATURE-----
|