lemma-sdk 0.2.45 → 0.3.0
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 +16 -0
- package/dist/assistant-events.js +12 -2
- package/dist/browser/lemma-client.js +13683 -4460
- package/dist/browser.d.ts +14 -6
- package/dist/browser.js +35 -6
- package/dist/client.d.ts +4 -0
- package/dist/client.js +16 -4
- package/dist/config.d.ts +4 -0
- package/dist/config.js +7 -1
- package/dist/generated.d.ts +14 -1
- package/dist/generated.js +62 -11
- package/dist/http.d.ts +47 -1
- package/dist/http.js +145 -26
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/namespaces/agents.d.ts +20 -1
- package/dist/namespaces/agents.js +29 -1
- package/dist/namespaces/conversations.d.ts +5 -2
- package/dist/namespaces/conversations.js +2 -0
- package/dist/namespaces/desks.d.ts +9 -0
- package/dist/namespaces/desks.js +6 -0
- package/dist/namespaces/files.d.ts +18 -0
- package/dist/namespaces/files.js +21 -0
- package/dist/namespaces/functions.d.ts +3 -0
- package/dist/namespaces/functions.js +5 -0
- package/dist/namespaces/integrations.d.ts +2 -4
- package/dist/namespaces/integrations.js +2 -2
- package/dist/namespaces/records.d.ts +3 -9
- package/dist/namespaces/records.js +4 -33
- package/dist/namespaces/widgets.d.ts +17 -0
- package/dist/namespaces/widgets.js +16 -0
- package/dist/openapi_client/core/OpenAPI.js +1 -1
- package/dist/openapi_client/index.d.ts +7 -5
- package/dist/openapi_client/index.js +3 -0
- package/dist/openapi_client/models/AgentRunStatus.d.ts +10 -0
- package/dist/openapi_client/models/AgentRunStatus.js +15 -0
- package/dist/openapi_client/models/AgentToolset.d.ts +3 -2
- package/dist/openapi_client/models/AgentToolset.js +2 -1
- package/dist/openapi_client/models/AppTriggerResponseSchema.d.ts +2 -0
- package/dist/openapi_client/models/ApprovalDecisionResponse.d.ts +6 -0
- package/dist/openapi_client/models/AuthProvider.d.ts +4 -0
- package/dist/openapi_client/models/AuthProvider.js +9 -0
- package/dist/openapi_client/models/ConversationResponse.d.ts +4 -0
- package/dist/openapi_client/models/ConversationType.d.ts +2 -1
- package/dist/openapi_client/models/ConversationType.js +1 -0
- package/dist/openapi_client/models/DatastoreQueryRequest.d.ts +1 -1
- package/dist/openapi_client/models/FileSearchResultSchema.d.ts +2 -0
- package/dist/openapi_client/models/FileSignedUrlRequest.d.ts +4 -0
- package/dist/openapi_client/models/FileSignedUrlResponse.d.ts +6 -0
- package/dist/openapi_client/models/FileUrlResponse.d.ts +6 -0
- package/dist/openapi_client/models/FlowRunStatus.d.ts +3 -2
- package/dist/openapi_client/models/FlowRunStatus.js +3 -2
- package/dist/openapi_client/models/MessageKind.d.ts +14 -0
- package/dist/openapi_client/models/MessageKind.js +19 -0
- package/dist/openapi_client/models/MessageResponse.d.ts +5 -6
- package/dist/openapi_client/models/WorkflowRunResponse.d.ts +2 -2
- package/dist/openapi_client/services/AgentConversationsService.d.ts +8 -7
- package/dist/openapi_client/services/AgentConversationsService.js +7 -5
- package/dist/openapi_client/services/ApplicationsService.d.ts +19 -19
- package/dist/openapi_client/services/ApplicationsService.js +48 -44
- package/dist/openapi_client/services/FilesService.d.ts +20 -0
- package/dist/openapi_client/services/FilesService.js +47 -0
- package/dist/openapi_client/services/QueryService.d.ts +1 -1
- package/dist/openapi_client/services/QueryService.js +1 -1
- package/dist/openapi_client/services/RecordsService.d.ts +1 -3
- package/dist/openapi_client/services/RecordsService.js +1 -5
- package/dist/react/assistant-output.d.ts +6 -0
- package/dist/react/assistant-output.js +16 -0
- package/dist/react/useAssistantController.d.ts +8 -1
- package/dist/react/useAssistantController.js +87 -250
- package/dist/react/useAssistantRuntime.js +6 -17
- package/dist/react/useAssistantSession.d.ts +4 -2
- package/dist/react/useAssistantSession.js +6 -7
- package/dist/react/useConversationMessages.d.ts +2 -2
- package/dist/react/useConversationMessages.js +3 -5
- package/dist/react/useRecords.d.ts +1 -1
- package/dist/react/useRecords.js +2 -13
- package/dist/react/useReferencingRecords.d.ts +4 -6
- package/dist/react/useReferencingRecords.js +5 -5
- package/dist/react/useReverseRelatedRecords.d.ts +3 -4
- package/dist/react/useReverseRelatedRecords.js +5 -5
- package/dist/run-utils.d.ts +24 -0
- package/dist/run-utils.js +54 -0
- package/dist/types.d.ts +12 -6
- package/dist/version.d.ts +5 -0
- package/dist/version.js +7 -0
- package/package.json +10 -5
- package/dist/hey_client/client/client.gen.d.ts +0 -2
- package/dist/hey_client/client/client.gen.js +0 -216
- package/dist/hey_client/client/index.d.ts +0 -10
- package/dist/hey_client/client/index.js +0 -6
- package/dist/hey_client/client/types.gen.d.ts +0 -120
- package/dist/hey_client/client/types.gen.js +0 -2
- package/dist/hey_client/client/utils.gen.d.ts +0 -37
- package/dist/hey_client/client/utils.gen.js +0 -228
- package/dist/hey_client/client.gen.d.ts +0 -12
- package/dist/hey_client/client.gen.js +0 -3
- package/dist/hey_client/core/auth.gen.d.ts +0 -25
- package/dist/hey_client/core/auth.gen.js +0 -14
- package/dist/hey_client/core/bodySerializer.gen.d.ts +0 -25
- package/dist/hey_client/core/bodySerializer.gen.js +0 -57
- package/dist/hey_client/core/params.gen.d.ts +0 -43
- package/dist/hey_client/core/params.gen.js +0 -100
- package/dist/hey_client/core/pathSerializer.gen.d.ts +0 -33
- package/dist/hey_client/core/pathSerializer.gen.js +0 -106
- package/dist/hey_client/core/queryKeySerializer.gen.d.ts +0 -18
- package/dist/hey_client/core/queryKeySerializer.gen.js +0 -92
- package/dist/hey_client/core/serverSentEvents.gen.d.ts +0 -71
- package/dist/hey_client/core/serverSentEvents.gen.js +0 -132
- package/dist/hey_client/core/types.gen.d.ts +0 -83
- package/dist/hey_client/core/types.gen.js +0 -2
- package/dist/hey_client/core/utils.gen.d.ts +0 -19
- package/dist/hey_client/core/utils.gen.js +0 -87
- package/dist/hey_client/index.d.ts +0 -2
- package/dist/hey_client/index.js +0 -2
- package/dist/hey_client/sdk.gen.d.ts +0 -1005
- package/dist/hey_client/sdk.gen.js +0 -1438
- package/dist/hey_client/types.gen.d.ts +0 -13004
- package/dist/hey_client/types.gen.js +0 -2
- package/dist/openapi_client/models/NotificationContent.d.ts +0 -4
- package/dist/openapi_client/models/TextContent.d.ts +0 -4
- package/dist/openapi_client/models/ThinkingContent.d.ts +0 -4
- package/dist/openapi_client/models/ToolCallContent.d.ts +0 -6
- package/dist/openapi_client/models/ToolReturnContent.d.ts +0 -6
- package/dist/openapi_client/models/ToolReturnContent.js +0 -1
- /package/dist/openapi_client/models/{NotificationContent.js → ApprovalDecisionResponse.js} +0 -0
- /package/dist/openapi_client/models/{TextContent.js → FileSignedUrlRequest.js} +0 -0
- /package/dist/openapi_client/models/{ThinkingContent.js → FileSignedUrlResponse.js} +0 -0
- /package/dist/openapi_client/models/{ToolCallContent.js → FileUrlResponse.js} +0 -0
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* Status of a flow run.
|
|
7
7
|
*
|
|
8
8
|
* PENDING exists only in memory before the first advance; persisted runs
|
|
9
|
-
* are RUNNING, WAITING, or terminal.
|
|
10
|
-
*
|
|
9
|
+
* are RUNNING, WAITING, or terminal. WAITING is reserved for human form
|
|
10
|
+
* waits. Runs suspended on platform work such as an agent, function job, or
|
|
11
|
+
* timer remain RUNNING; the active wait row records the exact wait_type.
|
|
11
12
|
*/
|
|
12
13
|
export var FlowRunStatus;
|
|
13
14
|
(function (FlowRunStatus) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discriminates the flat message body.
|
|
3
|
+
*
|
|
4
|
+
* A message carries exactly one kind. Textual kinds use ``text``; tool kinds
|
|
5
|
+
* use ``tool_name``/``tool_call_id`` plus ``tool_args`` (call) or
|
|
6
|
+
* ``tool_result`` (return). There is no nested ``content`` object.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum MessageKind {
|
|
9
|
+
TEXT = "text",
|
|
10
|
+
NOTIFICATION = "notification",
|
|
11
|
+
THINKING = "thinking",
|
|
12
|
+
TOOL_CALL = "tool_call",
|
|
13
|
+
TOOL_RETURN = "tool_return"
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Discriminates the flat message body.
|
|
7
|
+
*
|
|
8
|
+
* A message carries exactly one kind. Textual kinds use ``text``; tool kinds
|
|
9
|
+
* use ``tool_name``/``tool_call_id`` plus ``tool_args`` (call) or
|
|
10
|
+
* ``tool_result`` (return). There is no nested ``content`` object.
|
|
11
|
+
*/
|
|
12
|
+
export var MessageKind;
|
|
13
|
+
(function (MessageKind) {
|
|
14
|
+
MessageKind["TEXT"] = "text";
|
|
15
|
+
MessageKind["NOTIFICATION"] = "notification";
|
|
16
|
+
MessageKind["THINKING"] = "thinking";
|
|
17
|
+
MessageKind["TOOL_CALL"] = "tool_call";
|
|
18
|
+
MessageKind["TOOL_RETURN"] = "tool_return";
|
|
19
|
+
})(MessageKind || (MessageKind = {}));
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { TextContent } from './TextContent.js';
|
|
3
|
-
import type { ThinkingContent } from './ThinkingContent.js';
|
|
4
|
-
import type { ToolCallContent } from './ToolCallContent.js';
|
|
5
|
-
import type { ToolReturnContent } from './ToolReturnContent.js';
|
|
1
|
+
import type { MessageKind } from './MessageKind.js';
|
|
6
2
|
export type MessageResponse = {
|
|
7
|
-
content: (NotificationContent | TextContent | ThinkingContent | ToolCallContent | ToolReturnContent);
|
|
8
3
|
conversation_id: string;
|
|
9
4
|
created_at: string;
|
|
10
5
|
id: string;
|
|
6
|
+
kind: MessageKind;
|
|
11
7
|
metadata?: (Record<string, any> | null);
|
|
12
8
|
role: string;
|
|
13
9
|
sequence: number;
|
|
10
|
+
text?: (string | null);
|
|
11
|
+
tool_args?: null;
|
|
14
12
|
tool_call_id?: (string | null);
|
|
15
13
|
tool_name?: (string | null);
|
|
14
|
+
tool_result?: null;
|
|
16
15
|
};
|
|
@@ -4,8 +4,8 @@ import type { WorkflowRunWaitResponse } from './WorkflowRunWaitResponse.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* Full run state. `execution_context` is the same flat view that
|
|
6
6
|
* workflow expressions resolve against (`<node_id>.<field>`, `start.*`,
|
|
7
|
-
* `loop.*`). `active_wait` is set
|
|
8
|
-
* form waits
|
|
7
|
+
* `loop.*`). `active_wait` is set when the run is suspended, including
|
|
8
|
+
* WAITING form waits and RUNNING platform waits.
|
|
9
9
|
*/
|
|
10
10
|
export type WorkflowRunResponse = {
|
|
11
11
|
active_wait?: (WorkflowRunWaitResponse | null);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { ApprovalDecisionResponse } from '../models/ApprovalDecisionResponse.js';
|
|
1
2
|
import type { ConversationListResponse } from '../models/ConversationListResponse.js';
|
|
2
3
|
import type { ConversationResponse } from '../models/ConversationResponse.js';
|
|
3
4
|
import type { ConversationStatus } from '../models/ConversationStatus.js';
|
|
4
5
|
import type { ConversationType } from '../models/ConversationType.js';
|
|
5
6
|
import type { CreateConversationRequest } from '../models/CreateConversationRequest.js';
|
|
6
7
|
import type { MessageListResponse } from '../models/MessageListResponse.js';
|
|
7
|
-
import type { MessageResponse } from '../models/MessageResponse.js';
|
|
8
8
|
import type { ResolveUserApprovalRequest } from '../models/ResolveUserApprovalRequest.js';
|
|
9
9
|
import type { SendMessageRequest } from '../models/SendMessageRequest.js';
|
|
10
10
|
import type { UpdateConversationRequest } from '../models/UpdateConversationRequest.js';
|
|
@@ -13,17 +13,18 @@ import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
|
13
13
|
export declare class AgentConversationsService {
|
|
14
14
|
/**
|
|
15
15
|
* List Pod Agent Conversations
|
|
16
|
-
* List root conversations for the current user in a pod. Use agent_name to list conversations for a specific pod agent; omit it to list default pod assistant conversations. Child conversations are omitted
|
|
16
|
+
* List root conversations for the current user in a pod. Use agent_name to list conversations for a specific pod agent; omit it to list default pod assistant conversations. Child (sub-agent) conversations are omitted by default; pass parent_id to list the children of a specific conversation instead.
|
|
17
17
|
* @param podId
|
|
18
18
|
* @param agentName
|
|
19
19
|
* @param status
|
|
20
20
|
* @param type
|
|
21
|
+
* @param parentId
|
|
21
22
|
* @param pageToken
|
|
22
23
|
* @param limit
|
|
23
24
|
* @returns ConversationListResponse Successful Response
|
|
24
25
|
* @throws ApiError
|
|
25
26
|
*/
|
|
26
|
-
static agentConversationList(podId: string, agentName?: (string | null), status?: (ConversationStatus | null), type?: (ConversationType | null), pageToken?: (string | null), limit?: number): CancelablePromise<ConversationListResponse>;
|
|
27
|
+
static agentConversationList(podId: string, agentName?: (string | null), status?: (ConversationStatus | null), type?: (ConversationType | null), parentId?: (string | null), pageToken?: (string | null), limit?: number): CancelablePromise<ConversationListResponse>;
|
|
27
28
|
/**
|
|
28
29
|
* Create Pod Agent Conversation
|
|
29
30
|
* Create a new pod-scoped conversation. When agent_name is omitted, the conversation uses the default pod assistant. Workflow and sub-agent executions also use conversations as their external execution handle.
|
|
@@ -54,7 +55,7 @@ export declare class AgentConversationsService {
|
|
|
54
55
|
static agentConversationUpdate(podId: string, conversationId: string, requestBody: UpdateConversationRequest): CancelablePromise<ConversationResponse>;
|
|
55
56
|
/**
|
|
56
57
|
* List Agent Run Approvals
|
|
57
|
-
* List pending
|
|
58
|
+
* List pending request_approval tool calls in a conversation.
|
|
58
59
|
* @param podId
|
|
59
60
|
* @param conversationId
|
|
60
61
|
* @returns UserApprovalListResponse Successful Response
|
|
@@ -63,15 +64,15 @@ export declare class AgentConversationsService {
|
|
|
63
64
|
static agentConversationApprovalList(podId: string, conversationId: string): CancelablePromise<UserApprovalListResponse>;
|
|
64
65
|
/**
|
|
65
66
|
* Resolve User Approval
|
|
66
|
-
*
|
|
67
|
+
* Record the user's decision on a request_approval call and wake the paused agent run, which then executes the approved tool as the user.
|
|
67
68
|
* @param podId
|
|
68
69
|
* @param conversationId
|
|
69
70
|
* @param approvalId
|
|
70
71
|
* @param requestBody
|
|
71
|
-
* @returns
|
|
72
|
+
* @returns ApprovalDecisionResponse Successful Response
|
|
72
73
|
* @throws ApiError
|
|
73
74
|
*/
|
|
74
|
-
static agentConversationApprovalResolve(podId: string, conversationId: string, approvalId: string, requestBody: ResolveUserApprovalRequest): CancelablePromise<
|
|
75
|
+
static agentConversationApprovalResolve(podId: string, conversationId: string, approvalId: string, requestBody: ResolveUserApprovalRequest): CancelablePromise<ApprovalDecisionResponse>;
|
|
75
76
|
/**
|
|
76
77
|
* List Pod Conversation Messages
|
|
77
78
|
* List the latest persisted messages in chronological order. Pass next_page_token as page_token to fetch the next older page above the current page.
|
|
@@ -3,17 +3,18 @@ import { request as __request } from '../core/request.js';
|
|
|
3
3
|
export class AgentConversationsService {
|
|
4
4
|
/**
|
|
5
5
|
* List Pod Agent Conversations
|
|
6
|
-
* List root conversations for the current user in a pod. Use agent_name to list conversations for a specific pod agent; omit it to list default pod assistant conversations. Child conversations are omitted
|
|
6
|
+
* List root conversations for the current user in a pod. Use agent_name to list conversations for a specific pod agent; omit it to list default pod assistant conversations. Child (sub-agent) conversations are omitted by default; pass parent_id to list the children of a specific conversation instead.
|
|
7
7
|
* @param podId
|
|
8
8
|
* @param agentName
|
|
9
9
|
* @param status
|
|
10
10
|
* @param type
|
|
11
|
+
* @param parentId
|
|
11
12
|
* @param pageToken
|
|
12
13
|
* @param limit
|
|
13
14
|
* @returns ConversationListResponse Successful Response
|
|
14
15
|
* @throws ApiError
|
|
15
16
|
*/
|
|
16
|
-
static agentConversationList(podId, agentName, status, type, pageToken, limit = 20) {
|
|
17
|
+
static agentConversationList(podId, agentName, status, type, parentId, pageToken, limit = 20) {
|
|
17
18
|
return __request(OpenAPI, {
|
|
18
19
|
method: 'GET',
|
|
19
20
|
url: '/pods/{pod_id}/conversations',
|
|
@@ -24,6 +25,7 @@ export class AgentConversationsService {
|
|
|
24
25
|
'agent_name': agentName,
|
|
25
26
|
'status': status,
|
|
26
27
|
'type': type,
|
|
28
|
+
'parent_id': parentId,
|
|
27
29
|
'page_token': pageToken,
|
|
28
30
|
'limit': limit,
|
|
29
31
|
},
|
|
@@ -101,7 +103,7 @@ export class AgentConversationsService {
|
|
|
101
103
|
}
|
|
102
104
|
/**
|
|
103
105
|
* List Agent Run Approvals
|
|
104
|
-
* List pending
|
|
106
|
+
* List pending request_approval tool calls in a conversation.
|
|
105
107
|
* @param podId
|
|
106
108
|
* @param conversationId
|
|
107
109
|
* @returns UserApprovalListResponse Successful Response
|
|
@@ -122,12 +124,12 @@ export class AgentConversationsService {
|
|
|
122
124
|
}
|
|
123
125
|
/**
|
|
124
126
|
* Resolve User Approval
|
|
125
|
-
*
|
|
127
|
+
* Record the user's decision on a request_approval call and wake the paused agent run, which then executes the approved tool as the user.
|
|
126
128
|
* @param podId
|
|
127
129
|
* @param conversationId
|
|
128
130
|
* @param approvalId
|
|
129
131
|
* @param requestBody
|
|
130
|
-
* @returns
|
|
132
|
+
* @returns ApprovalDecisionResponse Successful Response
|
|
131
133
|
* @throws ApiError
|
|
132
134
|
*/
|
|
133
135
|
static agentConversationApprovalResolve(podId, conversationId, approvalId, requestBody) {
|
|
@@ -20,25 +20,6 @@ export declare class ApplicationsService {
|
|
|
20
20
|
* @throws ApiError
|
|
21
21
|
*/
|
|
22
22
|
static applicationList(limit?: number, pageToken?: (string | null)): CancelablePromise<ApplicationListResponseSchema>;
|
|
23
|
-
/**
|
|
24
|
-
* List Triggers
|
|
25
|
-
* Get all triggers. Optionally filter by application_id and search in description
|
|
26
|
-
* @param applicationId
|
|
27
|
-
* @param search
|
|
28
|
-
* @param limit
|
|
29
|
-
* @param pageToken
|
|
30
|
-
* @returns AppTriggerListResponseSchema Successful Response
|
|
31
|
-
* @throws ApiError
|
|
32
|
-
*/
|
|
33
|
-
static applicationTriggerList(applicationId?: (string | null), search?: (string | null), limit?: number, pageToken?: (string | null)): CancelablePromise<AppTriggerListResponseSchema>;
|
|
34
|
-
/**
|
|
35
|
-
* Get Trigger
|
|
36
|
-
* Get a specific trigger by ID
|
|
37
|
-
* @param triggerId
|
|
38
|
-
* @returns AppTriggerResponseSchema Successful Response
|
|
39
|
-
* @throws ApiError
|
|
40
|
-
*/
|
|
41
|
-
static applicationTriggerGet(triggerId: string): CancelablePromise<AppTriggerResponseSchema>;
|
|
42
23
|
/**
|
|
43
24
|
* Get Application
|
|
44
25
|
* Get a specific application by ID along with its operation catalog
|
|
@@ -94,4 +75,23 @@ export declare class ApplicationsService {
|
|
|
94
75
|
* @throws ApiError
|
|
95
76
|
*/
|
|
96
77
|
static applicationOperationExecute(organizationId: string, authConfigName: string, operationName: string, requestBody: OperationExecutionRequest): CancelablePromise<OperationExecutionResponse>;
|
|
78
|
+
/**
|
|
79
|
+
* List Application Triggers
|
|
80
|
+
* @param organizationId
|
|
81
|
+
* @param authConfigName
|
|
82
|
+
* @param search
|
|
83
|
+
* @param limit
|
|
84
|
+
* @returns AppTriggerListResponseSchema Successful Response
|
|
85
|
+
* @throws ApiError
|
|
86
|
+
*/
|
|
87
|
+
static applicationTriggerList(organizationId: string, authConfigName: string, search?: (string | null), limit?: number): CancelablePromise<AppTriggerListResponseSchema>;
|
|
88
|
+
/**
|
|
89
|
+
* Get Application Trigger
|
|
90
|
+
* @param organizationId
|
|
91
|
+
* @param authConfigName
|
|
92
|
+
* @param triggerName
|
|
93
|
+
* @returns AppTriggerResponseSchema Successful Response
|
|
94
|
+
* @throws ApiError
|
|
95
|
+
*/
|
|
96
|
+
static applicationTriggerGet(organizationId: string, authConfigName: string, triggerName: string): CancelablePromise<AppTriggerResponseSchema>;
|
|
97
97
|
}
|
|
@@ -22,50 +22,6 @@ export class ApplicationsService {
|
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
26
|
-
* List Triggers
|
|
27
|
-
* Get all triggers. Optionally filter by application_id and search in description
|
|
28
|
-
* @param applicationId
|
|
29
|
-
* @param search
|
|
30
|
-
* @param limit
|
|
31
|
-
* @param pageToken
|
|
32
|
-
* @returns AppTriggerListResponseSchema Successful Response
|
|
33
|
-
* @throws ApiError
|
|
34
|
-
*/
|
|
35
|
-
static applicationTriggerList(applicationId, search, limit = 100, pageToken) {
|
|
36
|
-
return __request(OpenAPI, {
|
|
37
|
-
method: 'GET',
|
|
38
|
-
url: '/integrations/applications/triggers',
|
|
39
|
-
query: {
|
|
40
|
-
'application_id': applicationId,
|
|
41
|
-
'search': search,
|
|
42
|
-
'limit': limit,
|
|
43
|
-
'page_token': pageToken,
|
|
44
|
-
},
|
|
45
|
-
errors: {
|
|
46
|
-
422: `Validation Error`,
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Get Trigger
|
|
52
|
-
* Get a specific trigger by ID
|
|
53
|
-
* @param triggerId
|
|
54
|
-
* @returns AppTriggerResponseSchema Successful Response
|
|
55
|
-
* @throws ApiError
|
|
56
|
-
*/
|
|
57
|
-
static applicationTriggerGet(triggerId) {
|
|
58
|
-
return __request(OpenAPI, {
|
|
59
|
-
method: 'GET',
|
|
60
|
-
url: '/integrations/applications/triggers/{trigger_id}',
|
|
61
|
-
path: {
|
|
62
|
-
'trigger_id': triggerId,
|
|
63
|
-
},
|
|
64
|
-
errors: {
|
|
65
|
-
422: `Validation Error`,
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
25
|
/**
|
|
70
26
|
* Get Application
|
|
71
27
|
* Get a specific application by ID along with its operation catalog
|
|
@@ -204,4 +160,52 @@ export class ApplicationsService {
|
|
|
204
160
|
},
|
|
205
161
|
});
|
|
206
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* List Application Triggers
|
|
165
|
+
* @param organizationId
|
|
166
|
+
* @param authConfigName
|
|
167
|
+
* @param search
|
|
168
|
+
* @param limit
|
|
169
|
+
* @returns AppTriggerListResponseSchema Successful Response
|
|
170
|
+
* @throws ApiError
|
|
171
|
+
*/
|
|
172
|
+
static applicationTriggerList(organizationId, authConfigName, search, limit = 100) {
|
|
173
|
+
return __request(OpenAPI, {
|
|
174
|
+
method: 'GET',
|
|
175
|
+
url: '/organizations/{organization_id}/integrations/{auth_config_name}/triggers',
|
|
176
|
+
path: {
|
|
177
|
+
'organization_id': organizationId,
|
|
178
|
+
'auth_config_name': authConfigName,
|
|
179
|
+
},
|
|
180
|
+
query: {
|
|
181
|
+
'search': search,
|
|
182
|
+
'limit': limit,
|
|
183
|
+
},
|
|
184
|
+
errors: {
|
|
185
|
+
422: `Validation Error`,
|
|
186
|
+
},
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Get Application Trigger
|
|
191
|
+
* @param organizationId
|
|
192
|
+
* @param authConfigName
|
|
193
|
+
* @param triggerName
|
|
194
|
+
* @returns AppTriggerResponseSchema Successful Response
|
|
195
|
+
* @throws ApiError
|
|
196
|
+
*/
|
|
197
|
+
static applicationTriggerGet(organizationId, authConfigName, triggerName) {
|
|
198
|
+
return __request(OpenAPI, {
|
|
199
|
+
method: 'GET',
|
|
200
|
+
url: '/organizations/{organization_id}/integrations/{auth_config_name}/triggers/{trigger_name}',
|
|
201
|
+
path: {
|
|
202
|
+
'organization_id': organizationId,
|
|
203
|
+
'auth_config_name': authConfigName,
|
|
204
|
+
'trigger_name': triggerName,
|
|
205
|
+
},
|
|
206
|
+
errors: {
|
|
207
|
+
422: `Validation Error`,
|
|
208
|
+
},
|
|
209
|
+
});
|
|
210
|
+
}
|
|
207
211
|
}
|
|
@@ -6,6 +6,9 @@ import type { FileDetailResponse } from '../models/FileDetailResponse.js';
|
|
|
6
6
|
import type { FileListResponse } from '../models/FileListResponse.js';
|
|
7
7
|
import type { FileSearchRequest } from '../models/FileSearchRequest.js';
|
|
8
8
|
import type { FileSearchResponse } from '../models/FileSearchResponse.js';
|
|
9
|
+
import type { FileSignedUrlRequest } from '../models/FileSignedUrlRequest.js';
|
|
10
|
+
import type { FileSignedUrlResponse } from '../models/FileSignedUrlResponse.js';
|
|
11
|
+
import type { FileUrlResponse } from '../models/FileUrlResponse.js';
|
|
9
12
|
import type { update } from '../models/update.js';
|
|
10
13
|
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
11
14
|
export declare class FilesService {
|
|
@@ -109,6 +112,15 @@ export declare class FilesService {
|
|
|
109
112
|
* @throws ApiError
|
|
110
113
|
*/
|
|
111
114
|
static fileSearch(podId: string, requestBody: FileSearchRequest): CancelablePromise<FileSearchResponse>;
|
|
115
|
+
/**
|
|
116
|
+
* Create a public, hit-capped signed URL for a file
|
|
117
|
+
* @param podId
|
|
118
|
+
* @param path
|
|
119
|
+
* @param requestBody
|
|
120
|
+
* @returns FileSignedUrlResponse Successful Response
|
|
121
|
+
* @throws ApiError
|
|
122
|
+
*/
|
|
123
|
+
static fileSignedUrl(podId: string, path: string, requestBody?: (FileSignedUrlRequest | null)): CancelablePromise<FileSignedUrlResponse>;
|
|
112
124
|
/**
|
|
113
125
|
* Get Directory Tree
|
|
114
126
|
* @param podId
|
|
@@ -118,4 +130,12 @@ export declare class FilesService {
|
|
|
118
130
|
* @throws ApiError
|
|
119
131
|
*/
|
|
120
132
|
static fileTree(podId: string, rootPath?: string, filesPerDirectory?: number): CancelablePromise<DirectoryTreeResponse>;
|
|
133
|
+
/**
|
|
134
|
+
* Get a short-lived URL for a file
|
|
135
|
+
* @param podId
|
|
136
|
+
* @param path
|
|
137
|
+
* @returns FileUrlResponse Successful Response
|
|
138
|
+
* @throws ApiError
|
|
139
|
+
*/
|
|
140
|
+
static fileUrl(podId: string, path: string): CancelablePromise<FileUrlResponse>;
|
|
121
141
|
}
|
|
@@ -269,6 +269,31 @@ export class FilesService {
|
|
|
269
269
|
},
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
|
+
/**
|
|
273
|
+
* Create a public, hit-capped signed URL for a file
|
|
274
|
+
* @param podId
|
|
275
|
+
* @param path
|
|
276
|
+
* @param requestBody
|
|
277
|
+
* @returns FileSignedUrlResponse Successful Response
|
|
278
|
+
* @throws ApiError
|
|
279
|
+
*/
|
|
280
|
+
static fileSignedUrl(podId, path, requestBody) {
|
|
281
|
+
return __request(OpenAPI, {
|
|
282
|
+
method: 'POST',
|
|
283
|
+
url: '/pods/{pod_id}/datastore/files/signed-url',
|
|
284
|
+
path: {
|
|
285
|
+
'pod_id': podId,
|
|
286
|
+
},
|
|
287
|
+
query: {
|
|
288
|
+
'path': path,
|
|
289
|
+
},
|
|
290
|
+
body: requestBody,
|
|
291
|
+
mediaType: 'application/json',
|
|
292
|
+
errors: {
|
|
293
|
+
422: `Validation Error`,
|
|
294
|
+
},
|
|
295
|
+
});
|
|
296
|
+
}
|
|
272
297
|
/**
|
|
273
298
|
* Get Directory Tree
|
|
274
299
|
* @param podId
|
|
@@ -293,4 +318,26 @@ export class FilesService {
|
|
|
293
318
|
},
|
|
294
319
|
});
|
|
295
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* Get a short-lived URL for a file
|
|
323
|
+
* @param podId
|
|
324
|
+
* @param path
|
|
325
|
+
* @returns FileUrlResponse Successful Response
|
|
326
|
+
* @throws ApiError
|
|
327
|
+
*/
|
|
328
|
+
static fileUrl(podId, path) {
|
|
329
|
+
return __request(OpenAPI, {
|
|
330
|
+
method: 'GET',
|
|
331
|
+
url: '/pods/{pod_id}/datastore/files/url',
|
|
332
|
+
path: {
|
|
333
|
+
'pod_id': podId,
|
|
334
|
+
},
|
|
335
|
+
query: {
|
|
336
|
+
'path': path,
|
|
337
|
+
},
|
|
338
|
+
errors: {
|
|
339
|
+
422: `Validation Error`,
|
|
340
|
+
},
|
|
341
|
+
});
|
|
342
|
+
}
|
|
296
343
|
}
|
|
@@ -4,7 +4,7 @@ import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
|
4
4
|
export declare class QueryService {
|
|
5
5
|
/**
|
|
6
6
|
* Execute Query
|
|
7
|
-
* Execute a read-only SQL query inside the datastore schema. Joins, aggregates, subqueries, and cross-table reads are allowed
|
|
7
|
+
* Execute a read-only SQL query inside the datastore schema. Joins, aggregates, subqueries, and cross-table reads are allowed, including across RLS-enabled tables — rows of RLS tables are scoped to the caller (table admins see all rows). Only a single read-only statement is permitted; mutating statements and cross-schema references are rejected.
|
|
8
8
|
* @param podId
|
|
9
9
|
* @param requestBody
|
|
10
10
|
* @returns DatastoreQueryResponse Successful Response
|
|
@@ -3,7 +3,7 @@ import { request as __request } from '../core/request.js';
|
|
|
3
3
|
export class QueryService {
|
|
4
4
|
/**
|
|
5
5
|
* Execute Query
|
|
6
|
-
* Execute a read-only SQL query inside the datastore schema. Joins, aggregates, subqueries, and cross-table reads are allowed
|
|
6
|
+
* Execute a read-only SQL query inside the datastore schema. Joins, aggregates, subqueries, and cross-table reads are allowed, including across RLS-enabled tables — rows of RLS tables are scoped to the caller (table admins see all rows). Only a single read-only statement is permitted; mutating statements and cross-schema references are rejected.
|
|
7
7
|
* @param podId
|
|
8
8
|
* @param requestBody
|
|
9
9
|
* @returns DatastoreQueryResponse Successful Response
|
|
@@ -14,15 +14,13 @@ export declare class RecordsService {
|
|
|
14
14
|
* @param tableName
|
|
15
15
|
* @param limit Max number of rows to return.
|
|
16
16
|
* @param offset Row offset for direct pagination.
|
|
17
|
-
* @param sortBy Optional column name to sort by.
|
|
18
|
-
* @param order Sort direction for `sort_by`: `asc` or `desc`.
|
|
19
17
|
* @param filter Optional repeated JSON filters for advanced comparisons. Each `filter` value must be a JSON object with shape `{"field":"<column_name>","op":"<operator>","value":<comparison_value>}`. Allowed operators are: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `like`, `ilike`. Repeat the query parameter to combine multiple filters with AND semantics. Examples: `filter={"field":"amount","op":"gt","value":100}` and `filter={"field":"status","op":"eq","value":"OPEN"}`.
|
|
20
18
|
* @param sort Optional repeated JSON sort clauses. Each `sort` value must be a JSON object with shape `{"field":"<column_name>","direction":"<direction>"}`. Allowed directions are: `asc`, `desc`. Repeat the query parameter to provide multi-column sorting in priority order. Example: `sort={"field":"created_at","direction":"desc"}`.
|
|
21
19
|
* @param pageToken Opaque token from a previous response page.
|
|
22
20
|
* @returns RecordListResponse Successful Response
|
|
23
21
|
* @throws ApiError
|
|
24
22
|
*/
|
|
25
|
-
static recordList(podId: string, tableName: string, limit?: number, offset?: number,
|
|
23
|
+
static recordList(podId: string, tableName: string, limit?: number, offset?: number, filter?: (Array<string> | null), sort?: (Array<string> | null), pageToken?: (string | null)): CancelablePromise<RecordListResponse>;
|
|
26
24
|
/**
|
|
27
25
|
* Create Record
|
|
28
26
|
* Insert a record into a table. Returns the created record object keyed by column name (no envelope). Reserved tables (`reserved_*`) are system-managed and cannot be mutated through record write endpoints.
|
|
@@ -8,15 +8,13 @@ export class RecordsService {
|
|
|
8
8
|
* @param tableName
|
|
9
9
|
* @param limit Max number of rows to return.
|
|
10
10
|
* @param offset Row offset for direct pagination.
|
|
11
|
-
* @param sortBy Optional column name to sort by.
|
|
12
|
-
* @param order Sort direction for `sort_by`: `asc` or `desc`.
|
|
13
11
|
* @param filter Optional repeated JSON filters for advanced comparisons. Each `filter` value must be a JSON object with shape `{"field":"<column_name>","op":"<operator>","value":<comparison_value>}`. Allowed operators are: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `like`, `ilike`. Repeat the query parameter to combine multiple filters with AND semantics. Examples: `filter={"field":"amount","op":"gt","value":100}` and `filter={"field":"status","op":"eq","value":"OPEN"}`.
|
|
14
12
|
* @param sort Optional repeated JSON sort clauses. Each `sort` value must be a JSON object with shape `{"field":"<column_name>","direction":"<direction>"}`. Allowed directions are: `asc`, `desc`. Repeat the query parameter to provide multi-column sorting in priority order. Example: `sort={"field":"created_at","direction":"desc"}`.
|
|
15
13
|
* @param pageToken Opaque token from a previous response page.
|
|
16
14
|
* @returns RecordListResponse Successful Response
|
|
17
15
|
* @throws ApiError
|
|
18
16
|
*/
|
|
19
|
-
static recordList(podId, tableName, limit = 20, offset,
|
|
17
|
+
static recordList(podId, tableName, limit = 20, offset, filter, sort, pageToken) {
|
|
20
18
|
return __request(OpenAPI, {
|
|
21
19
|
method: 'GET',
|
|
22
20
|
url: '/pods/{pod_id}/datastore/tables/{table_name}/records',
|
|
@@ -27,8 +25,6 @@ export class RecordsService {
|
|
|
27
25
|
query: {
|
|
28
26
|
'limit': limit,
|
|
29
27
|
'offset': offset,
|
|
30
|
-
'sort_by': sortBy,
|
|
31
|
-
'order': order,
|
|
32
28
|
'filter': filter,
|
|
33
29
|
'sort': sort,
|
|
34
30
|
'page_token': pageToken,
|
|
@@ -2,5 +2,11 @@ import type { ConversationMessage } from "../types.js";
|
|
|
2
2
|
export declare function normalizeConversationStatus(status: unknown): string | undefined;
|
|
3
3
|
export declare function isConversationRunningStatus(status: unknown): boolean;
|
|
4
4
|
export declare function extractConversationMessageText(content: unknown): string;
|
|
5
|
+
/**
|
|
6
|
+
* Display text for a flat conversation message. Text/thinking/notification
|
|
7
|
+
* messages carry their body under `text`; tool_return messages may carry a
|
|
8
|
+
* human-readable payload under `tool_result`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function conversationMessageText(message: Pick<ConversationMessage, "text" | "tool_result"> | null | undefined): string;
|
|
5
11
|
export declare function sortConversationMessagesByCreatedAt(messages: ConversationMessage[]): ConversationMessage[];
|
|
6
12
|
export declare function getLatestAssistantMessage(messages: ConversationMessage[]): ConversationMessage | null;
|
|
@@ -72,6 +72,22 @@ export function extractConversationMessageText(content) {
|
|
|
72
72
|
return content.text.trim();
|
|
73
73
|
return extractTextFromStructuredContentEntry(content);
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Display text for a flat conversation message. Text/thinking/notification
|
|
77
|
+
* messages carry their body under `text`; tool_return messages may carry a
|
|
78
|
+
* human-readable payload under `tool_result`.
|
|
79
|
+
*/
|
|
80
|
+
export function conversationMessageText(message) {
|
|
81
|
+
if (!message)
|
|
82
|
+
return "";
|
|
83
|
+
if (typeof message.text === "string" && message.text.trim().length > 0) {
|
|
84
|
+
return message.text.trim();
|
|
85
|
+
}
|
|
86
|
+
if (message.tool_result !== undefined && message.tool_result !== null) {
|
|
87
|
+
return extractConversationMessageText(message.tool_result);
|
|
88
|
+
}
|
|
89
|
+
return "";
|
|
90
|
+
}
|
|
75
91
|
export function sortConversationMessagesByCreatedAt(messages) {
|
|
76
92
|
return [...messages].sort((a, b) => {
|
|
77
93
|
const aTime = Number.isFinite(new Date(a.created_at).getTime()) ? new Date(a.created_at).getTime() : 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LemmaClient } from "../client.js";
|
|
2
|
-
import type { AgentRuntimeConfig, AvailableModelInfo, Conversation, ConversationModel } from "../types.js";
|
|
2
|
+
import type { AgentRuntimeConfig, AvailableModelInfo, Conversation, ConversationModel, MessageKind } from "../types.js";
|
|
3
3
|
import { type AssistantStreamingTool } from "./useAssistantSession.js";
|
|
4
4
|
export type { AssistantStreamingTool } from "./useAssistantSession.js";
|
|
5
5
|
export interface AssistantConversationScope {
|
|
@@ -50,8 +50,12 @@ export interface AssistantRenderableMessage {
|
|
|
50
50
|
agent_run_id?: string | null;
|
|
51
51
|
metadata?: Record<string, unknown> | null;
|
|
52
52
|
message_metadata?: Record<string, unknown> | null;
|
|
53
|
+
/** Flat message fields, passed through so consumers can inspect the raw kind. */
|
|
54
|
+
kind?: MessageKind;
|
|
53
55
|
tool_call_id?: string | null;
|
|
54
56
|
tool_name?: string | null;
|
|
57
|
+
tool_args?: unknown;
|
|
58
|
+
tool_result?: unknown;
|
|
55
59
|
}
|
|
56
60
|
export interface AssistantAction {
|
|
57
61
|
id: string;
|
|
@@ -94,6 +98,8 @@ export interface UseAssistantControllerResult {
|
|
|
94
98
|
isActiveConversationRunning: boolean;
|
|
95
99
|
isLoading: boolean;
|
|
96
100
|
isLoadingConversations: boolean;
|
|
101
|
+
isLoadingMoreConversations: boolean;
|
|
102
|
+
hasMoreConversations: boolean;
|
|
97
103
|
isLoadingMessages: boolean;
|
|
98
104
|
isLoadingOlderMessages: boolean;
|
|
99
105
|
hasOlderMessages: boolean;
|
|
@@ -113,6 +119,7 @@ export interface UseAssistantControllerResult {
|
|
|
113
119
|
removePendingFile: (fileKey: string) => void;
|
|
114
120
|
clearPendingFiles: () => void;
|
|
115
121
|
loadOlderMessages: () => Promise<boolean>;
|
|
122
|
+
loadMoreConversations: () => Promise<Conversation[]>;
|
|
116
123
|
resolveUserApproval: (approvalId: string, decision: AssistantUserApprovalDecision, response?: Record<string, unknown> | null) => Promise<void>;
|
|
117
124
|
clearMessages: () => void;
|
|
118
125
|
stop: () => void;
|