@inkeep/agents-core 0.51.0 → 0.52.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/auth/auth-schema.d.ts +107 -107
- package/dist/auth/auth-validation-schemas.d.ts +135 -135
- package/dist/auth/auth.d.ts +18 -18
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +8 -14
- package/dist/data-access/manage/agentFull.d.ts +2 -1
- package/dist/data-access/manage/agents.d.ts +33 -32
- package/dist/data-access/manage/artifactComponents.d.ts +16 -15
- package/dist/data-access/manage/contextConfigs.d.ts +10 -9
- package/dist/data-access/manage/credentialReferences.d.ts +2 -1
- package/dist/data-access/manage/dataComponents.d.ts +8 -7
- package/dist/data-access/manage/evalConfig.d.ts +2 -1
- package/dist/data-access/manage/externalAgents.d.ts +2 -1
- package/dist/data-access/manage/functionTools.d.ts +14 -14
- package/dist/data-access/manage/functions.d.ts +2 -2
- package/dist/data-access/manage/projectFull.d.ts +2 -1
- package/dist/data-access/manage/projects.d.ts +2 -1
- package/dist/data-access/manage/scheduledTriggers.d.ts +2 -2
- package/dist/data-access/manage/scheduledWorkflows.d.ts +2 -2
- package/dist/data-access/manage/scope-helpers.d.ts +15 -22
- package/dist/data-access/manage/scope-helpers.js +15 -12
- package/dist/data-access/manage/skills.d.ts +15 -14
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +20 -19
- package/dist/data-access/manage/subAgentRelations.d.ts +22 -21
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +20 -19
- package/dist/data-access/manage/subAgents.d.ts +23 -22
- package/dist/data-access/manage/tools.d.ts +26 -25
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +10 -9
- package/dist/data-access/runtime/cascade-delete.d.ts +1 -1
- package/dist/data-access/runtime/contextCache.d.ts +2 -2
- package/dist/data-access/runtime/conversations.d.ts +14 -13
- package/dist/data-access/runtime/evalRuns.d.ts +2 -1
- package/dist/data-access/runtime/ledgerArtifacts.d.ts +1 -1
- package/dist/data-access/runtime/messages.d.ts +17 -16
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +2 -2
- package/dist/data-access/runtime/tasks.d.ts +3 -3
- package/dist/data-access/runtime/triggerInvocations.d.ts +2 -2
- package/dist/db/manage/manage-schema.d.ts +445 -445
- package/dist/db/manage/manage-schema.js +1 -1
- package/dist/db/manage/scope-definitions.d.ts +31 -0
- package/dist/db/manage/scope-definitions.js +31 -0
- package/dist/db/runtime/runtime-schema.d.ts +290 -290
- package/dist/dolt/branches-api.d.ts +2 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +3 -2
- package/dist/middleware/no-auth.d.ts +2 -2
- package/dist/types/index.d.ts +2 -1
- package/dist/types/utility.d.ts +2 -11
- package/dist/utils/error.d.ts +3 -1
- package/dist/utils/error.js +11 -1
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/index.js +3 -2
- package/dist/utils/retry.d.ts +8 -0
- package/dist/utils/retry.js +30 -0
- package/dist/validation/schemas.d.ts +396 -426
- package/dist/validation/schemas.js +2 -1
- package/drizzle/manage/0010_oval_angel.sql +2 -0
- package/drizzle/manage/meta/0010_snapshot.json +3673 -0
- package/drizzle/manage/meta/_journal.json +7 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
2
|
+
import { PaginationConfig } from "../../types/utility.js";
|
|
2
3
|
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
4
|
import { FunctionApiInsert } from "../../types/entities.js";
|
|
4
5
|
|
|
5
6
|
//#region src/data-access/manage/functions.d.ts
|
|
6
|
-
|
|
7
7
|
/**
|
|
8
8
|
* Create or update a function (project-scoped)
|
|
9
9
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ProjectScopeConfig } from "../../
|
|
1
|
+
import { ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
2
|
+
import "../../types/utility.js";
|
|
2
3
|
import { getLogger } from "../../utils/logger.js";
|
|
3
4
|
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
4
5
|
import { FullProjectDefinition, FullProjectSelect, FullProjectSelectWithRelationIds } from "../../types/entities.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
2
|
+
import { PaginationConfig, PaginationResult, ProjectInfo, ProjectResourceCounts } from "../../types/utility.js";
|
|
2
3
|
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
4
|
import { ProjectInsert, ProjectSelect, ProjectUpdate } from "../../types/entities.js";
|
|
4
5
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AgentScopeConfig
|
|
1
|
+
import { AgentScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
2
|
+
import { PaginationConfig } from "../../types/utility.js";
|
|
2
3
|
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
4
|
import { ScheduledTrigger, ScheduledTriggerInsert, ScheduledTriggerUpdate } from "../../validation/schemas.js";
|
|
4
5
|
|
|
5
6
|
//#region src/data-access/manage/scheduledTriggers.d.ts
|
|
6
|
-
|
|
7
7
|
/**
|
|
8
8
|
* Get a scheduled trigger by ID (agent-scoped)
|
|
9
9
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AgentScopeConfig } from "../../
|
|
1
|
+
import { AgentScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
2
|
+
import "../../types/utility.js";
|
|
2
3
|
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
4
|
import { ScheduledWorkflow, ScheduledWorkflowInsert } from "../../validation/schemas.js";
|
|
4
5
|
|
|
5
6
|
//#region src/data-access/manage/scheduledWorkflows.d.ts
|
|
6
|
-
|
|
7
7
|
/**
|
|
8
8
|
* Get a scheduled workflow by trigger ID (agent-scoped)
|
|
9
9
|
*/
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { ScopeConfig, ScopeLevel, ScopedTable } from "../../db/manage/scope-definitions.js";
|
|
2
|
+
import { SQL } from "drizzle-orm";
|
|
3
3
|
|
|
4
4
|
//#region src/data-access/manage/scope-helpers.d.ts
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
type SubAgentScopedColumns = AgentScopedColumns & {
|
|
18
|
-
subAgentId: any;
|
|
19
|
-
};
|
|
20
|
-
declare function tenantScopedWhere<T extends TenantScopedColumns>(table: T, scopes: TenantScopeConfig): drizzle_orm0.SQL<unknown>;
|
|
21
|
-
declare function projectScopedWhere<T extends ProjectScopedColumns>(table: T, scopes: ProjectScopeConfig): drizzle_orm0.SQL<unknown> | undefined;
|
|
22
|
-
declare function agentScopedWhere<T extends AgentScopedColumns>(table: T, scopes: AgentScopeConfig): drizzle_orm0.SQL<unknown> | undefined;
|
|
23
|
-
declare function subAgentScopedWhere<T extends SubAgentScopedColumns>(table: T, scopes: SubAgentScopeConfig): drizzle_orm0.SQL<unknown> | undefined;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Build a WHERE clause that filters by all scope columns for the given level.
|
|
8
|
+
*
|
|
9
|
+
* The columns and config shape are both derived from `SCOPE_KEYS` in
|
|
10
|
+
* `scope-definitions.ts`, so they cannot drift apart.
|
|
11
|
+
*/
|
|
12
|
+
declare function scopedWhere<L extends ScopeLevel>(level: L, table: ScopedTable<L>, scopes: ScopeConfig<L>): SQL | undefined;
|
|
13
|
+
declare const tenantScopedWhere: <T extends ScopedTable<"tenant">>(table: T, scopes: ScopeConfig<"tenant">) => SQL<unknown> | undefined;
|
|
14
|
+
declare const projectScopedWhere: <T extends ScopedTable<"project">>(table: T, scopes: ScopeConfig<"project">) => SQL<unknown> | undefined;
|
|
15
|
+
declare const agentScopedWhere: <T extends ScopedTable<"agent">>(table: T, scopes: ScopeConfig<"agent">) => SQL<unknown> | undefined;
|
|
16
|
+
declare const subAgentScopedWhere: <T extends ScopedTable<"subAgent">>(table: T, scopes: ScopeConfig<"subAgent">) => SQL<unknown> | undefined;
|
|
24
17
|
//#endregion
|
|
25
|
-
export { agentScopedWhere, projectScopedWhere, subAgentScopedWhere, tenantScopedWhere };
|
|
18
|
+
export { agentScopedWhere, projectScopedWhere, scopedWhere, subAgentScopedWhere, tenantScopedWhere };
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
+
import { SCOPE_KEYS } from "../../db/manage/scope-definitions.js";
|
|
1
2
|
import { and, eq } from "drizzle-orm";
|
|
2
3
|
|
|
3
4
|
//#region src/data-access/manage/scope-helpers.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function subAgentScopedWhere(table, scopes) {
|
|
14
|
-
return and(eq(table.tenantId, scopes.tenantId), eq(table.projectId, scopes.projectId), eq(table.agentId, scopes.agentId), eq(table.subAgentId, scopes.subAgentId));
|
|
5
|
+
/**
|
|
6
|
+
* Build a WHERE clause that filters by all scope columns for the given level.
|
|
7
|
+
*
|
|
8
|
+
* The columns and config shape are both derived from `SCOPE_KEYS` in
|
|
9
|
+
* `scope-definitions.ts`, so they cannot drift apart.
|
|
10
|
+
*/
|
|
11
|
+
function scopedWhere(level, table, scopes) {
|
|
12
|
+
const conditions = SCOPE_KEYS[level].map((key) => eq(table[key], scopes[key]));
|
|
13
|
+
return conditions.length === 1 ? conditions[0] : and(...conditions);
|
|
15
14
|
}
|
|
15
|
+
const tenantScopedWhere = (table, scopes) => scopedWhere("tenant", table, scopes);
|
|
16
|
+
const projectScopedWhere = (table, scopes) => scopedWhere("project", table, scopes);
|
|
17
|
+
const agentScopedWhere = (table, scopes) => scopedWhere("agent", table, scopes);
|
|
18
|
+
const subAgentScopedWhere = (table, scopes) => scopedWhere("subAgent", table, scopes);
|
|
16
19
|
|
|
17
20
|
//#endregion
|
|
18
|
-
export { agentScopedWhere, projectScopedWhere, subAgentScopedWhere, tenantScopedWhere };
|
|
21
|
+
export { agentScopedWhere, projectScopedWhere, scopedWhere, subAgentScopedWhere, tenantScopedWhere };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AgentScopeConfig,
|
|
1
|
+
import { AgentScopeConfig, ProjectScopeConfig, SubAgentScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
2
|
+
import { PaginationConfig } from "../../types/utility.js";
|
|
2
3
|
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
4
|
import { SkillInsert, SkillUpdate, SubAgentSkillWithIndex } from "../../types/entities.js";
|
|
4
5
|
|
|
@@ -7,15 +8,15 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
7
8
|
scopes: ProjectScopeConfig;
|
|
8
9
|
skillId: string;
|
|
9
10
|
}) => Promise<{
|
|
10
|
-
id: string;
|
|
11
|
-
name: string;
|
|
12
11
|
description: string;
|
|
12
|
+
name: string;
|
|
13
|
+
content: string;
|
|
13
14
|
tenantId: string;
|
|
14
15
|
projectId: string;
|
|
16
|
+
id: string;
|
|
15
17
|
createdAt: string;
|
|
16
18
|
updatedAt: string;
|
|
17
19
|
metadata: Record<string, string> | null;
|
|
18
|
-
content: string;
|
|
19
20
|
} | null>;
|
|
20
21
|
declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
|
|
21
22
|
scopes: ProjectScopeConfig;
|
|
@@ -40,26 +41,26 @@ declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
40
41
|
};
|
|
41
42
|
}>;
|
|
42
43
|
declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
|
|
43
|
-
id: string;
|
|
44
|
-
name: string;
|
|
45
44
|
description: string;
|
|
45
|
+
name: string;
|
|
46
|
+
content: string;
|
|
46
47
|
tenantId: string;
|
|
47
48
|
projectId: string;
|
|
49
|
+
id: string;
|
|
48
50
|
createdAt: string;
|
|
49
51
|
updatedAt: string;
|
|
50
52
|
metadata: Record<string, string> | null;
|
|
51
|
-
content: string;
|
|
52
53
|
}>;
|
|
53
54
|
declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
|
|
54
|
-
id: string;
|
|
55
|
-
name: string;
|
|
56
55
|
description: string;
|
|
56
|
+
name: string;
|
|
57
|
+
content: string;
|
|
57
58
|
tenantId: string;
|
|
58
59
|
projectId: string;
|
|
60
|
+
id: string;
|
|
59
61
|
createdAt: string;
|
|
60
62
|
updatedAt: string;
|
|
61
63
|
metadata: Record<string, string> | null;
|
|
62
|
-
content: string;
|
|
63
64
|
}>;
|
|
64
65
|
declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
65
66
|
scopes: ProjectScopeConfig;
|
|
@@ -90,16 +91,16 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
|
|
|
90
91
|
index: number;
|
|
91
92
|
alwaysLoaded?: boolean;
|
|
92
93
|
}) => Promise<{
|
|
93
|
-
id: string;
|
|
94
94
|
tenantId: string;
|
|
95
95
|
projectId: string;
|
|
96
|
-
|
|
96
|
+
subAgentId: string;
|
|
97
|
+
id: string;
|
|
97
98
|
createdAt: string;
|
|
98
99
|
updatedAt: string;
|
|
100
|
+
agentId: string;
|
|
101
|
+
skillId: string;
|
|
99
102
|
index: number;
|
|
100
103
|
alwaysLoaded: boolean;
|
|
101
|
-
subAgentId: string;
|
|
102
|
-
skillId: string;
|
|
103
104
|
}>;
|
|
104
105
|
declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
105
106
|
scopes: AgentScopeConfig;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AgentScopeConfig,
|
|
1
|
+
import { AgentScopeConfig, SubAgentScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
2
|
+
import { ConversationHistoryConfig, PaginationConfig } from "../../types/utility.js";
|
|
2
3
|
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
4
|
import "../../index.js";
|
|
4
5
|
import { SubAgentExternalAgentRelationInsert } from "../../types/entities.js";
|
|
@@ -8,15 +9,15 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
|
|
|
8
9
|
scopes: SubAgentScopeConfig;
|
|
9
10
|
relationId: string;
|
|
10
11
|
}) => Promise<{
|
|
11
|
-
id: string;
|
|
12
12
|
tenantId: string;
|
|
13
13
|
projectId: string;
|
|
14
|
-
|
|
14
|
+
subAgentId: string;
|
|
15
|
+
id: string;
|
|
15
16
|
createdAt: string;
|
|
16
17
|
updatedAt: string;
|
|
18
|
+
agentId: string;
|
|
17
19
|
headers: Record<string, string> | null;
|
|
18
20
|
externalAgentId: string;
|
|
19
|
-
subAgentId: string;
|
|
20
21
|
} | undefined>;
|
|
21
22
|
declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
22
23
|
scopes: SubAgentScopeConfig;
|
|
@@ -43,28 +44,28 @@ declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClien
|
|
|
43
44
|
declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
44
45
|
scopes: SubAgentScopeConfig;
|
|
45
46
|
}) => Promise<{
|
|
46
|
-
id: string;
|
|
47
47
|
tenantId: string;
|
|
48
48
|
projectId: string;
|
|
49
|
-
|
|
49
|
+
subAgentId: string;
|
|
50
|
+
id: string;
|
|
50
51
|
createdAt: string;
|
|
51
52
|
updatedAt: string;
|
|
53
|
+
agentId: string;
|
|
52
54
|
headers: Record<string, string> | null;
|
|
53
55
|
externalAgentId: string;
|
|
54
|
-
subAgentId: string;
|
|
55
56
|
}[]>;
|
|
56
57
|
declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
57
58
|
scopes: AgentScopeConfig;
|
|
58
59
|
}) => Promise<{
|
|
59
|
-
id: string;
|
|
60
60
|
tenantId: string;
|
|
61
61
|
projectId: string;
|
|
62
|
-
|
|
62
|
+
subAgentId: string;
|
|
63
|
+
id: string;
|
|
63
64
|
createdAt: string;
|
|
64
65
|
updatedAt: string;
|
|
66
|
+
agentId: string;
|
|
65
67
|
headers: Record<string, string> | null;
|
|
66
68
|
externalAgentId: string;
|
|
67
|
-
subAgentId: string;
|
|
68
69
|
}[]>;
|
|
69
70
|
declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
70
71
|
scopes: AgentScopeConfig;
|
|
@@ -179,15 +180,15 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
179
180
|
headers?: Record<string, string> | null;
|
|
180
181
|
};
|
|
181
182
|
}) => Promise<{
|
|
182
|
-
id: string;
|
|
183
183
|
tenantId: string;
|
|
184
184
|
projectId: string;
|
|
185
|
-
|
|
185
|
+
subAgentId: string;
|
|
186
|
+
id: string;
|
|
186
187
|
createdAt: string;
|
|
187
188
|
updatedAt: string;
|
|
189
|
+
agentId: string;
|
|
188
190
|
headers: Record<string, string> | null;
|
|
189
191
|
externalAgentId: string;
|
|
190
|
-
subAgentId: string;
|
|
191
192
|
}>;
|
|
192
193
|
/**
|
|
193
194
|
* Check if sub-agent external agent relation exists by params
|
|
@@ -196,15 +197,15 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
|
|
|
196
197
|
scopes: SubAgentScopeConfig;
|
|
197
198
|
externalAgentId: string;
|
|
198
199
|
}) => Promise<{
|
|
199
|
-
id: string;
|
|
200
200
|
tenantId: string;
|
|
201
201
|
projectId: string;
|
|
202
|
-
|
|
202
|
+
subAgentId: string;
|
|
203
|
+
id: string;
|
|
203
204
|
createdAt: string;
|
|
204
205
|
updatedAt: string;
|
|
206
|
+
agentId: string;
|
|
205
207
|
headers: Record<string, string> | null;
|
|
206
208
|
externalAgentId: string;
|
|
207
|
-
subAgentId: string;
|
|
208
209
|
} | undefined>;
|
|
209
210
|
/**
|
|
210
211
|
* Upsert sub-agent external agent relation (create if it doesn't exist, update if it does)
|
|
@@ -217,15 +218,15 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
217
218
|
headers?: Record<string, string> | null;
|
|
218
219
|
};
|
|
219
220
|
}) => Promise<{
|
|
220
|
-
id: string;
|
|
221
221
|
tenantId: string;
|
|
222
222
|
projectId: string;
|
|
223
|
-
|
|
223
|
+
subAgentId: string;
|
|
224
|
+
id: string;
|
|
224
225
|
createdAt: string;
|
|
225
226
|
updatedAt: string;
|
|
227
|
+
agentId: string;
|
|
226
228
|
headers: Record<string, string> | null;
|
|
227
229
|
externalAgentId: string;
|
|
228
|
-
subAgentId: string;
|
|
229
230
|
}>;
|
|
230
231
|
declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
231
232
|
scopes: SubAgentScopeConfig;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AgentScopeConfig,
|
|
1
|
+
import { AgentScopeConfig, SubAgentScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
2
|
+
import { ConversationHistoryConfig, PaginationConfig, ToolMcpConfig, ToolServerCapabilities } from "../../types/utility.js";
|
|
2
3
|
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
4
|
import "../../index.js";
|
|
4
5
|
import { SubAgentRelationInsert, SubAgentRelationUpdate, SubAgentToolRelationUpdate } from "../../types/entities.js";
|
|
@@ -8,12 +9,12 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
8
9
|
scopes: AgentScopeConfig;
|
|
9
10
|
relationId: string;
|
|
10
11
|
}) => Promise<{
|
|
11
|
-
id: string;
|
|
12
12
|
tenantId: string;
|
|
13
13
|
projectId: string;
|
|
14
|
-
|
|
14
|
+
id: string;
|
|
15
15
|
createdAt: string;
|
|
16
16
|
updatedAt: string;
|
|
17
|
+
agentId: string;
|
|
17
18
|
sourceSubAgentId: string;
|
|
18
19
|
targetSubAgentId: string | null;
|
|
19
20
|
relationType: string | null;
|
|
@@ -43,12 +44,12 @@ declare const listAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
43
44
|
declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
44
45
|
scopes: SubAgentScopeConfig;
|
|
45
46
|
}) => Promise<{
|
|
46
|
-
id: string;
|
|
47
47
|
tenantId: string;
|
|
48
48
|
projectId: string;
|
|
49
|
-
|
|
49
|
+
id: string;
|
|
50
50
|
createdAt: string;
|
|
51
51
|
updatedAt: string;
|
|
52
|
+
agentId: string;
|
|
52
53
|
sourceSubAgentId: string;
|
|
53
54
|
targetSubAgentId: string | null;
|
|
54
55
|
relationType: string | null;
|
|
@@ -56,12 +57,12 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
56
57
|
declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
57
58
|
scopes: AgentScopeConfig;
|
|
58
59
|
}) => Promise<{
|
|
59
|
-
id: string;
|
|
60
60
|
tenantId: string;
|
|
61
61
|
projectId: string;
|
|
62
|
-
|
|
62
|
+
id: string;
|
|
63
63
|
createdAt: string;
|
|
64
64
|
updatedAt: string;
|
|
65
|
+
agentId: string;
|
|
65
66
|
sourceSubAgentId: string;
|
|
66
67
|
targetSubAgentId: string | null;
|
|
67
68
|
relationType: string | null;
|
|
@@ -125,12 +126,12 @@ declare const getRelatedAgentsForAgent: (db: AgentsManageDatabaseClient) => (par
|
|
|
125
126
|
}[];
|
|
126
127
|
}>;
|
|
127
128
|
declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
128
|
-
id: string;
|
|
129
129
|
tenantId: string;
|
|
130
130
|
projectId: string;
|
|
131
|
-
|
|
131
|
+
id: string;
|
|
132
132
|
createdAt: string;
|
|
133
133
|
updatedAt: string;
|
|
134
|
+
agentId: string;
|
|
134
135
|
sourceSubAgentId: string;
|
|
135
136
|
targetSubAgentId: string | null;
|
|
136
137
|
relationType: string | null;
|
|
@@ -144,12 +145,12 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
144
145
|
targetSubAgentId?: string;
|
|
145
146
|
relationType: string;
|
|
146
147
|
}) => Promise<{
|
|
147
|
-
id: string;
|
|
148
148
|
tenantId: string;
|
|
149
149
|
projectId: string;
|
|
150
|
-
|
|
150
|
+
id: string;
|
|
151
151
|
createdAt: string;
|
|
152
152
|
updatedAt: string;
|
|
153
|
+
agentId: string;
|
|
153
154
|
sourceSubAgentId: string;
|
|
154
155
|
targetSubAgentId: string | null;
|
|
155
156
|
relationType: string | null;
|
|
@@ -158,12 +159,12 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
158
159
|
* Upsert agent relation (create if it doesn't exist, no-op if it does)
|
|
159
160
|
*/
|
|
160
161
|
declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
161
|
-
id: string;
|
|
162
162
|
tenantId: string;
|
|
163
163
|
projectId: string;
|
|
164
|
-
|
|
164
|
+
id: string;
|
|
165
165
|
createdAt: string;
|
|
166
166
|
updatedAt: string;
|
|
167
|
+
agentId: string;
|
|
167
168
|
sourceSubAgentId: string;
|
|
168
169
|
targetSubAgentId: string | null;
|
|
169
170
|
relationType: string | null;
|
|
@@ -203,19 +204,19 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
|
|
|
203
204
|
}> | null;
|
|
204
205
|
};
|
|
205
206
|
}) => Promise<{
|
|
206
|
-
id: string;
|
|
207
207
|
tenantId: string;
|
|
208
208
|
projectId: string;
|
|
209
|
-
|
|
209
|
+
subAgentId: string;
|
|
210
|
+
id: string;
|
|
210
211
|
createdAt: string;
|
|
211
212
|
updatedAt: string;
|
|
213
|
+
agentId: string;
|
|
212
214
|
toolId: string;
|
|
213
215
|
headers: Record<string, string> | null;
|
|
216
|
+
selectedTools: string[] | null;
|
|
214
217
|
toolPolicies: Record<string, {
|
|
215
218
|
needsApproval?: boolean;
|
|
216
219
|
}> | null;
|
|
217
|
-
subAgentId: string;
|
|
218
|
-
selectedTools: string[] | null;
|
|
219
220
|
}>;
|
|
220
221
|
declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
221
222
|
scopes: AgentScopeConfig;
|
|
@@ -247,19 +248,19 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
|
|
|
247
248
|
scopes: SubAgentScopeConfig;
|
|
248
249
|
relationId: string;
|
|
249
250
|
}) => Promise<{
|
|
250
|
-
id: string;
|
|
251
251
|
tenantId: string;
|
|
252
252
|
projectId: string;
|
|
253
|
-
|
|
253
|
+
subAgentId: string;
|
|
254
|
+
id: string;
|
|
254
255
|
createdAt: string;
|
|
255
256
|
updatedAt: string;
|
|
257
|
+
agentId: string;
|
|
256
258
|
toolId: string;
|
|
257
259
|
headers: Record<string, string> | null;
|
|
260
|
+
selectedTools: string[] | null;
|
|
258
261
|
toolPolicies: Record<string, {
|
|
259
262
|
needsApproval?: boolean;
|
|
260
263
|
}> | null;
|
|
261
|
-
subAgentId: string;
|
|
262
|
-
selectedTools: string[] | null;
|
|
263
264
|
} | undefined>;
|
|
264
265
|
declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
265
266
|
scopes: SubAgentScopeConfig;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AgentScopeConfig,
|
|
1
|
+
import { AgentScopeConfig, SubAgentScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
2
|
+
import { ConversationHistoryConfig, PaginationConfig } from "../../types/utility.js";
|
|
2
3
|
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
4
|
import "../../index.js";
|
|
4
5
|
import { SubAgentTeamAgentRelationInsert } from "../../types/entities.js";
|
|
@@ -8,14 +9,14 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
|
|
|
8
9
|
scopes: SubAgentScopeConfig;
|
|
9
10
|
relationId: string;
|
|
10
11
|
}) => Promise<{
|
|
11
|
-
id: string;
|
|
12
12
|
tenantId: string;
|
|
13
13
|
projectId: string;
|
|
14
|
-
|
|
14
|
+
subAgentId: string;
|
|
15
|
+
id: string;
|
|
15
16
|
createdAt: string;
|
|
16
17
|
updatedAt: string;
|
|
18
|
+
agentId: string;
|
|
17
19
|
headers: Record<string, string> | null;
|
|
18
|
-
subAgentId: string;
|
|
19
20
|
targetAgentId: string;
|
|
20
21
|
} | undefined>;
|
|
21
22
|
declare const listSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -43,27 +44,27 @@ declare const listSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =
|
|
|
43
44
|
declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
44
45
|
scopes: SubAgentScopeConfig;
|
|
45
46
|
}) => Promise<{
|
|
46
|
-
id: string;
|
|
47
47
|
tenantId: string;
|
|
48
48
|
projectId: string;
|
|
49
|
-
|
|
49
|
+
subAgentId: string;
|
|
50
|
+
id: string;
|
|
50
51
|
createdAt: string;
|
|
51
52
|
updatedAt: string;
|
|
53
|
+
agentId: string;
|
|
52
54
|
headers: Record<string, string> | null;
|
|
53
|
-
subAgentId: string;
|
|
54
55
|
targetAgentId: string;
|
|
55
56
|
}[]>;
|
|
56
57
|
declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
57
58
|
scopes: AgentScopeConfig;
|
|
58
59
|
}) => Promise<{
|
|
59
|
-
id: string;
|
|
60
60
|
tenantId: string;
|
|
61
61
|
projectId: string;
|
|
62
|
-
|
|
62
|
+
subAgentId: string;
|
|
63
|
+
id: string;
|
|
63
64
|
createdAt: string;
|
|
64
65
|
updatedAt: string;
|
|
66
|
+
agentId: string;
|
|
65
67
|
headers: Record<string, string> | null;
|
|
66
|
-
subAgentId: string;
|
|
67
68
|
targetAgentId: string;
|
|
68
69
|
}[]>;
|
|
69
70
|
declare const getSubAgentTeamAgentRelationsByTeamAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -209,14 +210,14 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
209
210
|
headers?: Record<string, string> | null;
|
|
210
211
|
};
|
|
211
212
|
}) => Promise<{
|
|
212
|
-
id: string;
|
|
213
213
|
tenantId: string;
|
|
214
214
|
projectId: string;
|
|
215
|
-
|
|
215
|
+
subAgentId: string;
|
|
216
|
+
id: string;
|
|
216
217
|
createdAt: string;
|
|
217
218
|
updatedAt: string;
|
|
219
|
+
agentId: string;
|
|
218
220
|
headers: Record<string, string> | null;
|
|
219
|
-
subAgentId: string;
|
|
220
221
|
targetAgentId: string;
|
|
221
222
|
}>;
|
|
222
223
|
/**
|
|
@@ -226,14 +227,14 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
|
|
|
226
227
|
scopes: SubAgentScopeConfig;
|
|
227
228
|
targetAgentId: string;
|
|
228
229
|
}) => Promise<{
|
|
229
|
-
id: string;
|
|
230
230
|
tenantId: string;
|
|
231
231
|
projectId: string;
|
|
232
|
-
|
|
232
|
+
subAgentId: string;
|
|
233
|
+
id: string;
|
|
233
234
|
createdAt: string;
|
|
234
235
|
updatedAt: string;
|
|
236
|
+
agentId: string;
|
|
235
237
|
headers: Record<string, string> | null;
|
|
236
|
-
subAgentId: string;
|
|
237
238
|
targetAgentId: string;
|
|
238
239
|
} | undefined>;
|
|
239
240
|
/**
|
|
@@ -247,14 +248,14 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
247
248
|
headers?: Record<string, string> | null;
|
|
248
249
|
};
|
|
249
250
|
}) => Promise<{
|
|
250
|
-
id: string;
|
|
251
251
|
tenantId: string;
|
|
252
252
|
projectId: string;
|
|
253
|
-
|
|
253
|
+
subAgentId: string;
|
|
254
|
+
id: string;
|
|
254
255
|
createdAt: string;
|
|
255
256
|
updatedAt: string;
|
|
257
|
+
agentId: string;
|
|
256
258
|
headers: Record<string, string> | null;
|
|
257
|
-
subAgentId: string;
|
|
258
259
|
targetAgentId: string;
|
|
259
260
|
}>;
|
|
260
261
|
declare const updateSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|