@wowyuarm/dsh-agent-team 0.1.12 → 0.1.14-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +3 -1
  2. package/README.zh.md +3 -1
  3. package/cordis.patch.yml +7 -3
  4. package/package.json +57 -45
  5. package/packages/agent-team/README.md +2 -2
  6. package/packages/agent-team/README.zh.md +2 -2
  7. package/packages/agent-team/lib/index.js +151 -69
  8. package/packages/agent-team/lib/ledger.js +249 -31
  9. package/packages/agent-team/lib/member-context.js +18 -1
  10. package/packages/agent-team/lib/member-runtime.js +5 -4
  11. package/packages/agent-team/lib/mentions.js +48 -24
  12. package/packages/agent-team/lib/spec.js +19 -0
  13. package/packages/agent-team/lib/typert.host.js +187 -41
  14. package/packages/agent-team/lib/typert.remote-client.d.ts +7 -3
  15. package/packages/agent-team/lib/typert.remote-client.d.ts.map +1 -1
  16. package/packages/agent-team/lib/typert.remote-client.js +132 -27
  17. package/packages/agent-team/lib/types/index.d.ts +32 -7
  18. package/packages/agent-team/lib/types/index.d.ts.map +1 -1
  19. package/packages/agent-team/lib/types/ledger.d.ts +46 -2
  20. package/packages/agent-team/lib/types/ledger.d.ts.map +1 -1
  21. package/packages/agent-team/lib/types/member-context.d.ts +6 -0
  22. package/packages/agent-team/lib/types/member-context.d.ts.map +1 -1
  23. package/packages/agent-team/lib/types/mentions.d.ts +20 -7
  24. package/packages/agent-team/lib/types/mentions.d.ts.map +1 -1
  25. package/packages/agent-team/lib/types/spec.d.ts.map +1 -1
  26. package/packages/agent-team/lib/types/types/entities.d.ts +3 -2
  27. package/packages/agent-team/lib/types/types/entities.d.ts.map +1 -1
  28. package/packages/agent-team/lib/types/types/operations.d.ts +37 -1
  29. package/packages/agent-team/lib/types/types/operations.d.ts.map +1 -1
  30. package/packages/agent-team/lib/types/types/requests-results.d.ts +50 -10
  31. package/packages/agent-team/lib/types/types/requests-results.d.ts.map +1 -1
  32. package/packages/agent-team/lib/types/vendor/storage-sqlite/index.d.ts +87 -0
  33. package/packages/agent-team/lib/types/vendor/storage-sqlite/index.d.ts.map +1 -0
  34. package/packages/agent-team/lib/types/vendor/storage-sqlite/schema.d.ts +59 -0
  35. package/packages/agent-team/lib/types/vendor/storage-sqlite/schema.d.ts.map +1 -0
  36. package/packages/agent-team/lib/types/vendor/storage-sqlite/unit.d.ts +57 -0
  37. package/packages/agent-team/lib/types/vendor/storage-sqlite/unit.d.ts.map +1 -0
  38. package/packages/agent-team/lib/vendor/storage-sqlite/index.js +139 -0
  39. package/packages/agent-team/lib/vendor/storage-sqlite/schema.js +120 -0
  40. package/packages/agent-team/lib/vendor/storage-sqlite/unit.js +132 -0
  41. package/packages/client-agent-team/README.md +1 -1
  42. package/packages/client-agent-team/README.zh.md +1 -1
  43. package/packages/client-agent-team/lib/client.js +604 -344
  44. package/packages/client-agent-team/lib/client.js.map +1 -1
  45. package/packages/client-agent-team/lib/types/client/TeamAgentImport.d.ts +12 -0
  46. package/packages/client-agent-team/lib/types/client/TeamAgentImport.d.ts.map +1 -0
  47. package/packages/client-agent-team/lib/types/client/TeamAgentImport.js +69 -0
  48. package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts +3 -1
  49. package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts.map +1 -1
  50. package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.js +29 -17
  51. package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts.map +1 -1
  52. package/packages/client-agent-team/lib/types/client/TeamChannelPage.js +19 -44
  53. package/packages/client-agent-team/lib/types/client/TeamComposer.js +2 -2
  54. package/packages/client-agent-team/lib/types/client/TeamInboxPage.d.ts +2 -2
  55. package/packages/client-agent-team/lib/types/client/TeamInboxPage.d.ts.map +1 -1
  56. package/packages/client-agent-team/lib/types/client/TeamInboxPage.js +15 -14
  57. package/packages/client-agent-team/lib/types/client/TeamPresenceDot.d.ts +1 -1
  58. package/packages/client-agent-team/lib/types/client/TeamPresenceDot.d.ts.map +1 -1
  59. package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts.map +1 -1
  60. package/packages/client-agent-team/lib/types/client/TeamThreadPage.js +15 -29
  61. package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.d.ts +1 -1
  62. package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.d.ts.map +1 -1
  63. package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.js +2 -2
  64. package/packages/client-agent-team/lib/types/client/index.d.ts.map +1 -1
  65. package/packages/client-agent-team/lib/types/client/index.js +8 -1
  66. package/packages/client-agent-team/lib/types/client/locales.d.ts +18 -0
  67. package/packages/client-agent-team/lib/types/client/locales.d.ts.map +1 -1
  68. package/packages/client-agent-team/lib/types/client/locales.js +18 -0
  69. package/packages/client-agent-team/lib/types/client/slots.d.ts +3 -1
  70. package/packages/client-agent-team/lib/types/client/slots.d.ts.map +1 -1
  71. package/packages/client-agent-team/lib/types/client/team-changes.d.ts +15 -31
  72. package/packages/client-agent-team/lib/types/client/team-changes.d.ts.map +1 -1
  73. package/packages/client-agent-team/lib/types/client/team-changes.js +82 -111
  74. package/packages/client-agent-team/lib/types/client/team-formatters.d.ts +13 -11
  75. package/packages/client-agent-team/lib/types/client/team-formatters.d.ts.map +1 -1
  76. package/packages/client-agent-team/lib/types/client/team-formatters.js +29 -35
  77. package/packages/tool-agent-team/README.md +1 -1
  78. package/packages/tool-agent-team/README.zh.md +1 -1
  79. package/packages/tool-agent-team/lib/host-access.js +19 -0
  80. package/packages/tool-agent-team/lib/index.js +42 -33
  81. package/packages/tool-agent-team/lib/types/host-access.d.ts +10 -0
  82. package/packages/tool-agent-team/lib/types/host-access.d.ts.map +1 -1
  83. package/packages/tool-agent-team/lib/types/index.d.ts.map +1 -1
  84. package/packages/client-agent-team/lib/types/client/scope-coverage.d.ts +0 -41
  85. package/packages/client-agent-team/lib/types/client/scope-coverage.d.ts.map +0 -1
  86. package/packages/client-agent-team/lib/types/client/scope-coverage.js +0 -64
