@inkeep/agents-core 0.0.0-dev-20260207220105 → 0.0.0-dev-20260207223415
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 +83 -83
- package/dist/auth/authz/config.d.ts +5 -1
- package/dist/auth/authz/config.js +8 -3
- package/dist/auth/init.js +11 -1
- package/dist/auth/spicedb-schema.d.ts +9 -0
- package/dist/auth/spicedb-schema.js +24 -0
- package/dist/client-exports.d.ts +4 -4
- package/dist/data-access/manage/agents.d.ts +47 -47
- package/dist/data-access/manage/artifactComponents.d.ts +12 -12
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +6 -6
- package/dist/data-access/manage/functionTools.d.ts +18 -18
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +28 -28
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgents.d.ts +21 -21
- package/dist/data-access/manage/tools.d.ts +24 -24
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/conversations.d.ts +27 -27
- package/dist/data-access/runtime/messages.d.ts +18 -18
- package/dist/data-access/runtime/tasks.d.ts +7 -7
- package/dist/db/runtime/runtime-schema.d.ts +6 -6
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +1686 -1686
- package/package.json +1 -1
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
//#region src/auth/authz/config.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Check if a SpiceDB endpoint is localhost (used for TLS auto-detection).
|
|
4
|
+
*/
|
|
5
|
+
declare function isLocalhostEndpoint(endpoint: string): boolean;
|
|
2
6
|
/**
|
|
3
7
|
* Get SpiceDB connection configuration from environment variables.
|
|
4
8
|
* TLS is auto-detected: disabled for localhost, enabled for remote endpoints.
|
|
@@ -94,4 +98,4 @@ interface ProjectPermissions {
|
|
|
94
98
|
canEdit: boolean;
|
|
95
99
|
}
|
|
96
100
|
//#endregion
|
|
97
|
-
export { OrgRole, OrgRoles, ProjectPermissionLevel, ProjectPermissions, ProjectRole, ProjectRoles, SpiceDbOrgPermission, SpiceDbOrgPermissions, SpiceDbProjectPermission, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, getSpiceDbConfig };
|
|
101
|
+
export { OrgRole, OrgRoles, ProjectPermissionLevel, ProjectPermissions, ProjectRole, ProjectRoles, SpiceDbOrgPermission, SpiceDbOrgPermissions, SpiceDbProjectPermission, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, getSpiceDbConfig, isLocalhostEndpoint };
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
//#region src/auth/authz/config.ts
|
|
2
2
|
/**
|
|
3
|
+
* Check if a SpiceDB endpoint is localhost (used for TLS auto-detection).
|
|
4
|
+
*/
|
|
5
|
+
function isLocalhostEndpoint(endpoint) {
|
|
6
|
+
return endpoint.startsWith("localhost") || endpoint.startsWith("127.0.0.1");
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
3
9
|
* Get SpiceDB connection configuration from environment variables.
|
|
4
10
|
* TLS is auto-detected: disabled for localhost, enabled for remote endpoints.
|
|
5
11
|
*/
|
|
6
12
|
function getSpiceDbConfig() {
|
|
7
13
|
const endpoint = process.env.SPICEDB_ENDPOINT || "localhost:50051";
|
|
8
|
-
const isLocalhost = endpoint.startsWith("localhost") || endpoint.startsWith("127.0.0.1");
|
|
9
14
|
return {
|
|
10
15
|
endpoint,
|
|
11
16
|
token: process.env.SPICEDB_PRESHARED_KEY || "",
|
|
12
|
-
tlsEnabled: !
|
|
17
|
+
tlsEnabled: !isLocalhostEndpoint(endpoint)
|
|
13
18
|
};
|
|
14
19
|
}
|
|
15
20
|
/**
|
|
@@ -82,4 +87,4 @@ const ProjectRoles = {
|
|
|
82
87
|
};
|
|
83
88
|
|
|
84
89
|
//#endregion
|
|
85
|
-
export { OrgRoles, ProjectRoles, SpiceDbOrgPermissions, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, getSpiceDbConfig };
|
|
90
|
+
export { OrgRoles, ProjectRoles, SpiceDbOrgPermissions, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, getSpiceDbConfig, isLocalhostEndpoint };
|
package/dist/auth/init.js
CHANGED
|
@@ -6,6 +6,7 @@ import { createAgentsRunDatabaseClient } from "../db/runtime/runtime-client.js";
|
|
|
6
6
|
import { addUserToOrganization, upsertOrganization } from "../data-access/runtime/organizations.js";
|
|
7
7
|
import { getUserByEmail } from "../data-access/runtime/users.js";
|
|
8
8
|
import { createAuth } from "./auth.js";
|
|
9
|
+
import { writeSpiceDbSchema } from "./spicedb-schema.js";
|
|
9
10
|
|
|
10
11
|
//#region src/auth/init.ts
|
|
11
12
|
/**
|
|
@@ -31,6 +32,15 @@ loadEnvironmentFiles();
|
|
|
31
32
|
const TENANT_ID = process.env.TENANT_ID || "default";
|
|
32
33
|
async function init() {
|
|
33
34
|
console.log("🚀 Initializing database with default organization and user...\n");
|
|
35
|
+
console.log("📜 Writing SpiceDB schema...");
|
|
36
|
+
try {
|
|
37
|
+
await writeSpiceDbSchema();
|
|
38
|
+
console.log(" ✅ SpiceDB schema applied");
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.error(" ❌ Failed to write SpiceDB schema:", error);
|
|
41
|
+
console.error(" Make sure SpiceDB is running (docker-compose.dbs.yml)");
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
34
44
|
const dbClient = createAgentsRunDatabaseClient();
|
|
35
45
|
const username = process.env.INKEEP_AGENTS_MANAGE_UI_USERNAME;
|
|
36
46
|
const password = process.env.INKEEP_AGENTS_MANAGE_UI_PASSWORD;
|
|
@@ -102,7 +112,7 @@ async function init() {
|
|
|
102
112
|
console.log("✅ Initialization complete!");
|
|
103
113
|
console.log("================================================");
|
|
104
114
|
console.log(`\nOrganization: ${TENANT_ID}`);
|
|
105
|
-
console.log(`Admin user: ${username}
|
|
115
|
+
console.log(`Admin user: ${username}`);
|
|
106
116
|
console.log("\nYou can now log in with these credentials.\n");
|
|
107
117
|
process.exit(0);
|
|
108
118
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getSpiceDbConfig, isLocalhostEndpoint } from "./authz/config.js";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
import { v1 } from "@authzed/authzed-node";
|
|
5
|
+
|
|
6
|
+
//#region src/auth/spicedb-schema.ts
|
|
7
|
+
async function writeSpiceDbSchema(options) {
|
|
8
|
+
const config = getSpiceDbConfig();
|
|
9
|
+
const { endpoint = config.endpoint, token = config.token, schemaPath = resolve(import.meta.dirname, "../../spicedb/schema.zed"), maxRetries = 30 } = options ?? {};
|
|
10
|
+
const schema = readFileSync(schemaPath, "utf-8");
|
|
11
|
+
const client = v1.NewClient(token, endpoint, isLocalhostEndpoint(endpoint) ? v1.ClientSecurity.INSECURE_LOCALHOST_ALLOWED : v1.ClientSecurity.SECURE);
|
|
12
|
+
let lastError;
|
|
13
|
+
for (let attempt = 1; attempt <= maxRetries; attempt++) try {
|
|
14
|
+
await client.promises.writeSchema(v1.WriteSchemaRequest.create({ schema }));
|
|
15
|
+
return;
|
|
16
|
+
} catch (error) {
|
|
17
|
+
lastError = error;
|
|
18
|
+
if (attempt < maxRetries) await new Promise((r) => setTimeout(r, 1e3));
|
|
19
|
+
}
|
|
20
|
+
throw new Error(`Failed to write SpiceDB schema after ${maxRetries} attempts: ${lastError?.message}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { writeSpiceDbSchema };
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -16,10 +16,11 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
16
16
|
description: z.ZodOptional<z.ZodString>;
|
|
17
17
|
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
18
18
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
19
|
-
id: z.ZodString;
|
|
20
19
|
name: z.ZodString;
|
|
21
20
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
-
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
23
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
23
24
|
models: z.ZodOptional<z.ZodObject<{
|
|
24
25
|
base: z.ZodOptional<z.ZodObject<{
|
|
25
26
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -43,8 +44,7 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
43
44
|
}, {
|
|
44
45
|
stepCountIs?: number | undefined;
|
|
45
46
|
}>>>>;
|
|
46
|
-
|
|
47
|
-
updatedAt: z.ZodOptional<z.ZodString>;
|
|
47
|
+
conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
|
|
48
48
|
type: z.ZodLiteral<"internal">;
|
|
49
49
|
canUse: z.ZodArray<z.ZodObject<{
|
|
50
50
|
agentToolRelationId: z.ZodOptional<z.ZodString>;
|
|
@@ -8,13 +8,15 @@ 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;
|
|
13
12
|
description: string | null;
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
id: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
16
|
projectId: string;
|
|
17
|
-
|
|
17
|
+
tenantId: string;
|
|
18
|
+
defaultSubAgentId: string | null;
|
|
19
|
+
contextConfigId: string | null;
|
|
18
20
|
models: {
|
|
19
21
|
base?: {
|
|
20
22
|
model?: string | undefined;
|
|
@@ -29,12 +31,7 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
29
31
|
providerOptions?: Record<string, any> | undefined;
|
|
30
32
|
} | undefined;
|
|
31
33
|
} | null;
|
|
32
|
-
|
|
33
|
-
transferCountIs?: number | undefined;
|
|
34
|
-
} | null;
|
|
35
|
-
createdAt: string;
|
|
36
|
-
updatedAt: string;
|
|
37
|
-
contextConfigId: string | null;
|
|
34
|
+
prompt: string | null;
|
|
38
35
|
statusUpdates: {
|
|
39
36
|
enabled?: boolean | undefined;
|
|
40
37
|
numEvents?: number | undefined;
|
|
@@ -50,17 +47,22 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
50
47
|
} | undefined;
|
|
51
48
|
}[] | undefined;
|
|
52
49
|
} | 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;
|
|
59
58
|
description: string | null;
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
id: string;
|
|
60
|
+
createdAt: string;
|
|
61
|
+
updatedAt: string;
|
|
62
62
|
projectId: string;
|
|
63
|
-
|
|
63
|
+
tenantId: string;
|
|
64
|
+
defaultSubAgentId: string | null;
|
|
65
|
+
contextConfigId: string | null;
|
|
64
66
|
models: {
|
|
65
67
|
base?: {
|
|
66
68
|
model?: string | undefined;
|
|
@@ -75,12 +77,7 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
75
77
|
providerOptions?: Record<string, any> | undefined;
|
|
76
78
|
} | undefined;
|
|
77
79
|
} | null;
|
|
78
|
-
|
|
79
|
-
transferCountIs?: number | undefined;
|
|
80
|
-
} | null;
|
|
81
|
-
createdAt: string;
|
|
82
|
-
updatedAt: string;
|
|
83
|
-
contextConfigId: string | null;
|
|
80
|
+
prompt: string | null;
|
|
84
81
|
statusUpdates: {
|
|
85
82
|
enabled?: boolean | undefined;
|
|
86
83
|
numEvents?: number | undefined;
|
|
@@ -96,15 +93,18 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
96
93
|
} | undefined;
|
|
97
94
|
}[] | undefined;
|
|
98
95
|
} | null;
|
|
96
|
+
stopWhen: {
|
|
97
|
+
transferCountIs?: number | undefined;
|
|
98
|
+
} | null;
|
|
99
99
|
defaultSubAgent: {
|
|
100
|
-
id: string;
|
|
101
100
|
name: string;
|
|
102
101
|
description: string | null;
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
id: string;
|
|
103
|
+
createdAt: string;
|
|
104
|
+
updatedAt: string;
|
|
105
105
|
agentId: string;
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
projectId: string;
|
|
107
|
+
tenantId: string;
|
|
108
108
|
models: {
|
|
109
109
|
base?: {
|
|
110
110
|
model?: string | undefined;
|
|
@@ -119,23 +119,25 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
119
119
|
providerOptions?: Record<string, any> | undefined;
|
|
120
120
|
} | undefined;
|
|
121
121
|
} | null;
|
|
122
|
+
prompt: string | null;
|
|
122
123
|
stopWhen: {
|
|
123
124
|
stepCountIs?: number | undefined;
|
|
124
125
|
} | null;
|
|
125
|
-
|
|
126
|
-
updatedAt: string;
|
|
126
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
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;
|
|
134
133
|
description: string | null;
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
id: string;
|
|
135
|
+
createdAt: string;
|
|
136
|
+
updatedAt: string;
|
|
137
137
|
projectId: string;
|
|
138
|
-
|
|
138
|
+
tenantId: string;
|
|
139
|
+
defaultSubAgentId: string | null;
|
|
140
|
+
contextConfigId: string | null;
|
|
139
141
|
models: {
|
|
140
142
|
base?: {
|
|
141
143
|
model?: string | undefined;
|
|
@@ -150,12 +152,7 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
150
152
|
providerOptions?: Record<string, any> | undefined;
|
|
151
153
|
} | undefined;
|
|
152
154
|
} | null;
|
|
153
|
-
|
|
154
|
-
transferCountIs?: number | undefined;
|
|
155
|
-
} | null;
|
|
156
|
-
createdAt: string;
|
|
157
|
-
updatedAt: string;
|
|
158
|
-
contextConfigId: string | null;
|
|
155
|
+
prompt: string | null;
|
|
159
156
|
statusUpdates: {
|
|
160
157
|
enabled?: boolean | undefined;
|
|
161
158
|
numEvents?: number | undefined;
|
|
@@ -171,6 +168,9 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
171
168
|
} | undefined;
|
|
172
169
|
}[] | undefined;
|
|
173
170
|
} | null;
|
|
171
|
+
stopWhen: {
|
|
172
|
+
transferCountIs?: number | undefined;
|
|
173
|
+
} | null;
|
|
174
174
|
}[]>;
|
|
175
175
|
declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
176
176
|
scopes: ProjectScopeConfig;
|
|
@@ -245,13 +245,15 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
|
|
|
245
245
|
projectIds: string[];
|
|
246
246
|
}): Promise<AvailableAgentInfo[]>;
|
|
247
247
|
declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
|
|
248
|
-
id: string;
|
|
249
248
|
name: string;
|
|
250
249
|
description: string | null;
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
id: string;
|
|
251
|
+
createdAt: string;
|
|
252
|
+
updatedAt: string;
|
|
253
253
|
projectId: string;
|
|
254
|
-
|
|
254
|
+
tenantId: string;
|
|
255
|
+
defaultSubAgentId: string | null;
|
|
256
|
+
contextConfigId: string | null;
|
|
255
257
|
models: {
|
|
256
258
|
base?: {
|
|
257
259
|
model?: string | undefined;
|
|
@@ -266,12 +268,7 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
266
268
|
providerOptions?: Record<string, any> | undefined;
|
|
267
269
|
} | undefined;
|
|
268
270
|
} | null;
|
|
269
|
-
|
|
270
|
-
transferCountIs?: number | undefined;
|
|
271
|
-
} | null;
|
|
272
|
-
createdAt: string;
|
|
273
|
-
updatedAt: string;
|
|
274
|
-
contextConfigId: string | null;
|
|
271
|
+
prompt: string | null;
|
|
275
272
|
statusUpdates: {
|
|
276
273
|
enabled?: boolean | undefined;
|
|
277
274
|
numEvents?: number | undefined;
|
|
@@ -287,6 +284,9 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
287
284
|
} | undefined;
|
|
288
285
|
}[] | undefined;
|
|
289
286
|
} | null;
|
|
287
|
+
stopWhen: {
|
|
288
|
+
transferCountIs?: number | undefined;
|
|
289
|
+
} | null;
|
|
290
290
|
}>;
|
|
291
291
|
declare const updateAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
292
292
|
scopes: AgentScopeConfig;
|
|
@@ -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;
|
|
12
11
|
description: string | null;
|
|
13
|
-
|
|
14
|
-
projectId: string;
|
|
12
|
+
id: string;
|
|
15
13
|
createdAt: string;
|
|
16
14
|
updatedAt: string;
|
|
15
|
+
projectId: string;
|
|
16
|
+
tenantId: 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;
|
|
54
53
|
description: string | null;
|
|
55
|
-
|
|
56
|
-
projectId: string;
|
|
54
|
+
id: string;
|
|
57
55
|
createdAt: string;
|
|
58
56
|
updatedAt: string;
|
|
57
|
+
projectId: string;
|
|
58
|
+
tenantId: string;
|
|
59
59
|
props: Record<string, unknown> | null;
|
|
60
60
|
render: {
|
|
61
61
|
component: string;
|
|
@@ -105,10 +105,10 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
|
|
|
105
105
|
artifactComponentId: string;
|
|
106
106
|
}) => Promise<{
|
|
107
107
|
id: string;
|
|
108
|
-
tenantId: string;
|
|
109
|
-
projectId: string;
|
|
110
|
-
agentId: string;
|
|
111
108
|
createdAt: string;
|
|
109
|
+
agentId: string;
|
|
110
|
+
projectId: string;
|
|
111
|
+
tenantId: string;
|
|
112
112
|
subAgentId: string;
|
|
113
113
|
artifactComponentId: string;
|
|
114
114
|
}>;
|
|
@@ -148,10 +148,10 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
|
|
|
148
148
|
artifactComponentId: string;
|
|
149
149
|
}) => Promise<{
|
|
150
150
|
id: string;
|
|
151
|
-
tenantId: string;
|
|
152
|
-
projectId: string;
|
|
153
|
-
agentId: string;
|
|
154
151
|
createdAt: string;
|
|
152
|
+
agentId: string;
|
|
153
|
+
projectId: string;
|
|
154
|
+
tenantId: string;
|
|
155
155
|
subAgentId: string;
|
|
156
156
|
artifactComponentId: string;
|
|
157
157
|
} | null>;
|
|
@@ -9,25 +9,25 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
9
9
|
id: string;
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
|
-
tenantId: string;
|
|
13
|
-
projectId: string;
|
|
14
|
-
agentId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
17
14
|
headersSchema: unknown;
|
|
18
15
|
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;
|
|
22
22
|
}) => Promise<{
|
|
23
23
|
id: string;
|
|
24
|
-
tenantId: string;
|
|
25
|
-
projectId: string;
|
|
26
|
-
agentId: string;
|
|
27
24
|
createdAt: string;
|
|
28
25
|
updatedAt: string;
|
|
29
26
|
headersSchema: unknown;
|
|
30
27
|
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;
|
|
@@ -43,13 +43,13 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
|
|
|
43
43
|
}>;
|
|
44
44
|
declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
|
|
45
45
|
id: string;
|
|
46
|
-
tenantId: string;
|
|
47
|
-
projectId: string;
|
|
48
|
-
agentId: string;
|
|
49
46
|
createdAt: string;
|
|
50
47
|
updatedAt: string;
|
|
51
48
|
headersSchema: unknown;
|
|
52
49
|
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;
|
|
@@ -83,13 +83,13 @@ declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params:
|
|
|
83
83
|
data: ContextConfigInsert;
|
|
84
84
|
}) => Promise<{
|
|
85
85
|
id: string;
|
|
86
|
-
tenantId: string;
|
|
87
|
-
projectId: string;
|
|
88
|
-
agentId: string;
|
|
89
86
|
createdAt: string;
|
|
90
87
|
updatedAt: string;
|
|
91
88
|
headersSchema: unknown;
|
|
92
89
|
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 };
|
|
@@ -65,10 +65,10 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
|
|
|
65
65
|
dataComponentId: string;
|
|
66
66
|
}) => Promise<{
|
|
67
67
|
id: string;
|
|
68
|
-
tenantId: string;
|
|
69
|
-
projectId: string;
|
|
70
|
-
agentId: string;
|
|
71
68
|
createdAt: string;
|
|
69
|
+
agentId: string;
|
|
70
|
+
projectId: string;
|
|
71
|
+
tenantId: string;
|
|
72
72
|
subAgentId: string;
|
|
73
73
|
dataComponentId: string;
|
|
74
74
|
}>;
|
|
@@ -107,10 +107,10 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
|
|
|
107
107
|
dataComponentId: string;
|
|
108
108
|
}) => Promise<{
|
|
109
109
|
id: string;
|
|
110
|
-
tenantId: string;
|
|
111
|
-
projectId: string;
|
|
112
|
-
agentId: string;
|
|
113
110
|
createdAt: string;
|
|
111
|
+
agentId: string;
|
|
112
|
+
projectId: string;
|
|
113
|
+
tenantId: string;
|
|
114
114
|
subAgentId: string;
|
|
115
115
|
dataComponentId: string;
|
|
116
116
|
} | null>;
|
|
@@ -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;
|
|
58
57
|
description: string | null;
|
|
59
|
-
|
|
60
|
-
projectId: string;
|
|
61
|
-
agentId: string;
|
|
58
|
+
id: string;
|
|
62
59
|
createdAt: string;
|
|
63
60
|
updatedAt: string;
|
|
61
|
+
agentId: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
tenantId: 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;
|
|
100
99
|
description: string | null;
|
|
101
|
-
|
|
102
|
-
projectId: string;
|
|
103
|
-
agentId: string;
|
|
100
|
+
id: string;
|
|
104
101
|
createdAt: string;
|
|
105
102
|
updatedAt: string;
|
|
103
|
+
agentId: string;
|
|
104
|
+
projectId: string;
|
|
105
|
+
tenantId: string;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
108
108
|
declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -162,16 +162,16 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
162
162
|
}> | null;
|
|
163
163
|
}) => Promise<{
|
|
164
164
|
id: string;
|
|
165
|
-
tenantId: string;
|
|
166
|
-
projectId: string;
|
|
167
|
-
agentId: string;
|
|
168
165
|
createdAt: string;
|
|
169
166
|
updatedAt: string;
|
|
167
|
+
agentId: string;
|
|
168
|
+
projectId: string;
|
|
169
|
+
tenantId: string;
|
|
170
|
+
subAgentId: string;
|
|
171
|
+
functionToolId: string;
|
|
170
172
|
toolPolicies: Record<string, {
|
|
171
173
|
needsApproval?: boolean;
|
|
172
174
|
}> | null;
|
|
173
|
-
subAgentId: string;
|
|
174
|
-
functionToolId: string;
|
|
175
175
|
}>;
|
|
176
176
|
/**
|
|
177
177
|
* Update an agent-function tool relation
|
|
@@ -227,16 +227,16 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
227
227
|
}> | null;
|
|
228
228
|
}) => Promise<{
|
|
229
229
|
id: string;
|
|
230
|
-
tenantId: string;
|
|
231
|
-
projectId: string;
|
|
232
|
-
agentId: string;
|
|
233
230
|
createdAt: string;
|
|
234
231
|
updatedAt: string;
|
|
232
|
+
agentId: string;
|
|
233
|
+
projectId: string;
|
|
234
|
+
tenantId: string;
|
|
235
|
+
subAgentId: string;
|
|
236
|
+
functionToolId: string;
|
|
235
237
|
toolPolicies: Record<string, {
|
|
236
238
|
needsApproval?: boolean;
|
|
237
239
|
}> | null;
|
|
238
|
-
subAgentId: string;
|
|
239
|
-
functionToolId: string;
|
|
240
240
|
}>;
|
|
241
241
|
//#endregion
|
|
242
242
|
export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
|
|
@@ -9,14 +9,14 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
|
|
|
9
9
|
relationId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
|
-
tenantId: string;
|
|
13
|
-
projectId: string;
|
|
14
|
-
agentId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
14
|
+
agentId: string;
|
|
15
|
+
projectId: string;
|
|
16
|
+
tenantId: string;
|
|
17
|
+
subAgentId: string;
|
|
17
18
|
headers: Record<string, string> | null;
|
|
18
19
|
externalAgentId: string;
|
|
19
|
-
subAgentId: string;
|
|
20
20
|
} | undefined>;
|
|
21
21
|
declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
22
22
|
scopes: SubAgentScopeConfig;
|
|
@@ -44,27 +44,27 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
|
|
|
44
44
|
scopes: SubAgentScopeConfig;
|
|
45
45
|
}) => Promise<{
|
|
46
46
|
id: string;
|
|
47
|
-
tenantId: string;
|
|
48
|
-
projectId: string;
|
|
49
|
-
agentId: string;
|
|
50
47
|
createdAt: string;
|
|
51
48
|
updatedAt: string;
|
|
49
|
+
agentId: string;
|
|
50
|
+
projectId: string;
|
|
51
|
+
tenantId: string;
|
|
52
|
+
subAgentId: string;
|
|
52
53
|
headers: Record<string, string> | null;
|
|
53
54
|
externalAgentId: string;
|
|
54
|
-
subAgentId: string;
|
|
55
55
|
}[]>;
|
|
56
56
|
declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
57
57
|
scopes: AgentScopeConfig;
|
|
58
58
|
}) => Promise<{
|
|
59
59
|
id: string;
|
|
60
|
-
tenantId: string;
|
|
61
|
-
projectId: string;
|
|
62
|
-
agentId: string;
|
|
63
60
|
createdAt: string;
|
|
64
61
|
updatedAt: string;
|
|
62
|
+
agentId: string;
|
|
63
|
+
projectId: string;
|
|
64
|
+
tenantId: string;
|
|
65
|
+
subAgentId: string;
|
|
65
66
|
headers: Record<string, string> | null;
|
|
66
67
|
externalAgentId: string;
|
|
67
|
-
subAgentId: string;
|
|
68
68
|
}[]>;
|
|
69
69
|
declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
70
70
|
scopes: AgentScopeConfig;
|
|
@@ -180,14 +180,14 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
180
180
|
};
|
|
181
181
|
}) => Promise<{
|
|
182
182
|
id: string;
|
|
183
|
-
tenantId: string;
|
|
184
|
-
projectId: string;
|
|
185
|
-
agentId: string;
|
|
186
183
|
createdAt: string;
|
|
187
184
|
updatedAt: string;
|
|
185
|
+
agentId: string;
|
|
186
|
+
projectId: string;
|
|
187
|
+
tenantId: string;
|
|
188
|
+
subAgentId: string;
|
|
188
189
|
headers: Record<string, string> | null;
|
|
189
190
|
externalAgentId: string;
|
|
190
|
-
subAgentId: string;
|
|
191
191
|
}>;
|
|
192
192
|
/**
|
|
193
193
|
* Check if sub-agent external agent relation exists by params
|
|
@@ -197,14 +197,14 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
|
|
|
197
197
|
externalAgentId: string;
|
|
198
198
|
}) => Promise<{
|
|
199
199
|
id: string;
|
|
200
|
-
tenantId: string;
|
|
201
|
-
projectId: string;
|
|
202
|
-
agentId: string;
|
|
203
200
|
createdAt: string;
|
|
204
201
|
updatedAt: string;
|
|
202
|
+
agentId: string;
|
|
203
|
+
projectId: string;
|
|
204
|
+
tenantId: string;
|
|
205
|
+
subAgentId: string;
|
|
205
206
|
headers: Record<string, string> | null;
|
|
206
207
|
externalAgentId: string;
|
|
207
|
-
subAgentId: string;
|
|
208
208
|
} | undefined>;
|
|
209
209
|
/**
|
|
210
210
|
* Upsert sub-agent external agent relation (create if it doesn't exist, update if it does)
|
|
@@ -218,14 +218,14 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
218
218
|
};
|
|
219
219
|
}) => Promise<{
|
|
220
220
|
id: string;
|
|
221
|
-
tenantId: string;
|
|
222
|
-
projectId: string;
|
|
223
|
-
agentId: string;
|
|
224
221
|
createdAt: string;
|
|
225
222
|
updatedAt: string;
|
|
223
|
+
agentId: string;
|
|
224
|
+
projectId: string;
|
|
225
|
+
tenantId: string;
|
|
226
|
+
subAgentId: string;
|
|
226
227
|
headers: Record<string, string> | null;
|
|
227
228
|
externalAgentId: string;
|
|
228
|
-
subAgentId: string;
|
|
229
229
|
}>;
|
|
230
230
|
declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
231
231
|
scopes: SubAgentScopeConfig;
|