Replace Pi tool registrations with skills and CLI integration

- Remove all manually registered Pi tools (alpha_search, alpha_get_paper,
  alpha_ask_paper, alpha_annotate_paper, alpha_list_annotations,
  alpha_read_code, session_search, preview_file) and their wrappers
  (alpha.ts, preview.ts, session-search.ts, alpha-tools.test.ts)
- Add Pi skill files for alpha-research, session-search, preview,
  modal-compute, and runpod-compute in skills/
- Sync skills to ~/.feynman/agent/skills/ on startup via syncBundledAssets
- Add node_modules/.bin to Pi subprocess PATH so alpha CLI is accessible
- Add /outputs extension command to browse research artifacts via dialog
- Add Modal and RunPod as execution environments in /replicate and
  /autoresearch prompts
- Remove redundant /alpha-login /alpha-logout /alpha-status REPL commands
  (feynman alpha CLI still works)
- Update README, researcher agent, metadata, and website docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Advait Paliwal
2026-03-25 00:38:45 -07:00
parent 5fab329ad1
commit 7024a86024
26 changed files with 320 additions and 1009 deletions

View File

@@ -1,86 +0,0 @@
import test from "node:test";
import assert from "node:assert/strict";
import { formatAlphaSearchContext, sanitizeAlphaSearchPayload } from "../extensions/research-tools/alpha.js";
import { formatToolText } from "../extensions/research-tools/shared.js";
test("sanitizeAlphaSearchPayload drops raw alpha search text while keeping parsed hits", () => {
const payload = sanitizeAlphaSearchPayload({
query: "scaling laws",
mode: "all",
semantic: {
raw: "\n\n\n1. **Paper A**\n- Abstract: noisy raw block",
results: [
{
rank: 1,
title: "Paper A",
publishedAt: "2025-09-28",
organizations: "Stanford University, EPFL",
authors: "A. Author, B. Author",
abstract: "Line one.\n\n\nLine two.",
arxivId: "2509.24012",
arxivUrl: "https://arxiv.org/abs/2509.24012",
alphaXivUrl: "https://www.alphaxiv.org/overview/2509.24012",
raw: "internal raw block that should be dropped",
},
],
},
keyword: {
raw: "\n\n\nNoisy keyword fallback",
results: [],
},
});
assert.deepEqual(payload, {
query: "scaling laws",
mode: "all",
semantic: {
count: 1,
results: [
{
rank: 1,
title: "Paper A",
publishedAt: "2025-09-28",
organizations: "Stanford University, EPFL",
authors: "A. Author, B. Author",
abstract: "Line one. Line two.",
arxivId: "2509.24012",
arxivUrl: "https://arxiv.org/abs/2509.24012",
alphaXivUrl: "https://www.alphaxiv.org/overview/2509.24012",
},
],
},
keyword: {
count: 0,
results: [],
note: "Noisy keyword fallback",
},
});
});
test("formatAlphaSearchContext emits compact model-facing text without raw JSON escapes", () => {
const text = formatAlphaSearchContext({
query: "scaling laws",
mode: "semantic",
results: [
{
rank: 1,
title: "Paper A",
abstract: "First line.\n\n\nSecond line.",
arxivId: "2509.24012",
raw: "should not appear",
},
],
raw: "\n\n\nvery noisy raw payload",
});
assert.match(text, /query: scaling laws/);
assert.match(text, /1\. Paper A/);
assert.match(text, /abstract: First line\. Second line\./);
assert.ok(!text.includes("\\n"));
assert.ok(!text.includes("raw"));
});
test("formatToolText collapses excess blank lines in plain strings", () => {
assert.equal(formatToolText("alpha\n\n\n\nbeta"), "alpha\n\nbeta");
});