@companion-ai/feynman 0.5.15 → 0.5.16
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/.feynman/agents/researcher.md +1 -2
- package/.feynman/agents/reviewer.md +1 -2
- package/.feynman/agents/verifier.md +1 -2
- package/.feynman/agents/writer.md +1 -2
- package/RELEASES.md +8 -0
- package/dist/bootstrap/home.js +8 -2
- package/dist/cli.js +13 -4
- package/dist/pi/packages.js +3 -0
- package/dist/pi/settings.js +11 -1
- package/metadata/commands.mjs +1 -0
- package/package.json +2 -2
- package/prompts/deepresearch.md +4 -4
- package/prompts/lit.md +1 -1
- package/prompts/summarize.md +1 -1
|
@@ -3,7 +3,6 @@ name: researcher
|
|
|
3
3
|
description: Gather primary evidence across papers, web sources, repos, docs, and local artifacts.
|
|
4
4
|
thinking: high
|
|
5
5
|
tools: read, write, edit, bash, grep, find, ls, web_search, fetch_content, get_search_content, feynman_science_database_search, hf_dataset_info, hf_repo_files, hf_repo_read_file
|
|
6
|
-
output: research.md
|
|
7
6
|
defaultProgress: true
|
|
8
7
|
async: true
|
|
9
8
|
---
|
|
@@ -94,7 +93,7 @@ Numbered list matching the evidence table:
|
|
|
94
93
|
- If you were assigned multiple questions, track them explicitly in the file and mark each as `done`, `blocked`, or `needs follow-up`. Do not silently skip questions.
|
|
95
94
|
|
|
96
95
|
## Output contract
|
|
97
|
-
- Save to the
|
|
96
|
+
- Save to the path the parent specifies, relative to the workspace. If none is given, return the complete artifact in your final response.
|
|
98
97
|
- Minimum viable output: evidence table with ≥5 numbered entries, findings with inline references, and a numbered Sources section.
|
|
99
98
|
- Include a short `Coverage Status` section listing what you checked directly, what remains uncertain, and any tasks you could not complete.
|
|
100
99
|
- Write to the file and pass a lightweight reference back — do not dump full content into the parent context.
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
name: reviewer
|
|
3
3
|
description: Run tough but constructive internal research critique of an AI research artifact.
|
|
4
4
|
thinking: high
|
|
5
|
-
output: review.md
|
|
6
5
|
defaultProgress: true
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -88,5 +87,5 @@ Reference the weakness/question IDs from Part 1 so annotations link back to the
|
|
|
88
87
|
- End with a `Sources` section containing direct URLs for anything additionally inspected during review.
|
|
89
88
|
|
|
90
89
|
## Output contract
|
|
91
|
-
- Save the
|
|
90
|
+
- Save to the path the parent specifies, relative to the workspace. If none is given, return the complete artifact in your final response.
|
|
92
91
|
- The review must contain both the structured review AND inline annotations.
|
|
@@ -3,7 +3,6 @@ name: verifier
|
|
|
3
3
|
description: Post-process a draft to add inline citations and verify every source URL.
|
|
4
4
|
thinking: medium
|
|
5
5
|
tools: read, bash, grep, find, ls, write, edit, web_search, fetch_content, get_search_content, feynman_science_database_search
|
|
6
|
-
output: cited.md
|
|
7
6
|
defaultProgress: true
|
|
8
7
|
async: true
|
|
9
8
|
---
|
|
@@ -57,6 +56,6 @@ Before saving the final document, scan for:
|
|
|
57
56
|
For each item, verify that it maps to a source URL, research note, raw artifact path, or script path. If not, remove it or replace it with a TODO. Add a short `Removed Unsupported Claims` section only when you remove material.
|
|
58
57
|
|
|
59
58
|
## Output contract
|
|
60
|
-
- Save to the
|
|
59
|
+
- Save to the path the parent specifies, relative to the workspace. If none is given, return the complete artifact in your final response.
|
|
61
60
|
- The output is the complete final document — same structure as the input draft, but with inline citations added throughout and a verified Sources section.
|
|
62
61
|
- Do not change the intended structure of the draft, but you may delete or soften unsupported factual claims when necessary to maintain integrity.
|
|
@@ -3,7 +3,6 @@ name: writer
|
|
|
3
3
|
description: Turn research notes into clear, structured briefs and drafts.
|
|
4
4
|
thinking: medium
|
|
5
5
|
tools: read, bash, grep, find, ls, write, edit
|
|
6
|
-
output: draft.md
|
|
7
6
|
defaultProgress: true
|
|
8
7
|
---
|
|
9
8
|
|
|
@@ -52,5 +51,5 @@ Unresolved issues, disagreements between sources, gaps in evidence.
|
|
|
52
51
|
- Before finishing, do a result-provenance sweep for numeric results, figures, charts, benchmarks, tables, and images.
|
|
53
52
|
|
|
54
53
|
## Output contract
|
|
55
|
-
- Save the
|
|
54
|
+
- Save to the path the parent specifies, relative to the workspace. If none is given, return the complete artifact in your final response.
|
|
56
55
|
- Focus on clarity, structure, and evidence traceability.
|
package/RELEASES.md
CHANGED
|
@@ -6,6 +6,14 @@ GitHub release notes are generated from the matching `## vX.Y.Z` section in this
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## v0.5.16 - 2026-09-30
|
|
10
|
+
|
|
11
|
+
- **Subagent research files land in the workspace.** When a workflow gave a subagent a relative output path such as `outputs/.drafts/<slug>-research-web.md`, pi-subagents saved it under `~/.feynman/sessions/subagent-artifacts/outputs/<run>/` instead, so the lead agent could not find the research notes, citations, or verification it asked for (about one in seven installs running research workflows hit this in the last week). Relative subagent outputs now resolve against the workspace, the researcher, reviewer, verifier, and writer no longer default to generic file names such as `research.md`, and `/deepresearch` and `/lit` name every subagent file under `outputs/.drafts/`. If you set `singleRunOutputBaseDir` in `~/.feynman/agent/extensions/subagent/config.json`, Feynman keeps your value.
|
|
12
|
+
- `feynman packages remove <preset>` (also `rm` and `uninstall`) removes an optional package such as `memory`.
|
|
13
|
+
- On Windows, Feynman no longer fails to start when another Feynman start is copying `keybindings.json` (`EBUSY: resource busy or locked`).
|
|
14
|
+
- pi-web-access 0.34.0: `fetch_content` falls back to your other fetch providers on Cloudflare "Just a moment..." pages, web tools start available on models such as DeepSeek without costing a prompt-cache miss, and its undici moves to 8.11.2.
|
|
15
|
+
- Security: three brace-expansion advisories published on 2026-09-29 affect the 5.0.9 that Pi 0.99.1's shrinkwrap locks, which Feynman cannot override. Pi uses it only for package filters and model patterns from your own settings and flags; the next Pi release that ships 5.0.12 replaces it. pi-subagents has still not released its undici fix.
|
|
16
|
+
|
|
9
17
|
## v0.5.15 - 2026-09-29
|
|
10
18
|
|
|
11
19
|
- **Pi 0.99.1, pinned.** Feynman accepted any Pi version, so npm installs picked up Pi 0.99.1 the day it was released, untested, and Pi 0.99 warns on every launch about how Feynman declared it. Feynman now runs on Pi 0.99.1, which adds MCP server support (`/mcp`), declared the way Pi asks, and pinned so new Pi releases arrive only after they pass Feynman's checks. If npm has `legacy-peer-deps` on, it skips Pi; `feynman` now says to reinstall with `--legacy-peer-deps=false` instead of failing on a missing package.
|
package/dist/bootstrap/home.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
|
-
import { copyFileSync, existsSync, readFileSync, renameSync, rmSync } from "node:fs";
|
|
2
|
+
import { constants, copyFileSync, existsSync, readFileSync, renameSync, rmSync } from "node:fs";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { getBootstrapStatePath } from "../config/paths.js";
|
|
5
5
|
const LEGACY_SYNCED_SCOPES = { themes: "themes", agents: "agents", skills: "skills" };
|
|
@@ -41,6 +41,12 @@ export function ensureFeynmanAgentDir(appRoot, home, agentDir) {
|
|
|
41
41
|
}
|
|
42
42
|
const keybindingsPath = resolve(agentDir, "keybindings.json");
|
|
43
43
|
if (!existsSync(keybindingsPath)) {
|
|
44
|
-
|
|
44
|
+
try {
|
|
45
|
+
copyFileSync(resolve(appRoot, ".feynman", "config", "keybindings.json"), keybindingsPath, constants.COPYFILE_EXCL);
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
// Another Feynman start may be writing it (Windows reports EBUSY). Pi
|
|
49
|
+
// uses its default keys without the file, and the next start copies it.
|
|
50
|
+
}
|
|
45
51
|
}
|
|
46
52
|
}
|
package/dist/cli.js
CHANGED
|
@@ -18,7 +18,7 @@ import { verifyAlphaAuthStatus } from "./alpha-auth-status.js";
|
|
|
18
18
|
import { ensureFeynmanAgentDir } from "./bootstrap/home.js";
|
|
19
19
|
import { ensureFeynmanHome, getDefaultSessionDir, getFeynmanAgentDir, getFeynmanHome } from "./config/paths.js";
|
|
20
20
|
import { getLastPiStderr, launchPiChat, runPi } from "./pi/launch.js";
|
|
21
|
-
import { installPiPackage, listOptionalPackagePresets, normalizeOptionalPackagePresetName, resolvePackageSource, updatePiPackages, } from "./pi/packages.js";
|
|
21
|
+
import { installPiPackage, removePiPackage, listOptionalPackagePresets, normalizeOptionalPackagePresetName, resolvePackageSource, updatePiPackages, } from "./pi/packages.js";
|
|
22
22
|
import { canonicalizeModelSpec, ensureFeynmanSettings, normalizeThinkingLevel, readJson, } from "./pi/settings.js";
|
|
23
23
|
import { BUNDLED_PI_PACKAGES, buildPiEnv } from "./pi/runtime.js";
|
|
24
24
|
import { getConfiguredServiceTier, normalizeServiceTier, setConfiguredServiceTier } from "./model/service-tier.js";
|
|
@@ -267,18 +267,27 @@ async function handlePackagesCommand(subcommand, args, piOptions) {
|
|
|
267
267
|
printInfo(`Install with: feynman packages install <${optionalPresets.map((preset) => preset.name).join("|")}>`);
|
|
268
268
|
return;
|
|
269
269
|
}
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
const remove = subcommand === "remove" || subcommand === "rm" || subcommand === "uninstall";
|
|
271
|
+
if (subcommand !== "install" && !remove) {
|
|
272
|
+
throw new Error(`Unknown packages command: ${subcommand}\nUse: feynman packages list, install <preset>, or remove <preset>.`);
|
|
272
273
|
}
|
|
273
274
|
const target = args[0];
|
|
274
275
|
if (!target) {
|
|
275
|
-
throw new Error(`Usage: feynman packages install <${listOptionalPackagePresets().map((preset) => preset.name).join("|")}>`);
|
|
276
|
+
throw new Error(`Usage: feynman packages ${remove ? "remove" : "install"} <${listOptionalPackagePresets().map((preset) => preset.name).join("|")}>`);
|
|
276
277
|
}
|
|
277
278
|
const presetName = normalizeOptionalPackagePresetName(target);
|
|
278
279
|
if (!presetName) {
|
|
279
280
|
throw new Error(`Unknown package preset: ${target}`);
|
|
280
281
|
}
|
|
281
282
|
const source = resolvePackageSource(presetName);
|
|
283
|
+
if (remove) {
|
|
284
|
+
if (!configuredSources.has(source)) {
|
|
285
|
+
console.log(`${source} is not installed`);
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
process.exitCode = await removePiPackage(piOptions, source);
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
282
291
|
if (configuredSources.has(source)) {
|
|
283
292
|
console.log(`${source} already installed`);
|
|
284
293
|
return;
|
package/dist/pi/packages.js
CHANGED
|
@@ -27,6 +27,9 @@ export function resolvePackageSource(name) {
|
|
|
27
27
|
export async function installPiPackage(options, source) {
|
|
28
28
|
return runPi(options, ["install", source], buildPiEnv(options));
|
|
29
29
|
}
|
|
30
|
+
export async function removePiPackage(options, source) {
|
|
31
|
+
return runPi(options, ["remove", source], buildPiEnv(options));
|
|
32
|
+
}
|
|
30
33
|
export async function updatePiPackages(options, source) {
|
|
31
34
|
return runPi(options, source ? ["update", source] : ["update", "--extensions"], buildPiEnv(options));
|
|
32
35
|
}
|
package/dist/pi/settings.js
CHANGED
|
@@ -95,7 +95,13 @@ function prepareSubagentDefaults(settingsPath) {
|
|
|
95
95
|
throw new Error(`Invalid subagent config at ${path}: ${key} must be a boolean. The file was not changed.`);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
if (
|
|
98
|
+
if (config.singleRunOutputBaseDir !== undefined && typeof config.singleRunOutputBaseDir !== "string") {
|
|
99
|
+
throw new Error(`Invalid subagent config at ${path}: singleRunOutputBaseDir must be a string. The file was not changed.`);
|
|
100
|
+
}
|
|
101
|
+
if (missions.enabled !== undefined &&
|
|
102
|
+
config.fleetView !== undefined &&
|
|
103
|
+
config.asyncByDefault !== undefined &&
|
|
104
|
+
config.singleRunOutputBaseDir !== undefined) {
|
|
99
105
|
return undefined;
|
|
100
106
|
}
|
|
101
107
|
const next = {
|
|
@@ -103,6 +109,10 @@ function prepareSubagentDefaults(settingsPath) {
|
|
|
103
109
|
missions: { ...missions, enabled: missions.enabled ?? false },
|
|
104
110
|
fleetView: config.fleetView ?? false,
|
|
105
111
|
asyncByDefault: config.asyncByDefault ?? true,
|
|
112
|
+
// pi-subagents otherwise saves a relative `output` such as
|
|
113
|
+
// outputs/.drafts/x.md under the session's subagent-artifacts folder, where
|
|
114
|
+
// the lead agent never looks. "." resolves against Pi's cwd, the workspace.
|
|
115
|
+
singleRunOutputBaseDir: config.singleRunOutputBaseDir ?? ".",
|
|
106
116
|
};
|
|
107
117
|
return { path, original: existing?.source, content: `${JSON.stringify(next, null, 2)}\n` };
|
|
108
118
|
}
|
package/metadata/commands.mjs
CHANGED
|
@@ -137,6 +137,7 @@ export const cliCommandSections = [
|
|
|
137
137
|
commands: [
|
|
138
138
|
{ usage: "feynman packages list", description: "Show core and optional Pi package presets." },
|
|
139
139
|
{ usage: "feynman packages install <preset>", description: "Install optional package presets on demand." },
|
|
140
|
+
{ usage: "feynman packages remove <preset>", description: "Remove an installed optional package preset." },
|
|
140
141
|
{ usage: "feynman search status", description: "Show Pi web-access status and config path." },
|
|
141
142
|
{ usage: "feynman search set <provider> [api-key]", description: "Set the web search provider and optionally save its API key." },
|
|
142
143
|
{ usage: "feynman search clear", description: "Reset web search provider to auto while preserving API keys." },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@companion-ai/feynman",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.16",
|
|
4
4
|
"description": "Research-first CLI agent built on Pi and alphaXiv",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"pi-btw": "0.6.1",
|
|
84
84
|
"pi-docparser": "4.0.0",
|
|
85
85
|
"pi-subagents": "0.73.1",
|
|
86
|
-
"pi-web-access": "0.
|
|
86
|
+
"pi-web-access": "0.34.0",
|
|
87
87
|
"posthog-node": "^5.53.0",
|
|
88
88
|
"undici": "^8.11.2"
|
|
89
89
|
},
|
package/prompts/deepresearch.md
CHANGED
|
@@ -76,13 +76,13 @@ Example shape:
|
|
|
76
76
|
|
|
77
77
|
```json
|
|
78
78
|
{
|
|
79
|
-
"workflowScript": "return await runs.all([{key:'web',agent:'researcher',task:'Read outputs/.plans/<slug>-T1.md and write
|
|
79
|
+
"workflowScript": "return await runs.all([{key:'web',agent:'researcher',task:'Read outputs/.plans/<slug>-T1.md and write outputs/.drafts/<slug>-research-web.md.',output:'outputs/.drafts/<slug>-research-web.md'},{key:'papers',agent:'researcher',task:'Read outputs/.plans/<slug>-T2.md and write outputs/.drafts/<slug>-research-papers.md.',output:'outputs/.drafts/<slug>-research-papers.md'}]);",
|
|
80
80
|
"async": true,
|
|
81
81
|
"globalConcurrencyLimit": 4
|
|
82
82
|
}
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
Continue independent work after launch, then consume completion results before synthesis.
|
|
85
|
+
Continue independent work after launch, then consume completion results before synthesis. Relative output paths resolve against the workspace, so each child writes its declared path; verify each file on disk, and use the returned output reference for any that is missing. After evidence gathering, update the plan ledger and verification log. If research failed, record exactly what failed and proceed with a blocked or partial draft.
|
|
86
86
|
|
|
87
87
|
## Step 4: Draft
|
|
88
88
|
|
|
@@ -123,7 +123,7 @@ Use this shape:
|
|
|
123
123
|
}
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
Wait for the verifier's completion result before review, not merely the async launch receipt. Verify on disk that `outputs/.drafts/<slug>-cited.md` exists. If
|
|
126
|
+
Wait for the verifier's completion result before review, not merely the async launch receipt. Verify on disk that `outputs/.drafts/<slug>-cited.md` exists. If it is missing, use the returned output reference to find the cited file and copy it there.
|
|
127
127
|
|
|
128
128
|
## Step 6: Review
|
|
129
129
|
|
|
@@ -142,7 +142,7 @@ Use this shape:
|
|
|
142
142
|
"agent": "reviewer",
|
|
143
143
|
"async": true,
|
|
144
144
|
"task": "Verify outputs/.drafts/<slug>-cited.md. Flag unsupported claims, logical gaps, single-source critical claims, and overstated confidence. This is a verification pass, not a peer review.",
|
|
145
|
-
"output": "
|
|
145
|
+
"output": "outputs/.drafts/<slug>-verification.md"
|
|
146
146
|
}
|
|
147
147
|
```
|
|
148
148
|
|
package/prompts/lit.md
CHANGED
|
@@ -12,7 +12,7 @@ Derive a short slug from the topic (lowercase, hyphens, no filler words, ≤5 wo
|
|
|
12
12
|
|
|
13
13
|
1. **Plan** — Outline the scope: key questions, source types to search (papers, web, repos), time period, expected sections, and a small task ledger plus verification log. When the input appears to name a lab, PI, author, institution lab page, or author profile, run the review as a publication-corpus review: find the lab/author identity first, collect the reachable publication list, then map the research trajectory across that corpus. Write the plan to `outputs/.plans/<slug>.md`. Briefly summarize the plan to the user and continue immediately in the same turn with the next tool call; never end a turn with a message that only announces what you will do next. Do not ask for confirmation or wait for a proceed response unless the user explicitly requested plan review.
|
|
14
14
|
- When updating the plan ledger later, keep edits small and valid. If an `edit` tool call fails with a JSON parse error or the replacement would require embedding a large markdown block, rewrite the full corrected plan file with the file-writing tool instead, then continue to final artifact/provenance verification.
|
|
15
|
-
2. **Gather** — Use the `researcher` subagent when the sweep is wide enough to benefit from delegated paper triage before synthesis. For narrow topics, search directly. Researcher outputs go to
|
|
15
|
+
2. **Gather** — Use the `researcher` subagent when the sweep is wide enough to benefit from delegated paper triage before synthesis. For narrow topics, search directly. Researcher outputs go to `outputs/.drafts/<slug>-research-*.md`; pass that path as each researcher's `output`. For publication-corpus reviews, the lead agent owns identity resolution and writes `notes/<slug>-publications.md` with reachable titles, years, venues, URLs/DOIs, and gaps before delegating trajectory synthesis. Prefer lab publication pages, author profiles, arXiv/OpenReview/Semantic Scholar pages, and paper search results that expose stable source URLs. Do not silently skip assigned questions; mark them `done`, `blocked`, or `superseded`.
|
|
16
16
|
3. **Synthesize** — Separate consensus, disagreements, and open questions. For publication-corpus reviews, also identify 3-5 research trajectories and the 3-5 papers that most changed the corpus direction; rank them by contrastive originality, methodology strength, and relationship to prior art rather than by author prestige alone. When useful, propose concrete next experiments or follow-up reading. Use Mermaid diagrams for taxonomies, method pipelines, or lab trajectory maps when the structure is source-supported and changes the reader's research decision. Keep the output to research evidence, source coverage, and next research decisions; do not create non-research operational artifacts from a literature review run.
|
|
17
17
|
4. **Cite** — Spawn the `verifier` agent to add inline citations and verify every source URL in the draft.
|
|
18
18
|
5. **Verify** — Spawn the `reviewer` agent to check the cited draft for unsupported claims, logical gaps, zombie sections, and single-source critical findings. Fix FATAL issues before delivering. Note MAJOR issues in Open Questions. If FATAL issues were found, run one more verification pass after the fixes.
|
package/prompts/summarize.md
CHANGED
|
@@ -126,7 +126,7 @@ Use one async workflow with a stable key for each chunk and a concurrency limit
|
|
|
126
126
|
}
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
Consume completion results before aggregation. `runs.all` returns an ordered array including ordinary child failures; inspect each `ok` and error. A validation or infrastructure failure can still fail the workflow.
|
|
129
|
+
Consume completion results before aggregation. `runs.all` returns an ordered array including ordinary child failures; inspect each `ok` and error. A validation or infrastructure failure can still fail the workflow. Relative output paths resolve against the workspace; verify each chunk summary on disk, and use the returned output reference for any that is missing. Record missing or failed chunks rather than treating an async launch receipt as a finished summary.
|
|
130
130
|
|
|
131
131
|
### 3d. Aggregate
|
|
132
132
|
|