Skip to content

Commit b6516c2

Browse files
committed
Merge commit 'a67c52611e5768ffe89dc2c4eea0cea0e26e34e6' into codex/qa0803-tui-pty-scenario-model-routing
2 parents 38f9088 + a67c526 commit b6516c2

77 files changed

Lines changed: 5990 additions & 661 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/channels/reef.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ Reef lives under `channels.reef`:
8585

8686
## Adding a friend
8787

88+
Friendship changes and review decisions from authenticated chat require the sender to match an explicit `commands.ownerAllowFrom` entry. Wildcards can admit commands, but do not grant owner authority. A configured owner can make either change in chat; friendship changes can also use `openclaw reef friend` on the Gateway host.
89+
8890
The receiving side mints a short-lived code in an authenticated chat:
8991

9092
```text
@@ -143,6 +145,8 @@ Reef runs a fail-closed classifier at both ends: outbound DLP before encryption,
143145
/reef review approve <digest>
144146
```
145147

148+
These review commands use the same explicit owner check described in [Adding a friend](#adding-a-friend). If no chat sender is configured as an owner, add the intended owner to `commands.ownerAllowFrom` before deciding a review.
149+
146150
Deterministic checks (size, UTF-8, destination pin, secret patterns) run before any model call and cannot be overridden.
147151

148152
The model guard allows routine agent collaboration, including requests to reply, investigate, edit, test, or report. Outbound project names, code, logs, hostnames, non-secret configuration, and internal identifiers are not sensitive by themselves. Ambiguous disclosures or meta-instructions go to owner review; concrete secrets and explicit policy-override, hidden-context, or unauthorized-action attempts are denied.

‎docs/cli/sessions.md‎

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2-
summary: "CLI reference for `openclaw sessions` (list stored sessions + usage)"
2+
summary: "CLI reference for listing, archiving, deleting, and maintaining stored sessions"
33
read_when:
44
- You want to list stored sessions and see recent activity
5+
- You want to archive or delete sessions from a headless Gateway
56
title: "Sessions"
67
---
78

@@ -78,6 +79,81 @@ skipped.
7879
}
7980
```
8081

82+
## Archive sessions
83+
84+
Archive one or more sessions through the running Gateway:
85+
86+
```bash
87+
openclaw sessions archive "agent:main:scratch-1"
88+
openclaw sessions archive "agent:main:scratch-1" "agent:main:scratch-2"
89+
openclaw sessions archive "agent:work:scratch-1" --agent work
90+
openclaw sessions archive "agent:main:scratch-1" --dry-run
91+
openclaw sessions archive "agent:main:scratch-1" --json
92+
```
93+
94+
Archive uses the same `sessions.patch` lifecycle operation as the Control UI.
95+
It keeps the transcript, marks the session archived, and removes the session
96+
from the default active list. Already archived sessions are successful no-ops.
97+
Use `--dry-run` to validate every key and preview the result without changing
98+
session state.
99+
100+
## Delete sessions
101+
102+
Delete one or more sessions through the running Gateway:
103+
104+
```bash
105+
openclaw sessions delete "agent:main:scratch-1"
106+
openclaw sessions delete "agent:main:scratch-1" "agent:main:scratch-2" --yes
107+
openclaw sessions delete "agent:work:scratch-1" --agent work --yes
108+
openclaw sessions delete "agent:main:scratch-1" --dry-run
109+
openclaw sessions delete "agent:main:scratch-1" --yes --json
110+
```
111+
112+
<Warning>
113+
Delete is destructive. In an interactive terminal it asks once before
114+
deleting the valid keys. Non-interactive and `--json` deletion requires
115+
`--yes`. Use `--dry-run` first when scripting a bulk cleanup.
116+
</Warning>
117+
118+
Delete uses the same `sessions.delete` lifecycle operation as the Control UI,
119+
with transcript cleanup enabled. The Gateway removes the live session row,
120+
transcript generations, session-owned runtime state, bindings, boards, and
121+
other lifecycle artifacts. For ordinary sessions it retains the transcript as
122+
a verified `.jsonl.deleted.<timestamp>` archive; incognito transcripts are
123+
removed without an archive. If a managed worktree cannot be removed safely,
124+
the command reports the preserved branch and path for manual cleanup.
125+
126+
Both lifecycle commands:
127+
128+
- accept multiple keys and report one ordered result per key;
129+
- use `--agent <id>` to select the owning agent, which is required for a
130+
`global` key outside the default agent;
131+
- support `--url`, `--token`, `--password`, and `--timeout <ms>` Gateway
132+
connection overrides;
133+
- return a non-zero exit when any key is unknown or any operation fails, while
134+
still processing the other valid keys;
135+
- emit one stable JSON envelope with `ok`, `operation`, `dryRun`, and `results`
136+
when `--json` is set.
137+
138+
Example mixed-result JSON:
139+
140+
```json
141+
{
142+
"ok": false,
143+
"operation": "archive",
144+
"dryRun": false,
145+
"results": [
146+
{ "key": "agent:main:scratch-1", "ok": true, "status": "archived" },
147+
{
148+
"key": "agent:main:missing",
149+
"ok": false,
150+
"status": "not_found",
151+
"error": "Session not found. Run openclaw sessions list --json to choose a valid key."
152+
}
153+
]
154+
}
155+
```
156+
81157
## Tail trajectory progress
82158

83159
```bash

0 commit comments

Comments
 (0)