10xgraph-client 1.0.0-rc.1 → 1.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/CHANGELOG.md +121 -1
  2. package/README.md +2 -2
  3. package/dist/agent.d.ts +17 -5
  4. package/dist/agent.d.ts.map +1 -1
  5. package/dist/cjs/agent.d.ts +33 -0
  6. package/dist/cjs/client.d.ts +533 -0
  7. package/dist/cjs/compat.d.ts +27 -0
  8. package/dist/cjs/endpoints/addThreadMessages.d.ts +25 -0
  9. package/dist/cjs/endpoints/clearThreadState.d.ts +14 -0
  10. package/dist/cjs/endpoints/deleteFile.d.ts +13 -0
  11. package/dist/cjs/endpoints/deleteMemory.d.ts +18 -0
  12. package/dist/cjs/endpoints/deleteThread.d.ts +18 -0
  13. package/dist/cjs/endpoints/deleteThreadMessage.d.ts +19 -0
  14. package/dist/cjs/endpoints/files.d.ts +115 -0
  15. package/dist/cjs/endpoints/fixGraph.d.ts +33 -0
  16. package/dist/cjs/endpoints/forgetMemories.d.ts +21 -0
  17. package/dist/cjs/endpoints/getMemory.d.ts +18 -0
  18. package/dist/cjs/endpoints/graph.d.ts +50 -0
  19. package/dist/cjs/endpoints/graphTools.d.ts +31 -0
  20. package/dist/cjs/endpoints/invoke.d.ts +66 -0
  21. package/dist/cjs/endpoints/listMemories.d.ts +24 -0
  22. package/dist/cjs/endpoints/metadata.d.ts +5 -0
  23. package/dist/cjs/endpoints/observability.d.ts +111 -0
  24. package/dist/cjs/endpoints/ping.d.ts +9 -0
  25. package/dist/cjs/endpoints/realtime.d.ts +154 -0
  26. package/dist/cjs/endpoints/searchMemory.d.ts +56 -0
  27. package/dist/cjs/endpoints/stateSchema.d.ts +49 -0
  28. package/dist/cjs/endpoints/stopGraph.d.ts +35 -0
  29. package/dist/cjs/endpoints/storeMemory.d.ts +32 -0
  30. package/dist/cjs/endpoints/stream.d.ts +67 -0
  31. package/dist/cjs/endpoints/threadDetails.d.ts +18 -0
  32. package/dist/cjs/endpoints/threadMessage.d.ts +16 -0
  33. package/dist/cjs/endpoints/threadMessages.d.ts +28 -0
  34. package/dist/cjs/endpoints/threadState.d.ts +13 -0
  35. package/dist/cjs/endpoints/threads.d.ts +35 -0
  36. package/dist/cjs/endpoints/updateMemory.d.ts +20 -0
  37. package/dist/cjs/endpoints/updateThreadMessageFeedback.d.ts +19 -0
  38. package/dist/cjs/endpoints/updateThreadState.d.ts +22 -0
  39. package/dist/cjs/endpoints/wsStream.d.ts +34 -0
  40. package/dist/cjs/errors.d.ts +212 -0
  41. package/dist/cjs/index.d.ts +41 -0
  42. package/dist/cjs/interrupt.d.ts +45 -0
  43. package/dist/cjs/message.d.ts +173 -0
  44. package/dist/cjs/package.json +1 -0
  45. package/dist/cjs/request.d.ts +60 -0
  46. package/dist/cjs/tools.d.ts +80 -0
  47. package/dist/cjs/ws.d.ts +47 -0
  48. package/dist/client.d.ts +59 -40
  49. package/dist/client.d.ts.map +1 -1
  50. package/dist/endpoints/addThreadMessages.d.ts.map +1 -1
  51. package/dist/endpoints/clearThreadState.d.ts.map +1 -1
  52. package/dist/endpoints/deleteFile.d.ts.map +1 -1
  53. package/dist/endpoints/deleteMemory.d.ts.map +1 -1
  54. package/dist/endpoints/deleteThread.d.ts.map +1 -1
  55. package/dist/endpoints/deleteThreadMessage.d.ts.map +1 -1
  56. package/dist/endpoints/files.d.ts +33 -0
  57. package/dist/endpoints/files.d.ts.map +1 -1
  58. package/dist/endpoints/fixGraph.d.ts.map +1 -1
  59. package/dist/endpoints/forgetMemories.d.ts.map +1 -1
  60. package/dist/endpoints/getMemory.d.ts.map +1 -1
  61. package/dist/endpoints/graph.d.ts +20 -8
  62. package/dist/endpoints/graph.d.ts.map +1 -1
  63. package/dist/endpoints/graphTools.d.ts.map +1 -1
  64. package/dist/endpoints/invoke.d.ts +2 -0
  65. package/dist/endpoints/invoke.d.ts.map +1 -1
  66. package/dist/endpoints/listMemories.d.ts +6 -0
  67. package/dist/endpoints/listMemories.d.ts.map +1 -1
  68. package/dist/endpoints/observability.d.ts +54 -0
  69. package/dist/endpoints/observability.d.ts.map +1 -1
  70. package/dist/endpoints/ping.d.ts.map +1 -1
  71. package/dist/endpoints/realtime.d.ts +25 -4
  72. package/dist/endpoints/realtime.d.ts.map +1 -1
  73. package/dist/endpoints/searchMemory.d.ts.map +1 -1
  74. package/dist/endpoints/stateSchema.d.ts.map +1 -1
  75. package/dist/endpoints/stopGraph.d.ts +13 -3
  76. package/dist/endpoints/stopGraph.d.ts.map +1 -1
  77. package/dist/endpoints/storeMemory.d.ts.map +1 -1
  78. package/dist/endpoints/stream.d.ts +2 -0
  79. package/dist/endpoints/stream.d.ts.map +1 -1
  80. package/dist/endpoints/threadDetails.d.ts.map +1 -1
  81. package/dist/endpoints/threadMessage.d.ts.map +1 -1
  82. package/dist/endpoints/threadMessages.d.ts +6 -0
  83. package/dist/endpoints/threadMessages.d.ts.map +1 -1
  84. package/dist/endpoints/threadState.d.ts.map +1 -1
  85. package/dist/endpoints/threads.d.ts +6 -0
  86. package/dist/endpoints/threads.d.ts.map +1 -1
  87. package/dist/endpoints/updateMemory.d.ts.map +1 -1
  88. package/dist/endpoints/updateThreadMessageFeedback.d.ts.map +1 -1
  89. package/dist/endpoints/updateThreadState.d.ts +6 -1
  90. package/dist/endpoints/updateThreadState.d.ts.map +1 -1
  91. package/dist/endpoints/wsStream.d.ts +2 -0
  92. package/dist/endpoints/wsStream.d.ts.map +1 -1
  93. package/dist/errors.d.ts +52 -2
  94. package/dist/errors.d.ts.map +1 -1
  95. package/dist/index.cjs +3 -3
  96. package/dist/index.cjs.map +1 -1
  97. package/dist/index.d.ts +1 -0
  98. package/dist/index.d.ts.map +1 -1
  99. package/dist/index.js +1678 -1297
  100. package/dist/index.js.map +1 -1
  101. package/dist/interrupt.d.ts +46 -0
  102. package/dist/interrupt.d.ts.map +1 -0
  103. package/dist/request.d.ts +28 -0
  104. package/dist/request.d.ts.map +1 -1
  105. package/dist/tools.d.ts +14 -0
  106. package/dist/tools.d.ts.map +1 -1
  107. package/package.json +11 -6
  108. package/src/agent.ts +17 -4
  109. package/src/client.ts +178 -131
  110. package/src/endpoints/addThreadMessages.ts +11 -10
  111. package/src/endpoints/clearThreadState.ts +19 -20
  112. package/src/endpoints/deleteFile.ts +7 -12
  113. package/src/endpoints/deleteMemory.ts +9 -13
  114. package/src/endpoints/deleteThread.ts +9 -13
  115. package/src/endpoints/deleteThreadMessage.ts +9 -13
  116. package/src/endpoints/files.ts +164 -131
  117. package/src/endpoints/fixGraph.ts +7 -13
  118. package/src/endpoints/forgetMemories.ts +44 -60
  119. package/src/endpoints/getMemory.ts +9 -9
  120. package/src/endpoints/graph.ts +28 -21
  121. package/src/endpoints/graphTools.ts +7 -13
  122. package/src/endpoints/invoke.ts +84 -83
  123. package/src/endpoints/listMemories.ts +18 -13
  124. package/src/endpoints/observability.ts +77 -34
  125. package/src/endpoints/ping.ts +7 -13
  126. package/src/endpoints/realtime.ts +101 -39
  127. package/src/endpoints/searchMemory.ts +19 -13
  128. package/src/endpoints/stateSchema.ts +7 -13
  129. package/src/endpoints/stopGraph.ts +20 -16
  130. package/src/endpoints/storeMemory.ts +7 -8
  131. package/src/endpoints/stream.ts +158 -60
  132. package/src/endpoints/threadDetails.ts +9 -14
  133. package/src/endpoints/threadMessage.ts +9 -9
  134. package/src/endpoints/threadMessages.ts +15 -9
  135. package/src/endpoints/threadState.ts +19 -20
  136. package/src/endpoints/threads.ts +13 -12
  137. package/src/endpoints/updateMemory.ts +9 -9
  138. package/src/endpoints/updateThreadMessageFeedback.ts +9 -15
  139. package/src/endpoints/updateThreadState.ts +28 -22
  140. package/src/endpoints/wsStream.ts +163 -45
  141. package/src/errors.ts +319 -105
  142. package/src/index.ts +5 -0
  143. package/src/interrupt.ts +60 -0
  144. package/src/request.ts +134 -0
  145. package/src/tools.ts +95 -0
