10xgraph-client 0.0.0-stage → 0.6.0

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 (125) hide show
  1. package/CHANGELOG.md +276 -0
  2. package/LICENSE +21 -0
  3. package/README.md +400 -2
  4. package/dist/agent.d.ts +22 -0
  5. package/dist/agent.d.ts.map +1 -0
  6. package/dist/client.d.ts +479 -0
  7. package/dist/client.d.ts.map +1 -0
  8. package/dist/compat.d.ts +28 -0
  9. package/dist/compat.d.ts.map +1 -0
  10. package/dist/endpoints/addThreadMessages.d.ts +22 -0
  11. package/dist/endpoints/addThreadMessages.d.ts.map +1 -0
  12. package/dist/endpoints/clearThreadState.d.ts +15 -0
  13. package/dist/endpoints/clearThreadState.d.ts.map +1 -0
  14. package/dist/endpoints/deleteMemory.d.ts +19 -0
  15. package/dist/endpoints/deleteMemory.d.ts.map +1 -0
  16. package/dist/endpoints/deleteThread.d.ts +19 -0
  17. package/dist/endpoints/deleteThread.d.ts.map +1 -0
  18. package/dist/endpoints/deleteThreadMessage.d.ts +20 -0
  19. package/dist/endpoints/deleteThreadMessage.d.ts.map +1 -0
  20. package/dist/endpoints/files.d.ts +83 -0
  21. package/dist/endpoints/files.d.ts.map +1 -0
  22. package/dist/endpoints/fixGraph.d.ts +29 -0
  23. package/dist/endpoints/fixGraph.d.ts.map +1 -0
  24. package/dist/endpoints/forgetMemories.d.ts +22 -0
  25. package/dist/endpoints/forgetMemories.d.ts.map +1 -0
  26. package/dist/endpoints/getMemory.d.ts +19 -0
  27. package/dist/endpoints/getMemory.d.ts.map +1 -0
  28. package/dist/endpoints/graph.d.ts +39 -0
  29. package/dist/endpoints/graph.d.ts.map +1 -0
  30. package/dist/endpoints/graphTools.d.ts +32 -0
  31. package/dist/endpoints/graphTools.d.ts.map +1 -0
  32. package/dist/endpoints/invoke.d.ts +59 -0
  33. package/dist/endpoints/invoke.d.ts.map +1 -0
  34. package/dist/endpoints/listMemories.d.ts +19 -0
  35. package/dist/endpoints/listMemories.d.ts.map +1 -0
  36. package/dist/endpoints/metadata.d.ts +6 -0
  37. package/dist/endpoints/metadata.d.ts.map +1 -0
  38. package/dist/endpoints/observability.d.ts +58 -0
  39. package/dist/endpoints/observability.d.ts.map +1 -0
  40. package/dist/endpoints/ping.d.ts +10 -0
  41. package/dist/endpoints/ping.d.ts.map +1 -0
  42. package/dist/endpoints/realtime.d.ts +134 -0
  43. package/dist/endpoints/realtime.d.ts.map +1 -0
  44. package/dist/endpoints/searchMemory.d.ts +57 -0
  45. package/dist/endpoints/searchMemory.d.ts.map +1 -0
  46. package/dist/endpoints/stateSchema.d.ts +50 -0
  47. package/dist/endpoints/stateSchema.d.ts.map +1 -0
  48. package/dist/endpoints/stopGraph.d.ts +26 -0
  49. package/dist/endpoints/stopGraph.d.ts.map +1 -0
  50. package/dist/endpoints/storeMemory.d.ts +33 -0
  51. package/dist/endpoints/storeMemory.d.ts.map +1 -0
  52. package/dist/endpoints/stream.d.ts +60 -0
  53. package/dist/endpoints/stream.d.ts.map +1 -0
  54. package/dist/endpoints/threadDetails.d.ts +19 -0
  55. package/dist/endpoints/threadDetails.d.ts.map +1 -0
  56. package/dist/endpoints/threadMessage.d.ts +17 -0
  57. package/dist/endpoints/threadMessage.d.ts.map +1 -0
  58. package/dist/endpoints/threadMessages.d.ts +23 -0
  59. package/dist/endpoints/threadMessages.d.ts.map +1 -0
  60. package/dist/endpoints/threadState.d.ts +14 -0
  61. package/dist/endpoints/threadState.d.ts.map +1 -0
  62. package/dist/endpoints/threads.d.ts +30 -0
  63. package/dist/endpoints/threads.d.ts.map +1 -0
  64. package/dist/endpoints/updateMemory.d.ts +21 -0
  65. package/dist/endpoints/updateMemory.d.ts.map +1 -0
  66. package/dist/endpoints/updateThreadState.d.ts +18 -0
  67. package/dist/endpoints/updateThreadState.d.ts.map +1 -0
  68. package/dist/endpoints/wsStream.d.ts +33 -0
  69. package/dist/endpoints/wsStream.d.ts.map +1 -0
  70. package/dist/errors.d.ts +155 -0
  71. package/dist/errors.d.ts.map +1 -0
  72. package/dist/index.cjs +6 -0
  73. package/dist/index.cjs.map +1 -0
  74. package/dist/index.d.ts +39 -0
  75. package/dist/index.d.ts.map +1 -0
  76. package/dist/index.js +2664 -0
  77. package/dist/index.js.map +1 -0
  78. package/dist/message.d.ts +174 -0
  79. package/dist/message.d.ts.map +1 -0
  80. package/dist/request.d.ts +33 -0
  81. package/dist/request.d.ts.map +1 -0
  82. package/dist/tools.d.ts +67 -0
  83. package/dist/tools.d.ts.map +1 -0
  84. package/dist/ws.d.ts +48 -0
  85. package/dist/ws.d.ts.map +1 -0
  86. package/package.json +99 -4
  87. package/src/agent.ts +43 -0
  88. package/src/client.ts +1044 -0
  89. package/src/compat.ts +35 -0
  90. package/src/endpoints/addThreadMessages.ts +83 -0
  91. package/src/endpoints/clearThreadState.ts +75 -0
  92. package/src/endpoints/deleteMemory.ts +91 -0
  93. package/src/endpoints/deleteThread.ts +78 -0
  94. package/src/endpoints/deleteThreadMessage.ts +83 -0
  95. package/src/endpoints/files.ts +274 -0
  96. package/src/endpoints/fixGraph.ts +91 -0
  97. package/src/endpoints/forgetMemories.ts +95 -0
  98. package/src/endpoints/getMemory.ts +82 -0
  99. package/src/endpoints/graph.ts +97 -0
  100. package/src/endpoints/graphTools.ts +90 -0
  101. package/src/endpoints/invoke.ts +318 -0
  102. package/src/endpoints/listMemories.ts +97 -0
  103. package/src/endpoints/metadata.ts +6 -0
  104. package/src/endpoints/observability.ts +107 -0
  105. package/src/endpoints/ping.ts +58 -0
  106. package/src/endpoints/realtime.ts +326 -0
  107. package/src/endpoints/searchMemory.ts +132 -0
  108. package/src/endpoints/stateSchema.ts +106 -0
  109. package/src/endpoints/stopGraph.ts +85 -0
  110. package/src/endpoints/storeMemory.ts +98 -0
  111. package/src/endpoints/stream.ts +440 -0
  112. package/src/endpoints/threadDetails.ts +78 -0
  113. package/src/endpoints/threadMessage.ts +76 -0
  114. package/src/endpoints/threadMessages.ts +97 -0
  115. package/src/endpoints/threadState.ts +74 -0
  116. package/src/endpoints/threads.ts +112 -0
  117. package/src/endpoints/updateMemory.ts +90 -0
  118. package/src/endpoints/updateThreadState.ts +82 -0
  119. package/src/endpoints/wsStream.ts +251 -0
  120. package/src/errors.ts +553 -0
  121. package/src/index.ts +108 -0
  122. package/src/message.ts +436 -0
  123. package/src/request.ts +168 -0
  124. package/src/tools.ts +225 -0
  125. package/src/ws.ts +100 -0
