docs(invariants): refresh installer API catalogs

This commit is contained in:
Tianyi Cui
2026-07-20 02:00:40 +08:00
parent 55fd1919a1
commit 512ef2a18e
3 changed files with 8 additions and 8 deletions

View File

@@ -489,13 +489,13 @@ Package-owned invariant registry with global and regex-based selection.
* even when filtering disables its checks. Enabled installers run in a child
* fiber; failure disposes that fiber and releases the reservation.
* @param packageName - full npm package name that owns the contribution.
* @param installer - synchronous listener installer for the child context.
* @param installer - listener or startup-check installer for the child context.
* @returns an effect-scoped disposer for the registration.
*/
register(packageName: string, installer: InvariantInstaller): () => void
```
Source: [`packages/support/invariants/src/index.ts:261`](../../packages/support/invariants/src/index.ts)
Source: [`packages/support/invariants/src/index.ts:388`](../../packages/support/invariants/src/index.ts)
## `ctx.llm` — `LlmService`

View File

@@ -256,7 +256,7 @@ export const SERVICE_API: readonly ServiceApiEntry[] = [
methods: [
{
signature: 'register(packageName: string, installer: InvariantInstaller): () => void',
jsDoc: '/**\n * Register one package\'s invariant installer. The package name is reserved\n * even when filtering disables its checks. Enabled installers run in a child\n * fiber; failure disposes that fiber and releases the reservation.\n * @param packageName - full npm package name that owns the contribution.\n * @param installer - synchronous listener installer for the child context.\n * @returns an effect-scoped disposer for the registration.\n */',
jsDoc: '/**\n * Register one package\'s invariant installer. The package name is reserved\n * even when filtering disables its checks. Enabled installers run in a child\n * fiber; failure disposes that fiber and releases the reservation.\n * @param packageName - full npm package name that owns the contribution.\n * @param installer - listener or startup-check installer for the child context.\n * @returns an effect-scoped disposer for the registration.\n */',
},
],
},
@@ -1192,7 +1192,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [
},
{
name: 'InvariantInstaller',
declaration: 'export interface InvariantInstaller {\n (ctx: Context, fail: InvariantFailure): void;\n readonly inject?: Inject;\n}',
declaration: 'export interface InvariantInstaller {\n (ctx: Context, fail: InvariantFailure): void | Promise<void>;\n readonly inject?: Inject;\n}',
},
{
name: 'JsonValue',

View File

@@ -6,7 +6,7 @@
Package-owned invariant registry with global and regex-based selection.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/support/invariants/src/index.ts#L261)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/support/invariants/src/index.ts#L388)
### ctx.invariants.register(packageName, installer)
@@ -16,7 +16,7 @@ Package-owned invariant registry with global and regex-based selection.
* even when filtering disables its checks. Enabled installers run in a child
* fiber; failure disposes that fiber and releases the reservation.
* @param packageName - full npm package name that owns the contribution.
* @param installer - synchronous listener installer for the child context.
* @param installer - listener or startup-check installer for the child context.
* @returns an effect-scoped disposer for the registration.
*/
register(packageName: string, installer: InvariantInstaller): () => void
@@ -25,8 +25,8 @@ register(packageName: string, installer: InvariantInstaller): () => void
Register one package's invariant installer. The package name is reserved even when filtering disables its checks. Enabled installers run in a child fiber; failure disposes that fiber and releases the reservation.
- `packageName` — full npm package name that owns the contribution.
- `installer` — synchronous listener installer for the child context.
- `installer` — listener or startup-check installer for the child context.
**Returns** an effect-scoped disposer for the registration.
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/support/invariants/src/index.ts#L303)
[Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/support/invariants/src/index.ts#L430)