@cuylabs/agent-core 0.7.0 → 0.9.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.
Files changed (79) hide show
  1. package/dist/{builder-BRvqCcIk.d.ts → builder-BgZ_j4Vs.d.ts} +3 -2
  2. package/dist/chunk-4QFNWPIF.js +202 -0
  3. package/dist/chunk-5ARZJWD2.js +259 -0
  4. package/dist/chunk-DXFBQMXP.js +53 -0
  5. package/dist/chunk-EKR6PKXU.js +180 -0
  6. package/dist/{chunk-IVUJDISU.js → chunk-GFTW23FV.js} +5 -14
  7. package/dist/{chunk-IEFIQENH.js → chunk-H3FUYU52.js} +15 -7
  8. package/dist/chunk-I6PKJ7XQ.js +292 -0
  9. package/dist/chunk-IYWQOJMQ.js +102 -0
  10. package/dist/{chunk-3HNO5SVI.js → chunk-J4QDGZIA.js} +20 -4
  11. package/dist/{chunk-7MUFEN4K.js → chunk-JLXG2SH7.js} +349 -3
  12. package/dist/{chunk-CDTV2UYU.js → chunk-MAZ5DY5B.js} +64 -276
  13. package/dist/{chunk-P6YF7USR.js → chunk-MHKK374K.js} +12 -11
  14. package/dist/{chunk-VBWWUHWI.js → chunk-OFDKHNCX.js} +4 -1
  15. package/dist/{chunk-YUUJK53A.js → chunk-RKEW5WXI.js} +1 -1
  16. package/dist/{chunk-LRHOS4ZN.js → chunk-SPILYYDF.js} +3 -2
  17. package/dist/{chunk-QGOGIP7T.js → chunk-UDCZ673N.js} +385 -233
  18. package/dist/{chunk-BDBZ3SLK.js → chunk-UHCJEM2E.js} +39 -2
  19. package/dist/chunk-WGZAPU6N.js +929 -0
  20. package/dist/{chunk-5K7AQVOU.js → chunk-WKHDSSXG.js} +130 -209
  21. package/dist/{chunk-BNSHUWCV.js → chunk-WWYYNWEW.js} +1 -1
  22. package/dist/context/index.js +1 -1
  23. package/dist/events-CE72w8W4.d.ts +149 -0
  24. package/dist/index-BCqEGzBj.d.ts +251 -0
  25. package/dist/{index-C33hlD6H.d.ts → index-DQuTZ8xL.d.ts} +319 -56
  26. package/dist/index.d.ts +42 -121
  27. package/dist/index.js +951 -848
  28. package/dist/inference/errors/index.d.ts +11 -0
  29. package/dist/inference/errors/index.js +16 -0
  30. package/dist/inference/index.d.ts +12 -8
  31. package/dist/inference/index.js +35 -7
  32. package/dist/llm-error-D93FNNLY.d.ts +32 -0
  33. package/dist/middleware/index.d.ts +246 -7
  34. package/dist/middleware/index.js +3 -1
  35. package/dist/models/index.d.ts +132 -9
  36. package/dist/models/index.js +48 -8
  37. package/dist/models/reasoning/index.d.ts +4 -0
  38. package/dist/{reasoning → models/reasoning}/index.js +2 -7
  39. package/dist/plugin/index.d.ts +414 -0
  40. package/dist/plugin/index.js +32 -0
  41. package/dist/presets/index.d.ts +53 -0
  42. package/dist/presets/index.js +30 -0
  43. package/dist/prompt/index.d.ts +11 -8
  44. package/dist/prompt/index.js +3 -2
  45. package/dist/{registry-BDLIHOQB.d.ts → registry-DwYqsQkX.d.ts} +1 -1
  46. package/dist/runner-CI-XeR16.d.ts +91 -0
  47. package/dist/runtime/index.d.ts +12 -8
  48. package/dist/runtime/index.js +8 -7
  49. package/dist/safety/index.d.ts +38 -0
  50. package/dist/safety/index.js +12 -0
  51. package/dist/scope/index.d.ts +2 -2
  52. package/dist/{session-manager-B_CWGTsl.d.ts → session-manager-KbYt2WUh.d.ts} +8 -0
  53. package/dist/signal/index.d.ts +28 -0
  54. package/dist/signal/index.js +6 -0
  55. package/dist/skill/index.d.ts +7 -6
  56. package/dist/skill/index.js +3 -3
  57. package/dist/storage/index.d.ts +2 -2
  58. package/dist/storage/index.js +1 -1
  59. package/dist/sub-agent/index.d.ts +16 -10
  60. package/dist/sub-agent/index.js +21 -4
  61. package/dist/tool/index.d.ts +22 -6
  62. package/dist/tool/index.js +3 -3
  63. package/dist/tool-CZWN3KbO.d.ts +141 -0
  64. package/dist/{tool-HUtkiVBx.d.ts → tool-DkhSCV2Y.d.ts} +2 -2
  65. package/dist/tracking/index.d.ts +2 -2
  66. package/dist/tracking/index.js +1 -1
  67. package/dist/{tool-Db1Ue-1U.d.ts → types-BfNpU8NS.d.ts} +1 -150
  68. package/dist/{types-FRpzzg_9.d.ts → types-BlOKk-Bb.d.ts} +10 -35
  69. package/dist/types-BlZwmnuW.d.ts +50 -0
  70. package/dist/{types-9jGQUjqW.d.ts → types-CQL-SvTn.d.ts} +1 -1
  71. package/dist/types-CWm-7rvB.d.ts +55 -0
  72. package/dist/{runner-DSKaEz3z.d.ts → types-DTSkxakL.d.ts} +7 -235
  73. package/dist/{types-CqDZTh4d.d.ts → types-DmDwi2zI.d.ts} +8 -4
  74. package/dist/types-YuWV4ag7.d.ts +72 -0
  75. package/package.json +67 -6
  76. package/dist/capability-resolver-CgRGsWVX.d.ts +0 -254
  77. package/dist/chunk-ZPMACVZK.js +0 -305
  78. package/dist/index-CfBGYrpd.d.ts +0 -317
  79. package/dist/reasoning/index.d.ts +0 -117
