feat(FN-2999): harden research lifecycle with idempotent cancel/retry, SSE
Merges FN-2999 research hardening (idempotent cancel/retry routes, aligned SSE event wiring, and cleaned status handling in the core research store and orchestrator) plus UI improvements to AgentDetailView header actions and planning disclosure UX in the modal, with a CSS token fallback fix in Scrip Fusion-Task-Id: FN-2999
This commit is contained in:
@@ -65,15 +65,17 @@ fn research retry RR-001 --json
|
||||
| Subcommand | Description |
|
||||
|---|---|
|
||||
| `fn research create --query <text> [--wait] [--max-wait-ms <ms>] [--json]` | Create a run and optionally wait for completion. |
|
||||
| `fn research list \| ls [--status <status>] [--limit <n>] [--json]` | List recent runs (statuses: `pending`, `running`, `completed`, `failed`, `cancelled`). |
|
||||
| `fn research list \| ls [--status <status>] [--limit <n>] [--json]` | List recent runs (statuses: `queued`, `running`, `cancelling`, `retry_waiting`, `completed`, `failed`, `cancelled`, `timed_out`, `retry_exhausted`). |
|
||||
| `fn research show <run-id> [--json]` | Show one run with timestamps, summary, and error details. |
|
||||
| `fn research export <run-id> [--format <json\|markdown\|pdf>] [--output <path>] [--json]` | Export run results and persist an export record. |
|
||||
| `fn research cancel <run-id> [--json]` | Request cancellation for an active run. |
|
||||
| `fn research retry <run-id> [--json]` | Create a new retry run from a failed/cancelled run. |
|
||||
|
||||
Disabled/setup behavior mirrors dashboard and agent surfaces:
|
||||
- Feature disabled → `feature-disabled` error (enable research in settings)
|
||||
- Provider unconfigured → `provider-unavailable` error (configure credentials/provider)
|
||||
- Feature disabled → `FEATURE_DISABLED` (enable project/global research settings)
|
||||
- Missing credentials → `MISSING_CREDENTIALS` (configure provider auth)
|
||||
- Provider unavailable or cooldown/rate limit → `PROVIDER_UNAVAILABLE` / `RATE_LIMITED` with retry metadata
|
||||
- Non-retryable failures and invalid state transitions are surfaced as structured errors instead of generic failures
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -266,6 +266,8 @@ This applies to:
|
||||
The standalone Research route is feature-gated separately via `experimentalFeatures.researchView`.
|
||||
When that flag is disabled, the Settings modal also hides both Research sections (`Research Defaults` and project `Research`) and falls back to the first visible section if a hidden research section is requested directly.
|
||||
|
||||
Research failures are normalized to a shared error-code contract (`FEATURE_DISABLED`, `MISSING_CREDENTIALS`, `PROVIDER_UNAVAILABLE`, `RATE_LIMITED`, `PROVIDER_TIMEOUT`, `RUN_CANCELLED`, `RETRY_EXHAUSTED`, `INVALID_TRANSITION`, `NON_RETRYABLE_PROVIDER_ERROR`, `INTERNAL_ERROR`) with retryability metadata so dashboard, API, CLI, and agent tooling show consistent recovery guidance.
|
||||
|
||||
**Credential storage rule:** API keys for Research providers are not stored in settings JSON. They are managed through the existing auth storage pipeline (`/api/auth/status`, `POST /api/auth/api-key`, `DELETE /api/auth/api-key`) and persisted in auth credential storage with masked hints in API responses.
|
||||
|
||||
### Node Routing settings (project scope)
|
||||
|
||||
Reference in New Issue
Block a user