@base44-preview/sdk 0.7.0-pr.27.96b80f1 → 0.7.0-pr.27.ff44f1a
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/dist/client.d.ts
CHANGED
|
@@ -39,11 +39,11 @@ export declare function createClient(config: {
|
|
|
39
39
|
invoke(functionName: string, data: Record<string, any>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
40
40
|
};
|
|
41
41
|
agents: {
|
|
42
|
-
getConversations: () => Promise<import("
|
|
43
|
-
getConversation: (conversationId: string) => Promise<import("
|
|
44
|
-
listConversations: (filterParams: any) => Promise<import("
|
|
45
|
-
createConversation: (conversation: any) => Promise<import("
|
|
46
|
-
addMessage: (conversation: any, message: any) => Promise<import("
|
|
42
|
+
getConversations: () => Promise<import("./modules/agents.types.js").AgentConversation[]>;
|
|
43
|
+
getConversation: (conversationId: string) => Promise<import("./modules/agents.types.js").AgentConversation | undefined>;
|
|
44
|
+
listConversations: (filterParams: any) => Promise<import("./modules/agents.types.js").AgentConversation[]>;
|
|
45
|
+
createConversation: (conversation: any) => Promise<import("./modules/agents.types.js").AgentConversation>;
|
|
46
|
+
addMessage: (conversation: any, message: any) => Promise<import("./modules/agents.types.js").AgentMessage>;
|
|
47
47
|
subscribeToConversation: (conversationId: string, onUpdate: any) => () => void;
|
|
48
48
|
updateConfig: (config: Partial<import("./modules/agents.js").AgentsModuleConfig>) => void;
|
|
49
49
|
};
|
|
@@ -66,11 +66,11 @@ export declare function createClient(config: {
|
|
|
66
66
|
invoke(functionName: string, data: Record<string, any>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
67
67
|
};
|
|
68
68
|
agents: {
|
|
69
|
-
getConversations: () => Promise<import("
|
|
70
|
-
getConversation: (conversationId: string) => Promise<import("
|
|
71
|
-
listConversations: (filterParams: any) => Promise<import("
|
|
72
|
-
createConversation: (conversation: any) => Promise<import("
|
|
73
|
-
addMessage: (conversation: any, message: any) => Promise<import("
|
|
69
|
+
getConversations: () => Promise<import("./modules/agents.types.js").AgentConversation[]>;
|
|
70
|
+
getConversation: (conversationId: string) => Promise<import("./modules/agents.types.js").AgentConversation | undefined>;
|
|
71
|
+
listConversations: (filterParams: any) => Promise<import("./modules/agents.types.js").AgentConversation[]>;
|
|
72
|
+
createConversation: (conversation: any) => Promise<import("./modules/agents.types.js").AgentConversation>;
|
|
73
|
+
addMessage: (conversation: any, message: any) => Promise<import("./modules/agents.types.js").AgentMessage>;
|
|
74
74
|
subscribeToConversation: (conversationId: string, onUpdate: any) => () => void;
|
|
75
75
|
updateConfig: (config: Partial<import("./modules/agents.js").AgentsModuleConfig>) => void;
|
|
76
76
|
};
|
|
@@ -100,11 +100,11 @@ export declare function createClientFromRequest(request: Request): {
|
|
|
100
100
|
invoke(functionName: string, data: Record<string, any>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
101
101
|
};
|
|
102
102
|
agents: {
|
|
103
|
-
getConversations: () => Promise<import("
|
|
104
|
-
getConversation: (conversationId: string) => Promise<import("
|
|
105
|
-
listConversations: (filterParams: any) => Promise<import("
|
|
106
|
-
createConversation: (conversation: any) => Promise<import("
|
|
107
|
-
addMessage: (conversation: any, message: any) => Promise<import("
|
|
103
|
+
getConversations: () => Promise<import("./modules/agents.types.js").AgentConversation[]>;
|
|
104
|
+
getConversation: (conversationId: string) => Promise<import("./modules/agents.types.js").AgentConversation | undefined>;
|
|
105
|
+
listConversations: (filterParams: any) => Promise<import("./modules/agents.types.js").AgentConversation[]>;
|
|
106
|
+
createConversation: (conversation: any) => Promise<import("./modules/agents.types.js").AgentConversation>;
|
|
107
|
+
addMessage: (conversation: any, message: any) => Promise<import("./modules/agents.types.js").AgentMessage>;
|
|
108
108
|
subscribeToConversation: (conversationId: string, onUpdate: any) => () => void;
|
|
109
109
|
updateConfig: (config: Partial<import("./modules/agents.js").AgentsModuleConfig>) => void;
|
|
110
110
|
};
|
|
@@ -127,11 +127,11 @@ export declare function createClientFromRequest(request: Request): {
|
|
|
127
127
|
invoke(functionName: string, data: Record<string, any>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
128
128
|
};
|
|
129
129
|
agents: {
|
|
130
|
-
getConversations: () => Promise<import("
|
|
131
|
-
getConversation: (conversationId: string) => Promise<import("
|
|
132
|
-
listConversations: (filterParams: any) => Promise<import("
|
|
133
|
-
createConversation: (conversation: any) => Promise<import("
|
|
134
|
-
addMessage: (conversation: any, message: any) => Promise<import("
|
|
130
|
+
getConversations: () => Promise<import("./modules/agents.types.js").AgentConversation[]>;
|
|
131
|
+
getConversation: (conversationId: string) => Promise<import("./modules/agents.types.js").AgentConversation | undefined>;
|
|
132
|
+
listConversations: (filterParams: any) => Promise<import("./modules/agents.types.js").AgentConversation[]>;
|
|
133
|
+
createConversation: (conversation: any) => Promise<import("./modules/agents.types.js").AgentConversation>;
|
|
134
|
+
addMessage: (conversation: any, message: any) => Promise<import("./modules/agents.types.js").AgentMessage>;
|
|
135
135
|
subscribeToConversation: (conversationId: string, onUpdate: any) => () => void;
|
|
136
136
|
updateConfig: (config: Partial<import("./modules/agents.js").AgentsModuleConfig>) => void;
|
|
137
137
|
};
|
package/dist/modules/agents.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { AgentConversation, AgentMessage } from "./agents.types";
|
|
1
2
|
export type AgentsModuleConfig = {
|
|
2
3
|
serverUrl: string;
|
|
3
4
|
appId: string;
|
|
4
5
|
token?: string;
|
|
5
6
|
};
|
|
6
7
|
export declare function createAgentsModule({ appId, serverUrl, token, }: AgentsModuleConfig): {
|
|
7
|
-
getConversations: () => Promise<
|
|
8
|
-
getConversation: (conversationId: string) => Promise<
|
|
9
|
-
listConversations: (filterParams: any) => Promise<
|
|
10
|
-
createConversation: (conversation: any) => Promise<
|
|
11
|
-
addMessage: (conversation: any, message: any) => Promise<
|
|
8
|
+
getConversations: () => Promise<AgentConversation[]>;
|
|
9
|
+
getConversation: (conversationId: string) => Promise<AgentConversation | undefined>;
|
|
10
|
+
listConversations: (filterParams: any) => Promise<AgentConversation[]>;
|
|
11
|
+
createConversation: (conversation: any) => Promise<AgentConversation>;
|
|
12
|
+
addMessage: (conversation: any, message: any) => Promise<AgentMessage>;
|
|
12
13
|
subscribeToConversation: (conversationId: string, onUpdate: any) => () => void;
|
|
13
14
|
updateConfig: (config: Partial<AgentsModuleConfig>) => void;
|
|
14
15
|
};
|
package/dist/modules/agents.js
CHANGED
|
@@ -35,7 +35,9 @@ export function createAgentsModule({ appId, serverUrl, token, }) {
|
|
|
35
35
|
return axios.get(`/conversations/${conversationId}`);
|
|
36
36
|
};
|
|
37
37
|
const listConversations = (filterParams) => {
|
|
38
|
-
return axios.get(`/conversations`, {
|
|
38
|
+
return axios.get(`/conversations`, {
|
|
39
|
+
params: filterParams,
|
|
40
|
+
});
|
|
39
41
|
};
|
|
40
42
|
const createConversation = (conversation) => {
|
|
41
43
|
return axios.post(`/conversations`, conversation);
|
|
@@ -85,7 +87,7 @@ function createAgentsAxiosClient({ serverUrl, appId, token, }) {
|
|
|
85
87
|
appId,
|
|
86
88
|
serverUrl,
|
|
87
89
|
token,
|
|
88
|
-
interceptResponses:
|
|
90
|
+
interceptResponses: true,
|
|
89
91
|
headers: {
|
|
90
92
|
"X-App-Id": String(appId),
|
|
91
93
|
},
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type AgentConversation = {
|
|
2
|
+
id: string;
|
|
3
|
+
app_id: string;
|
|
4
|
+
agent_name: string;
|
|
5
|
+
created_by_id: string;
|
|
6
|
+
messages: AgentMessage[];
|
|
7
|
+
metadata?: Record<string, any>;
|
|
8
|
+
};
|
|
9
|
+
export type AgentMessage = {
|
|
10
|
+
id: string;
|
|
11
|
+
role: "user" | "assistant" | "system";
|
|
12
|
+
reasoning: {
|
|
13
|
+
start_date: string;
|
|
14
|
+
end_date?: string;
|
|
15
|
+
content: string;
|
|
16
|
+
};
|
|
17
|
+
content?: string | Record<string, any> | null;
|
|
18
|
+
file_urls?: string[] | null;
|
|
19
|
+
tool_calls?: {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
arguments_string: string;
|
|
23
|
+
status: "running" | "success" | "error" | "stopped";
|
|
24
|
+
results?: string | null;
|
|
25
|
+
}[] | null;
|
|
26
|
+
usage: {
|
|
27
|
+
prompt_tokens?: number;
|
|
28
|
+
completion_tokens?: number;
|
|
29
|
+
} | null;
|
|
30
|
+
hidden?: boolean;
|
|
31
|
+
custom_context?: {
|
|
32
|
+
message: string;
|
|
33
|
+
data: Record<string, any>;
|
|
34
|
+
type: string;
|
|
35
|
+
}[] | null;
|
|
36
|
+
model: string | null;
|
|
37
|
+
checkpoint_id: string | null;
|
|
38
|
+
metadata?: {
|
|
39
|
+
created_date: string;
|
|
40
|
+
created_by_email: string;
|
|
41
|
+
created_by_full_name: string | null;
|
|
42
|
+
};
|
|
43
|
+
additional_message_params?: Record<string, any>;
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|