langchain 1.5.15 → 1.5.17
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/CHANGELOG.md +16 -0
- package/dist/agents/ReactAgent.cjs +1 -1
- package/dist/agents/ReactAgent.cjs.map +1 -1
- package/dist/agents/ReactAgent.d.cts +1 -2
- package/dist/agents/ReactAgent.d.cts.map +1 -1
- package/dist/agents/ReactAgent.d.ts +1 -2
- package/dist/agents/ReactAgent.d.ts.map +1 -1
- package/dist/agents/ReactAgent.js +2 -2
- package/dist/agents/ReactAgent.js.map +1 -1
- package/dist/agents/constants.d.cts +2 -3
- package/dist/agents/constants.d.cts.map +1 -1
- package/dist/agents/constants.d.ts +2 -3
- package/dist/agents/constants.d.ts.map +1 -1
- package/dist/agents/errors.d.cts +5 -6
- package/dist/agents/errors.d.cts.map +1 -1
- package/dist/agents/errors.d.ts +5 -6
- package/dist/agents/errors.d.ts.map +1 -1
- package/dist/agents/index.d.cts +14 -14
- package/dist/agents/index.d.cts.map +1 -1
- package/dist/agents/index.d.ts +14 -14
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/middleware/contextEditing.d.cts +5 -6
- package/dist/agents/middleware/contextEditing.d.cts.map +1 -1
- package/dist/agents/middleware/contextEditing.d.ts +5 -6
- package/dist/agents/middleware/contextEditing.d.ts.map +1 -1
- package/dist/agents/middleware/dynamicSystemPrompt.d.cts +2 -3
- package/dist/agents/middleware/dynamicSystemPrompt.d.cts.map +1 -1
- package/dist/agents/middleware/dynamicSystemPrompt.d.ts +2 -3
- package/dist/agents/middleware/dynamicSystemPrompt.d.ts.map +1 -1
- package/dist/agents/middleware/hitl.cjs +24 -8
- package/dist/agents/middleware/hitl.cjs.map +1 -1
- package/dist/agents/middleware/hitl.d.cts +40 -30
- package/dist/agents/middleware/hitl.d.cts.map +1 -1
- package/dist/agents/middleware/hitl.d.ts +40 -30
- package/dist/agents/middleware/hitl.d.ts.map +1 -1
- package/dist/agents/middleware/hitl.js +24 -8
- package/dist/agents/middleware/hitl.js.map +1 -1
- package/dist/agents/middleware/index.d.cts +2 -2
- package/dist/agents/middleware/index.d.ts +2 -2
- package/dist/agents/middleware/llmToolSelector.d.cts +3 -4
- package/dist/agents/middleware/llmToolSelector.d.cts.map +1 -1
- package/dist/agents/middleware/llmToolSelector.d.ts +3 -4
- package/dist/agents/middleware/llmToolSelector.d.ts.map +1 -1
- package/dist/agents/middleware/modelCallLimit.d.cts +2 -3
- package/dist/agents/middleware/modelCallLimit.d.cts.map +1 -1
- package/dist/agents/middleware/modelCallLimit.d.ts +2 -3
- package/dist/agents/middleware/modelCallLimit.d.ts.map +1 -1
- package/dist/agents/middleware/modelFallback.d.cts +1 -2
- package/dist/agents/middleware/modelFallback.d.cts.map +1 -1
- package/dist/agents/middleware/modelFallback.d.ts +1 -2
- package/dist/agents/middleware/modelFallback.d.ts.map +1 -1
- package/dist/agents/middleware/modelRetry.d.cts +3 -4
- package/dist/agents/middleware/modelRetry.d.cts.map +1 -1
- package/dist/agents/middleware/modelRetry.d.ts +3 -4
- package/dist/agents/middleware/modelRetry.d.ts.map +1 -1
- package/dist/agents/middleware/pii.d.cts +17 -18
- package/dist/agents/middleware/pii.d.cts.map +1 -1
- package/dist/agents/middleware/pii.d.ts +17 -18
- package/dist/agents/middleware/pii.d.ts.map +1 -1
- package/dist/agents/middleware/piiRedaction.d.cts +2 -3
- package/dist/agents/middleware/piiRedaction.d.cts.map +1 -1
- package/dist/agents/middleware/piiRedaction.d.ts +2 -3
- package/dist/agents/middleware/piiRedaction.d.ts.map +1 -1
- package/dist/agents/middleware/provider/anthropic/promptCaching.d.cts +2 -3
- package/dist/agents/middleware/provider/anthropic/promptCaching.d.cts.map +1 -1
- package/dist/agents/middleware/provider/anthropic/promptCaching.d.ts +2 -3
- package/dist/agents/middleware/provider/anthropic/promptCaching.d.ts.map +1 -1
- package/dist/agents/middleware/provider/aws/promptCaching.d.cts +2 -3
- package/dist/agents/middleware/provider/aws/promptCaching.d.cts.map +1 -1
- package/dist/agents/middleware/provider/aws/promptCaching.d.ts +2 -3
- package/dist/agents/middleware/provider/aws/promptCaching.d.ts.map +1 -1
- package/dist/agents/middleware/provider/openai/moderation.d.cts +2 -3
- package/dist/agents/middleware/provider/openai/moderation.d.cts.map +1 -1
- package/dist/agents/middleware/provider/openai/moderation.d.ts +2 -3
- package/dist/agents/middleware/provider/openai/moderation.d.ts.map +1 -1
- package/dist/agents/middleware/providerToolSearch.d.cts +3 -4
- package/dist/agents/middleware/providerToolSearch.d.cts.map +1 -1
- package/dist/agents/middleware/providerToolSearch.d.ts +3 -4
- package/dist/agents/middleware/providerToolSearch.d.ts.map +1 -1
- package/dist/agents/middleware/summarization.d.cts +7 -8
- package/dist/agents/middleware/summarization.d.cts.map +1 -1
- package/dist/agents/middleware/summarization.d.ts +7 -8
- package/dist/agents/middleware/summarization.d.ts.map +1 -1
- package/dist/agents/middleware/todoListMiddleware.d.cts +4 -5
- package/dist/agents/middleware/todoListMiddleware.d.cts.map +1 -1
- package/dist/agents/middleware/todoListMiddleware.d.ts +4 -5
- package/dist/agents/middleware/todoListMiddleware.d.ts.map +1 -1
- package/dist/agents/middleware/toolCallLimit.d.cts +4 -5
- package/dist/agents/middleware/toolCallLimit.d.cts.map +1 -1
- package/dist/agents/middleware/toolCallLimit.d.ts +4 -5
- package/dist/agents/middleware/toolCallLimit.d.ts.map +1 -1
- package/dist/agents/middleware/toolEmulator.d.cts +2 -3
- package/dist/agents/middleware/toolEmulator.d.cts.map +1 -1
- package/dist/agents/middleware/toolEmulator.d.ts +2 -3
- package/dist/agents/middleware/toolEmulator.d.ts.map +1 -1
- package/dist/agents/middleware/toolError.d.cts +3 -4
- package/dist/agents/middleware/toolError.d.cts.map +1 -1
- package/dist/agents/middleware/toolError.d.ts +3 -4
- package/dist/agents/middleware/toolError.d.ts.map +1 -1
- package/dist/agents/middleware/toolRetry.d.cts +3 -4
- package/dist/agents/middleware/toolRetry.d.cts.map +1 -1
- package/dist/agents/middleware/toolRetry.d.ts +3 -4
- package/dist/agents/middleware/toolRetry.d.ts.map +1 -1
- package/dist/agents/middleware/types.d.cts +42 -43
- package/dist/agents/middleware/types.d.cts.map +1 -1
- package/dist/agents/middleware/types.d.ts +42 -43
- package/dist/agents/middleware/types.d.ts.map +1 -1
- package/dist/agents/middleware/utils.d.cts +1 -2
- package/dist/agents/middleware/utils.d.cts.map +1 -1
- package/dist/agents/middleware/utils.d.ts +1 -2
- package/dist/agents/middleware/utils.d.ts.map +1 -1
- package/dist/agents/middleware.d.cts +1 -2
- package/dist/agents/middleware.d.cts.map +1 -1
- package/dist/agents/middleware.d.ts +1 -2
- package/dist/agents/middleware.d.ts.map +1 -1
- package/dist/agents/model.d.cts +1 -2
- package/dist/agents/model.d.cts.map +1 -1
- package/dist/agents/model.d.ts +1 -2
- package/dist/agents/model.d.ts.map +1 -1
- package/dist/agents/nodes/types.d.cts +1 -2
- package/dist/agents/nodes/types.d.cts.map +1 -1
- package/dist/agents/nodes/types.d.ts +1 -2
- package/dist/agents/nodes/types.d.ts.map +1 -1
- package/dist/agents/responses.d.cts +18 -19
- package/dist/agents/responses.d.cts.map +1 -1
- package/dist/agents/responses.d.ts +18 -19
- package/dist/agents/responses.d.ts.map +1 -1
- package/dist/agents/runtime.d.cts +6 -6
- package/dist/agents/runtime.d.cts.map +1 -1
- package/dist/agents/runtime.d.ts +6 -6
- package/dist/agents/runtime.d.ts.map +1 -1
- package/dist/agents/tests/utils.d.cts +1 -2
- package/dist/agents/tests/utils.d.cts.map +1 -1
- package/dist/agents/tests/utils.d.ts +1 -2
- package/dist/agents/tests/utils.d.ts.map +1 -1
- package/dist/agents/transformers/subagent.d.cts +1 -2
- package/dist/agents/transformers/subagent.d.cts.map +1 -1
- package/dist/agents/transformers/subagent.d.ts +1 -2
- package/dist/agents/transformers/subagent.d.ts.map +1 -1
- package/dist/agents/transformers/tool-call.d.cts +1 -2
- package/dist/agents/transformers/tool-call.d.cts.map +1 -1
- package/dist/agents/transformers/tool-call.d.ts +1 -2
- package/dist/agents/transformers/tool-call.d.ts.map +1 -1
- package/dist/agents/transformers/types.d.cts +4 -5
- package/dist/agents/transformers/types.d.cts.map +1 -1
- package/dist/agents/transformers/types.d.ts +4 -5
- package/dist/agents/transformers/types.d.ts.map +1 -1
- package/dist/agents/types.d.cts +30 -30
- package/dist/agents/types.d.cts.map +1 -1
- package/dist/agents/types.d.ts +30 -30
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/browser.d.cts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/chat_models/universal.d.cts +11 -12
- package/dist/chat_models/universal.d.cts.map +1 -1
- package/dist/chat_models/universal.d.ts +11 -12
- package/dist/chat_models/universal.d.ts.map +1 -1
- package/dist/hub/base.d.cts +1 -2
- package/dist/hub/base.d.cts.map +1 -1
- package/dist/hub/base.d.ts +1 -2
- package/dist/hub/base.d.ts.map +1 -1
- package/dist/hub/index.d.cts +2 -2
- package/dist/hub/index.d.cts.map +1 -1
- package/dist/hub/index.d.ts +2 -2
- package/dist/hub/index.d.ts.map +1 -1
- package/dist/hub/node.d.cts +3 -3
- package/dist/hub/node.d.cts.map +1 -1
- package/dist/hub/node.d.ts +3 -3
- package/dist/hub/node.d.ts.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/load/import_type.d.cts +1 -2
- package/dist/load/import_type.d.cts.map +1 -1
- package/dist/load/import_type.d.ts +1 -2
- package/dist/load/import_type.d.ts.map +1 -1
- package/dist/load/index.d.cts +1 -2
- package/dist/load/index.d.cts.map +1 -1
- package/dist/load/index.d.ts +1 -2
- package/dist/load/index.d.ts.map +1 -1
- package/dist/storage/encoder_backed.d.cts +2 -3
- package/dist/storage/encoder_backed.d.cts.map +1 -1
- package/dist/storage/encoder_backed.d.ts +2 -3
- package/dist/storage/encoder_backed.d.ts.map +1 -1
- package/dist/storage/file_system.d.cts +1 -2
- package/dist/storage/file_system.d.cts.map +1 -1
- package/dist/storage/file_system.d.ts +1 -2
- package/dist/storage/file_system.d.ts.map +1 -1
- package/dist/tools/headless.d.cts +4 -4
- package/dist/tools/headless.d.cts.map +1 -1
- package/dist/tools/headless.d.ts +4 -4
- package/dist/tools/headless.d.ts.map +1 -1
- package/package.json +19 -19
|
@@ -27,7 +27,7 @@ declare const contextSchema: z.ZodObject<{
|
|
|
27
27
|
runLimit?: number | undefined;
|
|
28
28
|
exitBehavior?: "end" | "error" | undefined;
|
|
29
29
|
}>;
|
|
30
|
-
type ModelCallLimitMiddlewareConfig = Partial<InferInteropZodInput<typeof contextSchema>>;
|
|
30
|
+
export type ModelCallLimitMiddlewareConfig = Partial<InferInteropZodInput<typeof contextSchema>>;
|
|
31
31
|
/**
|
|
32
32
|
* Creates a middleware to limit the number of model calls at both thread and run levels.
|
|
33
33
|
*
|
|
@@ -88,7 +88,7 @@ type ModelCallLimitMiddlewareConfig = Partial<InferInteropZodInput<typeof contex
|
|
|
88
88
|
* );
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
|
-
declare function modelCallLimitMiddleware(middlewareOptions?: ModelCallLimitMiddlewareConfig): AgentMiddleware<z.ZodObject<{
|
|
91
|
+
export declare function modelCallLimitMiddleware(middlewareOptions?: ModelCallLimitMiddlewareConfig): AgentMiddleware<z.ZodObject<{
|
|
92
92
|
threadModelCallCount: z.ZodDefault<z.ZodNumber>;
|
|
93
93
|
runModelCallCount: z.ZodDefault<z.ZodNumber>;
|
|
94
94
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -127,5 +127,4 @@ declare function modelCallLimitMiddleware(middlewareOptions?: ModelCallLimitMidd
|
|
|
127
127
|
exitBehavior?: "end" | "error" | undefined;
|
|
128
128
|
}, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
129
129
|
//#endregion
|
|
130
|
-
export { ModelCallLimitMiddlewareConfig, modelCallLimitMiddleware };
|
|
131
130
|
//# sourceMappingURL=modelCallLimit.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelCallLimit.d.cts","names":[],"sources":["../../../src/agents/middleware/modelCallLimit.ts"],"mappings":";;;;cAQM,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"modelCallLimit.d.cts","names":["_$__types_js0.AgentMiddleware"],"sources":["../../../src/agents/middleware/modelCallLimit.ts"],"mappings":";;;;cAQM,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;YAiBP,iCAAiC,QAC3C,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+Gd,yBACd,oBAAoB,iDAA8B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAqEnD,6CAAA"}
|
|
@@ -27,7 +27,7 @@ declare const contextSchema: z.ZodObject<{
|
|
|
27
27
|
runLimit?: number | undefined;
|
|
28
28
|
exitBehavior?: "end" | "error" | undefined;
|
|
29
29
|
}>;
|
|
30
|
-
type ModelCallLimitMiddlewareConfig = Partial<InferInteropZodInput<typeof contextSchema>>;
|
|
30
|
+
export type ModelCallLimitMiddlewareConfig = Partial<InferInteropZodInput<typeof contextSchema>>;
|
|
31
31
|
/**
|
|
32
32
|
* Creates a middleware to limit the number of model calls at both thread and run levels.
|
|
33
33
|
*
|
|
@@ -88,7 +88,7 @@ type ModelCallLimitMiddlewareConfig = Partial<InferInteropZodInput<typeof contex
|
|
|
88
88
|
* );
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
|
-
declare function modelCallLimitMiddleware(middlewareOptions?: ModelCallLimitMiddlewareConfig): AgentMiddleware<z.ZodObject<{
|
|
91
|
+
export declare function modelCallLimitMiddleware(middlewareOptions?: ModelCallLimitMiddlewareConfig): AgentMiddleware<z.ZodObject<{
|
|
92
92
|
threadModelCallCount: z.ZodDefault<z.ZodNumber>;
|
|
93
93
|
runModelCallCount: z.ZodDefault<z.ZodNumber>;
|
|
94
94
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -127,5 +127,4 @@ declare function modelCallLimitMiddleware(middlewareOptions?: ModelCallLimitMidd
|
|
|
127
127
|
exitBehavior?: "end" | "error" | undefined;
|
|
128
128
|
}, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
129
129
|
//#endregion
|
|
130
|
-
export { ModelCallLimitMiddlewareConfig, modelCallLimitMiddleware };
|
|
131
130
|
//# sourceMappingURL=modelCallLimit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelCallLimit.d.ts","names":[],"sources":["../../../src/agents/middleware/modelCallLimit.ts"],"mappings":";;;;cAQM,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"modelCallLimit.d.ts","names":["_$__types_js0.AgentMiddleware"],"sources":["../../../src/agents/middleware/modelCallLimit.ts"],"mappings":";;;;cAQM,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;YAiBP,iCAAiC,QAC3C,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+Gd,yBACd,oBAAoB,iDAA8B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAqEnD,6CAAA"}
|
|
@@ -33,11 +33,10 @@ import { AgentMiddleware } from "./types.cjs";
|
|
|
33
33
|
* @param fallbackModels - The fallback models to try, in order.
|
|
34
34
|
* @returns A middleware instance that handles model failures with fallbacks
|
|
35
35
|
*/
|
|
36
|
-
declare function modelFallbackMiddleware(
|
|
36
|
+
export declare function modelFallbackMiddleware(
|
|
37
37
|
/**
|
|
38
38
|
* The fallback models to try, in order.
|
|
39
39
|
*/
|
|
40
40
|
...fallbackModels: (string | AgentLanguageModelLike)[]): AgentMiddleware<undefined, undefined, unknown, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
41
41
|
//#endregion
|
|
42
|
-
export { modelFallbackMiddleware };
|
|
43
42
|
//# sourceMappingURL=modelFallback.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelFallback.d.cts","names":[],"sources":["../../../src/agents/middleware/modelFallback.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"modelFallback.d.cts","names":["LanguageModelLike","_$__types_js0.AgentMiddleware"],"sources":["../../../src/agents/middleware/modelFallback.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAoCgB;;;;GAIX,0BAA0BA,4BAAAC,yFAAoB,6CAAA"}
|
|
@@ -33,11 +33,10 @@ import { AgentMiddleware } from "./types.js";
|
|
|
33
33
|
* @param fallbackModels - The fallback models to try, in order.
|
|
34
34
|
* @returns A middleware instance that handles model failures with fallbacks
|
|
35
35
|
*/
|
|
36
|
-
declare function modelFallbackMiddleware(
|
|
36
|
+
export declare function modelFallbackMiddleware(
|
|
37
37
|
/**
|
|
38
38
|
* The fallback models to try, in order.
|
|
39
39
|
*/
|
|
40
40
|
...fallbackModels: (string | AgentLanguageModelLike)[]): AgentMiddleware<undefined, undefined, unknown, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
41
41
|
//#endregion
|
|
42
|
-
export { modelFallbackMiddleware };
|
|
43
42
|
//# sourceMappingURL=modelFallback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelFallback.d.ts","names":[],"sources":["../../../src/agents/middleware/modelFallback.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"modelFallback.d.ts","names":["LanguageModelLike","_$__types_js0.AgentMiddleware"],"sources":["../../../src/agents/middleware/modelFallback.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAoCgB;;;;GAIX,0BAA0BA,4BAAAC,yFAAoB,6CAAA"}
|
|
@@ -4,7 +4,7 @@ import { z } from "zod/v3";
|
|
|
4
4
|
/**
|
|
5
5
|
* Configuration options for the Model Retry Middleware.
|
|
6
6
|
*/
|
|
7
|
-
declare const ModelRetryMiddlewareOptionsSchema: z.ZodObject<{
|
|
7
|
+
export declare const ModelRetryMiddlewareOptionsSchema: z.ZodObject<{
|
|
8
8
|
/**
|
|
9
9
|
* Behavior when all retries are exhausted. Options:
|
|
10
10
|
* - `"continue"` (default): Return an AIMessage with error details, allowing
|
|
@@ -38,7 +38,7 @@ declare const ModelRetryMiddlewareOptionsSchema: z.ZodObject<{
|
|
|
38
38
|
jitter?: boolean | undefined;
|
|
39
39
|
onFailure?: "continue" | "error" | ((args_0: Error, ...args: unknown[]) => string) | undefined;
|
|
40
40
|
}>;
|
|
41
|
-
type ModelRetryMiddlewareConfig = z.input<typeof ModelRetryMiddlewareOptionsSchema>;
|
|
41
|
+
export type ModelRetryMiddlewareConfig = z.input<typeof ModelRetryMiddlewareOptionsSchema>;
|
|
42
42
|
/**
|
|
43
43
|
* Middleware that automatically retries failed model calls with configurable backoff.
|
|
44
44
|
*
|
|
@@ -126,7 +126,7 @@ type ModelRetryMiddlewareConfig = z.input<typeof ModelRetryMiddlewareOptionsSche
|
|
|
126
126
|
* @param config - Configuration options for the retry middleware
|
|
127
127
|
* @returns A middleware instance that handles model failures with retries
|
|
128
128
|
*/
|
|
129
|
-
declare function modelRetryMiddleware(config?: ModelRetryMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
129
|
+
export declare function modelRetryMiddleware(config?: ModelRetryMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
130
130
|
/**
|
|
131
131
|
* Behavior when all retries are exhausted. Options:
|
|
132
132
|
* - `"continue"` (default): Return an AIMessage with error details, allowing
|
|
@@ -169,5 +169,4 @@ declare function modelRetryMiddleware(config?: ModelRetryMiddlewareConfig): Agen
|
|
|
169
169
|
onFailure: "continue" | "error" | ((args_0: Error, ...args: unknown[]) => string);
|
|
170
170
|
}, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
171
171
|
//#endregion
|
|
172
|
-
export { ModelRetryMiddlewareConfig, ModelRetryMiddlewareOptionsSchema, modelRetryMiddleware };
|
|
173
172
|
//# sourceMappingURL=modelRetry.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelRetry.d.cts","names":[],"sources":["../../../src/agents/middleware/modelRetry.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"modelRetry.d.cts","names":["_$__types_js0.AgentMiddleware"],"sources":["../../../src/agents/middleware/modelRetry.ts"],"mappings":";;;;;;qBAca,mCAAiC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAoBlC,6BAA6B,EAAE,aAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0FO,qBAAqB,SAAQ,wDAA+B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAgH3E,6CAAA"}
|
|
@@ -4,7 +4,7 @@ import { z } from "zod/v3";
|
|
|
4
4
|
/**
|
|
5
5
|
* Configuration options for the Model Retry Middleware.
|
|
6
6
|
*/
|
|
7
|
-
declare const ModelRetryMiddlewareOptionsSchema: z.ZodObject<{
|
|
7
|
+
export declare const ModelRetryMiddlewareOptionsSchema: z.ZodObject<{
|
|
8
8
|
/**
|
|
9
9
|
* Behavior when all retries are exhausted. Options:
|
|
10
10
|
* - `"continue"` (default): Return an AIMessage with error details, allowing
|
|
@@ -38,7 +38,7 @@ declare const ModelRetryMiddlewareOptionsSchema: z.ZodObject<{
|
|
|
38
38
|
jitter?: boolean | undefined;
|
|
39
39
|
onFailure?: "continue" | "error" | ((args_0: Error, ...args: unknown[]) => string) | undefined;
|
|
40
40
|
}>;
|
|
41
|
-
type ModelRetryMiddlewareConfig = z.input<typeof ModelRetryMiddlewareOptionsSchema>;
|
|
41
|
+
export type ModelRetryMiddlewareConfig = z.input<typeof ModelRetryMiddlewareOptionsSchema>;
|
|
42
42
|
/**
|
|
43
43
|
* Middleware that automatically retries failed model calls with configurable backoff.
|
|
44
44
|
*
|
|
@@ -126,7 +126,7 @@ type ModelRetryMiddlewareConfig = z.input<typeof ModelRetryMiddlewareOptionsSche
|
|
|
126
126
|
* @param config - Configuration options for the retry middleware
|
|
127
127
|
* @returns A middleware instance that handles model failures with retries
|
|
128
128
|
*/
|
|
129
|
-
declare function modelRetryMiddleware(config?: ModelRetryMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
129
|
+
export declare function modelRetryMiddleware(config?: ModelRetryMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
130
130
|
/**
|
|
131
131
|
* Behavior when all retries are exhausted. Options:
|
|
132
132
|
* - `"continue"` (default): Return an AIMessage with error details, allowing
|
|
@@ -169,5 +169,4 @@ declare function modelRetryMiddleware(config?: ModelRetryMiddlewareConfig): Agen
|
|
|
169
169
|
onFailure: "continue" | "error" | ((args_0: Error, ...args: unknown[]) => string);
|
|
170
170
|
}, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
171
171
|
//#endregion
|
|
172
|
-
export { ModelRetryMiddlewareConfig, ModelRetryMiddlewareOptionsSchema, modelRetryMiddleware };
|
|
173
172
|
//# sourceMappingURL=modelRetry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelRetry.d.ts","names":[],"sources":["../../../src/agents/middleware/modelRetry.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"modelRetry.d.ts","names":["_$__types_js0.AgentMiddleware"],"sources":["../../../src/agents/middleware/modelRetry.ts"],"mappings":";;;;;;qBAca,mCAAiC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAoBlC,6BAA6B,EAAE,aAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0FO,qBAAqB,SAAQ,wDAA+B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAgH3E,6CAAA"}
|
|
@@ -5,7 +5,7 @@ import { z } from "zod/v3";
|
|
|
5
5
|
/**
|
|
6
6
|
* Represents a detected PII match in content
|
|
7
7
|
*/
|
|
8
|
-
interface PIIMatch {
|
|
8
|
+
export interface PIIMatch {
|
|
9
9
|
/**
|
|
10
10
|
* The matched text
|
|
11
11
|
*/
|
|
@@ -22,7 +22,7 @@ interface PIIMatch {
|
|
|
22
22
|
/**
|
|
23
23
|
* Error thrown when PII is detected and strategy is 'block'
|
|
24
24
|
*/
|
|
25
|
-
declare class PIIDetectionError extends Error {
|
|
25
|
+
export declare class PIIDetectionError extends Error {
|
|
26
26
|
readonly piiType: string;
|
|
27
27
|
readonly matches: PIIMatch[];
|
|
28
28
|
constructor(piiType: string, matches: PIIMatch[]);
|
|
@@ -30,20 +30,20 @@ declare class PIIDetectionError extends Error {
|
|
|
30
30
|
/**
|
|
31
31
|
* Strategy for handling detected PII
|
|
32
32
|
*/
|
|
33
|
-
type PIIStrategy = "block" | "redact" | "mask" | "hash";
|
|
33
|
+
export type PIIStrategy = "block" | "redact" | "mask" | "hash";
|
|
34
34
|
/**
|
|
35
35
|
* Built-in PII types
|
|
36
36
|
*/
|
|
37
|
-
type BuiltInPIIType = "email" | "credit_card" | "ip" | "mac_address" | "url";
|
|
37
|
+
export type BuiltInPIIType = "email" | "credit_card" | "ip" | "mac_address" | "url";
|
|
38
38
|
/**
|
|
39
39
|
* Custom detector function that takes content and returns matches
|
|
40
40
|
*/
|
|
41
|
-
type PIIDetector = (content: string) => PIIMatch[];
|
|
42
|
-
type Detector = PIIDetector | RegExp | string;
|
|
41
|
+
export type PIIDetector = (content: string) => PIIMatch[];
|
|
42
|
+
export type Detector = PIIDetector | RegExp | string;
|
|
43
43
|
/**
|
|
44
44
|
* Configuration for a redaction rule
|
|
45
45
|
*/
|
|
46
|
-
interface RedactionRuleConfig {
|
|
46
|
+
export interface RedactionRuleConfig {
|
|
47
47
|
/**
|
|
48
48
|
* Type of PII to detect (built-in or custom name)
|
|
49
49
|
*/
|
|
@@ -60,7 +60,7 @@ interface RedactionRuleConfig {
|
|
|
60
60
|
/**
|
|
61
61
|
* Resolved redaction rule with a concrete detector function
|
|
62
62
|
*/
|
|
63
|
-
interface ResolvedRedactionRule {
|
|
63
|
+
export interface ResolvedRedactionRule {
|
|
64
64
|
piiType: string;
|
|
65
65
|
strategy: PIIStrategy;
|
|
66
66
|
detector: PIIDetector;
|
|
@@ -68,31 +68,31 @@ interface ResolvedRedactionRule {
|
|
|
68
68
|
/**
|
|
69
69
|
* Detect email addresses in content
|
|
70
70
|
*/
|
|
71
|
-
declare function detectEmail(content: string): PIIMatch[];
|
|
71
|
+
export declare function detectEmail(content: string): PIIMatch[];
|
|
72
72
|
/**
|
|
73
73
|
* Detect credit card numbers in content (validated with Luhn algorithm)
|
|
74
74
|
*/
|
|
75
|
-
declare function detectCreditCard(content: string): PIIMatch[];
|
|
75
|
+
export declare function detectCreditCard(content: string): PIIMatch[];
|
|
76
76
|
/**
|
|
77
77
|
* Detect IP addresses in content (validated)
|
|
78
78
|
*/
|
|
79
|
-
declare function detectIP(content: string): PIIMatch[];
|
|
79
|
+
export declare function detectIP(content: string): PIIMatch[];
|
|
80
80
|
/**
|
|
81
81
|
* Detect MAC addresses in content
|
|
82
82
|
*/
|
|
83
|
-
declare function detectMacAddress(content: string): PIIMatch[];
|
|
83
|
+
export declare function detectMacAddress(content: string): PIIMatch[];
|
|
84
84
|
/**
|
|
85
85
|
* Detect URLs in content
|
|
86
86
|
*/
|
|
87
|
-
declare function detectUrl(content: string): PIIMatch[];
|
|
87
|
+
export declare function detectUrl(content: string): PIIMatch[];
|
|
88
88
|
/**
|
|
89
89
|
* Resolve a redaction rule to a concrete detector function
|
|
90
90
|
*/
|
|
91
|
-
declare function resolveRedactionRule(config: RedactionRuleConfig): ResolvedRedactionRule;
|
|
91
|
+
export declare function resolveRedactionRule(config: RedactionRuleConfig): ResolvedRedactionRule;
|
|
92
92
|
/**
|
|
93
93
|
* Apply strategy to content based on matches
|
|
94
94
|
*/
|
|
95
|
-
declare function applyStrategy(content: string, matches: PIIMatch[], strategy: PIIStrategy, piiType: string): string;
|
|
95
|
+
export declare function applyStrategy(content: string, matches: PIIMatch[], strategy: PIIStrategy, piiType: string): string;
|
|
96
96
|
/**
|
|
97
97
|
* Configuration schema for PII middleware
|
|
98
98
|
*/
|
|
@@ -118,7 +118,7 @@ declare const contextSchema: z.ZodObject<{
|
|
|
118
118
|
applyToOutput?: boolean | undefined;
|
|
119
119
|
applyToToolResults?: boolean | undefined;
|
|
120
120
|
}>;
|
|
121
|
-
type PIIMiddlewareConfig = InferInteropZodInput<typeof contextSchema>;
|
|
121
|
+
export type PIIMiddlewareConfig = InferInteropZodInput<typeof contextSchema>;
|
|
122
122
|
/**
|
|
123
123
|
* Creates a middleware that detects and handles personally identifiable information (PII)
|
|
124
124
|
* in conversations.
|
|
@@ -202,7 +202,7 @@ type PIIMiddlewareConfig = InferInteropZodInput<typeof contextSchema>;
|
|
|
202
202
|
*
|
|
203
203
|
* @public
|
|
204
204
|
*/
|
|
205
|
-
declare function piiMiddleware(piiType: BuiltInPIIType | string, options?: {
|
|
205
|
+
export declare function piiMiddleware(piiType: BuiltInPIIType | string, options?: {
|
|
206
206
|
strategy?: PIIStrategy;
|
|
207
207
|
detector?: Detector;
|
|
208
208
|
applyToInput?: boolean;
|
|
@@ -235,5 +235,4 @@ declare function piiMiddleware(piiType: BuiltInPIIType | string, options?: {
|
|
|
235
235
|
applyToToolResults?: boolean | undefined;
|
|
236
236
|
}, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
237
237
|
//#endregion
|
|
238
|
-
export { BuiltInPIIType, Detector, PIIDetectionError, PIIDetector, PIIMatch, PIIMiddlewareConfig, PIIStrategy, RedactionRuleConfig, ResolvedRedactionRule, applyStrategy, detectCreditCard, detectEmail, detectIP, detectMacAddress, detectUrl, piiMiddleware, resolveRedactionRule };
|
|
239
238
|
//# sourceMappingURL=pii.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pii.d.cts","names":[],"sources":["../../../src/agents/middleware/pii.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"pii.d.cts","names":["_$__types_js0.AgentMiddleware"],"sources":["../../../src/agents/middleware/pii.ts"],"mappings":";;;;;;;iBAUiB;;;;EAIf;;;;EAIA;;;;EAIA;;;;;qBAMW,0BAA0B;WAEnB;WACA,SAAS;EAF3B,YACkB,iBACA,SAAS;;;;;YAUjB;;;;YAKA;;;;YAUA,eAAe,oBAAoB;YACnC,WAAW,cAAc;;;;iBAKpB;;;;EAIf,SAAS;;;;EAIT,UAAU;;;;EAIV,WAAW;;;;;iBAMI;EACf;EACA,UAAU;EACV,UAAU;;;;;wBAoEI,YAAY,kBAAkB;;;;wBAe9B,iBAAiB,kBAAkB;;;;wBAuBnC,SAAS,kBAAkB;;;;wBA0B3B,iBAAiB,kBAAkB;;;;wBAenC,UAAU,kBAAkB;;;;wBA0B5B,qBACd,QAAQ,sBACP;;;;wBA2Ia,cACd,iBACA,SAAS,YACT,UAAU,aACV;;;;cAuBI,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;YAeP,sBAAsB,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0G9C,cACd,SAAS,yBACT;EACE,WAAW;EACX,WAAW;EACX;EACA;EACA;IACIA,2BAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;6CAsKP,6CAAA"}
|
|
@@ -5,7 +5,7 @@ import { z } from "zod/v3";
|
|
|
5
5
|
/**
|
|
6
6
|
* Represents a detected PII match in content
|
|
7
7
|
*/
|
|
8
|
-
interface PIIMatch {
|
|
8
|
+
export interface PIIMatch {
|
|
9
9
|
/**
|
|
10
10
|
* The matched text
|
|
11
11
|
*/
|
|
@@ -22,7 +22,7 @@ interface PIIMatch {
|
|
|
22
22
|
/**
|
|
23
23
|
* Error thrown when PII is detected and strategy is 'block'
|
|
24
24
|
*/
|
|
25
|
-
declare class PIIDetectionError extends Error {
|
|
25
|
+
export declare class PIIDetectionError extends Error {
|
|
26
26
|
readonly piiType: string;
|
|
27
27
|
readonly matches: PIIMatch[];
|
|
28
28
|
constructor(piiType: string, matches: PIIMatch[]);
|
|
@@ -30,20 +30,20 @@ declare class PIIDetectionError extends Error {
|
|
|
30
30
|
/**
|
|
31
31
|
* Strategy for handling detected PII
|
|
32
32
|
*/
|
|
33
|
-
type PIIStrategy = "block" | "redact" | "mask" | "hash";
|
|
33
|
+
export type PIIStrategy = "block" | "redact" | "mask" | "hash";
|
|
34
34
|
/**
|
|
35
35
|
* Built-in PII types
|
|
36
36
|
*/
|
|
37
|
-
type BuiltInPIIType = "email" | "credit_card" | "ip" | "mac_address" | "url";
|
|
37
|
+
export type BuiltInPIIType = "email" | "credit_card" | "ip" | "mac_address" | "url";
|
|
38
38
|
/**
|
|
39
39
|
* Custom detector function that takes content and returns matches
|
|
40
40
|
*/
|
|
41
|
-
type PIIDetector = (content: string) => PIIMatch[];
|
|
42
|
-
type Detector = PIIDetector | RegExp | string;
|
|
41
|
+
export type PIIDetector = (content: string) => PIIMatch[];
|
|
42
|
+
export type Detector = PIIDetector | RegExp | string;
|
|
43
43
|
/**
|
|
44
44
|
* Configuration for a redaction rule
|
|
45
45
|
*/
|
|
46
|
-
interface RedactionRuleConfig {
|
|
46
|
+
export interface RedactionRuleConfig {
|
|
47
47
|
/**
|
|
48
48
|
* Type of PII to detect (built-in or custom name)
|
|
49
49
|
*/
|
|
@@ -60,7 +60,7 @@ interface RedactionRuleConfig {
|
|
|
60
60
|
/**
|
|
61
61
|
* Resolved redaction rule with a concrete detector function
|
|
62
62
|
*/
|
|
63
|
-
interface ResolvedRedactionRule {
|
|
63
|
+
export interface ResolvedRedactionRule {
|
|
64
64
|
piiType: string;
|
|
65
65
|
strategy: PIIStrategy;
|
|
66
66
|
detector: PIIDetector;
|
|
@@ -68,31 +68,31 @@ interface ResolvedRedactionRule {
|
|
|
68
68
|
/**
|
|
69
69
|
* Detect email addresses in content
|
|
70
70
|
*/
|
|
71
|
-
declare function detectEmail(content: string): PIIMatch[];
|
|
71
|
+
export declare function detectEmail(content: string): PIIMatch[];
|
|
72
72
|
/**
|
|
73
73
|
* Detect credit card numbers in content (validated with Luhn algorithm)
|
|
74
74
|
*/
|
|
75
|
-
declare function detectCreditCard(content: string): PIIMatch[];
|
|
75
|
+
export declare function detectCreditCard(content: string): PIIMatch[];
|
|
76
76
|
/**
|
|
77
77
|
* Detect IP addresses in content (validated)
|
|
78
78
|
*/
|
|
79
|
-
declare function detectIP(content: string): PIIMatch[];
|
|
79
|
+
export declare function detectIP(content: string): PIIMatch[];
|
|
80
80
|
/**
|
|
81
81
|
* Detect MAC addresses in content
|
|
82
82
|
*/
|
|
83
|
-
declare function detectMacAddress(content: string): PIIMatch[];
|
|
83
|
+
export declare function detectMacAddress(content: string): PIIMatch[];
|
|
84
84
|
/**
|
|
85
85
|
* Detect URLs in content
|
|
86
86
|
*/
|
|
87
|
-
declare function detectUrl(content: string): PIIMatch[];
|
|
87
|
+
export declare function detectUrl(content: string): PIIMatch[];
|
|
88
88
|
/**
|
|
89
89
|
* Resolve a redaction rule to a concrete detector function
|
|
90
90
|
*/
|
|
91
|
-
declare function resolveRedactionRule(config: RedactionRuleConfig): ResolvedRedactionRule;
|
|
91
|
+
export declare function resolveRedactionRule(config: RedactionRuleConfig): ResolvedRedactionRule;
|
|
92
92
|
/**
|
|
93
93
|
* Apply strategy to content based on matches
|
|
94
94
|
*/
|
|
95
|
-
declare function applyStrategy(content: string, matches: PIIMatch[], strategy: PIIStrategy, piiType: string): string;
|
|
95
|
+
export declare function applyStrategy(content: string, matches: PIIMatch[], strategy: PIIStrategy, piiType: string): string;
|
|
96
96
|
/**
|
|
97
97
|
* Configuration schema for PII middleware
|
|
98
98
|
*/
|
|
@@ -118,7 +118,7 @@ declare const contextSchema: z.ZodObject<{
|
|
|
118
118
|
applyToOutput?: boolean | undefined;
|
|
119
119
|
applyToToolResults?: boolean | undefined;
|
|
120
120
|
}>;
|
|
121
|
-
type PIIMiddlewareConfig = InferInteropZodInput<typeof contextSchema>;
|
|
121
|
+
export type PIIMiddlewareConfig = InferInteropZodInput<typeof contextSchema>;
|
|
122
122
|
/**
|
|
123
123
|
* Creates a middleware that detects and handles personally identifiable information (PII)
|
|
124
124
|
* in conversations.
|
|
@@ -202,7 +202,7 @@ type PIIMiddlewareConfig = InferInteropZodInput<typeof contextSchema>;
|
|
|
202
202
|
*
|
|
203
203
|
* @public
|
|
204
204
|
*/
|
|
205
|
-
declare function piiMiddleware(piiType: BuiltInPIIType | string, options?: {
|
|
205
|
+
export declare function piiMiddleware(piiType: BuiltInPIIType | string, options?: {
|
|
206
206
|
strategy?: PIIStrategy;
|
|
207
207
|
detector?: Detector;
|
|
208
208
|
applyToInput?: boolean;
|
|
@@ -235,5 +235,4 @@ declare function piiMiddleware(piiType: BuiltInPIIType | string, options?: {
|
|
|
235
235
|
applyToToolResults?: boolean | undefined;
|
|
236
236
|
}, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
237
237
|
//#endregion
|
|
238
|
-
export { BuiltInPIIType, Detector, PIIDetectionError, PIIDetector, PIIMatch, PIIMiddlewareConfig, PIIStrategy, RedactionRuleConfig, ResolvedRedactionRule, applyStrategy, detectCreditCard, detectEmail, detectIP, detectMacAddress, detectUrl, piiMiddleware, resolveRedactionRule };
|
|
239
238
|
//# sourceMappingURL=pii.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pii.d.ts","names":[],"sources":["../../../src/agents/middleware/pii.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"pii.d.ts","names":["_$__types_js0.AgentMiddleware"],"sources":["../../../src/agents/middleware/pii.ts"],"mappings":";;;;;;;iBAUiB;;;;EAIf;;;;EAIA;;;;EAIA;;;;;qBAMW,0BAA0B;WAEnB;WACA,SAAS;EAF3B,YACkB,iBACA,SAAS;;;;;YAUjB;;;;YAKA;;;;YAUA,eAAe,oBAAoB;YACnC,WAAW,cAAc;;;;iBAKpB;;;;EAIf,SAAS;;;;EAIT,UAAU;;;;EAIV,WAAW;;;;;iBAMI;EACf;EACA,UAAU;EACV,UAAU;;;;;wBAoEI,YAAY,kBAAkB;;;;wBAe9B,iBAAiB,kBAAkB;;;;wBAuBnC,SAAS,kBAAkB;;;;wBA0B3B,iBAAiB,kBAAkB;;;;wBAenC,UAAU,kBAAkB;;;;wBA0B5B,qBACd,QAAQ,sBACP;;;;wBA2Ia,cACd,iBACA,SAAS,YACT,UAAU,aACV;;;;cAuBI,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;YAeP,sBAAsB,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0G9C,cACd,SAAS,yBACT;EACE,WAAW;EACX,WAAW;EACX;EACA;EACA;IACIA,2BAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;6CAsKP,6CAAA"}
|
|
@@ -19,7 +19,7 @@ declare const contextSchema: z.ZodObject<{
|
|
|
19
19
|
/**
|
|
20
20
|
* @deprecated
|
|
21
21
|
*/
|
|
22
|
-
type PIIRedactionMiddlewareConfig = InferInteropZodInput<typeof contextSchema>;
|
|
22
|
+
export type PIIRedactionMiddlewareConfig = InferInteropZodInput<typeof contextSchema>;
|
|
23
23
|
/**
|
|
24
24
|
* Creates a middleware that detects and redacts personally identifiable information (PII)
|
|
25
25
|
* from messages before they are sent to model providers, and restores original values
|
|
@@ -150,7 +150,7 @@ type PIIRedactionMiddlewareConfig = InferInteropZodInput<typeof contextSchema>;
|
|
|
150
150
|
*
|
|
151
151
|
* @deprecated
|
|
152
152
|
*/
|
|
153
|
-
declare function piiRedactionMiddleware(options?: PIIRedactionMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
153
|
+
export declare function piiRedactionMiddleware(options?: PIIRedactionMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
154
154
|
/**
|
|
155
155
|
* A record of PII detection rules to apply
|
|
156
156
|
* @default DEFAULT_PII_RULES (with enabled rules only)
|
|
@@ -164,5 +164,4 @@ declare function piiRedactionMiddleware(options?: PIIRedactionMiddlewareConfig):
|
|
|
164
164
|
rules?: Record<string, RegExp> | undefined;
|
|
165
165
|
}, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
166
166
|
//#endregion
|
|
167
|
-
export { PIIRedactionMiddlewareConfig, piiRedactionMiddleware };
|
|
168
167
|
//# sourceMappingURL=piiRedaction.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"piiRedaction.d.cts","names":[],"sources":["../../../src/agents/middleware/piiRedaction.ts"],"mappings":";;;;;;;cAqBM,eAAa,EAAA;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"piiRedaction.d.cts","names":["_$__types_js0.AgentMiddleware"],"sources":["../../../src/agents/middleware/piiRedaction.ts"],"mappings":";;;;;;;cAqBM,eAAa,EAAA;;;;;;;;;;;;;;YAgBP,+BAA+B,4BAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+TO,uBACd,UAAS,0DAAiC,EAAA;;;;;;;;;;;;6CAuI3C,6CAAA"}
|
|
@@ -19,7 +19,7 @@ declare const contextSchema: z.ZodObject<{
|
|
|
19
19
|
/**
|
|
20
20
|
* @deprecated
|
|
21
21
|
*/
|
|
22
|
-
type PIIRedactionMiddlewareConfig = InferInteropZodInput<typeof contextSchema>;
|
|
22
|
+
export type PIIRedactionMiddlewareConfig = InferInteropZodInput<typeof contextSchema>;
|
|
23
23
|
/**
|
|
24
24
|
* Creates a middleware that detects and redacts personally identifiable information (PII)
|
|
25
25
|
* from messages before they are sent to model providers, and restores original values
|
|
@@ -150,7 +150,7 @@ type PIIRedactionMiddlewareConfig = InferInteropZodInput<typeof contextSchema>;
|
|
|
150
150
|
*
|
|
151
151
|
* @deprecated
|
|
152
152
|
*/
|
|
153
|
-
declare function piiRedactionMiddleware(options?: PIIRedactionMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
153
|
+
export declare function piiRedactionMiddleware(options?: PIIRedactionMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
154
154
|
/**
|
|
155
155
|
* A record of PII detection rules to apply
|
|
156
156
|
* @default DEFAULT_PII_RULES (with enabled rules only)
|
|
@@ -164,5 +164,4 @@ declare function piiRedactionMiddleware(options?: PIIRedactionMiddlewareConfig):
|
|
|
164
164
|
rules?: Record<string, RegExp> | undefined;
|
|
165
165
|
}, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
166
166
|
//#endregion
|
|
167
|
-
export { PIIRedactionMiddlewareConfig, piiRedactionMiddleware };
|
|
168
167
|
//# sourceMappingURL=piiRedaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"piiRedaction.d.ts","names":[],"sources":["../../../src/agents/middleware/piiRedaction.ts"],"mappings":";;;;;;;cAqBM,eAAa,EAAA;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"piiRedaction.d.ts","names":["_$__types_js0.AgentMiddleware"],"sources":["../../../src/agents/middleware/piiRedaction.ts"],"mappings":";;;;;;;cAqBM,eAAa,EAAA;;;;;;;;;;;;;;YAgBP,+BAA+B,4BAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+TO,uBACd,UAAS,0DAAiC,EAAA;;;;;;;;;;;;6CAuI3C,6CAAA"}
|
|
@@ -37,7 +37,7 @@ declare const contextSchema: z.ZodObject<{
|
|
|
37
37
|
minMessagesToCache?: number | undefined;
|
|
38
38
|
unsupportedModelBehavior?: "ignore" | "raise" | "warn" | undefined;
|
|
39
39
|
}>;
|
|
40
|
-
type PromptCachingMiddlewareConfig = Partial<InferInteropZodInput<typeof contextSchema>>;
|
|
40
|
+
export type PromptCachingMiddlewareConfig = Partial<InferInteropZodInput<typeof contextSchema>>;
|
|
41
41
|
/**
|
|
42
42
|
* Creates a prompt caching middleware for Anthropic models to optimize API usage.
|
|
43
43
|
*
|
|
@@ -156,7 +156,7 @@ type PromptCachingMiddlewareConfig = Partial<InferInteropZodInput<typeof context
|
|
|
156
156
|
* @see {@link https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching} Anthropic's prompt caching documentation
|
|
157
157
|
* @public
|
|
158
158
|
*/
|
|
159
|
-
declare function anthropicPromptCachingMiddleware(middlewareOptions?: PromptCachingMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
159
|
+
export declare function anthropicPromptCachingMiddleware(middlewareOptions?: PromptCachingMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
160
160
|
/**
|
|
161
161
|
* Whether to enable prompt caching.
|
|
162
162
|
* @default true
|
|
@@ -197,5 +197,4 @@ declare function anthropicPromptCachingMiddleware(middlewareOptions?: PromptCach
|
|
|
197
197
|
unsupportedModelBehavior?: "ignore" | "raise" | "warn" | undefined;
|
|
198
198
|
}, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
199
199
|
//#endregion
|
|
200
|
-
export { PromptCachingMiddlewareConfig, anthropicPromptCachingMiddleware };
|
|
201
200
|
//# sourceMappingURL=promptCaching.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promptCaching.d.cts","names":[],"sources":["../../../../../src/agents/middleware/provider/anthropic/promptCaching.ts"],"mappings":";;;;cAWM,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"promptCaching.d.cts","names":["_$______types_js0.AgentMiddleware"],"sources":["../../../../../src/agents/middleware/provider/anthropic/promptCaching.ts"],"mappings":";;;;cAWM,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAyBP,gCAAgC,QAC1C,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgId,iCACd,oBAAoB,gCAA6BA,2BAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAqFlD,6CAAA"}
|
|
@@ -37,7 +37,7 @@ declare const contextSchema: z.ZodObject<{
|
|
|
37
37
|
minMessagesToCache?: number | undefined;
|
|
38
38
|
unsupportedModelBehavior?: "ignore" | "raise" | "warn" | undefined;
|
|
39
39
|
}>;
|
|
40
|
-
type PromptCachingMiddlewareConfig = Partial<InferInteropZodInput<typeof contextSchema>>;
|
|
40
|
+
export type PromptCachingMiddlewareConfig = Partial<InferInteropZodInput<typeof contextSchema>>;
|
|
41
41
|
/**
|
|
42
42
|
* Creates a prompt caching middleware for Anthropic models to optimize API usage.
|
|
43
43
|
*
|
|
@@ -156,7 +156,7 @@ type PromptCachingMiddlewareConfig = Partial<InferInteropZodInput<typeof context
|
|
|
156
156
|
* @see {@link https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching} Anthropic's prompt caching documentation
|
|
157
157
|
* @public
|
|
158
158
|
*/
|
|
159
|
-
declare function anthropicPromptCachingMiddleware(middlewareOptions?: PromptCachingMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
159
|
+
export declare function anthropicPromptCachingMiddleware(middlewareOptions?: PromptCachingMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
160
160
|
/**
|
|
161
161
|
* Whether to enable prompt caching.
|
|
162
162
|
* @default true
|
|
@@ -197,5 +197,4 @@ declare function anthropicPromptCachingMiddleware(middlewareOptions?: PromptCach
|
|
|
197
197
|
unsupportedModelBehavior?: "ignore" | "raise" | "warn" | undefined;
|
|
198
198
|
}, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
199
199
|
//#endregion
|
|
200
|
-
export { PromptCachingMiddlewareConfig, anthropicPromptCachingMiddleware };
|
|
201
200
|
//# sourceMappingURL=promptCaching.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promptCaching.d.ts","names":[],"sources":["../../../../../src/agents/middleware/provider/anthropic/promptCaching.ts"],"mappings":";;;;cAWM,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"promptCaching.d.ts","names":["_$______types_js0.AgentMiddleware"],"sources":["../../../../../src/agents/middleware/provider/anthropic/promptCaching.ts"],"mappings":";;;;cAWM,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAyBP,gCAAgC,QAC1C,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgId,iCACd,oBAAoB,gCAA6BA,2BAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAqFlD,6CAAA"}
|
|
@@ -37,7 +37,7 @@ declare const contextSchema: z.ZodObject<{
|
|
|
37
37
|
minMessagesToCache?: number | undefined;
|
|
38
38
|
unsupportedModelBehavior?: "ignore" | "raise" | "warn" | undefined;
|
|
39
39
|
}>;
|
|
40
|
-
type BedrockConversePromptCachingMiddlewareConfig = Partial<InferInteropZodInput<typeof contextSchema>>;
|
|
40
|
+
export type BedrockConversePromptCachingMiddlewareConfig = Partial<InferInteropZodInput<typeof contextSchema>>;
|
|
41
41
|
/**
|
|
42
42
|
* Creates a prompt caching middleware for AWS Bedrock Converse models to optimize API usage.
|
|
43
43
|
*
|
|
@@ -160,7 +160,7 @@ type BedrockConversePromptCachingMiddlewareConfig = Partial<InferInteropZodInput
|
|
|
160
160
|
* @see {@link https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html} AWS Bedrock prompt caching documentation
|
|
161
161
|
* @public
|
|
162
162
|
*/
|
|
163
|
-
declare function bedrockPromptCachingMiddleware(middlewareOptions?: BedrockConversePromptCachingMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
163
|
+
export declare function bedrockPromptCachingMiddleware(middlewareOptions?: BedrockConversePromptCachingMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
164
164
|
/**
|
|
165
165
|
* Whether to enable prompt caching.
|
|
166
166
|
* @default true
|
|
@@ -201,5 +201,4 @@ declare function bedrockPromptCachingMiddleware(middlewareOptions?: BedrockConve
|
|
|
201
201
|
unsupportedModelBehavior?: "ignore" | "raise" | "warn" | undefined;
|
|
202
202
|
}, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
203
203
|
//#endregion
|
|
204
|
-
export { BedrockConversePromptCachingMiddlewareConfig, bedrockPromptCachingMiddleware };
|
|
205
204
|
//# sourceMappingURL=promptCaching.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promptCaching.d.cts","names":[],"sources":["../../../../../src/agents/middleware/provider/aws/promptCaching.ts"],"mappings":";;;;cAWM,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"promptCaching.d.cts","names":["_$______types_js0.AgentMiddleware"],"sources":["../../../../../src/agents/middleware/provider/aws/promptCaching.ts"],"mappings":";;;;cAWM,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAyBP,+CAA+C,QACzD,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAoId,+BACd,oBAAoB,+CAA4CA,2BAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAuGjE,6CAAA"}
|
|
@@ -37,7 +37,7 @@ declare const contextSchema: z.ZodObject<{
|
|
|
37
37
|
minMessagesToCache?: number | undefined;
|
|
38
38
|
unsupportedModelBehavior?: "ignore" | "raise" | "warn" | undefined;
|
|
39
39
|
}>;
|
|
40
|
-
type BedrockConversePromptCachingMiddlewareConfig = Partial<InferInteropZodInput<typeof contextSchema>>;
|
|
40
|
+
export type BedrockConversePromptCachingMiddlewareConfig = Partial<InferInteropZodInput<typeof contextSchema>>;
|
|
41
41
|
/**
|
|
42
42
|
* Creates a prompt caching middleware for AWS Bedrock Converse models to optimize API usage.
|
|
43
43
|
*
|
|
@@ -160,7 +160,7 @@ type BedrockConversePromptCachingMiddlewareConfig = Partial<InferInteropZodInput
|
|
|
160
160
|
* @see {@link https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html} AWS Bedrock prompt caching documentation
|
|
161
161
|
* @public
|
|
162
162
|
*/
|
|
163
|
-
declare function bedrockPromptCachingMiddleware(middlewareOptions?: BedrockConversePromptCachingMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
163
|
+
export declare function bedrockPromptCachingMiddleware(middlewareOptions?: BedrockConversePromptCachingMiddlewareConfig): AgentMiddleware<undefined, z.ZodObject<{
|
|
164
164
|
/**
|
|
165
165
|
* Whether to enable prompt caching.
|
|
166
166
|
* @default true
|
|
@@ -201,5 +201,4 @@ declare function bedrockPromptCachingMiddleware(middlewareOptions?: BedrockConve
|
|
|
201
201
|
unsupportedModelBehavior?: "ignore" | "raise" | "warn" | undefined;
|
|
202
202
|
}, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[], readonly []>;
|
|
203
203
|
//#endregion
|
|
204
|
-
export { BedrockConversePromptCachingMiddlewareConfig, bedrockPromptCachingMiddleware };
|
|
205
204
|
//# sourceMappingURL=promptCaching.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promptCaching.d.ts","names":[],"sources":["../../../../../src/agents/middleware/provider/aws/promptCaching.ts"],"mappings":";;;;cAWM,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"promptCaching.d.ts","names":["_$______types_js0.AgentMiddleware"],"sources":["../../../../../src/agents/middleware/provider/aws/promptCaching.ts"],"mappings":";;;;cAWM,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAyBP,+CAA+C,QACzD,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAoId,+BACd,oBAAoB,+CAA4CA,2BAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAuGjE,6CAAA"}
|
|
@@ -5,7 +5,7 @@ type ModerationModel = "omni-moderation-latest" | "omni-moderation-2024-09-26" |
|
|
|
5
5
|
/**
|
|
6
6
|
* Options for configuring the OpenAI Moderation middleware.
|
|
7
7
|
*/
|
|
8
|
-
interface OpenAIModerationMiddlewareOptions {
|
|
8
|
+
export interface OpenAIModerationMiddlewareOptions {
|
|
9
9
|
/**
|
|
10
10
|
* OpenAI model to use for moderation. Can be either a model name or a BaseChatModel instance.
|
|
11
11
|
* @example
|
|
@@ -121,7 +121,6 @@ interface OpenAIModerationMiddlewareOptions {
|
|
|
121
121
|
* });
|
|
122
122
|
* ```
|
|
123
123
|
*/
|
|
124
|
-
declare function openAIModerationMiddleware(options: OpenAIModerationMiddlewareOptions): AgentMiddleware;
|
|
124
|
+
export declare function openAIModerationMiddleware(options: OpenAIModerationMiddlewareOptions): AgentMiddleware;
|
|
125
125
|
//#endregion
|
|
126
|
-
export { OpenAIModerationMiddlewareOptions, openAIModerationMiddleware };
|
|
127
126
|
//# sourceMappingURL=moderation.d.cts.map
|