@realtimex/sdk 1.7.28 → 2.0.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 (66) hide show
  1. package/dist/chunk-DZUAP6FW.mjs +598 -0
  2. package/dist/errors-DwEt8WYf.d.mts +399 -0
  3. package/dist/errors-DwEt8WYf.d.ts +399 -0
  4. package/dist/index.d.mts +8 -2048
  5. package/dist/index.d.ts +8 -2048
  6. package/dist/index.js +308 -4537
  7. package/dist/index.mjs +7 -3783
  8. package/dist/v1/index.d.mts +3 -56
  9. package/dist/v1/index.d.ts +3 -56
  10. package/dist/v1/index.js +255 -681
  11. package/dist/v1/index.mjs +4 -42
  12. package/package.json +6 -7
  13. package/dist/chunk-Z5GAUBIM.mjs +0 -993
  14. package/dist/errors-NufsyIZ-.d.mts +0 -678
  15. package/dist/errors-NufsyIZ-.d.ts +0 -678
  16. package/skills/realtimex-moderator-sdk/SKILL.md +0 -102
  17. package/skills/realtimex-moderator-sdk/references/activities.md +0 -14
  18. package/skills/realtimex-moderator-sdk/references/agents.md +0 -13
  19. package/skills/realtimex-moderator-sdk/references/api-reference/acpagent.md +0 -105
  20. package/skills/realtimex-moderator-sdk/references/api-reference/activities.md +0 -24
  21. package/skills/realtimex-moderator-sdk/references/api-reference/agent.md +0 -27
  22. package/skills/realtimex-moderator-sdk/references/api-reference/api.md +0 -17
  23. package/skills/realtimex-moderator-sdk/references/api-reference/auth.md +0 -36
  24. package/skills/realtimex-moderator-sdk/references/api-reference/contract.md +0 -27
  25. package/skills/realtimex-moderator-sdk/references/api-reference/core.md +0 -40
  26. package/skills/realtimex-moderator-sdk/references/api-reference/database.md +0 -24
  27. package/skills/realtimex-moderator-sdk/references/api-reference/index.md +0 -43
  28. package/skills/realtimex-moderator-sdk/references/api-reference/llm.md +0 -176
  29. package/skills/realtimex-moderator-sdk/references/api-reference/mcp.md +0 -50
  30. package/skills/realtimex-moderator-sdk/references/api-reference/port.md +0 -21
  31. package/skills/realtimex-moderator-sdk/references/api-reference/stt.md +0 -15
  32. package/skills/realtimex-moderator-sdk/references/api-reference/task.md +0 -62
  33. package/skills/realtimex-moderator-sdk/references/api-reference/tts.md +0 -18
  34. package/skills/realtimex-moderator-sdk/references/api-reference/v1-acpauth.md +0 -21
  35. package/skills/realtimex-moderator-sdk/references/api-reference/v1-acpcommands.md +0 -15
  36. package/skills/realtimex-moderator-sdk/references/api-reference/v1-admin.md +0 -48
  37. package/skills/realtimex-moderator-sdk/references/api-reference/v1-auth.md +0 -18
  38. package/skills/realtimex-moderator-sdk/references/api-reference/v1-channels.md +0 -78
  39. package/skills/realtimex-moderator-sdk/references/api-reference/v1-credentials.md +0 -27
  40. package/skills/realtimex-moderator-sdk/references/api-reference/v1-customthemes.md +0 -24
  41. package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopbrowser.md +0 -39
  42. package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopembed.md +0 -24
  43. package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopruntimesessions.md +0 -33
  44. package/skills/realtimex-moderator-sdk/references/api-reference/v1-document.md +0 -39
  45. package/skills/realtimex-moderator-sdk/references/api-reference/v1-embed.md +0 -27
  46. package/skills/realtimex-moderator-sdk/references/api-reference/v1-openai.md +0 -21
  47. package/skills/realtimex-moderator-sdk/references/api-reference/v1-sttapi.md +0 -12
  48. package/skills/realtimex-moderator-sdk/references/api-reference/v1-system.md +0 -36
  49. package/skills/realtimex-moderator-sdk/references/api-reference/v1-thread.md +0 -26
  50. package/skills/realtimex-moderator-sdk/references/api-reference/v1-users.md +0 -15
  51. package/skills/realtimex-moderator-sdk/references/api-reference/v1-workspace.md +0 -39
  52. package/skills/realtimex-moderator-sdk/references/api-reference/webhook.md +0 -13
  53. package/skills/realtimex-moderator-sdk/references/api-reference.md +0 -1330
  54. package/skills/realtimex-moderator-sdk/references/app-concepts.md +0 -1276
  55. package/skills/realtimex-moderator-sdk/references/browser.md +0 -27
  56. package/skills/realtimex-moderator-sdk/references/channels.md +0 -189
  57. package/skills/realtimex-moderator-sdk/references/credentials.md +0 -111
  58. package/skills/realtimex-moderator-sdk/references/known-issues.md +0 -237
  59. package/skills/realtimex-moderator-sdk/references/llm.md +0 -13
  60. package/skills/realtimex-moderator-sdk/references/mcp.md +0 -13
  61. package/skills/realtimex-moderator-sdk/references/permissions.md +0 -30
  62. package/skills/realtimex-moderator-sdk/references/quickstart.md +0 -16
  63. package/skills/realtimex-moderator-sdk/references/terminal-sessions.md +0 -34
  64. package/skills/realtimex-moderator-sdk/references/workspaces.md +0 -20
  65. package/skills/realtimex-moderator-sdk/scripts/lib/sdk-init.js +0 -171
  66. package/skills/realtimex-moderator-sdk/scripts/rtx.js +0 -1359
package/dist/v1/index.js CHANGED
@@ -25,24 +25,13 @@ __export(v1_exports, {
25
25
  DeveloperApiError: () => DeveloperApiError,
26
26
  NotFoundError: () => NotFoundError,
27
27
  ServerError: () => ServerError,
28
- V1AdminModule: () => V1AdminModule,
29
28
  V1ApiNamespace: () => V1ApiNamespace,
30
- V1AuthModule: () => V1AuthModule,
31
- V1ChannelsModule: () => V1ChannelsModule,
32
- V1DesktopBrowserModule: () => V1DesktopBrowserModule,
33
- V1DesktopRuntimeSessionsModule: () => V1DesktopRuntimeSessionsModule,
34
- V1DocumentModule: () => V1DocumentModule,
35
- V1EmbedModule: () => V1EmbedModule,
36
- V1OpenAIModule: () => V1OpenAIModule,
37
- V1SystemModule: () => V1SystemModule,
29
+ V1ChatModule: () => V1ChatModule,
38
30
  V1ThreadModule: () => V1ThreadModule,
39
- V1UsersModule: () => V1UsersModule,
40
31
  V1WorkspaceModule: () => V1WorkspaceModule,
41
32
  ValidationError: () => ValidationError,
42
33
  streamThreadChat: () => streamThreadChat,
43
- streamWorkspaceChat: () => streamWorkspaceChat,
44
- uploadFile: () => uploadFile,
45
- uploadFileToFolder: () => uploadFileToFolder
34
+ streamWorkspaceChat: () => streamWorkspaceChat
46
35
  });
47
36
  module.exports = __toCommonJS(v1_exports);
48
37
 
@@ -161,840 +150,463 @@ var DeveloperApiClient = class {
161
150
  }
162
151
  };
163
152
 
