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

View File

@@ -12,8 +12,8 @@ import type { SubagentCapabilities, SubagentProvider, SubagentStartRequest } fro
import { startInProcessRun } from '@deepseek-ai/dsh-subagent-inprocess'
export const name = 'subagent-spawn'
// `tools` is deliberately not injected: the shared driver registers structured output through
// the child's creation context, whose factory already requires the tool service.
// `tools` is deliberately not injected: the child factory already provides it during setup,
// and adding it here would unnecessarily change this provider's apply timing.
export const inject = ['subagents']
/** Config: the registry name to register the provider under. */

View File

@@ -152,7 +152,8 @@ describe('dsh-subagent-spawn', () => {
})
it('rejects without publishing when the request signal is already aborted', async () => {
// An already-aborted signal will not emit another abort event.
// An already-aborted signal emits no future event, so start must check it before listening and
// settle aborted without running the child. The empty model script proves no turn occurs.
const controller = new AbortController()
controller.abort()
const { ctx, parent } = await setup([])
@@ -161,7 +162,8 @@ describe('dsh-subagent-spawn', () => {
})
it('same-tick cancellation rejects start and prevents child publication', async () => {
// Same-tick cancellation must win before publication.
// Same-tick cancellation must win before async factory publication: no child may become
// visible, `started` must not fulfill, and the empty script proves no model turn occurs.
const { ctx, parent } = await setup([])
const beforeAgents = ctx.agents.list().length
const beforeSessions = ctx.sessions.list().length