Provider Behavior Manifest

Copy Markdown View Source

Behavior evidence for cursor_cli_sdk and the Cursor Agent CLI (agent).

SurfaceEvidence
CLI commandagent resolved through CliSubprocessCore.ProviderCLI or explicit cli_command
Headless stream commandagent -p --trust --output-format stream-json --stream-partial-output <prompt>
Prompt placementPositional final argv element; no --prompt flag
Workspace placementOptions.cwd maps to process cwd and --workspace <cwd>
Auth placementOptions.api_key materializes CURSOR_API_KEY in env; never argv
Governed authCliSubprocessCore.GovernedAuthority owns env and placement
Parser sourceCliSubprocessCore.ProviderProfiles.Cursor
Init eventCursor system/init projects to CursorCliSdk.Types.InitEvent
Assistant deltasPartial output projects to MessageEvent with delta?: true
Final snapshotCore profile tags final snapshots to avoid duplicate accumulated text
Tool eventsTool use and result project to typed SDK events
Result eventFinal status, stop reason, result text, usage, and duration project to ResultEvent
Error eventCLI/runtime errors project to ErrorEvent or %CursorCliSdk.Error{}
Fixture coveragetest/support/fixtures/simple_response.jsonl, tool_use_response.jsonl
Governed launchCursorCliSdk.GovernedLaunch rejects caller command, cwd, env, api key, and execution surface overrides
MCPCursorCliSdk.MCP wraps agent mcp ... commands
ModelsCursorCliSdk.Models wraps and parses agent models
SessionsCursorCliSdk.Session wraps list, resume, and continue helpers
Live gatemix test.live, examples/simple_stream.exs, examples/promotion_path/sdk_direct_cursor.exs

Flags Claimed By SDK Docs

FlagSource
-pCore Cursor profile invocation tests
--trustCore Cursor profile invocation tests
--output-format stream-jsonCore Cursor profile invocation tests
--stream-partial-outputCore Cursor profile invocation tests
--workspace <cwd>SDK/core invocation contract tests
--model <model>SDK ArgBuilder tests
--resume <session_id>SDK ArgBuilder and session tests
--mode <mode>SDK ArgBuilder tests
--forceCliSubprocessCore.ProviderFeatures.permission_args(:cursor, :bypass)
--approve-mcpsSDK ArgBuilder and MCP docs
--sandbox <value>SDK ArgBuilder tests
--worktree / --worktree <value>SDK ArgBuilder tests
--worktree-base <path>SDK ArgBuilder tests
--skip-worktree-setupSDK ArgBuilder tests
--plugin-dir <path>SDK ArgBuilder tests
-H <header>SDK ArgBuilder tests

Phase 3 Live Evidence

CommandResult
~/scripts/with_bash_secrets mix test.liveGreen
~/scripts/with_bash_secrets mix run examples/simple_stream.exsProduced CURSOR_SDK_EXAMPLE_OK
~/scripts/with_bash_secrets mix run examples/promotion_path/sdk_direct_cursor.exsProduced CURSOR_SDK_DIRECT_OK

Transcript: ~/p/g/n/trinity_framework/tmp/crucible_cleanup/transcripts/phase12_phase3_sdk_live_pre_asm.log