package/README.md CHANGED
@@ -41,7 +41,7 @@ If this looks useful, a star on [GitHub](https://github.com/wowyuarm/dsh-agent-t
41
41
 
42
42
  ### 1. Check DSH
43
43
 
44
- This release is certified against DSH `0.1.5-rc.1`. If `dsh` is not installed yet, start DSH with the official package:
44
+ This release is certified against DSH `0.1.6-alpha.1`. If `dsh` is not installed yet, start DSH with the official package:
45
45
 
46
46
  ```sh
47
47
  npx @deepseek-ai/dsh web
@@ -59,6 +59,8 @@ dsh plugin --profile web add @wowyuarm/dsh-agent-team
59
59
  dsh web
60
60
  ```
61
61
 
62
+ Do not start DSH from its source checkout (`pnpm dsh web`): source mode loads a second copy of the scope module, so every member reports `selected preset is not team-enabled`. Always start the compiled CLI.
63
+
62
64
  Agent Team is opt-in. Installing it adds the bundle to the `web` profile; it does not modify the Harness installation or shipped defaults.
63
65
 
64
66
  ### 3. Verify and try it
package/README.zh.md CHANGED
@@ -41,7 +41,7 @@ Task Thread 把 Claim、Agent 交接、Human 验收和后续回复保留在同
41
41
 
42
42
  ### 1. 检查 DSH
43
43
 
44
- 当前版本已针对 DSH `0.1.5-rc.1` 完成认证。如果还没有安装 `dsh`,先使用官方 package 启动 DSH:
44
+ 当前版本已针对 DSH `0.1.6-alpha.1` 完成认证。如果还没有安装 `dsh`,先使用官方 package 启动 DSH:
45
45
 
46
46
  ```sh
47
47
  npx @deepseek-ai/dsh web
@@ -59,6 +59,8 @@ dsh plugin --profile web add @wowyuarm/dsh-agent-team
59
59
  dsh web
60
60
  ```
61
61
 
62
+ 不要从 DSH 源码 checkout 启动(`pnpm dsh web`):源码模式会加载第二份 scope 模块,所有成员都会报 `selected preset is not team-enabled`。请始终使用编译产物启动。
63
+
62
64
  Agent Team 是显式 opt-in 的。安装只会把 bundle 加入 `web` profile,不会修改 Harness 安装,也不会修改 shipped defaults。
63
65
 
64
66
  ### 3. 验证并开始使用
package/cordis.patch.yml CHANGED
@@ -15,10 +15,14 @@
15
15
  name: '@deepseek-ai/dsh-invariants'
16
16
  - id: wowyuarm-agent-team-invariant
17
17
  name: '@wowyuarm/dsh-agent-team/invariant'
18
- # Team ledger medium backend. A plain dependency of this bundle, mounted
19
- # as an ordinary storage provider row beside the shipped JSON backend.
18
+ # Team ledger medium backend. Vendored under our own package name (see
19
+ # packages/agent-team/src/vendor/storage-sqlite/): DSH Desktop generation
20
+ # installers strip `@deepseek-ai/*` copies and resolve them from the host
21
+ # closure, which ships no sqlite backend — a loader row naming that
22
+ # package blocks boot (GitHub issue #28). Mounted here as an ordinary
23
+ # storage provider row beside the shipped JSON backend.
20
24
  - id: storage-sqlite
21
- name: '@deepseek-ai/dsh-storage-sqlite'
25
+ name: '@wowyuarm/dsh-agent-team/sqlite-backend'
22
26
  config:
23
27
  path: !!js dshHomePath('storages', 'agent_team.sqlite')
24
28
 
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@wowyuarm/dsh-agent-team",
3
- "version": "0.1.12",
3
+ "version": "0.1.14-alpha.1",
4
+ "license": "MIT",
4
5
  "description": "A persistent agent team for long-running collaboration in DeepSeek Harness",
5
6
  "repository": {
6
7
  "type": "git",
@@ -41,6 +42,9 @@
41
42
  },
42
43
  "client": {
43
44
  "platform": "web",
45
+ "external": [
46
+ "@deepseek-ai/dsh-api-gateway/client"
47
+ ],
44
48
  "inject": [
45
49
  "@deepseek-ai/dsh-api-remotes",
46
50
  "@deepseek-ai/dsh-client-ui-sidebar",
@@ -54,10 +58,10 @@
54
58
  }
55
59
  },
56
60
  "dependencies": {
57
- "@deepseek-ai/dsh-storage-sqlite": ">=0.1.5-rc.1 <0.2.0",
58
61
  "zod": "^4.4.3"
59
62
  },
60
63
  "devDependencies": {
64
+ "@deepseek-ai/dsh-storage-sqlite": "0.1.5-rc.2",
61
65
  "@testing-library/dom": "^10.4.1",
62
66
  "@testing-library/react": "^16.3.2",
63
67
  "@types/node": "^24.0.0",
@@ -105,6 +109,10 @@
105
109
  "types": "./packages/agent-team/lib/types/preset-roster.d.ts",
106
110
  "default": "./packages/agent-team/lib/preset-roster.js"
107
111
  },
112
+ "./sqlite-backend": {
113
+ "types": "./packages/agent-team/lib/types/vendor/storage-sqlite/index.d.ts",
114
+ "default": "./packages/agent-team/lib/vendor/storage-sqlite/index.js"
115
+ },
108
116
  "./member-context": {
109
117
  "types": "./packages/agent-team/lib/types/member-context.d.ts",
110
118
  "default": "./packages/agent-team/lib/member-context.js"
@@ -117,6 +125,10 @@
117
125
  "types": "./packages/agent-team/lib/types/time-format.d.ts",
118
126
  "default": "./packages/agent-team/lib/time-format.js"
119
127
  },
128
+ "./mentions": {
129
+ "types": "./packages/agent-team/lib/types/mentions.d.ts",
130
+ "default": "./packages/agent-team/lib/mentions.js"
131
+ },
120
132
  "./member-skills": {
121
133
  "types": "./packages/agent-team/lib/types/member-skills.d.ts",
122
134
  "default": "./packages/agent-team/lib/member-skills.js"
@@ -133,49 +145,49 @@
133
145
  },
134
146
  "peerDependencies": {
135
147
  "@deepseek-ai/cordis": "^4.0.1",
136
- "@deepseek-ai/dsh-agent": ">=0.1.5-rc.1 <0.1.6",
137
- "@deepseek-ai/dsh-agent-default-model": ">=0.1.5-rc.1 <0.1.6",
138
- "@deepseek-ai/dsh-agent-presets": ">=0.1.5-rc.1 <0.1.6",
139
- "@deepseek-ai/dsh-agent-tool-presentation": ">=0.1.5-rc.1 <0.1.6",
140
- "@deepseek-ai/dsh-api-remotes": ">=0.1.5-rc.1 <0.1.6",
141
- "@deepseek-ai/dsh-api-session-controller": ">=0.1.5-rc.1 <0.1.6",
142
- "@deepseek-ai/dsh-api-workspace-controller": ">=0.1.5-rc.1 <0.1.6",
143
- "@deepseek-ai/dsh-brand": ">=0.1.5-rc.1 <0.1.6",
144
- "@deepseek-ai/dsh-client-locale": ">=0.1.5-rc.1 <0.1.6",
145
- "@deepseek-ai/dsh-client-ui-conversation": ">=0.1.5-rc.1 <0.1.6",
146
- "@deepseek-ai/dsh-client-ui-input-trigger": ">=0.1.5-rc.1 <0.1.6",
147
- "@deepseek-ai/dsh-client-ui-layout": ">=0.1.5-rc.1 <0.1.6",
148
- "@deepseek-ai/dsh-client-ui-primitives": ">=0.1.5-rc.1 <0.1.6",
149
- "@deepseek-ai/dsh-client-ui-renderer": ">=0.1.5-rc.1 <0.1.6",
150
- "@deepseek-ai/dsh-client-ui-settings-general": ">=0.1.5-rc.1 <0.1.6",
151
- "@deepseek-ai/dsh-client-ui-sidebar": ">=0.1.5-rc.1 <0.1.6",
152
- "@deepseek-ai/dsh-client-ui-slots": ">=0.1.5-rc.1 <0.1.6",
153
- "@deepseek-ai/dsh-client-ui-workspace": ">=0.1.5-rc.1 <0.1.6",
154
- "@deepseek-ai/dsh-command-compact": ">=0.1.5-rc.1 <0.1.6",
155
- "@deepseek-ai/dsh-compaction": ">=0.1.5-rc.1 <0.1.6",
156
- "@deepseek-ai/dsh-home-paths": ">=0.1.5-rc.1 <0.1.6",
157
- "@deepseek-ai/dsh-invariants": ">=0.1.5-rc.1 <0.1.6",
158
- "@deepseek-ai/dsh-llm": ">=0.1.5-rc.1 <0.1.6",
159
- "@deepseek-ai/dsh-sandbox-policy": ">=0.1.5-rc.1 <0.1.6",
160
- "@deepseek-ai/dsh-scope": ">=0.1.5-rc.1 <0.1.6",
161
- "@deepseek-ai/dsh-session": ">=0.1.5-rc.1 <0.1.6",
162
- "@deepseek-ai/dsh-session-format-catalog": ">=0.1.5-rc.1 <0.1.6",
163
- "@deepseek-ai/dsh-session-persistence": ">=0.1.5-rc.1 <0.1.6",
164
- "@deepseek-ai/dsh-skill": ">=0.1.5-rc.1 <0.1.6",
165
- "@deepseek-ai/dsh-skill-filesystem": ">=0.1.5-rc.1 <0.1.6",
166
- "@deepseek-ai/dsh-storage-domain": ">=0.1.5-rc.1 <0.1.6",
167
- "@deepseek-ai/dsh-token-meter": ">=0.1.5-rc.1 <0.1.6",
168
- "@deepseek-ai/dsh-tool-bash": ">=0.1.5-rc.1 <0.1.6",
169
- "@deepseek-ai/dsh-tool-fs": ">=0.1.5-rc.1 <0.1.6",
170
- "@deepseek-ai/dsh-tool-fs-search": ">=0.1.5-rc.1 <0.1.6",
171
- "@deepseek-ai/dsh-tool-jobs": ">=0.1.5-rc.1 <0.1.6",
172
- "@deepseek-ai/dsh-tool-pwsh": ">=0.1.5-rc.1 <0.1.6",
173
- "@deepseek-ai/dsh-tool-skill": ">=0.1.5-rc.1 <0.1.6",
174
- "@deepseek-ai/dsh-tool-todo": ">=0.1.5-rc.1 <0.1.6",
175
- "@deepseek-ai/dsh-tool-web": ">=0.1.5-rc.1 <0.1.6",
176
- "@deepseek-ai/dsh-tools": ">=0.1.5-rc.1 <0.1.6",
177
- "@deepseek-ai/dsh-typert-protocol": ">=0.1.5-rc.1 <0.1.6",
178
- "@deepseek-ai/dsh-workspace": ">=0.1.5-rc.1 <0.1.6",
148
+ "@deepseek-ai/dsh-agent": ">=0.1.6-alpha.1 <0.1.7",
149
+ "@deepseek-ai/dsh-agent-default-model": ">=0.1.6-alpha.1 <0.1.7",
150
+ "@deepseek-ai/dsh-agent-presets": ">=0.1.6-alpha.1 <0.1.7",
151
+ "@deepseek-ai/dsh-agent-tool-presentation": ">=0.1.6-alpha.1 <0.1.7",
152
+ "@deepseek-ai/dsh-api-remotes": ">=0.1.6-alpha.1 <0.1.7",
153
+ "@deepseek-ai/dsh-api-session-controller": ">=0.1.6-alpha.1 <0.1.7",
154
+ "@deepseek-ai/dsh-api-workspace-controller": ">=0.1.6-alpha.1 <0.1.7",
155
+ "@deepseek-ai/dsh-brand": ">=0.1.6-alpha.1 <0.1.7",
156
+ "@deepseek-ai/dsh-client-locale": ">=0.1.6-alpha.1 <0.1.7",
157
+ "@deepseek-ai/dsh-client-ui-conversation": ">=0.1.6-alpha.1 <0.1.7",
158
+ "@deepseek-ai/dsh-client-ui-input-trigger": ">=0.1.6-alpha.1 <0.1.7",
159
+ "@deepseek-ai/dsh-client-ui-layout": ">=0.1.6-alpha.1 <0.1.7",
160
+ "@deepseek-ai/dsh-client-ui-primitives": ">=0.1.6-alpha.1 <0.1.7",
161
+ "@deepseek-ai/dsh-client-ui-renderer": ">=0.1.6-alpha.1 <0.1.7",
162
+ "@deepseek-ai/dsh-client-ui-settings-general": ">=0.1.6-alpha.1 <0.1.7",
163
+ "@deepseek-ai/dsh-client-ui-sidebar": ">=0.1.6-alpha.1 <0.1.7",
164
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.1.6-alpha.1 <0.1.7",
165
+ "@deepseek-ai/dsh-client-ui-workspace": ">=0.1.6-alpha.1 <0.1.7",
166
+ "@deepseek-ai/dsh-command-compact": ">=0.1.6-alpha.1 <0.1.7",
167
+ "@deepseek-ai/dsh-compaction": ">=0.1.6-alpha.1 <0.1.7",
168
+ "@deepseek-ai/dsh-home-paths": ">=0.1.6-alpha.1 <0.1.7",
169
+ "@deepseek-ai/dsh-invariants": ">=0.1.6-alpha.1 <0.1.7",
170
+ "@deepseek-ai/dsh-llm": ">=0.1.6-alpha.1 <0.1.7",
171
+ "@deepseek-ai/dsh-sandbox-policy": ">=0.1.6-alpha.1 <0.1.7",
172
+ "@deepseek-ai/dsh-scope": ">=0.1.6-alpha.1 <0.1.7",
173
+ "@deepseek-ai/dsh-session": ">=0.1.6-alpha.1 <0.1.7",
174
+ "@deepseek-ai/dsh-session-format-catalog": ">=0.1.6-alpha.1 <0.1.7",
175
+ "@deepseek-ai/dsh-session-persistence": ">=0.1.6-alpha.1 <0.1.7",
176
+ "@deepseek-ai/dsh-skill": ">=0.1.6-alpha.1 <0.1.7",
177
+ "@deepseek-ai/dsh-skill-filesystem": ">=0.1.6-alpha.1 <0.1.7",
178
+ "@deepseek-ai/dsh-storage-domain": ">=0.1.6-alpha.1 <0.1.7",
179
+ "@deepseek-ai/dsh-token-meter": ">=0.1.6-alpha.1 <0.1.7",
180
+ "@deepseek-ai/dsh-tool-bash": ">=0.1.6-alpha.1 <0.1.7",
181
+ "@deepseek-ai/dsh-tool-fs": ">=0.1.6-alpha.1 <0.1.7",
182
+ "@deepseek-ai/dsh-tool-fs-search": ">=0.1.6-alpha.1 <0.1.7",
183
+ "@deepseek-ai/dsh-tool-jobs": ">=0.1.6-alpha.1 <0.1.7",
184
+ "@deepseek-ai/dsh-tool-pwsh": ">=0.1.6-alpha.1 <0.1.7",
185
+ "@deepseek-ai/dsh-tool-skill": ">=0.1.6-alpha.1 <0.1.7",
186
+ "@deepseek-ai/dsh-tool-todo": ">=0.1.6-alpha.1 <0.1.7",
187
+ "@deepseek-ai/dsh-tool-web": ">=0.1.6-alpha.1 <0.1.7",
188
+ "@deepseek-ai/dsh-tools": ">=0.1.6-alpha.1 <0.1.7",
189
+ "@deepseek-ai/dsh-typert-protocol": ">=0.1.6-alpha.1 <0.1.7",
190
+ "@deepseek-ai/dsh-workspace": ">=0.1.6-alpha.1 <0.1.7",
179
191
  "react": "^18.2.0"
180
192
  },
181
193
  "keywords": [
@@ -18,7 +18,7 @@ One durable record stores progress instead of the projection it reported. A `tea
18
18
 
19
19
  `storage-domain` validates every record at the durable read boundary and rejects a backend unit stamped with another version. The Team updates its projection only after `KvTable.put()` resolves. Its Fiber owns the Domain handle; disposal rejects new Service calls through Cordis removal, drains accepted Domain writes, and closes the backend unit before the name can reopen.
20
20
 
21
- Member creation commits one stable Member/session/Workspace/preset/private-memory identity before unpublished Agent setup. Setup mounts the selected preset and validates its marked `team_message` plus all eight Team tools before publication. Failure leaves only that Member unavailable. Suspend waits for the owned `AgentHandle` to stop; resume and Host remount restore the exact persisted session.
21
+ Member creation commits one stable Member/session/Workspace/preset/private-memory identity before unpublished Agent setup. The creation Workspace is recorded as the Member's creation site; further Workspaces are joined and left through the participation operations (`team/member-workspace-joined`/`team/member-workspace-left`), which grant collaboration immediately without moving the Session. Setup mounts the selected preset and validates its marked `team_message` plus all eight Team tools before publication. Failure leaves only that Member unavailable. Suspend waits for the owned `AgentHandle` to stop; resume and Host remount restore the exact persisted session.
22
22
 
23
23
  Archival is the reversible third state between suspend and remove, for Members and Channels alike. `archiveMember` commits `team/member-archived`, disposes the live session while keeping private memory and the Session log on disk, archives the Session from grouping surfaces, and releases the Member's active Claims with public `claims_released` Activities plus Attention/marker cleanup. `archiveChannel` commits `team/channel-archived` with the same release shape across every owner on the Channel's Threads. Memberships survive both forms — hidden state, not departure. Archived entities are gone from every Team API surface: projections, ref resolution (their Task refs stop resolving, so message bodies render plain text), and ref-addressed reads (`readThread`/`threadHistory`/`threadObservations`/`listClaims` reject with an explicit archived error) — while the facts stay complete in the ledger for replay and a future restore; that boundary is the archival-vs-remove divide. Removal from archived stays available as the data hygiene path; there is no restore entry point yet (mirroring archived dsh sessions).
24
24
 
@@ -34,7 +34,7 @@ Adding a Member to a Channel grants future read/send/claim authority but injects
34
34
 
35
35
  Member replies require the exact current Thread revision and atomically update Message and Thread facts. `threadRef` is the primary collaboration identity; released task-only Clients may send a Host-resolved `taskRef` alias for taskful Threads, while Task/Claim operations remain Task-ref based. Unread work must be read before a mutation; stale revisions are rejected after that unread gate. A closed Task rejects replies and new Attention; reopening restores the Task without restoring prior Attention. Taskless Threads still support replies, follow, mentions, Inbox, read, and history, but have no Claims or Task-resolution path. Top-level Messages may mention Agents directly: mentioned Members start following the new Thread. In an existing Thread, a Human reply mentioning a Member that is not currently following requires a process-local, one-use confirmation token before the operation commits, while such a Member reply commits and delivers only to Members the Thread has ever carried, reporting the rest as undelivered. Mentions are authored in the Message body as `@Handle` and resolved by the Host against the Channel's addressable names; Message facts carry the resolved refs, and the Client renders mention chips only for those Members. Claim/done/release and Task changes are ordered host-authored Activities. Active Claims exclude only the same normalized Direction; different Directions can run concurrently. Task state is derived from Claims unless Human acceptance or closure overrides it. Close releases active Claims and clears Thread Attention atomically. Member removal marks the member inactive, releases owned active Claims, clears its Attention and direct markers, and archives the session after the durable commit. Message and Activity facts share one bounded sequence cursor.
36
36
 
37
- `changes()` is the Client invalidation stream. Each request declares one optional `scope` — workspace, channel, or thread plus an abortable transport signal; a committed operation wakes only waiters whose scope matches the scopes derived from that operation (member lifecycle and presence wake their Workspace; content operations wake their Channel and Thread). A Thread read derives no scope, because it advances only the reader's private watermark and a read that finds nothing unread for its reader (no watermark to advance, no marker to consume) appends no operation at all: it answers with the same projection-derived picture and no receipt, so an already-read Thread costs neither a durable write nor a replay. After each commit the Host notifies only the Members whose Inbox projection the operation can have changed — the operation's Attention/marker delta plus current followers of the touched Threads never every live Agent.
37
+ `changes({ scope? }, signal?)` returns an `AsyncIterable<{ version: number }>` through a streaming Remote. It emits the current baseline, then matching workspace/channel/thread/presence invalidations; omitting scope observes shared projections but not presence. A paused consumer retains only the latest pending version; cancellation or Host disposal closes the stream. The Client must reread projections on every baseline, even when the version is unchanged or lower after a restart. See [architecture](../../docs/architecture.md#host-authority) for scope/version and recovery semantics. Thread reads change only private read state: they wake no scope, and a read with no unread or markers to consume appends no operation. After a commit, Inbox hints are recomputed only for affected Members.
38
38
 
39
39
  M1 supports one Host writer. The ledger is permanent and has no snapshot or compaction path.
40
40
 
@@ -18,7 +18,7 @@ Service 使用 `ctx.storageDomain`、`ctx.workspaceRegistry`、`ctx.agents`、`c
18
18
 
19
19
  `storage-domain` 在持久读取处校验每条 record,并拒绝被其他版本标记的 backend unit。Team 只在 `KvTable.put()` 完成后更新 projection。其 Fiber 持有 Domain handle;dispose 通过 Cordis 移除拒绝新的 Service 调用,排空已接受的 Domain write,并在名称可重新打开前关闭 backend unit。
20
20
 
21
- 创建 Member 时,先提交稳定的 Member/session/Workspace/preset/private-memory 身份,再执行 unpublished Agent setup。Setup 挂载指定 preset,并在发布前检查带 marker 的 `team_message` 和全部八个 Team tools。失败只把该 Member 标为 unavailable。Suspend 等待所属 `AgentHandle` 完全停止;resume 和 Host remount 恢复同一个持久 session。
21
+ 创建 Member 时,先提交稳定的 Member/session/Workspace/preset/private-memory 身份,再执行 unpublished Agent setup。创建 Workspace 记录为 Member 的创建地;更多 Workspace 通过参与操作(`team/member-workspace-joined`/`team/member-workspace-left`)加入与退出——加入即获得协作能力,不移动 Session。Setup 挂载指定 preset,并在发布前检查带 marker 的 `team_message` 和全部八个 Team tools。失败只把该 Member 标为 unavailable。Suspend 等待所属 `AgentHandle` 完全停止;resume 和 Host remount 恢复同一个持久 session。
22
22
 
23
23
  归档(archival)是介于 suspend 与 remove 之间的可逆第三态,Member 与 Channel 通用。`archiveMember` 提交 `team/member-archived`,dispose 活跃 session(私有记忆与 Session log 留在磁盘),把 Session 从分组面归档,并释放该 Member 的活跃 Claim(公开 `claims_released` Activity + Attention/marker 清理)。`archiveChannel` 提交 `team/channel-archived`,对该频道全部 Threads 上所有 owner 做同样的释放。两种归档都保留 Memberships——是隐藏而非离开。归档实体在所有 Team API 面上"默认不存在":投影、ref 解析(其 Task ref 不再解析,消息正文渲染为纯文本)、按 ref 的读取(`readThread`/`threadHistory`/`threadObservations`/`listClaims` 以明确的 archived 错误拒绝)——而事实在 ledger 中完整保留,供重放与未来恢复;这条边界正是归档与 remove 的分界。从归档态 remove 仍可用(数据卫生路径);本轮有意不提供恢复入口(对齐 dsh session 归档现状)。
24
24
 
@@ -34,7 +34,7 @@ Skills 是 Member 私有的:preset 不带共享 skill-filesystem row,Host
34
34
 
35
35
  Member reply 必须携带准确的当前 Thread revision,并在一个 operation 内更新 Message 和 Thread facts。`threadRef` 是协作主身份;released task-only Client 可为 taskful Thread 传入 Host-resolved `taskRef` alias,而 Task/Claim 操作仍以 Task ref 为准。未读工作必须先 read;revision 过期时拒绝写入。Closed Task 拒绝 reply 和新的 Attention;reopen 恢复 Task,但不恢复之前的 Attention。taskless Thread 仍支持 reply、follow、mention、Inbox、read 和 history,但没有 Claim 或 Task resolution path。顶层消息可以直接 mention Agent:被 mention 的 Member 会开始关注新 Thread。在既有 Thread 中,Human 的 reply 提到当前未 follow 的 Member 时必须先取得 process-local one-use confirmation token 才提交 operation;Member 的此类 reply 会提交,但只送达该 Thread 曾经承载过的 Member,其余在结果里报告为未送达。mention 在 Message 正文里以 `@Handle` 撰写,由 Host 按 Channel 的可寻址名字解析;Message fact 携带解析后的 refs,Client 只为这些 Member 渲染 mention chip。claim/done/release 和 Task change 是有序的 host-authored Activity。Active Claim 只排斥相同的 normalized Direction;不同 Direction 可以并行。Task status 从 Claims 派生,Human accept/close 是覆盖事实。Close 原子释放 active Claims 并清除 Thread Attention。Member remove 原子标记 inactive、释放 owned active Claims、清除该成员的 Attention 和 direct markers,再归档 session。Message 与 Activity facts 共用一个有界 sequence cursor。
36
36
 
37
- `changes()` Client 失效通知流。每个请求声明一个可选 `scope`(workspace、channel thread)和可取消的传输 signal;一次提交的 operation 只唤醒 scope 与该 operation 派生范围匹配的 waiter(成员生命周期与 presence 唤醒其 Workspace,内容操作唤醒其 Channel 与 Thread)。Thread read 不派生任何 scope,因为它只推进读者自己的私有水位——而一次读如果对读者没有任何未读(没有水位可推进、没有 marker 可消费),就完全不追加 operation:它返回同一份由 projection 派生的画面且不带 receipt,所以已读完的 Thread 既不付一次持久写、也不付一次重放。每次提交后,Host 只通知 Inbox projection 可能被该 operation 改变的 Member——即 operation 的 Attention/marker delta 加上被触及 Thread 的当前关注者——而不是全部在线 Agent
37
+ `changes({ scope? }, signal?)` 通过流式 Remote 返回 `AsyncIterable<{ version: number }>`。先发送当前基线,之后发送匹配的 workspace/channel/thread/presence 通知;省略 scope 时观察共享投影,不包含 presence。消费者暂停期间只保留最新待发送版本;取消或 Host 释放时关闭流。Client 必须在每次基线到达时重读投影,即使重启后的版本相同或更低。scope、版本和恢复语义见[架构文档](../../docs/architecture.zh.md#host-authority)。Thread read 只改变私有已读状态,不唤醒任何 scope;没有未读或 marker 可消费时不追加 operation。提交后只为受影响的 Members 重算 Inbox hints
38
38
 
39
39
  M1 支持单个 Host writer。Ledger 永久保留,不提供 snapshot 或 compaction。
40
40