ao-plugin-agent-cursor 0.1.0

Cursor agent plugin for the ao-rs orchestrator
Documentation

Cursor Agent CLI plugin.

Launches the Cursor background agent (agent) in permissionless mode inside a tmux session. Mirrors packages/plugins/agent-cursor/src/index.ts in the TypeScript agent-orchestrator.

Launch strategy

The TS reference embeds the full prompt in the launch command's positional argument (agent -- <prompt>). This Rust port uses post-launch delivery instead — same as the Claude Code plugin — where the orchestrator runs agent interactively, then sends the task via Runtime::send_message. This keeps the architecture consistent across agent plugins and avoids shell-escaping multi-kilobyte prompts in tmux commands.

Activity detection

Cursor doesn't write JSONL session logs like Claude Code. Detection uses:

  1. .cursor/chat.md file mtime — if recently modified, agent is active.
  2. Cursor log artifacts (if present) — .cursor/logs/* mtime.
  3. Workspace git activity — .git/index mtime (captures edits even without commits).
  4. Recent git commits in the workspace — if any within 60s, agent is active.
  5. Fallback: ActivityState::Ready (runtime liveness covers process exit).

System prompt

Cursor has no --append-system-prompt equivalent, so agent rules are delivered by prepending them to the user prompt (see [CursorAgent::system_prompt] and the CLI spawn flow).

Cost tracking

Cursor stores chat history in per-project SQLite databases under ~/.cursor/chats/<hash>/<uuid>/store.db and does not expose token / cost metadata via its CLI. cost_estimate is intentionally left at the trait default (None) — matching the TS reference, which also reports cost as unsupported.