The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
Merge remote-tracking branch 'origin/main' into claude/gallant-curie-cqv4rr-m-cursor
Claudec890d2663148
diff --cc cli/beacon/internal/handoff/resume_test.goindex d62e5474,39c4d7f7..aa2d3673--- a/cli/beacon/internal/handoff/resume_test.go+++ b/cli/beacon/internal/handoff/resume_test.go@@@ -24,7 -24,8 +24,8 @@@ func installed(names ...string) func(st}}- var allRuntimes = installed("claude", "codex", "opencode", "cline", "pi", "prime-agent", "omp", "gemini", "qwen", "kiro-cli", "agy", "devin", "muse", "openhands", "goose", "cursor-agent")+ var allRuntimes = installed("claude", "codex", "opencode", "cline", "pi", "prime-agent", "droid",- "omp", "gemini", "qwen", "kiro-cli", "agy", "devin", "muse", "openhands", "goose")++ "omp", "gemini", "qwen", "kiro-cli", "agy", "devin", "muse", "openhands", "goose", "cursor-agent")// resumableSession is a session whose directory and session file both exist.func resumableSession(t *testing.T, harness, id string) Session {@@@ -80,7 -82,7 +82,8 @@@ func TestPlanResumeStartsANewSessionInE{HarnessCline, "cline", []string{"--tui", "--auto-approve", "false"}},{HarnessPi, "pi", []string{"--"}},{HarnessPrime, "prime-agent", []string{"--"}},+ {HarnessFactory, "droid", nil},+ {HarnessCursor, "cursor-agent", nil},{HarnessOhMyPi, "omp", []string{"--approval-mode=always-ask"}},{HarnessGemini, "gemini", []string{"--approval-mode", "default", "--prompt-interactive"}},{HarnessQwen, "qwen", []string{"--approval-mode", "default", "--prompt-interactive"}},diff --cc cli/beacon/internal/handoff/runtimes.goindex c648323c,8a699d9f..8651a904--- a/cli/beacon/internal/handoff/runtimes.go+++ b/cli/beacon/internal/handoff/runtimes.go@@@ -7,7 -7,7 +7,8 @@@ import"github.com/asymptote-labs/agent-beacon/cli/beacon/internal/claudesession""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/clinesession""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/codexsession"+ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/cursorsession"+ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/factorysession""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/opencodesession""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/pisession""github.com/asymptote-labs/agent-beacon/cli/beacon/internal/primesession"@@@ -57,7 -54,7 +58,8 @@@ constHarnessCline = clinesession.HarnessHarnessPi = pisession.HarnessHarnessPrime = primesession.Harness+ HarnessFactory = factorysession.Harness+ HarnessCursor = cursorsession.Harness// Runtimes Beacon starts but whose sessions it reads only from the runtime log.HarnessOhMyPi = "omp"@@@ -165,26 -162,21 +167,41 @@@ var runtimes = []RuntimeNewSession: func(prompt string) []string { return []string{"--", prompt} },},},+ {+ Harness: HarnessFactory,+ Label: "Factory Droid",+ Aliases: []string{"droid", "factory-droid"},+ NewSource: func(dir string) Source { return &factorySource{dir: dir} },+ // Droid's interactive mode asks before it acts. Beacon never passes --auto, so a session it+ // starts keeps asking.+ Command: &runtimeCommand{+ Executable: "droid",+ Resume: func(s Session) ([]string, bool) { return []string{"--resume", s.ID}, true },+ // The prompt is droid's positional argument. It starts with a word that is neither an+ // option nor one of droid's subcommands, so it is read as the prompt.+ NewSession: func(prompt string) []string { return []string{prompt} },+ },+ },+ {+ Harness: HarnessCursor,+ Label: "Cursor",+ NewSource: func(dir string) Source { return &cursorSource{dir: dir} },+ // cursor-agent asks before running commands unless given --force; Beacon never passes it.+ Command: &runtimeCommand{+ Executable: "cursor-agent",+ Resume: func(s Session) ([]string, bool) {+ // --resume takes a CLI chat id. IDE conversations and subagent transcripts are not+ // chats the CLI can load.+ if !cursorCLIChat(s) {+ return nil, false+ }+ return []string{"--resume", s.ID}, true+ },+ NewSession: func(prompt string) []string { return []string{prompt} },+ // cursor-agent looks a chat id up under a hash of the directory it is started in.+ ResumesInSessionDir: true,+ },+ },// The runtimes below keep no session store Beacon reads. Their sessions come from Beacon's// runtime log, so they always continue from a brief; each can also be the runtime anotherdiff --cc docs/cli/handoff.mdxindex 9e232417,10295583..ad100277--- a/docs/cli/handoff.mdx+++ b/docs/cli/handoff.mdx@@@ -25,11 -25,11 +25,12 @@@ Sessions come from each runtime's own l| Cline | `~/.cline/data` | `cline` || Pi | `~/.pi/agent/sessions` (or under `PI_CODING_AGENT_DIR`) | `pi` || Prime Agent | `~/.prime/agent`, both `sessions` and `session-artifacts` (or `PRIME_AGENT_CODING_AGENT_DIR`) | `prime` |+ | Factory Droid | `~/.factory/sessions` | `droid` |+| Cursor | `~/.cursor/projects` (agent transcripts) and Cursor's global storage `state.vscdb` (Composer conversations) | `cursor` |-When a Codex thread has more than one rollout file, `beacon handoff` lists it once, under its newest file. Cline can hold the same task both as a CLI session and in its older task history; the CLI session is the copy that is listed. Cline kanban cards are not sessions and are not listed. Prime Agent subagent transcripts, under `session-artifacts`, are listed as subagents of the session that started them.+When a Codex thread has more than one rollout file, `beacon handoff` lists it once, under its newest file. Cline can hold the same task both as a CLI session and in its older task history; the CLI session is the copy that is listed. Cline kanban cards are not sessions and are not listed. Prime Agent subagent transcripts, under `session-artifacts`, are listed as subagents of the session that started them. A Cursor conversation can be stored both as a transcript and as a Composer record under one id; it is listed once, as the transcript when `cursor-agent` can reopen it and as the Composer record otherwise. Cursor subagent transcripts are listed as subagents of the conversation that started them.- `--store-dir <runtime>=<path>` takes the location in the table: for Pi its sessions directory, as `beacon endpoint pi sync --sessions-dir` does, for Prime Agent the agent directory holding both of its roots, and for Cursor the projects directory, as `beacon endpoint cursor sync --projects-dir` does. Cursor's global storage database is always read from its default location.-`--store-dir <runtime>=<path>` takes the location in the table: for Pi its sessions directory, as `beacon endpoint pi sync --sessions-dir` does, and for Prime Agent the agent directory holding both of its roots. For Factory Droid it is the sessions directory, as `beacon endpoint factory sync --sessions-dir` does.++`--store-dir <runtime>=<path>` takes the location in the table: for Pi its sessions directory, as `beacon endpoint pi sync --sessions-dir` does, and for Prime Agent the agent directory holding both of its roots. For Factory Droid it is the sessions directory, as `beacon endpoint factory sync --sessions-dir` does. For Cursor it is the projects directory, as `beacon endpoint cursor sync --projects-dir` does. Cursor's global storage database is always read from its default location.### Runtimes Beacon starts but does not read@@@ -62,7 -62,7 +63,7 @@@ beacon handoff list --jso| Flag | Description ||------|-------------|- | `--harness` | Only this runtime: `claude`, `codex`, `opencode`, `cline`, `pi`, `prime` or `cursor`. |-| `--harness` | Only this runtime: `claude`, `codex`, `opencode`, or `cline`. |++| `--harness` | Only this runtime: `claude`, `codex`, `opencode`, `cline`, `pi`, `prime`, `droid` or `cursor`. || `--here` | Only sessions that ran in the current directory or below it. || `--dir` | Only sessions that ran in this directory or below it. || `--subagents` | Include subagent sessions. They are hidden by default, because resuming one resumes a fragment of its parent's task. |@@@ -129,7 -129,7 +130,8 @@@ There are two ways to resume| Cline | `cline --tui --auto-approve false --id <id>` || Pi | `pi --session <session file>` || Prime Agent | `prime-agent --resume <session file>` |+ | Factory Droid | `droid --resume <id>` |+ | Cursor | `cursor-agent --resume <chat id>` (chats `cursor-agent` started only) |- **Start a new session from a brief.** Otherwise, or with `--agent` naming another runtime or with `--new`, Beacon writes a brief (see `export`) and starts a new session. The first message of that session points at the brief:@@@ -141,7 -141,7 +143,8 @@@| Cline | `cline --tui --auto-approve false "<prompt>"` || Pi | `pi -- "<prompt>"` || Prime Agent | `prime-agent -- "<prompt>"` |+ | Factory Droid | `droid "<prompt>"` |+ | Cursor | `cursor-agent "<prompt>"` || Oh My Pi | `omp --approval-mode=always-ask "<prompt>"` || Gemini CLI | `gemini --approval-mode default --prompt-interactive "<prompt>"` || Qwen Code | `qwen --approval-mode default --prompt-interactive "<prompt>"` |@@@ -197,7 -195,7 +200,7 @@@ The link event keeps the new session'sTwo paths record the link:- **Live hooks and plugins.** Every runtime whose prompts Beacon captures as they are sent records it: the shared prompt hook (Claude Code, Cursor, Factory Droid, Qwen Code, Kiro, Kimi Code, Devin, Muse Code, OpenHands, Grok Build, DeepSeek Harness, Hermes Agent, VS Code), Antigravity (including the prompt it recovers from its transcript when the prompt hook does not fire), the Cline, OpenCode and OpenClaw plugins, and the Pi, Oh My Pi, Prime Agent and Senpi extensions (`harness.collection_method` `hook` or `plugin`).- - **Session-store sync.** `beacon endpoint claude sync`, `codex sync`, `opencode sync`, `cline sync`, `pi sync`, `prime sync` and `cursor sync` record it when they read the prompt back from the runtime's store (`harness.collection_method: poll`).-- **Session-store sync.** `beacon endpoint claude sync`, `codex sync`, `opencode sync`, `cline sync`, `pi sync`, `prime sync` and `factory sync` record it when they read the prompt back from the runtime's store (`harness.collection_method: poll`).++- **Session-store sync.** `beacon endpoint claude sync`, `codex sync`, `opencode sync`, `cline sync`, `pi sync`, `prime sync`, `factory sync` and `cursor sync` record it when they read the prompt back from the runtime's store (`harness.collection_method: poll`).Codex CLI prompts reach Beacon over OTLP and through `beacon endpoint codex sync`, not a prompt hook, so a session continued in Codex is linked by the sync. For a runtime that also has a prompt hook or plugin, a sync can record the same link the hook already did; the two carry different `collection_method` values, as every other event those runtimes report through both paths does. A sync's link has a deterministic `event.id`, so syncing again never duplicates it.