@yankeguo/dsh-devlead-protocol 0.4.1 → 0.4.2-rc.2

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 (4) hide show
  1. package/README.md +21 -7
  2. package/lib/client.js +14646 -6
  3. package/lib/index.js +14646 -6
  4. package/package.json +4 -3
package/README.md CHANGED
@@ -1,10 +1,19 @@
1
1
  # @yankeguo/dsh-devlead-protocol
2
2
 
3
3
  Pure shared protocol for the DevLead plugin suite: durable record payloads, Session projection
4
- types, formatting helpers, and the constants both the Host and the browser bundle use.
4
+ types, the strict project-board wire schema (v1), formatting helpers, and the constants both the
5
+ Host and the browser bundle use. It is the only package both halves share: the board's default
6
+ path segments (`DEVLEAD_BOARD_DIR_SEGMENTS`, `DEVLEAD_BOARD_FILE_NAME`) and the
7
+ `DEVLEAD_BOARD_READ_MAX_BYTES` tool-read cap live here, so the Host (which derives
8
+ `<lead header.cwd>/.dsh/devlead/board.json`) and the browser (which derives the same default path
9
+ from the Session summary `cwd` when the page-load global is absent) cannot drift.
5
10
 
6
11
  This package has **no runtime dependency** on any DSH package. Its single DSH import is a
7
- type-only projection-map augmentation; it is erased at build time. Installing it alone does not
12
+ type-only projection-map augmentation; it is erased at build time. The one third-party runtime
13
+ dependency is `zod`, which builds the board schema shared by the Host validator and the browser
14
+ decoder: both published entries bundle it, so an installed profile does not need to resolve `zod`
15
+ for the Host half, while DSH's browser build imports the frozen module table's `zod` platform
16
+ singleton (the same module `client-ui` already relied on). Installing this package alone does not
8
17
  enable DevLead — install the bundle (below) to get the host service, tools, command, and UI.
9
18
 
10
19
  ## Install
@@ -22,7 +31,7 @@ Only install this package directly when you are composing the suite yourself.
22
31
  | Export | Contents |
23
32
  | --- | --- |
24
33
  | `@yankeguo/dsh-devlead-protocol` | Host entry; re-exports the client-safe surface |
25
- | `@yankeguo/dsh-devlead-protocol/client` | Browser-safe constants, types, and pure formatting helpers |
34
+ | `@yankeguo/dsh-devlead-protocol/client` | Browser-safe constants, types, pure formatting helpers, the shared board schema factory, and the default board path segments / read cap |
26
35
  | `@yankeguo/dsh-devlead-protocol/package.json` | Package manifest |
27
36
 
28
37
  The public contract includes the `devLead` / `devLeadMode` / `devLeadWatch` projection keys and
@@ -34,7 +43,14 @@ restarts all three projections from their empty state), the summary-sized `DevLe
34
43
  instant constants, transition/report-kind vocabulary, `devLeadReportId`, `reportLine`,
35
44
  `notificationLine` / `excerptLine` / `formatInstant`, the `DevLeadUseWorkspaceRequest` shape
36
45
  (`{ path, title?, create? }`, `create` defaults to `false`), and the `DevLeadIsolation` outcome
37
- carried by the required `DevLeadCreatedSession.isolation` field.
46
+ carried by the required `DevLeadCreatedSession.isolation` field, plus the project-board contract:
47
+ the schema version, byte/count/length limits, the default path segment constants, the 64 KiB
48
+ `DEVLEAD_BOARD_READ_MAX_BYTES` read cap, durable project/blocker/task types, and
49
+ `createDevLeadBoardSchema(isAbsolutePath)` — one strict decoder both the Host (with its own
50
+ `node:path.isAbsolute`) and the browser (with the Host-published `pathPlatform`) consume, including
51
+ duplicate project/workspace-path/blocker/task rules, UTC-only timestamps, and strict unknown-field
52
+ rejection. `client-ui` imports these constants from this package instead of depending on the Host
53
+ core package.
38
54
 
39
55
  ## Related docs
40
56
 
@@ -45,6 +61,4 @@ carried by the required `DevLeadCreatedSession.isolation` field.
45
61
  ## 中文
46
62
 
47
63
  `@yankeguo/dsh-devlead-protocol` 是 DevLead 套件的纯协议包:host 与浏览器共用的类型、常量、
48
- projection 键(`devLead` / `devLeadMode` / `devLeadWatch`)、`plugin:devlead/*` 持久记录类型(mode / watch / notification / report / reset)与格式化
49
- 函数,以及 `DevLeadUseWorkspaceRequest`、必填的 `DevLeadCreatedSession.isolation` 等请求/结果
50
- 形状。它没有运行时 DSH 依赖,通常随 bundle 安装。完整中文文档见[根 README.zh.md](https://github.com/yankeguo/dsh-devlead/blob/main/README.zh.md)与[设计说明](https://github.com/yankeguo/dsh-devlead/blob/main/docs/DESIGN.md)。
64
+ projection 键(`devLead` / `devLeadMode` / `devLeadWatch`)、`plugin:devlead/*` 持久记录类型(mode / watch / notification / report / reset)、项目看板的严格 wire schema v1(`createDevLeadBoardSchema(isAbsolutePath)`、limits、持久类型、重复 id/path 与 UTC 时间规则、RFC 6901 issue 映射)与格式化函数,以及 `DevLeadUseWorkspaceRequest`、必填的 `DevLeadCreatedSession.isolation` 等请求/结果形状。包内另导出看板默认路径段常量(`DEVLEAD_BOARD_DIR_SEGMENTS` = `.dsh`/`devlead`、`DEVLEAD_BOARD_FILE_NAME` = `board.json`)与 `devlead_board_read` 的 64 KiB 上限 `DEVLEAD_BOARD_READ_MAX_BYTES`,Host 与浏览器各自用自己的路径实现派生同一默认路径,不会各写一份。它没有运行时 DSH 依赖;`zod` 是唯一的第三方运行期依赖,会被打包进两个发布入口,浏览器侧使用 DSH 冻结 module table 的 `zod` platform singleton。`@yankeguo/dsh-client-ui-devlead` 只依赖本包(不依赖 `@yankeguo/dsh-devlead`)。通常随 bundle 安装。完整中文文档见[根 README.zh.md](https://github.com/yankeguo/dsh-devlead/blob/main/README.zh.md)与[设计说明](https://github.com/yankeguo/dsh-devlead/blob/main/docs/DESIGN.md)。