feat(FN-4223): complete Step 4 — disambiguate research copy across surfaces

Fusion-Task-Id: FN-4223
Fusion-Task-Lineage: bc114ff2-ee0f-4e96-b1d2-6ba3112a48e4
This commit is contained in:
Fusion
2026-05-13 05:04:48 -07:00
committed by gsxdsm
parent 450a1a17b5
commit e34316dcd9
4 changed files with 18 additions and 18 deletions

View File

@@ -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.`);