Skip to content

Commit a2a3e6d

Browse files
bloveclaude
andcommitted
docs(dx): document config-interface members (ChatConfig/AgentConfig/RenderConfig)
The objects app developers fill in when wiring the framework now carry both an interface-level summary and per-member JSDoc: - chat ChatConfig: interface summary (members were already documented) - ag-ui AgentConfig: url/agentId/threadId/headers member docs + clean summary - render RenderConfig: interface summary + registry/store/functions/handlers docs (langgraph AgentConfig was already fully documented.) chat/ag-ui/render build green; api-docs regenerated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent a6a37f5 commit a2a3e6d

6 files changed

Lines changed: 33 additions & 17 deletions

File tree

apps/website/content/docs/ag-ui/api/api-docs.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,18 +367,18 @@
367367
{
368368
"name": "AgentConfig",
369369
"kind": "interface",
370-
"description": "Configuration for the AG-UI agent provider.\nHttpAgentConfig shape (from @ag-ui/client@0.0.52):\n - url: string (required) — endpoint for the HTTP agent\n - agentId: string (optional) — agent identifier\n - threadId: string (optional) — thread identifier\n - headers: Record<string, string> (optional) — custom HTTP headers",
370+
"description": "Connection options for the AG-UI agent provider, passed to provideAgent.\nMirrors the underlying `HttpAgent` config (`@ag-ui/client`) plus an optional\ntelemetry sink.",
371371
"properties": [
372372
{
373373
"name": "agentId",
374374
"type": "string",
375-
"description": "",
375+
"description": "Agent identifier, when the endpoint serves more than one agent.",
376376
"optional": true
377377
},
378378
{
379379
"name": "headers",
380380
"type": "Record<string, string>",
381-
"description": "",
381+
"description": "Extra HTTP headers sent with every request (e.g. auth tokens).",
382382
"optional": true
383383
},
384384
{
@@ -390,13 +390,13 @@
390390
{
391391
"name": "threadId",
392392
"type": "string",
393-
"description": "",
393+
"description": "Thread to connect to on start; omit to begin a fresh conversation.",
394394
"optional": true
395395
},
396396
{
397397
"name": "url",
398398
"type": "string",
399-
"description": "",
399+
"description": "Endpoint URL of the AG-UI HTTP agent (e.g. `'http://localhost:8000/agent'`). Required.",
400400
"optional": false
401401
}
402402
],

apps/website/content/docs/chat/api/api-docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5887,7 +5887,7 @@
58875887
{
58885888
"name": "ChatConfig",
58895889
"kind": "interface",
5890-
"description": "",
5890+
"description": "Application-wide options for provideChat. Every field is optional;\nthe values are exposed to all chat components in the tree via the\n`CHAT_CONFIG` injection token, so you set them once at bootstrap instead of\nthreading props through every component.",
58915891
"properties": [
58925892
{
58935893
"name": "__licenseEnvHint",

apps/website/content/docs/render/api/api-docs.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,30 +251,30 @@
251251
{
252252
"name": "RenderConfig",
253253
"kind": "interface",
254-
"description": "",
254+
"description": "Options for provideRender — the registry, state, computed functions,\nand action handlers the render engine uses to turn a spec into live Angular\ncomponents. Every field is optional.",
255255
"properties": [
256256
{
257257
"name": "functions",
258258
"type": "Record<string, ComputedFunction>",
259-
"description": "",
259+
"description": "Named computed functions a spec can reference (e.g. via `$compute`) to derive values from state.",
260260
"optional": true
261261
},
262262
{
263263
"name": "handlers",
264264
"type": "Record<string, (params: Record<string, unknown>) => unknown>",
265-
"description": "",
265+
"description": "Named action handlers invoked when interactive elements fire (e.g. a Button's `onClick`).",
266266
"optional": true
267267
},
268268
{
269269
"name": "registry",
270270
"type": "AngularRegistry",
271-
"description": "",
271+
"description": "Component registry mapping spec element `type`s to Angular components.",
272272
"optional": true
273273
},
274274
{
275275
"name": "store",
276276
"type": "StateStore",
277-
"description": "",
277+
"description": "Backing state store that `$bindState` paths read from and interactive elements write to.",
278278
"optional": true
279279
}
280280
],

libs/ag-ui/src/lib/provide-agent.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@ import type { AgentRef, AgentRuntimeTelemetrySink } from '@threadplane/chat';
55
import { toAgent, type AgUiAgent } from './to-agent';
66

77
/**
8-
* Configuration for the AG-UI agent provider.
9-
* HttpAgentConfig shape (from @ag-ui/client@0.0.52):
10-
* - url: string (required) — endpoint for the HTTP agent
11-
* - agentId: string (optional) — agent identifier
12-
* - threadId: string (optional) — thread identifier
13-
* - headers: Record<string, string> (optional) — custom HTTP headers
8+
* Connection options for the AG-UI agent provider, passed to {@link provideAgent}.
9+
* Mirrors the underlying `HttpAgent` config (`@ag-ui/client`) plus an optional
10+
* telemetry sink.
1411
*/
1512
export interface AgentConfig {
13+
/** Endpoint URL of the AG-UI HTTP agent (e.g. `'http://localhost:8000/agent'`). Required. */
1614
url: string;
15+
/** Agent identifier, when the endpoint serves more than one agent. */
1716
agentId?: string;
17+
/** Thread to connect to on start; omit to begin a fresh conversation. */
1818
threadId?: string;
19+
/** Extra HTTP headers sent with every request (e.g. auth tokens). */
1920
headers?: Record<string, string>;
2021
/** Optional app-owned telemetry sink. No telemetry is emitted unless this is provided. */
2122
telemetry?: AgentRuntimeTelemetrySink | false;

libs/chat/src/lib/provide-chat.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import type { AngularRegistry } from '@threadplane/render';
99

1010
const PACKAGE_NAME = '@threadplane/chat';
1111

12+
/**
13+
* Application-wide options for {@link provideChat}. Every field is optional;
14+
* the values are exposed to all chat components in the tree via the
15+
* `CHAT_CONFIG` injection token, so you set them once at bootstrap instead of
16+
* threading props through every component.
17+
*/
1218
export interface ChatConfig {
1319
/** Shared render registry for consumers that read CHAT_CONFIG. */
1420
renderRegistry?: AngularRegistry;

libs/render/src/lib/render.types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,18 @@ export interface AngularRegistry {
5858
names(): string[];
5959
}
6060

61+
/**
62+
* Options for {@link provideRender} — the registry, state, computed functions,
63+
* and action handlers the render engine uses to turn a spec into live Angular
64+
* components. Every field is optional.
65+
*/
6166
export interface RenderConfig {
67+
/** Component registry mapping spec element `type`s to Angular components. */
6268
registry?: AngularRegistry;
69+
/** Backing state store that `$bindState` paths read from and interactive elements write to. */
6370
store?: StateStore;
71+
/** Named computed functions a spec can reference (e.g. via `$compute`) to derive values from state. */
6472
functions?: Record<string, ComputedFunction>;
73+
/** Named action handlers invoked when interactive elements fire (e.g. a Button's `onClick`). */
6574
handlers?: Record<string, (params: Record<string, unknown>) => unknown | Promise<unknown>>;
6675
}

0 commit comments

Comments
 (0)