@yankeguo/dsh-tool-devlead 0.4.2-rc.5 → 0.4.2-rc.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 +7 -2
- package/lib/index.js +10 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -58,7 +58,10 @@ references still report `BOARD_PROJECT_NOT_FOUND`/`BOARD_PROJECT_AMBIGUOUS`. A b
|
|
|
58
58
|
degrades the board only: the tools report `BOARD_IO_ERROR` while DevLead keeps working. The human is
|
|
59
59
|
read-only; only the enabled lead AI writes.
|
|
60
60
|
`devlead:board-summary` is a cache-safe `systemPrompt.context()` snapshot capped at 1536 UTF-8
|
|
61
|
-
bytes; active-project rows include note counts and the latest note title when available.
|
|
61
|
+
bytes; active-project rows include note counts and the latest note title when available. The independent lead-only
|
|
62
|
+
`devlead:board-policy` section tells the model to batch updates at dispatch/close and material project changes, read
|
|
63
|
+
notes before resuming or briefing, preserve concise plans/decisions/handoffs, reconcile stale state before reporting,
|
|
64
|
+
and report board degradation once instead of repeatedly retrying. Ordinary Sessions see neither text nor board tools.
|
|
62
65
|
|
|
63
66
|
The two notes tools use the same active-lead gate and board-project id/title/absolute-path resolver,
|
|
64
67
|
but never accept a notes file path. They read and mutate only `dirname(boardPath)/notes/`: the strict
|
|
@@ -192,7 +195,9 @@ workspace path/title 不再误报 `BOARD_LIMIT_EXCEEDED`,未知引用仍是
|
|
|
192
195
|
`BOARD_PROJECT_NOT_FOUND`/`BOARD_PROJECT_AMBIGUOUS`。start 失败只降级看板(`BOARD_IO_ERROR`),
|
|
193
196
|
不阻塞 DevLead。用户只读,只有 enabled lead AI 可通过工具写入。
|
|
194
197
|
动态 `devlead:board-summary` 使用 cache-safe `systemPrompt.context()`,上限 1536 UTF-8 bytes;active
|
|
195
|
-
项目行在有数据时附带 note
|
|
198
|
+
项目行在有数据时附带 note 数与最近标题。独立 lead-only `devlead:board-policy` 引导模型在派发/收口和实质变化时
|
|
199
|
+
批量更新,恢复/派发前读 notes,保存简短计划/决策/交接,汇报前对齐过期状态,看板降级只报告一次而不反复重试;
|
|
200
|
+
普通 Session 看不到该文案或看板工具。`devlead_board_note_read(project,note?)` 读取项目 notes
|
|
196
201
|
metadata 或单条 Markdown 正文;`devlead_board_note_write` 接收 `project`、`operation`
|
|
197
202
|
(create/update/append/delete)、可选 `note/title/summary/content` 与 `expected_revision/expected_bytes`
|
|
198
203
|
CAS。project 仍按看板 id/title/绝对 path 解析,两个工具都不接受文件路径。notes 根目录固定为
|
package/lib/index.js
CHANGED
|
@@ -1373,10 +1373,10 @@ function unarchivedSessionValue(unarchived) {
|
|
|
1373
1373
|
}
|
|
1374
1374
|
|
|
1375
1375
|
// packages/tool/src/board-tools.ts
|
|
1376
|
-
var BOARD_READ_DESCRIPTION = "Read the user-visible DevLead project board: durable project status, priority, goal/focus/next, blockers, and optionally tasks. Omit project for a bounded all-project summary; select one by exact id, workspace title, or absolute workspace path for full detail. This board is read-only for the human and writable only by the lead AI through devlead_board_update. The board belongs to the active lead Session; its file location is derived from that Session workspace (or a deployment override) and is never a tool argument. Results are bounded and may be truncated:true; no active lead workspace (including a recorded workspace root that no longer exists) means BOARD_DISABLED.";
|
|
1377
|
-
var BOARD_UPDATE_DESCRIPTION = "Update one project on the user-visible DevLead board; the human is read-only and only the enabled lead AI may write through this tool. Create requires create:true and set.workspace.path. Supports scalar status/priority/goal/focus/next updates, blocker clear/remove/add, and task remove/upsert. Use expected_revision from devlead_board_read for compare-and-swap when a lost update would matter. Returns only the changed project without task rows and the changed lanes, never the whole board. The file belongs to the active lead Session workspace and no argument can redirect it.";
|
|
1378
|
-
var BOARD_NOTE_READ_DESCRIPTION = "Read Markdown notes attached to one existing DevLead board project. project is required and resolves exactly as in the other board tools. Omit note for the project's bounded metadata listing (id, title, summary, updatedAt, bytes, and root-relative path); provide its id for Markdown content plus metadata. A single-note JSON result is capped at 64 KiB and longer content is cut at a Unicode boundary with truncated:true. A missing notes index reads as an empty revision-0 project listing. Only the active lead can use this tool, and no argument accepts or redirects a Host filesystem path.";
|
|
1379
|
-
var BOARD_NOTE_WRITE_DESCRIPTION = "Create, update, append to, or delete one Markdown note on an existing project of the active lead's DevLead board. create requires title and may omit note to generate a UUID; update changes only supplied title/summary/content; append requires note and content and appends it exactly; delete requires note. Use expected_revision for notes-index CAS and expected_bytes for existing-note CAS when a lost update would matter. Returns the resulting metadata (or deleted metadata), revision, and changed state without returning the body. Note content stays out of the index. The Host owns all locations; write arguments contain no file path.";
|
|
1376
|
+
var BOARD_READ_DESCRIPTION = "Read the user-visible DevLead project board: durable project status, priority, goal/focus/next, blockers, and optionally tasks. Omit project for a bounded all-project summary; select one by exact id, workspace title, or absolute workspace path for full detail. This board is read-only for the human and writable only by the lead AI through devlead_board_update. The board belongs to the active lead Session; its file location is derived from that Session workspace (or a deployment override) and is never a tool argument. Results are bounded and may be truncated:true; no active lead workspace (including a recorded workspace root that no longer exists) means BOARD_DISABLED. Use when reconciling current cross-project state before dispatching, resuming, closing, or reporting.";
|
|
1377
|
+
var BOARD_UPDATE_DESCRIPTION = "Update one project on the user-visible DevLead board; the human is read-only and only the enabled lead AI may write through this tool. Create requires create:true and set.workspace.path. Supports scalar status/priority/goal/focus/next updates, blocker clear/remove/add, and task remove/upsert. Use expected_revision from devlead_board_read for compare-and-swap when a lost update would matter. Returns only the changed project without task rows and the changed lanes, never the whole board. The file belongs to the active lead Session workspace and no argument can redirect it. Use when dispatching or closing work, or when project focus/next/blockers/tasks materially change; batch related changes.";
|
|
1378
|
+
var BOARD_NOTE_READ_DESCRIPTION = "Read Markdown notes attached to one existing DevLead board project. project is required and resolves exactly as in the other board tools. Omit note for the project's bounded metadata listing (id, title, summary, updatedAt, bytes, and root-relative path); provide its id for Markdown content plus metadata. A single-note JSON result is capped at 64 KiB and longer content is cut at a Unicode boundary with truncated:true. A missing notes index reads as an empty revision-0 project listing. Only the active lead can use this tool, and no argument accepts or redirects a Host filesystem path. Use when resuming a project or preparing a dispatch brief so prior plans, decisions, and handoffs inform the work.";
|
|
1379
|
+
var BOARD_NOTE_WRITE_DESCRIPTION = "Create, update, append to, or delete one Markdown note on an existing project of the active lead's DevLead board. create requires title and may omit note to generate a UUID; update changes only supplied title/summary/content; append requires note and content and appends it exactly; delete requires note. Use expected_revision for notes-index CAS and expected_bytes for existing-note CAS when a lost update would matter. Returns the resulting metadata (or deleted metadata), revision, and changed state without returning the body. Note content stays out of the index. The Host owns all locations; write arguments contain no file path. Use when a plan, design, decision, or handoff should survive across turns; keep it concise instead of copying transcripts or logs.";
|
|
1380
1380
|
var BLOCKER_SCHEMA = {
|
|
1381
1381
|
type: "object",
|
|
1382
1382
|
additionalProperties: false,
|
|
@@ -1734,6 +1734,7 @@ function devLeadPolicy(options) {
|
|
|
1734
1734
|
|
|
1735
1735
|
${options.worktreeIsolation ? WORKTREE_ISOLATION_POLICY : SERIAL_WRITES_POLICY}`;
|
|
1736
1736
|
}
|
|
1737
|
+
var DEVLEAD_BOARD_POLICY = `Board workflow: the per-turn board summary is the source of truth for cross-project state. Use devlead_board_update when dispatching or closing work, or when a project's focus, next step, blockers, or tasks materially change; batch related edits instead of writing or announcing every step. Preserve plans, designs, decisions, and handoffs in project notes with devlead_board_note_write; read notes with devlead_board_note_read before resuming a project or writing a dispatch brief. Before reporting to the human, reconcile stale board state with reality. Keep entries short and readable; never paste chats, logs, or tool output wholesale. On BOARD_DISABLED or BOARD_IO_ERROR, continue the task, report degradation once, and do not retry repeatedly. No material change means no update.`;
|
|
1737
1738
|
var DEVLEAD_REPORT_POLICY = `This Session is watched by the active DevLead Session. Your settled turn already notifies the lead, so do not use devlead_report to re-broadcast routine progress or your final summary. Reserve it for a long-running task's mid-turn milestones the lead must know before the turn ends: a real blocker, a fork that needs the lead's decision, progress that would change scheduling correctness if it waited, or a question that needs the lead's answer; a short or linear task should not call it. The kind selects the delivery lane: progress/fyi are non-urgent background context injected into the lead without waking it (a cold lead or a full background budget keeps them digest-only), so never use them for anything that needs action before the turn ends; blocked/decision steer the lead's next step under a [DEV LEAD ACTION REQUIRED] wake and share a bounded pending queue per lead/child pair \u2014 an overflow returns DEVLEAD_DELIVERY_RATE_LIMITED, so merge reports instead of sending another; question seeks an answer. Reports are one-way: the lead cannot reply through the report, but a kind question report is the supported question path\u2014send it, then end your turn and wait for the lead to answer in a new turn (directly or after asking the human). When the question is durably forwarded the result sets turnEndRequested:true: the tool requests the end of your turn, but the current tool batch still completes and already-queued next-step work still runs before the turn closes; the answer may also steer your next step while you are still running, so do not poll or resend. When the question receipt is not durable, no turn end is requested: restate the question in your final assistant message and end the turn naturally. Direct user questions are disabled while watched, unless the current turn was opened by a direct human message in this Session: in a lead-directed turn an ask_user_question call is intercepted and forwarded to the lead as a question report, and the tool call returns guidance instead of opening the child's own question UI. If you end a turn with a natural-language question instead, the lead sees the assistant excerpt in the turn notification, but the explicit question report is faster and more reliable. Do not poll for an answer and do not use devlead_report as a general reply channel. Keep reports short and actionable: say what happened, what it affects, and what decision or next step you need. The result's durable flag says whether the Host persisted the receipt in its durable outbox; when it is false, the report is memory-only, so warn in your own work and retry when the lead is reachable. At most four distinct non-question reports are accepted per turn; question reports are exempt from that budget, the same kind and message in one turn is deduplicated (the same text under a different kind is a new report), and exhausted progress budgets return DEVLEAD_REPORT_RATE_LIMITED. Reports must be sent to the lead that watches you; no target Session parameter exists.`;
|
|
1738
1739
|
|
|
1739
1740
|
// packages/tool/src/question-routing.ts
|
|
@@ -1883,6 +1884,11 @@ function apply(ctx) {
|
|
|
1883
1884
|
order: ctx.systemPrompt.getSectionOrder("TOOL_SUBAGENT"),
|
|
1884
1885
|
text: ({ agent }) => agent !== void 0 && ctx.devLead.isEnabled(agent) ? devLeadPolicy({ worktreeIsolation: ctx.devLead.worktreeIsolationAvailable }) : ""
|
|
1885
1886
|
});
|
|
1887
|
+
ctx.systemPrompt.section({
|
|
1888
|
+
name: "devlead:board-policy",
|
|
1889
|
+
order: ctx.systemPrompt.getSectionOrder("TOOL_SUBAGENT"),
|
|
1890
|
+
text: ({ agent }) => agent !== void 0 && ctx.devLead.isEnabled(agent) ? DEVLEAD_BOARD_POLICY : ""
|
|
1891
|
+
});
|
|
1886
1892
|
ctx.systemPrompt.section({
|
|
1887
1893
|
name: "devlead:report-policy",
|
|
1888
1894
|
order: ctx.systemPrompt.getSectionOrder("TOOL_SUBAGENT"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yankeguo/dsh-tool-devlead",
|
|
3
|
-
"version": "0.4.2-rc.
|
|
3
|
+
"version": "0.4.2-rc.6",
|
|
4
4
|
"description": "Model-facing DevLead tools: register and list DSH Workspaces, create and steer ordinary Sessions, read session status, watch state changes, and read the lead's notification feed.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@deepseek-ai/schemastery": "~3.19.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@yankeguo/dsh-devlead": "0.4.2-rc.
|
|
30
|
-
"@yankeguo/dsh-devlead-protocol": "0.4.2-rc.
|
|
29
|
+
"@yankeguo/dsh-devlead": "0.4.2-rc.6",
|
|
30
|
+
"@yankeguo/dsh-devlead-protocol": "0.4.2-rc.6"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
33
|
"dsh": ">=0.2.2-rc.1 <0.3.0"
|