@anvia/core 1.0.1 → 1.0.2

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.
@@ -1,7 +1,7 @@
1
1
  import { U as Usage, J as JsonObject, c as CompletionModel, M as Message } from '../types-DgvozfPc.js';
2
2
  import { Z as ZodSchema } from '../zod-schema-C7F4clpm.js';
3
3
  import { AgentInteractionRequest, AgentInteractionResponse } from '../agent/interactions/index.js';
4
- import { g as AgentInteractionOutcome, m as AgentResponse, n as AgentRunOptions, k as AgentOutcome } from '../types-CLCLFpAL.js';
4
+ import { g as AgentInteractionOutcome, m as AgentResponse, n as AgentRunOptions, k as AgentOutcome } from '../types-BUEZMBhO.js';
5
5
  import { E as EmbeddingModel } from '../types-Cr4uiYo5.js';
6
6
  import '../model-call-options-CZkSw_xN.js';
7
7
  import 'zod';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { A as Agent, a as AgentContextInput, b as AgentMemory, c as AgentMemoryOptions, d as AgentOptions, e as AgentToolInput, f as AgentToolOptions, C as CreateHybridVectorContextOptions, g as CreateVectorContextOptions, V as VectorContext, h as VectorContextBaseOptions, i as createVectorContext, j as isVectorContext } from './agent-qRKa3ibC.js';
1
+ export { A as Agent, a as AgentContextInput, b as AgentMemory, c as AgentMemoryOptions, d as AgentOptions, e as AgentToolInput, f as AgentToolOptions, C as CreateHybridVectorContextOptions, g as CreateVectorContextOptions, V as VectorContext, h as VectorContextBaseOptions, i as createVectorContext, j as isVectorContext } from './agent-DYfzP-n5.js';
2
2
  export { AgentRunBlockedError, AgentRunCancelledError, AgentStreamClosedError, AgentStructuredOutputError, AgentStructuredOutputFormat, AgentStructuredOutputPhase, AgentToolSuspensionError, MaxTurnsError } from './agent/index.js';
3
- export { A as AgentBlockedOutcome, a as AgentChildStreamEvent, b as AgentDeltaEvent, c as AgentErrorEvent, d as AgentErrorStreamEvent, e as AgentFinishEvent, f as AgentInput, g as AgentInteractionOutcome, h as AgentLifecycle, i as AgentMemoryCompactionEvent, j as AgentMemoryCompactionOptions, k as AgentOutcome, l as AgentPrompt, m as AgentResponse, n as AgentRunOptions, o as AgentRunSettings, p as AgentStartEvent, q as AgentSteerInput, r as AgentSteerReceipt, s as AgentStepFinishEvent, t as AgentStream, u as AgentStreamEvent, v as AgentToolCallDeltaEvent, w as AgentToolFinishEvent, x as AgentToolStartEvent } from './types-CLCLFpAL.js';
3
+ export { A as AgentBlockedOutcome, a as AgentChildStreamEvent, b as AgentDeltaEvent, c as AgentErrorEvent, d as AgentErrorStreamEvent, e as AgentFinishEvent, f as AgentInput, g as AgentInteractionOutcome, h as AgentLifecycle, i as AgentMemoryCompactionEvent, j as AgentMemoryCompactionOptions, k as AgentOutcome, l as AgentPrompt, m as AgentResponse, n as AgentRunOptions, o as AgentRunSettings, p as AgentStartEvent, q as AgentSteerInput, r as AgentSteerReceipt, s as AgentStepFinishEvent, t as AgentStream, u as AgentStreamEvent, v as AgentToolCallDeltaEvent, w as AgentToolFinishEvent, x as AgentToolStartEvent } from './types-BUEZMBhO.js';
4
4
  export { M as ModelCallOptions } from './model-call-options-CZkSw_xN.js';
5
5
  export { R as RetryContext, a as RetryOptions, b as RetrySetting } from './retry-CjvSlKGW.js';
6
6
  export { A as AssistantContentPart, a as AssistantGenerationMetadata, b as AssistantMessage, C as CompletionFinishReason, c as CompletionModel, d as CompletionModelInfo, e as CompletionModelStreamEvent, f as CompletionRequest, g as CompletionResponse, h as CompletionResult, i as CompletionSource, j as CompletionStreamEvent, k as CompletionTool, l as ContextUsage, D as Document, F as FileData, m as FilePart, I as ImageDetail, n as ImagePart, J as JsonObject, o as JsonPrimitive, p as JsonValue, M as Message, q as ModelContextLimits, P as ProviderTool, r as ProviderToolCall, R as ReasoningContentType, s as ReasoningDetail, t as ReasoningPart, S as SystemMessage, T as TextPart, u as ToolCallPart, v as ToolChoice, w as ToolDefinition, x as ToolMessage, y as ToolResultContentPart, z as ToolResultOutput, B as ToolResultPart, U as Usage, E as UserContentPart, G as UserMessage, H as calculateContextUsage, K as getAssistantGenerationMetadata, L as isProviderTool, N as resolveModelContextLimits, O as withContextUsage } from './types-DgvozfPc.js';
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  Agent,
20
20
  createVectorContext,
21
21
  isVectorContext
22
- } from "./chunk-E2J7MLAB.js";
22
+ } from "./chunk-PH6OTIPZ.js";
23
23
  import "./chunk-OJBFDBLG.js";
24
24
  import "./chunk-J6LVLV6P.js";
