@inkeep/agents-core 0.0.0-dev-20260223184719 → 0.0.0-dev-20260223201736

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.
Files changed (51) hide show
  1. package/dist/auth/auth-schema.d.ts +107 -107
  2. package/dist/auth/auth-validation-schemas.d.ts +152 -152
  3. package/dist/auth/auth.d.ts +57 -57
  4. package/dist/auth/permissions.d.ts +13 -13
  5. package/dist/client-exports.d.ts +3 -3
  6. package/dist/data-access/manage/agentFull.d.ts +2 -1
  7. package/dist/data-access/manage/agents.d.ts +23 -22
  8. package/dist/data-access/manage/artifactComponents.d.ts +10 -9
  9. package/dist/data-access/manage/contextConfigs.d.ts +10 -9
  10. package/dist/data-access/manage/credentialReferences.d.ts +2 -1
  11. package/dist/data-access/manage/dataComponents.d.ts +6 -5
  12. package/dist/data-access/manage/evalConfig.d.ts +2 -1
  13. package/dist/data-access/manage/externalAgents.d.ts +2 -1
  14. package/dist/data-access/manage/functionTools.d.ts +14 -14
  15. package/dist/data-access/manage/functions.d.ts +2 -2
  16. package/dist/data-access/manage/projectFull.d.ts +2 -1
  17. package/dist/data-access/manage/projects.d.ts +2 -1
  18. package/dist/data-access/manage/scheduledTriggers.d.ts +2 -2
  19. package/dist/data-access/manage/scheduledWorkflows.d.ts +2 -2
  20. package/dist/data-access/manage/scope-helpers.d.ts +15 -22
  21. package/dist/data-access/manage/scope-helpers.js +15 -12
  22. package/dist/data-access/manage/skills.d.ts +15 -14
  23. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +26 -25
  24. package/dist/data-access/manage/subAgentRelations.d.ts +22 -21
  25. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +20 -19
  26. package/dist/data-access/manage/subAgents.d.ts +17 -16
  27. package/dist/data-access/manage/tools.d.ts +20 -19
  28. package/dist/data-access/manage/triggers.d.ts +3 -3
  29. package/dist/data-access/runtime/apiKeys.d.ts +18 -17
  30. package/dist/data-access/runtime/cascade-delete.d.ts +1 -1
  31. package/dist/data-access/runtime/contextCache.d.ts +2 -2
  32. package/dist/data-access/runtime/conversations.d.ts +33 -32
  33. package/dist/data-access/runtime/evalRuns.d.ts +2 -1
  34. package/dist/data-access/runtime/ledgerArtifacts.d.ts +1 -1
  35. package/dist/data-access/runtime/messages.d.ts +20 -19
  36. package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +2 -2
  37. package/dist/data-access/runtime/tasks.d.ts +9 -9
  38. package/dist/data-access/runtime/triggerInvocations.d.ts +2 -2
  39. package/dist/db/manage/manage-schema.d.ts +447 -447
  40. package/dist/db/manage/scope-definitions.d.ts +31 -0
  41. package/dist/db/manage/scope-definitions.js +31 -0
  42. package/dist/db/runtime/runtime-schema.d.ts +296 -296
  43. package/dist/dolt/branches-api.d.ts +2 -1
  44. package/dist/index.d.ts +2 -1
  45. package/dist/middleware/no-auth.d.ts +2 -2
  46. package/dist/types/index.d.ts +2 -1
  47. package/dist/types/utility.d.ts +2 -11
  48. package/dist/validation/dolt-schemas.d.ts +1 -1
  49. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  50. package/dist/validation/schemas.d.ts +1824 -1824
  51. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
- import { PaginationConfig, ProjectScopeConfig, SubAgentScopeConfig } from "../../types/utility.js";
1
+ import { ProjectScopeConfig, SubAgentScopeConfig } from "../../db/manage/scope-definitions.js";
2
+ import { PaginationConfig } from "../../types/utility.js";
2
3
  import "../../types/index.js";
3
4
  import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
4
5
  import { DataComponentInsert, DataComponentSelect, DataComponentUpdate } from "../../types/entities.js";
@@ -65,11 +66,11 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
65
66
  dataComponentId: string;
