@yankeguo/dsh-devlead 0.2.4 → 0.2.6

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 CHANGED
@@ -2,8 +2,32 @@
2
2
 
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
- with directory creation opt-in), the watched-session notification hub with cold-lead rehydration,
6
- and the `devLead` / `devLeadMode` Session projections.
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.
7
+
8
+ DevLead mode is **globally single-active**: at most one Session (across every Workspace) may be
9
+ enabled. `setEnabled(agent, true)` throws `DEVLEAD_ALREADY_ACTIVE` naming the occupant when another
10
+ Session holds it; `off`/`reset` release immediately, archiving or deleting the holder makes it
11
+ releasable, and a restart/rehydration reconciles historical duplicates and keeps one Session.
12
+ Admission is serialized in-process and scans live projections plus the durable corpus.
13
+
14
+ `reportProgress(agent, { message, kind?, summary? }, signal?)` lets a watched, non-DevLead Session
15
+ send a one-way report to its unique active lead. It resolves the active lead that watches it through
16
+ the hub's reverse index, validates size/kind, deduplicates identical messages within a turn, enforces four
17
+ distinct reports per turn (`DEVLEAD_REPORT_RATE_LIMITED`), and otherwise refuses with
18
+ `DEVLEAD_NOT_SUPERVISED`. The receipt is `{ report, durable, queued, warning? }`.
19
+
20
+ The report is first written to a durable outbox (`devlead_report_outbox` over the optional
21
+ `storageDomain` KV facility), then a `plugin:devlead/report` receipt is appended to the lead's
22
+ Session log. The outbox row is removed only after the lead log flush succeeds; a cold/archived/
23
+ unattached lead leaves it for replay on the next boot/lead activation. Rows are pruned after seven
24
+ days, and `/devlead reset` drops that lead's pending rows. A Host without storage-domain returns
25
+ `durable: false` with an explicit warning. `supervisorOf(agent)` / `isSupervised(agent)` are
26
+ synchronous tool-gating queries; `reports(agent, { limit? })` reads the lead digest.
27
+
28
+ Archived holders are not active leads: admission ignores them, writes a durable tombstone when the
29
+ mode-off cannot be written, and `/devlead status` exposes them with the unarchive/off/delete
30
+ recovery path. Opening an unarchived holder reconciles it back to one active lead.
7
31
 
8
32
  Normally installed as part of the bundle:
9
33
 
@@ -13,13 +37,14 @@ dsh plugin --profile desktop add @yankeguo/dsh-devlead-bundle
13
37
 
14
38
  ## Requirements
15
39
 
16
- - DSH `>=0.2.2-rc.1 <0.3.0` (the installed runtime is `0.2.2-rc.1`).
40
+ - DSH `0.2.2-rc.1`–`0.2.2-rc.4` (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).
17
41
  - Peer services `agents`, `sessions`, `sessionProjections` (provided by the default `dsh-base`
18
42
  composition).
19
43
  - Optional, probed at call time: `workspaceRegistry`, `sessionController`, `sessionTitle`,
20
44
  `agentPresets` (read-only preset roster discovery), `sessionQuery`, `sessionProjectionCache`
21
- (cold-lead rehydration pre-filter), `sessionPersistence` (durable-corpus readiness barrier), and
22
- the experimental `worktrees` capability. Missing optional services degrade to fewer features or
45
+ (cold-lead rehydration pre-filter), `sessionPersistence` (durable-corpus readiness barrier),
46
+ `storageDomain` (durable report outbox and archived-holder tombstones), and the experimental
47
+ `worktrees` capability. Missing optional services degrade to fewer features or
23
48
  structured domain errors; no experimental package is imported, injected, or declared.
24
49
  - Cold-lead rehydration: at plugin load the hub rebuilds its watch index from durable state
25
50
  (`sessionQuery` listing → projection-cache pre-filter → exact fold; unclassified rows are capped
@@ -45,7 +70,7 @@ validated at both the Loader and direct-construction boundaries.
45
70
 
46
71
  `@yankeguo/dsh-devlead` 是套件的 Host 核心服务 `ctx.devLead`:模式开关、损坏状态恢复
47
72
  `reset()`、Workspace/Session 编排(`useWorkspace(agent, request, signal?)`,目录创建 opt-in)、
48
- 带冷 lead 索引重建的 watch 索引与通知投递,以及 `devLead` / `devLeadMode` projection。
73
+ 带冷 lead 索引重建的关注关系索引与通知投递,以及 `devLead` / `devLeadMode` / `devLeadWatch` projection。
49
74
  `agents`、`sessions`、`sessionProjections` 为必需 peer;Workspace registry、Session controller、
50
75
  标题/查询服务、projection cache、`sessionPersistence`(冷重建就绪屏障)与实验性 worktree 能力
51
76
  均为可选探测。完整中文文档见[根 README.zh.md](https://github.com/yankeguo/dsh-devlead/blob/main/README.zh.md)与