164
- // src/v1/modules/v1Auth.ts
165
- var V1AuthModule = class {
153
+ // src/v1/modules/v1Chat.ts
154
+ var V1ChatModule = class {
166
155
  constructor(client) {
167
156
  this.client = client;
168
157
  }
169
158
  /**
170
- * Verify the attached Authentication header contains a valid API token.
171
- * @see GET /v1/auth
172
- */
173
- async getAuth() {
174
- return this.client.request("GET", `/v1/auth`);
175
- }
176
- /**
177
- * Relay external browser auth callbacks back to the local Electron renderer. Localhost only; keyed by OAuth state.
178
- * @see POST /v1/auth/external-callback
179
- */
180
- async externalCallback() {
181
- return this.client.request("POST", `/v1/auth/external-callback`);
182
- }
183
- /**
184
- * Poll for a relayed external browser auth callback by OAuth state. Localhost only.
185
- * @see GET /v1/auth/external-callback/{state}
186
- */
187
- async getExternalCallback(state) {
188
- return this.client.request("GET", `/v1/auth/external-callback/${state}`);
189
- }
190
- };
191
-
192
- // src/v1/modules/v1Admin.ts
193
- var V1AdminModule = class {
194
- constructor(client) {
195
- this.client = client;
196
- }
197
- /**
198
- * Check to see if the instance is in multi-user-mode first. Methods are disabled until multi user mode is enabled via the UI.
199
- * @see GET /v1/admin/is-multi-user-mode
200
- */
201
- async getIsMultiUserMode() {
202
- return this.client.request("GET", `/v1/admin/is-multi-user-mode`);
203
- }
204
- /**
205
- * Check to see if the instance is in multi-user-mode first. Methods are disabled until multi user mode is enabled via the UI.
206
- * @see GET /v1/admin/users
207
- */
208
- async listUsers() {
209
- return this.client.request("GET", `/v1/admin/users`);
210
- }
211
- /**
212
- * Create a new user with username and password. Methods are disabled until multi user mode is enabled via the UI.
213
- * @see POST /v1/admin/users/new
214
- */
215
- async createUser(body) {
216
- return this.client.request("POST", `/v1/admin/users/new`, body);
217
- }
218
- /**
219
- * Update existing user settings. Methods are disabled until multi user mode is enabled via the UI.
220
- * @see POST /v1/admin/users/{id}
221
- */
222
- async updateUser(id, body) {
223
- return this.client.request("POST", `/v1/admin/users/${id}`, body);
224
- }
225
- /**
226
- * Delete existing user by id. Methods are disabled until multi user mode is enabled via the UI.
227
- * @see DELETE /v1/admin/users/{id}
228
- */
229
- async deleteUser(id) {
230
- return this.client.request("DELETE", `/v1/admin/users/${id}`);
231
- }
232
- /**
233
- * List all existing invitations to instance regardless of status. Methods are disabled until multi user mode is enabled via the UI.
234
- * @see GET /v1/admin/invites
235
- */
236
- async listInvites() {
237
- return this.client.request("GET", `/v1/admin/invites`);
238
- }
239
- /**
240
- * Create a new invite code for someone to use to register with instance. Methods are disabled until multi user mode is enabled via the UI.
241
- * @see POST /v1/admin/invite/new
242
- */
243
- async createInvite(body) {
244
- return this.client.request("POST", `/v1/admin/invite/new`, body);
245
- }
246
- /**
247
- * Deactivates (soft-delete) invite by id. Methods are disabled until multi user mode is enabled via the UI.
248
- * @see DELETE /v1/admin/invite/{id}
249
- */
250
- async deleteInvite(id) {
251
- return this.client.request("DELETE", `/v1/admin/invite/${id}`);
252
- }
253
- /**
254
- * Retrieve a list of users with permissions to access the specified workspace.
255
- * @see GET /v1/admin/workspaces/{workspaceId}/users
256
- */
257
- async listWorkspaceUsers(workspaceId) {
258
- return this.client.request("GET", `/v1/admin/workspaces/${workspaceId}/users`);
259
- }
260
- /**
261
- * Overwrite workspace permissions to only be accessible by the given user ids and admins. Methods are disabled until multi user mode is enabled via the UI.
262
- * @see POST /v1/admin/workspaces/{workspaceId}/update-users
263
- */
264
- async updateUsers(workspaceId, body) {
265
- return this.client.request("POST", `/v1/admin/workspaces/${workspaceId}/update-users`, body);
266
- }
267
- /**
268
- * Set workspace permissions to be accessible by the given user ids and admins. Methods are disabled until multi user mode is enabled via the UI.
269
- * @see POST /v1/admin/workspaces/{workspaceSlug}/manage-users
270
- */
271
- async workspacesManageUsers(workspaceSlug, body) {
272
- return this.client.request("POST", `/v1/admin/workspaces/${workspaceSlug}/manage-users`, body);
273
- }
274
- /**
275
- * All chats in the system ordered by most recent. Methods are disabled until multi user mode is enabled via the UI.
276
- * @see POST /v1/admin/workspace-chats
159
+ * Stream a chat response for a workspace default thread.
160
+ * @see POST /v1/workspace/{slug}/stream-chat
277
161
  */
278
- async workspaceChats(body) {
279
- return this.client.request("POST", `/v1/admin/workspace-chats`, body);
162
+ // @streaming-stub — implement SSE parsing in overrides/v1ChatStreaming.ts
163
+ async streamWorkspaceChat(slug, body) {
164
+ return this.client.requestRaw("POST", `/v1/workspace/${slug}/stream-chat`, body);
280
165
  }
281
166
  /**
282
- * Update multi-user preferences for instance. Methods are disabled until multi user mode is enabled via the UI.
283
- * @see POST /v1/admin/preferences
167
+ * Stream a chat response for a workspace thread.
168
+ * @see POST /v1/workspace/{slug}/thread/{threadSlug}/stream-chat
284
169
  */
285
- async createPreference(body) {
286
- return this.client.request("POST", `/v1/admin/preferences`, body);
170
+ // @streaming-stub — implement SSE parsing in overrides/v1ChatStreaming.ts
171
+ async streamThreadChat(slug, threadSlug, body) {
172
+ return this.client.requestRaw("POST", `/v1/workspace/${slug}/thread/${threadSlug}/stream-chat`, body);
287
173
  }
288
174
  };
289
175
 
290
- // src/v1/modules/v1Document.ts
291
- var V1DocumentModule = class {
176
+ // src/v1/modules/v1Workspace.ts
177
+ var V1WorkspaceModule = class {
292
178
  constructor(client) {
293
179
  this.client = client;
294
180
  }
295
181
  /**
296
- * Upload a new file to RealTimeX to be parsed and prepared for embedding.
297
- * @see POST /v1/document/upload
298
- */
299
- // @upload-stub — multipart upload; wire form manually or use helper
300
- async upload(form) {
301
- return this.client.requestMultipart("POST", `/v1/document/upload`, form);
302
- }
303
- /**
304
- * Upload a new file to a specific folder in RealTimeX to be parsed and prepared for embedding. If the folder does not exist, it will be created.
305
- * @see POST /v1/document/upload/{folderName}
306
- */
307
- // @upload-stub — multipart upload; wire form manually or use helper
308
- async uploadFolder(folderName, form) {
309
- return this.client.requestMultipart("POST", `/v1/document/upload/${folderName}`, form);
310
- }
311
- /**
312
- * Upload a valid URL for RealTimeX to scrape and prepare for embedding. Optionally, specify a comma-separated list of workspace slugs to embed the document into post-upload.
313
- * @see POST /v1/document/upload-link
314
- */
315
- async uploadLink(body) {
316
- return this.client.request("POST", `/v1/document/upload-link`, body);
317
- }
318
- /**
319
- * Upload a file by specifying its raw text content and metadata values without having to upload a file.
320
- * @see POST /v1/document/raw-text
321
- */
322
- async rawText(body) {
323
- return this.client.request("POST", `/v1/document/raw-text`, body);
324
- }
325
- /**
326
- * List of all locally-stored documents in instance
327
- * @see GET /v1/documents
328
- */
329
- async listDocuments() {
330
- return this.client.request("GET", `/v1/documents`);
331
- }
332
- /**
333
- * Get all documents stored in a specific folder.
334
- * @see GET /v1/documents/folder/{folderName}
335
- */
336
- async getFolder(folderName) {
337
- return this.client.request("GET", `/v1/documents/folder/${folderName}`);
338
- }
339
- /**
340
- * Check available filetypes and MIMEs that can be uploaded.
341
- * @see GET /v1/document/accepted-file-types
342
- */
343
- async listAcceptedFileTypes() {
344
- return this.client.request("GET", `/v1/document/accepted-file-types`);
345
- }
346
- /**
347
- * Get the known available metadata schema for when doing a raw-text upload and the acceptable type of value for each key.
348
- * @see GET /v1/document/metadata-schema
349
- */
350
- async getMetadataSchema() {
351
- return this.client.request("GET", `/v1/document/metadata-schema`);
352
- }
353
- /**
354
- * Get a single document by its unique RealTimeX document name
355
- * @see GET /v1/document/{docName}
356
- */
357
- async getDocument(docName) {
358
- return this.client.request("GET", `/v1/document/${docName}`);
359
- }
360
- /**
361
- * Create a new folder inside the documents storage directory.
362
- * @see POST /v1/document/create-folder
363
- */
364
- async createFolder(body) {
365
- return this.client.request("POST", `/v1/document/create-folder`, body);
366
- }
367
- /**
368
- * Remove a folder and all its contents from the documents storage directory.
369
- * @see DELETE /v1/document/remove-folder
370
- */
371
- async deleteRemoveFolder() {
372
- return this.client.request("DELETE", `/v1/document/remove-folder`);
373
- }
374
- /**
375
- * Move files within the documents storage directory.
376
- * @see POST /v1/document/move-files
182
+ * List workspaces using the app workspace list behavior.
183
+ * @see GET /v1/workspaces
377
184
  */
378
- async moveFiles(body) {
379
- return this.client.request("POST", `/v1/document/move-files`, body);
380
- }
381
- };
382
-
383
- // src/v1/modules/v1Workspace.ts
384
- var V1WorkspaceModule = class {
385
- constructor(client) {
386
- this.client = client;
185
+ async listWorkspaces() {
186
+ return this.client.request("GET", `/v1/workspaces`);
387
187
  }
388
188
  /**
389
- * Create a new workspace
189
+ * Create a workspace using the app workspace creation behavior.
390
190
  * @see POST /v1/workspace/new
391
191
  */
392
192
  async createWorkspace(body) {
393
193
  return this.client.request("POST", `/v1/workspace/new`, body);
394
194
  }
395
195
  /**
396
- * List all current workspaces
397
- * @see GET /v1/workspaces
196
+ * Search workspaces and threads.
197
+ * @see POST /v1/workspace/search
398
198
  */
399
- async listWorkspaces() {
400
- return this.client.request("GET", `/v1/workspaces`);
199
+ async searchWorkspaces(body) {
200
+ return this.client.request("POST", `/v1/workspace/search`, body);
401
201
  }
402
202
  /**
403
- * Get a workspace by its unique slug.
203
+ * Get a workspace by slug.
404
204
  * @see GET /v1/workspace/{slug}
405
205
  */
406
206
  async getWorkspace(slug) {
407
207
  return this.client.request("GET", `/v1/workspace/${slug}`);
408
208
  }
409
209
  /**
410
- * Deletes a workspace by its slug.
210
+ * Delete a workspace.
411
211
  * @see DELETE /v1/workspace/{slug}
412
212
  */
413
213
  async deleteWorkspace(slug) {
414
214
  return this.client.request("DELETE", `/v1/workspace/${slug}`);
415
215
  }
416
216
  /**
417
- * Update workspace settings by its unique slug.
418
- * @see POST /v1/workspace/{slug}/update
217
+ * Get document content for a workspace document.
218
+ * @see GET /v1/workspace/{slug}/document/{docPath}
419
219
  */
420
- async updateWorkspace(slug, body) {
421
- return this.client.request("POST", `/v1/workspace/${slug}/update`, body);
220
+ async getWorkspaceDocument(slug, docPath) {
221
+ return this.client.request("GET", `/v1/workspace/${slug}/document/${docPath}`);
422
222
  }
423
223
  /**
424
- * Get a workspaces chats regardless of user by its unique slug.
425
- * @see GET /v1/workspace/{slug}/chats
224
+ * Get or create workspace config.
225
+ * @see GET /v1/workspace/{slug}/config
426
226
  */
427
- async listChats(slug) {
428
- return this.client.request("GET", `/v1/workspace/${slug}/chats`);
227
+ async getWorkspaceConfig(slug) {
228
+ return this.client.request("GET", `/v1/workspace/${slug}/config`);
429
229
  }
430
230
  /**
431
- * Add or remove documents from a workspace by its unique slug.
432
- * @see POST /v1/workspace/{slug}/update-embeddings
231
+ * Update workspace config.
232
+ * @see POST /v1/workspace/{slug}/config
433
233
  */
434
- async updateEmbeddings(slug, body) {
435
- return this.client.request("POST", `/v1/workspace/${slug}/update-embeddings`, body);
234
+ async updateWorkspaceConfig(slug, body) {
235
+ return this.client.request("POST", `/v1/workspace/${slug}/config`, body);
436
236
  }
437
237
  /**
438
- * Add or remove pin from a document in a workspace by its unique slug.
439
- * @see POST /v1/workspace/{slug}/update-pin
238
+ * Update workspace settings by slug.
239
+ * @see POST /v1/workspace/{slug}/update
440
240
  */
441
- async updatePin(slug, body) {
442
- return this.client.request("POST", `/v1/workspace/${slug}/update-pin`, body);
241
+ async updateWorkspace(slug, body) {
242
+ return this.client.request("POST", `/v1/workspace/${slug}/update`, body);
443
243
  }
444
244
  /**
445
- * Execute a chat with a workspace
446
- * @see POST /v1/workspace/{slug}/chat
245
+ * Generate a local LLM tuning suggestion.
246
+ * @see POST /v1/workspace/{slug}/local-llm-tuning-suggestion
447
247
  */
448
- async chat(slug, body) {
449
- return this.client.request("POST", `/v1/workspace/${slug}/chat`, body);
248
+ async suggestWorkspaceLocalLlmTuning(slug, body) {
249
+ return this.client.request("POST", `/v1/workspace/${slug}/local-llm-tuning-suggestion`, body);
450
250
  }
451
251
  /**
452
- * Execute a streamable chat with a workspace
453
- * @see POST /v1/workspace/{slug}/stream-chat
252
+ * Upload a document to workspace documents.
253
+ * @see POST /v1/workspace/{slug}/upload
454
254
  */
455
- // @streaming-stub — implement SSE parsing in overrides/v1WorkspaceStreaming.ts
456
- async streamChat(slug, body) {
457
- return this.client.requestRaw("POST", `/v1/workspace/${slug}/stream-chat`, body);
255
+ // @upload-stub — multipart upload; wire form manually or use helper
256
+ async uploadWorkspaceDocument(slug, form) {
257
+ return this.client.requestMultipart("POST", `/v1/workspace/${slug}/upload`, form);
458
258
  }
459
259
  /**
460
- * Perform a vector similarity search in a workspace
461
- * @see POST /v1/workspace/{slug}/vector-search
260
+ * Upload a link to workspace documents.
261
+ * @see POST /v1/workspace/{slug}/upload-link
462
262
  */
463
- async vectorSearch(slug, body) {
464
- return this.client.request("POST", `/v1/workspace/${slug}/vector-search`, body);
465
- }
466
- };
467
-
468
- // src/v1/modules/v1System.ts
469
- var V1SystemModule = class {
470
- constructor(client) {
471
- this.client = client;
263
+ async uploadWorkspaceLink(slug, body) {
264
+ return this.client.request("POST", `/v1/workspace/${slug}/upload-link`, body);
472
265
  }
473
266
  /**
474
- * Dump all settings to file storage
475
- * @see GET /v1/system/env-dump
267
+ * Update workspace document embeddings.
268
+ * @see POST /v1/workspace/{slug}/update-embeddings
476
269
  */
477
- async getEnvDump() {
478
- return this.client.request("GET", `/v1/system/env-dump`);
270
+ async updateWorkspaceEmbeddings(slug, body) {
271
+ return this.client.request("POST", `/v1/workspace/${slug}/update-embeddings`, body);
479
272
  }
480
273
  /**
481
- * Get all current system settings that are defined.
482
- * @see GET /v1/system
274
+ * Reset workspace vector database records.
275
+ * @see DELETE /v1/workspace/{slug}/reset-vector-db
483
276
  */
484
- async getSystem() {
485
- return this.client.request("GET", `/v1/system`);
277
+ async resetWorkspaceVectorDb(slug) {
278
+ return this.client.request("DELETE", `/v1/workspace/${slug}/reset-vector-db`);
486
279
  }
487
280
  /**
488
- * Number of all vectors in connected vector database
489
- * @see GET /v1/system/vector-count
281
+ * Get workspace LLM provider metadata.
282
+ * @see GET /v1/workspace/{slug}/llm-provider
490
283
  */
491
- async getVectorCount() {
492
- return this.client.request("GET", `/v1/system/vector-count`);
284
+ async getWorkspaceLlmProvider(slug) {
285
+ return this.client.request("GET", `/v1/workspace/${slug}/llm-provider`);
493
286
  }
494
287
  /**
495
- * Update a system setting or preference.
496
- * @see POST /v1/system/update-env
288
+ * Get workspace vision availability.
289
+ * @see GET /v1/workspace/{slug}/vision-availability
497
290
  */
498
- async updateEnv(body) {
499
- return this.client.request("POST", `/v1/system/update-env`, body);
291
+ async getWorkspaceVisionAvailability(slug) {
292
+ return this.client.request("GET", `/v1/workspace/${slug}/vision-availability`);
500
293
  }
501
294
  /**
502
- * Export all of the chats from the system in a known format. Output depends on the type sent. Will be send with the correct header for the output.
503
- * @see GET /v1/system/export-chats
295
+ * Get workspace chats.
296
+ * @see GET /v1/workspace/{slug}/chats
504
297
  */
505
- async listExportChats() {
506
- return this.client.request("GET", `/v1/system/export-chats`);
298
+ async getWorkspaceChats(slug) {
299
+ return this.client.request("GET", `/v1/workspace/${slug}/chats`);
507
300
  }
508
301
  /**
509
- * Permanently remove documents from the system.
510
- * @see DELETE /v1/system/remove-documents
302
+ * Get workspace terminal session details.
303
+ * @see GET /v1/workspace/{slug}/terminal-session-details
511
304
  */
512
- async deleteRemoveDocument() {
513
- return this.client.request("DELETE", `/v1/system/remove-documents`);
305
+ async getWorkspaceTerminalSessionDetails(slug) {
306
+ return this.client.request("GET", `/v1/workspace/${slug}/terminal-session-details`);
514
307
  }
515
308
  /**
516
- * Returns a health check object with server uptime and version.
517
- * @see GET /v1/system/health
309
+ * Persist terminal UI events.
310
+ * @see POST /v1/workspace/{slug}/terminal-ui-events
518
311
  */
519
- async getHealth() {
520
- return this.client.request("GET", `/v1/system/health`);
312
+ async persistWorkspaceTerminalUiEvents(slug, body) {
313
+ return this.client.request("POST", `/v1/workspace/${slug}/terminal-ui-events`, body);
521
314
  }
522
315
  /**
523
- * Returns a health check object with server uptime and version.
524
- * @see GET /v1/system/health-version-2
316
+ * Persist a linked terminal message.
317
+ * @see POST /v1/workspace/{slug}/linked-terminal-message
525
318
  */
526
- async getHealthVersion2() {
527
- return this.client.request("GET", `/v1/system/health-version-2`);
319
+ async createWorkspaceLinkedTerminalMessage(slug, body) {
320
+ return this.client.request("POST", `/v1/workspace/${slug}/linked-terminal-message`, body);
528
321
  }
529
322
  /**
530
- * Returns a health check object with server uptime and version.
531
- * @see GET /v1/system/health-version-3
323
+ * Delete selected workspace chats.
324
+ * @see DELETE /v1/workspace/{slug}/delete-chats
532
325
  */
533
- async getHealthVersion3() {
534
- return this.client.request("GET", `/v1/system/health-version-3`);
535
- }
536
- };
537
-
538
- // src/v1/modules/v1Thread.ts
539
- var V1ThreadModule = class {
540
- constructor(client) {
541
- this.client = client;
326
+ async deleteWorkspaceChats(slug, body) {
327
+ return this.client.request("DELETE", `/v1/workspace/${slug}/delete-chats`, body);
542
328
  }
543
329
  /**
544
- * Create a new workspace thread
545
- * @see POST /v1/workspace/{slug}/thread/new
330
+ * Delete edited workspace chats from a starting id.
331
+ * @see DELETE /v1/workspace/{slug}/delete-edited-chats
546
332
  */
547
- async createThread(slug, body) {
548
- return this.client.request("POST", `/v1/workspace/${slug}/thread/new`, body);
333
+ async deleteEditedWorkspaceChats(slug, body) {
334
+ return this.client.request("DELETE", `/v1/workspace/${slug}/delete-edited-chats`, body);
549
335
  }
550
336
  /**
551
- * Update thread settings by its unique slug.
552
- * @see POST /v1/workspace/{slug}/thread/{threadSlug}/update
337
+ * Update a workspace chat response.
338
+ * @see POST /v1/workspace/{slug}/update-chat
553
339
  */
554
- async updateThread(slug, threadSlug, body) {
555
- return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/update`, body);
340
+ async updateWorkspaceChat(slug, body) {
341
+ return this.client.request("POST", `/v1/workspace/${slug}/update-chat`, body);
556
342
  }
557
343
  /**
558
- * Delete a workspace thread
559
- * @see DELETE /v1/workspace/{slug}/thread/{threadSlug}
344
+ * Update workspace chat feedback.
345
+ * @see POST /v1/workspace/{slug}/chat-feedback/{chatId}
560
346
  */
561
- async deleteThread(slug, threadSlug) {
562
- return this.client.request("DELETE", `/v1/workspace/${slug}/thread/${threadSlug}`);
347
+ async updateWorkspaceChatFeedback(slug, chatId, body) {
348
+ return this.client.request("POST", `/v1/workspace/${slug}/chat-feedback/${chatId}`, body);
563
349
  }
564
350
  /**
565
- * Get chats for a workspace thread
566
- * @see GET /v1/workspace/{slug}/thread/{threadSlug}/chats
351
+ * Get suggested messages for a workspace.
352
+ * @see GET /v1/workspace/{slug}/suggested-messages
567
353
  */
568
- async listChats(slug, threadSlug) {
569
- return this.client.request("GET", `/v1/workspace/${slug}/thread/${threadSlug}/chats`);
354
+ async getWorkspaceSuggestedMessages(slug) {
355
+ return this.client.request("GET", `/v1/workspace/${slug}/suggested-messages`);
570
356
  }
571
357
  /**
572
- * Chat with a workspace thread
573
- * @see POST /v1/workspace/{slug}/thread/{threadSlug}/chat
358
+ * Save suggested messages for a workspace.
359
+ * @see POST /v1/workspace/{slug}/suggested-messages
574
360
  */
575
- async chat(slug, threadSlug, body) {
576
- return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/chat`, body);
361
+ async saveWorkspaceSuggestedMessages(slug, body) {
362
+ return this.client.request("POST", `/v1/workspace/${slug}/suggested-messages`, body);
577
363
  }
578
364
  /**
579
- * Stream chat with a workspace thread
580
- * @see POST /v1/workspace/{slug}/thread/{threadSlug}/stream-chat
365
+ * Update workspace document pin status.
366
+ * @see POST /v1/workspace/{slug}/update-pin
581
367
  */
582
- // @streaming-stub implement SSE parsing in overrides/v1ThreadStreaming.ts
583
- async streamChat(slug, threadSlug, body) {
584
- return this.client.requestRaw("POST", `/v1/workspace/${slug}/thread/${threadSlug}/stream-chat`, body);
585
- }
586
- };
587
-
588
- // src/v1/modules/v1Users.ts
589
- var V1UsersModule = class {
590
- constructor(client) {
591
- this.client = client;
368
+ async updateWorkspaceDocumentPin(slug, body) {
369
+ return this.client.request("POST", `/v1/workspace/${slug}/update-pin`, body);
592
370
  }
593
371
  /**
594
- * List all users
595
- * @see GET /v1/users
372
+ * Generate text-to-speech audio for a workspace chat.
373
+ * @see GET /v1/workspace/{slug}/tts/{chatId}
596
374
  */
597
- async listUsers() {
598
- return this.client.request("GET", `/v1/users`);
375
+ async getWorkspaceChatTts(slug, chatId) {
376
+ return this.client.request("GET", `/v1/workspace/${slug}/tts/${chatId}`);
599
377
  }
600
378
  /**
601
- * Issue a temporary auth token for a user
602
- * @see GET /v1/users/{id}/issue-auth-token
379
+ * Get a workspace profile picture.
380
+ * @see GET /v1/workspace/{slug}/pfp
603
381
  */
604
- async getIssueAuthToken(id) {
605
- return this.client.request("GET", `/v1/users/${id}/issue-auth-token`);
606
- }
607
- };
608
-
609
- // src/v1/modules/v1OpenAI.ts
610
- var V1OpenAIModule = class {
611
- constructor(client) {
612
- this.client = client;
382
+ async getWorkspaceProfilePicture(slug) {
383
+ return this.client.request("GET", `/v1/workspace/${slug}/pfp`);
613
384
  }
614
385
  /**
615
- * Get all available "models" which are workspaces you can use for chatting.
616
- * @see GET /v1/openai/models
386
+ * Upload a workspace profile picture.
387
+ * @see POST /v1/workspace/{slug}/upload-pfp
617
388
  */
618
- async listModels() {
619
- return this.client.request("GET", `/v1/openai/models`);
389
+ // @upload-stub — multipart upload; wire form manually or use helper
390
+ async uploadWorkspaceProfilePicture(slug, form) {
391
+ return this.client.requestMultipart("POST", `/v1/workspace/${slug}/upload-pfp`, form);
620
392
  }
621
393
  /**
622
- * Execute a chat with a workspace with OpenAI compatibility. Supports streaming as well. Model must be a workspace slug from /models.
623
- * @see POST /v1/openai/chat/completions
394
+ * Remove a workspace profile picture.
395
+ * @see DELETE /v1/workspace/{slug}/remove-pfp
624
396
  */
625
- async chatCompletions(body) {
626
- return this.client.request("POST", `/v1/openai/chat/completions`, body);
397
+ async removeWorkspaceProfilePicture(slug) {
398
+ return this.client.request("DELETE", `/v1/workspace/${slug}/remove-pfp`);
627
399
  }
628
400
  /**
629
- * Get the embeddings of any arbitrary text string. This will use the embedder provider set in the system. Please ensure the token length of each string fits within the context of your embedder model.
630
- * @see POST /v1/openai/embeddings
401
+ * Fork the workspace default thread.
402
+ * @see POST /v1/workspace/{slug}/thread/fork
631
403
  */
632
- async createEmbedding(body) {
633
- return this.client.request("POST", `/v1/openai/embeddings`, body);
404
+ async forkThread(slug, body) {
405
+ return this.client.request("POST", `/v1/workspace/${slug}/thread/fork`, body);
634
406
  }
635
407
  /**
636
- * List all the vector database collections connected to RealTimeX. These are essentially workspaces but return their unique vector db identifier - this is the same as the workspace slug.
637
- * @see GET /v1/openai/vector_stores
408
+ * Hide a workspace chat.
409
+ * @see PUT /v1/workspace/workspace-chats/{id}
638
410
  */
639
- async listVectorStores() {
640
- return this.client.request("GET", `/v1/openai/vector_stores`);
641
- }
642
- };
643
-
644
- // src/v1/modules/v1Embed.ts
645
- var V1EmbedModule = class {
646
- constructor(client) {
647
- this.client = client;
411
+ async hideWorkspaceChat(id) {
412
+ return this.client.request("PUT", `/v1/workspace/workspace-chats/${id}`);
648
413
  }
649
414
  /**
650
- * List all active embeds
651
- * @see GET /v1/embed
415
+ * Upload and embed a document.
416
+ * @see POST /v1/workspace/{slug}/upload-and-embed
652
417
  */
653
- async getEmbed() {
654
- return this.client.request("GET", `/v1/embed`);
418
+ // @upload-stub — multipart upload; wire form manually or use helper
419
+ async uploadAndEmbedWorkspaceDocument(slug, form) {
420
+ return this.client.requestMultipart("POST", `/v1/workspace/${slug}/upload-and-embed`, form);
655
421
  }
656
422
  /**
657
- * Get all chats for a specific embed
658
- * @see GET /v1/embed/{embedUuid}/chats
423
+ * Remove and unembed a document.
424
+ * @see DELETE /v1/workspace/{slug}/remove-and-unembed
659
425
  */
660
- async listChats(embedUuid) {
661
- return this.client.request("GET", `/v1/embed/${embedUuid}/chats`);
426
+ async removeAndUnembedWorkspaceDocument(slug, body) {
427
+ return this.client.request("DELETE", `/v1/workspace/${slug}/remove-and-unembed`, body);
662
428
  }
663
429
  /**
664
- * Get chats for a specific embed and session
665
- * @see GET /v1/embed/{embedUuid}/chats/{sessionUuid}
430
+ * Get workspace prompt history.
431
+ * @see GET /v1/workspace/{slug}/prompt-history
666
432
  */
667
- async getChat(embedUuid, sessionUuid) {
668
- return this.client.request("GET", `/v1/embed/${embedUuid}/chats/${sessionUuid}`);
433
+ async getWorkspacePromptHistory(slug) {
434
+ return this.client.request("GET", `/v1/workspace/${slug}/prompt-history`);
669
435
  }
670
436
  /**
671
- * Create a new embed configuration
672
- * @see POST /v1/embed/new
437
+ * Clear workspace prompt history.
438
+ * @see DELETE /v1/workspace/{slug}/prompt-history
673
439
  */
674
- async createEmbed(body) {
675
- return this.client.request("POST", `/v1/embed/new`, body);
440
+ async deleteWorkspacePromptHistory(slug) {
441
+ return this.client.request("DELETE", `/v1/workspace/${slug}/prompt-history`);
676
442
  }
677
443
  /**
678
- * Update an existing embed configuration
679
- * @see POST /v1/embed/{embedUuid}
444
+ * Delete a workspace prompt history entry.
445
+ * @see DELETE /v1/workspace/{slug}/prompt-history/{id}
680
446
  */
681
- async updateEmbed(embedUuid, body) {
682
- return this.client.request("POST", `/v1/embed/${embedUuid}`, body);
447
+ async deleteWorkspacePromptHistoryEntry(slug, id) {
448
+ return this.client.request("DELETE", `/v1/workspace/${slug}/prompt-history/${id}`);
683
449
  }
684
450
  /**
685
- * Delete an existing embed configuration
686
- * @see DELETE /v1/embed/{embedUuid}
451
+ * Validate search provider configuration.
452
+ * @see POST /v1/workspace/{slug}/search/validate
687
453
  */
688
- async deleteEmbed(embedUuid) {
689
- return this.client.request("DELETE", `/v1/embed/${embedUuid}`);
454
+ async validateWorkspaceSearchProvider(slug, body) {
455
+ return this.client.request("POST", `/v1/workspace/${slug}/search/validate`, body);
690
456
  }
691
457
  };
692
458
 
693
- // src/v1/modules/v1Channels.ts
694
- var V1ChannelsModule = class {
459
+ // src/v1/modules/v1Thread.ts
460
+ var V1ThreadModule = class {
695
461
  constructor(client) {
696
462
  this.client = client;
697
463
  }
698
464
  /**
699
- * List configured channel plugins without exposing encrypted plugin configuration.
700
- * @see GET /v1/channels/plugins
701
- */
702
- async listPlugins() {
703
- return this.client.request("GET", `/v1/channels/plugins`);
704
- }
705
- /**
706
- * Create a channel plugin. The request may include provider credentials in config, but credentials are never returned.
707
- * @see POST /v1/channels/plugins
708
- */
709
- async createPlugin(body) {
710
- return this.client.request("POST", `/v1/channels/plugins`, body);
711
- }
712
- /**
713
- * Get editable non-secret channel plugin configuration.
714
- * @see GET /v1/channels/plugins/{id}/config
715
- */
716
- async getConfig(id) {
717
- return this.client.request("GET", `/v1/channels/plugins/${id}/config`);
718
- }
719
- /**
720
- * Update a channel plugin. Config values are encrypted before storage.
721
- * @see POST /v1/channels/plugins/{id}/update
722
- */
723
- async updatePlugin(id, body) {
724
- return this.client.request("POST", `/v1/channels/plugins/${id}/update`, body);
725
- }
726
- /**
727
- * Delete a channel plugin and stop any running plugin instance.
728
- * @see DELETE /v1/channels/plugins/{id}
729
- */
730
- async deletePlugin(id) {
731
- return this.client.request("DELETE", `/v1/channels/plugins/${id}`);
732
- }
733
- /**
734
- * Enable and start a channel plugin.
735
- * @see POST /v1/channels/plugins/{id}/start
736
- */
737
- async pluginsStart(id) {
738
- return this.client.request("POST", `/v1/channels/plugins/${id}/start`);
739
- }
740
- /**
741
- * Disable and stop a channel plugin.
742
- * @see POST /v1/channels/plugins/{id}/stop
743
- */
744
- async pluginsStop(id) {
745
- return this.client.request("POST", `/v1/channels/plugins/${id}/stop`);
746
- }
747
- /**
748
- * Test channel provider credentials without saving a plugin.
749
- * @see POST /v1/channels/plugins/test
750
- */
751
- async pluginsTest(body) {
752
- return this.client.request("POST", `/v1/channels/plugins/test`, body);
753
- }
754
- /**
755
- * Get runtime status for all running channel plugins.
756
- * @see GET /v1/channels/status
757
- */
758
- async getStatus() {
759
- return this.client.request("GET", `/v1/channels/status`);
760
- }
761
- /**
762
- * Start a QR login flow for Zalo personal or WhatsApp plugins.
763
- * @see POST /v1/channels/plugins/{id}/qr-login/start
764
- */
765
- async pluginsQrLoginStart(id, body) {
766
- return this.client.request("POST", `/v1/channels/plugins/${id}/qr-login/start`, body);
767
- }
768
- /**
769
- * Poll QR login status for Zalo personal or WhatsApp plugins.
770
- * @see GET /v1/channels/plugins/{id}/qr-login/state
771
- */
772
- async getState(id) {
773
- return this.client.request("GET", `/v1/channels/plugins/${id}/qr-login/state`);
774
- }
775
- /**
776
- * Cancel a QR login flow for Zalo personal or WhatsApp plugins.
777
- * @see POST /v1/channels/plugins/{id}/qr-login/cancel
778
- */
779
- async pluginsQrLoginCancel(id) {
780
- return this.client.request("POST", `/v1/channels/plugins/${id}/qr-login/cancel`);
781
- }
782
- /**
783
- * Log out a QR-authenticated Zalo personal or WhatsApp plugin and clear stored credentials.
784
- * @see POST /v1/channels/plugins/{id}/logout
785
- */
786
- async pluginsLogout(id) {
787
- return this.client.request("POST", `/v1/channels/plugins/${id}/logout`);
788
- }
789
- /**
790
- * Update safe channel policies for Zalo personal or WhatsApp plugins without overwriting credentials.
791
- * @see POST /v1/channels/plugins/{id}/policies
792
- */
793
- async pluginsPolicies(id, body) {
794
- return this.client.request("POST", `/v1/channels/plugins/${id}/policies`, body);
795
- }
796
- /**
797
- * Search a Zalo personal friends directory.
798
- * @see GET /v1/channels/plugins/{id}/directory/friends
799
- */
800
- async listDirectoryFriends(id) {
801
- return this.client.request("GET", `/v1/channels/plugins/${id}/directory/friends`);
802
- }
803
- /**
804
- * Search a Zalo personal groups directory.
805
- * @see GET /v1/channels/plugins/{id}/directory/groups
806
- */
807
- async listDirectoryGroups(id) {
808
- return this.client.request("GET", `/v1/channels/plugins/${id}/directory/groups`);
809
- }
810
- /**
811
- * List pending pairing codes for a channel plugin.
812
- * @see GET /v1/channels/plugins/{id}/pairing-codes
813
- */
814
- async listPluginPairingCodes(id) {
815
- return this.client.request("GET", `/v1/channels/plugins/${id}/pairing-codes`);
816
- }
817
- /**
818
- * Generate a pairing code for a channel plugin.
819
- * @see POST /v1/channels/plugins/{id}/pairing-codes
820
- */
821
- async pluginsPairingCodes(id, body) {
822
- return this.client.request("POST", `/v1/channels/plugins/${id}/pairing-codes`, body);
823
- }
824
- /**
825
- * Approve a channel pairing code.
826
- * @see POST /v1/channels/pairing-codes/{id}/approve
465
+ * Create a workspace thread.
466
+ * @see POST /v1/workspace/{slug}/thread/new
827
467
  */
828
- async pairingCodesApprove(id) {
829
- return this.client.request("POST", `/v1/channels/pairing-codes/${id}/approve`);
468
+ async createThread(slug) {
469
+ return this.client.request("POST", `/v1/workspace/${slug}/thread/new`);
830
470
  }
831
471
  /**
832
- * Reject a channel pairing code.
833
- * @see POST /v1/channels/pairing-codes/{id}/reject
472
+ * List workspace threads.
473
+ * @see GET /v1/workspace/{slug}/threads
834
474
  */
835
- async pairingCodesReject(id) {
836
- return this.client.request("POST", `/v1/channels/pairing-codes/${id}/reject`);
475
+ async listThreads(slug) {
476
+ return this.client.request("GET", `/v1/workspace/${slug}/threads`);
837
477
  }
838
478
  /**
839
- * List channel users for a plugin.
840
- * @see GET /v1/channels/plugins/{id}/users
479
+ * Open an SSE stream for workspace thread events.
480
+ * @see GET /v1/workspace/{slug}/thread-events
841
481
  */
842
- async listPluginUsers(id) {
843
- return this.client.request("GET", `/v1/channels/plugins/${id}/users`);
482
+ async openThreadEventsStream(slug) {
483
+ return this.client.request("GET", `/v1/workspace/${slug}/thread-events`);
844
484
  }
845
485
  /**
846
- * Set authorization for a channel user.
847
- * @see POST /v1/channels/plugins/{id}/users/{userId}/authorization
486
+ * Get a workspace thread.
487
+ * @see GET /v1/workspace/{slug}/thread/{threadSlug}
848
488
  */
849
- async pluginsUsersAuthorization(id, userId, body) {
850
- return this.client.request("POST", `/v1/channels/plugins/${id}/users/${userId}/authorization`, body);
489
+ async getThread(slug, threadSlug) {
490
+ return this.client.request("GET", `/v1/workspace/${slug}/thread/${threadSlug}`);
851
491
  }
852
492
  /**
853
- * Remove a channel user from a plugin.
854
- * @see DELETE /v1/channels/plugins/{id}/users/{userId}
493
+ * Delete a workspace thread.
494
+ * @see DELETE /v1/workspace/{slug}/thread/{threadSlug}
855
495
  */
856
- async deleteUser(id, userId) {
857
- return this.client.request("DELETE", `/v1/channels/plugins/${id}/users/${userId}`);
858
- }
859
- };
860
-
861
- // src/v1/modules/v1DesktopRuntimeSessions.ts
862
- var V1DesktopRuntimeSessionsModule = class {
863
- constructor(client) {
864
- this.client = client;
496
+ async deleteThread(slug, threadSlug) {
497
+ return this.client.request("DELETE", `/v1/workspace/${slug}/thread/${threadSlug}`);
865
498
  }
866
499
  /**
867
- * Open the shared terminal launcher in the Electron desktop app.
868
- * @see POST /sdk/desktop/runtime-sessions/open-launcher
500
+ * Get thread vision availability.
501
+ * @see GET /v1/workspace/{slug}/thread/{threadSlug}/vision-availability
869
502
  */
870
- async openLauncher(body) {
871
- return this.client.request("POST", `/sdk/desktop/runtime-sessions/open-launcher`, body);
503
+ async getThreadVisionAvailability(slug, threadSlug) {
504
+ return this.client.request("GET", `/v1/workspace/${slug}/thread/${threadSlug}/vision-availability`);
872
505
  }
873
506
  /**
874
- * Launch a local PTY-backed shell terminal in the Electron desktop app.
875
- * @see POST /sdk/desktop/runtime-sessions/launch-terminal-shell
507
+ * Promote a thread into a tracked goal.
508
+ * @see POST /v1/workspace/{slug}/thread/{threadSlug}/goal
876
509
  */
877
- async launchTerminalShell(body) {
878
- return this.client.request("POST", `/sdk/desktop/runtime-sessions/launch-terminal-shell`, body);
510
+ async createThreadGoal(slug, threadSlug, body) {
511
+ return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/goal`, body);
879
512
  }
880
513
  /**
881
- * Launch a local PTY-backed CLI agent terminal in the Electron desktop app.
882
- * @see POST /sdk/desktop/runtime-sessions/launch-terminal-cli-agent
514
+ * Draft a terminal goal for a workspace.
515
+ * @see POST /v1/workspace/{slug}/terminal-goal-draft
883
516
  */
884
- async launchTerminalCliAgent(body) {
885
- return this.client.request("POST", `/sdk/desktop/runtime-sessions/launch-terminal-cli-agent`, body);
517
+ async draftWorkspaceTerminalGoal(slug, body) {
518
+ return this.client.request("POST", `/v1/workspace/${slug}/terminal-goal-draft`, body);
886
519
  }
887
520
  /**
888
- * List desktop PTY-backed runtime sessions currently known to the Electron app.
889
- * @see GET /sdk/desktop/runtime-sessions
521
+ * Create a terminal goal for a workspace.
522
+ * @see POST /v1/workspace/{slug}/terminal-goal
890
523
  */
891
- async listRuntimeSessions() {
892
- return this.client.request("GET", `/sdk/desktop/runtime-sessions`);
524
+ async createWorkspaceTerminalGoal(slug, body) {
525
+ return this.client.request("POST", `/v1/workspace/${slug}/terminal-goal`, body);
893
526
  }
894
527
  /**
895
- * Fetch one desktop PTY-backed runtime session by runtime session ID or PTY session ID.
896
- * @see GET /sdk/desktop/runtime-sessions/{sessionId}
528
+ * Draft a terminal goal for a workspace thread.
529
+ * @see POST /v1/workspace/{slug}/thread/{threadSlug}/terminal-goal-draft
897
530
  */
898
- async getRuntimeSession(sessionId) {
899
- return this.client.request("GET", `/sdk/desktop/runtime-sessions/${sessionId}`);
531
+ async draftThreadTerminalGoal(slug, threadSlug, body) {
532
+ return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/terminal-goal-draft`, body);
900
533
  }
901
534
  /**
902
- * Close an existing desktop runtime session.
903
- * @see DELETE /sdk/desktop/runtime-sessions/{sessionId}
535
+ * Create a terminal goal for a workspace thread.
536
+ * @see POST /v1/workspace/{slug}/thread/{threadSlug}/terminal-goal
904
537
  */
905
- async deleteRuntimeSession(sessionId) {
906
- return this.client.request("DELETE", `/sdk/desktop/runtime-sessions/${sessionId}`);
538
+ async createThreadTerminalGoal(slug, threadSlug, body) {
539
+ return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/terminal-goal`, body);
907
540
  }
908
541
  /**
909
- * Write input to an existing desktop runtime session. Use `message` to submit a CLI turn or `input` for raw PTY data.
910
- * @see POST /sdk/desktop/runtime-sessions/{sessionId}/write
542
+ * Bulk delete workspace threads.
543
+ * @see DELETE /v1/workspace/{slug}/thread-bulk-delete
911
544
  */
912
- async write(sessionId, body) {
913
- return this.client.request("POST", `/sdk/desktop/runtime-sessions/${sessionId}/write`, body);
545
+ async bulkDeleteThreads(slug, body) {
546
+ return this.client.request("DELETE", `/v1/workspace/${slug}/thread-bulk-delete`, body);
914
547
  }
915
548
  /**
916
- * Approve or deny a pending desktop runtime session action.
917
- * @see POST /sdk/desktop/runtime-sessions/{sessionId}/permission
918
- */
919
- async permission(sessionId, body) {
920
- return this.client.request("POST", `/sdk/desktop/runtime-sessions/${sessionId}/permission`, body);
921
- }
922
- };
923
-
924
- // src/v1/modules/v1DesktopBrowser.ts
925
- var V1DesktopBrowserModule = class {
926
- constructor(client) {
927
- this.client = client;
928
- }
929
- /**
930
- * List RealTimeX Browser sessions available in the Electron desktop app.
931
- * @see GET /sdk/desktop/browser/sessions
932
- */
933
- async listSessions() {
934
- return this.client.request("GET", `/sdk/desktop/browser/sessions`);
935
- }
936
- /**
937
- * Create a named RealTimeX Browser session in the Electron desktop app.
938
- * @see POST /sdk/desktop/browser/sessions
549
+ * Get workspace thread chats.
550
+ * @see GET /v1/workspace/{slug}/thread/{threadSlug}/chats
939
551
  */
940
- async createSession(body) {
941
- return this.client.request("POST", `/sdk/desktop/browser/sessions`, body);
552
+ async getThreadChats(slug, threadSlug) {
553
+ return this.client.request("GET", `/v1/workspace/${slug}/thread/${threadSlug}/chats`);
942
554
  }
943
555
  /**
944
- * Get a specific RealTimeX Browser session by session name.
945
- * @see GET /sdk/desktop/browser/sessions/{sessionName}
556
+ * Get thread terminal session details.
557
+ * @see GET /v1/workspace/{slug}/thread/{threadSlug}/terminal-session-details
946
558
  */
947
- async getSession(sessionName) {
948
- return this.client.request("GET", `/sdk/desktop/browser/sessions/${sessionName}`);
559
+ async getThreadTerminalSessionDetails(slug, threadSlug) {
560
+ return this.client.request("GET", `/v1/workspace/${slug}/thread/${threadSlug}/terminal-session-details`);
949
561
  }
950
562
  /**
951
- * Delete a named RealTimeX Browser session from the Electron desktop app.
952
- * @see DELETE /sdk/desktop/browser/sessions/{sessionName}
563
+ * Update a workspace thread.
564
+ * @see POST /v1/workspace/{slug}/thread/{threadSlug}/update
953
565
  */
954
- async deleteSession(sessionName) {
955
- return this.client.request("DELETE", `/sdk/desktop/browser/sessions/${sessionName}`);
566
+ async updateThread(slug, threadSlug, body) {
567
+ return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/update`, body);
956
568
  }
957
569
  /**
958
- * Create a RealTimeX Browser tab, optionally launching the browser session if needed.
959
- * @see POST /sdk/desktop/browser/tabs
570
+ * Delete edited chats from a thread.
571
+ * @see DELETE /v1/workspace/{slug}/thread/{threadSlug}/delete-edited-chats
960
572
  */
961
- async createTab(body) {
962
- return this.client.request("POST", `/sdk/desktop/browser/tabs`, body);
573
+ async deleteEditedThreadChats(slug, threadSlug, body) {
574
+ return this.client.request("DELETE", `/v1/workspace/${slug}/thread/${threadSlug}/delete-edited-chats`, body);
963
575
  }
964
576
  /**
965
- * Get a RealTimeX Browser tab snapshot by tab reference.
966
- * @see GET /sdk/desktop/browser/tabs/{tabRef}
577
+ * Update a thread chat response.
578
+ * @see POST /v1/workspace/{slug}/thread/{threadSlug}/update-chat
967
579
  */
968
- async getTab(tabRef) {
969
- return this.client.request("GET", `/sdk/desktop/browser/tabs/${tabRef}`);
580
+ async updateThreadChat(slug, threadSlug, body) {
581
+ return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/update-chat`, body);
970
582
  }
971
583
  /**
972
- * Close an existing RealTimeX Browser tab.
973
- * @see DELETE /sdk/desktop/browser/tabs/{tabRef}
584
+ * Persist terminal UI events for a workspace thread.
585
+ * @see POST /v1/workspace/{slug}/thread/{threadSlug}/terminal-ui-events
974
586
  */
975
- async deleteTab(tabRef) {
976
- return this.client.request("DELETE", `/sdk/desktop/browser/tabs/${tabRef}`);
587
+ async persistThreadTerminalUiEvents(slug, threadSlug, body) {
588
+ return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/terminal-ui-events`, body);
977
589
  }
978
590
  /**
979
- * Evaluate JavaScript in a specific RealTimeX Browser tab.
980
- * @see POST /sdk/desktop/browser/tabs/{tabRef}/evaluate
591
+ * Persist a linked terminal message for a workspace thread.
592
+ * @see POST /v1/workspace/{slug}/thread/{threadSlug}/linked-terminal-message
981
593
  */
982
- async evaluateTab(tabRef, body) {
983
- return this.client.request("POST", `/sdk/desktop/browser/tabs/${tabRef}/evaluate`, body);
594
+ async createThreadLinkedTerminalMessage(slug, threadSlug, body) {
595
+ return this.client.request("POST", `/v1/workspace/${slug}/thread/${threadSlug}/linked-terminal-message`, body);
984
596
  }
985
597
  /**
986
- * Focus an existing RealTimeX Browser tab.
987
- * @see POST /sdk/desktop/browser/tabs/{tabRef}/focus
598
+ * Coordinate a task into a workspace thread.
599
+ * @see POST /v1/workspace/{slug}/thread/coordinate-task
988
600
  */
989
- async focusTab(tabRef, body) {
990
- return this.client.request("POST", `/sdk/desktop/browser/tabs/${tabRef}/focus`, body);
601
+ async coordinateThreadTask(slug, body) {
602
+ return this.client.request("POST", `/v1/workspace/${slug}/thread/coordinate-task`, body);
991
603
  }
992
604
  /**
993
- * Navigate an existing RealTimeX Browser tab to a new URL.
994
- * @see POST /sdk/desktop/browser/tabs/{tabRef}/navigate
605
+ * Open an SSE stream for external workspace thread chat events.
606
+ * @see GET /v1/workspace/{slug}/thread/{threadSlug}/chat-stream
995
607
  */
996
- async navigateTab(tabRef, body) {
997
- return this.client.request("POST", `/sdk/desktop/browser/tabs/${tabRef}/navigate`, body);
608
+ async openThreadChatStream(slug, threadSlug) {
609
+ return this.client.request("GET", `/v1/workspace/${slug}/thread/${threadSlug}/chat-stream`);
998
610
  }
999
611
  };
1000
612
 
@@ -1003,18 +615,9 @@ var V1ApiNamespace = class {
1003
615
  // [GENERATED-PROPS-END]
1004
616
  constructor(baseUrl, apiKey, appId) {
1005
617
  this._client = new DeveloperApiClient(baseUrl, apiKey, appId);
1006
- this.auth = new V1AuthModule(this._client);
1007
- this.admin = new V1AdminModule(this._client);
1008
- this.document = new V1DocumentModule(this._client);
618
+ this.chat = new V1ChatModule(this._client);
1009
619
  this.workspace = new V1WorkspaceModule(this._client);
1010
- this.system = new V1SystemModule(this._client);
1011
620
  this.thread = new V1ThreadModule(this._client);
1012
- this.users = new V1UsersModule(this._client);
1013
- this.openai = new V1OpenAIModule(this._client);
1014
- this.embed = new V1EmbedModule(this._client);
1015
- this.channels = new V1ChannelsModule(this._client);
1016
- this.desktopRuntimeSessions = new V1DesktopRuntimeSessionsModule(this._client);
1017
- this.desktopBrowser = new V1DesktopBrowserModule(this._client);
1018
621
  }
1019
622
  };
1020
623
 
@@ -1113,24 +716,6 @@ async function* streamThreadChat(client, slug, threadSlug, body) {
1113
716
  reader.releaseLock();
1114
717
  }
1115
718
  }
1116
-
1117
- // src/v1/overrides/v1DocumentUpload.ts
1118
- async function uploadFile(client, file, options = {}) {
1119
- const form = new FormData();
1120
- const filename = options.filename ?? (file instanceof File ? file.name : "upload");
1121
- form.append("file", file, filename);
1122
- return client.requestMultipart("POST", `/v1/document/upload`, form);
1123
- }
1124
- async function uploadFileToFolder(client, file, folderName, options = {}) {
1125
- const form = new FormData();
1126
- const filename = options.filename ?? (file instanceof File ? file.name : "upload");
1127
- form.append("file", file, filename);
1128
- return client.requestMultipart(
1129
- "POST",
1130
- `/v1/document/upload/${encodeURIComponent(folderName)}`,
1131
- form
1132
- );
1133
- }
1134
719
  // Annotate the CommonJS export names for ESM import in node:
1135
720
  0 && (module.exports = {
1136
721
  AuthenticationError,
@@ -1138,22 +723,11 @@ async function uploadFileToFolder(client, file, folderName, options = {}) {
1138
723
  DeveloperApiError,
1139
724
  NotFoundError,
1140
725
  ServerError,
1141
- V1AdminModule,
1142
726
  V1ApiNamespace,
1143
- V1AuthModule,
1144
- V1ChannelsModule,
1145
- V1DesktopBrowserModule,
1146
- V1DesktopRuntimeSessionsModule,
1147
- V1DocumentModule,
1148
- V1EmbedModule,
1149
- V1OpenAIModule,
1150
- V1SystemModule,
727
+ V1ChatModule,
1151
728
  V1ThreadModule,
1152
- V1UsersModule,
1153
729
  V1WorkspaceModule,
1154
730
  ValidationError,
1155
731
  streamThreadChat,
1156
- streamWorkspaceChat,
1157
- uploadFile,
1158
- uploadFileToFolder
732
+ streamWorkspaceChat
1159
733
  });