docs(agent): describe cancelled post-step checkpoint

This commit is contained in:
Tianyi Cui
2026-07-19 12:35:43 +08:00
parent 0c41ba7ead
commit 7538cef967
6 changed files with 26 additions and 25 deletions
@@ -323,7 +323,7 @@ export const EVENT_API: readonly EventApiEntry[] = [
name: 'agent/post-step',
mode: 'serial',
signature: '\'agent/post-step\'(this: Scoped<Agent>, agent: Agent, turn: number, step: number, signal: AbortSignal): Promise<void> | void',
summary: 'Awaited serial checkpoint after the response, tool results, injected context, and steering are durable but before `step/end`.',
summary: 'Awaited serial checkpoint after the response, real or synthetic tool results, injected context, and steering are durable but before `step/end`.',
},
{
name: 'agent/pre-step',
+5 -4
View File
@@ -251,11 +251,12 @@ declare module 'cordis' {
*/
'agent/step-result'(this: Scoped<Agent>, agent: Agent, turn: number, step: number, message: Message, next: () => Promise<Message>): Promise<Message>
/**
* Awaited serial checkpoint after the response, tool results, injected
* context, and steering are durable but before `step/end`.
* @param agent - the agent that completed the step.
* Awaited serial checkpoint after the response, real or synthetic tool
* results, injected context, and steering are durable but before `step/end`.
* A cancelled tool batch reaches this checkpoint with an aborted signal.
* @param agent - the agent whose step is settling.
* @param turn - the open turn number.
* @param step - the completed step number.
* @param step - the open step number.
* @param signal - the turn abort signal.
* Scope-filtered dispatch (`@deepseek-ai/dsh-scope`): agent-scoped listeners receive only that agent.
* @mode serial