package/README.md CHANGED
@@ -1,3 +1,401 @@
1
- # Temporary Holding Version
1
+ # 10xGraph Client
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![npm version](https://img.shields.io/npm/v/10xgraph-client.svg)](https://www.npmjs.com/package/10xgraph-client)
4
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ The TypeScript client for the **10xGraph** API server. Build conversational AI applications with
8
+ streaming responses, realtime audio, client-side tool execution, and dynamic state management.
9
+
10
+ 10xGraph by 10xScale: graph engineering for production AI agents.
11
+
12
+ > **Coming from `@10xscale/agentflow-client`?** This is the same client under its new name.
13
+ > Change the import and you are done; the old `AgentFlow*` names still work until 2.0. See
14
+ > [Migrating from `@10xscale/agentflow-client`](#migrating-from-10xscaleagentflow-client).
15
+
16
+ ## Features
17
+
18
+ - **Simple API**: one client class with a method per server endpoint
19
+ - **Streaming**: HTTP and WebSocket streaming for chat UIs
20
+ - **Tool execution**: run browser-side tools locally, with recursion handling
21
+ - **State management**: dynamic state schema with validation
22
+ - **Realtime audio**: WebSocket audio-to-audio via `/v1/graph/live`
23
+ - **TypeScript first**: full type definitions, dual ESM + CJS
24
+
25
+ ## Installation
26
+
27
+ ```bash
28
+ npm install 10xgraph-client
29
+ # or
30
+ yarn add 10xgraph-client
31
+ # or
32
+ pnpm add 10xgraph-client
33
+ ```
34
+
35
+ ### Version compatibility
36
+
37
+ The client versions independently of the Python packages. Pick versions by this table rather than
38
+ by matching numbers:
39
+
40
+ | `10xgraph-client` (npm) | API server | Core framework |
41
+ | -------------------------------------- | ------------------------------------------------- | ------------------------------ |
42
+ | 0.6.x | `10xgraph-api` >= 0.7.0 | `10xgraph` >= 0.10.0 |
43
+ | `@10xscale/agentflow-client` 0.5.x | `10xscale-agentflow-cli` >= 0.6.0, `10xgraph-api` | `10xscale-agentflow` >= 0.10.0 |
44
+ | `@10xscale/agentflow-client` 0.3-0.4.x | `10xscale-agentflow-cli` >= 0.5.0 | `10xscale-agentflow` >= 0.9.0 |
45
+
46
+ The client tracks the **API server**, which is what it talks to. Client 0.6.x authenticates
47
+ WebSockets with the `10xgraph-bearer` subprotocol, which `10xgraph-api` 0.7.0 introduced. Against
48
+ an older `10xscale-agentflow-cli` server, HTTP endpoints still work, but `wsStream()` and
49
+ `realtime()` with bearer auth do not; stay on `@10xscale/agentflow-client@0.5.0` until the server
50
+ is upgraded.
51
+
52
+ ## Quick Start
53
+
54
+ ### Basic usage
55
+
56
+ ```typescript
57
+ import { TenxGraphClient, Message } from '10xgraph-client';
58
+
59
+ const client = new TenxGraphClient({
60
+ baseUrl: 'http://localhost:8000',
61
+ authToken: 'your-token', // optional bearer auth
62
+ debug: true, // optional
63
+ });
64
+
65
+ const result = await client.invoke([Message.text_message('Hello, how can you help me?', 'user')]);
66
+
67
+ console.log(result.messages);
68
+ ```
69
+
70
+ Start a local server with `10xgraph api` (from the `10xgraph-api` package).
71
+
72
+ ### Authentication options
73
+
74
+ ```typescript
75
+ import { TenxGraphClient, basicAuth, headerAuth } from '10xgraph-client';
76
+
77
+ const bearerClient = new TenxGraphClient({
78
+ baseUrl: 'https://api.example.com',
79
+ authToken: process.env.TENXGRAPH_TOKEN,
80
+ });
81
+
82
+ const basicClient = new TenxGraphClient({
83
+ baseUrl: 'https://api.example.com',
84
+ auth: basicAuth('service-user', 'service-password'),
85
+ });
86
+
87
+ const apiKeyClient = new TenxGraphClient({
88
+ baseUrl: 'https://api.example.com',
89
+ auth: headerAuth('X-API-Key', process.env.TENXGRAPH_API_KEY!),
90
+ });
91
+
92
+ const sessionClient = new TenxGraphClient({
93
+ baseUrl: 'https://api.example.com',
94
+ credentials: 'include',
95
+ });
96
+ ```
97
+
98
+ ### Streaming chat
99
+
100
+ ```typescript
101
+ const stream = client.stream([Message.text_message('Tell me a story', 'user')]);
102
+
103
+ for await (const chunk of stream) {
104
+ if (chunk.event === 'message') {
105
+ console.log(chunk.message?.content);
106
+ }
107
+ }
108
+ ```
109
+
110
+ ## Realtime audio (`/v1/graph/live`)
111
+
112
+ Transport-only: you stream PCM16 in and get PCM16 out. Mic capture and playback are yours to wire.
113
+
114
+ ```ts
115
+ import { TenxGraphClient } from '10xgraph-client';
116
+
117
+ const client = new TenxGraphClient({ baseUrl: 'http://localhost:8000', authToken });
118
+
119
+ const session = client.realtime(
120
+ { model: 'gemini-2.5-flash-live', modalities: 'AUDIO' },
121
+ { reconnect: { maxAttempts: 5 } }
122
+ );
123
+
124
+ session.on('audio', (pcm16, sampleRate) => playback(pcm16, sampleRate)); // PCM16 @ 24 kHz
125
+ session.on('output_transcript', (e) => console.log(e.text));
126
+ session.on('tool_call', (e) => console.log('tool', e.name, e.args));
127
+ session.on('error', (e) => console.error(e.message));
128
+
129
+ await session.ready; // socket open + init sent
130
+ session.sendAudio(micChunk); // PCM16 @ 16 kHz (Uint8Array | ArrayBuffer)
131
+ // push-to-talk: session.activityStart() / session.activityEnd()
132
+ session.close(); // graceful end; disables reconnect
133
+ ```
134
+
135
+ Auth uses the browser-safe `10xgraph-bearer` subprotocol automatically. In Node < 21 (no global
136
+ `WebSocket`), pass an implementation:
137
+
138
+ ```ts
139
+ import WebSocket from 'ws';
140
+ const client = new TenxGraphClient({ baseUrl, authToken, webSocketImpl: WebSocket });
141
+ ```
142
+
143
+ ### File uploads and access URLs
144
+
145
+ ```typescript
146
+ const upload = await client.uploadFile(file);
147
+
148
+ // Best URL for rendering/downloading in the UI.
149
+ // Cloud-backed deployments typically return a signed URL here.
150
+ const accessUrl = upload.data.direct_url ?? upload.data.url;
151
+
152
+ const fileInfo = await client.getFileInfo(upload.data.file_id);
153
+ const fileUrl = await client.getFileAccessUrl(upload.data.file_id);
154
+
155
+ const msg = Message.withFile('Summarize this document', upload.data.file_id, upload.data.mime_type);
156
+ ```
157
+
158
+ ### Tool registration
159
+
160
+ **Important:** remote tools (registered client-side) should **only** be used for browser-level APIs
161
+ like `localStorage` or `navigator.geolocation`. For most operations (database queries, external API
162
+ calls, calculations), define your tools in the Python backend instead. See
163
+ [Remote tools](https://10xgraph.com/docs/client/remote-tools) for details.
164
+
165
+ ```typescript
166
+ // Matching trusted schema must be declared in the server's 10xgraph.json.
167
+ client.registerToolHandler('get_weather', async ({ location }) => {
168
+ return { temperature: 72, conditions: 'sunny' };
169
+ });
170
+
171
+ // Tools execute automatically during invoke
172
+ const result = await client.invoke([Message.text_message('What is the weather in NYC?', 'user')]);
173
+ ```
174
+
175
+ Declare model-facing metadata in the server's `10xgraph.json`, never from an untrusted client:
176
+
177
+ ```json
178
+ {
179
+ "remote_tools": [
180
+ {
181
+ "node": "assistant",
182
+ "name": "get_weather",
183
+ "description": "Get current weather for a location",
184
+ "parameters": {
185
+ "type": "object",
186
+ "properties": { "location": { "type": "string" } },
187
+ "required": ["location"]
188
+ }
189
+ }
190
+ ]
191
+ }
192
+ ```
193
+
194
+ No client setup call is required or available.
195
+
196
+ ## Documentation
197
+
198
+ Full documentation lives at **[10xgraph.com/docs](https://10xgraph.com/docs/client)**.
199
+
200
+ ### Guides
201
+
202
+ - **[Create a client](https://10xgraph.com/docs/client/create-client)**: setup and first request
203
+ - **[Invoke an agent](https://10xgraph.com/docs/client/invoke-agent)**: request/response with tool execution
204
+ - **[Stream responses](https://10xgraph.com/docs/client/stream-responses)**: real-time streaming
205
+ - **[Remote tools](https://10xgraph.com/docs/client/remote-tools)**: when to use client-side tools
206
+ - **[Realtime audio](https://10xgraph.com/docs/client/realtime-audio)**: the `/v1/graph/live` session
207
+ - **[Error handling](https://10xgraph.com/docs/client/error-handling)**: error classes and recovery
208
+
209
+ ### Reference
210
+
211
+ - **[`TenxGraphClient`](https://10xgraph.com/docs/reference/client/client)**: constructor config and every method
212
+ - **[`Message` and content blocks](https://10xgraph.com/docs/reference/client/message)**
213
+ - **[Auth](https://10xgraph.com/docs/reference/client/auth)** and **[Errors](https://10xgraph.com/docs/reference/client/errors)**
214
+ - **[Troubleshooting](https://10xgraph.com/docs/troubleshooting/client)**: common issues and solutions
215
+
216
+ ## Key APIs
217
+
218
+ ### `invoke()`: batch processing
219
+
220
+ Execute the agent with an automatic tool execution loop:
221
+
222
+ ```typescript
223
+ const result = await client.invoke(messages, {
224
+ recursion_limit: 25,
225
+ response_granularity: 'full',
226
+ });
227
+ ```
228
+
229
+ ### `stream()`: real-time streaming
230
+
231
+ ```typescript
232
+ const stream = client.stream(messages);
233
+ for await (const chunk of stream) {
234
+ // Process chunks in real-time
235
+ }
236
+ ```
237
+
238
+ ### `graphStateSchema()`: dynamic schema
239
+
240
+ Get the agent state schema for form generation and validation:
241
+
242
+ ```typescript
243
+ const schema = await client.graphStateSchema();
244
+ ```
245
+
246
+ ### `graphTools()`: tool inventory
247
+
248
+ List the tools the graph's tool nodes expose, grouped by node. Each tool is tagged with its
249
+ source (`local`, `mcp`, or `remote`):
250
+
251
+ ```typescript
252
+ const { data } = await client.graphTools();
253
+ // data.nodes[].tools[] -> { name, description, source, parameters }
254
+ ```
255
+
256
+ ### `observability(threadId, runId?)`: run traces
257
+
258
+ Fetch the reconstructed trace for a run (spans, events, and cost). Defaults to the thread's
259
+ latest run:
260
+
261
+ ```typescript
262
+ const trace = await client.observability(threadId);
263
+ const specific = await client.observability(threadId, runId);
264
+ ```
265
+
266
+ ## Examples
267
+
268
+ The [`examples/`](examples/) directory has complete working examples:
269
+
270
+ - **[invoke-example.ts](examples/invoke-example.ts)**: basic invoke with tool execution
271
+ - **[stream-example.ts](examples/stream-example.ts)**: streaming responses
272
+ - **[state-schema-examples.ts](examples/state-schema-examples.ts)**: form generation and validation
273
+
274
+ ## Architecture
275
+
276
+ ```
277
+ ┌──────────────────────┐
278
+ │ Your application │
279
+ └──────────┬───────────┘
280
+ │ TenxGraphClient
281
+ ▼
282
+ ┌──────────────────────┐
283
+ │ 10xgraph-client │ <- this library
284
+ │ client, tools, │
285
+ │ messages │
286
+ └──────────┬───────────┘
287
+ │ HTTP/HTTPS + WebSocket
288
+ ▼
289
+ ┌──────────────────────┐
290
+ │ 10xgraph-api │ <- your backend
291
+ │ (10xgraph api) │
292
+ └──────────────────────┘
293
+ ```
294
+
295
+ ## Configuration
296
+
297
+ ```typescript
298
+ const client = new TenxGraphClient({
299
+ baseUrl: string, // Required: API base URL
300
+ authToken?: string, // Optional: bearer token
301
+ auth?: TenxGraphAuth, // Optional: bearer/basic/custom header auth
302
+ headers?: HeadersInit, // Optional: extra headers for every request
303
+ credentials?: RequestCredentials, // Optional: cookie/session auth
304
+ timeout?: number, // Optional: request timeout (default: 5 min)
305
+ debug?: boolean, // Optional: enable debug logging
306
+ webSocketImpl?: typeof WebSocket // Node < 21 (pass the 'ws' package)
307
+ });
308
+ ```
309
+
310
+ ## Migrating from `@10xscale/agentflow-client`
311
+
312
+ The project was renamed from Agentflow to **10xGraph** because "Agentflow" is shared by several
313
+ unrelated projects and was hard to find. The client, license and maintainers are the same.
314
+
315
+ | Before | After |
316
+ | ------------------------------------------------------ | ------------------------------------ |
317
+ | `npm install @10xscale/agentflow-client` | `npm install 10xgraph-client` |
318
+ | `AgentFlowClient`, `AgentFlowConfig` | `TenxGraphClient`, `TenxGraphConfig` |
319
+ | `AgentFlowError` | `TenxGraphError` |
320
+ | `AgentFlowAuth` (+ `Bearer`/`Basic`/`Header` variants) | `TenxGraphAuth` (+ same variants) |
321
+ | WS subprotocol `agentflow-bearer` | `10xgraph-bearer` |
322
+ | Server `10xscale-agentflow-cli`, `agentflow.json` | `10xgraph-api`, `10xgraph.json` |
323
+
324
+ Steps:
325
+
326
+ 1. `npm uninstall @10xscale/agentflow-client && npm install 10xgraph-client`
327
+ 2. Replace `'@10xscale/agentflow-client'` with `'10xgraph-client'` in your imports.
328
+ 3. Upgrade the server to `10xgraph-api` >= 0.7.0 if you use `wsStream()` or `realtime()`.
329
+ 4. Optionally rename `AgentFlow*` identifiers to `TenxGraph*`. The old names are exported as
330
+ deprecated aliases of the same classes and types, so `instanceof AgentFlowError` keeps working.
331
+ They are removed in 2.0.
332
+
333
+ One observable difference: errors now report `error.name === 'TenxGraphError'` instead of
334
+ `'AgentFlowError'`. Use `instanceof` rather than comparing names.
335
+
336
+ ## Module formats
337
+
338
+ Ships dual ESM + CJS with types. `import` resolves `dist/index.js` (ESM); `require` resolves
339
+ `dist/index.cjs`. Tree-shakeable (`"sideEffects": false`).
340
+
341
+ ## Testing
342
+
343
+ ```bash
344
+ npm test # watch mode
345
+ npm run test:run # run once
346
+ npm run build # build the library
347
+ ```
348
+
349
+ ## TypeScript support
350
+
351
+ ```typescript
352
+ import type {
353
+ TenxGraphClient,
354
+ Message,
355
+ ToolRegistration,
356
+ InvokeResult,
357
+ StreamChunk,
358
+ AgentState,
359
+ AgentStateSchema,
360
+ } from '10xgraph-client';
361
+ ```
362
+
363
+ ## Contributing
364
+
365
+ **Be the first community contributor on this wall.**
366
+
367
+ <a href="https://github.com/10xGraph/10xgraph-client/graphs/contributors">
368
+ <img src="https://contrib.rocks/image?repo=10xGraph/10xgraph-client" alt="People who have contributed to the 10xGraph TypeScript client" />
369
+ </a>
370
+
371
+ So far only the lead maintainer has committed here, so the first community spot is open. Merge one pull request and your avatar is the next one on this wall and on the contributor page at [10xgraph.com/maintainers](https://10xgraph.com/maintainers). This client is how frontends talk to production agents, so the work is used from day one.
372
+
373
+ Your first pull request can be small. These are real, self-contained, and useful today:
374
+
375
+ - **Add an example for your framework.** [`examples/`](examples/) has plain TypeScript and React. Vue, Svelte, Next.js and Node scripts are all missing.
376
+ - **Test an edge case you hit.** A stream that drops mid-response, an error body the client should map, an auth header that should win.
377
+ - **Sharpen a type or a doc comment.** If your editor's autocomplete misled you once, it will mislead the next person too.
378
+ - **Turn a bug into a failing test.** Open it as a draft pull request; the fix can come later.
379
+
380
+ From clone to a passing check (Node 18 or newer):
381
+
382
+ ```bash
383
+ git clone https://github.com/10xGraph/10xgraph-client.git
384
+ cd 10xgraph-client
385
+ npm ci
386
+ npm run check # lint, typecheck and tests: the same gate as CI
387
+ ```
388
+
389
+ Draft pull requests are welcome, so open early and ask questions in the PR. For bigger changes, start a thread in the core repository's [Discussions](https://github.com/10xGraph/10xGraph/discussions) first. [CONTRIBUTING.md](CONTRIBUTING.md) has every check and the release notes rules.
390
+
391
+ ## License
392
+
393
+ 10xGraph is [MIT licensed](LICENSE) and made by [10xScale](https://10xscale.ai). Contributions are
394
+ accepted under the same license.
395
+
396
+ ## Support
397
+
398
+ - [Documentation](https://10xgraph.com/docs/client)
399
+ - [Issue tracker](https://github.com/10xGraph/10xgraph-client/issues)
400
+ - [npm package](https://www.npmjs.com/package/10xgraph-client)
401
+ - [10xgraph.com](https://10xgraph.com) and [github.com/10xGraph](https://github.com/10xGraph)
@@ -0,0 +1,22 @@
1
+ import { Message } from './message.js';
2
+ interface ExecutionMeta {
3
+ current_node: string;
4
+ step: number;
5
+ interrupt?: {
6
+ node: string;
7
+ reason: string;
8
+ status: string;
9
+ data?: Record<string, any>;
10
+ };
11
+ is_running: boolean;
12
+ is_interrupted: boolean;
13
+ is_stopped_requested: boolean;
14
+ }
15
+ export declare class AgentState {
16
+ context: Message[];
17
+ context_summary: string | null;
18
+ execution_meta: ExecutionMeta;
19
+ constructor(initialData?: Partial<Record<string, any>>);
20
+ }
21
+ export {};
22
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +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"}