From 152074129acb6bbc48907f54fcb835130c29d498 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Sat, 6 Jun 2026 12:17:28 +0800 Subject: [PATCH] docs clarify openclaw artifact workspace ownership --- docs/architecture/chain-map-artifact-lifecycle.md | 6 ++++++ docs/architecture/chain-map-task-execution.md | 6 ++++++ docs/architecture/cross-repo-call-analysis-2026-06-05.md | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/docs/architecture/chain-map-artifact-lifecycle.md b/docs/architecture/chain-map-artifact-lifecycle.md index cf508fd6..244b68a5 100644 --- a/docs/architecture/chain-map-artifact-lifecycle.md +++ b/docs/architecture/chain-map-artifact-lifecycle.md @@ -46,6 +46,9 @@ Process: 3. resolveWorkspaceDir({ openclawSessionKey, params, pluginConfig, config }) → Falls back through: explicit → pluginConfig → agent config → profile env → ~/.openclaw/workspace + → Bridge must pass only a real OpenClaw workspace root here. App/owner + scoped hints such as `/owners/...` are UI/sync references, not plugin + workspace roots, and must fall back to the managed OpenClaw workspace. 4. safeScopeSegment(openclawSessionKey) → replace [/\\:*?"<>|] with "-", truncate to 96 chars @@ -64,6 +67,9 @@ Output: Fragile: - workspace resolution chain has 5 ordered sources + - `remoteWorkingDirectoryHint` may be an app owner-scoped reference; using it + as `workspaceDir` causes plugin `realpath(workspaceDir)` failures before + `tasks///` can be created - session key format must match across bridge and plugin - no cleanup of old scope directories ``` diff --git a/docs/architecture/chain-map-task-execution.md b/docs/architecture/chain-map-task-execution.md index 68866e34..48018d42 100644 --- a/docs/architecture/chain-map-task-execution.md +++ b/docs/architecture/chain-map-task-execution.md @@ -79,6 +79,12 @@ xworkmate-bridge │ ├─ openclawSessionKey: OpenClaw SessionEntry key │ ├─ expectedArtifactDirs: typed artifact contract │ └─ scope: tasks/// + ├─ Rewrite OpenClaw turn workspace references + │ ├─ `/owners/...` and other app owner-scoped hints are not + │ │ plugin workspace roots + │ ├─ workingDirectory / remoteWorkingDirectoryHint for chat.send + │ │ become prepared.artifactDirectory + │ └─ prompt `currentTaskWorkspace` points at artifactDirectory │ ├─ gateway.request('chat.send') │ └─ payload: sessionKey, message, attachments, idempotencyKey diff --git a/docs/architecture/cross-repo-call-analysis-2026-06-05.md b/docs/architecture/cross-repo-call-analysis-2026-06-05.md index 8b9e6aa8..57a12450 100644 --- a/docs/architecture/cross-repo-call-analysis-2026-06-05.md +++ b/docs/architecture/cross-repo-call-analysis-2026-06-05.md @@ -321,6 +321,11 @@ Bridge 不再组装 terminal snapshot。Terminal success/failure 必须来自 Op 如果 agent config 变更(增删 agent、修改 default、调整 workspace),可能影响所有运行中 session 的 artifact 路径。 +App/owner-scoped `remoteWorkingDirectoryHint`(例如 `/owners/...`)不是 +OpenClaw 文件系统路径,Bridge 不得把它透传为 plugin `workspaceDir`。否则 +Plugin 会在创建 `tasks///` 前先 `realpath(workspaceDir)`,并以 +`ENOENT` 失败。 + ### 🟡 MEDIUM: 配置与部署区 **6.10 Distributed bridge forwarding topology 变更**