@anvia/core 0.11.3 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +6 -3
- package/dist/agent/index.js +8 -7
- package/dist/{agent-Bcpuodu2.d.ts → agent-BBj3jvBi.d.ts} +11 -2
- package/dist/{chunk-7CQAERL3.js → chunk-CO7YK4JZ.js} +333 -103
- package/dist/chunk-CO7YK4JZ.js.map +1 -0
- package/dist/chunk-CWUJUSOS.js +291 -0
- package/dist/chunk-CWUJUSOS.js.map +1 -0
- package/dist/{chunk-FV5B4SGK.js → chunk-GISFLLNL.js} +5 -5
- package/dist/{chunk-V3WTT7TE.js → chunk-HF4KHHNM.js} +2 -2
- package/dist/{chunk-5EDHXYH5.js → chunk-IZM6FNCT.js} +8 -5
- package/dist/chunk-IZM6FNCT.js.map +1 -0
- package/dist/{chunk-MLMXQ2OV.js → chunk-J4XZCE4A.js} +9 -7
- package/dist/chunk-J4XZCE4A.js.map +1 -0
- package/dist/{chunk-2GXGB6U5.js → chunk-L62HQ5Y4.js} +4 -4
- package/dist/{chunk-NI637AGP.js → chunk-MX6ATKGT.js} +12 -3
- package/dist/chunk-MX6ATKGT.js.map +1 -0
- package/dist/evals/index.d.ts +3 -2
- package/dist/evals/index.js +11 -10
- package/dist/evals/index.js.map +1 -1
- package/dist/extractor/index.d.ts +3 -2
- package/dist/extractor/index.js +9 -8
- package/dist/guardrails/index.d.ts +133 -0
- package/dist/guardrails/index.js +27 -0
- package/dist/guardrails/index.js.map +1 -0
- package/dist/{index-CD9jb9Or.d.ts → index-Oucb3Ljj.d.ts} +7 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +28 -14
- package/dist/internal/agent.d.ts +3 -2
- package/dist/internal/agent.js +7 -6
- package/dist/observability/index.d.ts +2 -1
- package/dist/pipeline/index.d.ts +3 -2
- package/dist/pipeline/index.js +3 -3
- package/dist/request/index.d.ts +3 -2
- package/dist/request/index.js +6 -5
- package/dist/skills/index.js +4 -4
- package/dist/tool/index.js +3 -3
- package/dist/vector-store/index.js +2 -2
- package/package.json +6 -2
- package/dist/chunk-5EDHXYH5.js.map +0 -1
- package/dist/chunk-7CQAERL3.js.map +0 -1
- package/dist/chunk-MLMXQ2OV.js.map +0 -1
- package/dist/chunk-NI637AGP.js.map +0 -1
- /package/dist/{chunk-FV5B4SGK.js.map → chunk-GISFLLNL.js.map} +0 -0
- /package/dist/{chunk-V3WTT7TE.js.map → chunk-HF4KHHNM.js.map} +0 -0
- /package/dist/{chunk-2GXGB6U5.js.map → chunk-L62HQ5Y4.js.map} +0 -0
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { D as DynamicContextOptions, a as DynamicToolOptions, b as AgentEventStore, c as AgentEventStoreOptions, A as Agent } from '../agent-
|
|
2
|
-
export { d as AgentEventAppendInput, e as AgentEventRecord, f as AgentEventStoreInclude, g as AgentSession, h as AgentToolOptions } from '../agent-
|
|
1
|
+
import { D as DynamicContextOptions, a as DynamicToolOptions, b as AgentEventStore, c as AgentEventStoreOptions, A as Agent } from '../agent-BBj3jvBi.js';
|
|
2
|
+
export { d as AgentEventAppendInput, e as AgentEventRecord, f as AgentEventStoreInclude, g as AgentSession, h as AgentToolOptions } from '../agent-BBj3jvBi.js';
|
|
3
3
|
import { Z as ZodSchema } from '../zod-schema-C7F4clpm.js';
|
|
4
4
|
import { C as CompletionModel, e as JsonValue, n as ToolChoice } from '../types-q9G7Bvwl.js';
|
|
5
|
+
import { GuardrailPolicyInput } from '../guardrails/index.js';
|
|
5
6
|
import { P as PromptHook } from '../types-CGML74sE.js';
|
|
6
7
|
import { a as McpServer } from '../types-7F_IKQQW.js';
|
|
7
8
|
import { M as MemoryStore, a as MemoryOptions } from '../types-CqG6d7Ce.js';
|
|
8
|
-
import { b as AgentObserver, O as ObserveOptions } from '../index-
|
|
9
|
+
import { b as AgentObserver, O as ObserveOptions } from '../index-Oucb3Ljj.js';
|
|
9
10
|
import { a as SkillSet } from '../types-BzUuhjKr.js';
|
|
10
11
|
import { k as ToolSearchDocument, l as ToolSet, A as AgentMiddleware, e as ToolMiddleware } from '../middleware-ByyL6Rj0.js';
|
|
11
12
|
import { A as AnyTool, e as ToolApprovalsOptions } from '../tool-B8K543oQ.js';
|
|
@@ -31,6 +32,7 @@ declare class AgentBuilder<M extends CompletionModel = CompletionModel> {
|
|
|
31
32
|
private requestHook;
|
|
32
33
|
private schema;
|
|
33
34
|
private approvalOptions;
|
|
35
|
+
private guardrailPolicies;
|
|
34
36
|
private skillInstructionBlocks;
|
|
35
37
|
private observerRegistrations;
|
|
36
38
|
private dynamicContextRegistrations;
|
|
@@ -69,6 +71,7 @@ declare class AgentBuilder<M extends CompletionModel = CompletionModel> {
|
|
|
69
71
|
toolMiddlewares(middlewares: ToolMiddleware[]): this;
|
|
70
72
|
observe(observer: AgentObserver, options?: ObserveOptions): this;
|
|
71
73
|
approvals(options: ToolApprovalsOptions): this;
|
|
74
|
+
guardrails(policies: GuardrailPolicyInput): this;
|
|
72
75
|
memory(store: MemoryStore, options?: MemoryOptions): this;
|
|
73
76
|
eventStore(store: AgentEventStore, options?: AgentEventStoreOptions): this;
|
|
74
77
|
outputSchema(schema: ZodSchema): this;
|
package/dist/agent/index.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentBuilder
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-MX6ATKGT.js";
|
|
4
|
+
import "../chunk-J4XZCE4A.js";
|
|
5
|
+
import "../chunk-CO7YK4JZ.js";
|
|
6
6
|
import "../chunk-YK4WAAS4.js";
|
|
7
7
|
import "../chunk-XUUY2L2D.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-GISFLLNL.js";
|
|
9
|
+
import "../chunk-IZM6FNCT.js";
|
|
10
|
+
import "../chunk-NPZDYOE6.js";
|
|
11
|
+
import "../chunk-MMHG7WAM.js";
|
|
10
12
|
import "../chunk-M6RPFHG7.js";
|
|
11
13
|
import "../chunk-JS5MGVNM.js";
|
|
12
14
|
import "../chunk-OIMLU4SF.js";
|
|
13
15
|
import "../chunk-SRBW3LD7.js";
|
|
14
16
|
import "../chunk-5LFGEMIW.js";
|
|
15
17
|
import "../chunk-WQKHFADH.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-MMHG7WAM.js";
|
|
18
|
+
import "../chunk-CWUJUSOS.js";
|
|
18
19
|
export {
|
|
19
20
|
AgentBuilder
|
|
20
21
|
};
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { C as CompletionModel, M as Message, D as Document, e as JsonValue, n as ToolChoice, J as JsonObject } from './types-q9G7Bvwl.js';
|
|
2
|
+
import { GuardrailPolicyInput, GuardrailPolicy } from './guardrails/index.js';
|
|
2
3
|
import { P as PromptHook } from './types-CGML74sE.js';
|
|
3
4
|
import { c as MemoryContext, e as MemoryRegistration, S as SessionOptions } from './types-CqG6d7Ce.js';
|
|
4
|
-
import { c as AgentTraceOptions, P as PromptResponse, a as AgentStreamEvent, d as AgentObserverRegistration } from './index-
|
|
5
|
+
import { c as AgentTraceOptions, P as PromptResponse, a as AgentStreamEvent, d as AgentObserverRegistration } from './index-Oucb3Ljj.js';
|
|
5
6
|
import { e as ToolApprovalsOptions, T as Tool, A as AnyTool, f as ToolCallContext, N as NormalizedToolOutput } from './tool-B8K543oQ.js';
|
|
6
7
|
import { A as AgentMiddleware, e as ToolMiddleware, k as ToolSearchDocument, l as ToolSet } from './middleware-ByyL6Rj0.js';
|
|
7
8
|
import { V as VectorFilter, c as VectorSearchResult, a as VectorSearchIndex } from './types-Pl4PFQWL.js';
|
|
8
9
|
|
|
9
10
|
declare class PromptRequest<M extends CompletionModel = CompletionModel> {
|
|
10
11
|
private readonly agent;
|
|
11
|
-
private
|
|
12
|
+
private promptMessage;
|
|
12
13
|
private readonly memoryContext;
|
|
13
14
|
private chatHistory;
|
|
14
15
|
private maxTurnCount;
|
|
15
16
|
private activeHook;
|
|
16
17
|
private approvalOptions;
|
|
18
|
+
private guardrailPolicies;
|
|
19
|
+
private guardrailDecisions;
|
|
17
20
|
private concurrency;
|
|
18
21
|
private traceOptions;
|
|
19
22
|
private requestMiddlewares;
|
|
@@ -27,6 +30,7 @@ declare class PromptRequest<M extends CompletionModel = CompletionModel> {
|
|
|
27
30
|
maxTurns(maxTurns: number): this;
|
|
28
31
|
withHook(hook: PromptHook): this;
|
|
29
32
|
approvals(options: ToolApprovalsOptions): this;
|
|
33
|
+
guardrails(policies: GuardrailPolicyInput): this;
|
|
30
34
|
/**
|
|
31
35
|
* @deprecated Use `withHook` instead.
|
|
32
36
|
*/
|
|
@@ -50,6 +54,9 @@ declare class PromptRequest<M extends CompletionModel = CompletionModel> {
|
|
|
50
54
|
private runCompletion;
|
|
51
55
|
private providerTraceRequest;
|
|
52
56
|
private executeToolCalls;
|
|
57
|
+
private runOutputGuardrailsForResponse;
|
|
58
|
+
private recordGuardrailDecision;
|
|
59
|
+
private guardrailRunContext;
|
|
53
60
|
private startRunObservers;
|
|
54
61
|
private recordAgentEvent;
|
|
55
62
|
private runCompletionCallHook;
|
|
@@ -87,6 +94,7 @@ type AgentOptions<M extends CompletionModel = CompletionModel> = {
|
|
|
87
94
|
outputSchema?: JsonObject | undefined;
|
|
88
95
|
observers?: AgentObserverRegistration[] | undefined;
|
|
89
96
|
approvals?: ToolApprovalsOptions | undefined;
|
|
97
|
+
guardrails?: GuardrailPolicy[] | undefined;
|
|
90
98
|
dynamicContexts?: DynamicContextRegistration[] | undefined;
|
|
91
99
|
dynamicTools?: DynamicToolRegistration[] | undefined;
|
|
92
100
|
middlewares?: AgentMiddleware[] | undefined;
|
|
@@ -167,6 +175,7 @@ declare class Agent<M extends CompletionModel = CompletionModel> {
|
|
|
167
175
|
readonly outputSchema: JsonObject | undefined;
|
|
168
176
|
readonly observers: AgentObserverRegistration[];
|
|
169
177
|
readonly approvals: ToolApprovalsOptions | undefined;
|
|
178
|
+
readonly guardrails: GuardrailPolicy[];
|
|
170
179
|
readonly dynamicContexts: DynamicContextRegistration[];
|
|
171
180
|
readonly dynamicTools: DynamicToolRegistration[];
|
|
172
181
|
readonly middlewares: AgentMiddleware[];
|