66
67
  }) => Promise<{
67
68
  id: string;
68
- createdAt: string;
69
69
  tenantId: string;
70
70
  projectId: string;
71
- subAgentId: string;
72
71
  agentId: string;
72
+ createdAt: string;
73
+ subAgentId: string;
73
74
  dataComponentId: string;
74
75
  }>;
75
76
  /**
@@ -107,11 +108,11 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
107
108
  dataComponentId: string;
108
109
  }) => Promise<{
109
110
  id: string;
110
- createdAt: string;
111
111
  tenantId: string;
112
112
  projectId: string;
113
- subAgentId: string;
114
113
  agentId: string;
114
+ createdAt: string;
115
+ subAgentId: string;
115
116
  dataComponentId: string;
116
117
  } | null>;
117
118
  /**
@@ -1,4 +1,5 @@
1
- import { ProjectScopeConfig } from "../../types/utility.js";
1
+ import { ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
2
+ import "../../types/utility.js";
2
3
  import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
3
4
  import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
4
5
  import { DatasetInsert, DatasetItemInsert, DatasetItemSelect, DatasetItemUpdate, DatasetRunConfigAgentRelationInsert, DatasetRunConfigAgentRelationSelect, DatasetRunConfigInsert, DatasetRunConfigSelect, DatasetRunConfigUpdate, DatasetSelect, DatasetUpdate, EvaluationJobConfigEvaluatorRelationInsert, EvaluationJobConfigEvaluatorRelationSelect, EvaluationJobConfigInsert, EvaluationJobConfigSelect, EvaluationRunConfigEvaluationSuiteConfigRelationInsert, EvaluationRunConfigEvaluationSuiteConfigRelationSelect, EvaluationRunConfigInsert, EvaluationRunConfigSelect, EvaluationRunConfigUpdate, EvaluationRunConfigWithSuiteConfigs, EvaluationSuiteConfigEvaluatorRelationInsert, EvaluationSuiteConfigEvaluatorRelationSelect, EvaluationSuiteConfigInsert, EvaluationSuiteConfigSelect, EvaluationSuiteConfigUpdate, EvaluatorInsert, EvaluatorSelect, EvaluatorUpdate } from "../../types/entities.js";
@@ -1,4 +1,5 @@
1
- import { PaginationConfig, ProjectScopeConfig } from "../../types/utility.js";
1
+ import { ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
2
+ import { PaginationConfig } from "../../types/utility.js";
2
3
  import "../../types/index.js";
3
4
  import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
4
5
  import { ExternalAgentInsert, ExternalAgentSelect, ExternalAgentUpdate } from "../../types/entities.js";
@@ -1,9 +1,9 @@
1
- import { AgentScopeConfig, PaginationConfig } from "../../types/utility.js";
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 { FunctionToolApiInsert, FunctionToolApiUpdate } from "../../types/entities.js";
4
5
 
5
6
  //#region src/data-access/manage/functionTools.d.ts
6
-
7
7
  /**
8
8
  * Get a function tool by ID (agent-scoped)
9
9
  */
@@ -55,12 +55,12 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
55
55
  }) => Promise<{
56
56
  id: string;
57
57
  name: string;
58
- createdAt: string;
59
- updatedAt: string;
60
58
  description: string | null;
61
59
  tenantId: string;
62
60
  projectId: string;
63
61
  agentId: string;
62
+ createdAt: string;
63
+ updatedAt: string;
64
64
  functionId: string;
65
65
  }>;
