🚀. Socket Launch Week Day 2:Introducing Manifest Alerts.Learn more
Sign In

@ziro-agent/core

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ziro-agent/core - npm Package Compare versions

Comparing version
0.11.0
to
0.12.0
+25
-2
dist/index.d.cts

@@ -683,2 +683,7 @@ import { B as BudgetUsage, a as BudgetContext, b as BudgetSpec, c as BudgetResolution, C as ChatMessage, N as NormalizedMessage, L as LanguageModel, F as FinishReason, T as ToolDefinitionForModel, M as ModelCallOptions, d as ContentPart, e as ToolCallPart, f as CostEstimate, g as ModelStreamPart, h as ModelGenerateResult } from './model-rEpWFV9q.cjs';

}
/** Thrown when `streamText({ continueUpstream: true })` would extend a log whose tail is mid-tool-call or awaiting tool execution (RFC 0018). */
declare class ContinueUpstreamMidToolCallError extends ResumableStreamError {
readonly code: "CONTINUE_UPSTREAM_MID_TOOL_CALL";
constructor(message?: string);
}
/**

@@ -719,2 +724,9 @@ * True when the model run for this `resumeKey` has emitted a terminal part

getSessionMeta(resumeKey: string): Promise<ResumableStreamSessionMeta | null>;
/**
* RFC 0017 Phase G: mark the session **completed** without appending a terminal
* `ModelStreamPart`. Use when the log would otherwise stay “incomplete” forever
* (e.g. provider never emitted `finish`) and you must stop `continueUpstream`
* from issuing another model call. Idempotent if already completed.
*/
markCompleted(resumeKey: string): Promise<void>;
}

@@ -744,2 +756,3 @@ interface InMemoryResumableStreamEventStoreOptions {

getParts(resumeKey: string, fromIndex: number): Promise<ModelStreamPart[]>;
markCompleted(resumeKey: string): Promise<void>;
}

@@ -840,4 +853,14 @@

