diff --git a/packages/cli/src/bin.ts b/packages/cli/src/bin.ts index c5b2d4ecf..4b772ef04 100644 --- a/packages/cli/src/bin.ts +++ b/packages/cli/src/bin.ts @@ -287,16 +287,16 @@ Usage: Create a GitHub PR for an in-review task fn task import [opts] Import GitHub issues as tasks fn research create --query [--wait] [--max-wait-ms ] [--json] - Create and optionally wait for a research run + Create and optionally wait for a cited-research run (search/fetch/synthesis) fn research list | ls [--status ] [--limit ] [--json] - List research runs - fn research show [--json] Show research run details + List cited-research runs + fn research show [--json] Show cited-research run details fn research export [--format ] [--output ] [--json] - Export research run results + Export cited-research run results fn research cancel [--json] - Cancel an active research run + Cancel an active cited-research run fn research retry [--json] - Retry a failed/cancelled research run + Retry a failed/cancelled cited-research run fn mission create [title] [desc] Create a new mission fn mission list | ls List missions fn mission show | info Show mission details diff --git a/packages/cli/src/commands/research.ts b/packages/cli/src/commands/research.ts index 61ff05f73..d5c2d2ea7 100644 --- a/packages/cli/src/commands/research.ts +++ b/packages/cli/src/commands/research.ts @@ -127,7 +127,7 @@ export async function runResearchCreate(options: ResearchCreateOptions): Promise if (options.json) { jsonOut(run); } else { - console.log(`Created research run ${runId}.`); + console.log(`Created cited-research run ${runId}.`); if (run) printRun(run); } return; @@ -179,7 +179,7 @@ export async function runResearchList(options: ResearchListOptions = {}): Promis } if (!runs.length) { - console.log("No research runs found."); + console.log("No cited-research runs found."); return; } @@ -195,7 +195,7 @@ export async function runResearchShow(runId: string, options: ResearchCommandOpt try { const store = await getStore(options.projectName); const run = store.getResearchStore().getRun(runId); - if (!run) throw new Error(`Research run not found: ${runId}`); + if (!run) throw new Error(`Cited-research run not found: ${runId}`); if (options.json) { jsonOut(run); @@ -218,7 +218,7 @@ export async function runResearchExport(options: ResearchExportOptions): Promise try { const store = await getStore(options.projectName); const run = store.getResearchStore().getRun(options.runId); - if (!run) throw new Error(`Research run not found: ${options.runId}`); + if (!run) throw new Error(`Cited-research run not found: ${options.runId}`); const format = (options.format ?? "markdown") as ResearchExportFormat; if (!RESEARCH_EXPORT_FORMATS.includes(format)) { @@ -249,7 +249,7 @@ export async function runResearchCancel(runId: string, options: ResearchCommandO try { const store = await getStore(options.projectName); const run = store.getResearchStore().getRun(runId); - if (!run) throw new Error(`Research run not found: ${runId}`); + if (!run) throw new Error(`Cited-research run not found: ${runId}`); if (!["queued", "running", "cancelling", "retry_waiting"].includes(run.status)) { throw new Error(`invalid-transition: Run ${runId} cannot be cancelled from status ${run.status}.`); @@ -274,7 +274,7 @@ export async function runResearchRetry(runId: string, options: ResearchCommandOp try { const store = await getStore(options.projectName); const existing = store.getResearchStore().getRun(runId); - if (!existing) throw new Error(`Research run not found: ${runId}`); + if (!existing) throw new Error(`Cited-research run not found: ${runId}`); if (existing.status === "retry_exhausted" || existing.lifecycle?.errorCode === "RETRY_EXHAUSTED") { throw new Error(`retry-exhausted: Run ${runId} has exhausted retry attempts.`); diff --git a/packages/cli/src/extension.ts b/packages/cli/src/extension.ts index 32703ad64..3c5eb3b8e 100644 --- a/packages/cli/src/extension.ts +++ b/packages/cli/src/extension.ts @@ -1474,7 +1474,7 @@ export default function kbExtension(pi: ExtensionAPI) { pi.registerTool({ name: "fn_research_run", label: "fn: Run Research", - description: "Start a bounded research run and optionally wait for findings.", + description: "Cited-research pipeline: create a bounded search/fetch/synthesis run (not an autonomous experiment loop) and optionally wait for completion.", parameters: Type.Object({ query: Type.String({ description: "Research query or question" }), wait_for_completion: Type.Optional(Type.Boolean({ description: "Wait for the run to complete before returning (default: false)" })), @@ -1538,7 +1538,7 @@ export default function kbExtension(pi: ExtensionAPI) { pi.registerTool({ name: "fn_research_list", label: "fn: List Research Runs", - description: "List recent research runs.", + description: "Cited-research pipeline: list recent search/fetch/synthesis runs (not experiment-loop sessions)." parameters: Type.Object({ status: Type.Optional(StringEnum([...RESEARCH_RUN_STATUSES], { description: "Filter by run status" }) as unknown as TSchema), limit: Type.Optional(Type.Number({ description: "Max runs to return (default: 10)" })), @@ -1562,7 +1562,7 @@ export default function kbExtension(pi: ExtensionAPI) { pi.registerTool({ name: "fn_research_get", label: "fn: Get Research Run", - description: "Get one research run and structured findings.", + description: "Cited-research pipeline: get one run with structured findings and citations (not experiment-loop state)." parameters: Type.Object({ id: Type.String({ description: "Research run ID" }) }), async execute(_toolCallId, params, _signal, _onUpdate, ctx) { const store = await getStore(ctx.cwd); @@ -1604,7 +1604,7 @@ export default function kbExtension(pi: ExtensionAPI) { pi.registerTool({ name: "fn_research_cancel", label: "fn: Cancel Research Run", - description: "Cancel an in-flight research run. Terminal runs return INVALID_TRANSITION.", + description: "Cited-research pipeline: cancel an in-flight run; terminal runs return INVALID_TRANSITION (does not control experiment loops)." parameters: Type.Object({ id: Type.String({ description: "Research run ID" }) }), async execute(_toolCallId, params, _signal, _onUpdate, ctx) { const store = await getStore(ctx.cwd); @@ -1666,7 +1666,7 @@ export default function kbExtension(pi: ExtensionAPI) { pi.registerTool({ name: "fn_research_retry", label: "fn: Retry Research Run", - description: "Retry a failed research run when lifecycle marks it retryable.", + description: "Cited-research pipeline: retry a failed run when lifecycle marks it retryable (not an autonomous experiment loop retry)." parameters: Type.Object({ id: Type.String({ description: "Research run ID" }) }), async execute(_toolCallId, params, _signal, _onUpdate, ctx) { const store = await getStore(ctx.cwd); diff --git a/packages/dashboard/app/components/ResearchView.tsx b/packages/dashboard/app/components/ResearchView.tsx index 8d8655f3a..82a8f7a60 100644 --- a/packages/dashboard/app/components/ResearchView.tsx +++ b/packages/dashboard/app/components/ResearchView.tsx @@ -225,7 +225,7 @@ export function ResearchView({ projectId, addToast, onOpenSettings, readinessVer

Research

-

Create and track research runs with cited findings.

+

Cited search and synthesis runs: gather sources, fetch content, and synthesize findings.