25
25
  import {
@@ -29,7 +29,7 @@ import {
29
29
  estimateMemoryTokens,
30
30
  isMemoryCompactionMessage
31
31
  } from "./chunk-XMVOBX43.js";
32
- import "./chunk-GBCKSWQF.js";
32
+ import "./chunk-AR2K73CJ.js";
33
33
  import "./chunk-YK4WAAS4.js";
34
34
  import {
35
35
  createMiddleware,
@@ -1,4 +1,4 @@
1
- import { R as ResolvedAgentOptions, A as Agent } from '../agent-qRKa3ibC.js';
1
+ import { R as ResolvedAgentOptions, A as Agent } from '../agent-DYfzP-n5.js';
2
2
  import { c as CompletionModel, P as ProviderTool, M as Message, U as Usage, g as CompletionResponse, y as ToolResultContentPart } from '../types-DgvozfPc.js';
3
3
  import { T as ToolIndex } from '../dynamic-tools-aIZlg5x1.js';
4
4
  import { A as AnyTool } from '../tool-BpqpoRSE.js';
@@ -9,7 +9,7 @@ import 'zod';
9
9
  import '../types-DhkodEft.js';
10
10
  import '../type-utils-CtHVDRn_.js';
11
11
  import '../types-DjqRHeAi.js';
12
- import '../types-CLCLFpAL.js';
12
+ import '../types-BUEZMBhO.js';
13
13
  import '../agent/interactions/index.js';
14
14
  import '../middleware-kcF8AusP.js';
15
15
  import '../types-DC1U1XwW.js';
@@ -4,11 +4,11 @@ import {
4
4
  getAgentToolState,
5
5
  markResolvedAgentOptions,
6
6
  withInternalAgentRunOptions
7
- } from "../chunk-E2J7MLAB.js";
7
+ } from "../chunk-PH6OTIPZ.js";
8
8
  import "../chunk-OJBFDBLG.js";
9
9
  import "../chunk-J6LVLV6P.js";
10
10
  import "../chunk-XMVOBX43.js";
11
- import "../chunk-GBCKSWQF.js";
11
+ import "../chunk-AR2K73CJ.js";
12
12
  import "../chunk-YK4WAAS4.js";
13
13
  import "../chunk-EO2GECYH.js";
14
14
  import "../chunk-YFJ4NHV6.js";
@@ -1,4 +1,4 @@
1
- export { y as AgentGenerationEndArgs, z as AgentGenerationErrorArgs, B as AgentGenerationModelInfo, C as AgentGenerationObserver, D as AgentGenerationStartArgs, E as AgentGenerationUpdateArgs, F as AgentObservabilityOptions, G as AgentObserver, H as AgentObserverErrorPolicy, I as AgentObserverMap, J as AgentObserverTraceInfo, K as AgentRunEndArgs, L as AgentRunErrorArgs, M as AgentRunEventArgs, N as AgentRunObserver, O as AgentRunPromptRef, P as AgentRunStartArgs, Q as AgentToolEndArgs, R as AgentToolErrorArgs, S as AgentToolObserver, T as AgentToolStartArgs, U as AgentToolStreamEventArgs, V as AgentToolSuspendedArgs, W as AgentTraceInfo, X as AgentTraceOptions } from '../types-CLCLFpAL.js';
1
+ export { y as AgentGenerationEndArgs, z as AgentGenerationErrorArgs, B as AgentGenerationModelInfo, C as AgentGenerationObserver, D as AgentGenerationStartArgs, E as AgentGenerationUpdateArgs, F as AgentObservabilityOptions, G as AgentObserver, H as AgentObserverErrorPolicy, I as AgentObserverMap, J as AgentObserverTraceInfo, K as AgentRunEndArgs, L as AgentRunErrorArgs, M as AgentRunEventArgs, N as AgentRunObserver, O as AgentRunPromptRef, P as AgentRunStartArgs, Q as AgentToolEndArgs, R as AgentToolErrorArgs, S as AgentToolObserver, T as AgentToolStartArgs, U as AgentToolStreamEventArgs, V as AgentToolSuspendedArgs, W as AgentTraceInfo, X as AgentTraceOptions } from '../types-BUEZMBhO.js';
2
2
  import '../agent/interactions/index.js';
3
3
  import 'zod';
4
4
  import '../types-DgvozfPc.js';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AgentObserverDispatchError
3
- } from "../chunk-GBCKSWQF.js";
3
+ } from "../chunk-AR2K73CJ.js";
4
4
  import "../chunk-D4PACGPA.js";
5
5
  import "../chunk-TB5EKZM7.js";
6
6
  import "../chunk-7JLAIN6E.js";
@@ -1,5 +1,5 @@
1
- import { g as AgentInteractionOutcome, f as AgentInput, o as AgentRunSettings } from '../types-CLCLFpAL.js';
2
- import { A as Agent } from '../agent-qRKa3ibC.js';
1
+ import { g as AgentInteractionOutcome, f as AgentInput, o as AgentRunSettings } from '../types-BUEZMBhO.js';
2
+ import { A as Agent } from '../agent-DYfzP-n5.js';
3
3
  import { J as JsonObject, c as CompletionModel } from '../types-DgvozfPc.js';
4
4
  import { ExtractOptions } from '../extractor/index.js';
5
5
  import { z } from 'zod';
@@ -320,6 +320,7 @@ type AgentRunEndArgs = (AgentRunEndArgsBase & {
320
320
  readonly interaction: DeepReadonly<AgentInteractionRequest>;
321
321
  });
322
322
  type AgentRunErrorArgs = {
323
+ readonly status: "failed" | "cancelled";
323
324
  readonly error: unknown;
324
325
  readonly usage: DeepReadonly<Usage>;
325
326
  readonly messages: readonly DeepReadonly<Message>[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anvia/core",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Core runtime primitives for context-aware Anvia agents.",
5
5
  "author": "anvia",
6
6
  "maintainer": "Indra Zulfi",