agentbase-web-sdk 1.12.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 (107) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +41 -0
  3. package/dist/cjs/sdk.js +16322 -0
  4. package/dist/cjs/sdk.js.map +1 -0
  5. package/dist/esm/sdk.js +16292 -0
  6. package/dist/esm/sdk.js.map +1 -0
  7. package/dist/iife/sdk.js +20121 -0
  8. package/package.json +54 -0
  9. package/types/channel.d.ts +79 -0
  10. package/types/client.d.ts +289 -0
  11. package/types/enums/authentication-factor.d.ts +6 -0
  12. package/types/enums/authenticator-type.d.ts +3 -0
  13. package/types/enums/browser-permission.d.ts +22 -0
  14. package/types/enums/browser.d.ts +16 -0
  15. package/types/enums/credit-card.d.ts +19 -0
  16. package/types/enums/data-api-catalog-data-source-database-type.d.ts +6 -0
  17. package/types/enums/data-api-catalog-data-source-visibility-source.d.ts +7 -0
  18. package/types/enums/data-api-catalog-database-availability.d.ts +5 -0
  19. package/types/enums/data-api-catalog-database-classification.d.ts +4 -0
  20. package/types/enums/data-api-catalog-database-status.d.ts +4 -0
  21. package/types/enums/data-api-catalog-database-visibility-source.d.ts +7 -0
  22. package/types/enums/data-api-filter-logic.d.ts +4 -0
  23. package/types/enums/data-api-owned-binding-principal-type.d.ts +4 -0
  24. package/types/enums/data-api-owned-binding-status.d.ts +4 -0
  25. package/types/enums/distillation-message-role.d.ts +6 -0
  26. package/types/enums/distillation-mode.d.ts +4 -0
  27. package/types/enums/distillation-tool-status.d.ts +4 -0
  28. package/types/enums/execution-method.d.ts +9 -0
  29. package/types/enums/execution-status.d.ts +7 -0
  30. package/types/enums/execution-trigger.d.ts +5 -0
  31. package/types/enums/export-job-mode.d.ts +4 -0
  32. package/types/enums/export-mode.d.ts +3 -0
  33. package/types/enums/feedback-type.d.ts +5 -0
  34. package/types/enums/flag.d.ts +197 -0
  35. package/types/enums/format.d.ts +4 -0
  36. package/types/enums/image-format.d.ts +9 -0
  37. package/types/enums/image-gravity.d.ts +11 -0
  38. package/types/enums/kind.d.ts +6 -0
  39. package/types/enums/kinds.d.ts +6 -0
  40. package/types/enums/knowledge-base-data-source-document-import-result-status.d.ts +5 -0
  41. package/types/enums/memory-access-mode.d.ts +4 -0
  42. package/types/enums/memory-batch-operation.d.ts +5 -0
  43. package/types/enums/memory-bulk-delete-item-status.d.ts +4 -0
  44. package/types/enums/memory-bulk-delete-response-status.d.ts +4 -0
  45. package/types/enums/memory-handling-policy.d.ts +5 -0
  46. package/types/enums/memory-message-role.d.ts +5 -0
  47. package/types/enums/memory-pipeline-run-result-status.d.ts +4 -0
  48. package/types/enums/memory-pipeline-run-scenario.d.ts +6 -0
  49. package/types/enums/memory-pipeline-run-status.d.ts +6 -0
  50. package/types/enums/memory-record-kind.d.ts +5 -0
  51. package/types/enums/memory-record-sensitivity.d.ts +5 -0
  52. package/types/enums/memory-scope.d.ts +7 -0
  53. package/types/enums/memory-sensitivity.d.ts +6 -0
  54. package/types/enums/memory-share-subject-type.d.ts +4 -0
  55. package/types/enums/method.d.ts +9 -0
  56. package/types/enums/o-auth-provider.d.ts +45 -0
  57. package/types/enums/organization-project-deletion-deletion-status.d.ts +5 -0
  58. package/types/enums/organization-role.d.ts +8 -0
  59. package/types/enums/organization-usage-range.d.ts +5 -0
  60. package/types/enums/outcome.d.ts +6 -0
  61. package/types/enums/path-match.d.ts +4 -0
  62. package/types/enums/profile-extraction-mode.d.ts +4 -0
  63. package/types/enums/profile-type.d.ts +4 -0
  64. package/types/enums/project-deletion-restore-status.d.ts +3 -0
  65. package/types/enums/project-deletion-result-deletion-status.d.ts +5 -0
  66. package/types/enums/project-deletion-result-status.d.ts +5 -0
  67. package/types/enums/record-kind.d.ts +5 -0
  68. package/types/enums/retention-policy.d.ts +3 -0
  69. package/types/enums/scenario.d.ts +6 -0
  70. package/types/enums/scene.d.ts +4 -0
  71. package/types/enums/scope.d.ts +5 -0
  72. package/types/enums/source-type.d.ts +6 -0
  73. package/types/enums/status.d.ts +23 -0
  74. package/types/enums/theme.d.ts +4 -0
  75. package/types/enums/timezone.d.ts +422 -0
  76. package/types/enums/transaction-action.d.ts +12 -0
  77. package/types/enums/validation-status.d.ts +6 -0
  78. package/types/enums/verification-source.d.ts +5 -0
  79. package/types/id.d.ts +20 -0
  80. package/types/index.d.ts +105 -0
  81. package/types/models.d.ts +3368 -0
  82. package/types/operator.d.ts +180 -0
  83. package/types/permission.d.ts +43 -0
  84. package/types/query.d.ts +442 -0
  85. package/types/role.d.ts +70 -0
  86. package/types/service.d.ts +11 -0
  87. package/types/services/account.d.ts +1350 -0
  88. package/types/services/agent-runtime.d.ts +370 -0
  89. package/types/services/ai-gateway.d.ts +888 -0
  90. package/types/services/avatars.d.ts +320 -0
  91. package/types/services/data-api.d.ts +257 -0
  92. package/types/services/databases.d.ts +441 -0
  93. package/types/services/documents-db.d.ts +409 -0
  94. package/types/services/functions.d.ts +175 -0
  95. package/types/services/graphql.d.ts +43 -0
  96. package/types/services/knowledge-bases.d.ts +304 -0
  97. package/types/services/llm-gateway.d.ts +289 -0
  98. package/types/services/locale.d.ts +64 -0
  99. package/types/services/memory.d.ts +2352 -0
  100. package/types/services/messaging.d.ts +53 -0
  101. package/types/services/projects.d.ts +129 -0
  102. package/types/services/realtime.d.ts +197 -0
  103. package/types/services/self-hosted-organizations.d.ts +495 -0
  104. package/types/services/storage.d.ts +265 -0
  105. package/types/services/tables-db.d.ts +438 -0
  106. package/types/services/teams.d.ts +341 -0
  107. package/types/services/vectors-db.d.ts +297 -0
