@voltagent/core 1.1.26 → 1.1.28
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 +629 -20
- package/dist/index.d.ts +629 -20
- package/dist/index.js +7894 -4134
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7875 -4127
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModelMessage, DataContent as DataContent$1, UserContent, AssistantContent, ToolContent, ProviderOptions as ProviderOptions$1 } from '@ai-sdk/provider-utils';
|
|
2
2
|
export { AssistantContent, FilePart, ImagePart, TextPart, ToolContent, UserContent } from '@ai-sdk/provider-utils';
|
|
3
3
|
import { TextStreamPart, generateText, UIMessage, StreamTextResult, LanguageModel, CallSettings, Output, ToolSet, GenerateTextResult, GenerateObjectResult, AsyncIterableStream as AsyncIterableStream$1, CallWarning, LanguageModelUsage, FinishReason, EmbeddingModel } from 'ai';
|
|
4
|
-
export { hasToolCall, stepCountIs } from 'ai';
|
|
4
|
+
export { LanguageModel, hasToolCall, stepCountIs } from 'ai';
|
|
5
5
|
import * as zod from 'zod';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { AsyncIterableStream } from '@voltagent/internal/utils';
|
|
@@ -639,13 +639,7 @@ type GetMessagesOptions = {
|
|
|
639
639
|
/**
|
|
640
640
|
* Memory options for MemoryManager
|
|
641
641
|
*/
|
|
642
|
-
type MemoryOptions = {
|
|
643
|
-
/**
|
|
644
|
-
* Maximum number of messages to store in the database
|
|
645
|
-
* @default 100
|
|
646
|
-
*/
|
|
647
|
-
storageLimit?: number;
|
|
648
|
-
};
|
|
642
|
+
type MemoryOptions = {};
|
|
649
643
|
/**
|
|
650
644
|
* Workflow state entry for suspension and resumption
|
|
651
645
|
* Stores only the essential state needed to resume a workflow
|
|
@@ -748,11 +742,6 @@ interface MemoryConfig {
|
|
|
748
742
|
* @default 3600000 (1 hour)
|
|
749
743
|
*/
|
|
750
744
|
cacheTTL?: number;
|
|
751
|
-
/**
|
|
752
|
-
* Maximum number of messages to store per conversation
|
|
753
|
-
* @default 100
|
|
754
|
-
*/
|
|
755
|
-
storageLimit?: number;
|
|
756
745
|
/**
|
|
757
746
|
* Working memory configuration
|
|
758
747
|
* Enables agents to maintain important context
|
|
@@ -1764,6 +1753,114 @@ interface VoltOpsPromptManager {
|
|
|
1764
1753
|
entries: string[];
|
|
1765
1754
|
};
|
|
1766
1755
|
}
|
|
1756
|
+
type VoltOpsEvalRunStatus = "pending" | "running" | "succeeded" | "failed" | "cancelled";
|
|
1757
|
+
type VoltOpsTerminalEvalRunStatus = "succeeded" | "failed" | "cancelled";
|
|
1758
|
+
type VoltOpsEvalResultStatus = "pending" | "running" | "passed" | "failed" | "error";
|
|
1759
|
+
interface VoltOpsEvalRunSummary {
|
|
1760
|
+
id: string;
|
|
1761
|
+
status: VoltOpsEvalRunStatus | string;
|
|
1762
|
+
triggerSource: string;
|
|
1763
|
+
datasetId?: string | null;
|
|
1764
|
+
datasetVersionId?: string | null;
|
|
1765
|
+
datasetVersionLabel?: string | null;
|
|
1766
|
+
itemCount: number;
|
|
1767
|
+
successCount: number;
|
|
1768
|
+
failureCount: number;
|
|
1769
|
+
meanScore?: number | null;
|
|
1770
|
+
medianScore?: number | null;
|
|
1771
|
+
sumScore?: number | null;
|
|
1772
|
+
passRate?: number | null;
|
|
1773
|
+
startedAt?: string | null;
|
|
1774
|
+
completedAt?: string | null;
|
|
1775
|
+
durationMs?: number | null;
|
|
1776
|
+
tags?: string[] | null;
|
|
1777
|
+
createdAt: string;
|
|
1778
|
+
updatedAt: string;
|
|
1779
|
+
}
|
|
1780
|
+
interface VoltOpsCreateEvalRunRequest {
|
|
1781
|
+
experimentId?: string;
|
|
1782
|
+
datasetVersionId?: string;
|
|
1783
|
+
providerCredentialId?: string;
|
|
1784
|
+
triggerSource?: string;
|
|
1785
|
+
autoQueue?: boolean;
|
|
1786
|
+
}
|
|
1787
|
+
interface VoltOpsEvalRunResultScorePayload {
|
|
1788
|
+
scorerId: string;
|
|
1789
|
+
score?: number | null;
|
|
1790
|
+
threshold?: number | null;
|
|
1791
|
+
thresholdPassed?: boolean | null;
|
|
1792
|
+
metadata?: Record<string, unknown> | null;
|
|
1793
|
+
}
|
|
1794
|
+
interface VoltOpsEvalRunResultLiveMetadata {
|
|
1795
|
+
traceId?: string | null;
|
|
1796
|
+
spanId?: string | null;
|
|
1797
|
+
operationId?: string | null;
|
|
1798
|
+
operationType?: string | null;
|
|
1799
|
+
sampling?: {
|
|
1800
|
+
strategy: string;
|
|
1801
|
+
rate?: number | null;
|
|
1802
|
+
} | null;
|
|
1803
|
+
triggerSource?: string | null;
|
|
1804
|
+
environment?: string | null;
|
|
1805
|
+
}
|
|
1806
|
+
interface VoltOpsAppendEvalRunResultPayload {
|
|
1807
|
+
id?: string;
|
|
1808
|
+
datasetItemId?: string | null;
|
|
1809
|
+
datasetItemHash: string;
|
|
1810
|
+
status?: VoltOpsEvalResultStatus;
|
|
1811
|
+
input?: unknown;
|
|
1812
|
+
expected?: unknown;
|
|
1813
|
+
output?: unknown;
|
|
1814
|
+
durationMs?: number | null;
|
|
1815
|
+
scores?: VoltOpsEvalRunResultScorePayload[];
|
|
1816
|
+
metadata?: Record<string, unknown> | null;
|
|
1817
|
+
traceIds?: string[] | null;
|
|
1818
|
+
liveEval?: VoltOpsEvalRunResultLiveMetadata | null;
|
|
1819
|
+
}
|
|
1820
|
+
interface VoltOpsAppendEvalRunResultsRequest {
|
|
1821
|
+
results: VoltOpsAppendEvalRunResultPayload[];
|
|
1822
|
+
}
|
|
1823
|
+
interface VoltOpsEvalRunCompletionSummaryPayload {
|
|
1824
|
+
itemCount?: number;
|
|
1825
|
+
successCount?: number;
|
|
1826
|
+
failureCount?: number;
|
|
1827
|
+
meanScore?: number | null;
|
|
1828
|
+
medianScore?: number | null;
|
|
1829
|
+
sumScore?: number | null;
|
|
1830
|
+
passRate?: number | null;
|
|
1831
|
+
durationMs?: number | null;
|
|
1832
|
+
metadata?: Record<string, unknown> | null;
|
|
1833
|
+
}
|
|
1834
|
+
interface VoltOpsEvalRunErrorPayload {
|
|
1835
|
+
message: string;
|
|
1836
|
+
code?: string;
|
|
1837
|
+
details?: Record<string, unknown>;
|
|
1838
|
+
}
|
|
1839
|
+
interface VoltOpsCompleteEvalRunRequest {
|
|
1840
|
+
status: VoltOpsTerminalEvalRunStatus;
|
|
1841
|
+
summary?: VoltOpsEvalRunCompletionSummaryPayload;
|
|
1842
|
+
error?: VoltOpsEvalRunErrorPayload;
|
|
1843
|
+
}
|
|
1844
|
+
interface VoltOpsCreateScorerRequest {
|
|
1845
|
+
id: string;
|
|
1846
|
+
name: string;
|
|
1847
|
+
category?: string | null;
|
|
1848
|
+
description?: string | null;
|
|
1849
|
+
defaultThreshold?: number | null;
|
|
1850
|
+
thresholdOperator?: string | null;
|
|
1851
|
+
metadata?: Record<string, unknown> | null;
|
|
1852
|
+
}
|
|
1853
|
+
interface VoltOpsScorerSummary {
|
|
1854
|
+
id: string;
|
|
1855
|
+
name: string;
|
|
1856
|
+
category?: string | null;
|
|
1857
|
+
description?: string | null;
|
|
1858
|
+
defaultThreshold?: number | null;
|
|
1859
|
+
thresholdOperator?: string | null;
|
|
1860
|
+
metadata?: Record<string, unknown> | null;
|
|
1861
|
+
createdAt: string;
|
|
1862
|
+
updatedAt: string;
|
|
1863
|
+
}
|
|
1767
1864
|
/**
|
|
1768
1865
|
* Main VoltOps client interface
|
|
1769
1866
|
*/
|
|
@@ -1776,6 +1873,14 @@ interface VoltOpsClient$1 {
|
|
|
1776
1873
|
};
|
|
1777
1874
|
/** Create a prompt helper for agent instructions */
|
|
1778
1875
|
createPromptHelper(agentId: string, historyEntryId?: string): PromptHelper;
|
|
1876
|
+
/** Create a new evaluation run in VoltOps */
|
|
1877
|
+
createEvalRun(payload?: VoltOpsCreateEvalRunRequest): Promise<VoltOpsEvalRunSummary>;
|
|
1878
|
+
/** Append evaluation results to an existing run */
|
|
1879
|
+
appendEvalRunResults(runId: string, payload: VoltOpsAppendEvalRunResultsRequest): Promise<VoltOpsEvalRunSummary>;
|
|
1880
|
+
/** Complete an evaluation run */
|
|
1881
|
+
completeEvalRun(runId: string, payload: VoltOpsCompleteEvalRunRequest): Promise<VoltOpsEvalRunSummary>;
|
|
1882
|
+
/** Upsert a scorer definition */
|
|
1883
|
+
createEvalScorer(payload: VoltOpsCreateScorerRequest): Promise<VoltOpsScorerSummary>;
|
|
1779
1884
|
/** List managed memory databases available to the project */
|
|
1780
1885
|
listManagedMemoryDatabases(): Promise<ManagedMemoryDatabaseSummary[]>;
|
|
1781
1886
|
/** List credentials for a managed memory database */
|
|
@@ -2013,6 +2118,10 @@ declare class VoltOpsClient implements VoltOpsClient$1 {
|
|
|
2013
2118
|
* Get prompt manager for direct access
|
|
2014
2119
|
*/
|
|
2015
2120
|
getPromptManager(): VoltOpsPromptManager | undefined;
|
|
2121
|
+
createEvalRun(payload?: VoltOpsCreateEvalRunRequest): Promise<VoltOpsEvalRunSummary>;
|
|
2122
|
+
appendEvalRunResults(runId: string, payload: VoltOpsAppendEvalRunResultsRequest): Promise<VoltOpsEvalRunSummary>;
|
|
2123
|
+
completeEvalRun(runId: string, payload: VoltOpsCompleteEvalRunRequest): Promise<VoltOpsEvalRunSummary>;
|
|
2124
|
+
createEvalScorer(payload: VoltOpsCreateScorerRequest): Promise<VoltOpsScorerSummary>;
|
|
2016
2125
|
private request;
|
|
2017
2126
|
private buildQueryString;
|
|
2018
2127
|
private createManagedMemoryClient;
|
|
@@ -2054,6 +2163,9 @@ declare class VoltOpsClient implements VoltOpsClient$1 {
|
|
|
2054
2163
|
* Cleanup resources when client is no longer needed
|
|
2055
2164
|
*/
|
|
2056
2165
|
dispose(): Promise<void>;
|
|
2166
|
+
private normalizeRunSummary;
|
|
2167
|
+
private normalizeDate;
|
|
2168
|
+
private normalizeScorerSummary;
|
|
2057
2169
|
}
|
|
2058
2170
|
/**
|
|
2059
2171
|
* Factory function to create VoltOps client
|
|
@@ -2251,6 +2363,203 @@ interface VoltAgentStreamTextResult<TOOLS extends Record<string, any> = Record<s
|
|
|
2251
2363
|
readonly fullStream: AsyncIterable<VoltAgentTextStreamPart<TOOLS>>;
|
|
2252
2364
|
}
|
|
2253
2365
|
|
|
2366
|
+
type SamplingPolicy = {
|
|
2367
|
+
type: "always";
|
|
2368
|
+
} | {
|
|
2369
|
+
type: "never";
|
|
2370
|
+
} | {
|
|
2371
|
+
type: "ratio";
|
|
2372
|
+
rate: number;
|
|
2373
|
+
};
|
|
2374
|
+
interface SamplingMetadata {
|
|
2375
|
+
strategy: "always" | "never" | "ratio";
|
|
2376
|
+
rate?: number;
|
|
2377
|
+
applied?: boolean;
|
|
2378
|
+
}
|
|
2379
|
+
interface ScorerContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>> {
|
|
2380
|
+
payload: Payload;
|
|
2381
|
+
params: Params;
|
|
2382
|
+
}
|
|
2383
|
+
type ScorerResult = {
|
|
2384
|
+
status?: "success";
|
|
2385
|
+
score?: number | null;
|
|
2386
|
+
metadata?: Record<string, unknown> | null;
|
|
2387
|
+
} | {
|
|
2388
|
+
status: "error";
|
|
2389
|
+
score?: number | null;
|
|
2390
|
+
metadata?: Record<string, unknown> | null;
|
|
2391
|
+
error: unknown;
|
|
2392
|
+
} | {
|
|
2393
|
+
status: "skipped";
|
|
2394
|
+
score?: number | null;
|
|
2395
|
+
metadata?: Record<string, unknown> | null;
|
|
2396
|
+
};
|
|
2397
|
+
interface LocalScorerDefinition<Payload extends Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>> {
|
|
2398
|
+
id: string;
|
|
2399
|
+
name: string;
|
|
2400
|
+
scorer: (context: ScorerContext<Payload, Params>) => ScorerResult | Promise<ScorerResult>;
|
|
2401
|
+
params?: Params | ((payload: Payload) => Params | undefined | Promise<Params | undefined>);
|
|
2402
|
+
metadata?: Record<string, unknown> | null;
|
|
2403
|
+
sampling?: SamplingPolicy;
|
|
2404
|
+
}
|
|
2405
|
+
interface LocalScorerExecutionResult {
|
|
2406
|
+
id: string;
|
|
2407
|
+
name: string;
|
|
2408
|
+
status: "success" | "error" | "skipped";
|
|
2409
|
+
score: number | null;
|
|
2410
|
+
metadata: Record<string, unknown> | null;
|
|
2411
|
+
sampling?: SamplingMetadata;
|
|
2412
|
+
durationMs: number;
|
|
2413
|
+
error?: unknown;
|
|
2414
|
+
}
|
|
2415
|
+
interface ScorerLifecycleScope {
|
|
2416
|
+
run<T>(executor: () => T | Promise<T>): Promise<T>;
|
|
2417
|
+
}
|
|
2418
|
+
interface RunLocalScorersArgs<Payload extends Record<string, unknown>> {
|
|
2419
|
+
payload: Payload;
|
|
2420
|
+
scorers: LocalScorerDefinition<Payload>[];
|
|
2421
|
+
defaultSampling?: SamplingPolicy;
|
|
2422
|
+
baseArgs?: Record<string, unknown> | ((payload: Payload) => Record<string, unknown> | Promise<Record<string, unknown>>);
|
|
2423
|
+
onScorerStart?: (info: {
|
|
2424
|
+
definition: LocalScorerDefinition<Payload>;
|
|
2425
|
+
sampling?: SamplingMetadata;
|
|
2426
|
+
}) => ScorerLifecycleScope | undefined;
|
|
2427
|
+
onScorerComplete?: (info: {
|
|
2428
|
+
definition: LocalScorerDefinition<Payload>;
|
|
2429
|
+
execution: LocalScorerExecutionResult;
|
|
2430
|
+
context?: ScorerLifecycleScope;
|
|
2431
|
+
}) => void;
|
|
2432
|
+
}
|
|
2433
|
+
interface RunLocalScorersResult {
|
|
2434
|
+
results: LocalScorerExecutionResult[];
|
|
2435
|
+
summary: {
|
|
2436
|
+
successCount: number;
|
|
2437
|
+
errorCount: number;
|
|
2438
|
+
skippedCount: number;
|
|
2439
|
+
};
|
|
2440
|
+
}
|
|
2441
|
+
interface NormalizedScorerResult {
|
|
2442
|
+
score?: number | null;
|
|
2443
|
+
metadata?: Record<string, unknown> | null;
|
|
2444
|
+
error?: unknown;
|
|
2445
|
+
status?: "success" | "error" | "skipped";
|
|
2446
|
+
}
|
|
2447
|
+
declare function runLocalScorers<Payload extends Record<string, unknown>>(args: RunLocalScorersArgs<Payload>): Promise<RunLocalScorersResult>;
|
|
2448
|
+
declare function shouldSample(policy?: SamplingPolicy): boolean;
|
|
2449
|
+
declare function buildSamplingMetadata(policy?: SamplingPolicy): SamplingMetadata | undefined;
|
|
2450
|
+
declare function normalizeScorerResult(result: unknown): NormalizedScorerResult;
|
|
2451
|
+
|
|
2452
|
+
interface ScorerPipelineContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> {
|
|
2453
|
+
payload: Payload;
|
|
2454
|
+
params: Params;
|
|
2455
|
+
results: Record<string, unknown>;
|
|
2456
|
+
}
|
|
2457
|
+
interface ScorerReasonContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> extends ScorerPipelineContext<Payload, Params> {
|
|
2458
|
+
score: number | null;
|
|
2459
|
+
}
|
|
2460
|
+
type PreprocessFunctionStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: ScorerPipelineContext<Payload, Params>) => unknown | Promise<unknown>;
|
|
2461
|
+
type AnalyzeFunctionStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: ScorerPipelineContext<Payload, Params>) => unknown | Promise<unknown>;
|
|
2462
|
+
type GenerateScoreResult = number | {
|
|
2463
|
+
score: number;
|
|
2464
|
+
metadata?: Record<string, unknown> | null;
|
|
2465
|
+
};
|
|
2466
|
+
type PreprocessStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = PreprocessFunctionStep<Payload, Params>;
|
|
2467
|
+
type AnalyzeStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = AnalyzeFunctionStep<Payload, Params>;
|
|
2468
|
+
type GenerateScoreStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: ScorerPipelineContext<Payload, Params>) => GenerateScoreResult | Promise<GenerateScoreResult>;
|
|
2469
|
+
type GenerateReasonResult = string | {
|
|
2470
|
+
reason: string;
|
|
2471
|
+
metadata?: Record<string, unknown> | null;
|
|
2472
|
+
};
|
|
2473
|
+
type GenerateReasonStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: ScorerReasonContext<Payload, Params>) => GenerateReasonResult | Promise<GenerateReasonResult>;
|
|
2474
|
+
interface CreateScorerOptions<Payload extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>> {
|
|
2475
|
+
id: string;
|
|
2476
|
+
name?: string;
|
|
2477
|
+
metadata?: Record<string, unknown> | null;
|
|
2478
|
+
preprocess?: PreprocessStep<Payload, Params>;
|
|
2479
|
+
analyze?: AnalyzeStep<Payload, Params>;
|
|
2480
|
+
generateScore?: GenerateScoreStep<Payload, Params>;
|
|
2481
|
+
generateReason?: GenerateReasonStep<Payload, Params>;
|
|
2482
|
+
}
|
|
2483
|
+
declare function createScorer<Payload extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>>(options: CreateScorerOptions<Payload, Params>): LocalScorerDefinition<Payload, Params>;
|
|
2484
|
+
interface WeightedBlendComponent<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> {
|
|
2485
|
+
id: string;
|
|
2486
|
+
weight: number;
|
|
2487
|
+
step?: GenerateScoreStep<Payload, Params>;
|
|
2488
|
+
}
|
|
2489
|
+
interface WeightedBlendOptions {
|
|
2490
|
+
metadataKey?: string;
|
|
2491
|
+
}
|
|
2492
|
+
declare function weightedBlend<Payload extends Record<string, unknown>, Params extends Record<string, unknown>>(components: WeightedBlendComponent<Payload, Params>[], options?: WeightedBlendOptions): GenerateScoreStep<Payload, Params>;
|
|
2493
|
+
|
|
2494
|
+
interface BuilderResultsSnapshot {
|
|
2495
|
+
prepare?: unknown;
|
|
2496
|
+
analyze?: unknown;
|
|
2497
|
+
score?: number | null;
|
|
2498
|
+
reason?: string | null;
|
|
2499
|
+
raw: Record<string, unknown>;
|
|
2500
|
+
}
|
|
2501
|
+
interface BuilderContextBase<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> {
|
|
2502
|
+
payload: Payload;
|
|
2503
|
+
params: Params;
|
|
2504
|
+
results: BuilderResultsSnapshot;
|
|
2505
|
+
}
|
|
2506
|
+
interface BuilderPrepareContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> extends BuilderContextBase<Payload, Params> {
|
|
2507
|
+
kind: "prepare";
|
|
2508
|
+
}
|
|
2509
|
+
interface BuilderAnalyzeContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> extends BuilderContextBase<Payload, Params> {
|
|
2510
|
+
kind: "analyze";
|
|
2511
|
+
}
|
|
2512
|
+
interface BuilderScoreContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> extends BuilderContextBase<Payload, Params> {
|
|
2513
|
+
kind: "score";
|
|
2514
|
+
}
|
|
2515
|
+
interface BuilderReasonContext<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> extends BuilderContextBase<Payload, Params> {
|
|
2516
|
+
kind: "reason";
|
|
2517
|
+
score: number | null;
|
|
2518
|
+
}
|
|
2519
|
+
type BuilderPrepareStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: BuilderPrepareContext<Payload, Params>) => unknown | Promise<unknown>;
|
|
2520
|
+
type BuilderAnalyzeStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: BuilderAnalyzeContext<Payload, Params>) => unknown | Promise<unknown>;
|
|
2521
|
+
type BuilderScoreStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: BuilderScoreContext<Payload, Params>) => GenerateScoreResult | number | Promise<GenerateScoreResult | number>;
|
|
2522
|
+
type BuilderReasonStep<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> = (context: BuilderReasonContext<Payload, Params>) => GenerateReasonResult | string | Promise<GenerateReasonResult | string>;
|
|
2523
|
+
type BuildScorerCustomOptions<Payload extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>> = {
|
|
2524
|
+
id: string;
|
|
2525
|
+
label?: string;
|
|
2526
|
+
description?: string;
|
|
2527
|
+
metadata?: Record<string, unknown> | null;
|
|
2528
|
+
sampling?: SamplingPolicy;
|
|
2529
|
+
params?: Params | ((payload: Payload) => Params | undefined | Promise<Params | undefined>);
|
|
2530
|
+
};
|
|
2531
|
+
type BuildScorerOptions<Payload extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>> = BuildScorerCustomOptions<Payload, Params>;
|
|
2532
|
+
interface BuildScorerRunArgs<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> {
|
|
2533
|
+
payload: Payload;
|
|
2534
|
+
params?: Params;
|
|
2535
|
+
sampling?: SamplingPolicy;
|
|
2536
|
+
}
|
|
2537
|
+
interface BuildScorerRunResult<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> {
|
|
2538
|
+
id: string;
|
|
2539
|
+
status: "success" | "error" | "skipped";
|
|
2540
|
+
score: number | null;
|
|
2541
|
+
reason?: string;
|
|
2542
|
+
metadata: Record<string, unknown> | null;
|
|
2543
|
+
durationMs: number;
|
|
2544
|
+
sampling?: ReturnType<typeof buildSamplingMetadata>;
|
|
2545
|
+
rawResult: ScorerResult;
|
|
2546
|
+
payload: Payload;
|
|
2547
|
+
params: Params;
|
|
2548
|
+
steps: BuilderResultsSnapshot;
|
|
2549
|
+
}
|
|
2550
|
+
interface ScorerBuilder<Payload extends Record<string, unknown>, Params extends Record<string, unknown>> {
|
|
2551
|
+
prepare(step: BuilderPrepareStep<Payload, Params>): ScorerBuilder<Payload, Params>;
|
|
2552
|
+
analyze(step: BuilderAnalyzeStep<Payload, Params>): ScorerBuilder<Payload, Params>;
|
|
2553
|
+
score(step: BuilderScoreStep<Payload, Params>): ScorerBuilder<Payload, Params>;
|
|
2554
|
+
reason(step: BuilderReasonStep<Payload, Params>): ScorerBuilder<Payload, Params>;
|
|
2555
|
+
build(): LocalScorerDefinition<Payload, Params>;
|
|
2556
|
+
run(args: BuildScorerRunArgs<Payload, Params>): Promise<BuildScorerRunResult<Payload, Params>>;
|
|
2557
|
+
getId(): string;
|
|
2558
|
+
getLabel(): string;
|
|
2559
|
+
getDescription(): string | undefined;
|
|
2560
|
+
}
|
|
2561
|
+
declare function buildScorer<Payload extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, unknown> = Record<string, unknown>>(options: BuildScorerOptions<Payload, Params>): ScorerBuilder<Payload, Params>;
|
|
2562
|
+
|
|
2254
2563
|
/**
|
|
2255
2564
|
* Unified Observability Types for VoltAgent
|
|
2256
2565
|
*
|
|
@@ -3161,7 +3470,7 @@ declare class AgentTraceContext {
|
|
|
3161
3470
|
/**
|
|
3162
3471
|
* Create a child span with automatic parent context and attribute inheritance
|
|
3163
3472
|
*/
|
|
3164
|
-
createChildSpan(name: string, type: "tool" | "memory" | "retriever" | "embedding" | "vector" | "agent", options?: {
|
|
3473
|
+
createChildSpan(name: string, type: "tool" | "memory" | "retriever" | "embedding" | "vector" | "agent" | "guardrail", options?: {
|
|
3165
3474
|
label?: string;
|
|
3166
3475
|
attributes?: Record<string, any>;
|
|
3167
3476
|
kind?: SpanKind$1;
|
|
@@ -3169,7 +3478,7 @@ declare class AgentTraceContext {
|
|
|
3169
3478
|
/**
|
|
3170
3479
|
* Create a child span with a specific parent span
|
|
3171
3480
|
*/
|
|
3172
|
-
createChildSpanWithParent(parentSpan: Span, name: string, type: "tool" | "memory" | "retriever" | "embedding" | "vector" | "agent", options?: {
|
|
3481
|
+
createChildSpanWithParent(parentSpan: Span, name: string, type: "tool" | "memory" | "retriever" | "embedding" | "vector" | "agent" | "guardrail", options?: {
|
|
3173
3482
|
label?: string;
|
|
3174
3483
|
attributes?: Record<string, any>;
|
|
3175
3484
|
kind?: SpanKind$1;
|
|
@@ -3220,6 +3529,7 @@ declare class AgentTraceContext {
|
|
|
3220
3529
|
error?: Error | any;
|
|
3221
3530
|
attributes?: Record<string, any>;
|
|
3222
3531
|
}): void;
|
|
3532
|
+
private resolveParentSpan;
|
|
3223
3533
|
/**
|
|
3224
3534
|
* Get the active context for manual context propagation
|
|
3225
3535
|
*/
|
|
@@ -3244,6 +3554,15 @@ interface ApiToolInfo {
|
|
|
3244
3554
|
interface ToolWithNodeId extends BaseTool {
|
|
3245
3555
|
node_id: string;
|
|
3246
3556
|
}
|
|
3557
|
+
interface AgentScorerState {
|
|
3558
|
+
key: string;
|
|
3559
|
+
id: string;
|
|
3560
|
+
name: string;
|
|
3561
|
+
node_id: string;
|
|
3562
|
+
sampling?: SamplingPolicy;
|
|
3563
|
+
metadata?: Record<string, unknown> | null;
|
|
3564
|
+
params?: Record<string, unknown> | null;
|
|
3565
|
+
}
|
|
3247
3566
|
/**
|
|
3248
3567
|
* SubAgent data structure for agent state
|
|
3249
3568
|
*/
|
|
@@ -3257,6 +3576,8 @@ interface SubAgentStateData {
|
|
|
3257
3576
|
memory?: AgentMemoryState;
|
|
3258
3577
|
node_id: string;
|
|
3259
3578
|
subAgents?: SubAgentStateData[];
|
|
3579
|
+
scorers?: AgentScorerState[];
|
|
3580
|
+
guardrails?: AgentGuardrailStateGroup;
|
|
3260
3581
|
methodConfig?: {
|
|
3261
3582
|
method: string;
|
|
3262
3583
|
schema?: string;
|
|
@@ -3304,12 +3625,14 @@ interface AgentFullState {
|
|
|
3304
3625
|
tools: ToolWithNodeId[];
|
|
3305
3626
|
subAgents: SubAgentStateData[];
|
|
3306
3627
|
memory: AgentMemoryState;
|
|
3628
|
+
scorers?: AgentScorerState[];
|
|
3307
3629
|
retriever?: {
|
|
3308
3630
|
name: string;
|
|
3309
3631
|
description?: string;
|
|
3310
3632
|
status?: string;
|
|
3311
3633
|
node_id: string;
|
|
3312
3634
|
} | null;
|
|
3635
|
+
guardrails?: AgentGuardrailStateGroup;
|
|
3313
3636
|
}
|
|
3314
3637
|
/**
|
|
3315
3638
|
* Enhanced dynamic value for instructions that supports prompt management
|
|
@@ -3396,6 +3719,121 @@ type SupervisorConfig = {
|
|
|
3396
3719
|
*/
|
|
3397
3720
|
includeErrorInEmptyResponse?: boolean;
|
|
3398
3721
|
};
|
|
3722
|
+
type GuardrailSeverity = "info" | "warning" | "critical";
|
|
3723
|
+
type GuardrailAction = "allow" | "modify" | "block";
|
|
3724
|
+
interface GuardrailBaseResult {
|
|
3725
|
+
pass: boolean;
|
|
3726
|
+
action?: GuardrailAction;
|
|
3727
|
+
message?: string;
|
|
3728
|
+
metadata?: Record<string, unknown>;
|
|
3729
|
+
}
|
|
3730
|
+
interface OutputGuardrailStreamArgs extends GuardrailContext {
|
|
3731
|
+
part: VoltAgentTextStreamPart;
|
|
3732
|
+
streamParts: VoltAgentTextStreamPart[];
|
|
3733
|
+
state: Record<string, any>;
|
|
3734
|
+
abort: (reason?: string) => never;
|
|
3735
|
+
}
|
|
3736
|
+
type OutputGuardrailStreamResult = VoltAgentTextStreamPart | null | undefined | Promise<VoltAgentTextStreamPart | null | undefined>;
|
|
3737
|
+
type OutputGuardrailStreamHandler = (args: OutputGuardrailStreamArgs) => OutputGuardrailStreamResult;
|
|
3738
|
+
type GuardrailFunctionMetadata = {
|
|
3739
|
+
guardrailId?: string;
|
|
3740
|
+
guardrailName?: string;
|
|
3741
|
+
guardrailDescription?: string;
|
|
3742
|
+
guardrailTags?: string[];
|
|
3743
|
+
guardrailSeverity?: GuardrailSeverity;
|
|
3744
|
+
};
|
|
3745
|
+
type GuardrailFunction<TArgs, TResult> = ((args: TArgs) => TResult | Promise<TResult>) & GuardrailFunctionMetadata;
|
|
3746
|
+
interface GuardrailDefinition<TArgs, TResult> {
|
|
3747
|
+
id?: string;
|
|
3748
|
+
name?: string;
|
|
3749
|
+
description?: string;
|
|
3750
|
+
tags?: string[];
|
|
3751
|
+
severity?: GuardrailSeverity;
|
|
3752
|
+
metadata?: Record<string, unknown>;
|
|
3753
|
+
handler: GuardrailFunction<TArgs, TResult>;
|
|
3754
|
+
}
|
|
3755
|
+
type GuardrailConfig<TArgs, TResult> = GuardrailFunction<TArgs, TResult> | GuardrailDefinition<TArgs, TResult>;
|
|
3756
|
+
interface AgentGuardrailState {
|
|
3757
|
+
id?: string;
|
|
3758
|
+
name: string;
|
|
3759
|
+
direction: "input" | "output";
|
|
3760
|
+
description?: string;
|
|
3761
|
+
severity?: GuardrailSeverity;
|
|
3762
|
+
tags?: string[];
|
|
3763
|
+
metadata?: Record<string, unknown> | null;
|
|
3764
|
+
node_id: string;
|
|
3765
|
+
}
|
|
3766
|
+
interface AgentGuardrailStateGroup {
|
|
3767
|
+
input: AgentGuardrailState[];
|
|
3768
|
+
output: AgentGuardrailState[];
|
|
3769
|
+
}
|
|
3770
|
+
interface GuardrailContext {
|
|
3771
|
+
agent: Agent;
|
|
3772
|
+
context: OperationContext;
|
|
3773
|
+
operation: AgentEvalOperationType;
|
|
3774
|
+
}
|
|
3775
|
+
interface InputGuardrailArgs extends GuardrailContext {
|
|
3776
|
+
/**
|
|
3777
|
+
* The latest value after any previous guardrail modifications.
|
|
3778
|
+
*/
|
|
3779
|
+
input: string | UIMessage[] | BaseMessage[];
|
|
3780
|
+
/**
|
|
3781
|
+
* Plain text representation of the latest input value.
|
|
3782
|
+
*/
|
|
3783
|
+
inputText: string;
|
|
3784
|
+
/**
|
|
3785
|
+
* The original user provided value before any guardrail modifications.
|
|
3786
|
+
*/
|
|
3787
|
+
originalInput: string | UIMessage[] | BaseMessage[];
|
|
3788
|
+
/**
|
|
3789
|
+
* Plain text representation of the original input value.
|
|
3790
|
+
*/
|
|
3791
|
+
originalInputText: string;
|
|
3792
|
+
}
|
|
3793
|
+
interface InputGuardrailResult extends GuardrailBaseResult {
|
|
3794
|
+
modifiedInput?: string | UIMessage[] | BaseMessage[];
|
|
3795
|
+
}
|
|
3796
|
+
interface OutputGuardrailArgs<TOutput = unknown> extends GuardrailContext {
|
|
3797
|
+
/**
|
|
3798
|
+
* The latest value after any previous guardrail modifications.
|
|
3799
|
+
*/
|
|
3800
|
+
output: TOutput;
|
|
3801
|
+
/**
|
|
3802
|
+
* Optional plain text representation of the latest output value.
|
|
3803
|
+
*/
|
|
3804
|
+
outputText?: string;
|
|
3805
|
+
/**
|
|
3806
|
+
* The original value produced by the model before guardrail modifications.
|
|
3807
|
+
*/
|
|
3808
|
+
originalOutput: TOutput;
|
|
3809
|
+
/**
|
|
3810
|
+
* Optional plain text representation of the original output value.
|
|
3811
|
+
*/
|
|
3812
|
+
originalOutputText?: string;
|
|
3813
|
+
/**
|
|
3814
|
+
* Optional usage metrics for the generation.
|
|
3815
|
+
*/
|
|
3816
|
+
usage?: UsageInfo;
|
|
3817
|
+
/**
|
|
3818
|
+
* Optional finish reason from the model/provider.
|
|
3819
|
+
*/
|
|
3820
|
+
finishReason?: string | null;
|
|
3821
|
+
/**
|
|
3822
|
+
* Optional warnings or diagnostics returned by the provider.
|
|
3823
|
+
*/
|
|
3824
|
+
warnings?: unknown[] | null;
|
|
3825
|
+
}
|
|
3826
|
+
interface OutputGuardrailResult<TOutput = unknown> extends GuardrailBaseResult {
|
|
3827
|
+
modifiedOutput?: TOutput;
|
|
3828
|
+
}
|
|
3829
|
+
type InputGuardrail = GuardrailConfig<InputGuardrailArgs, InputGuardrailResult>;
|
|
3830
|
+
type OutputGuardrailFunction<TOutput = unknown> = GuardrailFunction<OutputGuardrailArgs<TOutput>, OutputGuardrailResult<TOutput>> & {
|
|
3831
|
+
guardrailStreamHandler?: OutputGuardrailStreamHandler;
|
|
3832
|
+
};
|
|
3833
|
+
interface OutputGuardrailDefinition<TOutput = unknown> extends GuardrailDefinition<OutputGuardrailArgs<TOutput>, OutputGuardrailResult<TOutput>> {
|
|
3834
|
+
streamHandler?: OutputGuardrailStreamHandler;
|
|
3835
|
+
}
|
|
3836
|
+
type OutputGuardrail<TOutput = unknown> = OutputGuardrailFunction<TOutput> | OutputGuardrailDefinition<TOutput>;
|
|
3399
3837
|
/**
|
|
3400
3838
|
* Agent configuration options
|
|
3401
3839
|
*/
|
|
@@ -3413,6 +3851,8 @@ type AgentOptions = {
|
|
|
3413
3851
|
supervisorConfig?: SupervisorConfig;
|
|
3414
3852
|
maxHistoryEntries?: number;
|
|
3415
3853
|
hooks?: AgentHooks;
|
|
3854
|
+
inputGuardrails?: InputGuardrail[];
|
|
3855
|
+
outputGuardrails?: OutputGuardrail<any>[];
|
|
3416
3856
|
temperature?: number;
|
|
3417
3857
|
maxOutputTokens?: number;
|
|
3418
3858
|
maxSteps?: number;
|
|
@@ -3427,7 +3867,59 @@ type AgentOptions = {
|
|
|
3427
3867
|
voltOpsClient?: VoltOpsClient;
|
|
3428
3868
|
observability?: VoltAgentObservability;
|
|
3429
3869
|
context?: ContextInput;
|
|
3870
|
+
eval?: AgentEvalConfig;
|
|
3871
|
+
};
|
|
3872
|
+
type AgentEvalOperationType = "generateText" | "streamText" | "generateObject" | "streamObject";
|
|
3873
|
+
interface AgentEvalPayload {
|
|
3874
|
+
operationId: string;
|
|
3875
|
+
operationType: AgentEvalOperationType;
|
|
3876
|
+
input?: string | null;
|
|
3877
|
+
output?: string | null;
|
|
3878
|
+
rawInput?: string | UIMessage[] | BaseMessage[];
|
|
3879
|
+
rawOutput?: unknown;
|
|
3880
|
+
userId?: string;
|
|
3881
|
+
conversationId?: string;
|
|
3882
|
+
traceId: string;
|
|
3883
|
+
spanId: string;
|
|
3884
|
+
metadata?: Record<string, unknown>;
|
|
3885
|
+
}
|
|
3886
|
+
type AgentEvalContext = AgentEvalPayload & Record<string, unknown> & {
|
|
3887
|
+
agentId: string;
|
|
3888
|
+
agentName: string;
|
|
3889
|
+
timestamp: string;
|
|
3890
|
+
rawPayload: AgentEvalPayload;
|
|
3430
3891
|
};
|
|
3892
|
+
type AgentEvalParams = Record<string, unknown>;
|
|
3893
|
+
type AgentEvalSamplingPolicy = SamplingPolicy;
|
|
3894
|
+
type AgentEvalScorerFactory = () => LocalScorerDefinition<AgentEvalContext, Record<string, unknown>> | Promise<LocalScorerDefinition<AgentEvalContext, Record<string, unknown>>>;
|
|
3895
|
+
type AgentEvalScorerReference = LocalScorerDefinition<AgentEvalContext, Record<string, unknown>> | AgentEvalScorerFactory;
|
|
3896
|
+
interface AgentEvalResult {
|
|
3897
|
+
scorerId: string;
|
|
3898
|
+
scorerName?: string;
|
|
3899
|
+
status: "success" | "error" | "skipped";
|
|
3900
|
+
score?: number | null;
|
|
3901
|
+
metadata?: Record<string, unknown> | null;
|
|
3902
|
+
error?: unknown;
|
|
3903
|
+
durationMs?: number;
|
|
3904
|
+
payload: AgentEvalPayload;
|
|
3905
|
+
rawPayload: AgentEvalPayload;
|
|
3906
|
+
}
|
|
3907
|
+
interface AgentEvalScorerConfig {
|
|
3908
|
+
scorer: AgentEvalScorerReference;
|
|
3909
|
+
params?: AgentEvalParams | ((context: AgentEvalContext) => AgentEvalParams | undefined | Promise<AgentEvalParams | undefined>);
|
|
3910
|
+
sampling?: AgentEvalSamplingPolicy;
|
|
3911
|
+
id?: string;
|
|
3912
|
+
onResult?: (result: AgentEvalResult) => void | Promise<void>;
|
|
3913
|
+
buildPayload?: (context: AgentEvalContext) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
3914
|
+
buildParams?: (context: AgentEvalContext) => AgentEvalParams | undefined | Promise<AgentEvalParams | undefined>;
|
|
3915
|
+
}
|
|
3916
|
+
interface AgentEvalConfig {
|
|
3917
|
+
scorers: Record<string, AgentEvalScorerConfig>;
|
|
3918
|
+
triggerSource?: string;
|
|
3919
|
+
environment?: string;
|
|
3920
|
+
sampling?: AgentEvalSamplingPolicy;
|
|
3921
|
+
redact?: (payload: AgentEvalPayload) => AgentEvalPayload;
|
|
3922
|
+
}
|
|
3431
3923
|
/**
|
|
3432
3924
|
* Agent status information
|
|
3433
3925
|
*/
|
|
@@ -3871,6 +4363,8 @@ interface BaseGenerationOptions extends Partial<CallSettings> {
|
|
|
3871
4363
|
stopWhen?: StopWhen;
|
|
3872
4364
|
tools?: (Tool<any, any> | Toolkit)[];
|
|
3873
4365
|
hooks?: AgentHooks;
|
|
4366
|
+
inputGuardrails?: InputGuardrail[];
|
|
4367
|
+
outputGuardrails?: OutputGuardrail<any>[];
|
|
3874
4368
|
providerOptions?: ProviderOptions$1;
|
|
3875
4369
|
experimental_output?: ReturnType<typeof Output.object> | ReturnType<typeof Output.text>;
|
|
3876
4370
|
}
|
|
@@ -3907,6 +4401,9 @@ declare class Agent {
|
|
|
3907
4401
|
private readonly subAgentManager;
|
|
3908
4402
|
private readonly voltOpsClient?;
|
|
3909
4403
|
private readonly prompts?;
|
|
4404
|
+
private readonly evalConfig?;
|
|
4405
|
+
private readonly inputGuardrails;
|
|
4406
|
+
private readonly outputGuardrails;
|
|
3910
4407
|
constructor(options: AgentOptions);
|
|
3911
4408
|
/**
|
|
3912
4409
|
* Generate text response
|
|
@@ -3924,6 +4421,7 @@ declare class Agent {
|
|
|
3924
4421
|
* Stream structured object
|
|
3925
4422
|
*/
|
|
3926
4423
|
streamObject<T extends z.ZodType>(input: string | UIMessage[] | BaseMessage[], schema: T, options?: StreamObjectOptions): Promise<StreamObjectResultWithContext<z.infer<T>>>;
|
|
4424
|
+
private resolveGuardrailSets;
|
|
3927
4425
|
/**
|
|
3928
4426
|
* Common preparation for all execution methods
|
|
3929
4427
|
*/
|
|
@@ -3947,6 +4445,8 @@ declare class Agent {
|
|
|
3947
4445
|
* Calculate delegation depth
|
|
3948
4446
|
*/
|
|
3949
4447
|
private calculateDelegationDepth;
|
|
4448
|
+
private enqueueEvalScoring;
|
|
4449
|
+
private createEvalHost;
|
|
3950
4450
|
/**
|
|
3951
4451
|
* Get observability instance (lazy initialization)
|
|
3952
4452
|
*/
|
|
@@ -6089,6 +6589,117 @@ type CreateReasoningToolsOptions = {
|
|
|
6089
6589
|
*/
|
|
6090
6590
|
declare const createReasoningTools: (options?: CreateReasoningToolsOptions) => Toolkit;
|
|
6091
6591
|
|
|
6592
|
+
type BaseGuardrailOptions = {
|
|
6593
|
+
id?: string;
|
|
6594
|
+
name?: string;
|
|
6595
|
+
description?: string;
|
|
6596
|
+
severity?: GuardrailSeverity;
|
|
6597
|
+
};
|
|
6598
|
+
type SensitiveNumberGuardrailOptions = BaseGuardrailOptions & {
|
|
6599
|
+
/**
|
|
6600
|
+
* Minimum digit run length that will be redacted.
|
|
6601
|
+
* @default 4
|
|
6602
|
+
*/
|
|
6603
|
+
minimumDigits?: number;
|
|
6604
|
+
/**
|
|
6605
|
+
* Replacement text used for redacted segments.
|
|
6606
|
+
* @default "[redacted]"
|
|
6607
|
+
*/
|
|
6608
|
+
replacement?: string;
|
|
6609
|
+
};
|
|
6610
|
+
type EmailGuardrailOptions = BaseGuardrailOptions & {
|
|
6611
|
+
replacement?: string;
|
|
6612
|
+
};
|
|
6613
|
+
type PhoneGuardrailOptions = BaseGuardrailOptions & {
|
|
6614
|
+
replacement?: string;
|
|
6615
|
+
};
|
|
6616
|
+
type ProfanityGuardrailMode = "redact" | "block";
|
|
6617
|
+
type ProfanityGuardrailOptions = BaseGuardrailOptions & {
|
|
6618
|
+
bannedWords?: string[];
|
|
6619
|
+
replacement?: string;
|
|
6620
|
+
mode?: ProfanityGuardrailMode;
|
|
6621
|
+
};
|
|
6622
|
+
type MaxLengthGuardrailMode = "truncate" | "block";
|
|
6623
|
+
type MaxLengthGuardrailOptions = BaseGuardrailOptions & {
|
|
6624
|
+
maxCharacters: number;
|
|
6625
|
+
mode?: MaxLengthGuardrailMode;
|
|
6626
|
+
};
|
|
6627
|
+
type InputGuardrailBaseOptions = BaseGuardrailOptions & {
|
|
6628
|
+
message?: string;
|
|
6629
|
+
};
|
|
6630
|
+
type ProfanityInputGuardrailOptions = InputGuardrailBaseOptions & {
|
|
6631
|
+
bannedWords?: string[];
|
|
6632
|
+
replacement?: string;
|
|
6633
|
+
mode?: "mask" | "block";
|
|
6634
|
+
};
|
|
6635
|
+
type PIIInputGuardrailOptions = InputGuardrailBaseOptions & {
|
|
6636
|
+
replacement?: string;
|
|
6637
|
+
maskEmails?: boolean;
|
|
6638
|
+
maskPhones?: boolean;
|
|
6639
|
+
};
|
|
6640
|
+
type PromptInjectionGuardrailOptions = InputGuardrailBaseOptions & {
|
|
6641
|
+
phrases?: string[];
|
|
6642
|
+
};
|
|
6643
|
+
type InputLengthGuardrailOptions = InputGuardrailBaseOptions & {
|
|
6644
|
+
maxCharacters: number;
|
|
6645
|
+
mode?: MaxLengthGuardrailMode;
|
|
6646
|
+
};
|
|
6647
|
+
type HTMLSanitizerGuardrailOptions = InputGuardrailBaseOptions & {
|
|
6648
|
+
allowBasicFormatting?: boolean;
|
|
6649
|
+
};
|
|
6650
|
+
/**
|
|
6651
|
+
* Creates a guardrail that redacts long numeric sequences such as account or card numbers.
|
|
6652
|
+
*/
|
|
6653
|
+
declare function createSensitiveNumberGuardrail(options?: SensitiveNumberGuardrailOptions): OutputGuardrail<string>;
|
|
6654
|
+
/**
|
|
6655
|
+
* Creates a guardrail that redacts email addresses.
|
|
6656
|
+
*/
|
|
6657
|
+
declare function createEmailRedactorGuardrail(options?: EmailGuardrailOptions): OutputGuardrail<string>;
|
|
6658
|
+
/**
|
|
6659
|
+
* Creates a guardrail that redacts common phone number patterns.
|
|
6660
|
+
*/
|
|
6661
|
+
declare function createPhoneNumberGuardrail(options?: PhoneGuardrailOptions): OutputGuardrail<string>;
|
|
6662
|
+
/**
|
|
6663
|
+
* Creates a guardrail that detects profanity and either redacts or blocks output.
|
|
6664
|
+
*/
|
|
6665
|
+
declare function createProfanityGuardrail(options?: ProfanityGuardrailOptions): OutputGuardrail<string>;
|
|
6666
|
+
/**
|
|
6667
|
+
* Guardrail that enforces a maximum character length.
|
|
6668
|
+
*/
|
|
6669
|
+
declare function createMaxLengthGuardrail(options: MaxLengthGuardrailOptions): OutputGuardrail<string>;
|
|
6670
|
+
declare function createProfanityInputGuardrail(options?: ProfanityInputGuardrailOptions): InputGuardrail;
|
|
6671
|
+
declare function createPIIInputGuardrail(options?: PIIInputGuardrailOptions): InputGuardrail;
|
|
6672
|
+
declare function createPromptInjectionGuardrail(options?: PromptInjectionGuardrailOptions): InputGuardrail;
|
|
6673
|
+
declare function createInputLengthGuardrail(options: InputLengthGuardrailOptions): InputGuardrail;
|
|
6674
|
+
declare function createHTMLSanitizerInputGuardrail(options?: HTMLSanitizerGuardrailOptions): InputGuardrail;
|
|
6675
|
+
declare function createDefaultInputSafetyGuardrails(): InputGuardrail[];
|
|
6676
|
+
/**
|
|
6677
|
+
* Convenience helper that returns a collection of common PII guardrails.
|
|
6678
|
+
*/
|
|
6679
|
+
declare function createDefaultPIIGuardrails(options?: {
|
|
6680
|
+
sensitiveNumber?: SensitiveNumberGuardrailOptions;
|
|
6681
|
+
email?: EmailGuardrailOptions;
|
|
6682
|
+
phone?: PhoneGuardrailOptions;
|
|
6683
|
+
}): OutputGuardrail<string>[];
|
|
6684
|
+
/**
|
|
6685
|
+
* Convenience helper that returns commonly recommended safety guardrails.
|
|
6686
|
+
*/
|
|
6687
|
+
declare function createDefaultSafetyGuardrails(options?: {
|
|
6688
|
+
profanity?: ProfanityGuardrailOptions;
|
|
6689
|
+
maxLength?: MaxLengthGuardrailOptions;
|
|
6690
|
+
}): OutputGuardrail<string>[];
|
|
6691
|
+
|
|
6692
|
+
type EmptyGuardrailExtras = Record<never, never>;
|
|
6693
|
+
type CreateGuardrailDefinition<TArgs, TResult, TExtra extends Record<PropertyKey, unknown> = EmptyGuardrailExtras> = Omit<GuardrailDefinition<TArgs, TResult>, keyof TExtra | "handler"> & TExtra & {
|
|
6694
|
+
handler: GuardrailFunction<TArgs, TResult>;
|
|
6695
|
+
};
|
|
6696
|
+
type CreateInputGuardrailOptions = CreateGuardrailDefinition<InputGuardrailArgs, InputGuardrailResult>;
|
|
6697
|
+
type CreateOutputGuardrailOptions<TOutput = unknown> = CreateGuardrailDefinition<OutputGuardrailArgs<TOutput>, OutputGuardrailResult<TOutput>, {
|
|
6698
|
+
streamHandler?: OutputGuardrailStreamHandler;
|
|
6699
|
+
}>;
|
|
6700
|
+
declare function createInputGuardrail(options: CreateInputGuardrailOptions): InputGuardrail;
|
|
6701
|
+
declare function createOutputGuardrail<TOutput = unknown>(options: CreateOutputGuardrailOptions<TOutput>): OutputGuardrail<TOutput>;
|
|
6702
|
+
|
|
6092
6703
|
/**
|
|
6093
6704
|
* In-Memory Storage Adapter for Memory V2
|
|
6094
6705
|
* Stores conversations and messages in memory
|
|
@@ -6104,10 +6715,6 @@ declare class InMemoryStorageAdapter implements StorageAdapter {
|
|
|
6104
6715
|
private users;
|
|
6105
6716
|
private workflowStates;
|
|
6106
6717
|
private workflowStatesByWorkflow;
|
|
6107
|
-
private storageLimit;
|
|
6108
|
-
constructor(options?: {
|
|
6109
|
-
storageLimit?: number;
|
|
6110
|
-
});
|
|
6111
6718
|
/**
|
|
6112
6719
|
* Add a single message
|
|
6113
6720
|
*/
|
|
@@ -7032,9 +7639,11 @@ declare enum NodeType {
|
|
|
7032
7639
|
MEMORY = "memory",
|
|
7033
7640
|
MESSAGE = "message",
|
|
7034
7641
|
OUTPUT = "output",
|
|
7642
|
+
GUARDRAIL = "guardrail",
|
|
7035
7643
|
RETRIEVER = "retriever",
|
|
7036
7644
|
VECTOR = "vector",
|
|
7037
7645
|
EMBEDDING = "embedding",
|
|
7646
|
+
SCORER = "scorer",
|
|
7038
7647
|
WORKFLOW_STEP = "workflow_step",
|
|
7039
7648
|
WORKFLOW_AGENT_STEP = "workflow_agent_step",
|
|
7040
7649
|
WORKFLOW_FUNC_STEP = "workflow_func_step",
|
|
@@ -7665,4 +8274,4 @@ declare class VoltAgent {
|
|
|
7665
8274
|
*/
|
|
7666
8275
|
declare function convertUsage(usage: LanguageModelUsage | undefined): UsageInfo | undefined;
|
|
7667
8276
|
|
|
7668
|
-
export { A2AServerRegistry, AbortError, Agent, type AgentFullState, type AgentHookOnEnd, type AgentHookOnError, type AgentHookOnHandoff, type AgentHookOnPrepareMessages, type AgentHookOnPrepareModelMessages, type AgentHookOnStart, type AgentHookOnStepFinish, type AgentHookOnToolEnd, type AgentHookOnToolStart, type AgentHooks, type AgentOptions, AgentRegistry, type AgentResponse, type AgentStatus, type AgentTool, AiSdkEmbeddingAdapter, type AllowedVariableValue, type ApiToolInfo, type BaseEventMetadata, type BaseGenerationOptions, type BaseLLMOptions, type BaseMessage, BaseRetriever, type BaseTool, type BaseToolCall, type CachedPrompt, type ChatMessage, ClientHTTPError, type ClientSideToolResult, type CloudflareFetchHandler, type Conversation, ConversationAlreadyExistsError, ConversationNotFoundError, type ConversationQueryOptions, type ConversationQueryOptions as ConversationQueryOptionsV2, type Conversation as ConversationV2, type CreateConversationInput, type CreateConversationInput as CreateConversationInputV2, type CreateReasoningToolsOptions, 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 GenerateTextOptions, type GenerateTextSubAgentConfig, type GetMessagesOptions, 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 LLMProvider, LazyRemoteExportProcessor, 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 OnHandoffHookArgs, type OnPrepareMessagesHookArgs, type OnPrepareMessagesHookResult, type OnPrepareModelMessagesHookArgs, type OnPrepareModelMessagesHookResult, type OnStartHookArgs, type OnStepFinishHookArgs, type OnToolEndHookArgs, type OnToolStartHookArgs, type OperationContext, 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 ReadableStreamType, type ReasoningStep, ReasoningStepSchema, type RegisterOptions, type RegisteredWorkflow, type RemoteLogExportConfig, RemoteLogProcessor, type RetrieveOptions, type Retriever, type RetrieverOptions, 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, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, ToolManager, type ToolOptions, 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, VoltOpsClient, type VoltOpsClientOptions, VoltOpsPromptApiClient, type VoltOpsPromptManager, VoltOpsPromptManagerImpl, WebSocketEventEmitter, WebSocketLogProcessor, WebSocketSpanProcessor, 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, buildSpanTree, checkForUpdates, convertUsage, cosineSimilarity, createHooks, createNodeId, createPrompt, createReasoningTools, createRetrieverTool, 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, normalizeToArray, prependToMessage, readableLogRecordToObservabilityLog, readableSpanToObservabilitySpan, safeJsonParse, serializeValueForDebug, tool, transformTextContent, updateAllPackages, updateSinglePackage, zodSchemaToJsonUI };
|
|
8277
|
+
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 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 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 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 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 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, ToolDeniedError, type ToolErrorInfo, type ToolExecuteOptions, ToolManager, type ToolOptions, 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 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 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 };
|