@yankeguo/dsh-devlead 0.4.0 → 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.
- package/README.md +32 -7
- package/lib/index.js +1468 -47
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -3,7 +3,18 @@
|
|
|
3
3
|
Core Host service of the DevLead suite (`ctx.devLead`): the durable mode switch, damage-recovery
|
|
4
4
|
`reset()`, Workspace and Session orchestration (including `useWorkspace(agent, request, signal?)`
|
|
5
5
|
with directory creation opt-in), the watched-session notification hub with cold-lead rehydration, the mid-turn report channel for watched Sessions,
|
|
6
|
-
and the `devLead` / `devLeadMode` / `devLeadWatch` Session projections.
|
|
6
|
+
and the `devLead` / `devLeadMode` / `devLeadWatch` Session projections. `ctx.devLead.board` also
|
|
7
|
+
owns the strict, atomically written project-board JSON file. The board is **on by default**: the
|
|
8
|
+
unique active lead Session's original workspace root owns `<header.cwd>/.dsh/devlead/board.json`;
|
|
9
|
+
`boardPath` is only an optional absolute override. With no active lead (or no absolute workspace
|
|
10
|
+
root) the board is disabled (`BOARD_DISABLED`, empty summary, no browser global), and turning the
|
|
11
|
+
lead off or switching leads releases the old store/watcher before the new file is read. A board
|
|
12
|
+
start/pre-create failure is logged and surfaced as `boardStartError` but never rejects service
|
|
13
|
+
activation: the board reports `BOARD_IO_ERROR` while the rest of DevLead keeps working. `updateBoard`
|
|
14
|
+
stamps the calling lead identity and requires the caller to be the current active lead. The file is
|
|
15
|
+
lead-AI-writable and human/browser-read-only.
|
|
16
|
+
See [docs/BOARD.md](https://github.com/yankeguo/dsh-devlead/blob/main/docs/BOARD.md) for schema v1,
|
|
17
|
+
CAS, corruption handling, read caps, and the dynamic summary contract.
|
|
7
18
|
|
|
8
19
|
DevLead mode is **globally single-active**: at most one Session (across every Workspace) may be
|
|
9
20
|
enabled. `setEnabled(agent, true)` throws `DEVLEAD_ALREADY_ACTIVE` naming the occupant when another
|
|
@@ -50,7 +61,8 @@ dsh plugin --profile desktop add @yankeguo/dsh-devlead-bundle
|
|
|
50
61
|
|
|
51
62
|
- DSH `0.2.2-rc.1`–`0.2.2-rc.5` (the package declares `engines.dsh: >=0.2.2-rc.1 <0.3.0`; this checkout's devDependencies pin rc.1 for the oldest-API typecheck).
|
|
52
63
|
- Peer services `agents`, `sessions`, `sessionProjections` (provided by the default `dsh-base`
|
|
53
|
-
composition).
|
|
64
|
+
composition). The board file uses the peer library `@deepseek-ai/dsh-atomic-write`
|
|
65
|
+
(`writeFileAtomic` / `withFileLock`), which the installed DSH runtime provides.
|
|
54
66
|
- Optional, probed at call time: `workspaceRegistry`, `sessionController`, `sessionTitle`,
|
|
55
67
|
`agentPresets` (read-only preset roster discovery), `sessionQuery`, `sessionProjectionCache`
|
|
56
68
|
(cold-lead rehydration pre-filter), `sessionPersistence` (durable-corpus readiness barrier),
|
|
@@ -59,15 +71,22 @@ dsh plugin --profile desktop add @yankeguo/dsh-devlead-bundle
|
|
|
59
71
|
structured domain errors; no experimental package is imported, injected, or declared.
|
|
60
72
|
- Cold-lead rehydration: at plugin load the hub rebuilds its watch index from durable state
|
|
61
73
|
(`sessionQuery` listing → projection-cache pre-filter → exact fold; unclassified rows are capped
|
|
62
|
-
at 64 full-log reads). Without a projection cache
|
|
63
|
-
|
|
64
|
-
|
|
74
|
+
at 64 full-log reads per bounded attempt, with a saved cursor). Without a projection cache every cold
|
|
75
|
+
candidate uses the same bounded exact fold. A precise unknown-non-ignorable legacy event can trigger
|
|
76
|
+
read-only recovery of the complete current v4 JSONL artifact; all DevLead records still use the strict
|
|
77
|
+
fold, and other formats/read failures stay fail closed. A disposed lead keeps observing;
|
|
78
|
+
`wakeColdSession` defaults to `true`, so a queued notification resumes the cold lead before delivering.
|
|
65
79
|
|
|
66
80
|
## Configuration
|
|
67
81
|
|
|
68
82
|
The Loader row id `devlead` accepts `notificationBatchMs`, `maxWatchedSessions`,
|
|
69
|
-
`maxListedSessions`, `wakeColdSession` (default `true` since 0.2.0),
|
|
70
|
-
(used when a created Session names no preset; an invalid id fails creation)
|
|
83
|
+
`maxListedSessions`, `wakeColdSession` (default `true` since 0.2.0), `defaultAgentPreset`
|
|
84
|
+
(used when a created Session names no preset; an invalid id fails creation), and the optional
|
|
85
|
+
`boardPath` override. The board is enabled by default: a trimmed-blank / omitted `boardPath` derives
|
|
86
|
+
`<active lead Session header cwd>/.dsh/devlead/board.json`; a non-blank value must be absolute and
|
|
87
|
+
wins over the derived path (relative paths are rejected). Existing explicit `boardPath` deployments
|
|
88
|
+
keep their path and behaviour unchanged, and no tool argument can redirect the board file.
|
|
89
|
+
See the
|
|
71
90
|
[configuration section](https://github.com/yankeguo/dsh-devlead/blob/main/README.md#configuration) for defaults and ranges; all limits are
|
|
72
91
|
validated at both the Loader and direct-construction boundaries.
|
|
73
92
|
|
|
@@ -82,6 +101,12 @@ validated at both the Loader and direct-construction boundaries.
|
|
|
82
101
|
`@yankeguo/dsh-devlead` 是套件的 Host 核心服务 `ctx.devLead`:模式开关、损坏状态恢复
|
|
83
102
|
`reset()`、Workspace/Session 编排(`useWorkspace(agent, request, signal?)`,目录创建 opt-in)、
|
|
84
103
|
带冷 lead 索引重建的关注关系索引与通知投递,以及 `devLead` / `devLeadMode` / `devLeadWatch` projection。
|
|
104
|
+
项目看板默认启用:由唯一 active lead 的 `SessionHeader.cwd` 派生
|
|
105
|
+
`<cwd>/.dsh/devlead/board.json`,`boardPath` 只作可选绝对路径 override(override 也允许 lead
|
|
106
|
+
没有 workspace 根时仍有看板);没有 lead 时禁用,
|
|
107
|
+
lead off/切换会释放旧 store/watcher,start/预创建失败只记 warning + degraded、不阻塞服务加载
|
|
108
|
+
(board 工具报 `BOARD_IO_ERROR`,其余功能照常)。看板写入使用 `@deepseek-ai/dsh-atomic-write`
|
|
109
|
+
(安装运行时提供)。
|
|
85
110
|
`agents`、`sessions`、`sessionProjections` 为必需 peer;Workspace registry、Session controller、
|
|
86
111
|
标题/查询服务、projection cache、`sessionPersistence`(冷重建就绪屏障)与实验性 worktree 能力
|
|
87
112
|
均为可选探测。完整中文文档见[根 README.zh.md](https://github.com/yankeguo/dsh-devlead/blob/main/README.zh.md)与
|