package/dist/index.d.ts CHANGED
@@ -1,47 +1,60 @@
1
- import { P as Preset, A as AppliedPreset, a as AgentConfig, b as Agent } from './index-C33hlD6H.js';
2
- export { c as AgentProfile, C as CompactionConfig, D as DEFAULT_MAX_CONCURRENT, d as DEFAULT_MAX_SPAWN_DEPTH, e as DEFAULT_SESSION_TITLE_PREFIX, f as PRUNE_PROTECTED_TOOLS, S as SubAgentCompletedResult, g as SubAgentHandle, h as SubAgentStatus, i as SubAgentToolConfig, j as SubAgentTracker, k as SubAgentUsage, T as TracingConfig, l as createAgent, m as createSubAgentTools } from './index-C33hlD6H.js';
1
+ import { A as AgentConfig, a as Agent } from './index-DQuTZ8xL.js';
2
+ export { b as AgentDiscoveryOptions, c as AgentDiscoveryResult, d as AgentProfile, e as AgentSource, C as CompactionConfig, D as DEFAULT_MAX_CONCURRENT, f as DEFAULT_MAX_SPAWN_DEPTH, g as DEFAULT_SESSION_TITLE_PREFIX, h as DiscoveredProfile, M as MarkdownAgentFrontmatter, i as MarkdownAgentProfile, P as PRUNE_PROTECTED_TOOLS, j as ParsedMarkdownAgent, k as ParsedToolSpec, l as ProfileResolvers, S as SubAgentCompletedResult, m as SubAgentHandle, n as SubAgentStatus, o as SubAgentToolConfig, p as SubAgentTracker, q as SubAgentUsage, T as ToolModifier, r as TracingConfig, s as createAgent, t as createSubAgentTools, u as discoverAgentProfiles, v as getProjectAgentsDir, w as getUserAgentsDir, x as isMarkdownProfile, y as parseAgentFrontmatter, z as parseMarkdownAgent, B as parseToolSpec, E as toAgentProfile } from './index-DQuTZ8xL.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-Db1Ue-1U.js';
7
- export { C as CompatibleSchema, I as InferSchemaOutput, 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, k as defineTool } from './tool-Db1Ue-1U.js';
6
+ import { T as Tool } from './tool-CZWN3KbO.js';
7
+ export { C as CompatibleSchema, I as InferSchemaOutput, d as defineTool } from './tool-CZWN3KbO.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, A as AgentEvent, d as StreamProvider, E as EnhancedTools } from './runner-DSKaEz3z.js';
11
- export { h as AgentMiddleware, i as AgentModelHooks, j as AgentStatus, g as AgentTurnBoundaryKind, k as ApprovalEvent, B as BlockedModelCall, l as EnvironmentInfo, I as InstructionFile, m as ModelCallContext, e as ModelCallInput, n as ModelCallOutput, c as ModelFamily, o as ProcessorResult, a as PromptBuildContext, P as PromptConfig, b as PromptSection, f as StepProcessingResult, S as StreamChunk, p as StreamInput, q as StreamProviderConfig, r as StreamProviderFactory, s as StreamProviderInput, t as StreamProviderResult, T as ToolCallDecision } from './runner-DSKaEz3z.js';
12
- import { E as ErrorCategory, R as ResponseHeaders, g as InterventionController } from './types-FRpzzg_9.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, i as LLMError, j as LLMErrorOptions, L as LLMStreamInput, f as LLMStreamResult, O as OUTPUT_TOKEN_MAX, k as OnInterventionApplied, P as PendingIntervention, l as RetryConfig, m as RetryHandlerOptions, n as RetryState, S as StepInfo, T as ToolExecutionMode, o as calculateDelay, p as createRetryHandler, q as createRetryState, s as shouldRetry, r as sleep, w as withRetry } from './types-FRpzzg_9.js';
10
+ import { M as MiddlewareRunner } from './runner-CI-XeR16.js';
11
+ import { n as InterventionController } from './types-BlOKk-Bb.js';
12
+ export { A as AnyInferenceResult, a as AnyStreamResult, C as CustomStreamProvider, b as CustomStreamResult, D as DEFAULT_MAX_OUTPUT_TOKENS, c as DEFAULT_RETRY_CONFIG, d as InferenceCustomResult, e as InferenceStepInfo, I as InferenceStreamInput, f as InferenceStreamResult, L as LLMStreamInput, g as LLMStreamResult, O as OUTPUT_TOKEN_MAX, o as OnInterventionApplied, P as PendingIntervention, R as RetryConfig, h as RetryHandlerOptions, i as RetryState, S as StepInfo, T as ToolExecutionMode, j as calculateDelay, k as createRetryHandler, l as createRetryState, s as shouldRetry, m as sleep, w as withRetry } from './types-BlOKk-Bb.js';
14
13
  import { R as ReasoningLevel } from './types-CQaXbRsS.js';
