@inkeep/agents-core 0.65.2 → 0.66.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/dist/_virtual/rolldown_runtime.js +25 -1
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/constants/index.d.ts +14 -0
- package/dist/constants/index.js +15 -0
- package/dist/constants/relation-types.d.ts +5 -0
- package/dist/constants/relation-types.js +6 -0
- package/dist/constants/session-events.d.ts +13 -0
- package/dist/constants/session-events.js +14 -0
- package/dist/constants/tool-names.d.ts +7 -0
- package/dist/constants/tool-names.js +8 -0
- package/dist/constants/workflow.d.ts +7 -0
- package/dist/constants/workflow.js +8 -0
- package/dist/data-access/index.d.ts +3 -3
- package/dist/data-access/manage/agentFull.d.ts +7 -10
- package/dist/data-access/manage/agentFull.js +26 -28
- package/dist/data-access/manage/agents.d.ts +32 -32
- package/dist/data-access/manage/artifactComponents.d.ts +8 -8
- 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 +10 -10
- package/dist/data-access/manage/projectFull.d.ts +6 -8
- package/dist/data-access/manage/projectFull.js +18 -18
- package/dist/data-access/manage/skills.d.ts +8 -8
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +12 -12
- package/dist/data-access/manage/tools.d.ts +15 -15
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/apps.d.ts +12 -12
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/feedback.d.ts +6 -6
- package/dist/data-access/runtime/messages.d.ts +18 -18
- package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
- package/dist/data-access/runtime/tasks.d.ts +5 -5
- package/dist/db/manage/dolt-safe-jsonb.d.ts +2 -2
- package/dist/db/manage/manage-schema.d.ts +449 -449
- package/dist/db/runtime/runtime-schema.d.ts +405 -405
- package/dist/dolt/ref-middleware.js +2 -2
- package/dist/index.d.ts +7 -3
- package/dist/index.js +5 -1
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +77 -0
- package/dist/node_modules/.pnpm/@vitest_expect@3.2.4/node_modules/@vitest/expect/dist/index.js +1356 -0
- package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js +1119 -0
- package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js +982 -0
- package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/index.js +4 -0
- package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/utils.js +3 -0
- package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js +1821 -0
- package/dist/node_modules/.pnpm/@vitest_spy@3.2.4/node_modules/@vitest/spy/dist/index.js +171 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +124 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/diff.js +1334 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/error.js +105 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.js +118 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.js +455 -0
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.js +168 -0
- package/dist/node_modules/.pnpm/chai@5.3.3/node_modules/chai/index.js +3087 -0
- package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.js +384 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js +11 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js +16 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js +11 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js +15 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js +13 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js +34 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js +12 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js +122 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js +39 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js +99 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js +25 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js +14 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js +21 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js +6 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js +12 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js +18 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js +25 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js +8 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js +30 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js +939 -0
- package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +81 -0
- package/dist/node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.js +51 -0
- package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +81 -0
- package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js +9 -0
- package/dist/node_modules/.pnpm/tinyspy@4.0.4/node_modules/tinyspy/dist/index.js +125 -0
- package/dist/node_modules/.pnpm/vitest@3.2.4_@edge-runtime_vm@3.2.0_@types_debug@4.1.12_@types_node@20.19.27_jiti@2.6.1_93023d256ff9ed909ae8f0d436c922a0/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +8 -0
- package/dist/node_modules/.pnpm/vitest@3.2.4_@edge-runtime_vm@3.2.0_@types_debug@4.1.12_@types_node@20.19.27_jiti@2.6.1_93023d256ff9ed909ae8f0d436c922a0/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +50 -0
- package/dist/node_modules/.pnpm/vitest@3.2.4_@edge-runtime_vm@3.2.0_@types_debug@4.1.12_@types_node@20.19.27_jiti@2.6.1_93023d256ff9ed909ae8f0d436c922a0/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +48 -0
- package/dist/node_modules/.pnpm/vitest@3.2.4_@edge-runtime_vm@3.2.0_@types_debug@4.1.12_@types_node@20.19.27_jiti@2.6.1_93023d256ff9ed909ae8f0d436c922a0/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +2613 -0
- package/dist/test-utils/index.d.ts +2 -0
- package/dist/test-utils/index.js +3 -0
- package/dist/test-utils/mocks/index.d.ts +2 -0
- package/dist/test-utils/mocks/index.js +3 -0
- package/dist/test-utils/mocks/logger.d.ts +27 -0
- package/dist/test-utils/mocks/logger.js +48 -0
- package/dist/utils/jwt-helpers.js +1 -1
- package/dist/utils/third-party-mcp-servers/composio-client.js +10 -10
- package/dist/utils/tracer-factory.js +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas/skills.d.ts +31 -31
- package/dist/validation/schemas.d.ts +1963 -1963
- package/package.json +5 -1
|
@@ -10,13 +10,15 @@ import { PgColumn } from "drizzle-orm/pg-core";
|
|
|
10
10
|
declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
11
11
|
scopes: AgentScopeConfig;
|
|
12
12
|
}) => Promise<{
|
|
13
|
-
tenantId: string;
|
|
14
|
-
projectId: string;
|
|
15
13
|
id: string;
|
|
16
14
|
name: string;
|
|
17
15
|
createdAt: string;
|
|
18
16
|
updatedAt: string;
|
|
19
17
|
description: string | null;
|
|
18
|
+
projectId: string;
|
|
19
|
+
tenantId: string;
|
|
20
|
+
defaultSubAgentId: string | null;
|
|
21
|
+
contextConfigId: string | null;
|
|
20
22
|
models: {
|
|
21
23
|
base?: {
|
|
22
24
|
model?: string | undefined;
|
|
@@ -37,12 +39,7 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
37
39
|
allowedProviders?: string[] | undefined;
|
|
38
40
|
} | undefined;
|
|
39
41
|
} | null;
|
|
40
|
-
stopWhen: {
|
|
41
|
-
transferCountIs?: number | undefined;
|
|
42
|
-
} | null;
|
|
43
42
|
prompt: string | null;
|
|
44
|
-
defaultSubAgentId: string | null;
|
|
45
|
-
contextConfigId: string | null;
|
|
46
43
|
statusUpdates: {
|
|
47
44
|
enabled?: boolean | undefined;
|
|
48
45
|
numEvents?: number | undefined;
|
|
@@ -58,18 +55,23 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
58
55
|
} | undefined;
|
|
59
56
|
}[] | undefined;
|
|
60
57
|
} | null;
|
|
58
|
+
stopWhen: {
|
|
59
|
+
transferCountIs?: number | undefined;
|
|
60
|
+
} | null;
|
|
61
61
|
executionMode: "classic" | "durable";
|
|
62
62
|
} | null>;
|
|
63
63
|
declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
64
64
|
scopes: AgentScopeConfig;
|
|
65
65
|
}) => Promise<{
|
|
66
|
-
tenantId: string;
|
|
67
|
-
projectId: string;
|
|
68
66
|
id: string;
|
|
69
67
|
name: string;
|
|
70
68
|
createdAt: string;
|
|
71
69
|
updatedAt: string;
|
|
72
70
|
description: string | null;
|
|
71
|
+
projectId: string;
|
|
72
|
+
tenantId: string;
|
|
73
|
+
defaultSubAgentId: string | null;
|
|
74
|
+
contextConfigId: string | null;
|
|
73
75
|
models: {
|
|
74
76
|
base?: {
|
|
75
77
|
model?: string | undefined;
|
|
@@ -90,12 +92,7 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
90
92
|
allowedProviders?: string[] | undefined;
|
|
91
93
|
} | undefined;
|
|
92
94
|
} | null;
|
|
93
|
-
stopWhen: {
|
|
94
|
-
transferCountIs?: number | undefined;
|
|
95
|
-
} | null;
|
|
96
95
|
prompt: string | null;
|
|
97
|
-
defaultSubAgentId: string | null;
|
|
98
|
-
contextConfigId: string | null;
|
|
99
96
|
statusUpdates: {
|
|
100
97
|
enabled?: boolean | undefined;
|
|
101
98
|
numEvents?: number | undefined;
|
|
@@ -111,15 +108,19 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
111
108
|
} | undefined;
|
|
112
109
|
}[] | undefined;
|
|
113
110
|
} | null;
|
|
111
|
+
stopWhen: {
|
|
112
|
+
transferCountIs?: number | undefined;
|
|
113
|
+
} | null;
|
|
114
114
|
executionMode: "classic" | "durable";
|
|
115
115
|
defaultSubAgent: {
|
|
116
|
-
tenantId: string;
|
|
117
|
-
projectId: string;
|
|
118
116
|
id: string;
|
|
119
117
|
name: string;
|
|
120
118
|
createdAt: string;
|
|
121
119
|
updatedAt: string;
|
|
122
120
|
description: string | null;
|
|
121
|
+
agentId: string;
|
|
122
|
+
projectId: string;
|
|
123
|
+
tenantId: string;
|
|
123
124
|
models: {
|
|
124
125
|
base?: {
|
|
125
126
|
model?: string | undefined;
|
|
@@ -140,24 +141,25 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
140
141
|
allowedProviders?: string[] | undefined;
|
|
141
142
|
} | undefined;
|
|
142
143
|
} | null;
|
|
144
|
+
prompt: string | null;
|
|
143
145
|
stopWhen: {
|
|
144
146
|
stepCountIs?: number | undefined;
|
|
145
147
|
} | null;
|
|
146
|
-
agentId: string;
|
|
147
|
-
prompt: string | null;
|
|
148
148
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
149
149
|
} | null;
|
|
150
150
|
} | null>;
|
|
151
151
|
declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
152
152
|
scopes: ProjectScopeConfig;
|
|
153
153
|
}) => Promise<{
|
|
154
|
-
tenantId: string;
|
|
155
|
-
projectId: string;
|
|
156
154
|
id: string;
|
|
157
155
|
name: string;
|
|
158
156
|
createdAt: string;
|
|
159
157
|
updatedAt: string;
|
|
160
158
|
description: string | null;
|
|
159
|
+
projectId: string;
|
|
160
|
+
tenantId: string;
|
|
161
|
+
defaultSubAgentId: string | null;
|
|
162
|
+
contextConfigId: string | null;
|
|
161
163
|
models: {
|
|
162
164
|
base?: {
|
|
163
165
|
model?: string | undefined;
|
|
@@ -178,12 +180,7 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
178
180
|
allowedProviders?: string[] | undefined;
|
|
179
181
|
} | undefined;
|
|
180
182
|
} | null;
|
|
181
|
-
stopWhen: {
|
|
182
|
-
transferCountIs?: number | undefined;
|
|
183
|
-
} | null;
|
|
184
183
|
prompt: string | null;
|
|
185
|
-
defaultSubAgentId: string | null;
|
|
186
|
-
contextConfigId: string | null;
|
|
187
184
|
statusUpdates: {
|
|
188
185
|
enabled?: boolean | undefined;
|
|
189
186
|
numEvents?: number | undefined;
|
|
@@ -199,6 +196,9 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
199
196
|
} | undefined;
|
|
200
197
|
}[] | undefined;
|
|
201
198
|
} | null;
|
|
199
|
+
stopWhen: {
|
|
200
|
+
transferCountIs?: number | undefined;
|
|
201
|
+
} | null;
|
|
202
202
|
executionMode: "classic" | "durable";
|
|
203
203
|
}[]>;
|
|
204
204
|
declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -281,13 +281,15 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
|
|
|
281
281
|
projectIds: string[];
|
|
282
282
|
}): Promise<AvailableAgentInfo[]>;
|
|
283
283
|
declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
|
|
284
|
-
tenantId: string;
|
|
285
|
-
projectId: string;
|
|
286
284
|
id: string;
|
|
287
285
|
name: string;
|
|
288
286
|
createdAt: string;
|
|
289
287
|
updatedAt: string;
|
|
290
288
|
description: string | null;
|
|
289
|
+
projectId: string;
|
|
290
|
+
tenantId: string;
|
|
291
|
+
defaultSubAgentId: string | null;
|
|
292
|
+
contextConfigId: string | null;
|
|
291
293
|
models: {
|
|
292
294
|
base?: {
|
|
293
295
|
model?: string | undefined;
|
|
@@ -308,12 +310,7 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
308
310
|
allowedProviders?: string[] | undefined;
|
|
309
311
|
} | undefined;
|
|
310
312
|
} | null;
|
|
311
|
-
stopWhen: {
|
|
312
|
-
transferCountIs?: number | undefined;
|
|
313
|
-
} | null;
|
|
314
313
|
prompt: string | null;
|
|
315
|
-
defaultSubAgentId: string | null;
|
|
316
|
-
contextConfigId: string | null;
|
|
317
314
|
statusUpdates: {
|
|
318
315
|
enabled?: boolean | undefined;
|
|
319
316
|
numEvents?: number | undefined;
|
|
@@ -329,6 +326,9 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
329
326
|
} | undefined;
|
|
330
327
|
}[] | undefined;
|
|
331
328
|
} | null;
|
|
329
|
+
stopWhen: {
|
|
330
|
+
transferCountIs?: number | undefined;
|
|
331
|
+
} | null;
|
|
332
332
|
executionMode: "classic" | "durable";
|
|
333
333
|
}>;
|
|
334
334
|
declare const updateAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -9,13 +9,13 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
|
|
|
9
9
|
scopes: ProjectScopeConfig;
|
|
10
10
|
id: string;
|
|
11
11
|
}) => Promise<{
|
|
12
|
-
tenantId: string;
|
|
13
|
-
projectId: string;
|
|
14
12
|
id: string;
|
|
15
13
|
name: string;
|
|
16
14
|
createdAt: string;
|
|
17
15
|
updatedAt: string;
|
|
18
16
|
description: string | null;
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
19
19
|
props: {
|
|
20
20
|
[x: string]: unknown;
|
|
21
21
|
type: "object";
|
|
@@ -65,13 +65,13 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
|
|
|
65
65
|
};
|
|
66
66
|
}>;
|
|
67
67
|
declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
|
|
68
|
-
tenantId: string;
|
|
69
|
-
projectId: string;
|
|
70
68
|
id: string;
|
|
71
69
|
name: string;
|
|
72
70
|
createdAt: string;
|
|
73
71
|
updatedAt: string;
|
|
74
72
|
description: string | null;
|
|
73
|
+
projectId: string;
|
|
74
|
+
tenantId: string;
|
|
75
75
|
props: {
|
|
76
76
|
[x: string]: unknown;
|
|
77
77
|
type: "object";
|
|
@@ -141,11 +141,11 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
|
|
|
141
141
|
scopes: SubAgentScopeConfig;
|
|
142
142
|
artifactComponentId: string;
|
|
143
143
|
}) => Promise<{
|
|
144
|
-
tenantId: string;
|
|
145
|
-
projectId: string;
|
|
146
144
|
id: string;
|
|
147
145
|
createdAt: string;
|
|
148
146
|
agentId: string;
|
|
147
|
+
projectId: string;
|
|
148
|
+
tenantId: string;
|
|
149
149
|
subAgentId: string;
|
|
150
150
|
artifactComponentId: string;
|
|
151
151
|
}>;
|
|
@@ -184,11 +184,11 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
|
|
|
184
184
|
scopes: SubAgentScopeConfig;
|
|
185
185
|
artifactComponentId: string;
|
|
186
186
|
}) => Promise<{
|
|
187
|
-
tenantId: string;
|
|
188
|
-
projectId: string;
|
|
189
187
|
id: string;
|
|
190
188
|
createdAt: string;
|
|
191
189
|
agentId: string;
|
|
190
|
+
projectId: string;
|
|
191
|
+
tenantId: string;
|
|
192
192
|
subAgentId: string;
|
|
193
193
|
artifactComponentId: string;
|
|
194
194
|
} | null>;
|
|
@@ -9,26 +9,26 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
9
9
|
scopes: AgentScopeConfig;
|
|
10
10
|
id: string;
|
|
11
11
|
}) => Promise<{
|
|
12
|
-
tenantId: string;
|
|
13
|
-
projectId: string;
|
|
14
12
|
id: string;
|
|
15
13
|
createdAt: string;
|
|
16
14
|
updatedAt: string;
|
|
17
|
-
agentId: string;
|
|
18
15
|
headersSchema: unknown;
|
|
19
16
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
17
|
+
agentId: string;
|
|
18
|
+
projectId: string;
|
|
19
|
+
tenantId: string;
|
|
20
20
|
} | undefined>;
|
|
21
21
|
declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
22
22
|
scopes: AgentScopeConfig;
|
|
23
23
|
}) => Promise<{
|
|
24
|
-
tenantId: string;
|
|
25
|
-
projectId: string;
|
|
26
24
|
id: string;
|
|
27
25
|
createdAt: string;
|
|
28
26
|
updatedAt: string;
|
|
29
|
-
agentId: string;
|
|
30
27
|
headersSchema: unknown;
|
|
31
28
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
29
|
+
agentId: string;
|
|
30
|
+
projectId: string;
|
|
31
|
+
tenantId: string;
|
|
32
32
|
}[]>;
|
|
33
33
|
declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
34
34
|
scopes: AgentScopeConfig;
|
|
@@ -43,14 +43,14 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
|
|
|
43
43
|
};
|
|
44
44
|
}>;
|
|
45
45
|
declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
|
|
46
|
-
tenantId: string;
|
|
47
|
-
projectId: string;
|
|
48
46
|
id: string;
|
|
49
47
|
createdAt: string;
|
|
50
48
|
updatedAt: string;
|
|
51
|
-
agentId: string;
|
|
52
49
|
headersSchema: unknown;
|
|
53
50
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
51
|
+
agentId: string;
|
|
52
|
+
projectId: string;
|
|
53
|
+
tenantId: string;
|
|
54
54
|
}>;
|
|
55
55
|
declare const updateContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
56
56
|
scopes: AgentScopeConfig;
|
|
@@ -83,14 +83,14 @@ declare const countContextConfigs: (db: AgentsManageDatabaseClient) => (params:
|
|
|
83
83
|
declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
84
84
|
data: ContextConfigInsert;
|
|
85
85
|
}) => Promise<{
|
|
86
|
-
tenantId: string;
|
|
87
|
-
projectId: string;
|
|
88
86
|
id: string;
|
|
89
87
|
createdAt: string;
|
|
90
88
|
updatedAt: string;
|
|
91
|
-
agentId: string;
|
|
92
89
|
headersSchema: unknown;
|
|
93
90
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
91
|
+
agentId: string;
|
|
92
|
+
projectId: string;
|
|
93
|
+
tenantId: string;
|
|
94
94
|
}>;
|
|
95
95
|
//#endregion
|
|
96
96
|
export { countContextConfigs, createContextConfig, deleteContextConfig, getContextConfigById, hasContextConfig, listContextConfigs, listContextConfigsPaginated, updateContextConfig, upsertContextConfig };
|
|
@@ -65,11 +65,11 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
|
|
|
65
65
|
scopes: SubAgentScopeConfig;
|
|
66
66
|
dataComponentId: string;
|
|
67
67
|
}) => Promise<{
|
|
68
|
-
tenantId: string;
|
|
69
|
-
projectId: string;
|
|
70
68
|
id: string;
|
|
71
69
|
createdAt: string;
|
|
72
70
|
agentId: string;
|
|
71
|
+
projectId: string;
|
|
72
|
+
tenantId: string;
|
|
73
73
|
subAgentId: string;
|
|
74
74
|
dataComponentId: string;
|
|
75
75
|
}>;
|
|
@@ -107,11 +107,11 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
|
|
|
107
107
|
scopes: SubAgentScopeConfig;
|
|
108
108
|
dataComponentId: string;
|
|
109
109
|
}) => Promise<{
|
|
110
|
-
tenantId: string;
|
|
111
|
-
projectId: string;
|
|
112
110
|
id: string;
|
|
113
111
|
createdAt: string;
|
|
114
112
|
agentId: string;
|
|
113
|
+
projectId: string;
|
|
114
|
+
tenantId: string;
|
|
115
115
|
subAgentId: string;
|
|
116
116
|
dataComponentId: string;
|
|
117
117
|
} | null>;
|
|
@@ -53,14 +53,14 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
53
53
|
data: FunctionToolApiInsert;
|
|
54
54
|
scopes: AgentScopeConfig;
|
|
55
55
|
}) => Promise<{
|
|
56
|
-
tenantId: string;
|
|
57
|
-
projectId: string;
|
|
58
56
|
id: string;
|
|
59
57
|
name: string;
|
|
60
58
|
createdAt: string;
|
|
61
59
|
updatedAt: string;
|
|
62
60
|
description: string | null;
|
|
63
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
|
-
tenantId: string;
|
|
99
|
-
projectId: string;
|
|
100
98
|
id: string;
|
|
101
99
|
name: string;
|
|
102
100
|
createdAt: string;
|
|
103
101
|
updatedAt: string;
|
|
104
102
|
description: string | null;
|
|
105
103
|
agentId: string;
|
|
104
|
+
projectId: string;
|
|
105
|
+
tenantId: string;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
108
108
|
declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -157,17 +157,17 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
157
157
|
needsApproval?: boolean;
|
|
158
158
|
}> | null;
|
|
159
159
|
}) => Promise<{
|
|
160
|
-
tenantId: string;
|
|
161
|
-
projectId: string;
|
|
162
160
|
id: string;
|
|
163
161
|
createdAt: string;
|
|
164
162
|
updatedAt: string;
|
|
165
163
|
agentId: string;
|
|
164
|
+
projectId: string;
|
|
165
|
+
tenantId: string;
|
|
166
166
|
subAgentId: string;
|
|
167
|
+
functionToolId: string;
|
|
167
168
|
toolPolicies: Record<string, {
|
|
168
169
|
needsApproval?: boolean;
|
|
169
170
|
}> | null;
|
|
170
|
-
functionToolId: string;
|
|
171
171
|
}>;
|
|
172
172
|
/**
|
|
173
173
|
* Update an agent-function tool relation
|
|
@@ -222,17 +222,17 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
222
222
|
needsApproval?: boolean;
|
|
223
223
|
}> | null;
|
|
224
224
|
}) => Promise<{
|
|
225
|
-
tenantId: string;
|
|
226
|
-
projectId: string;
|
|
227
225
|
id: string;
|
|
228
226
|
createdAt: string;
|
|
229
227
|
updatedAt: string;
|
|
230
228
|
agentId: string;
|
|
229
|
+
projectId: string;
|
|
230
|
+
tenantId: string;
|
|
231
231
|
subAgentId: string;
|
|
232
|
+
functionToolId: string;
|
|
232
233
|
toolPolicies: Record<string, {
|
|
233
234
|
needsApproval?: boolean;
|
|
234
235
|
}> | null;
|
|
235
|
-
functionToolId: string;
|
|
236
236
|
}>;
|
|
237
237
|
//#endregion
|
|
238
238
|
export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
2
2
|
import "../../types/utility.js";
|
|
3
|
-
import { getLogger } from "../../utils/logger.js";
|
|
4
3
|
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
5
4
|
import { FullProjectDefinition, FullProjectSelect, FullProjectSelectWithRelationIds } from "../../types/entities.js";
|
|
6
5
|
|
|
7
6
|
//#region src/data-access/manage/projectFull.d.ts
|
|
8
7
|
|
|
9
|
-
type ProjectLogger = ReturnType<typeof getLogger>;
|
|
10
8
|
/**
|
|
11
9
|
* Server-side implementation of createFullProject that performs actual database operations.
|
|
12
10
|
* This function creates a complete project with all agent and their nested resources.
|
|
13
11
|
*/
|
|
14
|
-
declare const createFullProjectServerSide: (db: AgentsManageDatabaseClient
|
|
12
|
+
declare const createFullProjectServerSide: (db: AgentsManageDatabaseClient) => (params: {
|
|
15
13
|
scopes: ProjectScopeConfig;
|
|
16
14
|
projectData: FullProjectDefinition;
|
|
17
15
|
}) => Promise<FullProjectSelect>;
|
|
@@ -19,21 +17,21 @@ declare const createFullProjectServerSide: (db: AgentsManageDatabaseClient, logg
|
|
|
19
17
|
* Server-side implementation of updateFullProject that performs actual database operations.
|
|
20
18
|
* This function updates a complete project with all agent and their nested resources.
|
|
21
19
|
*/
|
|
22
|
-
declare const updateFullProjectServerSide: (db: AgentsManageDatabaseClient
|
|
20
|
+
declare const updateFullProjectServerSide: (db: AgentsManageDatabaseClient) => (params: {
|
|
23
21
|
scopes: ProjectScopeConfig;
|
|
24
22
|
projectData: FullProjectDefinition;
|
|
25
23
|
}) => Promise<FullProjectSelect>;
|
|
26
|
-
declare const getFullProject: (db: AgentsManageDatabaseClient
|
|
24
|
+
declare const getFullProject: (db: AgentsManageDatabaseClient) => (params: {
|
|
27
25
|
scopes: ProjectScopeConfig;
|
|
28
26
|
}) => Promise<FullProjectSelect | null>;
|
|
29
|
-
declare const getFullProjectWithRelationIds: (db: AgentsManageDatabaseClient
|
|
27
|
+
declare const getFullProjectWithRelationIds: (db: AgentsManageDatabaseClient) => (params: {
|
|
30
28
|
scopes: ProjectScopeConfig;
|
|
31
29
|
}) => Promise<FullProjectSelectWithRelationIds | null>;
|
|
32
30
|
/**
|
|
33
31
|
* Delete a complete project and cascade to all related entities
|
|
34
32
|
*/
|
|
35
|
-
declare const deleteFullProject: (db: AgentsManageDatabaseClient
|
|
33
|
+
declare const deleteFullProject: (db: AgentsManageDatabaseClient) => (params: {
|
|
36
34
|
scopes: ProjectScopeConfig;
|
|
37
35
|
}) => Promise<boolean>;
|
|
38
36
|
//#endregion
|
|
39
|
-
export {
|
|
37
|
+
export { createFullProjectServerSide, deleteFullProject, getFullProject, getFullProjectWithRelationIds, updateFullProjectServerSide };
|
|
@@ -11,7 +11,7 @@ import { createFullAgentServerSide, deleteFullAgent, getFullAgent, getFullAgentW
|
|
|
11
11
|
import { createProject, deleteProject, getProject, updateProject } from "./projects.js";
|
|
12
12
|
|
|
13
13
|
//#region src/data-access/manage/projectFull.ts
|
|
14
|
-
const
|
|
14
|
+
const logger = getLogger("projectFull");
|
|
15
15
|
/**
|
|
16
16
|
* Validate and type the project data
|
|
17
17
|
*/
|
|
@@ -22,7 +22,7 @@ function validateAndTypeProjectData(projectData) {
|
|
|
22
22
|
* Server-side implementation of createFullProject that performs actual database operations.
|
|
23
23
|
* This function creates a complete project with all agent and their nested resources.
|
|
24
24
|
*/
|
|
25
|
-
const createFullProjectServerSide = (db
|
|
25
|
+
const createFullProjectServerSide = (db) => async (params) => {
|
|
26
26
|
const { scopes, projectData } = params;
|
|
27
27
|
const { tenantId } = scopes;
|
|
28
28
|
const typed = validateAndTypeProjectData(projectData);
|
|
@@ -306,7 +306,7 @@ const createFullProjectServerSide = (db, logger = defaultLogger) => async (param
|
|
|
306
306
|
credentialReferences: typed.credentialReferences || {},
|
|
307
307
|
statusUpdates: agentData.statusUpdates === null ? void 0 : agentData.statusUpdates
|
|
308
308
|
};
|
|
309
|
-
await createFullAgentServerSide(db
|
|
309
|
+
await createFullAgentServerSide(db)({
|
|
310
310
|
tenantId,
|
|
311
311
|
projectId: typed.id
|
|
312
312
|
}, agentDataWithoutSubAgents);
|
|
@@ -349,7 +349,7 @@ const createFullProjectServerSide = (db, logger = defaultLogger) => async (param
|
|
|
349
349
|
...agentData,
|
|
350
350
|
subAgents: agentData.subAgents
|
|
351
351
|
};
|
|
352
|
-
await updateFullAgentServerSide(db
|
|
352
|
+
await updateFullAgentServerSide(db)({
|
|
353
353
|
tenantId,
|
|
354
354
|
projectId: typed.id
|
|
355
355
|
}, updateData);
|
|
@@ -380,7 +380,7 @@ const createFullProjectServerSide = (db, logger = defaultLogger) => async (param
|
|
|
380
380
|
}, "Phase 2 complete: All sub-agents added successfully");
|
|
381
381
|
}
|
|
382
382
|
logger.info({ projectId: typed.id }, "Full project created successfully");
|
|
383
|
-
const fullProject = await getFullProject(db
|
|
383
|
+
const fullProject = await getFullProject(db)({ scopes: {
|
|
384
384
|
tenantId,
|
|
385
385
|
projectId: typed.id
|
|
386
386
|
} });
|
|
@@ -399,7 +399,7 @@ const createFullProjectServerSide = (db, logger = defaultLogger) => async (param
|
|
|
399
399
|
* Server-side implementation of updateFullProject that performs actual database operations.
|
|
400
400
|
* This function updates a complete project with all agent and their nested resources.
|
|
401
401
|
*/
|
|
402
|
-
const updateFullProjectServerSide = (db
|
|
402
|
+
const updateFullProjectServerSide = (db) => async (params) => {
|
|
403
403
|
const { scopes, projectData } = params;
|
|
404
404
|
const { tenantId } = scopes;
|
|
405
405
|
const typed = validateAndTypeProjectData(projectData);
|
|
@@ -415,7 +415,7 @@ const updateFullProjectServerSide = (db, logger = defaultLogger) => async (param
|
|
|
415
415
|
projectId: typed.id
|
|
416
416
|
} })) {
|
|
417
417
|
logger.info({ projectId: typed.id }, "Project not found, creating new project");
|
|
418
|
-
return await createFullProjectServerSide(db
|
|
418
|
+
return await createFullProjectServerSide(db)({
|
|
419
419
|
scopes: {
|
|
420
420
|
tenantId,
|
|
421
421
|
projectId: typed.id
|
|
@@ -847,7 +847,7 @@ const updateFullProjectServerSide = (db, logger = defaultLogger) => async (param
|
|
|
847
847
|
} });
|
|
848
848
|
let deletedAgentCount = 0;
|
|
849
849
|
for (const agent of existingAgents) if (!incomingAgentIds.has(agent.id)) try {
|
|
850
|
-
await deleteFullAgent(db
|
|
850
|
+
await deleteFullAgent(db)({ scopes: {
|
|
851
851
|
tenantId,
|
|
852
852
|
projectId: typed.id,
|
|
853
853
|
agentId: agent.id
|
|
@@ -885,7 +885,7 @@ const updateFullProjectServerSide = (db, logger = defaultLogger) => async (param
|
|
|
885
885
|
credentialReferences: typed.credentialReferences || {},
|
|
886
886
|
statusUpdates: agentData.statusUpdates === null ? void 0 : agentData.statusUpdates
|
|
887
887
|
};
|
|
888
|
-
await updateFullAgentServerSide(db
|
|
888
|
+
await updateFullAgentServerSide(db)({
|
|
889
889
|
tenantId,
|
|
890
890
|
projectId: typed.id
|
|
891
891
|
}, agentDataWithProjectResources);
|
|
@@ -916,7 +916,7 @@ const updateFullProjectServerSide = (db, logger = defaultLogger) => async (param
|
|
|
916
916
|
}, "All project agent updated successfully");
|
|
917
917
|
}
|
|
918
918
|
logger.info({ projectId: typed.id }, "Full project updated successfully");
|
|
919
|
-
const fullProject = await getFullProject(db
|
|
919
|
+
const fullProject = await getFullProject(db)({ scopes: {
|
|
920
920
|
tenantId,
|
|
921
921
|
projectId: typed.id
|
|
922
922
|
} });
|
|
@@ -934,7 +934,7 @@ const updateFullProjectServerSide = (db, logger = defaultLogger) => async (param
|
|
|
934
934
|
/**
|
|
935
935
|
* Get a complete project definition with all nested resources
|
|
936
936
|
*/
|
|
937
|
-
const getFullProjectInternal = (db
|
|
937
|
+
const getFullProjectInternal = (db) => async (params) => {
|
|
938
938
|
const { scopes, includeRelationIds = false } = params;
|
|
939
939
|
const { tenantId, projectId } = scopes;
|
|
940
940
|
logger.info({
|
|
@@ -1205,16 +1205,16 @@ const getFullProjectInternal = (db, logger = defaultLogger) => async (params) =>
|
|
|
1205
1205
|
throw error;
|
|
1206
1206
|
}
|
|
1207
1207
|
};
|
|
1208
|
-
const getFullProject = (db
|
|
1208
|
+
const getFullProject = (db) => async (params) => {
|
|
1209
1209
|
const { scopes } = params;
|
|
1210
|
-
return getFullProjectInternal(db
|
|
1210
|
+
return getFullProjectInternal(db)({
|
|
1211
1211
|
scopes,
|
|
1212
1212
|
includeRelationIds: false
|
|
1213
1213
|
});
|
|
1214
1214
|
};
|
|
1215
|
-
const getFullProjectWithRelationIds = (db
|
|
1215
|
+
const getFullProjectWithRelationIds = (db) => async (params) => {
|
|
1216
1216
|
const { scopes } = params;
|
|
1217
|
-
return getFullProjectInternal(db
|
|
1217
|
+
return getFullProjectInternal(db)({
|
|
1218
1218
|
scopes,
|
|
1219
1219
|
includeRelationIds: true
|
|
1220
1220
|
});
|
|
@@ -1222,7 +1222,7 @@ const getFullProjectWithRelationIds = (db, logger = defaultLogger) => async (par
|
|
|
1222
1222
|
/**
|
|
1223
1223
|
* Delete a complete project and cascade to all related entities
|
|
1224
1224
|
*/
|
|
1225
|
-
const deleteFullProject = (db
|
|
1225
|
+
const deleteFullProject = (db) => async (params) => {
|
|
1226
1226
|
const { scopes } = params;
|
|
1227
1227
|
const { tenantId, projectId } = scopes;
|
|
1228
1228
|
logger.info({
|
|
@@ -1230,7 +1230,7 @@ const deleteFullProject = (db, logger = defaultLogger) => async (params) => {
|
|
|
1230
1230
|
projectId
|
|
1231
1231
|
}, "Deleting full project and related entities");
|
|
1232
1232
|
try {
|
|
1233
|
-
const project = await getFullProject(db
|
|
1233
|
+
const project = await getFullProject(db)({ scopes: {
|
|
1234
1234
|
tenantId,
|
|
1235
1235
|
projectId
|
|
1236
1236
|
} });
|
|
@@ -1254,7 +1254,7 @@ const deleteFullProject = (db, logger = defaultLogger) => async (params) => {
|
|
|
1254
1254
|
projectId,
|
|
1255
1255
|
agentId
|
|
1256
1256
|
}, "Deleting agent from project");
|
|
1257
|
-
await deleteFullAgent(db
|
|
1257
|
+
await deleteFullAgent(db)({ scopes: {
|
|
1258
1258
|
tenantId,
|
|
1259
1259
|
projectId,
|
|
1260
1260
|
agentId
|
|
@@ -15,14 +15,14 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
15
15
|
scopes: ProjectScopeConfig;
|
|
16
16
|
skillId: string;
|
|
17
17
|
}) => Promise<{
|
|
18
|
-
tenantId: string;
|
|
19
|
-
projectId: string;
|
|
20
18
|
id: string;
|
|
21
19
|
name: string;
|
|
22
20
|
createdAt: string;
|
|
23
21
|
updatedAt: string;
|
|
24
|
-
description: string;
|
|
25
22
|
metadata: Record<string, string> | null;
|
|
23
|
+
description: string;
|
|
24
|
+
projectId: string;
|
|
25
|
+
tenantId: string;
|
|
26
26
|
content: string;
|
|
27
27
|
} | null>;
|
|
28
28
|
declare const getSkillByIdWithFiles: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -110,14 +110,14 @@ interface WithTenantIdProjectId {
|
|
|
110
110
|
}
|
|
111
111
|
declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillApiInsert & WithTenantIdProjectId) => Promise<SkillRecordWithFiles>;
|
|
112
112
|
declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillApiInsert & WithTenantIdProjectId) => Promise<{
|
|
113
|
-
tenantId: string;
|
|
114
|
-
projectId: string;
|
|
115
113
|
id: string;
|
|
116
114
|
name: string;
|
|
117
115
|
createdAt: string;
|
|
118
116
|
updatedAt: string;
|
|
119
|
-
description: string;
|
|
120
117
|
metadata: Record<string, string> | null;
|
|
118
|
+
description: string;
|
|
119
|
+
projectId: string;
|
|
120
|
+
tenantId: string;
|
|
121
121
|
content: string;
|
|
122
122
|
}>;
|
|
123
123
|
declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -139,12 +139,12 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
|
|
|
139
139
|
index: number;
|
|
140
140
|
alwaysLoaded?: boolean;
|
|
141
141
|
}) => Promise<{
|
|
142
|
-
tenantId: string;
|
|
143
|
-
projectId: string;
|
|
144
142
|
id: string;
|
|
145
143
|
createdAt: string;
|
|
146
144
|
updatedAt: string;
|
|
147
145
|
agentId: string;
|
|
146
|
+
projectId: string;
|
|
147
|
+
tenantId: string;
|
|
148
148
|
subAgentId: string;
|
|
149
149
|
index: number;
|
|
150
150
|
alwaysLoaded: boolean;
|