@inkeep/agents-core 0.0.0-dev-20260123202200 → 0.0.0-dev-20260123205017
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/auth/auth-schema.d.ts +82 -82
- package/dist/auth/auth-validation-schemas.d.ts +129 -129
- package/dist/auth/auth.d.ts +18 -18
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +3 -2
- package/dist/data-access/manage/agentFull.js +2 -0
- package/dist/data-access/manage/agents.d.ts +45 -45
- package/dist/data-access/manage/agents.js +3 -2
- package/dist/data-access/manage/artifactComponents.d.ts +10 -10
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/functionTools.d.ts +33 -12
- package/dist/data-access/manage/functionTools.js +10 -6
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +22 -22
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgents.d.ts +27 -27
- package/dist/data-access/manage/tools.d.ts +15 -15
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/conversations.d.ts +19 -19
- package/dist/data-access/runtime/messages.d.ts +15 -15
- package/dist/data-access/runtime/tasks.d.ts +5 -5
- package/dist/db/manage/manage-schema.d.ts +323 -300
- package/dist/db/manage/manage-schema.js +1 -0
- package/dist/db/runtime/runtime-schema.d.ts +163 -163
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/schemas.d.ts +1599 -1548
- package/drizzle/manage/0004_curious_phil_sheldon.sql +2 -0
- package/drizzle/manage/meta/0004_snapshot.json +3141 -0
- package/drizzle/manage/meta/_journal.json +7 -0
- package/package.json +1 -1
package/dist/auth/auth.d.ts
CHANGED
|
@@ -852,25 +852,25 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
852
852
|
ac: better_auth_plugins20.AccessControl;
|
|
853
853
|
roles: {
|
|
854
854
|
member: {
|
|
855
|
-
authorize<K_1 extends "
|
|
856
|
-
actions: better_auth_plugins20.Subset<"
|
|
855
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
|
|
856
|
+
actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
|
|
857
857
|
connector: "OR" | "AND";
|
|
858
858
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
|
|
859
|
-
statements: better_auth_plugins20.Subset<"
|
|
859
|
+
statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
|
|
860
860
|
};
|
|
861
861
|
admin: {
|
|
862
|
-
authorize<K_1 extends "
|
|
863
|
-
actions: better_auth_plugins20.Subset<"
|
|
862
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
|
|
863
|
+
actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
|
|
864
864
|
connector: "OR" | "AND";
|
|
865
865
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
|
|
866
|
-
statements: better_auth_plugins20.Subset<"
|
|
866
|
+
statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
|
|
867
867
|
};
|
|
868
868
|
owner: {
|
|
869
|
-
authorize<K_1 extends "
|
|
870
|
-
actions: better_auth_plugins20.Subset<"
|
|
869
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
|
|
870
|
+
actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
|
|
871
871
|
connector: "OR" | "AND";
|
|
872
872
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
|
|
873
|
-
statements: better_auth_plugins20.Subset<"
|
|
873
|
+
statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
|
|
874
874
|
};
|
|
875
875
|
};
|
|
876
876
|
membershipLimit: number;
|
|
@@ -1161,25 +1161,25 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1161
1161
|
ac: better_auth_plugins20.AccessControl;
|
|
1162
1162
|
roles: {
|
|
1163
1163
|
member: {
|
|
1164
|
-
authorize<K_1 extends "
|
|
1165
|
-
actions: better_auth_plugins20.Subset<"
|
|
1164
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
|
|
1165
|
+
actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
|
|
1166
1166
|
connector: "OR" | "AND";
|
|
1167
1167
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
|
|
1168
|
-
statements: better_auth_plugins20.Subset<"
|
|
1168
|
+
statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
|
|
1169
1169
|
};
|
|
1170
1170
|
admin: {
|
|
1171
|
-
authorize<K_1 extends "
|
|
1172
|
-
actions: better_auth_plugins20.Subset<"
|
|
1171
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
|
|
1172
|
+
actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
|
|
1173
1173
|
connector: "OR" | "AND";
|
|
1174
1174
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
|
|
1175
|
-
statements: better_auth_plugins20.Subset<"
|
|
1175
|
+
statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
|
|
1176
1176
|
};
|
|
1177
1177
|
owner: {
|
|
1178
|
-
authorize<K_1 extends "
|
|
1179
|
-
actions: better_auth_plugins20.Subset<"
|
|
1178
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
|
|
1179
|
+
actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
|
|
1180
1180
|
connector: "OR" | "AND";
|
|
1181
1181
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
|
|
1182
|
-
statements: better_auth_plugins20.Subset<"
|
|
1182
|
+
statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
|
|
1183
1183
|
};
|
|
1184
1184
|
};
|
|
1185
1185
|
membershipLimit: number;
|
|
@@ -5,25 +5,25 @@ import { organizationClient } from "better-auth/client/plugins";
|
|
|
5
5
|
//#region src/auth/permissions.d.ts
|
|
6
6
|
declare const ac: AccessControl;
|
|
7
7
|
declare const memberRole: {
|
|
8
|
-
authorize<K_1 extends "
|
|
9
|
-
actions: better_auth_plugins0.Subset<"
|
|
8
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
|
|
9
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
|
|
10
10
|
connector: "OR" | "AND";
|
|
11
11
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
12
|
-
statements: better_auth_plugins0.Subset<"
|
|
12
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
|
|
13
13
|
};
|
|
14
14
|
declare const adminRole: {
|
|
15
|
-
authorize<K_1 extends "
|
|
16
|
-
actions: better_auth_plugins0.Subset<"
|
|
15
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
|
|
16
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
|
|
17
17
|
connector: "OR" | "AND";
|
|
18
18
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
19
|
-
statements: better_auth_plugins0.Subset<"
|
|
19
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
|
|
20
20
|
};
|
|
21
21
|
declare const ownerRole: {
|
|
22
|
-
authorize<K_1 extends "
|
|
23
|
-
actions: better_auth_plugins0.Subset<"
|
|
22
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
|
|
23
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
|
|
24
24
|
connector: "OR" | "AND";
|
|
25
25
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
26
|
-
statements: better_auth_plugins0.Subset<"
|
|
26
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
|
|
27
27
|
};
|
|
28
28
|
//#endregion
|
|
29
29
|
export { ac, adminRole, memberRole, organizationClient, ownerRole };
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import "./types/index.js";
|
|
|
6
6
|
import { DEFAULT_NANGO_STORE_ID } from "./credential-stores/default-constants.js";
|
|
7
7
|
import { detectAuthenticationRequired } from "./utils/auth-detection.js";
|
|
8
8
|
import { validatePropsAsJsonSchema } from "./validation/props-validation.js";
|
|
9
|
+
import "./index.js";
|
|
9
10
|
import { AgentStopWhen, AgentStopWhenSchema, ApiKeyApiUpdateSchema, FullAgentAgentInsertSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettings, ModelSettingsSchema, SignatureSource, SignatureVerificationConfig, SignatureVerificationConfigSchema, SignedComponent, StopWhen, StopWhenSchema, SubAgentStopWhen, SubAgentStopWhenSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerInvocationApiSelectSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationStatusEnum, TriggerListResponse, TriggerResponse, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema } from "./validation/schemas.js";
|
|
10
11
|
import { z } from "@hono/zod-openapi";
|
|
11
12
|
|
|
@@ -64,8 +65,8 @@ declare const AgentApiInsertSchema: z.ZodObject<{
|
|
|
64
65
|
canTransferTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
65
66
|
canDelegateTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
67
|
type: z.ZodOptional<z.ZodEnum<{
|
|
67
|
-
external: "external";
|
|
68
68
|
internal: "internal";
|
|
69
|
+
external: "external";
|
|
69
70
|
}>>;
|
|
70
71
|
}, z.core.$strip>;
|
|
71
72
|
declare const ToolApiInsertSchema: z.ZodObject<{
|
|
@@ -192,9 +193,9 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
192
193
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
193
194
|
id: z.ZodString;
|
|
194
195
|
name: z.ZodString;
|
|
196
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
195
197
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
196
198
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
197
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
198
199
|
models: z.ZodOptional<z.ZodObject<{
|
|
199
200
|
base: z.ZodOptional<z.ZodObject<{
|
|
200
201
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -345,6 +345,7 @@ const createFullAgentServerSide = (db, logger = defaultLogger) => async (scopes,
|
|
|
345
345
|
},
|
|
346
346
|
subAgentId,
|
|
347
347
|
functionToolId: toolId,
|
|
348
|
+
toolPolicies,
|
|
348
349
|
relationId: agentToolRelationId
|
|
349
350
|
});
|
|
350
351
|
logger.info({
|
|
@@ -1092,6 +1093,7 @@ const updateFullAgentServerSide = (db, logger = defaultLogger) => async (scopes,
|
|
|
1092
1093
|
},
|
|
1093
1094
|
subAgentId,
|
|
1094
1095
|
functionToolId: toolId,
|
|
1096
|
+
toolPolicies,
|
|
1095
1097
|
relationId: agentToolRelationId
|
|
1096
1098
|
});
|
|
1097
1099
|
logger.info({
|
|
@@ -8,15 +8,17 @@ import { PgTable } from "drizzle-orm/pg-core";
|
|
|
8
8
|
declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
9
9
|
scopes: AgentScopeConfig;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
id: string;
|
|
12
11
|
name: string;
|
|
12
|
+
description: string | null;
|
|
13
|
+
id: string;
|
|
13
14
|
createdAt: string;
|
|
14
15
|
updatedAt: string;
|
|
15
|
-
description: string | null;
|
|
16
|
-
projectId: string;
|
|
17
16
|
tenantId: string;
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
projectId: string;
|
|
18
|
+
stopWhen: {
|
|
19
|
+
transferCountIs?: number | undefined;
|
|
20
|
+
} | null;
|
|
21
|
+
prompt: string | null;
|
|
20
22
|
models: {
|
|
21
23
|
base?: {
|
|
22
24
|
model?: string | undefined;
|
|
@@ -31,7 +33,8 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
31
33
|
providerOptions?: Record<string, any> | undefined;
|
|
32
34
|
} | undefined;
|
|
33
35
|
} | null;
|
|
34
|
-
|
|
36
|
+
defaultSubAgentId: string | null;
|
|
37
|
+
contextConfigId: string | null;
|
|
35
38
|
statusUpdates: {
|
|
36
39
|
enabled?: boolean | undefined;
|
|
37
40
|
numEvents?: number | undefined;
|
|
@@ -47,22 +50,21 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
47
50
|
} | undefined;
|
|
48
51
|
}[] | undefined;
|
|
49
52
|
} | null;
|
|
50
|
-
stopWhen: {
|
|
51
|
-
transferCountIs?: number | undefined;
|
|
52
|
-
} | null;
|
|
53
53
|
} | null>;
|
|
54
54
|
declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
55
55
|
scopes: AgentScopeConfig;
|
|
56
56
|
}) => Promise<{
|
|
57
|
-
id: string;
|
|
58
57
|
name: string;
|
|
58
|
+
description: string | null;
|
|
59
|
+
id: string;
|
|
59
60
|
createdAt: string;
|
|
60
61
|
updatedAt: string;
|
|
61
|
-
description: string | null;
|
|
62
|
-
projectId: string;
|
|
63
62
|
tenantId: string;
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
projectId: string;
|
|
64
|
+
stopWhen: {
|
|
65
|
+
transferCountIs?: number | undefined;
|
|
66
|
+
} | null;
|
|
67
|
+
prompt: string | null;
|
|
66
68
|
models: {
|
|
67
69
|
base?: {
|
|
68
70
|
model?: string | undefined;
|
|
@@ -77,7 +79,8 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
77
79
|
providerOptions?: Record<string, any> | undefined;
|
|
78
80
|
} | undefined;
|
|
79
81
|
} | null;
|
|
80
|
-
|
|
82
|
+
defaultSubAgentId: string | null;
|
|
83
|
+
contextConfigId: string | null;
|
|
81
84
|
statusUpdates: {
|
|
82
85
|
enabled?: boolean | undefined;
|
|
83
86
|
numEvents?: number | undefined;
|
|
@@ -93,18 +96,19 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
93
96
|
} | undefined;
|
|
94
97
|
}[] | undefined;
|
|
95
98
|
} | null;
|
|
96
|
-
stopWhen: {
|
|
97
|
-
transferCountIs?: number | undefined;
|
|
98
|
-
} | null;
|
|
99
99
|
defaultSubAgent: {
|
|
100
|
-
id: string;
|
|
101
100
|
name: string;
|
|
101
|
+
description: string | null;
|
|
102
|
+
id: string;
|
|
102
103
|
createdAt: string;
|
|
103
104
|
updatedAt: string;
|
|
104
|
-
description: string | null;
|
|
105
|
-
agentId: string;
|
|
106
|
-
projectId: string;
|
|
107
105
|
tenantId: string;
|
|
106
|
+
projectId: string;
|
|
107
|
+
stopWhen: {
|
|
108
|
+
stepCountIs?: number | undefined;
|
|
109
|
+
} | null;
|
|
110
|
+
prompt: string | null;
|
|
111
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
108
112
|
models: {
|
|
109
113
|
base?: {
|
|
110
114
|
model?: string | undefined;
|
|
@@ -119,25 +123,23 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
119
123
|
providerOptions?: Record<string, any> | undefined;
|
|
120
124
|
} | undefined;
|
|
121
125
|
} | null;
|
|
122
|
-
|
|
123
|
-
stopWhen: {
|
|
124
|
-
stepCountIs?: number | undefined;
|
|
125
|
-
} | null;
|
|
126
|
-
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
126
|
+
agentId: string;
|
|
127
127
|
} | null;
|
|
128
128
|
} | null>;
|
|
129
129
|
declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
130
130
|
scopes: ProjectScopeConfig;
|
|
131
131
|
}) => Promise<{
|
|
132
|
-
id: string;
|
|
133
132
|
name: string;
|
|
133
|
+
description: string | null;
|
|
134
|
+
id: string;
|
|
134
135
|
createdAt: string;
|
|
135
136
|
updatedAt: string;
|
|
136
|
-
description: string | null;
|
|
137
|
-
projectId: string;
|
|
138
137
|
tenantId: string;
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
projectId: string;
|
|
139
|
+
stopWhen: {
|
|
140
|
+
transferCountIs?: number | undefined;
|
|
141
|
+
} | null;
|
|
142
|
+
prompt: string | null;
|
|
141
143
|
models: {
|
|
142
144
|
base?: {
|
|
143
145
|
model?: string | undefined;
|
|
@@ -152,7 +154,8 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
152
154
|
providerOptions?: Record<string, any> | undefined;
|
|
153
155
|
} | undefined;
|
|
154
156
|
} | null;
|
|
155
|
-
|
|
157
|
+
defaultSubAgentId: string | null;
|
|
158
|
+
contextConfigId: string | null;
|
|
156
159
|
statusUpdates: {
|
|
157
160
|
enabled?: boolean | undefined;
|
|
158
161
|
numEvents?: number | undefined;
|
|
@@ -168,9 +171,6 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
168
171
|
} | undefined;
|
|
169
172
|
}[] | undefined;
|
|
170
173
|
} | null;
|
|
171
|
-
stopWhen: {
|
|
172
|
-
transferCountIs?: number | undefined;
|
|
173
|
-
} | null;
|
|
174
174
|
}[]>;
|
|
175
175
|
declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
176
176
|
scopes: ProjectScopeConfig;
|
|
@@ -228,15 +228,17 @@ declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params:
|
|
|
228
228
|
};
|
|
229
229
|
}>;
|
|
230
230
|
declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
|
|
231
|
-
id: string;
|
|
232
231
|
name: string;
|
|
232
|
+
description: string | null;
|
|
233
|
+
id: string;
|
|
233
234
|
createdAt: string;
|
|
234
235
|
updatedAt: string;
|
|
235
|
-
description: string | null;
|
|
236
|
-
projectId: string;
|
|
237
236
|
tenantId: string;
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
projectId: string;
|
|
238
|
+
stopWhen: {
|
|
239
|
+
transferCountIs?: number | undefined;
|
|
240
|
+
} | null;
|
|
241
|
+
prompt: string | null;
|
|
240
242
|
models: {
|
|
241
243
|
base?: {
|
|
242
244
|
model?: string | undefined;
|
|
@@ -251,7 +253,8 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
251
253
|
providerOptions?: Record<string, any> | undefined;
|
|
252
254
|
} | undefined;
|
|
253
255
|
} | null;
|
|
254
|
-
|
|
256
|
+
defaultSubAgentId: string | null;
|
|
257
|
+
contextConfigId: string | null;
|
|
255
258
|
statusUpdates: {
|
|
256
259
|
enabled?: boolean | undefined;
|
|
257
260
|
numEvents?: number | undefined;
|
|
@@ -267,9 +270,6 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
267
270
|
} | undefined;
|
|
268
271
|
}[] | undefined;
|
|
269
272
|
} | null;
|
|
270
|
-
stopWhen: {
|
|
271
|
-
transferCountIs?: number | undefined;
|
|
272
|
-
} | null;
|
|
273
273
|
}>;
|
|
274
274
|
declare const updateAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
275
275
|
scopes: AgentScopeConfig;
|
|
@@ -198,7 +198,8 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
|
|
|
198
198
|
tenantId: functionTools.tenantId,
|
|
199
199
|
projectId: functionTools.projectId,
|
|
200
200
|
agentId: functionTools.agentId,
|
|
201
|
-
agentToolRelationId: subAgentFunctionToolRelations.id
|
|
201
|
+
agentToolRelationId: subAgentFunctionToolRelations.id,
|
|
202
|
+
toolPolicies: subAgentFunctionToolRelations.toolPolicies
|
|
202
203
|
}).from(subAgentFunctionToolRelations).innerJoin(functionTools, and(eq(subAgentFunctionToolRelations.functionToolId, functionTools.id), eq(subAgentFunctionToolRelations.tenantId, functionTools.tenantId), eq(subAgentFunctionToolRelations.projectId, functionTools.projectId), eq(subAgentFunctionToolRelations.agentId, functionTools.agentId))).where(and(eq(subAgentFunctionToolRelations.tenantId, tenantId), eq(subAgentFunctionToolRelations.projectId, projectId), eq(subAgentFunctionToolRelations.agentId, agentId), eq(subAgentFunctionToolRelations.subAgentId, agent$1.id)));
|
|
203
204
|
const agentDataComponentIds = (await db.query.subAgentDataComponents.findMany({ where: and(eq(subAgentDataComponents.tenantId, tenantId), eq(subAgentDataComponents.subAgentId, agent$1.id)) })).map((rel) => rel.dataComponentId);
|
|
204
205
|
const agentArtifactComponentIds = (await db.query.subAgentArtifactComponents.findMany({ where: and(eq(subAgentArtifactComponents.tenantId, tenantId), eq(subAgentArtifactComponents.subAgentId, agent$1.id)) })).map((rel) => rel.artifactComponentId);
|
|
@@ -214,7 +215,7 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
|
|
|
214
215
|
toolId: tool.id,
|
|
215
216
|
toolSelection: null,
|
|
216
217
|
headers: null,
|
|
217
|
-
toolPolicies: null
|
|
218
|
+
toolPolicies: tool.toolPolicies || null
|
|
218
219
|
}));
|
|
219
220
|
const canUse = [...mcpToolCanUse, ...functionToolCanUse];
|
|
220
221
|
return {
|
|
@@ -7,13 +7,13 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
|
|
|
7
7
|
scopes: ProjectScopeConfig;
|
|
8
8
|
id: string;
|
|
9
9
|
}) => Promise<{
|
|
10
|
-
id: string;
|
|
11
10
|
name: string;
|
|
11
|
+
description: string | null;
|
|
12
|
+
id: string;
|
|
12
13
|
createdAt: string;
|
|
13
14
|
updatedAt: string;
|
|
14
|
-
description: string | null;
|
|
15
|
-
projectId: string;
|
|
16
15
|
tenantId: string;
|
|
16
|
+
projectId: string;
|
|
17
17
|
props: Record<string, unknown> | null;
|
|
18
18
|
render: {
|
|
19
19
|
component: string;
|
|
@@ -49,13 +49,13 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
|
|
|
49
49
|
};
|
|
50
50
|
}>;
|
|
51
51
|
declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
|
|
52
|
-
id: string;
|
|
53
52
|
name: string;
|
|
53
|
+
description: string | null;
|
|
54
|
+
id: string;
|
|
54
55
|
createdAt: string;
|
|
55
56
|
updatedAt: string;
|
|
56
|
-
description: string | null;
|
|
57
|
-
projectId: string;
|
|
58
57
|
tenantId: string;
|
|
58
|
+
projectId: string;
|
|
59
59
|
props: Record<string, unknown> | null;
|
|
60
60
|
render: {
|
|
61
61
|
component: string;
|
|
@@ -106,10 +106,10 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
|
|
|
106
106
|
}) => Promise<{
|
|
107
107
|
id: string;
|
|
108
108
|
createdAt: string;
|
|
109
|
-
agentId: string;
|
|
110
|
-
projectId: string;
|
|
111
109
|
tenantId: string;
|
|
110
|
+
projectId: string;
|
|
112
111
|
subAgentId: string;
|
|
112
|
+
agentId: string;
|
|
113
113
|
artifactComponentId: string;
|
|
114
114
|
}>;
|
|
115
115
|
declare const removeArtifactComponentFromAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -149,10 +149,10 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
|
|
|
149
149
|
}) => Promise<{
|
|
150
150
|
id: string;
|
|
151
151
|
createdAt: string;
|
|
152
|
-
agentId: string;
|
|
153
|
-
projectId: string;
|
|
154
152
|
tenantId: string;
|
|
153
|
+
projectId: string;
|
|
155
154
|
subAgentId: string;
|
|
155
|
+
agentId: string;
|
|
156
156
|
artifactComponentId: string;
|
|
157
157
|
} | null>;
|
|
158
158
|
/**
|
|
@@ -11,11 +11,11 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
11
11
|
id: string;
|
|
12
12
|
createdAt: string;
|
|
13
13
|
updatedAt: string;
|
|
14
|
+
tenantId: string;
|
|
15
|
+
projectId: string;
|
|
16
|
+
agentId: string;
|
|
14
17
|
headersSchema: unknown;
|
|
15
18
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
16
|
-
agentId: string;
|
|
17
|
-
projectId: string;
|
|
18
|
-
tenantId: string;
|
|
19
19
|
} | undefined>;
|
|
20
20
|
declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
21
21
|
scopes: AgentScopeConfig;
|
|
@@ -23,11 +23,11 @@ declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
23
23
|
id: string;
|
|
24
24
|
createdAt: string;
|
|
25
25
|
updatedAt: string;
|
|
26
|
+
tenantId: string;
|
|
27
|
+
projectId: string;
|
|
28
|
+
agentId: string;
|
|
26
29
|
headersSchema: unknown;
|
|
27
30
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
28
|
-
agentId: string;
|
|
29
|
-
projectId: string;
|
|
30
|
-
tenantId: string;
|
|
31
31
|
}[]>;
|
|
32
32
|
declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
33
33
|
scopes: AgentScopeConfig;
|
|
@@ -45,11 +45,11 @@ declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params:
|
|
|
45
45
|
id: string;
|
|
46
46
|
createdAt: string;
|
|
47
47
|
updatedAt: string;
|
|
48
|
+
tenantId: string;
|
|
49
|
+
projectId: string;
|
|
50
|
+
agentId: string;
|
|
48
51
|
headersSchema: unknown;
|
|
49
52
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
50
|
-
agentId: string;
|
|
51
|
-
projectId: string;
|
|
52
|
-
tenantId: string;
|
|
53
53
|
}>;
|
|
54
54
|
declare const updateContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
55
55
|
scopes: AgentScopeConfig;
|
|
@@ -85,11 +85,11 @@ declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params:
|
|
|
85
85
|
id: string;
|
|
86
86
|
createdAt: string;
|
|
87
87
|
updatedAt: string;
|
|
88
|
+
tenantId: string;
|
|
89
|
+
projectId: string;
|
|
90
|
+
agentId: string;
|
|
88
91
|
headersSchema: unknown;
|
|
89
92
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
90
|
-
agentId: string;
|
|
91
|
-
projectId: string;
|
|
92
|
-
tenantId: string;
|
|
93
93
|
}>;
|
|
94
94
|
//#endregion
|
|
95
95
|
export { countContextConfigs, createContextConfig, deleteContextConfig, getContextConfigById, hasContextConfig, listContextConfigs, listContextConfigsPaginated, updateContextConfig, upsertContextConfig };
|
|
@@ -66,10 +66,10 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
|
|
|
66
66
|
}) => Promise<{
|
|
67
67
|
id: string;
|
|
68
68
|
createdAt: string;
|
|
69
|
-
agentId: string;
|
|
70
|
-
projectId: string;
|
|
71
69
|
tenantId: string;
|
|
70
|
+
projectId: string;
|
|
72
71
|
subAgentId: string;
|
|
72
|
+
agentId: string;
|
|
73
73
|
dataComponentId: string;
|
|
74
74
|
}>;
|
|
75
75
|
/**
|
|
@@ -108,10 +108,10 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
|
|
|
108
108
|
}) => Promise<{
|
|
109
109
|
id: string;
|
|
110
110
|
createdAt: string;
|
|
111
|
-
agentId: string;
|
|
112
|
-
projectId: string;
|
|
113
111
|
tenantId: string;
|
|
112
|
+
projectId: string;
|
|
114
113
|
subAgentId: string;
|
|
114
|
+
agentId: string;
|
|
115
115
|
dataComponentId: string;
|
|
116
116
|
} | null>;
|
|
117
117
|
/**
|
|
@@ -53,14 +53,14 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
53
53
|
data: FunctionToolApiInsert;
|
|
54
54
|
scopes: AgentScopeConfig;
|
|
55
55
|
}) => Promise<{
|
|
56
|
-
id: string;
|
|
57
56
|
name: string;
|
|
57
|
+
description: string | null;
|
|
58
|
+
id: string;
|
|
58
59
|
createdAt: string;
|
|
59
60
|
updatedAt: string;
|
|
60
|
-
description: string | null;
|
|
61
|
-
agentId: string;
|
|
62
|
-
projectId: string;
|
|
63
61
|
tenantId: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
agentId: string;
|
|
64
64
|
functionId: string;
|
|
65
65
|
}>;
|
|
66
66
|
/**
|
|
@@ -95,14 +95,14 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
95
95
|
data: FunctionToolApiInsert;
|
|
96
96
|
scopes: AgentScopeConfig;
|
|
97
97
|
}) => Promise<{
|
|
98
|
-
id: string;
|
|
99
98
|
name: string;
|
|
99
|
+
description: string | null;
|
|
100
|
+
id: string;
|
|
100
101
|
createdAt: string;
|
|
101
102
|
updatedAt: string;
|
|
102
|
-
description: string | null;
|
|
103
|
-
agentId: string;
|
|
104
|
-
projectId: string;
|
|
105
103
|
tenantId: string;
|
|
104
|
+
projectId: string;
|
|
105
|
+
agentId: string;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
108
108
|
declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -125,6 +125,9 @@ declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
125
125
|
projectId: string;
|
|
126
126
|
agentId: string;
|
|
127
127
|
relationshipId: string;
|
|
128
|
+
toolPolicies: Record<string, {
|
|
129
|
+
needsApproval?: boolean;
|
|
130
|
+
}> | null;
|
|
128
131
|
}[];
|
|
129
132
|
pagination: {
|
|
130
133
|
page: number;
|
|
@@ -140,6 +143,9 @@ declare const upsertSubAgentFunctionToolRelation: (db: AgentsManageDatabaseClien
|
|
|
140
143
|
scopes: AgentScopeConfig;
|
|
141
144
|
subAgentId: string;
|
|
142
145
|
functionToolId: string;
|
|
146
|
+
toolPolicies?: Record<string, {
|
|
147
|
+
needsApproval?: boolean;
|
|
148
|
+
}> | null;
|
|
143
149
|
relationId?: string;
|
|
144
150
|
}) => Promise<{
|
|
145
151
|
id: string;
|
|
@@ -151,15 +157,21 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
151
157
|
scopes: AgentScopeConfig;
|
|
152
158
|
subAgentId: string;
|
|
153
159
|
functionToolId: string;
|
|
160
|
+
toolPolicies?: Record<string, {
|
|
161
|
+
needsApproval?: boolean;
|
|
162
|
+
}> | null;
|
|
154
163
|
}) => Promise<{
|
|
155
164
|
id: string;
|
|
156
165
|
createdAt: string;
|
|
157
166
|
updatedAt: string;
|
|
158
|
-
agentId: string;
|
|
159
|
-
projectId: string;
|
|
160
167
|
tenantId: string;
|
|
168
|
+
projectId: string;
|
|
161
169
|
subAgentId: string;
|
|
170
|
+
agentId: string;
|
|
162
171
|
functionToolId: string;
|
|
172
|
+
toolPolicies: Record<string, {
|
|
173
|
+
needsApproval?: boolean;
|
|
174
|
+
}> | null;
|
|
163
175
|
}>;
|
|
164
176
|
/**
|
|
165
177
|
* Update an agent-function tool relation
|
|
@@ -170,6 +182,9 @@ declare const updateSubAgentFunctionToolRelation: (db: AgentsManageDatabaseClien
|
|
|
170
182
|
data: {
|
|
171
183
|
subAgentId: string;
|
|
172
184
|
functionToolId: string;
|
|
185
|
+
toolPolicies?: Record<string, {
|
|
186
|
+
needsApproval?: boolean;
|
|
187
|
+
}> | null;
|
|
173
188
|
};
|
|
174
189
|
}) => Promise<{
|
|
175
190
|
id: string;
|
|
@@ -207,15 +222,21 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
207
222
|
scopes: AgentScopeConfig;
|
|
208
223
|
subAgentId: string;
|
|
209
224
|
functionToolId: string;
|
|
225
|
+
toolPolicies?: Record<string, {
|
|
226
|
+
needsApproval?: boolean;
|
|
227
|
+
}> | null;
|
|
210
228
|
}) => Promise<{
|
|
211
229
|
id: string;
|
|
212
230
|
createdAt: string;
|
|
213
231
|
updatedAt: string;
|
|
214
|
-
agentId: string;
|
|
215
|
-
projectId: string;
|
|
216
232
|
tenantId: string;
|
|
233
|
+
projectId: string;
|
|
217
234
|
subAgentId: string;
|
|
235
|
+
agentId: string;
|
|
218
236
|
functionToolId: string;
|
|
237
|
+
toolPolicies: Record<string, {
|
|
238
|
+
needsApproval?: boolean;
|
|
239
|
+
}> | null;
|
|
219
240
|
}>;
|
|
220
241
|
//#endregion
|
|
221
242
|
export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
|