@deepseek-ai/dsh-workspace 0.1.7-rc.1 → 0.2.0-rc.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.
package/README.i18n.yaml CHANGED
@@ -1,6 +1,88 @@
1
- # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
- # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
- # after editing either side, bring the other along and re-record with:
1
+ # Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
2
+ # section, a hash of its English and Chinese blocks outside code blocks and generated regions.
3
+ # After editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/workspace/workspace/README.md
5
- README.md: 59b314a7302c5cf83314d08f6e8bdfe2dccba37f
6
- README.zh.md: 78d563ee59048d5b1b6f976ac26f64907174645d
5
+ /:
6
+ en: d112c03aefc9a73d
7
+ zh: e2ea3f0a9c814a23
8
+ /deepseek-ai-dsh-workspace:
9
+ en: 7a12adba4e7766e3
10
+ zh: f6d5c8374f4512c8
11
+ /deepseek-ai-dsh-workspace/summary:
12
+ en: 58d66b238882b849
13
+ zh: a427930afd293c6b
14
+ /deepseek-ai-dsh-workspace/table-of-contents:
15
+ en: d152484eb41ac6b4
16
+ zh: 09388d293f9be9cb
17
+ /deepseek-ai-dsh-workspace/use-this-package:
18
+ en: 37d744451570942e
19
+ zh: 7f8200725a1cca54
20
+ /deepseek-ai-dsh-workspace/use-this-package/when-to-use-it:
21
+ en: f24dd905d5bcac3e
22
+ zh: 16b91b99fdaf5add
23
+ /deepseek-ai-dsh-workspace/use-this-package/setting-up:
24
+ en: f4611634be527eb0
25
+ zh: 89d35d640a2c1cc4
26
+ /deepseek-ai-dsh-workspace/use-this-package/creating-and-ordering-projects:
27
+ en: a092fc7b0db9c299
28
+ zh: 6d7ed93e34237773
29
+ /deepseek-ai-dsh-workspace/use-this-package/first-use-workspace:
30
+ en: 2bfeef54ad410e63
31
+ zh: 98b79574586d000a
32
+ /deepseek-ai-dsh-workspace/use-this-package/grouping-sessions-under-a-project:
33
+ en: 510be21d012de28c
34
+ zh: fdcb05447d6ba93c
35
+ /deepseek-ai-dsh-workspace/use-this-package/hiding-and-restoring-sessions-and-removing-projects:
36
+ en: f6f19cd64d8db3b0
37
+ zh: 55875a2c4d8e4d1f
38
+ /deepseek-ai-dsh-workspace/understand-the-implementation:
39
+ en: 447ced401b3b14a8
40
+ zh: 3ce2105605223945
41
+ /deepseek-ai-dsh-workspace/understand-the-implementation/design-philosophy:
42
+ en: e8ff536e19566447
43
+ zh: 53ba4c15f10c1549
44
+ /deepseek-ai-dsh-workspace/understand-the-implementation/api-behavior:
45
+ en: 69327adb9ea52680
46
+ zh: fa32eea5019c7abb
47
+ /deepseek-ai-dsh-workspace/understand-the-implementation/source-map:
48
+ en: c6de390af6b1a187
49
+ zh: 85699c7c5c3afe3a
50
+ /deepseek-ai-dsh-workspace/understand-the-implementation/durable-shape:
51
+ en: 056a266f4a15b29d
52
+ zh: e1589f5750662887
53
+ /deepseek-ai-dsh-workspace/understand-the-implementation/lifecycle:
54
+ en: e41db10d48acbf9a
55
+ zh: 457d329fe37ba33c
56
+ /deepseek-ai-dsh-workspace/understand-the-implementation/failure-and-recovery:
57
+ en: 7a2f7802debbdd75
58
+ zh: fbf4603f52863a6c
59
+ /deepseek-ai-dsh-workspace/understand-the-implementation/invariant:
60
+ en: d20f2bba9aab0d1d
61
+ zh: 2ff06f27e7a8a867
62
+ /deepseek-ai-dsh-workspace/further-exploration:
63
+ en: ea6e4da02bc6da4e
64
+ zh: 5168484d76a27436
65
+ /deepseek-ai-dsh-workspace/model-experience:
66
+ en: 215e7ba838619b7b
67
+ zh: a311da3843709f90
68
+ /deepseek-ai-dsh-workspace/model-experience/workspace-records-and-session-accounts:
69
+ en: c5c7dfdfe3cea27f
70
+ zh: 6e75bd1afacba4c4
71
+ /deepseek-ai-dsh-workspace/model-experience/workspace-records-and-session-accounts/what-the-model-sees:
72
+ en: ab7deb3130db939e
73
+ zh: b717a7fc60146cd3
74
+ /deepseek-ai-dsh-workspace/model-experience/workspace-records-and-session-accounts/token-effect:
75
+ en: 5b83ac7ce1ea1346
76
+ zh: dc56664cd257ab8e
77
+ /deepseek-ai-dsh-workspace/model-experience/workspace-records-and-session-accounts/kv-cache-effect:
78
+ en: 524afbded27fb06b
79
+ zh: 9dcf8539495e9c68
80
+ /deepseek-ai-dsh-workspace/known-limitations-and-deferred-work:
81
+ en: ca8f1d8617b303eb
82
+ zh: aeff1adad175ebb5
83
+ /deepseek-ai-dsh-workspace/known-limitations-and-deferred-work/dev-note:
84
+ en: ac1d08360a93382b
85
+ zh: 6c58749bae9a6e65
86
+ /deepseek-ai-dsh-workspace/known-limitations-and-deferred-work/dev-note/open-the-create-path-title-title-parameter:
87
+ en: 65867b2bb7aba416
88
+ zh: 38547efe92828640
package/README.md CHANGED
@@ -64,7 +64,7 @@ ctx.workspaceRegistry.list() // shows the project, newest first
64
64
 
