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
@@ -0,0 +1,479 @@
1
+ import { ToolHandler, ToolRegistration } from './tools.js';
2
+ import { Message } from './message.js';
3
+ import { PingResponse } from './endpoints/ping.js';
4
+ import { GraphResponse } from './endpoints/graph.js';
5
+ import { GraphToolsResponse } from './endpoints/graphTools.js';
6
+ import { ObservabilityResponse } from './endpoints/observability.js';
7
+ import { StateSchemaResponse } from './endpoints/stateSchema.js';
8
+ import { ThreadStateResponse } from './endpoints/threadState.js';
9
+ import { UpdateThreadStateResponse } from './endpoints/updateThreadState.js';
10
+ import { ClearThreadStateResponse } from './endpoints/clearThreadState.js';
11
+ import { ThreadMessagesRequest, ThreadMessagesResponse } from './endpoints/threadMessages.js';
12
+ import { AddThreadMessagesResponse } from './endpoints/addThreadMessages.js';
13
+ import { ThreadMessageResponse } from './endpoints/threadMessage.js';
14
+ import { ThreadDetailsResponse } from './endpoints/threadDetails.js';
15
+ import { DeleteThreadMessageResponse } from './endpoints/deleteThreadMessage.js';
16
+ import { DeleteThreadResponse } from './endpoints/deleteThread.js';
17
+ import { ThreadsRequest, ThreadsResponse } from './endpoints/threads.js';
18
+ import { InvokeResult, InvokeCallback } from './endpoints/invoke.js';
19
+ import { StreamChunk } from './endpoints/stream.js';
20
+ import { RealtimeSession, RealtimeInit, RealtimeOptions } from './endpoints/realtime.js';
21
+ import type { WebSocketImpl } from './ws.js';
22
+ import { StoreMemoryRequest, StoreMemoryResponse } from './endpoints/storeMemory.js';
23
+ import { SearchMemoryRequest, SearchMemoryResponse } from './endpoints/searchMemory.js';
24
+ import { GetMemoryResponse } from './endpoints/getMemory.js';
25
+ import { UpdateMemoryResponse } from './endpoints/updateMemory.js';
26
+ import { DeleteMemoryResponse } from './endpoints/deleteMemory.js';
27
+ import { ListMemoriesResponse } from './endpoints/listMemories.js';
28
+ import { ForgetMemoriesResponse } from './endpoints/forgetMemories.js';
29
+ import { StopGraphResponse } from './endpoints/stopGraph.js';
30
+ import { FixGraphResponse } from './endpoints/fixGraph.js';
31
+ import { FileUploadResponse, FileAccessUrlResponse, FileInfoResponse, MultimodalConfigResponse } from './endpoints/files.js';
32
+ import { TenxGraphAuth } from './request.js';
33
+ export interface TenxGraphConfig {
34
+ baseUrl: string;
35
+ authToken?: string | null;
36
+ auth?: TenxGraphAuth | null;
37
+ headers?: HeadersInit;
38
+ credentials?: RequestCredentials;
39
+ timeout?: number;
40
+ debug?: boolean;
41
+ webSocketImpl?: WebSocketImpl;
42
+ }
43
+ export declare class TenxGraphClient {
44
+ private baseUrl;
45
+ private authToken?;
46
+ private auth?;
47
+ private headers?;
48
+ private credentials?;
49
+ private timeout;
50
+ private debug;
51
+ private webSocketImpl?;
52
+ private toolExecutor;
53
+ constructor(config: TenxGraphConfig);
54
+ private createContext;
55
+ /**
56
+ * Register a tool for remote execution
57
+ */
58
+ registerTool(registration: ToolRegistration): void;
59
+ /**
60
+ * Register only the client-side implementation of a remote tool.
61
+ * The trusted schema must be declared in the server's 10xgraph.json.
62
+ */
63
+ registerToolHandler(name: string, handler: ToolHandler): void;
64
+ /**
65
+ * Ping the server to check connectivity
66
+ */
67
+ ping(): Promise<PingResponse>;
68
+ /**
69
+ * Fetch the agent graph
70
+ */
71
+ graph(): Promise<GraphResponse>;
72
+ /**
73
+ * Fetch the tools exposed by the graph's tool nodes, grouped by node.
74
+ * Each tool is tagged with its source (local / mcp / remote).
75
+ */
76
+ graphTools(): Promise<GraphToolsResponse>;
77
+ /**
78
+ * Fetch the reconstructed observability trace (spans, events, cost) for a
79
+ * thread. Returns the latest run by default, or a specific run when given.
80
+ */
81
+ observability(threadId: string, runId?: string): Promise<ObservabilityResponse>;
82
+ /**
83
+ * Stop a running graph execution for a specific thread
84
+ * @param threadId - The ID of the thread to stop execution for
85
+ * @param config - Optional configuration for the stop operation
86
+ * @returns StopGraphResponse with the stop operation result
87
+ */
88
+ stopGraph(threadId: string, config?: Record<string, any>): Promise<StopGraphResponse>;
89
+ /**
90
+ * Fix graph state by removing messages with empty tool calls
91
+ * This is useful for cleaning up incomplete tool call messages that may have
92
+ * failed or been interrupted during execution.
93
+ *
94
+ * @param threadId - The ID of the thread to fix state for
95
+ * @param config - Optional configuration for the fix operation
96
+ * @returns FixGraphResponse with the fix operation result including removed_count
97
+ */
98
+ fixGraph(threadId: string, config?: Record<string, any>): Promise<FixGraphResponse>;
99
+ /**
100
+ *
101
+
102
+ /**
103
+ * Fetch the state schema of the agent
104
+ */
105
+ graphStateSchema(): Promise<StateSchemaResponse>;
106
+ /**
107
+ * ***************** ALL THREAD APIS *****************
108
+ */
109
+ /**
110
+ * Fetch the state of a specific thread
111
+ * @param threadId - The ID of the thread to fetch state for
112
+ * @returns ThreadStateResponse containing the thread's current state
113
+ */
114
+ threadState(threadId: string | number): Promise<ThreadStateResponse>;
115
+ /**
116
+ * Update the state of a specific thread (checkpoint)
117
+ * @param threadId - The ID of the thread to update
118
+ * @param config - Configuration map for the thread
119
+ * @param state - New AgentState for the thread
120
+ * @returns UpdateThreadStateResponse with the updated state
121
+ */
122
+ updateThreadState(threadId: string | number, config: Record<string, any>, state: any): Promise<UpdateThreadStateResponse>;
123
+ /**
124
+ * Clear the state of a specific thread (delete checkpoint)
125
+ * @param threadId - The ID of the thread to clear state for
126
+ * @returns ClearThreadStateResponse with the clear operation result
127
+ */
128
+ clearThreadState(threadId: string | number): Promise<ClearThreadStateResponse>;
129
+ /**
130
+ * Fetch details for a specific thread
131
+ * @param threadId - The ID of the thread to fetch
132
+ * @returns ThreadDetailsResponse containing thread details
133
+ */
134
+ threadDetails(threadId: string | number): Promise<ThreadDetailsResponse>;
135
+ /**
136
+ * Fetch list of threads with optional search and pagination
137
+ * @param search - Optional search term to filter threads
138
+ * @param offset - Optional offset for pagination (default 0)
139
+ * @param limit - Optional limit for pagination (default no limit)
140
+ * @returns ThreadsResponse containing the list of threads and metadata
141
+ */
142
+ threads(): Promise<ThreadsResponse>;
143
+ threads(request: ThreadsRequest): Promise<ThreadsResponse>;
144
+ /**
145
+ * Fetch messages from a specific thread with optional search and pagination
146
+ * @param threadId - The ID of the thread to fetch messages from
147
+ * @param search - Optional search term to filter messages
148
+ * @param offset - Optional offset for pagination (default 0)
149
+ * @param limit - Optional limit for pagination (default no limit)
150
+ * @returns ThreadMessagesResponse containing the messages and metadata
151
+ */
152
+ threadMessages(threadId: string | number, request: Omit<ThreadMessagesRequest, 'threadId'>): Promise<ThreadMessagesResponse>;
153
+ /**
154
+ * Add messages to a specific thread checkpoint
155
+ * @param threadId - The ID of the thread to add messages to
156
+ * @param messages - Array of messages to add to the checkpoint
157
+ * @param config - Configuration map for the checkpoint
158
+ * @param metadata - Optional metadata for the checkpoint
159
+ * @returns AddCheckpointMessagesResponse containing the operation result
160
+ */
161
+ addThreadMessages(threadId: string | number, messages: Message[], config?: Record<string, any>, metadata?: Record<string, any>): Promise<AddThreadMessagesResponse>;
162
+ /**
163
+ * Fetch a specific message from a thread by message ID
164
+ * @param threadId - The ID of the thread
165
+ * @param messageId - The ID of the message to fetch
166
+ * @returns ThreadMessageResponse containing the message and metadata
167
+ */
168
+ singleMessage(threadId: string | number, messageId: string): Promise<ThreadMessageResponse>;
169
+ /**
170
+ * Delete a specific message from a thread
171
+ * @param threadId - The ID of the thread
172
+ * @param messageId - The ID of the message to delete
173
+ * @param config - Optional configuration map to send with the request body
174
+ * @returns DeleteThreadMessageResponse containing the deletion result
175
+ */
176
+ deleteMessage(threadId: string | number, messageId: string, config?: Record<string, any>): Promise<DeleteThreadMessageResponse>;
177
+ /**
178
+ * Delete a specific thread
179
+ * @param threadId - The ID of the thread to delete
180
+ * @param config - Optional configuration map to send with the request body
181
+ * @returns DeleteThreadResponse containing the deletion result
182
+ */
183
+ deleteThread(threadId: string | number, config?: Record<string, any>): Promise<DeleteThreadResponse>;
184
+ /**
185
+ * Invoke the agent graph with automatic tool execution loop
186
+ * @param messages - Array of messages to send
187
+ * @param options - Invoke options
188
+ * @returns InvokeResult with all messages and intermediate steps
189
+ */
190
+ invoke(messages: Message[], options?: {
191
+ initial_state?: Record<string, any>;
192
+ config?: Record<string, any>;
193
+ recursion_limit?: number;
194
+ response_granularity?: 'full' | 'partial' | 'low';
195
+ onPartialResult?: InvokeCallback;
196
+ }): Promise<InvokeResult>;
197
+ /**
198
+ * Stream invoke to the agent graph
199
+ * Returns an async iterable that yields stream chunks as they arrive
200
+ *
201
+ * @param messages - Array of messages to send
202
+ * @param options - Stream options
203
+ * @returns AsyncGenerator of StreamChunk objects
204
+ *
205
+ * @example
206
+ * ```ts
207
+ * const stream = client.streamInvoke([userMessage], {
208
+ * initial_state: {},
209
+ * response_granularity: 'low'
210
+ * });
211
+ *
212
+ * for await (const chunk of stream) {
213
+ * if (chunk.event === 'message') {
214
+ * console.log('Message:', chunk.message?.content);
215
+ * } else if (chunk.event === 'updates') {
216
+ * console.log('State updated:', chunk.state);
217
+ * }
218
+ * }
219
+ * ```
220
+ */
221
+ stream(messages: Message[], options?: {
222
+ initial_state?: Record<string, any>;
223
+ config?: Record<string, any>;
224
+ recursion_limit?: number;
225
+ response_granularity?: 'full' | 'partial' | 'low';
226
+ }): AsyncGenerator<StreamChunk, void, unknown>;
227
+ /**
228
+ * Stream invoke via a persistent WebSocket connection.
229
+ *
230
+ * Identical API to ``stream()`` — same message types, same chunk format,
231
+ * same tool-execution loop — but uses a single WebSocket instead of one
232
+ * HTTP request per tool-call iteration. Switch from ``stream()`` to
233
+ * ``wsStream()`` by changing one method name; everything else stays the
234
+ * same.
235
+ *
236
+ * The WebSocket stays open for the full lifecycle of the call (fresh run +
237
+ * any resume runs triggered by remote tool calls). The server sends a
238
+ * ``{ event:"updates", data:{ status:"done" } }`` chunk after each run so
239
+ * the client knows when to send the next resume request.
240
+ *
241
+ * Auth: the bearer token is sent via the ``10xgraph-bearer`` WebSocket
242
+ * subprotocol (browser-safe; never placed in the URL), with the Authorization
243
+ * header also set on Node runtimes.
244
+ *
245
+ * @param messages - Array of messages to send
246
+ * @param options - Same options as ``stream()``
247
+ * @returns AsyncGenerator of StreamChunk objects
248
+ *
249
+ * @example
250
+ * ```ts
251
+ * const stream = client.wsStream([userMessage], {
252
+ * config: { thread_id: 'my-thread' },
253
+ * response_granularity: 'low',
254
+ * });
255
+ *
256
+ * for await (const chunk of stream) {
257
+ * if (chunk.event === 'message') {
258
+ * console.log('Message:', chunk.message?.content);
259
+ * }
260
+ * }
261
+ * ```
262
+ */
263
+ wsStream(messages: Message[], options?: {
264
+ initial_state?: Record<string, any>;
265
+ config?: Record<string, any>;
266
+ recursion_limit?: number;
267
+ response_granularity?: 'full' | 'partial' | 'low';
268
+ }): AsyncGenerator<StreamChunk, void, unknown>;
269
+ /**
270
+ * Open a realtime (audio-to-audio) session over ``/v1/graph/live``.
271
+ *
272
+ * Transport-only: send PCM16 input via ``session.sendAudio(...)`` and receive
273
+ * PCM16 output via ``session.on('audio', ...)``. Mic capture and audio playback
274
+ * are the caller's responsibility. The session auto-reconnects (with backoff)
275
+ * on an unexpected drop and resumes the same ``thread_id``.
276
+ *
277
+ * @example
278
+ * ```ts
279
+ * const session = client.realtime({ model: 'gemini-2.5-flash-live' });
280
+ * session.on('audio', (pcm) => speaker.write(pcm));
281
+ * session.on('output_transcript', (e) => console.log(e.text));
282
+ * await session.ready;
283
+ * session.sendAudio(micChunk);
284
+ * ```
285
+ */
286
+ realtime(init: RealtimeInit, options?: RealtimeOptions): RealtimeSession;
287
+ /**
288
+ * Store a memory in the agent's memory system
289
+ *
290
+ * @param request - Memory storage request parameters
291
+ * @returns Promise<StoreMemoryResponse> containing the memory_id
292
+ *
293
+ * @example
294
+ * ```ts
295
+ * const result = await client.storeMemory({
296
+ * content: "User prefers dark mode",
297
+ * memory_type: MemoryType.SEMANTIC,
298
+ * category: "preferences",
299
+ * metadata: { source: "user_settings" }
300
+ * });
301
+ * console.log('Memory stored with ID:', result.data.memory_id);
302
+ * ```
303
+ */
304
+ storeMemory(request: StoreMemoryRequest): Promise<StoreMemoryResponse>;
305
+ /**
306
+ * Search for memories in the agent's memory system
307
+ *
308
+ * @param request - Memory search request parameters
309
+ * @returns Promise<SearchMemoryResponse> containing matching memories
310
+ *
311
+ * @example
312
+ * ```ts
313
+ * const results = await client.searchMemory({
314
+ * query: "dark mode preferences",
315
+ * memory_type: MemoryType.SEMANTIC,
316
+ * limit: 5,
317
+ * retrieval_strategy: RetrievalStrategy.SIMILARITY
318
+ * });
319
+ * results.data.results.forEach(result => {
320
+ * console.log('Memory:', result.content, 'Score:', result.score);
321
+ * });
322
+ * ```
323
+ */
324
+ searchMemory(request: SearchMemoryRequest): Promise<SearchMemoryResponse>;
325
+ /**
326
+ * Get a specific memory by ID
327
+ *
328
+ * @param memoryId - The ID of the memory to retrieve
329
+ * @param options - Optional config and options
330
+ * @returns Promise<GetMemoryResponse> containing the memory details
331
+ *
332
+ * @example
333
+ * ```ts
334
+ * const memory = await client.getMemory('mem-12345', {
335
+ * config: { include_vector: true }
336
+ * });
337
+ * console.log('Memory:', memory.data.memory.content);
338
+ * console.log('Score:', memory.data.memory.score);
339
+ * ```
340
+ */
341
+ getMemory(memoryId: string, options?: {
342
+ config?: Record<string, any>;
343
+ options?: Record<string, any>;
344
+ }): Promise<GetMemoryResponse>;
345
+ /**
346
+ * Update an existing memory by ID
347
+ *
348
+ * @param memoryId - The ID of the memory to update
349
+ * @param content - The updated content for the memory
350
+ * @param options - Optional config, options, and metadata
351
+ * @returns Promise<UpdateMemoryResponse> containing success status and updated data
352
+ *
353
+ * @example
354
+ * ```ts
355
+ * const result = await client.updateMemory('mem-12345', 'Updated content', {
356
+ * metadata: { tags: ['important', 'updated'] }
357
+ * });
358
+ * console.log('Update success:', result.data.success);
359
+ * ```
360
+ */
361
+ updateMemory(memoryId: string, content: string, options?: {
362
+ config?: Record<string, any>;
363
+ options?: Record<string, any>;
364
+ metadata?: Record<string, any>;
365
+ }): Promise<UpdateMemoryResponse>;
366
+ /**
367
+ * Delete a memory by ID
368
+ *
369
+ * @param memoryId - The ID of the memory to delete
370
+ * @param options - Optional config and options
371
+ * @returns Promise<DeleteMemoryResponse> containing success status and deletion confirmation
372
+ *
373
+ * @example
374
+ * ```ts
375
+ * const result = await client.deleteMemory('mem-12345', {
376
+ * config: { soft_delete: true }
377
+ * });
378
+ * console.log('Delete success:', result.data.success);
379
+ * console.log('Deleted:', result.data.data);
380
+ * ```
381
+ */
382
+ deleteMemory(memoryId: string, options?: {
383
+ config?: Record<string, any>;
384
+ options?: Record<string, any>;
385
+ }): Promise<DeleteMemoryResponse>;
386
+ /**
387
+ * List all memories with optional pagination
388
+ *
389
+ * @param options - Optional config, options, and limit
390
+ * @returns Promise<ListMemoriesResponse> containing array of memories
391
+ *
392
+ * @example
393
+ * ```ts
394
+ * const result = await client.listMemories({
395
+ * limit: 50,
396
+ * config: { include_vectors: false }
397
+ * });
398
+ * console.log('Found memories:', result.data.memories.length);
399
+ * result.data.memories.forEach(memory => {
400
+ * console.log('Memory:', memory.content, 'Type:', memory.memory_type);
401
+ * });
402
+ * ```
403
+ */
404
+ listMemories(options?: {
405
+ config?: Record<string, any>;
406
+ options?: Record<string, any>;
407
+ limit?: number;
408
+ }): Promise<ListMemoriesResponse>;
409
+ /**
410
+ * Forget (delete) memories based on filters and criteria
411
+ *
412
+ * @param options - Optional config, options, memory type, category, and filters
413
+ * @returns Promise<ForgetMemoriesResponse> containing success status
414
+ *
415
+ * @example
416
+ * ```ts
417
+ * // Forget all episodic memories in a category
418
+ * const result = await client.forgetMemories({
419
+ * memory_type: MemoryType.EPISODIC,
420
+ * category: 'temporary',
421
+ * filters: { tag: 'delete-me' }
422
+ * });
423
+ * console.log('Forget success:', result.data.success);
424
+ * ```
425
+ */
426
+ forgetMemories(options?: {
427
+ config?: Record<string, any>;
428
+ options?: Record<string, any>;
429
+ memory_type?: any;
430
+ category?: string;
431
+ filters?: Record<string, any>;
432
+ }): Promise<ForgetMemoriesResponse>;
433
+ /**
434
+ * Upload a file (image, audio, document) to the server.
435
+ * Returns file metadata including file_id for use in multimodal messages.
436
+ *
437
+ * @param file - A File, Blob, or { data: Blob; filename: string } object
438
+ * @returns FileUploadResponse with file_id and metadata
439
+ *
440
+ * @example
441
+ * ```ts
442
+ * const result = await client.uploadFile(file);
443
+ * const msg = Message.withImage('Describe this', result.data.url);
444
+ * ```
445
+ */
446
+ uploadFile(file: File | Blob | {
447
+ data: Blob;
448
+ filename: string;
449
+ }): Promise<FileUploadResponse>;
450
+ /**
451
+ * Download a file by its file_id. Returns raw Blob.
452
+ */
453
+ getFile(fileId: string): Promise<Blob>;
454
+ /**
455
+ * Get metadata about a stored file.
456
+ */
457
+ getFileInfo(fileId: string): Promise<FileInfoResponse>;
458
+ /**
459
+ * Get the best access URL for a stored file.
460
+ * For cloud-backed media this will typically be a signed URL.
461
+ * For local or memory-backed media this may fall back to the API file route.
462
+ */
463
+ getFileAccessUrl(fileId: string): Promise<FileAccessUrlResponse>;
464
+ /**
465
+ * Get the current multimodal configuration from the server.
466
+ */
467
+ getMultimodalConfig(): Promise<MultimodalConfigResponse>;
468
+ /**
469
+ * Serialize a Message object for API transmission
470
+ * Converts Message class instances to plain objects
471
+ */
472
+ private serializeMessage;
473
+ /**
474
+ * Clean content blocks by removing empty arrays and undefined values
475
+ * Server requires array of content blocks, not simplified string
476
+ */
477
+ private cleanContent;
478
+ }
479
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAgB,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MA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,OAAO,CAAC,oBAAoB,CAAC;IAYjC;;;;;;;;;;;;;;;;OAgBG;IACG,cAAc,CAAC,OAAO,CAAC,EAAE;QAC7B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC9B,WAAW,CAAC,EAAE,GAAG,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC/B,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAkBnC;;;;;;;;;;;;OAYG;IACG,UAAU,CACd,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GACnD,OAAO,CAAC,kBAAkB,CAAC;IAK9B;;OAEG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5C;;OAEG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAK5D;;;;OAIG;IACG,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAKtE;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC,wBAAwB,CAAC;IAK9D;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAwBxB;;;OAGG;IACH,OAAO,CAAC,YAAY;CAoBrB"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Deprecated names from `@10xscale/agentflow-client`, kept so code written against the old
3
+ * package keeps compiling after switching the import to `10xgraph-client`.
4
+ * Each alias is the same class or type as its new name, so `instanceof` checks still work.
5
+ * All of them will be removed in 2.0.
6
+ */
7
+ import { TenxGraphClient, TenxGraphConfig } from './client.js';
8
+ import { TenxGraphError } from './errors.js';
9
+ import { TenxGraphAuth, TenxGraphBasicAuth, TenxGraphBearerAuth, TenxGraphHeaderAuth } from './request.js';
10
+ /** @deprecated Use `TenxGraphClient`. Removed in 2.0. */
11
+ export declare const AgentFlowClient: typeof TenxGraphClient;
12
+ /** @deprecated Use `TenxGraphClient`. Removed in 2.0. */
13
+ export type AgentFlowClient = TenxGraphClient;
14
+ /** @deprecated Use `TenxGraphError`. Removed in 2.0. */
15
+ export declare const AgentFlowError: typeof TenxGraphError;
16
+ /** @deprecated Use `TenxGraphError`. Removed in 2.0. */
17
+ export type AgentFlowError = TenxGraphError;
18
+ /** @deprecated Use `TenxGraphConfig`. Removed in 2.0. */
19
+ export type AgentFlowConfig = TenxGraphConfig;
20
+ /** @deprecated Use `TenxGraphAuth`. Removed in 2.0. */
21
+ export type AgentFlowAuth = TenxGraphAuth;
22
+ /** @deprecated Use `TenxGraphBearerAuth`. Removed in 2.0. */
23
+ export type AgentFlowBearerAuth = TenxGraphBearerAuth;
24
+ /** @deprecated Use `TenxGraphBasicAuth`. Removed in 2.0. */
25
+ export type AgentFlowBasicAuth = TenxGraphBasicAuth;
26
+ /** @deprecated Use `TenxGraphHeaderAuth`. Removed in 2.0. */
27
+ export type AgentFlowHeaderAuth = TenxGraphHeaderAuth;
28
+ //# sourceMappingURL=compat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.d.ts","sourceRoot":"","sources":["../src/compat.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAEtB,yDAAyD;AACzD,eAAO,MAAM,eAAe,wBAAkB,CAAC;AAC/C,yDAAyD;AACzD,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;AAE9C,wDAAwD;AACxD,eAAO,MAAM,cAAc,uBAAiB,CAAC;AAC7C,wDAAwD;AACxD,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC;AAE5C,yDAAyD;AACzD,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;AAC9C,uDAAuD;AACvD,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;AAC1C,6DAA6D;AAC7D,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AACtD,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AACpD,6DAA6D;AAC7D,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { ResponseMetadata } from './metadata.js';
2
+ import { Message } from '../message.js';
3
+ import { RequestContext } from '../request.js';
4
+ export interface AddThreadMessagesContext extends RequestContext {
5
+ }
6
+ export interface AddThreadMessagesRequest {
7
+ threadId: string | number;
8
+ config: Record<string, any>;
9
+ messages: Message[];
10
+ metadata?: Record<string, any>;
11
+ }
12
+ export interface AddThreadMessagesData {
13
+ success: boolean;
14
+ message: string;
15
+ data: Record<string, any>;
16
+ }
17
+ export interface AddThreadMessagesResponse {
18
+ data: AddThreadMessagesData;
19
+ metadata: ResponseMetadata;
20
+ }
21
+ export declare function addThreadMessages(context: AddThreadMessagesContext, request: AddThreadMessagesRequest): Promise<AddThreadMessagesResponse>;
22
+ //# sourceMappingURL=addThreadMessages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addThreadMessages.d.ts","sourceRoot":"","sources":["../../src/endpoints/addThreadMessages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAuC,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpF,MAAM,WAAW,wBAAyB,SAAQ,cAAc;CAAG;AAEnE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,EACjC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,yBAAyB,CAAC,CAsDpC"}
@@ -0,0 +1,15 @@
1
+ import { ResponseMetadata } from './metadata.js';
2
+ import { RequestContext } from '../request.js';
3
+ export interface ClearThreadStateContext extends RequestContext {
4
+ }
5
+ export interface ClearThreadStateData {
6
+ success: boolean;
7
+ message: string;
8
+ data: boolean;
9
+ }
10
+ export interface ClearThreadStateResponse {
11
+ data: ClearThreadStateData;
12
+ metadata: ResponseMetadata;
13
+ }
14
+ export declare function clearThreadState(context: ClearThreadStateContext, threadId: string | number): Promise<ClearThreadStateResponse>;
15
+ //# sourceMappingURL=clearThreadState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clearThreadState.d.ts","sourceRoot":"","sources":["../../src/endpoints/clearThreadState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAuC,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpF,MAAM,WAAW,uBAAwB,SAAQ,cAAc;CAAG;AAElE,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,uBAAuB,EAChC,QAAQ,EAAE,MAAM,GAAG,MAAM,GACxB,OAAO,CAAC,wBAAwB,CAAC,CAsDnC"}
@@ -0,0 +1,19 @@
1
+ import { ResponseMetadata } from './metadata.js';
2
+ import { RequestContext } from '../request.js';
3
+ export interface DeleteMemoryContext extends RequestContext {
4
+ }
5
+ export interface DeleteMemoryRequest {
6
+ memoryId: string;
7
+ config?: Record<string, any>;
8
+ options?: Record<string, any>;
9
+ }
10
+ export interface DeleteMemoryData {
11
+ success: boolean;
12
+ data: string;
13
+ }
14
+ export interface DeleteMemoryResponse {
15
+ data: DeleteMemoryData;
16
+ metadata: ResponseMetadata;
17
+ }
18
+ export declare function deleteMemory(context: DeleteMemoryContext, request: DeleteMemoryRequest): Promise<DeleteMemoryResponse>;
19
+ //# sourceMappingURL=deleteMemory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteMemory.d.ts","sourceRoot":"","sources":["../../src/endpoints/deleteMemory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAuC,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpF,MAAM,WAAW,mBAAoB,SAAQ,cAAc;CAAG;AAE9D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CAiE/B"}
@@ -0,0 +1,19 @@
1
+ import { ResponseMetadata } from './metadata.js';
2
+ import { RequestContext } from '../request.js';
3
+ export interface DeleteThreadContext extends RequestContext {
4
+ }
5
+ export interface DeleteThreadRequest {
6
+ threadId: string | number;
7
+ config?: Record<string, any>;
8
+ }
9
+ export interface DeleteThreadData {
10
+ success: boolean;
11
+ message: string;
12
+ data: boolean;
13
+ }
14
+ export interface DeleteThreadResponse {
15
+ data: DeleteThreadData;
16
+ metadata: ResponseMetadata;
17
+ }
18
+ export declare function deleteThread(context: DeleteThreadContext, request: DeleteThreadRequest): Promise<DeleteThreadResponse>;
19
+ //# sourceMappingURL=deleteThread.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteThread.d.ts","sourceRoot":"","sources":["../../src/endpoints/deleteThread.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAuC,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpF,MAAM,WAAW,mBAAoB,SAAQ,cAAc;CAAG;AAE9D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CAoD/B"}
@@ -0,0 +1,20 @@
1
+ import { ResponseMetadata } from './metadata.js';
2
+ import { RequestContext } from '../request.js';
3
+ export interface DeleteThreadMessageContext extends RequestContext {
4
+ }
5
+ export interface DeleteThreadMessageRequest {
6
+ threadId: string | number;
7
+ messageId: string;
8
+ config?: Record<string, any>;
9
+ }
10
+ export interface DeleteThreadMessageData {
11
+ success: boolean;
12
+ message: string;
13
+ data: Record<string, any>;
14
+ }
15
+ export interface DeleteThreadMessageResponse {
16
+ data: DeleteThreadMessageData;
17
+ metadata: ResponseMetadata;
18
+ }
19
+ export declare function deleteThreadMessage(context: DeleteThreadMessageContext, request: DeleteThreadMessageRequest): Promise<DeleteThreadMessageResponse>;
20
+ //# sourceMappingURL=deleteThreadMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteThreadMessage.d.ts","sourceRoot":"","sources":["../../src/endpoints/deleteThreadMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAuC,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpF,MAAM,WAAW,0BAA2B,SAAQ,cAAc;CAAG;AAErE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,uBAAuB,CAAC;IAC9B,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,0BAA0B,EACnC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,2BAA2B,CAAC,CAwDtC"}