@inkeep/agents-core 0.0.0-chat-to-edit-20251119071712

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/LICENSE.md +56 -0
  2. package/README.md +458 -0
  3. package/SUPPLEMENTAL_TERMS.md +40 -0
  4. package/dist/auth-detection-CGqhPDnj.d.cts +435 -0
  5. package/dist/auth-detection-CGqhPDnj.d.ts +435 -0
  6. package/dist/chunk-7CLFCY6J.js +36 -0
  7. package/dist/chunk-A6JWG7FI.js +1689 -0
  8. package/dist/chunk-CMNLBV2A.js +39 -0
  9. package/dist/chunk-E6R6PML7.js +19 -0
  10. package/dist/chunk-OP3KPT4T.js +442 -0
  11. package/dist/chunk-TLSKVSBR.js +1234 -0
  12. package/dist/chunk-WG46C2WU.js +394 -0
  13. package/dist/chunk-YECQCT5N.js +223 -0
  14. package/dist/chunk-YFHT5M2R.js +18 -0
  15. package/dist/client-exports.cjs +3421 -0
  16. package/dist/client-exports.d.cts +292 -0
  17. package/dist/client-exports.d.ts +292 -0
  18. package/dist/client-exports.js +178 -0
  19. package/dist/constants/models.cjs +40 -0
  20. package/dist/constants/models.d.cts +42 -0
  21. package/dist/constants/models.d.ts +42 -0
  22. package/dist/constants/models.js +1 -0
  23. package/dist/db/schema.cjs +1686 -0
  24. package/dist/db/schema.d.cts +7 -0
  25. package/dist/db/schema.d.ts +7 -0
  26. package/dist/db/schema.js +1 -0
  27. package/dist/index.cjs +229792 -0
  28. package/dist/index.d.cts +5138 -0
  29. package/dist/index.d.ts +5138 -0
  30. package/dist/index.js +224908 -0
  31. package/dist/props-validation-BMR1qNiy.d.cts +15 -0
  32. package/dist/props-validation-BMR1qNiy.d.ts +15 -0
  33. package/dist/schema-C90zXlqp.d.ts +8012 -0
  34. package/dist/schema-keglUDw0.d.cts +8012 -0
  35. package/dist/types/index.cjs +64 -0
  36. package/dist/types/index.d.cts +175 -0
  37. package/dist/types/index.d.ts +175 -0
  38. package/dist/types/index.js +2 -0
  39. package/dist/utility-CXEG5391.d.cts +17265 -0
  40. package/dist/utility-CXEG5391.d.ts +17265 -0
  41. package/dist/utils/schema-conversion.cjs +236 -0
  42. package/dist/utils/schema-conversion.d.cts +26 -0
  43. package/dist/utils/schema-conversion.d.ts +26 -0
  44. package/dist/utils/schema-conversion.js +1 -0
  45. package/dist/validation/index.cjs +3521 -0
  46. package/dist/validation/index.d.cts +279 -0
  47. package/dist/validation/index.d.ts +279 -0
  48. package/dist/validation/index.js +2 -0
  49. package/drizzle/0000_exotic_mysterio.sql +398 -0
  50. package/drizzle/0001_greedy_the_phantom.sql +4 -0
  51. package/drizzle/0002_add_evaluation_features.sql +252 -0
  52. package/drizzle/0003_brave_micromax.sql +2 -0
  53. package/drizzle/meta/0000_snapshot.json +2519 -0
  54. package/drizzle/meta/0001_snapshot.json +2892 -0
  55. package/drizzle/meta/0002_snapshot.json +4485 -0
  56. package/drizzle/meta/_journal.json +34 -0
  57. package/package.json +133 -0
