@anvia/core 1.0.0-rc.2 → 1.0.0-rc.4

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.
Files changed (96) hide show
  1. package/README.md +77 -10
  2. package/dist/agent/index.d.ts +20 -13
  3. package/dist/agent/index.js +36 -15
  4. package/dist/{agent-yBG8e9Jj.d.ts → agent-CXScUOpX.d.ts} +12 -15
  5. package/dist/chunk-3RM57ZT2.js +31 -0
  6. package/dist/chunk-3RM57ZT2.js.map +1 -0
  7. package/dist/{chunk-DBSCKTUL.js → chunk-5GXSQYQT.js} +1744 -838
  8. package/dist/chunk-5GXSQYQT.js.map +1 -0
  9. package/dist/{chunk-KIDGIJM7.js → chunk-AZB6N7P4.js} +94 -86
  10. package/dist/chunk-AZB6N7P4.js.map +1 -0
  11. package/dist/{chunk-KR3RCCHJ.js → chunk-D2ECOWN5.js} +26 -11
  12. package/dist/chunk-D2ECOWN5.js.map +1 -0
  13. package/dist/{chunk-EINTGEGY.js → chunk-FXAIYTRE.js} +101 -26
  14. package/dist/chunk-FXAIYTRE.js.map +1 -0
  15. package/dist/{chunk-FMHLROPQ.js → chunk-GQL5KRAH.js} +13 -33
  16. package/dist/chunk-GQL5KRAH.js.map +1 -0
  17. package/dist/{chunk-D37WMSP6.js → chunk-J2W63PJI.js} +50 -10
  18. package/dist/chunk-J2W63PJI.js.map +1 -0
  19. package/dist/{chunk-OJH6HWHX.js → chunk-KFR4CDGK.js} +8 -2
  20. package/dist/chunk-KFR4CDGK.js.map +1 -0
  21. package/dist/{chunk-TIZYTPJO.js → chunk-PK5LKOFL.js} +33 -2
  22. package/dist/chunk-PK5LKOFL.js.map +1 -0
  23. package/dist/{chunk-XKYYBABH.js → chunk-RFHQY2IO.js} +2 -2
  24. package/dist/chunk-TRQ3XRFD.js +54 -0
  25. package/dist/chunk-TRQ3XRFD.js.map +1 -0
  26. package/dist/{chunk-CWM7B2OO.js → chunk-VKYZZXP5.js} +10 -2
  27. package/dist/chunk-VKYZZXP5.js.map +1 -0
  28. package/dist/{chunk-77AIYARB.js → chunk-XYTPYUGB.js} +29 -19
  29. package/dist/chunk-XYTPYUGB.js.map +1 -0
  30. package/dist/{chunk-4WI3VGZK.js → chunk-ZCPOIDAQ.js} +3 -3
  31. package/dist/{client-B8DT1vUG.d.ts → client-DvUatElp.d.ts} +4 -3
  32. package/dist/completion/index.d.ts +3 -3
  33. package/dist/completion/index.js +2 -2
  34. package/dist/documents/index.d.ts +34 -0
  35. package/dist/documents/index.js +315 -0
  36. package/dist/documents/index.js.map +1 -0
  37. package/dist/{dynamic-tools-KwEGRbHp.d.ts → dynamic-tools-AEBOTgu1.d.ts} +3 -3
  38. package/dist/embeddings/index.js +2 -1
  39. package/dist/evals/index.d.ts +19 -11
  40. package/dist/evals/index.js +88 -55
  41. package/dist/evals/index.js.map +1 -1
  42. package/dist/extractor/index.d.ts +1 -1
  43. package/dist/extractor/index.js +3 -3
  44. package/dist/guardrails/index.d.ts +6 -129
  45. package/dist/guardrails/index.js +1 -1
  46. package/dist/image-generation/index.d.ts +1 -1
  47. package/dist/index.d.ts +15 -14
  48. package/dist/index.js +49 -28
  49. package/dist/interactions-csssHYcN.d.ts +174 -0
  50. package/dist/internal/agent.d.ts +18 -22
  51. package/dist/internal/agent.js +45 -14
  52. package/dist/internal/agent.js.map +1 -1
  53. package/dist/mcp/index.d.ts +4 -4
  54. package/dist/mcp/index.js +6 -5
  55. package/dist/memory/index.d.ts +3 -3
  56. package/dist/memory/index.js +3 -3
  57. package/dist/{message-schema-Cn7ezRfJ.d.ts → message-schema-B2M7AYzR.d.ts} +1 -1
  58. package/dist/observability/index.d.ts +8 -7
  59. package/dist/observability/index.js +3 -3
  60. package/dist/pipeline/index.d.ts +18 -18
  61. package/dist/pipeline/index.js +20 -29
  62. package/dist/pipeline/index.js.map +1 -1
  63. package/dist/skills/index.d.ts +4 -4
  64. package/dist/skills/index.js +6 -5
  65. package/dist/speech-generation/index.d.ts +1 -1
  66. package/dist/text-C_6eKrbC.d.ts +32 -0
  67. package/dist/{think-tool-6H2QNQzQ.d.ts → think-tool-D8frXxwV.d.ts} +16 -2
  68. package/dist/tool/index.d.ts +6 -6
  69. package/dist/tool/index.js +9 -4
  70. package/dist/{tool--Mz4v1eL.d.ts → tool-r62gf3QY.d.ts} +3 -2
  71. package/dist/transcription/index.d.ts +1 -1
  72. package/dist/{types-Dld1TpWj.d.ts → types-C3gv9EX6.d.ts} +1 -1
  73. package/dist/{types-3x3mOLHU.d.ts → types-CElwurHZ.d.ts} +56 -35
  74. package/dist/types-CIPaIbZo.d.ts +105 -0
  75. package/dist/{types-CQ_ioXWK.d.ts → types-D9rKQ_as.d.ts} +24 -2
  76. package/dist/{types-BVzM4RsC.d.ts → types-DbolvLtZ.d.ts} +1 -1
  77. package/dist/{types-DiJqJejp.d.ts → types-RT3cuyRk.d.ts} +1 -1
  78. package/dist/vector-store/index.d.ts +7 -6
  79. package/dist/vector-store/index.js +6 -3
  80. package/package.json +6 -6
  81. package/dist/chunk-77AIYARB.js.map +0 -1
  82. package/dist/chunk-CWM7B2OO.js.map +0 -1
  83. package/dist/chunk-D37WMSP6.js.map +0 -1
  84. package/dist/chunk-DBSCKTUL.js.map +0 -1
  85. package/dist/chunk-EINTGEGY.js.map +0 -1
  86. package/dist/chunk-FMHLROPQ.js.map +0 -1
  87. package/dist/chunk-KIDGIJM7.js.map +0 -1
  88. package/dist/chunk-KR3RCCHJ.js.map +0 -1
  89. package/dist/chunk-OJH6HWHX.js.map +0 -1
  90. package/dist/chunk-TIZYTPJO.js.map +0 -1
  91. package/dist/loaders/index.d.ts +0 -87
  92. package/dist/loaders/index.js +0 -299
  93. package/dist/loaders/index.js.map +0 -1
  94. package/dist/middleware-C7PdmKF7.d.ts +0 -56
  95. /package/dist/{chunk-XKYYBABH.js.map → chunk-RFHQY2IO.js.map} +0 -0
  96. /package/dist/{chunk-4WI3VGZK.js.map → chunk-ZCPOIDAQ.js.map} +0 -0
