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
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type LemmaConfig } from "./config.js";
|
|
2
2
|
import { AuthManager, type AuthState, type AuthListener } from "./auth.js";
|
|
3
3
|
import { AgentsNamespace } from "./namespaces/agents.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ConversationsNamespace } from "./namespaces/conversations.js";
|
|
5
5
|
import { DesksNamespace } from "./namespaces/desks.js";
|
|
6
6
|
import { FilesNamespace } from "./namespaces/files.js";
|
|
7
7
|
import { FunctionsNamespace } from "./namespaces/functions.js";
|
|
@@ -39,7 +39,6 @@ export declare class LemmaClient {
|
|
|
39
39
|
readonly functions: FunctionsNamespace;
|
|
40
40
|
readonly agents: AgentsNamespace;
|
|
41
41
|
readonly tasks: TasksNamespace;
|
|
42
|
-
readonly assistants: AssistantsNamespace;
|
|
43
42
|
readonly conversations: ConversationsNamespace;
|
|
44
43
|
readonly workflows: WorkflowsNamespace;
|
|
45
44
|
readonly desks: DesksNamespace;
|
package/dist/client.js
CHANGED
|
@@ -3,7 +3,7 @@ import { AuthManager } from "./auth.js";
|
|
|
3
3
|
import { GeneratedClientAdapter } from "./generated.js";
|
|
4
4
|
import { HttpClient } from "./http.js";
|
|
5
5
|
import { AgentsNamespace } from "./namespaces/agents.js";
|
|
6
|
-
import {
|
|
6
|
+
import { ConversationsNamespace } from "./namespaces/conversations.js";
|
|
7
7
|
import { DesksNamespace } from "./namespaces/desks.js";
|
|
8
8
|
import { FilesNamespace } from "./namespaces/files.js";
|
|
9
9
|
import { FunctionsNamespace } from "./namespaces/functions.js";
|
|
@@ -37,7 +37,6 @@ export class LemmaClient {
|
|
|
37
37
|
functions;
|
|
38
38
|
agents;
|
|
39
39
|
tasks;
|
|
40
|
-
assistants;
|
|
41
40
|
conversations;
|
|
42
41
|
workflows;
|
|
43
42
|
desks;
|
|
@@ -70,7 +69,6 @@ export class LemmaClient {
|
|
|
70
69
|
this.functions = new FunctionsNamespace(this._generated, podIdFn);
|
|
71
70
|
this.agents = new AgentsNamespace(this._generated, podIdFn);
|
|
72
71
|
this.tasks = new TasksNamespace(this._http, podIdFn);
|
|
73
|
-
this.assistants = new AssistantsNamespace(this._http, podIdFn);
|
|
74
72
|
this.conversations = new ConversationsNamespace(this._http, podIdFn);
|
|
75
73
|
this.workflows = new WorkflowsNamespace(this._generated, this._http, podIdFn);
|
|
76
74
|
this.desks = new DesksNamespace(this._generated, this._http, podIdFn);
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export { buildJoinedRecordsQuery, parseForeignKeyReference, } from "./datastore-
|
|
|
22
22
|
export type { ForeignKeyReference, JoinedRecordsColumnRef, JoinedRecordsFilter, JoinedRecordsJoin, JoinedRecordsJoinCondition, JoinedRecordsOrderBy, JoinedRecordsQueryDefinition, JoinedRecordsSelectField, JoinedRecordsSource, } from "./datastore-query.js";
|
|
23
23
|
export type { AgentsNamespace } from "./namespaces/agents.js";
|
|
24
24
|
export type { DatastoreNamespace } from "./namespaces/datastore.js";
|
|
25
|
-
export type {
|
|
25
|
+
export type { ConversationsNamespace } from "./namespaces/conversations.js";
|
|
26
26
|
export type { DesksNamespace } from "./namespaces/desks.js";
|
|
27
27
|
export type { FilesNamespace } from "./namespaces/files.js";
|
|
28
28
|
export type { FunctionsNamespace } from "./namespaces/functions.js";
|
|
@@ -7,7 +7,7 @@ export class AgentsNamespace {
|
|
|
7
7
|
this.podId = podId;
|
|
8
8
|
}
|
|
9
9
|
list(options = {}) {
|
|
10
|
-
return this.client.request(() => AgentsService.agentList(this.podId(), options.limit ?? 100
|
|
10
|
+
return this.client.request(() => AgentsService.agentList(this.podId(), options.pageToken, options.limit ?? 100));
|
|
11
11
|
}
|
|
12
12
|
create(payload) {
|
|
13
13
|
return this.client.request(() => AgentsService.agentCreate(this.podId(), payload));
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { HttpClient } from "../http.js";
|
|
2
|
+
import type { ConversationListResponse } from "../openapi_client/models/ConversationListResponse.js";
|
|
3
|
+
import type { CreateConversationRequest } from "../openapi_client/models/CreateConversationRequest.js";
|
|
4
|
+
import type { SendMessageRequest } from "../openapi_client/models/SendMessageRequest.js";
|
|
5
|
+
import type { UpdateConversationRequest } from "../openapi_client/models/UpdateConversationRequest.js";
|
|
6
|
+
import type { AvailableModelInfo, Conversation, ConversationMessage, ConversationModel, CursorPage } from "../types.js";
|
|
7
|
+
type ConversationCreateInput = CreateConversationRequest & {
|
|
8
|
+
agent_name?: string | null;
|
|
9
|
+
model?: ConversationModel | null;
|
|
10
|
+
pod_id?: string | null;
|
|
11
|
+
};
|
|
12
|
+
type ConversationUpdateInput = UpdateConversationRequest & {
|
|
13
|
+
model?: ConversationModel | null;
|
|
14
|
+
};
|
|
15
|
+
export declare class ConversationsNamespace {
|
|
16
|
+
private readonly http;
|
|
17
|
+
private readonly podId;
|
|
18
|
+
constructor(http: HttpClient, podId: () => string);
|
|
19
|
+
private resolvePodId;
|
|
20
|
+
private requirePodId;
|
|
21
|
+
list(options?: {
|
|
22
|
+
agent_name?: string | null;
|
|
23
|
+
pod_id?: string | null;
|
|
24
|
+
limit?: number;
|
|
25
|
+
page_token?: string | null;
|
|
26
|
+
}): Promise<ConversationListResponse>;
|
|
27
|
+
listByAgent(agentName: string, options?: {
|
|
28
|
+
pod_id?: string | null;
|
|
29
|
+
limit?: number;
|
|
30
|
+
page_token?: string | null;
|
|
31
|
+
}): Promise<ConversationListResponse>;
|
|
32
|
+
listModels(): Promise<{
|
|
33
|
+
items: AvailableModelInfo[];
|
|
34
|
+
limit: number;
|
|
35
|
+
next_page_token: null;
|
|
36
|
+
}>;
|
|
37
|
+
create(payload?: ConversationCreateInput): Promise<Conversation>;
|
|
38
|
+
createForAgent(agentName: string, payload?: Omit<ConversationCreateInput, "agent_name">): Promise<Conversation>;
|
|
39
|
+
get(conversationId: string, options?: {
|
|
40
|
+
pod_id?: string | null;
|
|
41
|
+
}): Promise<Conversation>;
|
|
42
|
+
update(conversationId: string, payload: ConversationUpdateInput, options?: {
|
|
43
|
+
pod_id?: string | null;
|
|
44
|
+
}): Promise<Conversation>;
|
|
45
|
+
sendMessageStream(conversationId: string, payload: SendMessageRequest, options?: {
|
|
46
|
+
pod_id?: string | null;
|
|
47
|
+
signal?: AbortSignal;
|
|
48
|
+
}): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
|
|
49
|
+
sendOrCreateMessageStream(payload: SendMessageRequest, options?: {
|
|
50
|
+
pod_id?: string | null;
|
|
51
|
+
signal?: AbortSignal;
|
|
52
|
+
}): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
|
|
53
|
+
resumeStream(conversationId: string, options?: {
|
|
54
|
+
pod_id?: string | null;
|
|
55
|
+
agent_run_id?: string | null;
|
|
56
|
+
signal?: AbortSignal;
|
|
57
|
+
}): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
|
|
58
|
+
stopRun(conversationId: string, options?: {
|
|
59
|
+
pod_id?: string | null;
|
|
60
|
+
}): Promise<Conversation>;
|
|
61
|
+
readonly messages: {
|
|
62
|
+
list: (conversationId: string, options?: {
|
|
63
|
+
limit?: number;
|
|
64
|
+
page_token?: string | null;
|
|
65
|
+
after_sequence?: number | null;
|
|
66
|
+
pod_id?: string | null;
|
|
67
|
+
}) => Promise<CursorPage<ConversationMessage>>;
|
|
68
|
+
send: (conversationId: string, payload: SendMessageRequest, options?: {
|
|
69
|
+
pod_id?: string | null;
|
|
70
|
+
}) => Promise<unknown>;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { AgentModelName } from "../openapi_client/models/AgentModelName.js";
|
|
2
|
+
function normalizeConversation(conversation) {
|
|
3
|
+
if (!conversation)
|
|
4
|
+
return conversation;
|
|
5
|
+
const record = conversation;
|
|
6
|
+
return {
|
|
7
|
+
...record,
|
|
8
|
+
model: record.model ?? record.model_name ?? null,
|
|
9
|
+
status: record.status ?? "waiting",
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function normalizeConversationList(response) {
|
|
13
|
+
const items = (response.items ?? []).map((conversation) => normalizeConversation(conversation));
|
|
14
|
+
return {
|
|
15
|
+
...response,
|
|
16
|
+
items,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function normalizeMessage(message) {
|
|
20
|
+
return message;
|
|
21
|
+
}
|
|
22
|
+
function buildModelList() {
|
|
23
|
+
return Object.values(AgentModelName).map((model) => ({
|
|
24
|
+
id: model,
|
|
25
|
+
name: model,
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
export class ConversationsNamespace {
|
|
29
|
+
http;
|
|
30
|
+
podId;
|
|
31
|
+
constructor(http, podId) {
|
|
32
|
+
this.http = http;
|
|
33
|
+
this.podId = podId;
|
|
34
|
+
}
|
|
35
|
+
resolvePodId(explicitPodId) {
|
|
36
|
+
if (typeof explicitPodId === "string") {
|
|
37
|
+
return explicitPodId;
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
return this.podId();
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
requirePodId(explicitPodId) {
|
|
47
|
+
const podId = this.resolvePodId(explicitPodId);
|
|
48
|
+
if (!podId) {
|
|
49
|
+
throw new Error("pod_id is required for this conversation operation.");
|
|
50
|
+
}
|
|
51
|
+
return podId;
|
|
52
|
+
}
|
|
53
|
+
list(options = {}) {
|
|
54
|
+
const podId = this.requirePodId(options.pod_id);
|
|
55
|
+
return this.http.request("GET", `/pods/${podId}/conversations`, {
|
|
56
|
+
params: {
|
|
57
|
+
agent_name: options.agent_name,
|
|
58
|
+
limit: options.limit ?? 20,
|
|
59
|
+
page_token: options.page_token,
|
|
60
|
+
},
|
|
61
|
+
}).then(normalizeConversationList);
|
|
62
|
+
}
|
|
63
|
+
listByAgent(agentName, options = {}) {
|
|
64
|
+
return this.list({ ...options, agent_name: agentName });
|
|
65
|
+
}
|
|
66
|
+
async listModels() {
|
|
67
|
+
const items = buildModelList();
|
|
68
|
+
return {
|
|
69
|
+
items,
|
|
70
|
+
limit: items.length,
|
|
71
|
+
next_page_token: null,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
create(payload = {}) {
|
|
75
|
+
const podId = this.requirePodId(payload.pod_id);
|
|
76
|
+
const { agent_name, model, model_name, pod_id, ...requestBody } = payload;
|
|
77
|
+
const body = {
|
|
78
|
+
...requestBody,
|
|
79
|
+
agent_name: agent_name ?? undefined,
|
|
80
|
+
model_name: model_name ?? model,
|
|
81
|
+
};
|
|
82
|
+
void pod_id;
|
|
83
|
+
return this.http.request("POST", `/pods/${podId}/conversations`, {
|
|
84
|
+
body,
|
|
85
|
+
}).then(normalizeConversation);
|
|
86
|
+
}
|
|
87
|
+
createForAgent(agentName, payload = {}) {
|
|
88
|
+
return this.create({
|
|
89
|
+
...payload,
|
|
90
|
+
agent_name: agentName,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
get(conversationId, options = {}) {
|
|
94
|
+
const podId = this.requirePodId(options.pod_id);
|
|
95
|
+
return this.http.request("GET", `/pods/${podId}/conversations/${conversationId}`)
|
|
96
|
+
.then(normalizeConversation);
|
|
97
|
+
}
|
|
98
|
+
update(conversationId, payload, options = {}) {
|
|
99
|
+
const podId = this.requirePodId(options.pod_id);
|
|
100
|
+
const { model, model_name, ...requestBody } = payload;
|
|
101
|
+
const body = {
|
|
102
|
+
...requestBody,
|
|
103
|
+
model_name: model_name ?? model,
|
|
104
|
+
};
|
|
105
|
+
return this.http.request("PATCH", `/pods/${podId}/conversations/${conversationId}`, {
|
|
106
|
+
body,
|
|
107
|
+
}).then(normalizeConversation);
|
|
108
|
+
}
|
|
109
|
+
sendMessageStream(conversationId, payload, options = {}) {
|
|
110
|
+
const podId = this.requirePodId(options.pod_id);
|
|
111
|
+
return this.http.stream(`/pods/${podId}/conversations/${conversationId}/messages`, {
|
|
112
|
+
method: "POST",
|
|
113
|
+
body: payload,
|
|
114
|
+
signal: options.signal,
|
|
115
|
+
headers: {
|
|
116
|
+
"Content-Type": "application/json",
|
|
117
|
+
Accept: "text/event-stream",
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
sendOrCreateMessageStream(payload, options = {}) {
|
|
122
|
+
const podId = this.requirePodId(options.pod_id);
|
|
123
|
+
return this.http.stream(`/pods/${podId}/conversations/messages`, {
|
|
124
|
+
method: "POST",
|
|
125
|
+
body: payload,
|
|
126
|
+
signal: options.signal,
|
|
127
|
+
headers: {
|
|
128
|
+
"Content-Type": "application/json",
|
|
129
|
+
Accept: "text/event-stream",
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
resumeStream(conversationId, options = {}) {
|
|
134
|
+
const podId = this.requirePodId(options.pod_id);
|
|
135
|
+
return this.http.stream(`/pods/${podId}/conversations/${conversationId}/stream`, {
|
|
136
|
+
params: {
|
|
137
|
+
agent_run_id: options.agent_run_id,
|
|
138
|
+
},
|
|
139
|
+
signal: options.signal,
|
|
140
|
+
headers: {
|
|
141
|
+
Accept: "text/event-stream",
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
stopRun(conversationId, options = {}) {
|
|
146
|
+
const podId = this.requirePodId(options.pod_id);
|
|
147
|
+
return this.http.request("POST", `/pods/${podId}/conversations/${conversationId}/stop`, {
|
|
148
|
+
body: {},
|
|
149
|
+
}).then(normalizeConversation);
|
|
150
|
+
}
|
|
151
|
+
messages = {
|
|
152
|
+
list: (conversationId, options = {}) => {
|
|
153
|
+
const podId = this.requirePodId(options.pod_id);
|
|
154
|
+
const parsedPageToken = typeof options.page_token === "string" && options.page_token.trim().length > 0
|
|
155
|
+
? Number(options.page_token)
|
|
156
|
+
: null;
|
|
157
|
+
return this.http.request("GET", `/pods/${podId}/conversations/${conversationId}/messages`, {
|
|
158
|
+
params: {
|
|
159
|
+
after_sequence: options.after_sequence ?? (Number.isFinite(parsedPageToken) ? parsedPageToken : undefined),
|
|
160
|
+
limit: options.limit ?? 100,
|
|
161
|
+
},
|
|
162
|
+
}).then((response) => ({
|
|
163
|
+
...response,
|
|
164
|
+
items: (response.items ?? []).map(normalizeMessage),
|
|
165
|
+
}));
|
|
166
|
+
},
|
|
167
|
+
send: (conversationId, payload, options = {}) => {
|
|
168
|
+
const podId = this.requirePodId(options.pod_id);
|
|
169
|
+
return this.http.request("POST", `/pods/${podId}/conversations/${conversationId}/messages`, {
|
|
170
|
+
body: payload,
|
|
171
|
+
});
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
}
|
|
@@ -3,6 +3,7 @@ import type { HttpClient } from "../http.js";
|
|
|
3
3
|
import type { ConvertedFileResponse } from "../openapi_client/models/ConvertedFileResponse.js";
|
|
4
4
|
import type { DirectoryTreeResponse } from "../openapi_client/models/DirectoryTreeResponse.js";
|
|
5
5
|
import { SearchMethod } from "../openapi_client/models/SearchMethod.js";
|
|
6
|
+
import type { DatastoreFileNamespace } from "../types.js";
|
|
6
7
|
export declare class FilesNamespace {
|
|
7
8
|
private readonly client;
|
|
8
9
|
private readonly http;
|
|
@@ -13,17 +14,25 @@ export declare class FilesNamespace {
|
|
|
13
14
|
pageToken?: string;
|
|
14
15
|
directoryPath?: string;
|
|
15
16
|
parentId?: string;
|
|
17
|
+
namespace?: DatastoreFileNamespace | null;
|
|
16
18
|
}): Promise<import("../types.js").FileListResponse>;
|
|
17
|
-
get(path: string
|
|
18
|
-
|
|
19
|
+
get(path: string, options?: {
|
|
20
|
+
namespace?: DatastoreFileNamespace | null;
|
|
21
|
+
}): Promise<import("../types.js").FileResponse>;
|
|
22
|
+
delete(path: string, options?: {
|
|
23
|
+
namespace?: DatastoreFileNamespace | null;
|
|
24
|
+
}): Promise<import("../types.js").DatastoreMessageResponse>;
|
|
19
25
|
search(query: string, options?: {
|
|
20
26
|
limit?: number;
|
|
21
27
|
searchMethod?: SearchMethod;
|
|
22
28
|
}): Promise<import("../types.js").FileSearchResponse>;
|
|
23
|
-
download(path: string
|
|
29
|
+
download(path: string, options?: {
|
|
30
|
+
namespace?: DatastoreFileNamespace | null;
|
|
31
|
+
}): Promise<Blob>;
|
|
24
32
|
tree(options?: {
|
|
25
33
|
rootPath?: string;
|
|
26
34
|
filesPerDirectory?: number;
|
|
35
|
+
namespace?: DatastoreFileNamespace | null;
|
|
27
36
|
}): Promise<DirectoryTreeResponse>;
|
|
28
37
|
upload(file: Blob, options?: {
|
|
29
38
|
name?: string;
|
|
@@ -31,6 +40,7 @@ export declare class FilesNamespace {
|
|
|
31
40
|
parentId?: string;
|
|
32
41
|
searchEnabled?: boolean;
|
|
33
42
|
description?: string;
|
|
43
|
+
namespace?: DatastoreFileNamespace | null;
|
|
34
44
|
}): Promise<import("../types.js").FileResponse>;
|
|
35
45
|
update(path: string, options?: {
|
|
36
46
|
file?: Blob;
|
|
@@ -40,17 +50,25 @@ export declare class FilesNamespace {
|
|
|
40
50
|
parentId?: string;
|
|
41
51
|
newPath?: string;
|
|
42
52
|
searchEnabled?: boolean;
|
|
53
|
+
namespace?: DatastoreFileNamespace | null;
|
|
43
54
|
}): Promise<import("../types.js").FileResponse>;
|
|
44
55
|
readonly folder: {
|
|
45
56
|
create: (name: string, options?: {
|
|
46
57
|
directoryPath?: string;
|
|
47
58
|
parentId?: string;
|
|
48
59
|
description?: string;
|
|
60
|
+
namespace?: DatastoreFileNamespace | null;
|
|
49
61
|
}) => Promise<import("../types.js").FileResponse>;
|
|
50
62
|
};
|
|
51
63
|
readonly converted: {
|
|
52
|
-
get: (path: string
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
get: (path: string, options?: {
|
|
65
|
+
namespace?: DatastoreFileNamespace | null;
|
|
66
|
+
}) => Promise<ConvertedFileResponse>;
|
|
67
|
+
render: (path: string, options?: {
|
|
68
|
+
namespace?: DatastoreFileNamespace | null;
|
|
69
|
+
}) => Promise<string>;
|
|
70
|
+
download: (path: string, artifact?: string, options?: {
|
|
71
|
+
namespace?: DatastoreFileNamespace | null;
|
|
72
|
+
}) => Promise<Blob>;
|
|
55
73
|
};
|
|
56
74
|
}
|
package/dist/namespaces/files.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FileNamespace } from "../openapi_client/models/FileNamespace.js";
|
|
1
2
|
import { SearchMethod } from "../openapi_client/models/SearchMethod.js";
|
|
2
3
|
import { FilesService } from "../openapi_client/services/FilesService.js";
|
|
3
4
|
function joinDatastorePath(basePath, leaf) {
|
|
@@ -29,6 +30,13 @@ function getBaseName(path) {
|
|
|
29
30
|
}
|
|
30
31
|
return normalized.slice(index + 1);
|
|
31
32
|
}
|
|
33
|
+
function normalizeFileNamespace(namespace) {
|
|
34
|
+
const normalized = String(namespace ?? "").trim().toUpperCase();
|
|
35
|
+
if (normalized === FileNamespace.PERSONAL || normalized === "PRIVATE") {
|
|
36
|
+
return FileNamespace.PERSONAL;
|
|
37
|
+
}
|
|
38
|
+
return FileNamespace.POD;
|
|
39
|
+
}
|
|
32
40
|
export class FilesNamespace {
|
|
33
41
|
client;
|
|
34
42
|
http;
|
|
@@ -40,13 +48,13 @@ export class FilesNamespace {
|
|
|
40
48
|
}
|
|
41
49
|
list(options = {}) {
|
|
42
50
|
const directoryPath = options.directoryPath ?? options.parentId ?? "/";
|
|
43
|
-
return this.client.request(() => FilesService.fileList(this.podId(), directoryPath, options.limit ?? 100, options.pageToken));
|
|
51
|
+
return this.client.request(() => FilesService.fileList(this.podId(), directoryPath, normalizeFileNamespace(options.namespace), options.limit ?? 100, options.pageToken));
|
|
44
52
|
}
|
|
45
|
-
get(path) {
|
|
46
|
-
return this.client.request(() => FilesService.fileGet(this.podId(), path));
|
|
53
|
+
get(path, options = {}) {
|
|
54
|
+
return this.client.request(() => FilesService.fileGet(this.podId(), path, normalizeFileNamespace(options.namespace)));
|
|
47
55
|
}
|
|
48
|
-
delete(path) {
|
|
49
|
-
return this.client.request(() => FilesService.fileDelete(this.podId(), path));
|
|
56
|
+
delete(path, options = {}) {
|
|
57
|
+
return this.client.request(() => FilesService.fileDelete(this.podId(), path, normalizeFileNamespace(options.namespace)));
|
|
50
58
|
}
|
|
51
59
|
search(query, options = {}) {
|
|
52
60
|
return this.client.request(() => FilesService.fileSearch(this.podId(), {
|
|
@@ -55,12 +63,13 @@ export class FilesNamespace {
|
|
|
55
63
|
search_method: options.searchMethod ?? SearchMethod.HYBRID,
|
|
56
64
|
}));
|
|
57
65
|
}
|
|
58
|
-
download(path) {
|
|
66
|
+
download(path, options = {}) {
|
|
59
67
|
const encodedPath = encodeURIComponent(path);
|
|
60
|
-
|
|
68
|
+
const encodedNamespace = encodeURIComponent(normalizeFileNamespace(options.namespace));
|
|
69
|
+
return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/download?path=${encodedPath}&namespace=${encodedNamespace}`);
|
|
61
70
|
}
|
|
62
71
|
tree(options = {}) {
|
|
63
|
-
return this.client.request(() => FilesService.fileTree(this.podId(), options.rootPath ?? "/", options.filesPerDirectory ?? 3));
|
|
72
|
+
return this.client.request(() => FilesService.fileTree(this.podId(), options.rootPath ?? "/", normalizeFileNamespace(options.namespace), options.filesPerDirectory ?? 3));
|
|
64
73
|
}
|
|
65
74
|
upload(file, options = {}) {
|
|
66
75
|
const payload = {
|
|
@@ -69,6 +78,7 @@ export class FilesNamespace {
|
|
|
69
78
|
description: options.description,
|
|
70
79
|
directory_path: options.directoryPath ?? options.parentId ?? "/",
|
|
71
80
|
search_enabled: options.searchEnabled ?? true,
|
|
81
|
+
namespace: normalizeFileNamespace(options.namespace),
|
|
72
82
|
};
|
|
73
83
|
return this.client.request(() => FilesService.fileUpload(this.podId(), payload));
|
|
74
84
|
}
|
|
@@ -87,6 +97,7 @@ export class FilesNamespace {
|
|
|
87
97
|
description: options.description,
|
|
88
98
|
new_path: resolvedNewPath,
|
|
89
99
|
search_enabled: options.searchEnabled,
|
|
100
|
+
namespace: normalizeFileNamespace(options.namespace),
|
|
90
101
|
};
|
|
91
102
|
return this.client.request(() => FilesService.fileUpdate(this.podId(), payload));
|
|
92
103
|
}
|
|
@@ -95,17 +106,19 @@ export class FilesNamespace {
|
|
|
95
106
|
const payload = {
|
|
96
107
|
path: joinDatastorePath(options.directoryPath ?? options.parentId, name),
|
|
97
108
|
description: options.description,
|
|
109
|
+
namespace: normalizeFileNamespace(options.namespace),
|
|
98
110
|
};
|
|
99
111
|
return this.client.request(() => FilesService.fileFolderCreate(this.podId(), payload));
|
|
100
112
|
},
|
|
101
113
|
};
|
|
102
114
|
converted = {
|
|
103
|
-
get: (path) => this.client.request(() => FilesService.fileConvertedGet(this.podId(), path)),
|
|
104
|
-
render: (path) => this.client.request(() => FilesService.fileConvertedRender(this.podId(), path)),
|
|
105
|
-
download: (path, artifact = "document.md") => {
|
|
115
|
+
get: (path, options = {}) => this.client.request(() => FilesService.fileConvertedGet(this.podId(), path, normalizeFileNamespace(options.namespace))),
|
|
116
|
+
render: (path, options = {}) => this.client.request(() => FilesService.fileConvertedRender(this.podId(), path, normalizeFileNamespace(options.namespace))),
|
|
117
|
+
download: (path, artifact = "document.md", options = {}) => {
|
|
106
118
|
const encodedPath = encodeURIComponent(path);
|
|
107
119
|
const encodedArtifact = encodeURIComponent(artifact);
|
|
108
|
-
|
|
120
|
+
const encodedNamespace = encodeURIComponent(normalizeFileNamespace(options.namespace));
|
|
121
|
+
return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/converted/download?path=${encodedPath}&artifact=${encodedArtifact}&namespace=${encodedNamespace}`);
|
|
109
122
|
},
|
|
110
123
|
};
|
|
111
124
|
}
|
|
@@ -8,11 +8,19 @@ export declare class IntegrationsNamespace {
|
|
|
8
8
|
}): Promise<import("../types.js").ApplicationListResponseSchema>;
|
|
9
9
|
get(applicationId: string): Promise<import("../types.js").ApplicationDetailResponseSchema>;
|
|
10
10
|
readonly operations: {
|
|
11
|
-
|
|
11
|
+
discover: (applicationId: string, options?: {
|
|
12
|
+
query?: string;
|
|
13
|
+
limit?: number;
|
|
14
|
+
}) => Promise<import("../types.js").OperationDiscoverResponse>;
|
|
15
|
+
list: (applicationId: string, options?: {
|
|
16
|
+
query?: string;
|
|
17
|
+
limit?: number;
|
|
18
|
+
}) => Promise<import("../types.js").OperationSummary[]>;
|
|
12
19
|
get: (applicationId: string, operationName: string) => Promise<import("../types.js").OperationDetail>;
|
|
20
|
+
details: (applicationId: string, operationNames?: string[]) => Promise<import("../types.js").OperationDetailsBatchResponse>;
|
|
13
21
|
execute: (applicationId: string, operationName: string, payload: Record<string, unknown>, accountId?: string) => Promise<import("../types.js").OperationExecutionResponse>;
|
|
14
|
-
descriptor: (applicationId: string) => Promise<import("../types.js").AppDescriptorResponse>;
|
|
15
22
|
};
|
|
23
|
+
helperAgent(goal: string, appNames: string[]): Promise<import("../types.js").IntegrationHelperAgentResponse>;
|
|
16
24
|
readonly triggers: {
|
|
17
25
|
list: (options?: {
|
|
18
26
|
applicationId?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AgentToolsService } from "../openapi_client/services/AgentToolsService.js";
|
|
1
2
|
import { ApplicationsService } from "../openapi_client/services/ApplicationsService.js";
|
|
2
3
|
import { IntegrationsService } from "../openapi_client/services/IntegrationsService.js";
|
|
3
4
|
export class IntegrationsNamespace {
|
|
@@ -12,14 +13,28 @@ export class IntegrationsNamespace {
|
|
|
12
13
|
return this.client.request(() => ApplicationsService.applicationGet(applicationId));
|
|
13
14
|
}
|
|
14
15
|
operations = {
|
|
15
|
-
|
|
16
|
+
discover: (applicationId, options = {}) => this.client.request(() => ApplicationsService.applicationOperationDiscover(applicationId, options.query, options.limit ?? 100)),
|
|
17
|
+
list: async (applicationId, options = {}) => {
|
|
18
|
+
const response = await this.client.request(() => ApplicationsService.applicationOperationDiscover(applicationId, options.query, options.limit ?? 100));
|
|
19
|
+
return response.items ?? [];
|
|
20
|
+
},
|
|
16
21
|
get: (applicationId, operationName) => this.client.request(() => ApplicationsService.applicationOperationDetail(applicationId, operationName)),
|
|
22
|
+
details: (applicationId, operationNames) => {
|
|
23
|
+
const body = { operation_names: operationNames };
|
|
24
|
+
return this.client.request(() => ApplicationsService.applicationOperationDetailsBatch(applicationId, body));
|
|
25
|
+
},
|
|
17
26
|
execute: (applicationId, operationName, payload, accountId) => {
|
|
18
27
|
const body = { payload, account_id: accountId };
|
|
19
28
|
return this.client.request(() => ApplicationsService.applicationOperationExecute(applicationId, operationName, body));
|
|
20
29
|
},
|
|
21
|
-
descriptor: (applicationId) => this.client.request(() => ApplicationsService.applicationDescriptor(applicationId)),
|
|
22
30
|
};
|
|
31
|
+
helperAgent(goal, appNames) {
|
|
32
|
+
const body = {
|
|
33
|
+
app_names: appNames,
|
|
34
|
+
goal,
|
|
35
|
+
};
|
|
36
|
+
return this.client.request(() => AgentToolsService.agentToolIntegrationHelperAgent(body));
|
|
37
|
+
}
|
|
23
38
|
triggers = {
|
|
24
39
|
list: (options = {}) => this.client.request(() => ApplicationsService.applicationTriggerList(options.applicationId, options.search, options.limit ?? 100, options.pageToken)),
|
|
25
40
|
get: (triggerId) => this.client.request(() => ApplicationsService.applicationTriggerGet(triggerId)),
|
|
@@ -8,7 +8,7 @@ export declare class PodSurfacesNamespace {
|
|
|
8
8
|
limit?: number;
|
|
9
9
|
pageToken?: string;
|
|
10
10
|
cursor?: string;
|
|
11
|
-
}): Promise<import("../types.js").
|
|
11
|
+
}): Promise<import("../types.js").AgentSurfaceListResponse>;
|
|
12
12
|
create(podId: string, payload: CreateSurfaceRequest): Promise<any>;
|
|
13
13
|
get(podId: string, surfaceId: string): Promise<any>;
|
|
14
14
|
updateConfig(podId: string, surfaceId: string, payload: UpdateSurfaceRequest): Promise<any>;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AgentSurfacesService } from "../openapi_client/services/AgentSurfacesService.js";
|
|
2
2
|
export class PodSurfacesNamespace {
|
|
3
3
|
client;
|
|
4
4
|
constructor(client) {
|
|
5
5
|
this.client = client;
|
|
6
6
|
}
|
|
7
7
|
list(podId, options = {}) {
|
|
8
|
-
return this.client.request(() =>
|
|
8
|
+
return this.client.request(() => AgentSurfacesService.agentSurfaceList(podId, options.limit ?? 100, options.pageToken ?? options.cursor));
|
|
9
9
|
}
|
|
10
10
|
create(podId, payload) {
|
|
11
|
-
return this.client.request(() =>
|
|
11
|
+
return this.client.request(() => AgentSurfacesService.agentSurfaceCreate(podId, payload));
|
|
12
12
|
}
|
|
13
13
|
get(podId, surfaceId) {
|
|
14
|
-
return this.client.request(() =>
|
|
14
|
+
return this.client.request(() => AgentSurfacesService.agentSurfaceGet(podId, surfaceId));
|
|
15
15
|
}
|
|
16
16
|
updateConfig(podId, surfaceId, payload) {
|
|
17
|
-
return this.client.request(() =>
|
|
17
|
+
return this.client.request(() => AgentSurfacesService.agentSurfaceUpdate(podId, surfaceId, payload));
|
|
18
18
|
}
|
|
19
19
|
toggle(podId, surfaceId, isActive) {
|
|
20
|
-
return this.client.request(() =>
|
|
20
|
+
return this.client.request(() => AgentSurfacesService.agentSurfaceToggle(podId, surfaceId, { is_active: isActive }));
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import type { HttpClient } from "../http.js";
|
|
2
|
-
import type { AddMessageRequest } from "../
|
|
3
|
-
import type { CreateTaskRequest } from "../openapi_client/models/CreateTaskRequest.js";
|
|
4
|
-
import type { TaskListResponse } from "../openapi_client/models/TaskListResponse.js";
|
|
5
|
-
import type { TaskMessageListResponse } from "../openapi_client/models/TaskMessageListResponse.js";
|
|
6
|
-
import type { TaskResponse } from "../openapi_client/models/TaskResponse.js";
|
|
2
|
+
import type { AddMessageRequest, CreateTaskRequest, TaskListResponse, TaskMessageListResponse, TaskResponse } from "../types.js";
|
|
7
3
|
export declare class TasksNamespace {
|
|
8
4
|
private readonly http;
|
|
9
5
|
private readonly podId;
|