@anvia/core 1.0.0-rc.5 → 1.0.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -6
- package/dist/agent/index.d.ts +20 -14
- package/dist/agent/index.js +5 -5
- package/dist/agent/interactions/index.d.ts +1 -1
- package/dist/{agent-LlCD_2UQ.d.ts → agent-BK3jud9q.d.ts} +10 -10
- package/dist/{chunk-E5J4OY4K.js → chunk-7O45T5F2.js} +2 -2
- package/dist/{chunk-YDJA4R37.js → chunk-BOCJCECN.js} +2 -2
- package/dist/{chunk-HSA6NL2E.js → chunk-HT4P3SSG.js} +61 -5
- package/dist/chunk-HT4P3SSG.js.map +1 -0
- package/dist/{chunk-DNQNOHD5.js → chunk-QXQQ2DBM.js} +2 -2
- package/dist/{chunk-FCANRQ5Q.js → chunk-QXSVVYQK.js} +151 -28
- package/dist/chunk-QXSVVYQK.js.map +1 -0
- package/dist/{chunk-TEV3OB7N.js → chunk-VGJRXUPT.js} +10 -3
- package/dist/chunk-VGJRXUPT.js.map +1 -0
- package/dist/{client-DvUatElp.d.ts → client-BdQ_QZsY.d.ts} +2 -2
- package/dist/completion/index.d.ts +3 -3
- package/dist/completion/index.js +3 -1
- package/dist/{dynamic-tools-AEBOTgu1.d.ts → dynamic-tools--Aw37H9d.d.ts} +3 -3
- package/dist/evals/index.d.ts +6 -6
- package/dist/evals/index.js +3 -3
- package/dist/extractor/index.d.ts +1 -1
- package/dist/extractor/index.js +2 -2
- package/dist/guardrails/index.d.ts +4 -4
- package/dist/image-generation/index.d.ts +1 -1
- package/dist/index.d.ts +14 -14
- package/dist/index.js +7 -5
- package/dist/internal/agent.d.ts +11 -11
- package/dist/internal/agent.js +5 -5
- package/dist/mcp/index.d.ts +4 -4
- package/dist/memory/index.d.ts +3 -3
- package/dist/memory/index.js +2 -2
- package/dist/{message-schema-B2M7AYzR.d.ts → message-schema-_sP_RKhh.d.ts} +18 -2
- package/dist/{middleware-BqtLB_Xt.d.ts → middleware-QZsbz7Hf.d.ts} +1 -1
- package/dist/observability/index.d.ts +6 -6
- package/dist/observability/index.js +2 -2
- package/dist/pipeline/index.d.ts +11 -11
- package/dist/pipeline/index.js +3 -3
- package/dist/skills/index.d.ts +4 -4
- package/dist/speech-generation/index.d.ts +1 -1
- package/dist/{text-C_6eKrbC.d.ts → text-DTg1a8Mg.d.ts} +1 -1
- package/dist/{think-tool-Cz3QYNPX.d.ts → think-tool-C0n_dF2K.d.ts} +1 -1
- package/dist/tool/index.d.ts +6 -6
- package/dist/{tool-r62gf3QY.d.ts → tool-xHM_GmzT.d.ts} +1 -1
- package/dist/transcription/index.d.ts +1 -1
- package/dist/{types-1KpjDfoN.d.ts → types-2DBdXArn.d.ts} +7 -5
- package/dist/{types-DbolvLtZ.d.ts → types-B1KL4w14.d.ts} +1 -1
- package/dist/{types-C3gv9EX6.d.ts → types-D0Y2ZWS3.d.ts} +1 -1
- package/dist/{types-CIPaIbZo.d.ts → types-D7A6CIGt.d.ts} +1 -1
- package/dist/{types-D9rKQ_as.d.ts → types-DboZvHR_.d.ts} +8 -1
- package/dist/{types-RT3cuyRk.d.ts → types-Dyp7arZQ.d.ts} +1 -1
- package/dist/vector-store/index.d.ts +4 -4
- package/package.json +1 -1
- package/dist/chunk-FCANRQ5Q.js.map +0 -1
- package/dist/chunk-HSA6NL2E.js.map +0 -1
- package/dist/chunk-TEV3OB7N.js.map +0 -1
- /package/dist/{chunk-E5J4OY4K.js.map → chunk-7O45T5F2.js.map} +0 -0
- /package/dist/{chunk-YDJA4R37.js.map → chunk-BOCJCECN.js.map} +0 -0
- /package/dist/{chunk-DNQNOHD5.js.map → chunk-QXQQ2DBM.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
+
import { e as ToolRequiresApproval, c as ToolCallContext, T as Tool } from './tool-xHM_GmzT.js';
|
|
4
4
|
import { AgentQuestionPrompt, AgentQuestionAnswer } from './agent/interactions/index.js';
|
|
5
5
|
|
|
6
6
|
type CreateToolOptions<InputSchema extends ZodSchema, OutputSchema extends ZodSchema | undefined = undefined, Output = unknown> = {
|
package/dist/tool/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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-
|
|
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
|
|
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-
|
|
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-
|
|
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-C0n_dF2K.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--Aw37H9d.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-QZsbz7Hf.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-xHM_GmzT.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../zod-schema-C7F4clpm.js';
|
|
7
7
|
import '../agent/interactions/index.js';
|
|
8
|
-
import '../types-
|
|
8
|
+
import '../types-DboZvHR_.js';
|
|
9
9
|
import '../model-call-options-CZkSw_xN.js';
|
|
10
10
|
import '../retry-CjvSlKGW.js';
|
|
11
11
|
import '../types-Cr4uiYo5.js';
|
|
12
|
-
import '../types-
|
|
12
|
+
import '../types-D0Y2ZWS3.js';
|
|
13
13
|
import '../type-utils-CtHVDRn_.js';
|
|
14
14
|
|
|
15
15
|
declare class ToolCallError extends Error {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as JsonObject,
|
|
1
|
+
import { J as JsonObject, w as ToolDefinition, p as JsonValue, z as ToolResultOutput, y as ToolResultContentPart } from './types-DboZvHR_.js';
|
|
2
2
|
|
|
3
3
|
type ToolApprovalRunContext = {
|
|
4
4
|
agentId: string;
|
|
@@ -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-
|
|
4
|
+
import { J as JsonObject } from '../types-DboZvHR_.js';
|
|
5
5
|
|
|
6
6
|
type TranscriptionRequest = {
|
|
7
7
|
data: Uint8Array;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AgentInteractionRequest, AgentContinuation, AgentInteractionResponse } from './agent/interactions/index.js';
|
|
2
2
|
import { b as RetrySetting } from './retry-CjvSlKGW.js';
|
|
3
|
-
import { M as Message,
|
|
4
|
-
import { d as GuardrailPolicyInput, a as GuardrailDecisionRecord } from './types-
|
|
5
|
-
import { e as MemoryCompactionInfo, z as MemoryScope } from './types-
|
|
3
|
+
import { M as Message, g as CompletionResponse, U as Usage, R as ReasoningContentType, u as ToolCallPart, i as CompletionSource, r as ProviderToolCall, G as UserMessage, C as CompletionFinishReason, l as ContextUsage, f as CompletionRequest, z as ToolResultOutput, y as ToolResultContentPart, _ as ToolInteractionResponsePart, Z as ToolCallArgumentsMode, J as JsonObject, V as CompletionModelCapabilities, w as ToolDefinition } from './types-DboZvHR_.js';
|
|
4
|
+
import { d as GuardrailPolicyInput, a as GuardrailDecisionRecord } from './types-D7A6CIGt.js';
|
|
5
|
+
import { e as MemoryCompactionInfo, z as MemoryScope } from './types-B1KL4w14.js';
|
|
6
6
|
import { D as DeepReadonly, M as MaybePromise } from './type-utils-CtHVDRn_.js';
|
|
7
|
-
import { d as ToolCallStreamEvent } from './tool-
|
|
8
|
-
import { A as AgentMiddleware } from './middleware-
|
|
7
|
+
import { d as ToolCallStreamEvent } from './tool-xHM_GmzT.js';
|
|
8
|
+
import { A as AgentMiddleware } from './middleware-QZsbz7Hf.js';
|
|
9
9
|
|
|
10
10
|
type AgentLifecycleRunEvent = {
|
|
11
11
|
runId: string;
|
|
@@ -112,6 +112,8 @@ type AgentResultBase = {
|
|
|
112
112
|
runId: string;
|
|
113
113
|
text: string;
|
|
114
114
|
usage: Usage;
|
|
115
|
+
finishReason?: CompletionFinishReason | undefined;
|
|
116
|
+
providerFinishReason?: string | undefined;
|
|
115
117
|
contextUsage?: ContextUsage | undefined;
|
|
116
118
|
messages: Message[];
|
|
117
119
|
trace?: AgentTraceInfo | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as Usage, J as JsonObject, M as Message, S as SystemMessage,
|
|
1
|
+
import { U as Usage, J as JsonObject, M as Message, S as SystemMessage, c as CompletionModel } from './types-DboZvHR_.js';
|
|
2
2
|
import { b as RetrySetting } from './retry-CjvSlKGW.js';
|
|
3
3
|
|
|
4
4
|
type MemorySavePolicy = "message" | "turn" | "run";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as RetrySetting } from './retry-CjvSlKGW.js';
|
|
2
|
-
import { J as JsonObject } from './types-
|
|
2
|
+
import { J as JsonObject } from './types-DboZvHR_.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,4 +1,4 @@
|
|
|
1
|
-
import { M as Message, J as JsonObject, U as Usage } from './types-
|
|
1
|
+
import { M as Message, J as JsonObject, U as Usage } from './types-DboZvHR_.js';
|
|
2
2
|
import { M as MaybePromise } from './type-utils-CtHVDRn_.js';
|
|
3
3
|
|
|
4
4
|
type GuardrailMode = "enforce" | "observe";
|
|
@@ -211,6 +211,8 @@ type AssistantGenerationMetadata = {
|
|
|
211
211
|
provider: string;
|
|
212
212
|
modelId: string;
|
|
213
213
|
usage: Usage;
|
|
214
|
+
finishReason?: CompletionFinishReason;
|
|
215
|
+
providerFinishReason?: string;
|
|
214
216
|
contextUsage?: ContextUsage;
|
|
215
217
|
sources?: CompletionSource[];
|
|
216
218
|
providerToolCalls?: ProviderToolCall[];
|
|
@@ -240,9 +242,12 @@ type CompletionRequest = {
|
|
|
240
242
|
providerOptions?: JsonObject;
|
|
241
243
|
outputSchema?: JsonObject;
|
|
242
244
|
};
|
|
245
|
+
type CompletionFinishReason = "stop" | "length" | "content-filter" | "tool-calls" | "other";
|
|
243
246
|
type CompletionResponse<RawResponse = unknown> = {
|
|
244
247
|
choice: AssistantContentPart[];
|
|
245
248
|
usage: Usage;
|
|
249
|
+
finishReason?: CompletionFinishReason;
|
|
250
|
+
providerFinishReason?: string;
|
|
246
251
|
contextUsage?: ContextUsage;
|
|
247
252
|
rawResponse: RawResponse;
|
|
248
253
|
messageId?: string;
|
|
@@ -254,6 +259,8 @@ type CompletionResult<Output = string, RawResponse = unknown> = {
|
|
|
254
259
|
text: string;
|
|
255
260
|
content: readonly AssistantContentPart[];
|
|
256
261
|
usage: Usage;
|
|
262
|
+
finishReason?: CompletionFinishReason;
|
|
263
|
+
providerFinishReason?: string;
|
|
257
264
|
contextUsage?: ContextUsage;
|
|
258
265
|
rawResponse: RawResponse;
|
|
259
266
|
messageId?: string;
|
|
@@ -338,4 +345,4 @@ declare function assertCompletionRequestSupported(model: CompletionModel, reques
|
|
|
338
345
|
}): void;
|
|
339
346
|
declare function textFromAssistantContent(content: readonly AssistantContentPart[]): string;
|
|
340
347
|
|
|
341
|
-
export { type
|
|
348
|
+
export { type ToolQuestionAnswer as $, type AssistantContentPart as A, type ToolResultPart as B, type CompletionFinishReason as C, type Document as D, type UserContentPart as E, type FileData as F, type UserMessage as G, calculateContextUsage as H, type ImageDetail as I, type JsonObject as J, getAssistantGenerationMetadata as K, isProviderTool as L, type Message as M, resolveModelContextLimits as N, withContextUsage as O, type ProviderTool as P, CompletionCapabilityError as Q, type ReasoningContentType as R, type SystemMessage as S, type TextPart as T, Usage as U, type CompletionModelCapabilities as V, type CompletionStreamPart as W, type StreamingCompletionModel as X, type ToolApprovalResponsePart as Y, type ToolCallArgumentsMode as Z, type ToolInteractionResponsePart as _, type AssistantGenerationMetadata as a, type ToolQuestionResponsePart as a0, type UsageDetails as a1, assertCompletionRequestSupported as a2, reasoningDisplayText as a3, textFromAssistantContent as a4, type AssistantMessage as b, type CompletionModel as c, type CompletionModelInfo as d, type CompletionModelStreamEvent as e, type CompletionRequest as f, type CompletionResponse as g, type CompletionResult as h, type CompletionSource as i, type CompletionStreamEvent as j, type CompletionTool as k, type ContextUsage as l, type FilePart as m, type ImagePart as n, type JsonPrimitive as o, type JsonValue as p, type ModelContextLimits as q, type ProviderToolCall as r, type ReasoningDetail as s, type ReasoningPart as t, type ToolCallPart as u, type ToolChoice as v, type ToolDefinition as w, type ToolMessage as x, type ToolResultContentPart as y, type ToolResultOutput as z };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { V as VectorMetadata, b as VectorMetadataValue, a as EmbeddedDocument } from '../types-Cr4uiYo5.js';
|
|
2
|
-
import { T as Tool } from '../tool-
|
|
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-
|
|
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-
|
|
2
|
+
import { T as Tool } from '../tool-xHM_GmzT.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-D0Y2ZWS3.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-D0Y2ZWS3.js';
|
|
5
5
|
import '../model-call-options-CZkSw_xN.js';
|
|
6
6
|
import '../retry-CjvSlKGW.js';
|
|
7
|
-
import '../types-
|
|
7
|
+
import '../types-DboZvHR_.js';
|
|
8
8
|
|
|
9
9
|
declare const vectorFilter: {
|
|
10
10
|
eq(key: string, value: VectorMetadataValue): VectorFilter;
|