chore(docs): refresh WebSocket API catalogs

This commit is contained in:
imccyu
2026-08-04 16:21:09 +08:00
parent 8b4ddfe60c
commit a36c641db6
4 changed files with 21 additions and 3 deletions
+2 -2
View File
@@ -296,7 +296,7 @@ export interface ConnectionConfig {
}
```
Source: [`packages/client/connection/src/index.ts:20`](../packages/client/connection/src/index.ts)
Source: [`packages/client/connection/src/index.ts:21`](../packages/client/connection/src/index.ts)
## `@deepseek-ai/dsh-client-hmr`
@@ -574,7 +574,7 @@ export interface Config {
}
```
Source: [`packages/host/webserver/src/index.ts:39`](../packages/host/webserver/src/index.ts)
Source: [`packages/host/webserver/src/index.ts:47`](../packages/host/webserver/src/index.ts)
## `@deepseek-ai/dsh-invariants`
+9 -1
View File
@@ -770,6 +770,14 @@ The web-shape HTTP carrier service. Activation listens immediately (route regist
*/
register(route: WebRoute): () => void
/**
* Register an exact-path HTTP upgrade route. Duplicate paths throw because
* one socket can have only one protocol owner.
* @param route - pathname and handler owning negotiation plus socket use.
* @returns the disposer removing the route.
*/
registerUpgrade(route: WebUpgradeRoute): () => void
/**
* Register an index.html transform, applied to every index response in
* registration order.
@@ -779,7 +787,7 @@ register(route: WebRoute): () => void
tapIndex(transform: (html: string) => string): () => void
```
Source: [`packages/host/webserver/src/index.ts:55`](../../packages/host/webserver/src/index.ts)
Source: [`packages/host/webserver/src/index.ts:63`](../../packages/host/webserver/src/index.ts)
## `ctx.invariants` — `InvariantService`
@@ -388,6 +388,10 @@ export const SERVICE_API: readonly ServiceApiEntry[] = [
signature: 'register(route: WebRoute): () => void',
jsDoc: '/**\n * Register a named route. Duplicate (kind, path) throws — route patterns are\n * a composition-level contract, so a collision is a misconfiguration.\n * @param route - kind, path, and the owning handler.\n * @returns the disposer removing the route.\n */',
},
{
signature: 'registerUpgrade(route: WebUpgradeRoute): () => void',
jsDoc: '/**\n * Register an exact-path HTTP upgrade route. Duplicate paths throw because\n * one socket can have only one protocol owner.\n * @param route - pathname and handler owning negotiation plus socket use.\n * @returns the disposer removing the route.\n */',
},
{
signature: 'tapIndex(transform: (html: string) => string): () => void',
jsDoc: '/**\n * Register an index.html transform, applied to every index response in\n * registration order.\n * @param transform - pure html-to-html function.\n * @returns the disposer removing the transform.\n */',
@@ -3129,6 +3133,10 @@ export const TYPE_API: readonly TypeApiEntry[] = [
name: 'WebSource',
declaration: 'export interface WebSource {\n url: string;\n title?: string;\n snippet?: string;\n publishedAt?: string;\n}',
},
{
name: 'WebUpgradeRoute',
declaration: 'export interface WebUpgradeRoute {\n path: string;\n handler: (req: IncomingMessage, socket: Duplex, head: Buffer) => void | Promise<void>;\n}',
},
{
name: 'WorkflowMeta',
declaration: 'export interface WorkflowMeta {\n name: string;\n description: string;\n whenToUse?: string;\n phases?: WorkflowPhase[];\n}',
+2
View File
@@ -277,6 +277,8 @@ export const TYPE_LINK_EXEMPTIONS: Readonly<Record<string, string>> = {
LocaleDict: 'service-local dictionary shape is owned by packages/client/i18n/src/index.ts',
WebBootGraph: 'web boot graph wire shape is owned by packages/client/modules/src/client/index.ts',
WebRoute: 'route registration contract is owned by packages/host/webserver/src/index.ts',
WebUpgradeRoute:
'upgrade route registration contract is owned by packages/host/webserver/src/index.ts',
ThemeTokens: 'service-local token dictionary is owned by packages/client/ui-theme/src/index.ts',
Translate: 'service-local bound translator is owned by packages/client/i18n/src/index.ts',
InvariantRegistration: 'service-local lifecycle handle is owned by packages/support/invariants/README.md',