Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

Merge remote-tracking branch 'origin/main' into claude/gallant-curie-cqv4rr-l-openclaw

Claude9a99b0deaae8
diff --cc cli/beacon/internal/handoff/fixtures_test.go
index cff12a0f,25a5ccc1..ba0eb356
--- a/cli/beacon/internal/handoff/fixtures_test.go
+++ b/cli/beacon/internal/handoff/fixtures_test.go
@@@ -24,7 -24,7 +24,7 @@@ var
// runtime the fixture leaves at its default reads only the test's HOME.
func isolateRuntimeEnv(t *testing.T) {
t.Helper()
- for _, name := range []string{"PI_CODING_AGENT_DIR", "PRIME_AGENT_CODING_AGENT_DIR", "OPENCLAW_STATE_DIR"} {
- for _, name := range []string{"PI_CODING_AGENT_DIR", "PRIME_AGENT_CODING_AGENT_DIR", "DSH_HOME"} {
++ for _, name := range []string{"PI_CODING_AGENT_DIR", "PRIME_AGENT_CODING_AGENT_DIR", "DSH_HOME", "OPENCLAW_STATE_DIR"} {
t.Setenv(name, "")
}
}
diff --cc cli/beacon/internal/handoff/runtimes.go
index 1d933fea,b7d3daf3..711fc198
--- a/cli/beacon/internal/handoff/runtimes.go
+++ b/cli/beacon/internal/handoff/runtimes.go
@@@ -8,8 -8,8 +8,9 @@@ import
"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/copilotsession"
+ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/dshsession"
"github.com/asymptote-labs/agent-beacon/cli/beacon/internal/factorysession"
+ "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/openclawsession"
"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"
@@@ -58,7 -58,7 +59,8 @@@ const
HarnessPrime = primesession.Harness
HarnessFactory = factorysession.Harness
HarnessCopilot = copilotsession.Harness
+ HarnessDSH = dshsession.Harness
+ HarnessOpenClaw = openclawsession.Harness
// Runtimes Beacon starts but whose sessions it reads only from the runtime log.
HarnessOhMyPi = "omp"
@@@ -199,27 -199,16 +201,37 @@@ var runtimes = []Runtime
Env: map[string]string{"COPILOT_ALLOW_ALL": "", "COPILOT_PLAN_THEN_AUTOPILOT": ""},
},
},
+ {
+ Harness: HarnessDSH,
+ Label: "DeepSeek Harness",
+ Aliases: []string{"dsh"},
+ NewSource: func(dir string) Source { return &dshSource{dir: dir} },
+ // dsh has no interactive terminal session to start: `--profile headless` answers one task
+ // and exits, and `dsh web` is a browser UI. Its sessions continue in another runtime.
+ // Bare "deepseek" is not an alias: it names the vendor and its models, and a runtime-log row
+ // stamped with it came from a provider route, not from DeepSeek Harness.
+ },
+ {
+ Harness: HarnessOpenClaw,
+ Label: "OpenClaw Gateway",
+ Aliases: []string{"openclaw", "openclaw-gateway"},
+ NewSource: func(dir string) Source { return &openClawSource{dir: dir} },
+ // The TUI is a client of the Gateway: it needs the Gateway running, and a conversation lives
+ // on the Gateway under its session key, not its transcript id. --deliver stays off, so
+ // replies are not sent out through the Gateway's chat channels.
+ Command: &runtimeCommand{
+ Executable: "openclaw",
+ Resume: func(s Session) ([]string, bool) {
+ if s.Key == "" {
+ return nil, false
+ }
+ return []string{"tui", "--session", s.Key}, true
+ },
+ NewSession: func(prompt string) []string {
+ return []string{"tui", "--session", openClawNewSessionKey(prompt), "--message", prompt}
+ },
+ },
+ },
// 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 another
diff --cc docs/cli/handoff.mdx
index 3ee40b51,3840a5f7..5a1b9955
--- a/docs/cli/handoff.mdx
+++ b/docs/cli/handoff.mdx
@@@ -27,13 -27,11 +27,14 @@@ Sessions come from each runtime's own l
| Prime Agent | `~/.prime/agent`, both `sessions` and `session-artifacts` (or `PRIME_AGENT_CODING_AGENT_DIR`) | `prime` |
| Factory Droid | `~/.factory/sessions` | `droid` |
| GitHub Copilot CLI | `~/.copilot/session-state` | `copilot` |
+ | DeepSeek Harness | `~/.dsh/sessions` (or under `DSH_HOME`) | `dsh` |
+| OpenClaw Gateway | `~/.openclaw/agents/<agent>/sessions` for every agent (or under `OPENCLAW_STATE_DIR`) | `openclaw` |
- 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. OpenClaw transcript ids are unique only within one agent. When two agents hold the same id, both are listed, and `export` and `resume` report the id as ambiguous rather than pick one.
-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 DeepSeek Harness session that DSH spawned for delegated work is listed as a subagent of the session that started it; a fork of a session is listed as a session of its own.
++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 DeepSeek Harness session that DSH spawned for delegated work is listed as a subagent of the session that started it; a fork of a session is listed as a session of its own. OpenClaw transcript ids are unique only within one agent. When two agents hold the same id, both are listed, and `export` and `resume` report the id as ambiguous rather than pick one.
-`--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 GitHub Copilot CLI it is the `~/.copilot` directory that holds `session-state`, as `beacon endpoint copilot sync --copilot-dir` does. For DeepSeek Harness it is its `DSH_HOME`, as `beacon endpoint dsh sync --dsh-home` does.
+OpenClaw Gateway sessions are read from the JSONL transcripts and the `sessions.json` index in each agent's `sessions` directory, as `beacon endpoint openclaw sessions sync` reads them. Recent OpenClaw releases keep live sessions in a per-agent SQLite database and treat that directory as legacy, so sessions that exist only in the database are not listed.
+
- `--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 GitHub Copilot CLI it is the `~/.copilot` directory that holds `session-state`, as `beacon endpoint copilot sync --copilot-dir` does. For OpenClaw Gateway it is its state directory, as `beacon endpoint openclaw sessions sync --openclaw-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 GitHub Copilot CLI it is the `~/.copilot` directory that holds `session-state`, as `beacon endpoint copilot sync --copilot-dir` does. For DeepSeek Harness it is its `DSH_HOME`, as `beacon endpoint dsh sync --dsh-home` does. For OpenClaw Gateway it is its state directory, as `beacon endpoint openclaw sessions sync --openclaw-dir` does.
### Runtimes Beacon starts but does not read
@@@ -66,7 -64,7 +67,7 @@@ beacon handoff list --jso
| Flag | Description |
|------|-------------|
- | `--harness` | Only this runtime: `claude`, `codex`, `opencode`, `cline`, `pi`, `prime`, `droid`, `copilot` or `openclaw`. |
-| `--harness` | Only this runtime: `claude`, `codex`, `opencode`, `cline`, `pi`, `prime`, `droid`, `copilot` or `dsh`. |
++| `--harness` | Only this runtime: `claude`, `codex`, `opencode`, `cline`, `pi`, `prime`, `droid`, `copilot`, `dsh` or `openclaw`. |
| `--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. |
@@@ -164,8 -160,8 +165,10 @@@ There are two ways to resume
Claude Code, Cline and Prime Agent subagent sessions, and Cline's older task history, can't be reopened by their CLIs, so they always continue from a brief. A session known only from Beacon's runtime log also continues from a brief, and it needs `--agent` if its own runtime isn't one Beacon can start.
+ Beacon cannot start DeepSeek Harness, because it has no interactive terminal session to start: `dsh --profile headless` answers one task and exits, and `dsh web` is a browser UI. A DeepSeek Harness session therefore continues in another runtime, named with `--agent`, and `--agent dsh` is refused.
+
+OpenClaw's TUI is a client of the Gateway, so the Gateway must be running (`openclaw gateway run`, or its installed service) for either command to connect; Beacon does not start it. The Gateway reopens a conversation by its session key, such as `agent:main:main`, not by its transcript id, so an OpenClaw session is reopened natively only when the agent's `sessions.json` files the transcript under a key qualified with that agent (`agent:<agent>:...`); otherwise it continues from a brief. The Gateway answers for that key with whatever conversation it now holds under it: a key it no longer knows can open as an empty conversation. A new session gets a key of its own, `beacon-handoff-` and a hash of its prompt, because without `--session` the TUI would post into the agent's shared main session. Beacon never passes `--deliver`, so replies stay in the TUI and are not sent out through the Gateway's chat channels.
+
Cline approves every tool call by default. Beacon always passes `--auto-approve false`, so a session Beacon starts never gets auto-approval on Beacon's say-so. You can still turn it on inside the Cline TUI.
The same holds for every runtime Beacon starts. Oh My Pi and goose approve every tool call by default, so Beacon passes `--approval-mode=always-ask` to Oh My Pi and sets `GOOSE_MODE=approve` for goose. Where a CLI takes an approval mode, Beacon names the mode that asks (Gemini CLI, Qwen Code, Muse Code, and Devin CLI, whose `DEVIN_PERMISSION_MODE` could otherwise hold `dangerous`), so a user or project setting that approves everything does not carry over. Beacon never passes a flag that turns approvals off.
@@@ -207,7 -203,7 +210,7 @@@ The link event keeps the new session's
Two 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`, `factory sync`, `copilot sync` and `openclaw sessions 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`, `copilot sync` and `dsh 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`, `copilot sync`, `dsh sync` and `openclaw sessions 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. The same holds for GitHub Copilot CLI, whose live path is OTLP: `beacon endpoint copilot sync` records the link. 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.