lemma-sdk 0.2.36 → 0.2.37

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 (161) hide show
  1. package/README.md +28 -22
  2. package/dist/browser/lemma-client.js +290 -165
  3. package/dist/client.d.ts +1 -2
  4. package/dist/client.js +1 -3
  5. package/dist/index.d.ts +1 -1
  6. package/dist/namespaces/agents.js +1 -1
  7. package/dist/namespaces/conversations.d.ts +73 -0
  8. package/dist/namespaces/conversations.js +174 -0
  9. package/dist/namespaces/files.d.ts +24 -6
  10. package/dist/namespaces/files.js +25 -12
  11. package/dist/namespaces/integrations.js +1 -1
  12. package/dist/namespaces/pod-surfaces.d.ts +1 -1
  13. package/dist/namespaces/pod-surfaces.js +6 -6
  14. package/dist/namespaces/tasks.d.ts +1 -5
  15. package/dist/namespaces/tasks.js +54 -12
  16. package/dist/openapi_client/index.d.ts +17 -32
  17. package/dist/openapi_client/index.js +8 -12
  18. package/dist/openapi_client/models/AdminConsentInfoResponse.d.ts +2 -2
  19. package/dist/openapi_client/models/AgentListResponse.d.ts +2 -4
  20. package/dist/openapi_client/models/AgentMessageResponse.d.ts +0 -3
  21. package/dist/openapi_client/models/{AvailableModels.d.ts → AgentModelName.d.ts} +4 -1
  22. package/dist/openapi_client/models/AgentModelName.js +18 -0
  23. package/dist/openapi_client/models/AgentResponse.d.ts +18 -13
  24. package/dist/openapi_client/models/AgentSurfaceListResponse.d.ts +6 -0
  25. package/dist/openapi_client/models/{AssistantSurfaceResponse.d.ts → AgentSurfaceResponse.d.ts} +6 -5
  26. package/dist/openapi_client/models/{AssistantSurfaceStatus.d.ts → AgentSurfaceStatus.d.ts} +1 -1
  27. package/dist/openapi_client/models/AgentSurfaceStatus.js +10 -0
  28. package/dist/openapi_client/models/{ToolSet.d.ts → AgentToolset.d.ts} +3 -5
  29. package/dist/openapi_client/models/AgentToolset.js +17 -0
  30. package/dist/openapi_client/models/ApplicationAccessConfig.d.ts +3 -5
  31. package/dist/openapi_client/models/ApplicationMode.d.ts +3 -3
  32. package/dist/openapi_client/models/ApplicationMode.js +3 -3
  33. package/dist/openapi_client/models/ConversationResponse.d.ts +9 -20
  34. package/dist/openapi_client/models/CreateAgentRequest.d.ts +11 -7
  35. package/dist/openapi_client/models/CreateConversationRequest.d.ts +4 -8
  36. package/dist/openapi_client/models/CreateFolderRequest.d.ts +2 -5
  37. package/dist/openapi_client/models/CreateFunctionRequest.d.ts +2 -2
  38. package/dist/openapi_client/models/CreateSurfaceRequest.d.ts +1 -1
  39. package/dist/openapi_client/models/DatastoreFileUploadRequest.d.ts +2 -2
  40. package/dist/openapi_client/models/FileNamespace.d.ts +4 -0
  41. package/dist/openapi_client/models/FileNamespace.js +9 -0
  42. package/dist/openapi_client/models/FileResponse.d.ts +2 -2
  43. package/dist/openapi_client/models/FlowRunEntity.d.ts +10 -1
  44. package/dist/openapi_client/models/FunctionResponse.d.ts +2 -2
  45. package/dist/openapi_client/models/HarnessKind.d.ts +7 -0
  46. package/dist/openapi_client/models/HarnessKind.js +12 -0
  47. package/dist/openapi_client/models/MessageListResponse.d.ts +6 -0
  48. package/dist/openapi_client/models/MessageResponse.d.ts +17 -0
  49. package/dist/openapi_client/models/OrganizationInvitationResponse.d.ts +1 -0
  50. package/dist/openapi_client/models/ReportFeedbackResponse.d.ts +0 -4
  51. package/dist/openapi_client/models/ResourceType.d.ts +0 -1
  52. package/dist/openapi_client/models/ResourceType.js +0 -1
  53. package/dist/openapi_client/models/SendMessageRequest.d.ts +5 -0
  54. package/dist/openapi_client/models/{ToolCallRequest.d.ts → ToolCallContent.d.ts} +1 -1
  55. package/dist/openapi_client/models/{ToolCallResponse.d.ts → ToolReturnContent.d.ts} +2 -1
  56. package/dist/openapi_client/models/UpdateAgentRequest.d.ts +11 -7
  57. package/dist/openapi_client/models/UpdateConversationRequest.d.ts +2 -5
  58. package/dist/openapi_client/models/UpdateFunctionRequest.d.ts +2 -2
  59. package/dist/openapi_client/models/app__modules__agent__domain__value_objects__TableAccessEntry.d.ts +8 -0
  60. package/dist/openapi_client/models/{TableAccessEntry.d.ts → app__modules__function__api__schemas__function_schemas__TableAccessEntry.d.ts} +1 -1
  61. package/dist/openapi_client/models/update.d.ts +2 -2
  62. package/dist/openapi_client/services/AgentConversationsService.d.ts +97 -0
  63. package/dist/openapi_client/services/AgentConversationsService.js +217 -0
  64. package/dist/openapi_client/services/{AssistantSurfacesIngressService.d.ts → AgentSurfacesIngressService.d.ts} +2 -2
  65. package/dist/openapi_client/services/{AssistantSurfacesIngressService.js → AgentSurfacesIngressService.js} +2 -2
  66. package/dist/openapi_client/services/{AssistantSurfacesService.d.ts → AgentSurfacesService.d.ts} +11 -11
  67. package/dist/openapi_client/services/{AssistantSurfacesService.js → AgentSurfacesService.js} +10 -10
  68. package/dist/openapi_client/services/AgentToolsService.d.ts +8 -8
  69. package/dist/openapi_client/services/AgentToolsService.js +8 -8
  70. package/dist/openapi_client/services/AgentsService.d.ts +7 -7
  71. package/dist/openapi_client/services/AgentsService.js +8 -8
  72. package/dist/openapi_client/services/FilesService.d.ts +17 -8
  73. package/dist/openapi_client/services/FilesService.js +25 -8
  74. package/dist/openapi_client/services/WorkflowsService.d.ts +1 -1
  75. package/dist/openapi_client/services/WorkflowsService.js +1 -1
  76. package/dist/react/useAgentRun.d.ts +28 -7
  77. package/dist/react/useAgentRun.js +120 -27
  78. package/dist/react/useAssistantController.d.ts +6 -2
  79. package/dist/react/useAssistantController.js +57 -14
  80. package/dist/react/useAssistantSession.d.ts +15 -3
  81. package/dist/react/useAssistantSession.js +19 -15
  82. package/dist/react/useConversationMessages.d.ts +6 -2
  83. package/dist/react/useConversationMessages.js +2 -1
  84. package/dist/react/useConversations.d.ts +6 -2
  85. package/dist/react/useConversations.js +7 -5
  86. package/dist/react/useCreateFolder.d.ts +4 -2
  87. package/dist/react/useCreateFolder.js +6 -3
  88. package/dist/react/useDeleteFile.d.ts +4 -1
  89. package/dist/react/useDeleteFile.js +3 -3
  90. package/dist/react/useFile.d.ts +4 -2
  91. package/dist/react/useFile.js +3 -3
  92. package/dist/react/useFilePreview.d.ts +4 -1
  93. package/dist/react/useFilePreview.js +5 -4
  94. package/dist/react/useFileTree.d.ts +4 -2
  95. package/dist/react/useFileTree.js +3 -2
  96. package/dist/react/useFiles.d.ts +4 -2
  97. package/dist/react/useFiles.js +5 -3
  98. package/dist/react/useUpdateFile.d.ts +4 -2
  99. package/dist/react/useUpdateFile.js +6 -3
  100. package/dist/react/useUploadFile.d.ts +4 -2
  101. package/dist/react/useUploadFile.js +6 -3
  102. package/dist/react/useWorkflowRun.js +1 -1
  103. package/dist/react/useWorkflowStart.js +1 -1
  104. package/dist/run-utils.d.ts +2 -1
  105. package/dist/types.d.ts +62 -6
  106. package/package.json +1 -1
  107. package/dist/namespaces/assistants.d.ts +0 -96
  108. package/dist/namespaces/assistants.js +0 -160
  109. package/dist/openapi_client/models/AddMessageRequest.d.ts +0 -6
  110. package/dist/openapi_client/models/AssistantListResponse.d.ts +0 -6
  111. package/dist/openapi_client/models/AssistantResponse.d.ts +0 -23
  112. package/dist/openapi_client/models/AssistantSurfaceListResponse.d.ts +0 -6
  113. package/dist/openapi_client/models/AssistantSurfaceStatus.js +0 -10
  114. package/dist/openapi_client/models/AvailableModelInfo.d.ts +0 -8
  115. package/dist/openapi_client/models/AvailableModels.js +0 -15
  116. package/dist/openapi_client/models/AvailableModelsListResponse.d.ts +0 -7
  117. package/dist/openapi_client/models/ConversationMessageListResponse.d.ts +0 -6
  118. package/dist/openapi_client/models/ConversationMessageResponse.d.ts +0 -19
  119. package/dist/openapi_client/models/ConversationStatus.d.ts +0 -7
  120. package/dist/openapi_client/models/ConversationStatus.js +0 -12
  121. package/dist/openapi_client/models/ConversationType.d.ts +0 -8
  122. package/dist/openapi_client/models/ConversationType.js +0 -13
  123. package/dist/openapi_client/models/CreateAssistantRequest.d.ts +0 -18
  124. package/dist/openapi_client/models/CreateAssistantRequest.js +0 -1
  125. package/dist/openapi_client/models/CreateMessageRequest.d.ts +0 -6
  126. package/dist/openapi_client/models/CreateMessageRequest.js +0 -1
  127. package/dist/openapi_client/models/CreateTaskRequest.d.ts +0 -10
  128. package/dist/openapi_client/models/CreateTaskRequest.js +0 -1
  129. package/dist/openapi_client/models/FileVisibility.d.ts +0 -4
  130. package/dist/openapi_client/models/FileVisibility.js +0 -9
  131. package/dist/openapi_client/models/TableAccessEntry.js +0 -1
  132. package/dist/openapi_client/models/TaskListResponse.d.ts +0 -9
  133. package/dist/openapi_client/models/TaskListResponse.js +0 -1
  134. package/dist/openapi_client/models/TaskMessageListResponse.d.ts +0 -9
  135. package/dist/openapi_client/models/TaskMessageListResponse.js +0 -1
  136. package/dist/openapi_client/models/TaskMessageResponse.d.ts +0 -15
  137. package/dist/openapi_client/models/TaskMessageResponse.js +0 -1
  138. package/dist/openapi_client/models/TaskResponse.d.ts +0 -16
  139. package/dist/openapi_client/models/TaskResponse.js +0 -1
  140. package/dist/openapi_client/models/TaskStatus.d.ts +0 -12
  141. package/dist/openapi_client/models/TaskStatus.js +0 -17
  142. package/dist/openapi_client/models/ToolCallRequest.js +0 -1
  143. package/dist/openapi_client/models/ToolCallResponse.js +0 -1
  144. package/dist/openapi_client/models/ToolSet.js +0 -19
  145. package/dist/openapi_client/models/UpdateAssistantRequest.d.ts +0 -17
  146. package/dist/openapi_client/models/UpdateAssistantRequest.js +0 -1
  147. package/dist/openapi_client/services/AssistantsService.d.ts +0 -49
  148. package/dist/openapi_client/services/AssistantsService.js +0 -112
  149. package/dist/openapi_client/services/ConversationsService.d.ts +0 -88
  150. package/dist/openapi_client/services/ConversationsService.js +0 -202
  151. package/dist/openapi_client/services/TasksService.d.ts +0 -76
  152. package/dist/openapi_client/services/TasksService.js +0 -167
  153. /package/dist/openapi_client/models/{AddMessageRequest.js → AgentSurfaceListResponse.js} +0 -0
  154. /package/dist/openapi_client/models/{AssistantListResponse.js → AgentSurfaceResponse.js} +0 -0
  155. /package/dist/openapi_client/models/{AssistantResponse.js → MessageListResponse.js} +0 -0
  156. /package/dist/openapi_client/models/{AssistantSurfaceListResponse.js → MessageResponse.js} +0 -0
  157. /package/dist/openapi_client/models/{AssistantSurfaceResponse.js → SendMessageRequest.js} +0 -0
  158. /package/dist/openapi_client/models/{AvailableModelInfo.js → ToolCallContent.js} +0 -0
  159. /package/dist/openapi_client/models/{AvailableModelsListResponse.js → ToolReturnContent.js} +0 -0
  160. /package/dist/openapi_client/models/{ConversationMessageListResponse.js → app__modules__agent__domain__value_objects__TableAccessEntry.js} +0 -0
  161. /package/dist/openapi_client/models/{ConversationMessageResponse.js → app__modules__function__api__schemas__function_schemas__TableAccessEntry.js} +0 -0