@@ -0,0 +1,370 @@
1
+ import { Client } from '../client';
2
+ export declare class AgentRuntime {
3
+ client: Client;
4
+ constructor(client: Client);
5
+ /**
6
+ * Accept a Langfuse-compatible E2E evaluation for the current Published Agent Version.
7
+ *
8
+ * @param {string} params.agentId - Agent Runtime route identifier.
9
+ * @throws {AgentbaseException}
10
+ * @returns {Promise<{}>}
11
+ */
12
+ evaluateAgent(params: {
13
+ agentId: string;
14
+ }): Promise<{}>;
15
+ /**
16
+ * Accept a Langfuse-compatible E2E evaluation for the current Published Agent Version.
17
+ *
18
+ * @param {string} agentId - Agent Runtime route identifier.
19
+ * @throws {AgentbaseException}
20
+ * @returns {Promise<{}>}
21
+ * @deprecated Use the object parameter style method for a better developer experience.
22
+ */
23
+ evaluateAgent(agentId: string): Promise<{}>;
24
+ /**
25
+ * Create a Run in an existing Thread.
26
+ *
27
+ * @param {string} params.agentId - Agent Runtime route identifier.
28
+ * @param {string} params.agentVersionId - Published Agent Version returned when the Thread was created.
29
+ * @param {string} params.threadId - Thread identifier.
30
+ * @param {string} params.userMessage - User message.
31
+ * @throws {AgentbaseException}
32
+ * @returns {Promise<{}>}
33
+ */
34
+ createRun(params: {
35
+ agentId: string;
36
+ agentVersionId: string;
37
+ threadId: string;
38
+ userMessage: string;
39
+ }): Promise<{}>;
40
+ /**
41
+ * Create a Run in an existing Thread.
42
+ *
43
+ * @param {string} agentId - Agent Runtime route identifier.
44
+ * @param {string} agentVersionId - Published Agent Version returned when the Thread was created.
45
+ * @param {string} threadId - Thread identifier.
46
+ * @param {string} userMessage - User message.
47
+ * @throws {AgentbaseException}
48
+ * @returns {Promise<{}>}
49
+ * @deprecated Use the object parameter style method for a better developer experience.
50
+ */
51
+ createRun(agentId: string, agentVersionId: string, threadId: string, userMessage: string): Promise<{}>;
52
+ /**
53
+ * List Threads created by the current Project principal.
54
+ *
55
+ * @param {string} params.agentId - Agent Runtime route identifier.
56
+ * @param {string} params.agentVersionId - Published Agent Version returned when the Thread was created.
57
+ * @param {number} params.limit - Maximum number of records.
58
+ * @param {string} params.after - Pagination cursor.
59
+ * @throws {AgentbaseException}
60
+ * @returns {Promise<{}>}
61
+ */
62
+ listThreads(params: {
63
+ agentId: string;
64
+ agentVersionId: string;
65
+ limit?: number;
66
+ after?: string;
67
+ }): Promise<{}>;
68
+ /**
69
+ * List Threads created by the current Project principal.
70
+ *
71
+ * @param {string} agentId - Agent Runtime route identifier.
72
+ * @param {string} agentVersionId - Published Agent Version returned when the Thread was created.
73
+ * @param {number} limit - Maximum number of records.
74
+ * @param {string} after - Pagination cursor.
75
+ * @throws {AgentbaseException}
76
+ * @returns {Promise<{}>}
77
+ * @deprecated Use the object parameter style method for a better developer experience.
78
+ */
79
+ listThreads(agentId: string, agentVersionId: string, limit?: number, after?: string): Promise<{}>;
80
+ /**
81
+ * Create a Thread using the Agent current Published Version.
82
+ *
83
+ * @param {string} params.agentId - Agent Runtime route identifier.
84
+ * @throws {AgentbaseException}
85
+ * @returns {Promise<{}>}
86
+ */
87
+ createThread(params: {
88
+ agentId: string;
89
+ }): Promise<{}>;
90
+ /**
91
+ * Create a Thread using the Agent current Published Version.
92
+ *
93
+ * @param {string} agentId - Agent Runtime route identifier.
94
+ * @throws {AgentbaseException}
95
+ * @returns {Promise<{}>}
96
+ * @deprecated Use the object parameter style method for a better developer experience.
97
+ */
98
+ createThread(agentId: string): Promise<{}>;
99
+ /**
100
+ * Get a Thread owned by the current Project principal.
101
+ *
102
+ * @param {string} params.agentId - Agent Runtime route identifier.
103
+ * @param {string} params.threadId - Agent Runtime route identifier.
104
+ * @param {string} params.agentVersionId - Published Agent Version returned when the Thread was created.
105
+ * @throws {AgentbaseException}
106
+ * @returns {Promise<{}>}
107
+ */
108
+ getThread(params: {
109
+ agentId: string;
110
+ threadId: string;
111
+ agentVersionId: string;
112
+ }): Promise<{}>;
113
+ /**
114
+ * Get a Thread owned by the current Project principal.
115
+ *
116
+ * @param {string} agentId - Agent Runtime route identifier.
117
+ * @param {string} threadId - Agent Runtime route identifier.
118
+ * @param {string} agentVersionId - Published Agent Version returned when the Thread was created.
119
+ * @throws {AgentbaseException}
120
+ * @returns {Promise<{}>}
121
+ * @deprecated Use the object parameter style method for a better developer experience.
122
+ */
123
+ getThread(agentId: string, threadId: string, agentVersionId: string): Promise<{}>;
124
+ /**
125
+ * Delete a Thread owned by the current Project principal.
126
+ *
127
+ * @param {string} params.agentId - Agent Runtime route identifier.
128
+ * @param {string} params.threadId - Agent Runtime route identifier.
129
+ * @param {string} params.agentVersionId - Published Agent Version returned when the Thread was created.
130
+ * @throws {AgentbaseException}
131
+ * @returns {Promise<{}>}
132
+ */
133
+ deleteThread(params: {
134
+ agentId: string;
135
+ threadId: string;
136
+ agentVersionId: string;
137
+ }): Promise<{}>;
138
+ /**
139
+ * Delete a Thread owned by the current Project principal.
140
+ *
141
+ * @param {string} agentId - Agent Runtime route identifier.
142
+ * @param {string} threadId - Agent Runtime route identifier.
143
+ * @param {string} agentVersionId - Published Agent Version returned when the Thread was created.
144
+ * @throws {AgentbaseException}
145
+ * @returns {Promise<{}>}
146
+ * @deprecated Use the object parameter style method for a better developer experience.
147
+ */
148
+ deleteThread(agentId: string, threadId: string, agentVersionId: string): Promise<{}>;
149
+ /**
150
+ * List Context compactions for a Thread.
151
+ *
152
+ * @param {string} params.agentId - Agent Runtime route identifier.
153
+ * @param {string} params.threadId - Agent Runtime route identifier.
154
+ * @param {string} params.agentVersionId - Published Agent Version returned when the Thread was created.
155
+ * @param {number} params.limit - Maximum number of records.
156
+ * @param {string} params.after - Pagination cursor.
157
+ * @throws {AgentbaseException}
158
+ * @returns {Promise<{}>}
159
+ */
160
+ listContextCompactions(params: {
161
+ agentId: string;
162
+ threadId: string;
163
+ agentVersionId: string;
164
+ limit?: number;
165
+ after?: string;
166
+ }): Promise<{}>;
167
+ /**
168
+ * List Context compactions for a Thread.
169
+ *
170
+ * @param {string} agentId - Agent Runtime route identifier.
171
+ * @param {string} threadId - Agent Runtime route identifier.
172
+ * @param {string} agentVersionId - Published Agent Version returned when the Thread was created.
173
+ * @param {number} limit - Maximum number of records.
174
+ * @param {string} after - Pagination cursor.
175
+ * @throws {AgentbaseException}
176
+ * @returns {Promise<{}>}
177
+ * @deprecated Use the object parameter style method for a better developer experience.
178
+ */
179
+ listContextCompactions(agentId: string, threadId: string, agentVersionId: string, limit?: number, after?: string): Promise<{}>;
180
+ /**
181
+ * List messages in a Thread.
182
+ *
183
+ * @param {string} params.agentId - Agent Runtime route identifier.
184
+ * @param {string} params.threadId - Agent Runtime route identifier.
185
+ * @param {string} params.agentVersionId - Published Agent Version returned when the Thread was created.
186
+ * @param {number} params.limit - Maximum number of records.
187
+ * @param {string} params.after - Pagination cursor.
188
+ * @throws {AgentbaseException}
189
+ * @returns {Promise<{}>}
190
+ */
191
+ listThreadMessages(params: {
192
+ agentId: string;
193
+ threadId: string;
194
+ agentVersionId: string;
195
+ limit?: number;
196
+ after?: string;
197
+ }): Promise<{}>;
198
+ /**
199
+ * List messages in a Thread.
200
+ *
201
+ * @param {string} agentId - Agent Runtime route identifier.
202
+ * @param {string} threadId - Agent Runtime route identifier.
203
+ * @param {string} agentVersionId - Published Agent Version returned when the Thread was created.
204
+ * @param {number} limit - Maximum number of records.
205
+ * @param {string} after - Pagination cursor.
206
+ * @throws {AgentbaseException}
207
+ * @returns {Promise<{}>}
208
+ * @deprecated Use the object parameter style method for a better developer experience.
209
+ */
210
+ listThreadMessages(agentId: string, threadId: string, agentVersionId: string, limit?: number, after?: string): Promise<{}>;
211
+ /**
212
+ * Get a Run owned by the current Project principal.
213
+ *
214
+ * @param {string} params.runId - Agent Runtime route identifier.
215
+ * @param {string} params.agentVersionId - Published Agent Version associated with the Run.
216
+ * @throws {AgentbaseException}
217
+ * @returns {Promise<{}>}
218
+ */
219
+ getRun(params: {
220
+ runId: string;
221
+ agentVersionId: string;
222
+ }): Promise<{}>;
223
+ /**
224
+ * Get a Run owned by the current Project principal.
225
+ *
226
+ * @param {string} runId - Agent Runtime route identifier.
227
+ * @param {string} agentVersionId - Published Agent Version associated with the Run.
228
+ * @throws {AgentbaseException}
229
+ * @returns {Promise<{}>}
230
+ * @deprecated Use the object parameter style method for a better developer experience.
231
+ */
232
+ getRun(runId: string, agentVersionId: string): Promise<{}>;
233
+ /**
234
+ * Cancel a Run owned by the current Project principal.
235
+ *
236
+ * @param {string} params.runId - Agent Runtime route identifier.
237
+ * @param {string} params.agentVersionId - Published Agent Version associated with the Run.
238
+ * @throws {AgentbaseException}
239
+ * @returns {Promise<{}>}
240
+ */
241
+ cancelRun(params: {
242
+ runId: string;
243
+ agentVersionId: string;
244
+ }): Promise<{}>;
245
+ /**
246
+ * Cancel a Run owned by the current Project principal.
247
+ *
248
+ * @param {string} runId - Agent Runtime route identifier.
249
+ * @param {string} agentVersionId - Published Agent Version associated with the Run.
250
+ * @throws {AgentbaseException}
251
+ * @returns {Promise<{}>}
252
+ * @deprecated Use the object parameter style method for a better developer experience.
253
+ */
254
+ cancelRun(runId: string, agentVersionId: string): Promise<{}>;
255
+ /**
256
+ * Stream resumable events for a Run.
257
+ *
258
+ * @param {string} params.runId - Agent Runtime route identifier.
259
+ * @param {string} params.agentVersionId - Published Agent Version associated with the Run.
260
+ * @throws {AgentbaseException}
261
+ * @returns {Promise<{}>}
262
+ */
263
+ streamRunEvents(params: {
264
+ runId: string;
265
+ agentVersionId: string;
266
+ }): Promise<{}>;
267
+ /**
268
+ * Stream resumable events for a Run.
269
+ *
270
+ * @param {string} runId - Agent Runtime route identifier.
271
+ * @param {string} agentVersionId - Published Agent Version associated with the Run.
272
+ * @throws {AgentbaseException}
273
+ * @returns {Promise<{}>}
274
+ * @deprecated Use the object parameter style method for a better developer experience.
275
+ */
276
+ streamRunEvents(runId: string, agentVersionId: string): Promise<{}>;
277
+ /**
278
+ * List messages produced by a Run.
279
+ *
280
+ * @param {string} params.runId - Agent Runtime route identifier.
281
+ * @param {string} params.agentVersionId - Published Agent Version associated with the Run.
282
+ * @param {number} params.limit - Maximum number of records.
283
+ * @param {string} params.after - Pagination cursor.
284
+ * @throws {AgentbaseException}
285
+ * @returns {Promise<{}>}
286
+ */
287
+ listRunMessages(params: {
288
+ runId: string;
289
+ agentVersionId: string;
290
+ limit?: number;
291
+ after?: string;
292
+ }): Promise<{}>;
293
+ /**
294
+ * List messages produced by a Run.
295
+ *
296
+ * @param {string} runId - Agent Runtime route identifier.
297
+ * @param {string} agentVersionId - Published Agent Version associated with the Run.
298
+ * @param {number} limit - Maximum number of records.
299
+ * @param {string} after - Pagination cursor.
300
+ * @throws {AgentbaseException}
301
+ * @returns {Promise<{}>}
302
+ * @deprecated Use the object parameter style method for a better developer experience.
303
+ */
304
+ listRunMessages(runId: string, agentVersionId: string, limit?: number, after?: string): Promise<{}>;
305
+ /**
306
+ * List model invocations for a Run.
307
+ *
308
+ * @param {string} params.runId - Agent Runtime route identifier.
309
+ * @param {string} params.agentVersionId - Published Agent Version associated with the Run.
310
+ * @param {number} params.limit - Maximum number of records.
311
+ * @param {string} params.after - Pagination cursor.
312
+ * @throws {AgentbaseException}
313
+ * @returns {Promise<{}>}
314
+ */
315
+ listModelInvocations(params: {
316
+ runId: string;
317
+ agentVersionId: string;
318
+ limit?: number;
319
+ after?: string;
320
+ }): Promise<{}>;
321
+ /**
322
+ * List model invocations for a Run.
323
+ *
324
+ * @param {string} runId - Agent Runtime route identifier.
325
+ * @param {string} agentVersionId - Published Agent Version associated with the Run.
326
+ * @param {number} limit - Maximum number of records.
327
+ * @param {string} after - Pagination cursor.
328
+ * @throws {AgentbaseException}
329
+ * @returns {Promise<{}>}
330
+ * @deprecated Use the object parameter style method for a better developer experience.
331
+ */
332
+ listModelInvocations(runId: string, agentVersionId: string, limit?: number, after?: string): Promise<{}>;
333
+ /**
334
+ * Submit one client Tool result to a waiting Run.
335
+ *
336
+ * @param {string} params.runId - Agent Runtime route identifier.
337
+ * @param {string} params.agentVersionId - Published Agent Version associated with the Run.
338
+ * @param {string} params.id - Tool message identifier.
339
+ * @param {string} params.role - Message role. Must be `tool`.
340
+ * @param {string} params.toolCallId - Tool call identifier.
341
+ * @param {string} params.content - JSON encoded Tool result.
342
+ * @param {string} params.error - Optional Tool execution error.
343
+ * @throws {AgentbaseException}
344
+ * @returns {Promise<{}>}
345
+ */
346
+ submitToolMessage(params: {
347
+ runId: string;
348
+ agentVersionId: string;
349
+ id: string;
350
+ role: string;
351
+ toolCallId: string;
352
+ content: string;
353
+ error?: string;
354
+ }): Promise<{}>;
355
+ /**
356
+ * Submit one client Tool result to a waiting Run.
357
+ *
358
+ * @param {string} runId - Agent Runtime route identifier.
359
+ * @param {string} agentVersionId - Published Agent Version associated with the Run.
360
+ * @param {string} id - Tool message identifier.
361
+ * @param {string} role - Message role. Must be `tool`.
362
+ * @param {string} toolCallId - Tool call identifier.
363
+ * @param {string} content - JSON encoded Tool result.
364
+ * @param {string} error - Optional Tool execution error.
365
+ * @throws {AgentbaseException}
366
+ * @returns {Promise<{}>}
367
+ * @deprecated Use the object parameter style method for a better developer experience.
368
+ */
369
+ submitToolMessage(runId: string, agentVersionId: string, id: string, role: string, toolCallId: string, content: string, error?: string): Promise<{}>;
370
+ }