@voltagent/core 2.3.4 → 2.3.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 CHANGED
@@ -9,11 +9,11 @@ export { ROOT_CONTEXT, Span, SpanOptions, Tracer, context, propagation, trace }
9
9
  import { Logger, LogFn, LogBuffer } from '@voltagent/internal';
10
10
  import { AsyncIterableStream } from '@voltagent/internal/utils';
11
11
  export { AsyncIterableStream, createAsyncIterableStream } from '@voltagent/internal/utils';
12
+ import { DangerouslyAllowAny, PlainObject } from '@voltagent/internal/types';
13
+ import * as TF from 'type-fest';
12
14
  import { LogRecordProcessor, LoggerProvider, ReadableLogRecord, SdkLogRecord } from '@opentelemetry/sdk-logs';
13
15
  import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
14
16
  import { SpanProcessor, BasicTracerProvider, ReadableSpan, Span as Span$1 } from '@opentelemetry/sdk-trace-base';
15
- import { DangerouslyAllowAny, PlainObject } from '@voltagent/internal/types';
16
- import * as TF from 'type-fest';
17
17
  import { A2AServerLike, A2AServerDeps, A2AServerMetadata, A2AServerFactory } from '@voltagent/internal/a2a';
18
18
  import { MCPServerLike, MCPServerDeps, MCPServerMetadata, MCPServerFactory } from '@voltagent/internal/mcp';
19
19
  import { ElicitRequest, ElicitResult, ClientCapabilities, ListResourcesResult } from '@modelcontextprotocol/sdk/types.js';
