@inkeep/agents-core 0.1.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/LICENSE.md +51 -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 +301 -0
- package/dist/client-exports.d.ts.map +1 -0
- package/dist/client-exports.js +251 -0
- package/dist/client-exports.js.map +1 -0
- package/dist/context/ContextConfig.d.ts +55 -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 +7 -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/index.d.ts +4 -0
- package/dist/credential-stores/index.d.ts.map +1 -0
- package/dist/credential-stores/index.js +4 -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 +406 -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 +160 -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 +995 -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 +50 -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 +336 -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 +4337 -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 +17 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +48 -0
- package/dist/env.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware/contextValidation.d.ts +48 -0
- package/dist/middleware/contextValidation.d.ts.map +1 -0
- package/dist/middleware/contextValidation.js +469 -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/server/BaseServer.d.ts +83 -0
- package/dist/server/BaseServer.d.ts.map +1 -0
- package/dist/server/BaseServer.js +218 -0
- package/dist/server/BaseServer.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 +214 -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 +171 -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 +98 -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 +7233 -0
- package/dist/validation/schemas.d.ts.map +1 -0
- package/dist/validation/schemas.js +525 -0
- package/dist/validation/schemas.js.map +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
import type { DatabaseClient } from '../db/client.js';
|
|
2
|
+
import type { AgentGraphInsert, AgentGraphUpdate, FullGraphDefinition } from '../types/entities.js';
|
|
3
|
+
import type { PaginationConfig, ScopeConfig } from '../types/utility.js';
|
|
4
|
+
export declare const getAgentGraph: (db: DatabaseClient) => (params: {
|
|
5
|
+
scopes: ScopeConfig;
|
|
6
|
+
graphId: string;
|
|
7
|
+
}) => Promise<{
|
|
8
|
+
tenantId: string;
|
|
9
|
+
projectId: string;
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
description: string | null;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
defaultAgentId: string;
|
|
16
|
+
models: {
|
|
17
|
+
base?: {
|
|
18
|
+
model?: string | undefined;
|
|
19
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
structuredOutput?: {
|
|
22
|
+
model?: string | undefined;
|
|
23
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
24
|
+
} | undefined;
|
|
25
|
+
summarizer?: {
|
|
26
|
+
model?: string | undefined;
|
|
27
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
} | null;
|
|
30
|
+
stopWhen: {
|
|
31
|
+
handoffCountIs?: number;
|
|
32
|
+
} | null;
|
|
33
|
+
graphPrompt: string | null;
|
|
34
|
+
statusUpdates: {
|
|
35
|
+
enabled?: boolean | undefined;
|
|
36
|
+
numEvents?: number | undefined;
|
|
37
|
+
timeInSeconds?: number | undefined;
|
|
38
|
+
prompt?: string | undefined;
|
|
39
|
+
statusComponents?: {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
schema: {
|
|
43
|
+
type: "object";
|
|
44
|
+
properties: Record<string, any>;
|
|
45
|
+
required?: string[] | undefined;
|
|
46
|
+
};
|
|
47
|
+
description?: string | undefined;
|
|
48
|
+
}[] | undefined;
|
|
49
|
+
} | null;
|
|
50
|
+
contextConfigId: string | null;
|
|
51
|
+
} | undefined>;
|
|
52
|
+
export declare const getAgentGraphById: (db: DatabaseClient) => (params: {
|
|
53
|
+
scopes: ScopeConfig;
|
|
54
|
+
graphId: string;
|
|
55
|
+
}) => Promise<{
|
|
56
|
+
tenantId: string;
|
|
57
|
+
projectId: string;
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
description: string | null;
|
|
61
|
+
createdAt: string;
|
|
62
|
+
updatedAt: string;
|
|
63
|
+
defaultAgentId: string;
|
|
64
|
+
models: {
|
|
65
|
+
base?: {
|
|
66
|
+
model?: string | undefined;
|
|
67
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
structuredOutput?: {
|
|
70
|
+
model?: string | undefined;
|
|
71
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
72
|
+
} | undefined;
|
|
73
|
+
summarizer?: {
|
|
74
|
+
model?: string | undefined;
|
|
75
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
76
|
+
} | undefined;
|
|
77
|
+
} | null;
|
|
78
|
+
stopWhen: {
|
|
79
|
+
handoffCountIs?: number;
|
|
80
|
+
} | null;
|
|
81
|
+
graphPrompt: string | null;
|
|
82
|
+
statusUpdates: {
|
|
83
|
+
enabled?: boolean | undefined;
|
|
84
|
+
numEvents?: number | undefined;
|
|
85
|
+
timeInSeconds?: number | undefined;
|
|
86
|
+
prompt?: string | undefined;
|
|
87
|
+
statusComponents?: {
|
|
88
|
+
id: string;
|
|
89
|
+
name: string;
|
|
90
|
+
schema: {
|
|
91
|
+
type: "object";
|
|
92
|
+
properties: Record<string, any>;
|
|
93
|
+
required?: string[] | undefined;
|
|
94
|
+
};
|
|
95
|
+
description?: string | undefined;
|
|
96
|
+
}[] | undefined;
|
|
97
|
+
} | null;
|
|
98
|
+
contextConfigId: string | null;
|
|
99
|
+
} | null>;
|
|
100
|
+
export declare const getAgentGraphWithDefaultAgent: (db: DatabaseClient) => (params: {
|
|
101
|
+
scopes: ScopeConfig;
|
|
102
|
+
graphId: string;
|
|
103
|
+
}) => Promise<{
|
|
104
|
+
tenantId: string;
|
|
105
|
+
projectId: string;
|
|
106
|
+
id: string;
|
|
107
|
+
name: string;
|
|
108
|
+
description: string | null;
|
|
109
|
+
createdAt: string;
|
|
110
|
+
updatedAt: string;
|
|
111
|
+
defaultAgentId: string;
|
|
112
|
+
models: {
|
|
113
|
+
base?: {
|
|
114
|
+
model?: string | undefined;
|
|
115
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
116
|
+
} | undefined;
|
|
117
|
+
structuredOutput?: {
|
|
118
|
+
model?: string | undefined;
|
|
119
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
120
|
+
} | undefined;
|
|
121
|
+
summarizer?: {
|
|
122
|
+
model?: string | undefined;
|
|
123
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
124
|
+
} | undefined;
|
|
125
|
+
} | null;
|
|
126
|
+
stopWhen: {
|
|
127
|
+
handoffCountIs?: number;
|
|
128
|
+
} | null;
|
|
129
|
+
graphPrompt: string | null;
|
|
130
|
+
statusUpdates: {
|
|
131
|
+
enabled?: boolean | undefined;
|
|
132
|
+
numEvents?: number | undefined;
|
|
133
|
+
timeInSeconds?: number | undefined;
|
|
134
|
+
prompt?: string | undefined;
|
|
135
|
+
statusComponents?: {
|
|
136
|
+
id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
schema: {
|
|
139
|
+
type: "object";
|
|
140
|
+
properties: Record<string, any>;
|
|
141
|
+
required?: string[] | undefined;
|
|
142
|
+
};
|
|
143
|
+
description?: string | undefined;
|
|
144
|
+
}[] | undefined;
|
|
145
|
+
} | null;
|
|
146
|
+
contextConfigId: string | null;
|
|
147
|
+
defaultAgent: {
|
|
148
|
+
tenantId: string;
|
|
149
|
+
projectId: string;
|
|
150
|
+
id: string;
|
|
151
|
+
name: string;
|
|
152
|
+
description: string;
|
|
153
|
+
instructions: string;
|
|
154
|
+
createdAt: string;
|
|
155
|
+
updatedAt: string;
|
|
156
|
+
models: {
|
|
157
|
+
base?: {
|
|
158
|
+
model?: string | undefined;
|
|
159
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
160
|
+
} | undefined;
|
|
161
|
+
structuredOutput?: {
|
|
162
|
+
model?: string | undefined;
|
|
163
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
164
|
+
} | undefined;
|
|
165
|
+
summarizer?: {
|
|
166
|
+
model?: string | undefined;
|
|
167
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
168
|
+
} | undefined;
|
|
169
|
+
} | null;
|
|
170
|
+
stopWhen: {
|
|
171
|
+
stepCountIs?: number;
|
|
172
|
+
} | null;
|
|
173
|
+
conversationHistoryConfig: import("../index.js").ConversationHistoryConfig | null;
|
|
174
|
+
};
|
|
175
|
+
} | null>;
|
|
176
|
+
export declare const listAgentGraphs: (db: DatabaseClient) => (params: {
|
|
177
|
+
scopes: ScopeConfig;
|
|
178
|
+
}) => Promise<{
|
|
179
|
+
tenantId: string;
|
|
180
|
+
projectId: string;
|
|
181
|
+
id: string;
|
|
182
|
+
name: string;
|
|
183
|
+
description: string | null;
|
|
184
|
+
createdAt: string;
|
|
185
|
+
updatedAt: string;
|
|
186
|
+
defaultAgentId: string;
|
|
187
|
+
models: {
|
|
188
|
+
base?: {
|
|
189
|
+
model?: string | undefined;
|
|
190
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
191
|
+
} | undefined;
|
|
192
|
+
structuredOutput?: {
|
|
193
|
+
model?: string | undefined;
|
|
194
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
195
|
+
} | undefined;
|
|
196
|
+
summarizer?: {
|
|
197
|
+
model?: string | undefined;
|
|
198
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
199
|
+
} | undefined;
|
|
200
|
+
} | null;
|
|
201
|
+
stopWhen: {
|
|
202
|
+
handoffCountIs?: number;
|
|
203
|
+
} | null;
|
|
204
|
+
graphPrompt: string | null;
|
|
205
|
+
statusUpdates: {
|
|
206
|
+
enabled?: boolean | undefined;
|
|
207
|
+
numEvents?: number | undefined;
|
|
208
|
+
timeInSeconds?: number | undefined;
|
|
209
|
+
prompt?: string | undefined;
|
|
210
|
+
statusComponents?: {
|
|
211
|
+
id: string;
|
|
212
|
+
name: string;
|
|
213
|
+
schema: {
|
|
214
|
+
type: "object";
|
|
215
|
+
properties: Record<string, any>;
|
|
216
|
+
required?: string[] | undefined;
|
|
217
|
+
};
|
|
218
|
+
description?: string | undefined;
|
|
219
|
+
}[] | undefined;
|
|
220
|
+
} | null;
|
|
221
|
+
contextConfigId: string | null;
|
|
222
|
+
}[]>;
|
|
223
|
+
export declare const listAgentGraphsPaginated: (db: DatabaseClient) => (params: {
|
|
224
|
+
scopes: ScopeConfig;
|
|
225
|
+
pagination?: PaginationConfig;
|
|
226
|
+
}) => Promise<{
|
|
227
|
+
data: {
|
|
228
|
+
tenantId: string;
|
|
229
|
+
projectId: string;
|
|
230
|
+
id: string;
|
|
231
|
+
name: string;
|
|
232
|
+
description: string | null;
|
|
233
|
+
defaultAgentId: string;
|
|
234
|
+
contextConfigId: string | null;
|
|
235
|
+
models: {
|
|
236
|
+
base?: {
|
|
237
|
+
model?: string | undefined;
|
|
238
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
239
|
+
} | undefined;
|
|
240
|
+
structuredOutput?: {
|
|
241
|
+
model?: string | undefined;
|
|
242
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
243
|
+
} | undefined;
|
|
244
|
+
summarizer?: {
|
|
245
|
+
model?: string | undefined;
|
|
246
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
247
|
+
} | undefined;
|
|
248
|
+
} | null;
|
|
249
|
+
statusUpdates: {
|
|
250
|
+
enabled?: boolean | undefined;
|
|
251
|
+
numEvents?: number | undefined;
|
|
252
|
+
timeInSeconds?: number | undefined;
|
|
253
|
+
prompt?: string | undefined;
|
|
254
|
+
statusComponents?: {
|
|
255
|
+
id: string;
|
|
256
|
+
name: string;
|
|
257
|
+
schema: {
|
|
258
|
+
type: "object";
|
|
259
|
+
properties: Record<string, any>;
|
|
260
|
+
required?: string[] | undefined;
|
|
261
|
+
};
|
|
262
|
+
description?: string | undefined;
|
|
263
|
+
}[] | undefined;
|
|
264
|
+
} | null;
|
|
265
|
+
graphPrompt: string | null;
|
|
266
|
+
stopWhen: {
|
|
267
|
+
handoffCountIs?: number;
|
|
268
|
+
} | null;
|
|
269
|
+
createdAt: string;
|
|
270
|
+
updatedAt: string;
|
|
271
|
+
}[];
|
|
272
|
+
pagination: {
|
|
273
|
+
page: number;
|
|
274
|
+
limit: number;
|
|
275
|
+
total: number;
|
|
276
|
+
pages: number;
|
|
277
|
+
};
|
|
278
|
+
}>;
|
|
279
|
+
export declare const createAgentGraph: (db: DatabaseClient) => (data: AgentGraphInsert) => Promise<{
|
|
280
|
+
tenantId: string;
|
|
281
|
+
projectId: string;
|
|
282
|
+
id: string;
|
|
283
|
+
name: string;
|
|
284
|
+
description: string | null;
|
|
285
|
+
createdAt: string;
|
|
286
|
+
updatedAt: string;
|
|
287
|
+
defaultAgentId: string;
|
|
288
|
+
models: {
|
|
289
|
+
base?: {
|
|
290
|
+
model?: string | undefined;
|
|
291
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
292
|
+
} | undefined;
|
|
293
|
+
structuredOutput?: {
|
|
294
|
+
model?: string | undefined;
|
|
295
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
296
|
+
} | undefined;
|
|
297
|
+
summarizer?: {
|
|
298
|
+
model?: string | undefined;
|
|
299
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
300
|
+
} | undefined;
|
|
301
|
+
} | null;
|
|
302
|
+
stopWhen: {
|
|
303
|
+
handoffCountIs?: number;
|
|
304
|
+
} | null;
|
|
305
|
+
graphPrompt: string | null;
|
|
306
|
+
statusUpdates: {
|
|
307
|
+
enabled?: boolean | undefined;
|
|
308
|
+
numEvents?: number | undefined;
|
|
309
|
+
timeInSeconds?: number | undefined;
|
|
310
|
+
prompt?: string | undefined;
|
|
311
|
+
statusComponents?: {
|
|
312
|
+
id: string;
|
|
313
|
+
name: string;
|
|
314
|
+
schema: {
|
|
315
|
+
type: "object";
|
|
316
|
+
properties: Record<string, any>;
|
|
317
|
+
required?: string[] | undefined;
|
|
318
|
+
};
|
|
319
|
+
description?: string | undefined;
|
|
320
|
+
}[] | undefined;
|
|
321
|
+
} | null;
|
|
322
|
+
contextConfigId: string | null;
|
|
323
|
+
}>;
|
|
324
|
+
export declare const updateAgentGraph: (db: DatabaseClient) => (params: {
|
|
325
|
+
scopes: ScopeConfig;
|
|
326
|
+
graphId: string;
|
|
327
|
+
data: AgentGraphUpdate;
|
|
328
|
+
}) => Promise<{
|
|
329
|
+
tenantId: string;
|
|
330
|
+
projectId: string;
|
|
331
|
+
id: string;
|
|
332
|
+
name: string;
|
|
333
|
+
description: string | null;
|
|
334
|
+
createdAt: string;
|
|
335
|
+
updatedAt: string;
|
|
336
|
+
defaultAgentId: string;
|
|
337
|
+
models: {
|
|
338
|
+
base?: {
|
|
339
|
+
model?: string | undefined;
|
|
340
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
341
|
+
} | undefined;
|
|
342
|
+
structuredOutput?: {
|
|
343
|
+
model?: string | undefined;
|
|
344
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
345
|
+
} | undefined;
|
|
346
|
+
summarizer?: {
|
|
347
|
+
model?: string | undefined;
|
|
348
|
+
providerOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
349
|
+
} | undefined;
|
|
350
|
+
} | null;
|
|
351
|
+
stopWhen: {
|
|
352
|
+
handoffCountIs?: number;
|
|
353
|
+
} | null;
|
|
354
|
+
graphPrompt: string | null;
|
|
355
|
+
statusUpdates: {
|
|
356
|
+
enabled?: boolean | undefined;
|
|
357
|
+
numEvents?: number | undefined;
|
|
358
|
+
timeInSeconds?: number | undefined;
|
|
359
|
+
prompt?: string | undefined;
|
|
360
|
+
statusComponents?: {
|
|
361
|
+
id: string;
|
|
362
|
+
name: string;
|
|
363
|
+
schema: {
|
|
364
|
+
type: "object";
|
|
365
|
+
properties: Record<string, any>;
|
|
366
|
+
required?: string[] | undefined;
|
|
367
|
+
};
|
|
368
|
+
description?: string | undefined;
|
|
369
|
+
}[] | undefined;
|
|
370
|
+
} | null;
|
|
371
|
+
contextConfigId: string | null;
|
|
372
|
+
}>;
|
|
373
|
+
export declare const deleteAgentGraph: (db: DatabaseClient) => (params: {
|
|
374
|
+
scopes: ScopeConfig;
|
|
375
|
+
graphId: string;
|
|
376
|
+
}) => Promise<boolean>;
|
|
377
|
+
/**
|
|
378
|
+
* Helper function to fetch component relationships using efficient joins
|
|
379
|
+
*/
|
|
380
|
+
export declare const fetchComponentRelationships: (db: DatabaseClient) => <T extends Record<string, any>>(scopes: ScopeConfig, agentIds: string[], config: {
|
|
381
|
+
relationTable: any;
|
|
382
|
+
componentTable: any;
|
|
383
|
+
relationIdField: any;
|
|
384
|
+
componentIdField: any;
|
|
385
|
+
selectFields: Record<string, any>;
|
|
386
|
+
}) => Promise<Record<string, T>>;
|
|
387
|
+
export declare const getGraphAgentInfos: (db: DatabaseClient) => ({ scopes, graphId, agentId, }: {
|
|
388
|
+
scopes: ScopeConfig;
|
|
389
|
+
graphId: string;
|
|
390
|
+
agentId: string;
|
|
391
|
+
}) => Promise<{
|
|
392
|
+
id: string;
|
|
393
|
+
name: string;
|
|
394
|
+
description: string;
|
|
395
|
+
}[]>;
|
|
396
|
+
export declare const getFullGraphDefinition: (db: DatabaseClient) => ({ scopes: { tenantId, projectId }, graphId, }: {
|
|
397
|
+
scopes: ScopeConfig;
|
|
398
|
+
graphId: string;
|
|
399
|
+
}) => Promise<FullGraphDefinition | null>;
|
|
400
|
+
/**
|
|
401
|
+
* Upsert an agent graph (create if it doesn't exist, update if it does)
|
|
402
|
+
*/
|
|
403
|
+
export declare const upsertAgentGraph: (db: DatabaseClient) => (params: {
|
|
404
|
+
data: AgentGraphInsert;
|
|
405
|
+
}) => Promise<any>;
|
|
406
|
+
//# sourceMappingURL=agentGraphs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentGraphs.d.ts","sourceRoot":"","sources":["../../src/data-access/agentGraphs.ts"],"names":[],"mappings":"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"}
|