@@ -0,0 +1,32 @@
1
+ import { l as GuardrailActionBase, n as GuardrailAllow, o as GuardrailBlock, e as GuardrailPolicyOptions, c as GuardrailPolicy, I as InputGuardrail, O as OutputGuardrail, d as GuardrailPolicyInput } from './types-CIPaIbZo.js';
2
+
3
+ declare function allow(options?: GuardrailActionBase): GuardrailAllow;
4
+ declare function block(options: Omit<GuardrailBlock, "action">): GuardrailBlock;
5
+
6
+ declare function defineGuardrailPolicy(options: GuardrailPolicyOptions): GuardrailPolicy;
7
+ declare function defineInputGuardrail(guardrail: InputGuardrail): InputGuardrail;
8
+ declare function defineOutputGuardrail(guardrail: OutputGuardrail): OutputGuardrail;
9
+ declare function normalizeGuardrailPolicies(policies: GuardrailPolicyInput | undefined): GuardrailPolicy[];
10
+ declare function appendGuardrailPolicies(current: GuardrailPolicy[], next: GuardrailPolicyInput): GuardrailPolicy[];
11
+ declare function hasEnforcedOutputGuardrails(policies: GuardrailPolicy[]): boolean;
12
+
13
+ declare const guardrails: {
14
+ blockText: typeof blockText;
15
+ redactText: typeof redactText;
16
+ };
17
+ type TextPatternBoundary = "input" | "output";
18
+ type TextPatternGuardrailFor<Boundary extends TextPatternBoundary> = Boundary extends "input" ? InputGuardrail : OutputGuardrail;
19
+ type TextPatternGuardrailOptions<Boundary extends TextPatternBoundary = TextPatternBoundary> = {
20
+ id: string;
21
+ boundary: Boundary;
22
+ patterns: Array<string | RegExp>;
23
+ reason: string;
24
+ message?: string | undefined;
25
+ };
26
+ type TextPatternRedactOptions<Boundary extends TextPatternBoundary = TextPatternBoundary> = TextPatternGuardrailOptions<Boundary> & {
27
+ replacement?: string | undefined;
28
+ };
29
+ declare function blockText<Boundary extends TextPatternBoundary>(options: TextPatternGuardrailOptions<Boundary>): TextPatternGuardrailFor<Boundary>;
30
+ declare function redactText<Boundary extends TextPatternBoundary>(options: TextPatternRedactOptions<Boundary>): TextPatternGuardrailFor<Boundary>;
31
+
32
+ export { allow as a, block as b, defineInputGuardrail as c, defineGuardrailPolicy as d, defineOutputGuardrail as e, appendGuardrailPolicies as f, guardrails as g, hasEnforcedOutputGuardrails as h, normalizeGuardrailPolicies as n };
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { Z as ZodSchema } from './zod-schema-C7F4clpm.js';
3
- import { e as ToolRequiresApproval, c as ToolCallContext, T as Tool } from './tool--Mz4v1eL.js';
3
+ import { e as ToolRequiresApproval, c as ToolCallContext, T as Tool } from './tool-r62gf3QY.js';
4
+ import { f as AgentQuestionPrompt, d as AgentQuestionAnswer } from './interactions-csssHYcN.js';
4
5
 
5
6
  type CreateToolOptions<InputSchema extends ZodSchema, OutputSchema extends ZodSchema | undefined = undefined, Output = unknown> = {
6
7
  name: string;
@@ -15,6 +16,19 @@ declare function createTool<InputSchema extends ZodSchema, Output = unknown>(opt
15
16
  }): Tool<z.output<InputSchema>, Output>;
16
17
  declare function createTool<InputSchema extends ZodSchema, OutputSchema extends ZodSchema>(options: CreateToolOptions<InputSchema, OutputSchema>): Tool<z.output<InputSchema>, z.output<OutputSchema>>;
17
18
 
