@voltagent/core 1.2.4 → 1.2.6
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/index.d.mts +1886 -689
- package/dist/index.d.ts +1886 -689
- package/dist/index.js +1447 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1438 -51
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ToolCallOptions, ProviderOptions as ProviderOptions$1, ModelMessage, DataContent as DataContent$1, UserContent, AssistantContent, ToolContent } from '@ai-sdk/provider-utils';
|
|
2
2
|
export { AssistantContent, FilePart, ImagePart, ProviderOptions, TextPart, ToolContent, UserContent } from '@ai-sdk/provider-utils';
|
|
3
|
-
import { Tool as Tool$1, TextStreamPart, generateText, UIMessage, StreamTextResult, LanguageModel, CallSettings, Output, ToolSet, GenerateTextResult, GenerateObjectResult, AsyncIterableStream as AsyncIterableStream$1, CallWarning, LanguageModelUsage, FinishReason, EmbeddingModel } from 'ai';
|
|
3
|
+
import { Tool as Tool$1, TextStreamPart, generateText, UIMessage, StreamTextResult, LanguageModel, CallSettings, Output, ToolSet, GenerateTextResult, GenerateObjectResult, AsyncIterableStream as AsyncIterableStream$1, CallWarning, LanguageModelUsage, FinishReason, EmbeddingModel, TextUIPart, FileUIPart } from 'ai';
|
|
4
4
|
export { LanguageModel, Tool as VercelTool, hasToolCall, stepCountIs } from 'ai';
|
|
5
5
|
import * as zod from 'zod';
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -1928,8 +1928,26 @@ interface VoltOpsActionExecutionResult {
|
|
|
1928
1928
|
responsePayload: unknown;
|
|
1929
1929
|
metadata?: Record<string, unknown> | null;
|
|
1930
1930
|
}
|
|
1931
|
-
|
|
1931
|
+
type VoltOpsCredentialMetadata = {
|
|
1932
|
+
metadata?: Record<string, unknown>;
|
|
1933
|
+
};
|
|
1934
|
+
type VoltOpsStoredCredentialRef = {
|
|
1932
1935
|
credentialId: string;
|
|
1936
|
+
} & VoltOpsCredentialMetadata;
|
|
1937
|
+
type WithCredentialMetadata<T> = T & VoltOpsCredentialMetadata;
|
|
1938
|
+
type VoltOpsAirtableCredential = VoltOpsStoredCredentialRef | WithCredentialMetadata<{
|
|
1939
|
+
apiKey: string;
|
|
1940
|
+
}>;
|
|
1941
|
+
type VoltOpsSlackCredential = VoltOpsStoredCredentialRef | WithCredentialMetadata<{
|
|
1942
|
+
botToken: string;
|
|
1943
|
+
}>;
|
|
1944
|
+
type VoltOpsDiscordCredential = VoltOpsStoredCredentialRef | WithCredentialMetadata<{
|
|
1945
|
+
botToken: string;
|
|
1946
|
+
}> | WithCredentialMetadata<{
|
|
1947
|
+
webhookUrl: string;
|
|
1948
|
+
}>;
|
|
1949
|
+
interface VoltOpsAirtableCreateRecordParams {
|
|
1950
|
+
credential: VoltOpsAirtableCredential;
|
|
1933
1951
|
baseId: string;
|
|
1934
1952
|
tableId: string;
|
|
1935
1953
|
fields: Record<string, unknown>;
|
|
@@ -1940,7 +1958,7 @@ interface VoltOpsAirtableCreateRecordParams {
|
|
|
1940
1958
|
projectId?: string | null;
|
|
1941
1959
|
}
|
|
1942
1960
|
interface VoltOpsAirtableUpdateRecordParams {
|
|
1943
|
-
|
|
1961
|
+
credential: VoltOpsAirtableCredential;
|
|
1944
1962
|
baseId: string;
|
|
1945
1963
|
tableId: string;
|
|
1946
1964
|
recordId: string;
|
|
@@ -1952,7 +1970,7 @@ interface VoltOpsAirtableUpdateRecordParams {
|
|
|
1952
1970
|
projectId?: string | null;
|
|
1953
1971
|
}
|
|
1954
1972
|
interface VoltOpsAirtableDeleteRecordParams {
|
|
1955
|
-
|
|
1973
|
+
credential: VoltOpsAirtableCredential;
|
|
1956
1974
|
baseId: string;
|
|
1957
1975
|
tableId: string;
|
|
1958
1976
|
recordId: string;
|
|
@@ -1961,7 +1979,7 @@ interface VoltOpsAirtableDeleteRecordParams {
|
|
|
1961
1979
|
projectId?: string | null;
|
|
1962
1980
|
}
|
|
1963
1981
|
interface VoltOpsAirtableGetRecordParams {
|
|
1964
|
-
|
|
1982
|
+
credential: VoltOpsAirtableCredential;
|
|
1965
1983
|
baseId: string;
|
|
1966
1984
|
tableId: string;
|
|
1967
1985
|
recordId: string;
|
|
@@ -1971,7 +1989,7 @@ interface VoltOpsAirtableGetRecordParams {
|
|
|
1971
1989
|
projectId?: string | null;
|
|
1972
1990
|
}
|
|
1973
1991
|
interface VoltOpsAirtableListRecordsParams {
|
|
1974
|
-
|
|
1992
|
+
credential: VoltOpsAirtableCredential;
|
|
1975
1993
|
baseId: string;
|
|
1976
1994
|
tableId: string;
|
|
1977
1995
|
view?: string;
|
|
@@ -1990,7 +2008,7 @@ interface VoltOpsAirtableListRecordsParams {
|
|
|
1990
2008
|
projectId?: string | null;
|
|
1991
2009
|
}
|
|
1992
2010
|
interface VoltOpsSlackBaseParams {
|
|
1993
|
-
|
|
2011
|
+
credential: VoltOpsSlackCredential;
|
|
1994
2012
|
actionId?: string;
|
|
1995
2013
|
catalogId?: string;
|
|
1996
2014
|
projectId?: string | null;
|
|
@@ -2024,6 +2042,83 @@ interface VoltOpsSlackSearchMessagesParams extends VoltOpsSlackBaseParams {
|
|
|
2024
2042
|
channelIds?: string[];
|
|
2025
2043
|
limit?: number;
|
|
2026
2044
|
}
|
|
2045
|
+
type VoltOpsDiscordChannelType = "text" | "voice" | "announcement" | "category" | "forum";
|
|
2046
|
+
interface VoltOpsDiscordConfig {
|
|
2047
|
+
guildId?: string;
|
|
2048
|
+
channelId?: string;
|
|
2049
|
+
threadId?: string;
|
|
2050
|
+
userId?: string;
|
|
2051
|
+
roleId?: string;
|
|
2052
|
+
}
|
|
2053
|
+
interface VoltOpsDiscordBaseParams {
|
|
2054
|
+
credential: VoltOpsDiscordCredential;
|
|
2055
|
+
catalogId?: string;
|
|
2056
|
+
projectId?: string | null;
|
|
2057
|
+
actionId?: string;
|
|
2058
|
+
config?: VoltOpsDiscordConfig | null;
|
|
2059
|
+
}
|
|
2060
|
+
interface VoltOpsDiscordSendMessageParams extends VoltOpsDiscordBaseParams {
|
|
2061
|
+
guildId?: string;
|
|
2062
|
+
channelId?: string;
|
|
2063
|
+
threadId?: string;
|
|
2064
|
+
content?: string;
|
|
2065
|
+
embeds?: unknown[];
|
|
2066
|
+
components?: unknown[];
|
|
2067
|
+
tts?: boolean;
|
|
2068
|
+
allowedMentions?: Record<string, unknown>;
|
|
2069
|
+
replyToMessageId?: string;
|
|
2070
|
+
}
|
|
2071
|
+
interface VoltOpsDiscordSendWebhookMessageParams extends VoltOpsDiscordSendMessageParams {
|
|
2072
|
+
username?: string;
|
|
2073
|
+
avatarUrl?: string;
|
|
2074
|
+
}
|
|
2075
|
+
interface VoltOpsDiscordChannelMessageParams extends VoltOpsDiscordBaseParams {
|
|
2076
|
+
channelId: string;
|
|
2077
|
+
messageId: string;
|
|
2078
|
+
}
|
|
2079
|
+
interface VoltOpsDiscordListMessagesParams extends VoltOpsDiscordBaseParams {
|
|
2080
|
+
channelId: string;
|
|
2081
|
+
limit?: number;
|
|
2082
|
+
before?: string;
|
|
2083
|
+
after?: string;
|
|
2084
|
+
}
|
|
2085
|
+
interface VoltOpsDiscordReactionParams extends VoltOpsDiscordBaseParams {
|
|
2086
|
+
channelId: string;
|
|
2087
|
+
messageId: string;
|
|
2088
|
+
emoji: string;
|
|
2089
|
+
}
|
|
2090
|
+
interface VoltOpsDiscordCreateChannelParams extends VoltOpsDiscordBaseParams {
|
|
2091
|
+
guildId: string;
|
|
2092
|
+
name: string;
|
|
2093
|
+
type?: VoltOpsDiscordChannelType;
|
|
2094
|
+
topic?: string;
|
|
2095
|
+
}
|
|
2096
|
+
interface VoltOpsDiscordUpdateChannelParams extends VoltOpsDiscordBaseParams {
|
|
2097
|
+
channelId: string;
|
|
2098
|
+
name?: string;
|
|
2099
|
+
topic?: string;
|
|
2100
|
+
archived?: boolean;
|
|
2101
|
+
locked?: boolean;
|
|
2102
|
+
}
|
|
2103
|
+
interface VoltOpsDiscordDeleteChannelParams extends VoltOpsDiscordBaseParams {
|
|
2104
|
+
channelId: string;
|
|
2105
|
+
}
|
|
2106
|
+
interface VoltOpsDiscordGetChannelParams extends VoltOpsDiscordBaseParams {
|
|
2107
|
+
channelId: string;
|
|
2108
|
+
}
|
|
2109
|
+
interface VoltOpsDiscordListChannelsParams extends VoltOpsDiscordBaseParams {
|
|
2110
|
+
guildId: string;
|
|
2111
|
+
}
|
|
2112
|
+
interface VoltOpsDiscordListMembersParams extends VoltOpsDiscordBaseParams {
|
|
2113
|
+
guildId: string;
|
|
2114
|
+
limit?: number;
|
|
2115
|
+
after?: string;
|
|
2116
|
+
}
|
|
2117
|
+
interface VoltOpsDiscordMemberRoleParams extends VoltOpsDiscordBaseParams {
|
|
2118
|
+
guildId: string;
|
|
2119
|
+
userId: string;
|
|
2120
|
+
roleId: string;
|
|
2121
|
+
}
|
|
2027
2122
|
type VoltOpsActionsApi = {
|
|
2028
2123
|
airtable: {
|
|
2029
2124
|
createRecord: (params: VoltOpsAirtableCreateRecordParams) => Promise<VoltOpsActionExecutionResult>;
|
|
@@ -2037,6 +2132,23 @@ type VoltOpsActionsApi = {
|
|
|
2037
2132
|
deleteMessage: (params: VoltOpsSlackDeleteMessageParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2038
2133
|
searchMessages: (params: VoltOpsSlackSearchMessagesParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2039
2134
|
};
|
|
2135
|
+
discord: {
|
|
2136
|
+
sendMessage: (params: VoltOpsDiscordSendMessageParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2137
|
+
sendWebhookMessage: (params: VoltOpsDiscordSendWebhookMessageParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2138
|
+
deleteMessage: (params: VoltOpsDiscordChannelMessageParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2139
|
+
getMessage: (params: VoltOpsDiscordChannelMessageParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2140
|
+
listMessages: (params: VoltOpsDiscordListMessagesParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2141
|
+
addReaction: (params: VoltOpsDiscordReactionParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2142
|
+
removeReaction: (params: VoltOpsDiscordReactionParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2143
|
+
createChannel: (params: VoltOpsDiscordCreateChannelParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2144
|
+
updateChannel: (params: VoltOpsDiscordUpdateChannelParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2145
|
+
deleteChannel: (params: VoltOpsDiscordDeleteChannelParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2146
|
+
getChannel: (params: VoltOpsDiscordGetChannelParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2147
|
+
listChannels: (params: VoltOpsDiscordListChannelsParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2148
|
+
listMembers: (params: VoltOpsDiscordListMembersParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2149
|
+
addMemberRole: (params: VoltOpsDiscordMemberRoleParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2150
|
+
removeMemberRole: (params: VoltOpsDiscordMemberRoleParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2151
|
+
};
|
|
2040
2152
|
};
|
|
2041
2153
|
interface VoltOpsEvalsApi {
|
|
2042
2154
|
runs: {
|
|
@@ -2447,6 +2559,23 @@ declare class VoltOpsActionsClient {
|
|
|
2447
2559
|
deleteMessage: (params: VoltOpsSlackDeleteMessageParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2448
2560
|
searchMessages: (params: VoltOpsSlackSearchMessagesParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2449
2561
|
};
|
|
2562
|
+
readonly discord: {
|
|
2563
|
+
sendMessage: (params: VoltOpsDiscordSendMessageParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2564
|
+
sendWebhookMessage: (params: VoltOpsDiscordSendWebhookMessageParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2565
|
+
deleteMessage: (params: VoltOpsDiscordChannelMessageParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2566
|
+
getMessage: (params: VoltOpsDiscordChannelMessageParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2567
|
+
listMessages: (params: VoltOpsDiscordListMessagesParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2568
|
+
addReaction: (params: VoltOpsDiscordReactionParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2569
|
+
removeReaction: (params: VoltOpsDiscordReactionParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2570
|
+
createChannel: (params: VoltOpsDiscordCreateChannelParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2571
|
+
updateChannel: (params: VoltOpsDiscordUpdateChannelParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2572
|
+
deleteChannel: (params: VoltOpsDiscordDeleteChannelParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2573
|
+
getChannel: (params: VoltOpsDiscordGetChannelParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2574
|
+
listChannels: (params: VoltOpsDiscordListChannelsParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2575
|
+
listMembers: (params: VoltOpsDiscordListMembersParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2576
|
+
addMemberRole: (params: VoltOpsDiscordMemberRoleParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2577
|
+
removeMemberRole: (params: VoltOpsDiscordMemberRoleParams) => Promise<VoltOpsActionExecutionResult>;
|
|
2578
|
+
};
|
|
2450
2579
|
constructor(transport: VoltOpsActionsTransport, options?: {
|
|
2451
2580
|
useProjectEndpoint?: boolean;
|
|
2452
2581
|
});
|
|
@@ -2462,6 +2591,33 @@ declare class VoltOpsActionsClient {
|
|
|
2462
2591
|
private deleteSlackMessage;
|
|
2463
2592
|
private searchSlackMessages;
|
|
2464
2593
|
private executeSlackAction;
|
|
2594
|
+
private sendDiscordMessage;
|
|
2595
|
+
private sendDiscordWebhookMessage;
|
|
2596
|
+
private deleteDiscordMessage;
|
|
2597
|
+
private getDiscordMessage;
|
|
2598
|
+
private listDiscordMessages;
|
|
2599
|
+
private addDiscordReaction;
|
|
2600
|
+
private removeDiscordReaction;
|
|
2601
|
+
private handleDiscordReaction;
|
|
2602
|
+
private createDiscordChannel;
|
|
2603
|
+
private updateDiscordChannel;
|
|
2604
|
+
private deleteDiscordChannel;
|
|
2605
|
+
private getDiscordChannel;
|
|
2606
|
+
private listDiscordChannels;
|
|
2607
|
+
private listDiscordMembers;
|
|
2608
|
+
private addDiscordMemberRole;
|
|
2609
|
+
private removeDiscordMemberRole;
|
|
2610
|
+
private handleDiscordMemberRole;
|
|
2611
|
+
private executeDiscordAction;
|
|
2612
|
+
private buildDiscordMessageInput;
|
|
2613
|
+
private mergeDiscordConfig;
|
|
2614
|
+
private optionalIdentifier;
|
|
2615
|
+
private ensureArray;
|
|
2616
|
+
private normalizeDiscordChannelType;
|
|
2617
|
+
private ensureAirtableCredential;
|
|
2618
|
+
private ensureSlackCredential;
|
|
2619
|
+
private ensureDiscordCredential;
|
|
2620
|
+
private normalizeCredentialMetadata;
|
|
2465
2621
|
private normalizeIdentifier;
|
|
2466
2622
|
private ensureRecord;
|
|
2467
2623
|
private sanitizeStringArray;
|
|
@@ -7196,913 +7352,1917 @@ type CreateOutputGuardrailOptions<TOutput = unknown> = CreateGuardrailDefinition
|
|
|
7196
7352
|
declare function createInputGuardrail(options: CreateInputGuardrailOptions): InputGuardrail;
|
|
7197
7353
|
declare function createOutputGuardrail<TOutput = unknown>(options: CreateOutputGuardrailOptions<TOutput>): OutputGuardrail<TOutput>;
|
|
7198
7354
|
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7355
|
+
declare const TRIGGER_CONTEXT_KEY: unique symbol;
|
|
7356
|
+
|
|
7357
|
+
interface DefaultTriggerCatalogEntry {
|
|
7358
|
+
triggerId: string;
|
|
7359
|
+
dslTriggerId?: string;
|
|
7360
|
+
displayName: string;
|
|
7361
|
+
service: string;
|
|
7362
|
+
category?: string | null;
|
|
7363
|
+
authType?: string | null;
|
|
7364
|
+
deliveryModes: string[];
|
|
7365
|
+
beta?: boolean;
|
|
7366
|
+
defaultVersion?: string | null;
|
|
7367
|
+
metadata?: Record<string, unknown> | null;
|
|
7368
|
+
version?: string;
|
|
7369
|
+
sourceHash?: string | null;
|
|
7370
|
+
payloadSchema?: Record<string, unknown> | null;
|
|
7371
|
+
configSchema?: Record<string, unknown> | null;
|
|
7372
|
+
versionMetadata?: Record<string, unknown> | null;
|
|
7373
|
+
events: ReadonlyArray<DefaultTriggerCatalogEvent>;
|
|
7374
|
+
}
|
|
7375
|
+
interface DefaultTriggerCatalogEvent extends Record<string, unknown> {
|
|
7376
|
+
key: string;
|
|
7377
|
+
displayName: string;
|
|
7378
|
+
description: string;
|
|
7379
|
+
deliveryMode: string;
|
|
7380
|
+
defaultConfig?: Record<string, unknown> | null;
|
|
7381
|
+
[key: string]: unknown;
|
|
7382
|
+
}
|
|
7383
|
+
declare const DEFAULT_TRIGGER_CATALOG: readonly [{
|
|
7384
|
+
readonly triggerId: "cron";
|
|
7385
|
+
readonly displayName: "Cron Trigger";
|
|
7386
|
+
readonly service: "Scheduler";
|
|
7387
|
+
readonly category: "Platform & General";
|
|
7388
|
+
readonly authType: null;
|
|
7389
|
+
readonly deliveryModes: ["schedule"];
|
|
7390
|
+
readonly metadata: {
|
|
7391
|
+
readonly description: "Run an agent or workflow on a recurring schedule using cron expressions.";
|
|
7392
|
+
};
|
|
7393
|
+
readonly version: "1.0.0";
|
|
7394
|
+
readonly events: readonly [{
|
|
7395
|
+
readonly key: "cron.schedule";
|
|
7396
|
+
readonly displayName: "Scheduled run";
|
|
7397
|
+
readonly description: "Execute on the provided cron expression schedule (e.g., every minute, hourly).";
|
|
7398
|
+
readonly deliveryMode: "schedule";
|
|
7399
|
+
readonly defaultConfig: {
|
|
7400
|
+
readonly schedule: {
|
|
7401
|
+
readonly type: "cron";
|
|
7402
|
+
readonly expression: "*/5 * * * *";
|
|
7403
|
+
readonly timezone: "UTC";
|
|
7404
|
+
};
|
|
7405
|
+
};
|
|
7406
|
+
}];
|
|
7407
|
+
}, {
|
|
7408
|
+
readonly triggerId: "gmail-new-email";
|
|
7409
|
+
readonly dslTriggerId: "gmail";
|
|
7410
|
+
readonly displayName: "Gmail";
|
|
7411
|
+
readonly service: "Gmail";
|
|
7412
|
+
readonly category: "Email & Messaging";
|
|
7413
|
+
readonly authType: "oauth2";
|
|
7414
|
+
readonly deliveryModes: ["polling"];
|
|
7415
|
+
readonly metadata: {
|
|
7416
|
+
readonly description: "Trigger when a new email appears in a selected Gmail inbox or label.";
|
|
7417
|
+
};
|
|
7418
|
+
readonly version: "1.0.0";
|
|
7419
|
+
readonly events: readonly [{
|
|
7420
|
+
readonly key: "gmail.newEmail";
|
|
7421
|
+
readonly displayName: "New email";
|
|
7422
|
+
readonly description: "Detect new emails in the configured Gmail account and optional label or search filter.";
|
|
7423
|
+
readonly deliveryMode: "polling";
|
|
7424
|
+
}];
|
|
7425
|
+
}, {
|
|
7426
|
+
readonly triggerId: "github";
|
|
7427
|
+
readonly displayName: "GitHub";
|
|
7428
|
+
readonly service: "GitHub";
|
|
7429
|
+
readonly category: "Developer Tools";
|
|
7430
|
+
readonly authType: "token";
|
|
7431
|
+
readonly deliveryModes: ["webhook"];
|
|
7432
|
+
readonly metadata: {
|
|
7433
|
+
readonly description: "Trigger workflows from GitHub repository activity such as pushes, pull requests, or issue updates.";
|
|
7434
|
+
readonly docsUrl: "https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads";
|
|
7435
|
+
};
|
|
7436
|
+
readonly version: "1.0.0";
|
|
7437
|
+
readonly events: readonly [{
|
|
7438
|
+
readonly key: "github.*";
|
|
7439
|
+
readonly displayName: "Any event";
|
|
7440
|
+
readonly description: "Emit whenever GitHub delivers any webhook event (wildcard).";
|
|
7441
|
+
readonly deliveryMode: "webhook";
|
|
7442
|
+
}, {
|
|
7443
|
+
readonly key: "github.check_run";
|
|
7444
|
+
readonly displayName: "Check run";
|
|
7445
|
+
readonly description: "Triggered when a check run is created, rerequested, completed, or has a requested action.";
|
|
7446
|
+
readonly deliveryMode: "webhook";
|
|
7447
|
+
}, {
|
|
7448
|
+
readonly key: "github.check_suite";
|
|
7449
|
+
readonly displayName: "Check suite";
|
|
7450
|
+
readonly description: "Triggered when a check suite is completed, requested, or rerequested.";
|
|
7451
|
+
readonly deliveryMode: "webhook";
|
|
7452
|
+
}, {
|
|
7453
|
+
readonly key: "github.commit_comment";
|
|
7454
|
+
readonly displayName: "Commit comment";
|
|
7455
|
+
readonly description: "Triggered when a commit comment is created.";
|
|
7456
|
+
readonly deliveryMode: "webhook";
|
|
7457
|
+
}, {
|
|
7458
|
+
readonly key: "github.create";
|
|
7459
|
+
readonly displayName: "Create";
|
|
7460
|
+
readonly description: "Triggered when a repository, branch, or tag is created.";
|
|
7461
|
+
readonly deliveryMode: "webhook";
|
|
7462
|
+
}, {
|
|
7463
|
+
readonly key: "github.delete";
|
|
7464
|
+
readonly displayName: "Delete";
|
|
7465
|
+
readonly description: "Triggered when a repository branch or tag is deleted.";
|
|
7466
|
+
readonly deliveryMode: "webhook";
|
|
7467
|
+
}, {
|
|
7468
|
+
readonly key: "github.deploy_key";
|
|
7469
|
+
readonly displayName: "Deploy key";
|
|
7470
|
+
readonly description: "Triggered when a deploy key is added or removed from a repository.";
|
|
7471
|
+
readonly deliveryMode: "webhook";
|
|
7472
|
+
}, {
|
|
7473
|
+
readonly key: "github.deployment";
|
|
7474
|
+
readonly displayName: "Deployment";
|
|
7475
|
+
readonly description: "Triggered when a deployment is created.";
|
|
7476
|
+
readonly deliveryMode: "webhook";
|
|
7477
|
+
}, {
|
|
7478
|
+
readonly key: "github.deployment_status";
|
|
7479
|
+
readonly displayName: "Deployment status";
|
|
7480
|
+
readonly description: "Triggered when the status of a deployment changes.";
|
|
7481
|
+
readonly deliveryMode: "webhook";
|
|
7482
|
+
}, {
|
|
7483
|
+
readonly key: "github.fork";
|
|
7484
|
+
readonly displayName: "Fork";
|
|
7485
|
+
readonly description: "Triggered when a user forks a repository.";
|
|
7486
|
+
readonly deliveryMode: "webhook";
|
|
7487
|
+
}, {
|
|
7488
|
+
readonly key: "github.github_app_authorization";
|
|
7489
|
+
readonly displayName: "GitHub App authorization";
|
|
7490
|
+
readonly description: "Triggered when someone revokes their authorization of a GitHub App.";
|
|
7491
|
+
readonly deliveryMode: "webhook";
|
|
7492
|
+
}, {
|
|
7493
|
+
readonly key: "github.gollum";
|
|
7494
|
+
readonly displayName: "Gollum";
|
|
7495
|
+
readonly description: "Triggered when a Wiki page is created or updated.";
|
|
7496
|
+
readonly deliveryMode: "webhook";
|
|
7497
|
+
}, {
|
|
7498
|
+
readonly key: "github.installation";
|
|
7499
|
+
readonly displayName: "Installation";
|
|
7500
|
+
readonly description: "Triggered when someone installs, uninstalls, or accepts new permissions for a GitHub App.";
|
|
7501
|
+
readonly deliveryMode: "webhook";
|
|
7502
|
+
}, {
|
|
7503
|
+
readonly key: "github.installation_repositories";
|
|
7504
|
+
readonly displayName: "Installation repositories";
|
|
7505
|
+
readonly description: "Triggered when a repository is added or removed from a GitHub App installation.";
|
|
7506
|
+
readonly deliveryMode: "webhook";
|
|
7507
|
+
}, {
|
|
7508
|
+
readonly key: "github.issue_comment";
|
|
7509
|
+
readonly displayName: "Issue comment";
|
|
7510
|
+
readonly description: "Triggered when an issue comment is created, edited, or deleted.";
|
|
7511
|
+
readonly deliveryMode: "webhook";
|
|
7512
|
+
}, {
|
|
7513
|
+
readonly key: "github.issues";
|
|
7514
|
+
readonly displayName: "Issues";
|
|
7515
|
+
readonly description: "Triggered when an issue is created, edited, deleted, transferred, pinned, closed, reopened, or changed.";
|
|
7516
|
+
readonly deliveryMode: "webhook";
|
|
7517
|
+
}, {
|
|
7518
|
+
readonly key: "github.label";
|
|
7519
|
+
readonly displayName: "Label";
|
|
7520
|
+
readonly description: "Triggered when a repository's label is created, edited, or deleted.";
|
|
7521
|
+
readonly deliveryMode: "webhook";
|
|
7522
|
+
}, {
|
|
7523
|
+
readonly key: "github.marketplace_purchase";
|
|
7524
|
+
readonly displayName: "Marketplace purchase";
|
|
7525
|
+
readonly description: "Triggered when a GitHub Marketplace plan is purchased, upgraded, downgraded, or cancelled.";
|
|
7526
|
+
readonly deliveryMode: "webhook";
|
|
7527
|
+
}, {
|
|
7528
|
+
readonly key: "github.member";
|
|
7529
|
+
readonly displayName: "Member";
|
|
7530
|
+
readonly description: "Triggered when a user accepts an invitation, is removed, or has permissions changed as a collaborator.";
|
|
7531
|
+
readonly deliveryMode: "webhook";
|
|
7532
|
+
}, {
|
|
7533
|
+
readonly key: "github.membership";
|
|
7534
|
+
readonly displayName: "Membership";
|
|
7535
|
+
readonly description: "Triggered when a user is added or removed from a team (organization hooks only).";
|
|
7536
|
+
readonly deliveryMode: "webhook";
|
|
7537
|
+
}, {
|
|
7538
|
+
readonly key: "github.meta";
|
|
7539
|
+
readonly displayName: "Meta";
|
|
7540
|
+
readonly description: "Triggered when the webhook configuration itself is deleted.";
|
|
7541
|
+
readonly deliveryMode: "webhook";
|
|
7542
|
+
}, {
|
|
7543
|
+
readonly key: "github.milestone";
|
|
7544
|
+
readonly displayName: "Milestone";
|
|
7545
|
+
readonly description: "Triggered when a milestone is created, closed, opened, edited, or deleted.";
|
|
7546
|
+
readonly deliveryMode: "webhook";
|
|
7547
|
+
}, {
|
|
7548
|
+
readonly key: "github.org_block";
|
|
7549
|
+
readonly displayName: "Org block";
|
|
7550
|
+
readonly description: "Triggered when an organization blocks or unblocks a user (organization hooks only).";
|
|
7551
|
+
readonly deliveryMode: "webhook";
|
|
7552
|
+
}, {
|
|
7553
|
+
readonly key: "github.organization";
|
|
7554
|
+
readonly displayName: "Organization";
|
|
7555
|
+
readonly description: "Triggered when an organization is renamed, deleted, or membership changes (organization hooks only).";
|
|
7556
|
+
readonly deliveryMode: "webhook";
|
|
7557
|
+
}, {
|
|
7558
|
+
readonly key: "github.page_build";
|
|
7559
|
+
readonly displayName: "Page build";
|
|
7560
|
+
readonly description: "Triggered on pushes to a GitHub Pages enabled branch that results in a page build.";
|
|
7561
|
+
readonly deliveryMode: "webhook";
|
|
7562
|
+
}, {
|
|
7563
|
+
readonly key: "github.project";
|
|
7564
|
+
readonly displayName: "Project";
|
|
7565
|
+
readonly description: "Triggered when a project is created, updated, closed, reopened, or deleted.";
|
|
7566
|
+
readonly deliveryMode: "webhook";
|
|
7567
|
+
}, {
|
|
7568
|
+
readonly key: "github.project_card";
|
|
7569
|
+
readonly displayName: "Project card";
|
|
7570
|
+
readonly description: "Triggered when a project card is created, edited, moved, converted to an issue, or deleted.";
|
|
7571
|
+
readonly deliveryMode: "webhook";
|
|
7572
|
+
}, {
|
|
7573
|
+
readonly key: "github.project_column";
|
|
7574
|
+
readonly displayName: "Project column";
|
|
7575
|
+
readonly description: "Triggered when a project column is created, updated, moved, or deleted.";
|
|
7576
|
+
readonly deliveryMode: "webhook";
|
|
7577
|
+
}, {
|
|
7578
|
+
readonly key: "github.public";
|
|
7579
|
+
readonly displayName: "Public";
|
|
7580
|
+
readonly description: "Triggered when a private repository is open sourced.";
|
|
7581
|
+
readonly deliveryMode: "webhook";
|
|
7582
|
+
}, {
|
|
7583
|
+
readonly key: "github.pull_request";
|
|
7584
|
+
readonly displayName: "Pull request";
|
|
7585
|
+
readonly description: "Triggered when a pull request is opened, edited, closed, reopened, labeled, assigned, or synchronized.";
|
|
7586
|
+
readonly deliveryMode: "webhook";
|
|
7587
|
+
}, {
|
|
7588
|
+
readonly key: "github.pull_request_review";
|
|
7589
|
+
readonly displayName: "Pull request review";
|
|
7590
|
+
readonly description: "Triggered when a pull request review is submitted, edited, or dismissed.";
|
|
7591
|
+
readonly deliveryMode: "webhook";
|
|
7592
|
+
}, {
|
|
7593
|
+
readonly key: "github.pull_request_review_comment";
|
|
7594
|
+
readonly displayName: "Pull request review comment";
|
|
7595
|
+
readonly description: "Triggered when a comment on a pull request diff is created, edited, or deleted.";
|
|
7596
|
+
readonly deliveryMode: "webhook";
|
|
7597
|
+
}, {
|
|
7598
|
+
readonly key: "github.push";
|
|
7599
|
+
readonly displayName: "Push";
|
|
7600
|
+
readonly description: "Triggered on a push to a branch or tag. This is the default event for repository webhooks.";
|
|
7601
|
+
readonly deliveryMode: "webhook";
|
|
7602
|
+
}, {
|
|
7603
|
+
readonly key: "github.release";
|
|
7604
|
+
readonly displayName: "Release";
|
|
7605
|
+
readonly description: "Triggered when a release is published, edited, deleted, or prereleased.";
|
|
7606
|
+
readonly deliveryMode: "webhook";
|
|
7607
|
+
}, {
|
|
7608
|
+
readonly key: "github.repository";
|
|
7609
|
+
readonly displayName: "Repository";
|
|
7610
|
+
readonly description: "Triggered when a repository is created, archived, unarchived, renamed, transferred, or deleted.";
|
|
7611
|
+
readonly deliveryMode: "webhook";
|
|
7612
|
+
}, {
|
|
7613
|
+
readonly key: "github.repository_import";
|
|
7614
|
+
readonly displayName: "Repository import";
|
|
7615
|
+
readonly description: "Triggered when a repository import succeeds, fails, or is cancelled.";
|
|
7616
|
+
readonly deliveryMode: "webhook";
|
|
7617
|
+
}, {
|
|
7618
|
+
readonly key: "github.repository_vulnerability_alert";
|
|
7619
|
+
readonly displayName: "Repository vulnerability alert";
|
|
7620
|
+
readonly description: "Triggered when a Dependabot security alert is created, dismissed, or resolved.";
|
|
7621
|
+
readonly deliveryMode: "webhook";
|
|
7622
|
+
}, {
|
|
7623
|
+
readonly key: "github.security_advisory";
|
|
7624
|
+
readonly displayName: "Security advisory";
|
|
7625
|
+
readonly description: "Triggered when a security advisory is published, updated, or withdrawn for an organization.";
|
|
7626
|
+
readonly deliveryMode: "webhook";
|
|
7627
|
+
}, {
|
|
7628
|
+
readonly key: "github.star";
|
|
7629
|
+
readonly displayName: "Star";
|
|
7630
|
+
readonly description: "Triggered when a star is added to or removed from a repository.";
|
|
7631
|
+
readonly deliveryMode: "webhook";
|
|
7632
|
+
}, {
|
|
7633
|
+
readonly key: "github.status";
|
|
7634
|
+
readonly displayName: "Status";
|
|
7635
|
+
readonly description: "Triggered when the status of a Git commit changes.";
|
|
7636
|
+
readonly deliveryMode: "webhook";
|
|
7637
|
+
}, {
|
|
7638
|
+
readonly key: "github.team";
|
|
7639
|
+
readonly displayName: "Team";
|
|
7640
|
+
readonly description: "Triggered when an organization's team is created, deleted, edited, or repository access changes (organization hooks only).";
|
|
7641
|
+
readonly deliveryMode: "webhook";
|
|
7642
|
+
}, {
|
|
7643
|
+
readonly key: "github.team_add";
|
|
7644
|
+
readonly displayName: "Team add";
|
|
7645
|
+
readonly description: "Triggered when a repository is added to a team.";
|
|
7646
|
+
readonly deliveryMode: "webhook";
|
|
7647
|
+
}, {
|
|
7648
|
+
readonly key: "github.watch";
|
|
7649
|
+
readonly displayName: "Watch";
|
|
7650
|
+
readonly description: "Triggered when someone stars a repository.";
|
|
7651
|
+
readonly deliveryMode: "webhook";
|
|
7652
|
+
}];
|
|
7653
|
+
}, {
|
|
7654
|
+
readonly triggerId: "slack";
|
|
7655
|
+
readonly displayName: "Slack";
|
|
7656
|
+
readonly service: "Slack";
|
|
7657
|
+
readonly category: "Email & Messaging";
|
|
7658
|
+
readonly authType: "token";
|
|
7659
|
+
readonly deliveryModes: ["webhook"];
|
|
7660
|
+
readonly metadata: {
|
|
7661
|
+
readonly description: "Trigger workflows from events happening inside your Slack workspace such as messages, reactions, and channel activity.";
|
|
7662
|
+
readonly docsUrl: "https://api.slack.com/events";
|
|
7663
|
+
};
|
|
7664
|
+
readonly version: "1.0.0";
|
|
7665
|
+
readonly events: readonly [{
|
|
7666
|
+
readonly key: "slack.anyEvent";
|
|
7667
|
+
readonly displayName: "Any Slack event";
|
|
7668
|
+
readonly description: "Receive every event delivered to your Slack app via the Events API. Use with caution in busy workspaces.";
|
|
7669
|
+
readonly deliveryMode: "webhook";
|
|
7670
|
+
readonly defaultConfig: {
|
|
7671
|
+
readonly provider: {
|
|
7672
|
+
readonly type: "slack";
|
|
7673
|
+
readonly watchWorkspace: true;
|
|
7674
|
+
readonly channelId: null;
|
|
7675
|
+
readonly includeBotMessages: true;
|
|
7676
|
+
};
|
|
7677
|
+
};
|
|
7678
|
+
}, {
|
|
7679
|
+
readonly key: "slack.appMention";
|
|
7680
|
+
readonly displayName: "Bot or app mention";
|
|
7681
|
+
readonly description: "Trigger when your bot or app is mentioned in a channel where it is present.";
|
|
7682
|
+
readonly deliveryMode: "webhook";
|
|
7683
|
+
readonly defaultConfig: {
|
|
7684
|
+
readonly provider: {
|
|
7685
|
+
readonly type: "slack";
|
|
7686
|
+
readonly watchWorkspace: false;
|
|
7687
|
+
readonly channelId: null;
|
|
7688
|
+
readonly includeBotMessages: false;
|
|
7689
|
+
};
|
|
7690
|
+
};
|
|
7691
|
+
}, {
|
|
7692
|
+
readonly key: "slack.messagePosted";
|
|
7693
|
+
readonly displayName: "Message posted to channel";
|
|
7694
|
+
readonly description: "Trigger when a new message is posted to a channel that the app is added to.";
|
|
7695
|
+
readonly deliveryMode: "webhook";
|
|
7696
|
+
readonly defaultConfig: {
|
|
7697
|
+
readonly provider: {
|
|
7698
|
+
readonly type: "slack";
|
|
7699
|
+
readonly watchWorkspace: false;
|
|
7700
|
+
readonly channelId: null;
|
|
7701
|
+
readonly includeBotMessages: false;
|
|
7702
|
+
};
|
|
7703
|
+
};
|
|
7704
|
+
}, {
|
|
7705
|
+
readonly key: "slack.reactionAdded";
|
|
7706
|
+
readonly displayName: "Reaction added";
|
|
7707
|
+
readonly description: "Trigger when a reaction is added to a message in a channel your app has joined.";
|
|
7708
|
+
readonly deliveryMode: "webhook";
|
|
7709
|
+
readonly defaultConfig: {
|
|
7710
|
+
readonly provider: {
|
|
7711
|
+
readonly type: "slack";
|
|
7712
|
+
readonly watchWorkspace: false;
|
|
7713
|
+
readonly channelId: null;
|
|
7714
|
+
readonly includeBotMessages: true;
|
|
7715
|
+
};
|
|
7716
|
+
};
|
|
7717
|
+
}, {
|
|
7718
|
+
readonly key: "slack.fileShare";
|
|
7719
|
+
readonly displayName: "File shared";
|
|
7720
|
+
readonly description: "Trigger when a file is shared in a channel that the app is added to.";
|
|
7721
|
+
readonly deliveryMode: "webhook";
|
|
7722
|
+
readonly defaultConfig: {
|
|
7723
|
+
readonly provider: {
|
|
7724
|
+
readonly type: "slack";
|
|
7725
|
+
readonly watchWorkspace: false;
|
|
7726
|
+
readonly channelId: null;
|
|
7727
|
+
readonly includeBotMessages: true;
|
|
7728
|
+
};
|
|
7729
|
+
};
|
|
7730
|
+
}, {
|
|
7731
|
+
readonly key: "slack.filePublic";
|
|
7732
|
+
readonly displayName: "File made public";
|
|
7733
|
+
readonly description: "Trigger when a file is made public in the workspace.";
|
|
7734
|
+
readonly deliveryMode: "webhook";
|
|
7735
|
+
readonly defaultConfig: {
|
|
7736
|
+
readonly provider: {
|
|
7737
|
+
readonly type: "slack";
|
|
7738
|
+
readonly watchWorkspace: true;
|
|
7739
|
+
readonly channelId: null;
|
|
7740
|
+
readonly includeBotMessages: true;
|
|
7741
|
+
};
|
|
7742
|
+
};
|
|
7743
|
+
}, {
|
|
7744
|
+
readonly key: "slack.channelCreated";
|
|
7745
|
+
readonly displayName: "Channel created";
|
|
7746
|
+
readonly description: "Trigger when a new public channel is created in the workspace.";
|
|
7747
|
+
readonly deliveryMode: "webhook";
|
|
7748
|
+
readonly defaultConfig: {
|
|
7749
|
+
readonly provider: {
|
|
7750
|
+
readonly type: "slack";
|
|
7751
|
+
readonly watchWorkspace: true;
|
|
7752
|
+
readonly channelId: null;
|
|
7753
|
+
readonly includeBotMessages: true;
|
|
7754
|
+
};
|
|
7755
|
+
};
|
|
7756
|
+
}, {
|
|
7757
|
+
readonly key: "slack.teamJoin";
|
|
7758
|
+
readonly displayName: "User joined workspace";
|
|
7759
|
+
readonly description: "Trigger when a new user joins the Slack workspace.";
|
|
7760
|
+
readonly deliveryMode: "webhook";
|
|
7761
|
+
readonly defaultConfig: {
|
|
7762
|
+
readonly provider: {
|
|
7763
|
+
readonly type: "slack";
|
|
7764
|
+
readonly watchWorkspace: true;
|
|
7765
|
+
readonly channelId: null;
|
|
7766
|
+
readonly includeBotMessages: true;
|
|
7767
|
+
};
|
|
7768
|
+
};
|
|
7769
|
+
}];
|
|
7770
|
+
}, {
|
|
7771
|
+
readonly triggerId: "discord";
|
|
7772
|
+
readonly displayName: "Discord (Actions)";
|
|
7773
|
+
readonly service: "Discord";
|
|
7774
|
+
readonly category: "Email & Messaging";
|
|
7775
|
+
readonly authType: "bot-token";
|
|
7776
|
+
readonly deliveryModes: [];
|
|
7777
|
+
readonly metadata: {
|
|
7778
|
+
readonly description: "Use Discord bot tokens or webhooks with VoltAgent actions. This integration only powers outgoing actions (no event triggers).";
|
|
7779
|
+
readonly actionOnly: true;
|
|
7780
|
+
};
|
|
7781
|
+
readonly version: "1.0.0";
|
|
7782
|
+
readonly events: readonly [];
|
|
7783
|
+
}, {
|
|
7784
|
+
readonly triggerId: "airtable-record";
|
|
7785
|
+
readonly dslTriggerId: "airtable";
|
|
7786
|
+
readonly displayName: "Airtable";
|
|
7787
|
+
readonly service: "Airtable";
|
|
7788
|
+
readonly category: "Productivity";
|
|
7789
|
+
readonly authType: "token";
|
|
7790
|
+
readonly deliveryModes: ["polling"];
|
|
7791
|
+
readonly metadata: {
|
|
7792
|
+
readonly description: "Trigger when new rows are added to an Airtable base or view.";
|
|
7793
|
+
};
|
|
7794
|
+
readonly version: "1.0.0";
|
|
7795
|
+
readonly events: readonly [{
|
|
7796
|
+
readonly key: "airtable.recordCreated";
|
|
7797
|
+
readonly displayName: "Record created";
|
|
7798
|
+
readonly description: "Poll the configured Base/Table/View and emit when a new record is created.";
|
|
7799
|
+
readonly deliveryMode: "polling";
|
|
7800
|
+
}];
|
|
7801
|
+
}];
|
|
7802
|
+
|
|
7803
|
+
declare class A2AServerRegistry<TServer extends A2AServerLike = A2AServerLike> {
|
|
7804
|
+
private readonly servers;
|
|
7805
|
+
private readonly idByServer;
|
|
7806
|
+
private readonly serverById;
|
|
7807
|
+
private readonly metadataById;
|
|
7808
|
+
private anonymousCounter;
|
|
7809
|
+
register(server: TServer, deps: A2AServerDeps): void;
|
|
7810
|
+
unregister(server: TServer): void;
|
|
7811
|
+
getServer(id: string): TServer | undefined;
|
|
7812
|
+
getMetadata(id: string): A2AServerMetadata | undefined;
|
|
7813
|
+
list(): TServer[];
|
|
7814
|
+
listMetadata(): A2AServerMetadata[];
|
|
7815
|
+
private resolveMetadata;
|
|
7816
|
+
private normalizeIdentifier;
|
|
7817
|
+
private ensureUniqueId;
|
|
7818
|
+
private createAnonymousSlug;
|
|
7819
|
+
private createAnonymousName;
|
|
7820
|
+
}
|
|
7821
|
+
|
|
7822
|
+
interface RegisterOptions {
|
|
7823
|
+
startTransports?: boolean;
|
|
7824
|
+
transportOptions?: Record<string, unknown>;
|
|
7825
|
+
}
|
|
7826
|
+
declare class MCPServerRegistry<TServer extends MCPServerLike = MCPServerLike> {
|
|
7827
|
+
private readonly servers;
|
|
7828
|
+
private readonly idByServer;
|
|
7829
|
+
private readonly serverById;
|
|
7830
|
+
private readonly metadataById;
|
|
7831
|
+
private anonymousCounter;
|
|
7832
|
+
register(server: TServer, deps: MCPServerDeps, options?: RegisterOptions): void;
|
|
7833
|
+
unregister(server: TServer): void;
|
|
7834
|
+
getServer(id: string): TServer | undefined;
|
|
7835
|
+
getServerMetadata(id: string): MCPServerMetadata | undefined;
|
|
7836
|
+
list(): TServer[];
|
|
7837
|
+
listMetadata(): MCPServerMetadata[];
|
|
7838
|
+
startAll(options?: Record<string, unknown>): Promise<void>;
|
|
7839
|
+
stopAll(): Promise<void>;
|
|
7840
|
+
private startConfigured;
|
|
7841
|
+
private resolveMetadata;
|
|
7842
|
+
private normalizeIdentifier;
|
|
7843
|
+
private ensureUniqueId;
|
|
7844
|
+
private createAnonymousSlug;
|
|
7845
|
+
}
|
|
7203
7846
|
|
|
7204
7847
|
/**
|
|
7205
|
-
*
|
|
7206
|
-
* Simple implementation for testing and development
|
|
7848
|
+
* Client information for MCP
|
|
7207
7849
|
*/
|
|
7208
|
-
|
|
7209
|
-
private storage;
|
|
7210
|
-
private conversations;
|
|
7211
|
-
private users;
|
|
7212
|
-
private workflowStates;
|
|
7213
|
-
private workflowStatesByWorkflow;
|
|
7214
|
-
private conversationSteps;
|
|
7850
|
+
interface ClientInfo {
|
|
7215
7851
|
/**
|
|
7216
|
-
*
|
|
7852
|
+
* Client name
|
|
7217
7853
|
*/
|
|
7218
|
-
|
|
7854
|
+
name: string;
|
|
7219
7855
|
/**
|
|
7220
|
-
*
|
|
7856
|
+
* Client version
|
|
7221
7857
|
*/
|
|
7222
|
-
|
|
7858
|
+
version: string;
|
|
7223
7859
|
/**
|
|
7224
|
-
*
|
|
7860
|
+
* Allow additional properties for SDK compatibility
|
|
7225
7861
|
*/
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7862
|
+
[key: string]: unknown;
|
|
7863
|
+
}
|
|
7864
|
+
/**
|
|
7865
|
+
* Transport error from MCP
|
|
7866
|
+
*/
|
|
7867
|
+
interface TransportError extends Error {
|
|
7229
7868
|
/**
|
|
7230
|
-
*
|
|
7869
|
+
* Error code
|
|
7231
7870
|
*/
|
|
7232
|
-
|
|
7871
|
+
code?: string;
|
|
7233
7872
|
/**
|
|
7234
|
-
*
|
|
7873
|
+
* Error details
|
|
7235
7874
|
*/
|
|
7236
|
-
|
|
7875
|
+
details?: unknown;
|
|
7876
|
+
}
|
|
7877
|
+
/**
|
|
7878
|
+
* Configuration for MCP client
|
|
7879
|
+
*/
|
|
7880
|
+
type MCPClientConfig = {
|
|
7237
7881
|
/**
|
|
7238
|
-
*
|
|
7882
|
+
* Client information
|
|
7239
7883
|
*/
|
|
7240
|
-
|
|
7884
|
+
clientInfo: ClientInfo;
|
|
7241
7885
|
/**
|
|
7242
|
-
*
|
|
7886
|
+
* MCP server configuration
|
|
7243
7887
|
*/
|
|
7244
|
-
|
|
7888
|
+
server: MCPServerConfig;
|
|
7245
7889
|
/**
|
|
7246
|
-
*
|
|
7890
|
+
* MCP capabilities
|
|
7247
7891
|
*/
|
|
7248
|
-
|
|
7892
|
+
capabilities?: ClientCapabilities;
|
|
7249
7893
|
/**
|
|
7250
|
-
*
|
|
7894
|
+
* Timeout in milliseconds for MCP requests
|
|
7895
|
+
* @default 30000
|
|
7251
7896
|
*/
|
|
7252
|
-
|
|
7897
|
+
timeout?: number;
|
|
7898
|
+
};
|
|
7899
|
+
/**
|
|
7900
|
+
* MCP server configuration options
|
|
7901
|
+
*/
|
|
7902
|
+
type MCPServerConfig = HTTPServerConfig | SSEServerConfig | StreamableHTTPServerConfig | StdioServerConfig;
|
|
7903
|
+
/**
|
|
7904
|
+
* HTTP-based MCP server configuration with automatic fallback
|
|
7905
|
+
* Tries streamable HTTP first, falls back to SSE if not supported
|
|
7906
|
+
*/
|
|
7907
|
+
type HTTPServerConfig = {
|
|
7253
7908
|
/**
|
|
7254
|
-
*
|
|
7909
|
+
* Type of server connection
|
|
7255
7910
|
*/
|
|
7256
|
-
|
|
7911
|
+
type: "http";
|
|
7257
7912
|
/**
|
|
7258
|
-
*
|
|
7913
|
+
* URL of the MCP server
|
|
7259
7914
|
*/
|
|
7260
|
-
|
|
7915
|
+
url: string;
|
|
7261
7916
|
/**
|
|
7262
|
-
*
|
|
7917
|
+
* Request initialization options
|
|
7263
7918
|
*/
|
|
7264
|
-
|
|
7265
|
-
conversationId?: string;
|
|
7266
|
-
userId?: string;
|
|
7267
|
-
scope: WorkingMemoryScope;
|
|
7268
|
-
}): Promise<string | null>;
|
|
7919
|
+
requestInit?: RequestInit;
|
|
7269
7920
|
/**
|
|
7270
|
-
*
|
|
7921
|
+
* Event source initialization options (used for SSE fallback)
|
|
7271
7922
|
*/
|
|
7272
|
-
|
|
7273
|
-
conversationId?: string;
|
|
7274
|
-
userId?: string;
|
|
7275
|
-
content: string;
|
|
7276
|
-
scope: WorkingMemoryScope;
|
|
7277
|
-
}): Promise<void>;
|
|
7923
|
+
eventSourceInit?: EventSourceInit;
|
|
7278
7924
|
/**
|
|
7279
|
-
*
|
|
7925
|
+
* Optional maximum request timeout in milliseconds.
|
|
7926
|
+
* If provided, passed to MCPClient as the per-request timeout.
|
|
7280
7927
|
*/
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7928
|
+
timeout?: number;
|
|
7929
|
+
};
|
|
7930
|
+
/**
|
|
7931
|
+
* SSE-based MCP server configuration (explicit SSE transport)
|
|
7932
|
+
*/
|
|
7933
|
+
type SSEServerConfig = {
|
|
7286
7934
|
/**
|
|
7287
|
-
*
|
|
7935
|
+
* Type of server connection
|
|
7288
7936
|
*/
|
|
7289
|
-
|
|
7937
|
+
type: "sse";
|
|
7290
7938
|
/**
|
|
7291
|
-
*
|
|
7939
|
+
* URL of the MCP server
|
|
7292
7940
|
*/
|
|
7293
|
-
|
|
7941
|
+
url: string;
|
|
7294
7942
|
/**
|
|
7295
|
-
*
|
|
7943
|
+
* Request initialization options
|
|
7296
7944
|
*/
|
|
7297
|
-
|
|
7945
|
+
requestInit?: RequestInit;
|
|
7298
7946
|
/**
|
|
7299
|
-
*
|
|
7947
|
+
* Event source initialization options
|
|
7300
7948
|
*/
|
|
7301
|
-
|
|
7949
|
+
eventSourceInit?: EventSourceInit;
|
|
7302
7950
|
/**
|
|
7303
|
-
*
|
|
7951
|
+
* Optional maximum request timeout in milliseconds.
|
|
7952
|
+
* If provided, passed to MCPClient as the per-request timeout.
|
|
7304
7953
|
*/
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
totalUsers: number;
|
|
7308
|
-
totalMessages: number;
|
|
7309
|
-
};
|
|
7310
|
-
private getOrCreateUserSteps;
|
|
7311
|
-
private getOrCreateConversationSteps;
|
|
7312
|
-
/**
|
|
7313
|
-
* Clear all data
|
|
7314
|
-
*/
|
|
7315
|
-
clear(): void;
|
|
7316
|
-
}
|
|
7317
|
-
|
|
7954
|
+
timeout?: number;
|
|
7955
|
+
};
|
|
7318
7956
|
/**
|
|
7319
|
-
*
|
|
7320
|
-
* Suitable for development, testing, and small datasets (< 10k vectors)
|
|
7957
|
+
* Streamable HTTP-based MCP server configuration (no fallback)
|
|
7321
7958
|
*/
|
|
7322
|
-
|
|
7323
|
-
private vectors;
|
|
7324
|
-
private dimensions;
|
|
7325
|
-
constructor();
|
|
7326
|
-
store(id: string, vector: number[], metadata?: Record<string, unknown>): Promise<void>;
|
|
7327
|
-
storeBatch(items: VectorItem[]): Promise<void>;
|
|
7328
|
-
search(queryVector: number[], options?: {
|
|
7329
|
-
limit?: number;
|
|
7330
|
-
filter?: Record<string, unknown>;
|
|
7331
|
-
threshold?: number;
|
|
7332
|
-
}): Promise<SearchResult[]>;
|
|
7333
|
-
delete(id: string): Promise<void>;
|
|
7334
|
-
deleteBatch(ids: string[]): Promise<void>;
|
|
7335
|
-
clear(): Promise<void>;
|
|
7336
|
-
count(): Promise<number>;
|
|
7337
|
-
get(id: string): Promise<VectorItem | null>;
|
|
7338
|
-
/**
|
|
7339
|
-
* Check if metadata matches the filter criteria
|
|
7340
|
-
*/
|
|
7341
|
-
private matchesFilter;
|
|
7959
|
+
type StreamableHTTPServerConfig = {
|
|
7342
7960
|
/**
|
|
7343
|
-
*
|
|
7961
|
+
* Type of server connection
|
|
7344
7962
|
*/
|
|
7345
|
-
|
|
7346
|
-
count: number;
|
|
7347
|
-
dimensions: number | null;
|
|
7348
|
-
memoryUsage: number;
|
|
7349
|
-
}>;
|
|
7350
|
-
}
|
|
7351
|
-
|
|
7352
|
-
/**
|
|
7353
|
-
* Embedding adapter interface for converting text to vectors
|
|
7354
|
-
*/
|
|
7355
|
-
interface EmbeddingAdapter {
|
|
7963
|
+
type: "streamable-http";
|
|
7356
7964
|
/**
|
|
7357
|
-
*
|
|
7965
|
+
* URL of the MCP server
|
|
7358
7966
|
*/
|
|
7359
|
-
|
|
7967
|
+
url: string;
|
|
7360
7968
|
/**
|
|
7361
|
-
*
|
|
7969
|
+
* Request initialization options
|
|
7362
7970
|
*/
|
|
7363
|
-
|
|
7971
|
+
requestInit?: RequestInit;
|
|
7364
7972
|
/**
|
|
7365
|
-
*
|
|
7366
|
-
* Returns undefined if dimensions are not yet known
|
|
7973
|
+
* Session ID for the connection
|
|
7367
7974
|
*/
|
|
7368
|
-
|
|
7975
|
+
sessionId?: string;
|
|
7369
7976
|
/**
|
|
7370
|
-
*
|
|
7977
|
+
* Optional maximum request timeout in milliseconds.
|
|
7978
|
+
* If provided, passed to MCPClient as the per-request timeout.
|
|
7371
7979
|
*/
|
|
7372
|
-
|
|
7373
|
-
}
|
|
7980
|
+
timeout?: number;
|
|
7981
|
+
};
|
|
7374
7982
|
/**
|
|
7375
|
-
*
|
|
7983
|
+
* Stdio-based MCP server configuration
|
|
7376
7984
|
*/
|
|
7377
|
-
|
|
7985
|
+
type StdioServerConfig = {
|
|
7378
7986
|
/**
|
|
7379
|
-
*
|
|
7987
|
+
* Type of server connection
|
|
7380
7988
|
*/
|
|
7381
|
-
|
|
7989
|
+
type: "stdio";
|
|
7382
7990
|
/**
|
|
7383
|
-
*
|
|
7991
|
+
* Command to run the MCP server
|
|
7384
7992
|
*/
|
|
7385
|
-
|
|
7993
|
+
command: string;
|
|
7386
7994
|
/**
|
|
7387
|
-
*
|
|
7995
|
+
* Arguments to pass to the command
|
|
7388
7996
|
*/
|
|
7389
|
-
|
|
7390
|
-
}
|
|
7391
|
-
|
|
7392
|
-
/**
|
|
7393
|
-
* AI SDK Embedding Adapter
|
|
7394
|
-
* Wraps Vercel AI SDK embedding models for use with Memory V2
|
|
7395
|
-
*/
|
|
7396
|
-
declare class AiSdkEmbeddingAdapter implements EmbeddingAdapter {
|
|
7397
|
-
private model;
|
|
7398
|
-
private dimensions;
|
|
7399
|
-
private modelName;
|
|
7400
|
-
private options;
|
|
7401
|
-
constructor(model: EmbeddingModel<string>, options?: EmbeddingOptions);
|
|
7402
|
-
embed(text: string): Promise<number[]>;
|
|
7403
|
-
embedBatch(texts: string[]): Promise<number[][]>;
|
|
7404
|
-
getDimensions(): number;
|
|
7405
|
-
getModelName(): string;
|
|
7997
|
+
args?: string[];
|
|
7406
7998
|
/**
|
|
7407
|
-
*
|
|
7999
|
+
* Environment variables for the MCP server process
|
|
7408
8000
|
*/
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
*/
|
|
7421
|
-
type TimelineEventCoreStatus = "idle" | "running" | "completed" | "error" | "suspended";
|
|
7422
|
-
/**
|
|
7423
|
-
* Defines the severity level of a TimelineEvent.
|
|
7424
|
-
*/
|
|
7425
|
-
type TimelineEventCoreLevel = "DEBUG" | "INFO" | "WARNING" | "ERROR" | "CRITICAL";
|
|
7426
|
-
/**
|
|
7427
|
-
* Usage information for tracking resource consumption
|
|
7428
|
-
*/
|
|
7429
|
-
interface Usage {
|
|
7430
|
-
promptTokens?: number;
|
|
7431
|
-
completionTokens?: number;
|
|
7432
|
-
totalTokens?: number;
|
|
7433
|
-
input?: number;
|
|
7434
|
-
output?: number;
|
|
7435
|
-
total?: number;
|
|
7436
|
-
unit?: "TOKENS" | "CHARACTERS" | "MILLISECONDS" | "SECONDS" | "IMAGES";
|
|
7437
|
-
inputCost?: number;
|
|
7438
|
-
outputCost?: number;
|
|
7439
|
-
totalCost?: number;
|
|
7440
|
-
[key: string]: unknown;
|
|
7441
|
-
}
|
|
7442
|
-
/**
|
|
7443
|
-
* Base metadata interface with common fields for all timeline events
|
|
7444
|
-
*/
|
|
7445
|
-
interface BaseEventMetadata {
|
|
7446
|
-
displayName?: string;
|
|
7447
|
-
id: string;
|
|
7448
|
-
agentId?: string;
|
|
7449
|
-
context?: Record<string, unknown>;
|
|
7450
|
-
}
|
|
7451
|
-
|
|
7452
|
-
declare class A2AServerRegistry<TServer extends A2AServerLike = A2AServerLike> {
|
|
7453
|
-
private readonly servers;
|
|
7454
|
-
private readonly idByServer;
|
|
7455
|
-
private readonly serverById;
|
|
7456
|
-
private readonly metadataById;
|
|
7457
|
-
private anonymousCounter;
|
|
7458
|
-
register(server: TServer, deps: A2AServerDeps): void;
|
|
7459
|
-
unregister(server: TServer): void;
|
|
7460
|
-
getServer(id: string): TServer | undefined;
|
|
7461
|
-
getMetadata(id: string): A2AServerMetadata | undefined;
|
|
7462
|
-
list(): TServer[];
|
|
7463
|
-
listMetadata(): A2AServerMetadata[];
|
|
7464
|
-
private resolveMetadata;
|
|
7465
|
-
private normalizeIdentifier;
|
|
7466
|
-
private ensureUniqueId;
|
|
7467
|
-
private createAnonymousSlug;
|
|
7468
|
-
private createAnonymousName;
|
|
7469
|
-
}
|
|
7470
|
-
|
|
7471
|
-
interface RegisterOptions {
|
|
7472
|
-
startTransports?: boolean;
|
|
7473
|
-
transportOptions?: Record<string, unknown>;
|
|
7474
|
-
}
|
|
7475
|
-
declare class MCPServerRegistry<TServer extends MCPServerLike = MCPServerLike> {
|
|
7476
|
-
private readonly servers;
|
|
7477
|
-
private readonly idByServer;
|
|
7478
|
-
private readonly serverById;
|
|
7479
|
-
private readonly metadataById;
|
|
7480
|
-
private anonymousCounter;
|
|
7481
|
-
register(server: TServer, deps: MCPServerDeps, options?: RegisterOptions): void;
|
|
7482
|
-
unregister(server: TServer): void;
|
|
7483
|
-
getServer(id: string): TServer | undefined;
|
|
7484
|
-
getServerMetadata(id: string): MCPServerMetadata | undefined;
|
|
7485
|
-
list(): TServer[];
|
|
7486
|
-
listMetadata(): MCPServerMetadata[];
|
|
7487
|
-
startAll(options?: Record<string, unknown>): Promise<void>;
|
|
7488
|
-
stopAll(): Promise<void>;
|
|
7489
|
-
private startConfigured;
|
|
7490
|
-
private resolveMetadata;
|
|
7491
|
-
private normalizeIdentifier;
|
|
7492
|
-
private ensureUniqueId;
|
|
7493
|
-
private createAnonymousSlug;
|
|
7494
|
-
}
|
|
7495
|
-
|
|
8001
|
+
env?: Record<string, string>;
|
|
8002
|
+
/**
|
|
8003
|
+
* Working directory for the MCP server process
|
|
8004
|
+
*/
|
|
8005
|
+
cwd?: string;
|
|
8006
|
+
/**
|
|
8007
|
+
* Optional maximum request timeout in milliseconds.
|
|
8008
|
+
* If provided, passed to MCPClient as the per-request timeout.
|
|
8009
|
+
*/
|
|
8010
|
+
timeout?: number;
|
|
8011
|
+
};
|
|
7496
8012
|
/**
|
|
7497
|
-
*
|
|
8013
|
+
* Tool call request
|
|
7498
8014
|
*/
|
|
7499
|
-
|
|
8015
|
+
type MCPToolCall = {
|
|
7500
8016
|
/**
|
|
7501
|
-
*
|
|
8017
|
+
* Name of the tool to call
|
|
7502
8018
|
*/
|
|
7503
8019
|
name: string;
|
|
7504
8020
|
/**
|
|
7505
|
-
*
|
|
7506
|
-
*/
|
|
7507
|
-
version: string;
|
|
7508
|
-
/**
|
|
7509
|
-
* Allow additional properties for SDK compatibility
|
|
8021
|
+
* Arguments to pass to the tool
|
|
7510
8022
|
*/
|
|
7511
|
-
|
|
7512
|
-
}
|
|
8023
|
+
arguments: Record<string, unknown>;
|
|
8024
|
+
};
|
|
7513
8025
|
/**
|
|
7514
|
-
*
|
|
8026
|
+
* Tool call result
|
|
7515
8027
|
*/
|
|
7516
|
-
|
|
7517
|
-
/**
|
|
7518
|
-
* Error code
|
|
7519
|
-
*/
|
|
7520
|
-
code?: string;
|
|
8028
|
+
type MCPToolResult = {
|
|
7521
8029
|
/**
|
|
7522
|
-
*
|
|
8030
|
+
* Result content from the tool
|
|
7523
8031
|
*/
|
|
7524
|
-
|
|
7525
|
-
}
|
|
8032
|
+
content: unknown;
|
|
8033
|
+
};
|
|
7526
8034
|
/**
|
|
7527
|
-
*
|
|
8035
|
+
* MCP client events
|
|
7528
8036
|
*/
|
|
7529
|
-
|
|
8037
|
+
interface MCPClientEvents {
|
|
7530
8038
|
/**
|
|
7531
|
-
*
|
|
8039
|
+
* Emitted when the client connects to the server
|
|
7532
8040
|
*/
|
|
7533
|
-
|
|
8041
|
+
connect: () => void;
|
|
7534
8042
|
/**
|
|
7535
|
-
*
|
|
8043
|
+
* Emitted when the client disconnects from the server
|
|
7536
8044
|
*/
|
|
7537
|
-
|
|
8045
|
+
disconnect: () => void;
|
|
7538
8046
|
/**
|
|
7539
|
-
*
|
|
8047
|
+
* Emitted when an error occurs
|
|
7540
8048
|
*/
|
|
7541
|
-
|
|
8049
|
+
error: (error: Error | TransportError) => void;
|
|
7542
8050
|
/**
|
|
7543
|
-
*
|
|
7544
|
-
* @default 30000
|
|
8051
|
+
* Emitted when a tool call completes
|
|
7545
8052
|
*/
|
|
7546
|
-
|
|
7547
|
-
}
|
|
8053
|
+
toolCall: (name: string, args: Record<string, unknown>, result: unknown) => void;
|
|
8054
|
+
}
|
|
7548
8055
|
/**
|
|
7549
|
-
*
|
|
8056
|
+
* A record of tools along with a helper method to convert them to an array.
|
|
7550
8057
|
*/
|
|
7551
|
-
type
|
|
7552
|
-
/**
|
|
7553
|
-
|
|
7554
|
-
|
|
8058
|
+
type ToolsetWithTools = Record<string, AnyToolConfig> & {
|
|
8059
|
+
/**
|
|
8060
|
+
* Converts the toolset to an array of BaseTool objects.
|
|
8061
|
+
*/
|
|
8062
|
+
getTools: () => Tool<any>[];
|
|
8063
|
+
};
|
|
8064
|
+
/**
|
|
8065
|
+
* Any tool configuration
|
|
7555
8066
|
*/
|
|
7556
|
-
type
|
|
8067
|
+
type AnyToolConfig = Tool<any>;
|
|
8068
|
+
|
|
8069
|
+
/**
|
|
8070
|
+
* Client for interacting with Model Context Protocol (MCP) servers.
|
|
8071
|
+
* Wraps the official MCP SDK client to provide a higher-level interface.
|
|
8072
|
+
* Internal implementation differs from original source.
|
|
8073
|
+
*/
|
|
8074
|
+
declare class MCPClient extends SimpleEventEmitter {
|
|
7557
8075
|
/**
|
|
7558
|
-
*
|
|
8076
|
+
* Underlying MCP client instance from the SDK.
|
|
7559
8077
|
*/
|
|
7560
|
-
|
|
8078
|
+
private client;
|
|
7561
8079
|
/**
|
|
7562
|
-
*
|
|
8080
|
+
* Communication channel (transport layer) for MCP interactions.
|
|
7563
8081
|
*/
|
|
7564
|
-
|
|
8082
|
+
private transport;
|
|
7565
8083
|
/**
|
|
7566
|
-
*
|
|
8084
|
+
* Tracks the connection status to the server.
|
|
7567
8085
|
*/
|
|
7568
|
-
|
|
8086
|
+
private connected;
|
|
7569
8087
|
/**
|
|
7570
|
-
*
|
|
8088
|
+
* Maximum time allowed for requests in milliseconds.
|
|
7571
8089
|
*/
|
|
7572
|
-
|
|
8090
|
+
private readonly timeout;
|
|
7573
8091
|
/**
|
|
7574
|
-
*
|
|
7575
|
-
* If provided, passed to MCPClient as the per-request timeout.
|
|
8092
|
+
* Logger instance
|
|
7576
8093
|
*/
|
|
7577
|
-
|
|
7578
|
-
};
|
|
7579
|
-
/**
|
|
7580
|
-
* SSE-based MCP server configuration (explicit SSE transport)
|
|
7581
|
-
*/
|
|
7582
|
-
type SSEServerConfig = {
|
|
8094
|
+
private logger;
|
|
7583
8095
|
/**
|
|
7584
|
-
*
|
|
8096
|
+
* Information identifying this client to the server.
|
|
7585
8097
|
*/
|
|
7586
|
-
|
|
8098
|
+
private readonly clientInfo;
|
|
7587
8099
|
/**
|
|
7588
|
-
*
|
|
8100
|
+
* Server configuration for fallback attempts.
|
|
7589
8101
|
*/
|
|
7590
|
-
|
|
8102
|
+
private readonly serverConfig;
|
|
7591
8103
|
/**
|
|
7592
|
-
*
|
|
8104
|
+
* Whether to attempt SSE fallback if streamable HTTP fails.
|
|
7593
8105
|
*/
|
|
7594
|
-
|
|
8106
|
+
private shouldAttemptFallback;
|
|
7595
8107
|
/**
|
|
7596
|
-
*
|
|
8108
|
+
* Client capabilities for re-initialization.
|
|
7597
8109
|
*/
|
|
7598
|
-
|
|
8110
|
+
private readonly capabilities;
|
|
7599
8111
|
/**
|
|
7600
|
-
*
|
|
7601
|
-
* If provided, passed to MCPClient as the per-request timeout.
|
|
8112
|
+
* Get server info for logging
|
|
7602
8113
|
*/
|
|
7603
|
-
|
|
7604
|
-
};
|
|
7605
|
-
/**
|
|
7606
|
-
* Streamable HTTP-based MCP server configuration (no fallback)
|
|
7607
|
-
*/
|
|
7608
|
-
type StreamableHTTPServerConfig = {
|
|
8114
|
+
private getServerInfo;
|
|
7609
8115
|
/**
|
|
7610
|
-
*
|
|
8116
|
+
* Creates a new MCP client instance.
|
|
8117
|
+
* @param config Configuration for the client, including server details and client identity.
|
|
7611
8118
|
*/
|
|
7612
|
-
|
|
8119
|
+
constructor(config: MCPClientConfig);
|
|
7613
8120
|
/**
|
|
7614
|
-
*
|
|
8121
|
+
* Sets up handlers for events from the underlying SDK client.
|
|
7615
8122
|
*/
|
|
7616
|
-
|
|
8123
|
+
private setupEventHandlers;
|
|
7617
8124
|
/**
|
|
7618
|
-
*
|
|
8125
|
+
* Establishes a connection to the configured MCP server.
|
|
8126
|
+
* Idempotent: does nothing if already connected.
|
|
7619
8127
|
*/
|
|
7620
|
-
|
|
8128
|
+
connect(): Promise<void>;
|
|
7621
8129
|
/**
|
|
7622
|
-
*
|
|
8130
|
+
* Attempts to connect using SSE transport as a fallback.
|
|
8131
|
+
* @param originalError The error from the initial connection attempt.
|
|
7623
8132
|
*/
|
|
7624
|
-
|
|
8133
|
+
private attemptSSEFallback;
|
|
7625
8134
|
/**
|
|
7626
|
-
*
|
|
7627
|
-
*
|
|
8135
|
+
* Closes the connection to the MCP server.
|
|
8136
|
+
* Idempotent: does nothing if not connected.
|
|
7628
8137
|
*/
|
|
7629
|
-
|
|
7630
|
-
};
|
|
7631
|
-
/**
|
|
7632
|
-
* Stdio-based MCP server configuration
|
|
7633
|
-
*/
|
|
7634
|
-
type StdioServerConfig = {
|
|
8138
|
+
disconnect(): Promise<void>;
|
|
7635
8139
|
/**
|
|
7636
|
-
*
|
|
8140
|
+
* Fetches the definitions of available tools from the server.
|
|
8141
|
+
* @returns A record mapping tool names to their definitions (schema, description).
|
|
7637
8142
|
*/
|
|
7638
|
-
|
|
8143
|
+
listTools(): Promise<Record<string, unknown>>;
|
|
7639
8144
|
/**
|
|
7640
|
-
*
|
|
8145
|
+
* Builds executable Tool objects from the server's tool definitions.
|
|
8146
|
+
* These tools include an `execute` method for calling the remote tool.
|
|
8147
|
+
* @returns A record mapping namespaced tool names (`clientName_toolName`) to executable Tool objects.
|
|
7641
8148
|
*/
|
|
7642
|
-
|
|
8149
|
+
getAgentTools(): Promise<Record<string, Tool<any>>>;
|
|
7643
8150
|
/**
|
|
7644
|
-
*
|
|
8151
|
+
* Executes a specified tool on the remote MCP server.
|
|
8152
|
+
* @param toolCall Details of the tool to call, including name and arguments.
|
|
8153
|
+
* @returns The result content returned by the tool.
|
|
7645
8154
|
*/
|
|
7646
|
-
|
|
8155
|
+
callTool(toolCall: MCPToolCall): Promise<MCPToolResult>;
|
|
7647
8156
|
/**
|
|
7648
|
-
*
|
|
8157
|
+
* Retrieves a list of resource identifiers available on the server.
|
|
8158
|
+
* @returns A promise resolving to an array of resource ID strings.
|
|
7649
8159
|
*/
|
|
7650
|
-
|
|
8160
|
+
listResources(): Promise<string[]>;
|
|
7651
8161
|
/**
|
|
7652
|
-
*
|
|
8162
|
+
* Ensures the client is connected before proceeding with an operation.
|
|
8163
|
+
* Attempts to connect if not currently connected.
|
|
8164
|
+
* @throws Error if connection attempt fails.
|
|
7653
8165
|
*/
|
|
7654
|
-
|
|
8166
|
+
private ensureConnected;
|
|
7655
8167
|
/**
|
|
7656
|
-
*
|
|
7657
|
-
*
|
|
8168
|
+
* Emits an 'error' event, ensuring the payload is always an Error object.
|
|
8169
|
+
* @param error The error encountered, can be of any type.
|
|
7658
8170
|
*/
|
|
7659
|
-
|
|
7660
|
-
};
|
|
7661
|
-
/**
|
|
7662
|
-
* Tool call request
|
|
7663
|
-
*/
|
|
7664
|
-
type MCPToolCall = {
|
|
8171
|
+
private emitError;
|
|
7665
8172
|
/**
|
|
7666
|
-
*
|
|
8173
|
+
* Type guard to check if a server configuration is for an HTTP server.
|
|
8174
|
+
* @param server The server configuration object.
|
|
8175
|
+
* @returns True if the configuration type is 'http', false otherwise.
|
|
7667
8176
|
*/
|
|
7668
|
-
|
|
8177
|
+
private isHTTPServer;
|
|
7669
8178
|
/**
|
|
7670
|
-
*
|
|
8179
|
+
* Type guard to check if a server configuration is for an SSE server.
|
|
8180
|
+
* @param server The server configuration object.
|
|
8181
|
+
* @returns True if the configuration type is 'sse', false otherwise.
|
|
7671
8182
|
*/
|
|
7672
|
-
|
|
7673
|
-
|
|
8183
|
+
private isSSEServer;
|
|
8184
|
+
/**
|
|
8185
|
+
* Type guard to check if a server configuration is for a Streamable HTTP server.
|
|
8186
|
+
* @param server The server configuration object.
|
|
8187
|
+
* @returns True if the configuration type is 'streamable-http', false otherwise.
|
|
8188
|
+
*/
|
|
8189
|
+
private isStreamableHTTPServer;
|
|
8190
|
+
/**
|
|
8191
|
+
* Type guard to check if a server configuration is for a Stdio server.
|
|
8192
|
+
* @param server The server configuration object.
|
|
8193
|
+
* @returns True if the configuration type is 'stdio', false otherwise.
|
|
8194
|
+
*/
|
|
8195
|
+
private isStdioServer;
|
|
8196
|
+
/**
|
|
8197
|
+
* Overrides EventEmitter's 'on' method for type-safe event listening.
|
|
8198
|
+
* Uses the original `MCPClientEvents` for event types.
|
|
8199
|
+
*/
|
|
8200
|
+
on<E extends keyof MCPClientEvents>(event: E, listener: MCPClientEvents[E]): this;
|
|
8201
|
+
/**
|
|
8202
|
+
* Overrides EventEmitter's 'emit' method for type-safe event emission.
|
|
8203
|
+
* Uses the original `MCPClientEvents` for event types.
|
|
8204
|
+
*/
|
|
8205
|
+
emit<E extends keyof MCPClientEvents>(event: E, ...args: Parameters<MCPClientEvents[E]>): boolean;
|
|
8206
|
+
}
|
|
8207
|
+
|
|
7674
8208
|
/**
|
|
7675
|
-
*
|
|
8209
|
+
* Configuration manager for Model Context Protocol (MCP).
|
|
8210
|
+
* Handles multiple MCP server connections and tool management.
|
|
8211
|
+
* NOTE: This version does NOT manage singleton instances automatically.
|
|
7676
8212
|
*/
|
|
7677
|
-
|
|
8213
|
+
declare class MCPConfiguration<TServerKeys extends string = string> {
|
|
7678
8214
|
/**
|
|
7679
|
-
*
|
|
8215
|
+
* Map of server configurations keyed by server names.
|
|
7680
8216
|
*/
|
|
7681
|
-
|
|
7682
|
-
|
|
8217
|
+
private readonly serverConfigs;
|
|
8218
|
+
/**
|
|
8219
|
+
* Map of connected MCP clients keyed by server names (local cache).
|
|
8220
|
+
*/
|
|
8221
|
+
private readonly mcpClientsById;
|
|
8222
|
+
/**
|
|
8223
|
+
* Creates a new, independent MCP configuration instance.
|
|
8224
|
+
* @param options Configuration options including server definitions.
|
|
8225
|
+
*/
|
|
8226
|
+
constructor(options: {
|
|
8227
|
+
servers: Record<TServerKeys, MCPServerConfig>;
|
|
8228
|
+
});
|
|
8229
|
+
/**
|
|
8230
|
+
* Type guard to check if an object conforms to the basic structure of AnyToolConfig.
|
|
8231
|
+
*/
|
|
8232
|
+
private isAnyToolConfigStructure;
|
|
8233
|
+
/**
|
|
8234
|
+
* Disconnects all associated MCP clients for THIS instance.
|
|
8235
|
+
*/
|
|
8236
|
+
disconnect(): Promise<void>;
|
|
8237
|
+
/**
|
|
8238
|
+
* Retrieves agent-ready tools from all configured MCP servers for this instance.
|
|
8239
|
+
* @returns A flat array of all agent-ready tools.
|
|
8240
|
+
*/
|
|
8241
|
+
getTools(): Promise<Tool<any>[]>;
|
|
8242
|
+
/**
|
|
8243
|
+
* Retrieves raw tool definitions from all configured MCP servers for this instance.
|
|
8244
|
+
* @returns A flat record of all raw tools keyed by their namespaced name.
|
|
8245
|
+
*/
|
|
8246
|
+
getRawTools(): Promise<Record<string, AnyToolConfig>>;
|
|
8247
|
+
/**
|
|
8248
|
+
* Retrieves agent-ready toolsets grouped by server name for this instance.
|
|
8249
|
+
* @returns A record where keys are server names and values are agent-ready toolsets.
|
|
8250
|
+
*/
|
|
8251
|
+
getToolsets(): Promise<Record<TServerKeys, ToolsetWithTools>>;
|
|
8252
|
+
/**
|
|
8253
|
+
* Retrieves raw tool definitions grouped by server name for this instance.
|
|
8254
|
+
* @returns A record where keys are server names and values are records of raw tools.
|
|
8255
|
+
*/
|
|
8256
|
+
getRawToolsets(): Promise<Record<TServerKeys, Record<string, AnyToolConfig>>>;
|
|
8257
|
+
/**
|
|
8258
|
+
* Retrieves a specific connected MCP client by its server name for this instance.
|
|
8259
|
+
*/
|
|
8260
|
+
getClient(serverName: TServerKeys): Promise<MCPClient | undefined>;
|
|
8261
|
+
/**
|
|
8262
|
+
* Retrieves all configured MCP clients for this instance, ensuring they are connected.
|
|
8263
|
+
*/
|
|
8264
|
+
getClients(): Promise<Record<TServerKeys, MCPClient>>;
|
|
8265
|
+
/**
|
|
8266
|
+
* Internal helper to get/create/connect a client for this instance.
|
|
8267
|
+
* Manages the local mcpClientsById cache.
|
|
8268
|
+
*/
|
|
8269
|
+
private getConnectedClient;
|
|
8270
|
+
}
|
|
8271
|
+
|
|
8272
|
+
declare global {
|
|
8273
|
+
var ___voltagent_trigger_registry: TriggerRegistry | undefined;
|
|
8274
|
+
}
|
|
8275
|
+
declare class TriggerRegistry {
|
|
8276
|
+
private readonly logger;
|
|
8277
|
+
private readonly triggers;
|
|
8278
|
+
private readonly pathIndex;
|
|
8279
|
+
static getInstance(): TriggerRegistry;
|
|
8280
|
+
register(name: string, config: VoltAgentTriggerConfig): RegisteredTrigger;
|
|
8281
|
+
registerMany(triggers?: Record<string, VoltAgentTriggerConfig>): void;
|
|
8282
|
+
unregister(name: string): boolean;
|
|
8283
|
+
get(name: string): RegisteredTrigger | undefined;
|
|
8284
|
+
getByPath(path: string): RegisteredTrigger | undefined;
|
|
8285
|
+
list(): RegisteredTrigger[];
|
|
8286
|
+
clear(): void;
|
|
8287
|
+
}
|
|
8288
|
+
|
|
7683
8289
|
/**
|
|
7684
|
-
*
|
|
8290
|
+
* Basic type definitions for VoltAgent Core
|
|
7685
8291
|
*/
|
|
7686
|
-
|
|
8292
|
+
|
|
8293
|
+
interface MCPLoggingAdapter {
|
|
8294
|
+
setLevel?(level: string): Promise<void> | void;
|
|
8295
|
+
getLevel?(): Promise<string | undefined> | string | undefined;
|
|
8296
|
+
}
|
|
8297
|
+
interface MCPPromptsAdapter {
|
|
8298
|
+
listPrompts(): Promise<unknown[]>;
|
|
8299
|
+
getPrompt(params: unknown): Promise<unknown>;
|
|
8300
|
+
}
|
|
8301
|
+
interface MCPResourcesAdapter {
|
|
8302
|
+
listResources(): Promise<unknown>;
|
|
8303
|
+
readResource(uri: string): Promise<unknown>;
|
|
8304
|
+
listResourceTemplates?(): Promise<unknown>;
|
|
8305
|
+
subscribe?(params: unknown, headers?: Record<string, string>): Promise<void> | void;
|
|
8306
|
+
unsubscribe?(params: unknown): Promise<void> | void;
|
|
8307
|
+
}
|
|
8308
|
+
interface MCPElicitationAdapter {
|
|
8309
|
+
sendRequest(request: unknown): Promise<unknown>;
|
|
8310
|
+
}
|
|
8311
|
+
|
|
8312
|
+
/**
|
|
8313
|
+
* Server provider interface
|
|
8314
|
+
*/
|
|
8315
|
+
interface IServerProvider {
|
|
8316
|
+
start(): Promise<{
|
|
8317
|
+
port: number;
|
|
8318
|
+
}>;
|
|
8319
|
+
stop(): Promise<void>;
|
|
8320
|
+
isRunning(): boolean;
|
|
8321
|
+
}
|
|
8322
|
+
type ServerlessRequestHandler = (req: Request, ...args: unknown[]) => Promise<Response>;
|
|
8323
|
+
type CloudflareFetchHandler = (req: Request, env: Record<string, unknown>, ctx: unknown) => Promise<Response>;
|
|
8324
|
+
interface IServerlessProvider {
|
|
8325
|
+
handleRequest(request: Request): Promise<Response>;
|
|
8326
|
+
toCloudflareWorker(): {
|
|
8327
|
+
fetch: CloudflareFetchHandler;
|
|
8328
|
+
};
|
|
8329
|
+
toVercelEdge(): ServerlessRequestHandler;
|
|
8330
|
+
toDeno(): ServerlessRequestHandler;
|
|
8331
|
+
auto(): {
|
|
8332
|
+
fetch: CloudflareFetchHandler;
|
|
8333
|
+
} | ServerlessRequestHandler;
|
|
8334
|
+
}
|
|
8335
|
+
type ServerlessProviderFactory = (deps: ServerProviderDeps) => IServerlessProvider;
|
|
8336
|
+
/**
|
|
8337
|
+
* Server provider dependencies
|
|
8338
|
+
*/
|
|
8339
|
+
interface ServerProviderDeps {
|
|
8340
|
+
agentRegistry: {
|
|
8341
|
+
getAgent(id: string): Agent | undefined;
|
|
8342
|
+
getAllAgents(): Agent[];
|
|
8343
|
+
getAgentCount(): number;
|
|
8344
|
+
removeAgent(id: string): boolean;
|
|
8345
|
+
registerAgent(agent: Agent): void;
|
|
8346
|
+
getGlobalVoltOpsClient(): VoltOpsClient | undefined;
|
|
8347
|
+
getGlobalLogger(): Logger | undefined;
|
|
8348
|
+
};
|
|
8349
|
+
workflowRegistry: {
|
|
8350
|
+
getWorkflow(id: string): RegisteredWorkflow | undefined;
|
|
8351
|
+
getWorkflowsForApi(): unknown[];
|
|
8352
|
+
getWorkflowDetailForApi(id: string): unknown;
|
|
8353
|
+
getWorkflowCount(): number;
|
|
8354
|
+
on(event: string, handler: (...args: any[]) => void): void;
|
|
8355
|
+
off(event: string, handler: (...args: any[]) => void): void;
|
|
8356
|
+
activeExecutions: Map<string, WorkflowSuspendController>;
|
|
8357
|
+
resumeSuspendedWorkflow(workflowId: string, executionId: string, resumeData?: any, stepId?: string): Promise<any>;
|
|
8358
|
+
};
|
|
8359
|
+
logger?: Logger;
|
|
8360
|
+
voltOpsClient?: VoltOpsClient;
|
|
8361
|
+
observability?: VoltAgentObservability;
|
|
8362
|
+
mcp?: {
|
|
8363
|
+
registry: MCPServerRegistry;
|
|
8364
|
+
};
|
|
8365
|
+
a2a?: {
|
|
8366
|
+
registry: A2AServerRegistry;
|
|
8367
|
+
};
|
|
8368
|
+
triggerRegistry: TriggerRegistry;
|
|
8369
|
+
ensureEnvironment?: (env?: Record<string, unknown>) => void;
|
|
8370
|
+
}
|
|
8371
|
+
/**
|
|
8372
|
+
* Server provider factory type
|
|
8373
|
+
*/
|
|
8374
|
+
type ServerProviderFactory = (deps: ServerProviderDeps) => IServerProvider;
|
|
8375
|
+
/**
|
|
8376
|
+
* Server API response types
|
|
8377
|
+
*/
|
|
8378
|
+
interface ServerAgentResponse {
|
|
8379
|
+
id: string;
|
|
8380
|
+
name: string;
|
|
8381
|
+
description: string;
|
|
8382
|
+
status: AgentStatus;
|
|
8383
|
+
model: string;
|
|
8384
|
+
tools: ToolStatusInfo[];
|
|
8385
|
+
memory?: Record<string, unknown>;
|
|
8386
|
+
subAgents?: ServerAgentResponse[];
|
|
8387
|
+
isTelemetryEnabled?: boolean;
|
|
8388
|
+
}
|
|
8389
|
+
interface ServerWorkflowResponse {
|
|
8390
|
+
id: string;
|
|
8391
|
+
name: string;
|
|
8392
|
+
purpose: string;
|
|
8393
|
+
stepsCount: number;
|
|
8394
|
+
status: "idle" | "running" | "completed" | "error";
|
|
8395
|
+
steps: Array<{
|
|
8396
|
+
id: string;
|
|
8397
|
+
name: string;
|
|
8398
|
+
purpose: string | null;
|
|
8399
|
+
type: string;
|
|
8400
|
+
agentId?: string;
|
|
8401
|
+
agentName?: string;
|
|
8402
|
+
}>;
|
|
8403
|
+
}
|
|
8404
|
+
interface ServerApiResponse<T> {
|
|
8405
|
+
success: boolean;
|
|
8406
|
+
data?: T;
|
|
8407
|
+
error?: string;
|
|
8408
|
+
}
|
|
8409
|
+
/**
|
|
8410
|
+
* VoltAgent constructor options
|
|
8411
|
+
*/
|
|
8412
|
+
type VoltAgentOptions = {
|
|
7687
8413
|
/**
|
|
7688
|
-
*
|
|
8414
|
+
* Optional agents to register when bootstrapping VoltAgent
|
|
7689
8415
|
*/
|
|
7690
|
-
|
|
8416
|
+
agents?: Record<string, Agent>;
|
|
7691
8417
|
/**
|
|
7692
|
-
*
|
|
8418
|
+
* Optional workflows to register with VoltAgent
|
|
8419
|
+
* Can be either Workflow instances or WorkflowChain instances
|
|
7693
8420
|
*/
|
|
7694
|
-
|
|
8421
|
+
workflows?: Record<string, Workflow<DangerouslyAllowAny, DangerouslyAllowAny, DangerouslyAllowAny, DangerouslyAllowAny> | WorkflowChain<DangerouslyAllowAny, DangerouslyAllowAny, DangerouslyAllowAny, DangerouslyAllowAny, DangerouslyAllowAny>>;
|
|
8422
|
+
/** Optional VoltOps trigger handlers */
|
|
8423
|
+
triggers?: VoltAgentTriggersConfig;
|
|
7695
8424
|
/**
|
|
7696
|
-
*
|
|
8425
|
+
* Server provider factory function
|
|
8426
|
+
* Example: honoServer({ port: 3141, enableSwaggerUI: true })
|
|
7697
8427
|
*/
|
|
7698
|
-
|
|
8428
|
+
server?: ServerProviderFactory;
|
|
7699
8429
|
/**
|
|
7700
|
-
*
|
|
8430
|
+
* Serverless provider factory function for fetch-based runtimes
|
|
8431
|
+
* Example: serverlessHono({ corsOrigin: '*' })
|
|
7701
8432
|
*/
|
|
7702
|
-
|
|
8433
|
+
serverless?: ServerlessProviderFactory;
|
|
8434
|
+
/**
|
|
8435
|
+
* Unified VoltOps client for telemetry and prompt management
|
|
8436
|
+
* Replaces the old telemetryExporter approach with a comprehensive solution.
|
|
8437
|
+
*/
|
|
8438
|
+
voltOpsClient?: VoltOpsClient;
|
|
8439
|
+
/**
|
|
8440
|
+
* Observability instance for OpenTelemetry-compliant tracing
|
|
8441
|
+
* Allows sharing the same observability instance between VoltAgent and Agents
|
|
8442
|
+
* If not provided, creates a default instance with in-memory storage
|
|
8443
|
+
*/
|
|
8444
|
+
observability?: VoltAgentObservability;
|
|
8445
|
+
/**
|
|
8446
|
+
* Global logger instance to use across all agents and workflows
|
|
8447
|
+
* If not provided, a default logger will be created
|
|
8448
|
+
*/
|
|
8449
|
+
logger?: Logger;
|
|
8450
|
+
/**
|
|
8451
|
+
* Optional collection of MCP servers to register alongside the primary server.
|
|
8452
|
+
* Enables exposing multiple VoltAgent surfaces through separate MCP endpoints.
|
|
8453
|
+
*/
|
|
8454
|
+
mcpServers?: Record<string, MCPServerLike | MCPServerFactory>;
|
|
8455
|
+
/**
|
|
8456
|
+
* Optional collection of A2A servers to expose agents via the Agent-to-Agent protocol.
|
|
8457
|
+
*/
|
|
8458
|
+
a2aServers?: Record<string, A2AServerLike | A2AServerFactory>;
|
|
8459
|
+
/**
|
|
8460
|
+
* @deprecated Use `server.port` instead
|
|
8461
|
+
*/
|
|
8462
|
+
port?: number;
|
|
8463
|
+
/**
|
|
8464
|
+
* @deprecated Use `server.autoStart` instead
|
|
8465
|
+
*/
|
|
8466
|
+
autoStart?: boolean;
|
|
8467
|
+
checkDependencies?: boolean;
|
|
8468
|
+
/**
|
|
8469
|
+
* @deprecated Server configuration is now done through server provider
|
|
8470
|
+
*/
|
|
8471
|
+
customEndpoints?: unknown[];
|
|
8472
|
+
/**
|
|
8473
|
+
* @deprecated Server configuration is now done through server provider
|
|
8474
|
+
*/
|
|
8475
|
+
enableSwaggerUI?: boolean;
|
|
8476
|
+
};
|
|
8477
|
+
|
|
8478
|
+
type TriggerHttpMethod = "get" | "post" | "put" | "patch" | "delete";
|
|
8479
|
+
interface VoltOpsTriggerEnvelope<TPayload = unknown> {
|
|
8480
|
+
provider?: string;
|
|
8481
|
+
trigger?: string;
|
|
8482
|
+
event?: string;
|
|
8483
|
+
payload?: TPayload;
|
|
8484
|
+
deliveryId?: string;
|
|
8485
|
+
bindingId?: string;
|
|
8486
|
+
targetId?: string;
|
|
8487
|
+
catalogId?: string;
|
|
8488
|
+
metadata?: Record<string, unknown> | null;
|
|
8489
|
+
[key: string]: unknown;
|
|
8490
|
+
}
|
|
8491
|
+
interface VoltOpsTriggerDefinition<TPayload = unknown> {
|
|
8492
|
+
/** Unique trigger key, e.g. `github.star` */
|
|
8493
|
+
name: string;
|
|
8494
|
+
/** Provider identifier such as `github`, `airtable`, or `gmail-new-email` */
|
|
8495
|
+
provider: string;
|
|
8496
|
+
/** Short label for display purposes */
|
|
8497
|
+
summary?: string;
|
|
8498
|
+
/** Longer description of the trigger */
|
|
8499
|
+
description?: string;
|
|
8500
|
+
/** Suggested HTTP path (used when building default routes) */
|
|
8501
|
+
defaultPath?: string;
|
|
8502
|
+
/** Optional delivery method metadata (webhook, polling, schedule, etc.) */
|
|
8503
|
+
deliveryMode?: string;
|
|
8504
|
+
/** Optional category metadata */
|
|
8505
|
+
category?: string;
|
|
8506
|
+
/** Optional payload description */
|
|
8507
|
+
payloadType?: TPayload;
|
|
8508
|
+
}
|
|
8509
|
+
interface RegisteredTrigger<TPayload = unknown> {
|
|
8510
|
+
name: string;
|
|
8511
|
+
path: string;
|
|
8512
|
+
method: TriggerHttpMethod;
|
|
8513
|
+
handler: TriggerHandler<TPayload>;
|
|
8514
|
+
definition?: VoltOpsTriggerDefinition<TPayload>;
|
|
8515
|
+
summary?: string;
|
|
8516
|
+
description?: string;
|
|
8517
|
+
metadata?: Record<string, unknown>;
|
|
7703
8518
|
}
|
|
8519
|
+
interface TriggerHandlerContext<TPayload = unknown> {
|
|
8520
|
+
payload: TPayload;
|
|
8521
|
+
event: VoltOpsTriggerEnvelope<TPayload>;
|
|
8522
|
+
trigger: RegisteredTrigger<TPayload>;
|
|
8523
|
+
logger: Logger;
|
|
8524
|
+
headers: Record<string, string>;
|
|
8525
|
+
agentRegistry: ServerProviderDeps["agentRegistry"];
|
|
8526
|
+
workflowRegistry: ServerProviderDeps["workflowRegistry"];
|
|
8527
|
+
voltOpsClient?: VoltOpsClient;
|
|
8528
|
+
agents: Record<string, Agent>;
|
|
8529
|
+
rawRequest?: unknown;
|
|
8530
|
+
triggerContext: Map<string | symbol, unknown>;
|
|
8531
|
+
}
|
|
8532
|
+
type TriggerHandlerBody = string | number | boolean | null | Record<string, unknown> | unknown[];
|
|
8533
|
+
interface TriggerHandlerResponse {
|
|
8534
|
+
status?: number;
|
|
8535
|
+
body?: TriggerHandlerBody;
|
|
8536
|
+
headers?: Record<string, string>;
|
|
8537
|
+
}
|
|
8538
|
+
type TriggerHandlerResult = void | TriggerHandlerBody | TriggerHandlerResponse;
|
|
8539
|
+
/**
|
|
8540
|
+
* @deprecated Use {@link TriggerHandlerResult}. This alias remains for backwards compatibility.
|
|
8541
|
+
*/
|
|
8542
|
+
type TriggerHandlerReturn = TriggerHandlerResult | Promise<TriggerHandlerResult> | Promise<void>;
|
|
8543
|
+
type TriggerHandler<TPayload = unknown> = (context: TriggerHandlerContext<TPayload>) => TriggerHandlerReturn;
|
|
8544
|
+
type VoltAgentTriggerConfig<TPayload = unknown> = TriggerHandler<TPayload> | {
|
|
8545
|
+
handler: TriggerHandler<TPayload>;
|
|
8546
|
+
path?: string;
|
|
8547
|
+
method?: TriggerHttpMethod;
|
|
8548
|
+
definition?: VoltOpsTriggerDefinition<TPayload>;
|
|
8549
|
+
summary?: string;
|
|
8550
|
+
description?: string;
|
|
8551
|
+
metadata?: Record<string, unknown>;
|
|
8552
|
+
};
|
|
8553
|
+
type VoltAgentTriggersConfig = Record<string, VoltAgentTriggerConfig>;
|
|
8554
|
+
declare function defineVoltOpsTrigger<TPayload = unknown>(definition: VoltOpsTriggerDefinition<TPayload>): VoltOpsTriggerDefinition<TPayload>;
|
|
8555
|
+
|
|
8556
|
+
type VoltOpsTriggerCatalog = typeof DEFAULT_TRIGGER_CATALOG;
|
|
8557
|
+
type VoltOpsTriggerName = VoltOpsTriggerCatalog[number]["events"][number]["key"];
|
|
8558
|
+
type LowerFirst<S extends string> = S extends `${infer F}${infer R}` ? `${Lowercase<F>}${R}` : S;
|
|
8559
|
+
type NormalizeSegment<S extends string> = S extends `${infer Head}-${infer Tail}` ? `${Lowercase<Head>}${Capitalize<NormalizeSegment<Tail>>}` : S extends `${infer Head}_${infer Tail}` ? `${Lowercase<Head>}${Capitalize<NormalizeSegment<Tail>>}` : LowerFirst<S>;
|
|
8560
|
+
type ProviderIdentifier<Entry extends DefaultTriggerCatalogEntry> = NormalizeSegment<Entry["dslTriggerId"] extends string ? Entry["dslTriggerId"] : Entry["triggerId"]>;
|
|
8561
|
+
type EventPropertyName<K extends string> = K extends `${string}.${infer Rest}` ? Rest extends "*" ? "any" : NormalizeSegment<Rest> : NormalizeSegment<K>;
|
|
8562
|
+
type BuildTriggerGroups<TCatalog extends readonly DefaultTriggerCatalogEntry[]> = {
|
|
8563
|
+
[Entry in TCatalog[number] as ProviderIdentifier<Entry>]: Entry["events"] extends readonly any[] ? {
|
|
8564
|
+
[Event in Entry["events"][number] as EventPropertyName<Event["key"]>]: Event["key"];
|
|
8565
|
+
} : never;
|
|
8566
|
+
};
|
|
8567
|
+
declare const VoltOpsTriggerGroups: BuildTriggerGroups<readonly [{
|
|
8568
|
+
readonly triggerId: "cron";
|
|
8569
|
+
readonly displayName: "Cron Trigger";
|
|
8570
|
+
readonly service: "Scheduler";
|
|
8571
|
+
readonly category: "Platform & General";
|
|
8572
|
+
readonly authType: null;
|
|
8573
|
+
readonly deliveryModes: ["schedule"];
|
|
8574
|
+
readonly metadata: {
|
|
8575
|
+
readonly description: "Run an agent or workflow on a recurring schedule using cron expressions.";
|
|
8576
|
+
};
|
|
8577
|
+
readonly version: "1.0.0";
|
|
8578
|
+
readonly events: readonly [{
|
|
8579
|
+
readonly key: "cron.schedule";
|
|
8580
|
+
readonly displayName: "Scheduled run";
|
|
8581
|
+
readonly description: "Execute on the provided cron expression schedule (e.g., every minute, hourly).";
|
|
8582
|
+
readonly deliveryMode: "schedule";
|
|
8583
|
+
readonly defaultConfig: {
|
|
8584
|
+
readonly schedule: {
|
|
8585
|
+
readonly type: "cron";
|
|
8586
|
+
readonly expression: "*/5 * * * *";
|
|
8587
|
+
readonly timezone: "UTC";
|
|
8588
|
+
};
|
|
8589
|
+
};
|
|
8590
|
+
}];
|
|
8591
|
+
}, {
|
|
8592
|
+
readonly triggerId: "gmail-new-email";
|
|
8593
|
+
readonly dslTriggerId: "gmail";
|
|
8594
|
+
readonly displayName: "Gmail";
|
|
8595
|
+
readonly service: "Gmail";
|
|
8596
|
+
readonly category: "Email & Messaging";
|
|
8597
|
+
readonly authType: "oauth2";
|
|
8598
|
+
readonly deliveryModes: ["polling"];
|
|
8599
|
+
readonly metadata: {
|
|
8600
|
+
readonly description: "Trigger when a new email appears in a selected Gmail inbox or label.";
|
|
8601
|
+
};
|
|
8602
|
+
readonly version: "1.0.0";
|
|
8603
|
+
readonly events: readonly [{
|
|
8604
|
+
readonly key: "gmail.newEmail";
|
|
8605
|
+
readonly displayName: "New email";
|
|
8606
|
+
readonly description: "Detect new emails in the configured Gmail account and optional label or search filter.";
|
|
8607
|
+
readonly deliveryMode: "polling";
|
|
8608
|
+
}];
|
|
8609
|
+
}, {
|
|
8610
|
+
readonly triggerId: "github";
|
|
8611
|
+
readonly displayName: "GitHub";
|
|
8612
|
+
readonly service: "GitHub";
|
|
8613
|
+
readonly category: "Developer Tools";
|
|
8614
|
+
readonly authType: "token";
|
|
8615
|
+
readonly deliveryModes: ["webhook"];
|
|
8616
|
+
readonly metadata: {
|
|
8617
|
+
readonly description: "Trigger workflows from GitHub repository activity such as pushes, pull requests, or issue updates.";
|
|
8618
|
+
readonly docsUrl: "https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads";
|
|
8619
|
+
};
|
|
8620
|
+
readonly version: "1.0.0";
|
|
8621
|
+
readonly events: readonly [{
|
|
8622
|
+
readonly key: "github.*";
|
|
8623
|
+
readonly displayName: "Any event";
|
|
8624
|
+
readonly description: "Emit whenever GitHub delivers any webhook event (wildcard).";
|
|
8625
|
+
readonly deliveryMode: "webhook";
|
|
8626
|
+
}, {
|
|
8627
|
+
readonly key: "github.check_run";
|
|
8628
|
+
readonly displayName: "Check run";
|
|
8629
|
+
readonly description: "Triggered when a check run is created, rerequested, completed, or has a requested action.";
|
|
8630
|
+
readonly deliveryMode: "webhook";
|
|
8631
|
+
}, {
|
|
8632
|
+
readonly key: "github.check_suite";
|
|
8633
|
+
readonly displayName: "Check suite";
|
|
8634
|
+
readonly description: "Triggered when a check suite is completed, requested, or rerequested.";
|
|
8635
|
+
readonly deliveryMode: "webhook";
|
|
8636
|
+
}, {
|
|
8637
|
+
readonly key: "github.commit_comment";
|
|
8638
|
+
readonly displayName: "Commit comment";
|
|
8639
|
+
readonly description: "Triggered when a commit comment is created.";
|
|
8640
|
+
readonly deliveryMode: "webhook";
|
|
8641
|
+
}, {
|
|
8642
|
+
readonly key: "github.create";
|
|
8643
|
+
readonly displayName: "Create";
|
|
8644
|
+
readonly description: "Triggered when a repository, branch, or tag is created.";
|
|
8645
|
+
readonly deliveryMode: "webhook";
|
|
8646
|
+
}, {
|
|
8647
|
+
readonly key: "github.delete";
|
|
8648
|
+
readonly displayName: "Delete";
|
|
8649
|
+
readonly description: "Triggered when a repository branch or tag is deleted.";
|
|
8650
|
+
readonly deliveryMode: "webhook";
|
|
8651
|
+
}, {
|
|
8652
|
+
readonly key: "github.deploy_key";
|
|
8653
|
+
readonly displayName: "Deploy key";
|
|
8654
|
+
readonly description: "Triggered when a deploy key is added or removed from a repository.";
|
|
8655
|
+
readonly deliveryMode: "webhook";
|
|
8656
|
+
}, {
|
|
8657
|
+
readonly key: "github.deployment";
|
|
8658
|
+
readonly displayName: "Deployment";
|
|
8659
|
+
readonly description: "Triggered when a deployment is created.";
|
|
8660
|
+
readonly deliveryMode: "webhook";
|
|
8661
|
+
}, {
|
|
8662
|
+
readonly key: "github.deployment_status";
|
|
8663
|
+
readonly displayName: "Deployment status";
|
|
8664
|
+
readonly description: "Triggered when the status of a deployment changes.";
|
|
8665
|
+
readonly deliveryMode: "webhook";
|
|
8666
|
+
}, {
|
|
8667
|
+
readonly key: "github.fork";
|
|
8668
|
+
readonly displayName: "Fork";
|
|
8669
|
+
readonly description: "Triggered when a user forks a repository.";
|
|
8670
|
+
readonly deliveryMode: "webhook";
|
|
8671
|
+
}, {
|
|
8672
|
+
readonly key: "github.github_app_authorization";
|
|
8673
|
+
readonly displayName: "GitHub App authorization";
|
|
8674
|
+
readonly description: "Triggered when someone revokes their authorization of a GitHub App.";
|
|
8675
|
+
readonly deliveryMode: "webhook";
|
|
8676
|
+
}, {
|
|
8677
|
+
readonly key: "github.gollum";
|
|
8678
|
+
readonly displayName: "Gollum";
|
|
8679
|
+
readonly description: "Triggered when a Wiki page is created or updated.";
|
|
8680
|
+
readonly deliveryMode: "webhook";
|
|
8681
|
+
}, {
|
|
8682
|
+
readonly key: "github.installation";
|
|
8683
|
+
readonly displayName: "Installation";
|
|
8684
|
+
readonly description: "Triggered when someone installs, uninstalls, or accepts new permissions for a GitHub App.";
|
|
8685
|
+
readonly deliveryMode: "webhook";
|
|
8686
|
+
}, {
|
|
8687
|
+
readonly key: "github.installation_repositories";
|
|
8688
|
+
readonly displayName: "Installation repositories";
|
|
8689
|
+
readonly description: "Triggered when a repository is added or removed from a GitHub App installation.";
|
|
8690
|
+
readonly deliveryMode: "webhook";
|
|
8691
|
+
}, {
|
|
8692
|
+
readonly key: "github.issue_comment";
|
|
8693
|
+
readonly displayName: "Issue comment";
|
|
8694
|
+
readonly description: "Triggered when an issue comment is created, edited, or deleted.";
|
|
8695
|
+
readonly deliveryMode: "webhook";
|
|
8696
|
+
}, {
|
|
8697
|
+
readonly key: "github.issues";
|
|
8698
|
+
readonly displayName: "Issues";
|
|
8699
|
+
readonly description: "Triggered when an issue is created, edited, deleted, transferred, pinned, closed, reopened, or changed.";
|
|
8700
|
+
readonly deliveryMode: "webhook";
|
|
8701
|
+
}, {
|
|
8702
|
+
readonly key: "github.label";
|
|
8703
|
+
readonly displayName: "Label";
|
|
8704
|
+
readonly description: "Triggered when a repository's label is created, edited, or deleted.";
|
|
8705
|
+
readonly deliveryMode: "webhook";
|
|
8706
|
+
}, {
|
|
8707
|
+
readonly key: "github.marketplace_purchase";
|
|
8708
|
+
readonly displayName: "Marketplace purchase";
|
|
8709
|
+
readonly description: "Triggered when a GitHub Marketplace plan is purchased, upgraded, downgraded, or cancelled.";
|
|
8710
|
+
readonly deliveryMode: "webhook";
|
|
8711
|
+
}, {
|
|
8712
|
+
readonly key: "github.member";
|
|
8713
|
+
readonly displayName: "Member";
|
|
8714
|
+
readonly description: "Triggered when a user accepts an invitation, is removed, or has permissions changed as a collaborator.";
|
|
8715
|
+
readonly deliveryMode: "webhook";
|
|
8716
|
+
}, {
|
|
8717
|
+
readonly key: "github.membership";
|
|
8718
|
+
readonly displayName: "Membership";
|
|
8719
|
+
readonly description: "Triggered when a user is added or removed from a team (organization hooks only).";
|
|
8720
|
+
readonly deliveryMode: "webhook";
|
|
8721
|
+
}, {
|
|
8722
|
+
readonly key: "github.meta";
|
|
8723
|
+
readonly displayName: "Meta";
|
|
8724
|
+
readonly description: "Triggered when the webhook configuration itself is deleted.";
|
|
8725
|
+
readonly deliveryMode: "webhook";
|
|
8726
|
+
}, {
|
|
8727
|
+
readonly key: "github.milestone";
|
|
8728
|
+
readonly displayName: "Milestone";
|
|
8729
|
+
readonly description: "Triggered when a milestone is created, closed, opened, edited, or deleted.";
|
|
8730
|
+
readonly deliveryMode: "webhook";
|
|
8731
|
+
}, {
|
|
8732
|
+
readonly key: "github.org_block";
|
|
8733
|
+
readonly displayName: "Org block";
|
|
8734
|
+
readonly description: "Triggered when an organization blocks or unblocks a user (organization hooks only).";
|
|
8735
|
+
readonly deliveryMode: "webhook";
|
|
8736
|
+
}, {
|
|
8737
|
+
readonly key: "github.organization";
|
|
8738
|
+
readonly displayName: "Organization";
|
|
8739
|
+
readonly description: "Triggered when an organization is renamed, deleted, or membership changes (organization hooks only).";
|
|
8740
|
+
readonly deliveryMode: "webhook";
|
|
8741
|
+
}, {
|
|
8742
|
+
readonly key: "github.page_build";
|
|
8743
|
+
readonly displayName: "Page build";
|
|
8744
|
+
readonly description: "Triggered on pushes to a GitHub Pages enabled branch that results in a page build.";
|
|
8745
|
+
readonly deliveryMode: "webhook";
|
|
8746
|
+
}, {
|
|
8747
|
+
readonly key: "github.project";
|
|
8748
|
+
readonly displayName: "Project";
|
|
8749
|
+
readonly description: "Triggered when a project is created, updated, closed, reopened, or deleted.";
|
|
8750
|
+
readonly deliveryMode: "webhook";
|
|
8751
|
+
}, {
|
|
8752
|
+
readonly key: "github.project_card";
|
|
8753
|
+
readonly displayName: "Project card";
|
|
8754
|
+
readonly description: "Triggered when a project card is created, edited, moved, converted to an issue, or deleted.";
|
|
8755
|
+
readonly deliveryMode: "webhook";
|
|
8756
|
+
}, {
|
|
8757
|
+
readonly key: "github.project_column";
|
|
8758
|
+
readonly displayName: "Project column";
|
|
8759
|
+
readonly description: "Triggered when a project column is created, updated, moved, or deleted.";
|
|
8760
|
+
readonly deliveryMode: "webhook";
|
|
8761
|
+
}, {
|
|
8762
|
+
readonly key: "github.public";
|
|
8763
|
+
readonly displayName: "Public";
|
|
8764
|
+
readonly description: "Triggered when a private repository is open sourced.";
|
|
8765
|
+
readonly deliveryMode: "webhook";
|
|
8766
|
+
}, {
|
|
8767
|
+
readonly key: "github.pull_request";
|
|
8768
|
+
readonly displayName: "Pull request";
|
|
8769
|
+
readonly description: "Triggered when a pull request is opened, edited, closed, reopened, labeled, assigned, or synchronized.";
|
|
8770
|
+
readonly deliveryMode: "webhook";
|
|
8771
|
+
}, {
|
|
8772
|
+
readonly key: "github.pull_request_review";
|
|
8773
|
+
readonly displayName: "Pull request review";
|
|
8774
|
+
readonly description: "Triggered when a pull request review is submitted, edited, or dismissed.";
|
|
8775
|
+
readonly deliveryMode: "webhook";
|
|
8776
|
+
}, {
|
|
8777
|
+
readonly key: "github.pull_request_review_comment";
|
|
8778
|
+
readonly displayName: "Pull request review comment";
|
|
8779
|
+
readonly description: "Triggered when a comment on a pull request diff is created, edited, or deleted.";
|
|
8780
|
+
readonly deliveryMode: "webhook";
|
|
8781
|
+
}, {
|
|
8782
|
+
readonly key: "github.push";
|
|
8783
|
+
readonly displayName: "Push";
|
|
8784
|
+
readonly description: "Triggered on a push to a branch or tag. This is the default event for repository webhooks.";
|
|
8785
|
+
readonly deliveryMode: "webhook";
|
|
8786
|
+
}, {
|
|
8787
|
+
readonly key: "github.release";
|
|
8788
|
+
readonly displayName: "Release";
|
|
8789
|
+
readonly description: "Triggered when a release is published, edited, deleted, or prereleased.";
|
|
8790
|
+
readonly deliveryMode: "webhook";
|
|
8791
|
+
}, {
|
|
8792
|
+
readonly key: "github.repository";
|
|
8793
|
+
readonly displayName: "Repository";
|
|
8794
|
+
readonly description: "Triggered when a repository is created, archived, unarchived, renamed, transferred, or deleted.";
|
|
8795
|
+
readonly deliveryMode: "webhook";
|
|
8796
|
+
}, {
|
|
8797
|
+
readonly key: "github.repository_import";
|
|
8798
|
+
readonly displayName: "Repository import";
|
|
8799
|
+
readonly description: "Triggered when a repository import succeeds, fails, or is cancelled.";
|
|
8800
|
+
readonly deliveryMode: "webhook";
|
|
8801
|
+
}, {
|
|
8802
|
+
readonly key: "github.repository_vulnerability_alert";
|
|
8803
|
+
readonly displayName: "Repository vulnerability alert";
|
|
8804
|
+
readonly description: "Triggered when a Dependabot security alert is created, dismissed, or resolved.";
|
|
8805
|
+
readonly deliveryMode: "webhook";
|
|
8806
|
+
}, {
|
|
8807
|
+
readonly key: "github.security_advisory";
|
|
8808
|
+
readonly displayName: "Security advisory";
|
|
8809
|
+
readonly description: "Triggered when a security advisory is published, updated, or withdrawn for an organization.";
|
|
8810
|
+
readonly deliveryMode: "webhook";
|
|
8811
|
+
}, {
|
|
8812
|
+
readonly key: "github.star";
|
|
8813
|
+
readonly displayName: "Star";
|
|
8814
|
+
readonly description: "Triggered when a star is added to or removed from a repository.";
|
|
8815
|
+
readonly deliveryMode: "webhook";
|
|
8816
|
+
}, {
|
|
8817
|
+
readonly key: "github.status";
|
|
8818
|
+
readonly displayName: "Status";
|
|
8819
|
+
readonly description: "Triggered when the status of a Git commit changes.";
|
|
8820
|
+
readonly deliveryMode: "webhook";
|
|
8821
|
+
}, {
|
|
8822
|
+
readonly key: "github.team";
|
|
8823
|
+
readonly displayName: "Team";
|
|
8824
|
+
readonly description: "Triggered when an organization's team is created, deleted, edited, or repository access changes (organization hooks only).";
|
|
8825
|
+
readonly deliveryMode: "webhook";
|
|
8826
|
+
}, {
|
|
8827
|
+
readonly key: "github.team_add";
|
|
8828
|
+
readonly displayName: "Team add";
|
|
8829
|
+
readonly description: "Triggered when a repository is added to a team.";
|
|
8830
|
+
readonly deliveryMode: "webhook";
|
|
8831
|
+
}, {
|
|
8832
|
+
readonly key: "github.watch";
|
|
8833
|
+
readonly displayName: "Watch";
|
|
8834
|
+
readonly description: "Triggered when someone stars a repository.";
|
|
8835
|
+
readonly deliveryMode: "webhook";
|
|
8836
|
+
}];
|
|
8837
|
+
}, {
|
|
8838
|
+
readonly triggerId: "slack";
|
|
8839
|
+
readonly displayName: "Slack";
|
|
8840
|
+
readonly service: "Slack";
|
|
8841
|
+
readonly category: "Email & Messaging";
|
|
8842
|
+
readonly authType: "token";
|
|
8843
|
+
readonly deliveryModes: ["webhook"];
|
|
8844
|
+
readonly metadata: {
|
|
8845
|
+
readonly description: "Trigger workflows from events happening inside your Slack workspace such as messages, reactions, and channel activity.";
|
|
8846
|
+
readonly docsUrl: "https://api.slack.com/events";
|
|
8847
|
+
};
|
|
8848
|
+
readonly version: "1.0.0";
|
|
8849
|
+
readonly events: readonly [{
|
|
8850
|
+
readonly key: "slack.anyEvent";
|
|
8851
|
+
readonly displayName: "Any Slack event";
|
|
8852
|
+
readonly description: "Receive every event delivered to your Slack app via the Events API. Use with caution in busy workspaces.";
|
|
8853
|
+
readonly deliveryMode: "webhook";
|
|
8854
|
+
readonly defaultConfig: {
|
|
8855
|
+
readonly provider: {
|
|
8856
|
+
readonly type: "slack";
|
|
8857
|
+
readonly watchWorkspace: true;
|
|
8858
|
+
readonly channelId: null;
|
|
8859
|
+
readonly includeBotMessages: true;
|
|
8860
|
+
};
|
|
8861
|
+
};
|
|
8862
|
+
}, {
|
|
8863
|
+
readonly key: "slack.appMention";
|
|
8864
|
+
readonly displayName: "Bot or app mention";
|
|
8865
|
+
readonly description: "Trigger when your bot or app is mentioned in a channel where it is present.";
|
|
8866
|
+
readonly deliveryMode: "webhook";
|
|
8867
|
+
readonly defaultConfig: {
|
|
8868
|
+
readonly provider: {
|
|
8869
|
+
readonly type: "slack";
|
|
8870
|
+
readonly watchWorkspace: false;
|
|
8871
|
+
readonly channelId: null;
|
|
8872
|
+
readonly includeBotMessages: false;
|
|
8873
|
+
};
|
|
8874
|
+
};
|
|
8875
|
+
}, {
|
|
8876
|
+
readonly key: "slack.messagePosted";
|
|
8877
|
+
readonly displayName: "Message posted to channel";
|
|
8878
|
+
readonly description: "Trigger when a new message is posted to a channel that the app is added to.";
|
|
8879
|
+
readonly deliveryMode: "webhook";
|
|
8880
|
+
readonly defaultConfig: {
|
|
8881
|
+
readonly provider: {
|
|
8882
|
+
readonly type: "slack";
|
|
8883
|
+
readonly watchWorkspace: false;
|
|
8884
|
+
readonly channelId: null;
|
|
8885
|
+
readonly includeBotMessages: false;
|
|
8886
|
+
};
|
|
8887
|
+
};
|
|
8888
|
+
}, {
|
|
8889
|
+
readonly key: "slack.reactionAdded";
|
|
8890
|
+
readonly displayName: "Reaction added";
|
|
8891
|
+
readonly description: "Trigger when a reaction is added to a message in a channel your app has joined.";
|
|
8892
|
+
readonly deliveryMode: "webhook";
|
|
8893
|
+
readonly defaultConfig: {
|
|
8894
|
+
readonly provider: {
|
|
8895
|
+
readonly type: "slack";
|
|
8896
|
+
readonly watchWorkspace: false;
|
|
8897
|
+
readonly channelId: null;
|
|
8898
|
+
readonly includeBotMessages: true;
|
|
8899
|
+
};
|
|
8900
|
+
};
|
|
8901
|
+
}, {
|
|
8902
|
+
readonly key: "slack.fileShare";
|
|
8903
|
+
readonly displayName: "File shared";
|
|
8904
|
+
readonly description: "Trigger when a file is shared in a channel that the app is added to.";
|
|
8905
|
+
readonly deliveryMode: "webhook";
|
|
8906
|
+
readonly defaultConfig: {
|
|
8907
|
+
readonly provider: {
|
|
8908
|
+
readonly type: "slack";
|
|
8909
|
+
readonly watchWorkspace: false;
|
|
8910
|
+
readonly channelId: null;
|
|
8911
|
+
readonly includeBotMessages: true;
|
|
8912
|
+
};
|
|
8913
|
+
};
|
|
8914
|
+
}, {
|
|
8915
|
+
readonly key: "slack.filePublic";
|
|
8916
|
+
readonly displayName: "File made public";
|
|
8917
|
+
readonly description: "Trigger when a file is made public in the workspace.";
|
|
8918
|
+
readonly deliveryMode: "webhook";
|
|
8919
|
+
readonly defaultConfig: {
|
|
8920
|
+
readonly provider: {
|
|
8921
|
+
readonly type: "slack";
|
|
8922
|
+
readonly watchWorkspace: true;
|
|
8923
|
+
readonly channelId: null;
|
|
8924
|
+
readonly includeBotMessages: true;
|
|
8925
|
+
};
|
|
8926
|
+
};
|
|
8927
|
+
}, {
|
|
8928
|
+
readonly key: "slack.channelCreated";
|
|
8929
|
+
readonly displayName: "Channel created";
|
|
8930
|
+
readonly description: "Trigger when a new public channel is created in the workspace.";
|
|
8931
|
+
readonly deliveryMode: "webhook";
|
|
8932
|
+
readonly defaultConfig: {
|
|
8933
|
+
readonly provider: {
|
|
8934
|
+
readonly type: "slack";
|
|
8935
|
+
readonly watchWorkspace: true;
|
|
8936
|
+
readonly channelId: null;
|
|
8937
|
+
readonly includeBotMessages: true;
|
|
8938
|
+
};
|
|
8939
|
+
};
|
|
8940
|
+
}, {
|
|
8941
|
+
readonly key: "slack.teamJoin";
|
|
8942
|
+
readonly displayName: "User joined workspace";
|
|
8943
|
+
readonly description: "Trigger when a new user joins the Slack workspace.";
|
|
8944
|
+
readonly deliveryMode: "webhook";
|
|
8945
|
+
readonly defaultConfig: {
|
|
8946
|
+
readonly provider: {
|
|
8947
|
+
readonly type: "slack";
|
|
8948
|
+
readonly watchWorkspace: true;
|
|
8949
|
+
readonly channelId: null;
|
|
8950
|
+
readonly includeBotMessages: true;
|
|
8951
|
+
};
|
|
8952
|
+
};
|
|
8953
|
+
}];
|
|
8954
|
+
}, {
|
|
8955
|
+
readonly triggerId: "discord";
|
|
8956
|
+
readonly displayName: "Discord (Actions)";
|
|
8957
|
+
readonly service: "Discord";
|
|
8958
|
+
readonly category: "Email & Messaging";
|
|
8959
|
+
readonly authType: "bot-token";
|
|
8960
|
+
readonly deliveryModes: [];
|
|
8961
|
+
readonly metadata: {
|
|
8962
|
+
readonly description: "Use Discord bot tokens or webhooks with VoltAgent actions. This integration only powers outgoing actions (no event triggers).";
|
|
8963
|
+
readonly actionOnly: true;
|
|
8964
|
+
};
|
|
8965
|
+
readonly version: "1.0.0";
|
|
8966
|
+
readonly events: readonly [];
|
|
8967
|
+
}, {
|
|
8968
|
+
readonly triggerId: "airtable-record";
|
|
8969
|
+
readonly dslTriggerId: "airtable";
|
|
8970
|
+
readonly displayName: "Airtable";
|
|
8971
|
+
readonly service: "Airtable";
|
|
8972
|
+
readonly category: "Productivity";
|
|
8973
|
+
readonly authType: "token";
|
|
8974
|
+
readonly deliveryModes: ["polling"];
|
|
8975
|
+
readonly metadata: {
|
|
8976
|
+
readonly description: "Trigger when new rows are added to an Airtable base or view.";
|
|
8977
|
+
};
|
|
8978
|
+
readonly version: "1.0.0";
|
|
8979
|
+
readonly events: readonly [{
|
|
8980
|
+
readonly key: "airtable.recordCreated";
|
|
8981
|
+
readonly displayName: "Record created";
|
|
8982
|
+
readonly description: "Poll the configured Base/Table/View and emit when a new record is created.";
|
|
8983
|
+
readonly deliveryMode: "polling";
|
|
8984
|
+
}];
|
|
8985
|
+
}]>;
|
|
8986
|
+
type VoltOpsTriggerGroupMap = typeof VoltOpsTriggerGroups;
|
|
8987
|
+
declare const VoltOpsTriggerDefinitions: Record<"github.*" | "github.check_run" | "github.check_suite" | "github.commit_comment" | "github.create" | "github.delete" | "github.deploy_key" | "github.deployment" | "github.deployment_status" | "github.fork" | "github.github_app_authorization" | "github.gollum" | "github.installation" | "github.installation_repositories" | "github.issue_comment" | "github.issues" | "github.label" | "github.marketplace_purchase" | "github.member" | "github.membership" | "github.meta" | "github.milestone" | "github.org_block" | "github.organization" | "github.page_build" | "github.project" | "github.project_card" | "github.project_column" | "github.public" | "github.pull_request" | "github.pull_request_review" | "github.pull_request_review_comment" | "github.push" | "github.release" | "github.repository" | "github.repository_import" | "github.repository_vulnerability_alert" | "github.security_advisory" | "github.star" | "github.status" | "github.team" | "github.team_add" | "github.watch" | "slack.anyEvent" | "slack.appMention" | "slack.messagePosted" | "slack.reactionAdded" | "slack.fileShare" | "slack.filePublic" | "slack.channelCreated" | "slack.teamJoin" | "cron.schedule" | "gmail.newEmail" | "airtable.recordCreated", VoltOpsTriggerDefinition<unknown>>;
|
|
8988
|
+
declare const VoltOpsTriggerNames: VoltOpsTriggerName[];
|
|
8989
|
+
declare function getVoltOpsTriggerDefinition(name: VoltOpsTriggerName): VoltOpsTriggerDefinition;
|
|
8990
|
+
|
|
8991
|
+
type TriggerRegistrar = (config: VoltAgentTriggerConfig) => void;
|
|
8992
|
+
type TriggerProviderDsl<TEvents extends Record<string, string>> = {
|
|
8993
|
+
[Event in keyof TEvents]: TriggerRegistrar;
|
|
8994
|
+
};
|
|
8995
|
+
type TriggerDsl = {
|
|
8996
|
+
[Provider in keyof VoltOpsTriggerGroupMap]: TriggerProviderDsl<VoltOpsTriggerGroupMap[Provider]>;
|
|
8997
|
+
};
|
|
7704
8998
|
/**
|
|
7705
|
-
*
|
|
8999
|
+
* DSL helper that allows registering triggers with dot-access syntax.
|
|
9000
|
+
*
|
|
9001
|
+
* Example:
|
|
9002
|
+
* ```ts
|
|
9003
|
+
* const volt = new VoltAgent({
|
|
9004
|
+
* triggers: createTriggers((on) => {
|
|
9005
|
+
* on.github.star(async ({ payload }) => {
|
|
9006
|
+
* // ...
|
|
9007
|
+
* });
|
|
9008
|
+
* }),
|
|
9009
|
+
* });
|
|
9010
|
+
* ```
|
|
7706
9011
|
*/
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
* Converts the toolset to an array of BaseTool objects.
|
|
7710
|
-
*/
|
|
7711
|
-
getTools: () => Tool<any>[];
|
|
7712
|
-
};
|
|
9012
|
+
declare function createTriggers(builder: (on: TriggerDsl) => void): VoltAgentTriggersConfig;
|
|
9013
|
+
|
|
7713
9014
|
/**
|
|
7714
|
-
*
|
|
9015
|
+
* In-Memory Storage Adapter for Memory V2
|
|
9016
|
+
* Stores conversations and messages in memory
|
|
7715
9017
|
*/
|
|
7716
|
-
type AnyToolConfig = Tool<any>;
|
|
7717
9018
|
|
|
7718
9019
|
/**
|
|
7719
|
-
*
|
|
7720
|
-
*
|
|
7721
|
-
* Internal implementation differs from original source.
|
|
9020
|
+
* In-Memory Storage Adapter
|
|
9021
|
+
* Simple implementation for testing and development
|
|
7722
9022
|
*/
|
|
7723
|
-
declare class
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
private
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
*/
|
|
7731
|
-
private transport;
|
|
7732
|
-
/**
|
|
7733
|
-
* Tracks the connection status to the server.
|
|
7734
|
-
*/
|
|
7735
|
-
private connected;
|
|
7736
|
-
/**
|
|
7737
|
-
* Maximum time allowed for requests in milliseconds.
|
|
7738
|
-
*/
|
|
7739
|
-
private readonly timeout;
|
|
7740
|
-
/**
|
|
7741
|
-
* Logger instance
|
|
7742
|
-
*/
|
|
7743
|
-
private logger;
|
|
7744
|
-
/**
|
|
7745
|
-
* Information identifying this client to the server.
|
|
7746
|
-
*/
|
|
7747
|
-
private readonly clientInfo;
|
|
7748
|
-
/**
|
|
7749
|
-
* Server configuration for fallback attempts.
|
|
7750
|
-
*/
|
|
7751
|
-
private readonly serverConfig;
|
|
9023
|
+
declare class InMemoryStorageAdapter implements StorageAdapter {
|
|
9024
|
+
private storage;
|
|
9025
|
+
private conversations;
|
|
9026
|
+
private users;
|
|
9027
|
+
private workflowStates;
|
|
9028
|
+
private workflowStatesByWorkflow;
|
|
9029
|
+
private conversationSteps;
|
|
7752
9030
|
/**
|
|
7753
|
-
*
|
|
9031
|
+
* Add a single message
|
|
7754
9032
|
*/
|
|
7755
|
-
|
|
9033
|
+
addMessage(message: UIMessage, userId: string, conversationId: string, _context?: OperationContext): Promise<void>;
|
|
7756
9034
|
/**
|
|
7757
|
-
*
|
|
9035
|
+
* Add multiple messages
|
|
7758
9036
|
*/
|
|
7759
|
-
|
|
9037
|
+
addMessages(messages: UIMessage[], userId: string, conversationId: string, context?: OperationContext): Promise<void>;
|
|
7760
9038
|
/**
|
|
7761
|
-
* Get
|
|
9039
|
+
* Get messages with optional filtering
|
|
7762
9040
|
*/
|
|
7763
|
-
|
|
9041
|
+
getMessages(userId: string, conversationId: string, options?: GetMessagesOptions, _context?: OperationContext): Promise<UIMessage[]>;
|
|
9042
|
+
saveConversationSteps(steps: ConversationStepRecord[]): Promise<void>;
|
|
9043
|
+
getConversationSteps(userId: string, conversationId: string, options?: GetConversationStepsOptions): Promise<ConversationStepRecord[]>;
|
|
7764
9044
|
/**
|
|
7765
|
-
*
|
|
7766
|
-
* @param config Configuration for the client, including server details and client identity.
|
|
9045
|
+
* Clear messages for a user
|
|
7767
9046
|
*/
|
|
7768
|
-
|
|
9047
|
+
clearMessages(userId: string, conversationId?: string, _context?: OperationContext): Promise<void>;
|
|
7769
9048
|
/**
|
|
7770
|
-
*
|
|
9049
|
+
* Create a new conversation
|
|
7771
9050
|
*/
|
|
7772
|
-
|
|
9051
|
+
createConversation(input: CreateConversationInput): Promise<Conversation>;
|
|
7773
9052
|
/**
|
|
7774
|
-
*
|
|
7775
|
-
* Idempotent: does nothing if already connected.
|
|
9053
|
+
* Get a conversation by ID
|
|
7776
9054
|
*/
|
|
7777
|
-
|
|
9055
|
+
getConversation(id: string): Promise<Conversation | null>;
|
|
7778
9056
|
/**
|
|
7779
|
-
*
|
|
7780
|
-
* @param originalError The error from the initial connection attempt.
|
|
9057
|
+
* Get conversations for a resource
|
|
7781
9058
|
*/
|
|
7782
|
-
|
|
9059
|
+
getConversations(resourceId: string): Promise<Conversation[]>;
|
|
7783
9060
|
/**
|
|
7784
|
-
*
|
|
7785
|
-
* Idempotent: does nothing if not connected.
|
|
9061
|
+
* Get conversations by user ID with query options
|
|
7786
9062
|
*/
|
|
7787
|
-
|
|
9063
|
+
getConversationsByUserId(userId: string, options?: Omit<ConversationQueryOptions, "userId">): Promise<Conversation[]>;
|
|
7788
9064
|
/**
|
|
7789
|
-
*
|
|
7790
|
-
* @returns A record mapping tool names to their definitions (schema, description).
|
|
9065
|
+
* Query conversations with advanced options
|
|
7791
9066
|
*/
|
|
7792
|
-
|
|
9067
|
+
queryConversations(options: ConversationQueryOptions): Promise<Conversation[]>;
|
|
7793
9068
|
/**
|
|
7794
|
-
*
|
|
7795
|
-
* These tools include an `execute` method for calling the remote tool.
|
|
7796
|
-
* @returns A record mapping namespaced tool names (`clientName_toolName`) to executable Tool objects.
|
|
9069
|
+
* Update a conversation
|
|
7797
9070
|
*/
|
|
7798
|
-
|
|
9071
|
+
updateConversation(id: string, updates: Partial<Omit<Conversation, "id" | "createdAt" | "updatedAt">>): Promise<Conversation>;
|
|
7799
9072
|
/**
|
|
7800
|
-
*
|
|
7801
|
-
* @param toolCall Details of the tool to call, including name and arguments.
|
|
7802
|
-
* @returns The result content returned by the tool.
|
|
9073
|
+
* Delete a conversation
|
|
7803
9074
|
*/
|
|
7804
|
-
|
|
9075
|
+
deleteConversation(id: string): Promise<void>;
|
|
7805
9076
|
/**
|
|
7806
|
-
*
|
|
7807
|
-
* @returns A promise resolving to an array of resource ID strings.
|
|
9077
|
+
* Get working memory content from metadata
|
|
7808
9078
|
*/
|
|
7809
|
-
|
|
9079
|
+
getWorkingMemory(params: {
|
|
9080
|
+
conversationId?: string;
|
|
9081
|
+
userId?: string;
|
|
9082
|
+
scope: WorkingMemoryScope;
|
|
9083
|
+
}): Promise<string | null>;
|
|
7810
9084
|
/**
|
|
7811
|
-
*
|
|
7812
|
-
* Attempts to connect if not currently connected.
|
|
7813
|
-
* @throws Error if connection attempt fails.
|
|
9085
|
+
* Set working memory content in metadata
|
|
7814
9086
|
*/
|
|
7815
|
-
|
|
9087
|
+
setWorkingMemory(params: {
|
|
9088
|
+
conversationId?: string;
|
|
9089
|
+
userId?: string;
|
|
9090
|
+
content: string;
|
|
9091
|
+
scope: WorkingMemoryScope;
|
|
9092
|
+
}): Promise<void>;
|
|
7816
9093
|
/**
|
|
7817
|
-
*
|
|
7818
|
-
* @param error The error encountered, can be of any type.
|
|
9094
|
+
* Delete working memory from metadata
|
|
7819
9095
|
*/
|
|
7820
|
-
|
|
9096
|
+
deleteWorkingMemory(params: {
|
|
9097
|
+
conversationId?: string;
|
|
9098
|
+
userId?: string;
|
|
9099
|
+
scope: WorkingMemoryScope;
|
|
9100
|
+
}): Promise<void>;
|
|
7821
9101
|
/**
|
|
7822
|
-
*
|
|
7823
|
-
* @param server The server configuration object.
|
|
7824
|
-
* @returns True if the configuration type is 'http', false otherwise.
|
|
9102
|
+
* Get workflow state by execution ID
|
|
7825
9103
|
*/
|
|
7826
|
-
|
|
9104
|
+
getWorkflowState(executionId: string): Promise<WorkflowStateEntry | null>;
|
|
7827
9105
|
/**
|
|
7828
|
-
*
|
|
7829
|
-
* @param server The server configuration object.
|
|
7830
|
-
* @returns True if the configuration type is 'sse', false otherwise.
|
|
9106
|
+
* Set workflow state
|
|
7831
9107
|
*/
|
|
7832
|
-
|
|
9108
|
+
setWorkflowState(executionId: string, state: WorkflowStateEntry): Promise<void>;
|
|
7833
9109
|
/**
|
|
7834
|
-
*
|
|
7835
|
-
* @param server The server configuration object.
|
|
7836
|
-
* @returns True if the configuration type is 'streamable-http', false otherwise.
|
|
9110
|
+
* Update workflow state
|
|
7837
9111
|
*/
|
|
7838
|
-
|
|
9112
|
+
updateWorkflowState(executionId: string, updates: Partial<WorkflowStateEntry>): Promise<void>;
|
|
7839
9113
|
/**
|
|
7840
|
-
*
|
|
7841
|
-
* @param server The server configuration object.
|
|
7842
|
-
* @returns True if the configuration type is 'stdio', false otherwise.
|
|
9114
|
+
* Get suspended workflow states for a workflow
|
|
7843
9115
|
*/
|
|
7844
|
-
|
|
9116
|
+
getSuspendedWorkflowStates(workflowId: string): Promise<WorkflowStateEntry[]>;
|
|
7845
9117
|
/**
|
|
7846
|
-
*
|
|
7847
|
-
* Uses the original `MCPClientEvents` for event types.
|
|
9118
|
+
* Get storage statistics
|
|
7848
9119
|
*/
|
|
7849
|
-
|
|
9120
|
+
getStats(): {
|
|
9121
|
+
totalConversations: number;
|
|
9122
|
+
totalUsers: number;
|
|
9123
|
+
totalMessages: number;
|
|
9124
|
+
};
|
|
9125
|
+
private getOrCreateUserSteps;
|
|
9126
|
+
private getOrCreateConversationSteps;
|
|
7850
9127
|
/**
|
|
7851
|
-
*
|
|
7852
|
-
* Uses the original `MCPClientEvents` for event types.
|
|
9128
|
+
* Clear all data
|
|
7853
9129
|
*/
|
|
7854
|
-
|
|
9130
|
+
clear(): void;
|
|
7855
9131
|
}
|
|
7856
9132
|
|
|
7857
9133
|
/**
|
|
7858
|
-
*
|
|
7859
|
-
*
|
|
7860
|
-
* NOTE: This version does NOT manage singleton instances automatically.
|
|
9134
|
+
* Lightweight in-memory vector database adapter
|
|
9135
|
+
* Suitable for development, testing, and small datasets (< 10k vectors)
|
|
7861
9136
|
*/
|
|
7862
|
-
declare class
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
9137
|
+
declare class InMemoryVectorAdapter implements VectorAdapter {
|
|
9138
|
+
private vectors;
|
|
9139
|
+
private dimensions;
|
|
9140
|
+
constructor();
|
|
9141
|
+
store(id: string, vector: number[], metadata?: Record<string, unknown>): Promise<void>;
|
|
9142
|
+
storeBatch(items: VectorItem[]): Promise<void>;
|
|
9143
|
+
search(queryVector: number[], options?: {
|
|
9144
|
+
limit?: number;
|
|
9145
|
+
filter?: Record<string, unknown>;
|
|
9146
|
+
threshold?: number;
|
|
9147
|
+
}): Promise<SearchResult[]>;
|
|
9148
|
+
delete(id: string): Promise<void>;
|
|
9149
|
+
deleteBatch(ids: string[]): Promise<void>;
|
|
9150
|
+
clear(): Promise<void>;
|
|
9151
|
+
count(): Promise<number>;
|
|
9152
|
+
get(id: string): Promise<VectorItem | null>;
|
|
7878
9153
|
/**
|
|
7879
|
-
*
|
|
9154
|
+
* Check if metadata matches the filter criteria
|
|
7880
9155
|
*/
|
|
7881
|
-
private
|
|
9156
|
+
private matchesFilter;
|
|
7882
9157
|
/**
|
|
7883
|
-
*
|
|
9158
|
+
* Get statistics about the vector store
|
|
7884
9159
|
*/
|
|
7885
|
-
|
|
9160
|
+
getStats(): Promise<{
|
|
9161
|
+
count: number;
|
|
9162
|
+
dimensions: number | null;
|
|
9163
|
+
memoryUsage: number;
|
|
9164
|
+
}>;
|
|
9165
|
+
}
|
|
9166
|
+
|
|
9167
|
+
/**
|
|
9168
|
+
* Embedding adapter interface for converting text to vectors
|
|
9169
|
+
*/
|
|
9170
|
+
interface EmbeddingAdapter {
|
|
7886
9171
|
/**
|
|
7887
|
-
*
|
|
7888
|
-
* @returns A flat array of all agent-ready tools.
|
|
9172
|
+
* Embed a single text string into a vector
|
|
7889
9173
|
*/
|
|
7890
|
-
|
|
9174
|
+
embed(text: string): Promise<number[]>;
|
|
7891
9175
|
/**
|
|
7892
|
-
*
|
|
7893
|
-
* @returns A flat record of all raw tools keyed by their namespaced name.
|
|
9176
|
+
* Embed multiple texts in a batch for efficiency
|
|
7894
9177
|
*/
|
|
7895
|
-
|
|
9178
|
+
embedBatch(texts: string[]): Promise<number[][]>;
|
|
7896
9179
|
/**
|
|
7897
|
-
*
|
|
7898
|
-
*
|
|
9180
|
+
* Get the dimensionality of the embeddings
|
|
9181
|
+
* Returns undefined if dimensions are not yet known
|
|
7899
9182
|
*/
|
|
7900
|
-
|
|
9183
|
+
getDimensions(): number | undefined;
|
|
7901
9184
|
/**
|
|
7902
|
-
*
|
|
7903
|
-
* @returns A record where keys are server names and values are records of raw tools.
|
|
9185
|
+
* Get the model name for debugging/logging
|
|
7904
9186
|
*/
|
|
7905
|
-
|
|
9187
|
+
getModelName(): string;
|
|
9188
|
+
}
|
|
9189
|
+
/**
|
|
9190
|
+
* Options for embedding adapter initialization
|
|
9191
|
+
*/
|
|
9192
|
+
interface EmbeddingOptions {
|
|
7906
9193
|
/**
|
|
7907
|
-
*
|
|
9194
|
+
* Maximum number of texts to process in a single batch
|
|
7908
9195
|
*/
|
|
7909
|
-
|
|
9196
|
+
maxBatchSize?: number;
|
|
7910
9197
|
/**
|
|
7911
|
-
*
|
|
9198
|
+
* Timeout for embedding operations in milliseconds
|
|
7912
9199
|
*/
|
|
7913
|
-
|
|
9200
|
+
timeout?: number;
|
|
7914
9201
|
/**
|
|
7915
|
-
*
|
|
7916
|
-
* Manages the local mcpClientsById cache.
|
|
9202
|
+
* Whether to normalize embeddings to unit vectors
|
|
7917
9203
|
*/
|
|
7918
|
-
|
|
9204
|
+
normalize?: boolean;
|
|
7919
9205
|
}
|
|
7920
9206
|
|
|
7921
9207
|
/**
|
|
7922
|
-
*
|
|
9208
|
+
* AI SDK Embedding Adapter
|
|
9209
|
+
* Wraps Vercel AI SDK embedding models for use with Memory V2
|
|
7923
9210
|
*/
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
unsubscribe?(params: unknown): Promise<void> | void;
|
|
7939
|
-
}
|
|
7940
|
-
interface MCPElicitationAdapter {
|
|
7941
|
-
sendRequest(request: unknown): Promise<unknown>;
|
|
9211
|
+
declare class AiSdkEmbeddingAdapter implements EmbeddingAdapter {
|
|
9212
|
+
private model;
|
|
9213
|
+
private dimensions;
|
|
9214
|
+
private modelName;
|
|
9215
|
+
private options;
|
|
9216
|
+
constructor(model: EmbeddingModel<string>, options?: EmbeddingOptions);
|
|
9217
|
+
embed(text: string): Promise<number[]>;
|
|
9218
|
+
embedBatch(texts: string[]): Promise<number[][]>;
|
|
9219
|
+
getDimensions(): number;
|
|
9220
|
+
getModelName(): string;
|
|
9221
|
+
/**
|
|
9222
|
+
* Normalize a vector to unit length
|
|
9223
|
+
*/
|
|
9224
|
+
private normalizeVector;
|
|
7942
9225
|
}
|
|
7943
9226
|
|
|
7944
9227
|
/**
|
|
7945
|
-
*
|
|
9228
|
+
* Defines the main category of a TimelineEvent.
|
|
7946
9229
|
*/
|
|
7947
|
-
|
|
7948
|
-
start(): Promise<{
|
|
7949
|
-
port: number;
|
|
7950
|
-
}>;
|
|
7951
|
-
stop(): Promise<void>;
|
|
7952
|
-
isRunning(): boolean;
|
|
7953
|
-
}
|
|
7954
|
-
type ServerlessRequestHandler = (req: Request, ...args: unknown[]) => Promise<Response>;
|
|
7955
|
-
type CloudflareFetchHandler = (req: Request, env: Record<string, unknown>, ctx: unknown) => Promise<Response>;
|
|
7956
|
-
interface IServerlessProvider {
|
|
7957
|
-
handleRequest(request: Request): Promise<Response>;
|
|
7958
|
-
toCloudflareWorker(): {
|
|
7959
|
-
fetch: CloudflareFetchHandler;
|
|
7960
|
-
};
|
|
7961
|
-
toVercelEdge(): ServerlessRequestHandler;
|
|
7962
|
-
toDeno(): ServerlessRequestHandler;
|
|
7963
|
-
auto(): {
|
|
7964
|
-
fetch: CloudflareFetchHandler;
|
|
7965
|
-
} | ServerlessRequestHandler;
|
|
7966
|
-
}
|
|
7967
|
-
type ServerlessProviderFactory = (deps: ServerProviderDeps) => IServerlessProvider;
|
|
9230
|
+
type TimelineEventCoreType = "agent" | "tool" | "memory" | "retriever" | "workflow" | "workflow-step";
|
|
7968
9231
|
/**
|
|
7969
|
-
*
|
|
9232
|
+
* Defines the operational status of a TimelineEvent.
|
|
9233
|
+
* 'idle' is added for consistency with frontend initial states.
|
|
9234
|
+
* 'suspended' is added for workflow suspension state.
|
|
7970
9235
|
*/
|
|
7971
|
-
|
|
7972
|
-
agentRegistry: {
|
|
7973
|
-
getAgent(id: string): Agent | undefined;
|
|
7974
|
-
getAllAgents(): Agent[];
|
|
7975
|
-
getAgentCount(): number;
|
|
7976
|
-
removeAgent(id: string): boolean;
|
|
7977
|
-
registerAgent(agent: Agent): void;
|
|
7978
|
-
getGlobalVoltOpsClient(): VoltOpsClient | undefined;
|
|
7979
|
-
getGlobalLogger(): Logger | undefined;
|
|
7980
|
-
};
|
|
7981
|
-
workflowRegistry: {
|
|
7982
|
-
getWorkflow(id: string): RegisteredWorkflow | undefined;
|
|
7983
|
-
getWorkflowsForApi(): unknown[];
|
|
7984
|
-
getWorkflowDetailForApi(id: string): unknown;
|
|
7985
|
-
getWorkflowCount(): number;
|
|
7986
|
-
on(event: string, handler: (...args: any[]) => void): void;
|
|
7987
|
-
off(event: string, handler: (...args: any[]) => void): void;
|
|
7988
|
-
activeExecutions: Map<string, WorkflowSuspendController>;
|
|
7989
|
-
resumeSuspendedWorkflow(workflowId: string, executionId: string, resumeData?: any, stepId?: string): Promise<any>;
|
|
7990
|
-
};
|
|
7991
|
-
logger?: Logger;
|
|
7992
|
-
voltOpsClient?: VoltOpsClient;
|
|
7993
|
-
observability?: VoltAgentObservability;
|
|
7994
|
-
mcp?: {
|
|
7995
|
-
registry: MCPServerRegistry;
|
|
7996
|
-
};
|
|
7997
|
-
a2a?: {
|
|
7998
|
-
registry: A2AServerRegistry;
|
|
7999
|
-
};
|
|
8000
|
-
ensureEnvironment?: (env?: Record<string, unknown>) => void;
|
|
8001
|
-
}
|
|
9236
|
+
type TimelineEventCoreStatus = "idle" | "running" | "completed" | "error" | "suspended";
|
|
8002
9237
|
/**
|
|
8003
|
-
*
|
|
9238
|
+
* Defines the severity level of a TimelineEvent.
|
|
8004
9239
|
*/
|
|
8005
|
-
type
|
|
9240
|
+
type TimelineEventCoreLevel = "DEBUG" | "INFO" | "WARNING" | "ERROR" | "CRITICAL";
|
|
8006
9241
|
/**
|
|
8007
|
-
*
|
|
9242
|
+
* Usage information for tracking resource consumption
|
|
8008
9243
|
*/
|
|
8009
|
-
interface
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
id: string;
|
|
8022
|
-
name: string;
|
|
8023
|
-
purpose: string;
|
|
8024
|
-
stepsCount: number;
|
|
8025
|
-
status: "idle" | "running" | "completed" | "error";
|
|
8026
|
-
steps: Array<{
|
|
8027
|
-
id: string;
|
|
8028
|
-
name: string;
|
|
8029
|
-
purpose: string | null;
|
|
8030
|
-
type: string;
|
|
8031
|
-
agentId?: string;
|
|
8032
|
-
agentName?: string;
|
|
8033
|
-
}>;
|
|
8034
|
-
}
|
|
8035
|
-
interface ServerApiResponse<T> {
|
|
8036
|
-
success: boolean;
|
|
8037
|
-
data?: T;
|
|
8038
|
-
error?: string;
|
|
9244
|
+
interface Usage {
|
|
9245
|
+
promptTokens?: number;
|
|
9246
|
+
completionTokens?: number;
|
|
9247
|
+
totalTokens?: number;
|
|
9248
|
+
input?: number;
|
|
9249
|
+
output?: number;
|
|
9250
|
+
total?: number;
|
|
9251
|
+
unit?: "TOKENS" | "CHARACTERS" | "MILLISECONDS" | "SECONDS" | "IMAGES";
|
|
9252
|
+
inputCost?: number;
|
|
9253
|
+
outputCost?: number;
|
|
9254
|
+
totalCost?: number;
|
|
9255
|
+
[key: string]: unknown;
|
|
8039
9256
|
}
|
|
8040
9257
|
/**
|
|
8041
|
-
*
|
|
9258
|
+
* Base metadata interface with common fields for all timeline events
|
|
8042
9259
|
*/
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
* Optional workflows to register with VoltAgent
|
|
8050
|
-
* Can be either Workflow instances or WorkflowChain instances
|
|
8051
|
-
*/
|
|
8052
|
-
workflows?: Record<string, Workflow<DangerouslyAllowAny, DangerouslyAllowAny, DangerouslyAllowAny, DangerouslyAllowAny> | WorkflowChain<DangerouslyAllowAny, DangerouslyAllowAny, DangerouslyAllowAny, DangerouslyAllowAny, DangerouslyAllowAny>>;
|
|
8053
|
-
/**
|
|
8054
|
-
* Server provider factory function
|
|
8055
|
-
* Example: honoServer({ port: 3141, enableSwaggerUI: true })
|
|
8056
|
-
*/
|
|
8057
|
-
server?: ServerProviderFactory;
|
|
8058
|
-
/**
|
|
8059
|
-
* Serverless provider factory function for fetch-based runtimes
|
|
8060
|
-
* Example: serverlessHono({ corsOrigin: '*' })
|
|
8061
|
-
*/
|
|
8062
|
-
serverless?: ServerlessProviderFactory;
|
|
8063
|
-
/**
|
|
8064
|
-
* Unified VoltOps client for telemetry and prompt management
|
|
8065
|
-
* Replaces the old telemetryExporter approach with a comprehensive solution.
|
|
8066
|
-
*/
|
|
8067
|
-
voltOpsClient?: VoltOpsClient;
|
|
8068
|
-
/**
|
|
8069
|
-
* Observability instance for OpenTelemetry-compliant tracing
|
|
8070
|
-
* Allows sharing the same observability instance between VoltAgent and Agents
|
|
8071
|
-
* If not provided, creates a default instance with in-memory storage
|
|
8072
|
-
*/
|
|
8073
|
-
observability?: VoltAgentObservability;
|
|
8074
|
-
/**
|
|
8075
|
-
* Global logger instance to use across all agents and workflows
|
|
8076
|
-
* If not provided, a default logger will be created
|
|
8077
|
-
*/
|
|
8078
|
-
logger?: Logger;
|
|
8079
|
-
/**
|
|
8080
|
-
* Optional collection of MCP servers to register alongside the primary server.
|
|
8081
|
-
* Enables exposing multiple VoltAgent surfaces through separate MCP endpoints.
|
|
8082
|
-
*/
|
|
8083
|
-
mcpServers?: Record<string, MCPServerLike | MCPServerFactory>;
|
|
8084
|
-
/**
|
|
8085
|
-
* Optional collection of A2A servers to expose agents via the Agent-to-Agent protocol.
|
|
8086
|
-
*/
|
|
8087
|
-
a2aServers?: Record<string, A2AServerLike | A2AServerFactory>;
|
|
8088
|
-
/**
|
|
8089
|
-
* @deprecated Use `server.port` instead
|
|
8090
|
-
*/
|
|
8091
|
-
port?: number;
|
|
8092
|
-
/**
|
|
8093
|
-
* @deprecated Use `server.autoStart` instead
|
|
8094
|
-
*/
|
|
8095
|
-
autoStart?: boolean;
|
|
8096
|
-
checkDependencies?: boolean;
|
|
8097
|
-
/**
|
|
8098
|
-
* @deprecated Server configuration is now done through server provider
|
|
8099
|
-
*/
|
|
8100
|
-
customEndpoints?: unknown[];
|
|
8101
|
-
/**
|
|
8102
|
-
* @deprecated Server configuration is now done through server provider
|
|
8103
|
-
*/
|
|
8104
|
-
enableSwaggerUI?: boolean;
|
|
8105
|
-
};
|
|
9260
|
+
interface BaseEventMetadata {
|
|
9261
|
+
displayName?: string;
|
|
9262
|
+
id: string;
|
|
9263
|
+
agentId?: string;
|
|
9264
|
+
context?: Record<string, unknown>;
|
|
9265
|
+
}
|
|
8106
9266
|
|
|
8107
9267
|
/**
|
|
8108
9268
|
* Prompt management utilities for agent prompt tuning
|
|
@@ -8239,36 +9399,65 @@ declare function isTextContent(content: MessageContent): content is string;
|
|
|
8239
9399
|
*/
|
|
8240
9400
|
declare function isStructuredContent(content: MessageContent): content is Array<any>;
|
|
8241
9401
|
/**
|
|
8242
|
-
* Check if content has any text parts
|
|
9402
|
+
* Check if content or message has any text parts
|
|
9403
|
+
* @param input - MessageContent or UIMessage
|
|
9404
|
+
* @returns True if has text parts
|
|
8243
9405
|
*/
|
|
8244
9406
|
declare function hasTextPart(content: MessageContent): boolean;
|
|
9407
|
+
declare function hasTextPart(message: UIMessage): boolean;
|
|
8245
9408
|
/**
|
|
8246
|
-
* Check if content has any image parts
|
|
9409
|
+
* Check if content or message has any image parts
|
|
9410
|
+
* @param input - MessageContent or UIMessage
|
|
9411
|
+
* @returns True if has image parts
|
|
8247
9412
|
*/
|
|
8248
9413
|
declare function hasImagePart(content: MessageContent): boolean;
|
|
9414
|
+
declare function hasImagePart(message: UIMessage): boolean;
|
|
8249
9415
|
/**
|
|
8250
|
-
* Check if content has any file parts
|
|
9416
|
+
* Check if content or message has any file parts
|
|
9417
|
+
* @param input - MessageContent or UIMessage
|
|
9418
|
+
* @returns True if has file parts
|
|
8251
9419
|
*/
|
|
8252
9420
|
declare function hasFilePart(content: MessageContent): boolean;
|
|
9421
|
+
declare function hasFilePart(message: UIMessage): boolean;
|
|
8253
9422
|
/**
|
|
8254
|
-
* Extract text from message content
|
|
9423
|
+
* Extract text from message content or UIMessage
|
|
9424
|
+
* @param input - MessageContent (from ModelMessage.content) or UIMessage object
|
|
9425
|
+
* @returns All text content joined together
|
|
9426
|
+
* @example
|
|
9427
|
+
* // From MessageContent
|
|
9428
|
+
* const content = [{ type: "text", text: "Hello" }];
|
|
9429
|
+
* extractText(content); // "Hello"
|
|
9430
|
+
*
|
|
9431
|
+
* // From UIMessage
|
|
9432
|
+
* const message = { id: "1", role: "user", parts: [{ type: "text", text: "Hi" }] };
|
|
9433
|
+
* extractText(message); // "Hi"
|
|
8255
9434
|
*/
|
|
8256
9435
|
declare function extractText(content: MessageContent): string;
|
|
9436
|
+
declare function extractText(message: UIMessage): string;
|
|
8257
9437
|
/**
|
|
8258
|
-
* Extract all text parts from structured content
|
|
9438
|
+
* Extract all text parts from structured content or UIMessage
|
|
9439
|
+
* @param input - MessageContent or UIMessage
|
|
9440
|
+
* @returns Array of text parts
|
|
8259
9441
|
*/
|
|
8260
9442
|
declare function extractTextParts(content: MessageContent): Array<{
|
|
8261
9443
|
type: "text";
|
|
8262
9444
|
text: string;
|
|
8263
9445
|
}>;
|
|
9446
|
+
declare function extractTextParts(message: UIMessage): TextUIPart[];
|
|
8264
9447
|
/**
|
|
8265
|
-
* Extract image parts from message content
|
|
9448
|
+
* Extract image parts from message content or UIMessage
|
|
9449
|
+
* @param input - MessageContent or UIMessage
|
|
9450
|
+
* @returns Array of image parts (FileUIPart for UIMessage)
|
|
8266
9451
|
*/
|
|
8267
9452
|
declare function extractImageParts(content: MessageContent): Array<any>;
|
|
9453
|
+
declare function extractImageParts(message: UIMessage): FileUIPart[];
|
|
8268
9454
|
/**
|
|
8269
|
-
* Extract file parts from message content
|
|
9455
|
+
* Extract file parts from message content or UIMessage
|
|
9456
|
+
* @param input - MessageContent or UIMessage
|
|
9457
|
+
* @returns Array of file parts
|
|
8270
9458
|
*/
|
|
8271
9459
|
declare function extractFileParts(content: MessageContent): Array<any>;
|
|
9460
|
+
declare function extractFileParts(message: UIMessage): FileUIPart[];
|
|
8272
9461
|
/**
|
|
8273
9462
|
* Transform text content in a message
|
|
8274
9463
|
*/
|
|
@@ -8344,11 +9533,15 @@ declare function appendToMessage(message: UIMessage, suffix: string): UIMessage;
|
|
|
8344
9533
|
*/
|
|
8345
9534
|
declare function hasContent(message: UIMessage): boolean;
|
|
8346
9535
|
/**
|
|
8347
|
-
* Get content length (text characters or
|
|
9536
|
+
* Get content length (text characters, array items, or UIMessage parts count)
|
|
9537
|
+
* @param input - MessageContent or UIMessage
|
|
9538
|
+
* @returns Length/count of content
|
|
8348
9539
|
*/
|
|
8349
9540
|
declare function getContentLength(content: MessageContent): number;
|
|
9541
|
+
declare function getContentLength(message: UIMessage): number;
|
|
8350
9542
|
/**
|
|
8351
9543
|
* Combined message helpers object for easy importing
|
|
9544
|
+
* All functions now support both MessageContent and UIMessage formats
|
|
8352
9545
|
*/
|
|
8353
9546
|
declare const messageHelpers: {
|
|
8354
9547
|
isTextContent: typeof isTextContent;
|
|
@@ -8678,6 +9871,8 @@ declare class VoltAgent {
|
|
|
8678
9871
|
private readonly a2aServers;
|
|
8679
9872
|
private readonly a2aServerRegistry;
|
|
8680
9873
|
private readonly ensureEnvironmentBinding;
|
|
9874
|
+
private readonly triggerRegistry;
|
|
9875
|
+
private readonly agentRefs;
|
|
8681
9876
|
constructor(options: VoltAgentOptions);
|
|
8682
9877
|
serverless(): IServerlessProvider;
|
|
8683
9878
|
private ensureEnvironment;
|
|
@@ -8695,6 +9890,8 @@ declare class VoltAgent {
|
|
|
8695
9890
|
/**
|
|
8696
9891
|
* Register an agent
|
|
8697
9892
|
*/
|
|
9893
|
+
registerTrigger(name: string, config: VoltAgentTriggerConfig): void;
|
|
9894
|
+
registerTriggers(triggers?: VoltAgentTriggersConfig): void;
|
|
8698
9895
|
registerAgent(agent: Agent): void;
|
|
8699
9896
|
/**
|
|
8700
9897
|
* Register multiple agents
|
|
@@ -8775,4 +9972,4 @@ declare class VoltAgent {
|
|
|
8775
9972
|
*/
|
|
8776
9973
|
declare function convertUsage(usage: LanguageModelUsage | undefined): UsageInfo | undefined;
|
|
8777
9974
|
|
|
8778
|
-
export { A2AServerRegistry, AbortError, Agent, type AgentEvalConfig, type AgentEvalContext, type AgentEvalOperationType, type AgentEvalPayload, type AgentEvalResult, type AgentEvalSamplingPolicy, type AgentEvalScorerConfig, type AgentEvalScorerFactory, type AgentEvalScorerReference, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnHandoff, type AgentHookOnHandoffComplete, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentOptions, AgentRegistry, type AgentResponse, type AgentScorerState, type AgentStatus, type AgentTool, AiSdkEmbeddingAdapter, type AllowedVariableValue, type ApiToolInfo, type BaseEventMetadata, type BaseGenerationOptions, type BaseLLMOptions, type BaseMessage, BaseRetriever, type BaseTool, type BaseToolCall, type BuildScorerOptions, type BuildScorerRunArgs, type BuildScorerRunResult, type BuilderAnalyzeContext, type BuilderPrepareContext, type BuilderReasonContext, type BuilderScoreContext, type CachedPrompt, type ChatMessage, ClientHTTPError, type ClientSideToolResult, type CloudflareFetchHandler, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type ConversationStepRecord, type ConversationStepType, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateInputGuardrailOptions, type CreateOutputGuardrailOptions, type CreateReasoningToolsOptions, type CreateScorerOptions, DEFAULT_INSTRUCTIONS, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, type EmbeddingAdapter$1 as EmbeddingAdapter, EmbeddingAdapterNotConfiguredError, EmbeddingError, type ExtractVariableNames, FEW_SHOT_EXAMPLES, type GenerateObjectOptions, type GenerateObjectSubAgentConfig, type GenerateReasonResult, type GenerateScoreResult, type GenerateScoreStep, type GenerateTextOptions, type GenerateTextSubAgentConfig, type GetConversationStepsOptions, type GetMessagesOptions, type GuardrailAction, type GuardrailContext, type GuardrailDefinition, type GuardrailFunction, type GuardrailSeverity, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, InMemoryStorageAdapter$1 as InMemoryObservabilityAdapter, InMemoryStorageAdapter, InMemoryVectorAdapter, type InferGenerateObjectResponse, type InferGenerateTextResponse, type InferMessage, type InferModel, type InferProviderParams, type InferStreamResponse, type InferTool, type InputGuardrail, type InputGuardrailArgs, type InputGuardrailResult, type LLMProvider, LazyRemoteExportProcessor, type LocalScorerDefinition, type LocalScorerExecutionResult, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, MCPConfiguration, type MCPElicitationAdapter, type MCPLoggingAdapter, type MCPPromptsAdapter, type MCPResourcesAdapter, MCPServerRegistry, type ManagedMemoryAddMessageInput, type ManagedMemoryAddMessagesInput, type ManagedMemoryClearMessagesInput, type ManagedMemoryConnectionInfo, type ManagedMemoryConversationsClient, type ManagedMemoryCredentialCreateResult, type ManagedMemoryCredentialListResult, type ManagedMemoryCredentialSummary, type ManagedMemoryDatabaseSummary, type ManagedMemoryGetMessagesInput, type ManagedMemoryMessagesClient, type ManagedMemorySetWorkingMemoryInput, type ManagedMemoryStatus, type ManagedMemoryUpdateConversationInput, type ManagedMemoryVoltOpsClient, type ManagedMemoryWorkflowStateUpdateInput, type ManagedMemoryWorkflowStatesClient, type ManagedMemoryWorkingMemoryClient, type ManagedMemoryWorkingMemoryInput, Memory, type MemoryConfig, type MemoryOptions, type MemoryStorageMetadata, type MemoryUpdateMode, Memory as MemoryV2, MemoryV2Error, type MessageContent, MessageContentBuilder, type MessageRole, type ModelToolCall, NextAction, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnHandoffCompleteHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolStartHookArgs, type OperationContext, type OutputGuardrail, type OutputGuardrailArgs, type OutputGuardrailResult, type PackageUpdateInfo, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ProviderTool, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type RetrieveOptions, type Retriever, type RetrieverOptions, type RunLocalScorersArgs, type RunLocalScorersResult, type SamplingMetadata, type SamplingPolicy, type ScorerBuilder, type ScorerContext, type ScorerLifecycleScope, type ScorerPipelineContext, type ScorerReasonContext, type ScorerResult, type SearchOptions, type SearchResult, type ServerAgentResponse, type ServerApiResponse, type ServerProviderDeps, type ServerProviderFactory, type ServerWorkflowResponse, type ServerlessProviderFactory, type ServerlessRemoteEndpointConfig, type ServerlessRemoteExportConfig, type ServerlessRequestHandler, ServerlessVoltAgentObservability, type SpanAttributes, type SpanEvent, type SpanFilterConfig, SpanFilterProcessor, SpanKind, type SpanLink, type SpanStatus, SpanStatusCode, type SpanTreeNode, type StepChunkCallback, type StepFinishCallback, type StepWithContent, type StopWhen, type StorageAdapter, StorageError, StorageLogProcessor, type StoredUIMessage, type StreamObjectFinishResult, type StreamObjectOnFinishCallback, type StreamObjectOptions, type StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, Tool, type ToolCall, type ToolContext, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, ToolManager, type ToolOptions, type ToolResultOutput, type ToolSchema, type ToolStatus, type ToolStatusInfo, type ToolWithNodeId, type Toolkit, type Usage, type UsageInfo, type VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, type VoltAgentStreamTextResult, type VoltAgentTextStreamPart, type VoltOpsActionExecutionResult, type VoltOpsActionsApi, VoltOpsActionsClient, type VoltOpsActionsTransport, type VoltOpsAirtableCreateRecordParams, type VoltOpsAirtableDeleteRecordParams, type VoltOpsAirtableGetRecordParams, type VoltOpsAirtableListRecordsParams, type VoltOpsAirtableUpdateRecordParams, type VoltOpsAppendEvalRunResultPayload, type VoltOpsAppendEvalRunResultsRequest, VoltOpsClient, type VoltOpsClientOptions, type VoltOpsCompleteEvalRunRequest, type VoltOpsCreateEvalRunRequest, type VoltOpsCreateScorerRequest, type VoltOpsEvalResultStatus, type VoltOpsEvalRunCompletionSummaryPayload, type VoltOpsEvalRunErrorPayload, type VoltOpsEvalRunResultLiveMetadata, type VoltOpsEvalRunResultScorePayload, type VoltOpsEvalRunStatus, type VoltOpsEvalRunSummary, VoltOpsPromptApiClient, type VoltOpsPromptManager, VoltOpsPromptManagerImpl, type VoltOpsScorerSummary, type VoltOpsSlackDeleteMessageParams, type VoltOpsSlackPostMessageParams, type VoltOpsSlackSearchMessagesParams, type VoltOpsTerminalEvalRunStatus, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type WeightedBlendComponent, type WeightedBlendOptions, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, WorkflowRegistry, type WorkflowStateEntry, type WorkflowStats, type WorkflowStepContext, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, addTimestampToMessage, andAgent, andAll, andRace, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSamplingMetadata, buildScorer, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createDefaultInputSafetyGuardrails, createDefaultPIIGuardrails, createDefaultSafetyGuardrails, createEmailRedactorGuardrail, createHTMLSanitizerInputGuardrail, createHooks, createInputGuardrail, createInputLengthGuardrail, createMaxLengthGuardrail, createNodeId, createOutputGuardrail, createPIIInputGuardrail, createPhoneNumberGuardrail, createProfanityGuardrail, createProfanityInputGuardrail, createPrompt, createPromptInjectionGuardrail, createReasoningTools, createRetrieverTool, createScorer, createSensitiveNumberGuardrail, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolkit, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, VoltAgent as default, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getNodeTypeFromNodeId, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, isNodeRuntime, isServerlessRuntime, isStructuredContent, isTextContent, isVoltAgentError, mapMessageContent, messageHelpers, normalizeContent, normalizeScorerResult, normalizeToArray, prependToMessage, readableLogRecordToObservabilityLog, readableSpanToObservabilitySpan, runLocalScorers, safeJsonParse, serializeValueForDebug, shouldSample, tool, transformTextContent, updateAllPackages, updateSinglePackage, weightedBlend, zodSchemaToJsonUI };
|
|
9975
|
+
export { A2AServerRegistry, AbortError, Agent, type AgentEvalConfig, type AgentEvalContext, type AgentEvalOperationType, type AgentEvalPayload, type AgentEvalResult, type AgentEvalSamplingPolicy, type AgentEvalScorerConfig, type AgentEvalScorerFactory, type AgentEvalScorerReference, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnHandoff, type AgentHookOnHandoffComplete, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentOptions, AgentRegistry, type AgentResponse, type AgentScorerState, type AgentStatus, type AgentTool, AiSdkEmbeddingAdapter, type AllowedVariableValue, type ApiToolInfo, type BaseEventMetadata, type BaseGenerationOptions, type BaseLLMOptions, type BaseMessage, BaseRetriever, type BaseTool, type BaseToolCall, type BuildScorerOptions, type BuildScorerRunArgs, type BuildScorerRunResult, type BuilderAnalyzeContext, type BuilderPrepareContext, type BuilderReasonContext, type BuilderScoreContext, type CachedPrompt, type ChatMessage, ClientHTTPError, type ClientSideToolResult, type CloudflareFetchHandler, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type ConversationStepRecord, type ConversationStepType, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateInputGuardrailOptions, type CreateOutputGuardrailOptions, type CreateReasoningToolsOptions, type CreateScorerOptions, DEFAULT_INSTRUCTIONS, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, type EmbeddingAdapter$1 as EmbeddingAdapter, EmbeddingAdapterNotConfiguredError, EmbeddingError, type ExtractVariableNames, FEW_SHOT_EXAMPLES, type GenerateObjectOptions, type GenerateObjectSubAgentConfig, type GenerateReasonResult, type GenerateScoreResult, type GenerateScoreStep, type GenerateTextOptions, type GenerateTextSubAgentConfig, type GetConversationStepsOptions, type GetMessagesOptions, type GuardrailAction, type GuardrailContext, type GuardrailDefinition, type GuardrailFunction, type GuardrailSeverity, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, InMemoryStorageAdapter$1 as InMemoryObservabilityAdapter, InMemoryStorageAdapter, InMemoryVectorAdapter, type InferGenerateObjectResponse, type InferGenerateTextResponse, type InferMessage, type InferModel, type InferProviderParams, type InferStreamResponse, type InferTool, type InputGuardrail, type InputGuardrailArgs, type InputGuardrailResult, type LLMProvider, LazyRemoteExportProcessor, type LocalScorerDefinition, type LocalScorerExecutionResult, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, MCPConfiguration, type MCPElicitationAdapter, type MCPLoggingAdapter, type MCPPromptsAdapter, type MCPResourcesAdapter, MCPServerRegistry, type ManagedMemoryAddMessageInput, type ManagedMemoryAddMessagesInput, type ManagedMemoryClearMessagesInput, type ManagedMemoryConnectionInfo, type ManagedMemoryConversationsClient, type ManagedMemoryCredentialCreateResult, type ManagedMemoryCredentialListResult, type ManagedMemoryCredentialSummary, type ManagedMemoryDatabaseSummary, type ManagedMemoryGetMessagesInput, type ManagedMemoryMessagesClient, type ManagedMemorySetWorkingMemoryInput, type ManagedMemoryStatus, type ManagedMemoryUpdateConversationInput, type ManagedMemoryVoltOpsClient, type ManagedMemoryWorkflowStateUpdateInput, type ManagedMemoryWorkflowStatesClient, type ManagedMemoryWorkingMemoryClient, type ManagedMemoryWorkingMemoryInput, Memory, type MemoryConfig, type MemoryOptions, type MemoryStorageMetadata, type MemoryUpdateMode, Memory as MemoryV2, MemoryV2Error, type MessageContent, MessageContentBuilder, type MessageRole, type ModelToolCall, NextAction, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnHandoffCompleteHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolStartHookArgs, type OperationContext, type OutputGuardrail, type OutputGuardrailArgs, type OutputGuardrailResult, type PackageUpdateInfo, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ProviderTool, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredTrigger, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type RetrieveOptions, type Retriever, type RetrieverOptions, type RunLocalScorersArgs, type RunLocalScorersResult, type SamplingMetadata, type SamplingPolicy, type ScorerBuilder, type ScorerContext, type ScorerLifecycleScope, type ScorerPipelineContext, type ScorerReasonContext, type ScorerResult, type SearchOptions, type SearchResult, type ServerAgentResponse, type ServerApiResponse, type ServerProviderDeps, type ServerProviderFactory, type ServerWorkflowResponse, type ServerlessProviderFactory, type ServerlessRemoteEndpointConfig, type ServerlessRemoteExportConfig, type ServerlessRequestHandler, ServerlessVoltAgentObservability, type SpanAttributes, type SpanEvent, type SpanFilterConfig, SpanFilterProcessor, SpanKind, type SpanLink, type SpanStatus, SpanStatusCode, type SpanTreeNode, type StepChunkCallback, type StepFinishCallback, type StepWithContent, type StopWhen, type StorageAdapter, StorageError, StorageLogProcessor, type StoredUIMessage, type StreamObjectFinishResult, type StreamObjectOnFinishCallback, type StreamObjectOptions, type StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, TRIGGER_CONTEXT_KEY, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, Tool, type ToolCall, type ToolContext, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, ToolManager, type ToolOptions, type ToolResultOutput, type ToolSchema, type ToolStatus, type ToolStatusInfo, type ToolWithNodeId, type Toolkit, type TriggerHandler, type TriggerHandlerBody, type TriggerHandlerContext, type TriggerHandlerResponse, type TriggerHandlerResult, type TriggerHandlerReturn, type TriggerHttpMethod, TriggerRegistry, type Usage, type UsageInfo, type VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, type VoltAgentStreamTextResult, type VoltAgentTextStreamPart, type VoltAgentTriggerConfig, type VoltAgentTriggersConfig, type VoltOpsActionExecutionResult, type VoltOpsActionsApi, VoltOpsActionsClient, type VoltOpsActionsTransport, type VoltOpsAirtableCreateRecordParams, type VoltOpsAirtableCredential, type VoltOpsAirtableDeleteRecordParams, type VoltOpsAirtableGetRecordParams, type VoltOpsAirtableListRecordsParams, type VoltOpsAirtableUpdateRecordParams, type VoltOpsAppendEvalRunResultPayload, type VoltOpsAppendEvalRunResultsRequest, VoltOpsClient, type VoltOpsClientOptions, type VoltOpsCompleteEvalRunRequest, type VoltOpsCreateEvalRunRequest, type VoltOpsCreateScorerRequest, type VoltOpsDiscordChannelMessageParams, type VoltOpsDiscordChannelType, type VoltOpsDiscordConfig, type VoltOpsDiscordCreateChannelParams, type VoltOpsDiscordCredential, type VoltOpsDiscordDeleteChannelParams, type VoltOpsDiscordGetChannelParams, type VoltOpsDiscordListChannelsParams, type VoltOpsDiscordListMembersParams, type VoltOpsDiscordListMessagesParams, type VoltOpsDiscordMemberRoleParams, type VoltOpsDiscordReactionParams, type VoltOpsDiscordSendMessageParams, type VoltOpsDiscordSendWebhookMessageParams, type VoltOpsDiscordUpdateChannelParams, type VoltOpsEvalResultStatus, type VoltOpsEvalRunCompletionSummaryPayload, type VoltOpsEvalRunErrorPayload, type VoltOpsEvalRunResultLiveMetadata, type VoltOpsEvalRunResultScorePayload, type VoltOpsEvalRunStatus, type VoltOpsEvalRunSummary, VoltOpsPromptApiClient, type VoltOpsPromptManager, VoltOpsPromptManagerImpl, type VoltOpsScorerSummary, type VoltOpsSlackCredential, type VoltOpsSlackDeleteMessageParams, type VoltOpsSlackPostMessageParams, type VoltOpsSlackSearchMessagesParams, type VoltOpsTerminalEvalRunStatus, type VoltOpsTriggerDefinition, VoltOpsTriggerDefinitions, type VoltOpsTriggerEnvelope, type VoltOpsTriggerGroupMap, type VoltOpsTriggerName, VoltOpsTriggerNames, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type WeightedBlendComponent, type WeightedBlendOptions, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, WorkflowRegistry, type WorkflowStateEntry, type WorkflowStats, type WorkflowStepContext, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, addTimestampToMessage, andAgent, andAll, andRace, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSamplingMetadata, buildScorer, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createDefaultInputSafetyGuardrails, createDefaultPIIGuardrails, createDefaultSafetyGuardrails, createEmailRedactorGuardrail, createHTMLSanitizerInputGuardrail, createHooks, createInputGuardrail, createInputLengthGuardrail, createMaxLengthGuardrail, createNodeId, createOutputGuardrail, createPIIInputGuardrail, createPhoneNumberGuardrail, createProfanityGuardrail, createProfanityInputGuardrail, createPrompt, createPromptInjectionGuardrail, createReasoningTools, createRetrieverTool, createScorer, createSensitiveNumberGuardrail, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolkit, createTriggers, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, VoltAgent as default, defineVoltOpsTrigger, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getNodeTypeFromNodeId, getVoltOpsTriggerDefinition, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, isNodeRuntime, isServerlessRuntime, isStructuredContent, isTextContent, isVoltAgentError, mapMessageContent, messageHelpers, normalizeContent, normalizeScorerResult, normalizeToArray, prependToMessage, readableLogRecordToObservabilityLog, readableSpanToObservabilitySpan, runLocalScorers, safeJsonParse, serializeValueForDebug, shouldSample, tool, transformTextContent, updateAllPackages, updateSinglePackage, weightedBlend, zodSchemaToJsonUI };
|