package/CHANGELOG.md CHANGED
@@ -26,7 +26,127 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
26
26
 
27
27
  ---
28
28
 
29
- ## [Unreleased]
29
+ ## [1.0.0-rc.2] - 2026-10-30
30
+
31
+ The second release candidate of `10xgraph-client` 1.0, aligned with `10xgraph` and `10xgraph-api`
32
+ 1.0.0rc2. It is `1.0.0-rc.1` below plus the changes here. Use it with `10xgraph-api` 1.0.0rc2. New
33
+ response fields are typed optional, so the client still works against older servers. The client
34
+ API is source compatible with 0.6.0; the one hard requirement change is Node.js 20.
35
+
36
+ ### Breaking
37
+
38
+ - **Node.js 18 is no longer supported.** `engines` is `node >= 20.0.0` and Node 18 is removed
39
+ from CI (CI runs Node 20 and 22). Node 18 is past end of life.
40
+
41
+ ### Upgrade notes
42
+
43
+ - With `10xgraph-api` 1.0 a client that invents a thread id for a new conversation gets HTTP 403. Omit `thread_id` on the first request and reuse the id the server returns (see
44
+ `1.0.0-rc.1` below).
45
+ - Behaviour you may notice, none of it a signature change:
46
+ - `stream()` and `wsStream()` now throw (`StreamError`, `WebSocketError`) when a stream is cut
47
+ or the server closes the socket mid-run. Before, they ended as if the run had succeeded.
48
+ - The `timeout` option is an idle timeout on `stream()` and `wsStream()`: it limits how long the
49
+ client waits on the network, not how long the whole run takes.
50
+ - A `baseUrl` with a trailing slash is accepted; the slashes are stripped.
51
+ - Errors from timeouts and network failures are `RequestTimeoutError` and `NetworkError`, not
52
+ plain `Error`. Code that matched on message text should check the class.
53
+
54
+ ### Added
55
+
56
+ - `Interrupt` type, `getInterrupt(chunk)`, `approveInterrupt(interrupt, value?)` and
57
+ `rejectInterrupt(interrupt)`. `getInterrupt` reads the pending interrupt from an `updates`
58
+ chunk; the helpers return `{ resume, interrupt_id }` to spread into the options of
59
+ `invoke()`, `stream()` or `wsStream()`.
60
+ - `authToken` accepts a function `() => string | null | undefined`, called on every request and
61
+ on every realtime reconnect, so short-lived tokens refresh without rebuilding the client.
62
+ `setAuthToken(token)` replaces it, and `clearAuth()` drops the bearer token and `auth`
63
+ credentials.
64
+ - Every method that makes a request takes a `signal` option (`RequestOptions`), not only
65
+ `invoke()`, `stream()` and `wsStream()`.
66
+ - New error classes and fields: `RequestTimeoutError`, `NetworkError`, `WebSocketError`,
67
+ `StreamError` and `RateLimitError`. `RateLimitError` carries `retryAfterSeconds` from the
68
+ `Retry-After` header or the body. Errors carry `cause`, `endpoint` and `method`, and
69
+ `requestId` reads the `x-request-id` header.
70
+ - Remote tool registrations take `validate(args)` (throw or return `false` to refuse the call)
71
+ and `maxArgsBytes` (default 1 MiB). The declared `parameters` are checked against the
72
+ server-sent arguments before the handler runs, and a repeated call id is rejected.
73
+ - `listMemories` takes `offset`, and its response has `has_more` and `next_offset`, so a user with
74
+ many memories can page. Needs `10xgraph-api` 1.0.
75
+ - CommonJS consumers get their own type declarations (`dist/cjs/index.d.ts`) through the
76
+ `exports` map, so `require` works with `nodenext` type checking.
77
+ - `signal?: AbortSignal` option on `invoke()`, `stream()` and `wsStream()`. Aborting it cancels the
78
+ in-flight request (and the open stream body or WebSocket). The call rejects with the abort error
79
+ (`name === 'AbortError'`), not the "Request timeout" error. A signal that is already aborted
80
+ rejects before any request is sent.
81
+ - `listFiles(params?)` for `GET /v1/files` (`{ limit?, offset? }`), with `ListFilesRequest`,
82
+ `ListFilesResponse`, `FileListItem`. A media store that cannot enumerate files answers 501,
83
+ thrown as a `TenxGraphError`.
84
+ - `has_more`, `offset` and `limit` on the `threads()` and `threadMessages()` response data.
85
+ - Observability types for the run trace: per-span `status`, `error`, `inputs`, `outputs`, `step`,
86
+ `visit`, `total_tokens`, `reasoning_tokens`, `tool_name`, `tool_call_id`; run-level `error`,
87
+ `model`, `models`, `notes`; payload-level `enabled` and `reason` (`ObsEmptyReason`), so a UI can
88
+ tell "tracing is off" from "no runs yet". New `ObsMessageSummary` type.
89
+ - `GraphInfo.realtime_options` (`GraphRealtimeOptions`): the Live init options the server honors, null
90
+ for non-realtime graphs.
91
+ - Eval report types for the extended report: case `error` and `error` status, rubric
92
+ `kind`, `passed`, `threshold`, `details`, `error`, case `expected_detail`, run `counts`, and
93
+ `errors` on run summaries.
94
+
95
+ ### Changed
96
+
97
+ - Live sessions without a `thread_id` now use the server-created id. The client no longer invents one: it sends none, reads the id from the new `session_started` event (`{ type: 'session_started', thread_id }`, the first server event) into `session.threadId` (`string | null`, set once the event arrives), and sends it back on reconnect so the same thread continues. A caller-supplied `thread_id` works as before. Needs `10xgraph-api` 1.0, where an invented id gets 403.
98
+ - **Typed change:** `RealtimeSession.threadId` is `string | null`. It is `null` until the
99
+ `session_started` event arrives when you passed no `thread_id`, so code that read it as a
100
+ `string` right after `realtime()` must handle `null` (or wait for `session_started`).
101
+ `session.ready` still resolves when the socket opens, not on `session_started`, and the event is
102
+ part of the `RealtimeEvent` union.
103
+ - The `timeout` is an idle timeout on `stream()` and `wsStream()`: it runs while the client waits
104
+ for headers or the next piece of data and is paused while your code handles a chunk.
105
+ - `invoke()` and the other REST methods apply the timeout and your `signal` to the response body
106
+ as well, not only to the response headers.
107
+ - Realtime reconnects use jittered backoff, restore the attempt budget only after a connection
108
+ stayed open for 10 s, go straight to the longest delay on close code 1013, and stop with a fatal
109
+ `policy_violation` error on close code 1008 (an expired or rejected token).
110
+ - Path ids (thread, message, memory) are percent-encoded in every endpoint.
111
+ - Header-type credentials other than `Authorization` (for example `X-API-Key`) are not forwarded
112
+ on a cross-origin redirect; the call fails instead.
113
+ - The HTTP error mapping covers every JSON error body, including the real server's 409
114
+ `state_conflict` body, and maps the server's codes (`RECURSION_001`, `STORAGE_TRANSIENT_000`,
115
+ `STORAGE_SCHEMA_000`, `STORAGE_SERIALIZATION_000`) to `GraphRecursionError`,
116
+ `TransientStorageError`, `SchemaVersionError` and `SerializationError`.
117
+ - Response and request types match what the server sends: fields the server never sends were
118
+ removed from `AgentState` and `StopGraphResponse`, nullable fields are typed nullable, and
119
+ `updateThreadState` no longer accepts keys the server rejects.
120
+ - `stream()` and `wsStream()` stop a client-tool loop at `recursion_limit`; `recursion_limit: 0`
121
+ is honoured and not turned into 25.
122
+
123
+ ### Fixed
124
+
125
+ - Leaving a `for await` loop over `stream()` early (`break`, `return` or a throw) cancels the
126
+ request. Before, the connection and the server run stayed open and the thread answered 409.
127
+ - `wsStream()` no longer hangs when the server answers a frame with an error chunk, and it
128
+ throws when the server closes the socket before the run finishes (1012, 1008, 1011).
129
+ - A truncated or unparseable stream line throws `StreamError` and a reset connection throws a
130
+ `StreamError` with code `STREAM_INTERRUPTED`, not a raw `TypeError: terminated`.
131
+ - A conflict (HTTP 409) throws `ConflictError` against the real server. It used to throw a
132
+ `TypeError`.
133
+ - `client.realtime()` no longer crashes the Node process with an unhandled rejection when the
134
+ connection fails and `session.ready` was not awaited.
135
+ - Realtime: `close()` during a pending reconnect no longer reopens the session, `send*` before
136
+ the socket is open is dropped and does not throw, and a failing reconnect does not end the
137
+ process.
138
+ - Failed requests no longer leave the timeout timer running, so a script that catches a
139
+ `ping()` error exits at once instead of after the timeout.
140
+ - Empty arrays are no longer stripped from messages and tool results, so a tool result with
141
+ `output: []` reaches the model as an empty list.
142
+ - `recursion_limit_reached` is true only when the limit stopped the run, and a limit stop is
143
+ reported to the caller instead of ending silently.
144
+ - Endpoint calls that time out throw `RequestTimeoutError`, not a raw `AbortError`, and
145
+ `forgetMemories()` throws a typed error, not a plain `Error`.
146
+ - `searchMemory()` no longer sends `memory_type: 'episodic'`, `category: ''` and
147
+ `score_threshold: 0` when you leave them unset. They are omitted so the server applies no filter,
148
+ and a search without a type now covers all memory types. Pass `memory_type` explicitly to keep
149
+ the old episodic-only behavior.
30
150
 