66
66
  /**
@@ -97,12 +97,12 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
97
97
  }) => Promise<{
98
98
  id: string;
99
99
  name: string;
100
- createdAt: string;
101
- updatedAt: string;
102
100
  description: string | null;
103
101
  tenantId: string;
104
102
  projectId: string;
105
103
  agentId: string;
104
+ createdAt: string;
105
+ updatedAt: 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
- createdAt: string;
166
- updatedAt: string;
167
165
  tenantId: string;
168
166
  projectId: string;
169
- subAgentId: string;
170
167
  agentId: string;
171
- functionToolId: string;
168
+ createdAt: string;
169
+ updatedAt: string;
172
170
  toolPolicies: Record<string, {
173
171
  needsApproval?: boolean;
174
172
  }> | 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
- createdAt: string;
231
- updatedAt: string;
232
230
  tenantId: string;
233
231
  projectId: string;
234
- subAgentId: string;
235
232
  agentId: string;
236
- functionToolId: string;
233
+ createdAt: string;
234
+ updatedAt: string;
237
235
  toolPolicies: Record<string, {
238
236
  needsApproval?: boolean;
239
237
  }> | 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 };
@@ -1,9 +1,9 @@
1
- import { PaginationConfig, ProjectScopeConfig } from "../../types/utility.js";
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 "../../types/utility.js";
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 { PaginationConfig, PaginationResult, ProjectInfo, ProjectResourceCounts, ProjectScopeConfig } from "../../types/utility.js";
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, PaginationConfig } from "../../types/utility.js";
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 "../../types/utility.js";
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 { AgentScopeConfig, ProjectScopeConfig, SubAgentScopeConfig } from "../../types/utility.js";
2
- import * as drizzle_orm111 from "drizzle-orm";
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
- type TenantScopeConfig = {
6
- tenantId: string;
7
- };
8
- type TenantScopedColumns = {
9
- tenantId: any;
10
- };
11
- type ProjectScopedColumns = TenantScopedColumns & {
12
- projectId: any;
13
- };
14
- type AgentScopedColumns = ProjectScopedColumns & {
15
- agentId: any;
16
- };
17
- type SubAgentScopedColumns = AgentScopedColumns & {
18
- subAgentId: any;
19
- };
20
- declare function tenantScopedWhere<T extends TenantScopedColumns>(table: T, scopes: TenantScopeConfig): drizzle_orm111.SQL<unknown>;
21
- declare function projectScopedWhere<T extends ProjectScopedColumns>(table: T, scopes: ProjectScopeConfig): drizzle_orm111.SQL<unknown> | undefined;
22
- declare function agentScopedWhere<T extends AgentScopedColumns>(table: T, scopes: AgentScopeConfig): drizzle_orm111.SQL<unknown> | undefined;
23
- declare function subAgentScopedWhere<T extends SubAgentScopedColumns>(table: T, scopes: SubAgentScopeConfig): drizzle_orm111.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
- function tenantScopedWhere(table, scopes) {
5
- return eq(table.tenantId, scopes.tenantId);
6
- }
7
- function projectScopedWhere(table, scopes) {
8
- return and(eq(table.tenantId, scopes.tenantId), eq(table.projectId, scopes.projectId));
9
- }
10
- function agentScopedWhere(table, scopes) {
11
- return and(eq(table.tenantId, scopes.tenantId), eq(table.projectId, scopes.projectId), eq(table.agentId, scopes.agentId));
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, PaginationConfig, ProjectScopeConfig, SubAgentScopeConfig } from "../../types/utility.js";
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
 
@@ -9,13 +10,13 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
9
10
  }) => Promise<{
10
11
  id: string;
11
12
  name: string;
13
+ description: string;
14
+ tenantId: string;
15
+ projectId: string;
12
16
  createdAt: string;
13
17
  updatedAt: string;
14
18
  metadata: Record<string, string> | null;
15
- description: string;
16
19
  content: string;
17
- tenantId: string;
18
- projectId: string;
19
20
  } | null>;
20
21
  declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
21
22
  scopes: ProjectScopeConfig;
@@ -42,24 +43,24 @@ declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
42
43
  declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
43
44
  id: string;
44
45
  name: string;
46
+ description: string;
47
+ tenantId: string;
48
+ projectId: string;
45
49
  createdAt: string;
46
50
  updatedAt: string;
47
51
  metadata: Record<string, string> | null;
48
- description: string;
49
52
  content: string;
50
- tenantId: string;
51
- projectId: string;
52
53
  }>;
53
54
  declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
54
55
  id: string;
55
56
  name: string;
57
+ description: string;
58
+ tenantId: string;
59
+ projectId: string;
56
60
  createdAt: string;
57
61
  updatedAt: string;
58
62
  metadata: Record<string, string> | null;
59
- description: string;
60
63
  content: string;
61
- tenantId: string;
62
- projectId: string;
63
64
  }>;
64
65
  declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
65
66
  scopes: ProjectScopeConfig;
@@ -91,15 +92,15 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
91
92
  alwaysLoaded?: boolean;
92
93
  }) => Promise<{
93
94
  id: string;
94
- createdAt: string;
95
- updatedAt: string;
96
95
  tenantId: string;
97
96
  projectId: string;
98
- subAgentId: string;
99
97
  agentId: string;
100
- skillId: string;
98
+ createdAt: string;
99
+ updatedAt: string;
101
100
  index: number;
102
101
  alwaysLoaded: boolean;
102
+ subAgentId: string;
103
+ skillId: string;
103
104
  }>;
104
105
  declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
105
106
  scopes: AgentScopeConfig;
@@ -1,4 +1,5 @@
1
- import { AgentScopeConfig, ConversationHistoryConfig, PaginationConfig, SubAgentScopeConfig } from "../../types/utility.js";
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";
@@ -9,14 +10,14 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
9
10
  relationId: string;
10
11
  }) => Promise<{
11
12
  id: string;
12
- createdAt: string;
13
- updatedAt: string;
14
13
  tenantId: string;
15
14
  projectId: string;
16
- headers: Record<string, string> | null;
17
- subAgentId: string;
18
15
  agentId: string;
16
+ createdAt: string;
17
+ updatedAt: string;
18
+ headers: Record<string, string> | null;
19
19
  externalAgentId: string;
20
+ subAgentId: string;
20
21
  } | undefined>;
21
22
  declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
22
23
  scopes: SubAgentScopeConfig;
@@ -44,27 +45,27 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
44
45
  scopes: SubAgentScopeConfig;
45
46
  }) => Promise<{
46
47
  id: string;
47
- createdAt: string;
48
- updatedAt: string;
49
48
  tenantId: string;
50
49
  projectId: string;
51
- headers: Record<string, string> | null;
52
- subAgentId: string;
53
50
  agentId: string;
51
+ createdAt: string;
52
+ updatedAt: string;
53
+ headers: Record<string, string> | null;
54
54
  externalAgentId: string;
55
+ subAgentId: string;
55
56
  }[]>;
56
57
  declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
57
58
  scopes: AgentScopeConfig;
58
59
  }) => Promise<{
59
60
  id: string;
60
- createdAt: string;
61
- updatedAt: string;
62
61
  tenantId: string;
63
62
  projectId: string;
64
- headers: Record<string, string> | null;
65
- subAgentId: string;
66
63
  agentId: string;
64
+ createdAt: string;
65
+ updatedAt: string;
66
+ headers: Record<string, string> | null;
67
67
  externalAgentId: string;
68
+ subAgentId: string;
68
69
  }[]>;
69
70
  declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
70
71
  scopes: AgentScopeConfig;
@@ -180,14 +181,14 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
180
181
  };
181
182
  }) => Promise<{
182
183
  id: string;
183
- createdAt: string;
184
- updatedAt: string;
185
184
  tenantId: string;
186
185
  projectId: string;
187
- headers: Record<string, string> | null;
188
- subAgentId: string;
189
186
  agentId: string;
187
+ createdAt: string;
188
+ updatedAt: string;
189
+ headers: Record<string, string> | null;
190
190
  externalAgentId: string;
191
+ subAgentId: string;
191
192
  }>;
192
193
  /**
193
194
  * Check if sub-agent external agent relation exists by params
@@ -197,14 +198,14 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
197
198
  externalAgentId: string;
198
199
  }) => Promise<{
199
200
  id: string;
200
- createdAt: string;
201
- updatedAt: string;
202
201
  tenantId: string;
203
202
  projectId: string;
204
- headers: Record<string, string> | null;
205
- subAgentId: string;
206
203
  agentId: string;
204
+ createdAt: string;
205
+ updatedAt: string;
206
+ headers: Record<string, string> | null;
207
207
  externalAgentId: string;
208
+ 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)
@@ -218,14 +219,14 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
218
219
  };
219
220
  }) => Promise<{
220
221
  id: string;
221
- createdAt: string;
222
- updatedAt: string;
223
222
  tenantId: string;
224
223
  projectId: string;
225
- headers: Record<string, string> | null;
226
- subAgentId: string;
227
224
  agentId: string;
225
+ createdAt: string;
226
+ updatedAt: string;
227
+ headers: Record<string, string> | null;
228
228
  externalAgentId: string;
229
+ subAgentId: string;
229
230
  }>;
230
231
  declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
231
232
  scopes: SubAgentScopeConfig;
@@ -1,4 +1,5 @@
1
- import { AgentScopeConfig, ConversationHistoryConfig, PaginationConfig, SubAgentScopeConfig, ToolMcpConfig, ToolServerCapabilities } from "../../types/utility.js";
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";
@@ -9,11 +10,11 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
9
10
  relationId: string;
10
11
  }) => Promise<{
11
12
  id: string;
12
- createdAt: string;
13
- updatedAt: string;
14
13
  tenantId: string;
15
14
  projectId: string;
16
15
  agentId: string;
16
+ createdAt: string;
17
+ updatedAt: string;
17
18
  sourceSubAgentId: string;
18
19
  targetSubAgentId: string | null;
19
20
  relationType: string | null;
@@ -44,11 +45,11 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
44
45
  scopes: SubAgentScopeConfig;
45
46
  }) => Promise<{
46
47
  id: string;
47
- createdAt: string;
48
- updatedAt: string;
49
48
  tenantId: string;
50
49
  projectId: string;
51
50
  agentId: string;
51
+ createdAt: string;
52
+ updatedAt: string;
52
53
  sourceSubAgentId: string;
53
54
  targetSubAgentId: string | null;
54
55
  relationType: string | null;
@@ -57,11 +58,11 @@ declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (par
57
58
  scopes: AgentScopeConfig;
58
59
  }) => Promise<{
59
60
  id: string;
60
- createdAt: string;
61
- updatedAt: string;
62
61
  tenantId: string;
63
62
  projectId: string;
64
63
  agentId: string;
64
+ createdAt: string;
65
+ updatedAt: string;
65
66
  sourceSubAgentId: string;
66
67
  targetSubAgentId: string | null;
67
68
  relationType: string | null;
@@ -126,11 +127,11 @@ declare const getRelatedAgentsForAgent: (db: AgentsManageDatabaseClient) => (par
126
127
  }>;
127
128
  declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
128
129
  id: string;
129
- createdAt: string;
130
- updatedAt: string;
131
130
  tenantId: string;
132
131
  projectId: string;
133
132
  agentId: string;
133
+ createdAt: string;
134
+ updatedAt: string;
134
135
  sourceSubAgentId: string;
135
136
  targetSubAgentId: string | null;
136
137
  relationType: string | null;
@@ -145,11 +146,11 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
145
146
  relationType: string;
146
147
  }) => Promise<{
147
148
  id: string;
148
- createdAt: string;
149
- updatedAt: string;
150
149
  tenantId: string;
151
150
  projectId: string;
152
151
  agentId: string;
152
+ createdAt: string;
153
+ updatedAt: string;
153
154
  sourceSubAgentId: string;
154
155
  targetSubAgentId: string | null;
155
156
  relationType: string | null;
@@ -159,11 +160,11 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
159
160
  */