@@ -3695,6 +3695,27 @@ interface SpanAttributes {
3695
3695
  "workflow.step.type"?: string;
3696
3696
  "workflow.step.name"?: string;
3697
3697
  "tool.name"?: string;
3698
+ "workspace.id"?: string;
3699
+ "workspace.name"?: string;
3700
+ "workspace.scope"?: "agent" | "conversation";
3701
+ "workspace.operation"?: string;
3702
+ "workspace.fs.path"?: string;
3703
+ "workspace.fs.pattern"?: string;
3704
+ "workspace.fs.bytes"?: number;
3705
+ "workspace.fs.offset"?: number;
3706
+ "workspace.fs.limit"?: number;
3707
+ "workspace.fs.occurrences"?: number;
3708
+ "workspace.search.query"?: string;
3709
+ "workspace.search.mode"?: string;
3710
+ "workspace.search.top_k"?: number;
3711
+ "workspace.search.results"?: number;
3712
+ "workspace.sandbox.command"?: string;
3713
+ "workspace.sandbox.args"?: string[] | string;
3714
+ "workspace.sandbox.cwd"?: string;
3715
+ "workspace.sandbox.timeout_ms"?: number;
3716
+ "workspace.sandbox.exit_code"?: number;
3717
+ "workspace.skills.name"?: string;
3718
+ "workspace.skills.source"?: string;
3698
3719
  "user.id"?: string;
3699
3720
  "conversation.id"?: string;
3700
3721
  "model.name"?: string;
@@ -6706,6 +6727,598 @@ type ModelRouterModelId = {
6706
6727
  }[ProviderId] | (string & {});
6707
6728
  type ModelForProvider<P extends ProviderId> = ProviderModelsMap[P][number];
6708
6729
 
6730
+ type WorkspaceToolPolicy = {
6731
+ enabled?: boolean;
6732
+ needsApproval?: boolean | ToolNeedsApprovalFunction<any>;
6733
+ };
6734
+ type WorkspaceToolPolicyGroup<TName extends string, TPolicy = WorkspaceToolPolicy> = {
6735
+ defaults?: TPolicy;
6736
+ tools?: Partial<Record<TName, TPolicy>>;
6737
+ };
6738
+ type WorkspaceToolPolicies<TName extends string, TPolicy = WorkspaceToolPolicy> = Partial<Record<TName, TPolicy>> | WorkspaceToolPolicyGroup<TName, TPolicy>;
6739
+ type WorkspaceFilesystemToolPolicy = WorkspaceToolPolicy & {
6740
+ requireReadBeforeWrite?: boolean;
6741
+ };
6742
+ type WorkspaceToolConfig = {
6743
+ filesystem?: WorkspaceToolPolicies<string, WorkspaceFilesystemToolPolicy>;
6744
+ sandbox?: WorkspaceToolPolicies<string, WorkspaceToolPolicy>;
6745
+ search?: WorkspaceToolPolicies<string, WorkspaceToolPolicy>;
6746
+ skills?: WorkspaceToolPolicies<string, WorkspaceToolPolicy>;
6747
+ };
6748
+
6749
+ type WorkspaceSandboxExecuteOptions = {
6750
+ command: string;
6751
+ args?: string[];
6752
+ cwd?: string;
6753
+ env?: Record<string, string>;
6754
+ timeoutMs?: number;
6755
+ maxOutputBytes?: number;
6756
+ stdin?: string;
6757
+ signal?: AbortSignal;
6758
+ onStdout?: (chunk: string) => void;
6759
+ onStderr?: (chunk: string) => void;
6760
+ operationContext?: OperationContext;
6761
+ };
6762
+ type WorkspaceSandboxStatus = "idle" | "ready" | "destroyed" | "error";
6763
+ type WorkspaceSandboxResult = {
6764
+ stdout: string;
6765
+ stderr: string;
6766
+ exitCode: number | null;
6767
+ signal?: string;
6768
+ durationMs: number;
6769
+ timedOut: boolean;
6770
+ aborted: boolean;
6771
+ stdoutTruncated: boolean;
6772
+ stderrTruncated: boolean;
6773
+ };
6774
+ interface WorkspaceSandbox {
6775
+ name: string;
6776
+ status?: WorkspaceSandboxStatus;
6777
+ start?: () => Promise<void> | void;
6778
+ stop?: () => Promise<void> | void;
6779
+ destroy?: () => Promise<void> | void;
6780
+ getInfo?: () => Record<string, unknown>;
6781
+ getInstructions?: () => string | null;
6782
+ execute(options: WorkspaceSandboxExecuteOptions): Promise<WorkspaceSandboxResult>;
6783
+ }
6784
+
6785
+ type LocalSandboxOptions = {
6786
+ rootDir?: string;
6787
+ cleanupOnDestroy?: boolean;
6788
+ defaultTimeoutMs?: number;
6789
+ maxOutputBytes?: number;
6790
+ env?: Record<string, string>;
6791
+ inheritProcessEnv?: boolean;
6792
+ allowedCommands?: string[];
6793
+ blockedCommands?: string[];
6794
+ isolation?: LocalSandboxIsolationOptions;
6795
+ };
6796
+ type LocalSandboxIsolationProvider = "none" | "sandbox-exec" | "bwrap";
6797
+ type LocalSandboxIsolationOptions = {
6798
+ provider?: LocalSandboxIsolationProvider;
6799
+ allowNetwork?: boolean;
6800
+ allowSystemBinaries?: boolean;
6801
+ readWritePaths?: string[];
6802
+ readOnlyPaths?: string[];
6803
+ seatbeltProfilePath?: string;
6804
+ bwrapArgs?: string[];
6805
+ profile?: string;
6806
+ };
6807
+ declare const detectLocalSandboxIsolation: () => Promise<LocalSandboxIsolationProvider>;
6808
+ declare class LocalSandbox implements WorkspaceSandbox {
6809
+ name: string;
6810
+ status: WorkspaceSandboxStatus;
6811
+ private readonly rootDir?;
6812
+ private readonly autoRootDir;
6813
+ private readonly cleanupOnDestroy;
6814
+ private readonly defaultTimeoutMs;
6815
+ private readonly maxOutputBytes;
6816
+ private readonly env;
6817
+ private readonly inheritProcessEnv;
6818
+ private readonly allowedCommands?;
6819
+ private readonly blockedCommands?;
6820
+ private readonly isolation?;
6821
+ constructor(options?: LocalSandboxOptions);
6822
+ private rootDirReady?;
6823
+ private ensureRootDir;
6824
+ static detectIsolation(): Promise<LocalSandboxIsolationProvider>;
6825
+ start(): void;
6826
+ stop(): void;
6827
+ destroy(): void;
6828
+ getInfo(): Record<string, unknown>;
6829
+ getInstructions(): string | null;
6830
+ execute(options: WorkspaceSandboxExecuteOptions): Promise<WorkspaceSandboxResult>;
6831
+ }
6832
+
6833
+ type WorkspaceSandboxToolkitOptions = {
6834
+ systemPrompt?: string | null;
6835
+ operationTimeoutMs?: number;
6836
+ customToolDescription?: string | null;
6837
+ outputEvictionBytes?: number;
6838
+ outputEvictionPath?: string;
6839
+ toolPolicies?: WorkspaceToolPolicies<WorkspaceSandboxToolName> | null;
6840
+ };
6841
+ type WorkspaceSandboxToolkitContext = {
6842
+ sandbox?: WorkspaceSandbox;
6843
+ workspace?: WorkspaceIdentity;
6844
+ agent?: Agent;
6845
+ filesystem?: WorkspaceFilesystem;
6846
+ };
6847
+ type WorkspaceSandboxToolName = "execute_command";
6848
+ declare const createWorkspaceSandboxToolkit: (context: WorkspaceSandboxToolkitContext, options?: WorkspaceSandboxToolkitOptions) => Toolkit;
6849
+
6850
+ type WorkspaceSearchMode = "bm25" | "vector" | "hybrid";
6851
+ type WorkspaceSearchIndexPath = {
6852
+ path: string;
6853
+ glob?: string;
6854
+ };
6855
+ type WorkspaceSearchHybridWeights = {
6856
+ lexicalWeight?: number;
6857
+ vectorWeight?: number;
6858
+ };
6859
+ type WorkspaceSearchConfig = {
6860
+ bm25?: {
6861
+ k1?: number;
6862
+ b?: number;
6863
+ };
6864
+ embedding?: EmbeddingAdapterInput;
6865
+ vector?: VectorAdapter;
6866
+ autoIndexPaths?: Array<WorkspaceSearchIndexPath | string>;
6867
+ maxFileBytes?: number;
6868
+ snippetLength?: number;
6869
+ defaultMode?: WorkspaceSearchMode;
6870
+ hybrid?: WorkspaceSearchHybridWeights;
6871
+ allowDirectAccess?: boolean;
6872
+ };
6873
+ type WorkspaceSearchOptions = {
6874
+ mode?: WorkspaceSearchMode;
6875
+ topK?: number;
6876
+ minScore?: number;
6877
+ path?: string;
6878
+ glob?: string;
6879
+ snippetLength?: number;
6880
+ lexicalWeight?: number;
6881
+ vectorWeight?: number;
6882
+ context?: WorkspaceFilesystemCallContext;
6883
+ };
6884
+ type WorkspaceSearchResult = {
6885
+ id: string;
6886
+ path: string;
6887
+ score: number;
6888
+ content: string;
6889
+ lineRange?: {
6890
+ start: number;
6891
+ end: number;
6892
+ };
6893
+ scoreDetails?: {
6894
+ bm25?: number;
6895
+ vector?: number;
6896
+ };
6897
+ bm25Score?: number;
6898
+ vectorScore?: number;
6899
+ snippet?: string;
6900
+ metadata?: Record<string, unknown>;
6901
+ };
6902
+ type WorkspaceSearchIndexSummary = {
6903
+ indexed: number;
6904
+ vectorIndexed?: number;
6905
+ skipped: number;
6906
+ errors: string[];
6907
+ };
6908
+
6909
+ type WorkspaceSkillSearchMode = "bm25" | "vector" | "hybrid";
6910
+ type WorkspaceSkillSearchHybridWeights = {
6911
+ lexicalWeight?: number;
6912
+ vectorWeight?: number;
6913
+ };
6914
+ type WorkspaceSkillsRootResolverContext = {
6915
+ workspace: WorkspaceIdentity;
6916
+ filesystem: WorkspaceFilesystem;
6917
+ operationContext?: OperationContext;
6918
+ };
6919
+ type WorkspaceSkillsRootResolver = (context?: WorkspaceSkillsRootResolverContext) => string[] | undefined | null | Promise<string[] | undefined | null>;
6920
+ type WorkspaceSkillsConfig = {
6921
+ rootPaths?: string[] | WorkspaceSkillsRootResolver;
6922
+ glob?: string;
6923
+ maxFileBytes?: number;
6924
+ autoDiscover?: boolean;
6925
+ autoIndex?: boolean;
6926
+ bm25?: {
6927
+ k1?: number;
6928
+ b?: number;
6929
+ };
6930
+ embedding?: EmbeddingAdapterInput;
6931
+ vector?: VectorAdapter;
6932
+ defaultMode?: WorkspaceSkillSearchMode;
6933
+ hybrid?: WorkspaceSkillSearchHybridWeights;
6934
+ };
6935
+ type WorkspaceSkillMetadata = {
6936
+ id: string;
6937
+ name: string;
6938
+ description?: string;
6939
+ version?: string;
6940
+ tags?: string[];
6941
+ path: string;
6942
+ root: string;
6943
+ references?: string[];
6944
+ scripts?: string[];
6945
+ assets?: string[];
6946
+ };
6947
+ type WorkspaceSkill = WorkspaceSkillMetadata & {
6948
+ instructions: string;
6949
+ };
6950
+ type WorkspaceSkillSearchOptions = {
6951
+ mode?: WorkspaceSkillSearchMode;
6952
+ topK?: number;
6953
+ snippetLength?: number;
6954
+ lexicalWeight?: number;
6955
+ vectorWeight?: number;
6956
+ context?: WorkspaceFilesystemCallContext;
6957
+ };
6958
+ type WorkspaceSkillSearchResult = {
6959
+ id: string;
6960
+ name: string;
6961
+ score: number;
6962
+ bm25Score?: number;
6963
+ vectorScore?: number;
6964
+ snippet?: string;
6965
+ metadata?: Record<string, unknown>;
6966
+ };
6967
+ type WorkspaceSkillIndexSummary = {
6968
+ indexed: number;
6969
+ skipped: number;
6970
+ errors: string[];
6971
+ };
6972
+ type WorkspaceSkillsPromptOptions = {
6973
+ includeAvailable?: boolean;
6974
+ includeActivated?: boolean;
6975
+ maxAvailable?: number;
6976
+ maxActivated?: number;
6977
+ maxInstructionChars?: number;
6978
+ maxPromptChars?: number;
6979
+ };
6980
+
6981
+ type WorkspaceScope = "agent" | "conversation";
6982
+ type WorkspaceStatus = "idle" | "initializing" | "ready" | "destroyed" | "error";
6983
+ type WorkspaceComponentStatus = "idle" | "ready" | "destroyed" | "error";
6984
+ type WorkspaceIdentity = {
6985
+ id: string;
6986
+ name?: string;
6987
+ scope?: WorkspaceScope;
6988
+ };
6989
+ type WorkspaceFilesystemConfig = {
6990
+ backend?: FilesystemBackend | FilesystemBackendFactory;
6991
+ files?: Record<string, FileData>;
6992
+ directories?: string[];
6993
+ readOnly?: boolean;
6994
+ };
6995
+ type WorkspaceComponentInfo = {
6996
+ status?: WorkspaceComponentStatus;
6997
+ details?: Record<string, unknown>;
6998
+ };
6999
+ type WorkspaceInfo = {
7000
+ id: string;
7001
+ name?: string;
7002
+ scope: WorkspaceScope;
7003
+ status: WorkspaceStatus;
7004
+ operationTimeoutMs?: number;
7005
+ filesystem?: WorkspaceComponentInfo;
7006
+ sandbox?: WorkspaceComponentInfo;
7007
+ search?: WorkspaceComponentInfo;
7008
+ skills?: WorkspaceComponentInfo;
7009
+ };
7010
+ type WorkspacePathContext = {
7011
+ filesystem?: {
7012
+ status?: WorkspaceComponentStatus;
7013
+ instructions?: string | null;
7014
+ info?: Record<string, unknown>;
7015
+ };
7016
+ sandbox?: {
7017
+ status?: WorkspaceComponentStatus;
7018
+ instructions?: string | null;
7019
+ info?: Record<string, unknown>;
7020
+ };
7021
+ };
7022
+ type WorkspaceConfig = {
7023
+ id?: string;
7024
+ name?: string;
7025
+ scope?: WorkspaceScope;
7026
+ operationTimeoutMs?: number;
7027
+ filesystem?: WorkspaceFilesystemConfig;
7028
+ sandbox?: WorkspaceSandbox;
7029
+ search?: WorkspaceSearchConfig;
7030
+ skills?: WorkspaceSkillsConfig;
7031
+ toolConfig?: WorkspaceToolConfig;
7032
+ };
7033
+
7034
+ type MaybePromise<T> = T | Promise<T>;
7035
+ interface FileInfo {
7036
+ path: string;
7037
+ is_dir?: boolean;
7038
+ size?: number;
7039
+ modified_at?: string;
7040
+ created_at?: string;
7041
+ }
7042
+ interface GrepMatch {
7043
+ path: string;
7044
+ line: number;
7045
+ text: string;
7046
+ }
7047
+ interface FileData {
7048
+ content: string[];
7049
+ created_at: string;
7050
+ modified_at: string;
7051
+ }
7052
+ interface WriteResult {
7053
+ error?: string;
7054
+ path?: string;
7055
+ filesUpdate?: Record<string, FileData | null> | null;
7056
+ metadata?: Record<string, unknown>;
7057
+ }
7058
+ interface WriteOptions {
7059
+ overwrite?: boolean;
7060
+ }
7061
+ interface EditResult {
7062
+ error?: string;
7063
+ path?: string;
7064
+ filesUpdate?: Record<string, FileData | null> | null;
7065
+ occurrences?: number;
7066
+ metadata?: Record<string, unknown>;
7067
+ }
7068
+ interface DeleteResult {
7069
+ error?: string;
7070
+ path?: string;
7071
+ filesUpdate?: Record<string, FileData | null> | null;
7072
+ metadata?: Record<string, unknown>;
7073
+ }
7074
+ interface DeleteOptions {
7075
+ recursive?: boolean;
7076
+ }
7077
+ interface MkdirResult {
7078
+ error?: string;
7079
+ path?: string;
7080
+ metadata?: Record<string, unknown>;
7081
+ }
7082
+ interface RmdirResult {
7083
+ error?: string;
7084
+ path?: string;
7085
+ filesUpdate?: Record<string, FileData | null> | null;
7086
+ metadata?: Record<string, unknown>;
7087
+ }
7088
+ interface FilesystemBackend {
7089
+ lsInfo(path: string): MaybePromise<FileInfo[]>;
7090
+ read(filePath: string, offset?: number, limit?: number): MaybePromise<string>;
7091
+ readRaw(filePath: string): MaybePromise<FileData>;
7092
+ stat?(filePath: string): MaybePromise<FileInfo | null>;
7093
+ exists?(filePath: string): MaybePromise<boolean>;
7094
+ grepRaw(pattern: string, path?: string | null, glob?: string | null): MaybePromise<GrepMatch[] | string>;
7095
+ globInfo(pattern: string, path?: string): MaybePromise<FileInfo[]>;
7096
+ write(filePath: string, content: string, options?: WriteOptions): MaybePromise<WriteResult>;
7097
+ edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): MaybePromise<EditResult>;
7098
+ delete?(filePath: string, options?: DeleteOptions): MaybePromise<DeleteResult>;
7099
+ mkdir?(path: string, recursive?: boolean): MaybePromise<MkdirResult>;
7100
+ rmdir?(path: string, recursive?: boolean): MaybePromise<RmdirResult>;
7101
+ }
7102
+ type FilesystemBackendContext = {
7103
+ agent?: Agent;
7104
+ operationContext?: OperationContext;
7105
+ state: {
7106
+ files?: Record<string, FileData>;
7107
+ directories?: Set<string>;
7108
+ };
7109
+ };
7110
+ type FilesystemBackendFactory = (context: FilesystemBackendContext) => FilesystemBackend;
7111
+
7112
+ declare class CompositeFilesystemBackend implements FilesystemBackend {
7113
+ private defaultBackend;
7114
+ private routes;
7115
+ private sortedRoutes;
7116
+ constructor(defaultBackend: FilesystemBackend, routes: Record<string, FilesystemBackend>);
7117
+ private getBackendAndKey;
7118
+ private getMountPrefix;
7119
+ private remapFilesUpdate;
7120
+ private remapFilesUpdateResult;
7121
+ lsInfo(path: string): Promise<FileInfo[]>;
7122
+ read(filePath: string, offset?: number, limit?: number): Promise<string>;
7123
+ readRaw(filePath: string): Promise<FileData>;
7124
+ stat(filePath: string): Promise<FileInfo | null>;
7125
+ exists(filePath: string): Promise<boolean>;
7126
+ grepRaw(pattern: string, path?: string, glob?: string | null): Promise<GrepMatch[] | string>;
7127
+ globInfo(pattern: string, path?: string): Promise<FileInfo[]>;
7128
+ write(filePath: string, content: string, options?: WriteOptions): Promise<WriteResult>;
7129
+ edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): Promise<EditResult>;
7130
+ delete(filePath: string, options?: DeleteOptions): Promise<DeleteResult>;
7131
+ mkdir(path: string, recursive?: boolean): Promise<MkdirResult>;
7132
+ rmdir(path: string, recursive?: boolean): Promise<RmdirResult>;
7133
+ }
7134
+
7135
+ declare class NodeFilesystemBackend implements FilesystemBackend {
7136
+ private cwd;
7137
+ private virtualMode;
7138
+ private readonly contained;
7139
+ private maxFileSizeBytes;
7140
+ constructor(options?: {
7141
+ rootDir?: string;
7142
+ virtualMode?: boolean;
7143
+ contained?: boolean;
7144
+ maxFileSizeMb?: number;
7145
+ });
7146
+ private resolvePath;
7147
+ private isEnoentError;
7148
+ private assertPathContained;
7149
+ private toVirtualPath;
7150
+ lsInfo(dirPath: string): Promise<FileInfo[]>;
7151
+ read(filePath: string, offset?: number, limit?: number): Promise<string>;
7152
+ readRaw(filePath: string): Promise<FileData>;
7153
+ stat(filePath: string): Promise<FileInfo | null>;
7154
+ exists(filePath: string): Promise<boolean>;
7155
+ write(filePath: string, content: string, options?: WriteOptions): Promise<WriteResult>;
7156
+ mkdir(dirPath: string, recursive?: boolean): Promise<MkdirResult>;
7157
+ edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): Promise<EditResult>;
7158
+ delete(filePath: string, options?: DeleteOptions): Promise<DeleteResult>;
7159
+ rmdir(dirPath: string, recursive?: boolean): Promise<RmdirResult>;
7160
+ grepRaw(pattern: string, dirPath?: string, glob?: string | null): Promise<GrepMatch[] | string>;
7161
+ private ripgrepSearch;
7162
+ private fallbackSearch;
7163
+ globInfo(pattern: string, searchPath?: string): Promise<FileInfo[]>;
7164
+ }
7165
+
7166
+ declare class InMemoryFilesystemBackend implements FilesystemBackend {
7167
+ private files;
7168
+ private directories;
7169
+ constructor(files?: Record<string, FileData>, directories?: Set<string>);
7170
+ private getFiles;
7171
+ private getDirectories;
7172
+ private normalizeDirPath;
7173
+ private hasDirectory;
7174
+ lsInfo(path: string): FileInfo[];
7175
+ read(filePath: string, offset?: number, limit?: number): string;
7176
+ readRaw(filePath: string): FileData;
7177
+ stat(filePath: string): FileInfo | null;
7178
+ exists(filePath: string): boolean;
7179
+ write(filePath: string, content: string, options?: WriteOptions): WriteResult;
7180
+ edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): EditResult;
7181
+ delete(filePath: string, options?: DeleteOptions): DeleteResult;
7182
+ grepRaw(pattern: string, path?: string, glob?: string | null): GrepMatch[] | string;
7183
+ globInfo(pattern: string, path?: string): FileInfo[];
7184
+ mkdir(path: string, recursive?: boolean): MkdirResult;
7185
+ rmdir(path: string, recursive?: boolean): RmdirResult;
7186
+ }
7187
+
7188
+ type WorkspaceFilesystemToolName = "ls" | "read_file" | "write_file" | "edit_file" | "delete_file" | "stat" | "mkdir" | "rmdir" | "list_tree" | "list_files" | "glob" | "grep";
7189
+ type WorkspaceFilesystemToolkitOptions = {
7190
+ systemPrompt?: string | null;
7191
+ operationTimeoutMs?: number;
7192
+ customToolDescriptions?: Partial<Record<WorkspaceFilesystemToolName, string>> | null;
7193
+ toolPolicies?: WorkspaceToolPolicies<WorkspaceFilesystemToolName, WorkspaceFilesystemToolPolicy> | null;
7194
+ };
7195
+ type WorkspaceFilesystemOptions = {
7196
+ backend?: FilesystemBackend | FilesystemBackendFactory;
7197
+ files?: Record<string, FileData>;
7198
+ directories?: string[];
7199
+ readOnly?: boolean;
7200
+ };
7201
+ type WorkspaceFilesystemCallContext = {
7202
+ agent?: Agent;
7203
+ operationContext?: OperationContext;
7204
+ };
7205
+ type WorkspaceFilesystemReadOptions = {
7206
+ offset?: number;
7207
+ limit?: number;
7208
+ context?: WorkspaceFilesystemCallContext;
7209
+ };
7210
+ type WorkspaceFilesystemWriteOptions = {
7211
+ overwrite?: boolean;
7212
+ ensureDirs?: boolean;
7213
+ context?: WorkspaceFilesystemCallContext;
7214
+ };
7215
+ type WorkspaceFilesystemSearchOptions = {
7216
+ path?: string;
7217
+ glob?: string | null;
7218
+ context?: WorkspaceFilesystemCallContext;
7219
+ };
7220
+ type WorkspaceFilesystemOperationOptions = {
7221
+ context?: WorkspaceFilesystemCallContext;
7222
+ };
7223
+ type WorkspaceFilesystemDeleteOptions = {
7224
+ recursive?: boolean;
7225
+ context?: WorkspaceFilesystemCallContext;
7226
+ };
7227
+ type WorkspaceFilesystemRmdirOptions = {
7228
+ recursive?: boolean;
7229
+ context?: WorkspaceFilesystemCallContext;
7230
+ };
7231
+ type WorkspaceFilesystemToolkitContext = {
7232
+ filesystem: WorkspaceFilesystem;
7233
+ workspace?: WorkspaceIdentity;
7234
+ agent?: Agent;
7235
+ };
7236
+ declare class WorkspaceFilesystem {
7237
+ private backend;
7238
+ private files;
7239
+ private directories;
7240
+ readonly readOnly: boolean;
7241
+ status: WorkspaceComponentStatus;
7242
+ constructor(options?: WorkspaceFilesystemOptions);
7243
+ private normalizeDirectoryPath;
7244
+ private buildBackendContext;
7245
+ private updateFiles;
7246
+ init(): void;
7247
+ destroy(): void;
7248
+ getInfo(): Record<string, unknown>;
7249
+ getInstructions(): string;
7250
+ lsInfo(path?: string, options?: WorkspaceFilesystemOperationOptions): Promise<FileInfo[]>;
7251
+ read(filePath: string, options?: WorkspaceFilesystemReadOptions): Promise<string>;
7252
+ readRaw(filePath: string, options?: WorkspaceFilesystemOperationOptions): Promise<FileData>;
7253
+ write(filePath: string, content: string, options?: WorkspaceFilesystemWriteOptions): Promise<WriteResult>;
7254
+ edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean, options?: WorkspaceFilesystemOperationOptions): Promise<EditResult>;
7255
+ delete(filePath: string, options?: WorkspaceFilesystemDeleteOptions): Promise<DeleteResult>;
7256
+ globInfo(pattern: string, path?: string, options?: WorkspaceFilesystemOperationOptions): Promise<FileInfo[]>;
7257
+ stat(filePath: string, options?: WorkspaceFilesystemOperationOptions): Promise<FileInfo | null>;
7258
+ exists(filePath: string, options?: WorkspaceFilesystemOperationOptions): Promise<boolean>;
7259
+ mkdir(path: string, recursive?: boolean, options?: WorkspaceFilesystemOperationOptions): Promise<MkdirResult>;
7260
+ rmdir(path: string, recursive?: boolean, options?: WorkspaceFilesystemRmdirOptions): Promise<RmdirResult>;
7261
+ grepRaw(pattern: string, options?: WorkspaceFilesystemSearchOptions): Promise<GrepMatch[] | string>;
7262
+ }
7263
+ declare const createWorkspaceFilesystemToolkit: (context: WorkspaceFilesystemToolkitContext, options?: WorkspaceFilesystemToolkitOptions) => Toolkit;
7264
+
7265
+ type WorkspaceSearchToolkitOptions = {
7266
+ systemPrompt?: string | null;
7267
+ operationTimeoutMs?: number;
7268
+ customIndexDescription?: string | null;
7269
+ customIndexContentDescription?: string | null;
7270
+ customSearchDescription?: string | null;
7271
+ toolPolicies?: WorkspaceToolPolicies<WorkspaceSearchToolName> | null;
7272
+ };
7273
+ type WorkspaceSearchToolkitContext = {
7274
+ search?: WorkspaceSearch;
7275
+ workspace?: WorkspaceIdentity;
7276
+ agent?: Agent;
7277
+ filesystem?: WorkspaceFilesystem;
7278
+ };
7279
+ type WorkspaceSearchToolName = "workspace_index" | "workspace_index_content" | "workspace_search";
7280
+ type WorkspaceSearchDocument = {
7281
+ id: string;
7282
+ path: string;
7283
+ content: string;
7284
+ metadata?: Record<string, unknown>;
7285
+ };
7286
+ declare class WorkspaceSearch {
7287
+ private readonly filesystem;
7288
+ private readonly bm25;
7289
+ private readonly documents;
7290
+ private readonly embedding?;
7291
+ private readonly vector?;
7292
+ private readonly autoIndexPaths?;
7293
+ private readonly maxFileBytes;
7294
+ private readonly snippetLength;
7295
+ private readonly defaultMode;
7296
+ private readonly defaultWeights;
7297
+ private autoIndexPromise?;
7298
+ status: WorkspaceComponentStatus;
7299
+ constructor(options: WorkspaceSearchConfig & {
7300
+ filesystem: WorkspaceFilesystem;
7301
+ });
7302
+ init(): Promise<void>;
7303
+ destroy(): void;
7304
+ getInfo(): Record<string, unknown>;
7305
+ getInstructions(): string;
7306
+ private ensureAutoIndex;
7307
+ indexPaths(paths?: Array<WorkspaceSearchIndexPath | string>, options?: {
7308
+ maxFileBytes?: number;
7309
+ context?: WorkspaceFilesystemCallContext;
7310
+ }): Promise<WorkspaceSearchIndexSummary>;
7311
+ indexDocuments(docs: WorkspaceSearchDocument[]): Promise<WorkspaceSearchIndexSummary>;
7312
+ indexContent(path: string, content: string, metadata?: Record<string, unknown>, _options?: {
7313
+ context?: WorkspaceFilesystemCallContext;
7314
+ }): Promise<WorkspaceSearchIndexSummary>;
7315
+ search(query: string, options?: WorkspaceSearchOptions): Promise<WorkspaceSearchResult[]>;
7316
+ private resolveMode;
7317
+ private searchVector;
7318
+ private formatResults;
7319
+ }
7320
+ declare const createWorkspaceSearchToolkit: (context: WorkspaceSearchToolkitContext, options?: WorkspaceSearchToolkitOptions) => Toolkit;
7321
+
6709
7322
  interface OnStartHookArgs {
6710
7323
  agent: Agent;
6711
7324
  context: OperationContext;
@@ -6879,6 +7492,126 @@ type AgentHooks = {
6879
7492
  */
6880
7493
  declare function createHooks(hooks?: Partial<AgentHooks>): AgentHooks;
6881
7494
 
7495
+ type WorkspaceSkillsToolkitOptions = {
7496
+ systemPrompt?: string | null;
7497
+ operationTimeoutMs?: number;
7498
+ customToolDescriptions?: Partial<{
7499
+ list: string;
7500
+ search: string;
7501
+ read: string;
7502
+ activate: string;
7503
+ deactivate: string;
7504
+ readReference: string;
7505
+ readScript: string;
7506
+ readAsset: string;
7507
+ }> | null;
7508
+ toolPolicies?: WorkspaceToolPolicies<WorkspaceSkillsToolName> | null;
7509
+ };
7510
+ type WorkspaceSkillsToolkitContext = {
7511
+ skills?: WorkspaceSkills;
7512
+ workspace?: WorkspaceIdentity;
7513
+ agent?: Agent;
7514
+ };
7515
+ type WorkspaceSkillsToolName = "workspace_list_skills" | "workspace_search_skills" | "workspace_read_skill" | "workspace_activate_skill" | "workspace_deactivate_skill" | "workspace_read_skill_reference" | "workspace_read_skill_script" | "workspace_read_skill_asset";
7516
+ type WorkspaceSkillsPromptHookContext = {
7517
+ skills?: WorkspaceSkills;
7518
+ };
7519
+ type WorkspaceSkillsOperationOptions = {
7520
+ context?: WorkspaceFilesystemCallContext;
7521
+ };
7522
+ declare class WorkspaceSkills {
7523
+ private readonly filesystem;
7524
+ private readonly workspaceIdentity;
7525
+ private rootPaths;
7526
+ private readonly rootResolver?;
7527
+ private rootResolved;
7528
+ private rootResolvePromise?;
7529
+ private readonly glob;
7530
+ private readonly maxFileBytes;
7531
+ private readonly bm25Options?;
7532
+ private bm25;
7533
+ private readonly embedding?;
7534
+ private readonly vector?;
7535
+ private readonly defaultMode;
7536
+ private readonly defaultWeights;
7537
+ private readonly skillsById;
7538
+ private readonly skillNameMap;
7539
+ private readonly skillCache;
7540
+ private readonly activeSkills;
7541
+ private readonly documents;
7542
+ private readonly indexedSkillIds;
7543
+ private discovered;
7544
+ private indexed;
7545
+ private autoDiscoverPromise?;
7546
+ private autoIndexPromise?;
7547
+ status: WorkspaceComponentStatus;
7548
+ constructor(options: WorkspaceSkillsConfig & {
7549
+ filesystem: WorkspaceFilesystem;
7550
+ workspace: WorkspaceSkillsRootResolverContext["workspace"];
7551
+ });
7552
+ init(): Promise<void>;
7553
+ destroy(): void;
7554
+ getInfo(): Record<string, unknown>;
7555
+ getInstructions(): string;
7556
+ private ensureDiscovered;
7557
+ private ensureRootPaths;
7558
+ private ensureIndexed;
7559
+ discoverSkills(options?: {
7560
+ refresh?: boolean;
7561
+ context?: WorkspaceFilesystemCallContext;
7562
+ }): Promise<WorkspaceSkillMetadata[]>;
7563
+ loadSkill(identifier: string, options?: WorkspaceSkillsOperationOptions): Promise<WorkspaceSkill | null>;
7564
+ activateSkill(identifier: string, options?: WorkspaceSkillsOperationOptions): Promise<WorkspaceSkillMetadata | null>;
7565
+ deactivateSkill(identifier: string, options?: WorkspaceSkillsOperationOptions): Promise<boolean>;
7566
+ getActiveSkills(): WorkspaceSkillMetadata[];
7567
+ indexSkills(options?: WorkspaceSkillsOperationOptions): Promise<WorkspaceSkillIndexSummary>;
7568
+ search(query: string, options?: WorkspaceSkillSearchOptions): Promise<WorkspaceSkillSearchResult[]>;
7569
+ buildPrompt(options?: WorkspaceSkillsPromptOptions & {
7570
+ context?: WorkspaceFilesystemCallContext;
7571
+ }): Promise<string | null>;
7572
+ private resolveMode;
7573
+ private searchVector;
7574
+ private formatResults;
7575
+ private resolveSkillId;
7576
+ resolveSkillFilePath(skill: WorkspaceSkillMetadata, relativePath: string, allowed: string[] | undefined): string | null;
7577
+ readFileContent(filePath: string, options?: WorkspaceSkillsOperationOptions): Promise<string>;
7578
+ }
7579
+ declare const createWorkspaceSkillsPromptHook: (hookContext: WorkspaceSkillsPromptHookContext, options?: WorkspaceSkillsPromptOptions) => AgentHooks;
7580
+ declare const createWorkspaceSkillsToolkit: (context: WorkspaceSkillsToolkitContext, options?: WorkspaceSkillsToolkitOptions) => Toolkit;
7581
+
7582
+ declare class Workspace {
7583
+ readonly id: string;
7584
+ readonly name?: string;
7585
+ readonly scope: WorkspaceScope;
7586
+ readonly filesystem: WorkspaceFilesystem;
7587
+ readonly sandbox?: WorkspaceSandbox;
7588
+ private readonly searchService?;
7589
+ private readonly allowDirectSearchAccess;
7590
+ private readonly operationTimeoutMs?;
7591
+ readonly skills?: WorkspaceSkills;
7592
+ private readonly toolConfig?;
7593
+ status: WorkspaceStatus;
7594
+ private initPromise?;
7595
+ constructor(options?: WorkspaceConfig);
7596
+ init(): Promise<void>;
7597
+ destroy(): Promise<void>;
7598
+ private isDestroyed;
7599
+ getInfo(): WorkspaceInfo;
7600
+ getPathContext(): WorkspacePathContext;
7601
+ getToolsConfig(): WorkspaceToolConfig | undefined;
7602
+ getObservabilityAttributes(): Record<string, unknown>;
7603
+ private applyOperationTimeout;
7604
+ private resolveSearchToolPolicy;
7605
+ private assertDirectSearchAllowed;
7606
+ index(path: string, content: string, metadata?: Record<string, unknown>): Promise<WorkspaceSearchIndexSummary>;
7607
+ search(query: string, options?: WorkspaceSearchOptions): Promise<WorkspaceSearchResult[]>;
7608
+ createFilesystemToolkit(options?: WorkspaceFilesystemToolkitOptions): Toolkit;
7609
+ createSandboxToolkit(options?: WorkspaceSandboxToolkitOptions): Toolkit;
7610
+ createSearchToolkit(options?: WorkspaceSearchToolkitOptions): Toolkit;
7611
+ createSkillsToolkit(options?: WorkspaceSkillsToolkitOptions): Toolkit;
7612
+ createSkillsPromptHook(options?: WorkspaceSkillsPromptOptions): AgentHooks;
7613
+ }
7614
+
6882
7615
  /**
6883
7616
  * AgentTraceContext - Manages trace hierarchy and common attributes
6884
7617
  *
@@ -7023,6 +7756,12 @@ type AgentFeedbackMetadata = {
7023
7756
  type ToolWithNodeId = (BaseTool | ProviderTool) & {
7024
7757
  node_id: string;
7025
7758
  };
7759
+ type WorkspaceToolkitOptions = {
7760
+ filesystem?: WorkspaceFilesystemToolkitOptions | false;
7761
+ sandbox?: WorkspaceSandboxToolkitOptions | false;
7762
+ search?: WorkspaceSearchToolkitOptions | false;
7763
+ skills?: WorkspaceSkillsToolkitOptions | false;
7764
+ };
7026
7765
  interface AgentScorerState {
7027
7766
  key: string;
7028
7767
  id: string;
@@ -7398,6 +8137,8 @@ type AgentOptions = {
7398
8137
  tools?: (Tool<any, any> | Toolkit | Tool$1)[] | DynamicValue<(Tool<any, any> | Toolkit)[]>;
7399
8138
  toolkits?: Toolkit[];
7400
8139
  toolRouting?: ToolRoutingConfig | false;
8140
+ workspace?: Workspace | WorkspaceConfig | false;
8141
+ workspaceToolkits?: WorkspaceToolkitOptions | false;
7401
8142
  memory?: Memory | false;
7402
8143
  summarization?: AgentSummarizationOptions | false;
7403
8144
  retriever?: BaseRetriever;
@@ -8285,7 +9026,7 @@ interface GenerateObjectResultWithContext<T> extends GenerateObjectResult<T> {
8285
9026
  * Base options for all generation methods
8286
9027
  * Extends AI SDK's CallSettings for full compatibility
8287
9028
  */
8288
- interface BaseGenerationOptions extends Partial<CallSettings> {
9029
+ interface BaseGenerationOptions<TProviderOptions extends ProviderOptions$1 = ProviderOptions$1> extends Partial<CallSettings> {
8289
9030
  userId?: string;
8290
9031
  conversationId?: string;
8291
9032
  context?: ContextInput;
@@ -8321,7 +9062,7 @@ interface BaseGenerationOptions extends Partial<CallSettings> {
8321
9062
  inputMiddlewares?: InputMiddleware[];
8322
9063
  outputMiddlewares?: OutputMiddleware<any>[];
8323
9064
  maxMiddlewareRetries?: number;
8324
- providerOptions?: ProviderOptions$1;
9065
+ providerOptions?: TProviderOptions;
8325
9066
  output?: OutputSpec$1;
8326
9067
  /**
8327
9068
  * Optional explicit stop sequences to pass through to the underlying provider.
@@ -8333,10 +9074,10 @@ interface BaseGenerationOptions extends Partial<CallSettings> {
8333
9074
  */
8334
9075
  toolChoice?: ToolChoice<Record<string, unknown>>;
8335
9076
  }
8336
- type GenerateTextOptions<OUTPUT extends OutputSpec$1 = OutputSpec$1> = Omit<BaseGenerationOptions, "output"> & {
9077
+ type GenerateTextOptions<OUTPUT extends OutputSpec$1 = OutputSpec$1, TProviderOptions extends ProviderOptions$1 = ProviderOptions$1> = Omit<BaseGenerationOptions<TProviderOptions>, "output"> & {
8337
9078
  output?: OUTPUT;
8338
9079
  };
8339
- type StreamTextOptions = BaseGenerationOptions & {
9080
+ type StreamTextOptions<TProviderOptions extends ProviderOptions$1 = ProviderOptions$1> = BaseGenerationOptions<TProviderOptions> & {
8340
9081
  onFinish?: (result: any) => void | Promise<void>;
8341
9082
  /**
8342
9083
  * When true, avoids wiring the HTTP abort signal into the stream so clients can resume later.
@@ -8344,8 +9085,8 @@ type StreamTextOptions = BaseGenerationOptions & {
8344
9085
  */
8345
9086
  resumableStream?: boolean;
8346
9087
  };
8347
- type GenerateObjectOptions = BaseGenerationOptions;
8348
- type StreamObjectOptions = BaseGenerationOptions & {
9088
+ type GenerateObjectOptions<TProviderOptions extends ProviderOptions$1 = ProviderOptions$1> = BaseGenerationOptions<TProviderOptions>;
9089
+ type StreamObjectOptions<TProviderOptions extends ProviderOptions$1 = ProviderOptions$1> = BaseGenerationOptions<TProviderOptions> & {
8349
9090
  onFinish?: (result: any) => void | Promise<void>;
8350
9091
  };
8351
9092
  declare class Agent {
@@ -8372,6 +9113,7 @@ declare class Agent {
8372
9113
  private readonly memory?;
8373
9114
  private readonly memoryConfigured;
8374
9115
  private readonly summarization?;
9116
+ private readonly workspace?;
8375
9117
  private defaultObservability?;
8376
9118
  private readonly toolManager;
8377
9119
  private readonly toolPoolManager;
@@ -8395,21 +9137,21 @@ declare class Agent {
8395
9137
  /**
8396
9138
  * Generate text response
8397
9139
  */
8398
- generateText<OUTPUT extends OutputSpec$1 = OutputSpec$1>(input: string | UIMessage[] | BaseMessage[], options?: GenerateTextOptions<OUTPUT>): Promise<GenerateTextResultWithContext<ToolSet, OUTPUT>>;
9140
+ generateText<OUTPUT extends OutputSpec$1 = OutputSpec$1, TProviderOptions extends ProviderOptions$1 = ProviderOptions$1>(input: string | UIMessage[] | BaseMessage[], options?: GenerateTextOptions<OUTPUT, TProviderOptions>): Promise<GenerateTextResultWithContext<ToolSet, OUTPUT>>;
8399
9141
  /**
8400
9142
  * Stream text response
8401
9143
  */
8402
- streamText(input: string | UIMessage[] | BaseMessage[], options?: StreamTextOptions): Promise<StreamTextResultWithContext>;
9144
+ streamText<TProviderOptions extends ProviderOptions$1 = ProviderOptions$1>(input: string | UIMessage[] | BaseMessage[], options?: StreamTextOptions<TProviderOptions>): Promise<StreamTextResultWithContext>;
8403
9145
  /**
8404
9146
  * Generate structured object
8405
9147
  * @deprecated — Use generateText with an output setting instead.
8406
9148
  */
8407
- generateObject<T extends z.ZodType>(input: string | UIMessage[] | BaseMessage[], schema: T, options?: GenerateObjectOptions): Promise<GenerateObjectResultWithContext<z.infer<T>>>;
9149
+ generateObject<T extends z.ZodType, TProviderOptions extends ProviderOptions$1 = ProviderOptions$1>(input: string | UIMessage[] | BaseMessage[], schema: T, options?: GenerateObjectOptions<TProviderOptions>): Promise<GenerateObjectResultWithContext<z.infer<T>>>;
8408
9150
  /**
8409
9151
  * Stream structured object
8410
9152
  * @deprecated — Use streamText with an output setting instead.
8411
9153
  */
8412
- streamObject<T extends z.ZodType>(input: string | UIMessage[] | BaseMessage[], schema: T, options?: StreamObjectOptions): Promise<StreamObjectResultWithContext<z.infer<T>>>;
9154
+ streamObject<T extends z.ZodType, TProviderOptions extends ProviderOptions$1 = ProviderOptions$1>(input: string | UIMessage[] | BaseMessage[], schema: T, options?: StreamObjectOptions<TProviderOptions>): Promise<StreamObjectResultWithContext<z.infer<T>>>;
8413
9155
  private resolveGuardrailSets;
8414
9156
  private resolveMiddlewareSets;
8415
9157
  private resolveMiddlewareRetries;
@@ -8628,6 +9370,10 @@ declare class Agent {
8628
9370
  * Get tool manager
8629
9371
  */
8630
9372
  getToolManager(): ToolManager;
9373
+ /**
9374
+ * Get Workspace instance if configured
9375
+ */
9376
+ getWorkspace(): Workspace | undefined;
8631
9377
  /**
8632
9378
  * Get Memory instance if available
8633
9379
  */
@@ -11071,122 +11817,12 @@ declare class WorkflowRegistry extends SimpleEventEmitter {
11071
11817
  */
11072
11818
  declare function createSuspendController(): WorkflowSuspendController;
11073
11819
 
11074
- type PlanAgentTodoStatus = "pending" | "in_progress" | "done";
11075
- type PlanAgentTodoItem = {
11076
- id: string;
11077
- content: string;
11078
- status: PlanAgentTodoStatus;
11079
- createdAt?: string;
11080
- updatedAt?: string;
11081
- };
11082
- type PlanAgentFileData = {
11083
- content: string[];
11084
- created_at: string;
11085
- modified_at: string;
11086
- };
11087
- type PlanAgentState = {
11088
- todos?: PlanAgentTodoItem[];
11089
- files?: Record<string, PlanAgentFileData>;
11090
- };
11091
-
11092
- type MaybePromise<T> = T | Promise<T>;
11093
- interface FileInfo {
11094
- path: string;
11095
- is_dir?: boolean;
11096
- size?: number;
11097
- modified_at?: string;
11098
- }
11099
- interface GrepMatch {
11100
- path: string;
11101
- line: number;
11102
- text: string;
11103
- }
11104
- type FileData = PlanAgentFileData;
11105
- interface WriteResult {
11106
- error?: string;
11107
- path?: string;
11108
- filesUpdate?: Record<string, FileData> | null;
11109
- metadata?: Record<string, unknown>;
11110
- }
11111
- interface EditResult {
11112
- error?: string;
11113
- path?: string;
11114
- filesUpdate?: Record<string, FileData> | null;
11115
- occurrences?: number;
11116
- metadata?: Record<string, unknown>;
11117
- }
11118
- interface FilesystemBackend {
11119
- lsInfo(path: string): MaybePromise<FileInfo[]>;
11120
- read(filePath: string, offset?: number, limit?: number): MaybePromise<string>;
11121
- readRaw(filePath: string): MaybePromise<FileData>;
11122
- grepRaw(pattern: string, path?: string | null, glob?: string | null): MaybePromise<GrepMatch[] | string>;
11123
- globInfo(pattern: string, path?: string): MaybePromise<FileInfo[]>;
11124
- write(filePath: string, content: string): MaybePromise<WriteResult>;
11125
- edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): MaybePromise<EditResult>;
11126
- }
11127
- type FilesystemBackendContext = {
11128
- agent: Agent;
11129
- operationContext: OperationContext;
11130
- state: {
11131
- files?: Record<string, FileData>;
11132
- };
11133
- };
11134
- type FilesystemBackendFactory = (context: FilesystemBackendContext) => FilesystemBackend;
11135
-
11136
- declare class CompositeFilesystemBackend implements FilesystemBackend {
11137
- private defaultBackend;
11138
- private routes;
11139
- private sortedRoutes;
11140
- constructor(defaultBackend: FilesystemBackend, routes: Record<string, FilesystemBackend>);
11141
- private getBackendAndKey;
11142
- lsInfo(path: string): Promise<FileInfo[]>;
11143
- read(filePath: string, offset?: number, limit?: number): Promise<string>;
11144
- readRaw(filePath: string): Promise<FileData>;
11145
- grepRaw(pattern: string, path?: string, glob?: string | null): Promise<GrepMatch[] | string>;
11146
- globInfo(pattern: string, path?: string): Promise<FileInfo[]>;
11147
- write(filePath: string, content: string): Promise<WriteResult>;
11148
- edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): Promise<EditResult>;
11149
- }
11150
-
11151
- declare class NodeFilesystemBackend implements FilesystemBackend {
11152
- private cwd;
11153
- private virtualMode;
11154
- private maxFileSizeBytes;
11155
- constructor(options?: {
11156
- rootDir?: string;
11157
- virtualMode?: boolean;
11158
- maxFileSizeMb?: number;
11159
- });
11160
- private resolvePath;
11161
- lsInfo(dirPath: string): Promise<FileInfo[]>;
11162
- read(filePath: string, offset?: number, limit?: number): Promise<string>;
11163
- readRaw(filePath: string): Promise<FileData>;
11164
- write(filePath: string, content: string): Promise<WriteResult>;
11165
- edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): Promise<EditResult>;
11166
- grepRaw(pattern: string, dirPath?: string, glob?: string | null): Promise<GrepMatch[] | string>;
11167
- private ripgrepSearch;
11168
- private fallbackSearch;
11169
- globInfo(pattern: string, searchPath?: string): Promise<FileInfo[]>;
11170
- }
11171
-
11172
- declare class InMemoryFilesystemBackend implements FilesystemBackend {
11173
- private files;
11174
- constructor(files?: Record<string, FileData>);
11175
- private getFiles;
11176
- lsInfo(path: string): FileInfo[];
11177
- read(filePath: string, offset?: number, limit?: number): string;
11178
- readRaw(filePath: string): FileData;
11179
- write(filePath: string, content: string): WriteResult;
11180
- edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): EditResult;
11181
- grepRaw(pattern: string, path?: string, glob?: string | null): GrepMatch[] | string;
11182
- globInfo(pattern: string, path?: string): FileInfo[];
11183
- }
11184
-
11185
- declare const FILESYSTEM_SYSTEM_PROMPT = "You have access to a virtual filesystem. All file paths must start with a /.\n\n- ls: list files in a directory (requires absolute path)\n- read_file: read a file from the filesystem\n- write_file: write to a file in the filesystem\n- edit_file: edit a file in the filesystem\n- glob: find files matching a pattern (e.g., \"**/*.ts\")\n- grep: search for text within files";
11820
+ declare const FILESYSTEM_SYSTEM_PROMPT = "You have access to a virtual filesystem. All file paths must start with a /.\n\n- ls: list files in a directory (requires absolute path)\n- read_file: read a file from the filesystem\n- write_file: write to a file in the filesystem\n- edit_file: edit a file in the filesystem\n- delete_file: delete a file from the filesystem\n- glob: find files matching a pattern (e.g., \"**/*.ts\")\n- grep: search for text within files";
11186
11821
  declare const LS_TOOL_DESCRIPTION = "List files and directories in a directory";
11187
11822
  declare const READ_FILE_TOOL_DESCRIPTION = "Read the contents of a file";
11188
11823
  declare const WRITE_FILE_TOOL_DESCRIPTION = "Write content to a new file. Returns an error if the file already exists";
11189
11824
  declare const EDIT_FILE_TOOL_DESCRIPTION = "Edit a file by replacing a specific string with a new string";
11825
+ declare const DELETE_FILE_TOOL_DESCRIPTION = "Delete a file from the filesystem";
11190
11826
  declare const GLOB_TOOL_DESCRIPTION = "Find files matching a glob pattern (e.g., '**/*.ts' for all TypeScript files)";
11191
11827
  declare const GREP_TOOL_DESCRIPTION = "Search for a regex pattern in files. Returns matching files and line numbers";
11192
11828
  type FilesystemToolkitOptions = {
@@ -11203,6 +11839,20 @@ declare function createToolResultEvictor(options: {
11203
11839
  excludeToolNames?: string[];
11204
11840
  }): (tool: Tool<any, any>) => Tool<any, any>;
11205
11841
 
11842
+ type PlanAgentTodoStatus = "pending" | "in_progress" | "done";
11843
+ type PlanAgentTodoItem = {
11844
+ id: string;
11845
+ content: string;
11846
+ status: PlanAgentTodoStatus;
11847
+ createdAt?: string;
11848
+ updatedAt?: string;
11849
+ };
11850
+ type PlanAgentFileData = FileData;
11851
+ type PlanAgentState = {
11852
+ todos?: PlanAgentTodoItem[];
11853
+ files?: Record<string, PlanAgentFileData>;
11854
+ };
11855
+
11206
11856
  type TodoBackend = {
11207
11857
  listTodos(): Promise<PlanAgentTodoItem[]>;
11208
11858
  setTodos(todos: PlanAgentTodoItem[]): Promise<void>;
@@ -11243,7 +11893,7 @@ type TaskToolOptions = {
11243
11893
  maxSteps?: number;
11244
11894
  supervisorConfig?: SupervisorConfig;
11245
11895
  };
11246
- type PlanAgentOptions = Omit<AgentOptions, "instructions" | "tools" | "toolkits" | "subAgents" | "supervisorConfig"> & {
11896
+ type PlanAgentOptions = Omit<AgentOptions, "instructions" | "tools" | "toolkits" | "subAgents" | "supervisorConfig" | "workspace" | "workspaceToolkits"> & {
11247
11897
  systemPrompt?: InstructionsDynamicValue;
11248
11898
  tools?: (Tool<any, any> | Toolkit | Tool$1)[];
11249
11899
  toolkits?: Toolkit[];
@@ -13046,6 +13696,11 @@ type VoltAgentOptions = {
13046
13696
  * When enabled, agents expose searchTools/callTool and hide pool tools from the model.
13047
13697
  */
13048
13698
  toolRouting?: ToolRoutingConfig;
13699
+ /**
13700
+ * Optional global workspace instance or configuration.
13701
+ * Agents inherit this workspace unless they explicitly provide their own workspace or set it to false.
13702
+ */
13703
+ workspace?: Workspace | WorkspaceConfig;
13049
13704
  /** Optional VoltOps trigger handlers */
13050
13705
  triggers?: VoltAgentTriggersConfig;
13051
13706
  /**
@@ -14600,6 +15255,7 @@ declare class AgentRegistry {
14600
15255
  private globalAgentMemory?;
14601
15256
  private globalWorkflowMemory?;
14602
15257
  private globalToolRouting?;
15258
+ private globalWorkspace?;
14603
15259
  /**
14604
15260
  * Track parent-child relationships between agents (child -> parents)
14605
15261
  */
@@ -14718,6 +15374,14 @@ declare class AgentRegistry {
14718
15374
  * Get the global default tool routing configuration.
14719
15375
  */
14720
15376
  getGlobalToolRouting(): ToolRoutingConfig | undefined;
15377
+ /**
15378
+ * Set the global Workspace instance.
15379
+ */
15380
+ setGlobalWorkspace(workspace: Workspace | undefined): void;
15381
+ /**
15382
+ * Get the global Workspace instance.
15383
+ */
15384
+ getGlobalWorkspace(): Workspace | undefined;
14721
15385
  }
14722
15386
 
14723
15387
  type UpdateOptions = {
@@ -14788,6 +15452,9 @@ declare class VoltAgent {
14788
15452
  private readonly ensureEnvironmentBinding;
14789
15453
  private readonly triggerRegistry;
14790
15454
  private readonly agentRefs;
15455
+ readonly ready: Promise<void>;
15456
+ initError?: unknown;
15457
+ degraded: boolean;
14791
15458
  constructor(options: VoltAgentOptions);
14792
15459
  serverless(): IServerlessProvider;
14793
15460
  private ensureEnvironment;
@@ -14889,4 +15556,4 @@ declare class VoltAgent {
14889
15556
  */
14890
15557
  declare function convertUsage(usage: LanguageModelUsage | undefined): UsageInfo | undefined;
14891
15558
 
14892
- export { A2AServerRegistry, AbortError, Agent, type AgentEvalConfig, type AgentEvalContext, type AgentEvalFeedbackHelper, type AgentEvalFeedbackSaveInput, type AgentEvalOperationType, type AgentEvalPayload, type AgentEvalResult, type AgentEvalResultCallbackArgs, type AgentEvalSamplingPolicy, type AgentEvalScorerConfig, type AgentEvalScorerFactory, type AgentEvalScorerReference, type AgentFeedbackMetadata, type AgentFeedbackOptions, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnFallback, type AgentHookOnHandoff, type AgentHookOnHandoffComplete, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnRetry, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentModelConfig, type AgentModelReference, type AgentModelValue, type AgentOptions, AgentRegistry, type AgentResponse, type AgentScorerState, type AgentStatus, type AgentSummarizationOptions, 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, CompositeFilesystemBackend, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type ConversationStepRecord, type ConversationStepType, type ConversationTitleConfig, type ConversationTitleGenerator, ConversationTodoBackend, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateInputGuardrailOptions, type CreateInputMiddlewareOptions, type CreateOutputGuardrailOptions, type CreateOutputMiddlewareOptions, type CreateReasoningToolsOptions, type CreateScorerOptions, DEFAULT_INSTRUCTIONS, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, EDIT_FILE_TOOL_DESCRIPTION, type EditResult, type EmbeddingAdapter, type EmbeddingAdapterConfig, type EmbeddingAdapterInput, EmbeddingAdapterNotConfiguredError, EmbeddingError, type EmbeddingModelFactory, type EmbeddingModelReference, type EmbeddingRouterModelId, type ExtractVariableNames, FEW_SHOT_EXAMPLES, FILESYSTEM_SYSTEM_PROMPT, type FallbackStage, type FileData, type FileInfo, type FilesystemBackend, type FilesystemBackendContext, type FilesystemBackendFactory, type FilesystemToolkitOptions, GLOB_TOOL_DESCRIPTION, GREP_TOOL_DESCRIPTION, type GenerateObjectOptions, type GenerateObjectResultWithContext, type GenerateObjectSubAgentConfig, type GenerateReasonResult, type GenerateScoreResult, type GenerateScoreStep, type GenerateTextOptions, type GenerateTextResultWithContext, type GenerateTextSubAgentConfig, type GetConversationStepsOptions, type GetMessagesOptions, type GrepMatch, type GuardrailAction, type GuardrailContext, type GuardrailDefinition, type GuardrailFunction, type GuardrailSeverity, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, InMemoryFilesystemBackend, 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 InputMiddleware, type InputMiddlewareArgs, type InputMiddlewareResult, type KnowledgeBaseTagFilter, type LLMProvider, LS_TOOL_DESCRIPTION, type LanguageModelFactory, LazyRemoteExportProcessor, type LocalScorerDefinition, type LocalScorerExecutionResult, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, type MCPAuthorizationAction, type MCPAuthorizationConfig, type MCPAuthorizationContext, MCPAuthorizationError, type MCPCanFunction, type MCPCanParams, type MCPCanResult, MCPClient, type MCPClientCallOptions, type MCPClientConfig, MCPConfiguration, type MCPConfigurationOptions, type MCPElicitationAdapter, type MCPElicitationHandler, 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 ManagedMemoryDeleteMessagesInput, type ManagedMemoryGetMessagesInput, type ManagedMemoryMessagesClient, type ManagedMemoryQueryWorkflowRunsInput, 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, MiddlewareAbortError, type MiddlewareAbortOptions, type MiddlewareContext, type MiddlewareDefinition, type MiddlewareDirection, type MiddlewareFunction, type ModelForProvider, type ModelProvider, type ModelProviderEntry, type ModelProviderLoader, ModelProviderRegistry, type ModelRouterModelId, type ModelToolCall, NextAction, NodeFilesystemBackend, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnFallbackHookArgs, type OnHandoffCompleteHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnRetryHookArgs, type OnRetryHookArgsBase, type OnRetryLLMHookArgs, type OnRetryMiddlewareHookArgs, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolEndHookResult, type OnToolStartHookArgs, type OperationContext, type OutputGuardrail, type OutputGuardrailArgs, type OutputGuardrailResult, type OutputMiddleware, type OutputMiddlewareArgs, type OutputMiddlewareResult, type OutputSpec$1 as OutputSpec, type PackageUpdateInfo, PlanAgent, type PlanAgentExtension, type PlanAgentExtensionContext, type PlanAgentExtensionResult, type PlanAgentFileData, type PlanAgentOptions, type PlanAgentState, type PlanAgentSubagentDefinition, type PlanAgentTodoItem, type PlanAgentTodoStatus, type PlanningToolkitOptions, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderId, type ProviderModelsMap, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ProviderTool, READ_FILE_TOOL_DESCRIPTION, type RagKnowledgeBaseSummary, type RagSearchKnowledgeBaseChildChunk, type RagSearchKnowledgeBaseRequest, type RagSearchKnowledgeBaseResponse, type RagSearchKnowledgeBaseResult, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredTrigger, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type ResumableStreamAdapter, type ResumableStreamContext, type RetrieveOptions, type Retriever, type RetrieverOptions, type RetrySource, type RunLocalScorersArgs, type RunLocalScorersResult, SERVERLESS_ENV_CONTEXT_KEY, type SamplingMetadata, type SamplingPolicy, type ScorerBuilder, type ScorerContext, type ScorerLifecycleScope, type ScorerPipelineContext, type ScorerReasonContext, type ScorerResult, type SearchOptions, type SearchResult$1 as 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 StreamObjectResultWithContext, type StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextResultWithContext, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, TRIGGER_CONTEXT_KEY, type TaskToolOptions, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, type TodoBackend, type TodoBackendFactory, Tool, type ToolCall, type ToolContext, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, type ToolExecutionResult, type ToolHookOnEnd, type ToolHookOnEndArgs, type ToolHookOnEndResult, type ToolHookOnStart, type ToolHookOnStartArgs, type ToolHooks, ToolManager, type ToolOptions, type ToolResultOutput, type ToolRoutingConfig, type ToolRoutingEmbeddingConfig, type ToolRoutingEmbeddingInput, type ToolSchema, type ToolSearchCandidate, type ToolSearchContext, type ToolSearchResult, type ToolSearchResultItem, type ToolSearchSelection, type ToolSearchStrategy, 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, UserInputBridge, type UserInputHandler, type VectorAdapter$1 as VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem$1 as VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, VoltAgentRagRetriever, type VoltAgentRagRetrieverOptions, 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, type VoltOpsFeedback, type VoltOpsFeedbackConfig, type VoltOpsFeedbackCreateInput, type VoltOpsFeedbackExpiresIn, type VoltOpsFeedbackToken, type VoltOpsFeedbackTokenCreateInput, 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, WRITE_FILE_TOOL_DESCRIPTION, WRITE_TODOS_TOOL_DESCRIPTION, WRITE_TODOS_TOOL_NAME, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type WeightedBlendComponent, type WeightedBlendOptions, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, type WorkflowHookContext, type WorkflowHookStatus, type WorkflowHooks, WorkflowRegistry, type WorkflowRunQuery, type WorkflowStateEntry, type WorkflowStateStore, type WorkflowStateUpdater, type WorkflowStats, type WorkflowStepContext, type WorkflowStepData, type WorkflowStepStatus, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, type WriteResult, addTimestampToMessage, andAgent, andAll, andBranch, andDoUntil, andDoWhile, andForEach, andGuardrail, andMap, andRace, andSleep, andSleepUntil, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSamplingMetadata, buildScorer, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createDefaultInputSafetyGuardrails, createDefaultPIIGuardrails, createDefaultSafetyGuardrails, createEmailRedactorGuardrail, createEmbeddingToolSearchStrategy, createFilesystemToolkit, createHTMLSanitizerInputGuardrail, createHooks, createInputGuardrail, createInputLengthGuardrail, createInputMiddleware, createMaxLengthGuardrail, createNodeId, createOutputGuardrail, createOutputMiddleware, createPIIInputGuardrail, createPhoneNumberGuardrail, createPlanningToolkit, createProfanityGuardrail, createProfanityInputGuardrail, createPrompt, createPromptInjectionGuardrail, createReasoningTools, createRetrieverTool, createScorer, createSensitiveNumberGuardrail, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolResultEvictor, createToolkit, createTriggers, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, VoltAgent as default, defineVoltOpsTrigger, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getGlobalVoltOpsClient, getNodeTypeFromNodeId, getVoltOpsTriggerDefinition, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, isMiddlewareAbortError, isNodeRuntime, isServerlessRuntime, isStructuredContent, isTextContent, isVoltAgentError, mapMessageContent, messageHelpers, normalizeContent, normalizeScorerResult, normalizeToArray, prependToMessage, readableLogRecordToObservabilityLog, readableSpanToObservabilitySpan, runLocalScorers, safeJsonParse, serializeValueForDebug, setWaitUntil, shouldSample, tool, transformTextContent, updateAllPackages, updateSinglePackage, weightedBlend, zodSchemaToJsonUI };
15559
+ export { A2AServerRegistry, AbortError, Agent, type AgentEvalConfig, type AgentEvalContext, type AgentEvalFeedbackHelper, type AgentEvalFeedbackSaveInput, type AgentEvalOperationType, type AgentEvalPayload, type AgentEvalResult, type AgentEvalResultCallbackArgs, type AgentEvalSamplingPolicy, type AgentEvalScorerConfig, type AgentEvalScorerFactory, type AgentEvalScorerReference, type AgentFeedbackMetadata, type AgentFeedbackOptions, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnFallback, type AgentHookOnHandoff, type AgentHookOnHandoffComplete, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnRetry, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentModelConfig, type AgentModelReference, type AgentModelValue, type AgentOptions, AgentRegistry, type AgentResponse, type AgentScorerState, type AgentStatus, type AgentSummarizationOptions, 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, CompositeFilesystemBackend, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type ConversationStepRecord, type ConversationStepType, type ConversationTitleConfig, type ConversationTitleGenerator, ConversationTodoBackend, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateInputGuardrailOptions, type CreateInputMiddlewareOptions, type CreateOutputGuardrailOptions, type CreateOutputMiddlewareOptions, type CreateReasoningToolsOptions, type CreateScorerOptions, DEFAULT_INSTRUCTIONS, DELETE_FILE_TOOL_DESCRIPTION, type DataContent, type Document, type DynamicValue, type DynamicValueOptions, EDIT_FILE_TOOL_DESCRIPTION, type EditResult, type EmbeddingAdapter, type EmbeddingAdapterConfig, type EmbeddingAdapterInput, EmbeddingAdapterNotConfiguredError, EmbeddingError, type EmbeddingModelFactory, type EmbeddingModelReference, type EmbeddingRouterModelId, type ExtractVariableNames, FEW_SHOT_EXAMPLES, FILESYSTEM_SYSTEM_PROMPT, type FallbackStage, type FileData, type FileInfo, type FilesystemBackend, type FilesystemBackendContext, type FilesystemBackendFactory, type FilesystemToolkitOptions, GLOB_TOOL_DESCRIPTION, GREP_TOOL_DESCRIPTION, type GenerateObjectOptions, type GenerateObjectResultWithContext, type GenerateObjectSubAgentConfig, type GenerateReasonResult, type GenerateScoreResult, type GenerateScoreStep, type GenerateTextOptions, type GenerateTextResultWithContext, type GenerateTextSubAgentConfig, type GetConversationStepsOptions, type GetMessagesOptions, type GrepMatch, type GuardrailAction, type GuardrailContext, type GuardrailDefinition, type GuardrailFunction, type GuardrailSeverity, type IServerProvider, type IServerlessProvider, type VoltOpsClient$1 as IVoltOpsClient, InMemoryFilesystemBackend, 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 InputMiddleware, type InputMiddlewareArgs, type InputMiddlewareResult, type KnowledgeBaseTagFilter, type LLMProvider, LS_TOOL_DESCRIPTION, type LanguageModelFactory, LazyRemoteExportProcessor, LocalSandbox, type LocalSandboxIsolationOptions, type LocalSandboxIsolationProvider, type LocalSandboxOptions, type LocalScorerDefinition, type LocalScorerExecutionResult, LocalStorageSpanProcessor, type LogFilter, LoggerProxy, type MCPAuthorizationAction, type MCPAuthorizationConfig, type MCPAuthorizationContext, MCPAuthorizationError, type MCPCanFunction, type MCPCanParams, type MCPCanResult, MCPClient, type MCPClientCallOptions, type MCPClientConfig, MCPConfiguration, type MCPConfigurationOptions, type MCPElicitationAdapter, type MCPElicitationHandler, 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 ManagedMemoryDeleteMessagesInput, type ManagedMemoryGetMessagesInput, type ManagedMemoryMessagesClient, type ManagedMemoryQueryWorkflowRunsInput, 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, MiddlewareAbortError, type MiddlewareAbortOptions, type MiddlewareContext, type MiddlewareDefinition, type MiddlewareDirection, type MiddlewareFunction, type ModelForProvider, type ModelProvider, type ModelProviderEntry, type ModelProviderLoader, ModelProviderRegistry, type ModelRouterModelId, type ModelToolCall, NextAction, NodeFilesystemBackend, NodeType, VoltAgentObservability$1 as NodeVoltAgentObservability, type ObservabilityConfig, type ObservabilityLogRecord, type ObservabilitySpan, type ObservabilityStorageAdapter, type ObservabilityWebSocketEvent, type OnEndHookArgs, type OnErrorHookArgs, type OnFallbackHookArgs, type OnHandoffCompleteHookArgs, type OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnRetryHookArgs, type OnRetryHookArgsBase, type OnRetryLLMHookArgs, type OnRetryMiddlewareHookArgs, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolEndHookResult, type OnToolStartHookArgs, type OperationContext, type OutputGuardrail, type OutputGuardrailArgs, type OutputGuardrailResult, type OutputMiddleware, type OutputMiddlewareArgs, type OutputMiddlewareResult, type OutputSpec$1 as OutputSpec, type PackageUpdateInfo, PlanAgent, type PlanAgentExtension, type PlanAgentExtensionContext, type PlanAgentExtensionResult, type PlanAgentFileData, type PlanAgentOptions, type PlanAgentState, type PlanAgentSubagentDefinition, type PlanAgentTodoItem, type PlanAgentTodoStatus, type PlanningToolkitOptions, type PromptApiClient, type PromptApiResponse, type PromptContent, type PromptCreator, type PromptHelper, type PromptReference, type PromptTemplate, type ProviderId, type ProviderModelsMap, type ProviderObjectResponse, type ProviderObjectStreamResponse, type ProviderParams, type ProviderResponse, type ProviderTextResponse, type ProviderTextStreamResponse, type ProviderTool, READ_FILE_TOOL_DESCRIPTION, type RagKnowledgeBaseSummary, type RagSearchKnowledgeBaseChildChunk, type RagSearchKnowledgeBaseRequest, type RagSearchKnowledgeBaseResponse, type RagSearchKnowledgeBaseResult, type ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredTrigger, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type ResumableStreamAdapter, type ResumableStreamContext, type RetrieveOptions, type Retriever, type RetrieverOptions, type RetrySource, type RunLocalScorersArgs, type RunLocalScorersResult, SERVERLESS_ENV_CONTEXT_KEY, type SamplingMetadata, type SamplingPolicy, type ScorerBuilder, type ScorerContext, type ScorerLifecycleScope, type ScorerPipelineContext, type ScorerReasonContext, type ScorerResult, type SearchOptions, type SearchResult$1 as 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 StreamObjectResultWithContext, type StreamObjectSubAgentConfig, type StreamPart, type StreamTextFinishResult, type StreamTextOnFinishCallback, type StreamTextOptions, type StreamTextResultWithContext, type StreamTextSubAgentConfig, type SubAgentConfig, type SubAgentMethod, type SubAgentStateData, type SupervisorConfig, TRIGGER_CONTEXT_KEY, type TaskToolOptions, type TemplateVariables, type TimelineEventCoreLevel, type TimelineEventCoreStatus, type TimelineEventCoreType, type TodoBackend, type TodoBackendFactory, Tool, type ToolCall, type ToolContext, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, type ToolExecutionResult, type ToolHookOnEnd, type ToolHookOnEndArgs, type ToolHookOnEndResult, type ToolHookOnStart, type ToolHookOnStartArgs, type ToolHooks, ToolManager, type ToolOptions, type ToolResultOutput, type ToolRoutingConfig, type ToolRoutingEmbeddingConfig, type ToolRoutingEmbeddingInput, type ToolSchema, type ToolSearchCandidate, type ToolSearchContext, type ToolSearchResult, type ToolSearchResultItem, type ToolSearchSelection, type ToolSearchStrategy, 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, UserInputBridge, type UserInputHandler, type VectorAdapter$1 as VectorAdapter, VectorAdapterNotConfiguredError, VectorError, type VectorItem$1 as VectorItem, type VectorSearchOptions, type Voice, type VoiceEventData, type VoiceEventType, type VoiceMetadata, type VoiceOptions, VoltAgent, VoltAgentError, VoltAgentObservability, type VoltAgentOptions, VoltAgentRagRetriever, type VoltAgentRagRetrieverOptions, 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, type VoltOpsFeedback, type VoltOpsFeedbackConfig, type VoltOpsFeedbackCreateInput, type VoltOpsFeedbackExpiresIn, type VoltOpsFeedbackToken, type VoltOpsFeedbackTokenCreateInput, 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, WRITE_FILE_TOOL_DESCRIPTION, WRITE_TODOS_TOOL_DESCRIPTION, WRITE_TODOS_TOOL_NAME, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, type WeightedBlendComponent, type WeightedBlendOptions, type Workflow, type WorkflowConfig, type WorkflowExecutionContext, type WorkflowHookContext, type WorkflowHookStatus, type WorkflowHooks, WorkflowRegistry, type WorkflowRunQuery, type WorkflowStateEntry, type WorkflowStateStore, type WorkflowStateUpdater, type WorkflowStats, type WorkflowStepContext, type WorkflowStepData, type WorkflowStepStatus, type WorkflowStepType, type WorkflowTimelineEvent, type WorkingMemoryConfig, type WorkingMemoryScope, type WorkingMemorySummary, type WorkingMemoryUpdateOptions, Workspace, type WorkspaceConfig, type DeleteResult as WorkspaceDeleteResult, type EditResult as WorkspaceEditResult, type FileData as WorkspaceFileData, type FileInfo as WorkspaceFileInfo, WorkspaceFilesystem, type FilesystemBackend as WorkspaceFilesystemBackend, type FilesystemBackendContext as WorkspaceFilesystemBackendContext, type FilesystemBackendFactory as WorkspaceFilesystemBackendFactory, type WorkspaceFilesystemCallContext, type WorkspaceFilesystemConfig, type WorkspaceFilesystemDeleteOptions, type WorkspaceFilesystemOperationOptions, type WorkspaceFilesystemOptions, type WorkspaceFilesystemReadOptions, type WorkspaceFilesystemRmdirOptions, type WorkspaceFilesystemSearchOptions, type WorkspaceFilesystemToolName, type WorkspaceFilesystemToolPolicy, type WorkspaceFilesystemToolkitOptions, type WorkspaceFilesystemWriteOptions, type GrepMatch as WorkspaceGrepMatch, type WorkspaceIdentity, type WorkspaceInfo, type MkdirResult as WorkspaceMkdirResult, type WorkspacePathContext, type RmdirResult as WorkspaceRmdirResult, type WorkspaceSandbox, type WorkspaceSandboxExecuteOptions, type WorkspaceSandboxResult, type WorkspaceSandboxStatus, type WorkspaceSandboxToolName, type WorkspaceSandboxToolkitContext, type WorkspaceSandboxToolkitOptions, type WorkspaceScope, WorkspaceSearch, type WorkspaceSearchConfig, type WorkspaceSearchHybridWeights, type WorkspaceSearchIndexPath, type WorkspaceSearchIndexSummary, type WorkspaceSearchMode, type WorkspaceSearchOptions, type WorkspaceSearchResult, type WorkspaceSearchToolName, type WorkspaceSearchToolkitContext, type WorkspaceSearchToolkitOptions, type WorkspaceSkill, type WorkspaceSkillIndexSummary, type WorkspaceSkillMetadata, type WorkspaceSkillSearchHybridWeights, type WorkspaceSkillSearchMode, type WorkspaceSkillSearchOptions, type WorkspaceSkillSearchResult, WorkspaceSkills, type WorkspaceSkillsConfig, type WorkspaceSkillsPromptHookContext, type WorkspaceSkillsPromptOptions, type WorkspaceSkillsRootResolver, type WorkspaceSkillsRootResolverContext, type WorkspaceSkillsToolName, type WorkspaceSkillsToolkitContext, type WorkspaceSkillsToolkitOptions, type WorkspaceStatus, type WorkspaceToolConfig, type WorkspaceToolPolicies, type WorkspaceToolPolicy, type WorkspaceToolPolicyGroup, type WorkspaceToolkitOptions, type WriteResult as WorkspaceWriteResult, type WriteResult, addTimestampToMessage, andAgent, andAll, andBranch, andDoUntil, andDoWhile, andForEach, andGuardrail, andMap, andRace, andSleep, andSleepUntil, andTap, andThen, andWhen, andWorkflow, appendToMessage, buildRetrieverLogMessage, buildSamplingMetadata, buildScorer, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createDefaultInputSafetyGuardrails, createDefaultPIIGuardrails, createDefaultSafetyGuardrails, createEmailRedactorGuardrail, createEmbeddingToolSearchStrategy, createFilesystemToolkit, createHTMLSanitizerInputGuardrail, createHooks, createInputGuardrail, createInputLengthGuardrail, createInputMiddleware, createMaxLengthGuardrail, createNodeId, createOutputGuardrail, createOutputMiddleware, createPIIInputGuardrail, createPhoneNumberGuardrail, createPlanningToolkit, createProfanityGuardrail, createProfanityInputGuardrail, createPrompt, createPromptInjectionGuardrail, createReasoningTools, createRetrieverTool, createScorer, createSensitiveNumberGuardrail, createSimpleTemplateEngine, createSubagent, createSuspendController, createTool, createToolResultEvictor, createToolkit, createTriggers, createVoltAgentObservability, createVoltOpsClient, createWorkflow, createWorkflowChain, createWorkflowStepNodeId, createWorkspaceFilesystemToolkit, createWorkspaceSandboxToolkit, createWorkspaceSearchToolkit, createWorkspaceSkillsPromptHook, createWorkspaceSkillsToolkit, VoltAgent as default, defineVoltOpsTrigger, detectLocalSandboxIsolation, extractFileParts, extractImageParts, extractText, extractTextParts, extractWorkflowStepInfo, filterContentParts, getContentLength, getEnvVar, getGlobalLogBuffer, getGlobalLogger, getGlobalVoltOpsClient, getNodeTypeFromNodeId, getVoltOpsTriggerDefinition, getWorkflowStepNodeType, hasContent, hasFilePart, hasImagePart, hasTextPart, isAbortError, isMiddlewareAbortError, isNodeRuntime, isServerlessRuntime, isStructuredContent, isTextContent, isVoltAgentError, mapMessageContent, messageHelpers, normalizeContent, normalizeScorerResult, normalizeToArray, prependToMessage, readableLogRecordToObservabilityLog, readableSpanToObservabilitySpan, runLocalScorers, safeJsonParse, serializeValueForDebug, setWaitUntil, shouldSample, tool, transformTextContent, updateAllPackages, updateSinglePackage, weightedBlend, zodSchemaToJsonUI };