31
151
  ---
32
152
 
package/README.md CHANGED
@@ -119,7 +119,7 @@ import { TenxGraphClient } from '10xgraph-client';
119
119
  const client = new TenxGraphClient({ baseUrl: 'http://localhost:8000', authToken });
120
120
 
121
121
  const session = client.realtime(
122
- { model: 'gemini-2.5-flash-live', modalities: 'AUDIO' },
122
+ { model: 'gemini-3.8-live', modalities: 'AUDIO' },
123
123
  { reconnect: { maxAttempts: 5 } }
124
124
  );
125
125
 
@@ -383,7 +383,7 @@ Your first pull request can be small. These are real, self-contained, and useful
383
383
  - **Sharpen a type or a doc comment.** If your editor's autocomplete misled you once, it will mislead the next person too.
384
384
  - **Turn a bug into a failing test.** Open it as a draft pull request; the fix can come later.
385
385
 
386
- From clone to a passing check (Node 18 or newer):
386
+ From clone to a passing check (Node 20 or newer):
387
387
 
388
388
  ```bash
389
389
  git clone https://github.com/10xGraph/10xgraph-client.git
package/dist/agent.d.ts CHANGED
@@ -1,16 +1,29 @@
1
1
  import { Message } from './message.js';
2
- interface ExecutionMeta {
2
+ export interface ExecutionMeta {
3
3
  current_node: string;
4
4
  step: number;
5
+ /** Server execution status, e.g. 'running', 'interrupted_before', 'completed'. */
6
+ status?: string;
7
+ interrupted_node?: string | null;
8
+ interrupt_reason?: string | null;
9
+ interrupt_data?: Record<string, any> | null;
10
+ thread_id?: string | null;
11
+ run_id?: string | null;
12
+ stop_current_execution?: string;
13
+ internal_data?: Record<string, any>;
14
+ /** @deprecated The server never sends this field. Read `status` / `interrupted_node`. */
5
15
  interrupt?: {
6
16
  node: string;
7
17
  reason: string;
8
18
  status: string;
9
19
  data?: Record<string, any>;
10
20
  };
11
- is_running: boolean;
12
- is_interrupted: boolean;
13
- is_stopped_requested: boolean;
21
+ /** @deprecated The server never sends this field. Read `status`. */
22
+ is_running?: boolean;
23
+ /** @deprecated The server never sends this field. Read `status`. */
24
+ is_interrupted?: boolean;
25
+ /** @deprecated The server never sends this field. Read `stop_current_execution`. */
26
+ is_stopped_requested?: boolean;
14
27
  }
15
28
  export declare class AgentState {
16
29
  context: Message[];
@@ -18,5 +31,4 @@ export declare class AgentState {
18
31
  execution_meta: ExecutionMeta;
19
32
  constructor(initialData?: Partial<Record<string, any>>);
20
33
  }
21
- export {};
22
34
  //# sourceMappingURL=agent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,UAAU,aAAa;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC5B,CAAC;IACF,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAmBD,qBAAa,UAAU;IACrB,OAAO,EAAE,OAAO,EAAE,CAAM;IACxB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAQ;IACtC,cAAc,EAAE,aAAa,CAA8B;gBAE/C,WAAW,GAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;CAG3D"}
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,yFAAyF;IACzF,SAAS,CAAC,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC5B,CAAC;IACF,oEAAoE;IACpE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oEAAoE;IACpE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oFAAoF;IACpF,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAmBD,qBAAa,UAAU;IACrB,OAAO,EAAE,OAAO,EAAE,CAAM;IACxB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAQ;IACtC,cAAc,EAAE,aAAa,CAA8B;gBAE/C,WAAW,GAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;CAG3D"}
@@ -0,0 +1,33 @@
1
+ import { Message } from './message.js';
2
+ export interface ExecutionMeta {
3
+ current_node: string;
4
+ step: number;
5
+ /** Server execution status, e.g. 'running', 'interrupted_before', 'completed'. */
6
+ status?: string;
7
+ interrupted_node?: string | null;
8
+ interrupt_reason?: string | null;
9
+ interrupt_data?: Record<string, any> | null;
10
+ thread_id?: string | null;
11
+ run_id?: string | null;
12
+ stop_current_execution?: string;
13
+ internal_data?: Record<string, any>;
14
+ /** @deprecated The server never sends this field. Read `status` / `interrupted_node`. */
15
+ interrupt?: {
16
+ node: string;
17
+ reason: string;
18
+ status: string;
19
+ data?: Record<string, any>;
20
+ };
21
+ /** @deprecated The server never sends this field. Read `status`. */
22
+ is_running?: boolean;
23
+ /** @deprecated The server never sends this field. Read `status`. */
24
+ is_interrupted?: boolean;
25
+ /** @deprecated The server never sends this field. Read `stop_current_execution`. */
26
+ is_stopped_requested?: boolean;
27
+ }
28
+ export declare class AgentState {
29
+ context: Message[];
30
+ context_summary: string | null;
31
+ execution_meta: ExecutionMeta;
32
+ constructor(initialData?: Partial<Record<string, any>>);
33
+ }