160
161
  declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
161
162
  id: string;
162
- createdAt: string;
163
- updatedAt: string;
164
163
  tenantId: string;
165
164
  projectId: string;
166
165
  agentId: string;
166
+ createdAt: string;
167
+ updatedAt: string;
167
168
  sourceSubAgentId: string;
168
169
  targetSubAgentId: string | null;
169
170
  relationType: string | null;
@@ -204,17 +205,17 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
204
205
  };
205
206
  }) => Promise<{
206
207
  id: string;
207
- createdAt: string;
208
- updatedAt: string;
209
208
  tenantId: string;
210
209
  projectId: string;
211
- headers: Record<string, string> | null;
212
- subAgentId: string;
213
210
  agentId: string;
211
+ createdAt: string;
212
+ updatedAt: string;
214
213
  toolId: string;
214
+ headers: Record<string, string> | null;
215
215
  toolPolicies: Record<string, {
216
216
  needsApproval?: boolean;
217
217
  }> | null;
218
+ subAgentId: string;
218
219
  selectedTools: string[] | null;
219
220
  }>;
220
221
  declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
@@ -248,17 +249,17 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
248
249
  relationId: string;
249
250
  }) => Promise<{
250
251
  id: string;
251
- createdAt: string;
252
- updatedAt: string;
253
252
  tenantId: string;
254
253
  projectId: string;
255
- headers: Record<string, string> | null;
256
- subAgentId: string;
257
254
  agentId: string;
255
+ createdAt: string;
256
+ updatedAt: string;
258
257
  toolId: string;
258
+ headers: Record<string, string> | null;
259
259
  toolPolicies: Record<string, {
260
260
  needsApproval?: boolean;
261
261
  }> | null;
262
+ subAgentId: string;
262
263
  selectedTools: string[] | null;
263
264
  } | undefined>;
264
265
  declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {