docs: rebalance prose cleanup and add trimming skill

This commit is contained in:
Tianyi Cui
2026-07-13 23:27:00 +08:00
parent fcdc318dda
commit 148046b9c8
392 changed files with 2801 additions and 1754 deletions
+5 -3
View File
@@ -1,6 +1,7 @@
/**
* The model-facing `todo_write` tool: the agent's whole task list, replaced wholesale on each
* call.
* Model-facing whole-list replacement. Each call appends a `todo/write` snapshot to the calling
* agent's session; replay is last-write-wins, and UIs render from session events. A non-agent
* caller has no owning list and is rejected. Named exports preserve loader injection metadata.
* @module @deepseek-ai/dsh-tool-todo
*/
@@ -28,7 +29,8 @@ const DESCRIPTION =
/**
* Validate the value constraints the SchemaSpec can't express and build the canonical {@link
* TodoItem}[].
* TodoItem}[]: trimmed non-empty unique content and at most one in-progress item. The registry
* has already enforced the status enum; the cast below records that guarantee.
*/
function toTodoList(raw: { content: string; status: string }[]): TodoItem[] {
const todos: TodoItem[] = []
@@ -149,7 +149,7 @@ describe('dsh-tool-todo', () => {
})
it('has the namespace-plugin export shape (no stray default) so the Loader keeps name/inject/apply', () => {
// Loader must retain this namespace's injection metadata.
// A default export would make Loader unwrap only apply and drop `inject`.
expect('default' in tool).toBe(false)
expect(tool.name).toBe('tool-todo')
expect(tool.inject).toEqual(['tools'])