@@ -0,0 +1,64 @@
1
+ 'use strict';
2
+
3
+ // src/types/a2a.ts
4
+ var TaskState = /* @__PURE__ */ ((TaskState2) => {
5
+ TaskState2["Submitted"] = "submitted";
6
+ TaskState2["Working"] = "working";
7
+ TaskState2["InputRequired"] = "input-required";
8
+ TaskState2["Completed"] = "completed";
9
+ TaskState2["Canceled"] = "canceled";
10
+ TaskState2["Failed"] = "failed";
11
+ TaskState2["Rejected"] = "rejected";
12
+ TaskState2["AuthRequired"] = "auth-required";
13
+ TaskState2["Unknown"] = "unknown";
14
+ return TaskState2;
15
+ })(TaskState || {});
16
+
17
+ // src/types/tool-policies.ts
18
+ function normalizeToolSelections(selections) {
19
+ if (!selections || selections.length === 0) {
20
+ return { selectedTools: [], toolPolicies: {} };
21
+ }
22
+ const selectedTools = [];
23
+ const toolPolicies = {};
24
+ for (const selection of selections) {
25
+ if (typeof selection === "string") {
26
+ selectedTools.push(selection);
27
+ } else {
28
+ selectedTools.push(selection.name);
29
+ const policy = {};
30
+ if (selection.needsApproval !== void 0) {
31
+ policy.needsApproval = selection.needsApproval;
32
+ }
33
+ if (Object.keys(policy).length > 0) {
34
+ toolPolicies[selection.name] = policy;
35
+ }
36
+ }
37
+ }
38
+ return { selectedTools, toolPolicies };
39
+ }
40
+
41
+ // src/types/utility.ts
42
+ var TOOL_STATUS_VALUES = ["healthy", "unhealthy", "unknown", "needs_auth"];
43
+ var VALID_RELATION_TYPES = ["transfer", "delegate"];
44
+ var MCPTransportType = {
45
+ streamableHttp: "streamable_http",
46
+ sse: "sse"
47
+ };
48
+ var MCPServerType = {
49
+ nango: "nango",
50
+ generic: "generic"
51
+ };
52
+ var CredentialStoreType = {
53
+ memory: "memory",
54
+ keychain: "keychain",
55
+ nango: "nango"
56
+ };
57
+
58
+ exports.CredentialStoreType = CredentialStoreType;
59
+ exports.MCPServerType = MCPServerType;
60
+ exports.MCPTransportType = MCPTransportType;
61
+ exports.TOOL_STATUS_VALUES = TOOL_STATUS_VALUES;
62
+ exports.TaskState = TaskState;
63
+ exports.VALID_RELATION_TYPES = VALID_RELATION_TYPES;
64
+ exports.normalizeToolSelections = normalizeToolSelections;
@@ -0,0 +1,175 @@
1
+ import { h as CredentialStoreType } from '../utility-CXEG5391.cjs';
2
+ export { bd as A2AError, bJ as A2ARequest, bK as A2AResponse, aO as APIKeySecurityScheme, bY as AgentApiInsert, bX as AgentApiSelect, bZ as AgentApiUpdate, aK as AgentCapabilities, aY as AgentCard, dA as AgentConversationHistoryConfig, B as AgentInsert, aL as AgentProvider, y as AgentScopeConfig, E as AgentSelect, aM as AgentSkill, D as AgentUpdate, cS as AllAgentSelect, cW as ApiKeyApiCreationResponse, cU as ApiKeyApiInsert, cT as ApiKeyApiSelect, cV as ApiKeyApiUpdate, K as ApiKeyCreateResult, H as ApiKeyInsert, G as ApiKeySelect, I as ApiKeyUpdate, ab as Artifact, cH as ArtifactComponentApiInsert, cG as ArtifactComponentApiSelect, cI as ArtifactComponentApiUpdate, N as ArtifactComponentInsert, L as ArtifactComponentSelect, O as ArtifactComponentUpdate, aR as AuthorizationCodeOAuthFlow, dj as CanDelegateToExternalAgent, di as CanUseItem, bt as CancelTaskRequest, bE as CancelTaskResponse, bD as CancelTaskSuccessResponse, aS as ClientCredentialsOAuthFlow, bb as ContentTypeNotSupportedError, cv as ContextCacheApiInsert, cu as ContextCacheApiSelect, cw as ContextCacheApiUpdate, dB as ContextCacheEntry, U as ContextCacheInsert, R as ContextCacheSelect, ct as ContextCacheUpdate, cp as ContextConfigApiInsert, co as ContextConfigApiSelect, cq as ContextConfigApiUpdate, V as ContextConfigInsert, u as ContextConfigSelect, W as ContextConfigUpdate, l as ContextFetchDefinition, ci as ConversationApiInsert, ch as ConversationApiSelect, cj as ConversationApiUpdate, C as ConversationHistoryConfig, Y as ConversationInsert, o as ConversationMetadata, dz as ConversationScopeOptions, X as ConversationSelect, Z as ConversationUpdate, J as CreateApiKeyParams, t as CredentialReferenceApiInsert, cX as CredentialReferenceApiSelect, cY as CredentialReferenceApiUpdate, a1 as CredentialReferenceInsert, _ as CredentialReferenceSelect, a2 as CredentialReferenceUpdate, cy as DataComponentApiInsert, cx as DataComponentApiSelect, cz as DataComponentApiUpdate, a4 as DataComponentInsert, a3 as DataComponentSelect, a5 as DataComponentUpdate, aI as DataPart, aA as ExecutionContext, cQ as ExternalAgentApiInsert, cP as ExternalAgentApiSelect, cR as ExternalAgentApiUpdate, a6 as ExternalAgentInsert, a0 as ExternalAgentSelect, a7 as ExternalAgentUpdate, bW as ExternalSubAgentRelationApiInsert, bV as ExternalSubAgentRelationInsert, cs as FetchConfig, cr as FetchDefinition, aE as FileBase, aH as FilePart, aF as FileWithBytes, aG as FileWithUri, s as Filter, dh as FullAgentAgentInsert, x as FullAgentDefinition, ag as FullProjectDefinition, a8 as FunctionApiInsert, ce as FunctionApiSelect, cf as FunctionApiUpdate, cc as FunctionInsert, cb as FunctionSelect, a9 as FunctionToolApiInsert, cg as FunctionToolApiSelect, aa as FunctionToolApiUpdate, cd as FunctionUpdate, bv as GetTaskPushNotificationConfigRequest, bI as GetTaskPushNotificationConfigResponse, bH as GetTaskPushNotificationConfigSuccessResponse, bs as GetTaskRequest, bC as GetTaskResponse, bB as GetTaskSuccessResponse, aP as HTTPAuthSecurityScheme, aT as ImplicitOAuthFlow, b6 as InternalError, bc as InvalidAgentResponseError, b5 as InvalidParamsError, b3 as InvalidRequestError, b2 as JSONParseError, bn as JSONRPCError, bp as JSONRPCErrorResponse, bl as JSONRPCMessage, bm as JSONRPCRequest, bo as JSONRPCResult, df as LedgerArtifactApiInsert, de as LedgerArtifactApiSelect, dg as LedgerArtifactApiUpdate, dc as LedgerArtifactInsert, ac as LedgerArtifactSelect, dd as LedgerArtifactUpdate, dJ as MCPServerType, v as MCPToolConfig, i as MCPTransportType, dC as McpAuthType, dD as McpServerAuth, dF as McpServerCapabilities, ax as McpTool, dG as McpToolDefinition, dE as McpTransportConfig, aZ as Message, cm as MessageApiInsert, cl as MessageApiSelect, cn as MessageApiUpdate, p as MessageContent, ae as MessageInsert, q as MessageMetadata, du as MessageMode, bL as MessagePart, dt as MessageRole, ck as MessageSelect, bj as MessageSendConfiguration, bk as MessageSendParams, ds as MessageType, af as MessageUpdate, ad as MessageVisibility, b4 as MethodNotFoundError, dv as Models, aV as OAuth2SecurityScheme, aQ as OAuthFlows, aW as OpenIdConnectSecurityScheme, dq as Pagination, z as PaginationConfig, aj as PaginationResult, P as Part, aC as PartBase, r as PassCriteria, dL as PassCriteriaCondition, dK as PassCriteriaOperator, aU as PasswordOAuthFlow, dn as ProjectApiInsert, dm as ProjectApiSelect, dp as ProjectApiUpdate, ah as ProjectInfo, al as ProjectInsert, dw as ProjectModels, ak as ProjectResourceCounts, w as ProjectScopeConfig, ai as ProjectSelect, am as ProjectUpdate, be as PushNotificationAuthenticationInfo, bf as PushNotificationConfig, b9 as PushNotificationNotSupportedError, aX as SecurityScheme, aN as SecuritySchemeBase, bq as SendMessageRequest, by as SendMessageResponse, bx as SendMessageSuccessResponse, br as SendStreamingMessageRequest, bA as SendStreamingMessageResponse, bz as SendStreamingMessageSuccessResponse, bu as SetTaskPushNotificationConfigRequest, bG as SetTaskPushNotificationConfigResponse, bF as SetTaskPushNotificationConfigSuccessResponse, dy as StatusComponent, dx as StatusUpdateSettings, bO as SubAgentApiInsert, bN as SubAgentApiSelect, bP as SubAgentApiUpdate, cN as SubAgentArtifactComponentApiInsert, cM as SubAgentArtifactComponentApiSelect, cO as SubAgentArtifactComponentApiUpdate, cK as SubAgentArtifactComponentInsert, cJ as SubAgentArtifactComponentSelect, cL as SubAgentArtifactComponentUpdate, cE as SubAgentDataComponentApiInsert, cD as SubAgentDataComponentApiSelect, cF as SubAgentDataComponentApiUpdate, cB as SubAgentDataComponentInsert, cA as SubAgentDataComponentSelect, cC as SubAgentDataComponentUpdate, dk as SubAgentDefinition, d5 as SubAgentExternalAgentRelationApiInsert, d4 as SubAgentExternalAgentRelationApiSelect, d6 as SubAgentExternalAgentRelationApiUpdate, an as SubAgentExternalAgentRelationInsert, d2 as SubAgentExternalAgentRelationSelect, d3 as SubAgentExternalAgentRelationUpdate, ar as SubAgentInsert, bS as SubAgentRelationApiInsert, bR as SubAgentRelationApiSelect, bT as SubAgentRelationApiUpdate, ao as SubAgentRelationInsert, bU as SubAgentRelationQuery, bQ as SubAgentRelationSelect, ap as SubAgentRelationUpdate, Q as SubAgentScopeConfig, at as SubAgentSelect, da as SubAgentTeamAgentRelationApiInsert, d9 as SubAgentTeamAgentRelationApiSelect, db as SubAgentTeamAgentRelationApiUpdate, au as SubAgentTeamAgentRelationInsert, d7 as SubAgentTeamAgentRelationSelect, d8 as SubAgentTeamAgentRelationUpdate, d0 as SubAgentToolRelationApiInsert, c$ as SubAgentToolRelationApiSelect, d1 as SubAgentToolRelationApiUpdate, c_ as SubAgentToolRelationInsert, cZ as SubAgentToolRelationSelect, aq as SubAgentToolRelationUpdate, as as SubAgentUpdate, dr as SummaryEvent, dH as TOOL_STATUS_VALUES, a$ as Task, c0 as TaskApiInsert, b$ as TaskApiSelect, c1 as TaskApiUpdate, bM as TaskArtifact, b1 as TaskArtifactUpdateEvent, bh as TaskIdParams, av as TaskInsert, T as TaskMetadataConfig, b8 as TaskNotCancelableError, b7 as TaskNotFoundError, bg as TaskPushNotificationConfig, bi as TaskQueryParams, c6 as TaskRelationApiInsert, c5 as TaskRelationApiSelect, c7 as TaskRelationApiUpdate, c3 as TaskRelationInsert, c2 as TaskRelationSelect, c4 as TaskRelationUpdate, bw as TaskResubscriptionRequest, aw as TaskSelect, aJ as TaskState, a_ as TaskStatus, b0 as TaskStatusUpdateEvent, b_ as TaskUpdate, aD as TextPart, c9 as ToolApiInsert, c8 as ToolApiSelect, ca as ToolApiUpdate, dl as ToolDefinition, ay as ToolInsert, m as ToolMcpConfig, $ as ToolSelect, n as ToolServerCapabilities, az as ToolUpdate, ba as UnsupportedOperationError, dI as VALID_RELATION_TYPES } from '../utility-CXEG5391.cjs';
3
+ import { Context } from 'hono';
4
+ import 'zod';
5
+ import 'drizzle-zod';
6
+ import 'drizzle-orm/pg-core';
7
+ import '@hono/zod-openapi';
8
+
9
+ /**
10
+ * Credential store interface for managing different types of credentials
11
+ */
12
+ interface CredentialStore {
13
+ /**
14
+ * Unique identifier for this credential store
15
+ */
16
+ id: string;
17
+ /**
18
+ * Type of credential store
19
+ */
20
+ type: keyof typeof CredentialStoreType;
21
+ /**
22
+ * Get a credential by key
23
+ */
24
+ get(key: string): Promise<string | null>;
25
+ /**
26
+ * Set a credential
27
+ */
28
+ set(key: string, value: string, metadata?: Record<string, string>): Promise<void>;
29
+ /**
30
+ * Check if a credential exists
31
+ */
32
+ has(key: string): Promise<boolean>;
33
+ /**
34
+ * Delete a credential
35
+ */
36
+ delete(key: string): Promise<boolean>;
37
+ /**
38
+ * Check if the credential store is available and functional
39
+ * @returns Promise resolving to availability status and optional reason if unavailable
40
+ */
41
+ checkAvailability(): Promise<{
42
+ available: boolean;
43
+ reason?: string;
44
+ }>;
45
+ }
46
+ /**
47
+ * Server configuration options for HTTP server behavior
48
+ * These settings control connection management, timeouts, and server behavior
49
+ */
50
+ interface ServerOptions {
51
+ /**
52
+ * Server port to listen on
53
+ * Default: 3000
54
+ */
55
+ port?: number;
56
+ /**
57
+ * Keep alive timeout in milliseconds
58
+ * Time to wait for additional data after the last response before closing the connection.
59
+ * Used for persistent connections to improve performance by reusing connections.
60
+ * Scenario: Set higher (10-30s) for high-traffic APIs, lower (1-5s) for low-traffic services.
61
+ * Default: 60000ms (60 seconds)
62
+ */
63
+ keepAliveTimeout?: number;
64
+ /**
65
+ * Enable keep alive connections
66
+ * When true, allows connection reuse for multiple requests.
67
+ * Improves performance but uses more server resources.
68
+ * Scenario: Enable for APIs with frequent requests, disable for one-off services.
69
+ * Default: true
70
+ */
71
+ keepAlive?: boolean;
72
+ /**
73
+ * Request timeout in milliseconds
74
+ * Maximum time to wait for a complete request from the client.
75
+ * Helps prevent DoS attacks by limiting resource consumption from slow clients.
76
+ * Scenario: Set lower (30s) for simple APIs, higher (5-10min) for file upload services.
77
+ * Default: 60000ms (60 seconds)
78
+ */
79
+ requestTimeout?: number;
80
+ }
81
+ /**
82
+ * CORS configuration compatible with Hono's CORSOptions
83
+ */
84
+ interface CorsConfig {
85
+ /**
86
+ * Allowed origins - string, array of strings, or function
87
+ */
88
+ origin?: string | string[] | ((origin: string, c?: Context) => string | null | undefined);
89
+ /**
90
+ * Allowed methods
91
+ */
92
+ allowMethods?: string[];
93
+ /**
94
+ * Allowed headers
95
+ */
96
+ allowHeaders?: string[];
97
+ /**
98
+ * Exposed headers
99
+ */
100
+ exposeHeaders?: string[];
101
+ /**
102
+ * Max age for preflight requests
103
+ */
104
+ maxAge?: number;
105
+ /**
106
+ * Whether to allow credentials
107
+ */
108
+ credentials?: boolean;
109
+ }
110
+ /**
111
+ * Base server configuration for all Inkeep services
112
+ */
113
+ interface ServerConfig {
114
+ /**
115
+ * Server port to listen on
116
+ */
117
+ port?: number;
118
+ /**
119
+ * Server options for HTTP behavior
120
+ */
121
+ serverOptions?: ServerOptions;
122
+ /**
123
+ * Array of credential stores for managing API keys, tokens, etc.
124
+ */
125
+ credentialStores?: CredentialStore[];
126
+ /**
127
+ * CORS configuration
128
+ */
129
+ cors?: CorsConfig;
130
+ }
131
+
132
+ /**
133
+ * Tool policy configuration for individual tools within an MCP server
134
+ */
135
+ interface ToolPolicy {
136
+ /**
137
+ * Whether this specific tool requires user approval before execution
138
+ * If true, tool execution will pause and wait for explicit user approval
139
+ * If false/undefined, tool executes immediately when called
140
+ */
141
+ needsApproval?: boolean;
142
+ }
143
+ /**
144
+ * Flexible tool selection format for MCP servers
145
+ * Can be either a simple string (tool name) or an object with policies
146
+ */
147
+ type McpToolSelection = string | {
148
+ name: string;
149
+ needsApproval?: boolean;
150
+ };
151
+ /**
152
+ * Input format for configuring MCP tool usage in agents
153
+ */
154
+ interface AgentMcpConfigInput {
155
+ selectedTools?: McpToolSelection[];
156
+ headers?: Record<string, string>;
157
+ }
158
+ /**
159
+ * Normalized format stored in database and used at runtime
160
+ */
161
+ interface AgentMcpConfig {
162
+ server: any;
163
+ selectedTools?: string[];
164
+ headers?: Record<string, string>;
165
+ toolPolicies?: Record<string, ToolPolicy>;
166
+ }
167
+ /**
168
+ * Helper function to normalize McpToolSelection[] into separate arrays
169
+ */
170
+ declare function normalizeToolSelections(selections?: McpToolSelection[]): {
171
+ selectedTools: string[];
172
+ toolPolicies: Record<string, ToolPolicy>;
173
+ };
174
+
175
+ export { type AgentMcpConfig, type AgentMcpConfigInput, type CorsConfig, type CredentialStore, CredentialStoreType, type McpToolSelection, type ServerConfig, type ServerOptions, type ToolPolicy, normalizeToolSelections };
@@ -0,0 +1,175 @@
1
+ import { h as CredentialStoreType } from '../utility-CXEG5391.js';
2
+ export { bd as A2AError, bJ as A2ARequest, bK as A2AResponse, aO as APIKeySecurityScheme, bY as AgentApiInsert, bX as AgentApiSelect, bZ as AgentApiUpdate, aK as AgentCapabilities, aY as AgentCard, dA as AgentConversationHistoryConfig, B as AgentInsert, aL as AgentProvider, y as AgentScopeConfig, E as AgentSelect, aM as AgentSkill, D as AgentUpdate, cS as AllAgentSelect, cW as ApiKeyApiCreationResponse, cU as ApiKeyApiInsert, cT as ApiKeyApiSelect, cV as ApiKeyApiUpdate, K as ApiKeyCreateResult, H as ApiKeyInsert, G as ApiKeySelect, I as ApiKeyUpdate, ab as Artifact, cH as ArtifactComponentApiInsert, cG as ArtifactComponentApiSelect, cI as ArtifactComponentApiUpdate, N as ArtifactComponentInsert, L as ArtifactComponentSelect, O as ArtifactComponentUpdate, aR as AuthorizationCodeOAuthFlow, dj as CanDelegateToExternalAgent, di as CanUseItem, bt as CancelTaskRequest, bE as CancelTaskResponse, bD as CancelTaskSuccessResponse, aS as ClientCredentialsOAuthFlow, bb as ContentTypeNotSupportedError, cv as ContextCacheApiInsert, cu as ContextCacheApiSelect, cw as ContextCacheApiUpdate, dB as ContextCacheEntry, U as ContextCacheInsert, R as ContextCacheSelect, ct as ContextCacheUpdate, cp as ContextConfigApiInsert, co as ContextConfigApiSelect, cq as ContextConfigApiUpdate, V as ContextConfigInsert, u as ContextConfigSelect, W as ContextConfigUpdate, l as ContextFetchDefinition, ci as ConversationApiInsert, ch as ConversationApiSelect, cj as ConversationApiUpdate, C as ConversationHistoryConfig, Y as ConversationInsert, o as ConversationMetadata, dz as ConversationScopeOptions, X as ConversationSelect, Z as ConversationUpdate, J as CreateApiKeyParams, t as CredentialReferenceApiInsert, cX as CredentialReferenceApiSelect, cY as CredentialReferenceApiUpdate, a1 as CredentialReferenceInsert, _ as CredentialReferenceSelect, a2 as CredentialReferenceUpdate, cy as DataComponentApiInsert, cx as DataComponentApiSelect, cz as DataComponentApiUpdate, a4 as DataComponentInsert, a3 as DataComponentSelect, a5 as DataComponentUpdate, aI as DataPart, aA as ExecutionContext, cQ as ExternalAgentApiInsert, cP as ExternalAgentApiSelect, cR as ExternalAgentApiUpdate, a6 as ExternalAgentInsert, a0 as ExternalAgentSelect, a7 as ExternalAgentUpdate, bW as ExternalSubAgentRelationApiInsert, bV as ExternalSubAgentRelationInsert, cs as FetchConfig, cr as FetchDefinition, aE as FileBase, aH as FilePart, aF as FileWithBytes, aG as FileWithUri, s as Filter, dh as FullAgentAgentInsert, x as FullAgentDefinition, ag as FullProjectDefinition, a8 as FunctionApiInsert, ce as FunctionApiSelect, cf as FunctionApiUpdate, cc as FunctionInsert, cb as FunctionSelect, a9 as FunctionToolApiInsert, cg as FunctionToolApiSelect, aa as FunctionToolApiUpdate, cd as FunctionUpdate, bv as GetTaskPushNotificationConfigRequest, bI as GetTaskPushNotificationConfigResponse, bH as GetTaskPushNotificationConfigSuccessResponse, bs as GetTaskRequest, bC as GetTaskResponse, bB as GetTaskSuccessResponse, aP as HTTPAuthSecurityScheme, aT as ImplicitOAuthFlow, b6 as InternalError, bc as InvalidAgentResponseError, b5 as InvalidParamsError, b3 as InvalidRequestError, b2 as JSONParseError, bn as JSONRPCError, bp as JSONRPCErrorResponse, bl as JSONRPCMessage, bm as JSONRPCRequest, bo as JSONRPCResult, df as LedgerArtifactApiInsert, de as LedgerArtifactApiSelect, dg as LedgerArtifactApiUpdate, dc as LedgerArtifactInsert, ac as LedgerArtifactSelect, dd as LedgerArtifactUpdate, dJ as MCPServerType, v as MCPToolConfig, i as MCPTransportType, dC as McpAuthType, dD as McpServerAuth, dF as McpServerCapabilities, ax as McpTool, dG as McpToolDefinition, dE as McpTransportConfig, aZ as Message, cm as MessageApiInsert, cl as MessageApiSelect, cn as MessageApiUpdate, p as MessageContent, ae as MessageInsert, q as MessageMetadata, du as MessageMode, bL as MessagePart, dt as MessageRole, ck as MessageSelect, bj as MessageSendConfiguration, bk as MessageSendParams, ds as MessageType, af as MessageUpdate, ad as MessageVisibility, b4 as MethodNotFoundError, dv as Models, aV as OAuth2SecurityScheme, aQ as OAuthFlows, aW as OpenIdConnectSecurityScheme, dq as Pagination, z as PaginationConfig, aj as PaginationResult, P as Part, aC as PartBase, r as PassCriteria, dL as PassCriteriaCondition, dK as PassCriteriaOperator, aU as PasswordOAuthFlow, dn as ProjectApiInsert, dm as ProjectApiSelect, dp as ProjectApiUpdate, ah as ProjectInfo, al as ProjectInsert, dw as ProjectModels, ak as ProjectResourceCounts, w as ProjectScopeConfig, ai as ProjectSelect, am as ProjectUpdate, be as PushNotificationAuthenticationInfo, bf as PushNotificationConfig, b9 as PushNotificationNotSupportedError, aX as SecurityScheme, aN as SecuritySchemeBase, bq as SendMessageRequest, by as SendMessageResponse, bx as SendMessageSuccessResponse, br as SendStreamingMessageRequest, bA as SendStreamingMessageResponse, bz as SendStreamingMessageSuccessResponse, bu as SetTaskPushNotificationConfigRequest, bG as SetTaskPushNotificationConfigResponse, bF as SetTaskPushNotificationConfigSuccessResponse, dy as StatusComponent, dx as StatusUpdateSettings, bO as SubAgentApiInsert, bN as SubAgentApiSelect, bP as SubAgentApiUpdate, cN as SubAgentArtifactComponentApiInsert, cM as SubAgentArtifactComponentApiSelect, cO as SubAgentArtifactComponentApiUpdate, cK as SubAgentArtifactComponentInsert, cJ as SubAgentArtifactComponentSelect, cL as SubAgentArtifactComponentUpdate, cE as SubAgentDataComponentApiInsert, cD as SubAgentDataComponentApiSelect, cF as SubAgentDataComponentApiUpdate, cB as SubAgentDataComponentInsert, cA as SubAgentDataComponentSelect, cC as SubAgentDataComponentUpdate, dk as SubAgentDefinition, d5 as SubAgentExternalAgentRelationApiInsert, d4 as SubAgentExternalAgentRelationApiSelect, d6 as SubAgentExternalAgentRelationApiUpdate, an as SubAgentExternalAgentRelationInsert, d2 as SubAgentExternalAgentRelationSelect, d3 as SubAgentExternalAgentRelationUpdate, ar as SubAgentInsert, bS as SubAgentRelationApiInsert, bR as SubAgentRelationApiSelect, bT as SubAgentRelationApiUpdate, ao as SubAgentRelationInsert, bU as SubAgentRelationQuery, bQ as SubAgentRelationSelect, ap as SubAgentRelationUpdate, Q as SubAgentScopeConfig, at as SubAgentSelect, da as SubAgentTeamAgentRelationApiInsert, d9 as SubAgentTeamAgentRelationApiSelect, db as SubAgentTeamAgentRelationApiUpdate, au as SubAgentTeamAgentRelationInsert, d7 as SubAgentTeamAgentRelationSelect, d8 as SubAgentTeamAgentRelationUpdate, d0 as SubAgentToolRelationApiInsert, c$ as SubAgentToolRelationApiSelect, d1 as SubAgentToolRelationApiUpdate, c_ as SubAgentToolRelationInsert, cZ as SubAgentToolRelationSelect, aq as SubAgentToolRelationUpdate, as as SubAgentUpdate, dr as SummaryEvent, dH as TOOL_STATUS_VALUES, a$ as Task, c0 as TaskApiInsert, b$ as TaskApiSelect, c1 as TaskApiUpdate, bM as TaskArtifact, b1 as TaskArtifactUpdateEvent, bh as TaskIdParams, av as TaskInsert, T as TaskMetadataConfig, b8 as TaskNotCancelableError, b7 as TaskNotFoundError, bg as TaskPushNotificationConfig, bi as TaskQueryParams, c6 as TaskRelationApiInsert, c5 as TaskRelationApiSelect, c7 as TaskRelationApiUpdate, c3 as TaskRelationInsert, c2 as TaskRelationSelect, c4 as TaskRelationUpdate, bw as TaskResubscriptionRequest, aw as TaskSelect, aJ as TaskState, a_ as TaskStatus, b0 as TaskStatusUpdateEvent, b_ as TaskUpdate, aD as TextPart, c9 as ToolApiInsert, c8 as ToolApiSelect, ca as ToolApiUpdate, dl as ToolDefinition, ay as ToolInsert, m as ToolMcpConfig, $ as ToolSelect, n as ToolServerCapabilities, az as ToolUpdate, ba as UnsupportedOperationError, dI as VALID_RELATION_TYPES } from '../utility-CXEG5391.js';
3
+ import { Context } from 'hono';
4
+ import 'zod';
5
+ import 'drizzle-zod';
6
+ import 'drizzle-orm/pg-core';
7
+ import '@hono/zod-openapi';
8
+
9
+ /**
10
+ * Credential store interface for managing different types of credentials
11
+ */
12
+ interface CredentialStore {
13
+ /**
14
+ * Unique identifier for this credential store
15
+ */
16
+ id: string;
17
+ /**
18
+ * Type of credential store
19
+ */
20
+ type: keyof typeof CredentialStoreType;
21
+ /**
22
+ * Get a credential by key
23
+ */
24
+ get(key: string): Promise<string | null>;
25
+ /**
26
+ * Set a credential
27
+ */
28
+ set(key: string, value: string, metadata?: Record<string, string>): Promise<void>;
29
+ /**
30
+ * Check if a credential exists
31
+ */
32
+ has(key: string): Promise<boolean>;
33
+ /**
34
+ * Delete a credential
35
+ */
36
+ delete(key: string): Promise<boolean>;
37
+ /**
38
+ * Check if the credential store is available and functional
39
+ * @returns Promise resolving to availability status and optional reason if unavailable
40
+ */
41
+ checkAvailability(): Promise<{
42
+ available: boolean;
43
+ reason?: string;
44
+ }>;
45
+ }
46
+ /**
47
+ * Server configuration options for HTTP server behavior
48
+ * These settings control connection management, timeouts, and server behavior
49
+ */
50
+ interface ServerOptions {
51
+ /**
52
+ * Server port to listen on
53
+ * Default: 3000
54
+ */
55
+ port?: number;
56
+ /**
57
+ * Keep alive timeout in milliseconds
58
+ * Time to wait for additional data after the last response before closing the connection.
59
+ * Used for persistent connections to improve performance by reusing connections.
60
+ * Scenario: Set higher (10-30s) for high-traffic APIs, lower (1-5s) for low-traffic services.
61
+ * Default: 60000ms (60 seconds)
62
+ */
63
+ keepAliveTimeout?: number;
64
+ /**
65
+ * Enable keep alive connections
66
+ * When true, allows connection reuse for multiple requests.
67
+ * Improves performance but uses more server resources.
68
+ * Scenario: Enable for APIs with frequent requests, disable for one-off services.
69
+ * Default: true
70
+ */
71
+ keepAlive?: boolean;
72
+ /**
73
+ * Request timeout in milliseconds
74
+ * Maximum time to wait for a complete request from the client.
75
+ * Helps prevent DoS attacks by limiting resource consumption from slow clients.
76
+ * Scenario: Set lower (30s) for simple APIs, higher (5-10min) for file upload services.
77
+ * Default: 60000ms (60 seconds)
78
+ */
79
+ requestTimeout?: number;
80
+ }
81
+ /**
82
+ * CORS configuration compatible with Hono's CORSOptions
83
+ */
84
+ interface CorsConfig {
85
+ /**
86
+ * Allowed origins - string, array of strings, or function
87
+ */
88
+ origin?: string | string[] | ((origin: string, c?: Context) => string | null | undefined);
89
+ /**
90
+ * Allowed methods
91
+ */
92
+ allowMethods?: string[];
93
+ /**
94
+ * Allowed headers
95
+ */
96
+ allowHeaders?: string[];
97
+ /**
98
+ * Exposed headers
99
+ */
100
+ exposeHeaders?: string[];
101
+ /**
102
+ * Max age for preflight requests
103
+ */
104
+ maxAge?: number;
105
+ /**
106
+ * Whether to allow credentials
107
+ */
108
+ credentials?: boolean;
109
+ }
110
+ /**
111
+ * Base server configuration for all Inkeep services
112
+ */
113
+ interface ServerConfig {
114
+ /**
115
+ * Server port to listen on
116
+ */
117
+ port?: number;
118
+ /**
119
+ * Server options for HTTP behavior
120
+ */
121
+ serverOptions?: ServerOptions;
122
+ /**
123
+ * Array of credential stores for managing API keys, tokens, etc.
124
+ */
125
+ credentialStores?: CredentialStore[];
126
+ /**
127
+ * CORS configuration
128
+ */
129
+ cors?: CorsConfig;
130
+ }
131
+
132
+ /**
133
+ * Tool policy configuration for individual tools within an MCP server
134
+ */
135
+ interface ToolPolicy {
136
+ /**
137
+ * Whether this specific tool requires user approval before execution
138
+ * If true, tool execution will pause and wait for explicit user approval
139
+ * If false/undefined, tool executes immediately when called
140
+ */
141
+ needsApproval?: boolean;
142
+ }
143
+ /**
144
+ * Flexible tool selection format for MCP servers
145
+ * Can be either a simple string (tool name) or an object with policies
146
+ */
147
+ type McpToolSelection = string | {
148
+ name: string;
149
+ needsApproval?: boolean;
150
+ };
151
+ /**
152
+ * Input format for configuring MCP tool usage in agents
153
+ */
154
+ interface AgentMcpConfigInput {
155
+ selectedTools?: McpToolSelection[];
156
+ headers?: Record<string, string>;
157
+ }
158
+ /**
159
+ * Normalized format stored in database and used at runtime
160
+ */
161
+ interface AgentMcpConfig {
162
+ server: any;
163
+ selectedTools?: string[];
164
+ headers?: Record<string, string>;
165
+ toolPolicies?: Record<string, ToolPolicy>;
166
+ }
167
+ /**
168
+ * Helper function to normalize McpToolSelection[] into separate arrays
169
+ */
170
+ declare function normalizeToolSelections(selections?: McpToolSelection[]): {
171
+ selectedTools: string[];
172
+ toolPolicies: Record<string, ToolPolicy>;
173
+ };
174
+
175
+ export { type AgentMcpConfig, type AgentMcpConfigInput, type CorsConfig, type CredentialStore, CredentialStoreType, type McpToolSelection, type ServerConfig, type ServerOptions, type ToolPolicy, normalizeToolSelections };
@@ -0,0 +1,2 @@
1
+ export { TaskState, normalizeToolSelections } from '../chunk-CMNLBV2A.js';
2
+ export { CredentialStoreType, MCPServerType, MCPTransportType, TOOL_STATUS_VALUES, VALID_RELATION_TYPES } from '../chunk-YFHT5M2R.js';