lemma-sdk 0.2.35 → 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.
- package/README.md +126 -43
- package/dist/browser/lemma-client.js +456 -169
- package/dist/client.d.ts +1 -2
- package/dist/client.js +1 -3
- package/dist/index.d.ts +1 -1
- package/dist/namespaces/agents.js +1 -1
- package/dist/namespaces/conversations.d.ts +73 -0
- package/dist/namespaces/conversations.js +174 -0
- package/dist/namespaces/files.d.ts +24 -6
- package/dist/namespaces/files.js +25 -12
- package/dist/namespaces/integrations.d.ts +10 -2
- package/dist/namespaces/integrations.js +17 -2
- package/dist/namespaces/pod-surfaces.d.ts +1 -1
- package/dist/namespaces/pod-surfaces.js +6 -6
- package/dist/namespaces/tasks.d.ts +1 -5
- package/dist/namespaces/tasks.js +54 -12
- package/dist/openapi_client/index.d.ts +27 -34
- package/dist/openapi_client/index.js +9 -12
- package/dist/openapi_client/models/AdminConsentInfoResponse.d.ts +2 -2
- package/dist/openapi_client/models/AgentListResponse.d.ts +2 -4
- package/dist/openapi_client/models/AgentMessageResponse.d.ts +0 -3
- package/dist/openapi_client/models/{AvailableModels.d.ts → AgentModelName.d.ts} +4 -1
- package/dist/openapi_client/models/AgentModelName.js +18 -0
- package/dist/openapi_client/models/AgentResponse.d.ts +18 -13
- package/dist/openapi_client/models/AgentSurfaceListResponse.d.ts +6 -0
- package/dist/openapi_client/models/{AssistantSurfaceResponse.d.ts → AgentSurfaceResponse.d.ts} +6 -5
- package/dist/openapi_client/models/{AssistantSurfaceStatus.d.ts → AgentSurfaceStatus.d.ts} +1 -1
- package/dist/openapi_client/models/AgentSurfaceStatus.js +10 -0
- package/dist/openapi_client/models/{ToolSet.d.ts → AgentToolset.d.ts} +3 -5
- package/dist/openapi_client/models/AgentToolset.js +17 -0
- package/dist/openapi_client/models/ApplicationAccessConfig.d.ts +3 -5
- package/dist/openapi_client/models/ApplicationMode.d.ts +3 -3
- package/dist/openapi_client/models/ApplicationMode.js +3 -3
- package/dist/openapi_client/models/ConversationResponse.d.ts +9 -20
- package/dist/openapi_client/models/CreateAgentRequest.d.ts +11 -7
- package/dist/openapi_client/models/CreateConversationRequest.d.ts +4 -8
- package/dist/openapi_client/models/CreateFolderRequest.d.ts +2 -5
- package/dist/openapi_client/models/CreateFunctionRequest.d.ts +2 -2
- package/dist/openapi_client/models/CreateSurfaceRequest.d.ts +1 -1
- package/dist/openapi_client/models/DatastoreFileUploadRequest.d.ts +2 -2
- package/dist/openapi_client/models/FeedbackCategory.d.ts +7 -0
- package/dist/openapi_client/models/FeedbackCategory.js +12 -0
- package/dist/openapi_client/models/FileNamespace.d.ts +4 -0
- package/dist/openapi_client/models/FileNamespace.js +9 -0
- package/dist/openapi_client/models/FileResponse.d.ts +2 -2
- package/dist/openapi_client/models/FlowRunEntity.d.ts +11 -1
- package/dist/openapi_client/models/FunctionResponse.d.ts +2 -2
- package/dist/openapi_client/models/HarnessKind.d.ts +7 -0
- package/dist/openapi_client/models/HarnessKind.js +12 -0
- package/dist/openapi_client/models/IntegrationHelperAgentRequest.d.ts +13 -0
- package/dist/openapi_client/models/IntegrationHelperAgentResponse.d.ts +25 -0
- package/dist/openapi_client/models/MessageListResponse.d.ts +6 -0
- package/dist/openapi_client/models/MessageResponse.d.ts +17 -0
- package/dist/openapi_client/models/OperationDetail.d.ts +3 -0
- package/dist/openapi_client/models/OperationDetailsBatchRequest.d.ts +9 -0
- package/dist/openapi_client/models/OperationDetailsBatchResponse.d.ts +18 -0
- package/dist/openapi_client/models/OperationDiscoverResponse.d.ts +26 -0
- package/dist/openapi_client/models/OperationSummary.d.ts +3 -0
- package/dist/openapi_client/models/OrganizationCreateRequest.d.ts +2 -0
- package/dist/openapi_client/models/OrganizationInvitationRequest.d.ts +1 -0
- package/dist/openapi_client/models/OrganizationInvitationResponse.d.ts +4 -0
- package/dist/openapi_client/models/OrganizationMessageResponse.d.ts +1 -0
- package/dist/openapi_client/models/OrganizationResponse.d.ts +2 -0
- package/dist/openapi_client/models/OrganizationSlugAvailabilityResponse.d.ts +7 -0
- package/dist/openapi_client/models/ReportFeedbackRequest.d.ts +30 -0
- package/dist/openapi_client/models/ReportFeedbackResponse.d.ts +25 -0
- package/dist/openapi_client/models/ResourceType.d.ts +0 -1
- package/dist/openapi_client/models/ResourceType.js +0 -1
- package/dist/openapi_client/models/SendMessageRequest.d.ts +5 -0
- package/dist/openapi_client/models/{ToolCallRequest.d.ts → ToolCallContent.d.ts} +1 -1
- package/dist/openapi_client/models/{ToolCallResponse.d.ts → ToolReturnContent.d.ts} +2 -1
- package/dist/openapi_client/models/UpdateAgentRequest.d.ts +11 -7
- package/dist/openapi_client/models/UpdateConversationRequest.d.ts +2 -5
- package/dist/openapi_client/models/UpdateFunctionRequest.d.ts +2 -2
- package/dist/openapi_client/models/WorkflowInstallListResponse.d.ts +4 -0
- package/dist/openapi_client/models/app__modules__agent__domain__value_objects__TableAccessEntry.d.ts +8 -0
- package/dist/openapi_client/models/{TableAccessEntry.d.ts → app__modules__function__api__schemas__function_schemas__TableAccessEntry.d.ts} +1 -1
- package/dist/openapi_client/models/update.d.ts +2 -2
- package/dist/openapi_client/services/AgentConversationsService.d.ts +97 -0
- package/dist/openapi_client/services/AgentConversationsService.js +217 -0
- package/dist/openapi_client/services/{AssistantSurfacesIngressService.d.ts → AgentSurfacesIngressService.d.ts} +2 -2
- package/dist/openapi_client/services/{AssistantSurfacesIngressService.js → AgentSurfacesIngressService.js} +2 -2
- package/dist/openapi_client/services/{AssistantSurfacesService.d.ts → AgentSurfacesService.d.ts} +11 -11
- package/dist/openapi_client/services/{AssistantSurfacesService.js → AgentSurfacesService.js} +10 -10
- package/dist/openapi_client/services/AgentToolsService.d.ts +24 -4
- package/dist/openapi_client/services/AgentToolsService.js +40 -4
- package/dist/openapi_client/services/AgentsService.d.ts +7 -7
- package/dist/openapi_client/services/AgentsService.js +8 -8
- package/dist/openapi_client/services/ApplicationsService.d.ts +10 -9
- package/dist/openapi_client/services/ApplicationsService.js +11 -10
- package/dist/openapi_client/services/FilesService.d.ts +17 -8
- package/dist/openapi_client/services/FilesService.js +25 -8
- package/dist/openapi_client/services/IntegrationsService.d.ts +3 -2
- package/dist/openapi_client/services/IntegrationsService.js +4 -2
- package/dist/openapi_client/services/OrganizationsService.d.ts +18 -0
- package/dist/openapi_client/services/OrganizationsService.js +40 -0
- package/dist/openapi_client/services/WorkflowsService.d.ts +10 -0
- package/dist/openapi_client/services/WorkflowsService.js +21 -0
- package/dist/react/useAgentRun.d.ts +28 -7
- package/dist/react/useAgentRun.js +120 -27
- package/dist/react/useAssistantController.d.ts +6 -2
- package/dist/react/useAssistantController.js +57 -14
- package/dist/react/useAssistantSession.d.ts +15 -3
- package/dist/react/useAssistantSession.js +19 -15
- package/dist/react/useConversationMessages.d.ts +6 -2
- package/dist/react/useConversationMessages.js +2 -1
- package/dist/react/useConversations.d.ts +6 -2
- package/dist/react/useConversations.js +7 -5
- package/dist/react/useCreateFolder.d.ts +4 -2
- package/dist/react/useCreateFolder.js +6 -3
- package/dist/react/useDeleteFile.d.ts +4 -1
- package/dist/react/useDeleteFile.js +3 -3
- package/dist/react/useFile.d.ts +4 -2
- package/dist/react/useFile.js +3 -3
- package/dist/react/useFilePreview.d.ts +4 -1
- package/dist/react/useFilePreview.js +5 -4
- package/dist/react/useFileTree.d.ts +4 -2
- package/dist/react/useFileTree.js +3 -2
- package/dist/react/useFiles.d.ts +4 -2
- package/dist/react/useFiles.js +5 -3
- package/dist/react/useUpdateFile.d.ts +4 -2
- package/dist/react/useUpdateFile.js +6 -3
- package/dist/react/useUploadFile.d.ts +4 -2
- package/dist/react/useUploadFile.js +6 -3
- package/dist/react/useWorkflowRun.js +1 -1
- package/dist/react/useWorkflowStart.js +1 -1
- package/dist/run-utils.d.ts +2 -1
- package/dist/types.d.ts +62 -6
- package/package.json +1 -1
- package/dist/namespaces/assistants.d.ts +0 -96
- package/dist/namespaces/assistants.js +0 -160
- package/dist/openapi_client/models/AddMessageRequest.d.ts +0 -6
- package/dist/openapi_client/models/AppDescriptorResponse.d.ts +0 -5
- package/dist/openapi_client/models/AssistantListResponse.d.ts +0 -6
- package/dist/openapi_client/models/AssistantResponse.d.ts +0 -23
- package/dist/openapi_client/models/AssistantSurfaceListResponse.d.ts +0 -6
- package/dist/openapi_client/models/AssistantSurfaceStatus.js +0 -10
- package/dist/openapi_client/models/AvailableModelInfo.d.ts +0 -8
- package/dist/openapi_client/models/AvailableModels.js +0 -15
- package/dist/openapi_client/models/AvailableModelsListResponse.d.ts +0 -7
- package/dist/openapi_client/models/ConversationMessageListResponse.d.ts +0 -6
- package/dist/openapi_client/models/ConversationMessageResponse.d.ts +0 -19
- package/dist/openapi_client/models/ConversationStatus.d.ts +0 -7
- package/dist/openapi_client/models/ConversationStatus.js +0 -12
- package/dist/openapi_client/models/ConversationType.d.ts +0 -8
- package/dist/openapi_client/models/ConversationType.js +0 -13
- package/dist/openapi_client/models/CreateAssistantRequest.d.ts +0 -18
- package/dist/openapi_client/models/CreateMessageRequest.d.ts +0 -6
- package/dist/openapi_client/models/CreateTaskRequest.d.ts +0 -10
- package/dist/openapi_client/models/FileVisibility.d.ts +0 -4
- package/dist/openapi_client/models/FileVisibility.js +0 -9
- package/dist/openapi_client/models/OperationListResponse.d.ts +0 -6
- package/dist/openapi_client/models/TaskListResponse.d.ts +0 -9
- package/dist/openapi_client/models/TaskMessageListResponse.d.ts +0 -9
- package/dist/openapi_client/models/TaskMessageResponse.d.ts +0 -15
- package/dist/openapi_client/models/TaskResponse.d.ts +0 -16
- package/dist/openapi_client/models/TaskResponse.js +0 -1
- package/dist/openapi_client/models/TaskStatus.d.ts +0 -12
- package/dist/openapi_client/models/TaskStatus.js +0 -17
- package/dist/openapi_client/models/ToolCallRequest.js +0 -1
- package/dist/openapi_client/models/ToolCallResponse.js +0 -1
- package/dist/openapi_client/models/ToolSet.js +0 -19
- package/dist/openapi_client/models/UpdateAssistantRequest.d.ts +0 -17
- package/dist/openapi_client/models/UpdateAssistantRequest.js +0 -1
- package/dist/openapi_client/services/AssistantsService.d.ts +0 -49
- package/dist/openapi_client/services/AssistantsService.js +0 -112
- package/dist/openapi_client/services/ConversationsService.d.ts +0 -88
- package/dist/openapi_client/services/ConversationsService.js +0 -202
- package/dist/openapi_client/services/TasksService.d.ts +0 -76
- package/dist/openapi_client/services/TasksService.js +0 -167
- /package/dist/openapi_client/models/{AddMessageRequest.js → AgentSurfaceListResponse.js} +0 -0
- /package/dist/openapi_client/models/{AppDescriptorResponse.js → AgentSurfaceResponse.js} +0 -0
- /package/dist/openapi_client/models/{AssistantListResponse.js → IntegrationHelperAgentRequest.js} +0 -0
- /package/dist/openapi_client/models/{AssistantResponse.js → IntegrationHelperAgentResponse.js} +0 -0
- /package/dist/openapi_client/models/{AssistantSurfaceListResponse.js → MessageListResponse.js} +0 -0
- /package/dist/openapi_client/models/{AssistantSurfaceResponse.js → MessageResponse.js} +0 -0
- /package/dist/openapi_client/models/{AvailableModelInfo.js → OperationDetailsBatchRequest.js} +0 -0
- /package/dist/openapi_client/models/{AvailableModelsListResponse.js → OperationDetailsBatchResponse.js} +0 -0
- /package/dist/openapi_client/models/{ConversationMessageListResponse.js → OperationDiscoverResponse.js} +0 -0
- /package/dist/openapi_client/models/{ConversationMessageResponse.js → OrganizationSlugAvailabilityResponse.js} +0 -0
- /package/dist/openapi_client/models/{CreateAssistantRequest.js → ReportFeedbackRequest.js} +0 -0
- /package/dist/openapi_client/models/{CreateMessageRequest.js → ReportFeedbackResponse.js} +0 -0
- /package/dist/openapi_client/models/{CreateTaskRequest.js → SendMessageRequest.js} +0 -0
- /package/dist/openapi_client/models/{OperationListResponse.js → ToolCallContent.js} +0 -0
- /package/dist/openapi_client/models/{TableAccessEntry.js → ToolReturnContent.js} +0 -0
- /package/dist/openapi_client/models/{TaskListResponse.js → WorkflowInstallListResponse.js} +0 -0
- /package/dist/openapi_client/models/{TaskMessageListResponse.js → app__modules__agent__domain__value_objects__TableAccessEntry.js} +0 -0
- /package/dist/openapi_client/models/{TaskMessageResponse.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
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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/
|
|
1570
|
+
"./namespaces/conversations.js": function (module, exports, require) {
|
|
1572
1571
|
"use strict";
|
|
1573
1572
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1574
|
-
exports.ConversationsNamespace =
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
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 = {}) =>
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
}
|
|
1620
|
-
|
|
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
|
-
|
|
1648
|
+
const podId = this.requirePodId(options.pod_id);
|
|
1649
|
+
return this.http.request("GET", `/pods/${podId}/conversations`, {
|
|
1644
1650
|
params: {
|
|
1645
|
-
|
|
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
|
-
|
|
1658
|
-
return this.
|
|
1657
|
+
listByAgent(agentName, options = {}) {
|
|
1658
|
+
return this.list({ ...options, agent_name: agentName });
|
|
1659
1659
|
}
|
|
1660
|
-
listModels() {
|
|
1661
|
-
|
|
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
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
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
|
-
|
|
1681
|
+
createForAgent(agentName, payload = {}) {
|
|
1674
1682
|
return this.create({
|
|
1675
1683
|
...payload,
|
|
1676
|
-
|
|
1684
|
+
agent_name: agentName,
|
|
1677
1685
|
});
|
|
1678
1686
|
}
|
|
1679
1687
|
get(conversationId, options = {}) {
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
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
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
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
|
-
|
|
1704
|
+
const podId = this.requirePodId(options.pod_id);
|
|
1705
|
+
return this.http.stream(`/pods/${podId}/conversations/${conversationId}/messages`, {
|
|
1700
1706
|
method: "POST",
|
|
1701
|
-
|
|
1702
|
-
|
|
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
|
-
|
|
1728
|
+
const podId = this.requirePodId(options.pod_id);
|
|
1729
|
+
return this.http.stream(`/pods/${podId}/conversations/${conversationId}/stream`, {
|
|
1714
1730
|
params: {
|
|
1715
|
-
|
|
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
|
-
|
|
1725
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: {
|
|
@@ -2675,19 +2758,27 @@ exports.IconsService = IconsService;
|
|
|
2675
2758
|
"use strict";
|
|
2676
2759
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2677
2760
|
exports.IntegrationsNamespace = void 0;
|
|
2761
|
+
const AgentToolsService_js_1 = require("./openapi_client/services/AgentToolsService.js");
|
|
2678
2762
|
const ApplicationsService_js_1 = require("./openapi_client/services/ApplicationsService.js");
|
|
2679
2763
|
const IntegrationsService_js_1 = require("./openapi_client/services/IntegrationsService.js");
|
|
2680
2764
|
class IntegrationsNamespace {
|
|
2681
2765
|
constructor(client) {
|
|
2682
2766
|
this.client = client;
|
|
2683
2767
|
this.operations = {
|
|
2684
|
-
|
|
2768
|
+
discover: (applicationId, options = {}) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationDiscover(applicationId, options.query, options.limit ?? 100)),
|
|
2769
|
+
list: async (applicationId, options = {}) => {
|
|
2770
|
+
const response = await this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationDiscover(applicationId, options.query, options.limit ?? 100));
|
|
2771
|
+
return response.items ?? [];
|
|
2772
|
+
},
|
|
2685
2773
|
get: (applicationId, operationName) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationDetail(applicationId, operationName)),
|
|
2774
|
+
details: (applicationId, operationNames) => {
|
|
2775
|
+
const body = { operation_names: operationNames };
|
|
2776
|
+
return this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationDetailsBatch(applicationId, body));
|
|
2777
|
+
},
|
|
2686
2778
|
execute: (applicationId, operationName, payload, accountId) => {
|
|
2687
2779
|
const body = { payload, account_id: accountId };
|
|
2688
2780
|
return this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationExecute(applicationId, operationName, body));
|
|
2689
2781
|
},
|
|
2690
|
-
descriptor: (applicationId) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationDescriptor(applicationId)),
|
|
2691
2782
|
};
|
|
2692
2783
|
this.triggers = {
|
|
2693
2784
|
list: (options = {}) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationTriggerList(options.applicationId, options.search, options.limit ?? 100, options.pageToken)),
|
|
@@ -2706,6 +2797,13 @@ class IntegrationsNamespace {
|
|
|
2706
2797
|
get(applicationId) {
|
|
2707
2798
|
return this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationGet(applicationId));
|
|
2708
2799
|
}
|
|
2800
|
+
helperAgent(goal, appNames) {
|
|
2801
|
+
const body = {
|
|
2802
|
+
app_names: appNames,
|
|
2803
|
+
goal,
|
|
2804
|
+
};
|
|
2805
|
+
return this.client.request(() => AgentToolsService_js_1.AgentToolsService.agentToolIntegrationHelperAgent(body));
|
|
2806
|
+
}
|
|
2709
2807
|
createConnectRequest(applicationId) {
|
|
2710
2808
|
const payload = { application_id: applicationId };
|
|
2711
2809
|
return this.client.request(() => IntegrationsService_js_1.IntegrationsService.integrationConnectRequestCreate(payload));
|
|
@@ -2713,6 +2811,89 @@ class IntegrationsNamespace {
|
|
|
2713
2811
|
}
|
|
2714
2812
|
exports.IntegrationsNamespace = IntegrationsNamespace;
|
|
2715
2813
|
|
|
2814
|
+
},
|
|
2815
|
+
"./openapi_client/services/AgentToolsService.js": function (module, exports, require) {
|
|
2816
|
+
"use strict";
|
|
2817
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2818
|
+
exports.AgentToolsService = void 0;
|
|
2819
|
+
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
2820
|
+
const request_js_1 = require("./openapi_client/core/request.js");
|
|
2821
|
+
class AgentToolsService {
|
|
2822
|
+
/**
|
|
2823
|
+
* Agent Integration Helper Agent
|
|
2824
|
+
* Plan how to use one or more integration applications for a goal and return recommended operations.
|
|
2825
|
+
* @param requestBody
|
|
2826
|
+
* @returns IntegrationHelperAgentResponse Successful Response
|
|
2827
|
+
* @throws ApiError
|
|
2828
|
+
*/
|
|
2829
|
+
static agentToolIntegrationHelperAgent(requestBody) {
|
|
2830
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2831
|
+
method: 'POST',
|
|
2832
|
+
url: '/tools/integration-helper-agent',
|
|
2833
|
+
body: requestBody,
|
|
2834
|
+
mediaType: 'application/json',
|
|
2835
|
+
errors: {
|
|
2836
|
+
422: `Validation Error`,
|
|
2837
|
+
},
|
|
2838
|
+
});
|
|
2839
|
+
}
|
|
2840
|
+
/**
|
|
2841
|
+
* Agent Report Feedback
|
|
2842
|
+
* Record a maintainer-facing feedback report about system issues, skill issues, incorrect knowledge, or other unexpected behavior.
|
|
2843
|
+
* @param requestBody
|
|
2844
|
+
* @returns ReportFeedbackResponse Successful Response
|
|
2845
|
+
* @throws ApiError
|
|
2846
|
+
*/
|
|
2847
|
+
static agentToolReportFeedback(requestBody) {
|
|
2848
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2849
|
+
method: 'POST',
|
|
2850
|
+
url: '/tools/report-feedback',
|
|
2851
|
+
body: requestBody,
|
|
2852
|
+
mediaType: 'application/json',
|
|
2853
|
+
errors: {
|
|
2854
|
+
422: `Validation Error`,
|
|
2855
|
+
},
|
|
2856
|
+
});
|
|
2857
|
+
}
|
|
2858
|
+
/**
|
|
2859
|
+
* Agent Web Search
|
|
2860
|
+
* Run a raw web search and return structured results.
|
|
2861
|
+
* @param requestBody
|
|
2862
|
+
* @returns WebSearchResponse Successful Response
|
|
2863
|
+
* @throws ApiError
|
|
2864
|
+
*/
|
|
2865
|
+
static agentToolWebSearch(requestBody) {
|
|
2866
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2867
|
+
method: 'POST',
|
|
2868
|
+
url: '/tools/web-search',
|
|
2869
|
+
body: requestBody,
|
|
2870
|
+
mediaType: 'application/json',
|
|
2871
|
+
errors: {
|
|
2872
|
+
422: `Validation Error`,
|
|
2873
|
+
},
|
|
2874
|
+
});
|
|
2875
|
+
}
|
|
2876
|
+
/**
|
|
2877
|
+
* Agent Web Search Agent
|
|
2878
|
+
* Run the multi-step web search agent and return a synthesized answer.
|
|
2879
|
+
* @param requestBody
|
|
2880
|
+
* @returns WebSearchAgentResponse Successful Response
|
|
2881
|
+
* @throws ApiError
|
|
2882
|
+
*/
|
|
2883
|
+
static agentToolWebSearchAgent(requestBody) {
|
|
2884
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2885
|
+
method: 'POST',
|
|
2886
|
+
url: '/tools/web-search-agent',
|
|
2887
|
+
body: requestBody,
|
|
2888
|
+
mediaType: 'application/json',
|
|
2889
|
+
errors: {
|
|
2890
|
+
422: `Validation Error`,
|
|
2891
|
+
},
|
|
2892
|
+
});
|
|
2893
|
+
}
|
|
2894
|
+
}
|
|
2895
|
+
exports.AgentToolsService = AgentToolsService;
|
|
2896
|
+
|
|
2716
2897
|
},
|
|
2717
2898
|
"./openapi_client/services/ApplicationsService.js": function (module, exports, require) {
|
|
2718
2899
|
"use strict";
|
|
@@ -2806,15 +2987,14 @@ class ApplicationsService {
|
|
|
2806
2987
|
});
|
|
2807
2988
|
}
|
|
2808
2989
|
/**
|
|
2809
|
-
*
|
|
2990
|
+
* Discover Application Operations
|
|
2810
2991
|
* @param applicationId
|
|
2811
2992
|
* @param query
|
|
2812
2993
|
* @param limit
|
|
2813
|
-
* @
|
|
2814
|
-
* @returns OperationListResponse Successful Response
|
|
2994
|
+
* @returns OperationDiscoverResponse Successful Response
|
|
2815
2995
|
* @throws ApiError
|
|
2816
2996
|
*/
|
|
2817
|
-
static
|
|
2997
|
+
static applicationOperationDiscover(applicationId, query, limit = 100) {
|
|
2818
2998
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2819
2999
|
method: 'GET',
|
|
2820
3000
|
url: '/integrations/applications/{application_id}/operations',
|
|
@@ -2824,7 +3004,6 @@ class ApplicationsService {
|
|
|
2824
3004
|
query: {
|
|
2825
3005
|
'query': query,
|
|
2826
3006
|
'limit': limit,
|
|
2827
|
-
'page_token': pageToken,
|
|
2828
3007
|
},
|
|
2829
3008
|
errors: {
|
|
2830
3009
|
422: `Validation Error`,
|
|
@@ -2832,18 +3011,21 @@ class ApplicationsService {
|
|
|
2832
3011
|
});
|
|
2833
3012
|
}
|
|
2834
3013
|
/**
|
|
2835
|
-
* Get Application
|
|
3014
|
+
* Get Application Operation Details In Batch
|
|
2836
3015
|
* @param applicationId
|
|
2837
|
-
* @
|
|
3016
|
+
* @param requestBody
|
|
3017
|
+
* @returns OperationDetailsBatchResponse Successful Response
|
|
2838
3018
|
* @throws ApiError
|
|
2839
3019
|
*/
|
|
2840
|
-
static
|
|
3020
|
+
static applicationOperationDetailsBatch(applicationId, requestBody) {
|
|
2841
3021
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2842
|
-
method: '
|
|
2843
|
-
url: '/integrations/applications/{application_id}/operations/
|
|
3022
|
+
method: 'POST',
|
|
3023
|
+
url: '/integrations/applications/{application_id}/operations/details',
|
|
2844
3024
|
path: {
|
|
2845
3025
|
'application_id': applicationId,
|
|
2846
3026
|
},
|
|
3027
|
+
body: requestBody,
|
|
3028
|
+
mediaType: 'application/json',
|
|
2847
3029
|
errors: {
|
|
2848
3030
|
422: `Validation Error`,
|
|
2849
3031
|
},
|
|
@@ -3005,15 +3187,17 @@ class IntegrationsService {
|
|
|
3005
3187
|
* OAuth Callback
|
|
3006
3188
|
* Handle OAuth callback and complete account connection. This endpoint is public and uses state parameter for security.
|
|
3007
3189
|
* @param error
|
|
3008
|
-
* @
|
|
3190
|
+
* @param format
|
|
3191
|
+
* @returns string Successful Response
|
|
3009
3192
|
* @throws ApiError
|
|
3010
3193
|
*/
|
|
3011
|
-
static integrationOauthCallback(error) {
|
|
3194
|
+
static integrationOauthCallback(error, format) {
|
|
3012
3195
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3013
3196
|
method: 'GET',
|
|
3014
3197
|
url: '/integrations/connect-requests/oauth/callback',
|
|
3015
3198
|
query: {
|
|
3016
3199
|
'error': error,
|
|
3200
|
+
'format': format,
|
|
3017
3201
|
},
|
|
3018
3202
|
errors: {
|
|
3019
3203
|
422: `Validation Error`,
|
|
@@ -3207,6 +3391,46 @@ class OrganizationsService {
|
|
|
3207
3391
|
},
|
|
3208
3392
|
});
|
|
3209
3393
|
}
|
|
3394
|
+
/**
|
|
3395
|
+
* Check Organization Slug Availability
|
|
3396
|
+
* Check whether an organization slug is available
|
|
3397
|
+
* @param slug
|
|
3398
|
+
* @returns OrganizationSlugAvailabilityResponse Successful Response
|
|
3399
|
+
* @throws ApiError
|
|
3400
|
+
*/
|
|
3401
|
+
static orgSlugAvailability(slug) {
|
|
3402
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3403
|
+
method: 'GET',
|
|
3404
|
+
url: '/organizations/slug-availability',
|
|
3405
|
+
query: {
|
|
3406
|
+
'slug': slug,
|
|
3407
|
+
},
|
|
3408
|
+
errors: {
|
|
3409
|
+
422: `Validation Error`,
|
|
3410
|
+
},
|
|
3411
|
+
});
|
|
3412
|
+
}
|
|
3413
|
+
/**
|
|
3414
|
+
* Get Suggested Organizations
|
|
3415
|
+
* Get auto-join organizations matching the current user's email domain
|
|
3416
|
+
* @param limit
|
|
3417
|
+
* @param pageToken
|
|
3418
|
+
* @returns OrganizationListResponse Successful Response
|
|
3419
|
+
* @throws ApiError
|
|
3420
|
+
*/
|
|
3421
|
+
static orgSuggested(limit = 100, pageToken) {
|
|
3422
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3423
|
+
method: 'GET',
|
|
3424
|
+
url: '/organizations/suggested',
|
|
3425
|
+
query: {
|
|
3426
|
+
'limit': limit,
|
|
3427
|
+
'page_token': pageToken,
|
|
3428
|
+
},
|
|
3429
|
+
errors: {
|
|
3430
|
+
422: `Validation Error`,
|
|
3431
|
+
},
|
|
3432
|
+
});
|
|
3433
|
+
}
|
|
3210
3434
|
/**
|
|
3211
3435
|
* Get Organization
|
|
3212
3436
|
* Get organization details
|
|
@@ -3873,46 +4097,46 @@ exports.PodsService = PodsService;
|
|
|
3873
4097
|
"use strict";
|
|
3874
4098
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3875
4099
|
exports.PodSurfacesNamespace = void 0;
|
|
3876
|
-
const
|
|
4100
|
+
const AgentSurfacesService_js_1 = require("./openapi_client/services/AgentSurfacesService.js");
|
|
3877
4101
|
class PodSurfacesNamespace {
|
|
3878
4102
|
constructor(client) {
|
|
3879
4103
|
this.client = client;
|
|
3880
4104
|
}
|
|
3881
4105
|
list(podId, options = {}) {
|
|
3882
|
-
return this.client.request(() =>
|
|
4106
|
+
return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceList(podId, options.limit ?? 100, options.pageToken ?? options.cursor));
|
|
3883
4107
|
}
|
|
3884
4108
|
create(podId, payload) {
|
|
3885
|
-
return this.client.request(() =>
|
|
4109
|
+
return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceCreate(podId, payload));
|
|
3886
4110
|
}
|
|
3887
4111
|
get(podId, surfaceId) {
|
|
3888
|
-
return this.client.request(() =>
|
|
4112
|
+
return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceGet(podId, surfaceId));
|
|
3889
4113
|
}
|
|
3890
4114
|
updateConfig(podId, surfaceId, payload) {
|
|
3891
|
-
return this.client.request(() =>
|
|
4115
|
+
return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceUpdate(podId, surfaceId, payload));
|
|
3892
4116
|
}
|
|
3893
4117
|
toggle(podId, surfaceId, isActive) {
|
|
3894
|
-
return this.client.request(() =>
|
|
4118
|
+
return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceToggle(podId, surfaceId, { is_active: isActive }));
|
|
3895
4119
|
}
|
|
3896
4120
|
}
|
|
3897
4121
|
exports.PodSurfacesNamespace = PodSurfacesNamespace;
|
|
3898
4122
|
|
|
3899
4123
|
},
|
|
3900
|
-
"./openapi_client/services/
|
|
4124
|
+
"./openapi_client/services/AgentSurfacesService.js": function (module, exports, require) {
|
|
3901
4125
|
"use strict";
|
|
3902
4126
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3903
|
-
exports.
|
|
4127
|
+
exports.AgentSurfacesService = void 0;
|
|
3904
4128
|
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
3905
4129
|
const request_js_1 = require("./openapi_client/core/request.js");
|
|
3906
|
-
class
|
|
4130
|
+
class AgentSurfacesService {
|
|
3907
4131
|
/**
|
|
3908
4132
|
* List Surfaces
|
|
3909
4133
|
* @param podId
|
|
3910
4134
|
* @param limit
|
|
3911
4135
|
* @param pageToken
|
|
3912
|
-
* @returns
|
|
4136
|
+
* @returns AgentSurfaceListResponse Successful Response
|
|
3913
4137
|
* @throws ApiError
|
|
3914
4138
|
*/
|
|
3915
|
-
static
|
|
4139
|
+
static agentSurfaceList(podId, limit = 100, pageToken) {
|
|
3916
4140
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3917
4141
|
method: 'GET',
|
|
3918
4142
|
url: '/pods/{pod_id}/surfaces',
|
|
@@ -3935,7 +4159,7 @@ class AssistantSurfacesService {
|
|
|
3935
4159
|
* @returns any Successful Response
|
|
3936
4160
|
* @throws ApiError
|
|
3937
4161
|
*/
|
|
3938
|
-
static
|
|
4162
|
+
static agentSurfaceCreate(podId, requestBody) {
|
|
3939
4163
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3940
4164
|
method: 'POST',
|
|
3941
4165
|
url: '/pods/{pod_id}/surfaces',
|
|
@@ -3956,7 +4180,7 @@ class AssistantSurfacesService {
|
|
|
3956
4180
|
* @returns SurfacePlatformSetupGuideResponse Successful Response
|
|
3957
4181
|
* @throws ApiError
|
|
3958
4182
|
*/
|
|
3959
|
-
static
|
|
4183
|
+
static agentSurfacePlatformChecklist(podId, platform) {
|
|
3960
4184
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3961
4185
|
method: 'GET',
|
|
3962
4186
|
url: '/pods/{pod_id}/surfaces/platforms/{platform}/checklist',
|
|
@@ -3976,7 +4200,7 @@ class AssistantSurfacesService {
|
|
|
3976
4200
|
* @returns any Successful Response
|
|
3977
4201
|
* @throws ApiError
|
|
3978
4202
|
*/
|
|
3979
|
-
static
|
|
4203
|
+
static agentSurfaceGet(podId, surfaceId) {
|
|
3980
4204
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
3981
4205
|
method: 'GET',
|
|
3982
4206
|
url: '/pods/{pod_id}/surfaces/{surface_id}',
|
|
@@ -3997,7 +4221,7 @@ class AssistantSurfacesService {
|
|
|
3997
4221
|
* @returns any Successful Response
|
|
3998
4222
|
* @throws ApiError
|
|
3999
4223
|
*/
|
|
4000
|
-
static
|
|
4224
|
+
static agentSurfaceUpdate(podId, surfaceId, requestBody) {
|
|
4001
4225
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4002
4226
|
method: 'PATCH',
|
|
4003
4227
|
url: '/pods/{pod_id}/surfaces/{surface_id}',
|
|
@@ -4019,7 +4243,7 @@ class AssistantSurfacesService {
|
|
|
4019
4243
|
* @returns AdminConsentInfoResponse Successful Response
|
|
4020
4244
|
* @throws ApiError
|
|
4021
4245
|
*/
|
|
4022
|
-
static
|
|
4246
|
+
static agentSurfaceAdminConsentInfo(podId, surfaceId) {
|
|
4023
4247
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4024
4248
|
method: 'GET',
|
|
4025
4249
|
url: '/pods/{pod_id}/surfaces/{surface_id}/admin-consent',
|
|
@@ -4040,7 +4264,7 @@ class AssistantSurfacesService {
|
|
|
4040
4264
|
* @returns any Successful Response
|
|
4041
4265
|
* @throws ApiError
|
|
4042
4266
|
*/
|
|
4043
|
-
static
|
|
4267
|
+
static agentSurfaceToggle(podId, surfaceId, requestBody) {
|
|
4044
4268
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4045
4269
|
method: 'PATCH',
|
|
4046
4270
|
url: '/pods/{pod_id}/surfaces/{surface_id}/toggle',
|
|
@@ -4062,7 +4286,7 @@ class AssistantSurfacesService {
|
|
|
4062
4286
|
* @returns any Successful Response
|
|
4063
4287
|
* @throws ApiError
|
|
4064
4288
|
*/
|
|
4065
|
-
static
|
|
4289
|
+
static agentSurfaceWebhookUrl(podId, surfaceId) {
|
|
4066
4290
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4067
4291
|
method: 'GET',
|
|
4068
4292
|
url: '/pods/{pod_id}/surfaces/{surface_id}/webhook-url',
|
|
@@ -4076,7 +4300,7 @@ class AssistantSurfacesService {
|
|
|
4076
4300
|
});
|
|
4077
4301
|
}
|
|
4078
4302
|
}
|
|
4079
|
-
exports.
|
|
4303
|
+
exports.AgentSurfacesService = AgentSurfacesService;
|
|
4080
4304
|
|
|
4081
4305
|
},
|
|
4082
4306
|
"./namespaces/records.js": function (module, exports, require) {
|
|
@@ -4642,46 +4866,88 @@ exports.TablesService = TablesService;
|
|
|
4642
4866
|
"use strict";
|
|
4643
4867
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4644
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
|
+
}
|
|
4645
4894
|
class TasksNamespace {
|
|
4646
4895
|
constructor(http, podId) {
|
|
4647
4896
|
this.http = http;
|
|
4648
4897
|
this.podId = podId;
|
|
4649
4898
|
this.messages = {
|
|
4650
|
-
list: (taskId, options = {}) => this.http.request("GET", `/pods/${this.podId()}/
|
|
4899
|
+
list: (taskId, options = {}) => this.http.request("GET", `/pods/${this.podId()}/conversations/${taskId}/messages`, {
|
|
4651
4900
|
params: {
|
|
4652
4901
|
limit: options.limit ?? 100,
|
|
4653
|
-
|
|
4902
|
+
after_sequence: options.page_token,
|
|
4654
4903
|
},
|
|
4655
|
-
})
|
|
4904
|
+
}).then((response) => ({
|
|
4905
|
+
...response,
|
|
4906
|
+
items: normalizeMessages(response.items ?? []),
|
|
4907
|
+
})),
|
|
4656
4908
|
add: (taskId, payload) => {
|
|
4657
|
-
return this.http.request("POST", `/pods/${this.podId()}/
|
|
4909
|
+
return this.http.request("POST", `/pods/${this.podId()}/conversations/${taskId}/messages`, {
|
|
4658
4910
|
body: payload,
|
|
4659
|
-
});
|
|
4911
|
+
}).then(() => this.get(taskId));
|
|
4660
4912
|
},
|
|
4661
4913
|
};
|
|
4662
4914
|
}
|
|
4663
4915
|
list(options = {}) {
|
|
4664
|
-
return this.http.request("GET", `/pods/${this.podId()}/
|
|
4916
|
+
return this.http.request("GET", `/pods/${this.podId()}/conversations`, {
|
|
4665
4917
|
params: {
|
|
4666
4918
|
agent_name: options.agent_name,
|
|
4667
4919
|
limit: options.limit ?? 100,
|
|
4668
4920
|
page_token: options.page_token,
|
|
4669
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
|
+
};
|
|
4670
4930
|
});
|
|
4671
4931
|
}
|
|
4672
4932
|
create(payload) {
|
|
4673
|
-
return this.http.request("POST", `/pods/${this.podId()}/
|
|
4674
|
-
body:
|
|
4675
|
-
|
|
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));
|
|
4676
4939
|
}
|
|
4677
4940
|
get(taskId) {
|
|
4678
|
-
return this.http.request("GET", `/pods/${this.podId()}/
|
|
4941
|
+
return this.http.request("GET", `/pods/${this.podId()}/conversations/${taskId}`)
|
|
4942
|
+
.then((conversation) => toTask(normalizeConversation(conversation)));
|
|
4679
4943
|
}
|
|
4680
4944
|
stop(taskId) {
|
|
4681
|
-
return this.http.request("
|
|
4945
|
+
return this.http.request("POST", `/pods/${this.podId()}/conversations/${taskId}/stop`, {
|
|
4946
|
+
body: {},
|
|
4947
|
+
}).then((conversation) => toTask(normalizeConversation(conversation)));
|
|
4682
4948
|
}
|
|
4683
4949
|
stream(taskId, options = {}) {
|
|
4684
|
-
return this.http.stream(`/pods/${this.podId()}/
|
|
4950
|
+
return this.http.stream(`/pods/${this.podId()}/conversations/${taskId}/stream`, {
|
|
4685
4951
|
signal: options.signal,
|
|
4686
4952
|
headers: {
|
|
4687
4953
|
Accept: "text/event-stream",
|
|
@@ -5091,6 +5357,27 @@ class WorkflowsService {
|
|
|
5091
5357
|
},
|
|
5092
5358
|
});
|
|
5093
5359
|
}
|
|
5360
|
+
/**
|
|
5361
|
+
* List Workflow Installs
|
|
5362
|
+
* List workflow installations visible to the current user. `GLOBAL` workflows return the pod-level install; `USER` workflows return the current user's install.
|
|
5363
|
+
* @param podId
|
|
5364
|
+
* @param workflowName
|
|
5365
|
+
* @returns WorkflowInstallListResponse Successful Response
|
|
5366
|
+
* @throws ApiError
|
|
5367
|
+
*/
|
|
5368
|
+
static workflowInstallList(podId, workflowName) {
|
|
5369
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
5370
|
+
method: 'GET',
|
|
5371
|
+
url: '/pods/{pod_id}/workflows/{workflow_name}/installs',
|
|
5372
|
+
path: {
|
|
5373
|
+
'pod_id': podId,
|
|
5374
|
+
'workflow_name': workflowName,
|
|
5375
|
+
},
|
|
5376
|
+
errors: {
|
|
5377
|
+
422: `Validation Error`,
|
|
5378
|
+
},
|
|
5379
|
+
});
|
|
5380
|
+
}
|
|
5094
5381
|
/**
|
|
5095
5382
|
* Uninstall Workflow
|
|
5096
5383
|
* Remove a previously created workflow installation binding.
|