/**
* Returns true when the persisted {@link ModelStreamPart} log must not be used
* with `streamText({ continueUpstream: true })` — the tail implies an open tool
* boundary (RFC 0018). Replay-only consumers may still read the log.
*
* Trailing `{ type: 'error' }` parts are ignored so a terminal error after a
* valid `finish` does not block analysis.
*/
declare function tailBlocksContinueUpstream(parts: readonly ModelStreamPart[]): boolean;
interface ResumableStreamEvent {
phase: 'replay_start' | 'replay_end' | 'replay_stale_expected_index' | 'continue_lock_acquired' | 'continue_lock_released' | 'continue_upstream_start' | 'continue_upstream_end' | 'continue_upstream_skipped_completed';
phase: 'replay_start' | 'replay_end' | 'replay_stale_expected_index' | 'continue_lock_acquired' | 'continue_lock_released' | 'continue_upstream_start' | 'continue_upstream_end' | 'continue_upstream_skipped_completed' | 'continue_upstream_blocked_mid_tool_call';
resumeKey: string;

@@ -1018,2 +1041,2 @@ replayCount?: number;

export { APICallError, type ApprovalContext, type ApprovalDecision, type ApprovalObserver, type ApprovalRequest, type Approver, type AutoApproverOptions, type BrowserAdapter, type BrowserNavigateOptions, BudgetContext, BudgetExceededError, type BudgetExceededKind, type BudgetObserver, BudgetResolution, type BudgetScope, BudgetSpec, BudgetUsage, ChatMessage, ContentPart, type CoreAgentSnapshotFields, CostEstimate, type FallbackChainOptions, FinishReason, type GenerateObjectOptions, type GenerateObjectResult, type GenerateTextOptions, type GenerateTextResult, InMemoryResumableStreamEventStore, type InMemoryResumableStreamEventStoreOptions, type InlineMediaBytes, InvalidArgumentError, InvalidPromptError, JSONParseError, LanguageModel, type LanguageModelMiddleware, type LanguageModelMiddlewareContext, ModelCallOptions, ModelGenerateResult, ModelStreamPart, NoTextGeneratedError, NormalizedMessage, ObjectValidationError, type PendingApproval, type PromptInput, type RemoteMediaUrl, type RequiresApproval, type ResolvedMedia, type ResumableStreamContinueLock, type ResumableStreamContinueLockStore, ResumableStreamError, type ResumableStreamEvent, type ResumableStreamEventStore, type ResumableStreamObserver, type ResumableStreamSessionMeta, type SandboxAdapter, type SandboxExecuteOptions, type SandboxExecuteResult, type SandboxFileArtifact, type SandboxLanguage, type SerializableBudgetSpec, type StreamTextOptions, type StreamTextResult, type StubBrowserAdapterResult, type StubSandboxAdapterOptions, TimeoutError, TokenUsage, ToolCallPart, ToolDefinitionForModel, UnsupportedPartError, type WithBudgetOptions, type WrapGenerateContext, type WrapStreamContext, ZiroError, applyResolution, assertProviderMapsUserMultimodalParts, autoApprove, autoReject, autoSuspend, buildStreamTextResult, computeActualUsd, createAutoApprover, createStubBrowserAdapter, createStubSandboxAdapter, estimateTokensFromMessages, estimateTokensFromString, fireAgentResumed, fireAgentSuspended, fireApprovalRequested, fireApprovalResolved, fireResumableStreamEvent, generateObject, generateText, getCurrentBudget, getCurrentScope, intersectSpecs, isTerminalModelStreamPart, isZiroError, normalizePrompt, resolveEstimate, resolveMediaInput, resolveOnExceed, setApprovalObserver, setBudgetObserver, setResumableStreamObserver, streamText, withBudget, withFallbackChain, wrapModel };
export { APICallError, type ApprovalContext, type ApprovalDecision, type ApprovalObserver, type ApprovalRequest, type Approver, type AutoApproverOptions, type BrowserAdapter, type BrowserNavigateOptions, BudgetContext, BudgetExceededError, type BudgetExceededKind, type BudgetObserver, BudgetResolution, type BudgetScope, BudgetSpec, BudgetUsage, ChatMessage, ContentPart, ContinueUpstreamMidToolCallError, type CoreAgentSnapshotFields, CostEstimate, type FallbackChainOptions, FinishReason, type GenerateObjectOptions, type GenerateObjectResult, type GenerateTextOptions, type GenerateTextResult, InMemoryResumableStreamEventStore, type InMemoryResumableStreamEventStoreOptions, type InlineMediaBytes, InvalidArgumentError, InvalidPromptError, JSONParseError, LanguageModel, type LanguageModelMiddleware, type LanguageModelMiddlewareContext, ModelCallOptions, ModelGenerateResult, ModelStreamPart, NoTextGeneratedError, NormalizedMessage, ObjectValidationError, type PendingApproval, type PromptInput, type RemoteMediaUrl, type RequiresApproval, type ResolvedMedia, type ResumableStreamContinueLock, type ResumableStreamContinueLockStore, ResumableStreamError, type ResumableStreamEvent, type ResumableStreamEventStore, type ResumableStreamObserver, type ResumableStreamSessionMeta, type SandboxAdapter, type SandboxExecuteOptions, type SandboxExecuteResult, type SandboxFileArtifact, type SandboxLanguage, type SerializableBudgetSpec, type StreamTextOptions, type StreamTextResult, type StubBrowserAdapterResult, type StubSandboxAdapterOptions, TimeoutError, TokenUsage, ToolCallPart, ToolDefinitionForModel, UnsupportedPartError, type WithBudgetOptions, type WrapGenerateContext, type WrapStreamContext, ZiroError, applyResolution, assertProviderMapsUserMultimodalParts, autoApprove, autoReject, autoSuspend, buildStreamTextResult, computeActualUsd, createAutoApprover, createStubBrowserAdapter, createStubSandboxAdapter, estimateTokensFromMessages, estimateTokensFromString, fireAgentResumed, fireAgentSuspended, fireApprovalRequested, fireApprovalResolved, fireResumableStreamEvent, generateObject, generateText, getCurrentBudget, getCurrentScope, intersectSpecs, isTerminalModelStreamPart, isZiroError, normalizePrompt, resolveEstimate, resolveMediaInput, resolveOnExceed, setApprovalObserver, setBudgetObserver, setResumableStreamObserver, streamText, tailBlocksContinueUpstream, withBudget, withFallbackChain, wrapModel };

@@ -683,2 +683,7 @@ import { B as BudgetUsage, a as BudgetContext, b as BudgetSpec, c as BudgetResolution, C as ChatMessage, N as NormalizedMessage, L as LanguageModel, F as FinishReason, T as ToolDefinitionForModel, M as ModelCallOptions, d as ContentPart, e as ToolCallPart, f as CostEstimate, g as ModelStreamPart, h as ModelGenerateResult } from './model-cJsb66J7.js';

}
/** Thrown when `streamText({ continueUpstream: true })` would extend a log whose tail is mid-tool-call or awaiting tool execution (RFC 0018). */
declare class ContinueUpstreamMidToolCallError extends ResumableStreamError {
readonly code: "CONTINUE_UPSTREAM_MID_TOOL_CALL";
constructor(message?: string);
}
/**

@@ -719,2 +724,9 @@ * True when the model run for this `resumeKey` has emitted a terminal part

getSessionMeta(resumeKey: string): Promise<ResumableStreamSessionMeta | null>;
/**
* RFC 0017 Phase G: mark the session **completed** without appending a terminal
* `ModelStreamPart`. Use when the log would otherwise stay “incomplete” forever
* (e.g. provider never emitted `finish`) and you must stop `continueUpstream`
* from issuing another model call. Idempotent if already completed.
*/
markCompleted(resumeKey: string): Promise<void>;
}

