@inkeep/agents-core 0.37.0 → 0.37.1
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/dist/auth/auth-schema.js +1 -1
- package/dist/auth/auth-validation-schemas.js +18 -18
- package/dist/auth/auth.d.ts +3 -3
- package/dist/auth/auth.js +5 -4
- package/dist/{auth-detection-CGqhPDnj.d.ts → auth-detection-7G0Dxt55.d.ts} +11 -0
- package/dist/{chunk-SSRRHYU4.js → chunk-7GZHUB4J.js} +4 -5
- package/dist/chunk-CMNLBV2A.js +39 -0
- package/dist/{chunk-MB2ZIPZS.js → chunk-FOK3JSQN.js} +5 -5
- package/dist/{chunk-SG75RA63.js → chunk-I6IF7ZTL.js} +2 -2
- package/dist/{chunk-VQXQOGJU.js → chunk-K6GMXJPW.js} +313 -315
- package/dist/{chunk-Q5U2SVA6.js → chunk-LL6F3EAR.js} +11 -7
- package/dist/{chunk-TGESM3JG.js → chunk-MQMMFK2K.js} +14 -3
- package/dist/{chunk-NFYCSHD3.js → chunk-PVRIMF6N.js} +2 -1
- package/dist/{chunk-ICZLNCX7.js → chunk-ROXPFQAM.js} +367 -69
- package/dist/{chunk-32YRH2S7.js → chunk-W3QDM7WH.js} +63 -67
- package/dist/{chunk-SLQW43IV.js → chunk-ZEZCCHV7.js} +4 -5
- package/dist/{client-CnpNkGsH.d.ts → client-B_3j-V4-.d.ts} +1 -1
- package/dist/client-exports.d.ts +6 -3
- package/dist/client-exports.js +126 -127
- package/dist/constants/schema-validation/index.js +1 -1
- package/dist/credential-stores/index.d.ts +3 -3
- package/dist/credential-stores/index.js +1 -1
- package/dist/db/schema.d.ts +2 -2
- package/dist/db/schema.js +2 -2
- package/dist/db/test-client.d.ts +3 -3
- package/dist/db/test-client.js +1 -1
- package/dist/index.d.ts +126 -9
- package/dist/index.js +284 -73
- package/dist/{schema-Cgkp_geg.d.ts → schema-DKbG39on.d.ts} +24 -1
- package/dist/server-BXoUiBMg.d.ts +127 -0
- package/dist/types/index.d.ts +33 -113
- package/dist/types/index.js +1 -1
- package/dist/{utility-C_tTZ7-k.d.ts → utility-Lo5NoRHK.d.ts} +141 -11
- package/dist/utils/schema-conversion.js +1 -1
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/drizzle/{0001_fair_malice.sql → 0001_calm_sheva_callister.sql} +1 -16
- package/drizzle/meta/0001_snapshot.json +7 -1
- package/drizzle/meta/_journal.json +2 -2
- package/package.json +14 -4
- package/dist/chunk-CUM6BY2Y.js +0 -320
- package/dist/chunk-H2F72PDA.js +0 -15
- package/dist/chunk-OUXC23J7.js +0 -12534
- /package/dist/{chunk-NOPEANIU.js → chunk-NFTJ5JBY.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as drizzle_orm from 'drizzle-orm';
|
|
2
2
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
3
|
-
import { l as ContextFetchDefinition, C as ConversationHistoryConfig, T as TaskMetadataConfig, m as ToolMcpConfig, n as ToolServerCapabilities, o as ConversationMetadata, p as MessageContent, q as MessageMetadata, P as Part } from './utility-
|
|
3
|
+
import { l as ContextFetchDefinition, C as ConversationHistoryConfig, T as TaskMetadataConfig, m as ToolMcpConfig, n as ToolServerCapabilities, o as ConversationMetadata, p as MessageContent, q as MessageMetadata, P as Part } from './utility-Lo5NoRHK.js';
|
|
4
4
|
import { account, invitation, member, organization, session, ssoProvider, user, verification } from './auth/auth-schema.js';
|
|
5
5
|
|
|
6
6
|
declare const projects: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
@@ -3119,6 +3119,29 @@ declare const subAgentToolRelations: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
3119
3119
|
}, {}, {
|
|
3120
3120
|
$type: Record<string, string> | null;
|
|
3121
3121
|
}>;
|
|
3122
|
+
toolPolicies: drizzle_orm_pg_core.PgColumn<{
|
|
3123
|
+
name: "tool_policies";
|
|
3124
|
+
tableName: "sub_agent_tool_relations";
|
|
3125
|
+
dataType: "json";
|
|
3126
|
+
columnType: "PgJsonb";
|
|
3127
|
+
data: Record<string, {
|
|
3128
|
+
needsApproval?: boolean;
|
|
3129
|
+
}> | null;
|
|
3130
|
+
driverParam: unknown;
|
|
3131
|
+
notNull: false;
|
|
3132
|
+
hasDefault: false;
|
|
3133
|
+
isPrimaryKey: false;
|
|
3134
|
+
isAutoincrement: false;
|
|
3135
|
+
hasRuntimeDefault: false;
|
|
3136
|
+
enumValues: undefined;
|
|
3137
|
+
baseColumn: never;
|
|
3138
|
+
identity: undefined;
|
|
3139
|
+
generated: undefined;
|
|
3140
|
+
}, {}, {
|
|
3141
|
+
$type: Record<string, {
|
|
3142
|
+
needsApproval?: boolean;
|
|
3143
|
+
}> | null;
|
|
3144
|
+
}>;
|
|
3122
3145
|
subAgentId: drizzle_orm_pg_core.PgColumn<{
|
|
3123
3146
|
name: "sub_agent_id";
|
|
3124
3147
|
tableName: "sub_agent_tool_relations";
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { Context } from 'hono';
|
|
2
|
+
import { h as CredentialStoreType } from './utility-Lo5NoRHK.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Credential store interface for managing different types of credentials
|
|
6
|
+
*/
|
|
7
|
+
interface CredentialStore {
|
|
8
|
+
/**
|
|
9
|
+
* Unique identifier for this credential store
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
/**
|
|
13
|
+
* Type of credential store
|
|
14
|
+
*/
|
|
15
|
+
type: keyof typeof CredentialStoreType;
|
|
16
|
+
/**
|
|
17
|
+
* Get a credential by key
|
|
18
|
+
*/
|
|
19
|
+
get(key: string): Promise<string | null>;
|
|
20
|
+
/**
|
|
21
|
+
* Set a credential
|
|
22
|
+
*/
|
|
23
|
+
set(key: string, value: string, metadata?: Record<string, string>): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Check if a credential exists
|
|
26
|
+
*/
|
|
27
|
+
has(key: string): Promise<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Delete a credential
|
|
30
|
+
*/
|
|
31
|
+
delete(key: string): Promise<boolean>;
|
|
32
|
+
/**
|
|
33
|
+
* Check if the credential store is available and functional
|
|
34
|
+
* @returns Promise resolving to availability status and optional reason if unavailable
|
|
35
|
+
*/
|
|
36
|
+
checkAvailability(): Promise<{
|
|
37
|
+
available: boolean;
|
|
38
|
+
reason?: string;
|
|
39
|
+
}>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Server configuration options for HTTP server behavior
|
|
43
|
+
* These settings control connection management, timeouts, and server behavior
|
|
44
|
+
*/
|
|
45
|
+
interface ServerOptions {
|
|
46
|
+
/**
|
|
47
|
+
* Server port to listen on
|
|
48
|
+
* Default: 3000
|
|
49
|
+
*/
|
|
50
|
+
port?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Keep alive timeout in milliseconds
|
|
53
|
+
* Time to wait for additional data after the last response before closing the connection.
|
|
54
|
+
* Used for persistent connections to improve performance by reusing connections.
|
|
55
|
+
* Scenario: Set higher (10-30s) for high-traffic APIs, lower (1-5s) for low-traffic services.
|
|
56
|
+
* Default: 60000ms (60 seconds)
|
|
57
|
+
*/
|
|
58
|
+
keepAliveTimeout?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Enable keep alive connections
|
|
61
|
+
* When true, allows connection reuse for multiple requests.
|
|
62
|
+
* Improves performance but uses more server resources.
|
|
63
|
+
* Scenario: Enable for APIs with frequent requests, disable for one-off services.
|
|
64
|
+
* Default: true
|
|
65
|
+
*/
|
|
66
|
+
keepAlive?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Request timeout in milliseconds
|
|
69
|
+
* Maximum time to wait for a complete request from the client.
|
|
70
|
+
* Helps prevent DoS attacks by limiting resource consumption from slow clients.
|
|
71
|
+
* Scenario: Set lower (30s) for simple APIs, higher (5-10min) for file upload services.
|
|
72
|
+
* Default: 60000ms (60 seconds)
|
|
73
|
+
*/
|
|
74
|
+
requestTimeout?: number;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* CORS configuration compatible with Hono's CORSOptions
|
|
78
|
+
*/
|
|
79
|
+
interface CorsConfig {
|
|
80
|
+
/**
|
|
81
|
+
* Allowed origins - string, array of strings, or function
|
|
82
|
+
*/
|
|
83
|
+
origin?: string | string[] | ((origin: string, c?: Context) => string | null | undefined);
|
|
84
|
+
/**
|
|
85
|
+
* Allowed methods
|
|
86
|
+
*/
|
|
87
|
+
allowMethods?: string[];
|
|
88
|
+
/**
|
|
89
|
+
* Allowed headers
|
|
90
|
+
*/
|
|
91
|
+
allowHeaders?: string[];
|
|
92
|
+
/**
|
|
93
|
+
* Exposed headers
|
|
94
|
+
*/
|
|
95
|
+
exposeHeaders?: string[];
|
|
96
|
+
/**
|
|
97
|
+
* Max age for preflight requests
|
|
98
|
+
*/
|
|
99
|
+
maxAge?: number;
|
|
100
|
+
/**
|
|
101
|
+
* Whether to allow credentials
|
|
102
|
+
*/
|
|
103
|
+
credentials?: boolean;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Base server configuration for all Inkeep services
|
|
107
|
+
*/
|
|
108
|
+
interface ServerConfig {
|
|
109
|
+
/**
|
|
110
|
+
* Server port to listen on
|
|
111
|
+
*/
|
|
112
|
+
port?: number;
|
|
113
|
+
/**
|
|
114
|
+
* Server options for HTTP behavior
|
|
115
|
+
*/
|
|
116
|
+
serverOptions?: ServerOptions;
|
|
117
|
+
/**
|
|
118
|
+
* Array of credential stores for managing API keys, tokens, etc.
|
|
119
|
+
*/
|
|
120
|
+
credentialStores?: CredentialStore[];
|
|
121
|
+
/**
|
|
122
|
+
* CORS configuration
|
|
123
|
+
*/
|
|
124
|
+
cors?: CorsConfig;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type { CredentialStore as C, ServerOptions as S, CorsConfig as a, ServerConfig as b };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,132 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
import { Context } from 'hono';
|
|
1
|
+
export { bc as A2AError, bI as A2ARequest, bJ as A2AResponse, aN as APIKeySecurityScheme, bX as AgentApiInsert, bW as AgentApiSelect, bY as AgentApiUpdate, aJ as AgentCapabilities, aX as AgentCard, dy as AgentConversationHistoryConfig, y as AgentInsert, aK as AgentProvider, w as AgentScopeConfig, B as AgentSelect, aL as AgentSkill, z as AgentUpdate, cQ as AllAgentSelect, cU as ApiKeyApiCreationResponse, cS as ApiKeyApiInsert, cR as ApiKeyApiSelect, cT as ApiKeyApiUpdate, I as ApiKeyCreateResult, E as ApiKeyInsert, D as ApiKeySelect, G as ApiKeyUpdate, a9 as Artifact, cF as ArtifactComponentApiInsert, cE as ArtifactComponentApiSelect, cG as ArtifactComponentApiUpdate, K as ArtifactComponentInsert, J as ArtifactComponentSelect, L as ArtifactComponentUpdate, aQ as AuthorizationCodeOAuthFlow, dh as CanDelegateToExternalAgent, dg as CanUseItem, bs as CancelTaskRequest, bD as CancelTaskResponse, bC as CancelTaskSuccessResponse, aR as ClientCredentialsOAuthFlow, ba as ContentTypeNotSupportedError, ct as ContextCacheApiInsert, cs as ContextCacheApiSelect, cu as ContextCacheApiUpdate, dz as ContextCacheEntry, Q as ContextCacheInsert, O as ContextCacheSelect, cr as ContextCacheUpdate, cn as ContextConfigApiInsert, cm as ContextConfigApiSelect, co as ContextConfigApiUpdate, R as ContextConfigInsert, s as ContextConfigSelect, U as ContextConfigUpdate, l as ContextFetchDefinition, ch as ConversationApiInsert, cg as ConversationApiSelect, ci as ConversationApiUpdate, C as ConversationHistoryConfig, W as ConversationInsert, o as ConversationMetadata, dx as ConversationScopeOptions, V as ConversationSelect, X as ConversationUpdate, H as CreateApiKeyParams, r as CredentialReferenceApiInsert, cV as CredentialReferenceApiSelect, cW as CredentialReferenceApiUpdate, $ as CredentialReferenceInsert, Y as CredentialReferenceSelect, a0 as CredentialReferenceUpdate, h as CredentialStoreType, cw as DataComponentApiInsert, cv as DataComponentApiSelect, cx as DataComponentApiUpdate, a2 as DataComponentInsert, a1 as DataComponentSelect, a3 as DataComponentUpdate, aH as DataPart, ay as ExecutionContext, cO as ExternalAgentApiInsert, cN as ExternalAgentApiSelect, cP as ExternalAgentApiUpdate, a4 as ExternalAgentInsert, _ as ExternalAgentSelect, a5 as ExternalAgentUpdate, bV as ExternalSubAgentRelationApiInsert, bU as ExternalSubAgentRelationInsert, cq as FetchConfig, cp as FetchDefinition, aD as FileBase, aG as FilePart, aE as FileWithBytes, aF as FileWithUri, dI as Filter, df as FullAgentAgentInsert, v as FullAgentDefinition, ae as FullProjectDefinition, a6 as FunctionApiInsert, cd as FunctionApiSelect, ce as FunctionApiUpdate, cb as FunctionInsert, ca as FunctionSelect, a7 as FunctionToolApiInsert, cf as FunctionToolApiSelect, a8 as FunctionToolApiUpdate, cc as FunctionUpdate, bu as GetTaskPushNotificationConfigRequest, bH as GetTaskPushNotificationConfigResponse, bG as GetTaskPushNotificationConfigSuccessResponse, br as GetTaskRequest, bB as GetTaskResponse, bA as GetTaskSuccessResponse, aO as HTTPAuthSecurityScheme, aS as ImplicitOAuthFlow, b5 as InternalError, bb as InvalidAgentResponseError, b4 as InvalidParamsError, b2 as InvalidRequestError, b1 as JSONParseError, bm as JSONRPCError, bo as JSONRPCErrorResponse, bk as JSONRPCMessage, bl as JSONRPCRequest, bn as JSONRPCResult, dd as LedgerArtifactApiInsert, dc as LedgerArtifactApiSelect, de as LedgerArtifactApiUpdate, da as LedgerArtifactInsert, aa as LedgerArtifactSelect, db as LedgerArtifactUpdate, dH as MCPServerType, t as MCPToolConfig, i as MCPTransportType, dA as McpAuthType, dB as McpServerAuth, dD as McpServerCapabilities, av as McpTool, dE as McpToolDefinition, dC as McpTransportConfig, aY as Message, ck as MessageApiInsert, cj as MessageApiSelect, cl as MessageApiUpdate, p as MessageContent, ac as MessageInsert, q as MessageMetadata, ds as MessageMode, bK as MessagePart, dr as MessageRole, az as MessageSelect, bi as MessageSendConfiguration, bj as MessageSendParams, dq as MessageType, ad as MessageUpdate, ab as MessageVisibility, b3 as MethodNotFoundError, dt as Models, aU as OAuth2SecurityScheme, aP as OAuthFlows, aV as OpenIdConnectSecurityScheme, dn as Pagination, x as PaginationConfig, ah as PaginationResult, P as Part, aB as PartBase, aT as PasswordOAuthFlow, dl as ProjectApiInsert, dk as ProjectApiSelect, dm as ProjectApiUpdate, af as ProjectInfo, aj as ProjectInsert, du as ProjectModels, ai as ProjectResourceCounts, u as ProjectScopeConfig, ag as ProjectSelect, ak as ProjectUpdate, bd as PushNotificationAuthenticationInfo, be as PushNotificationConfig, b8 as PushNotificationNotSupportedError, aW as SecurityScheme, aM as SecuritySchemeBase, bp as SendMessageRequest, bx as SendMessageResponse, bw as SendMessageSuccessResponse, bq as SendStreamingMessageRequest, bz as SendStreamingMessageResponse, by as SendStreamingMessageSuccessResponse, bt as SetTaskPushNotificationConfigRequest, bF as SetTaskPushNotificationConfigResponse, bE as SetTaskPushNotificationConfigSuccessResponse, dw as StatusComponent, dv as StatusUpdateSettings, bN as SubAgentApiInsert, bM as SubAgentApiSelect, bO as SubAgentApiUpdate, cL as SubAgentArtifactComponentApiInsert, cK as SubAgentArtifactComponentApiSelect, cM as SubAgentArtifactComponentApiUpdate, cI as SubAgentArtifactComponentInsert, cH as SubAgentArtifactComponentSelect, cJ as SubAgentArtifactComponentUpdate, cC as SubAgentDataComponentApiInsert, cB as SubAgentDataComponentApiSelect, cD as SubAgentDataComponentApiUpdate, cz as SubAgentDataComponentInsert, cy as SubAgentDataComponentSelect, cA as SubAgentDataComponentUpdate, di as SubAgentDefinition, d3 as SubAgentExternalAgentRelationApiInsert, d2 as SubAgentExternalAgentRelationApiSelect, d4 as SubAgentExternalAgentRelationApiUpdate, al as SubAgentExternalAgentRelationInsert, d0 as SubAgentExternalAgentRelationSelect, d1 as SubAgentExternalAgentRelationUpdate, ap as SubAgentInsert, bR as SubAgentRelationApiInsert, bQ as SubAgentRelationApiSelect, bS as SubAgentRelationApiUpdate, am as SubAgentRelationInsert, bT as SubAgentRelationQuery, bP as SubAgentRelationSelect, an as SubAgentRelationUpdate, N as SubAgentScopeConfig, ar as SubAgentSelect, d8 as SubAgentTeamAgentRelationApiInsert, d7 as SubAgentTeamAgentRelationApiSelect, d9 as SubAgentTeamAgentRelationApiUpdate, as as SubAgentTeamAgentRelationInsert, d5 as SubAgentTeamAgentRelationSelect, d6 as SubAgentTeamAgentRelationUpdate, c_ as SubAgentToolRelationApiInsert, cZ as SubAgentToolRelationApiSelect, c$ as SubAgentToolRelationApiUpdate, cY as SubAgentToolRelationInsert, cX as SubAgentToolRelationSelect, ao as SubAgentToolRelationUpdate, aq as SubAgentUpdate, dp as SummaryEvent, dF as TOOL_STATUS_VALUES, a_ as Task, b$ as TaskApiInsert, b_ as TaskApiSelect, c0 as TaskApiUpdate, bL as TaskArtifact, b0 as TaskArtifactUpdateEvent, bg as TaskIdParams, at as TaskInsert, T as TaskMetadataConfig, b7 as TaskNotCancelableError, b6 as TaskNotFoundError, bf as TaskPushNotificationConfig, bh as TaskQueryParams, c5 as TaskRelationApiInsert, c4 as TaskRelationApiSelect, c6 as TaskRelationApiUpdate, c2 as TaskRelationInsert, c1 as TaskRelationSelect, c3 as TaskRelationUpdate, bv as TaskResubscriptionRequest, au as TaskSelect, aI as TaskState, aZ as TaskStatus, a$ as TaskStatusUpdateEvent, bZ as TaskUpdate, aC as TextPart, c8 as ToolApiInsert, c7 as ToolApiSelect, c9 as ToolApiUpdate, dj as ToolDefinition, aw as ToolInsert, m as ToolMcpConfig, Z as ToolSelect, n as ToolServerCapabilities, ax as ToolUpdate, b9 as UnsupportedOperationError, dG as VALID_RELATION_TYPES } from '../utility-Lo5NoRHK.js';
|
|
2
|
+
export { a as CorsConfig, C as CredentialStore, b as ServerConfig, S as ServerOptions } from '../server-BXoUiBMg.js';
|
|
4
3
|
import 'zod';
|
|
5
4
|
import 'drizzle-zod';
|
|
6
5
|
import 'drizzle-orm/pg-core';
|
|
7
6
|
import '@hono/zod-openapi';
|
|
7
|
+
import 'hono';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Tool policy configuration for individual tools within an MCP server
|
|
11
11
|
*/
|
|
12
|
-
interface
|
|
12
|
+
interface ToolPolicy {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Whether this specific tool requires user approval before execution
|
|
15
|
+
* If true, tool execution will pause and wait for explicit user approval
|
|
16
|
+
* If false/undefined, tool executes immediately when called
|
|
15
17
|
*/
|
|
16
|
-
|
|
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
|
-
}>;
|
|
18
|
+
needsApproval?: boolean;
|
|
45
19
|
}
|
|
46
20
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
21
|
+
* Flexible tool selection format for MCP servers
|
|
22
|
+
* Can be either a simple string (tool name) or an object with policies
|
|
49
23
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
}
|
|
24
|
+
type McpToolSelection = string | {
|
|
25
|
+
name: string;
|
|
26
|
+
needsApproval?: boolean;
|
|
27
|
+
};
|
|
81
28
|
/**
|
|
82
|
-
*
|
|
29
|
+
* Input format for configuring MCP tool usage in agents
|
|
83
30
|
*/
|
|
84
|
-
interface
|
|
85
|
-
|
|
86
|
-
|
|
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;
|
|
31
|
+
interface AgentMcpConfigInput {
|
|
32
|
+
selectedTools?: McpToolSelection[];
|
|
33
|
+
headers?: Record<string, string>;
|
|
109
34
|
}
|
|
110
35
|
/**
|
|
111
|
-
*
|
|
36
|
+
* Normalized format stored in database and used at runtime
|
|
112
37
|
*/
|
|
113
|
-
interface
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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;
|
|
38
|
+
interface AgentMcpConfig {
|
|
39
|
+
server: any;
|
|
40
|
+
selectedTools?: string[];
|
|
41
|
+
headers?: Record<string, string>;
|
|
42
|
+
toolPolicies?: Record<string, ToolPolicy>;
|
|
130
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Helper function to normalize McpToolSelection[] into separate arrays
|
|
46
|
+
*/
|
|
47
|
+
declare function normalizeToolSelections(selections?: McpToolSelection[]): {
|
|
48
|
+
selectedTools: string[];
|
|
49
|
+
toolPolicies: Record<string, ToolPolicy>;
|
|
50
|
+
};
|
|
131
51
|
|
|
132
|
-
export { type
|
|
52
|
+
export { type AgentMcpConfig, type AgentMcpConfigInput, type McpToolSelection, type ToolPolicy, normalizeToolSelections };
|
package/dist/types/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { TaskState } from '../chunk-
|
|
1
|
+
export { TaskState, normalizeToolSelections } from '../chunk-CMNLBV2A.js';
|
|
2
2
|
export { CredentialStoreType, MCPServerType, MCPTransportType, TOOL_STATUS_VALUES, VALID_RELATION_TYPES } from '../chunk-YFHT5M2R.js';
|