@cuylabs/agent-core 0.7.0 → 0.8.0
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/{builder-BRvqCcIk.d.ts → builder-UpOWQMW3.d.ts} +2 -2
- package/dist/{chunk-3HNO5SVI.js → chunk-4BDA7DQY.js} +3 -3
- package/dist/chunk-BFM2YHNM.js +222 -0
- package/dist/chunk-CAA7FHIH.js +280 -0
- package/dist/chunk-DWYX7ASF.js +26 -0
- package/dist/chunk-KUVSERLJ.js +50 -0
- package/dist/{chunk-5K7AQVOU.js → chunk-N6HWIEEA.js} +8 -204
- package/dist/{chunk-QGOGIP7T.js → chunk-RFEKJKTO.js} +131 -25
- package/dist/chunk-RZITT45F.js +202 -0
- package/dist/{chunk-ZPMACVZK.js → chunk-SQU2AJHO.js} +1 -1
- package/dist/{chunk-BNSHUWCV.js → chunk-WWYYNWEW.js} +1 -1
- package/dist/{chunk-CDTV2UYU.js → chunk-YSLSEQ6B.js} +52 -252
- package/dist/context/index.js +1 -1
- package/dist/errors/index.d.ts +11 -0
- package/dist/errors/index.js +16 -0
- package/dist/events-CE72w8W4.d.ts +149 -0
- package/dist/{index-C33hlD6H.d.ts → index-CWSchSql.d.ts} +36 -50
- package/dist/index.d.ts +36 -109
- package/dist/index.js +213 -396
- package/dist/inference/index.d.ts +10 -7
- package/dist/inference/index.js +7 -5
- package/dist/llm-error-D93FNNLY.d.ts +32 -0
- package/dist/middleware/index.d.ts +245 -7
- package/dist/middleware/index.js +3 -1
- package/dist/models/index.d.ts +125 -4
- package/dist/models/index.js +7 -3
- package/dist/presets/index.d.ts +53 -0
- package/dist/presets/index.js +28 -0
- package/dist/prompt/index.d.ts +10 -8
- package/dist/reasoning/index.d.ts +1 -2
- package/dist/reasoning/index.js +3 -7
- package/dist/{registry-BDLIHOQB.d.ts → registry-DwYqsQkX.d.ts} +1 -1
- package/dist/{runner-DSKaEz3z.d.ts → runner-e2YRcUoX.d.ts} +58 -151
- package/dist/runtime/index.d.ts +11 -8
- package/dist/runtime/index.js +9 -7
- package/dist/safety/index.d.ts +38 -0
- package/dist/safety/index.js +12 -0
- package/dist/scope/index.d.ts +2 -2
- package/dist/signal/index.d.ts +28 -0
- package/dist/signal/index.js +6 -0
- package/dist/skill/index.d.ts +7 -6
- package/dist/sub-agent/index.d.ts +14 -9
- package/dist/tool/index.d.ts +7 -5
- package/dist/tool/index.js +2 -2
- package/dist/tool-BHbyUAy3.d.ts +150 -0
- package/dist/{tool-HUtkiVBx.d.ts → tool-DLXAR9Ce.d.ts} +1 -1
- package/dist/tracking/index.d.ts +2 -2
- package/dist/{tool-Db1Ue-1U.d.ts → types-BfNpU8NS.d.ts} +1 -150
- package/dist/types-BnpEOYV-.d.ts +50 -0
- package/dist/{types-9jGQUjqW.d.ts → types-CQL-SvTn.d.ts} +1 -1
- package/dist/types-CWm-7rvB.d.ts +55 -0
- package/dist/{types-FRpzzg_9.d.ts → types-KKDrdU9Y.d.ts} +5 -35
- package/dist/{capability-resolver-CgRGsWVX.d.ts → types-QA4WhEfz.d.ts} +1 -117
- package/dist/{types-CqDZTh4d.d.ts → types-QKHHQLLq.d.ts} +5 -4
- package/dist/types-YuWV4ag7.d.ts +72 -0
- package/package.json +58 -3
- package/dist/index-CfBGYrpd.d.ts +0 -317
- package/dist/{chunk-IEFIQENH.js → chunk-7VKQ4WPB.js} +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,47 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { A as AgentConfig, a as Agent } from './index-CWSchSql.js';
|
|
2
|
+
export { b as AgentProfile, C as CompactionConfig, D as DEFAULT_MAX_CONCURRENT, c as DEFAULT_MAX_SPAWN_DEPTH, d as DEFAULT_SESSION_TITLE_PREFIX, P as PRUNE_PROTECTED_TOOLS, S as SubAgentCompletedResult, e as SubAgentHandle, f as SubAgentStatus, g as SubAgentToolConfig, h as SubAgentTracker, i as SubAgentUsage, T as TracingConfig, j as createAgent, k as createSubAgentTools } from './index-CWSchSql.js';
|
|
3
3
|
import { LanguageModel, Tool as Tool$1, TelemetrySettings, ModelMessage } from 'ai';
|
|
4
4
|
import { M as Message, T as TokenUsage } from './messages-BYWGn8TY.js';
|
|
5
5
|
export { A as AssistantMessage, a as MessageBase, b as MessageError, c as MessageRole, S as Session, d as SystemMessage, e as ToolMessage, U as UserMessage } from './messages-BYWGn8TY.js';
|
|
6
|
-
import { T as Tool } from './tool-
|
|
7
|
-
export { C as CompatibleSchema, I as InferSchemaOutput,
|
|
6
|
+
import { T as Tool } from './tool-BHbyUAy3.js';
|
|
7
|
+
export { C as CompatibleSchema, I as InferSchemaOutput, d as defineTool } from './tool-BHbyUAy3.js';
|
|
8
8
|
import { T as ToolHost } from './types-CHiPh8U2.js';
|
|
9
9
|
export { D as DirEntry, E as ExecOptions, a as ExecResult, F as FileStat } from './types-CHiPh8U2.js';
|
|
10
|
-
import { M as MiddlewareRunner,
|
|
11
|
-
export {
|
|
12
|
-
import {
|
|
13
|
-
export { A as AnyInferenceResult, a as AnyStreamResult, C as CustomStreamProvider, b as CustomStreamResult, D as DEFAULT_MAX_OUTPUT_TOKENS, h as DEFAULT_RETRY_CONFIG, c as InferenceCustomResult, d as InferenceStepInfo, I as InferenceStreamInput, e as InferenceStreamResult,
|
|
10
|
+
import { M as MiddlewareRunner, d as StreamProvider, E as EnhancedTools } from './runner-e2YRcUoX.js';
|
|
11
|
+
export { A as AgentMiddleware, f as AgentModelHooks, B as BlockedModelCall, g as EnvironmentInfo, I as InstructionFile, h as ModelCallContext, e as ModelCallInput, i as ModelCallOutput, c as ModelFamily, j as PluginCommand, k as PluginContext, l as PluginInit, a as PromptBuildContext, P as PromptConfig, b as PromptSection, S as StreamChunk, m as StreamProviderConfig, n as StreamProviderFactory, o as StreamProviderInput, p as StreamProviderResult, T as ToolCallDecision } from './runner-e2YRcUoX.js';
|
|
12
|
+
import { g as InterventionController } from './types-KKDrdU9Y.js';
|
|
13
|
+
export { A as AnyInferenceResult, a as AnyStreamResult, C as CustomStreamProvider, b as CustomStreamResult, D as DEFAULT_MAX_OUTPUT_TOKENS, h as DEFAULT_RETRY_CONFIG, c as InferenceCustomResult, d as InferenceStepInfo, I as InferenceStreamInput, e as InferenceStreamResult, L as LLMStreamInput, f as LLMStreamResult, O as OUTPUT_TOKEN_MAX, i as OnInterventionApplied, P as PendingIntervention, R as RetryConfig, j as RetryHandlerOptions, k as RetryState, S as StepInfo, T as ToolExecutionMode, l as calculateDelay, m as createRetryHandler, n as createRetryState, s as shouldRetry, o as sleep, w as withRetry } from './types-KKDrdU9Y.js';
|
|
14
14
|
import { R as ReasoningLevel } from './types-CQaXbRsS.js';
|
|
15
15
|
export { E as EXTENDED_LEVELS, F as FIXED_LEVELS, a as ReasoningConfig, S as STANDARD_LEVELS, s as shouldIncludeReasoningSummary } from './types-CQaXbRsS.js';
|
|
16
16
|
import { ContextManager } from './context/index.js';
|
|
17
17
|
export { ContextLimits, DEFAULT_CONTEXT_LIMITS, PruneContextOptions, PruneResult, SummarizationOptions, estimateConversationTokens, estimateMessageTokens, estimateTokens, findCutPoint, generateSummary, isContextOverflowing, pruneContext, pruneToolResults, shouldPruneContext } from './context/index.js';
|
|
18
18
|
import { T as TurnChangeTracker } from './tracker-DClqYqTj.js';
|
|
19
19
|
export { F as FileBaseline, a as TurnFileChange, b as TurnSummary, c as TurnTrackerConfig, U as UndoResult, d as createTurnTracker } from './tracker-DClqYqTj.js';
|
|
20
|
-
import { P as PromptBuilder } from './builder-
|
|
21
|
-
export { c as createPromptBuilder } from './builder-
|
|
20
|
+
import { P as PromptBuilder } from './builder-UpOWQMW3.js';
|
|
21
|
+
export { c as createPromptBuilder } from './builder-UpOWQMW3.js';
|
|
22
22
|
import { S as SessionManager } from './session-manager-B_CWGTsl.js';
|
|
23
23
|
export { B as BranchEntry, C as CompactionEntry, a as ConfigChangeEntry, b as CreateSessionOptions, E as EntryBase, F as FileEntry, M as MessageEntry, c as MetadataEntry, d as STORAGE_VERSION, e as SerializedMessage, f as SessionContext, g as SessionEntry, h as SessionHeader, i as SessionInfo, j as SessionStorage } from './session-manager-B_CWGTsl.js';
|
|
24
|
+
import { A as AgentEvent } from './events-CE72w8W4.js';
|
|
25
|
+
export { a as AgentStatus, b as AgentTurnBoundaryKind, c as ApprovalEvent, P as ProcessorResult, S as StepProcessingResult, d as StreamInput } from './events-CE72w8W4.js';
|
|
26
|
+
export { A as AgentTurnActiveToolCall, a as AgentTurnBoundaryMetadata, b as AgentTurnBoundarySnapshot, c as AgentTurnCommitApplier, d as AgentTurnCommitBatch, e as AgentTurnCommitOptions, f as AgentTurnEngine, g as AgentTurnEngineOptions, h as AgentTurnPhase, i as AgentTurnResolvedToolCall, j as AgentTurnState, k as AgentTurnStateAdvanceOptions, l as AgentTurnStepCommitSnapshot, m as AgentTurnStepCommitToolCall, n as AgentTurnStepCommitToolResult, o as AgentTurnStepRuntimeConfig, C as CommitOutputOptions, p as CommitStepOptions, q as CreateAgentTurnStateOptions, r as CreateAgentTurnStepCommitBatchOptions, D as DoomLoopAction, s as DoomLoopHandler, t as DoomLoopRequest, P as PrepareModelStepOptions, u as PreparedAgentModelStep, v as ProcessorOptions, w as ProcessorOutput, R as RunModelStepOptions, x as RunToolBatchOptions, y as RunToolBatchResult, S as StepProcessingOptions, z as StepProcessingOutput, B as advanceAgentTurnState, E as createAgentTurnEngine, F as createAgentTurnState, G as failAgentTurnState } from './types-QKHHQLLq.js';
|
|
24
27
|
export { ExecuteAgentToolCallOptions, ExecuteAgentToolCallResult, MAX_BYTES, MAX_LINES, TRUNCATE_DIR, TRUNCATE_GLOB, ToolRegistry, ToolSpec, TruncateResult, defaultRegistry, executeAgentToolCall, formatSize, normalizeToolReplayPolicy, truncateOutput } from './tool/index.js';
|
|
25
|
-
|
|
26
|
-
export {
|
|
27
|
-
export { AdapterSettings, CacheCapabilitySource, CapabilityCache, CapabilityOverrides, Directory, EngineSpec, Directory as ModelDirectory, Resolver as ModelResolver, ModelSpec, PatternCapabilitySource, RemoteCapabilityFetcher, RemoteCapabilitySource, Resolver, SyncResolver, applyCapabilityOverride, createResolver, findCapabilityOverride, getModelId, getNetworkStatus, getProviderCompatibility, getProviderId, inferProvider, likelySupportsReasoning } from './models/index.js';
|
|
28
|
-
export { C as CapabilitySource, D as DEFAULT_RESOLVER_OPTIONS, I as InputModality, M as ModelCapabilities, a as ModelCapabilityResolver, b as ModelEntry, N as NetworkStatus, O as OutputModality, P as ProviderCompatibility, R as ResolutionResult, c as ResolverOptions, S as SourcePriority, d as SourceResult, e as configureResolver, f as extractModelId, g as extractProvider, h as getDefaultResolver } from './capability-resolver-CgRGsWVX.js';
|
|
29
|
-
export { FileStorage, FileStorageOptions, MemoryStorage, buildEntryPath, buildMessagesFromEntries, configureDefaultSessionManager, createMessageEntry, createMetadataEntry, deserializeMessage, extractSessionInfo, generateEntryId, getDataDir, getDefaultSessionManager, getGitRootHash, getLeafId, getProjectId, getProjectSessionsDir, getSessionsDir, parseJSONL, serializeMessage, toJSONL, toJSONLBatch } from './storage/index.js';
|
|
30
|
-
export { AgentTaskChatAdapter, AgentTaskCheckpointReason, AgentTaskCheckpointStrategy, AgentTaskCheckpointStrategyInput, AgentTaskExecutionCheckpoint, AgentTaskExecutionContext, AgentTaskExecutionRun, AgentTaskExecutionSnapshot, AgentTaskObserver, AgentTaskPayload, AgentTaskResult, AgentTaskRunner, AgentTaskRunnerOptions, AgentWorkflowAssistantMessageSnapshot, AgentWorkflowCommitResult, AgentWorkflowMessageSnapshot, AgentWorkflowModelStepPlan, AgentWorkflowModelStepResult, AgentWorkflowOperationPlan, AgentWorkflowOutputCommitPlan, AgentWorkflowReplayDecision, AgentWorkflowStepCommitPlan, AgentWorkflowSystemMessageSnapshot, AgentWorkflowToolBatchResult, AgentWorkflowToolCallPlan, AgentWorkflowToolCallResult, AgentWorkflowToolCallSnapshot, AgentWorkflowToolMessageSnapshot, AgentWorkflowTurnPhase, AgentWorkflowTurnState, AgentWorkflowUserMessageSnapshot, ContextOverflowError, CreateAgentWorkflowTurnStateOptions, DoomLoopError, applyAgentWorkflowCommitResult, applyAgentWorkflowModelStepResult, applyAgentWorkflowToolBatchResult, applyAgentWorkflowToolCallResult, cloneAgentWorkflowTurnState, commitOutput, commitStep, convertAgentMessagesToModelMessages, createAgentTaskRunner, createAgentTurnStepCommitBatch, createAgentWorkflowTurnState, defaultAgentTaskCheckpointStrategy, failAgentWorkflowTurnState, planNextAgentWorkflowOperation, prepareModelStep, processStepStream, processStream, recordAgentWorkflowReplayDecision, restoreAgentWorkflowMessage, restoreAgentWorkflowMessages, runModelStep, runToolBatch, snapshotAgentWorkflowMessage, snapshotAgentWorkflowMessages } from './runtime/index.js';
|
|
31
|
-
export { A as AgentTurnActiveToolCall, a as AgentTurnBoundaryMetadata, b as AgentTurnBoundarySnapshot, c as AgentTurnCommitApplier, d as AgentTurnCommitBatch, e as AgentTurnCommitOptions, f as AgentTurnEngine, g as AgentTurnEngineOptions, h as AgentTurnPhase, i as AgentTurnResolvedToolCall, j as AgentTurnState, k as AgentTurnStateAdvanceOptions, l as AgentTurnStepCommitSnapshot, m as AgentTurnStepCommitToolCall, n as AgentTurnStepCommitToolResult, o as AgentTurnStepRuntimeConfig, C as CommitOutputOptions, p as CommitStepOptions, q as CreateAgentTurnStateOptions, r as CreateAgentTurnStepCommitBatchOptions, D as DoomLoopAction, s as DoomLoopHandler, t as DoomLoopRequest, P as PrepareModelStepOptions, u as PreparedAgentModelStep, v as ProcessorOptions, w as ProcessorOutput, R as RunModelStepOptions, x as RunToolBatchOptions, y as RunToolBatchResult, S as StepProcessingOptions, z as StepProcessingOutput, B as advanceAgentTurnState, E as createAgentTurnEngine, F as createAgentTurnState, G as failAgentTurnState } from './types-CqDZTh4d.js';
|
|
32
|
-
export { F as FileOperationMeta, N as NormalizedToolReplayPolicy, b as ToolContext, T as ToolMetadata, e as ToolReplayMode, a as ToolReplayPolicy, c as ToolResult, f as ToolSideEffectLevel, d as TurnTrackerContext } from './tool-HUtkiVBx.js';
|
|
33
|
-
export { Inference, LLM, buildToolSet, stream, streamOnce, streamStep } from './inference/index.js';
|
|
34
|
-
export { ChangeSet, Checkpoint, CheckpointConfig, CheckpointManager, FileChange, TrackedToolMetadata, clearCheckpoints, createCheckpointManager, extractFilePathsFromArgs, shouldCaptureBaseline, withFileTracking } from './tracking/index.js';
|
|
35
|
-
export { buildAnthropicOptions, buildBedrockOptions, buildGoogleOptions, buildGroqOptions, buildOpenAIOptions, buildOpenRouterOptions, buildReasoningOptions, buildReasoningOptionsSync, buildXAIOptions, getProviderOptionsKey, getReasoningConfig, getReasoningConfigSync, supportsReasoning, supportsReasoningSync } from './reasoning/index.js';
|
|
28
|
+
export { AdapterSettings, CacheCapabilitySource, CapabilityCache, CapabilityOverrides, Directory, EngineSpec, ModelCapabilityResolver, Directory as ModelDirectory, Resolver as ModelResolver, ModelSpec, NetworkStatus, PatternCapabilitySource, RemoteCapabilityFetcher, RemoteCapabilitySource, ResolutionResult, Resolver, SyncResolver, applyCapabilityOverride, configureResolver, createResolver, extractModelId, extractProvider, findCapabilityOverride, getDefaultResolver, getModelId, getNetworkStatus, getProviderCompatibility, getProviderId, inferContextWindow, inferProvider, likelySupportsReasoning } from './models/index.js';
|
|
29
|
+
export { C as CapabilitySource, D as DEFAULT_RESOLVER_OPTIONS, I as InputModality, M as ModelCapabilities, a as ModelEntry, O as OutputModality, P as ProviderCompatibility, R as ResolverOptions, S as SourcePriority, b as SourceResult } from './types-QA4WhEfz.js';
|
|
36
30
|
export { H as HttpTransportConfig, M as MCPConfig, a as MCPManager, b as MCPPrompt, c as MCPResource, d as MCPServerConfig, e as MCPServerStatus, S as SseTransportConfig, f as StdioTransportConfig } from './types-VQgymC1N.js';
|
|
37
31
|
export { createMCPManager, defineServer, httpServer, sseServer, stdioServer } from './mcp/index.js';
|
|
38
|
-
export {
|
|
32
|
+
export { AgentTaskChatAdapter, AgentTaskCheckpointReason, AgentTaskCheckpointStrategy, AgentTaskCheckpointStrategyInput, AgentTaskExecutionCheckpoint, AgentTaskExecutionContext, AgentTaskExecutionRun, AgentTaskExecutionSnapshot, AgentTaskObserver, AgentTaskPayload, AgentTaskResult, AgentTaskRunner, AgentTaskRunnerOptions, AgentWorkflowAssistantMessageSnapshot, AgentWorkflowCommitResult, AgentWorkflowMessageSnapshot, AgentWorkflowModelStepPlan, AgentWorkflowModelStepResult, AgentWorkflowOperationPlan, AgentWorkflowOutputCommitPlan, AgentWorkflowReplayDecision, AgentWorkflowStepCommitPlan, AgentWorkflowSystemMessageSnapshot, AgentWorkflowToolBatchResult, AgentWorkflowToolCallPlan, AgentWorkflowToolCallResult, AgentWorkflowToolCallSnapshot, AgentWorkflowToolMessageSnapshot, AgentWorkflowTurnPhase, AgentWorkflowTurnState, AgentWorkflowUserMessageSnapshot, ContextOverflowError, CreateAgentWorkflowTurnStateOptions, DoomLoopError, applyAgentWorkflowCommitResult, applyAgentWorkflowModelStepResult, applyAgentWorkflowToolBatchResult, applyAgentWorkflowToolCallResult, cloneAgentWorkflowTurnState, commitOutput, commitStep, convertAgentMessagesToModelMessages, createAgentTaskRunner, createAgentTurnStepCommitBatch, createAgentWorkflowTurnState, defaultAgentTaskCheckpointStrategy, failAgentWorkflowTurnState, planNextAgentWorkflowOperation, prepareModelStep, processStepStream, processStream, recordAgentWorkflowReplayDecision, restoreAgentWorkflowMessage, restoreAgentWorkflowMessages, runModelStep, runToolBatch, snapshotAgentWorkflowMessage, snapshotAgentWorkflowMessages } from './runtime/index.js';
|
|
33
|
+
export { ApprovalMiddlewareConfig, CacheTTL, OtelMiddlewareConfig, PromptCacheConfig, TelemetryConfig, TelemetryConfigResult, approvalMiddleware, createTelemetryConfig, otelMiddleware, promptCacheMiddleware } from './middleware/index.js';
|
|
39
34
|
export { DEFAULT_INSTRUCTION_PATTERNS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_FILE_SIZE, PRIORITY_BASE, PRIORITY_CUSTOM, PRIORITY_ENVIRONMENT, PRIORITY_INSTRUCTIONS, PRIORITY_OVERRIDE, PRIORITY_SKILLS, detectModelFamily, discoverInstructions, formatEnvironment, formatInstructions, gatherEnvironment, getAvailableFamilies, getTemplate, loadGlobalInstructions, summarizeEnvironment } from './prompt/index.js';
|
|
35
|
+
export { R as RemoteSkillEntry, e as RemoteSkillIndex, d as SkillConfig, b as SkillContent, f as SkillDiscoveryError, S as SkillDiscoveryResult, a as SkillMetadata, c as SkillResource, g as SkillResourceType, h as SkillScope, i as SkillSource, j as SkillSourceType } from './types-BfNpU8NS.js';
|
|
36
|
+
export { buildAnthropicOptions, buildBedrockOptions, buildGoogleOptions, buildGroqOptions, buildOpenAIOptions, buildOpenRouterOptions, buildReasoningOptions, buildReasoningOptionsSync, buildXAIOptions, getProviderOptionsKey, getReasoningConfig, getReasoningConfigSync, supportsReasoning, supportsReasoningSync } from './reasoning/index.js';
|
|
37
|
+
export { A as AppliedPreset, P as Preset } from './types-BnpEOYV-.js';
|
|
38
|
+
export { Presets, applyPreset, careful, code, createPreset, explore, filterTools, mergePresets, plan, quick, review, watch } from './presets/index.js';
|
|
39
|
+
export { DockerHostOptions, dockerHost, localHost } from './host/index.js';
|
|
40
|
+
export { a as Scope, b as ScopeAttributeValue, c as ScopeAttributes, d as ScopeKind, e as ScopeOptions, S as ScopeSnapshot } from './types-CQL-SvTn.js';
|
|
41
|
+
export { createScope, currentScope, restoreScope, snapshotScope, withinScope } from './scope/index.js';
|
|
42
|
+
export { Inference, LLM, buildToolSet, stream, streamOnce, streamStep } from './inference/index.js';
|
|
43
|
+
export { FileStorage, FileStorageOptions, MemoryStorage, buildEntryPath, buildMessagesFromEntries, configureDefaultSessionManager, createMessageEntry, createMetadataEntry, deserializeMessage, extractSessionInfo, generateEntryId, getDataDir, getDefaultSessionManager, getGitRootHash, getLeafId, getProjectId, getProjectSessionsDir, getSessionsDir, parseJSONL, serializeMessage, toJSONL, toJSONLBatch } from './storage/index.js';
|
|
44
|
+
export { ChangeSet, Checkpoint, CheckpointConfig, CheckpointManager, FileChange, TrackedToolMetadata, clearCheckpoints, createCheckpointManager, extractFilePathsFromArgs, shouldCaptureBaseline, withFileTracking } from './tracking/index.js';
|
|
45
|
+
export { A as ApprovalAction, a as ApprovalConfig, b as ApprovalRequest, c as ApprovalRule, R as RiskLevel } from './types-CWm-7rvB.js';
|
|
46
|
+
export { ApprovalDeniedError, ApprovalHandler, ApprovalTimeoutError, createApprovalHandler, getToolRisk } from './safety/index.js';
|
|
47
|
+
export { E as ErrorCategory, L as LLMError, a as LLMErrorOptions, R as ResponseHeaders } from './llm-error-D93FNNLY.js';
|
|
48
|
+
export { getErrorCategory, getRetryDelay, isRetryable, isRetryableCategory, parseRetryDelay } from './errors/index.js';
|
|
40
49
|
export { DEFAULT_EXTERNAL_DIRS, DEFAULT_MAX_SCAN_DEPTH, DEFAULT_SKILL_MAX_SIZE, SKILL_FILENAME, createSkillResourceTool, createSkillTool, createSkillTools, discoverSkills, inferResourceType, loadResourceContent, loadSkillContent, loadSkillMetadata, parseFrontmatter } from './skill/index.js';
|
|
41
|
-
export { S as SkillRegistry, c as createSkillRegistry, e as emptySkillRegistry } from './registry-
|
|
50
|
+
export { S as SkillRegistry, c as createSkillRegistry, e as emptySkillRegistry } from './registry-DwYqsQkX.js';
|
|
51
|
+
export { A as AgentSignal, E as EventOf, T as TypedHandler, U as Unsubscribe, W as WildcardHandler } from './types-YuWV4ag7.js';
|
|
52
|
+
export { LocalSignal } from './signal/index.js';
|
|
53
|
+
export { F as FileOperationMeta, N as NormalizedToolReplayPolicy, b as ToolContext, T as ToolMetadata, e as ToolReplayMode, a as ToolReplayPolicy, c as ToolResult, f as ToolSideEffectLevel, d as TurnTrackerContext } from './tool-DLXAR9Ce.js';
|
|
42
54
|
import 'zod';
|
|
43
55
|
import '@ai-sdk/provider-utils';
|
|
44
|
-
import './types-9jGQUjqW.js';
|
|
45
56
|
|
|
46
57
|
/**
|
|
47
58
|
* Mutable runtime state held by an `Agent` instance.
|
|
@@ -56,56 +67,6 @@ interface AgentState {
|
|
|
56
67
|
error?: Error;
|
|
57
68
|
}
|
|
58
69
|
|
|
59
|
-
/**
|
|
60
|
-
* Filter tools using preset allow/deny patterns.
|
|
61
|
-
*
|
|
62
|
-
* Explicit allow matches win over deny matches. This lets presets define a
|
|
63
|
-
* broad deny rule like `"*"` and then carve out a safe allow-list.
|
|
64
|
-
*/
|
|
65
|
-
declare function filterTools(tools: Tool.AnyInfo[], options: {
|
|
66
|
-
allow?: string[];
|
|
67
|
-
deny?: string[];
|
|
68
|
-
}): Tool.AnyInfo[];
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Apply a preset to available tools and a parent system prompt.
|
|
72
|
-
*/
|
|
73
|
-
declare function applyPreset(preset: Preset, availableTools: Tool.AnyInfo[], baseSystemPrompt?: string): AppliedPreset;
|
|
74
|
-
/**
|
|
75
|
-
* Merge multiple presets. Later presets override earlier scalar values.
|
|
76
|
-
*/
|
|
77
|
-
declare function mergePresets(...presets: Preset[]): Preset;
|
|
78
|
-
/**
|
|
79
|
-
* Create a custom preset with sensible defaults.
|
|
80
|
-
*/
|
|
81
|
-
declare function createPreset(options: Partial<Preset> & {
|
|
82
|
-
name: string;
|
|
83
|
-
}): Preset;
|
|
84
|
-
|
|
85
|
-
declare const explore: Preset;
|
|
86
|
-
declare const plan: Preset;
|
|
87
|
-
declare const review: Preset;
|
|
88
|
-
declare const quick: Preset;
|
|
89
|
-
declare const careful: Preset;
|
|
90
|
-
declare const code: Preset;
|
|
91
|
-
declare const watch: Preset;
|
|
92
|
-
declare const Presets: {
|
|
93
|
-
readonly explore: Preset;
|
|
94
|
-
readonly plan: Preset;
|
|
95
|
-
readonly review: Preset;
|
|
96
|
-
readonly quick: Preset;
|
|
97
|
-
readonly careful: Preset;
|
|
98
|
-
readonly code: Preset;
|
|
99
|
-
readonly watch: Preset;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
declare function isRetryableCategory(category: ErrorCategory): boolean;
|
|
103
|
-
declare function parseRetryDelay(headers: ResponseHeaders): number | undefined;
|
|
104
|
-
|
|
105
|
-
declare function isRetryable(error: unknown): boolean;
|
|
106
|
-
declare function getRetryDelay(error: unknown): number | undefined;
|
|
107
|
-
declare function getErrorCategory(error: unknown): ErrorCategory;
|
|
108
|
-
|
|
109
70
|
/** Everything the chat loop needs from the Agent instance. */
|
|
110
71
|
interface ChatLoopDeps {
|
|
111
72
|
sessionId: string;
|
|
@@ -232,38 +193,4 @@ declare function hasStreamProviderFactory(tools: unknown): tools is EnhancedTool
|
|
|
232
193
|
*/
|
|
233
194
|
declare function autoDetectStreamProvider(model: LanguageModel, tools: unknown, explicitProvider: unknown): StreamProvider | undefined;
|
|
234
195
|
|
|
235
|
-
|
|
236
|
-
* Get the risk level for a tool.
|
|
237
|
-
*/
|
|
238
|
-
declare function getToolRisk(tool: string, customRisks?: Record<string, RiskLevel>): RiskLevel;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Thrown when a user or rule denies an operation.
|
|
242
|
-
*/
|
|
243
|
-
declare class ApprovalDeniedError extends Error {
|
|
244
|
-
readonly tool: string;
|
|
245
|
-
readonly args: unknown;
|
|
246
|
-
constructor(tool: string, args: unknown, message?: string);
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Thrown when an approval request times out.
|
|
250
|
-
*/
|
|
251
|
-
declare class ApprovalTimeoutError extends Error {
|
|
252
|
-
readonly tool: string;
|
|
253
|
-
readonly timeoutMs: number;
|
|
254
|
-
constructor(tool: string, timeoutMs: number);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Creates an approval handler for managing tool execution permissions.
|
|
259
|
-
*/
|
|
260
|
-
declare function createApprovalHandler(config?: ApprovalConfig): {
|
|
261
|
-
request: (sessionId: string, tool: string, args: unknown, customRisks?: Record<string, RiskLevel>) => Promise<void>;
|
|
262
|
-
cancelAll: (reason?: string) => void;
|
|
263
|
-
addRule: (rule: ApprovalRule) => void;
|
|
264
|
-
getRules: () => readonly ApprovalRule[];
|
|
265
|
-
clearSessionRules: () => void;
|
|
266
|
-
};
|
|
267
|
-
type ApprovalHandler = ReturnType<typeof createApprovalHandler>;
|
|
268
|
-
|
|
269
|
-
export { Agent, AgentConfig, AgentEvent, type AgentState, AppliedPreset, ApprovalConfig, ApprovalDeniedError, type ApprovalHandler, ApprovalRule, ApprovalTimeoutError, type ChatLoopDeps, ContextManager, DEFAULT_MAX_STEPS, DEFAULT_MAX_TOKENS, DEFAULT_SYSTEM_PROMPT, EnhancedTools, ErrorCategory, InterventionController, Message, MiddlewareRunner, Preset, Presets, PromptBuilder, ReasoningLevel, ResponseHeaders, RiskLevel, SessionManager, StreamProvider, type SubAgentResult, TokenUsage, Tool, ToolHost, TurnChangeTracker, applyPreset, autoDetectStreamProvider, careful, code, createApprovalHandler, createPreset, explore, filterTools, getErrorCategory, getRetryDelay, getToolRisk, hasStreamProviderFactory, isRetryable, isRetryableCategory, mergePresets, needsCustomStreamProvider, parseRetryDelay, plan, quick, review, runChatLoop, runConcurrent, watch };
|
|
196
|
+
export { Agent, AgentConfig, AgentEvent, type AgentState, type ChatLoopDeps, ContextManager, DEFAULT_MAX_STEPS, DEFAULT_MAX_TOKENS, DEFAULT_SYSTEM_PROMPT, EnhancedTools, InterventionController, Message, MiddlewareRunner, PromptBuilder, ReasoningLevel, SessionManager, StreamProvider, type SubAgentResult, TokenUsage, Tool, ToolHost, TurnChangeTracker, autoDetectStreamProvider, hasStreamProviderFactory, needsCustomStreamProvider, runChatLoop, runConcurrent };
|