@@ -744,2 +756,3 @@ interface InMemoryResumableStreamEventStoreOptions {

getParts(resumeKey: string, fromIndex: number): Promise<ModelStreamPart[]>;
markCompleted(resumeKey: string): Promise<void>;
}

@@ -840,4 +853,14 @@

/**
* Returns true when the persisted {@link ModelStreamPart} log must not be used
* with `streamText({ continueUpstream: true })` — the tail implies an open tool
* boundary (RFC 0018). Replay-only consumers may still read the log.
*
* Trailing `{ type: 'error' }` parts are ignored so a terminal error after a
* valid `finish` does not block analysis.
*/
declare function tailBlocksContinueUpstream(parts: readonly ModelStreamPart[]): boolean;
interface ResumableStreamEvent {
phase: 'replay_start' | 'replay_end' | 'replay_stale_expected_index' | 'continue_lock_acquired' | 'continue_lock_released' | 'continue_upstream_start' | 'continue_upstream_end' | 'continue_upstream_skipped_completed';
phase: 'replay_start' | 'replay_end' | 'replay_stale_expected_index' | 'continue_lock_acquired' | 'continue_lock_released' | 'continue_upstream_start' | 'continue_upstream_end' | 'continue_upstream_skipped_completed' | 'continue_upstream_blocked_mid_tool_call';
resumeKey: string;

@@ -1018,2 +1041,2 @@ replayCount?: number;

export { APICallError, type ApprovalContext, type ApprovalDecision, type ApprovalObserver, type ApprovalRequest, type Approver, type AutoApproverOptions, type BrowserAdapter, type BrowserNavigateOptions, BudgetContext, BudgetExceededError, type BudgetExceededKind, type BudgetObserver, BudgetResolution, type BudgetScope, BudgetSpec, BudgetUsage, ChatMessage, ContentPart, type CoreAgentSnapshotFields, CostEstimate, type FallbackChainOptions, FinishReason, type GenerateObjectOptions, type GenerateObjectResult, type GenerateTextOptions, type GenerateTextResult, InMemoryResumableStreamEventStore, type InMemoryResumableStreamEventStoreOptions, type InlineMediaBytes, InvalidArgumentError, InvalidPromptError, JSONParseError, LanguageModel, type LanguageModelMiddleware, type LanguageModelMiddlewareContext, ModelCallOptions, ModelGenerateResult, ModelStreamPart, NoTextGeneratedError, NormalizedMessage, ObjectValidationError, type PendingApproval, type PromptInput, type RemoteMediaUrl, type RequiresApproval, type ResolvedMedia, type ResumableStreamContinueLock, type ResumableStreamContinueLockStore, ResumableStreamError, type ResumableStreamEvent, type ResumableStreamEventStore, type ResumableStreamObserver, type ResumableStreamSessionMeta, type SandboxAdapter, type SandboxExecuteOptions, type SandboxExecuteResult, type SandboxFileArtifact, type SandboxLanguage, type SerializableBudgetSpec, type StreamTextOptions, type StreamTextResult, type StubBrowserAdapterResult, type StubSandboxAdapterOptions, TimeoutError, TokenUsage, ToolCallPart, ToolDefinitionForModel, UnsupportedPartError, type WithBudgetOptions, type WrapGenerateContext, type WrapStreamContext, ZiroError, applyResolution, assertProviderMapsUserMultimodalParts, autoApprove, autoReject, autoSuspend, buildStreamTextResult, computeActualUsd, createAutoApprover, createStubBrowserAdapter, createStubSandboxAdapter, estimateTokensFromMessages, estimateTokensFromString, fireAgentResumed, fireAgentSuspended, fireApprovalRequested, fireApprovalResolved, fireResumableStreamEvent, generateObject, generateText, getCurrentBudget, getCurrentScope, intersectSpecs, isTerminalModelStreamPart, isZiroError, normalizePrompt, resolveEstimate, resolveMediaInput, resolveOnExceed, setApprovalObserver, setBudgetObserver, setResumableStreamObserver, streamText, withBudget, withFallbackChain, wrapModel };
export { APICallError, type ApprovalContext, type ApprovalDecision, type ApprovalObserver, type ApprovalRequest, type Approver, type AutoApproverOptions, type BrowserAdapter, type BrowserNavigateOptions, BudgetContext, BudgetExceededError, type BudgetExceededKind, type BudgetObserver, BudgetResolution, type BudgetScope, BudgetSpec, BudgetUsage, ChatMessage, ContentPart, ContinueUpstreamMidToolCallError, type CoreAgentSnapshotFields, CostEstimate, type FallbackChainOptions, FinishReason, type GenerateObjectOptions, type GenerateObjectResult, type GenerateTextOptions, type GenerateTextResult, InMemoryResumableStreamEventStore, type InMemoryResumableStreamEventStoreOptions, type InlineMediaBytes, InvalidArgumentError, InvalidPromptError, JSONParseError, LanguageModel, type LanguageModelMiddleware, type LanguageModelMiddlewareContext, ModelCallOptions, ModelGenerateResult, ModelStreamPart, NoTextGeneratedError, NormalizedMessage, ObjectValidationError, type PendingApproval, type PromptInput, type RemoteMediaUrl, type RequiresApproval, type ResolvedMedia, type ResumableStreamContinueLock, type ResumableStreamContinueLockStore, ResumableStreamError, type ResumableStreamEvent, type ResumableStreamEventStore, type ResumableStreamObserver, type ResumableStreamSessionMeta, type SandboxAdapter, type SandboxExecuteOptions, type SandboxExecuteResult, type SandboxFileArtifact, type SandboxLanguage, type SerializableBudgetSpec, type StreamTextOptions, type StreamTextResult, type StubBrowserAdapterResult, type StubSandboxAdapterOptions, TimeoutError, TokenUsage, ToolCallPart, ToolDefinitionForModel, UnsupportedPartError, type WithBudgetOptions, type WrapGenerateContext, type WrapStreamContext, ZiroError, applyResolution, assertProviderMapsUserMultimodalParts, autoApprove, autoReject, autoSuspend, buildStreamTextResult, computeActualUsd, createAutoApprover, createStubBrowserAdapter, createStubSandboxAdapter, estimateTokensFromMessages, estimateTokensFromString, fireAgentResumed, fireAgentSuspended, fireApprovalRequested, fireApprovalResolved, fireResumableStreamEvent, generateObject, generateText, getCurrentBudget, getCurrentScope, intersectSpecs, isTerminalModelStreamPart, isZiroError, normalizePrompt, resolveEstimate, resolveMediaInput, resolveOnExceed, setApprovalObserver, setBudgetObserver, setResumableStreamObserver, streamText, tailBlocksContinueUpstream, withBudget, withFallbackChain, wrapModel };
+2
-1
{
"name": "@ziro-agent/core",
"version": "0.11.0",
"version": "0.12.0",
"description": "Type-safe core for ZiroAgent SDK: language model interface, generateText, streamText, message types.",

@@ -87,2 +87,3 @@ "license": "Apache-2.0",

"test": "vitest run",
"bench": "vitest bench --run src/benchmarks/core-overhead.bench.ts",
"test:watch": "vitest",

@@ -89,0 +90,0 @@ "typecheck": "tsc --noEmit",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display