@@ -38,7 +38,7 @@ Object.defineProperty(exports, "AuthManager", { enumerable: true, get: function
38
38
  const generated_js_1 = require("./generated.js");
39
39
  const http_js_1 = require("./http.js");
40
40
  const agents_js_1 = require("./namespaces/agents.js");
41
- const assistants_js_1 = require("./namespaces/assistants.js");
41
+ const conversations_js_1 = require("./namespaces/conversations.js");
42
42
  const desks_js_1 = require("./namespaces/desks.js");
43
43
  const files_js_1 = require("./namespaces/files.js");
44
44
  const functions_js_1 = require("./namespaces/functions.js");
@@ -76,8 +76,7 @@ class LemmaClient {
76
76
  this.functions = new functions_js_1.FunctionsNamespace(this._generated, podIdFn);
77
77
  this.agents = new agents_js_1.AgentsNamespace(this._generated, podIdFn);
78
78
  this.tasks = new tasks_js_1.TasksNamespace(this._http, podIdFn);
79
- this.assistants = new assistants_js_1.AssistantsNamespace(this._http, podIdFn);
80
- this.conversations = new assistants_js_1.ConversationsNamespace(this._http, podIdFn);
79
+ this.conversations = new conversations_js_1.ConversationsNamespace(this._http, podIdFn);
81
80
  this.workflows = new workflows_js_1.WorkflowsNamespace(this._generated, this._http, podIdFn);
82
81
  this.desks = new desks_js_1.DesksNamespace(this._generated, this._http, podIdFn);
83
82
  this.integrations = new integrations_js_1.IntegrationsNamespace(this._generated);
@@ -1010,7 +1009,7 @@ class AgentsNamespace {
1010
1009
  this.podId = podId;
1011
1010
  }
1012
1011
  list(options = {}) {
1013
- return this.client.request(() => AgentsService_js_1.AgentsService.agentList(this.podId(), options.limit ?? 100, options.pageToken));
1012
+ return this.client.request(() => AgentsService_js_1.AgentsService.agentList(this.podId(), options.pageToken, options.limit ?? 100));
1014
1013
  }
1015
1014
  create(payload) {
1016
1015
  return this.client.request(() => AgentsService_js_1.AgentsService.agentCreate(this.podId(), payload));
@@ -1037,14 +1036,14 @@ const request_js_1 = require("./openapi_client/core/request.js");
1037
1036
  class AgentsService {
1038
1037
  /**
1039
1038
  * List Agents
1040
- * List all agents in a pod
1039
+ * List pod-owned agent definitions visible to the current user.
1041
1040
  * @param podId
1042
- * @param limit
1043
1041
  * @param pageToken
1042
+ * @param limit
1044
1043
  * @returns AgentListResponse Successful Response
1045
1044
  * @throws ApiError
1046
1045
  */
1047
- static agentList(podId, limit = 100, pageToken) {
1046
+ static agentList(podId, pageToken, limit = 100) {
1048
1047
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1049
1048
  method: 'GET',
1050
1049
  url: '/pods/{pod_id}/agents',
@@ -1052,8 +1051,8 @@ class AgentsService {
1052
1051
  'pod_id': podId,
1053
1052
  },
1054
1053
  query: {
1055
- 'limit': limit,
1056
1054
  'page_token': pageToken,
1055
+ 'limit': limit,
1057
1056
  },
1058
1057
  errors: {
1059
1058
  422: `Validation Error`,
@@ -1062,7 +1061,7 @@ class AgentsService {
1062
1061
  }
1063
1062
  /**
1064
1063
  * Create Agent
1065
- * Create a new agent in a pod
1064
+ * Create a pod-owned agent definition with model, harness, toolsets, resource access grants, callable functions, and callable child agents.
1066
1065
  * @param podId
1067
1066
  * @param requestBody
1068
1067
  * @returns AgentResponse Successful Response
@@ -1084,7 +1083,7 @@ class AgentsService {
1084
1083
  }
1085
1084
  /**
1086
1085
  * Delete Agent
1087
- * Delete an agent
1086
+ * Delete a pod-owned agent definition by name.
1088
1087
  * @param podId
1089
1088
  * @param agentName
1090
1089
  * @returns AgentMessageResponse Successful Response
@@ -1105,7 +1104,7 @@ class AgentsService {
1105
1104
  }
1106
1105
  /**
1107
1106
  * Get Agent
1108
- * Get an agent by name
1107
+ * Get one pod-owned agent definition by its stable name.
1109
1108
  * @param podId
1110
1109
  * @param agentName
1111
1110
  * @returns AgentResponse Successful Response
@@ -1126,7 +1125,7 @@ class AgentsService {
1126
1125
  }
1127
1126
  /**
1128
1127
  * Update Agent
1129
- * Update an agent
1128
+ * Update an agent definition, including prompt instruction, model, toolsets, schemas, and resource/tool grants.
1130
1129
  * @param podId
1131
1130
  * @param agentName
1132
1131
  * @param requestBody
@@ -1568,57 +1567,63 @@ class CancelablePromise {
1568
1567
  exports.CancelablePromise = CancelablePromise;
1569
1568
 
1570
1569
  },
1571
- "./namespaces/assistants.js": function (module, exports, require) {
1570
+ "./namespaces/conversations.js": function (module, exports, require) {
1572
1571
  "use strict";
1573
1572
  Object.defineProperty(exports, "__esModule", { value: true });
1574
- exports.ConversationsNamespace = exports.AssistantsNamespace = void 0;
1575
- class AssistantsNamespace {
1576
- constructor(http, podId) {
1577
- this.http = http;
1578
- this.podId = podId;
1579
- }
1580
- list(options = {}) {
1581
- return this.http.request("GET", `/pods/${this.podId()}/assistants`, {
1582
- params: {
1583
- limit: options.limit ?? 100,
1584
- page_token: options.page_token,
1585
- },
1586
- });
1587
- }
1588
- create(payload) {
1589
- return this.http.request("POST", `/pods/${this.podId()}/assistants`, { body: payload });
1590
- }
1591
- get(assistantName) {
1592
- return this.http.request("GET", `/pods/${this.podId()}/assistants/${assistantName}`);
1593
- }
1594
- update(assistantName, payload) {
1595
- return this.http.request("PATCH", `/pods/${this.podId()}/assistants/${assistantName}`, {
1596
- body: payload,
1597
- });
1598
- }
1599
- delete(assistantName) {
1600
- return this.http.request("DELETE", `/pods/${this.podId()}/assistants/${assistantName}`);
1601
- }
1573
+ exports.ConversationsNamespace = void 0;
1574
+ const AgentModelName_js_1 = require("./openapi_client/models/AgentModelName.js");
1575
+ function normalizeConversation(conversation) {
1576
+ if (!conversation)
1577
+ return conversation;
1578
+ const record = conversation;
1579
+ return {
1580
+ ...record,
1581
+ model: record.model ?? record.model_name ?? null,
1582
+ status: record.status ?? "waiting",
1583
+ };
1584
+ }
1585
+ function normalizeConversationList(response) {
1586
+ const items = (response.items ?? []).map((conversation) => normalizeConversation(conversation));
1587
+ return {
1588
+ ...response,
1589
+ items,
1590
+ };
1591
+ }
1592
+ function normalizeMessage(message) {
1593
+ return message;
1594
+ }
1595
+ function buildModelList() {
1596
+ return Object.values(AgentModelName_js_1.AgentModelName).map((model) => ({
1597
+ id: model,
1598
+ name: model,
1599
+ }));
1602
1600
  }
1603
- exports.AssistantsNamespace = AssistantsNamespace;
1604
1601
  class ConversationsNamespace {
1605
1602
  constructor(http, podId) {
1606
1603
  this.http = http;
1607
1604
  this.podId = podId;
1608
1605
  this.messages = {
1609
- list: (conversationId, options = {}) => this.http.request("GET", `/conversations/${conversationId}/messages`, {
1610
- params: {
1611
- pod_id: this.resolvePodId(options.pod_id),
1612
- limit: options.limit ?? 20,
1613
- page_token: options.page_token,
1614
- },
1615
- }),
1616
- send: (conversationId, payload, options = {}) => this.http.request("POST", `/conversations/${conversationId}/messages`, {
1617
- params: {
1618
- pod_id: this.resolvePodId(options.pod_id),
1619
- },
1620
- body: payload,
1621
- }),
1606
+ list: (conversationId, options = {}) => {
1607
+ const podId = this.requirePodId(options.pod_id);
1608
+ const parsedPageToken = typeof options.page_token === "string" && options.page_token.trim().length > 0
1609
+ ? Number(options.page_token)
1610
+ : null;
1611
+ return this.http.request("GET", `/pods/${podId}/conversations/${conversationId}/messages`, {
1612
+ params: {
1613
+ after_sequence: options.after_sequence ?? (Number.isFinite(parsedPageToken) ? parsedPageToken : undefined),
1614
+ limit: options.limit ?? 100,
1615
+ },
1616
+ }).then((response) => ({
1617
+ ...response,
1618
+ items: (response.items ?? []).map(normalizeMessage),
1619
+ }));
1620
+ },
1621
+ send: (conversationId, payload, options = {}) => {
1622
+ const podId = this.requirePodId(options.pod_id);
1623
+ return this.http.request("POST", `/pods/${podId}/conversations/${conversationId}/messages`, {
1624
+ body: payload,
1625
+ });
1626
+ },
1622
1627
  };
1623
1628
  }
1624
1629
  resolvePodId(explicitPodId) {
@@ -1640,67 +1645,77 @@ class ConversationsNamespace {
1640
1645
  return podId;
1641
1646
  }
1642
1647
  list(options = {}) {
1643
- return this.http.request("GET", "/conversations", {
1648
+ const podId = this.requirePodId(options.pod_id);
1649
+ return this.http.request("GET", `/pods/${podId}/conversations`, {
1644
1650
  params: {
1645
- assistant_name: options.assistant_name ?? options.assistant_id,
1646
- pod_id: this.resolvePodId(options.pod_id),
1647
- organization_id: options.organization_id,
1648
- global_only: options.global_only ?? false,
1651
+ agent_name: options.agent_name,
1649
1652
  limit: options.limit ?? 20,
1650
1653
  page_token: options.page_token,
1651
1654
  },
1652
- });
1653
- }
1654
- listByAssistant(assistantName, options = {}) {
1655
- return this.list({ ...options, assistant_name: assistantName });
1655
+ }).then(normalizeConversationList);
1656
1656
  }
1657
- listByAssistantName(assistantName, options = {}) {
1658
- return this.listByAssistant(assistantName, options);
1657
+ listByAgent(agentName, options = {}) {
1658
+ return this.list({ ...options, agent_name: agentName });
1659
1659
  }
1660
- listModels() {
1661
- return this.http.request("GET", "/models");
1660
+ async listModels() {
1661
+ const items = buildModelList();
1662
+ return {
1663
+ items,
1664
+ limit: items.length,
1665
+ next_page_token: null,
1666
+ };
1662
1667
  }
1663
- create(payload) {
1664
- const { assistant_id, ...requestBody } = payload;
1665
- return this.http.request("POST", "/conversations", {
1666
- body: {
1667
- ...requestBody,
1668
- pod_id: this.resolvePodId(requestBody.pod_id),
1669
- assistant_name: requestBody.assistant_name ?? assistant_id,
1670
- },
1671
- });
1668
+ create(payload = {}) {
1669
+ const podId = this.requirePodId(payload.pod_id);
1670
+ const { agent_name, model, model_name, pod_id, ...requestBody } = payload;
1671
+ const body = {
1672
+ ...requestBody,
1673
+ agent_name: agent_name ?? undefined,
1674
+ model_name: model_name ?? model,
1675
+ };
1676
+ void pod_id;
1677
+ return this.http.request("POST", `/pods/${podId}/conversations`, {
1678
+ body,
1679
+ }).then(normalizeConversation);
1672
1680
  }
1673
- createForAssistant(assistantName, payload = {}) {
1681
+ createForAgent(agentName, payload = {}) {
1674
1682
  return this.create({
1675
1683
  ...payload,
1676
- assistant_name: assistantName,
1684
+ agent_name: agentName,
1677
1685
  });
1678
1686
  }
1679
1687
  get(conversationId, options = {}) {
1680
- return this.http.request("GET", `/conversations/${conversationId}`, {
1681
- params: {
1682
- pod_id: this.resolvePodId(options.pod_id),
1683
- },
1684
- });
1688
+ const podId = this.requirePodId(options.pod_id);
1689
+ return this.http.request("GET", `/pods/${podId}/conversations/${conversationId}`)
1690
+ .then(normalizeConversation);
1685
1691
  }
1686
1692
  update(conversationId, payload, options = {}) {
1687
- return this.http.request("PATCH", `/conversations/${conversationId}`, {
1688
- params: {
1689
- pod_id: this.resolvePodId(options.pod_id),
1690
- },
1691
- body: payload,
1692
- });
1693
- }
1694
- delete(conversationId, options = {}) {
1695
- const scopedPodId = this.requirePodId(options.pod_id);
1696
- return this.http.request("DELETE", `/pods/${scopedPodId}/conversations/${conversationId}`);
1693
+ const podId = this.requirePodId(options.pod_id);
1694
+ const { model, model_name, ...requestBody } = payload;
1695
+ const body = {
1696
+ ...requestBody,
1697
+ model_name: model_name ?? model,
1698
+ };
1699
+ return this.http.request("PATCH", `/pods/${podId}/conversations/${conversationId}`, {
1700
+ body,
1701
+ }).then(normalizeConversation);
1697
1702
  }
1698
1703
  sendMessageStream(conversationId, payload, options = {}) {
1699
- return this.http.stream(`/conversations/${conversationId}/messages`, {
1704
+ const podId = this.requirePodId(options.pod_id);
1705
+ return this.http.stream(`/pods/${podId}/conversations/${conversationId}/messages`, {
1700
1706
  method: "POST",
1701
- params: {
1702
- pod_id: this.resolvePodId(options.pod_id),
1707
+ body: payload,
1708
+ signal: options.signal,
1709
+ headers: {
1710
+ "Content-Type": "application/json",
1711
+ Accept: "text/event-stream",
1703
1712
  },
1713
+ });
1714
+ }
1715
+ sendOrCreateMessageStream(payload, options = {}) {
1716
+ const podId = this.requirePodId(options.pod_id);
1717
+ return this.http.stream(`/pods/${podId}/conversations/messages`, {
1718
+ method: "POST",
1704
1719
  body: payload,
1705
1720
  signal: options.signal,
1706
1721
  headers: {
@@ -1710,9 +1725,10 @@ class ConversationsNamespace {
1710
1725
  });
1711
1726
  }
1712
1727
  resumeStream(conversationId, options = {}) {
1713
- return this.http.stream(`/conversations/${conversationId}/stream`, {
1728
+ const podId = this.requirePodId(options.pod_id);
1729
+ return this.http.stream(`/pods/${podId}/conversations/${conversationId}/stream`, {
1714
1730
  params: {
1715
- pod_id: this.resolvePodId(options.pod_id),
1731
+ agent_run_id: options.agent_run_id,
1716
1732
  },
1717
1733
  signal: options.signal,
1718
1734
  headers: {
@@ -1721,16 +1737,38 @@ class ConversationsNamespace {
1721
1737
  });
1722
1738
  }
1723
1739
  stopRun(conversationId, options = {}) {
1724
- return this.http.request("PATCH", `/conversations/${conversationId}/stop`, {
1725
- params: {
1726
- pod_id: this.resolvePodId(options.pod_id),
1727
- },
1740
+ const podId = this.requirePodId(options.pod_id);
1741
+ return this.http.request("POST", `/pods/${podId}/conversations/${conversationId}/stop`, {
1728
1742
  body: {},
1729
- });
1743
+ }).then(normalizeConversation);
1730
1744
  }
1731
1745
  }
1732
1746
  exports.ConversationsNamespace = ConversationsNamespace;
1733
1747
 
1748
+ },
1749
+ "./openapi_client/models/AgentModelName.js": function (module, exports, require) {
1750
+ "use strict";
1751
+ Object.defineProperty(exports, "__esModule", { value: true });
1752
+ exports.AgentModelName = void 0;
1753
+ /* generated using openapi-typescript-codegen -- do not edit */
1754
+ /* istanbul ignore file */
1755
+ /* tslint:disable */
1756
+ /* eslint-disable */
1757
+ /**
1758
+ * Models that can be selected for an agent run.
1759
+ */
1760
+ var AgentModelName;
1761
+ (function (AgentModelName) {
1762
+ AgentModelName["GEMINI_PRO"] = "GEMINI_PRO";
1763
+ AgentModelName["GEMINI_FLASH"] = "GEMINI_FLASH";
1764
+ AgentModelName["GEMINI_FLASH_LITE"] = "GEMINI_FLASH_LITE";
1765
+ AgentModelName["KIMI_K2"] = "KIMI_K2";
1766
+ AgentModelName["GPT_OSS"] = "GPT_OSS";
1767
+ AgentModelName["DEEPSEEK_V32"] = "DEEPSEEK_V32";
1768
+ AgentModelName["GLM_5"] = "GLM_5";
1769
+ AgentModelName["QWEN3_6"] = "QWEN3_6";
1770
+ })(AgentModelName || (exports.AgentModelName = AgentModelName = {}));
1771
+
1734
1772
  },
1735
1773
  "./namespaces/desks.js": function (module, exports, require) {
1736
1774
  "use strict";
@@ -1960,6 +1998,7 @@ exports.DesksService = DesksService;
1960
1998
  "use strict";
1961
1999
  Object.defineProperty(exports, "__esModule", { value: true });
1962
2000
  exports.FilesNamespace = void 0;
2001
+ const FileNamespace_js_1 = require("./openapi_client/models/FileNamespace.js");
1963
2002
  const SearchMethod_js_1 = require("./openapi_client/models/SearchMethod.js");
1964
2003
  const FilesService_js_1 = require("./openapi_client/services/FilesService.js");
1965
2004
  function joinDatastorePath(basePath, leaf) {
@@ -1991,6 +2030,13 @@ function getBaseName(path) {
1991
2030
  }
1992
2031
  return normalized.slice(index + 1);
1993
2032
  }
2033
+ function normalizeFileNamespace(namespace) {
2034
+ const normalized = String(namespace ?? "").trim().toUpperCase();
2035
+ if (normalized === FileNamespace_js_1.FileNamespace.PERSONAL || normalized === "PRIVATE") {
2036
+ return FileNamespace_js_1.FileNamespace.PERSONAL;
2037
+ }
2038
+ return FileNamespace_js_1.FileNamespace.POD;
2039
+ }
1994
2040
  class FilesNamespace {
1995
2041
  constructor(client, http, podId) {
1996
2042
  this.client = client;
@@ -2001,29 +2047,31 @@ class FilesNamespace {
2001
2047
  const payload = {
2002
2048
  path: joinDatastorePath(options.directoryPath ?? options.parentId, name),
2003
2049
  description: options.description,
2050
+ namespace: normalizeFileNamespace(options.namespace),
2004
2051
  };
2005
2052
  return this.client.request(() => FilesService_js_1.FilesService.fileFolderCreate(this.podId(), payload));
2006
2053
  },
2007
2054
  };
2008
2055
  this.converted = {
2009
- get: (path) => this.client.request(() => FilesService_js_1.FilesService.fileConvertedGet(this.podId(), path)),
2010
- render: (path) => this.client.request(() => FilesService_js_1.FilesService.fileConvertedRender(this.podId(), path)),
2011
- download: (path, artifact = "document.md") => {
2056
+ get: (path, options = {}) => this.client.request(() => FilesService_js_1.FilesService.fileConvertedGet(this.podId(), path, normalizeFileNamespace(options.namespace))),
2057
+ render: (path, options = {}) => this.client.request(() => FilesService_js_1.FilesService.fileConvertedRender(this.podId(), path, normalizeFileNamespace(options.namespace))),
2058
+ download: (path, artifact = "document.md", options = {}) => {
2012
2059
  const encodedPath = encodeURIComponent(path);
2013
2060
  const encodedArtifact = encodeURIComponent(artifact);
2014
- return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/converted/download?path=${encodedPath}&artifact=${encodedArtifact}`);
2061
+ const encodedNamespace = encodeURIComponent(normalizeFileNamespace(options.namespace));
2062
+ return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/converted/download?path=${encodedPath}&artifact=${encodedArtifact}&namespace=${encodedNamespace}`);
2015
2063
  },
2016
2064
  };
2017
2065
  }
2018
2066
  list(options = {}) {
2019
2067
  const directoryPath = options.directoryPath ?? options.parentId ?? "/";
2020
- return this.client.request(() => FilesService_js_1.FilesService.fileList(this.podId(), directoryPath, options.limit ?? 100, options.pageToken));
2068
+ return this.client.request(() => FilesService_js_1.FilesService.fileList(this.podId(), directoryPath, normalizeFileNamespace(options.namespace), options.limit ?? 100, options.pageToken));
2021
2069
  }
2022
- get(path) {
2023
- return this.client.request(() => FilesService_js_1.FilesService.fileGet(this.podId(), path));
2070
+ get(path, options = {}) {
2071
+ return this.client.request(() => FilesService_js_1.FilesService.fileGet(this.podId(), path, normalizeFileNamespace(options.namespace)));
2024
2072
  }
2025
- delete(path) {
2026
- return this.client.request(() => FilesService_js_1.FilesService.fileDelete(this.podId(), path));
2073
+ delete(path, options = {}) {
2074
+ return this.client.request(() => FilesService_js_1.FilesService.fileDelete(this.podId(), path, normalizeFileNamespace(options.namespace)));
2027
2075
  }
2028
2076
  search(query, options = {}) {
2029
2077
  return this.client.request(() => FilesService_js_1.FilesService.fileSearch(this.podId(), {
@@ -2032,12 +2080,13 @@ class FilesNamespace {
2032
2080
  search_method: options.searchMethod ?? SearchMethod_js_1.SearchMethod.HYBRID,
2033
2081
  }));
2034
2082
  }
2035
- download(path) {
2083
+ download(path, options = {}) {
2036
2084
  const encodedPath = encodeURIComponent(path);
2037
- return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/download?path=${encodedPath}`);
2085
+ const encodedNamespace = encodeURIComponent(normalizeFileNamespace(options.namespace));
2086
+ return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/download?path=${encodedPath}&namespace=${encodedNamespace}`);
2038
2087
  }
2039
2088
  tree(options = {}) {
2040
- return this.client.request(() => FilesService_js_1.FilesService.fileTree(this.podId(), options.rootPath ?? "/", options.filesPerDirectory ?? 3));
2089
+ return this.client.request(() => FilesService_js_1.FilesService.fileTree(this.podId(), options.rootPath ?? "/", normalizeFileNamespace(options.namespace), options.filesPerDirectory ?? 3));
2041
2090
  }
2042
2091
  upload(file, options = {}) {
2043
2092
  const payload = {
@@ -2046,6 +2095,7 @@ class FilesNamespace {
2046
2095
  description: options.description,
2047
2096
  directory_path: options.directoryPath ?? options.parentId ?? "/",
2048
2097
  search_enabled: options.searchEnabled ?? true,
2098
+ namespace: normalizeFileNamespace(options.namespace),
2049
2099
  };
2050
2100
  return this.client.request(() => FilesService_js_1.FilesService.fileUpload(this.podId(), payload));
2051
2101
  }
@@ -2064,12 +2114,28 @@ class FilesNamespace {
2064
2114
  description: options.description,
2065
2115
  new_path: resolvedNewPath,
2066
2116
  search_enabled: options.searchEnabled,
2117
+ namespace: normalizeFileNamespace(options.namespace),
2067
2118
  };
2068
2119
  return this.client.request(() => FilesService_js_1.FilesService.fileUpdate(this.podId(), payload));
2069
2120
  }
2070
2121
  }
2071
2122
  exports.FilesNamespace = FilesNamespace;
2072
2123
 
2124
+ },
2125
+ "./openapi_client/models/FileNamespace.js": function (module, exports, require) {
2126
+ "use strict";
2127
+ Object.defineProperty(exports, "__esModule", { value: true });
2128
+ exports.FileNamespace = void 0;
2129
+ /* generated using openapi-typescript-codegen -- do not edit */
2130
+ /* istanbul ignore file */
2131
+ /* tslint:disable */
2132
+ /* eslint-disable */
2133
+ var FileNamespace;
2134
+ (function (FileNamespace) {
2135
+ FileNamespace["PERSONAL"] = "PERSONAL";
2136
+ FileNamespace["POD"] = "POD";
2137
+ })(FileNamespace || (exports.FileNamespace = FileNamespace = {}));
2138
+
2073
2139
  },
2074
2140
  "./openapi_client/models/SearchMethod.js": function (module, exports, require) {
2075
2141
  "use strict";
@@ -2091,6 +2157,7 @@ var SearchMethod;
2091
2157
  "use strict";
2092
2158
  Object.defineProperty(exports, "__esModule", { value: true });
2093
2159
  exports.FilesService = void 0;
2160
+ const FileNamespace_js_1 = require("./openapi_client/models/FileNamespace.js");
2094
2161
  const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
2095
2162
  const request_js_1 = require("./openapi_client/core/request.js");
2096
2163
  class FilesService {
@@ -2098,12 +2165,13 @@ class FilesService {
2098
2165
  * List Files
2099
2166
  * @param podId
2100
2167
  * @param directoryPath
2168
+ * @param namespace
2101
2169
  * @param limit
2102
2170
  * @param pageToken
2103
2171
  * @returns FileListResponse Successful Response
2104
2172
  * @throws ApiError
2105
2173
  */
2106
- static fileList(podId, directoryPath = '/', limit = 100, pageToken) {
2174
+ static fileList(podId, directoryPath = '/', namespace = FileNamespace_js_1.FileNamespace.PERSONAL, limit = 100, pageToken) {
2107
2175
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2108
2176
  method: 'GET',
2109
2177
  url: '/pods/{pod_id}/datastore/files',
@@ -2112,6 +2180,7 @@ class FilesService {
2112
2180
  },
2113
2181
  query: {
2114
2182
  'directory_path': directoryPath,
2183
+ 'namespace': namespace,
2115
2184
  'limit': limit,
2116
2185
  'page_token': pageToken,
2117
2186
  },
@@ -2145,10 +2214,11 @@ class FilesService {
2145
2214
  * Delete File Or Folder
2146
2215
  * @param podId
2147
2216
  * @param path
2217
+ * @param namespace
2148
2218
  * @returns DatastoreMessageResponse Successful Response
2149
2219
  * @throws ApiError
2150
2220
  */
2151
- static fileDelete(podId, path) {
2221
+ static fileDelete(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
2152
2222
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2153
2223
  method: 'DELETE',
2154
2224
  url: '/pods/{pod_id}/datastore/files/by-path',
@@ -2157,6 +2227,7 @@ class FilesService {
2157
2227
  },
2158
2228
  query: {
2159
2229
  'path': path,
2230
+ 'namespace': namespace,
2160
2231
  },
2161
2232
  errors: {
2162
2233
  422: `Validation Error`,
@@ -2167,10 +2238,11 @@ class FilesService {
2167
2238
  * Get File
2168
2239
  * @param podId
2169
2240
  * @param path
2241
+ * @param namespace
2170
2242
  * @returns FileResponse Successful Response
2171
2243
  * @throws ApiError
2172
2244
  */
2173
- static fileGet(podId, path) {
2245
+ static fileGet(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
2174
2246
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2175
2247
  method: 'GET',
2176
2248
  url: '/pods/{pod_id}/datastore/files/by-path',
@@ -2179,6 +2251,7 @@ class FilesService {
2179
2251
  },
2180
2252
  query: {
2181
2253
  'path': path,
2254
+ 'namespace': namespace,
2182
2255
  },
2183
2256
  errors: {
2184
2257
  422: `Validation Error`,
@@ -2210,10 +2283,11 @@ class FilesService {
2210
2283
  * Get Converted File Metadata
2211
2284
  * @param podId
2212
2285
  * @param path
2286
+ * @param namespace
2213
2287
  * @returns ConvertedFileResponse Successful Response
2214
2288
  * @throws ApiError
2215
2289
  */
2216
- static fileConvertedGet(podId, path) {
2290
+ static fileConvertedGet(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
2217
2291
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2218
2292
  method: 'GET',
2219
2293
  url: '/pods/{pod_id}/datastore/files/converted/by-path',
@@ -2222,6 +2296,7 @@ class FilesService {
2222
2296
  },
2223
2297
  query: {
2224
2298
  'path': path,
2299
+ 'namespace': namespace,
2225
2300
  },
2226
2301
  errors: {
2227
2302
  422: `Validation Error`,
@@ -2233,10 +2308,11 @@ class FilesService {
2233
2308
  * @param podId
2234
2309
  * @param path
2235
2310
  * @param artifact
2311
+ * @param namespace
2236
2312
  * @returns any Successful Response
2237
2313
  * @throws ApiError
2238
2314
  */
2239
- static fileConvertedDownload(podId, path, artifact = 'document.md') {
2315
+ static fileConvertedDownload(podId, path, artifact = 'document.md', namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
2240
2316
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2241
2317
  method: 'GET',
2242
2318
  url: '/pods/{pod_id}/datastore/files/converted/download',
@@ -2246,6 +2322,7 @@ class FilesService {
2246
2322
  query: {
2247
2323
  'path': path,
2248
2324
  'artifact': artifact,
2325
+ 'namespace': namespace,
2249
2326
  },
2250
2327
  errors: {
2251
2328
  422: `Validation Error`,
@@ -2256,10 +2333,11 @@ class FilesService {
2256
2333
  * Render Converted File As HTML
2257
2334
  * @param podId
2258
2335
  * @param path
2336
+ * @param namespace
2259
2337
  * @returns any Successful Response
2260
2338
  * @throws ApiError
2261
2339
  */
2262
- static fileConvertedRender(podId, path) {
2340
+ static fileConvertedRender(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
2263
2341
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2264
2342
  method: 'GET',
2265
2343
  url: '/pods/{pod_id}/datastore/files/converted/render',
@@ -2268,6 +2346,7 @@ class FilesService {
2268
2346
  },
2269
2347
  query: {
2270
2348
  'path': path,
2349
+ 'namespace': namespace,
2271
2350
  },
2272
2351
  errors: {
2273
2352
  422: `Validation Error`,
@@ -2278,10 +2357,11 @@ class FilesService {
2278
2357
  * Download File
2279
2358
  * @param podId
2280
2359
  * @param path
2360
+ * @param namespace
2281
2361
  * @returns any Successful Response
2282
2362
  * @throws ApiError
2283
2363
  */
2284
- static fileDownload(podId, path) {
2364
+ static fileDownload(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
2285
2365
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2286
2366
  method: 'GET',
2287
2367
  url: '/pods/{pod_id}/datastore/files/download',
@@ -2290,6 +2370,7 @@ class FilesService {
2290
2370
  },
2291
2371
  query: {
2292
2372
  'path': path,
2373
+ 'namespace': namespace,
2293
2374
  },
2294
2375
  errors: {
2295
2376
  422: `Validation Error`,
@@ -2342,11 +2423,12 @@ class FilesService {
2342
2423
  * Get Directory Tree
2343
2424
  * @param podId
2344
2425
  * @param rootPath
2426
+ * @param namespace
2345
2427
  * @param filesPerDirectory
2346
2428
  * @returns DirectoryTreeResponse Successful Response
2347
2429
  * @throws ApiError
2348
2430
  */
2349
- static fileTree(podId, rootPath = '/', filesPerDirectory = 3) {
2431
+ static fileTree(podId, rootPath = '/', namespace = FileNamespace_js_1.FileNamespace.PERSONAL, filesPerDirectory = 3) {
2350
2432
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2351
2433
  method: 'GET',
2352
2434
  url: '/pods/{pod_id}/datastore/files/tree',
@@ -2355,6 +2437,7 @@ class FilesService {
2355
2437
  },
2356
2438
  query: {
2357
2439
  'root_path': rootPath,
2440
+ 'namespace': namespace,
2358
2441
  'files_per_directory': filesPerDirectory,
2359
2442
  },
2360
2443
  errors: {
@@ -2719,7 +2802,7 @@ class IntegrationsNamespace {
2719
2802
  app_names: appNames,
2720
2803
  goal,
2721
2804
  };
2722
- return this.client.request(() => AgentToolsService_js_1.AgentToolsService.toolIntegrationHelperAgent(body));
2805
+ return this.client.request(() => AgentToolsService_js_1.AgentToolsService.agentToolIntegrationHelperAgent(body));
2723
2806
  }
2724
2807
  createConnectRequest(applicationId) {
2725
2808
  const payload = { application_id: applicationId };
@@ -2737,13 +2820,13 @@ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
2737
2820
  const request_js_1 = require("./openapi_client/core/request.js");
2738
2821
  class AgentToolsService {
2739
2822
  /**
2740
- * Integration Helper Agent
2823
+ * Agent Integration Helper Agent
2741
2824
  * Plan how to use one or more integration applications for a goal and return recommended operations.
2742
2825
  * @param requestBody
2743
2826
  * @returns IntegrationHelperAgentResponse Successful Response
2744
2827
  * @throws ApiError
2745
2828
  */
2746
- static toolIntegrationHelperAgent(requestBody) {
2829
+ static agentToolIntegrationHelperAgent(requestBody) {
2747
2830
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2748
2831
  method: 'POST',
2749
2832
  url: '/tools/integration-helper-agent',
@@ -2755,13 +2838,13 @@ class AgentToolsService {
2755
2838
  });
2756
2839
  }
2757
2840
  /**
2758
- * Report Feedback
2841
+ * Agent Report Feedback
2759
2842
  * Record a maintainer-facing feedback report about system issues, skill issues, incorrect knowledge, or other unexpected behavior.
2760
2843
  * @param requestBody
2761
2844
  * @returns ReportFeedbackResponse Successful Response
2762
2845
  * @throws ApiError
2763
2846
  */
2764
- static toolReportFeedback(requestBody) {
2847
+ static agentToolReportFeedback(requestBody) {
2765
2848
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2766
2849
  method: 'POST',
2767
2850
  url: '/tools/report-feedback',
@@ -2773,13 +2856,13 @@ class AgentToolsService {
2773
2856
  });
2774
2857
  }
2775
2858
  /**
2776
- * Web Search
2859
+ * Agent Web Search
2777
2860
  * Run a raw web search and return structured results.
2778
2861
  * @param requestBody
2779
2862
  * @returns WebSearchResponse Successful Response
2780
2863
  * @throws ApiError
2781
2864
  */
2782
- static toolWebSearch(requestBody) {
2865
+ static agentToolWebSearch(requestBody) {
2783
2866
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2784
2867
  method: 'POST',
2785
2868
  url: '/tools/web-search',
@@ -2791,13 +2874,13 @@ class AgentToolsService {
2791
2874
  });
2792
2875
  }
2793
2876
  /**
2794
- * Web Search Agent
2877
+ * Agent Web Search Agent
2795
2878
  * Run the multi-step web search agent and return a synthesized answer.
2796
2879
  * @param requestBody
2797
2880
  * @returns WebSearchAgentResponse Successful Response
2798
2881
  * @throws ApiError
2799
2882
  */
2800
- static toolWebSearchAgent(requestBody) {
2883
+ static agentToolWebSearchAgent(requestBody) {
2801
2884
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2802
2885
  method: 'POST',
2803
2886
  url: '/tools/web-search-agent',
@@ -4014,46 +4097,46 @@ exports.PodsService = PodsService;
4014
4097
  "use strict";
4015
4098
  Object.defineProperty(exports, "__esModule", { value: true });
4016
4099
  exports.PodSurfacesNamespace = void 0;
4017
- const AssistantSurfacesService_js_1 = require("./openapi_client/services/AssistantSurfacesService.js");
4100
+ const AgentSurfacesService_js_1 = require("./openapi_client/services/AgentSurfacesService.js");
4018
4101
  class PodSurfacesNamespace {
4019
4102
  constructor(client) {
4020
4103
  this.client = client;
4021
4104
  }
4022
4105
  list(podId, options = {}) {
4023
- return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceList(podId, options.limit ?? 100, options.pageToken ?? options.cursor));
4106
+ return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceList(podId, options.limit ?? 100, options.pageToken ?? options.cursor));
4024
4107
  }
4025
4108
  create(podId, payload) {
4026
- return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceCreate(podId, payload));
4109
+ return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceCreate(podId, payload));
4027
4110
  }
4028
4111
  get(podId, surfaceId) {
4029
- return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceGet(podId, surfaceId));
4112
+ return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceGet(podId, surfaceId));
4030
4113
  }
4031
4114
  updateConfig(podId, surfaceId, payload) {
4032
- return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceUpdate(podId, surfaceId, payload));
4115
+ return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceUpdate(podId, surfaceId, payload));
4033
4116
  }
4034
4117
  toggle(podId, surfaceId, isActive) {
4035
- return this.client.request(() => AssistantSurfacesService_js_1.AssistantSurfacesService.assistantSurfaceToggle(podId, surfaceId, { is_active: isActive }));
4118
+ return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceToggle(podId, surfaceId, { is_active: isActive }));
4036
4119
  }
4037
4120
  }
4038
4121
  exports.PodSurfacesNamespace = PodSurfacesNamespace;
4039
4122
 
4040
4123
  },
4041
- "./openapi_client/services/AssistantSurfacesService.js": function (module, exports, require) {
4124
+ "./openapi_client/services/AgentSurfacesService.js": function (module, exports, require) {
4042
4125
  "use strict";
4043
4126
  Object.defineProperty(exports, "__esModule", { value: true });
4044
- exports.AssistantSurfacesService = void 0;
4127
+ exports.AgentSurfacesService = void 0;
4045
4128
  const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
4046
4129
  const request_js_1 = require("./openapi_client/core/request.js");
4047
- class AssistantSurfacesService {
4130
+ class AgentSurfacesService {
4048
4131
  /**
4049
4132
  * List Surfaces
4050
4133
  * @param podId
4051
4134
  * @param limit
4052
4135
  * @param pageToken
4053
- * @returns AssistantSurfaceListResponse Successful Response
4136
+ * @returns AgentSurfaceListResponse Successful Response
4054
4137
  * @throws ApiError
4055
4138
  */
4056
- static assistantSurfaceList(podId, limit = 100, pageToken) {
4139
+ static agentSurfaceList(podId, limit = 100, pageToken) {
4057
4140
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
4058
4141
  method: 'GET',
4059
4142
  url: '/pods/{pod_id}/surfaces',
@@ -4076,7 +4159,7 @@ class AssistantSurfacesService {
4076
4159
  * @returns any Successful Response
4077
4160
  * @throws ApiError
4078
4161
  */
4079
- static assistantSurfaceCreate(podId, requestBody) {
4162
+ static agentSurfaceCreate(podId, requestBody) {
4080
4163
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
4081
4164
  method: 'POST',
4082
4165
  url: '/pods/{pod_id}/surfaces',
@@ -4097,7 +4180,7 @@ class AssistantSurfacesService {
4097
4180
  * @returns SurfacePlatformSetupGuideResponse Successful Response
4098
4181
  * @throws ApiError
4099
4182
  */
4100
- static assistantSurfacePlatformChecklist(podId, platform) {
4183
+ static agentSurfacePlatformChecklist(podId, platform) {
4101
4184
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
4102
4185
  method: 'GET',
4103
4186
  url: '/pods/{pod_id}/surfaces/platforms/{platform}/checklist',
@@ -4117,7 +4200,7 @@ class AssistantSurfacesService {
4117
4200
  * @returns any Successful Response
4118
4201
  * @throws ApiError
4119
4202
  */
4120
- static assistantSurfaceGet(podId, surfaceId) {
4203
+ static agentSurfaceGet(podId, surfaceId) {
4121
4204
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
4122
4205
  method: 'GET',
4123
4206
  url: '/pods/{pod_id}/surfaces/{surface_id}',
@@ -4138,7 +4221,7 @@ class AssistantSurfacesService {
4138
4221
  * @returns any Successful Response
4139
4222
  * @throws ApiError
4140
4223
  */
4141
- static assistantSurfaceUpdate(podId, surfaceId, requestBody) {
4224
+ static agentSurfaceUpdate(podId, surfaceId, requestBody) {
4142
4225
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
4143
4226
  method: 'PATCH',
4144
4227
  url: '/pods/{pod_id}/surfaces/{surface_id}',
@@ -4160,7 +4243,7 @@ class AssistantSurfacesService {
4160
4243
  * @returns AdminConsentInfoResponse Successful Response
4161
4244
  * @throws ApiError
4162
4245
  */
4163
- static assistantSurfaceAdminConsentInfo(podId, surfaceId) {
4246
+ static agentSurfaceAdminConsentInfo(podId, surfaceId) {
4164
4247
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
4165
4248
  method: 'GET',
4166
4249
  url: '/pods/{pod_id}/surfaces/{surface_id}/admin-consent',
@@ -4181,7 +4264,7 @@ class AssistantSurfacesService {
4181
4264
  * @returns any Successful Response
4182
4265
  * @throws ApiError
4183
4266
  */
4184
- static assistantSurfaceToggle(podId, surfaceId, requestBody) {
4267
+ static agentSurfaceToggle(podId, surfaceId, requestBody) {
4185
4268
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
4186
4269
  method: 'PATCH',
4187
4270
  url: '/pods/{pod_id}/surfaces/{surface_id}/toggle',
@@ -4203,7 +4286,7 @@ class AssistantSurfacesService {
4203
4286
  * @returns any Successful Response
4204
4287
  * @throws ApiError
4205
4288
  */
4206
- static assistantSurfaceWebhookUrl(podId, surfaceId) {
4289
+ static agentSurfaceWebhookUrl(podId, surfaceId) {
4207
4290
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
4208
4291
  method: 'GET',
4209
4292
  url: '/pods/{pod_id}/surfaces/{surface_id}/webhook-url',
@@ -4217,7 +4300,7 @@ class AssistantSurfacesService {
4217
4300
  });
4218
4301
  }
4219
4302
  }
4220
- exports.AssistantSurfacesService = AssistantSurfacesService;
4303
+ exports.AgentSurfacesService = AgentSurfacesService;
4221
4304
 
4222
4305
  },
4223
4306
  "./namespaces/records.js": function (module, exports, require) {
@@ -4783,46 +4866,88 @@ exports.TablesService = TablesService;
4783
4866
  "use strict";
4784
4867
  Object.defineProperty(exports, "__esModule", { value: true });
4785
4868
  exports.TasksNamespace = void 0;
4869
+ function toTask(conversation, inputData) {
4870
+ return {
4871
+ id: conversation.id,
4872
+ agent_id: conversation.agent_id,
4873
+ pod_id: conversation.pod_id,
4874
+ user_id: conversation.user_id,
4875
+ input_data: inputData ?? null,
4876
+ output_data: null,
4877
+ error: null,
4878
+ status: conversation.status?.toUpperCase() ?? "WAITING",
4879
+ created_at: conversation.created_at,
4880
+ updated_at: conversation.updated_at,
4881
+ conversation,
4882
+ };
4883
+ }
4884
+ function normalizeConversation(conversation) {
4885
+ return {
4886
+ ...conversation,
4887
+ model: conversation.model ?? conversation.model_name ?? null,
4888
+ status: conversation.status ?? "waiting",
4889
+ };
4890
+ }
4891
+ function normalizeMessages(messages) {
4892
+ return messages;
4893
+ }
4786
4894
  class TasksNamespace {
4787
4895
  constructor(http, podId) {
4788
4896
  this.http = http;
4789
4897
  this.podId = podId;
4790
4898
  this.messages = {
4791
- list: (taskId, options = {}) => this.http.request("GET", `/pods/${this.podId()}/tasks/${taskId}/messages`, {
4899
+ list: (taskId, options = {}) => this.http.request("GET", `/pods/${this.podId()}/conversations/${taskId}/messages`, {
4792
4900
  params: {
4793
4901
  limit: options.limit ?? 100,
4794
- page_token: options.page_token,
4902
+ after_sequence: options.page_token,
4795
4903
  },
4796
- }),
4904
+ }).then((response) => ({
4905
+ ...response,
4906
+ items: normalizeMessages(response.items ?? []),
4907
+ })),
4797
4908
  add: (taskId, payload) => {
4798
- return this.http.request("POST", `/pods/${this.podId()}/tasks/${taskId}/messages`, {
4909
+ return this.http.request("POST", `/pods/${this.podId()}/conversations/${taskId}/messages`, {
4799
4910
  body: payload,
4800
- });
4911
+ }).then(() => this.get(taskId));
4801
4912
  },
4802
4913
  };
4803
4914
  }
4804
4915
  list(options = {}) {
4805
- return this.http.request("GET", `/pods/${this.podId()}/tasks`, {
4916
+ return this.http.request("GET", `/pods/${this.podId()}/conversations`, {
4806
4917
  params: {
4807
4918
  agent_name: options.agent_name,
4808
4919
  limit: options.limit ?? 100,
4809
4920
  page_token: options.page_token,
4810
4921
  },
4922
+ }).then((response) => {
4923
+ const conversations = (response.items ?? []).map(normalizeConversation);
4924
+ return {
4925
+ items: conversations.map((conversation) => toTask(conversation)),
4926
+ limit: response.limit ?? options.limit ?? 100,
4927
+ next_page_token: response.next_page_token ?? null,
4928
+ total: response.total,
4929
+ };
4811
4930
  });
4812
4931
  }
4813
4932
  create(payload) {
4814
- return this.http.request("POST", `/pods/${this.podId()}/tasks`, {
4815
- body: payload,
4816
- });
4933
+ return this.http.request("POST", `/pods/${this.podId()}/conversations`, {
4934
+ body: {
4935
+ agent_name: payload.agent_name,
4936
+ title: payload.title ?? payload.content ?? payload.agent_name,
4937
+ },
4938
+ }).then((conversation) => toTask(normalizeConversation(conversation), payload.input_data));
4817
4939
  }
4818
4940
  get(taskId) {
4819
- return this.http.request("GET", `/pods/${this.podId()}/tasks/${taskId}`);
4941
+ return this.http.request("GET", `/pods/${this.podId()}/conversations/${taskId}`)
4942
+ .then((conversation) => toTask(normalizeConversation(conversation)));
4820
4943
  }
4821
4944
  stop(taskId) {
4822
- return this.http.request("PATCH", `/pods/${this.podId()}/tasks/${taskId}/stop`);
4945
+ return this.http.request("POST", `/pods/${this.podId()}/conversations/${taskId}/stop`, {
4946
+ body: {},
4947
+ }).then((conversation) => toTask(normalizeConversation(conversation)));
4823
4948
  }
4824
4949
  stream(taskId, options = {}) {
4825
- return this.http.stream(`/pods/${this.podId()}/tasks/${taskId}/stream`, {
4950
+ return this.http.stream(`/pods/${this.podId()}/conversations/${taskId}/stream`, {
4826
4951
  signal: options.signal,
4827
4952
  headers: {
4828
4953
  Accept: "text/event-stream",
@@ -5234,7 +5359,7 @@ class WorkflowsService {
5234
5359
  }
5235
5360
  /**
5236
5361
  * List Workflow Installs
5237
- * List the current user's installations for a workflow.
5362
+ * List workflow installations visible to the current user. `GLOBAL` workflows return the pod-level install; `USER` workflows return the current user's install.
5238
5363
  * @param podId
5239
5364
  * @param workflowName
5240
5365
  * @returns WorkflowInstallListResponse Successful Response