lemma-sdk 0.2.36 → 0.2.38
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 +45 -30
- package/dist/browser/lemma-client.js +224 -212
- package/dist/client.d.ts +1 -4
- package/dist/client.js +1 -6
- package/dist/index.d.ts +2 -5
- package/dist/index.js +1 -2
- package/dist/namespaces/agents.js +1 -1
- package/dist/namespaces/conversations.d.ts +68 -0
- package/dist/namespaces/conversations.js +159 -0
- package/dist/namespaces/files.d.ts +24 -6
- package/dist/namespaces/files.js +25 -12
- package/dist/namespaces/integrations.js +1 -1
- package/dist/namespaces/pod-surfaces.d.ts +1 -1
- package/dist/namespaces/pod-surfaces.js +6 -6
- package/dist/openapi_client/index.d.ts +17 -32
- package/dist/openapi_client/index.js +8 -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/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 +10 -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/MessageListResponse.d.ts +6 -0
- package/dist/openapi_client/models/{TaskMessageResponse.d.ts → MessageResponse.d.ts} +8 -7
- package/dist/openapi_client/models/OrganizationInvitationResponse.d.ts +1 -0
- package/dist/openapi_client/models/ReportFeedbackResponse.d.ts +0 -4
- 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/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 +87 -0
- package/dist/openapi_client/services/{ConversationsService.js → AgentConversationsService.js} +61 -72
- 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 +8 -8
- package/dist/openapi_client/services/AgentToolsService.js +8 -8
- package/dist/openapi_client/services/AgentsService.d.ts +7 -7
- package/dist/openapi_client/services/AgentsService.js +8 -8
- package/dist/openapi_client/services/FilesService.d.ts +17 -8
- package/dist/openapi_client/services/FilesService.js +25 -8
- package/dist/openapi_client/services/WorkflowsService.d.ts +1 -1
- package/dist/openapi_client/services/WorkflowsService.js +1 -1
- package/dist/react/index.d.ts +0 -8
- package/dist/react/index.js +0 -4
- package/dist/react/useAssistantController.d.ts +6 -2
- package/dist/react/useAssistantController.js +56 -15
- package/dist/react/useAssistantSession.d.ts +15 -5
- package/dist/react/useAssistantSession.js +24 -26
- 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 -5
- package/dist/run-utils.js +0 -10
- package/dist/types.d.ts +24 -10
- package/package.json +1 -1
- package/dist/namespaces/assistants.d.ts +0 -96
- package/dist/namespaces/assistants.js +0 -160
- package/dist/namespaces/tasks.d.ts +0 -29
- package/dist/namespaces/tasks.js +0 -49
- package/dist/openapi_client/models/AddMessageRequest.d.ts +0 -6
- 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/CreateAssistantRequest.js +0 -1
- package/dist/openapi_client/models/CreateMessageRequest.d.ts +0 -6
- package/dist/openapi_client/models/CreateMessageRequest.js +0 -1
- package/dist/openapi_client/models/CreateTaskRequest.d.ts +0 -10
- package/dist/openapi_client/models/CreateTaskRequest.js +0 -1
- package/dist/openapi_client/models/FileVisibility.d.ts +0 -4
- package/dist/openapi_client/models/FileVisibility.js +0 -9
- package/dist/openapi_client/models/TableAccessEntry.js +0 -1
- package/dist/openapi_client/models/TaskListResponse.d.ts +0 -9
- package/dist/openapi_client/models/TaskListResponse.js +0 -1
- package/dist/openapi_client/models/TaskMessageListResponse.d.ts +0 -9
- package/dist/openapi_client/models/TaskMessageListResponse.js +0 -1
- package/dist/openapi_client/models/TaskMessageResponse.js +0 -1
- 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/TasksService.d.ts +0 -76
- package/dist/openapi_client/services/TasksService.js +0 -167
- package/dist/react/useAgentRun.d.ts +0 -17
- package/dist/react/useAgentRun.js +0 -56
- package/dist/react/useAgentRuns.d.ts +0 -33
- package/dist/react/useAgentRuns.js +0 -149
- package/dist/react/useAssistantRun.d.ts +0 -27
- package/dist/react/useAssistantRun.js +0 -47
- package/dist/react/useTaskSession.d.ts +0 -35
- package/dist/react/useTaskSession.js +0 -269
- package/dist/task-events.d.ts +0 -8
- package/dist/task-events.js +0 -115
- /package/dist/openapi_client/models/{AddMessageRequest.js → AgentSurfaceListResponse.js} +0 -0
- /package/dist/openapi_client/models/{AssistantListResponse.js → AgentSurfaceResponse.js} +0 -0
- /package/dist/openapi_client/models/{AssistantResponse.js → MessageListResponse.js} +0 -0
- /package/dist/openapi_client/models/{AssistantSurfaceListResponse.js → MessageResponse.js} +0 -0
- /package/dist/openapi_client/models/{AssistantSurfaceResponse.js → SendMessageRequest.js} +0 -0
- /package/dist/openapi_client/models/{AvailableModelInfo.js → ToolCallContent.js} +0 -0
- /package/dist/openapi_client/models/{AvailableModelsListResponse.js → ToolReturnContent.js} +0 -0
- /package/dist/openapi_client/models/{ConversationMessageListResponse.js → app__modules__agent__domain__value_objects__TableAccessEntry.js} +0 -0
- /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
|
|
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");
|
|
@@ -52,7 +52,6 @@ const pod_surfaces_js_1 = require("./namespaces/pod-surfaces.js");
|
|
|
52
52
|
const records_js_1 = require("./namespaces/records.js");
|
|
53
53
|
const resources_js_1 = require("./namespaces/resources.js");
|
|
54
54
|
const tables_js_1 = require("./namespaces/tables.js");
|
|
55
|
-
const tasks_js_1 = require("./namespaces/tasks.js");
|
|
56
55
|
const users_js_1 = require("./namespaces/users.js");
|
|
57
56
|
const workflows_js_1 = require("./namespaces/workflows.js");
|
|
58
57
|
const datastore_js_1 = require("./namespaces/datastore.js");
|
|
@@ -75,9 +74,7 @@ class LemmaClient {
|
|
|
75
74
|
this.files = new files_js_1.FilesNamespace(this._generated, this._http, podIdFn);
|
|
76
75
|
this.functions = new functions_js_1.FunctionsNamespace(this._generated, podIdFn);
|
|
77
76
|
this.agents = new agents_js_1.AgentsNamespace(this._generated, podIdFn);
|
|
78
|
-
this.
|
|
79
|
-
this.assistants = new assistants_js_1.AssistantsNamespace(this._http, podIdFn);
|
|
80
|
-
this.conversations = new assistants_js_1.ConversationsNamespace(this._http, podIdFn);
|
|
77
|
+
this.conversations = new conversations_js_1.ConversationsNamespace(this._http, podIdFn);
|
|
81
78
|
this.workflows = new workflows_js_1.WorkflowsNamespace(this._generated, this._http, podIdFn);
|
|
82
79
|
this.desks = new desks_js_1.DesksNamespace(this._generated, this._http, podIdFn);
|
|
83
80
|
this.integrations = new integrations_js_1.IntegrationsNamespace(this._generated);
|
|
@@ -1010,7 +1007,7 @@ class AgentsNamespace {
|
|
|
1010
1007
|
this.podId = podId;
|
|
1011
1008
|
}
|
|
1012
1009
|
list(options = {}) {
|
|
1013
|
-
return this.client.request(() => AgentsService_js_1.AgentsService.agentList(this.podId(), options.limit ?? 100
|
|
1010
|
+
return this.client.request(() => AgentsService_js_1.AgentsService.agentList(this.podId(), options.pageToken, options.limit ?? 100));
|
|
1014
1011
|
}
|
|
1015
1012
|
create(payload) {
|
|
1016
1013
|
return this.client.request(() => AgentsService_js_1.AgentsService.agentCreate(this.podId(), payload));
|
|
@@ -1037,14 +1034,14 @@ const request_js_1 = require("./openapi_client/core/request.js");
|
|
|
1037
1034
|
class AgentsService {
|
|
1038
1035
|
/**
|
|
1039
1036
|
* List Agents
|
|
1040
|
-
* List
|
|
1037
|
+
* List pod-owned agent definitions visible to the current user.
|
|
1041
1038
|
* @param podId
|
|
1042
|
-
* @param limit
|
|
1043
1039
|
* @param pageToken
|
|
1040
|
+
* @param limit
|
|
1044
1041
|
* @returns AgentListResponse Successful Response
|
|
1045
1042
|
* @throws ApiError
|
|
1046
1043
|
*/
|
|
1047
|
-
static agentList(podId, limit = 100
|
|
1044
|
+
static agentList(podId, pageToken, limit = 100) {
|
|
1048
1045
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
1049
1046
|
method: 'GET',
|
|
1050
1047
|
url: '/pods/{pod_id}/agents',
|
|
@@ -1052,8 +1049,8 @@ class AgentsService {
|
|
|
1052
1049
|
'pod_id': podId,
|
|
1053
1050
|
},
|
|
1054
1051
|
query: {
|
|
1055
|
-
'limit': limit,
|
|
1056
1052
|
'page_token': pageToken,
|
|
1053
|
+
'limit': limit,
|
|
1057
1054
|
},
|
|
1058
1055
|
errors: {
|
|
1059
1056
|
422: `Validation Error`,
|
|
@@ -1062,7 +1059,7 @@ class AgentsService {
|
|
|
1062
1059
|
}
|
|
1063
1060
|
/**
|
|
1064
1061
|
* Create Agent
|
|
1065
|
-
* Create a
|
|
1062
|
+
* Create a pod-owned agent definition with model, harness, toolsets, resource access grants, callable functions, and callable child agents.
|
|
1066
1063
|
* @param podId
|
|
1067
1064
|
* @param requestBody
|
|
1068
1065
|
* @returns AgentResponse Successful Response
|
|
@@ -1084,7 +1081,7 @@ class AgentsService {
|
|
|
1084
1081
|
}
|
|
1085
1082
|
/**
|
|
1086
1083
|
* Delete Agent
|
|
1087
|
-
* Delete
|
|
1084
|
+
* Delete a pod-owned agent definition by name.
|
|
1088
1085
|
* @param podId
|
|
1089
1086
|
* @param agentName
|
|
1090
1087
|
* @returns AgentMessageResponse Successful Response
|
|
@@ -1105,7 +1102,7 @@ class AgentsService {
|
|
|
1105
1102
|
}
|
|
1106
1103
|
/**
|
|
1107
1104
|
* Get Agent
|
|
1108
|
-
* Get
|
|
1105
|
+
* Get one pod-owned agent definition by its stable name.
|
|
1109
1106
|
* @param podId
|
|
1110
1107
|
* @param agentName
|
|
1111
1108
|
* @returns AgentResponse Successful Response
|
|
@@ -1126,7 +1123,7 @@ class AgentsService {
|
|
|
1126
1123
|
}
|
|
1127
1124
|
/**
|
|
1128
1125
|
* Update Agent
|
|
1129
|
-
* Update an agent
|
|
1126
|
+
* Update an agent definition, including prompt instruction, model, toolsets, schemas, and resource/tool grants.
|
|
1130
1127
|
* @param podId
|
|
1131
1128
|
* @param agentName
|
|
1132
1129
|
* @param requestBody
|
|
@@ -1568,57 +1565,63 @@ class CancelablePromise {
|
|
|
1568
1565
|
exports.CancelablePromise = CancelablePromise;
|
|
1569
1566
|
|
|
1570
1567
|
},
|
|
1571
|
-
"./namespaces/
|
|
1568
|
+
"./namespaces/conversations.js": function (module, exports, require) {
|
|
1572
1569
|
"use strict";
|
|
1573
1570
|
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
|
-
}
|
|
1571
|
+
exports.ConversationsNamespace = void 0;
|
|
1572
|
+
const AgentModelName_js_1 = require("./openapi_client/models/AgentModelName.js");
|
|
1573
|
+
function normalizeConversation(conversation) {
|
|
1574
|
+
if (!conversation)
|
|
1575
|
+
return conversation;
|
|
1576
|
+
const record = conversation;
|
|
1577
|
+
return {
|
|
1578
|
+
...record,
|
|
1579
|
+
model: record.model ?? record.model_name ?? null,
|
|
1580
|
+
status: record.status ?? "waiting",
|
|
1581
|
+
};
|
|
1582
|
+
}
|
|
1583
|
+
function normalizeConversationList(response) {
|
|
1584
|
+
const items = (response.items ?? []).map((conversation) => normalizeConversation(conversation));
|
|
1585
|
+
return {
|
|
1586
|
+
...response,
|
|
1587
|
+
items,
|
|
1588
|
+
};
|
|
1589
|
+
}
|
|
1590
|
+
function normalizeMessage(message) {
|
|
1591
|
+
return message;
|
|
1592
|
+
}
|
|
1593
|
+
function buildModelList() {
|
|
1594
|
+
return Object.values(AgentModelName_js_1.AgentModelName).map((model) => ({
|
|
1595
|
+
id: model,
|
|
1596
|
+
name: model,
|
|
1597
|
+
}));
|
|
1602
1598
|
}
|
|
1603
|
-
exports.AssistantsNamespace = AssistantsNamespace;
|
|
1604
1599
|
class ConversationsNamespace {
|
|
1605
1600
|
constructor(http, podId) {
|
|
1606
1601
|
this.http = http;
|
|
1607
1602
|
this.podId = podId;
|
|
1608
1603
|
this.messages = {
|
|
1609
|
-
list: (conversationId, options = {}) =>
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
|
-
|
|
1604
|
+
list: (conversationId, options = {}) => {
|
|
1605
|
+
const podId = this.requirePodId(options.pod_id);
|
|
1606
|
+
const parsedPageToken = typeof options.page_token === "string" && options.page_token.trim().length > 0
|
|
1607
|
+
? Number(options.page_token)
|
|
1608
|
+
: null;
|
|
1609
|
+
return this.http.request("GET", `/pods/${podId}/conversations/${conversationId}/messages`, {
|
|
1610
|
+
params: {
|
|
1611
|
+
after_sequence: options.after_sequence ?? (Number.isFinite(parsedPageToken) ? parsedPageToken : undefined),
|
|
1612
|
+
limit: options.limit ?? 100,
|
|
1613
|
+
},
|
|
1614
|
+
}).then((response) => ({
|
|
1615
|
+
...response,
|
|
1616
|
+
items: (response.items ?? []).map(normalizeMessage),
|
|
1617
|
+
}));
|
|
1618
|
+
},
|
|
1619
|
+
send: (conversationId, payload, options = {}) => {
|
|
1620
|
+
const podId = this.requirePodId(options.pod_id);
|
|
1621
|
+
return this.http.request("POST", `/pods/${podId}/conversations/${conversationId}/messages`, {
|
|
1622
|
+
body: payload,
|
|
1623
|
+
});
|
|
1624
|
+
},
|
|
1622
1625
|
};
|
|
1623
1626
|
}
|
|
1624
1627
|
resolvePodId(explicitPodId) {
|
|
@@ -1640,67 +1643,65 @@ class ConversationsNamespace {
|
|
|
1640
1643
|
return podId;
|
|
1641
1644
|
}
|
|
1642
1645
|
list(options = {}) {
|
|
1643
|
-
|
|
1646
|
+
const podId = this.requirePodId(options.pod_id);
|
|
1647
|
+
return this.http.request("GET", `/pods/${podId}/conversations`, {
|
|
1644
1648
|
params: {
|
|
1645
|
-
|
|
1646
|
-
pod_id: this.resolvePodId(options.pod_id),
|
|
1647
|
-
organization_id: options.organization_id,
|
|
1648
|
-
global_only: options.global_only ?? false,
|
|
1649
|
+
agent_name: options.agent_name,
|
|
1649
1650
|
limit: options.limit ?? 20,
|
|
1650
1651
|
page_token: options.page_token,
|
|
1651
1652
|
},
|
|
1652
|
-
});
|
|
1653
|
-
}
|
|
1654
|
-
listByAssistant(assistantName, options = {}) {
|
|
1655
|
-
return this.list({ ...options, assistant_name: assistantName });
|
|
1653
|
+
}).then(normalizeConversationList);
|
|
1656
1654
|
}
|
|
1657
|
-
|
|
1658
|
-
return this.
|
|
1655
|
+
listByAgent(agentName, options = {}) {
|
|
1656
|
+
return this.list({ ...options, agent_name: agentName });
|
|
1659
1657
|
}
|
|
1660
|
-
listModels() {
|
|
1661
|
-
|
|
1658
|
+
async listModels() {
|
|
1659
|
+
const items = buildModelList();
|
|
1660
|
+
return {
|
|
1661
|
+
items,
|
|
1662
|
+
limit: items.length,
|
|
1663
|
+
next_page_token: null,
|
|
1664
|
+
};
|
|
1662
1665
|
}
|
|
1663
|
-
create(payload) {
|
|
1664
|
-
const
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1666
|
+
create(payload = {}) {
|
|
1667
|
+
const podId = this.requirePodId(payload.pod_id);
|
|
1668
|
+
const { agent_name, model, model_name, pod_id, ...requestBody } = payload;
|
|
1669
|
+
const body = {
|
|
1670
|
+
...requestBody,
|
|
1671
|
+
agent_name: agent_name ?? undefined,
|
|
1672
|
+
model_name: model_name ?? model,
|
|
1673
|
+
};
|
|
1674
|
+
void pod_id;
|
|
1675
|
+
return this.http.request("POST", `/pods/${podId}/conversations`, {
|
|
1676
|
+
body,
|
|
1677
|
+
}).then(normalizeConversation);
|
|
1672
1678
|
}
|
|
1673
|
-
|
|
1679
|
+
createForAgent(agentName, payload = {}) {
|
|
1674
1680
|
return this.create({
|
|
1675
1681
|
...payload,
|
|
1676
|
-
|
|
1682
|
+
agent_name: agentName,
|
|
1677
1683
|
});
|
|
1678
1684
|
}
|
|
1679
1685
|
get(conversationId, options = {}) {
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
},
|
|
1684
|
-
});
|
|
1686
|
+
const podId = this.requirePodId(options.pod_id);
|
|
1687
|
+
return this.http.request("GET", `/pods/${podId}/conversations/${conversationId}`)
|
|
1688
|
+
.then(normalizeConversation);
|
|
1685
1689
|
}
|
|
1686
1690
|
update(conversationId, payload, options = {}) {
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
return this.http.request("DELETE", `/pods/${scopedPodId}/conversations/${conversationId}`);
|
|
1691
|
+
const podId = this.requirePodId(options.pod_id);
|
|
1692
|
+
const { model, model_name, ...requestBody } = payload;
|
|
1693
|
+
const body = {
|
|
1694
|
+
...requestBody,
|
|
1695
|
+
model_name: model_name ?? model,
|
|
1696
|
+
};
|
|
1697
|
+
return this.http.request("PATCH", `/pods/${podId}/conversations/${conversationId}`, {
|
|
1698
|
+
body,
|
|
1699
|
+
}).then(normalizeConversation);
|
|
1697
1700
|
}
|
|
1698
1701
|
sendMessageStream(conversationId, payload, options = {}) {
|
|
1699
|
-
|
|
1702
|
+
const podId = this.requirePodId(options.pod_id);
|
|
1703
|
+
return this.http.stream(`/pods/${podId}/conversations/${conversationId}/messages`, {
|
|
1700
1704
|
method: "POST",
|
|
1701
|
-
params: {
|
|
1702
|
-
pod_id: this.resolvePodId(options.pod_id),
|
|
1703
|
-
},
|
|
1704
1705
|
body: payload,
|
|
1705
1706
|
signal: options.signal,
|
|
1706
1707
|
headers: {
|
|
@@ -1710,10 +1711,8 @@ class ConversationsNamespace {
|
|
|
1710
1711
|
});
|
|
1711
1712
|
}
|
|
1712
1713
|
resumeStream(conversationId, options = {}) {
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
pod_id: this.resolvePodId(options.pod_id),
|
|
1716
|
-
},
|
|
1714
|
+
const podId = this.requirePodId(options.pod_id);
|
|
1715
|
+
return this.http.stream(`/pods/${podId}/conversations/${conversationId}/stream`, {
|
|
1717
1716
|
signal: options.signal,
|
|
1718
1717
|
headers: {
|
|
1719
1718
|
Accept: "text/event-stream",
|
|
@@ -1721,16 +1720,38 @@ class ConversationsNamespace {
|
|
|
1721
1720
|
});
|
|
1722
1721
|
}
|
|
1723
1722
|
stopRun(conversationId, options = {}) {
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
pod_id: this.resolvePodId(options.pod_id),
|
|
1727
|
-
},
|
|
1723
|
+
const podId = this.requirePodId(options.pod_id);
|
|
1724
|
+
return this.http.request("POST", `/pods/${podId}/conversations/${conversationId}/stop`, {
|
|
1728
1725
|
body: {},
|
|
1729
|
-
});
|
|
1726
|
+
}).then(normalizeConversation);
|
|
1730
1727
|
}
|
|
1731
1728
|
}
|
|
1732
1729
|
exports.ConversationsNamespace = ConversationsNamespace;
|
|
1733
1730
|
|
|
1731
|
+
},
|
|
1732
|
+
"./openapi_client/models/AgentModelName.js": function (module, exports, require) {
|
|
1733
|
+
"use strict";
|
|
1734
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1735
|
+
exports.AgentModelName = void 0;
|
|
1736
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
1737
|
+
/* istanbul ignore file */
|
|
1738
|
+
/* tslint:disable */
|
|
1739
|
+
/* eslint-disable */
|
|
1740
|
+
/**
|
|
1741
|
+
* Models that can be selected for an agent conversation.
|
|
1742
|
+
*/
|
|
1743
|
+
var AgentModelName;
|
|
1744
|
+
(function (AgentModelName) {
|
|
1745
|
+
AgentModelName["GEMINI_PRO"] = "GEMINI_PRO";
|
|
1746
|
+
AgentModelName["GEMINI_FLASH"] = "GEMINI_FLASH";
|
|
1747
|
+
AgentModelName["GEMINI_FLASH_LITE"] = "GEMINI_FLASH_LITE";
|
|
1748
|
+
AgentModelName["KIMI_K2"] = "KIMI_K2";
|
|
1749
|
+
AgentModelName["GPT_OSS"] = "GPT_OSS";
|
|
1750
|
+
AgentModelName["DEEPSEEK_V32"] = "DEEPSEEK_V32";
|
|
1751
|
+
AgentModelName["GLM_5"] = "GLM_5";
|
|
1752
|
+
AgentModelName["QWEN3_6"] = "QWEN3_6";
|
|
1753
|
+
})(AgentModelName || (exports.AgentModelName = AgentModelName = {}));
|
|
1754
|
+
|
|
1734
1755
|
},
|
|
1735
1756
|
"./namespaces/desks.js": function (module, exports, require) {
|
|
1736
1757
|
"use strict";
|
|
@@ -1960,6 +1981,7 @@ exports.DesksService = DesksService;
|
|
|
1960
1981
|
"use strict";
|
|
1961
1982
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1962
1983
|
exports.FilesNamespace = void 0;
|
|
1984
|
+
const FileNamespace_js_1 = require("./openapi_client/models/FileNamespace.js");
|
|
1963
1985
|
const SearchMethod_js_1 = require("./openapi_client/models/SearchMethod.js");
|
|
1964
1986
|
const FilesService_js_1 = require("./openapi_client/services/FilesService.js");
|
|
1965
1987
|
function joinDatastorePath(basePath, leaf) {
|
|
@@ -1991,6 +2013,13 @@ function getBaseName(path) {
|
|
|
1991
2013
|
}
|
|
1992
2014
|
return normalized.slice(index + 1);
|
|
1993
2015
|
}
|
|
2016
|
+
function normalizeFileNamespace(namespace) {
|
|
2017
|
+
const normalized = String(namespace ?? "").trim().toUpperCase();
|
|
2018
|
+
if (normalized === FileNamespace_js_1.FileNamespace.PERSONAL || normalized === "PRIVATE") {
|
|
2019
|
+
return FileNamespace_js_1.FileNamespace.PERSONAL;
|
|
2020
|
+
}
|
|
2021
|
+
return FileNamespace_js_1.FileNamespace.POD;
|
|
2022
|
+
}
|
|
1994
2023
|
class FilesNamespace {
|
|
1995
2024
|
constructor(client, http, podId) {
|
|
1996
2025
|
this.client = client;
|
|
@@ -2001,29 +2030,31 @@ class FilesNamespace {
|
|
|
2001
2030
|
const payload = {
|
|
2002
2031
|
path: joinDatastorePath(options.directoryPath ?? options.parentId, name),
|
|
2003
2032
|
description: options.description,
|
|
2033
|
+
namespace: normalizeFileNamespace(options.namespace),
|
|
2004
2034
|
};
|
|
2005
2035
|
return this.client.request(() => FilesService_js_1.FilesService.fileFolderCreate(this.podId(), payload));
|
|
2006
2036
|
},
|
|
2007
2037
|
};
|
|
2008
2038
|
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") => {
|
|
2039
|
+
get: (path, options = {}) => this.client.request(() => FilesService_js_1.FilesService.fileConvertedGet(this.podId(), path, normalizeFileNamespace(options.namespace))),
|
|
2040
|
+
render: (path, options = {}) => this.client.request(() => FilesService_js_1.FilesService.fileConvertedRender(this.podId(), path, normalizeFileNamespace(options.namespace))),
|
|
2041
|
+
download: (path, artifact = "document.md", options = {}) => {
|
|
2012
2042
|
const encodedPath = encodeURIComponent(path);
|
|
2013
2043
|
const encodedArtifact = encodeURIComponent(artifact);
|
|
2014
|
-
|
|
2044
|
+
const encodedNamespace = encodeURIComponent(normalizeFileNamespace(options.namespace));
|
|
2045
|
+
return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/converted/download?path=${encodedPath}&artifact=${encodedArtifact}&namespace=${encodedNamespace}`);
|
|
2015
2046
|
},
|
|
2016
2047
|
};
|
|
2017
2048
|
}
|
|
2018
2049
|
list(options = {}) {
|
|
2019
2050
|
const directoryPath = options.directoryPath ?? options.parentId ?? "/";
|
|
2020
|
-
return this.client.request(() => FilesService_js_1.FilesService.fileList(this.podId(), directoryPath, options.limit ?? 100, options.pageToken));
|
|
2051
|
+
return this.client.request(() => FilesService_js_1.FilesService.fileList(this.podId(), directoryPath, normalizeFileNamespace(options.namespace), options.limit ?? 100, options.pageToken));
|
|
2021
2052
|
}
|
|
2022
|
-
get(path) {
|
|
2023
|
-
return this.client.request(() => FilesService_js_1.FilesService.fileGet(this.podId(), path));
|
|
2053
|
+
get(path, options = {}) {
|
|
2054
|
+
return this.client.request(() => FilesService_js_1.FilesService.fileGet(this.podId(), path, normalizeFileNamespace(options.namespace)));
|
|
2024
2055
|
}
|
|
2025
|
-
delete(path) {
|
|
2026
|
-
return this.client.request(() => FilesService_js_1.FilesService.fileDelete(this.podId(), path));
|
|
2056
|
+
delete(path, options = {}) {
|
|
2057
|
+
return this.client.request(() => FilesService_js_1.FilesService.fileDelete(this.podId(), path, normalizeFileNamespace(options.namespace)));
|
|
2027
2058
|
}
|
|
2028
2059
|
search(query, options = {}) {
|
|
2029
2060
|
return this.client.request(() => FilesService_js_1.FilesService.fileSearch(this.podId(), {
|
|
@@ -2032,12 +2063,13 @@ class FilesNamespace {
|
|
|
2032
2063
|
search_method: options.searchMethod ?? SearchMethod_js_1.SearchMethod.HYBRID,
|
|
2033
2064
|
}));
|
|
2034
2065
|
}
|
|
2035
|
-
download(path) {
|
|
2066
|
+
download(path, options = {}) {
|
|
2036
2067
|
const encodedPath = encodeURIComponent(path);
|
|
2037
|
-
|
|
2068
|
+
const encodedNamespace = encodeURIComponent(normalizeFileNamespace(options.namespace));
|
|
2069
|
+
return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/download?path=${encodedPath}&namespace=${encodedNamespace}`);
|
|
2038
2070
|
}
|
|
2039
2071
|
tree(options = {}) {
|
|
2040
|
-
return this.client.request(() => FilesService_js_1.FilesService.fileTree(this.podId(), options.rootPath ?? "/", options.filesPerDirectory ?? 3));
|
|
2072
|
+
return this.client.request(() => FilesService_js_1.FilesService.fileTree(this.podId(), options.rootPath ?? "/", normalizeFileNamespace(options.namespace), options.filesPerDirectory ?? 3));
|
|
2041
2073
|
}
|
|
2042
2074
|
upload(file, options = {}) {
|
|
2043
2075
|
const payload = {
|
|
@@ -2046,6 +2078,7 @@ class FilesNamespace {
|
|
|
2046
2078
|
description: options.description,
|
|
2047
2079
|
directory_path: options.directoryPath ?? options.parentId ?? "/",
|
|
2048
2080
|
search_enabled: options.searchEnabled ?? true,
|
|
2081
|
+
namespace: normalizeFileNamespace(options.namespace),
|
|
2049
2082
|
};
|
|
2050
2083
|
return this.client.request(() => FilesService_js_1.FilesService.fileUpload(this.podId(), payload));
|
|
2051
2084
|
}
|
|
@@ -2064,12 +2097,28 @@ class FilesNamespace {
|
|
|
2064
2097
|
description: options.description,
|
|
2065
2098
|
new_path: resolvedNewPath,
|
|
2066
2099
|
search_enabled: options.searchEnabled,
|
|
2100
|
+
namespace: normalizeFileNamespace(options.namespace),
|
|
2067
2101
|
};
|
|
2068
2102
|
return this.client.request(() => FilesService_js_1.FilesService.fileUpdate(this.podId(), payload));
|
|
2069
2103
|
}
|
|
2070
2104
|
}
|
|
2071
2105
|
exports.FilesNamespace = FilesNamespace;
|
|
2072
2106
|
|
|
2107
|
+
},
|
|
2108
|
+
"./openapi_client/models/FileNamespace.js": function (module, exports, require) {
|
|
2109
|
+
"use strict";
|
|
2110
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2111
|
+
exports.FileNamespace = void 0;
|
|
2112
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2113
|
+
/* istanbul ignore file */
|
|
2114
|
+
/* tslint:disable */
|
|
2115
|
+
/* eslint-disable */
|
|
2116
|
+
var FileNamespace;
|
|
2117
|
+
(function (FileNamespace) {
|
|
2118
|
+
FileNamespace["PERSONAL"] = "PERSONAL";
|
|
2119
|
+
FileNamespace["POD"] = "POD";
|
|
2120
|
+
})(FileNamespace || (exports.FileNamespace = FileNamespace = {}));
|
|
2121
|
+
|
|
2073
2122
|
},
|
|
2074
2123
|
"./openapi_client/models/SearchMethod.js": function (module, exports, require) {
|
|
2075
2124
|
"use strict";
|
|
@@ -2091,6 +2140,7 @@ var SearchMethod;
|
|
|
2091
2140
|
"use strict";
|
|
2092
2141
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2093
2142
|
exports.FilesService = void 0;
|
|
2143
|
+
const FileNamespace_js_1 = require("./openapi_client/models/FileNamespace.js");
|
|
2094
2144
|
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
2095
2145
|
const request_js_1 = require("./openapi_client/core/request.js");
|
|
2096
2146
|
class FilesService {
|
|
@@ -2098,12 +2148,13 @@ class FilesService {
|
|
|
2098
2148
|
* List Files
|
|
2099
2149
|
* @param podId
|
|
2100
2150
|
* @param directoryPath
|
|
2151
|
+
* @param namespace
|
|
2101
2152
|
* @param limit
|
|
2102
2153
|
* @param pageToken
|
|
2103
2154
|
* @returns FileListResponse Successful Response
|
|
2104
2155
|
* @throws ApiError
|
|
2105
2156
|
*/
|
|
2106
|
-
static fileList(podId, directoryPath = '/', limit = 100, pageToken) {
|
|
2157
|
+
static fileList(podId, directoryPath = '/', namespace = FileNamespace_js_1.FileNamespace.PERSONAL, limit = 100, pageToken) {
|
|
2107
2158
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2108
2159
|
method: 'GET',
|
|
2109
2160
|
url: '/pods/{pod_id}/datastore/files',
|
|
@@ -2112,6 +2163,7 @@ class FilesService {
|
|
|
2112
2163
|
},
|
|
2113
2164
|
query: {
|
|
2114
2165
|
'directory_path': directoryPath,
|
|
2166
|
+
'namespace': namespace,
|
|
2115
2167
|
'limit': limit,
|
|
2116
2168
|
'page_token': pageToken,
|
|
2117
2169
|
},
|
|
@@ -2145,10 +2197,11 @@ class FilesService {
|
|
|
2145
2197
|
* Delete File Or Folder
|
|
2146
2198
|
* @param podId
|
|
2147
2199
|
* @param path
|
|
2200
|
+
* @param namespace
|
|
2148
2201
|
* @returns DatastoreMessageResponse Successful Response
|
|
2149
2202
|
* @throws ApiError
|
|
2150
2203
|
*/
|
|
2151
|
-
static fileDelete(podId, path) {
|
|
2204
|
+
static fileDelete(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
|
|
2152
2205
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2153
2206
|
method: 'DELETE',
|
|
2154
2207
|
url: '/pods/{pod_id}/datastore/files/by-path',
|
|
@@ -2157,6 +2210,7 @@ class FilesService {
|
|
|
2157
2210
|
},
|
|
2158
2211
|
query: {
|
|
2159
2212
|
'path': path,
|
|
2213
|
+
'namespace': namespace,
|
|
2160
2214
|
},
|
|
2161
2215
|
errors: {
|
|
2162
2216
|
422: `Validation Error`,
|
|
@@ -2167,10 +2221,11 @@ class FilesService {
|
|
|
2167
2221
|
* Get File
|
|
2168
2222
|
* @param podId
|
|
2169
2223
|
* @param path
|
|
2224
|
+
* @param namespace
|
|
2170
2225
|
* @returns FileResponse Successful Response
|
|
2171
2226
|
* @throws ApiError
|
|
2172
2227
|
*/
|
|
2173
|
-
static fileGet(podId, path) {
|
|
2228
|
+
static fileGet(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
|
|
2174
2229
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2175
2230
|
method: 'GET',
|
|
2176
2231
|
url: '/pods/{pod_id}/datastore/files/by-path',
|
|
@@ -2179,6 +2234,7 @@ class FilesService {
|
|
|
2179
2234
|
},
|
|
2180
2235
|
query: {
|
|
2181
2236
|
'path': path,
|
|
2237
|
+
'namespace': namespace,
|
|
2182
2238
|
},
|
|
2183
2239
|
errors: {
|
|
2184
2240
|
422: `Validation Error`,
|
|
@@ -2210,10 +2266,11 @@ class FilesService {
|
|
|
2210
2266
|
* Get Converted File Metadata
|
|
2211
2267
|
* @param podId
|
|
2212
2268
|
* @param path
|
|
2269
|
+
* @param namespace
|
|
2213
2270
|
* @returns ConvertedFileResponse Successful Response
|
|
2214
2271
|
* @throws ApiError
|
|
2215
2272
|
*/
|
|
2216
|
-
static fileConvertedGet(podId, path) {
|
|
2273
|
+
static fileConvertedGet(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
|
|
2217
2274
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2218
2275
|
method: 'GET',
|
|
2219
2276
|
url: '/pods/{pod_id}/datastore/files/converted/by-path',
|
|
@@ -2222,6 +2279,7 @@ class FilesService {
|
|
|
2222
2279
|
},
|
|
2223
2280
|
query: {
|
|
2224
2281
|
'path': path,
|
|
2282
|
+
'namespace': namespace,
|
|
2225
2283
|
},
|
|
2226
2284
|
errors: {
|
|
2227
2285
|
422: `Validation Error`,
|
|
@@ -2233,10 +2291,11 @@ class FilesService {
|
|
|
2233
2291
|
* @param podId
|
|
2234
2292
|
* @param path
|
|
2235
2293
|
* @param artifact
|
|
2294
|
+
* @param namespace
|
|
2236
2295
|
* @returns any Successful Response
|
|
2237
2296
|
* @throws ApiError
|
|
2238
2297
|
*/
|
|
2239
|
-
static fileConvertedDownload(podId, path, artifact = 'document.md') {
|
|
2298
|
+
static fileConvertedDownload(podId, path, artifact = 'document.md', namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
|
|
2240
2299
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2241
2300
|
method: 'GET',
|
|
2242
2301
|
url: '/pods/{pod_id}/datastore/files/converted/download',
|
|
@@ -2246,6 +2305,7 @@ class FilesService {
|
|
|
2246
2305
|
query: {
|
|
2247
2306
|
'path': path,
|
|
2248
2307
|
'artifact': artifact,
|
|
2308
|
+
'namespace': namespace,
|
|
2249
2309
|
},
|
|
2250
2310
|
errors: {
|
|
2251
2311
|
422: `Validation Error`,
|
|
@@ -2256,10 +2316,11 @@ class FilesService {
|
|
|
2256
2316
|
* Render Converted File As HTML
|
|
2257
2317
|
* @param podId
|
|
2258
2318
|
* @param path
|
|
2319
|
+
* @param namespace
|
|
2259
2320
|
* @returns any Successful Response
|
|
2260
2321
|
* @throws ApiError
|
|
2261
2322
|
*/
|
|
2262
|
-
static fileConvertedRender(podId, path) {
|
|
2323
|
+
static fileConvertedRender(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
|
|
2263
2324
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2264
2325
|
method: 'GET',
|
|
2265
2326
|
url: '/pods/{pod_id}/datastore/files/converted/render',
|
|
@@ -2268,6 +2329,7 @@ class FilesService {
|
|
|
2268
2329
|
},
|
|
2269
2330
|
query: {
|
|
2270
2331
|
'path': path,
|
|
2332
|
+
'namespace': namespace,
|
|
2271
2333
|
},
|
|
2272
2334
|
errors: {
|
|
2273
2335
|
422: `Validation Error`,
|
|
@@ -2278,10 +2340,11 @@ class FilesService {
|
|
|
2278
2340
|
* Download File
|
|
2279
2341
|
* @param podId
|
|
2280
2342
|
* @param path
|
|
2343
|
+
* @param namespace
|
|
2281
2344
|
* @returns any Successful Response
|
|
2282
2345
|
* @throws ApiError
|
|
2283
2346
|
*/
|
|
2284
|
-
static fileDownload(podId, path) {
|
|
2347
|
+
static fileDownload(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
|
|
2285
2348
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2286
2349
|
method: 'GET',
|
|
2287
2350
|
url: '/pods/{pod_id}/datastore/files/download',
|
|
@@ -2290,6 +2353,7 @@ class FilesService {
|
|
|
2290
2353
|
},
|
|
2291
2354
|
query: {
|
|
2292
2355
|
'path': path,
|
|
2356
|
+
'namespace': namespace,
|
|
2293
2357
|
},
|
|
2294
2358
|
errors: {
|
|
2295
2359
|
422: `Validation Error`,
|
|
@@ -2342,11 +2406,12 @@ class FilesService {
|
|
|
2342
2406
|
* Get Directory Tree
|
|
2343
2407
|
* @param podId
|
|
2344
2408
|
* @param rootPath
|
|
2409
|
+
* @param namespace
|
|
2345
2410
|
* @param filesPerDirectory
|
|
2346
2411
|
* @returns DirectoryTreeResponse Successful Response
|
|
2347
2412
|
* @throws ApiError
|
|
2348
2413
|
*/
|
|
2349
|
-
static fileTree(podId, rootPath = '/', filesPerDirectory = 3) {
|
|
2414
|
+
static fileTree(podId, rootPath = '/', namespace = FileNamespace_js_1.FileNamespace.PERSONAL, filesPerDirectory = 3) {
|
|
2350
2415
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2351
2416
|
method: 'GET',
|
|
2352
2417
|
url: '/pods/{pod_id}/datastore/files/tree',
|
|
@@ -2355,6 +2420,7 @@ class FilesService {
|
|
|
2355
2420
|
},
|
|
2356
2421
|
query: {
|
|
2357
2422
|
'root_path': rootPath,
|
|
2423
|
+
'namespace': namespace,
|
|
2358
2424
|
'files_per_directory': filesPerDirectory,
|
|
2359
2425
|
},
|
|
2360
2426
|
errors: {
|
|
@@ -2719,7 +2785,7 @@ class IntegrationsNamespace {
|
|
|
2719
2785
|
app_names: appNames,
|
|
2720
2786
|
goal,
|
|
2721
2787
|
};
|
|
2722
|
-
return this.client.request(() => AgentToolsService_js_1.AgentToolsService.
|
|
2788
|
+
return this.client.request(() => AgentToolsService_js_1.AgentToolsService.agentToolIntegrationHelperAgent(body));
|
|
2723
2789
|
}
|
|
2724
2790
|
createConnectRequest(applicationId) {
|
|
2725
2791
|
const payload = { application_id: applicationId };
|
|
@@ -2737,13 +2803,13 @@ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
|
2737
2803
|
const request_js_1 = require("./openapi_client/core/request.js");
|
|
2738
2804
|
class AgentToolsService {
|
|
2739
2805
|
/**
|
|
2740
|
-
* Integration Helper Agent
|
|
2806
|
+
* Agent Integration Helper Agent
|
|
2741
2807
|
* Plan how to use one or more integration applications for a goal and return recommended operations.
|
|
2742
2808
|
* @param requestBody
|
|
2743
2809
|
* @returns IntegrationHelperAgentResponse Successful Response
|
|
2744
2810
|
* @throws ApiError
|
|
2745
2811
|
*/
|
|
2746
|
-
static
|
|
2812
|
+
static agentToolIntegrationHelperAgent(requestBody) {
|
|
2747
2813
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2748
2814
|
method: 'POST',
|
|
2749
2815
|
url: '/tools/integration-helper-agent',
|
|
@@ -2755,13 +2821,13 @@ class AgentToolsService {
|
|
|
2755
2821
|
});
|
|
2756
2822
|
}
|
|
2757
2823
|
/**
|
|
2758
|
-
* Report Feedback
|
|
2824
|
+
* Agent Report Feedback
|
|
2759
2825
|
* Record a maintainer-facing feedback report about system issues, skill issues, incorrect knowledge, or other unexpected behavior.
|
|
2760
2826
|
* @param requestBody
|
|
2761
2827
|
* @returns ReportFeedbackResponse Successful Response
|
|
2762
2828
|
* @throws ApiError
|
|
2763
2829
|
*/
|
|
2764
|
-
static
|
|
2830
|
+
static agentToolReportFeedback(requestBody) {
|
|
2765
2831
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2766
2832
|
method: 'POST',
|
|
2767
2833
|
url: '/tools/report-feedback',
|
|
@@ -2773,13 +2839,13 @@ class AgentToolsService {
|
|
|
2773
2839
|
});
|
|
2774
2840
|
}
|
|
2775
2841
|
/**
|
|
2776
|
-
* Web Search
|
|
2842
|
+
* Agent Web Search
|
|
2777
2843
|
* Run a raw web search and return structured results.
|
|
2778
2844
|
* @param requestBody
|
|
2779
2845
|
* @returns WebSearchResponse Successful Response
|
|
2780
2846
|
* @throws ApiError
|
|
2781
2847
|
*/
|
|
2782
|
-
static
|
|
2848
|
+
static agentToolWebSearch(requestBody) {
|
|
2783
2849
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2784
2850
|
method: 'POST',
|
|
2785
2851
|
url: '/tools/web-search',
|
|
@@ -2791,13 +2857,13 @@ class AgentToolsService {
|
|
|
2791
2857
|
});
|
|
2792
2858
|
}
|
|
2793
2859
|
/**
|
|
2794
|
-
* Web Search Agent
|
|
2860
|
+
* Agent Web Search Agent
|
|
2795
2861
|
* Run the multi-step web search agent and return a synthesized answer.
|
|
2796
2862
|
* @param requestBody
|
|
2797
2863
|
* @returns WebSearchAgentResponse Successful Response
|
|
2798
2864
|
* @throws ApiError
|
|
2799
2865
|
*/
|
|
2800
|
-
static
|
|
2866
|
+
static agentToolWebSearchAgent(requestBody) {
|
|
2801
2867
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
2802
2868
|
method: 'POST',
|
|
2803
2869
|
url: '/tools/web-search-agent',
|
|
@@ -4014,46 +4080,46 @@ exports.PodsService = PodsService;
|
|
|
4014
4080
|
"use strict";
|
|
4015
4081
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4016
4082
|
exports.PodSurfacesNamespace = void 0;
|
|
4017
|
-
const
|
|
4083
|
+
const AgentSurfacesService_js_1 = require("./openapi_client/services/AgentSurfacesService.js");
|
|
4018
4084
|
class PodSurfacesNamespace {
|
|
4019
4085
|
constructor(client) {
|
|
4020
4086
|
this.client = client;
|
|
4021
4087
|
}
|
|
4022
4088
|
list(podId, options = {}) {
|
|
4023
|
-
return this.client.request(() =>
|
|
4089
|
+
return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceList(podId, options.limit ?? 100, options.pageToken ?? options.cursor));
|
|
4024
4090
|
}
|
|
4025
4091
|
create(podId, payload) {
|
|
4026
|
-
return this.client.request(() =>
|
|
4092
|
+
return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceCreate(podId, payload));
|
|
4027
4093
|
}
|
|
4028
4094
|
get(podId, surfaceId) {
|
|
4029
|
-
return this.client.request(() =>
|
|
4095
|
+
return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceGet(podId, surfaceId));
|
|
4030
4096
|
}
|
|
4031
4097
|
updateConfig(podId, surfaceId, payload) {
|
|
4032
|
-
return this.client.request(() =>
|
|
4098
|
+
return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceUpdate(podId, surfaceId, payload));
|
|
4033
4099
|
}
|
|
4034
4100
|
toggle(podId, surfaceId, isActive) {
|
|
4035
|
-
return this.client.request(() =>
|
|
4101
|
+
return this.client.request(() => AgentSurfacesService_js_1.AgentSurfacesService.agentSurfaceToggle(podId, surfaceId, { is_active: isActive }));
|
|
4036
4102
|
}
|
|
4037
4103
|
}
|
|
4038
4104
|
exports.PodSurfacesNamespace = PodSurfacesNamespace;
|
|
4039
4105
|
|
|
4040
4106
|
},
|
|
4041
|
-
"./openapi_client/services/
|
|
4107
|
+
"./openapi_client/services/AgentSurfacesService.js": function (module, exports, require) {
|
|
4042
4108
|
"use strict";
|
|
4043
4109
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4044
|
-
exports.
|
|
4110
|
+
exports.AgentSurfacesService = void 0;
|
|
4045
4111
|
const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
|
|
4046
4112
|
const request_js_1 = require("./openapi_client/core/request.js");
|
|
4047
|
-
class
|
|
4113
|
+
class AgentSurfacesService {
|
|
4048
4114
|
/**
|
|
4049
4115
|
* List Surfaces
|
|
4050
4116
|
* @param podId
|
|
4051
4117
|
* @param limit
|
|
4052
4118
|
* @param pageToken
|
|
4053
|
-
* @returns
|
|
4119
|
+
* @returns AgentSurfaceListResponse Successful Response
|
|
4054
4120
|
* @throws ApiError
|
|
4055
4121
|
*/
|
|
4056
|
-
static
|
|
4122
|
+
static agentSurfaceList(podId, limit = 100, pageToken) {
|
|
4057
4123
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4058
4124
|
method: 'GET',
|
|
4059
4125
|
url: '/pods/{pod_id}/surfaces',
|
|
@@ -4076,7 +4142,7 @@ class AssistantSurfacesService {
|
|
|
4076
4142
|
* @returns any Successful Response
|
|
4077
4143
|
* @throws ApiError
|
|
4078
4144
|
*/
|
|
4079
|
-
static
|
|
4145
|
+
static agentSurfaceCreate(podId, requestBody) {
|
|
4080
4146
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4081
4147
|
method: 'POST',
|
|
4082
4148
|
url: '/pods/{pod_id}/surfaces',
|
|
@@ -4097,7 +4163,7 @@ class AssistantSurfacesService {
|
|
|
4097
4163
|
* @returns SurfacePlatformSetupGuideResponse Successful Response
|
|
4098
4164
|
* @throws ApiError
|
|
4099
4165
|
*/
|
|
4100
|
-
static
|
|
4166
|
+
static agentSurfacePlatformChecklist(podId, platform) {
|
|
4101
4167
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4102
4168
|
method: 'GET',
|
|
4103
4169
|
url: '/pods/{pod_id}/surfaces/platforms/{platform}/checklist',
|
|
@@ -4117,7 +4183,7 @@ class AssistantSurfacesService {
|
|
|
4117
4183
|
* @returns any Successful Response
|
|
4118
4184
|
* @throws ApiError
|
|
4119
4185
|
*/
|
|
4120
|
-
static
|
|
4186
|
+
static agentSurfaceGet(podId, surfaceId) {
|
|
4121
4187
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4122
4188
|
method: 'GET',
|
|
4123
4189
|
url: '/pods/{pod_id}/surfaces/{surface_id}',
|
|
@@ -4138,7 +4204,7 @@ class AssistantSurfacesService {
|
|
|
4138
4204
|
* @returns any Successful Response
|
|
4139
4205
|
* @throws ApiError
|
|
4140
4206
|
*/
|
|
4141
|
-
static
|
|
4207
|
+
static agentSurfaceUpdate(podId, surfaceId, requestBody) {
|
|
4142
4208
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4143
4209
|
method: 'PATCH',
|
|
4144
4210
|
url: '/pods/{pod_id}/surfaces/{surface_id}',
|
|
@@ -4160,7 +4226,7 @@ class AssistantSurfacesService {
|
|
|
4160
4226
|
* @returns AdminConsentInfoResponse Successful Response
|
|
4161
4227
|
* @throws ApiError
|
|
4162
4228
|
*/
|
|
4163
|
-
static
|
|
4229
|
+
static agentSurfaceAdminConsentInfo(podId, surfaceId) {
|
|
4164
4230
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4165
4231
|
method: 'GET',
|
|
4166
4232
|
url: '/pods/{pod_id}/surfaces/{surface_id}/admin-consent',
|
|
@@ -4181,7 +4247,7 @@ class AssistantSurfacesService {
|
|
|
4181
4247
|
* @returns any Successful Response
|
|
4182
4248
|
* @throws ApiError
|
|
4183
4249
|
*/
|
|
4184
|
-
static
|
|
4250
|
+
static agentSurfaceToggle(podId, surfaceId, requestBody) {
|
|
4185
4251
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4186
4252
|
method: 'PATCH',
|
|
4187
4253
|
url: '/pods/{pod_id}/surfaces/{surface_id}/toggle',
|
|
@@ -4203,7 +4269,7 @@ class AssistantSurfacesService {
|
|
|
4203
4269
|
* @returns any Successful Response
|
|
4204
4270
|
* @throws ApiError
|
|
4205
4271
|
*/
|
|
4206
|
-
static
|
|
4272
|
+
static agentSurfaceWebhookUrl(podId, surfaceId) {
|
|
4207
4273
|
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
4208
4274
|
method: 'GET',
|
|
4209
4275
|
url: '/pods/{pod_id}/surfaces/{surface_id}/webhook-url',
|
|
@@ -4217,7 +4283,7 @@ class AssistantSurfacesService {
|
|
|
4217
4283
|
});
|
|
4218
4284
|
}
|
|
4219
4285
|
}
|
|
4220
|
-
exports.
|
|
4286
|
+
exports.AgentSurfacesService = AgentSurfacesService;
|
|
4221
4287
|
|
|
4222
4288
|
},
|
|
4223
4289
|
"./namespaces/records.js": function (module, exports, require) {
|
|
@@ -4778,60 +4844,6 @@ class TablesService {
|
|
|
4778
4844
|
}
|
|
4779
4845
|
exports.TablesService = TablesService;
|
|
4780
4846
|
|
|
4781
|
-
},
|
|
4782
|
-
"./namespaces/tasks.js": function (module, exports, require) {
|
|
4783
|
-
"use strict";
|
|
4784
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4785
|
-
exports.TasksNamespace = void 0;
|
|
4786
|
-
class TasksNamespace {
|
|
4787
|
-
constructor(http, podId) {
|
|
4788
|
-
this.http = http;
|
|
4789
|
-
this.podId = podId;
|
|
4790
|
-
this.messages = {
|
|
4791
|
-
list: (taskId, options = {}) => this.http.request("GET", `/pods/${this.podId()}/tasks/${taskId}/messages`, {
|
|
4792
|
-
params: {
|
|
4793
|
-
limit: options.limit ?? 100,
|
|
4794
|
-
page_token: options.page_token,
|
|
4795
|
-
},
|
|
4796
|
-
}),
|
|
4797
|
-
add: (taskId, payload) => {
|
|
4798
|
-
return this.http.request("POST", `/pods/${this.podId()}/tasks/${taskId}/messages`, {
|
|
4799
|
-
body: payload,
|
|
4800
|
-
});
|
|
4801
|
-
},
|
|
4802
|
-
};
|
|
4803
|
-
}
|
|
4804
|
-
list(options = {}) {
|
|
4805
|
-
return this.http.request("GET", `/pods/${this.podId()}/tasks`, {
|
|
4806
|
-
params: {
|
|
4807
|
-
agent_name: options.agent_name,
|
|
4808
|
-
limit: options.limit ?? 100,
|
|
4809
|
-
page_token: options.page_token,
|
|
4810
|
-
},
|
|
4811
|
-
});
|
|
4812
|
-
}
|
|
4813
|
-
create(payload) {
|
|
4814
|
-
return this.http.request("POST", `/pods/${this.podId()}/tasks`, {
|
|
4815
|
-
body: payload,
|
|
4816
|
-
});
|
|
4817
|
-
}
|
|
4818
|
-
get(taskId) {
|
|
4819
|
-
return this.http.request("GET", `/pods/${this.podId()}/tasks/${taskId}`);
|
|
4820
|
-
}
|
|
4821
|
-
stop(taskId) {
|
|
4822
|
-
return this.http.request("PATCH", `/pods/${this.podId()}/tasks/${taskId}/stop`);
|
|
4823
|
-
}
|
|
4824
|
-
stream(taskId, options = {}) {
|
|
4825
|
-
return this.http.stream(`/pods/${this.podId()}/tasks/${taskId}/stream`, {
|
|
4826
|
-
signal: options.signal,
|
|
4827
|
-
headers: {
|
|
4828
|
-
Accept: "text/event-stream",
|
|
4829
|
-
},
|
|
4830
|
-
});
|
|
4831
|
-
}
|
|
4832
|
-
}
|
|
4833
|
-
exports.TasksNamespace = TasksNamespace;
|
|
4834
|
-
|
|
4835
4847
|
},
|
|
4836
4848
|
"./namespaces/users.js": function (module, exports, require) {
|
|
4837
4849
|
"use strict";
|
|
@@ -5234,7 +5246,7 @@ class WorkflowsService {
|
|
|
5234
5246
|
}
|
|
5235
5247
|
/**
|
|
5236
5248
|
* List Workflow Installs
|
|
5237
|
-
* List the current user
|
|
5249
|
+
* List workflow installations visible to the current user. `GLOBAL` workflows return the pod-level install; `USER` workflows return the current user's install.
|
|
5238
5250
|
* @param podId
|
|
5239
5251
|
* @param workflowName
|
|
5240
5252
|
* @returns WorkflowInstallListResponse Successful Response
|