@inkeep/agents-core 0.0.0-dev-20251009194333 → 0.0.0-dev-20251009221341
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/README.md +2 -2
- package/dist/{chunk-VPJ6Z5QZ.js → chunk-5LRSB445.js} +115 -118
- package/dist/{chunk-TO2HNKGP.js → chunk-BVURASVM.js} +74 -110
- package/dist/chunk-TCLX6C3C.js +271 -0
- package/dist/chunk-ZSQFZL3Y.js +173 -0
- package/dist/client-exports.cjs +483 -225
- package/dist/client-exports.d.cts +6 -5
- package/dist/client-exports.d.ts +6 -5
- package/dist/client-exports.js +5 -4
- package/dist/db/schema.cjs +114 -117
- package/dist/db/schema.d.cts +2 -2
- package/dist/db/schema.d.ts +2 -2
- package/dist/db/schema.js +1 -1
- package/dist/index.cjs +1687 -1360
- package/dist/index.d.cts +1530 -1524
- package/dist/index.d.ts +1530 -1524
- package/dist/index.js +1016 -989
- package/dist/{schema-Ct2NlO81.d.cts → schema-B1rukNyF.d.ts} +118 -137
- package/dist/{schema-BQk_FMBV.d.ts → schema-BIYOOKX_.d.cts} +118 -137
- package/dist/signoz-queries-CifqdbnO.d.cts +269 -0
- package/dist/signoz-queries-CifqdbnO.d.ts +269 -0
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/{utility-s9c5CVOe.d.cts → utility-BEeDGMP9.d.cts} +226 -297
- package/dist/{utility-s9c5CVOe.d.ts → utility-BEeDGMP9.d.ts} +226 -297
- package/dist/validation/index.cjs +243 -238
- package/dist/validation/index.d.cts +76 -4
- package/dist/validation/index.d.ts +76 -4
- package/dist/validation/index.js +2 -2
- package/drizzle/0005_wide_shriek.sql +127 -0
- package/drizzle/meta/0005_snapshot.json +2558 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/dist/chunk-L53XWAYG.js +0 -134
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
export { h as ACTIVITY_NAMES, f as ACTIVITY_STATUS, e as ACTIVITY_TYPES, g as AGENT_IDS, p as AGGREGATE_OPERATORS, A as AI_OPERATIONS, j as AI_TOOL_TYPES, o as DATA_SOURCES, k as DATA_TYPES, D as DELEGATION_FROM_SUB_AGENT_ID, b as DELEGATION_ID, a as DELEGATION_TO_SUB_AGENT_ID, F as FIELD_TYPES, O as OPERATORS, m as ORDER_DIRECTIONS, P as PANEL_TYPES, q as QUERY_DEFAULTS, l as QUERY_EXPRESSIONS, Q as QUERY_FIELD_CONFIGS, n as QUERY_TYPES, R as REDUCE_OPERATIONS, d as SPAN_KEYS, S as SPAN_NAMES, i as TOOL_NAMES, T as TRANSFER_FROM_SUB_AGENT_ID, c as TRANSFER_TO_SUB_AGENT_ID, U as UNKNOWN_VALUE } from './signoz-queries-CifqdbnO.js';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { r as CredentialReferenceApiInsert, s as ContextConfigSelect, l as ContextFetchDefinition, h as MCPTransportType, t as MCPToolConfig, u as GraphScopeConfig, C as ConversationHistoryConfig, v as ProjectScopeConfig, w as PaginationConfig, x as AgentGraphInsert, y as AgentGraphUpdate, z as FullGraphDefinition, B as
|
|
3
|
-
export { b7 as A2AError, bD as A2ARequest, bE as A2AResponse, aI as APIKeySecurityScheme, bI as AgentApiInsert, dG as AgentApiInsertSchema, bH as AgentApiSelect, dF as AgentApiSelectSchema, bJ as AgentApiUpdate, dH as AgentApiUpdateSchema, cG as AgentArtifactComponentApiInsert, eR as AgentArtifactComponentApiInsertSchema, cF as AgentArtifactComponentApiSelect, eQ as AgentArtifactComponentApiSelectSchema, cH as AgentArtifactComponentApiUpdate, eS as AgentArtifactComponentApiUpdateSchema, cD as AgentArtifactComponentInsert, eO as AgentArtifactComponentInsertSchema, cC as AgentArtifactComponentSelect, eN as AgentArtifactComponentSelectSchema, cE as AgentArtifactComponentUpdate, eP as AgentArtifactComponentUpdateSchema, aE as AgentCapabilities, aS as AgentCard, di as AgentConversationHistoryConfig, cx as AgentDataComponentApiInsert, eF as AgentDataComponentApiInsertSchema, cw as AgentDataComponentApiSelect, eE as AgentDataComponentApiSelectSchema, cy as AgentDataComponentApiUpdate, eG as AgentDataComponentApiUpdateSchema, cu as AgentDataComponentInsert, eC as AgentDataComponentInsertSchema, ct as AgentDataComponentSelect, eB as AgentDataComponentSelectSchema, cv as AgentDataComponentUpdate, eD as AgentDataComponentUpdateSchema, d3 as AgentDefinition, bS as AgentGraphApiInsert, dV as AgentGraphApiInsertSchema, bR as AgentGraphApiSelect, dU as AgentGraphApiSelectSchema, bT as AgentGraphApiUpdate, dW as AgentGraphApiUpdateSchema, dS as AgentGraphInsertSchema, bQ as AgentGraphSelect, dR as AgentGraphSelectSchema, dT as AgentGraphUpdateSchema, dD as AgentInsertSchema, aF as AgentProvider, bM as AgentRelationApiInsert, dM as AgentRelationApiInsertSchema, bL as AgentRelationApiSelect, dL as AgentRelationApiSelectSchema, bN as AgentRelationApiUpdate, dN as AgentRelationApiUpdateSchema, dJ as AgentRelationInsertSchema, bO as AgentRelationQuery, dO as AgentRelationQuerySchema, bK as AgentRelationSelect, dI as AgentRelationSelectSchema, dK as AgentRelationUpdateSchema, dC as AgentSelectSchema, aG as AgentSkill, e as AgentStopWhen, b as AgentStopWhenSchema, cV as AgentToolRelationApiInsert, fv as AgentToolRelationApiInsertSchema, cU as AgentToolRelationApiSelect, fu as AgentToolRelationApiSelectSchema, cW as AgentToolRelationApiUpdate, fw as AgentToolRelationApiUpdateSchema, cT as AgentToolRelationInsert, fs as AgentToolRelationInsertSchema, cS as AgentToolRelationSelect, fr as AgentToolRelationSelectSchema, ft as AgentToolRelationUpdateSchema, dE as AgentUpdateSchema, eZ as AllAgentSchema, cL as AllAgentSelect, cP as ApiKeyApiCreationResponse, f2 as ApiKeyApiCreationResponseSchema, cN as ApiKeyApiInsert, f3 as ApiKeyApiInsertSchema, cM as ApiKeyApiSelect, f1 as ApiKeyApiSelectSchema, cO as ApiKeyApiUpdate, A as ApiKeyApiUpdateSchema, e$ as ApiKeyInsertSchema, e_ as ApiKeySelectSchema, f0 as ApiKeyUpdateSchema, cA as ArtifactComponentApiInsert, eL as ArtifactComponentApiInsertSchema, cz as ArtifactComponentApiSelect, eK as ArtifactComponentApiSelectSchema, cB as ArtifactComponentApiUpdate, eM as ArtifactComponentApiUpdateSchema, eI as ArtifactComponentInsertSchema, eH as ArtifactComponentSelectSchema, eJ as ArtifactComponentUpdateSchema, aL as AuthorizationCodeOAuthFlow, d1 as CanUseItem, fF as CanUseItemSchema, bn as CancelTaskRequest, by as CancelTaskResponse, bx as CancelTaskSuccessResponse, aM as ClientCredentialsOAuthFlow, b5 as ContentTypeNotSupportedError, co as ContextCacheApiInsert, es as ContextCacheApiInsertSchema, cn as ContextCacheApiSelect, er as ContextCacheApiSelectSchema, cp as ContextCacheApiUpdate, et as ContextCacheApiUpdateSchema, dj as ContextCacheEntry, ep as ContextCacheInsertSchema, eo as ContextCacheSelectSchema, cm as ContextCacheUpdate, eq as ContextCacheUpdateSchema, ci as ContextConfigApiInsert, fp as ContextConfigApiInsertSchema, ch as ContextConfigApiSelect, fo as ContextConfigApiSelectSchema, cj as ContextConfigApiUpdate, fq as ContextConfigApiUpdateSchema, fm as ContextConfigInsertSchema, fl as ContextConfigSelectSchema, fn as ContextConfigUpdateSchema, cb as ConversationApiInsert, eg as ConversationApiInsertSchema, ca as ConversationApiSelect, ef as ConversationApiSelectSchema, cc as ConversationApiUpdate, eh as ConversationApiUpdateSchema, ed as ConversationInsertSchema, dh as ConversationScopeOptions, ec as ConversationSelectSchema, ee as ConversationUpdateSchema, f8 as CredentialReferenceApiInsertSchema, cQ as CredentialReferenceApiSelect, f7 as CredentialReferenceApiSelectSchema, cR as CredentialReferenceApiUpdate, f9 as CredentialReferenceApiUpdateSchema, f5 as CredentialReferenceInsertSchema, f4 as CredentialReferenceSelectSchema, f6 as CredentialReferenceUpdateSchema, cr as DataComponentApiInsert, ez as DataComponentApiInsertSchema, cq as DataComponentApiSelect, ey as DataComponentApiSelectSchema, cs as DataComponentApiUpdate, eA as DataComponentApiUpdateSchema, ew as DataComponentBaseSchema, ev as DataComponentInsertSchema, eu as DataComponentSelectSchema, ex as DataComponentUpdateSchema, aC as DataPart, fL as ErrorResponseSchema, fM as ExistsResponseSchema, cJ as ExternalAgentApiInsert, eX as ExternalAgentApiInsertSchema, cI as ExternalAgentApiSelect, eW as ExternalAgentApiSelectSchema, cK as ExternalAgentApiUpdate, eY as ExternalAgentApiUpdateSchema, eU as ExternalAgentInsertSchema, bP as ExternalAgentRelationApiInsert, dQ as ExternalAgentRelationApiInsertSchema, dP as ExternalAgentRelationInsertSchema, eT as ExternalAgentSelectSchema, eV as ExternalAgentUpdateSchema, cl as FetchConfig, fj as FetchConfigSchema, ck as FetchDefinition, fk as FetchDefinitionSchema, ay as FileBase, aB as FilePart, az as FileWithBytes, aA as FileWithUri, d0 as FullGraphAgentInsert, a as FullGraphAgentInsertSchema, fG as FullGraphDefinitionSchema, fU as FullProjectDefinitionSchema, F as FunctionApiInsertSchema, c8 as FunctionApiSelect, i as FunctionApiSelectSchema, c9 as FunctionApiUpdate, j as FunctionApiUpdateSchema, c6 as FunctionInsert, fh as FunctionInsertSchema, c5 as FunctionSelect, fg as FunctionSelectSchema, dB as FunctionToolConfig, dA as FunctionToolConfigSchema, c7 as FunctionUpdate, fi as FunctionUpdateSchema, bp as GetTaskPushNotificationConfigRequest, bC as GetTaskPushNotificationConfigResponse, bB as GetTaskPushNotificationConfigSuccessResponse, bm as GetTaskRequest, bw as GetTaskResponse, bv as GetTaskSuccessResponse, d as GraphStopWhen, G as GraphStopWhenSchema, fH as GraphWithinContextOfProjectSchema, aJ as HTTPAuthSecurityScheme, fV as HeadersScopeSchema, g0 as IdParamsSchema, aN as ImplicitOAuthFlow, d2 as InternalAgentDefinition, b0 as InternalError, b6 as InvalidAgentResponseError, a$ as InvalidParamsError, aZ as InvalidRequestError, aY as JSONParseError, bh as JSONRPCError, bj as JSONRPCErrorResponse, bf as JSONRPCMessage, bg as JSONRPCRequest, bi as JSONRPCResult, c_ as LedgerArtifactApiInsert, fB as LedgerArtifactApiInsertSchema, cZ as LedgerArtifactApiSelect, fA as LedgerArtifactApiSelectSchema, c$ as LedgerArtifactApiUpdate, fC as LedgerArtifactApiUpdateSchema, cX as LedgerArtifactInsert, fy as LedgerArtifactInsertSchema, fx as LedgerArtifactSelectSchema, cY as LedgerArtifactUpdate, fz as LedgerArtifactUpdateSchema, fJ as ListResponseSchema, du as MAX_ID_LENGTH, ds as MCPServerType, fb as MCPToolConfigSchema, dt as MIN_ID_LENGTH, dk as McpAuthType, dl as McpServerAuth, dn as McpServerCapabilities, dp as McpToolDefinition, e9 as McpToolDefinitionSchema, fa as McpToolSchema, dm as McpTransportConfig, e7 as McpTransportConfigSchema, aT as Message, cf as MessageApiInsert, em as MessageApiInsertSchema, ce as MessageApiSelect, el as MessageApiSelectSchema, cg as MessageApiUpdate, en as MessageApiUpdateSchema, ej as MessageInsertSchema, dc as MessageMode, bF as MessagePart, db as MessageRole, cd as MessageSelect, ei as MessageSelectSchema, bd as MessageSendConfiguration, be as MessageSendParams, da as MessageType, ek as MessageUpdateSchema, a_ as MethodNotFoundError, dx as ModelSchema, f as ModelSettings, M as ModelSettingsSchema, dd as Models, aP as OAuth2SecurityScheme, aK as OAuthFlows, aQ as OpenIdConnectSecurityScheme, d8 as Pagination, g1 as PaginationQueryParamsSchema, fI as PaginationSchema, P as Part, aw as PartBase, aO as PasswordOAuthFlow, d6 as ProjectApiInsert, fS as ProjectApiInsertSchema, d5 as ProjectApiSelect, fR as ProjectApiSelectSchema, d7 as ProjectApiUpdate, fT as ProjectApiUpdateSchema, fP as ProjectInsertSchema, dy as ProjectModelSchema, de as ProjectModels, fO as ProjectSelectSchema, fQ as ProjectUpdateSchema, b8 as PushNotificationAuthenticationInfo, b9 as PushNotificationConfig, b3 as PushNotificationNotSupportedError, fN as RemovedResponseSchema, dz as SandboxConfig, k as SandboxConfigSchema, aR as SecurityScheme, aH as SecuritySchemeBase, bk as SendMessageRequest, bs as SendMessageResponse, br as SendMessageSuccessResponse, bl as SendStreamingMessageRequest, bu as SendStreamingMessageResponse, bt as SendStreamingMessageSuccessResponse, bo as SetTaskPushNotificationConfigRequest, bA as SetTaskPushNotificationConfigResponse, bz as SetTaskPushNotificationConfigSuccessResponse, fK as SingleResponseSchema, dg as StatusComponent, fD as StatusComponentSchema, fE as StatusUpdateSchema, df as StatusUpdateSettings, c as StopWhen, S as StopWhenSchema, d9 as SummaryEvent, dq as TOOL_STATUS_VALUES, aV as Task, bW as TaskApiInsert, d$ as TaskApiInsertSchema, bV as TaskApiSelect, d_ as TaskApiSelectSchema, bX as TaskApiUpdate, e0 as TaskApiUpdateSchema, bG as TaskArtifact, aX as TaskArtifactUpdateEvent, bb as TaskIdParams, dY as TaskInsertSchema, b2 as TaskNotCancelableError, b1 as TaskNotFoundError, ba as TaskPushNotificationConfig, bc as TaskQueryParams, c0 as TaskRelationApiInsert, e5 as TaskRelationApiInsertSchema, b$ as TaskRelationApiSelect, e4 as TaskRelationApiSelectSchema, c1 as TaskRelationApiUpdate, e6 as TaskRelationApiUpdateSchema, bZ as TaskRelationInsert, e2 as TaskRelationInsertSchema, bY as TaskRelationSelect, e1 as TaskRelationSelectSchema, b_ as TaskRelationUpdate, e3 as TaskRelationUpdateSchema, bq as TaskResubscriptionRequest, dX as TaskSelectSchema, aD as TaskState, aU as TaskStatus, aW as TaskStatusUpdateEvent, bU as TaskUpdate, dZ as TaskUpdateSchema, f$ as TenantIdParamsSchema, fW as TenantParamsSchema, fZ as TenantProjectGraphIdParamsSchema, fY as TenantProjectGraphParamsSchema, f_ as TenantProjectIdParamsSchema, fX as TenantProjectParamsSchema, ax as TextPart, c3 as ToolApiInsert, fe as ToolApiInsertSchema, c2 as ToolApiSelect, fd as ToolApiSelectSchema, c4 as ToolApiUpdate, ff as ToolApiUpdateSchema, d4 as ToolDefinition, eb as ToolInsertSchema, ea as ToolSelectSchema, e8 as ToolStatusSchema, fc as ToolUpdateSchema, dv as URL_SAFE_ID_PATTERN, b4 as UnsupportedOperationError, dr as VALID_RELATION_TYPES, dw as resourceIdSchema } from './utility-s9c5CVOe.js';
|
|
3
|
+
import { r as CredentialReferenceApiInsert, s as ContextConfigSelect, l as ContextFetchDefinition, h as MCPTransportType, t as MCPToolConfig, u as GraphScopeConfig, C as ConversationHistoryConfig, v as ProjectScopeConfig, w as PaginationConfig, x as AgentGraphInsert, y as AgentGraphUpdate, z as FullGraphDefinition, B as ApiKeySelect, D as ApiKeyInsert, E as ApiKeyUpdate, H as CreateApiKeyParams, I as ApiKeyCreateResult, J as ArtifactComponentSelect, K as ArtifactComponentInsert, L as ArtifactComponentUpdate, N as AgentScopeConfig, O as ContextCacheSelect, Q as ContextCacheInsert, R as ContextConfigInsert, U as ContextConfigUpdate, V as ConversationSelect, W as ConversationInsert, o as ConversationMetadata, X as ConversationUpdate, Y as CredentialReferenceSelect, Z as ToolSelect, _ as CredentialReferenceInsert, $ as CredentialReferenceUpdate, a0 as DataComponentSelect, a1 as DataComponentInsert, a2 as DataComponentUpdate, a3 as ExternalAgentInsert, a4 as ExternalAgentSelect, a5 as ExternalAgentUpdate, a6 as FunctionApiInsert, a7 as Artifact, a8 as LedgerArtifactSelect, q as MessageMetadata, p as MessageContent, a9 as MessageVisibility, aa as MessageInsert, ab as MessageUpdate, ac as FullProjectDefinition, ad as ProjectInfo, ae as ProjectSelect, af as PaginationResult, ag as ProjectResourceCounts, ah as ProjectInsert, ai as ProjectUpdate, aj as AgentRelationInsert, ak as ExternalAgentRelationInsert, al as AgentRelationUpdate, am as AgentToolRelationUpdate, m as ToolMcpConfig, n as ToolServerCapabilities, an as SubAgentInsert, ao as SubAgentUpdate, ap as SubAgentSelect, aq as TaskInsert, T as TaskMetadataConfig, ar as TaskSelect, as as McpTool, at as ToolInsert, au as ToolUpdate, g as CredentialStoreType, av as ExecutionContext } from './utility-BEeDGMP9.js';
|
|
4
|
+
export { b7 as A2AError, bD as A2ARequest, bE as A2AResponse, aI as APIKeySecurityScheme, cG as AgentArtifactComponentApiInsert, eR as AgentArtifactComponentApiInsertSchema, cF as AgentArtifactComponentApiSelect, eQ as AgentArtifactComponentApiSelectSchema, cH as AgentArtifactComponentApiUpdate, eS as AgentArtifactComponentApiUpdateSchema, cD as AgentArtifactComponentInsert, eO as AgentArtifactComponentInsertSchema, cC as AgentArtifactComponentSelect, eN as AgentArtifactComponentSelectSchema, cE as AgentArtifactComponentUpdate, eP as AgentArtifactComponentUpdateSchema, aE as AgentCapabilities, aS as AgentCard, di as AgentConversationHistoryConfig, cx as AgentDataComponentApiInsert, eF as AgentDataComponentApiInsertSchema, cw as AgentDataComponentApiSelect, eE as AgentDataComponentApiSelectSchema, cy as AgentDataComponentApiUpdate, eG as AgentDataComponentApiUpdateSchema, cu as AgentDataComponentInsert, eC as AgentDataComponentInsertSchema, ct as AgentDataComponentSelect, eB as AgentDataComponentSelectSchema, cv as AgentDataComponentUpdate, eD as AgentDataComponentUpdateSchema, d3 as AgentDefinition, bS as AgentGraphApiInsert, dV as AgentGraphApiInsertSchema, bR as AgentGraphApiSelect, dU as AgentGraphApiSelectSchema, bT as AgentGraphApiUpdate, dW as AgentGraphApiUpdateSchema, dS as AgentGraphInsertSchema, bQ as AgentGraphSelect, dR as AgentGraphSelectSchema, dT as AgentGraphUpdateSchema, aF as AgentProvider, bM as AgentRelationApiInsert, dM as AgentRelationApiInsertSchema, bL as AgentRelationApiSelect, dL as AgentRelationApiSelectSchema, bN as AgentRelationApiUpdate, dN as AgentRelationApiUpdateSchema, dJ as AgentRelationInsertSchema, bO as AgentRelationQuery, dO as AgentRelationQuerySchema, bK as AgentRelationSelect, dI as AgentRelationSelectSchema, dK as AgentRelationUpdateSchema, aG as AgentSkill, e as AgentStopWhen, b as AgentStopWhenSchema, cV as AgentToolRelationApiInsert, fv as AgentToolRelationApiInsertSchema, cU as AgentToolRelationApiSelect, fu as AgentToolRelationApiSelectSchema, cW as AgentToolRelationApiUpdate, fw as AgentToolRelationApiUpdateSchema, cT as AgentToolRelationInsert, fs as AgentToolRelationInsertSchema, cS as AgentToolRelationSelect, fr as AgentToolRelationSelectSchema, ft as AgentToolRelationUpdateSchema, eZ as AllAgentSchema, cL as AllAgentSelect, cP as ApiKeyApiCreationResponse, f2 as ApiKeyApiCreationResponseSchema, cN as ApiKeyApiInsert, f3 as ApiKeyApiInsertSchema, cM as ApiKeyApiSelect, f1 as ApiKeyApiSelectSchema, cO as ApiKeyApiUpdate, A as ApiKeyApiUpdateSchema, e$ as ApiKeyInsertSchema, e_ as ApiKeySelectSchema, f0 as ApiKeyUpdateSchema, cA as ArtifactComponentApiInsert, eL as ArtifactComponentApiInsertSchema, cz as ArtifactComponentApiSelect, eK as ArtifactComponentApiSelectSchema, cB as ArtifactComponentApiUpdate, eM as ArtifactComponentApiUpdateSchema, eI as ArtifactComponentInsertSchema, eH as ArtifactComponentSelectSchema, eJ as ArtifactComponentUpdateSchema, aL as AuthorizationCodeOAuthFlow, d1 as CanUseItem, fF as CanUseItemSchema, bn as CancelTaskRequest, by as CancelTaskResponse, bx as CancelTaskSuccessResponse, aM as ClientCredentialsOAuthFlow, b5 as ContentTypeNotSupportedError, co as ContextCacheApiInsert, es as ContextCacheApiInsertSchema, cn as ContextCacheApiSelect, er as ContextCacheApiSelectSchema, cp as ContextCacheApiUpdate, et as ContextCacheApiUpdateSchema, dj as ContextCacheEntry, ep as ContextCacheInsertSchema, eo as ContextCacheSelectSchema, cm as ContextCacheUpdate, eq as ContextCacheUpdateSchema, ci as ContextConfigApiInsert, fp as ContextConfigApiInsertSchema, ch as ContextConfigApiSelect, fo as ContextConfigApiSelectSchema, cj as ContextConfigApiUpdate, fq as ContextConfigApiUpdateSchema, fm as ContextConfigInsertSchema, fl as ContextConfigSelectSchema, fn as ContextConfigUpdateSchema, cb as ConversationApiInsert, eg as ConversationApiInsertSchema, ca as ConversationApiSelect, ef as ConversationApiSelectSchema, cc as ConversationApiUpdate, eh as ConversationApiUpdateSchema, ed as ConversationInsertSchema, dh as ConversationScopeOptions, ec as ConversationSelectSchema, ee as ConversationUpdateSchema, f8 as CredentialReferenceApiInsertSchema, cQ as CredentialReferenceApiSelect, f7 as CredentialReferenceApiSelectSchema, cR as CredentialReferenceApiUpdate, f9 as CredentialReferenceApiUpdateSchema, f5 as CredentialReferenceInsertSchema, f4 as CredentialReferenceSelectSchema, f6 as CredentialReferenceUpdateSchema, cr as DataComponentApiInsert, ez as DataComponentApiInsertSchema, cq as DataComponentApiSelect, ey as DataComponentApiSelectSchema, cs as DataComponentApiUpdate, eA as DataComponentApiUpdateSchema, ew as DataComponentBaseSchema, ev as DataComponentInsertSchema, eu as DataComponentSelectSchema, ex as DataComponentUpdateSchema, aC as DataPart, fK as ErrorResponseSchema, fL as ExistsResponseSchema, cJ as ExternalAgentApiInsert, eX as ExternalAgentApiInsertSchema, cI as ExternalAgentApiSelect, eW as ExternalAgentApiSelectSchema, cK as ExternalAgentApiUpdate, eY as ExternalAgentApiUpdateSchema, eU as ExternalAgentInsertSchema, bP as ExternalAgentRelationApiInsert, dQ as ExternalAgentRelationApiInsertSchema, dP as ExternalAgentRelationInsertSchema, eT as ExternalAgentSelectSchema, eV as ExternalAgentUpdateSchema, cl as FetchConfig, fj as FetchConfigSchema, ck as FetchDefinition, fk as FetchDefinitionSchema, ay as FileBase, aB as FilePart, az as FileWithBytes, aA as FileWithUri, d0 as FullGraphAgentInsert, a as FullGraphAgentInsertSchema, fT as FullProjectDefinitionSchema, F as FunctionApiInsertSchema, c8 as FunctionApiSelect, i as FunctionApiSelectSchema, c9 as FunctionApiUpdate, j as FunctionApiUpdateSchema, c6 as FunctionInsert, fh as FunctionInsertSchema, c5 as FunctionSelect, fg as FunctionSelectSchema, dB as FunctionToolConfig, dA as FunctionToolConfigSchema, c7 as FunctionUpdate, fi as FunctionUpdateSchema, bp as GetTaskPushNotificationConfigRequest, bC as GetTaskPushNotificationConfigResponse, bB as GetTaskPushNotificationConfigSuccessResponse, bm as GetTaskRequest, bw as GetTaskResponse, bv as GetTaskSuccessResponse, d as GraphStopWhen, G as GraphStopWhenSchema, fG as GraphWithinContextOfProjectSchema, aJ as HTTPAuthSecurityScheme, fU as HeadersScopeSchema, aN as ImplicitOAuthFlow, d2 as InternalAgentDefinition, b0 as InternalError, b6 as InvalidAgentResponseError, a$ as InvalidParamsError, aZ as InvalidRequestError, aY as JSONParseError, bh as JSONRPCError, bj as JSONRPCErrorResponse, bf as JSONRPCMessage, bg as JSONRPCRequest, bi as JSONRPCResult, c_ as LedgerArtifactApiInsert, fB as LedgerArtifactApiInsertSchema, cZ as LedgerArtifactApiSelect, fA as LedgerArtifactApiSelectSchema, c$ as LedgerArtifactApiUpdate, fC as LedgerArtifactApiUpdateSchema, cX as LedgerArtifactInsert, fy as LedgerArtifactInsertSchema, fx as LedgerArtifactSelectSchema, cY as LedgerArtifactUpdate, fz as LedgerArtifactUpdateSchema, fI as ListResponseSchema, du as MAX_ID_LENGTH, ds as MCPServerType, fb as MCPToolConfigSchema, dt as MIN_ID_LENGTH, dk as McpAuthType, dl as McpServerAuth, dn as McpServerCapabilities, dp as McpToolDefinition, e9 as McpToolDefinitionSchema, fa as McpToolSchema, dm as McpTransportConfig, e7 as McpTransportConfigSchema, aT as Message, cf as MessageApiInsert, em as MessageApiInsertSchema, ce as MessageApiSelect, el as MessageApiSelectSchema, cg as MessageApiUpdate, en as MessageApiUpdateSchema, ej as MessageInsertSchema, dc as MessageMode, bF as MessagePart, db as MessageRole, cd as MessageSelect, ei as MessageSelectSchema, bd as MessageSendConfiguration, be as MessageSendParams, da as MessageType, ek as MessageUpdateSchema, a_ as MethodNotFoundError, dx as ModelSchema, f as ModelSettings, M as ModelSettingsSchema, dd as Models, aP as OAuth2SecurityScheme, aK as OAuthFlows, aQ as OpenIdConnectSecurityScheme, d8 as Pagination, g1 as PaginationQueryParamsSchema, fH as PaginationSchema, P as Part, aw as PartBase, aO as PasswordOAuthFlow, d6 as ProjectApiInsert, fR as ProjectApiInsertSchema, d5 as ProjectApiSelect, fQ as ProjectApiSelectSchema, d7 as ProjectApiUpdate, fS as ProjectApiUpdateSchema, fO as ProjectInsertSchema, dy as ProjectModelSchema, de as ProjectModels, fN as ProjectSelectSchema, fP as ProjectUpdateSchema, b8 as PushNotificationAuthenticationInfo, b9 as PushNotificationConfig, b3 as PushNotificationNotSupportedError, fM as RemovedResponseSchema, dz as SandboxConfig, k as SandboxConfigSchema, aR as SecurityScheme, aH as SecuritySchemeBase, bk as SendMessageRequest, bs as SendMessageResponse, br as SendMessageSuccessResponse, bl as SendStreamingMessageRequest, bu as SendStreamingMessageResponse, bt as SendStreamingMessageSuccessResponse, bo as SetTaskPushNotificationConfigRequest, bA as SetTaskPushNotificationConfigResponse, bz as SetTaskPushNotificationConfigSuccessResponse, fJ as SingleResponseSchema, dg as StatusComponent, fD as StatusComponentSchema, fE as StatusUpdateSchema, df as StatusUpdateSettings, c as StopWhen, S as StopWhenSchema, bI as SubAgentApiInsert, dG as SubAgentApiInsertSchema, bH as SubAgentApiSelect, dF as SubAgentApiSelectSchema, bJ as SubAgentApiUpdate, dH as SubAgentApiUpdateSchema, dD as SubAgentInsertSchema, dC as SubAgentSelectSchema, dE as SubAgentUpdateSchema, d9 as SummaryEvent, dq as TOOL_STATUS_VALUES, aV as Task, bW as TaskApiInsert, d$ as TaskApiInsertSchema, bV as TaskApiSelect, d_ as TaskApiSelectSchema, bX as TaskApiUpdate, e0 as TaskApiUpdateSchema, bG as TaskArtifact, aX as TaskArtifactUpdateEvent, bb as TaskIdParams, dY as TaskInsertSchema, b2 as TaskNotCancelableError, b1 as TaskNotFoundError, ba as TaskPushNotificationConfig, bc as TaskQueryParams, c0 as TaskRelationApiInsert, e5 as TaskRelationApiInsertSchema, b$ as TaskRelationApiSelect, e4 as TaskRelationApiSelectSchema, c1 as TaskRelationApiUpdate, e6 as TaskRelationApiUpdateSchema, bZ as TaskRelationInsert, e2 as TaskRelationInsertSchema, bY as TaskRelationSelect, e1 as TaskRelationSelectSchema, b_ as TaskRelationUpdate, e3 as TaskRelationUpdateSchema, bq as TaskResubscriptionRequest, dX as TaskSelectSchema, aD as TaskState, aU as TaskStatus, aW as TaskStatusUpdateEvent, bU as TaskUpdate, dZ as TaskUpdateSchema, fW as TenantIdParamsSchema, fV as TenantParamsSchema, f_ as TenantProjectGraphIdParamsSchema, fZ as TenantProjectGraphParamsSchema, g0 as TenantProjectGraphSubAgentIdParamsSchema, f$ as TenantProjectGraphSubAgentParamsSchema, fY as TenantProjectIdParamsSchema, fX as TenantProjectParamsSchema, ax as TextPart, c3 as ToolApiInsert, fe as ToolApiInsertSchema, c2 as ToolApiSelect, fd as ToolApiSelectSchema, c4 as ToolApiUpdate, ff as ToolApiUpdateSchema, d4 as ToolDefinition, eb as ToolInsertSchema, ea as ToolSelectSchema, e8 as ToolStatusSchema, fc as ToolUpdateSchema, dv as URL_SAFE_ID_PATTERN, b4 as UnsupportedOperationError, dr as VALID_RELATION_TYPES, dw as resourceIdSchema } from './utility-BEeDGMP9.js';
|
|
4
5
|
import { CredentialStore } from './types/index.js';
|
|
5
6
|
export { CorsConfig, ServerConfig, ServerOptions } from './types/index.js';
|
|
6
7
|
import { LibSQLDatabase } from 'drizzle-orm/libsql';
|
|
7
|
-
import { s as schema } from './schema-
|
|
8
|
-
export {
|
|
8
|
+
import { s as schema } from './schema-B1rukNyF.js';
|
|
9
|
+
export { a as agentGraph, C as agentGraphRelations, F as agentToolRelationsRelations, u as apiKeys, E as apiKeysRelations, j as artifactComponents, K as artifactComponentsRelations, b as contextCache, A as contextCacheRelations, c as contextConfigs, z as contextConfigsRelations, o as conversations, I as conversationsRelations, v as credentialReferences, G as credentialReferencesRelations, h as dataComponents, M as dataComponentsRelations, f as externalAgents, D as externalAgentsRelations, m as functions, P as functionsRelations, r as ledgerArtifacts, O as ledgerArtifactsRelations, q as messages, J as messagesRelations, p as projects, x as projectsRelations, k as subAgentArtifactComponents, L as subAgentArtifactComponentsRelations, i as subAgentDataComponents, N as subAgentDataComponentsRelations, e as subAgentRelations, Q as subAgentRelationsRelations, n as subAgentToolRelations, d as subAgents, B as subAgentsRelations, g as taskRelations, y as taskRelationsRelations, t as tasks, w as tasksRelations, l as tools, H as toolsRelations } from './schema-B1rukNyF.js';
|
|
9
10
|
import { LoggerOptions, TransportSingleOptions, Logger } from 'pino';
|
|
10
11
|
import { SSEClientTransportOptions } from '@modelcontextprotocol/sdk/client/sse.js';
|
|
11
12
|
import { StreamableHTTPClientTransportOptions } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
@@ -16,7 +17,7 @@ import { z as z$1 } from '@hono/zod-openapi';
|
|
|
16
17
|
import { HTTPException } from 'hono/http-exception';
|
|
17
18
|
export { convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, extractPreviewFields, isZodSchema, preview } from './utils/schema-conversion.js';
|
|
18
19
|
import { Span, Tracer } from '@opentelemetry/api';
|
|
19
|
-
export { generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAndTypeGraphData, validateArtifactComponentReferences, validateDataComponentReferences, validateGraphStructure, validateToolReferences } from './validation/index.js';
|
|
20
|
+
export { A2AMessageMetadata, A2AMessageMetadataSchema, DataOperationDetails, DataOperationDetailsSchema, DataOperationEvent, DataOperationEventSchema, DelegationReturnedData, DelegationReturnedDataSchema, DelegationSentData, DelegationSentDataSchema, TransferData, TransferDataSchema, generateIdFromName, isExternalAgent, isInternalAgent, isValidResourceId, validateAgentRelationships, validateAndTypeGraphData, validateArtifactComponentReferences, validateDataComponentReferences, validateGraphStructure, validateToolReferences } from './validation/index.js';
|
|
20
21
|
export { P as PropsValidationResult, v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.js';
|
|
21
22
|
import 'drizzle-zod';
|
|
22
23
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -845,7 +846,7 @@ declare const getAgentGraphById: (db: DatabaseClient) => (params: {
|
|
|
845
846
|
stopWhen: {
|
|
846
847
|
transferCountIs?: number | undefined;
|
|
847
848
|
} | null;
|
|
848
|
-
|
|
849
|
+
defaultSubAgentId: string | null;
|
|
849
850
|
contextConfigId: string | null;
|
|
850
851
|
statusUpdates: {
|
|
851
852
|
enabled?: boolean | undefined;
|
|
@@ -864,7 +865,7 @@ declare const getAgentGraphById: (db: DatabaseClient) => (params: {
|
|
|
864
865
|
} | null;
|
|
865
866
|
graphPrompt: string | null;
|
|
866
867
|
} | null>;
|
|
867
|
-
declare const
|
|
868
|
+
declare const getAgentGraphWithDefaultSubAgent: (db: DatabaseClient) => (params: {
|
|
868
869
|
scopes: GraphScopeConfig;
|
|
869
870
|
}) => Promise<{
|
|
870
871
|
tenantId: string;
|
|
@@ -891,7 +892,7 @@ declare const getAgentGraphWithDefaultAgent: (db: DatabaseClient) => (params: {
|
|
|
891
892
|
stopWhen: {
|
|
892
893
|
transferCountIs?: number | undefined;
|
|
893
894
|
} | null;
|
|
894
|
-
|
|
895
|
+
defaultSubAgentId: string | null;
|
|
895
896
|
contextConfigId: string | null;
|
|
896
897
|
statusUpdates: {
|
|
897
898
|
enabled?: boolean | undefined;
|
|
@@ -909,7 +910,7 @@ declare const getAgentGraphWithDefaultAgent: (db: DatabaseClient) => (params: {
|
|
|
909
910
|
}[] | undefined;
|
|
910
911
|
} | null;
|
|
911
912
|
graphPrompt: string | null;
|
|
912
|
-
|
|
913
|
+
defaultSubAgent: {
|
|
913
914
|
tenantId: string;
|
|
914
915
|
projectId: string;
|
|
915
916
|
id: string;
|
|
@@ -966,7 +967,7 @@ declare const listAgentGraphs: (db: DatabaseClient) => (params: {
|
|
|
966
967
|
stopWhen: {
|
|
967
968
|
transferCountIs?: number | undefined;
|
|
968
969
|
} | null;
|
|
969
|
-
|
|
970
|
+
defaultSubAgentId: string | null;
|
|
970
971
|
contextConfigId: string | null;
|
|
971
972
|
statusUpdates: {
|
|
972
973
|
enabled?: boolean | undefined;
|
|
@@ -994,7 +995,7 @@ declare const listAgentGraphsPaginated: (db: DatabaseClient) => (params: {
|
|
|
994
995
|
updatedAt: string;
|
|
995
996
|
name: string;
|
|
996
997
|
description: string | null;
|
|
997
|
-
|
|
998
|
+
defaultSubAgentId: string | null;
|
|
998
999
|
contextConfigId: string | null;
|
|
999
1000
|
models: {
|
|
1000
1001
|
base?: {
|
|
@@ -1065,7 +1066,7 @@ declare const createAgentGraph: (db: DatabaseClient) => (data: AgentGraphInsert)
|
|
|
1065
1066
|
stopWhen: {
|
|
1066
1067
|
transferCountIs?: number | undefined;
|
|
1067
1068
|
} | null;
|
|
1068
|
-
|
|
1069
|
+
defaultSubAgentId: string | null;
|
|
1069
1070
|
contextConfigId: string | null;
|
|
1070
1071
|
statusUpdates: {
|
|
1071
1072
|
enabled?: boolean | undefined;
|
|
@@ -1112,7 +1113,7 @@ declare const updateAgentGraph: (db: DatabaseClient) => (params: {
|
|
|
1112
1113
|
stopWhen: {
|
|
1113
1114
|
transferCountIs?: number | undefined;
|
|
1114
1115
|
} | null;
|
|
1115
|
-
|
|
1116
|
+
defaultSubAgentId: string | null;
|
|
1116
1117
|
contextConfigId: string | null;
|
|
1117
1118
|
statusUpdates: {
|
|
1118
1119
|
enabled?: boolean | undefined;
|
|
@@ -1137,17 +1138,18 @@ declare const deleteAgentGraph: (db: DatabaseClient) => (params: {
|
|
|
1137
1138
|
/**
|
|
1138
1139
|
* Helper function to fetch component relationships using efficient joins
|
|
1139
1140
|
*/
|
|
1140
|
-
declare const fetchComponentRelationships: (db: DatabaseClient) => <T extends Record<string, any>>(scopes: ProjectScopeConfig,
|
|
1141
|
+
declare const fetchComponentRelationships: (db: DatabaseClient) => <T extends Record<string, any>>(scopes: ProjectScopeConfig, subAgentIds: string[], config: {
|
|
1141
1142
|
relationTable: any;
|
|
1142
1143
|
componentTable: any;
|
|
1143
1144
|
relationIdField: any;
|
|
1144
1145
|
componentIdField: any;
|
|
1146
|
+
subAgentIdField: any;
|
|
1145
1147
|
selectFields: Record<string, any>;
|
|
1146
1148
|
}) => Promise<Record<string, T>>;
|
|
1147
|
-
declare const getGraphAgentInfos: (db: DatabaseClient) => ({ scopes, graphId,
|
|
1149
|
+
declare const getGraphAgentInfos: (db: DatabaseClient) => ({ scopes, graphId, subAgentId, }: {
|
|
1148
1150
|
scopes: ProjectScopeConfig;
|
|
1149
1151
|
graphId: string;
|
|
1150
|
-
|
|
1152
|
+
subAgentId: string;
|
|
1151
1153
|
}) => Promise<{
|
|
1152
1154
|
id: string;
|
|
1153
1155
|
name: string;
|
|
@@ -1163,137 +1165,60 @@ declare const upsertAgentGraph: (db: DatabaseClient) => (params: {
|
|
|
1163
1165
|
data: AgentGraphInsert;
|
|
1164
1166
|
}) => Promise<any>;
|
|
1165
1167
|
|
|
1166
|
-
declare const
|
|
1167
|
-
scopes:
|
|
1168
|
-
|
|
1168
|
+
declare const getApiKeyById: (db: DatabaseClient) => (params: {
|
|
1169
|
+
scopes: ProjectScopeConfig;
|
|
1170
|
+
id: string;
|
|
1169
1171
|
}) => Promise<{
|
|
1170
1172
|
tenantId: string;
|
|
1171
1173
|
projectId: string;
|
|
1172
1174
|
id: string;
|
|
1175
|
+
name: string | null;
|
|
1173
1176
|
graphId: string;
|
|
1177
|
+
publicId: string;
|
|
1178
|
+
keyHash: string;
|
|
1179
|
+
keyPrefix: string;
|
|
1180
|
+
lastUsedAt: string | null;
|
|
1181
|
+
expiresAt: string | null;
|
|
1174
1182
|
createdAt: string;
|
|
1175
1183
|
updatedAt: string;
|
|
1176
|
-
sourceAgentId: string;
|
|
1177
|
-
targetAgentId: string | null;
|
|
1178
|
-
externalAgentId: string | null;
|
|
1179
|
-
relationType: string | null;
|
|
1180
1184
|
} | undefined>;
|
|
1181
|
-
declare const
|
|
1182
|
-
scopes: GraphScopeConfig;
|
|
1183
|
-
pagination?: PaginationConfig;
|
|
1184
|
-
}) => Promise<{
|
|
1185
|
-
data: {
|
|
1186
|
-
createdAt: string;
|
|
1187
|
-
updatedAt: string;
|
|
1188
|
-
sourceAgentId: string;
|
|
1189
|
-
targetAgentId: string | null;
|
|
1190
|
-
externalAgentId: string | null;
|
|
1191
|
-
relationType: string | null;
|
|
1192
|
-
graphId: string;
|
|
1193
|
-
projectId: string;
|
|
1194
|
-
tenantId: string;
|
|
1195
|
-
id: string;
|
|
1196
|
-
}[];
|
|
1197
|
-
pagination: {
|
|
1198
|
-
page: number;
|
|
1199
|
-
limit: number;
|
|
1200
|
-
total: number;
|
|
1201
|
-
pages: number;
|
|
1202
|
-
};
|
|
1203
|
-
}>;
|
|
1204
|
-
declare const getAgentRelations: (db: DatabaseClient) => (params: {
|
|
1205
|
-
scopes: AgentScopeConfig;
|
|
1206
|
-
}) => Promise<{
|
|
1185
|
+
declare const getApiKeyByPublicId: (db: DatabaseClient) => (publicId: string) => Promise<{
|
|
1207
1186
|
tenantId: string;
|
|
1208
1187
|
projectId: string;
|
|
1209
1188
|
id: string;
|
|
1189
|
+
name: string | null;
|
|
1210
1190
|
graphId: string;
|
|
1191
|
+
publicId: string;
|
|
1192
|
+
keyHash: string;
|
|
1193
|
+
keyPrefix: string;
|
|
1194
|
+
lastUsedAt: string | null;
|
|
1195
|
+
expiresAt: string | null;
|
|
1211
1196
|
createdAt: string;
|
|
1212
1197
|
updatedAt: string;
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
}[]>;
|
|
1218
|
-
declare const getAgentRelationsByGraph: (db: DatabaseClient) => (params: {
|
|
1219
|
-
scopes: GraphScopeConfig;
|
|
1198
|
+
} | undefined>;
|
|
1199
|
+
declare const listApiKeys: (db: DatabaseClient) => (params: {
|
|
1200
|
+
scopes: ProjectScopeConfig;
|
|
1201
|
+
graphId?: string;
|
|
1220
1202
|
}) => Promise<{
|
|
1221
1203
|
tenantId: string;
|
|
1222
1204
|
projectId: string;
|
|
1223
1205
|
id: string;
|
|
1206
|
+
name: string | null;
|
|
1224
1207
|
graphId: string;
|
|
1208
|
+
publicId: string;
|
|
1209
|
+
keyHash: string;
|
|
1210
|
+
keyPrefix: string;
|
|
1211
|
+
lastUsedAt: string | null;
|
|
1212
|
+
expiresAt: string | null;
|
|
1225
1213
|
createdAt: string;
|
|
1226
1214
|
updatedAt: string;
|
|
1227
|
-
sourceAgentId: string;
|
|
1228
|
-
targetAgentId: string | null;
|
|
1229
|
-
externalAgentId: string | null;
|
|
1230
|
-
relationType: string | null;
|
|
1231
1215
|
}[]>;
|
|
1232
|
-
declare const
|
|
1233
|
-
scopes:
|
|
1234
|
-
sourceAgentId: string;
|
|
1235
|
-
pagination?: PaginationConfig;
|
|
1236
|
-
}) => Promise<{
|
|
1237
|
-
data: {
|
|
1238
|
-
createdAt: string;
|
|
1239
|
-
updatedAt: string;
|
|
1240
|
-
sourceAgentId: string;
|
|
1241
|
-
targetAgentId: string | null;
|
|
1242
|
-
externalAgentId: string | null;
|
|
1243
|
-
relationType: string | null;
|
|
1244
|
-
graphId: string;
|
|
1245
|
-
projectId: string;
|
|
1246
|
-
tenantId: string;
|
|
1247
|
-
id: string;
|
|
1248
|
-
}[];
|
|
1249
|
-
pagination: {
|
|
1250
|
-
page: number;
|
|
1251
|
-
limit: number;
|
|
1252
|
-
total: number;
|
|
1253
|
-
pages: number;
|
|
1254
|
-
};
|
|
1255
|
-
}>;
|
|
1256
|
-
declare const getAgentRelationsByTarget: (db: DatabaseClient) => (params: {
|
|
1257
|
-
scopes: GraphScopeConfig;
|
|
1258
|
-
targetAgentId: string;
|
|
1259
|
-
pagination?: PaginationConfig;
|
|
1260
|
-
}) => Promise<{
|
|
1261
|
-
data: {
|
|
1262
|
-
createdAt: string;
|
|
1263
|
-
updatedAt: string;
|
|
1264
|
-
sourceAgentId: string;
|
|
1265
|
-
targetAgentId: string | null;
|
|
1266
|
-
externalAgentId: string | null;
|
|
1267
|
-
relationType: string | null;
|
|
1268
|
-
graphId: string;
|
|
1269
|
-
projectId: string;
|
|
1270
|
-
tenantId: string;
|
|
1271
|
-
id: string;
|
|
1272
|
-
}[];
|
|
1273
|
-
pagination: {
|
|
1274
|
-
page: number;
|
|
1275
|
-
limit: number;
|
|
1276
|
-
total: number;
|
|
1277
|
-
pages: number;
|
|
1278
|
-
};
|
|
1279
|
-
}>;
|
|
1280
|
-
declare const getExternalAgentRelations: (db: DatabaseClient) => (params: {
|
|
1281
|
-
scopes: GraphScopeConfig;
|
|
1282
|
-
externalAgentId: string;
|
|
1216
|
+
declare const listApiKeysPaginated: (db: DatabaseClient) => (params: {
|
|
1217
|
+
scopes: ProjectScopeConfig;
|
|
1283
1218
|
pagination?: PaginationConfig;
|
|
1219
|
+
graphId?: string;
|
|
1284
1220
|
}) => Promise<{
|
|
1285
|
-
data:
|
|
1286
|
-
createdAt: string;
|
|
1287
|
-
updatedAt: string;
|
|
1288
|
-
sourceAgentId: string;
|
|
1289
|
-
targetAgentId: string | null;
|
|
1290
|
-
externalAgentId: string | null;
|
|
1291
|
-
relationType: string | null;
|
|
1292
|
-
graphId: string;
|
|
1293
|
-
projectId: string;
|
|
1294
|
-
tenantId: string;
|
|
1295
|
-
id: string;
|
|
1296
|
-
}[];
|
|
1221
|
+
data: ApiKeySelect[];
|
|
1297
1222
|
pagination: {
|
|
1298
1223
|
page: number;
|
|
1299
1224
|
limit: number;
|
|
@@ -1301,157 +1226,268 @@ declare const getExternalAgentRelations: (db: DatabaseClient) => (params: {
|
|
|
1301
1226
|
pages: number;
|
|
1302
1227
|
};
|
|
1303
1228
|
}>;
|
|
1304
|
-
declare const
|
|
1305
|
-
scopes: GraphScopeConfig;
|
|
1306
|
-
agentId: string;
|
|
1307
|
-
}) => Promise<{
|
|
1308
|
-
internalRelations: {
|
|
1309
|
-
id: string;
|
|
1310
|
-
name: string;
|
|
1311
|
-
description: string;
|
|
1312
|
-
relationType: string | null;
|
|
1313
|
-
}[];
|
|
1314
|
-
externalRelations: {
|
|
1315
|
-
id: string;
|
|
1316
|
-
relationType: string | null;
|
|
1317
|
-
externalAgent: {
|
|
1318
|
-
id: string;
|
|
1319
|
-
name: string;
|
|
1320
|
-
description: string;
|
|
1321
|
-
baseUrl: string;
|
|
1322
|
-
};
|
|
1323
|
-
}[];
|
|
1324
|
-
}>;
|
|
1325
|
-
declare const createAgentRelation: (db: DatabaseClient) => (params: AgentRelationInsert) => Promise<{
|
|
1229
|
+
declare const createApiKey: (db: DatabaseClient) => (params: ApiKeyInsert) => Promise<{
|
|
1326
1230
|
tenantId: string;
|
|
1327
1231
|
projectId: string;
|
|
1328
1232
|
id: string;
|
|
1233
|
+
name: string | null;
|
|
1329
1234
|
graphId: string;
|
|
1235
|
+
publicId: string;
|
|
1236
|
+
keyHash: string;
|
|
1237
|
+
keyPrefix: string;
|
|
1238
|
+
lastUsedAt: string | null;
|
|
1239
|
+
expiresAt: string | null;
|
|
1330
1240
|
createdAt: string;
|
|
1331
1241
|
updatedAt: string;
|
|
1332
|
-
sourceAgentId: string;
|
|
1333
|
-
targetAgentId: string | null;
|
|
1334
|
-
externalAgentId: string | null;
|
|
1335
|
-
relationType: string | null;
|
|
1336
1242
|
}>;
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
scopes: GraphScopeConfig;
|
|
1342
|
-
sourceAgentId: string;
|
|
1343
|
-
targetAgentId?: string;
|
|
1344
|
-
externalAgentId?: string;
|
|
1345
|
-
relationType: string;
|
|
1243
|
+
declare const updateApiKey: (db: DatabaseClient) => (params: {
|
|
1244
|
+
scopes: ProjectScopeConfig;
|
|
1245
|
+
id: string;
|
|
1246
|
+
data: ApiKeyUpdate;
|
|
1346
1247
|
}) => Promise<{
|
|
1347
1248
|
tenantId: string;
|
|
1348
1249
|
projectId: string;
|
|
1349
1250
|
id: string;
|
|
1251
|
+
name: string | null;
|
|
1350
1252
|
graphId: string;
|
|
1253
|
+
publicId: string;
|
|
1254
|
+
keyHash: string;
|
|
1255
|
+
keyPrefix: string;
|
|
1256
|
+
lastUsedAt: string | null;
|
|
1257
|
+
expiresAt: string | null;
|
|
1351
1258
|
createdAt: string;
|
|
1352
1259
|
updatedAt: string;
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
}
|
|
1260
|
+
}>;
|
|
1261
|
+
declare const deleteApiKey: (db: DatabaseClient) => (params: {
|
|
1262
|
+
scopes: ProjectScopeConfig;
|
|
1263
|
+
id: string;
|
|
1264
|
+
}) => Promise<boolean>;
|
|
1265
|
+
declare const hasApiKey: (db: DatabaseClient) => (params: {
|
|
1266
|
+
scopes: ProjectScopeConfig;
|
|
1267
|
+
id: string;
|
|
1268
|
+
}) => Promise<boolean>;
|
|
1269
|
+
declare const updateApiKeyLastUsed: (db: DatabaseClient) => (id: string) => Promise<void>;
|
|
1270
|
+
declare const countApiKeys: (db: DatabaseClient) => (params: {
|
|
1271
|
+
scopes: ProjectScopeConfig;
|
|
1272
|
+
graphId?: string;
|
|
1273
|
+
}) => Promise<number>;
|
|
1358
1274
|
/**
|
|
1359
|
-
*
|
|
1275
|
+
* Create a new API key
|
|
1276
|
+
* Returns both the API key record and the full key (which should be shown to the user only once)
|
|
1360
1277
|
*/
|
|
1361
|
-
declare const
|
|
1278
|
+
declare const generateAndCreateApiKey: (params: CreateApiKeyParams, db: DatabaseClient) => Promise<ApiKeyCreateResult>;
|
|
1279
|
+
/**
|
|
1280
|
+
* Validate an API key and return the associated record if valid
|
|
1281
|
+
*/
|
|
1282
|
+
declare const validateAndGetApiKey: (key: string, db: DatabaseClient) => Promise<ApiKeySelect | null>;
|
|
1283
|
+
|
|
1284
|
+
declare const getArtifactComponentById: (db: DatabaseClient) => (params: {
|
|
1285
|
+
scopes: ProjectScopeConfig;
|
|
1286
|
+
id: string;
|
|
1287
|
+
}) => Promise<{
|
|
1362
1288
|
tenantId: string;
|
|
1363
1289
|
projectId: string;
|
|
1364
1290
|
id: string;
|
|
1365
|
-
|
|
1291
|
+
name: string;
|
|
1292
|
+
description: string;
|
|
1366
1293
|
createdAt: string;
|
|
1367
1294
|
updatedAt: string;
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1295
|
+
props: Record<string, unknown> | null;
|
|
1296
|
+
} | undefined>;
|
|
1297
|
+
declare const listArtifactComponents: (db: DatabaseClient) => (params: {
|
|
1298
|
+
scopes: ProjectScopeConfig;
|
|
1299
|
+
}) => Promise<{
|
|
1300
|
+
createdAt: string;
|
|
1301
|
+
updatedAt: string;
|
|
1302
|
+
props: Record<string, unknown> | null;
|
|
1303
|
+
name: string;
|
|
1304
|
+
description: string;
|
|
1305
|
+
projectId: string;
|
|
1306
|
+
tenantId: string;
|
|
1307
|
+
id: string;
|
|
1308
|
+
}[]>;
|
|
1309
|
+
declare const listArtifactComponentsPaginated: (db: DatabaseClient) => (params: {
|
|
1310
|
+
scopes: ProjectScopeConfig;
|
|
1311
|
+
pagination?: PaginationConfig;
|
|
1312
|
+
}) => Promise<{
|
|
1313
|
+
data: ArtifactComponentSelect[];
|
|
1314
|
+
pagination: {
|
|
1315
|
+
page: number;
|
|
1316
|
+
limit: number;
|
|
1317
|
+
total: number;
|
|
1318
|
+
pages: number;
|
|
1319
|
+
};
|
|
1372
1320
|
}>;
|
|
1373
|
-
declare const
|
|
1321
|
+
declare const createArtifactComponent: (db: DatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
|
|
1374
1322
|
tenantId: string;
|
|
1375
1323
|
projectId: string;
|
|
1376
1324
|
id: string;
|
|
1377
|
-
|
|
1325
|
+
name: string;
|
|
1326
|
+
description: string;
|
|
1378
1327
|
createdAt: string;
|
|
1379
1328
|
updatedAt: string;
|
|
1380
|
-
|
|
1381
|
-
targetAgentId: string | null;
|
|
1382
|
-
externalAgentId: string | null;
|
|
1383
|
-
relationType: string | null;
|
|
1329
|
+
props: Record<string, unknown> | null;
|
|
1384
1330
|
}>;
|
|
1385
|
-
declare const
|
|
1386
|
-
scopes:
|
|
1387
|
-
|
|
1388
|
-
data:
|
|
1331
|
+
declare const updateArtifactComponent: (db: DatabaseClient) => (params: {
|
|
1332
|
+
scopes: ProjectScopeConfig;
|
|
1333
|
+
id: string;
|
|
1334
|
+
data: ArtifactComponentUpdate;
|
|
1389
1335
|
}) => Promise<{
|
|
1390
1336
|
tenantId: string;
|
|
1391
1337
|
projectId: string;
|
|
1392
1338
|
id: string;
|
|
1393
|
-
|
|
1339
|
+
name: string;
|
|
1340
|
+
description: string;
|
|
1394
1341
|
createdAt: string;
|
|
1395
1342
|
updatedAt: string;
|
|
1396
|
-
|
|
1397
|
-
targetAgentId: string | null;
|
|
1398
|
-
externalAgentId: string | null;
|
|
1399
|
-
relationType: string | null;
|
|
1343
|
+
props: Record<string, unknown> | null;
|
|
1400
1344
|
}>;
|
|
1401
|
-
declare const
|
|
1402
|
-
scopes:
|
|
1403
|
-
|
|
1404
|
-
}) => Promise<boolean>;
|
|
1405
|
-
declare const deleteAgentRelationsByGraph: (db: DatabaseClient) => (params: {
|
|
1406
|
-
scopes: GraphScopeConfig;
|
|
1345
|
+
declare const deleteArtifactComponent: (db: DatabaseClient) => (params: {
|
|
1346
|
+
scopes: ProjectScopeConfig;
|
|
1347
|
+
id: string;
|
|
1407
1348
|
}) => Promise<boolean>;
|
|
1408
|
-
declare const
|
|
1409
|
-
scopes:
|
|
1410
|
-
relationId?: string;
|
|
1411
|
-
data: {
|
|
1412
|
-
agentId: string;
|
|
1413
|
-
toolId: string;
|
|
1414
|
-
selectedTools?: string[] | null;
|
|
1415
|
-
headers?: Record<string, string> | null;
|
|
1416
|
-
};
|
|
1349
|
+
declare const getArtifactComponentsForAgent: (db: DatabaseClient) => (params: {
|
|
1350
|
+
scopes: AgentScopeConfig;
|
|
1417
1351
|
}) => Promise<{
|
|
1352
|
+
id: string;
|
|
1418
1353
|
tenantId: string;
|
|
1419
1354
|
projectId: string;
|
|
1420
|
-
|
|
1421
|
-
|
|
1355
|
+
name: string;
|
|
1356
|
+
description: string;
|
|
1357
|
+
props: Record<string, unknown> | null;
|
|
1422
1358
|
createdAt: string;
|
|
1423
1359
|
updatedAt: string;
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
}>;
|
|
1429
|
-
declare const updateAgentToolRelation: (db: DatabaseClient) => (params: {
|
|
1430
|
-
scopes: GraphScopeConfig;
|
|
1431
|
-
relationId: string;
|
|
1432
|
-
data: AgentToolRelationUpdate;
|
|
1360
|
+
}[]>;
|
|
1361
|
+
declare const associateArtifactComponentWithAgent: (db: DatabaseClient) => (params: {
|
|
1362
|
+
scopes: AgentScopeConfig;
|
|
1363
|
+
artifactComponentId: string;
|
|
1433
1364
|
}) => Promise<{
|
|
1434
1365
|
tenantId: string;
|
|
1435
1366
|
projectId: string;
|
|
1436
1367
|
id: string;
|
|
1437
1368
|
graphId: string;
|
|
1438
1369
|
createdAt: string;
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
toolId: string;
|
|
1442
|
-
selectedTools: string[] | null;
|
|
1443
|
-
agentId: string;
|
|
1370
|
+
subAgentId: string;
|
|
1371
|
+
artifactComponentId: string;
|
|
1444
1372
|
}>;
|
|
1445
|
-
declare const
|
|
1446
|
-
scopes:
|
|
1447
|
-
|
|
1373
|
+
declare const removeArtifactComponentFromAgent: (db: DatabaseClient) => (params: {
|
|
1374
|
+
scopes: AgentScopeConfig;
|
|
1375
|
+
artifactComponentId: string;
|
|
1448
1376
|
}) => Promise<boolean>;
|
|
1449
|
-
declare const
|
|
1377
|
+
declare const deleteAgentArtifactComponentRelationByAgent: (db: DatabaseClient) => (params: {
|
|
1450
1378
|
scopes: AgentScopeConfig;
|
|
1451
1379
|
}) => Promise<boolean>;
|
|
1452
|
-
declare const
|
|
1380
|
+
declare const getAgentsUsingArtifactComponent: (db: DatabaseClient) => (params: {
|
|
1381
|
+
scopes: ProjectScopeConfig;
|
|
1382
|
+
artifactComponentId: string;
|
|
1383
|
+
}) => Promise<{
|
|
1384
|
+
graphId: string;
|
|
1385
|
+
subAgentId: string;
|
|
1386
|
+
createdAt: string;
|
|
1387
|
+
}[]>;
|
|
1388
|
+
declare const isArtifactComponentAssociatedWithAgent: (db: DatabaseClient) => (params: {
|
|
1453
1389
|
scopes: AgentScopeConfig;
|
|
1454
|
-
|
|
1390
|
+
artifactComponentId: string;
|
|
1391
|
+
}) => Promise<boolean>;
|
|
1392
|
+
declare const graphHasArtifactComponents: (db: DatabaseClient) => (params: {
|
|
1393
|
+
scopes: GraphScopeConfig;
|
|
1394
|
+
}) => Promise<boolean>;
|
|
1395
|
+
declare const countArtifactComponents: (db: DatabaseClient) => (params: {
|
|
1396
|
+
scopes: ProjectScopeConfig;
|
|
1397
|
+
}) => Promise<number>;
|
|
1398
|
+
declare const countArtifactComponentsForAgent: (db: DatabaseClient) => (params: {
|
|
1399
|
+
scopes: AgentScopeConfig;
|
|
1400
|
+
}) => Promise<number>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Upsert agent-artifact component relation (create if it doesn't exist, no-op if it does)
|
|
1403
|
+
*/
|
|
1404
|
+
declare const upsertAgentArtifactComponentRelation: (db: DatabaseClient) => (params: {
|
|
1405
|
+
scopes: AgentScopeConfig;
|
|
1406
|
+
artifactComponentId: string;
|
|
1407
|
+
}) => Promise<{
|
|
1408
|
+
tenantId: string;
|
|
1409
|
+
projectId: string;
|
|
1410
|
+
id: string;
|
|
1411
|
+
graphId: string;
|
|
1412
|
+
createdAt: string;
|
|
1413
|
+
subAgentId: string;
|
|
1414
|
+
artifactComponentId: string;
|
|
1415
|
+
} | null>;
|
|
1416
|
+
/**
|
|
1417
|
+
* Upsert an artifact component (create if it doesn't exist, update if it does)
|
|
1418
|
+
*/
|
|
1419
|
+
declare const upsertArtifactComponent: (db: DatabaseClient) => (params: {
|
|
1420
|
+
data: ArtifactComponentInsert;
|
|
1421
|
+
}) => Promise<ArtifactComponentSelect>;
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
* Get cached context data for a conversation with optional request hash validation
|
|
1425
|
+
*/
|
|
1426
|
+
declare const getCacheEntry: (db: DatabaseClient) => (params: {
|
|
1427
|
+
conversationId: string;
|
|
1428
|
+
contextConfigId: string;
|
|
1429
|
+
contextVariableKey: string;
|
|
1430
|
+
requestHash?: string;
|
|
1431
|
+
}) => Promise<ContextCacheSelect | null>;
|
|
1432
|
+
/**
|
|
1433
|
+
* Set cached context data for a conversation
|
|
1434
|
+
*/
|
|
1435
|
+
declare const setCacheEntry: (db: DatabaseClient) => (entry: ContextCacheInsert) => Promise<ContextCacheSelect | null>;
|
|
1436
|
+
/**
|
|
1437
|
+
* Clear cache entries for a specific conversation
|
|
1438
|
+
*/
|
|
1439
|
+
declare const clearConversationCache: (db: DatabaseClient) => (params: {
|
|
1440
|
+
scopes: ProjectScopeConfig;
|
|
1441
|
+
conversationId: string;
|
|
1442
|
+
}) => Promise<number>;
|
|
1443
|
+
/**
|
|
1444
|
+
* Clear all cache entries for a specific context configuration
|
|
1445
|
+
*/
|
|
1446
|
+
declare const clearContextConfigCache: (db: DatabaseClient) => (params: {
|
|
1447
|
+
scopes: ProjectScopeConfig;
|
|
1448
|
+
contextConfigId: string;
|
|
1449
|
+
}) => Promise<number>;
|
|
1450
|
+
/**
|
|
1451
|
+
* Clean up all cache entries for a tenant
|
|
1452
|
+
*/
|
|
1453
|
+
declare const cleanupTenantCache: (db: DatabaseClient) => (params: {
|
|
1454
|
+
scopes: ProjectScopeConfig;
|
|
1455
|
+
}) => Promise<number>;
|
|
1456
|
+
/**
|
|
1457
|
+
* Invalidate the headers cache for a conversation
|
|
1458
|
+
*/
|
|
1459
|
+
declare const invalidateHeadersCache: (db: DatabaseClient) => (params: {
|
|
1460
|
+
scopes: ProjectScopeConfig;
|
|
1461
|
+
conversationId: string;
|
|
1462
|
+
contextConfigId: string;
|
|
1463
|
+
}) => Promise<number>;
|
|
1464
|
+
/**
|
|
1465
|
+
* Invalidate specific cache entries for invocation-trigger definitions
|
|
1466
|
+
*/
|
|
1467
|
+
declare const invalidateInvocationDefinitionsCache: (db: DatabaseClient) => (params: {
|
|
1468
|
+
scopes: ProjectScopeConfig;
|
|
1469
|
+
conversationId: string;
|
|
1470
|
+
contextConfigId: string;
|
|
1471
|
+
invocationDefinitionIds: string[];
|
|
1472
|
+
}) => Promise<number>;
|
|
1473
|
+
/**
|
|
1474
|
+
* Get all cache entries for a conversation
|
|
1475
|
+
*/
|
|
1476
|
+
declare const getConversationCacheEntries: (db: DatabaseClient) => (params: {
|
|
1477
|
+
scopes: ProjectScopeConfig;
|
|
1478
|
+
conversationId: string;
|
|
1479
|
+
}) => Promise<ContextCacheSelect[]>;
|
|
1480
|
+
/**
|
|
1481
|
+
* Get all cache entries for a context configuration
|
|
1482
|
+
*/
|
|
1483
|
+
declare const getContextConfigCacheEntries: (db: DatabaseClient) => (params: {
|
|
1484
|
+
scopes: ProjectScopeConfig;
|
|
1485
|
+
contextConfigId: string;
|
|
1486
|
+
}) => Promise<ContextCacheSelect[]>;
|
|
1487
|
+
|
|
1488
|
+
declare const getContextConfigById: (db: DatabaseClient) => (params: {
|
|
1489
|
+
scopes: GraphScopeConfig;
|
|
1490
|
+
id: string;
|
|
1455
1491
|
}) => Promise<{
|
|
1456
1492
|
tenantId: string;
|
|
1457
1493
|
projectId: string;
|
|
@@ -1459,51 +1495,26 @@ declare const getAgentToolRelationById: (db: DatabaseClient) => (params: {
|
|
|
1459
1495
|
graphId: string;
|
|
1460
1496
|
createdAt: string;
|
|
1461
1497
|
updatedAt: string;
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
selectedTools: string[] | null;
|
|
1465
|
-
agentId: string;
|
|
1498
|
+
headersSchema: unknown;
|
|
1499
|
+
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
1466
1500
|
} | undefined>;
|
|
1467
|
-
declare const
|
|
1468
|
-
scopes:
|
|
1469
|
-
pagination?: PaginationConfig;
|
|
1501
|
+
declare const listContextConfigs: (db: DatabaseClient) => (params: {
|
|
1502
|
+
scopes: GraphScopeConfig;
|
|
1470
1503
|
}) => Promise<{
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
id: string;
|
|
1482
|
-
}[];
|
|
1483
|
-
pagination: {
|
|
1484
|
-
page: number;
|
|
1485
|
-
limit: number;
|
|
1486
|
-
total: number;
|
|
1487
|
-
pages: number;
|
|
1488
|
-
};
|
|
1489
|
-
}>;
|
|
1490
|
-
declare const getAgentToolRelationByTool: (db: DatabaseClient) => (params: {
|
|
1504
|
+
tenantId: string;
|
|
1505
|
+
projectId: string;
|
|
1506
|
+
id: string;
|
|
1507
|
+
graphId: string;
|
|
1508
|
+
createdAt: string;
|
|
1509
|
+
updatedAt: string;
|
|
1510
|
+
headersSchema: unknown;
|
|
1511
|
+
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
1512
|
+
}[]>;
|
|
1513
|
+
declare const listContextConfigsPaginated: (db: DatabaseClient) => (params: {
|
|
1491
1514
|
scopes: GraphScopeConfig;
|
|
1492
|
-
toolId: string;
|
|
1493
1515
|
pagination?: PaginationConfig;
|
|
1494
1516
|
}) => Promise<{
|
|
1495
|
-
data:
|
|
1496
|
-
createdAt: string;
|
|
1497
|
-
updatedAt: string;
|
|
1498
|
-
toolId: string;
|
|
1499
|
-
selectedTools: string[] | null;
|
|
1500
|
-
headers: Record<string, string> | null;
|
|
1501
|
-
agentId: string;
|
|
1502
|
-
graphId: string;
|
|
1503
|
-
projectId: string;
|
|
1504
|
-
tenantId: string;
|
|
1505
|
-
id: string;
|
|
1506
|
-
}[];
|
|
1517
|
+
data: any[];
|
|
1507
1518
|
pagination: {
|
|
1508
1519
|
page: number;
|
|
1509
1520
|
limit: number;
|
|
@@ -1511,393 +1522,223 @@ declare const getAgentToolRelationByTool: (db: DatabaseClient) => (params: {
|
|
|
1511
1522
|
pages: number;
|
|
1512
1523
|
};
|
|
1513
1524
|
}>;
|
|
1514
|
-
declare const
|
|
1525
|
+
declare const createContextConfig: (db: DatabaseClient) => (params: ContextConfigInsert) => Promise<{
|
|
1526
|
+
tenantId: string;
|
|
1527
|
+
projectId: string;
|
|
1528
|
+
id: string;
|
|
1529
|
+
graphId: string;
|
|
1530
|
+
createdAt: string;
|
|
1531
|
+
updatedAt: string;
|
|
1532
|
+
headersSchema: unknown;
|
|
1533
|
+
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
1534
|
+
}>;
|
|
1535
|
+
declare const updateContextConfig: (db: DatabaseClient) => (params: {
|
|
1515
1536
|
scopes: GraphScopeConfig;
|
|
1516
|
-
|
|
1537
|
+
id: string;
|
|
1538
|
+
data: Partial<ContextConfigUpdate>;
|
|
1517
1539
|
}) => Promise<{
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
projectId: string;
|
|
1527
|
-
tenantId: string;
|
|
1528
|
-
id: string;
|
|
1529
|
-
}[];
|
|
1530
|
-
pagination: {
|
|
1531
|
-
page: number;
|
|
1532
|
-
limit: number;
|
|
1533
|
-
total: number;
|
|
1534
|
-
pages: number;
|
|
1535
|
-
};
|
|
1540
|
+
tenantId: string;
|
|
1541
|
+
projectId: string;
|
|
1542
|
+
id: string;
|
|
1543
|
+
graphId: string;
|
|
1544
|
+
createdAt: string;
|
|
1545
|
+
updatedAt: string;
|
|
1546
|
+
headersSchema: unknown;
|
|
1547
|
+
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
1536
1548
|
}>;
|
|
1537
|
-
declare const
|
|
1538
|
-
scopes:
|
|
1539
|
-
|
|
1549
|
+
declare const deleteContextConfig: (db: DatabaseClient) => (params: {
|
|
1550
|
+
scopes: GraphScopeConfig;
|
|
1551
|
+
id: string;
|
|
1552
|
+
}) => Promise<boolean>;
|
|
1553
|
+
declare const hasContextConfig: (db: DatabaseClient) => (params: {
|
|
1554
|
+
scopes: GraphScopeConfig;
|
|
1555
|
+
id: string;
|
|
1556
|
+
}) => Promise<boolean>;
|
|
1557
|
+
declare const countContextConfigs: (db: DatabaseClient) => (params: {
|
|
1558
|
+
scopes: GraphScopeConfig;
|
|
1559
|
+
}) => Promise<number>;
|
|
1560
|
+
/**
|
|
1561
|
+
* Upsert a context config (create if it doesn't exist, update if it does)
|
|
1562
|
+
*/
|
|
1563
|
+
declare const upsertContextConfig: (db: DatabaseClient) => (params: {
|
|
1564
|
+
data: ContextConfigInsert;
|
|
1540
1565
|
}) => Promise<{
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
updatedAt: string;
|
|
1550
|
-
tool: {
|
|
1551
|
-
id: string;
|
|
1552
|
-
name: string;
|
|
1553
|
-
description: string | null;
|
|
1554
|
-
config: {
|
|
1555
|
-
type: "mcp";
|
|
1556
|
-
mcp: ToolMcpConfig;
|
|
1557
|
-
} | {
|
|
1558
|
-
type: "function";
|
|
1559
|
-
function?: {
|
|
1560
|
-
inputSchema: Record<string, unknown>;
|
|
1561
|
-
executeCode: string;
|
|
1562
|
-
dependencies: Record<string, unknown>;
|
|
1563
|
-
};
|
|
1564
|
-
};
|
|
1565
|
-
functionId: string | null;
|
|
1566
|
-
createdAt: string;
|
|
1567
|
-
updatedAt: string;
|
|
1568
|
-
capabilities: ToolServerCapabilities | null;
|
|
1569
|
-
lastError: string | null;
|
|
1570
|
-
credentialReferenceId: string | null;
|
|
1571
|
-
tenantId: string;
|
|
1572
|
-
projectId: string;
|
|
1573
|
-
headers: Record<string, string> | null;
|
|
1574
|
-
imageUrl: string | null;
|
|
1575
|
-
};
|
|
1576
|
-
}[];
|
|
1577
|
-
pagination: {
|
|
1578
|
-
page: number;
|
|
1579
|
-
limit: number;
|
|
1580
|
-
total: number;
|
|
1581
|
-
pages: number;
|
|
1582
|
-
};
|
|
1566
|
+
tenantId: string;
|
|
1567
|
+
projectId: string;
|
|
1568
|
+
id: string;
|
|
1569
|
+
graphId: string;
|
|
1570
|
+
createdAt: string;
|
|
1571
|
+
updatedAt: string;
|
|
1572
|
+
headersSchema: unknown;
|
|
1573
|
+
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
1583
1574
|
}>;
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1575
|
+
|
|
1576
|
+
declare const listConversations: (db: DatabaseClient) => (params: {
|
|
1577
|
+
scopes: ProjectScopeConfig;
|
|
1578
|
+
userId?: string;
|
|
1587
1579
|
pagination?: PaginationConfig;
|
|
1588
1580
|
}) => Promise<{
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
tenantId: string;
|
|
1592
|
-
agentId: string;
|
|
1593
|
-
toolId: string;
|
|
1594
|
-
selectedTools: string[] | null;
|
|
1595
|
-
headers: Record<string, string> | null;
|
|
1596
|
-
createdAt: string;
|
|
1597
|
-
updatedAt: string;
|
|
1598
|
-
agent: {
|
|
1599
|
-
id: string;
|
|
1600
|
-
name: string;
|
|
1601
|
-
description: string;
|
|
1602
|
-
prompt: string;
|
|
1603
|
-
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
1604
|
-
models: {
|
|
1605
|
-
base?: {
|
|
1606
|
-
model?: string | undefined;
|
|
1607
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1608
|
-
} | undefined;
|
|
1609
|
-
structuredOutput?: {
|
|
1610
|
-
model?: string | undefined;
|
|
1611
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1612
|
-
} | undefined;
|
|
1613
|
-
summarizer?: {
|
|
1614
|
-
model?: string | undefined;
|
|
1615
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1616
|
-
} | undefined;
|
|
1617
|
-
} | null;
|
|
1618
|
-
stopWhen: {
|
|
1619
|
-
stepCountIs?: number | undefined;
|
|
1620
|
-
} | null;
|
|
1621
|
-
createdAt: string;
|
|
1622
|
-
updatedAt: string;
|
|
1623
|
-
};
|
|
1624
|
-
}[];
|
|
1625
|
-
pagination: {
|
|
1626
|
-
page: number;
|
|
1627
|
-
limit: number;
|
|
1628
|
-
total: number;
|
|
1629
|
-
pages: number;
|
|
1630
|
-
};
|
|
1581
|
+
conversations: ConversationSelect[];
|
|
1582
|
+
total: number;
|
|
1631
1583
|
}>;
|
|
1632
|
-
declare const
|
|
1633
|
-
scopes: AgentScopeConfig;
|
|
1634
|
-
}) => Promise<boolean>;
|
|
1635
|
-
declare const validateExternalAgent: (db: DatabaseClient) => (params: {
|
|
1636
|
-
scopes: AgentScopeConfig;
|
|
1637
|
-
}) => Promise<boolean>;
|
|
1638
|
-
|
|
1639
|
-
declare const getAgentById: (db: DatabaseClient) => (params: {
|
|
1640
|
-
scopes: GraphScopeConfig;
|
|
1641
|
-
agentId: string;
|
|
1642
|
-
}) => Promise<{
|
|
1584
|
+
declare const createConversation: (db: DatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
1643
1585
|
tenantId: string;
|
|
1644
1586
|
projectId: string;
|
|
1645
1587
|
id: string;
|
|
1646
|
-
name: string;
|
|
1647
|
-
description: string;
|
|
1648
|
-
prompt: string;
|
|
1649
|
-
graphId: string;
|
|
1650
1588
|
createdAt: string;
|
|
1651
1589
|
updatedAt: string;
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
model?: string | undefined;
|
|
1663
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1664
|
-
} | undefined;
|
|
1665
|
-
} | null;
|
|
1666
|
-
stopWhen: {
|
|
1667
|
-
stepCountIs?: number | undefined;
|
|
1668
|
-
} | null;
|
|
1669
|
-
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
1670
|
-
} | undefined>;
|
|
1671
|
-
declare const listAgents: (db: DatabaseClient) => (params: {
|
|
1672
|
-
scopes: GraphScopeConfig;
|
|
1590
|
+
title: string | null;
|
|
1591
|
+
metadata: ConversationMetadata | null;
|
|
1592
|
+
userId: string | null;
|
|
1593
|
+
activeSubAgentId: string;
|
|
1594
|
+
lastContextResolution: string | null;
|
|
1595
|
+
}>;
|
|
1596
|
+
declare const updateConversation: (db: DatabaseClient) => (params: {
|
|
1597
|
+
scopes: ProjectScopeConfig;
|
|
1598
|
+
conversationId: string;
|
|
1599
|
+
data: ConversationUpdate;
|
|
1673
1600
|
}) => Promise<{
|
|
1674
1601
|
tenantId: string;
|
|
1675
1602
|
projectId: string;
|
|
1676
1603
|
id: string;
|
|
1677
|
-
name: string;
|
|
1678
|
-
description: string;
|
|
1679
|
-
prompt: string;
|
|
1680
|
-
graphId: string;
|
|
1681
1604
|
createdAt: string;
|
|
1682
1605
|
updatedAt: string;
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
structuredOutput?: {
|
|
1689
|
-
model?: string | undefined;
|
|
1690
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1691
|
-
} | undefined;
|
|
1692
|
-
summarizer?: {
|
|
1693
|
-
model?: string | undefined;
|
|
1694
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1695
|
-
} | undefined;
|
|
1696
|
-
} | null;
|
|
1697
|
-
stopWhen: {
|
|
1698
|
-
stepCountIs?: number | undefined;
|
|
1699
|
-
} | null;
|
|
1700
|
-
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
1701
|
-
}[]>;
|
|
1702
|
-
declare const listAgentsPaginated: (db: DatabaseClient) => (params: {
|
|
1703
|
-
scopes: GraphScopeConfig;
|
|
1704
|
-
pagination?: PaginationConfig;
|
|
1705
|
-
}) => Promise<{
|
|
1706
|
-
data: {
|
|
1707
|
-
createdAt: string;
|
|
1708
|
-
updatedAt: string;
|
|
1709
|
-
prompt: string;
|
|
1710
|
-
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
1711
|
-
models: {
|
|
1712
|
-
base?: {
|
|
1713
|
-
model?: string | undefined;
|
|
1714
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1715
|
-
} | undefined;
|
|
1716
|
-
structuredOutput?: {
|
|
1717
|
-
model?: string | undefined;
|
|
1718
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1719
|
-
} | undefined;
|
|
1720
|
-
summarizer?: {
|
|
1721
|
-
model?: string | undefined;
|
|
1722
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1723
|
-
} | undefined;
|
|
1724
|
-
} | null;
|
|
1725
|
-
stopWhen: {
|
|
1726
|
-
stepCountIs?: number | undefined;
|
|
1727
|
-
} | null;
|
|
1728
|
-
name: string;
|
|
1729
|
-
description: string;
|
|
1730
|
-
graphId: string;
|
|
1731
|
-
projectId: string;
|
|
1732
|
-
tenantId: string;
|
|
1733
|
-
id: string;
|
|
1734
|
-
}[];
|
|
1735
|
-
pagination: {
|
|
1736
|
-
page: number;
|
|
1737
|
-
limit: number;
|
|
1738
|
-
total: number;
|
|
1739
|
-
pages: number;
|
|
1740
|
-
};
|
|
1606
|
+
title: string | null;
|
|
1607
|
+
metadata: ConversationMetadata | null;
|
|
1608
|
+
userId: string | null;
|
|
1609
|
+
activeSubAgentId: string;
|
|
1610
|
+
lastContextResolution: string | null;
|
|
1741
1611
|
}>;
|
|
1742
|
-
declare const
|
|
1612
|
+
declare const deleteConversation: (db: DatabaseClient) => (params: {
|
|
1613
|
+
scopes: ProjectScopeConfig;
|
|
1614
|
+
conversationId: string;
|
|
1615
|
+
}) => Promise<boolean>;
|
|
1616
|
+
declare const updateConversationActiveAgent: (db: DatabaseClient) => (params: {
|
|
1617
|
+
scopes: ProjectScopeConfig;
|
|
1618
|
+
conversationId: string;
|
|
1619
|
+
activeSubAgentId: string;
|
|
1620
|
+
}) => Promise<{
|
|
1743
1621
|
tenantId: string;
|
|
1744
1622
|
projectId: string;
|
|
1745
1623
|
id: string;
|
|
1746
|
-
name: string;
|
|
1747
|
-
description: string;
|
|
1748
|
-
prompt: string;
|
|
1749
|
-
graphId: string;
|
|
1750
1624
|
createdAt: string;
|
|
1751
1625
|
updatedAt: string;
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
structuredOutput?: {
|
|
1758
|
-
model?: string | undefined;
|
|
1759
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1760
|
-
} | undefined;
|
|
1761
|
-
summarizer?: {
|
|
1762
|
-
model?: string | undefined;
|
|
1763
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1764
|
-
} | undefined;
|
|
1765
|
-
} | null;
|
|
1766
|
-
stopWhen: {
|
|
1767
|
-
stepCountIs?: number | undefined;
|
|
1768
|
-
} | null;
|
|
1769
|
-
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
1626
|
+
title: string | null;
|
|
1627
|
+
metadata: ConversationMetadata | null;
|
|
1628
|
+
userId: string | null;
|
|
1629
|
+
activeSubAgentId: string;
|
|
1630
|
+
lastContextResolution: string | null;
|
|
1770
1631
|
}>;
|
|
1771
|
-
declare const
|
|
1772
|
-
scopes:
|
|
1773
|
-
|
|
1774
|
-
data: AgentUpdate;
|
|
1632
|
+
declare const getConversation: (db: DatabaseClient) => (params: {
|
|
1633
|
+
scopes: ProjectScopeConfig;
|
|
1634
|
+
conversationId: string;
|
|
1775
1635
|
}) => Promise<{
|
|
1776
1636
|
tenantId: string;
|
|
1777
1637
|
projectId: string;
|
|
1778
1638
|
id: string;
|
|
1779
|
-
name: string;
|
|
1780
|
-
description: string;
|
|
1781
|
-
prompt: string;
|
|
1782
|
-
graphId: string;
|
|
1783
1639
|
createdAt: string;
|
|
1784
1640
|
updatedAt: string;
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
} | undefined;
|
|
1794
|
-
summarizer?: {
|
|
1795
|
-
model?: string | undefined;
|
|
1796
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1797
|
-
} | undefined;
|
|
1798
|
-
} | null;
|
|
1799
|
-
stopWhen: {
|
|
1800
|
-
stepCountIs?: number | undefined;
|
|
1801
|
-
} | null;
|
|
1802
|
-
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
1803
|
-
}>;
|
|
1804
|
-
/**
|
|
1805
|
-
* Upsert agent (create if it doesn't exist, update if it does)
|
|
1806
|
-
*/
|
|
1807
|
-
declare const upsertAgent: (db: DatabaseClient) => (params: {
|
|
1808
|
-
data: AgentInsert;
|
|
1809
|
-
}) => Promise<AgentSelect>;
|
|
1810
|
-
declare const deleteAgent: (db: DatabaseClient) => (params: {
|
|
1811
|
-
scopes: GraphScopeConfig;
|
|
1812
|
-
agentId: string;
|
|
1813
|
-
}) => Promise<boolean>;
|
|
1814
|
-
declare const getAgentsByIds: (db: DatabaseClient) => (params: {
|
|
1815
|
-
scopes: GraphScopeConfig;
|
|
1816
|
-
agentIds: string[];
|
|
1817
|
-
}) => Promise<{
|
|
1818
|
-
createdAt: string;
|
|
1819
|
-
updatedAt: string;
|
|
1820
|
-
prompt: string;
|
|
1821
|
-
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
1822
|
-
models: {
|
|
1823
|
-
base?: {
|
|
1824
|
-
model?: string | undefined;
|
|
1825
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1826
|
-
} | undefined;
|
|
1827
|
-
structuredOutput?: {
|
|
1828
|
-
model?: string | undefined;
|
|
1829
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1830
|
-
} | undefined;
|
|
1831
|
-
summarizer?: {
|
|
1832
|
-
model?: string | undefined;
|
|
1833
|
-
providerOptions?: Record<string, any> | undefined;
|
|
1834
|
-
} | undefined;
|
|
1835
|
-
} | null;
|
|
1836
|
-
stopWhen: {
|
|
1837
|
-
stepCountIs?: number | undefined;
|
|
1838
|
-
} | null;
|
|
1839
|
-
name: string;
|
|
1840
|
-
description: string;
|
|
1841
|
-
graphId: string;
|
|
1641
|
+
title: string | null;
|
|
1642
|
+
metadata: ConversationMetadata | null;
|
|
1643
|
+
userId: string | null;
|
|
1644
|
+
activeSubAgentId: string;
|
|
1645
|
+
lastContextResolution: string | null;
|
|
1646
|
+
} | undefined>;
|
|
1647
|
+
declare const createOrGetConversation: (db: DatabaseClient) => (input: ConversationInsert) => Promise<{
|
|
1648
|
+
activeSubAgentId: string;
|
|
1842
1649
|
projectId: string;
|
|
1843
1650
|
tenantId: string;
|
|
1844
1651
|
id: string;
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1652
|
+
createdAt?: string | undefined;
|
|
1653
|
+
updatedAt?: string | undefined;
|
|
1654
|
+
userId?: string | null | undefined;
|
|
1655
|
+
title?: string | null | undefined;
|
|
1656
|
+
lastContextResolution?: string | null | undefined;
|
|
1657
|
+
metadata?: ConversationMetadata | null | undefined;
|
|
1658
|
+
contextConfigId?: string | undefined;
|
|
1659
|
+
} | {
|
|
1851
1660
|
tenantId: string;
|
|
1852
1661
|
projectId: string;
|
|
1853
1662
|
id: string;
|
|
1854
|
-
name: string | null;
|
|
1855
|
-
graphId: string;
|
|
1856
|
-
publicId: string;
|
|
1857
|
-
keyHash: string;
|
|
1858
|
-
keyPrefix: string;
|
|
1859
|
-
lastUsedAt: string | null;
|
|
1860
|
-
expiresAt: string | null;
|
|
1861
1663
|
createdAt: string;
|
|
1862
1664
|
updatedAt: string;
|
|
1863
|
-
|
|
1864
|
-
|
|
1665
|
+
title: string | null;
|
|
1666
|
+
metadata: ConversationMetadata | null;
|
|
1667
|
+
userId: string | null;
|
|
1668
|
+
activeSubAgentId: string;
|
|
1669
|
+
lastContextResolution: string | null;
|
|
1670
|
+
}>;
|
|
1671
|
+
/**
|
|
1672
|
+
* Get conversation history with filtering and context management
|
|
1673
|
+
*/
|
|
1674
|
+
declare const getConversationHistory: (db: DatabaseClient) => (params: {
|
|
1675
|
+
scopes: ProjectScopeConfig;
|
|
1676
|
+
conversationId: string;
|
|
1677
|
+
options?: ConversationHistoryConfig;
|
|
1678
|
+
}) => Promise<any[]>;
|
|
1679
|
+
/**
|
|
1680
|
+
* Get active agent for a conversation
|
|
1681
|
+
*/
|
|
1682
|
+
declare const getActiveAgentForConversation: (db: DatabaseClient) => (params: {
|
|
1683
|
+
scopes: ProjectScopeConfig;
|
|
1684
|
+
conversationId: string;
|
|
1685
|
+
}) => Promise<{
|
|
1865
1686
|
tenantId: string;
|
|
1866
1687
|
projectId: string;
|
|
1867
1688
|
id: string;
|
|
1868
|
-
name: string | null;
|
|
1869
|
-
graphId: string;
|
|
1870
|
-
publicId: string;
|
|
1871
|
-
keyHash: string;
|
|
1872
|
-
keyPrefix: string;
|
|
1873
|
-
lastUsedAt: string | null;
|
|
1874
|
-
expiresAt: string | null;
|
|
1875
1689
|
createdAt: string;
|
|
1876
1690
|
updatedAt: string;
|
|
1691
|
+
title: string | null;
|
|
1692
|
+
metadata: ConversationMetadata | null;
|
|
1693
|
+
userId: string | null;
|
|
1694
|
+
activeSubAgentId: string;
|
|
1695
|
+
lastContextResolution: string | null;
|
|
1877
1696
|
} | undefined>;
|
|
1878
|
-
|
|
1697
|
+
/**
|
|
1698
|
+
* Set active agent for a conversation (upsert operation)
|
|
1699
|
+
*/
|
|
1700
|
+
declare const setActiveAgentForConversation: (db: DatabaseClient) => (params: {
|
|
1701
|
+
scopes: ProjectScopeConfig;
|
|
1702
|
+
conversationId: string;
|
|
1703
|
+
subAgentId: string;
|
|
1704
|
+
}) => Promise<void>;
|
|
1705
|
+
declare const setActiveAgentForThread: (db: DatabaseClient) => ({ scopes, threadId, subAgentId, }: {
|
|
1706
|
+
scopes: ProjectScopeConfig;
|
|
1707
|
+
threadId: string;
|
|
1708
|
+
subAgentId: string;
|
|
1709
|
+
}) => Promise<void>;
|
|
1710
|
+
|
|
1711
|
+
type CredentialReferenceWithTools = CredentialReferenceSelect & {
|
|
1712
|
+
tools: ToolSelect[];
|
|
1713
|
+
};
|
|
1714
|
+
/**
|
|
1715
|
+
* Get a credential reference by ID
|
|
1716
|
+
*/
|
|
1717
|
+
declare const getCredentialReference: (db: DatabaseClient) => (params: {
|
|
1879
1718
|
scopes: ProjectScopeConfig;
|
|
1880
|
-
graphId?: string;
|
|
1881
|
-
}) => Promise<{
|
|
1882
|
-
tenantId: string;
|
|
1883
|
-
projectId: string;
|
|
1884
1719
|
id: string;
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1720
|
+
}) => Promise<CredentialReferenceSelect | undefined>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Get a credential reference by ID with its related tools
|
|
1723
|
+
*/
|
|
1724
|
+
declare const getCredentialReferenceWithTools: (db: DatabaseClient) => (params: {
|
|
1725
|
+
scopes: ProjectScopeConfig;
|
|
1726
|
+
id: string;
|
|
1727
|
+
}) => Promise<CredentialReferenceWithTools | undefined>;
|
|
1728
|
+
/**
|
|
1729
|
+
* List all credential references for a tenant/project
|
|
1730
|
+
*/
|
|
1731
|
+
declare const listCredentialReferences: (db: DatabaseClient) => (params: {
|
|
1732
|
+
scopes: ProjectScopeConfig;
|
|
1733
|
+
}) => Promise<CredentialReferenceSelect[]>;
|
|
1734
|
+
/**
|
|
1735
|
+
* List credential references with pagination
|
|
1736
|
+
*/
|
|
1737
|
+
declare const listCredentialReferencesPaginated: (db: DatabaseClient) => (params: {
|
|
1896
1738
|
scopes: ProjectScopeConfig;
|
|
1897
1739
|
pagination?: PaginationConfig;
|
|
1898
|
-
graphId?: string;
|
|
1899
1740
|
}) => Promise<{
|
|
1900
|
-
data:
|
|
1741
|
+
data: CredentialReferenceSelect[];
|
|
1901
1742
|
pagination: {
|
|
1902
1743
|
page: number;
|
|
1903
1744
|
limit: number;
|
|
@@ -1905,91 +1746,73 @@ declare const listApiKeysPaginated: (db: DatabaseClient) => (params: {
|
|
|
1905
1746
|
pages: number;
|
|
1906
1747
|
};
|
|
1907
1748
|
}>;
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
keyPrefix: string;
|
|
1917
|
-
lastUsedAt: string | null;
|
|
1918
|
-
expiresAt: string | null;
|
|
1919
|
-
createdAt: string;
|
|
1920
|
-
updatedAt: string;
|
|
1921
|
-
}>;
|
|
1922
|
-
declare const updateApiKey: (db: DatabaseClient) => (params: {
|
|
1749
|
+
/**
|
|
1750
|
+
* Create a new credential reference
|
|
1751
|
+
*/
|
|
1752
|
+
declare const createCredentialReference: (db: DatabaseClient) => (params: CredentialReferenceInsert) => Promise<CredentialReferenceSelect>;
|
|
1753
|
+
/**
|
|
1754
|
+
* Update a credential reference
|
|
1755
|
+
*/
|
|
1756
|
+
declare const updateCredentialReference: (db: DatabaseClient) => (params: {
|
|
1923
1757
|
scopes: ProjectScopeConfig;
|
|
1924
1758
|
id: string;
|
|
1925
|
-
data:
|
|
1926
|
-
}) => Promise<
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
graphId: string;
|
|
1932
|
-
publicId: string;
|
|
1933
|
-
keyHash: string;
|
|
1934
|
-
keyPrefix: string;
|
|
1935
|
-
lastUsedAt: string | null;
|
|
1936
|
-
expiresAt: string | null;
|
|
1937
|
-
createdAt: string;
|
|
1938
|
-
updatedAt: string;
|
|
1939
|
-
}>;
|
|
1940
|
-
declare const deleteApiKey: (db: DatabaseClient) => (params: {
|
|
1759
|
+
data: Partial<CredentialReferenceUpdate>;
|
|
1760
|
+
}) => Promise<CredentialReferenceWithTools | undefined>;
|
|
1761
|
+
/**
|
|
1762
|
+
* Delete a credential reference
|
|
1763
|
+
*/
|
|
1764
|
+
declare const deleteCredentialReference: (db: DatabaseClient) => (params: {
|
|
1941
1765
|
scopes: ProjectScopeConfig;
|
|
1942
1766
|
id: string;
|
|
1943
1767
|
}) => Promise<boolean>;
|
|
1944
|
-
|
|
1768
|
+
/**
|
|
1769
|
+
* Check if a credential reference exists
|
|
1770
|
+
*/
|
|
1771
|
+
declare const hasCredentialReference: (db: DatabaseClient) => (params: {
|
|
1945
1772
|
scopes: ProjectScopeConfig;
|
|
1946
1773
|
id: string;
|
|
1947
1774
|
}) => Promise<boolean>;
|
|
1948
|
-
|
|
1949
|
-
|
|
1775
|
+
/**
|
|
1776
|
+
* Get credential reference by ID (simple version without tools)
|
|
1777
|
+
*/
|
|
1778
|
+
declare const getCredentialReferenceById: (db: DatabaseClient) => (params: {
|
|
1950
1779
|
scopes: ProjectScopeConfig;
|
|
1951
|
-
|
|
1952
|
-
}) => Promise<
|
|
1780
|
+
id: string;
|
|
1781
|
+
}) => Promise<CredentialReferenceSelect | null>;
|
|
1953
1782
|
/**
|
|
1954
|
-
*
|
|
1955
|
-
* Returns both the API key record and the full key (which should be shown to the user only once)
|
|
1783
|
+
* Count credential references for a tenant/project
|
|
1956
1784
|
*/
|
|
1957
|
-
declare const
|
|
1785
|
+
declare const countCredentialReferences: (db: DatabaseClient) => (params: {
|
|
1786
|
+
scopes: ProjectScopeConfig;
|
|
1787
|
+
}) => Promise<number>;
|
|
1958
1788
|
/**
|
|
1959
|
-
*
|
|
1789
|
+
* Upsert a credential reference (create if it doesn't exist, update if it does)
|
|
1960
1790
|
*/
|
|
1961
|
-
declare const
|
|
1791
|
+
declare const upsertCredentialReference: (db: DatabaseClient) => (params: {
|
|
1792
|
+
data: CredentialReferenceInsert;
|
|
1793
|
+
}) => Promise<CredentialReferenceSelect>;
|
|
1962
1794
|
|
|
1963
|
-
|
|
1795
|
+
/**
|
|
1796
|
+
* Get a data component by ID
|
|
1797
|
+
*/
|
|
1798
|
+
declare const getDataComponent: (db: DatabaseClient) => (params: {
|
|
1964
1799
|
scopes: ProjectScopeConfig;
|
|
1965
|
-
|
|
1966
|
-
}) => Promise<
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
description: string;
|
|
1972
|
-
createdAt: string;
|
|
1973
|
-
updatedAt: string;
|
|
1974
|
-
props: Record<string, unknown> | null;
|
|
1975
|
-
} | undefined>;
|
|
1976
|
-
declare const listArtifactComponents: (db: DatabaseClient) => (params: {
|
|
1800
|
+
dataComponentId: string;
|
|
1801
|
+
}) => Promise<DataComponentSelect | null>;
|
|
1802
|
+
/**
|
|
1803
|
+
* List all data components for a tenant/project
|
|
1804
|
+
*/
|
|
1805
|
+
declare const listDataComponents: (db: DatabaseClient) => (params: {
|
|
1977
1806
|
scopes: ProjectScopeConfig;
|
|
1978
|
-
}) => Promise<
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
description: string;
|
|
1984
|
-
projectId: string;
|
|
1985
|
-
tenantId: string;
|
|
1986
|
-
id: string;
|
|
1987
|
-
}[]>;
|
|
1988
|
-
declare const listArtifactComponentsPaginated: (db: DatabaseClient) => (params: {
|
|
1807
|
+
}) => Promise<DataComponentSelect[]>;
|
|
1808
|
+
/**
|
|
1809
|
+
* List data components with pagination
|
|
1810
|
+
*/
|
|
1811
|
+
declare const listDataComponentsPaginated: (db: DatabaseClient) => (params: {
|
|
1989
1812
|
scopes: ProjectScopeConfig;
|
|
1990
1813
|
pagination?: PaginationConfig;
|
|
1991
1814
|
}) => Promise<{
|
|
1992
|
-
data:
|
|
1815
|
+
data: DataComponentSelect[];
|
|
1993
1816
|
pagination: {
|
|
1994
1817
|
page: number;
|
|
1995
1818
|
limit: number;
|
|
@@ -1997,203 +1820,133 @@ declare const listArtifactComponentsPaginated: (db: DatabaseClient) => (params:
|
|
|
1997
1820
|
pages: number;
|
|
1998
1821
|
};
|
|
1999
1822
|
}>;
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
props: Record<string, unknown> | null;
|
|
2009
|
-
}>;
|
|
2010
|
-
declare const updateArtifactComponent: (db: DatabaseClient) => (params: {
|
|
1823
|
+
/**
|
|
1824
|
+
* Create a new data component
|
|
1825
|
+
*/
|
|
1826
|
+
declare const createDataComponent: (db: DatabaseClient) => (params: DataComponentInsert) => Promise<DataComponentSelect>;
|
|
1827
|
+
/**
|
|
1828
|
+
* Update a data component
|
|
1829
|
+
*/
|
|
1830
|
+
declare const updateDataComponent: (db: DatabaseClient) => (params: {
|
|
2011
1831
|
scopes: ProjectScopeConfig;
|
|
2012
|
-
|
|
2013
|
-
data:
|
|
2014
|
-
}) => Promise<
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
description: string;
|
|
2020
|
-
createdAt: string;
|
|
2021
|
-
updatedAt: string;
|
|
2022
|
-
props: Record<string, unknown> | null;
|
|
2023
|
-
}>;
|
|
2024
|
-
declare const deleteArtifactComponent: (db: DatabaseClient) => (params: {
|
|
1832
|
+
dataComponentId: string;
|
|
1833
|
+
data: DataComponentUpdate;
|
|
1834
|
+
}) => Promise<DataComponentSelect | null>;
|
|
1835
|
+
/**
|
|
1836
|
+
* Delete a data component
|
|
1837
|
+
*/
|
|
1838
|
+
declare const deleteDataComponent: (db: DatabaseClient) => (params: {
|
|
2025
1839
|
scopes: ProjectScopeConfig;
|
|
2026
|
-
|
|
1840
|
+
dataComponentId: string;
|
|
2027
1841
|
}) => Promise<boolean>;
|
|
2028
|
-
|
|
1842
|
+
/**
|
|
1843
|
+
* Get data components for a specific agent
|
|
1844
|
+
*/
|
|
1845
|
+
declare const getDataComponentsForAgent: (db: DatabaseClient) => (params: {
|
|
2029
1846
|
scopes: AgentScopeConfig;
|
|
2030
|
-
}) => Promise<
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
description: string;
|
|
2036
|
-
props: Record<string, unknown> | null;
|
|
2037
|
-
createdAt: string;
|
|
2038
|
-
updatedAt: string;
|
|
2039
|
-
}[]>;
|
|
2040
|
-
declare const associateArtifactComponentWithAgent: (db: DatabaseClient) => (params: {
|
|
1847
|
+
}) => Promise<DataComponentSelect[]>;
|
|
1848
|
+
/**
|
|
1849
|
+
* Associate a data component with an agent
|
|
1850
|
+
*/
|
|
1851
|
+
declare const associateDataComponentWithAgent: (db: DatabaseClient) => (params: {
|
|
2041
1852
|
scopes: AgentScopeConfig;
|
|
2042
|
-
|
|
1853
|
+
dataComponentId: string;
|
|
2043
1854
|
}) => Promise<{
|
|
2044
1855
|
tenantId: string;
|
|
2045
1856
|
projectId: string;
|
|
2046
1857
|
id: string;
|
|
2047
1858
|
graphId: string;
|
|
2048
1859
|
createdAt: string;
|
|
2049
|
-
|
|
2050
|
-
|
|
1860
|
+
subAgentId: string;
|
|
1861
|
+
dataComponentId: string;
|
|
2051
1862
|
}>;
|
|
2052
|
-
|
|
1863
|
+
/**
|
|
1864
|
+
* Remove association between data component and agent
|
|
1865
|
+
*/
|
|
1866
|
+
declare const removeDataComponentFromAgent: (db: DatabaseClient) => (params: {
|
|
2053
1867
|
scopes: AgentScopeConfig;
|
|
2054
|
-
|
|
1868
|
+
dataComponentId: string;
|
|
2055
1869
|
}) => Promise<boolean>;
|
|
2056
|
-
declare const
|
|
1870
|
+
declare const deleteAgentDataComponentRelationByAgent: (db: DatabaseClient) => (params: {
|
|
2057
1871
|
scopes: AgentScopeConfig;
|
|
2058
1872
|
}) => Promise<boolean>;
|
|
2059
|
-
|
|
1873
|
+
/**
|
|
1874
|
+
* Get all agents that use a specific data component
|
|
1875
|
+
*/
|
|
1876
|
+
declare const getAgentsUsingDataComponent: (db: DatabaseClient) => (params: {
|
|
2060
1877
|
scopes: ProjectScopeConfig;
|
|
2061
|
-
|
|
1878
|
+
dataComponentId: string;
|
|
2062
1879
|
}) => Promise<{
|
|
2063
|
-
|
|
2064
|
-
agentId: string;
|
|
1880
|
+
subAgentId: string;
|
|
2065
1881
|
createdAt: string;
|
|
2066
1882
|
}[]>;
|
|
2067
|
-
|
|
1883
|
+
/**
|
|
1884
|
+
* Check if a data component is associated with an agent
|
|
1885
|
+
*/
|
|
1886
|
+
declare const isDataComponentAssociatedWithAgent: (db: DatabaseClient) => (params: {
|
|
2068
1887
|
scopes: AgentScopeConfig;
|
|
2069
|
-
|
|
2070
|
-
}) => Promise<boolean>;
|
|
2071
|
-
declare const graphHasArtifactComponents: (db: DatabaseClient) => (params: {
|
|
2072
|
-
scopes: GraphScopeConfig;
|
|
1888
|
+
dataComponentId: string;
|
|
2073
1889
|
}) => Promise<boolean>;
|
|
2074
|
-
declare const countArtifactComponents: (db: DatabaseClient) => (params: {
|
|
2075
|
-
scopes: ProjectScopeConfig;
|
|
2076
|
-
}) => Promise<number>;
|
|
2077
|
-
declare const countArtifactComponentsForAgent: (db: DatabaseClient) => (params: {
|
|
2078
|
-
scopes: AgentScopeConfig;
|
|
2079
|
-
}) => Promise<number>;
|
|
2080
1890
|
/**
|
|
2081
|
-
* Upsert agent-
|
|
1891
|
+
* Upsert agent-data component relation (create if it doesn't exist, no-op if it does)
|
|
2082
1892
|
*/
|
|
2083
|
-
declare const
|
|
1893
|
+
declare const upsertAgentDataComponentRelation: (db: DatabaseClient) => (params: {
|
|
2084
1894
|
scopes: AgentScopeConfig;
|
|
2085
|
-
|
|
1895
|
+
dataComponentId: string;
|
|
2086
1896
|
}) => Promise<{
|
|
2087
1897
|
tenantId: string;
|
|
2088
1898
|
projectId: string;
|
|
2089
1899
|
id: string;
|
|
2090
1900
|
graphId: string;
|
|
2091
1901
|
createdAt: string;
|
|
2092
|
-
|
|
2093
|
-
|
|
1902
|
+
subAgentId: string;
|
|
1903
|
+
dataComponentId: string;
|
|
2094
1904
|
} | null>;
|
|
2095
1905
|
/**
|
|
2096
|
-
*
|
|
2097
|
-
*/
|
|
2098
|
-
declare const upsertArtifactComponent: (db: DatabaseClient) => (params: {
|
|
2099
|
-
data: ArtifactComponentInsert;
|
|
2100
|
-
}) => Promise<ArtifactComponentSelect>;
|
|
2101
|
-
|
|
2102
|
-
/**
|
|
2103
|
-
* Get cached context data for a conversation with optional request hash validation
|
|
2104
|
-
*/
|
|
2105
|
-
declare const getCacheEntry: (db: DatabaseClient) => (params: {
|
|
2106
|
-
conversationId: string;
|
|
2107
|
-
contextConfigId: string;
|
|
2108
|
-
contextVariableKey: string;
|
|
2109
|
-
requestHash?: string;
|
|
2110
|
-
}) => Promise<ContextCacheSelect | null>;
|
|
2111
|
-
/**
|
|
2112
|
-
* Set cached context data for a conversation
|
|
2113
|
-
*/
|
|
2114
|
-
declare const setCacheEntry: (db: DatabaseClient) => (entry: ContextCacheInsert) => Promise<ContextCacheSelect | null>;
|
|
2115
|
-
/**
|
|
2116
|
-
* Clear cache entries for a specific conversation
|
|
1906
|
+
* Count data components for a tenant/project
|
|
2117
1907
|
*/
|
|
2118
|
-
declare const
|
|
1908
|
+
declare const countDataComponents: (db: DatabaseClient) => (params: {
|
|
2119
1909
|
scopes: ProjectScopeConfig;
|
|
2120
|
-
conversationId: string;
|
|
2121
1910
|
}) => Promise<number>;
|
|
2122
1911
|
/**
|
|
2123
|
-
*
|
|
1912
|
+
* Upsert a data component (create if it doesn't exist, update if it does)
|
|
2124
1913
|
*/
|
|
2125
|
-
declare const
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
1914
|
+
declare const upsertDataComponent: (db: DatabaseClient) => (params: {
|
|
1915
|
+
data: DataComponentInsert;
|
|
1916
|
+
}) => Promise<DataComponentSelect | null>;
|
|
1917
|
+
|
|
2129
1918
|
/**
|
|
2130
|
-
*
|
|
1919
|
+
* Create a new external agent
|
|
2131
1920
|
*/
|
|
2132
|
-
declare const
|
|
2133
|
-
scopes: ProjectScopeConfig;
|
|
2134
|
-
}) => Promise<number>;
|
|
1921
|
+
declare const createExternalAgent: (db: DatabaseClient) => (params: ExternalAgentInsert) => Promise<ExternalAgentSelect>;
|
|
2135
1922
|
/**
|
|
2136
|
-
*
|
|
1923
|
+
* Get external agent by ID
|
|
2137
1924
|
*/
|
|
2138
|
-
declare const
|
|
2139
|
-
scopes:
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
}) => Promise<number>;
|
|
1925
|
+
declare const getExternalAgent: (db: DatabaseClient) => (params: {
|
|
1926
|
+
scopes: GraphScopeConfig;
|
|
1927
|
+
subAgentId: string;
|
|
1928
|
+
}) => Promise<ExternalAgentSelect | null>;
|
|
2143
1929
|
/**
|
|
2144
|
-
*
|
|
1930
|
+
* Get external agent by base URL
|
|
2145
1931
|
*/
|
|
2146
|
-
declare const
|
|
2147
|
-
scopes:
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
invocationDefinitionIds: string[];
|
|
2151
|
-
}) => Promise<number>;
|
|
1932
|
+
declare const getExternalAgentByUrl: (db: DatabaseClient) => (params: {
|
|
1933
|
+
scopes: GraphScopeConfig;
|
|
1934
|
+
baseUrl: string;
|
|
1935
|
+
}) => Promise<ExternalAgentSelect | null>;
|
|
2152
1936
|
/**
|
|
2153
|
-
*
|
|
1937
|
+
* List external agents for a tenant
|
|
2154
1938
|
*/
|
|
2155
|
-
declare const
|
|
2156
|
-
scopes:
|
|
2157
|
-
|
|
2158
|
-
}) => Promise<ContextCacheSelect[]>;
|
|
1939
|
+
declare const listExternalAgents: (db: DatabaseClient) => (params: {
|
|
1940
|
+
scopes: GraphScopeConfig;
|
|
1941
|
+
}) => Promise<ExternalAgentSelect[]>;
|
|
2159
1942
|
/**
|
|
2160
|
-
*
|
|
1943
|
+
* List external agents with pagination
|
|
2161
1944
|
*/
|
|
2162
|
-
declare const
|
|
2163
|
-
scopes: ProjectScopeConfig;
|
|
2164
|
-
contextConfigId: string;
|
|
2165
|
-
}) => Promise<ContextCacheSelect[]>;
|
|
2166
|
-
|
|
2167
|
-
declare const getContextConfigById: (db: DatabaseClient) => (params: {
|
|
2168
|
-
scopes: GraphScopeConfig;
|
|
2169
|
-
id: string;
|
|
2170
|
-
}) => Promise<{
|
|
2171
|
-
tenantId: string;
|
|
2172
|
-
projectId: string;
|
|
2173
|
-
id: string;
|
|
2174
|
-
graphId: string;
|
|
2175
|
-
createdAt: string;
|
|
2176
|
-
updatedAt: string;
|
|
2177
|
-
headersSchema: unknown;
|
|
2178
|
-
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
2179
|
-
} | undefined>;
|
|
2180
|
-
declare const listContextConfigs: (db: DatabaseClient) => (params: {
|
|
2181
|
-
scopes: GraphScopeConfig;
|
|
2182
|
-
}) => Promise<{
|
|
2183
|
-
tenantId: string;
|
|
2184
|
-
projectId: string;
|
|
2185
|
-
id: string;
|
|
2186
|
-
graphId: string;
|
|
2187
|
-
createdAt: string;
|
|
2188
|
-
updatedAt: string;
|
|
2189
|
-
headersSchema: unknown;
|
|
2190
|
-
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
2191
|
-
}[]>;
|
|
2192
|
-
declare const listContextConfigsPaginated: (db: DatabaseClient) => (params: {
|
|
1945
|
+
declare const listExternalAgentsPaginated: (db: DatabaseClient) => (params: {
|
|
2193
1946
|
scopes: GraphScopeConfig;
|
|
2194
1947
|
pagination?: PaginationConfig;
|
|
2195
1948
|
}) => Promise<{
|
|
2196
|
-
data:
|
|
1949
|
+
data: ExternalAgentSelect[];
|
|
2197
1950
|
pagination: {
|
|
2198
1951
|
page: number;
|
|
2199
1952
|
limit: number;
|
|
@@ -2201,885 +1954,1138 @@ declare const listContextConfigsPaginated: (db: DatabaseClient) => (params: {
|
|
|
2201
1954
|
pages: number;
|
|
2202
1955
|
};
|
|
2203
1956
|
}>;
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
graphId: string;
|
|
2209
|
-
createdAt: string;
|
|
2210
|
-
updatedAt: string;
|
|
2211
|
-
headersSchema: unknown;
|
|
2212
|
-
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
2213
|
-
}>;
|
|
2214
|
-
declare const updateContextConfig: (db: DatabaseClient) => (params: {
|
|
1957
|
+
/**
|
|
1958
|
+
* Update an existing external agent
|
|
1959
|
+
*/
|
|
1960
|
+
declare const updateExternalAgent: (db: DatabaseClient) => (params: {
|
|
2215
1961
|
scopes: GraphScopeConfig;
|
|
2216
|
-
|
|
2217
|
-
data: Partial<
|
|
2218
|
-
}) => Promise<
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
declare const
|
|
1962
|
+
subAgentId: string;
|
|
1963
|
+
data: Partial<ExternalAgentUpdate>;
|
|
1964
|
+
}) => Promise<ExternalAgentSelect | null>;
|
|
1965
|
+
/**
|
|
1966
|
+
* Upsert external agent (create if it doesn't exist, update if it does)
|
|
1967
|
+
*/
|
|
1968
|
+
declare const upsertExternalAgent: (db: DatabaseClient) => (params: {
|
|
1969
|
+
data: ExternalAgentInsert;
|
|
1970
|
+
}) => Promise<ExternalAgentSelect>;
|
|
1971
|
+
/**
|
|
1972
|
+
* Delete an external agent
|
|
1973
|
+
*/
|
|
1974
|
+
declare const deleteExternalAgent: (db: DatabaseClient) => (params: {
|
|
2229
1975
|
scopes: GraphScopeConfig;
|
|
2230
|
-
|
|
1976
|
+
subAgentId: string;
|
|
2231
1977
|
}) => Promise<boolean>;
|
|
2232
|
-
|
|
1978
|
+
/**
|
|
1979
|
+
* Check if an external agent exists
|
|
1980
|
+
*/
|
|
1981
|
+
declare const externalAgentExists: (db: DatabaseClient) => (params: {
|
|
2233
1982
|
scopes: GraphScopeConfig;
|
|
2234
|
-
|
|
1983
|
+
subAgentId: string;
|
|
2235
1984
|
}) => Promise<boolean>;
|
|
2236
|
-
|
|
1985
|
+
/**
|
|
1986
|
+
* Check if an external agent exists by URL
|
|
1987
|
+
*/
|
|
1988
|
+
declare const externalAgentUrlExists: (db: DatabaseClient) => (params: {
|
|
2237
1989
|
scopes: GraphScopeConfig;
|
|
2238
|
-
|
|
1990
|
+
baseUrl: string;
|
|
1991
|
+
}) => Promise<boolean>;
|
|
2239
1992
|
/**
|
|
2240
|
-
*
|
|
1993
|
+
* Count external agents for a tenant
|
|
2241
1994
|
*/
|
|
2242
|
-
declare const
|
|
2243
|
-
|
|
2244
|
-
}) => Promise<
|
|
2245
|
-
tenantId: string;
|
|
2246
|
-
projectId: string;
|
|
2247
|
-
id: string;
|
|
2248
|
-
graphId: string;
|
|
2249
|
-
createdAt: string;
|
|
2250
|
-
updatedAt: string;
|
|
2251
|
-
headersSchema: unknown;
|
|
2252
|
-
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
2253
|
-
}>;
|
|
1995
|
+
declare const countExternalAgents: (db: DatabaseClient) => (params: {
|
|
1996
|
+
scopes: GraphScopeConfig;
|
|
1997
|
+
}) => Promise<number>;
|
|
2254
1998
|
|
|
2255
|
-
declare const listConversations: (db: DatabaseClient) => (params: {
|
|
2256
|
-
scopes: ProjectScopeConfig;
|
|
2257
|
-
userId?: string;
|
|
2258
|
-
pagination?: PaginationConfig;
|
|
2259
|
-
}) => Promise<{
|
|
2260
|
-
conversations: ConversationSelect[];
|
|
2261
|
-
total: number;
|
|
2262
|
-
}>;
|
|
2263
|
-
declare const createConversation: (db: DatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
2264
|
-
tenantId: string;
|
|
2265
|
-
projectId: string;
|
|
2266
|
-
id: string;
|
|
2267
|
-
createdAt: string;
|
|
2268
|
-
updatedAt: string;
|
|
2269
|
-
title: string | null;
|
|
2270
|
-
metadata: ConversationMetadata | null;
|
|
2271
|
-
userId: string | null;
|
|
2272
|
-
activeAgentId: string;
|
|
2273
|
-
lastContextResolution: string | null;
|
|
2274
|
-
}>;
|
|
2275
|
-
declare const updateConversation: (db: DatabaseClient) => (params: {
|
|
2276
|
-
scopes: ProjectScopeConfig;
|
|
2277
|
-
conversationId: string;
|
|
2278
|
-
data: ConversationUpdate;
|
|
2279
|
-
}) => Promise<{
|
|
2280
|
-
tenantId: string;
|
|
2281
|
-
projectId: string;
|
|
2282
|
-
id: string;
|
|
2283
|
-
createdAt: string;
|
|
2284
|
-
updatedAt: string;
|
|
2285
|
-
title: string | null;
|
|
2286
|
-
metadata: ConversationMetadata | null;
|
|
2287
|
-
userId: string | null;
|
|
2288
|
-
activeAgentId: string;
|
|
2289
|
-
lastContextResolution: string | null;
|
|
2290
|
-
}>;
|
|
2291
|
-
declare const deleteConversation: (db: DatabaseClient) => (params: {
|
|
2292
|
-
scopes: ProjectScopeConfig;
|
|
2293
|
-
conversationId: string;
|
|
2294
|
-
}) => Promise<boolean>;
|
|
2295
|
-
declare const updateConversationActiveAgent: (db: DatabaseClient) => (params: {
|
|
2296
|
-
scopes: ProjectScopeConfig;
|
|
2297
|
-
conversationId: string;
|
|
2298
|
-
activeAgentId: string;
|
|
2299
|
-
}) => Promise<{
|
|
2300
|
-
tenantId: string;
|
|
2301
|
-
projectId: string;
|
|
2302
|
-
id: string;
|
|
2303
|
-
createdAt: string;
|
|
2304
|
-
updatedAt: string;
|
|
2305
|
-
title: string | null;
|
|
2306
|
-
metadata: ConversationMetadata | null;
|
|
2307
|
-
userId: string | null;
|
|
2308
|
-
activeAgentId: string;
|
|
2309
|
-
lastContextResolution: string | null;
|
|
2310
|
-
}>;
|
|
2311
|
-
declare const getConversation: (db: DatabaseClient) => (params: {
|
|
2312
|
-
scopes: ProjectScopeConfig;
|
|
2313
|
-
conversationId: string;
|
|
2314
|
-
}) => Promise<{
|
|
2315
|
-
tenantId: string;
|
|
2316
|
-
projectId: string;
|
|
2317
|
-
id: string;
|
|
2318
|
-
createdAt: string;
|
|
2319
|
-
updatedAt: string;
|
|
2320
|
-
title: string | null;
|
|
2321
|
-
metadata: ConversationMetadata | null;
|
|
2322
|
-
userId: string | null;
|
|
2323
|
-
activeAgentId: string;
|
|
2324
|
-
lastContextResolution: string | null;
|
|
2325
|
-
} | undefined>;
|
|
2326
|
-
declare const createOrGetConversation: (db: DatabaseClient) => (input: ConversationInsert) => Promise<{
|
|
2327
|
-
id: string;
|
|
2328
|
-
tenantId: string;
|
|
2329
|
-
projectId: string;
|
|
2330
|
-
userId: string | null | undefined;
|
|
2331
|
-
activeAgentId: string;
|
|
2332
|
-
title: string | null | undefined;
|
|
2333
|
-
lastContextResolution: string | null | undefined;
|
|
2334
|
-
metadata: ConversationMetadata | null | undefined;
|
|
2335
|
-
createdAt: string;
|
|
2336
|
-
updatedAt: string;
|
|
2337
|
-
}>;
|
|
2338
1999
|
/**
|
|
2339
|
-
*
|
|
2000
|
+
* Create or update a function (project-scoped)
|
|
2340
2001
|
*/
|
|
2341
|
-
declare const
|
|
2002
|
+
declare const upsertFunction: (db: DatabaseClient) => (params: {
|
|
2003
|
+
data: FunctionApiInsert;
|
|
2342
2004
|
scopes: ProjectScopeConfig;
|
|
2343
|
-
|
|
2344
|
-
options?: ConversationHistoryConfig;
|
|
2345
|
-
}) => Promise<any[]>;
|
|
2005
|
+
}) => Promise<void>;
|
|
2346
2006
|
/**
|
|
2347
|
-
* Get
|
|
2007
|
+
* Get a function by ID (project-scoped)
|
|
2348
2008
|
*/
|
|
2349
|
-
declare const
|
|
2009
|
+
declare const getFunction: (db: DatabaseClient) => (params: {
|
|
2010
|
+
functionId: string;
|
|
2350
2011
|
scopes: ProjectScopeConfig;
|
|
2351
|
-
|
|
2352
|
-
}) => Promise<{
|
|
2353
|
-
tenantId: string;
|
|
2354
|
-
projectId: string;
|
|
2355
|
-
id: string;
|
|
2356
|
-
createdAt: string;
|
|
2357
|
-
updatedAt: string;
|
|
2358
|
-
title: string | null;
|
|
2359
|
-
metadata: ConversationMetadata | null;
|
|
2360
|
-
userId: string | null;
|
|
2361
|
-
activeAgentId: string;
|
|
2362
|
-
lastContextResolution: string | null;
|
|
2363
|
-
} | undefined>;
|
|
2012
|
+
}) => Promise<FunctionApiInsert | null>;
|
|
2364
2013
|
/**
|
|
2365
|
-
*
|
|
2014
|
+
* List all functions for a project
|
|
2366
2015
|
*/
|
|
2367
|
-
declare const
|
|
2016
|
+
declare const listFunctions: (db: DatabaseClient) => (params: {
|
|
2368
2017
|
scopes: ProjectScopeConfig;
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2018
|
+
}) => Promise<FunctionApiInsert[]>;
|
|
2019
|
+
/**
|
|
2020
|
+
* Delete a function (project-scoped)
|
|
2021
|
+
*/
|
|
2022
|
+
declare const deleteFunction: (db: DatabaseClient) => (params: {
|
|
2023
|
+
functionId: string;
|
|
2373
2024
|
scopes: ProjectScopeConfig;
|
|
2374
|
-
threadId: string;
|
|
2375
|
-
agentId: string;
|
|
2376
2025
|
}) => Promise<void>;
|
|
2377
2026
|
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2027
|
+
interface GraphLogger {
|
|
2028
|
+
info(obj: Record<string, any>, msg?: string): void;
|
|
2029
|
+
error(obj: Record<string, any>, msg?: string): void;
|
|
2030
|
+
}
|
|
2381
2031
|
/**
|
|
2382
|
-
*
|
|
2032
|
+
* Server-side implementation of createFullGraph that performs actual database operations.
|
|
2033
|
+
* This function creates a complete graph with all agents, tools, and relationships.
|
|
2383
2034
|
*/
|
|
2384
|
-
declare const
|
|
2385
|
-
scopes: ProjectScopeConfig;
|
|
2386
|
-
id: string;
|
|
2387
|
-
}) => Promise<CredentialReferenceSelect | undefined>;
|
|
2035
|
+
declare const createFullGraphServerSide: (db: DatabaseClient, logger?: GraphLogger) => (scopes: ProjectScopeConfig, graphData: FullGraphDefinition) => Promise<FullGraphDefinition>;
|
|
2388
2036
|
/**
|
|
2389
|
-
*
|
|
2037
|
+
* Server-side implementation of updateFullGraph that performs actual database operations.
|
|
2038
|
+
* This function updates a complete graph with all agents, tools, and relationships.
|
|
2390
2039
|
*/
|
|
2391
|
-
declare const
|
|
2392
|
-
scopes: ProjectScopeConfig;
|
|
2393
|
-
id: string;
|
|
2394
|
-
}) => Promise<CredentialReferenceWithTools | undefined>;
|
|
2040
|
+
declare const updateFullGraphServerSide: (db: DatabaseClient, logger?: GraphLogger) => (scopes: ProjectScopeConfig, graphData: FullGraphDefinition) => Promise<FullGraphDefinition>;
|
|
2395
2041
|
/**
|
|
2396
|
-
*
|
|
2042
|
+
* Get a complete graph definition by ID
|
|
2397
2043
|
*/
|
|
2398
|
-
declare const
|
|
2399
|
-
scopes:
|
|
2400
|
-
}) => Promise<
|
|
2044
|
+
declare const getFullGraph: (db: DatabaseClient, logger?: GraphLogger) => (params: {
|
|
2045
|
+
scopes: GraphScopeConfig;
|
|
2046
|
+
}) => Promise<FullGraphDefinition | null>;
|
|
2401
2047
|
/**
|
|
2402
|
-
*
|
|
2048
|
+
* Delete a complete graph and cascade to all related entities
|
|
2403
2049
|
*/
|
|
2404
|
-
declare const
|
|
2050
|
+
declare const deleteFullGraph: (db: DatabaseClient, logger?: GraphLogger) => (params: {
|
|
2051
|
+
scopes: GraphScopeConfig;
|
|
2052
|
+
}) => Promise<boolean>;
|
|
2053
|
+
|
|
2054
|
+
/**
|
|
2055
|
+
* Atomic upsert operation for a single artifact - prevents race conditions
|
|
2056
|
+
*/
|
|
2057
|
+
declare const upsertLedgerArtifact: (db: DatabaseClient) => (params: {
|
|
2405
2058
|
scopes: ProjectScopeConfig;
|
|
2406
|
-
|
|
2059
|
+
contextId: string;
|
|
2060
|
+
taskId: string;
|
|
2061
|
+
toolCallId?: string | null;
|
|
2062
|
+
artifact: Artifact;
|
|
2407
2063
|
}) => Promise<{
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
page: number;
|
|
2411
|
-
limit: number;
|
|
2412
|
-
total: number;
|
|
2413
|
-
pages: number;
|
|
2414
|
-
};
|
|
2064
|
+
created: boolean;
|
|
2065
|
+
existing?: any;
|
|
2415
2066
|
}>;
|
|
2416
2067
|
/**
|
|
2417
|
-
*
|
|
2068
|
+
* Save one or more artifacts to the ledger
|
|
2418
2069
|
*/
|
|
2419
|
-
declare const
|
|
2070
|
+
declare const addLedgerArtifacts: (db: DatabaseClient) => (params: {
|
|
2071
|
+
scopes: ProjectScopeConfig;
|
|
2072
|
+
contextId: string;
|
|
2073
|
+
taskId?: string | null;
|
|
2074
|
+
toolCallId?: string | null;
|
|
2075
|
+
artifacts: Artifact[];
|
|
2076
|
+
}) => Promise<void>;
|
|
2420
2077
|
/**
|
|
2421
|
-
*
|
|
2078
|
+
* Retrieve artifacts by taskId, toolCallId, and/or artifactId.
|
|
2079
|
+
* At least one of taskId, toolCallId, or artifactId must be provided.
|
|
2422
2080
|
*/
|
|
2423
|
-
declare const
|
|
2081
|
+
declare const getLedgerArtifacts: (db: DatabaseClient) => (params: {
|
|
2424
2082
|
scopes: ProjectScopeConfig;
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2083
|
+
taskId?: string;
|
|
2084
|
+
toolCallId?: string;
|
|
2085
|
+
artifactId?: string;
|
|
2086
|
+
}) => Promise<Artifact[]>;
|
|
2428
2087
|
/**
|
|
2429
|
-
*
|
|
2088
|
+
* Get ledger artifacts by context ID
|
|
2430
2089
|
*/
|
|
2431
|
-
declare const
|
|
2090
|
+
declare const getLedgerArtifactsByContext: (db: DatabaseClient) => (params: {
|
|
2432
2091
|
scopes: ProjectScopeConfig;
|
|
2433
|
-
|
|
2434
|
-
}) => Promise<
|
|
2092
|
+
contextId: string;
|
|
2093
|
+
}) => Promise<LedgerArtifactSelect[]>;
|
|
2435
2094
|
/**
|
|
2436
|
-
*
|
|
2095
|
+
* Delete ledger artifacts by task ID
|
|
2437
2096
|
*/
|
|
2438
|
-
declare const
|
|
2097
|
+
declare const deleteLedgerArtifactsByTask: (db: DatabaseClient) => (params: {
|
|
2439
2098
|
scopes: ProjectScopeConfig;
|
|
2440
|
-
|
|
2099
|
+
taskId: string;
|
|
2441
2100
|
}) => Promise<boolean>;
|
|
2442
2101
|
/**
|
|
2443
|
-
*
|
|
2102
|
+
* Delete ledger artifacts by context ID
|
|
2444
2103
|
*/
|
|
2445
|
-
declare const
|
|
2104
|
+
declare const deleteLedgerArtifactsByContext: (db: DatabaseClient) => (params: {
|
|
2446
2105
|
scopes: ProjectScopeConfig;
|
|
2447
|
-
|
|
2448
|
-
}) => Promise<
|
|
2106
|
+
contextId: string;
|
|
2107
|
+
}) => Promise<boolean>;
|
|
2449
2108
|
/**
|
|
2450
|
-
* Count
|
|
2109
|
+
* Count ledger artifacts by task ID
|
|
2451
2110
|
*/
|
|
2452
|
-
declare const
|
|
2111
|
+
declare const countLedgerArtifactsByTask: (db: DatabaseClient) => (params: {
|
|
2453
2112
|
scopes: ProjectScopeConfig;
|
|
2113
|
+
taskId: string;
|
|
2454
2114
|
}) => Promise<number>;
|
|
2455
|
-
/**
|
|
2456
|
-
* Upsert a credential reference (create if it doesn't exist, update if it does)
|
|
2457
|
-
*/
|
|
2458
|
-
declare const upsertCredentialReference: (db: DatabaseClient) => (params: {
|
|
2459
|
-
data: CredentialReferenceInsert;
|
|
2460
|
-
}) => Promise<CredentialReferenceSelect>;
|
|
2461
2115
|
|
|
2462
|
-
|
|
2463
|
-
* Get a data component by ID
|
|
2464
|
-
*/
|
|
2465
|
-
declare const getDataComponent: (db: DatabaseClient) => (params: {
|
|
2116
|
+
declare const getMessageById: (db: DatabaseClient) => (params: {
|
|
2466
2117
|
scopes: ProjectScopeConfig;
|
|
2467
|
-
|
|
2468
|
-
}) => Promise<
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2118
|
+
messageId: string;
|
|
2119
|
+
}) => Promise<{
|
|
2120
|
+
tenantId: string;
|
|
2121
|
+
projectId: string;
|
|
2122
|
+
id: string;
|
|
2123
|
+
createdAt: string;
|
|
2124
|
+
updatedAt: string;
|
|
2125
|
+
metadata: MessageMetadata | null;
|
|
2126
|
+
content: MessageContent;
|
|
2127
|
+
conversationId: string;
|
|
2128
|
+
role: string;
|
|
2129
|
+
fromSubAgentId: string | null;
|
|
2130
|
+
toSubAgentId: string | null;
|
|
2131
|
+
fromExternalAgentId: string | null;
|
|
2132
|
+
toExternalAgentId: string | null;
|
|
2133
|
+
visibility: string;
|
|
2134
|
+
messageType: string;
|
|
2135
|
+
taskId: string | null;
|
|
2136
|
+
parentMessageId: string | null;
|
|
2137
|
+
a2aTaskId: string | null;
|
|
2138
|
+
a2aSessionId: string | null;
|
|
2139
|
+
} | undefined>;
|
|
2140
|
+
declare const listMessages: (db: DatabaseClient) => (params: {
|
|
2473
2141
|
scopes: ProjectScopeConfig;
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2142
|
+
pagination: PaginationConfig;
|
|
2143
|
+
}) => Promise<{
|
|
2144
|
+
createdAt: string;
|
|
2145
|
+
updatedAt: string;
|
|
2146
|
+
conversationId: string;
|
|
2147
|
+
role: string;
|
|
2148
|
+
fromSubAgentId: string | null;
|
|
2149
|
+
toSubAgentId: string | null;
|
|
2150
|
+
fromExternalAgentId: string | null;
|
|
2151
|
+
toExternalAgentId: string | null;
|
|
2152
|
+
content: MessageContent;
|
|
2153
|
+
visibility: string;
|
|
2154
|
+
messageType: string;
|
|
2155
|
+
taskId: string | null;
|
|
2156
|
+
parentMessageId: string | null;
|
|
2157
|
+
a2aTaskId: string | null;
|
|
2158
|
+
a2aSessionId: string | null;
|
|
2159
|
+
metadata: MessageMetadata | null;
|
|
2160
|
+
projectId: string;
|
|
2161
|
+
tenantId: string;
|
|
2162
|
+
id: string;
|
|
2163
|
+
}[]>;
|
|
2164
|
+
declare const getMessagesByConversation: (db: DatabaseClient) => (params: {
|
|
2479
2165
|
scopes: ProjectScopeConfig;
|
|
2480
|
-
|
|
2166
|
+
conversationId: string;
|
|
2167
|
+
pagination: PaginationConfig;
|
|
2481
2168
|
}) => Promise<{
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2169
|
+
createdAt: string;
|
|
2170
|
+
updatedAt: string;
|
|
2171
|
+
conversationId: string;
|
|
2172
|
+
role: string;
|
|
2173
|
+
fromSubAgentId: string | null;
|
|
2174
|
+
toSubAgentId: string | null;
|
|
2175
|
+
fromExternalAgentId: string | null;
|
|
2176
|
+
toExternalAgentId: string | null;
|
|
2177
|
+
content: MessageContent;
|
|
2178
|
+
visibility: string;
|
|
2179
|
+
messageType: string;
|
|
2180
|
+
taskId: string | null;
|
|
2181
|
+
parentMessageId: string | null;
|
|
2182
|
+
a2aTaskId: string | null;
|
|
2183
|
+
a2aSessionId: string | null;
|
|
2184
|
+
metadata: MessageMetadata | null;
|
|
2185
|
+
projectId: string;
|
|
2186
|
+
tenantId: string;
|
|
2187
|
+
id: string;
|
|
2188
|
+
}[]>;
|
|
2189
|
+
declare const getMessagesByTask: (db: DatabaseClient) => (params: {
|
|
2498
2190
|
scopes: ProjectScopeConfig;
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
}) => Promise<
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2191
|
+
taskId: string;
|
|
2192
|
+
pagination: PaginationConfig;
|
|
2193
|
+
}) => Promise<{
|
|
2194
|
+
createdAt: string;
|
|
2195
|
+
updatedAt: string;
|
|
2196
|
+
conversationId: string;
|
|
2197
|
+
role: string;
|
|
2198
|
+
fromSubAgentId: string | null;
|
|
2199
|
+
toSubAgentId: string | null;
|
|
2200
|
+
fromExternalAgentId: string | null;
|
|
2201
|
+
toExternalAgentId: string | null;
|
|
2202
|
+
content: MessageContent;
|
|
2203
|
+
visibility: string;
|
|
2204
|
+
messageType: string;
|
|
2205
|
+
taskId: string | null;
|
|
2206
|
+
parentMessageId: string | null;
|
|
2207
|
+
a2aTaskId: string | null;
|
|
2208
|
+
a2aSessionId: string | null;
|
|
2209
|
+
metadata: MessageMetadata | null;
|
|
2210
|
+
projectId: string;
|
|
2211
|
+
tenantId: string;
|
|
2212
|
+
id: string;
|
|
2213
|
+
}[]>;
|
|
2214
|
+
declare const getVisibleMessages: (db: DatabaseClient) => (params: {
|
|
2506
2215
|
scopes: ProjectScopeConfig;
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
* Get data components for a specific agent
|
|
2511
|
-
*/
|
|
2512
|
-
declare const getDataComponentsForAgent: (db: DatabaseClient) => (params: {
|
|
2513
|
-
scopes: AgentScopeConfig;
|
|
2514
|
-
}) => Promise<DataComponentSelect[]>;
|
|
2515
|
-
/**
|
|
2516
|
-
* Associate a data component with an agent
|
|
2517
|
-
*/
|
|
2518
|
-
declare const associateDataComponentWithAgent: (db: DatabaseClient) => (params: {
|
|
2519
|
-
scopes: AgentScopeConfig;
|
|
2520
|
-
dataComponentId: string;
|
|
2216
|
+
conversationId: string;
|
|
2217
|
+
visibility?: MessageVisibility[];
|
|
2218
|
+
pagination: PaginationConfig;
|
|
2521
2219
|
}) => Promise<{
|
|
2220
|
+
createdAt: string;
|
|
2221
|
+
updatedAt: string;
|
|
2222
|
+
conversationId: string;
|
|
2223
|
+
role: string;
|
|
2224
|
+
fromSubAgentId: string | null;
|
|
2225
|
+
toSubAgentId: string | null;
|
|
2226
|
+
fromExternalAgentId: string | null;
|
|
2227
|
+
toExternalAgentId: string | null;
|
|
2228
|
+
content: MessageContent;
|
|
2229
|
+
visibility: string;
|
|
2230
|
+
messageType: string;
|
|
2231
|
+
taskId: string | null;
|
|
2232
|
+
parentMessageId: string | null;
|
|
2233
|
+
a2aTaskId: string | null;
|
|
2234
|
+
a2aSessionId: string | null;
|
|
2235
|
+
metadata: MessageMetadata | null;
|
|
2236
|
+
projectId: string;
|
|
2237
|
+
tenantId: string;
|
|
2238
|
+
id: string;
|
|
2239
|
+
}[]>;
|
|
2240
|
+
declare const createMessage: (db: DatabaseClient) => (params: MessageInsert) => Promise<{
|
|
2522
2241
|
tenantId: string;
|
|
2523
2242
|
projectId: string;
|
|
2524
2243
|
id: string;
|
|
2525
|
-
graphId: string;
|
|
2526
2244
|
createdAt: string;
|
|
2527
|
-
|
|
2528
|
-
|
|
2245
|
+
updatedAt: string;
|
|
2246
|
+
metadata: MessageMetadata | null;
|
|
2247
|
+
content: MessageContent;
|
|
2248
|
+
conversationId: string;
|
|
2249
|
+
role: string;
|
|
2250
|
+
fromSubAgentId: string | null;
|
|
2251
|
+
toSubAgentId: string | null;
|
|
2252
|
+
fromExternalAgentId: string | null;
|
|
2253
|
+
toExternalAgentId: string | null;
|
|
2254
|
+
visibility: string;
|
|
2255
|
+
messageType: string;
|
|
2256
|
+
taskId: string | null;
|
|
2257
|
+
parentMessageId: string | null;
|
|
2258
|
+
a2aTaskId: string | null;
|
|
2259
|
+
a2aSessionId: string | null;
|
|
2529
2260
|
}>;
|
|
2530
|
-
|
|
2531
|
-
* Remove association between data component and agent
|
|
2532
|
-
*/
|
|
2533
|
-
declare const removeDataComponentFromAgent: (db: DatabaseClient) => (params: {
|
|
2534
|
-
scopes: AgentScopeConfig;
|
|
2535
|
-
dataComponentId: string;
|
|
2536
|
-
}) => Promise<boolean>;
|
|
2537
|
-
declare const deleteAgentDataComponentRelationByAgent: (db: DatabaseClient) => (params: {
|
|
2538
|
-
scopes: AgentScopeConfig;
|
|
2539
|
-
}) => Promise<boolean>;
|
|
2540
|
-
/**
|
|
2541
|
-
* Get all agents that use a specific data component
|
|
2542
|
-
*/
|
|
2543
|
-
declare const getAgentsUsingDataComponent: (db: DatabaseClient) => (params: {
|
|
2261
|
+
declare const updateMessage: (db: DatabaseClient) => (params: {
|
|
2544
2262
|
scopes: ProjectScopeConfig;
|
|
2545
|
-
|
|
2263
|
+
messageId: string;
|
|
2264
|
+
data: MessageUpdate;
|
|
2546
2265
|
}) => Promise<{
|
|
2547
|
-
|
|
2266
|
+
tenantId: string;
|
|
2267
|
+
projectId: string;
|
|
2268
|
+
id: string;
|
|
2548
2269
|
createdAt: string;
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2270
|
+
updatedAt: string;
|
|
2271
|
+
metadata: MessageMetadata | null;
|
|
2272
|
+
content: MessageContent;
|
|
2273
|
+
conversationId: string;
|
|
2274
|
+
role: string;
|
|
2275
|
+
fromSubAgentId: string | null;
|
|
2276
|
+
toSubAgentId: string | null;
|
|
2277
|
+
fromExternalAgentId: string | null;
|
|
2278
|
+
toExternalAgentId: string | null;
|
|
2279
|
+
visibility: string;
|
|
2280
|
+
messageType: string;
|
|
2281
|
+
taskId: string | null;
|
|
2282
|
+
parentMessageId: string | null;
|
|
2283
|
+
a2aTaskId: string | null;
|
|
2284
|
+
a2aSessionId: string | null;
|
|
2285
|
+
}>;
|
|
2286
|
+
declare const deleteMessage: (db: DatabaseClient) => (params: {
|
|
2287
|
+
scopes: ProjectScopeConfig;
|
|
2288
|
+
messageId: string;
|
|
2563
2289
|
}) => Promise<{
|
|
2564
2290
|
tenantId: string;
|
|
2565
2291
|
projectId: string;
|
|
2566
2292
|
id: string;
|
|
2567
|
-
graphId: string;
|
|
2568
2293
|
createdAt: string;
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2294
|
+
updatedAt: string;
|
|
2295
|
+
metadata: MessageMetadata | null;
|
|
2296
|
+
content: MessageContent;
|
|
2297
|
+
conversationId: string;
|
|
2298
|
+
role: string;
|
|
2299
|
+
fromSubAgentId: string | null;
|
|
2300
|
+
toSubAgentId: string | null;
|
|
2301
|
+
fromExternalAgentId: string | null;
|
|
2302
|
+
toExternalAgentId: string | null;
|
|
2303
|
+
visibility: string;
|
|
2304
|
+
messageType: string;
|
|
2305
|
+
taskId: string | null;
|
|
2306
|
+
parentMessageId: string | null;
|
|
2307
|
+
a2aTaskId: string | null;
|
|
2308
|
+
a2aSessionId: string | null;
|
|
2309
|
+
}>;
|
|
2310
|
+
declare const countMessagesByConversation: (db: DatabaseClient) => (params: {
|
|
2576
2311
|
scopes: ProjectScopeConfig;
|
|
2312
|
+
conversationId: string;
|
|
2577
2313
|
}) => Promise<number>;
|
|
2578
|
-
/**
|
|
2579
|
-
* Upsert a data component (create if it doesn't exist, update if it does)
|
|
2580
|
-
*/
|
|
2581
|
-
declare const upsertDataComponent: (db: DatabaseClient) => (params: {
|
|
2582
|
-
data: DataComponentInsert;
|
|
2583
|
-
}) => Promise<DataComponentSelect | null>;
|
|
2584
2314
|
|
|
2585
2315
|
/**
|
|
2586
|
-
*
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
/**
|
|
2590
|
-
* Get external agent by ID
|
|
2591
|
-
*/
|
|
2592
|
-
declare const getExternalAgent: (db: DatabaseClient) => (params: {
|
|
2593
|
-
scopes: GraphScopeConfig;
|
|
2594
|
-
agentId: string;
|
|
2595
|
-
}) => Promise<ExternalAgentSelect | null>;
|
|
2596
|
-
/**
|
|
2597
|
-
* Get external agent by base URL
|
|
2598
|
-
*/
|
|
2599
|
-
declare const getExternalAgentByUrl: (db: DatabaseClient) => (params: {
|
|
2600
|
-
scopes: GraphScopeConfig;
|
|
2601
|
-
baseUrl: string;
|
|
2602
|
-
}) => Promise<ExternalAgentSelect | null>;
|
|
2603
|
-
/**
|
|
2604
|
-
* List external agents for a tenant
|
|
2605
|
-
*/
|
|
2606
|
-
declare const listExternalAgents: (db: DatabaseClient) => (params: {
|
|
2607
|
-
scopes: GraphScopeConfig;
|
|
2608
|
-
}) => Promise<ExternalAgentSelect[]>;
|
|
2609
|
-
/**
|
|
2610
|
-
* List external agents with pagination
|
|
2611
|
-
*/
|
|
2612
|
-
declare const listExternalAgentsPaginated: (db: DatabaseClient) => (params: {
|
|
2613
|
-
scopes: GraphScopeConfig;
|
|
2614
|
-
pagination?: PaginationConfig;
|
|
2615
|
-
}) => Promise<{
|
|
2616
|
-
data: ExternalAgentSelect[];
|
|
2617
|
-
pagination: {
|
|
2618
|
-
page: number;
|
|
2619
|
-
limit: number;
|
|
2620
|
-
total: number;
|
|
2621
|
-
pages: number;
|
|
2622
|
-
};
|
|
2623
|
-
}>;
|
|
2624
|
-
/**
|
|
2625
|
-
* Update an existing external agent
|
|
2626
|
-
*/
|
|
2627
|
-
declare const updateExternalAgent: (db: DatabaseClient) => (params: {
|
|
2628
|
-
scopes: GraphScopeConfig;
|
|
2629
|
-
agentId: string;
|
|
2630
|
-
data: Partial<ExternalAgentUpdate>;
|
|
2631
|
-
}) => Promise<ExternalAgentSelect | null>;
|
|
2632
|
-
/**
|
|
2633
|
-
* Upsert external agent (create if it doesn't exist, update if it does)
|
|
2634
|
-
*/
|
|
2635
|
-
declare const upsertExternalAgent: (db: DatabaseClient) => (params: {
|
|
2636
|
-
data: ExternalAgentInsert;
|
|
2637
|
-
}) => Promise<ExternalAgentSelect>;
|
|
2638
|
-
/**
|
|
2639
|
-
* Delete an external agent
|
|
2640
|
-
*/
|
|
2641
|
-
declare const deleteExternalAgent: (db: DatabaseClient) => (params: {
|
|
2642
|
-
scopes: GraphScopeConfig;
|
|
2643
|
-
agentId: string;
|
|
2644
|
-
}) => Promise<boolean>;
|
|
2645
|
-
/**
|
|
2646
|
-
* Check if an external agent exists
|
|
2647
|
-
*/
|
|
2648
|
-
declare const externalAgentExists: (db: DatabaseClient) => (params: {
|
|
2649
|
-
scopes: GraphScopeConfig;
|
|
2650
|
-
agentId: string;
|
|
2651
|
-
}) => Promise<boolean>;
|
|
2652
|
-
/**
|
|
2653
|
-
* Check if an external agent exists by URL
|
|
2654
|
-
*/
|
|
2655
|
-
declare const externalAgentUrlExists: (db: DatabaseClient) => (params: {
|
|
2656
|
-
scopes: GraphScopeConfig;
|
|
2657
|
-
baseUrl: string;
|
|
2658
|
-
}) => Promise<boolean>;
|
|
2659
|
-
/**
|
|
2660
|
-
* Count external agents for a tenant
|
|
2316
|
+
* Server-side data access layer for Full Project operations.
|
|
2317
|
+
* This module provides functions for creating, retrieving, updating, and deleting
|
|
2318
|
+
* complete project definitions with all nested resources (graphs, agents, tools, etc.).
|
|
2661
2319
|
*/
|
|
2662
|
-
declare const countExternalAgents: (db: DatabaseClient) => (params: {
|
|
2663
|
-
scopes: GraphScopeConfig;
|
|
2664
|
-
}) => Promise<number>;
|
|
2665
2320
|
|
|
2321
|
+
type ProjectLogger = ReturnType<typeof getLogger>;
|
|
2666
2322
|
/**
|
|
2667
|
-
*
|
|
2323
|
+
* Server-side implementation of createFullProject that performs actual database operations.
|
|
2324
|
+
* This function creates a complete project with all graphs and their nested resources.
|
|
2668
2325
|
*/
|
|
2669
|
-
declare const
|
|
2670
|
-
data: FunctionApiInsert;
|
|
2671
|
-
scopes: ProjectScopeConfig;
|
|
2672
|
-
}) => Promise<void>;
|
|
2326
|
+
declare const createFullProjectServerSide: (db: DatabaseClient, logger?: ProjectLogger) => (scopes: ProjectScopeConfig, projectData: FullProjectDefinition) => Promise<FullProjectDefinition>;
|
|
2673
2327
|
/**
|
|
2674
|
-
*
|
|
2328
|
+
* Server-side implementation of updateFullProject that performs actual database operations.
|
|
2329
|
+
* This function updates a complete project with all graphs and their nested resources.
|
|
2675
2330
|
*/
|
|
2676
|
-
declare const
|
|
2677
|
-
functionId: string;
|
|
2678
|
-
scopes: ProjectScopeConfig;
|
|
2679
|
-
}) => Promise<FunctionApiInsert | null>;
|
|
2331
|
+
declare const updateFullProjectServerSide: (db: DatabaseClient, logger?: ProjectLogger) => (scopes: ProjectScopeConfig, projectData: FullProjectDefinition) => Promise<FullProjectDefinition>;
|
|
2680
2332
|
/**
|
|
2681
|
-
*
|
|
2333
|
+
* Get a complete project definition with all nested resources
|
|
2682
2334
|
*/
|
|
2683
|
-
declare const
|
|
2335
|
+
declare const getFullProject: (db: DatabaseClient, logger?: ProjectLogger) => (params: {
|
|
2684
2336
|
scopes: ProjectScopeConfig;
|
|
2685
|
-
}) => Promise<
|
|
2337
|
+
}) => Promise<FullProjectDefinition | null>;
|
|
2686
2338
|
/**
|
|
2687
|
-
* Delete a
|
|
2339
|
+
* Delete a complete project and cascade to all related entities
|
|
2688
2340
|
*/
|
|
2689
|
-
declare const
|
|
2690
|
-
functionId: string;
|
|
2341
|
+
declare const deleteFullProject: (db: DatabaseClient, logger?: ProjectLogger) => (params: {
|
|
2691
2342
|
scopes: ProjectScopeConfig;
|
|
2692
|
-
}) => Promise<
|
|
2343
|
+
}) => Promise<boolean>;
|
|
2693
2344
|
|
|
2694
|
-
interface GraphLogger {
|
|
2695
|
-
info(obj: Record<string, any>, msg?: string): void;
|
|
2696
|
-
error(obj: Record<string, any>, msg?: string): void;
|
|
2697
|
-
}
|
|
2698
2345
|
/**
|
|
2699
|
-
*
|
|
2700
|
-
* This function creates a complete graph with all agents, tools, and relationships.
|
|
2346
|
+
* List all unique project IDs within a tenant by scanning all resource tables
|
|
2701
2347
|
*/
|
|
2702
|
-
declare const
|
|
2348
|
+
declare const listProjects: (db: DatabaseClient) => (params: {
|
|
2349
|
+
tenantId: string;
|
|
2350
|
+
}) => Promise<ProjectInfo[]>;
|
|
2703
2351
|
/**
|
|
2704
|
-
*
|
|
2705
|
-
* This function updates a complete graph with all agents, tools, and relationships.
|
|
2352
|
+
* List all unique project IDs within a tenant with pagination
|
|
2706
2353
|
*/
|
|
2707
|
-
declare const
|
|
2354
|
+
declare const listProjectsPaginated: (db: DatabaseClient) => (params: {
|
|
2355
|
+
tenantId: string;
|
|
2356
|
+
pagination?: PaginationConfig;
|
|
2357
|
+
}) => Promise<{
|
|
2358
|
+
data: ProjectSelect[];
|
|
2359
|
+
pagination: PaginationResult;
|
|
2360
|
+
}>;
|
|
2708
2361
|
/**
|
|
2709
|
-
* Get
|
|
2362
|
+
* Get resource counts for a specific project
|
|
2710
2363
|
*/
|
|
2711
|
-
declare const
|
|
2712
|
-
scopes: GraphScopeConfig;
|
|
2713
|
-
}) => Promise<FullGraphDefinition | null>;
|
|
2364
|
+
declare const getProjectResourceCounts: (db: DatabaseClient) => (params: ProjectScopeConfig) => Promise<ProjectResourceCounts>;
|
|
2714
2365
|
/**
|
|
2715
|
-
*
|
|
2366
|
+
* Check if a project exists (has any resources)
|
|
2716
2367
|
*/
|
|
2717
|
-
declare const
|
|
2718
|
-
scopes: GraphScopeConfig;
|
|
2719
|
-
}) => Promise<boolean>;
|
|
2720
|
-
|
|
2368
|
+
declare const projectExists: (db: DatabaseClient) => (params: ProjectScopeConfig) => Promise<boolean>;
|
|
2721
2369
|
/**
|
|
2722
|
-
*
|
|
2370
|
+
* Count total projects for a tenant
|
|
2723
2371
|
*/
|
|
2724
|
-
declare const
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
taskId: string;
|
|
2728
|
-
toolCallId?: string | null;
|
|
2729
|
-
artifact: Artifact;
|
|
2730
|
-
}) => Promise<{
|
|
2731
|
-
created: boolean;
|
|
2732
|
-
existing?: any;
|
|
2733
|
-
}>;
|
|
2372
|
+
declare const countProjects: (db: DatabaseClient) => (params: {
|
|
2373
|
+
tenantId: string;
|
|
2374
|
+
}) => Promise<number>;
|
|
2734
2375
|
/**
|
|
2735
|
-
*
|
|
2376
|
+
* Get a single project by ID
|
|
2736
2377
|
*/
|
|
2737
|
-
declare const
|
|
2378
|
+
declare const getProject: (db: DatabaseClient) => (params: {
|
|
2738
2379
|
scopes: ProjectScopeConfig;
|
|
2739
|
-
|
|
2740
|
-
taskId?: string | null;
|
|
2741
|
-
toolCallId?: string | null;
|
|
2742
|
-
artifacts: Artifact[];
|
|
2743
|
-
}) => Promise<void>;
|
|
2380
|
+
}) => Promise<ProjectSelect | null>;
|
|
2744
2381
|
/**
|
|
2745
|
-
*
|
|
2746
|
-
* At least one of taskId, toolCallId, or artifactId must be provided.
|
|
2382
|
+
* Create a new project
|
|
2747
2383
|
*/
|
|
2748
|
-
declare const
|
|
2749
|
-
scopes: ProjectScopeConfig;
|
|
2750
|
-
taskId?: string;
|
|
2751
|
-
toolCallId?: string;
|
|
2752
|
-
artifactId?: string;
|
|
2753
|
-
}) => Promise<Artifact[]>;
|
|
2384
|
+
declare const createProject: (db: DatabaseClient) => (params: ProjectInsert) => Promise<ProjectSelect>;
|
|
2754
2385
|
/**
|
|
2755
|
-
*
|
|
2386
|
+
* Update an existing project
|
|
2756
2387
|
*/
|
|
2757
|
-
declare const
|
|
2388
|
+
declare const updateProject: (db: DatabaseClient) => (params: {
|
|
2758
2389
|
scopes: ProjectScopeConfig;
|
|
2759
|
-
|
|
2760
|
-
}) => Promise<
|
|
2390
|
+
data: ProjectUpdate;
|
|
2391
|
+
}) => Promise<ProjectSelect | null>;
|
|
2761
2392
|
/**
|
|
2762
|
-
*
|
|
2393
|
+
* Check if a project exists in the projects table
|
|
2763
2394
|
*/
|
|
2764
|
-
declare const
|
|
2395
|
+
declare const projectExistsInTable: (db: DatabaseClient) => (params: {
|
|
2765
2396
|
scopes: ProjectScopeConfig;
|
|
2766
|
-
taskId: string;
|
|
2767
2397
|
}) => Promise<boolean>;
|
|
2768
2398
|
/**
|
|
2769
|
-
*
|
|
2399
|
+
* Check if a project has any resources (used before deletion)
|
|
2770
2400
|
*/
|
|
2771
|
-
declare const
|
|
2772
|
-
scopes: ProjectScopeConfig;
|
|
2773
|
-
contextId: string;
|
|
2774
|
-
}) => Promise<boolean>;
|
|
2401
|
+
declare const projectHasResources: (db: DatabaseClient) => (params: ProjectScopeConfig) => Promise<boolean>;
|
|
2775
2402
|
/**
|
|
2776
|
-
*
|
|
2403
|
+
* Delete a project (with validation for existing resources)
|
|
2777
2404
|
*/
|
|
2778
|
-
declare const
|
|
2405
|
+
declare const deleteProject: (db: DatabaseClient) => (params: {
|
|
2779
2406
|
scopes: ProjectScopeConfig;
|
|
2780
|
-
|
|
2781
|
-
}) => Promise<number>;
|
|
2407
|
+
}) => Promise<boolean>;
|
|
2782
2408
|
|
|
2783
|
-
declare const
|
|
2784
|
-
scopes:
|
|
2785
|
-
|
|
2409
|
+
declare const getAgentRelationById: (db: DatabaseClient) => (params: {
|
|
2410
|
+
scopes: GraphScopeConfig;
|
|
2411
|
+
relationId: string;
|
|
2786
2412
|
}) => Promise<{
|
|
2787
2413
|
tenantId: string;
|
|
2788
2414
|
projectId: string;
|
|
2789
2415
|
id: string;
|
|
2416
|
+
graphId: string;
|
|
2790
2417
|
createdAt: string;
|
|
2791
2418
|
updatedAt: string;
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
role: string;
|
|
2797
|
-
fromAgentId: string | null;
|
|
2798
|
-
toAgentId: string | null;
|
|
2799
|
-
fromExternalAgentId: string | null;
|
|
2800
|
-
toExternalAgentId: string | null;
|
|
2801
|
-
visibility: string;
|
|
2802
|
-
messageType: string;
|
|
2803
|
-
taskId: string | null;
|
|
2804
|
-
parentMessageId: string | null;
|
|
2805
|
-
a2aTaskId: string | null;
|
|
2806
|
-
a2aSessionId: string | null;
|
|
2419
|
+
sourceSubAgentId: string;
|
|
2420
|
+
targetSubAgentId: string | null;
|
|
2421
|
+
externalSubAgentId: string | null;
|
|
2422
|
+
relationType: string | null;
|
|
2807
2423
|
} | undefined>;
|
|
2808
|
-
declare const
|
|
2809
|
-
scopes:
|
|
2810
|
-
pagination
|
|
2424
|
+
declare const listAgentRelations: (db: DatabaseClient) => (params: {
|
|
2425
|
+
scopes: GraphScopeConfig;
|
|
2426
|
+
pagination?: PaginationConfig;
|
|
2427
|
+
}) => Promise<{
|
|
2428
|
+
data: {
|
|
2429
|
+
createdAt: string;
|
|
2430
|
+
updatedAt: string;
|
|
2431
|
+
sourceSubAgentId: string;
|
|
2432
|
+
targetSubAgentId: string | null;
|
|
2433
|
+
externalSubAgentId: string | null;
|
|
2434
|
+
relationType: string | null;
|
|
2435
|
+
graphId: string;
|
|
2436
|
+
projectId: string;
|
|
2437
|
+
tenantId: string;
|
|
2438
|
+
id: string;
|
|
2439
|
+
}[];
|
|
2440
|
+
pagination: {
|
|
2441
|
+
page: number;
|
|
2442
|
+
limit: number;
|
|
2443
|
+
total: number;
|
|
2444
|
+
pages: number;
|
|
2445
|
+
};
|
|
2446
|
+
}>;
|
|
2447
|
+
declare const getAgentRelations: (db: DatabaseClient) => (params: {
|
|
2448
|
+
scopes: AgentScopeConfig;
|
|
2811
2449
|
}) => Promise<{
|
|
2450
|
+
tenantId: string;
|
|
2451
|
+
projectId: string;
|
|
2452
|
+
id: string;
|
|
2453
|
+
graphId: string;
|
|
2812
2454
|
createdAt: string;
|
|
2813
2455
|
updatedAt: string;
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
messageType: string;
|
|
2823
|
-
agentId: string | null;
|
|
2824
|
-
taskId: string | null;
|
|
2825
|
-
parentMessageId: string | null;
|
|
2826
|
-
a2aTaskId: string | null;
|
|
2827
|
-
a2aSessionId: string | null;
|
|
2828
|
-
metadata: MessageMetadata | null;
|
|
2829
|
-
projectId: string;
|
|
2456
|
+
sourceSubAgentId: string;
|
|
2457
|
+
targetSubAgentId: string | null;
|
|
2458
|
+
externalSubAgentId: string | null;
|
|
2459
|
+
relationType: string | null;
|
|
2460
|
+
}[]>;
|
|
2461
|
+
declare const getAgentRelationsByGraph: (db: DatabaseClient) => (params: {
|
|
2462
|
+
scopes: GraphScopeConfig;
|
|
2463
|
+
}) => Promise<{
|
|
2830
2464
|
tenantId: string;
|
|
2465
|
+
projectId: string;
|
|
2831
2466
|
id: string;
|
|
2467
|
+
graphId: string;
|
|
2468
|
+
createdAt: string;
|
|
2469
|
+
updatedAt: string;
|
|
2470
|
+
sourceSubAgentId: string;
|
|
2471
|
+
targetSubAgentId: string | null;
|
|
2472
|
+
externalSubAgentId: string | null;
|
|
2473
|
+
relationType: string | null;
|
|
2832
2474
|
}[]>;
|
|
2833
|
-
declare const
|
|
2834
|
-
scopes:
|
|
2835
|
-
|
|
2836
|
-
pagination
|
|
2475
|
+
declare const getAgentRelationsBySource: (db: DatabaseClient) => (params: {
|
|
2476
|
+
scopes: GraphScopeConfig;
|
|
2477
|
+
sourceSubAgentId: string;
|
|
2478
|
+
pagination?: PaginationConfig;
|
|
2479
|
+
}) => Promise<{
|
|
2480
|
+
data: {
|
|
2481
|
+
createdAt: string;
|
|
2482
|
+
updatedAt: string;
|
|
2483
|
+
sourceSubAgentId: string;
|
|
2484
|
+
targetSubAgentId: string | null;
|
|
2485
|
+
externalSubAgentId: string | null;
|
|
2486
|
+
relationType: string | null;
|
|
2487
|
+
graphId: string;
|
|
2488
|
+
projectId: string;
|
|
2489
|
+
tenantId: string;
|
|
2490
|
+
id: string;
|
|
2491
|
+
}[];
|
|
2492
|
+
pagination: {
|
|
2493
|
+
page: number;
|
|
2494
|
+
limit: number;
|
|
2495
|
+
total: number;
|
|
2496
|
+
pages: number;
|
|
2497
|
+
};
|
|
2498
|
+
}>;
|
|
2499
|
+
declare const getAgentRelationsByTarget: (db: DatabaseClient) => (params: {
|
|
2500
|
+
scopes: GraphScopeConfig;
|
|
2501
|
+
targetSubAgentId: string;
|
|
2502
|
+
pagination?: PaginationConfig;
|
|
2503
|
+
}) => Promise<{
|
|
2504
|
+
data: {
|
|
2505
|
+
createdAt: string;
|
|
2506
|
+
updatedAt: string;
|
|
2507
|
+
sourceSubAgentId: string;
|
|
2508
|
+
targetSubAgentId: string | null;
|
|
2509
|
+
externalSubAgentId: string | null;
|
|
2510
|
+
relationType: string | null;
|
|
2511
|
+
graphId: string;
|
|
2512
|
+
projectId: string;
|
|
2513
|
+
tenantId: string;
|
|
2514
|
+
id: string;
|
|
2515
|
+
}[];
|
|
2516
|
+
pagination: {
|
|
2517
|
+
page: number;
|
|
2518
|
+
limit: number;
|
|
2519
|
+
total: number;
|
|
2520
|
+
pages: number;
|
|
2521
|
+
};
|
|
2522
|
+
}>;
|
|
2523
|
+
declare const getExternalAgentRelations: (db: DatabaseClient) => (params: {
|
|
2524
|
+
scopes: GraphScopeConfig;
|
|
2525
|
+
externalSubAgentId: string;
|
|
2526
|
+
pagination?: PaginationConfig;
|
|
2527
|
+
}) => Promise<{
|
|
2528
|
+
data: {
|
|
2529
|
+
createdAt: string;
|
|
2530
|
+
updatedAt: string;
|
|
2531
|
+
sourceSubAgentId: string;
|
|
2532
|
+
targetSubAgentId: string | null;
|
|
2533
|
+
externalSubAgentId: string | null;
|
|
2534
|
+
relationType: string | null;
|
|
2535
|
+
graphId: string;
|
|
2536
|
+
projectId: string;
|
|
2537
|
+
tenantId: string;
|
|
2538
|
+
id: string;
|
|
2539
|
+
}[];
|
|
2540
|
+
pagination: {
|
|
2541
|
+
page: number;
|
|
2542
|
+
limit: number;
|
|
2543
|
+
total: number;
|
|
2544
|
+
pages: number;
|
|
2545
|
+
};
|
|
2546
|
+
}>;
|
|
2547
|
+
declare const getRelatedAgentsForGraph: (db: DatabaseClient) => (params: {
|
|
2548
|
+
scopes: GraphScopeConfig;
|
|
2549
|
+
subAgentId: string;
|
|
2837
2550
|
}) => Promise<{
|
|
2551
|
+
internalRelations: {
|
|
2552
|
+
id: string;
|
|
2553
|
+
name: string;
|
|
2554
|
+
description: string;
|
|
2555
|
+
relationType: string | null;
|
|
2556
|
+
}[];
|
|
2557
|
+
externalRelations: {
|
|
2558
|
+
id: string;
|
|
2559
|
+
relationType: string | null;
|
|
2560
|
+
externalAgent: {
|
|
2561
|
+
id: string;
|
|
2562
|
+
name: string;
|
|
2563
|
+
description: string;
|
|
2564
|
+
baseUrl: string;
|
|
2565
|
+
};
|
|
2566
|
+
}[];
|
|
2567
|
+
}>;
|
|
2568
|
+
declare const createSubAgentRelation: (db: DatabaseClient) => (params: AgentRelationInsert) => Promise<{
|
|
2569
|
+
tenantId: string;
|
|
2570
|
+
projectId: string;
|
|
2571
|
+
id: string;
|
|
2572
|
+
graphId: string;
|
|
2838
2573
|
createdAt: string;
|
|
2839
2574
|
updatedAt: string;
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
projectId: string;
|
|
2575
|
+
sourceSubAgentId: string;
|
|
2576
|
+
targetSubAgentId: string | null;
|
|
2577
|
+
externalSubAgentId: string | null;
|
|
2578
|
+
relationType: string | null;
|
|
2579
|
+
}>;
|
|
2580
|
+
/**
|
|
2581
|
+
* Check if agent relation exists by graph, source, target, and relation type
|
|
2582
|
+
*/
|
|
2583
|
+
declare const getAgentRelationByParams: (db: DatabaseClient) => (params: {
|
|
2584
|
+
scopes: GraphScopeConfig;
|
|
2585
|
+
sourceSubAgentId: string;
|
|
2586
|
+
targetSubAgentId?: string;
|
|
2587
|
+
externalSubAgentId?: string;
|
|
2588
|
+
relationType: string;
|
|
2589
|
+
}) => Promise<{
|
|
2856
2590
|
tenantId: string;
|
|
2591
|
+
projectId: string;
|
|
2857
2592
|
id: string;
|
|
2858
|
-
|
|
2859
|
-
declare const getMessagesByTask: (db: DatabaseClient) => (params: {
|
|
2860
|
-
scopes: ProjectScopeConfig;
|
|
2861
|
-
taskId: string;
|
|
2862
|
-
pagination: PaginationConfig;
|
|
2863
|
-
}) => Promise<{
|
|
2593
|
+
graphId: string;
|
|
2864
2594
|
createdAt: string;
|
|
2865
2595
|
updatedAt: string;
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
agentId: string | null;
|
|
2876
|
-
taskId: string | null;
|
|
2877
|
-
parentMessageId: string | null;
|
|
2878
|
-
a2aTaskId: string | null;
|
|
2879
|
-
a2aSessionId: string | null;
|
|
2880
|
-
metadata: MessageMetadata | null;
|
|
2881
|
-
projectId: string;
|
|
2596
|
+
sourceSubAgentId: string;
|
|
2597
|
+
targetSubAgentId: string | null;
|
|
2598
|
+
externalSubAgentId: string | null;
|
|
2599
|
+
relationType: string | null;
|
|
2600
|
+
} | undefined>;
|
|
2601
|
+
/**
|
|
2602
|
+
* Upsert agent relation (create if it doesn't exist, no-op if it does)
|
|
2603
|
+
*/
|
|
2604
|
+
declare const upsertAgentRelation: (db: DatabaseClient) => (params: AgentRelationInsert) => Promise<{
|
|
2882
2605
|
tenantId: string;
|
|
2606
|
+
projectId: string;
|
|
2883
2607
|
id: string;
|
|
2884
|
-
|
|
2885
|
-
declare const getVisibleMessages: (db: DatabaseClient) => (params: {
|
|
2886
|
-
scopes: ProjectScopeConfig;
|
|
2887
|
-
conversationId: string;
|
|
2888
|
-
visibility?: MessageVisibility[];
|
|
2889
|
-
pagination: PaginationConfig;
|
|
2890
|
-
}) => Promise<{
|
|
2608
|
+
graphId: string;
|
|
2891
2609
|
createdAt: string;
|
|
2892
2610
|
updatedAt: string;
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
content: MessageContent;
|
|
2900
|
-
visibility: string;
|
|
2901
|
-
messageType: string;
|
|
2902
|
-
agentId: string | null;
|
|
2903
|
-
taskId: string | null;
|
|
2904
|
-
parentMessageId: string | null;
|
|
2905
|
-
a2aTaskId: string | null;
|
|
2906
|
-
a2aSessionId: string | null;
|
|
2907
|
-
metadata: MessageMetadata | null;
|
|
2908
|
-
projectId: string;
|
|
2611
|
+
sourceSubAgentId: string;
|
|
2612
|
+
targetSubAgentId: string | null;
|
|
2613
|
+
externalSubAgentId: string | null;
|
|
2614
|
+
relationType: string | null;
|
|
2615
|
+
}>;
|
|
2616
|
+
declare const createExternalAgentRelation: (db: DatabaseClient) => (params: ExternalAgentRelationInsert) => Promise<{
|
|
2909
2617
|
tenantId: string;
|
|
2618
|
+
projectId: string;
|
|
2910
2619
|
id: string;
|
|
2911
|
-
|
|
2912
|
-
|
|
2620
|
+
graphId: string;
|
|
2621
|
+
createdAt: string;
|
|
2622
|
+
updatedAt: string;
|
|
2623
|
+
sourceSubAgentId: string;
|
|
2624
|
+
targetSubAgentId: string | null;
|
|
2625
|
+
externalSubAgentId: string | null;
|
|
2626
|
+
relationType: string | null;
|
|
2627
|
+
}>;
|
|
2628
|
+
declare const updateAgentRelation: (db: DatabaseClient) => (params: {
|
|
2629
|
+
scopes: GraphScopeConfig;
|
|
2630
|
+
relationId: string;
|
|
2631
|
+
data: AgentRelationUpdate;
|
|
2632
|
+
}) => Promise<{
|
|
2913
2633
|
tenantId: string;
|
|
2914
2634
|
projectId: string;
|
|
2915
2635
|
id: string;
|
|
2636
|
+
graphId: string;
|
|
2916
2637
|
createdAt: string;
|
|
2917
2638
|
updatedAt: string;
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
role: string;
|
|
2923
|
-
fromAgentId: string | null;
|
|
2924
|
-
toAgentId: string | null;
|
|
2925
|
-
fromExternalAgentId: string | null;
|
|
2926
|
-
toExternalAgentId: string | null;
|
|
2927
|
-
visibility: string;
|
|
2928
|
-
messageType: string;
|
|
2929
|
-
taskId: string | null;
|
|
2930
|
-
parentMessageId: string | null;
|
|
2931
|
-
a2aTaskId: string | null;
|
|
2932
|
-
a2aSessionId: string | null;
|
|
2639
|
+
sourceSubAgentId: string;
|
|
2640
|
+
targetSubAgentId: string | null;
|
|
2641
|
+
externalSubAgentId: string | null;
|
|
2642
|
+
relationType: string | null;
|
|
2933
2643
|
}>;
|
|
2934
|
-
declare const
|
|
2935
|
-
scopes:
|
|
2936
|
-
|
|
2937
|
-
|
|
2644
|
+
declare const deleteSubAgentRelation: (db: DatabaseClient) => (params: {
|
|
2645
|
+
scopes: GraphScopeConfig;
|
|
2646
|
+
relationId: string;
|
|
2647
|
+
}) => Promise<boolean>;
|
|
2648
|
+
declare const deleteAgentRelationsByGraph: (db: DatabaseClient) => (params: {
|
|
2649
|
+
scopes: GraphScopeConfig;
|
|
2650
|
+
}) => Promise<boolean>;
|
|
2651
|
+
declare const createAgentToolRelation: (db: DatabaseClient) => (params: {
|
|
2652
|
+
scopes: GraphScopeConfig;
|
|
2653
|
+
relationId?: string;
|
|
2654
|
+
data: {
|
|
2655
|
+
subAgentId: string;
|
|
2656
|
+
toolId: string;
|
|
2657
|
+
selectedTools?: string[] | null;
|
|
2658
|
+
headers?: Record<string, string> | null;
|
|
2659
|
+
};
|
|
2938
2660
|
}) => Promise<{
|
|
2939
2661
|
tenantId: string;
|
|
2940
2662
|
projectId: string;
|
|
2941
2663
|
id: string;
|
|
2664
|
+
graphId: string;
|
|
2942
2665
|
createdAt: string;
|
|
2943
2666
|
updatedAt: string;
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
role: string;
|
|
2949
|
-
fromAgentId: string | null;
|
|
2950
|
-
toAgentId: string | null;
|
|
2951
|
-
fromExternalAgentId: string | null;
|
|
2952
|
-
toExternalAgentId: string | null;
|
|
2953
|
-
visibility: string;
|
|
2954
|
-
messageType: string;
|
|
2955
|
-
taskId: string | null;
|
|
2956
|
-
parentMessageId: string | null;
|
|
2957
|
-
a2aTaskId: string | null;
|
|
2958
|
-
a2aSessionId: string | null;
|
|
2667
|
+
headers: Record<string, string> | null;
|
|
2668
|
+
toolId: string;
|
|
2669
|
+
selectedTools: string[] | null;
|
|
2670
|
+
subAgentId: string;
|
|
2959
2671
|
}>;
|
|
2960
|
-
declare const
|
|
2961
|
-
scopes:
|
|
2962
|
-
|
|
2672
|
+
declare const updateAgentToolRelation: (db: DatabaseClient) => (params: {
|
|
2673
|
+
scopes: GraphScopeConfig;
|
|
2674
|
+
relationId: string;
|
|
2675
|
+
data: AgentToolRelationUpdate;
|
|
2963
2676
|
}) => Promise<{
|
|
2964
2677
|
tenantId: string;
|
|
2965
2678
|
projectId: string;
|
|
2966
2679
|
id: string;
|
|
2680
|
+
graphId: string;
|
|
2967
2681
|
createdAt: string;
|
|
2968
2682
|
updatedAt: string;
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
role: string;
|
|
2974
|
-
fromAgentId: string | null;
|
|
2975
|
-
toAgentId: string | null;
|
|
2976
|
-
fromExternalAgentId: string | null;
|
|
2977
|
-
toExternalAgentId: string | null;
|
|
2978
|
-
visibility: string;
|
|
2979
|
-
messageType: string;
|
|
2980
|
-
taskId: string | null;
|
|
2981
|
-
parentMessageId: string | null;
|
|
2982
|
-
a2aTaskId: string | null;
|
|
2983
|
-
a2aSessionId: string | null;
|
|
2683
|
+
headers: Record<string, string> | null;
|
|
2684
|
+
toolId: string;
|
|
2685
|
+
selectedTools: string[] | null;
|
|
2686
|
+
subAgentId: string;
|
|
2984
2687
|
}>;
|
|
2985
|
-
declare const
|
|
2986
|
-
scopes:
|
|
2987
|
-
|
|
2988
|
-
}) => Promise<
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
2688
|
+
declare const deleteAgentToolRelation: (db: DatabaseClient) => (params: {
|
|
2689
|
+
scopes: GraphScopeConfig;
|
|
2690
|
+
relationId: string;
|
|
2691
|
+
}) => Promise<boolean>;
|
|
2692
|
+
declare const deleteAgentToolRelationByAgent: (db: DatabaseClient) => (params: {
|
|
2693
|
+
scopes: AgentScopeConfig;
|
|
2694
|
+
}) => Promise<boolean>;
|
|
2695
|
+
declare const getAgentToolRelationById: (db: DatabaseClient) => (params: {
|
|
2696
|
+
scopes: AgentScopeConfig;
|
|
2697
|
+
relationId: string;
|
|
2698
|
+
}) => Promise<{
|
|
2699
|
+
tenantId: string;
|
|
2700
|
+
projectId: string;
|
|
2701
|
+
id: string;
|
|
2702
|
+
graphId: string;
|
|
2703
|
+
createdAt: string;
|
|
2704
|
+
updatedAt: string;
|
|
2705
|
+
headers: Record<string, string> | null;
|
|
2706
|
+
toolId: string;
|
|
2707
|
+
selectedTools: string[] | null;
|
|
2708
|
+
subAgentId: string;
|
|
2709
|
+
} | undefined>;
|
|
2710
|
+
declare const getAgentToolRelationByAgent: (db: DatabaseClient) => (params: {
|
|
2711
|
+
scopes: AgentScopeConfig;
|
|
2712
|
+
pagination?: PaginationConfig;
|
|
2713
|
+
}) => Promise<{
|
|
2714
|
+
data: {
|
|
2715
|
+
createdAt: string;
|
|
2716
|
+
updatedAt: string;
|
|
2717
|
+
toolId: string;
|
|
2718
|
+
selectedTools: string[] | null;
|
|
2719
|
+
headers: Record<string, string> | null;
|
|
2720
|
+
subAgentId: string;
|
|
2721
|
+
graphId: string;
|
|
2722
|
+
projectId: string;
|
|
2723
|
+
tenantId: string;
|
|
2724
|
+
id: string;
|
|
2725
|
+
}[];
|
|
2726
|
+
pagination: {
|
|
2727
|
+
page: number;
|
|
2728
|
+
limit: number;
|
|
2729
|
+
total: number;
|
|
2730
|
+
pages: number;
|
|
2731
|
+
};
|
|
2732
|
+
}>;
|
|
2733
|
+
declare const getAgentToolRelationByTool: (db: DatabaseClient) => (params: {
|
|
2734
|
+
scopes: GraphScopeConfig;
|
|
2735
|
+
toolId: string;
|
|
2736
|
+
pagination?: PaginationConfig;
|
|
2737
|
+
}) => Promise<{
|
|
2738
|
+
data: {
|
|
2739
|
+
createdAt: string;
|
|
2740
|
+
updatedAt: string;
|
|
2741
|
+
toolId: string;
|
|
2742
|
+
selectedTools: string[] | null;
|
|
2743
|
+
headers: Record<string, string> | null;
|
|
2744
|
+
subAgentId: string;
|
|
2745
|
+
graphId: string;
|
|
2746
|
+
projectId: string;
|
|
2747
|
+
tenantId: string;
|
|
2748
|
+
id: string;
|
|
2749
|
+
}[];
|
|
2750
|
+
pagination: {
|
|
2751
|
+
page: number;
|
|
2752
|
+
limit: number;
|
|
2753
|
+
total: number;
|
|
2754
|
+
pages: number;
|
|
2755
|
+
};
|
|
2756
|
+
}>;
|
|
2757
|
+
declare const listAgentToolRelations: (db: DatabaseClient) => (params: {
|
|
2758
|
+
scopes: GraphScopeConfig;
|
|
2759
|
+
pagination?: PaginationConfig;
|
|
2760
|
+
}) => Promise<{
|
|
2761
|
+
data: {
|
|
2762
|
+
createdAt: string;
|
|
2763
|
+
updatedAt: string;
|
|
2764
|
+
toolId: string;
|
|
2765
|
+
selectedTools: string[] | null;
|
|
2766
|
+
headers: Record<string, string> | null;
|
|
2767
|
+
subAgentId: string;
|
|
2768
|
+
graphId: string;
|
|
2769
|
+
projectId: string;
|
|
2770
|
+
tenantId: string;
|
|
2771
|
+
id: string;
|
|
2772
|
+
}[];
|
|
2773
|
+
pagination: {
|
|
2774
|
+
page: number;
|
|
2775
|
+
limit: number;
|
|
2776
|
+
total: number;
|
|
2777
|
+
pages: number;
|
|
2778
|
+
};
|
|
2779
|
+
}>;
|
|
2780
|
+
declare const getToolsForAgent: (db: DatabaseClient) => (params: {
|
|
2781
|
+
scopes: AgentScopeConfig;
|
|
2782
|
+
pagination?: PaginationConfig;
|
|
2783
|
+
}) => Promise<{
|
|
2784
|
+
data: {
|
|
2785
|
+
id: string;
|
|
2786
|
+
tenantId: string;
|
|
2787
|
+
subAgentId: string;
|
|
2788
|
+
toolId: string;
|
|
2789
|
+
selectedTools: string[] | null;
|
|
2790
|
+
headers: Record<string, string> | null;
|
|
2791
|
+
createdAt: string;
|
|
2792
|
+
updatedAt: string;
|
|
2793
|
+
tool: {
|
|
2794
|
+
id: string;
|
|
2795
|
+
name: string;
|
|
2796
|
+
description: string | null;
|
|
2797
|
+
config: {
|
|
2798
|
+
type: "mcp";
|
|
2799
|
+
mcp: ToolMcpConfig;
|
|
2800
|
+
} | {
|
|
2801
|
+
type: "function";
|
|
2802
|
+
function?: {
|
|
2803
|
+
inputSchema: Record<string, unknown>;
|
|
2804
|
+
executeCode: string;
|
|
2805
|
+
dependencies: Record<string, unknown>;
|
|
2806
|
+
};
|
|
2807
|
+
};
|
|
2808
|
+
functionId: string | null;
|
|
2809
|
+
createdAt: string;
|
|
2810
|
+
updatedAt: string;
|
|
2811
|
+
capabilities: ToolServerCapabilities | null;
|
|
2812
|
+
lastError: string | null;
|
|
2813
|
+
credentialReferenceId: string | null;
|
|
2814
|
+
tenantId: string;
|
|
2815
|
+
projectId: string;
|
|
2816
|
+
headers: Record<string, string> | null;
|
|
2817
|
+
imageUrl: string | null;
|
|
2818
|
+
};
|
|
2819
|
+
}[];
|
|
2820
|
+
pagination: {
|
|
2821
|
+
page: number;
|
|
2822
|
+
limit: number;
|
|
2823
|
+
total: number;
|
|
2824
|
+
pages: number;
|
|
2825
|
+
};
|
|
2826
|
+
}>;
|
|
2827
|
+
declare const getAgentsForTool: (db: DatabaseClient) => (params: {
|
|
2828
|
+
scopes: GraphScopeConfig;
|
|
2829
|
+
toolId: string;
|
|
2830
|
+
pagination?: PaginationConfig;
|
|
2831
|
+
}) => Promise<{
|
|
2832
|
+
data: {
|
|
2833
|
+
id: string;
|
|
2834
|
+
tenantId: string;
|
|
2835
|
+
subAgentId: string;
|
|
2836
|
+
toolId: string;
|
|
2837
|
+
selectedTools: string[] | null;
|
|
2838
|
+
headers: Record<string, string> | null;
|
|
2839
|
+
createdAt: string;
|
|
2840
|
+
updatedAt: string;
|
|
2841
|
+
subAgent: {
|
|
2842
|
+
id: string;
|
|
2843
|
+
name: string;
|
|
2844
|
+
description: string;
|
|
2845
|
+
prompt: string;
|
|
2846
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
2847
|
+
models: {
|
|
2848
|
+
base?: {
|
|
2849
|
+
model?: string | undefined;
|
|
2850
|
+
providerOptions?: Record<string, any> | undefined;
|
|
2851
|
+
} | undefined;
|
|
2852
|
+
structuredOutput?: {
|
|
2853
|
+
model?: string | undefined;
|
|
2854
|
+
providerOptions?: Record<string, any> | undefined;
|
|
2855
|
+
} | undefined;
|
|
2856
|
+
summarizer?: {
|
|
2857
|
+
model?: string | undefined;
|
|
2858
|
+
providerOptions?: Record<string, any> | undefined;
|
|
2859
|
+
} | undefined;
|
|
2860
|
+
} | null;
|
|
2861
|
+
stopWhen: {
|
|
2862
|
+
stepCountIs?: number | undefined;
|
|
2863
|
+
} | null;
|
|
2864
|
+
createdAt: string;
|
|
2865
|
+
updatedAt: string;
|
|
2866
|
+
};
|
|
2867
|
+
}[];
|
|
2868
|
+
pagination: {
|
|
2869
|
+
page: number;
|
|
2870
|
+
limit: number;
|
|
2871
|
+
total: number;
|
|
2872
|
+
pages: number;
|
|
2873
|
+
};
|
|
2874
|
+
}>;
|
|
2875
|
+
declare const validateInternalSubAgent: (db: DatabaseClient) => (params: {
|
|
2876
|
+
scopes: AgentScopeConfig;
|
|
2877
|
+
}) => Promise<boolean>;
|
|
2878
|
+
declare const validateExternalAgent: (db: DatabaseClient) => (params: {
|
|
2879
|
+
scopes: AgentScopeConfig;
|
|
3018
2880
|
}) => Promise<boolean>;
|
|
3019
2881
|
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
2882
|
+
declare const getSubAgentById: (db: DatabaseClient) => (params: {
|
|
2883
|
+
scopes: GraphScopeConfig;
|
|
2884
|
+
subAgentId: string;
|
|
2885
|
+
}) => Promise<{
|
|
3024
2886
|
tenantId: string;
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
2887
|
+
projectId: string;
|
|
2888
|
+
id: string;
|
|
2889
|
+
name: string;
|
|
2890
|
+
description: string;
|
|
2891
|
+
prompt: string;
|
|
2892
|
+
graphId: string;
|
|
2893
|
+
createdAt: string;
|
|
2894
|
+
updatedAt: string;
|
|
2895
|
+
models: {
|
|
2896
|
+
base?: {
|
|
2897
|
+
model?: string | undefined;
|
|
2898
|
+
providerOptions?: Record<string, any> | undefined;
|
|
2899
|
+
} | undefined;
|
|
2900
|
+
structuredOutput?: {
|
|
2901
|
+
model?: string | undefined;
|
|
2902
|
+
providerOptions?: Record<string, any> | undefined;
|
|
2903
|
+
} | undefined;
|
|
2904
|
+
summarizer?: {
|
|
2905
|
+
model?: string | undefined;
|
|
2906
|
+
providerOptions?: Record<string, any> | undefined;
|
|
2907
|
+
} | undefined;
|
|
2908
|
+
} | null;
|
|
2909
|
+
stopWhen: {
|
|
2910
|
+
stepCountIs?: number | undefined;
|
|
2911
|
+
} | null;
|
|
2912
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
2913
|
+
} | undefined>;
|
|
2914
|
+
declare const listSubAgents: (db: DatabaseClient) => (params: {
|
|
2915
|
+
scopes: GraphScopeConfig;
|
|
2916
|
+
}) => Promise<{
|
|
3030
2917
|
tenantId: string;
|
|
2918
|
+
projectId: string;
|
|
2919
|
+
id: string;
|
|
2920
|
+
name: string;
|
|
2921
|
+
description: string;
|
|
2922
|
+
prompt: string;
|
|
2923
|
+
graphId: string;
|
|
2924
|
+
createdAt: string;
|
|
2925
|
+
updatedAt: string;
|
|
2926
|
+
models: {
|
|
2927
|
+
base?: {
|
|
2928
|
+
model?: string | undefined;
|
|
2929
|
+
providerOptions?: Record<string, any> | undefined;
|
|
2930
|
+
} | undefined;
|
|
2931
|
+
structuredOutput?: {
|
|
2932
|
+
model?: string | undefined;
|
|
2933
|
+
providerOptions?: Record<string, any> | undefined;
|
|
2934
|
+
} | undefined;
|
|
2935
|
+
summarizer?: {
|
|
2936
|
+
model?: string | undefined;
|
|
2937
|
+
providerOptions?: Record<string, any> | undefined;
|
|
2938
|
+
} | undefined;
|
|
2939
|
+
} | null;
|
|
2940
|
+
stopWhen: {
|
|
2941
|
+
stepCountIs?: number | undefined;
|
|
2942
|
+
} | null;
|
|
2943
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
2944
|
+
}[]>;
|
|
2945
|
+
declare const listSubAgentsPaginated: (db: DatabaseClient) => (params: {
|
|
2946
|
+
scopes: GraphScopeConfig;
|
|
3031
2947
|
pagination?: PaginationConfig;
|
|
3032
2948
|
}) => Promise<{
|
|
3033
|
-
data:
|
|
3034
|
-
|
|
2949
|
+
data: {
|
|
2950
|
+
createdAt: string;
|
|
2951
|
+
updatedAt: string;
|
|
2952
|
+
prompt: string;
|
|
2953
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
2954
|
+
models: {
|
|
2955
|
+
base?: {
|
|
2956
|
+
model?: string | undefined;
|
|
2957
|
+
providerOptions?: Record<string, any> | undefined;
|
|
2958
|
+
} | undefined;
|
|
2959
|
+
structuredOutput?: {
|
|
2960
|
+
model?: string | undefined;
|
|
2961
|
+
providerOptions?: Record<string, any> | undefined;
|
|
2962
|
+
} | undefined;
|
|
2963
|
+
summarizer?: {
|
|
2964
|
+
model?: string | undefined;
|
|
2965
|
+
providerOptions?: Record<string, any> | undefined;
|
|
2966
|
+
} | undefined;
|
|
2967
|
+
} | null;
|
|
2968
|
+
stopWhen: {
|
|
2969
|
+
stepCountIs?: number | undefined;
|
|
2970
|
+
} | null;
|
|
2971
|
+
name: string;
|
|
2972
|
+
description: string;
|
|
2973
|
+
graphId: string;
|
|
2974
|
+
projectId: string;
|
|
2975
|
+
tenantId: string;
|
|
2976
|
+
id: string;
|
|
2977
|
+
}[];
|
|
2978
|
+
pagination: {
|
|
2979
|
+
page: number;
|
|
2980
|
+
limit: number;
|
|
2981
|
+
total: number;
|
|
2982
|
+
pages: number;
|
|
2983
|
+
};
|
|
3035
2984
|
}>;
|
|
3036
|
-
|
|
3037
|
-
* Get resource counts for a specific project
|
|
3038
|
-
*/
|
|
3039
|
-
declare const getProjectResourceCounts: (db: DatabaseClient) => (params: ProjectScopeConfig) => Promise<ProjectResourceCounts>;
|
|
3040
|
-
/**
|
|
3041
|
-
* Check if a project exists (has any resources)
|
|
3042
|
-
*/
|
|
3043
|
-
declare const projectExists: (db: DatabaseClient) => (params: ProjectScopeConfig) => Promise<boolean>;
|
|
3044
|
-
/**
|
|
3045
|
-
* Count total projects for a tenant
|
|
3046
|
-
*/
|
|
3047
|
-
declare const countProjects: (db: DatabaseClient) => (params: {
|
|
2985
|
+
declare const createSubAgent: (db: DatabaseClient) => (params: SubAgentInsert) => Promise<{
|
|
3048
2986
|
tenantId: string;
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
declare const
|
|
2987
|
+
projectId: string;
|
|
2988
|
+
id: string;
|
|
2989
|
+
name: string;
|
|
2990
|
+
description: string;
|
|
2991
|
+
prompt: string;
|
|
2992
|
+
graphId: string;
|
|
2993
|
+
createdAt: string;
|
|
2994
|
+
updatedAt: string;
|
|
2995
|
+
models: {
|
|
2996
|
+
base?: {
|
|
2997
|
+
model?: string | undefined;
|
|
2998
|
+
providerOptions?: Record<string, any> | undefined;
|
|
2999
|
+
} | undefined;
|
|
3000
|
+
structuredOutput?: {
|
|
3001
|
+
model?: string | undefined;
|
|
3002
|
+
providerOptions?: Record<string, any> | undefined;
|
|
3003
|
+
} | undefined;
|
|
3004
|
+
summarizer?: {
|
|
3005
|
+
model?: string | undefined;
|
|
3006
|
+
providerOptions?: Record<string, any> | undefined;
|
|
3007
|
+
} | undefined;
|
|
3008
|
+
} | null;
|
|
3009
|
+
stopWhen: {
|
|
3010
|
+
stepCountIs?: number | undefined;
|
|
3011
|
+
} | null;
|
|
3012
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
3013
|
+
}>;
|
|
3014
|
+
declare const updateSubAgent: (db: DatabaseClient) => (params: {
|
|
3015
|
+
scopes: GraphScopeConfig;
|
|
3016
|
+
subAgentId: string;
|
|
3017
|
+
data: SubAgentUpdate;
|
|
3018
|
+
}) => Promise<{
|
|
3019
|
+
tenantId: string;
|
|
3020
|
+
projectId: string;
|
|
3021
|
+
id: string;
|
|
3022
|
+
name: string;
|
|
3023
|
+
description: string;
|
|
3024
|
+
prompt: string;
|
|
3025
|
+
graphId: string;
|
|
3026
|
+
createdAt: string;
|
|
3027
|
+
updatedAt: string;
|
|
3028
|
+
models: {
|
|
3029
|
+
base?: {
|
|
3030
|
+
model?: string | undefined;
|
|
3031
|
+
providerOptions?: Record<string, any> | undefined;
|
|
3032
|
+
} | undefined;
|
|
3033
|
+
structuredOutput?: {
|
|
3034
|
+
model?: string | undefined;
|
|
3035
|
+
providerOptions?: Record<string, any> | undefined;
|
|
3036
|
+
} | undefined;
|
|
3037
|
+
summarizer?: {
|
|
3038
|
+
model?: string | undefined;
|
|
3039
|
+
providerOptions?: Record<string, any> | undefined;
|
|
3040
|
+
} | undefined;
|
|
3041
|
+
} | null;
|
|
3042
|
+
stopWhen: {
|
|
3043
|
+
stepCountIs?: number | undefined;
|
|
3044
|
+
} | null;
|
|
3045
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
3046
|
+
}>;
|
|
3077
3047
|
/**
|
|
3078
|
-
*
|
|
3048
|
+
* Upsert agent (create if it doesn't exist, update if it does)
|
|
3079
3049
|
*/
|
|
3080
|
-
declare const
|
|
3081
|
-
|
|
3050
|
+
declare const upsertSubAgent: (db: DatabaseClient) => (params: {
|
|
3051
|
+
data: SubAgentInsert;
|
|
3052
|
+
}) => Promise<SubAgentSelect>;
|
|
3053
|
+
declare const deleteSubAgent: (db: DatabaseClient) => (params: {
|
|
3054
|
+
scopes: GraphScopeConfig;
|
|
3055
|
+
subAgentId: string;
|
|
3082
3056
|
}) => Promise<boolean>;
|
|
3057
|
+
declare const getSubAgentsByIds: (db: DatabaseClient) => (params: {
|
|
3058
|
+
scopes: GraphScopeConfig;
|
|
3059
|
+
subAgentIds: string[];
|
|
3060
|
+
}) => Promise<{
|
|
3061
|
+
createdAt: string;
|
|
3062
|
+
updatedAt: string;
|
|
3063
|
+
prompt: string;
|
|
3064
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
3065
|
+
models: {
|
|
3066
|
+
base?: {
|
|
3067
|
+
model?: string | undefined;
|
|
3068
|
+
providerOptions?: Record<string, any> | undefined;
|
|
3069
|
+
} | undefined;
|
|
3070
|
+
structuredOutput?: {
|
|
3071
|
+
model?: string | undefined;
|
|
3072
|
+
providerOptions?: Record<string, any> | undefined;
|
|
3073
|
+
} | undefined;
|
|
3074
|
+
summarizer?: {
|
|
3075
|
+
model?: string | undefined;
|
|
3076
|
+
providerOptions?: Record<string, any> | undefined;
|
|
3077
|
+
} | undefined;
|
|
3078
|
+
} | null;
|
|
3079
|
+
stopWhen: {
|
|
3080
|
+
stepCountIs?: number | undefined;
|
|
3081
|
+
} | null;
|
|
3082
|
+
name: string;
|
|
3083
|
+
description: string;
|
|
3084
|
+
graphId: string;
|
|
3085
|
+
projectId: string;
|
|
3086
|
+
tenantId: string;
|
|
3087
|
+
id: string;
|
|
3088
|
+
}[]>;
|
|
3083
3089
|
|
|
3084
3090
|
declare const createTask: (db: DatabaseClient) => (params: TaskInsert) => Promise<{
|
|
3085
3091
|
tenantId: string;
|
|
@@ -3091,7 +3097,7 @@ declare const createTask: (db: DatabaseClient) => (params: TaskInsert) => Promis
|
|
|
3091
3097
|
status: string;
|
|
3092
3098
|
metadata: TaskMetadataConfig | null;
|
|
3093
3099
|
contextId: string;
|
|
3094
|
-
|
|
3100
|
+
subAgentId: string;
|
|
3095
3101
|
}>;
|
|
3096
3102
|
declare const getTask: (db: DatabaseClient) => (params: {
|
|
3097
3103
|
id: string;
|
|
@@ -3112,7 +3118,7 @@ declare const updateTask: (db: DatabaseClient) => (params: {
|
|
|
3112
3118
|
status: string;
|
|
3113
3119
|
metadata: TaskMetadataConfig | null;
|
|
3114
3120
|
contextId: string;
|
|
3115
|
-
|
|
3121
|
+
subAgentId: string;
|
|
3116
3122
|
}>;
|
|
3117
3123
|
declare const listTaskIdsByContextId: (db: DatabaseClient) => (params: {
|
|
3118
3124
|
contextId: string;
|
|
@@ -3247,7 +3253,7 @@ declare const deleteTool: (db: DatabaseClient) => (params: {
|
|
|
3247
3253
|
}) => Promise<boolean>;
|
|
3248
3254
|
declare const addToolToAgent: (db: DatabaseClient) => (params: {
|
|
3249
3255
|
scopes: GraphScopeConfig;
|
|
3250
|
-
|
|
3256
|
+
subAgentId: string;
|
|
3251
3257
|
toolId: string;
|
|
3252
3258
|
selectedTools?: string[] | null;
|
|
3253
3259
|
headers?: Record<string, string> | null;
|
|
@@ -3261,11 +3267,11 @@ declare const addToolToAgent: (db: DatabaseClient) => (params: {
|
|
|
3261
3267
|
headers: Record<string, string> | null;
|
|
3262
3268
|
toolId: string;
|
|
3263
3269
|
selectedTools: string[] | null;
|
|
3264
|
-
|
|
3270
|
+
subAgentId: string;
|
|
3265
3271
|
}>;
|
|
3266
3272
|
declare const removeToolFromAgent: (db: DatabaseClient) => (params: {
|
|
3267
3273
|
scopes: GraphScopeConfig;
|
|
3268
|
-
|
|
3274
|
+
subAgentId: string;
|
|
3269
3275
|
toolId: string;
|
|
3270
3276
|
}) => Promise<{
|
|
3271
3277
|
tenantId: string;
|
|
@@ -3277,14 +3283,14 @@ declare const removeToolFromAgent: (db: DatabaseClient) => (params: {
|
|
|
3277
3283
|
headers: Record<string, string> | null;
|
|
3278
3284
|
toolId: string;
|
|
3279
3285
|
selectedTools: string[] | null;
|
|
3280
|
-
|
|
3286
|
+
subAgentId: string;
|
|
3281
3287
|
}>;
|
|
3282
3288
|
/**
|
|
3283
3289
|
* Upsert agent-tool relation (create if it doesn't exist, update if it does)
|
|
3284
3290
|
*/
|
|
3285
3291
|
declare const upsertAgentToolRelation: (db: DatabaseClient) => (params: {
|
|
3286
3292
|
scopes: GraphScopeConfig;
|
|
3287
|
-
|
|
3293
|
+
subAgentId: string;
|
|
3288
3294
|
toolId: string;
|
|
3289
3295
|
selectedTools?: string[] | null;
|
|
3290
3296
|
headers?: Record<string, string> | null;
|
|
@@ -3299,7 +3305,7 @@ declare const upsertAgentToolRelation: (db: DatabaseClient) => (params: {
|
|
|
3299
3305
|
headers: Record<string, string> | null;
|
|
3300
3306
|
toolId: string;
|
|
3301
3307
|
selectedTools: string[] | null;
|
|
3302
|
-
|
|
3308
|
+
subAgentId: string;
|
|
3303
3309
|
}>;
|
|
3304
3310
|
/**
|
|
3305
3311
|
* Upsert a tool (create if it doesn't exist, update if it does)
|
|
@@ -4032,4 +4038,4 @@ declare function setSpanWithError(span: Span, error: Error, logger?: {
|
|
|
4032
4038
|
*/
|
|
4033
4039
|
declare function getTracer(serviceName: string, serviceVersion?: string): Tracer;
|
|
4034
4040
|
|
|
4035
|
-
export { AgentGraphInsert, AgentGraphUpdate,
|
|
4041
|
+
export { AgentGraphInsert, AgentGraphUpdate, AgentRelationInsert, AgentRelationUpdate, AgentScopeConfig, AgentToolRelationUpdate, ApiKeyCreateResult, type ApiKeyGenerationResult, ApiKeyInsert, ApiKeySelect, ApiKeyUpdate, Artifact, ArtifactComponentInsert, ArtifactComponentSelect, ArtifactComponentUpdate, type CommonCreateErrorResponses, type CommonDeleteErrorResponses, type CommonGetErrorResponses, type CommonUpdateErrorResponses, ContextCache, ContextCacheInsert, ContextCacheSelect, ContextConfigBuilder, type ContextConfigBuilderOptions, ContextConfigInsert, ContextConfigSelect, ContextConfigUpdate, ContextFetchDefinition, ContextFetcher, type ContextResolutionOptions, type ContextResolutionResult, ContextResolver, type ContextResolverInterface, type ContextValidationError, type ContextValidationResult, ConversationHistoryConfig, ConversationInsert, ConversationMetadata, ConversationSelect, ConversationUpdate, CreateApiKeyParams, type CredentialContext, type CredentialData, CredentialReferenceApiInsert, CredentialReferenceInsert, CredentialReferenceSelect, CredentialReferenceUpdate, type CredentialReferenceWithTools, type CredentialResolverInput, CredentialStore, type CredentialStoreReference, CredentialStoreRegistry, CredentialStoreType, CredentialStuffer, DataComponentInsert, DataComponentSelect, DataComponentUpdate, type DatabaseClient, type DatabaseConfig, type DotPaths, ERROR_DOCS_BASE_URL, ErrorCode, type ErrorCodes, type ErrorResponse, ExecutionContext, ExternalAgentInsert, ExternalAgentRelationInsert, ExternalAgentSelect, ExternalAgentUpdate, type FetchResult, FullGraphDefinition, FullProjectDefinition, FunctionApiInsert, type GraphLogger, GraphScopeConfig, HTTP_REQUEST_PARTS, type HttpRequestPart, InMemoryCredentialStore, KeyChainStore, LedgerArtifactSelect, type LoggerFactoryConfig, MCPToolConfig, MCPTransportType, McpClient, type McpClientOptions, type McpSSEConfig, type McpServerConfig, type McpStreamableHttpConfig, McpTool, MessageContent, MessageInsert, MessageMetadata, MessageUpdate, MessageVisibility, NangoCredentialStore, type OAuthConfig, PaginationConfig, PaginationResult, type ParsedHttpRequest, PinoLogger, type PinoLoggerConfig, type ProblemDetails, ProjectInfo, ProjectInsert, type ProjectLogger, ProjectResourceCounts, ProjectScopeConfig, ProjectSelect, ProjectUpdate, type ResolvedContext, SubAgentInsert, SubAgentSelect, SubAgentUpdate, TaskInsert, TaskMetadataConfig, TaskSelect, type TemplateContext, TemplateEngine, type TemplateRenderOptions, ToolInsert, ToolMcpConfig, ToolSelect, ToolServerCapabilities, ToolUpdate, addLedgerArtifacts, addToolToAgent, apiFetch, associateArtifactComponentWithAgent, associateDataComponentWithAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, contextConfig, contextValidationMiddleware, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, createAgentGraph, createAgentToolRelation, createApiError, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDatabaseClient, createDefaultCredentialStores, createExecutionContext, createExternalAgent, createExternalAgentRelation, createFullGraphServerSide, createFullProjectServerSide, createInMemoryDatabaseClient, createKeyChainStore, createMessage, createNangoCredentialStore, createOrGetConversation, createProject, createSubAgent, createSubAgentRelation, createTask, createTool, createValidatedDataAccess, dbResultToMcpTool, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentGraph, deleteAgentRelationsByGraph, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteExternalAgent, deleteFullGraph, deleteFullProject, deleteFunction, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMessage, deleteProject, deleteSubAgent, deleteSubAgentRelation, deleteTool, detectAuthenticationRequired, determineContextTrigger, discoverOAuthEndpoints, errorResponseSchema, errorSchemaFactory, externalAgentExists, externalAgentUrlExists, extractPublicId, fetchComponentRelationships, fetchDefinition, generateAndCreateApiKey, generateApiKey, generateId, getActiveAgentForConversation, getAgentGraphById, getAgentGraphWithDefaultSubAgent, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByGraph, getAgentRelationsBySource, getAgentRelationsByTarget, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getApiKeyById, getApiKeyByPublicId, getArtifactComponentById, getArtifactComponentsForAgent, getCacheEntry, getCachedValidator, getContextConfigById, getContextConfigCacheEntries, getConversation, getConversationCacheEntries, getConversationHistory, getConversationId, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithTools, getCredentialStoreLookupKeyFromRetrievalParams, getDataComponent, getDataComponentsForAgent, getExternalAgent, getExternalAgentByUrl, getExternalAgentRelations, getFullGraph, getFullGraphDefinition, getFullProject, getFunction, getGraphAgentInfos, getLedgerArtifacts, getLedgerArtifactsByContext, getLogger, getMessageById, getMessagesByConversation, getMessagesByTask, getProject, getProjectResourceCounts, getRelatedAgentsForGraph, getRequestExecutionContext, getSubAgentById, getSubAgentsByIds, getTask, getToolById, getToolsForAgent, getTracer, getVisibleMessages, graphHasArtifactComponents, handleApiError, handleContextConfigChange, handleContextResolution, hasApiKey, hasContextConfig, hasCredentialReference, hashApiKey, headers, invalidateHeadersCache, invalidateInvocationDefinitionsCache, isApiKeyExpired, isArtifactComponentAssociatedWithAgent, isDataComponentAssociatedWithAgent, isValidHttpRequest, listAgentGraphs, listAgentGraphsPaginated, listAgentRelations, listAgentToolRelations, listApiKeys, listApiKeysPaginated, listArtifactComponents, listArtifactComponentsPaginated, listContextConfigs, listContextConfigsPaginated, listConversations, listCredentialReferences, listCredentialReferencesPaginated, listDataComponents, listDataComponentsPaginated, listExternalAgents, listExternalAgentsPaginated, listFunctions, listMessages, listProjects, listProjectsPaginated, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listTools, loadEnvironmentFiles, loggerFactory, maskApiKey, problemDetailsSchema, projectExists, projectExistsInTable, projectHasResources, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeToolFromAgent, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, setSpanWithError, updateAgentGraph, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveAgent, updateCredentialReference, updateDataComponent, updateExternalAgent, updateFullGraphServerSide, updateFullProjectServerSide, updateMessage, updateProject, updateSubAgent, updateTask, updateTool, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertAgentGraph, upsertAgentRelation, upsertAgentToolRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertLedgerArtifact, upsertSubAgent, upsertTool, validateAgainstJsonSchema, validateAndGetApiKey, validateApiKey, validateExternalAgent, validateHeaders, validateHttpRequestHeaders, validateInternalSubAgent, validateProjectExists, validationHelper, withProjectValidation };
|