Skip to content

Commit cf2f591

Browse files
authored
feat(sessions): permanent creator attribution, owner avatars, person filter, multi-user docs (#112658)
* feat(sessions): persist creator attribution * feat(ui): add session creator filtering * chore(sessions): refresh sqlite schema baseline * docs(security): explain shared-agent trust * fix(sessions): project catalog creator ownership * fix(ui): restore startup JS budget headroom for creator attribution
1 parent 0226ad5 commit cf2f591

70 files changed

Lines changed: 1481 additions & 35 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.

‎SECURITY.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ The fastest useful reports show a current, reproducible boundary bypass with dem
88

99
Security work is shared across a number of OpenClaw maintainers, including engineers and security researchers from organizations such as NVIDIA and Tencent. See the [maintainer list](CONTRIBUTING.md#maintainers).
1010

11+
## Shared Agents
12+
13+
Anyone who can operate an agent can make it do anything that agent can do. Session ownership, visibility, and presence are usability features, not security boundaries. Turn attribution is best-effort because steering can merge input into an active turn. Use separate agents or separate gateway/host trust boundaries when operators need real isolation.
14+
1115
## Report a Security Issue
1216

1317
Report vulnerabilities directly to the repository where the issue lives:

‎apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3958,6 +3958,7 @@ public struct SessionsListParams: Codable, Sendable {
39583958
public let includederivedtitles: Bool?
39593959
public let includelastmessage: Bool?
39603960
public let label: String?
3961+
public let creatorid: String?
39613962
public let spawnedby: String?
39623963
public let agentid: String?
39633964
public let search: String?
@@ -3975,6 +3976,7 @@ public struct SessionsListParams: Codable, Sendable {
39753976
includederivedtitles: Bool? = nil,
39763977
includelastmessage: Bool? = nil,
39773978
label: String? = nil,
3979+
creatorid: String? = nil,
39783980
spawnedby: String? = nil,
39793981
agentid: String? = nil,
39803982
search: String? = nil,
@@ -3991,6 +3993,7 @@ public struct SessionsListParams: Codable, Sendable {
39913993
self.includederivedtitles = includederivedtitles
39923994
self.includelastmessage = includelastmessage
39933995
self.label = label
3996+
self.creatorid = creatorid
39943997
self.spawnedby = spawnedby
39953998
self.agentid = agentid
39963999
self.search = search
@@ -4009,6 +4012,7 @@ public struct SessionsListParams: Codable, Sendable {
40094012
case includederivedtitles = "includeDerivedTitles"
40104013
case includelastmessage = "includeLastMessage"
40114014
case label
4015+
case creatorid = "creatorId"
40124016
case spawnedby = "spawnedBy"
40134017
case agentid = "agentId"
40144018
case search
@@ -4098,6 +4102,7 @@ public struct SessionCatalogSession: Codable, Sendable {
40984102
public let pullrequest: SessionCatalogPullRequestSummary?
40994103
public let archived: Bool
41004104
public let sessionkey: String?
4105+
public let createdby: [String: AnyCodable]?
41014106
public let cancontinue: Bool
41024107
public let canarchive: Bool
41034108
public let canopenterminal: Bool?
@@ -4118,6 +4123,7 @@ public struct SessionCatalogSession: Codable, Sendable {
41184123
pullrequest: SessionCatalogPullRequestSummary? = nil,
41194124
archived: Bool,
41204125
sessionkey: String? = nil,
4126+
createdby: [String: AnyCodable]? = nil,
41214127
cancontinue: Bool,
41224128
canarchive: Bool,
41234129
canopenterminal: Bool? = nil)
@@ -4137,6 +4143,7 @@ public struct SessionCatalogSession: Codable, Sendable {
41374143
self.pullrequest = pullrequest
41384144
self.archived = archived
41394145
self.sessionkey = sessionkey
4146+
self.createdby = createdby
41404147
self.cancontinue = cancontinue
41414148
self.canarchive = canarchive
41424149
self.canopenterminal = canopenterminal
@@ -4158,6 +4165,7 @@ public struct SessionCatalogSession: Codable, Sendable {
41584165
case pullrequest = "pullRequest"
41594166
case archived
41604167
case sessionkey = "sessionKey"
4168+
case createdby = "createdBy"
41614169
case cancontinue = "canContinue"
41624170
case canarchive = "canArchive"
41634171
case canopenterminal = "canOpenTerminal"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
011b9ec0e0fa64b5a4036648fcd61a50674b813a92280e8e3fe8746f6acdb62d sqlite-session-transcript-schema-baseline.sql
1+
0852c1b681df33646f60d239afcac6de53fbc498bd5daa58077376331205ccdf sqlite-session-transcript-schema-baseline.sql

‎docs/.i18n/glossary.zh-CN.json‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,5 +1606,25 @@
16061606
{
16071607
"source": "Baseten (Inkling + Model APIs)",
16081608
"target": "Baseten(Inkling + Model APIs)"
1609+
},
1610+
{
1611+
"source": "Multi-user mode",
1612+
"target": "多用户模式"
1613+
},
1614+
{
1615+
"source": "The main session",
1616+
"target": "主会话"
1617+
},
1618+
{
1619+
"source": "Session management",
1620+
"target": "会话管理"
1621+
},
1622+
{
1623+
"source": "Presence",
1624+
"target": "在线状态"
1625+
},
1626+
{
1627+
"source": "Gateway security",
1628+
"target": "Gateway 安全"
16091629
}
16101630
]

‎docs/concepts/multi-user.md‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
summary: "How session ownership and presence work when several people operate one agent"
3+
read_when:
4+
- You share one OpenClaw agent with other operators
5+
- You need to understand session owner and presence indicators
6+
- You are deciding whether one shared agent provides enough isolation
7+
title: "Multi-user mode"
8+
---
9+
10+
Multi-user mode lets several trusted people operate the same OpenClaw agent. It adds session ownership, live presence, and creator filtering so a team can tell who started work and who is currently watching it.
11+
12+
## Trust boundary
13+
14+
Everyone who can operate an agent can make it do anything that agent can do. Session ownership, visibility in the sidebar, and presence indicators are usability features, not security boundaries.
15+
16+
If people must not access each other's sessions, tools, credentials, or files, give them separate agents or separate gateway/host trust boundaries. Do not rely on owner avatars or filters for isolation.
17+
18+
## Ownership and presence
19+
20+
New sessions record their creator when the Gateway has a trusted identity available. Trusted-proxy identity takes priority; otherwise OpenClaw uses the paired device's operator label or display name. Older sessions and sessions created without either identity have no owner stamp.
21+
22+
The web app keeps ownership and presence visually distinct:
23+
24+
- A solid owner avatar is permanent for the lifetime of that session.
25+
- Ringed or translucent presence avatars show people who are currently connected or watching.
26+
- The sidebar's person filter shows sessions created by one identity while preserving the existing custom groups.
27+
28+
When fewer than two distinct creators appear in the loaded session list, OpenClaw hides all ownership and person-filter chrome. A single-user gateway therefore looks unchanged.
29+
30+
## Turn attribution
31+
32+
Turn sender attribution is best-effort. Steering can merge input into an active turn, so the transcript cannot always represent each person's contribution as a separate turn.
33+
34+
## Related
35+
36+
- [The main session](/concepts/main-session)
37+
- [Session management](/concepts/session)
38+
- [Presence](/concepts/presence)
39+
- [Gateway security](/gateway/security)

‎docs/docs.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,6 +1233,7 @@
12331233
"group": "Sessions and memory",
12341234
"pages": [
12351235
"concepts/main-session",
1236+
"concepts/multi-user",
12361237
"concepts/session",
12371238
"concepts/session-search",
12381239
"concepts/channel-docking",
@@ -2056,4 +2057,4 @@
20562057
}
20572058
]
20582059
}
2059-
}
2060+
}

‎docs/docs_map.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2778,6 +2778,15 @@ Do not edit it by hand; run `pnpm docs:map:gen`.
27782778
- H2: Per-agent sandbox and tool configuration
27792779
- H2: Related
27802780

2781+
## concepts/multi-user.md
2782+
2783+
- Route: /concepts/multi-user
2784+
- Headings:
2785+
- H2: Trust boundary
2786+
- H2: Ownership and presence
2787+
- H2: Turn attribution
2788+
- H2: Related
2789+
27812790
## concepts/oauth.md
27822791

27832792
- Route: /concepts/oauth

‎packages/gateway-protocol/src/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export type {
2525
MissingScopeErrorDetails,
2626
} from "./schema/error-codes.js";
2727
export * from "./schema/board.js";
28+
export { SessionCreatorIdentitySchema, type SessionCreatorIdentity } from "./schema/sessions.js";
2829
export * from "./migration-api.js";
2930
export type * from "./public-session-catalog.js";
3031
import {

‎packages/gateway-protocol/src/schema/sessions-catalog.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ describe("SessionsCatalogListResultSchema", () => {
3131
threadId: "thread-1",
3232
status: "idle",
3333
archived: false,
34+
createdBy: { id: "profile-ada", label: "Ada" },
3435
canContinue: true,
3536
canArchive: false,
3637
canOpenTerminal: true,

‎packages/gateway-protocol/src/schema/sessions-catalog.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Type } from "typebox";
33
import { closedObject } from "./closed-object.js";
44
import { PluginJsonValueSchema } from "./plugins.js";
55
import { NonEmptyString } from "./primitives.js";
6+
import { SessionCreatorIdentitySchema } from "./sessions.js";
67

78
const SessionCatalogErrorSchema = closedObject({ code: NonEmptyString, message: NonEmptyString });
89

@@ -55,6 +56,7 @@ export const SessionCatalogSessionSchema = closedObject({
5556
pullRequest: Type.Optional(SessionCatalogPullRequestSummarySchema),
5657
archived: Type.Boolean(),
5758
sessionKey: Type.Optional(NonEmptyString),
59+
createdBy: Type.Optional(SessionCreatorIdentitySchema),
5860
canContinue: Type.Boolean(),
5961
canArchive: Type.Boolean(),
6062
canOpenTerminal: Type.Optional(Type.Boolean()),

0 commit comments

Comments
 (0)