15
14
  export { E as EXTENDED_LEVELS, F as FIXED_LEVELS, a as ReasoningConfig, S as STANDARD_LEVELS, s as shouldIncludeReasoningSummary } from './types-CQaXbRsS.js';
16
15
  import { ContextManager } from './context/index.js';
17
16
  export { ContextLimits, DEFAULT_CONTEXT_LIMITS, PruneContextOptions, PruneResult, SummarizationOptions, estimateConversationTokens, estimateMessageTokens, estimateTokens, findCutPoint, generateSummary, isContextOverflowing, pruneContext, pruneToolResults, shouldPruneContext } from './context/index.js';
18
17
  import { T as TurnChangeTracker } from './tracker-DClqYqTj.js';
19
18
  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-BRvqCcIk.js';
21
- export { c as createPromptBuilder } from './builder-BRvqCcIk.js';
22
- import { S as SessionManager } from './session-manager-B_CWGTsl.js';
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';
19
+ import { P as PromptBuilder } from './builder-BgZ_j4Vs.js';
20
+ export { c as createPromptBuilder } from './builder-BgZ_j4Vs.js';
21
+ import { S as SessionManager } from './session-manager-KbYt2WUh.js';
22
+ 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-KbYt2WUh.js';
23
+ import { A as AgentEvent } from './events-CE72w8W4.js';
24
+ export { a as AgentStatus, b as AgentTurnBoundaryKind, c as ApprovalEvent, P as ProcessorResult, S as StepProcessingResult, d as StreamInput } from './events-CE72w8W4.js';
25
+ import { f as StreamProvider, E as EnhancedTools } from './types-DTSkxakL.js';
26
+ export { A as AgentMiddleware, g as AgentModelHooks, B as BlockedModelCall, h as EnvironmentInfo, I as InstructionFile, a as ModelCallContext, M as ModelCallInput, b as ModelCallOutput, e as ModelFamily, P as PromptBuildContext, d as PromptConfig, c as PromptSection, S as StreamChunk, i as StreamProviderConfig, j as StreamProviderFactory, k as StreamProviderInput, l as StreamProviderResult, T as ToolCallDecision } from './types-DTSkxakL.js';
27
+ 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-DmDwi2zI.js';
24
28
  export { ExecuteAgentToolCallOptions, ExecuteAgentToolCallResult, MAX_BYTES, MAX_LINES, TRUNCATE_DIR, TRUNCATE_GLOB, ToolRegistry, ToolSpec, TruncateResult, defaultRegistry, executeAgentToolCall, formatSize, normalizeToolReplayPolicy, truncateOutput } from './tool/index.js';
