Skip to content

Commit f12c9d6

Browse files
bloveclaude
andcommitted
docs(api): regenerate api-docs for AgentError/toAgentError/retry surface
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 7232b95 commit f12c9d6

3 files changed

Lines changed: 154 additions & 13 deletions

File tree

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@
421421
},
422422
{
423423
"name": "error",
424-
"type": "Signal<unknown>",
424+
"type": "Signal<AgentError<> | undefined>",
425425
"description": "",
426426
"optional": false
427427
},
@@ -455,6 +455,12 @@
455455
"description": "Discards the assistant message at the given index AND all messages after\nit, then re-runs the agent against the trimmed conversation tail. The\npreceding user message (at index - 1) is preserved and re-submitted as\nthe agent's input. No new user message is added to the history.\n\nThrows if the message at `index` is not 'assistant' role, or if the\nagent is currently loading another response.",
456456
"optional": false
457457
},
458+
{
459+
"name": "retry",
460+
"type": "() => Promise<void>",
461+
"description": "Re-run the last submitted input after a failure. No-op if a run is already\n in flight or there is nothing to retry. Clears `error` and sets loading.",
462+
"optional": false
463+
},
458464
{
459465
"name": "state",
460466
"type": "Signal<Record<string, unknown>>",

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

Lines changed: 133 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,65 @@
14261426
],
14271427
"methods": []
14281428
},
1429+
{
1430+
"name": "AgentError",
1431+
"kind": "class",
1432+
"description": "Structured, classified failure surfaced on `Agent.error`. Extends `Error`\n so existing `.message` / `instanceof Error` reads keep working.",
1433+
"params": [
1434+
{
1435+
"name": "init",
1436+
"type": "object",
1437+
"description": "",
1438+
"optional": false
1439+
}
1440+
],
1441+
"examples": [],
1442+
"properties": [
1443+
{
1444+
"name": "cause",
1445+
"type": "unknown",
1446+
"description": "",
1447+
"optional": false
1448+
},
1449+
{
1450+
"name": "kind",
1451+
"type": "AgentErrorKind",
1452+
"description": "",
1453+
"optional": false
1454+
},
1455+
{
1456+
"name": "message",
1457+
"type": "string",
1458+
"description": "",
1459+
"optional": false
1460+
},
1461+
{
1462+
"name": "name",
1463+
"type": "string",
1464+
"description": "",
1465+
"optional": false
1466+
},
1467+
{
1468+
"name": "retryable",
1469+
"type": "boolean",
1470+
"description": "connection | server | interrupted → true; auth | aborted | non-auth-4xx → false.",
1471+
"optional": false
1472+
},
1473+
{
1474+
"name": "stack",
1475+
"type": "string",
1476+
"description": "",
1477+
"optional": true
1478+
},
1479+
{
1480+
"name": "status",
1481+
"type": "number",
1482+
"description": "",
1483+
"optional": true
1484+
}
1485+
],
1486+
"methods": []
1487+
},
14291488
{
14301489
"name": "ChatApprovalCardComponent",
14311490
"kind": "class",
@@ -2118,12 +2177,6 @@
21182177
"type": "InputSignal<Agent>",
21192178
"description": "",
21202179
"optional": false
2121-
},
2122-
{
2123-
"name": "errorMessage",
2124-
"type": "Signal<string | null>",
2125-
"description": "",
2126-
"optional": false
21272180
}
21282181
],
21292182
"methods": []
@@ -5320,7 +5373,7 @@
53205373
},
53215374
{
53225375
"name": "error",
5323-
"type": "Signal<unknown>",
5376+
"type": "Signal<AgentError<> | undefined>",
53245377
"description": "",
53255378
"optional": false
53265379
},
@@ -5354,6 +5407,12 @@
53545407
"description": "Discards the assistant message at the given index AND all messages after\nit, then re-runs the agent against the trimmed conversation tail. The\npreceding user message (at index - 1) is preserved and re-submitted as\nthe agent's input. No new user message is added to the history.\n\nThrows if the message at `index` is not 'assistant' role, or if the\nagent is currently loading another response.",
53555408
"optional": false
53565409
},
5410+
{
5411+
"name": "retry",
5412+
"type": "() => Promise<void>",
5413+
"description": "Re-run the last submitted input after a failure. No-op if a run is already\n in flight or there is nothing to retry. Clears `error` and sets loading.",
5414+
"optional": false
5415+
},
53575416
{
53585417
"name": "state",
53595418
"type": "Signal<Record<string, unknown>>",
@@ -5614,7 +5673,7 @@
56145673
},
56155674
{
56165675
"name": "error",
5617-
"type": "Signal<unknown>",
5676+
"type": "Signal<AgentError<> | undefined>",
56185677
"description": "",
56195678
"optional": false
56205679
},
@@ -5660,6 +5719,12 @@
56605719
"description": "Discards the assistant message at the given index AND all messages after\nit, then re-runs the agent against the trimmed conversation tail. The\npreceding user message (at index - 1) is preserved and re-submitted as\nthe agent's input. No new user message is added to the history.\n\nThrows if the message at `index` is not 'assistant' role, or if the\nagent is currently loading another response.",
56615720
"optional": false
56625721
},
5722+
{
5723+
"name": "retry",
5724+
"type": "() => Promise<void>",
5725+
"description": "Re-run the last submitted input after a failure. No-op if a run is already\n in flight or there is nothing to retry. Clears `error` and sets loading.",
5726+
"optional": false
5727+
},
56635728
{
56645729
"name": "state",
56655730
"type": "Signal<Record<string, unknown>>",
@@ -6273,7 +6338,7 @@
62736338
},
62746339
{
62756340
"name": "error",
6276-
"type": "WritableSignal<unknown>",
6341+
"type": "WritableSignal<AgentError<> | undefined>",
62776342
"description": "",
62786343
"optional": false
62796344
},
@@ -6319,6 +6384,12 @@
63196384
"description": "Discards the assistant message at the given index AND all messages after\nit, then re-runs the agent against the trimmed conversation tail. The\npreceding user message (at index - 1) is preserved and re-submitted as\nthe agent's input. No new user message is added to the history.\n\nThrows if the message at `index` is not 'assistant' role, or if the\nagent is currently loading another response.",
63206385
"optional": false
63216386
},
6387+
{
6388+
"name": "retry",
6389+
"type": "() => Promise<void>",
6390+
"description": "Re-run the last submitted input after a failure. No-op if a run is already\n in flight or there is nothing to retry. Clears `error` and sets loading.",
6391+
"optional": false
6392+
},
63226393
{
63236394
"name": "state",
63246395
"type": "WritableSignal<Record<string, unknown>>",
@@ -6377,7 +6448,7 @@
63776448
"properties": [
63786449
{
63796450
"name": "error",
6380-
"type": "unknown",
6451+
"type": "AgentError<>",
63816452
"description": "",
63826453
"optional": true
63836454
},
@@ -6950,6 +7021,13 @@
69507021
"signature": "Readonly<Record<string, Type<unknown> | A2uiViewEntry>>",
69517022
"examples": []
69527023
},
7024+
{
7025+
"name": "AgentErrorKind",
7026+
"kind": "type",
7027+
"description": "",
7028+
"signature": "\"connection\" | \"auth\" | \"server\" | \"interrupted\" | \"aborted\"",
7029+
"examples": []
7030+
},
69537031
{
69547032
"name": "AgentEvent",
69557033
"kind": "type",
@@ -7104,6 +7182,13 @@
71047182
"signature": "Readonly<Record<string, Type<unknown> | RenderViewEntry>>",
71057183
"examples": []
71067184
},
7185+
{
7186+
"name": "AGENT_ERROR_MESSAGES",
7187+
"kind": "const",
7188+
"description": "Default human-facing copy per kind.",
7189+
"signature": "Record<AgentErrorKind, string>",
7190+
"examples": []
7191+
},
71077192
{
71087193
"name": "cacheplaneMarkdownViews",
71097194
"kind": "const",
@@ -7538,6 +7623,25 @@
75387623
},
75397624
"examples": []
75407625
},
7626+
{
7627+
"name": "isAbortError",
7628+
"kind": "function",
7629+
"description": "True when `raw` represents a user-requested abort. Shared by adapters + classifier.",
7630+
"signature": "isAbortError(raw: unknown): boolean",
7631+
"params": [
7632+
{
7633+
"name": "raw",
7634+
"type": "unknown",
7635+
"description": "",
7636+
"optional": false
7637+
}
7638+
],
7639+
"returns": {
7640+
"type": "boolean",
7641+
"description": ""
7642+
},
7643+
"examples": []
7644+
},
75417645
{
75427646
"name": "isAssistantMessage",
75437647
"kind": "function",
@@ -7841,6 +7945,25 @@
78417945
},
78427946
"examples": []
78437947
},
7948+
{
7949+
"name": "toAgentError",
7950+
"kind": "function",
7951+
"description": "Classify any raw error into a structured AgentError. Idempotent.",
7952+
"signature": "toAgentError(raw: unknown): AgentError<>",
7953+
"params": [
7954+
{
7955+
"name": "raw",
7956+
"type": "unknown",
7957+
"description": "",
7958+
"optional": false
7959+
}
7960+
],
7961+
"returns": {
7962+
"type": "AgentError<>",
7963+
"description": ""
7964+
},
7965+
"examples": []
7966+
},
78447967
{
78457968
"name": "toClientToolSpecs",
78467969
"kind": "function",

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@
14391439
},
14401440
{
14411441
"name": "error",
1442-
"type": "Signal<unknown>",
1442+
"type": "Signal<AgentError<> | undefined>",
14431443
"description": "",
14441444
"optional": false
14451445
},
@@ -1581,6 +1581,12 @@
15811581
"description": "Re-submit the last input to restart the stream.",
15821582
"optional": false
15831583
},
1584+
{
1585+
"name": "retry",
1586+
"type": "() => Promise<void>",
1587+
"description": "Re-run the last submitted input after a failure. No-op if a run is already\n in flight or there is nothing to retry. Clears `error` and sets loading.",
1588+
"optional": false
1589+
},
15841590
{
15851591
"name": "setBranch",
15861592
"type": "(branch: string) => void",
@@ -1861,7 +1867,7 @@
18611867
},
18621868
{
18631869
"name": "error",
1864-
"type": "WritableSignal<unknown>",
1870+
"type": "WritableSignal<AgentError<> | undefined>",
18651871
"description": "",
18661872
"optional": false
18671873
},
@@ -2003,6 +2009,12 @@
20032009
"description": "Re-submit the last input to restart the stream.",
20042010
"optional": false
20052011
},
2012+
{
2013+
"name": "retry",
2014+
"type": "() => Promise<void>",
2015+
"description": "Re-run the last submitted input after a failure. No-op if a run is already\n in flight or there is nothing to retry. Clears `error` and sets loading.",
2016+
"optional": false
2017+
},
20062018
{
20072019
"name": "setBranch",
20082020
"type": "(branch: string) => void",

0 commit comments

Comments
 (0)