65
65
  `initializeDefault(resolveDirectory)` initializes the default Workspace without creating a Session. Initial creation requires an empty Workspace registry and no live, persisted, or archived Session, including Sessions without a working directory. The registry checks persistent history directly; an empty visible sidebar is insufficient.
66
66
 
67
- The directory resolver runs inside the mutation queue only when creation is eligible. It returns an absolute path and initial title; the registry creates missing parent directories, canonicalizes the path, rechecks Session history, and commits the Workspace with its initialization marker. An existing directory is reused; a file conflict or directory failure rejects initialization. The [Host controller](../../api/workspace-controller/README.md#first-use-workspace) supplies the Documents path policy.
67
+ The directory resolver runs inside the mutation queue only when creation is eligible. It returns an absolute path; the registry creates missing parent directories, canonicalizes the path, rechecks Session history, and commits the Workspace with its initialization marker, titled after the requested directory's final segment rather than the canonical one, so a symlink at that path does not retitle the Workspace after its target. An existing directory is reused; a file conflict or directory failure rejects initialization. The [Host controller](../../api/workspace-controller/README.md#first-use-workspace) supplies the Documents path policy.
68
68
 
69
69
  The first successful registration records its identity durably. Repeated calls return it without resolving a directory again; renaming keeps that identity, and deleting its registration does not permit another automatic creation. Directory or registration failure leaves initialization unset for retry. Directories created before a later failure remain on disk. Once directory resolution succeeds, caller cancellation does not roll back directory creation or registration. The [first-use decision](../../../.agents/notes/implemented/feature/2026-09-20-default-workspace.md) explains this lifetime.
70
70
 
package/README.zh.md CHANGED
@@ -64,7 +64,7 @@ ctx.workspaceRegistry.list() // shows the project, newest first
64
64
 
65
65
  `initializeDefault(resolveDirectory)` 初始化默认 Workspace,不创建 Session。首次创建要求 Workspace 注册表为空,且不存在运行时、持久化或已归档 Session,包括没有工作目录的 Session。注册表直接检查持久化历史;仅凭可见侧边栏为空不足以判断。
66
66
 
67
- 目录解析器仅在允许创建时于变更队列内运行。它返回绝对路径和初始标题;注册表创建缺失的父目录、规范化路径、重新检查 Session 历史,再一起提交 Workspace 和初始化标记。已存在的目录直接复用;文件冲突或目录操作失败时拒绝初始化。[Host 控制器](../../api/workspace-controller/README.zh.md#first-use-workspace)提供 Documents 路径策略。
67
+ 目录解析器仅在允许创建时于变更队列内运行。它返回绝对路径;注册表创建缺失的父目录、规范化路径、重新检查 Session 历史,再一起提交 Workspace 和初始化标记,标题取所请求目录(而非规范路径)的最后一段,因此该路径上的符号链接不会让工作区改用链接目标的名称。已存在的目录直接复用;文件冲突或目录操作失败时拒绝初始化。[Host 控制器](../../api/workspace-controller/README.zh.md#first-use-workspace)提供 Documents 路径策略。
68
68
 
69
69
  首次成功登记会持久保存工作区身份。重复调用直接返回它,不再解析目录;改名保留该身份,删除登记也不会允许再次自动创建。目录或登记失败时,初始化状态保持未设置,可以重试。后续步骤失败前已创建的目录会保留在磁盘上。目录解析成功后,调用方取消操作不会回滚目录创建或登记。[首次使用决策](../../../.agents/notes/implemented/feature/2026-09-20-default-workspace.zh.md)说明这一生命周期。
70
70
 
package/lib/index.js CHANGED
@@ -412,9 +412,11 @@ var WorkspaceRegistry = class extends Service {
412
412
  * Initialize the default Workspace only while both the registry and Session
413
413
  * history are empty. Repeated requests reuse its durable identity; deleting
414
414
  * that registration permanently disables automatic creation.
415
- * @param resolveDirectory - resolve the absolute directory and initial title;
416
- * called only for eligible creation, inside the registry mutation queue.
417
- * Missing directories are created recursively before registration.
415
+ * @param resolveDirectory - resolve the absolute directory; called only for
416
+ * eligible creation, inside the registry mutation queue. Missing directories
417
+ * are created recursively before registration, and the initial title is the
418
+ * requested directory's own final segment — not the canonical one, so a
419
+ * symlink at that path does not retitle the Workspace after its target.
418
420
  * After resolution, caller cancellation does not roll back creation or registration.
419
421
  * @returns the initialized Workspace, or undefined when automatic creation is ineligible.
420
422
  */
@@ -425,12 +427,12 @@ var WorkspaceRegistry = class extends Service {
425
427
  const sessions = this.ctx.get("sessions");
426
428
  if (sessions === void 0) throw new Error("default Workspace initialization requires the Session store");
427
429
  if (state.workspaceIds.length > 0 || state.archivedSessionIds.length > 0 || sessions.list().length > 0 || (await this.listStoredHeaders()).length > 0) return void 0;
428
- const { path, title } = await resolveDirectory();
430
+ const path = await resolveDirectory();
429
431
  if (!fullyQualifiedWorkspacePath(path)) throw new TypeError(`Workspace path is not fully qualified: '${path}'`);
430
432
  await mkdir(path, { recursive: true });
431
433
  const canonical = await realpathNormalize(path);
432
434
  if ((await this.listStoredHeaders()).length > 0 || sessions.list().length > 0) return void 0;
433
- return this.createCanonical(canonical, title, true);
435
+ return this.createCanonical(canonical, defaultWorkspaceTitle(path), true);
434
436
  });
435
437
  }
436
438
  /**
@@ -147,16 +147,15 @@ export declare class WorkspaceRegistry extends Service {
147
147
  * Initialize the default Workspace only while both the registry and Session
148
148
  * history are empty. Repeated requests reuse its durable identity; deleting
149
149
  * that registration permanently disables automatic creation.
150
- * @param resolveDirectory - resolve the absolute directory and initial title;
151
- * called only for eligible creation, inside the registry mutation queue.
152
- * Missing directories are created recursively before registration.
150
+ * @param resolveDirectory - resolve the absolute directory; called only for
151
+ * eligible creation, inside the registry mutation queue. Missing directories
152
+ * are created recursively before registration, and the initial title is the
153
+ * requested directory's own final segment — not the canonical one, so a
154
+ * symlink at that path does not retitle the Workspace after its target.
153
155
  * After resolution, caller cancellation does not roll back creation or registration.
154
156
  * @returns the initialized Workspace, or undefined when automatic creation is ineligible.
155
157
  */
156
- initializeDefault(resolveDirectory: () => Promise<{
157
- path: string;
158
- title: string;
159
- }>): Promise<Workspace | undefined>;
158
+ initializeDefault(resolveDirectory: () => Promise<string>): Promise<Workspace | undefined>;
160
159
  /**
161
160
  * Look up a workspace by id.
162
161
  * @param id - Workspace id.
@@ -161,9 +161,11 @@ export class WorkspaceRegistry extends Service {
161
161
  * Initialize the default Workspace only while both the registry and Session
162
162
  * history are empty. Repeated requests reuse its durable identity; deleting
163
163
  * that registration permanently disables automatic creation.
164
- * @param resolveDirectory - resolve the absolute directory and initial title;
165
- * called only for eligible creation, inside the registry mutation queue.
166
- * Missing directories are created recursively before registration.
164
+ * @param resolveDirectory - resolve the absolute directory; called only for
165
+ * eligible creation, inside the registry mutation queue. Missing directories
166
+ * are created recursively before registration, and the initial title is the
167
+ * requested directory's own final segment — not the canonical one, so a
168
+ * symlink at that path does not retitle the Workspace after its target.
167
169
  * After resolution, caller cancellation does not roll back creation or registration.
168
170
  * @returns the initialized Workspace, or undefined when automatic creation is ineligible.
169
171
  */
@@ -178,7 +180,7 @@ export class WorkspaceRegistry extends Service {
178
180
  if (state.workspaceIds.length > 0 || state.archivedSessionIds.length > 0
179
181
  || sessions.list().length > 0 || (await this.listStoredHeaders()).length > 0)
180
182
  return undefined;
181
- const { path, title } = await resolveDirectory();
183
+ const path = await resolveDirectory();
182
184
  if (!fullyQualifiedWorkspacePath(path))
183
185
  throw new TypeError(`Workspace path is not fully qualified: '${path}'`);
184
186
  await mkdir(path, { recursive: true });
@@ -186,7 +188,7 @@ export class WorkspaceRegistry extends Service {
186
188
  // A Session can start outside the registry queue while directory preparation awaits I/O.
187
189
  if ((await this.listStoredHeaders()).length > 0 || sessions.list().length > 0)
188
190
  return undefined;
189
- return this.createCanonical(canonical, title, true);
191
+ return this.createCanonical(canonical, defaultWorkspaceTitle(path), true);
190
192
  });
191
193
  }
192
194
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-workspace",
3
3
  "description": "Workspace entity registry (ctx.workspaceRegistry): durable workspace records with validated session attachment over the domain data form for the DeepSeek Harness",
4
- "version": "0.1.7-rc.1",
4
+ "version": "0.2.0-rc.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -38,24 +38,24 @@
38
38
  "license": "MIT",
39
39
  "peerDependencies": {
40
40
  "@deepseek-ai/cordis": "~4.0.4",
41
- "@deepseek-ai/dsh-session-persistence": "0.1.7-rc.1",
42
- "@deepseek-ai/dsh-storage": "0.1.7-rc.1",
43
- "@deepseek-ai/dsh-invariants": "0.1.7-rc.1",
44
- "@deepseek-ai/dsh-storage-domain": "0.1.7-rc.1",
45
- "@deepseek-ai/dsh-typert-protocol": "0.1.7-rc.1",
46
- "@deepseek-ai/dsh-session": "0.1.7-rc.1"
41
+ "@deepseek-ai/dsh-session": "0.2.0-rc.1",
42
+ "@deepseek-ai/dsh-storage": "0.2.0-rc.1",
43
+ "@deepseek-ai/dsh-storage-domain": "0.2.0-rc.1",
44
+ "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.1",
45
+ "@deepseek-ai/dsh-invariants": "0.2.0-rc.1",
46
+ "@deepseek-ai/dsh-session-persistence": "0.2.0-rc.1"
47
47
  },
48
48
  "dependencies": {
49
49
  "zod": "^4.4.3",
50
- "@deepseek-ai/dsh-brand": "0.1.7-rc.1"
50
+ "@deepseek-ai/dsh-brand": "0.2.0-rc.1"
51
51
  },
52
52
  "devDependencies": {
53
- "@deepseek-ai/dsh-session-persistence": "0.1.7-rc.1",
54
- "@deepseek-ai/dsh-storage": "0.1.7-rc.1",
55
- "@deepseek-ai/dsh-typert-protocol": "0.1.7-rc.1",
56
- "@deepseek-ai/dsh-storage-domain": "0.1.7-rc.1",
57
- "@deepseek-ai/dsh-invariants": "0.1.7-rc.1",
58
53
  "@deepseek-ai/cordis": "~4.0.4",
59
- "@deepseek-ai/dsh-session": "0.1.7-rc.1"
54
+ "@deepseek-ai/dsh-invariants": "0.2.0-rc.1",
55
+ "@deepseek-ai/dsh-session": "0.2.0-rc.1",
56
+ "@deepseek-ai/dsh-session-persistence": "0.2.0-rc.1",
57
+ "@deepseek-ai/dsh-storage": "0.2.0-rc.1",
58
+ "@deepseek-ai/dsh-storage-domain": "0.2.0-rc.1",
59
+ "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.1"
60
60
  }
61
61
  }