diff --git a/docs/cursor-cli-contract.md b/docs/cursor-cli-contract.md index ad199744a5..57d549ce49 100644 --- a/docs/cursor-cli-contract.md +++ b/docs/cursor-cli-contract.md @@ -2,6 +2,13 @@ Date: 2026-05-07 + + +**Update history:** 2026-07-08 — corrected the model-discovery and auth-status contract from FN-3396's assumed `--json` commands to the verified `cursor-agent models` / `cursor-agent status --format json` contract captured and implemented in FN-7697. + ## Research method - Local runtime inspection in the task environment (`which`, direct command execution). @@ -54,7 +61,8 @@ On Windows, `cursor-agent`, `cursor`, and manual override paths can resolve to ` The Windows shell-backed path applies to every Cursor CLI command Fusion currently runs through the shared runner: - Configured binary / `cursor-agent --version` / `cursor --version` probe attempts. -- Model discovery attempts against the effective probe-selected binary: `models --json`, `model list --json`, and `models`. +- Auth-status probe against the effective probe-selected binary: `cursor-agent status --format json`. +- Model discovery against the effective probe-selected binary: `cursor-agent models` (plain text, no `--json` flag). Non-Windows probes and discovery continue to use direct spawn. Spawn errors such as `ENOENT` or `EACCES` are included in the unavailable probe reason in bounded diagnostic form so a working terminal command is distinguishable from known Cursor runtime/auth states; Fusion does not dump PATH, environment variables, or unbounded stdout/stderr. @@ -75,29 +83,36 @@ Observed command behavior in this environment: ## Structured output and model discovery -- **No stable model-list command was conclusively confirmed in this preflight** due CLI gating by keychain lock and inability to complete bounded remote research in this run. -- No contract evidence yet for a guaranteed `--json` or dedicated model enumeration command. +- **Confirmed:** `cursor-agent models` is the model-list command. Output is plain text — passing an unsupported JSON output flag (e.g. appending `--json` to the `models` subcommand) fails with `error: unknown option '--json'`. +- Output shape: an `Available models` header line, a blank line, then one model per line formatted as ` -