25
- import { R as RiskLevel, A as ApprovalConfig, a as ApprovalRule } from './index-CfBGYrpd.js';
26
- export { b as ApprovalAction, c as ApprovalMiddlewareConfig, d as ApprovalRequest, C as CacheTTL, O as OtelMiddlewareConfig, P as PromptCacheConfig, T as TelemetryConfig, e as TelemetryConfigResult, f as approvalMiddleware, g as createTelemetryConfig, o as otelMiddleware, p as promptCacheMiddleware } from './index-CfBGYrpd.js';
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';
29
+ export { AdapterSettings, CacheCapabilitySource, CapabilityCache, CapabilityOverrides, Directory, EngineSpec, ModelCapabilityResolver, Directory as ModelDirectory, Resolver as ModelResolver, ModelSpec, NetworkStatus, PatternCapabilitySource, RemoteCapabilityFetcher, RemoteCapabilitySource, ResolutionResult, Resolver, applyCapabilityOverride, configureResolver, createResolver, extractModelId, extractProvider, findCapabilityOverride, getDefaultResolver, getModelId, getNetworkStatus, getProviderCompatibility, getProviderId, inferContextWindow, inferProvider, likelySupportsReasoning } from './models/index.js';
30
+ 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, c as buildAnthropicOptions, d as buildBedrockOptions, e as buildGoogleOptions, f as buildGroqOptions, g as buildOpenAIOptions, h as buildOpenRouterOptions, i as buildReasoningOptions, j as buildReasoningOptionsSync, k as buildXAIOptions, l as getProviderOptionsKey, m as getReasoningConfig, n as getReasoningConfigSync, s as supportsReasoning, o as supportsReasoningSync } from './index-BCqEGzBj.js';
36
31
  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
32
  export { createMCPManager, defineServer, httpServer, sseServer, stdioServer } from './mcp/index.js';
38
- export { DockerHostOptions, dockerHost, localHost } from './host/index.js';
33
+ 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';
34
+ export { ApprovalMiddlewareConfig, CacheTTL, OtelMiddlewareConfig, PromptCacheConfig, TelemetryConfig, TelemetryConfigResult, approvalMiddleware, createTelemetryConfig, otelMiddleware, promptCacheMiddleware } from './middleware/index.js';
39
35
  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';
36
+ 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';
37
+ export { A as AppliedPreset, P as Preset } from './types-BlZwmnuW.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 './inference/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-BDLIHOQB.js';
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 { DefinePluginInit, DiscoveredPlugin, LayeredSettings, NullSettings, PluginActivateContext, PluginCommand, PluginCompatibility, PluginContext, PluginContributions, PluginDefinition, PluginEventBus, PluginEventBusAPI, PluginEventHandler, PluginInit, PluginLifecycleHooks, PluginLoaderOptions, PluginManifest, PluginRegistry, PluginRegistryCompatibilityOptions, PluginRegistryOptions, PluginRegistryTimeoutOptions, PluginSessionContext, PluginSettingsDefinition, PluginSettingsProvider, PluginSettingsSchema, PluginUnsubscribe, StaticSettings, ValidatedSettings, definePlugin, discoverPlugins, getPluginLoader, isDefinedPlugin, loadPluginModule, resetFrameworkAliases, resetPluginLoader, resolveFrameworkAliases } from './plugin/index.js';
54
+ export { F as FileOperationMeta, N as NormalizedToolReplayPolicy, T as ToolContext, a as ToolMetadata, e as ToolReplayMode, b as ToolReplayPolicy, c as ToolResult, f as ToolSideEffectLevel, d as TurnTrackerContext } from './tool-DkhSCV2Y.js';
42
55
  import 'zod';
43
56
  import '@ai-sdk/provider-utils';
44
- import './types-9jGQUjqW.js';
57
+ import 'jiti';
45
58
 
46
59
  /**
47
60
  * Mutable runtime state held by an `Agent` instance.
@@ -56,56 +69,6 @@ interface AgentState {
56
69
  error?: Error;
57
70
  }
58
71
 
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
72
  /** Everything the chat loop needs from the Agent instance. */
110
73
  interface ChatLoopDeps {
111
74
  sessionId: string;
@@ -161,16 +124,8 @@ interface SubAgentResult {
161
124
  * Useful for parallelizing independent research or analysis tasks.
162
125
  * Results are returned in the same order as tasks.
163
126
  *
164
- * **IMPORTANT: Concurrency Considerations**
165
- *
166
- * When multiple tasks use the same `Agent` instance, they share the same
167
- * `SessionManager`. To avoid state conflicts:
168
- *
169
- * 1. Use distinct `parentSessionId` values for each task
170
- * 2. Or create separate `Agent` instances via `agent.fork()` for each task
171
- * 3. Or ensure tasks use unique session IDs (auto-generated if not specified)
172
- *
173
- * Tasks modifying the same session concurrently may cause race conditions.
127
+ * Distinct sub-agent sessions can run in parallel safely. Turns targeting the
128
+ * same session are serialized to preserve history order.
174
129
  *
175
130
  * @example
176
131
  * ```typescript
@@ -232,38 +187,4 @@ declare function hasStreamProviderFactory(tools: unknown): tools is EnhancedTool
232
187
  */
233
188
  declare function autoDetectStreamProvider(model: LanguageModel, tools: unknown, explicitProvider: unknown): StreamProvider | undefined;
234
189
 
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 };
190
+ 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 };