@inkeep/agents-core 0.0.0-dev-20250910233133
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/LICENSE.md +56 -0
- package/README.md +464 -0
- package/dist/__tests__/integration/helpers.d.ts +5 -0
- package/dist/__tests__/integration/helpers.d.ts.map +1 -0
- package/dist/__tests__/integration/helpers.js +37 -0
- package/dist/__tests__/integration/helpers.js.map +1 -0
- package/dist/__tests__/setup.d.ts +3 -0
- package/dist/__tests__/setup.d.ts.map +1 -0
- package/dist/__tests__/setup.js +29 -0
- package/dist/__tests__/setup.js.map +1 -0
- package/dist/client-exports.d.ts +299 -0
- package/dist/client-exports.d.ts.map +1 -0
- package/dist/client-exports.js +252 -0
- package/dist/client-exports.js.map +1 -0
- package/dist/context/ContextConfig.d.ts +54 -0
- package/dist/context/ContextConfig.d.ts.map +1 -0
- package/dist/context/ContextConfig.js +302 -0
- package/dist/context/ContextConfig.js.map +1 -0
- package/dist/context/ContextFetcher.d.ts +64 -0
- package/dist/context/ContextFetcher.d.ts.map +1 -0
- package/dist/context/ContextFetcher.js +325 -0
- package/dist/context/ContextFetcher.js.map +1 -0
- package/dist/context/ContextResolver.d.ts +52 -0
- package/dist/context/ContextResolver.d.ts.map +1 -0
- package/dist/context/ContextResolver.js +298 -0
- package/dist/context/ContextResolver.js.map +1 -0
- package/dist/context/TemplateEngine.d.ts +46 -0
- package/dist/context/TemplateEngine.d.ts.map +1 -0
- package/dist/context/TemplateEngine.js +175 -0
- package/dist/context/TemplateEngine.js.map +1 -0
- package/dist/context/context.d.ts +8 -0
- package/dist/context/context.d.ts.map +1 -0
- package/dist/context/context.js +157 -0
- package/dist/context/context.js.map +1 -0
- package/dist/context/contextCache.d.ts +50 -0
- package/dist/context/contextCache.d.ts.map +1 -0
- package/dist/context/contextCache.js +175 -0
- package/dist/context/contextCache.js.map +1 -0
- package/dist/context/index.d.ts +11 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +8 -0
- package/dist/context/index.js.map +1 -0
- package/dist/credential-stores/CredentialStoreRegistry.d.ts +39 -0
- package/dist/credential-stores/CredentialStoreRegistry.d.ts.map +1 -0
- package/dist/credential-stores/CredentialStoreRegistry.js +65 -0
- package/dist/credential-stores/CredentialStoreRegistry.js.map +1 -0
- package/dist/credential-stores/defaults.d.ts +6 -0
- package/dist/credential-stores/defaults.d.ts.map +1 -0
- package/dist/credential-stores/defaults.js +22 -0
- package/dist/credential-stores/defaults.js.map +1 -0
- package/dist/credential-stores/index.d.ts +6 -0
- package/dist/credential-stores/index.d.ts.map +1 -0
- package/dist/credential-stores/index.js +6 -0
- package/dist/credential-stores/index.js.map +1 -0
- package/dist/credential-stores/keychain-store.d.ts +100 -0
- package/dist/credential-stores/keychain-store.d.ts.map +1 -0
- package/dist/credential-stores/keychain-store.js +225 -0
- package/dist/credential-stores/keychain-store.js.map +1 -0
- package/dist/credential-stores/memory-store.d.ts +39 -0
- package/dist/credential-stores/memory-store.d.ts.map +1 -0
- package/dist/credential-stores/memory-store.js +58 -0
- package/dist/credential-stores/memory-store.js.map +1 -0
- package/dist/credential-stores/nango-store.d.ts +59 -0
- package/dist/credential-stores/nango-store.d.ts.map +1 -0
- package/dist/credential-stores/nango-store.js +264 -0
- package/dist/credential-stores/nango-store.js.map +1 -0
- package/dist/credential-stuffer/CredentialStuffer.d.ts +80 -0
- package/dist/credential-stuffer/CredentialStuffer.d.ts.map +1 -0
- package/dist/credential-stuffer/CredentialStuffer.js +186 -0
- package/dist/credential-stuffer/CredentialStuffer.js.map +1 -0
- package/dist/credential-stuffer/index.d.ts +2 -0
- package/dist/credential-stuffer/index.d.ts.map +1 -0
- package/dist/credential-stuffer/index.js +2 -0
- package/dist/credential-stuffer/index.js.map +1 -0
- package/dist/data-access/agentDataComponents.d.ts +1 -0
- package/dist/data-access/agentDataComponents.d.ts.map +1 -0
- package/dist/data-access/agentDataComponents.js +2 -0
- package/dist/data-access/agentDataComponents.js.map +1 -0
- package/dist/data-access/agentGraphs.d.ts +399 -0
- package/dist/data-access/agentGraphs.d.ts.map +1 -0
- package/dist/data-access/agentGraphs.js +551 -0
- package/dist/data-access/agentGraphs.js.map +1 -0
- package/dist/data-access/agentRelations.d.ts +456 -0
- package/dist/data-access/agentRelations.d.ts.map +1 -0
- package/dist/data-access/agentRelations.js +471 -0
- package/dist/data-access/agentRelations.js.map +1 -0
- package/dist/data-access/agents.d.ts +218 -0
- package/dist/data-access/agents.d.ts.map +1 -0
- package/dist/data-access/agents.js +130 -0
- package/dist/data-access/agents.js.map +1 -0
- package/dist/data-access/apiKeys.d.ts +114 -0
- package/dist/data-access/apiKeys.d.ts.map +1 -0
- package/dist/data-access/apiKeys.js +185 -0
- package/dist/data-access/apiKeys.js.map +1 -0
- package/dist/data-access/artifactComponents.d.ts +152 -0
- package/dist/data-access/artifactComponents.d.ts.map +1 -0
- package/dist/data-access/artifactComponents.js +214 -0
- package/dist/data-access/artifactComponents.js.map +1 -0
- package/dist/data-access/contextCache.d.ts +68 -0
- package/dist/data-access/contextCache.d.ts.map +1 -0
- package/dist/data-access/contextCache.js +135 -0
- package/dist/data-access/contextCache.js.map +1 -0
- package/dist/data-access/contextConfigs.d.ts +110 -0
- package/dist/data-access/contextConfigs.d.ts.map +1 -0
- package/dist/data-access/contextConfigs.js +156 -0
- package/dist/data-access/contextConfigs.js.map +1 -0
- package/dist/data-access/conversations.d.ts +125 -0
- package/dist/data-access/conversations.d.ts.map +1 -0
- package/dist/data-access/conversations.js +244 -0
- package/dist/data-access/conversations.js.map +1 -0
- package/dist/data-access/credentialReferences.d.ts +86 -0
- package/dist/data-access/credentialReferences.d.ts.map +1 -0
- package/dist/data-access/credentialReferences.js +175 -0
- package/dist/data-access/credentialReferences.js.map +1 -0
- package/dist/data-access/dataComponents.d.ts +129 -0
- package/dist/data-access/dataComponents.d.ts.map +1 -0
- package/dist/data-access/dataComponents.js +213 -0
- package/dist/data-access/dataComponents.js.map +1 -0
- package/dist/data-access/externalAgents.d.ts +83 -0
- package/dist/data-access/externalAgents.d.ts.map +1 -0
- package/dist/data-access/externalAgents.js +163 -0
- package/dist/data-access/externalAgents.js.map +1 -0
- package/dist/data-access/graphFull.d.ts +32 -0
- package/dist/data-access/graphFull.d.ts.map +1 -0
- package/dist/data-access/graphFull.js +996 -0
- package/dist/data-access/graphFull.js.map +1 -0
- package/dist/data-access/index.d.ts +21 -0
- package/dist/data-access/index.d.ts.map +1 -0
- package/dist/data-access/index.js +22 -0
- package/dist/data-access/index.js.map +1 -0
- package/dist/data-access/ledgerArtifacts.d.ts +49 -0
- package/dist/data-access/ledgerArtifacts.d.ts.map +1 -0
- package/dist/data-access/ledgerArtifacts.js +112 -0
- package/dist/data-access/ledgerArtifacts.js.map +1 -0
- package/dist/data-access/messages.d.ts +209 -0
- package/dist/data-access/messages.d.ts.map +1 -0
- package/dist/data-access/messages.js +100 -0
- package/dist/data-access/messages.js.map +1 -0
- package/dist/data-access/projects.d.ts +67 -0
- package/dist/data-access/projects.d.ts.map +1 -0
- package/dist/data-access/projects.js +337 -0
- package/dist/data-access/projects.js.map +1 -0
- package/dist/data-access/tasks.d.ts +37 -0
- package/dist/data-access/tasks.d.ts.map +1 -0
- package/dist/data-access/tasks.js +40 -0
- package/dist/data-access/tasks.js.map +1 -0
- package/dist/data-access/tools.d.ts +277 -0
- package/dist/data-access/tools.d.ts.map +1 -0
- package/dist/data-access/tools.js +183 -0
- package/dist/data-access/tools.js.map +1 -0
- package/dist/data-access/validation.d.ts +17 -0
- package/dist/data-access/validation.d.ts.map +1 -0
- package/dist/data-access/validation.js +52 -0
- package/dist/data-access/validation.js.map +1 -0
- package/dist/db/clean.d.ts +6 -0
- package/dist/db/clean.d.ts.map +1 -0
- package/dist/db/clean.js +81 -0
- package/dist/db/clean.js.map +1 -0
- package/dist/db/client.d.ts +19 -0
- package/dist/db/client.d.ts.map +1 -0
- package/dist/db/client.js +24 -0
- package/dist/db/client.js.map +1 -0
- package/dist/db/schema.d.ts +4335 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +696 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/db/test-client.d.ts +25 -0
- package/dist/db/test-client.d.ts.map +1 -0
- package/dist/db/test-client.js +136 -0
- package/dist/db/test-client.js.map +1 -0
- package/dist/env.d.ts +19 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +49 -0
- package/dist/env.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware/contextValidation.d.ts +49 -0
- package/dist/middleware/contextValidation.d.ts.map +1 -0
- package/dist/middleware/contextValidation.js +473 -0
- package/dist/middleware/contextValidation.js.map +1 -0
- package/dist/middleware/index.d.ts +2 -0
- package/dist/middleware/index.d.ts.map +1 -0
- package/dist/middleware/index.js +2 -0
- package/dist/middleware/index.js.map +1 -0
- package/dist/types/a2a.d.ts +373 -0
- package/dist/types/a2a.d.ts.map +1 -0
- package/dist/types/a2a.js +14 -0
- package/dist/types/a2a.js.map +1 -0
- package/dist/types/entities.d.ts +147 -0
- package/dist/types/entities.d.ts.map +1 -0
- package/dist/types/entities.js +2 -0
- package/dist/types/entities.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +6 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/server.d.ts +116 -0
- package/dist/types/server.d.ts.map +1 -0
- package/dist/types/server.js +2 -0
- package/dist/types/server.js.map +1 -0
- package/dist/types/utility.d.ts +213 -0
- package/dist/types/utility.d.ts.map +1 -0
- package/dist/types/utility.js +9 -0
- package/dist/types/utility.js.map +1 -0
- package/dist/utils/apiKeys.d.ts +32 -0
- package/dist/utils/apiKeys.d.ts.map +1 -0
- package/dist/utils/apiKeys.js +117 -0
- package/dist/utils/apiKeys.js.map +1 -0
- package/dist/utils/auth-detection.d.ts +23 -0
- package/dist/utils/auth-detection.d.ts.map +1 -0
- package/dist/utils/auth-detection.js +148 -0
- package/dist/utils/auth-detection.js.map +1 -0
- package/dist/utils/credential-store-utils.d.ts +11 -0
- package/dist/utils/credential-store-utils.d.ts.map +1 -0
- package/dist/utils/credential-store-utils.js +19 -0
- package/dist/utils/credential-store-utils.js.map +1 -0
- package/dist/utils/error.d.ts +526 -0
- package/dist/utils/error.d.ts.map +1 -0
- package/dist/utils/error.js +282 -0
- package/dist/utils/error.js.map +1 -0
- package/dist/utils/execution.d.ts +18 -0
- package/dist/utils/execution.d.ts.map +1 -0
- package/dist/utils/execution.js +25 -0
- package/dist/utils/execution.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +79 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +102 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/logging.d.ts +11 -0
- package/dist/utils/logging.d.ts.map +1 -0
- package/dist/utils/logging.js +6 -0
- package/dist/utils/logging.js.map +1 -0
- package/dist/utils/mcp-client.d.ts +48 -0
- package/dist/utils/mcp-client.d.ts.map +1 -0
- package/dist/utils/mcp-client.js +174 -0
- package/dist/utils/mcp-client.js.map +1 -0
- package/dist/utils/tracer.d.ts +24 -0
- package/dist/utils/tracer.d.ts.map +1 -0
- package/dist/utils/tracer.js +110 -0
- package/dist/utils/tracer.js.map +1 -0
- package/dist/validation/graphFull.d.ts +36 -0
- package/dist/validation/graphFull.d.ts.map +1 -0
- package/dist/validation/graphFull.js +128 -0
- package/dist/validation/graphFull.js.map +1 -0
- package/dist/validation/id-validation.d.ts +38 -0
- package/dist/validation/id-validation.d.ts.map +1 -0
- package/dist/validation/id-validation.js +60 -0
- package/dist/validation/id-validation.js.map +1 -0
- package/dist/validation/index.d.ts +4 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +5 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/schemas.d.ts +7213 -0
- package/dist/validation/schemas.d.ts.map +1 -0
- package/dist/validation/schemas.js +576 -0
- package/dist/validation/schemas.js.map +1 -0
- package/package.json +95 -0
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
import type { DatabaseClient } from '../db/client';
|
|
2
|
+
import type { AgentRelationInsert, AgentRelationUpdate, AgentToolRelationUpdate, ExternalAgentRelationInsert } from '../types/entities';
|
|
3
|
+
import type { PaginationConfig, ScopeConfig } from '../types/utility';
|
|
4
|
+
export declare const getAgentRelationById: (db: DatabaseClient) => (params: {
|
|
5
|
+
scopes: ScopeConfig;
|
|
6
|
+
relationId: string;
|
|
7
|
+
}) => Promise<{
|
|
8
|
+
tenantId: string;
|
|
9
|
+
projectId: string;
|
|
10
|
+
id: string;
|
|
11
|
+
graphId: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
sourceAgentId: string;
|
|
15
|
+
targetAgentId: string | null;
|
|
16
|
+
externalAgentId: string | null;
|
|
17
|
+
relationType: string | null;
|
|
18
|
+
} | undefined>;
|
|
19
|
+
export declare const listAgentRelations: (db: DatabaseClient) => (params: {
|
|
20
|
+
scopes: ScopeConfig;
|
|
21
|
+
pagination?: PaginationConfig;
|
|
22
|
+
}) => Promise<{
|
|
23
|
+
data: {
|
|
24
|
+
tenantId: string;
|
|
25
|
+
projectId: string;
|
|
26
|
+
id: string;
|
|
27
|
+
graphId: string;
|
|
28
|
+
sourceAgentId: string;
|
|
29
|
+
targetAgentId: string | null;
|
|
30
|
+
externalAgentId: string | null;
|
|
31
|
+
relationType: string | null;
|
|
32
|
+
createdAt: string;
|
|
33
|
+
updatedAt: string;
|
|
34
|
+
}[];
|
|
35
|
+
pagination: {
|
|
36
|
+
page: number;
|
|
37
|
+
limit: number;
|
|
38
|
+
total: number;
|
|
39
|
+
pages: number;
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
42
|
+
export declare const getAgentRelations: (db: DatabaseClient) => (params: {
|
|
43
|
+
scopes: ScopeConfig;
|
|
44
|
+
graphId: string;
|
|
45
|
+
agentId: string;
|
|
46
|
+
}) => Promise<{
|
|
47
|
+
tenantId: string;
|
|
48
|
+
projectId: string;
|
|
49
|
+
id: string;
|
|
50
|
+
graphId: string;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
sourceAgentId: string;
|
|
54
|
+
targetAgentId: string | null;
|
|
55
|
+
externalAgentId: string | null;
|
|
56
|
+
relationType: string | null;
|
|
57
|
+
}[]>;
|
|
58
|
+
export declare const getAgentRelationsByGraph: (db: DatabaseClient) => (params: {
|
|
59
|
+
scopes: ScopeConfig;
|
|
60
|
+
graphId: string;
|
|
61
|
+
}) => Promise<{
|
|
62
|
+
tenantId: string;
|
|
63
|
+
projectId: string;
|
|
64
|
+
id: string;
|
|
65
|
+
graphId: string;
|
|
66
|
+
createdAt: string;
|
|
67
|
+
updatedAt: string;
|
|
68
|
+
sourceAgentId: string;
|
|
69
|
+
targetAgentId: string | null;
|
|
70
|
+
externalAgentId: string | null;
|
|
71
|
+
relationType: string | null;
|
|
72
|
+
}[]>;
|
|
73
|
+
export declare const getAgentRelationsBySource: (db: DatabaseClient) => (params: {
|
|
74
|
+
scopes: ScopeConfig;
|
|
75
|
+
sourceAgentId: string;
|
|
76
|
+
pagination?: PaginationConfig;
|
|
77
|
+
}) => Promise<{
|
|
78
|
+
data: {
|
|
79
|
+
tenantId: string;
|
|
80
|
+
projectId: string;
|
|
81
|
+
id: string;
|
|
82
|
+
graphId: string;
|
|
83
|
+
sourceAgentId: string;
|
|
84
|
+
targetAgentId: string | null;
|
|
85
|
+
externalAgentId: string | null;
|
|
86
|
+
relationType: string | null;
|
|
87
|
+
createdAt: string;
|
|
88
|
+
updatedAt: string;
|
|
89
|
+
}[];
|
|
90
|
+
pagination: {
|
|
91
|
+
page: number;
|
|
92
|
+
limit: number;
|
|
93
|
+
total: number;
|
|
94
|
+
pages: number;
|
|
95
|
+
};
|
|
96
|
+
}>;
|
|
97
|
+
export declare const getAgentRelationsByTarget: (db: DatabaseClient) => (params: {
|
|
98
|
+
scopes: ScopeConfig;
|
|
99
|
+
targetAgentId: string;
|
|
100
|
+
pagination?: PaginationConfig;
|
|
101
|
+
}) => Promise<{
|
|
102
|
+
data: {
|
|
103
|
+
tenantId: string;
|
|
104
|
+
projectId: string;
|
|
105
|
+
id: string;
|
|
106
|
+
graphId: string;
|
|
107
|
+
sourceAgentId: string;
|
|
108
|
+
targetAgentId: string | null;
|
|
109
|
+
externalAgentId: string | null;
|
|
110
|
+
relationType: string | null;
|
|
111
|
+
createdAt: string;
|
|
112
|
+
updatedAt: string;
|
|
113
|
+
}[];
|
|
114
|
+
pagination: {
|
|
115
|
+
page: number;
|
|
116
|
+
limit: number;
|
|
117
|
+
total: number;
|
|
118
|
+
pages: number;
|
|
119
|
+
};
|
|
120
|
+
}>;
|
|
121
|
+
export declare const getExternalAgentRelations: (db: DatabaseClient) => (params: {
|
|
122
|
+
scopes: ScopeConfig;
|
|
123
|
+
externalAgentId: string;
|
|
124
|
+
pagination?: PaginationConfig;
|
|
125
|
+
}) => Promise<{
|
|
126
|
+
data: {
|
|
127
|
+
tenantId: string;
|
|
128
|
+
projectId: string;
|
|
129
|
+
id: string;
|
|
130
|
+
graphId: string;
|
|
131
|
+
sourceAgentId: string;
|
|
132
|
+
targetAgentId: string | null;
|
|
133
|
+
externalAgentId: string | null;
|
|
134
|
+
relationType: string | null;
|
|
135
|
+
createdAt: string;
|
|
136
|
+
updatedAt: string;
|
|
137
|
+
}[];
|
|
138
|
+
pagination: {
|
|
139
|
+
page: number;
|
|
140
|
+
limit: number;
|
|
141
|
+
total: number;
|
|
142
|
+
pages: number;
|
|
143
|
+
};
|
|
144
|
+
}>;
|
|
145
|
+
export declare const getRelatedAgentsForGraph: (db: DatabaseClient) => (params: {
|
|
146
|
+
scopes: ScopeConfig;
|
|
147
|
+
graphId: string;
|
|
148
|
+
agentId: string;
|
|
149
|
+
}) => Promise<{
|
|
150
|
+
internalRelations: {
|
|
151
|
+
id: string;
|
|
152
|
+
name: string;
|
|
153
|
+
description: string;
|
|
154
|
+
relationType: string | null;
|
|
155
|
+
}[];
|
|
156
|
+
externalRelations: {
|
|
157
|
+
id: string;
|
|
158
|
+
relationType: string | null;
|
|
159
|
+
externalAgent: {
|
|
160
|
+
id: string;
|
|
161
|
+
name: string;
|
|
162
|
+
description: string;
|
|
163
|
+
baseUrl: string;
|
|
164
|
+
};
|
|
165
|
+
}[];
|
|
166
|
+
}>;
|
|
167
|
+
export declare const createAgentRelation: (db: DatabaseClient) => (params: AgentRelationInsert) => Promise<{
|
|
168
|
+
tenantId: string;
|
|
169
|
+
projectId: string;
|
|
170
|
+
id: string;
|
|
171
|
+
graphId: string;
|
|
172
|
+
createdAt: string;
|
|
173
|
+
updatedAt: string;
|
|
174
|
+
sourceAgentId: string;
|
|
175
|
+
targetAgentId: string | null;
|
|
176
|
+
externalAgentId: string | null;
|
|
177
|
+
relationType: string | null;
|
|
178
|
+
}>;
|
|
179
|
+
/**
|
|
180
|
+
* Check if agent relation exists by graph, source, target, and relation type
|
|
181
|
+
*/
|
|
182
|
+
export declare const getAgentRelationByParams: (db: DatabaseClient) => (params: {
|
|
183
|
+
scopes: ScopeConfig;
|
|
184
|
+
graphId: string;
|
|
185
|
+
sourceAgentId: string;
|
|
186
|
+
targetAgentId?: string;
|
|
187
|
+
externalAgentId?: string;
|
|
188
|
+
relationType: string;
|
|
189
|
+
}) => Promise<{
|
|
190
|
+
tenantId: string;
|
|
191
|
+
projectId: string;
|
|
192
|
+
id: string;
|
|
193
|
+
graphId: string;
|
|
194
|
+
createdAt: string;
|
|
195
|
+
updatedAt: string;
|
|
196
|
+
sourceAgentId: string;
|
|
197
|
+
targetAgentId: string | null;
|
|
198
|
+
externalAgentId: string | null;
|
|
199
|
+
relationType: string | null;
|
|
200
|
+
} | undefined>;
|
|
201
|
+
/**
|
|
202
|
+
* Upsert agent relation (create if it doesn't exist, no-op if it does)
|
|
203
|
+
*/
|
|
204
|
+
export declare const upsertAgentRelation: (db: DatabaseClient) => (params: AgentRelationInsert) => Promise<{
|
|
205
|
+
tenantId: string;
|
|
206
|
+
projectId: string;
|
|
207
|
+
id: string;
|
|
208
|
+
graphId: string;
|
|
209
|
+
createdAt: string;
|
|
210
|
+
updatedAt: string;
|
|
211
|
+
sourceAgentId: string;
|
|
212
|
+
targetAgentId: string | null;
|
|
213
|
+
externalAgentId: string | null;
|
|
214
|
+
relationType: string | null;
|
|
215
|
+
}>;
|
|
216
|
+
export declare const createExternalAgentRelation: (db: DatabaseClient) => (params: ExternalAgentRelationInsert) => Promise<{
|
|
217
|
+
tenantId: string;
|
|
218
|
+
projectId: string;
|
|
219
|
+
id: string;
|
|
220
|
+
graphId: string;
|
|
221
|
+
createdAt: string;
|
|
222
|
+
updatedAt: string;
|
|
223
|
+
sourceAgentId: string;
|
|
224
|
+
targetAgentId: string | null;
|
|
225
|
+
externalAgentId: string | null;
|
|
226
|
+
relationType: string | null;
|
|
227
|
+
}>;
|
|
228
|
+
export declare const updateAgentRelation: (db: DatabaseClient) => (params: {
|
|
229
|
+
scopes: ScopeConfig;
|
|
230
|
+
relationId: string;
|
|
231
|
+
data: AgentRelationUpdate;
|
|
232
|
+
}) => Promise<{
|
|
233
|
+
tenantId: string;
|
|
234
|
+
projectId: string;
|
|
235
|
+
id: string;
|
|
236
|
+
graphId: string;
|
|
237
|
+
createdAt: string;
|
|
238
|
+
updatedAt: string;
|
|
239
|
+
sourceAgentId: string;
|
|
240
|
+
targetAgentId: string | null;
|
|
241
|
+
externalAgentId: string | null;
|
|
242
|
+
relationType: string | null;
|
|
243
|
+
}>;
|
|
244
|
+
export declare const deleteAgentRelation: (db: DatabaseClient) => (params: {
|
|
245
|
+
scopes: ScopeConfig;
|
|
246
|
+
relationId: string;
|
|
247
|
+
}) => Promise<boolean>;
|
|
248
|
+
export declare const deleteAgentRelationsByGraph: (db: DatabaseClient) => (params: {
|
|
249
|
+
scopes: ScopeConfig;
|
|
250
|
+
graphId: string;
|
|
251
|
+
}) => Promise<boolean>;
|
|
252
|
+
export declare const createAgentToolRelation: (db: DatabaseClient) => (params: {
|
|
253
|
+
scopes: ScopeConfig;
|
|
254
|
+
relationId?: string;
|
|
255
|
+
data: {
|
|
256
|
+
agentId: string;
|
|
257
|
+
toolId: string;
|
|
258
|
+
};
|
|
259
|
+
}) => Promise<{
|
|
260
|
+
tenantId: string;
|
|
261
|
+
projectId: string;
|
|
262
|
+
id: string;
|
|
263
|
+
createdAt: string;
|
|
264
|
+
updatedAt: string;
|
|
265
|
+
agentId: string;
|
|
266
|
+
toolId: string;
|
|
267
|
+
}>;
|
|
268
|
+
export declare const updateAgentToolRelation: (db: DatabaseClient) => (params: {
|
|
269
|
+
scopes: ScopeConfig;
|
|
270
|
+
relationId: string;
|
|
271
|
+
data: AgentToolRelationUpdate;
|
|
272
|
+
}) => Promise<{
|
|
273
|
+
tenantId: string;
|
|
274
|
+
projectId: string;
|
|
275
|
+
id: string;
|
|
276
|
+
createdAt: string;
|
|
277
|
+
updatedAt: string;
|
|
278
|
+
agentId: string;
|
|
279
|
+
toolId: string;
|
|
280
|
+
}>;
|
|
281
|
+
export declare const deleteAgentToolRelation: (db: DatabaseClient) => (params: {
|
|
282
|
+
scopes: ScopeConfig;
|
|
283
|
+
relationId: string;
|
|
284
|
+
}) => Promise<boolean>;
|
|
285
|
+
export declare const deleteAgentToolRelationByAgent: (db: DatabaseClient) => (params: {
|
|
286
|
+
scopes: ScopeConfig;
|
|
287
|
+
agentId: string;
|
|
288
|
+
}) => Promise<boolean>;
|
|
289
|
+
export declare const getAgentToolRelationById: (db: DatabaseClient) => (params: {
|
|
290
|
+
scopes: ScopeConfig;
|
|
291
|
+
relationId: string;
|
|
292
|
+
}) => Promise<{
|
|
293
|
+
tenantId: string;
|
|
294
|
+
projectId: string;
|
|
295
|
+
id: string;
|
|
296
|
+
createdAt: string;
|
|
297
|
+
updatedAt: string;
|
|
298
|
+
agentId: string;
|
|
299
|
+
toolId: string;
|
|
300
|
+
} | undefined>;
|
|
301
|
+
export declare const getAgentToolRelationByAgent: (db: DatabaseClient) => (params: {
|
|
302
|
+
scopes: ScopeConfig;
|
|
303
|
+
agentId: string;
|
|
304
|
+
pagination?: PaginationConfig;
|
|
305
|
+
}) => Promise<{
|
|
306
|
+
data: {
|
|
307
|
+
tenantId: string;
|
|
308
|
+
projectId: string;
|
|
309
|
+
id: string;
|
|
310
|
+
agentId: string;
|
|
311
|
+
toolId: string;
|
|
312
|
+
createdAt: string;
|
|
313
|
+
updatedAt: string;
|
|
314
|
+
}[];
|
|
315
|
+
pagination: {
|
|
316
|
+
page: number;
|
|
317
|
+
limit: number;
|
|
318
|
+
total: number;
|
|
319
|
+
pages: number;
|
|
320
|
+
};
|
|
321
|
+
}>;
|
|
322
|
+
export declare const getAgentToolRelationByTool: (db: DatabaseClient) => (params: {
|
|
323
|
+
scopes: ScopeConfig;
|
|
324
|
+
toolId: string;
|
|
325
|
+
pagination?: PaginationConfig;
|
|
326
|
+
}) => Promise<{
|
|
327
|
+
data: {
|
|
328
|
+
tenantId: string;
|
|
329
|
+
projectId: string;
|
|
330
|
+
id: string;
|
|
331
|
+
agentId: string;
|
|
332
|
+
toolId: string;
|
|
333
|
+
createdAt: string;
|
|
334
|
+
updatedAt: string;
|
|
335
|
+
}[];
|
|
336
|
+
pagination: {
|
|
337
|
+
page: number;
|
|
338
|
+
limit: number;
|
|
339
|
+
total: number;
|
|
340
|
+
pages: number;
|
|
341
|
+
};
|
|
342
|
+
}>;
|
|
343
|
+
export declare const listAgentToolRelations: (db: DatabaseClient) => (params: {
|
|
344
|
+
scopes: ScopeConfig;
|
|
345
|
+
pagination?: PaginationConfig;
|
|
346
|
+
}) => Promise<{
|
|
347
|
+
data: {
|
|
348
|
+
tenantId: string;
|
|
349
|
+
projectId: string;
|
|
350
|
+
id: string;
|
|
351
|
+
agentId: string;
|
|
352
|
+
toolId: string;
|
|
353
|
+
createdAt: string;
|
|
354
|
+
updatedAt: string;
|
|
355
|
+
}[];
|
|
356
|
+
pagination: {
|
|
357
|
+
page: number;
|
|
358
|
+
limit: number;
|
|
359
|
+
total: number;
|
|
360
|
+
pages: number;
|
|
361
|
+
};
|
|
362
|
+
}>;
|
|
363
|
+
export declare const listAgentToolRelationsByAgent: (db: DatabaseClient) => (params: {
|
|
364
|
+
scopes: ScopeConfig;
|
|
365
|
+
agentId: string;
|
|
366
|
+
pagination?: PaginationConfig;
|
|
367
|
+
}) => Promise<{
|
|
368
|
+
data: {
|
|
369
|
+
tenantId: string;
|
|
370
|
+
projectId: string;
|
|
371
|
+
id: string;
|
|
372
|
+
agentId: string;
|
|
373
|
+
toolId: string;
|
|
374
|
+
createdAt: string;
|
|
375
|
+
updatedAt: string;
|
|
376
|
+
}[];
|
|
377
|
+
pagination: {
|
|
378
|
+
page: number;
|
|
379
|
+
limit: number;
|
|
380
|
+
total: number;
|
|
381
|
+
pages: number;
|
|
382
|
+
};
|
|
383
|
+
}>;
|
|
384
|
+
export declare const getToolsForAgent: (db: DatabaseClient) => (params: {
|
|
385
|
+
scopes: ScopeConfig;
|
|
386
|
+
agentId: string;
|
|
387
|
+
pagination?: PaginationConfig;
|
|
388
|
+
}) => Promise<{
|
|
389
|
+
data: {
|
|
390
|
+
id: string;
|
|
391
|
+
tenantId: string;
|
|
392
|
+
agentId: string;
|
|
393
|
+
toolId: string;
|
|
394
|
+
createdAt: string;
|
|
395
|
+
updatedAt: string;
|
|
396
|
+
tool: {
|
|
397
|
+
id: string;
|
|
398
|
+
name: string;
|
|
399
|
+
config: {
|
|
400
|
+
type: "mcp";
|
|
401
|
+
mcp: import("..").ToolMcpConfig;
|
|
402
|
+
};
|
|
403
|
+
createdAt: string;
|
|
404
|
+
updatedAt: string;
|
|
405
|
+
capabilities: import("..").ToolServerCapabilities | null;
|
|
406
|
+
lastHealthCheck: string | null;
|
|
407
|
+
lastToolsSync: string | null;
|
|
408
|
+
lastError: string | null;
|
|
409
|
+
availableTools: import("..").McpToolDefinition[] | null;
|
|
410
|
+
credentialReferenceId: string | null;
|
|
411
|
+
};
|
|
412
|
+
}[];
|
|
413
|
+
pagination: {
|
|
414
|
+
page: number;
|
|
415
|
+
limit: number;
|
|
416
|
+
total: number;
|
|
417
|
+
pages: number;
|
|
418
|
+
};
|
|
419
|
+
}>;
|
|
420
|
+
export declare const getAgentsForTool: (db: DatabaseClient) => (params: {
|
|
421
|
+
scopes: ScopeConfig;
|
|
422
|
+
toolId: string;
|
|
423
|
+
pagination?: PaginationConfig;
|
|
424
|
+
}) => Promise<{
|
|
425
|
+
data: {
|
|
426
|
+
id: string;
|
|
427
|
+
tenantId: string;
|
|
428
|
+
agentId: string;
|
|
429
|
+
toolId: string;
|
|
430
|
+
createdAt: string;
|
|
431
|
+
updatedAt: string;
|
|
432
|
+
agent: {
|
|
433
|
+
id: string;
|
|
434
|
+
name: string;
|
|
435
|
+
description: string;
|
|
436
|
+
prompt: string;
|
|
437
|
+
createdAt: string;
|
|
438
|
+
updatedAt: string;
|
|
439
|
+
};
|
|
440
|
+
}[];
|
|
441
|
+
pagination: {
|
|
442
|
+
page: number;
|
|
443
|
+
limit: number;
|
|
444
|
+
total: number;
|
|
445
|
+
pages: number;
|
|
446
|
+
};
|
|
447
|
+
}>;
|
|
448
|
+
export declare const validateInternalAgent: (db: DatabaseClient) => (params: {
|
|
449
|
+
scopes: ScopeConfig;
|
|
450
|
+
agentId: string;
|
|
451
|
+
}) => Promise<boolean>;
|
|
452
|
+
export declare const validateExternalAgent: (db: DatabaseClient) => (params: {
|
|
453
|
+
scopes: ScopeConfig;
|
|
454
|
+
agentId: string;
|
|
455
|
+
}) => Promise<boolean>;
|
|
456
|
+
//# sourceMappingURL=agentRelations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentRelations.d.ts","sourceRoot":"","sources":["../../src/data-access/agentRelations.ts"],"names":[],"mappings":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