Files
feynman/extensions/research-tools.ts
Advait Paliwal 85e0c4d8c4 Register alphaXiv research tools as native Pi tools
Replace the alpha-research CLI skill with direct programmatic Pi tool
registrations via @companion-ai/alpha-hub/lib. Tools connect to alphaXiv's
MCP server through the library and reuse the connection across calls
instead of spawning a new CLI process each time.

Registers: alpha_search, alpha_get_paper, alpha_ask_paper,
alpha_annotate_paper, alpha_list_annotations, alpha_read_code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:07:42 -07:00

24 lines
825 B
TypeScript

import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
import { registerAlphaTools } from "./research-tools/alpha.js";
import { installFeynmanHeader } from "./research-tools/header.js";
import { registerHelpCommand } from "./research-tools/help.js";
import { registerInitCommand, registerOutputsCommand } from "./research-tools/project.js";
export default function researchTools(pi: ExtensionAPI): void {
const cache: { agentSummaryPromise?: Promise<{ agents: string[]; chains: string[] }> } = {};
pi.on("session_start", async (_event, ctx) => {
await installFeynmanHeader(pi, ctx, cache);
});
pi.on("session_switch", async (_event, ctx) => {
await installFeynmanHeader(pi, ctx, cache);
});
registerAlphaTools(pi);
registerHelpCommand(pi);
registerInitCommand(pi);
registerOutputsCommand(pi);
}