docs: add @mode tags + enrich JSDoc on harness event declarations

Annotate all 24 harness events across the 5 event-declaring packages with
an explicit `@mode emit|waterfall|parallel` tag and self-contained JSDoc, so
the generated cordis catalog can render each entry's mode and prose from
source alone.
This commit is contained in:
Tianyi Cui
2026-06-20 19:21:42 +08:00
parent 9949f4f2ea
commit ee494969af
5 changed files with 102 additions and 22 deletions

View File

@@ -15,9 +15,18 @@ declare module 'cordis' {
}
interface Events {
/** Waterfall around prompt assembly — mutate/extend the assembly. */
/**
* Waterfall around prompt assembly — mutate or extend the
* {@link PromptAssembly} (sections + tool schemas) before it is rendered.
* Bound to the {@link SystemPrompt} service; call `next()` to delegate.
* @mode waterfall
*/
'system-prompt/assemble'(this: SystemPrompt, assembly: PromptAssembly, next: () => Promise<PromptAssembly>): Promise<PromptAssembly>
/** A section or tool provider was registered or unregistered. */
/**
* A section or tool provider was registered or unregistered (the assembly
* inputs changed).
* @mode emit
*/
'system-prompt/change'(): void
}
}