19
+ type QuestionToolInput = {
20
+ questions: readonly AgentQuestionPrompt[];
21
+ };
22
+ type QuestionToolOutput = {
23
+ answers: readonly AgentQuestionAnswer[];
24
+ };
25
+ type CreateQuestionToolOptions = {
26
+ name: string;
27
+ description: string;
28
+ };
29
+ declare function createQuestionTool(options: CreateQuestionToolOptions): Tool<QuestionToolInput, QuestionToolOutput>;
30
+ declare function isQuestionTool(tool: unknown): tool is Tool<QuestionToolInput, QuestionToolOutput>;
31
+
18
32
  type CreateThinkToolOptions = {
19
33
  name?: string;
20
34
  description?: string;
@@ -23,4 +37,4 @@ declare function createThinkTool(options?: CreateThinkToolOptions): Tool<{
23
37
  thought: string;
24
38
  }, string>;
25
39
 
26
- export { type CreateToolOptions as C, createTool as a, type CreateThinkToolOptions as b, createThinkTool as c };
40
+ export { type CreateToolOptions as C, type QuestionToolInput as Q, createThinkTool as a, createTool as b, createQuestionTool as c, type CreateQuestionToolOptions as d, type CreateThinkToolOptions as e, type QuestionToolOutput as f, isQuestionTool as i };
@@ -1,14 +1,14 @@
1
- export { b as CreateThinkToolOptions, C as CreateToolOptions, c as createThinkTool, a as createTool } from '../think-tool-6H2QNQzQ.js';
2
- export { C as CreateToolIndexOptions, E as EmbedToolsOptions, T as ToolIndex, a as ToolSearchDocument, c as createToolIndex, e as embedTools, i as isToolIndex } from '../dynamic-tools-KwEGRbHp.js';
3
- export { A as AgentMiddleware, C as CompletionRequestMiddlewareArgs, a as CompletionRequestMiddlewareResult, b as CompletionResponseMiddlewareArgs, c as CompletionResponseMiddlewareResult, T as ToolInputMiddlewareArgs, d as ToolInputMiddlewareResult, e as ToolOutputMiddlewareArgs, f as ToolOutputMiddlewareResult, g as ToolResultMiddlewareArgs, h as createMiddleware } from '../middleware-C7PdmKF7.js';
4
- export { A as AnyTool, N as NormalizedToolOutput, R as RichToolOutput, T as Tool, a as ToolApprovalContext, b as ToolApprovalRequirement, f as ToolApprovalRunContext, c as ToolCallContext, d as ToolCallStreamEvent, g as ToolOutput, e as ToolRequiresApproval, h as ToolResultSerializationError, n as normalizeToolResultOutput, p as parseToolArgs, t as toolResultContentToText } from '../tool--Mz4v1eL.js';
1
+ export { d as CreateQuestionToolOptions, e as CreateThinkToolOptions, C as CreateToolOptions, Q as QuestionToolInput, f as QuestionToolOutput, c as createQuestionTool, a as createThinkTool, b as createTool, i as isQuestionTool } from '../think-tool-D8frXxwV.js';
2
+ export { C as CreateToolIndexOptions, E as EmbedToolsOptions, T as ToolIndex, a as ToolSearchDocument, c as createToolIndex, e as embedTools, i as isToolIndex } from '../dynamic-tools-AEBOTgu1.js';
3
+ export { c as AgentMiddleware, C as CompletionRequestMiddlewareArgs, i as CompletionRequestMiddlewareResult, j as CompletionResponseMiddlewareArgs, k as CompletionResponseMiddlewareResult, T as ToolInputMiddlewareArgs, l as ToolInputMiddlewareResult, m as ToolOutputMiddlewareArgs, n as ToolOutputMiddlewareResult, o as ToolResultMiddlewareArgs, s as createMiddleware } from '../interactions-csssHYcN.js';
4
+ export { A as AnyTool, N as NormalizedToolOutput, R as RichToolOutput, T as Tool, a as ToolApprovalContext, b as ToolApprovalRequirement, f as ToolApprovalRunContext, c as ToolCallContext, d as ToolCallStreamEvent, g as ToolOutput, e as ToolRequiresApproval, h as ToolResultSerializationError, n as normalizeToolResultOutput, p as parseToolArgs, t as toolResultContentToText } from '../tool-r62gf3QY.js';
5
5
  import 'zod';
6
6
  import '../zod-schema-C7F4clpm.js';
7
7
  import '../retry-CjvSlKGW.js';
8
- import '../types-CQ_ioXWK.js';
8
+ import '../types-D9rKQ_as.js';
9
9
  import '../model-call-options-CZkSw_xN.js';
10
10
  import '../types-Cr4uiYo5.js';
11
- import '../types-Dld1TpWj.js';
11
+ import '../types-C3gv9EX6.js';
12
12
  import '../type-utils-CtHVDRn_.js';
13
13
 
14
14
  declare class ToolCallError extends Error {
@@ -1,10 +1,12 @@
1
1
  import {
2
2
  createMiddleware,
3
+ createQuestionTool,
3
4
  createThinkTool,
4
5
  createToolIndex,
5
6
  embedTools,
7
+ isQuestionTool,
6
8
  isToolIndex
7
- } from "../chunk-D37WMSP6.js";
9
+ } from "../chunk-J2W63PJI.js";
8
10
  import {
9
11
  ToolCallError,
10
12
  ToolJsonError,
@@ -15,9 +17,10 @@ import {
15
17
  normalizeToolResultOutput,
16
18
  parseToolArgs,
17
19
  toolResultContentToText
18
- } from "../chunk-77AIYARB.js";
19
- import "../chunk-FMHLROPQ.js";
20
- import "../chunk-TIZYTPJO.js";
20
+ } from "../chunk-XYTPYUGB.js";
21
+ import "../chunk-GQL5KRAH.js";
22
+ import "../chunk-3RM57ZT2.js";
23
+ import "../chunk-PK5LKOFL.js";
21
24
  import "../chunk-FN7HLLAZ.js";
22
25
  export {
23
26
  ToolCallError,
@@ -26,10 +29,12 @@ export {
26
29
  ToolOutput,
27
30
  ToolResultSerializationError,
28
31
  createMiddleware,
32
+ createQuestionTool,
29
33
  createThinkTool,
30
34
  createTool,
31
35
  createToolIndex,
32
36
  embedTools,
37
+ isQuestionTool,
33
38
  isToolIndex,
34
39
  normalizeToolResultOutput,
35
40
  parseToolArgs,
@@ -1,4 +1,4 @@
1
- import { J as JsonObject, v as ToolDefinition, o as JsonValue, y as ToolResultOutput, x as ToolResultContentPart } from './types-CQ_ioXWK.js';
1
+ import { J as JsonObject, v as ToolDefinition, o as JsonValue, y as ToolResultOutput, x as ToolResultContentPart } from './types-D9rKQ_as.js';
2
2
 
3
3
  type ToolApprovalRunContext = {
4
4
  agentId: string;
@@ -10,7 +10,8 @@ type ToolApprovalContext<Args = unknown> = {
10
10
  toolName: string;
11
11
  args: Args;
12
12
  rawArgs: string;
13
- toolCallId?: string;
13
+ toolCallId: string;
14
+ callId?: string;
14
15
  internalCallId: string;
15
16
  run: ToolApprovalRunContext;
16
17
  };
@@ -1,7 +1,7 @@
1
1
  import { M as ModelCallOptions } from '../model-call-options-CZkSw_xN.js';
2
2
  import { b as RetrySetting } from '../retry-CjvSlKGW.js';
3
3
  export { R as RetryContext, a as RetryOptions } from '../retry-CjvSlKGW.js';
4
- import { J as JsonObject } from '../types-CQ_ioXWK.js';
4
+ import { J as JsonObject } from '../types-D9rKQ_as.js';
5
5
 
6
6
  type TranscriptionRequest = {
7
7
  data: Uint8Array;
@@ -1,5 +1,5 @@
1
1
  import { b as RetrySetting } from './retry-CjvSlKGW.js';
2
- import { J as JsonObject } from './types-CQ_ioXWK.js';
2
+ import { J as JsonObject } from './types-D9rKQ_as.js';
3
3
  import { b as VectorMetadataValue, V as VectorMetadata, a as EmbeddedDocument, S as SparseVector, E as EmbeddingModel, c as SparseEmbeddingModel } from './types-Cr4uiYo5.js';
4
4
 
5
5
  type VectorFilter = {
@@ -1,10 +1,10 @@
1
+ import { a as AgentInteractionRequest, A as AgentContinuation, b as AgentInteractionResponse, c as AgentMiddleware } from './interactions-csssHYcN.js';
1
2
  import { b as RetrySetting } from './retry-CjvSlKGW.js';
2
- import { M as Message, f as CompletionResponse, U as Usage, R as ReasoningContentType, t as ToolCallPart, h as CompletionSource, q as ProviderToolCall, E as UserMessage, k as ContextUsage, e as CompletionRequest, y as ToolResultOutput, x as ToolResultContentPart, X as ToolCallArgumentsMode, J as JsonObject, Q as CompletionModelCapabilities, v as ToolDefinition } from './types-CQ_ioXWK.js';
3
- import { GuardrailPolicyInput, GuardrailDecisionRecord } from './guardrails/index.js';
4
- import { e as MemoryCompactionInfo, z as MemoryScope } from './types-BVzM4RsC.js';
3
+ import { M as Message, f as CompletionResponse, U as Usage, R as ReasoningContentType, t as ToolCallPart, h as CompletionSource, q as ProviderToolCall, E as UserMessage, k as ContextUsage, e as CompletionRequest, y as ToolResultOutput, x as ToolResultContentPart, Z as ToolInteractionResponsePart, Y as ToolCallArgumentsMode, J as JsonObject, Q as CompletionModelCapabilities, v as ToolDefinition } from './types-D9rKQ_as.js';
4
+ import { d as GuardrailPolicyInput, a as GuardrailDecisionRecord } from './types-CIPaIbZo.js';
5
+ import { e as MemoryCompactionInfo, z as MemoryScope } from './types-DbolvLtZ.js';
5
6
  import { D as DeepReadonly, M as MaybePromise } from './type-utils-CtHVDRn_.js';
6
- import { d as ToolCallStreamEvent } from './tool--Mz4v1eL.js';
7
- import { A as AgentMiddleware } from './middleware-C7PdmKF7.js';
7
+ import { d as ToolCallStreamEvent } from './tool-r62gf3QY.js';
8
8
 
9
9
  type AgentLifecycleRunEvent = {
10
10
  runId: string;
@@ -47,6 +47,9 @@ type AgentFinishEvent<Output = string> = (AgentFinishEventBase & {
47
47
  }) | (AgentFinishEventBase & {
48
48
  status: "blocked";
49
49
  stage: "input" | "output";
50
+ }) | (AgentFinishEventBase & {
51
+ status: "suspended";
52
+ interaction: DeepReadonly<AgentInteractionRequest>;
50
53
  });
51
54
  type AgentErrorEvent = AgentLifecycleRunEvent & {
52
55
  error: unknown;
@@ -67,10 +70,20 @@ type AgentInput = {
67
70
  prompt: AgentPrompt;
68
71
  messages?: never;
69
72
  session?: MemoryScope | undefined;
73
+ continuation?: never;
74
+ response?: never;
70
75
  } | {
71
76
  messages: readonly Message[];
72
77
  prompt?: never;
73
78
  session?: never;
79
+ continuation?: never;
80
+ response?: never;
81
+ } | {
82
+ continuation: AgentContinuation;
83
+ response: AgentInteractionResponse;
84
+ prompt?: never;
85
+ messages?: never;
86
+ session?: never;
74
87
  };
75
88
  type AgentSteerInput = {
76
89
  prompt: AgentPrompt;
@@ -90,6 +103,10 @@ type AgentRunSettings<Output = string, RawResponse = unknown> = {
90
103
  trace?: AgentTraceOptions | undefined;
91
104
  };
92
105
  type AgentRunOptions<Output = string, RawResponse = unknown> = AgentInput & AgentRunSettings<Output, RawResponse>;
106
+ type AgentRunLink = Readonly<{
107
+ runId: string;
108
+ interactionId: string;
109
+ }>;
93
110
  type AgentResultBase = {
94
111
  runId: string;
95
112
  text: string;
@@ -101,6 +118,7 @@ type AgentResultBase = {
101
118
  sources?: CompletionSource[] | undefined;
102
119
  providerToolCalls?: ProviderToolCall[] | undefined;
103
120
  memoryCompaction?: MemoryCompactionInfo | undefined;
121
+ resumedFrom?: AgentRunLink | undefined;
104
122
  };
105
123
  type AgentResponse<Output = string> = AgentResultBase & {
106
124
  status: "completed";
@@ -110,32 +128,12 @@ type AgentBlockedResult = AgentResultBase & {
110
128
  status: "blocked";
111
129
  stage: "input" | "output";
112
130
  };
113
- type AgentApprovalRequiredResult = {
114
- status: "approval_required";
115
- runId: string;
116
- approval: AgentToolApprovalRequest;
117
- usage: Usage;
118
- messages: Message[];
119
- memoryCompaction?: MemoryCompactionInfo | undefined;
120
- };
121
- type AgentResult<Output = string> = AgentResponse<Output> | AgentBlockedResult | AgentApprovalRequiredResult;
122
- type AgentToolApprovalRequest = {
123
- id: string;
124
- toolName: string;
125
- toolCallId?: string | undefined;
126
- reason?: string | undefined;
127
- input: unknown;
128
- };
129
- type AgentApprovalRequiredEvent = Omit<AgentApprovalRequiredResult, "status"> & {
130
- type: "approval_required";
131
- };
132
- type AgentApprovalDecision = {
133
- approved: true;
134
- reason?: string;
135
- } | {
136
- approved: false;
137
- reason?: string;
131
+ type AgentSuspendedResult = AgentResultBase & {
132
+ status: "suspended";
133
+ interaction: AgentInteractionRequest;
134
+ continuation: AgentContinuation;
138
135
  };
136
+ type AgentResult<Output = string> = AgentResponse<Output> | AgentBlockedResult | AgentSuspendedResult;
139
137
  type AgentDeltaEvent = {
140
138
  type: "text_delta";
141
139
  delta: string;
@@ -173,6 +171,20 @@ type AgentToolCallDeltaEvent = {
173
171
  type AgentMemoryCompactionEvent = MemoryCompactionInfo & {
174
172
  type: "memory_compaction";
175
173
  };
174
+ type AgentInteractionResponseEvent = {
175
+ type: "interaction_response";
176
+ response: ToolInteractionResponsePart;
177
+ sourceRunId: string;
178
+ };
179
+ type AgentSteerReceipt = Readonly<{
180
+ id: string;
181
+ status: "queued";
182
+ }>;
183
+ type AgentSteeringAppliedEvent = {
184
+ type: "steering_applied";
185
+ id: string;
186
+ turn: number;
187
+ };
176
188
  type AgentChildStreamEventBase<Output = string, RawResponse = unknown> = {
177
189
  type: "turn_start";
178
190
  turn: number;
@@ -226,10 +238,10 @@ type AgentChildStreamEventBase<Output = string, RawResponse = unknown> = {
226
238
  type: "guardrail_decision";
227
239
  turn?: number | undefined;
228
240
  decision: GuardrailDecisionRecord;
229
- } | AgentMemoryCompactionEvent | {
241
+ } | AgentMemoryCompactionEvent | AgentInteractionResponseEvent | AgentSteeringAppliedEvent | {
230
242
  type: "final";
231
- result: AgentResponse<Output> | AgentBlockedResult;
232
- } | AgentApprovalRequiredEvent | AgentErrorStreamEvent;
243
+ result: AgentResult<Output>;
244
+ } | AgentErrorStreamEvent;
233
245
  type AgentChildStreamEvent<Output = string, RawResponse = unknown> = AgentChildStreamEventBase<Output, RawResponse> | AgentToolCallDeltaEvent;
234
246
  type AgentToolStreamEvent = {
235
247
  type: "agent_tool_event";
@@ -243,7 +255,7 @@ type AgentToolStreamEvent = {
243
255
  };
244
256
  type AgentStreamEvent<Output = string, RawResponse = unknown> = AgentChildStreamEvent<Output, RawResponse> | AgentToolStreamEvent;
245
257
  interface AgentStream<Event = AgentStreamEvent> extends AsyncIterable<Event> {
246
- steer(input: AgentSteerInput): boolean;
258
+ steer(input: AgentSteerInput): AgentSteerReceipt;
247
259
  }
248
260
 
249
261
  type AgentTraceInfo = {
@@ -278,11 +290,13 @@ type AgentRunStartArgs = {
278
290
  readonly maxTurns: number;
279
291
  };
280
292
  type AgentRunEndArgsBase = {
293
+ readonly runId: string;
281
294
  readonly text: string;
282
295
  readonly usage: DeepReadonly<Usage>;
283
296
  readonly messages: readonly DeepReadonly<Message>[];
284
297
  readonly sources?: readonly DeepReadonly<CompletionSource>[] | undefined;
285
298
  readonly providerToolCalls?: readonly DeepReadonly<ProviderToolCall>[] | undefined;
299
+ readonly resumedFrom?: DeepReadonly<AgentRunLink> | undefined;
286
300
  };
287
301
  type AgentRunEndArgs = (AgentRunEndArgsBase & {
288
302
  readonly status: "completed";
@@ -290,6 +304,9 @@ type AgentRunEndArgs = (AgentRunEndArgsBase & {
290
304
  }) | (AgentRunEndArgsBase & {
291
305
  readonly status: "blocked";
292
306
  readonly stage: "input" | "output";
307
+ }) | (AgentRunEndArgsBase & {
308
+ readonly status: "suspended";
309
+ readonly interaction: DeepReadonly<AgentInteractionRequest>;
293
310
  });
294
311
  type AgentRunErrorArgs = {
295
312
  readonly error: unknown;
@@ -344,6 +361,9 @@ type AgentToolEndArgs = AgentToolStartArgs & {
344
361
  type AgentToolErrorArgs = AgentToolStartArgs & {
345
362
  readonly error: unknown;
346
363
  };
364
+ type AgentToolSuspendedArgs = AgentToolStartArgs & {
365
+ readonly interaction: DeepReadonly<AgentInteractionRequest>;
366
+ };
347
367
  type AgentToolStreamEventArgs = AgentToolStartArgs & {
348
368
  readonly event: DeepReadonly<ToolCallStreamEvent>;
349
369
  };
@@ -355,6 +375,7 @@ interface AgentGenerationObserver {
355
375
  interface AgentToolObserver {
356
376
  streamEvent?(args: AgentToolStreamEventArgs): void | Promise<void>;
357
377
  end(args: AgentToolEndArgs): void | Promise<void>;
378
+ suspend?(args: AgentToolSuspendedArgs): void | Promise<void>;
358
379
  error?(args: AgentToolErrorArgs): void | Promise<void>;
359
380
  }
360
381
  interface AgentRunObserver {
@@ -376,4 +397,4 @@ type AgentObservabilityOptions<Observers extends AgentObserverMap = AgentObserve
376
397
  readonly errorPolicy?: AgentObserverErrorPolicy | undefined;
377
398
  };
378
399
 
379
- export type { AgentApprovalDecision as A, AgentGenerationErrorArgs as B, AgentGenerationModelInfo as C, AgentGenerationObserver as D, AgentGenerationStartArgs as E, AgentGenerationUpdateArgs as F, AgentObservabilityOptions as G, AgentObserver as H, AgentObserverErrorPolicy as I, AgentObserverMap as J, AgentObserverTraceInfo as K, AgentRunEndArgs as L, AgentRunErrorArgs as M, AgentRunEventArgs as N, AgentRunObserver as O, AgentRunPromptRef as P, AgentRunStartArgs as Q, AgentToolEndArgs as R, AgentToolErrorArgs as S, AgentToolObserver as T, AgentToolStartArgs as U, AgentToolStreamEventArgs as V, AgentTraceInfo as W, AgentTraceOptions as X, AgentApprovalRequiredEvent as a, AgentApprovalRequiredResult as b, AgentBlockedResult as c, AgentChildStreamEvent as d, AgentDeltaEvent as e, AgentErrorEvent as f, AgentErrorStreamEvent as g, AgentFinishEvent as h, AgentInput as i, AgentLifecycle as j, AgentMemoryCompactionEvent as k, AgentPrompt as l, AgentResponse as m, AgentResult as n, AgentRunOptions as o, AgentRunSettings as p, AgentStartEvent as q, AgentSteerInput as r, AgentStepFinishEvent as s, AgentStream as t, AgentStreamEvent as u, AgentToolApprovalRequest as v, AgentToolCallDeltaEvent as w, AgentToolFinishEvent as x, AgentToolStartEvent as y, AgentGenerationEndArgs as z };
400
+ export type { AgentBlockedResult as A, AgentGenerationObserver as B, AgentGenerationStartArgs as C, AgentGenerationUpdateArgs as D, AgentObservabilityOptions as E, AgentObserver as F, AgentObserverErrorPolicy as G, AgentObserverMap as H, AgentObserverTraceInfo as I, AgentRunEndArgs as J, AgentRunErrorArgs as K, AgentRunEventArgs as L, AgentRunObserver as M, AgentRunPromptRef as N, AgentRunStartArgs as O, AgentToolEndArgs as P, AgentToolErrorArgs as Q, AgentToolObserver as R, AgentToolStartArgs as S, AgentToolStreamEventArgs as T, AgentToolSuspendedArgs as U, AgentTraceInfo as V, AgentTraceOptions as W, AgentChildStreamEvent as a, AgentDeltaEvent as b, AgentErrorEvent as c, AgentErrorStreamEvent as d, AgentFinishEvent as e, AgentInput as f, AgentLifecycle as g, AgentMemoryCompactionEvent as h, AgentPrompt as i, AgentResponse as j, AgentResult as k, AgentRunOptions as l, AgentRunSettings as m, AgentStartEvent as n, AgentSteerInput as o, AgentSteerReceipt as p, AgentStepFinishEvent as q, AgentStream as r, AgentStreamEvent as s, AgentSuspendedResult as t, AgentToolCallDeltaEvent as u, AgentToolFinishEvent as v, AgentToolStartEvent as w, AgentGenerationEndArgs as x, AgentGenerationErrorArgs as y, AgentGenerationModelInfo as z };
@@ -0,0 +1,105 @@
1
+ import { M as Message, J as JsonObject, U as Usage } from './types-D9rKQ_as.js';
2
+ import { M as MaybePromise } from './type-utils-CtHVDRn_.js';
3
+
4
+ type GuardrailMode = "enforce" | "observe";
5
+ type GuardrailBoundary = "input" | "output";
6
+ type GuardrailRunContext = {
7
+ agentId: string;
8
+ runId: string;
9
+ sessionId?: string | undefined;
10
+ metadata?: JsonObject | undefined;
11
+ };
12
+ type GuardrailDecisionRecord = {
13
+ policyId: string;
14
+ guardrailId: string;
15
+ boundary: GuardrailBoundary;
16
+ mode: GuardrailMode;
17
+ action: GuardrailActionName;
18
+ applied: boolean;
19
+ reason?: string | undefined;
20
+ message?: string | undefined;
21
+ metadata?: JsonObject | undefined;
22
+ latencyMs: number;
23
+ };
24
+ type GuardrailActionName = "allow" | "block" | "rewrite" | "error";
25
+ type GuardrailActionBase = {
26
+ reason?: string | undefined;
27
+ metadata?: JsonObject | undefined;
28
+ };
29
+ type GuardrailAllow = GuardrailActionBase & {
30
+ action: "allow";
31
+ };
32
+ type GuardrailBlock = GuardrailActionBase & {
33
+ action: "block";
34
+ reason: string;
35
+ message?: string | undefined;
36
+ };
37
+ type InputGuardrailRewrite = GuardrailActionBase & {
38
+ action: "rewrite";
39
+ prompt?: Message | undefined;
40
+ inputText?: string | undefined;
41
+ };
42
+ type OutputGuardrailRewrite = GuardrailActionBase & {
43
+ action: "rewrite";
44
+ outputText: string;
45
+ };
46
+ type InputGuardrailResult = GuardrailAllow | GuardrailBlock | InputGuardrailRewrite;
47
+ type OutputGuardrailResult = GuardrailAllow | GuardrailBlock | OutputGuardrailRewrite;
48
+ type GuardrailCommonActions = {
49
+ allow(options?: GuardrailActionBase): GuardrailAllow;
50
+ block(options: Omit<GuardrailBlock, "action">): GuardrailBlock;
51
+ };
52
+ type InputGuardrailActions = GuardrailCommonActions & {
53
+ rewrite(options: Omit<InputGuardrailRewrite, "action">): InputGuardrailRewrite;
54
+ };
55
+ type OutputGuardrailActions = GuardrailCommonActions & {
56
+ rewrite(options: Omit<OutputGuardrailRewrite, "action">): OutputGuardrailRewrite;
57
+ };
58
+ type InputGuardrailContext = {
59
+ prompt: Message;
60
+ history: Message[];
61
+ inputText: string;
62
+ run: GuardrailRunContext;
63
+ };
64
+ type OutputGuardrailContext = {
65
+ outputText: string;
66
+ messages: Message[];
67
+ usage: Usage;
68
+ run: GuardrailRunContext;
69
+ };
70
+ type InputGuardrail = {
71
+ id: string;
72
+ check(context: InputGuardrailContext, actions: InputGuardrailActions): MaybePromise<InputGuardrailResult | undefined>;
73
+ };
74
+ type OutputGuardrail = {
75
+ id: string;
76
+ check(context: OutputGuardrailContext, actions: OutputGuardrailActions): MaybePromise<OutputGuardrailResult | undefined>;
77
+ };
78
+ type GuardrailPolicy = {
79
+ id: string;
80
+ mode: GuardrailMode;
81
+ input: InputGuardrail[];
82
+ output: OutputGuardrail[];
83
+ };
84
+ type GuardrailPolicyOptions = {
85
+ id: string;
86
+ mode?: GuardrailMode | undefined;
87
+ input?: InputGuardrail[] | undefined;
88
+ output?: OutputGuardrail[] | undefined;
89
+ };
90
+ type GuardrailPolicyInput = GuardrailPolicy | GuardrailPolicy[];
91
+ type InputGuardrailRunResult = {
92
+ prompt: Message;
93
+ inputText: string;
94
+ blocked: boolean;
95
+ message?: string | undefined;
96
+ decisions: GuardrailDecisionRecord[];
97
+ };
98
+ type OutputGuardrailRunResult = {
99
+ outputText: string;
100
+ blocked: boolean;
101
+ message?: string | undefined;
102
+ decisions: GuardrailDecisionRecord[];
103
+ };
104
+
105
+ export type { GuardrailBoundary as G, InputGuardrail as I, OutputGuardrail as O, GuardrailDecisionRecord as a, GuardrailMode as b, GuardrailPolicy as c, GuardrailPolicyInput as d, GuardrailPolicyOptions as e, InputGuardrailActions as f, InputGuardrailContext as g, OutputGuardrailActions as h, OutputGuardrailContext as i, InputGuardrailRunResult as j, OutputGuardrailRunResult as k, GuardrailActionBase as l, GuardrailActionName as m, GuardrailAllow as n, GuardrailBlock as o, GuardrailCommonActions as p, GuardrailRunContext as q, InputGuardrailResult as r, InputGuardrailRewrite as s, OutputGuardrailResult as t, OutputGuardrailRewrite as u };
@@ -97,6 +97,28 @@ type ToolResultPart = Readonly<{
97
97
  toolName: string;
98
98
  output: ToolResultOutput;
99
99
  }>;
100
+ type ToolApprovalResponsePart = Readonly<{
101
+ type: "tool-approval-response";
102
+ interactionId: string;
103
+ toolCallId: string;
104
+ callId?: string;
105
+ toolName: string;
106
+ approved: boolean;
107
+ reason?: string;
108
+ }>;
109
+ type ToolQuestionAnswer = Readonly<{
110
+ questionId: string;
111
+ value: string;
112
+ }>;
113
+ type ToolQuestionResponsePart = Readonly<{
114
+ type: "tool-question-response";
115
+ interactionId: string;
116
+ toolCallId: string;
117
+ callId?: string;
118
+ toolName: string;
119
+ answers: readonly ToolQuestionAnswer[];
120
+ }>;
121
+ type ToolInteractionResponsePart = ToolApprovalResponsePart | ToolQuestionResponsePart;
100
122
  type UserContentPart = TextPart | ImagePart | FilePart;
101
123
  type AssistantContentPart = TextPart | ImagePart | FilePart | ReasoningPart | ToolCallPart;
102
124
  type SystemMessage<Metadata extends JsonObject = JsonObject> = Readonly<{
@@ -117,7 +139,7 @@ type AssistantMessage<Metadata extends JsonObject = JsonObject> = Readonly<{
117
139
  }>;
118
140
  type ToolMessage<Metadata extends JsonObject = JsonObject> = Readonly<{
119
141
  role: "tool";
120
- content: readonly ToolResultPart[];
142
+ content: readonly (ToolResultPart | ToolInteractionResponsePart)[];
121
143
  metadata?: Metadata;
122
144
  }>;
123
145
  type Message<Metadata extends JsonObject = JsonObject> = SystemMessage<Metadata> | UserMessage<Metadata> | AssistantMessage<Metadata> | ToolMessage<Metadata>;
@@ -316,4 +338,4 @@ declare function assertCompletionRequestSupported(model: CompletionModel, reques
316
338
  }): void;
317
339
  declare function textFromAssistantContent(content: readonly AssistantContentPart[]): string;
318
340
 
319
- export { textFromAssistantContent as $, type AssistantContentPart as A, type UserContentPart as B, type CompletionModel as C, type Document as D, type UserMessage as E, type FileData as F, calculateContextUsage as G, getAssistantGenerationMetadata as H, type ImageDetail as I, type JsonObject as J, isProviderTool as K, resolveModelContextLimits as L, type Message as M, withContextUsage as N, CompletionCapabilityError as O, type ProviderTool as P, type CompletionModelCapabilities as Q, type ReasoningContentType as R, type SystemMessage as S, type TextPart as T, Usage as U, type CompletionStreamPart as V, type StreamingCompletionModel as W, type ToolCallArgumentsMode as X, type UsageDetails as Y, assertCompletionRequestSupported as Z, reasoningDisplayText as _, type AssistantGenerationMetadata as a, type AssistantMessage as b, type CompletionModelInfo as c, type CompletionModelStreamEvent as d, type CompletionRequest as e, type CompletionResponse as f, type CompletionResult as g, type CompletionSource as h, type CompletionStreamEvent as i, type CompletionTool as j, type ContextUsage as k, type FilePart as l, type ImagePart as m, type JsonPrimitive as n, type JsonValue as o, type ModelContextLimits as p, type ProviderToolCall as q, type ReasoningDetail as r, type ReasoningPart as s, type ToolCallPart as t, type ToolChoice as u, type ToolDefinition as v, type ToolMessage as w, type ToolResultContentPart as x, type ToolResultOutput as y, type ToolResultPart as z };
341
+ export { type ToolQuestionResponsePart as $, type AssistantContentPart as A, type UserContentPart as B, type CompletionModel as C, type Document as D, type UserMessage as E, type FileData as F, calculateContextUsage as G, getAssistantGenerationMetadata as H, type ImageDetail as I, type JsonObject as J, isProviderTool as K, resolveModelContextLimits as L, type Message as M, withContextUsage as N, CompletionCapabilityError as O, type ProviderTool as P, type CompletionModelCapabilities as Q, type ReasoningContentType as R, type SystemMessage as S, type TextPart as T, Usage as U, type CompletionStreamPart as V, type StreamingCompletionModel as W, type ToolApprovalResponsePart as X, type ToolCallArgumentsMode as Y, type ToolInteractionResponsePart as Z, type ToolQuestionAnswer as _, type AssistantGenerationMetadata as a, type UsageDetails as a0, assertCompletionRequestSupported as a1, reasoningDisplayText as a2, textFromAssistantContent as a3, type AssistantMessage as b, type CompletionModelInfo as c, type CompletionModelStreamEvent as d, type CompletionRequest as e, type CompletionResponse as f, type CompletionResult as g, type CompletionSource as h, type CompletionStreamEvent as i, type CompletionTool as j, type ContextUsage as k, type FilePart as l, type ImagePart as m, type JsonPrimitive as n, type JsonValue as o, type ModelContextLimits as p, type ProviderToolCall as q, type ReasoningDetail as r, type ReasoningPart as s, type ToolCallPart as t, type ToolChoice as u, type ToolDefinition as v, type ToolMessage as w, type ToolResultContentPart as x, type ToolResultOutput as y, type ToolResultPart as z };
@@ -1,4 +1,4 @@
1
- import { U as Usage, J as JsonObject, M as Message, S as SystemMessage, C as CompletionModel } from './types-CQ_ioXWK.js';
1
+ import { U as Usage, J as JsonObject, M as Message, S as SystemMessage, C as CompletionModel } from './types-D9rKQ_as.js';
2
2
  import { b as RetrySetting } from './retry-CjvSlKGW.js';
3
3
 
4
4
  type MemorySavePolicy = "message" | "turn" | "run";
@@ -1,4 +1,4 @@
1
- import { A as AnyTool } from './tool--Mz4v1eL.js';
1
+ import { A as AnyTool } from './tool-r62gf3QY.js';
2
2
 
3
3
  type Skill = {
4
4
  readonly name: string;
@@ -1,10 +1,10 @@
1
- import { b as VectorMetadataValue, V as VectorMetadata, a as EmbeddedDocument } from '../types-Cr4uiYo5.js';
2
- import { T as Tool } from '../tool--Mz4v1eL.js';
3
- import { V as VectorFilter, R as RetrieveDocumentsOptions, a as VectorSearchResult, f as RetrieveHybridDocumentsOptions, d as VectorStore, I as IndexStrategy, g as VectorStoreUpsertOptions, h as VectorSearchRequest, b as VectorInspectRequest, c as VectorInspectPage, i as VectorSearchToolOptions } from '../types-Dld1TpWj.js';
4
- export { D as DenseVectorSearchToolOptions, j as HybridVectorSearchRequest, k as HybridVectorSearchToolOptions, H as HybridVectorStore, L as LshOptions, l as RetrieveDocumentsBaseOptions, e as VectorFusion, m as VectorInspectItem, n as VectorMetric, o as VectorSearchToolBaseOptions } from '../types-Dld1TpWj.js';
1
+ import { V as VectorMetadata, b as VectorMetadataValue, a as EmbeddedDocument } from '../types-Cr4uiYo5.js';
2
+ import { T as Tool } from '../tool-r62gf3QY.js';
3
+ import { V as VectorFilter, R as RetrieveDocumentsOptions, a as VectorSearchResult, f as RetrieveHybridDocumentsOptions, d as VectorStore, I as IndexStrategy, g as VectorStoreUpsertOptions, h as VectorSearchRequest, b as VectorInspectRequest, c as VectorInspectPage, i as VectorSearchToolOptions } from '../types-C3gv9EX6.js';
4
+ export { D as DenseVectorSearchToolOptions, j as HybridVectorSearchRequest, k as HybridVectorSearchToolOptions, H as HybridVectorStore, L as LshOptions, l as RetrieveDocumentsBaseOptions, e as VectorFusion, m as VectorInspectItem, n as VectorMetric, o as VectorSearchToolBaseOptions } from '../types-C3gv9EX6.js';
5
5
  import '../model-call-options-CZkSw_xN.js';
6
6
  import '../retry-CjvSlKGW.js';
7
- import '../types-CQ_ioXWK.js';
7
+ import '../types-D9rKQ_as.js';
8
8
 
9
9
  declare const vectorFilter: {
10
10
  eq(key: string, value: VectorMetadataValue): VectorFilter;
@@ -13,6 +13,7 @@ declare const vectorFilter: {
13
13
  and(left: VectorFilter, right: VectorFilter): VectorFilter;
14
14
  or(left: VectorFilter, right: VectorFilter): VectorFilter;
15
15
  };
16
+ declare function matchesVectorFilter(metadata: VectorMetadata | undefined, filter: VectorFilter | undefined): boolean;
16
17
 
17
18
  declare function retrieveDocuments<T, Metadata extends VectorMetadata = VectorMetadata>(options: RetrieveDocumentsOptions<T, Metadata>): Promise<Array<VectorSearchResult<T, Metadata>>>;
18
19
  declare function retrieveDocuments<T, Metadata extends VectorMetadata = VectorMetadata>(options: RetrieveHybridDocumentsOptions<T, Metadata>): Promise<Array<VectorSearchResult<T, Metadata>>>;
@@ -54,4 +55,4 @@ declare function createVectorSearchTool<T, Metadata extends VectorMetadata>(opti
54
55
  topK?: number;
55
56
  }, Array<VectorSearchResult<T, Metadata>>>;
56
57
 
57
- export { InMemoryVectorStore, type InMemoryVectorStoreFromDocumentsOptions, type InMemoryVectorStoreOptions, IndexStrategy, RetrieveDocumentsOptions, RetrieveHybridDocumentsOptions, VectorFilter, VectorInspectPage, VectorInspectRequest, VectorSearchRequest, VectorSearchResult, VectorSearchToolOptions, VectorStore, VectorStoreUpsertOptions, createVectorSearchTool, retrieveDocuments, vectorFilter };
58
+ export { InMemoryVectorStore, type InMemoryVectorStoreFromDocumentsOptions, type InMemoryVectorStoreOptions, IndexStrategy, RetrieveDocumentsOptions, RetrieveHybridDocumentsOptions, VectorFilter, VectorInspectPage, VectorInspectRequest, VectorSearchRequest, VectorSearchResult, VectorSearchToolOptions, VectorStore, VectorStoreUpsertOptions, createVectorSearchTool, matchesVectorFilter, retrieveDocuments, vectorFilter };
@@ -1,15 +1,18 @@
1
1
  import {
2
2
  InMemoryVectorStore,
3
3
  createVectorSearchTool,
4
+ matchesVectorFilter,
4
5
  retrieveDocuments,
5
6
  vectorFilter
6
- } from "../chunk-77AIYARB.js";
7
- import "../chunk-FMHLROPQ.js";
8
- import "../chunk-TIZYTPJO.js";
7
+ } from "../chunk-XYTPYUGB.js";
8
+ import "../chunk-GQL5KRAH.js";
9
+ import "../chunk-3RM57ZT2.js";
10
+ import "../chunk-PK5LKOFL.js";
9
11
  import "../chunk-FN7HLLAZ.js";
10
12
  export {
11
13
  InMemoryVectorStore,
12
14
  createVectorSearchTool,
15
+ matchesVectorFilter,
13
16
  retrieveDocuments,
14
17
  vectorFilter
15
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anvia/core",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.4",
4
4
  "description": "Core runtime primitives for context-aware Anvia agents.",
5
5
  "author": "anvia",
6
6
  "maintainer": "Indra Zulfi",
@@ -17,6 +17,7 @@
17
17
  "access": "public"
18
18
  },
19
19
  "type": "module",
20
+ "sideEffects": false,
20
21
  "main": "./dist/index.js",
21
22
  "types": "./dist/index.d.ts",
22
23
  "exports": {
@@ -48,9 +49,9 @@
48
49
  "types": "./dist/evals/index.d.ts",
49
50
  "import": "./dist/evals/index.js"
50
51
  },
51
- "./loaders": {
52
- "types": "./dist/loaders/index.d.ts",
53
- "import": "./dist/loaders/index.js"
52
+ "./documents": {
53
+ "types": "./dist/documents/index.d.ts",
54
+ "import": "./dist/documents/index.js"
54
55
  },
55
56
  "./extractor": {
56
57
  "types": "./dist/extractor/index.d.ts",
@@ -108,7 +109,6 @@
108
109
  "dependencies": {
109
110
  "@modelcontextprotocol/sdk": "^1.30.0",
110
111
  "pdfjs-dist": "^6.2.108",
111
- "tinyglobby": "^0.2.17",
112
112
  "undici": "^8.10.0",
113
113
  "yaml": "^2.9.0",
114
114
  "zod": "^4.4.3"
@@ -120,7 +120,7 @@
120
120
  "vitest": "^4.0.8"
121
121
  },
122
122
  "scripts": {
123
- "build": "tsup src/index.ts src/agent/index.ts src/internal/agent.ts src/speech-generation/index.ts src/completion/index.ts src/embeddings/index.ts src/evals/index.ts src/image-generation/index.ts src/loaders/index.ts src/extractor/index.ts src/guardrails/index.ts src/mcp/index.ts src/memory/index.ts src/model-listing/index.ts src/observability/index.ts src/pipeline/index.ts src/skills/index.ts src/streaming/index.ts src/tool/index.ts src/transcription/index.ts src/vector-store/index.ts --format esm --dts --sourcemap --clean",
123
+ "build": "tsup src/index.ts src/agent/index.ts src/internal/agent.ts src/speech-generation/index.ts src/completion/index.ts src/embeddings/index.ts src/evals/index.ts src/image-generation/index.ts src/documents/index.ts src/extractor/index.ts src/guardrails/index.ts src/mcp/index.ts src/memory/index.ts src/model-listing/index.ts src/observability/index.ts src/pipeline/index.ts src/skills/index.ts src/streaming/index.ts src/tool/index.ts src/transcription/index.ts src/vector-store/index.ts --format esm --dts --sourcemap --clean",
124
124
  "test": "vitest run",
125
125
  "typecheck": "tsc --noEmit"
126
126
  }