@wrongstack/core 0.9.0 → 0.9.1
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/{agent-bridge-Bad3ZGQ7.d.ts → agent-bridge-DMVOX0cF.d.ts} +1 -1
- package/dist/{agent-subagent-runner-Cc8sRJOF.d.ts → agent-subagent-runner-R0I0Xusn.d.ts} +3 -3
- package/dist/{compactor-Mw7-rNyb.d.ts → compactor-DVTKL7XD.d.ts} +1 -1
- package/dist/{config-Bi4Q0fnz.d.ts → config-DoUAEvXH.d.ts} +8 -2
- package/dist/{context-z2x5gv_V.d.ts → context-BRNbHmRM.d.ts} +6 -0
- package/dist/coordination/index.d.ts +12 -12
- package/dist/coordination/index.js +58 -37
- package/dist/coordination/index.js.map +1 -1
- package/dist/{default-config-DvRSTELf.d.ts → default-config-Uzla85H-.d.ts} +5 -1
- package/dist/defaults/index.d.ts +22 -22
- package/dist/defaults/index.js +102 -72
- package/dist/defaults/index.js.map +1 -1
- package/dist/{events-yCpJD4wa.d.ts → events-CiG9qUM_.d.ts} +1 -1
- package/dist/execution/index.d.ts +13 -13
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +6 -6
- package/dist/{index-SxpnwRlJ.d.ts → index-bOl8lzFV.d.ts} +5 -5
- package/dist/{index-Dl3PaD7f.d.ts → index-u2ROAV0F.d.ts} +8 -8
- package/dist/index.d.ts +31 -31
- package/dist/index.js +72 -42
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/kernel/index.d.ts +9 -9
- package/dist/{mcp-servers-n2L9ohMX.d.ts → mcp-servers-jEoMIBZv.d.ts} +3 -3
- package/dist/models/index.d.ts +2 -2
- package/dist/{multi-agent-C8uY45AY.d.ts → multi-agent-3ZnTB1aT.d.ts} +2 -2
- package/dist/{multi-agent-coordinator-C7YbZUY8.d.ts → multi-agent-coordinator-COwCGIrU.d.ts} +2 -2
- package/dist/{null-fleet-bus-Bb2jVLKr.d.ts → null-fleet-bus-C1grTnOF.d.ts} +6 -6
- package/dist/observability/index.d.ts +2 -2
- package/dist/{path-resolver-DnC1nOjb.d.ts → path-resolver-TcJfc29Y.d.ts} +2 -2
- package/dist/{permission-policy-BBa1M1xc.d.ts → permission-policy-BpCGYBud.d.ts} +2 -2
- package/dist/{plan-templates-Cc-04Z8o.d.ts → plan-templates-ByT1HcRI.d.ts} +9 -4
- package/dist/{provider-runner-C4ouU7--.d.ts → provider-runner-BEpikbbN.d.ts} +3 -3
- package/dist/{retry-policy-OwtKNxo8.d.ts → retry-policy-BYkq0ugs.d.ts} +1 -1
- package/dist/sdd/index.d.ts +8 -8
- package/dist/{secret-scrubber-CyE1-EMG.d.ts → secret-scrubber-DttNiGYA.d.ts} +1 -1
- package/dist/{secret-scrubber-C0n1EqrC.d.ts → secret-scrubber-QSeI0ADi.d.ts} +1 -1
- package/dist/security/index.d.ts +4 -4
- package/dist/security/index.js +5 -2
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-DkvgYVS4.d.ts → selector-pox8abg0.d.ts} +1 -1
- package/dist/{session-reader-DsadjyF9.d.ts → session-reader-CSWcb5Ga.d.ts} +1 -1
- package/dist/storage/index.d.ts +5 -5
- package/dist/storage/index.js +81 -57
- package/dist/storage/index.js.map +1 -1
- package/dist/{system-prompt-CWA6ml-d.d.ts → system-prompt-Bs-Wliab.d.ts} +1 -1
- package/dist/{tool-executor-Ch25BDwa.d.ts → tool-executor-D7a00JVJ.d.ts} +4 -4
- package/dist/types/index.d.ts +16 -16
- package/dist/types/index.js +8 -2
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { A as AfterIterationHook, a as AfterRunHook, b as AfterToolExecutionHook, d as AgentExtension, B as BeforeIterationHook, h as BeforeRunHook, i as BeforeToolExecutionHook, E as ExtensionRegistry, O as OnErrorHook, s as ProviderRunnerFn, t as ProviderRunnerWrapper } from '../index-
|
|
2
|
-
import '../context-
|
|
1
|
+
export { A as AfterIterationHook, a as AfterRunHook, b as AfterToolExecutionHook, d as AgentExtension, B as BeforeIterationHook, h as BeforeRunHook, i as BeforeToolExecutionHook, E as ExtensionRegistry, O as OnErrorHook, s as ProviderRunnerFn, t as ProviderRunnerWrapper } from '../index-bOl8lzFV.js';
|
|
2
|
+
import '../context-BRNbHmRM.js';
|
|
3
3
|
import '../logger-DDd5C--Z.js';
|
|
4
|
-
import '../system-prompt-
|
|
4
|
+
import '../system-prompt-Bs-Wliab.js';
|
|
5
5
|
import '../observability-BhnVLBLS.js';
|
|
6
|
-
import '../events-
|
|
7
|
-
import '../secret-scrubber-
|
|
8
|
-
import '../config-
|
|
6
|
+
import '../events-CiG9qUM_.js';
|
|
7
|
+
import '../secret-scrubber-DttNiGYA.js';
|
|
8
|
+
import '../config-DoUAEvXH.js';
|
|
9
9
|
import '../models-registry-BcYJDKLm.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Q as Tool, Y as ToolResultBlock, _ as ToolUseBlock, d as Context, T as TextBlock, p as Request, q as Response, m as Provider, a0 as WrongStackError, c as ContentBlock, u as RunOptions, J as JSONSchema } from './context-
|
|
1
|
+
import { Q as Tool, Y as ToolResultBlock, _ as ToolUseBlock, d as Context, T as TextBlock, p as Request, q as Response, m as Provider, a0 as WrongStackError, c as ContentBlock, u as RunOptions, J as JSONSchema } from './context-BRNbHmRM.js';
|
|
2
2
|
import { a as Logger } from './logger-DDd5C--Z.js';
|
|
3
|
-
import { e as Renderer, a as BuildContext, C as Container, P as Pipeline, R as ReadonlyPipeline } from './system-prompt-
|
|
3
|
+
import { e as Renderer, a as BuildContext, C as Container, P as Pipeline, R as ReadonlyPipeline } from './system-prompt-Bs-Wliab.js';
|
|
4
4
|
import { T as Tracer } from './observability-BhnVLBLS.js';
|
|
5
|
-
import { E as EventBus, c as EventName, L as Listener } from './events-
|
|
6
|
-
import { a as PermissionPolicy, S as SecretScrubber } from './secret-scrubber-
|
|
7
|
-
import { l as ProviderConfig, a as Config } from './config-
|
|
5
|
+
import { E as EventBus, c as EventName, L as Listener } from './events-CiG9qUM_.js';
|
|
6
|
+
import { a as PermissionPolicy, S as SecretScrubber } from './secret-scrubber-DttNiGYA.js';
|
|
7
|
+
import { l as ProviderConfig, a as Config } from './config-DoUAEvXH.js';
|
|
8
8
|
import { W as WireFamily } from './models-registry-BcYJDKLm.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { T as Token, e as Renderer, S as SystemPromptBuilder } from './system-prompt-
|
|
2
|
-
import { E as EventBus } from './events-
|
|
3
|
-
import { a as Compactor } from './compactor-
|
|
4
|
-
import { b as ConfigLoader, c as ConfigStore } from './config-
|
|
5
|
-
import { E as ErrorHandler, a as RetryPolicy } from './retry-policy-
|
|
1
|
+
import { T as Token, e as Renderer, S as SystemPromptBuilder } from './system-prompt-Bs-Wliab.js';
|
|
2
|
+
import { E as EventBus } from './events-CiG9qUM_.js';
|
|
3
|
+
import { a as Compactor } from './compactor-DVTKL7XD.js';
|
|
4
|
+
import { b as ConfigLoader, c as ConfigStore } from './config-DoUAEvXH.js';
|
|
5
|
+
import { E as ErrorHandler, a as RetryPolicy } from './retry-policy-BYkq0ugs.js';
|
|
6
6
|
import { I as InputReader } from './input-reader-E-ffP2ee.js';
|
|
7
7
|
import { a as Logger } from './logger-DDd5C--Z.js';
|
|
8
8
|
import { b as MemoryStore } from './memory-CEXuo7sz.js';
|
|
9
9
|
import { c as ModeStore } from './mode-CV077NjV.js';
|
|
10
10
|
import { b as ModelsRegistry } from './models-registry-BcYJDKLm.js';
|
|
11
11
|
import { P as PathResolver } from './path-resolver-CPRj4bFY.js';
|
|
12
|
-
import { a as PermissionPolicy, S as SecretScrubber } from './secret-scrubber-
|
|
13
|
-
import { P as ProviderRunner } from './provider-runner-
|
|
14
|
-
import { O as TokenCounter, y as SessionStore } from './context-
|
|
12
|
+
import { a as PermissionPolicy, S as SecretScrubber } from './secret-scrubber-DttNiGYA.js';
|
|
13
|
+
import { P as ProviderRunner } from './provider-runner-BEpikbbN.js';
|
|
14
|
+
import { O as TokenCounter, y as SessionStore } from './context-BRNbHmRM.js';
|
|
15
15
|
import { a as SkillLoader } from './skill-CxuWrsKK.js';
|
|
16
16
|
|
|
17
17
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { S as SystemPromptBuilder, c as ModelCapabilities, a as BuildContext, C as Container } from './system-prompt-
|
|
2
|
-
export { B as BindOptions, D as Decorator, F as Factory, M as Middleware, b as MiddlewareHandler, N as NextFn, P as Pipeline, d as PipelineOptions, e as Renderer, T as Token } from './system-prompt-
|
|
3
|
-
import { E as EventBus, c as EventName, L as Listener } from './events-
|
|
4
|
-
export { a as EventLogger, b as EventMap, S as ScopedEventBus } from './events-
|
|
5
|
-
import { d as WorktreeManager } from './index-
|
|
6
|
-
export { A as AllocateOpts, M as MergeOpts, a as MergeResult, R as RunController, b as RunControllerOptions, T as TOKENS, W as WorktreeHandle, e as WorktreeManagerOptions, c as WorktreeRunResult, f as WorktreeStatus, g as assertSafePath } from './index-
|
|
7
|
-
import { d as Context, m as Provider, Q as Tool, c as ContentBlock, T as TextBlock } from './context-
|
|
8
|
-
export { A as AgentError, a as Capabilities, b as ConfigError, e as ContextInit, f as ConversationState, E as ERROR_CODES, g as ErrorCode, h as ErrorSeverity, i as ErrorSubsystem, F as FileSnapshot, j as FsError, I as ImageBlock, J as JSONSchema, M as Message, k as MessageRole, P as Permission, l as PluginError, n as ProviderError, o as ProviderErrorBody, R as ReadonlyConversationState, p as Request, q as Response, r as ResumedSession, s as RiskTier, t as RunEnv, u as RunOptions, S as SessionData, v as SessionError, w as SessionEvent, x as SessionMetadata, y as SessionStore, z as SessionSummary, B as SessionWriter, D as StateChange, G as StateChangeHandler, H as StopReason, K as StreamEvent, L as ThinkingBlock, N as TodoItem, O as TokenCounter, U as ToolCallContext, V as ToolError, W as ToolFinalEvent, X as ToolProgressEvent, Y as ToolResultBlock, Z as ToolStreamEvent, _ as ToolUseBlock, $ as Usage, a0 as WrongStackError, a1 as asBlocks, a2 as asText, a3 as extractRunEnv, a4 as isAgentError, a5 as isConfigError, a6 as isFsError, a7 as isImageBlock, a8 as isPluginError, a9 as isSessionError, aa as isTextBlock, ab as isThinkingBlock, ac as isToolError, ad as isToolResultBlock, ae as isToolUseBlock, af as isWrongStackError, ag as toWrongStackError, ah as wrapAsState } from './context-
|
|
9
|
-
export { P as ProviderRunner, R as RunProviderOptions } from './provider-runner-
|
|
10
|
-
import { M as MCPServerConfig, a as Config } from './config-
|
|
11
|
-
export { C as CONTEXT_WINDOW_MODES, b as ConfigLoader, c as ConfigStore, d as ContextConfig, e as ContextWindowAggressiveOn, f as ContextWindowConfigLike, g as ContextWindowMode, h as ContextWindowModeId, i as ContextWindowPolicy, j as ContextWindowThresholds, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, L as LogConfig, P as PluginConfig, k as ProviderApiKey, l as ProviderConfig, T as ToolsConfig, m as formatContextWindowModeList, n as getContextWindowMode, o as isContextWindowModeId, p as listContextWindowModes, r as resolveContextWindowPolicy } from './config-
|
|
12
|
-
export { C as CompactReport, a as Compactor } from './compactor-
|
|
13
|
-
export { P as PermissionDecision, a as PermissionPolicy, S as SecretScrubber, T as TrustPolicy } from './secret-scrubber-
|
|
1
|
+
import { S as SystemPromptBuilder, c as ModelCapabilities, a as BuildContext, C as Container } from './system-prompt-Bs-Wliab.js';
|
|
2
|
+
export { B as BindOptions, D as Decorator, F as Factory, M as Middleware, b as MiddlewareHandler, N as NextFn, P as Pipeline, d as PipelineOptions, e as Renderer, T as Token } from './system-prompt-Bs-Wliab.js';
|
|
3
|
+
import { E as EventBus, c as EventName, L as Listener } from './events-CiG9qUM_.js';
|
|
4
|
+
export { a as EventLogger, b as EventMap, S as ScopedEventBus } from './events-CiG9qUM_.js';
|
|
5
|
+
import { d as WorktreeManager } from './index-u2ROAV0F.js';
|
|
6
|
+
export { A as AllocateOpts, M as MergeOpts, a as MergeResult, R as RunController, b as RunControllerOptions, T as TOKENS, W as WorktreeHandle, e as WorktreeManagerOptions, c as WorktreeRunResult, f as WorktreeStatus, g as assertSafePath } from './index-u2ROAV0F.js';
|
|
7
|
+
import { d as Context, m as Provider, Q as Tool, c as ContentBlock, T as TextBlock } from './context-BRNbHmRM.js';
|
|
8
|
+
export { A as AgentError, a as Capabilities, b as ConfigError, e as ContextInit, f as ConversationState, E as ERROR_CODES, g as ErrorCode, h as ErrorSeverity, i as ErrorSubsystem, F as FileSnapshot, j as FsError, I as ImageBlock, J as JSONSchema, M as Message, k as MessageRole, P as Permission, l as PluginError, n as ProviderError, o as ProviderErrorBody, R as ReadonlyConversationState, p as Request, q as Response, r as ResumedSession, s as RiskTier, t as RunEnv, u as RunOptions, S as SessionData, v as SessionError, w as SessionEvent, x as SessionMetadata, y as SessionStore, z as SessionSummary, B as SessionWriter, D as StateChange, G as StateChangeHandler, H as StopReason, K as StreamEvent, L as ThinkingBlock, N as TodoItem, O as TokenCounter, U as ToolCallContext, V as ToolError, W as ToolFinalEvent, X as ToolProgressEvent, Y as ToolResultBlock, Z as ToolStreamEvent, _ as ToolUseBlock, $ as Usage, a0 as WrongStackError, a1 as asBlocks, a2 as asText, a3 as extractRunEnv, a4 as isAgentError, a5 as isConfigError, a6 as isFsError, a7 as isImageBlock, a8 as isPluginError, a9 as isSessionError, aa as isTextBlock, ab as isThinkingBlock, ac as isToolError, ad as isToolResultBlock, ae as isToolUseBlock, af as isWrongStackError, ag as toWrongStackError, ah as wrapAsState } from './context-BRNbHmRM.js';
|
|
9
|
+
export { P as ProviderRunner, R as RunProviderOptions } from './provider-runner-BEpikbbN.js';
|
|
10
|
+
import { M as MCPServerConfig, a as Config } from './config-DoUAEvXH.js';
|
|
11
|
+
export { A as AutonomyConfig, C as CONTEXT_WINDOW_MODES, b as ConfigLoader, c as ConfigStore, d as ContextConfig, e as ContextWindowAggressiveOn, f as ContextWindowConfigLike, g as ContextWindowMode, h as ContextWindowModeId, i as ContextWindowPolicy, j as ContextWindowThresholds, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, L as LogConfig, P as PluginConfig, k as ProviderApiKey, l as ProviderConfig, T as ToolsConfig, m as formatContextWindowModeList, n as getContextWindowMode, o as isContextWindowModeId, p as listContextWindowModes, r as resolveContextWindowPolicy } from './config-DoUAEvXH.js';
|
|
12
|
+
export { C as CompactReport, a as Compactor } from './compactor-DVTKL7XD.js';
|
|
13
|
+
export { P as PermissionDecision, a as PermissionPolicy, S as SecretScrubber, T as TrustPolicy } from './secret-scrubber-DttNiGYA.js';
|
|
14
14
|
export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as SessionRewinder } from './session-rewinder-C9HnMkhP.js';
|
|
15
|
-
import { e as AttachmentStore, d as AttachmentRef, A as AddAttachmentInput } from './session-reader-
|
|
16
|
-
export { a as Attachment, b as AttachmentKind, c as AttachmentMeta, D as DefaultSessionReader } from './session-reader-
|
|
17
|
-
export { D as
|
|
18
|
-
export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from './secret-scrubber-
|
|
15
|
+
import { e as AttachmentStore, d as AttachmentRef, A as AddAttachmentInput } from './session-reader-CSWcb5Ga.js';
|
|
16
|
+
export { a as Attachment, b as AttachmentKind, c as AttachmentMeta, D as DefaultSessionReader } from './session-reader-CSWcb5Ga.js';
|
|
17
|
+
export { D as DEFAULT_AUTONOMY_CONFIG, a as DEFAULT_CONTEXT_CONFIG, b as DEFAULT_TOOLS_CONFIG } from './default-config-Uzla85H-.js';
|
|
18
|
+
export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from './secret-scrubber-QSeI0ADi.js';
|
|
19
19
|
export { D as DefaultLogger, a as DefaultLoggerOptions } from './logger-bOzkF5LL.js';
|
|
20
|
-
export { D as DefaultPathResolver, a as DefaultTokenCounter } from './path-resolver-
|
|
20
|
+
export { D as DefaultPathResolver, a as DefaultTokenCounter } from './path-resolver-TcJfc29Y.js';
|
|
21
21
|
import { b as MemoryStore } from './memory-CEXuo7sz.js';
|
|
22
22
|
export { M as MemoryEntry, a as MemoryScope } from './memory-CEXuo7sz.js';
|
|
23
|
-
export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, c as buildRecoveryStrategies } from './tool-executor-
|
|
23
|
+
export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, c as buildRecoveryStrategies } from './tool-executor-D7a00JVJ.js';
|
|
24
24
|
import { a as SkillLoader } from './skill-CxuWrsKK.js';
|
|
25
25
|
export { S as SkillEntry, b as SkillManifest } from './skill-CxuWrsKK.js';
|
|
26
26
|
export { I as InputReader, P as PromptOption } from './input-reader-E-ffP2ee.js';
|
|
27
|
-
import { u as SlashCommand, w as SystemPromptContributor, k as PluginAPI, n as PluginPipelines, C as ToolRegistryView, r as ProviderRegistryView, M as MCPRegistryView, v as SlashCommandRegistryView, E as ExtensionRegistry, S as SessionWriterView, j as MetricsSinkView, z as ToolRegistry, q as ProviderRegistry, P as Plugin } from './index-
|
|
28
|
-
export { A as AfterIterationHook, a as AfterRunHook, b as AfterToolExecutionHook, c as Agent, d as AgentExtension, e as AgentInit, f as AgentInput, g as AgentPipelines, B as BeforeIterationHook, h as BeforeRunHook, i as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, O as OnErrorHook, l as PluginCapabilities, m as PluginDependency, p as ProviderFactory, t as ProviderRunnerWrapper, R as RunResult, F as ToolWrapper, U as UserInputPayload, G as createDefaultPipelines } from './index-
|
|
27
|
+
import { u as SlashCommand, w as SystemPromptContributor, k as PluginAPI, n as PluginPipelines, C as ToolRegistryView, r as ProviderRegistryView, M as MCPRegistryView, v as SlashCommandRegistryView, E as ExtensionRegistry, S as SessionWriterView, j as MetricsSinkView, z as ToolRegistry, q as ProviderRegistry, P as Plugin } from './index-bOl8lzFV.js';
|
|
28
|
+
export { A as AfterIterationHook, a as AfterRunHook, b as AfterToolExecutionHook, c as Agent, d as AgentExtension, e as AgentInit, f as AgentInput, g as AgentPipelines, B as BeforeIterationHook, h as BeforeRunHook, i as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, O as OnErrorHook, l as PluginCapabilities, m as PluginDependency, p as ProviderFactory, t as ProviderRunnerWrapper, R as RunResult, F as ToolWrapper, U as UserInputPayload, G as createDefaultPipelines } from './index-bOl8lzFV.js';
|
|
29
29
|
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-OG_30xqZ.js';
|
|
30
30
|
import { c as ModeStore } from './mode-CV077NjV.js';
|
|
31
31
|
export { D as DEFAULT_MODES, M as Mode, a as ModeConfig, b as ModeManifest } from './mode-CV077NjV.js';
|
|
32
|
-
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-
|
|
33
|
-
export { c as BudgetExceededError, d as BudgetKind, e as BudgetLimits, j as BudgetUsage, C as CoordinatorEvents, k as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, l as MultiAgentCoordinator, S as SpawnResult, m as SubagentBudget, n as SubagentConfig, o as SubagentContext, p as SubagentError, q as SubagentErrorKind, r as SubagentRunContext, s as SubagentRunOutcome, t as SubagentRunner, T as TaskDelegation, u as TaskResult, v as TaskSpec } from './multi-agent-
|
|
32
|
+
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-DMVOX0cF.js';
|
|
33
|
+
export { c as BudgetExceededError, d as BudgetKind, e as BudgetLimits, j as BudgetUsage, C as CoordinatorEvents, k as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, l as MultiAgentCoordinator, S as SpawnResult, m as SubagentBudget, n as SubagentConfig, o as SubagentContext, p as SubagentError, q as SubagentErrorKind, r as SubagentRunContext, s as SubagentRunOutcome, t as SubagentRunner, T as TaskDelegation, u as TaskResult, v as TaskSpec } from './multi-agent-3ZnTB1aT.js';
|
|
34
34
|
import { l as TaskGraph, r as TaskType, n as TaskPriority, m as TaskNode } from './task-graph-D1YQbpxF.js';
|
|
35
35
|
export { C as CriticalPathResult, D as DEFAULT_SPEC_TEMPLATE, S as SpecAnalysis, a as SpecApiEndpoint, b as SpecRequirement, c as SpecSection, d as SpecSectionType, e as SpecStatus, f as SpecTemplate, g as SpecValidationResult, h as Specification, T as TaskAssignment, i as TaskDependency, j as TaskEdge, k as TaskFilter, o as TaskProgress, p as TaskSort, q as TaskStatus, s as computeTaskProgress, t as findCriticalPath, u as topologicalSort } from './task-graph-D1YQbpxF.js';
|
|
36
36
|
export { A as AggregateHealth, H as HealthCheck, a as HealthCheckResult, b as HealthRegistry, c as HealthStatus, M as MetricLabels, d as MetricSeries, e as MetricsSink, f as MetricsSnapshot, S as Span, T as Tracer } from './observability-BhnVLBLS.js';
|
|
37
37
|
export { AtomicWriteOptions, BuildChildEnvOptions, CompileFail, CompileResult, MessageRepairReport, MessageRepairResult, NewlineStyle, RequestTokenBreakdown, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, atomicWrite, buildChildEnv, color, compileGlob, compileUserRegex, createToolOutputSerializer, detectNewlineStyle, ensureDir, estimateRequestTokens, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, formatTodosList, matchAny, matchGlob, normalizeToLf, repairToolUseAdjacency, safeParse, safeStringify, sanitizeJsonString, stripAnsi, toStyle, unifiedDiff, validateAgainstSchema } from './utils/index.js';
|
|
38
38
|
export { W as WstackPathOptions, a as WstackPaths, p as projectHash, r as resolveWstackPaths } from './wstack-paths-CJYrjQU8.js';
|
|
39
|
-
export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, M as MemoryStoreOptions, j as MigrationContext, k as MigrationResult, P as PersistedQueueItem, l as PlanFile, m as PlanItem, n as PlanTemplate, Q as QueueStore, R as RecoveryLock, o as RecoveryLockOptions, S as SessionAnalyzer, p as SessionStoreOptions, T as TodosCheckpointFile, q as addPlanItem, r as attachPlanCheckpoint, s as attachTodosCheckpoint, t as clearPlan, u as deriveTodosFromPlanItem, v as emptyPlan, w as formatPlan, x as formatPlanTemplates, y as getPlanTemplate, z as listPlanTemplates, B as loadPlan, E as loadTodosCheckpoint, F as removePlanItem, G as runConfigMigrations, H as savePlan, I as saveTodosCheckpoint, J as setPlanItemStatus } from './plan-templates-
|
|
39
|
+
export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, M as MemoryStoreOptions, j as MigrationContext, k as MigrationResult, P as PersistedQueueItem, l as PlanFile, m as PlanItem, n as PlanTemplate, Q as QueueStore, R as RecoveryLock, o as RecoveryLockOptions, S as SessionAnalyzer, p as SessionStoreOptions, T as TodosCheckpointFile, q as addPlanItem, r as attachPlanCheckpoint, s as attachTodosCheckpoint, t as clearPlan, u as deriveTodosFromPlanItem, v as emptyPlan, w as formatPlan, x as formatPlanTemplates, y as getPlanTemplate, z as listPlanTemplates, B as loadPlan, E as loadTodosCheckpoint, F as removePlanItem, G as runConfigMigrations, H as savePlan, I as saveTodosCheckpoint, J as setPlanItemStatus } from './plan-templates-ByT1HcRI.js';
|
|
40
40
|
export { D as DirectorStateCheckpoint, a as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from './director-state-BmYi3DGA.js';
|
|
41
|
-
export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from './permission-policy-
|
|
41
|
+
export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from './permission-policy-BpCGYBud.js';
|
|
42
42
|
export { AutoCompactionMiddleware, AutonomousRunner, AutonomousRunnerOptions, AutonomyPromptContributorOptions, DefaultSkillLoader, DoneCheckResult, DoneConditionChecker, EternalAutonomyEngine, EternalAutonomyOptions, EternalEngineState, IntelligentCompactor, IntelligentCompactorOptions, ParallelEngineState, ParallelEternalEngine, ParallelEternalOptions, SelectiveCompactor, SelectiveCompactorOptions, SkillLoaderOptions, buildGoalPreamble, makeAutonomyPromptContributor } from './execution/index.js';
|
|
43
43
|
export { DefaultProviderRunner } from './defaults/index.js';
|
|
44
|
-
export { a as AGENTS_BY_PHASE, b as AGENT_CATALOG, c as ALL_AGENT_DEFINITIONS, d as ALL_FLEET_AGENTS, e as AUDIT_LOG_AGENT, f as AutoExtendCeiling, g as AutoExtendPolicy, B as BUG_HUNTER_AGENT, C as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, h as DEFAULT_SUBAGENT_BASELINE, i as DelegateHost, j as Director, k as DirectorPromptParts, l as DirectorSessionFactory, m as DirectorSessionFactoryOptions, F as FLEET_ROSTER, n as FLEET_ROSTER_BUDGETS, q as FleetManager, r as FleetManagerOptions, s as FleetRosterBudget, t as FleetSpawnBudgetError, I as ICoordinator, u as IFleetManager, N as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, v as SubagentPromptParts, w as applyRosterBudget, x as attachAutoExtend, y as composeDirectorPrompt, z as composeSubagentPrompt, E as createDelegateTool, G as getAgentDefinition, H as makeDirectorSessionFactory, J as rosterSummaryFromConfigs } from './null-fleet-bus-
|
|
45
|
-
export { A as AgentBudgetTier, a as AgentCapability, b as AgentDefinition, c as AgentPhase, D as DEFAULT_DISPATCH_ROLE, d as DefaultMultiAgentCoordinator, e as DispatchCandidate, f as DispatchClassifier, g as DispatchMethod, h as DispatchOptions, i as DispatchResult, j as MultiAgentCoordinatorOptions, k as dispatchAgent, m as makeLLMClassifier, s as scoreAgents } from './multi-agent-coordinator-
|
|
46
|
-
export { A as AgentFactory, a as AgentFactoryResult, b as AgentRunnerOptions, F as FleetBus, c as FleetEvent, d as FleetHandler, e as FleetUsage, f as FleetUsageAggregator, S as SubagentUsageSnapshot, m as makeAgentSubagentRunner } from './agent-subagent-runner-
|
|
44
|
+
export { a as AGENTS_BY_PHASE, b as AGENT_CATALOG, c as ALL_AGENT_DEFINITIONS, d as ALL_FLEET_AGENTS, e as AUDIT_LOG_AGENT, f as AutoExtendCeiling, g as AutoExtendPolicy, B as BUG_HUNTER_AGENT, C as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, h as DEFAULT_SUBAGENT_BASELINE, i as DelegateHost, j as Director, k as DirectorPromptParts, l as DirectorSessionFactory, m as DirectorSessionFactoryOptions, F as FLEET_ROSTER, n as FLEET_ROSTER_BUDGETS, q as FleetManager, r as FleetManagerOptions, s as FleetRosterBudget, t as FleetSpawnBudgetError, I as ICoordinator, u as IFleetManager, N as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, v as SubagentPromptParts, w as applyRosterBudget, x as attachAutoExtend, y as composeDirectorPrompt, z as composeSubagentPrompt, E as createDelegateTool, G as getAgentDefinition, H as makeDirectorSessionFactory, J as rosterSummaryFromConfigs } from './null-fleet-bus-C1grTnOF.js';
|
|
45
|
+
export { A as AgentBudgetTier, a as AgentCapability, b as AgentDefinition, c as AgentPhase, D as DEFAULT_DISPATCH_ROLE, d as DefaultMultiAgentCoordinator, e as DispatchCandidate, f as DispatchClassifier, g as DispatchMethod, h as DispatchOptions, i as DispatchResult, j as MultiAgentCoordinatorOptions, k as dispatchAgent, m as makeLLMClassifier, s as scoreAgents } from './multi-agent-coordinator-COwCGIrU.js';
|
|
46
|
+
export { A as AgentFactory, a as AgentFactoryResult, b as AgentRunnerOptions, F as FleetBus, c as FleetEvent, d as FleetHandler, e as FleetUsage, f as FleetUsageAggregator, S as SubagentUsageSnapshot, m as makeAgentSubagentRunner } from './agent-subagent-runner-R0I0Xusn.js';
|
|
47
47
|
export { DefaultModeStore, LLMSelector, LLMSelectorOptions, ModeLoaderOptions, loadProjectModes, loadUserModes } from './models/index.js';
|
|
48
48
|
import { TaskStore } from './sdd/index.js';
|
|
49
49
|
export { AISpecBuilder, AISpecBuilderOptions, AISpecPhase, AISpecSession, AutoExecutor, AutoExecutorOptions, BottleneckTask, CollectedAnswer, CriticalPathAnalysis, DefaultTaskStore, ExecutionSummary, GeneratedTask, SPEC_TEMPLATES, SddParallelRun, SddParallelRunOptions, SddProgress, SddTaskDecomposer, SddTaskDecomposerOptions, SpecDiff, SpecDrivenDev, SpecDrivenDevOptions, SpecIndexEntry, SpecParser, SpecStore, SpecStoreOptions, SpecVersion, SpecVersioning, TaskBatch, TaskExecutionContext, TaskExecutionResult, TaskFlow, TaskFlowEventMap, TaskFlowEventName, TaskFlowExecutionContext, TaskFlowOptions, TaskFlowPhase, TaskGenerator, TaskGeneratorOptions, TaskGraphIndexEntry, TaskGraphStore, TaskGraphStoreOptions, TaskTracker, TaskTrackerOptions, TaskTransition, WaveResult, analyzeCriticalPath, createAutoExecutor, getTemplate, listTemplates, renderProgress, renderSpecAnalysis, renderTaskGraph, renderTaskList, templateToMarkdown } from './sdd/index.js';
|
|
50
50
|
export { DefaultHealthRegistry, InMemoryMetricsSink, MetricsServerHandle, MetricsServerOptions, NoopMetricsSink, NoopTracer, OTelTracer, OtlpMetricsExporterHandle, OtlpMetricsExporterOptions, OtlpTraceExporterHandle, OtlpTraceExporterOptions, PROMETHEUS_CONTENT_TYPE, buildOtlpMetricsRequest, buildOtlpTracesRequest, renderPrometheus, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, wireMetricsToEvents } from './observability/index.js';
|
|
51
|
-
export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, p as slackServer, z as zaiVisionServer } from './mcp-servers-
|
|
51
|
+
export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, p as slackServer, z as zaiVisionServer } from './mcp-servers-jEoMIBZv.js';
|
|
52
52
|
export { DownloadResult, InstallResult, InstalledSkillEntry, ManifestData, ParsedRef, SkillInstaller, SkillInstallerOptions, SkillManifestStore, UpdateResult, downloadGitHubTarball, parseSkillRef } from './skills/index.js';
|
|
53
53
|
export { DefaultSessionRewinder, SessionRewinderOptions } from './storage/index.js';
|
|
54
54
|
export { G as GoalFile, J as JournalEntry, M as MAX_JOURNAL_ENTRIES, a as appendJournal, e as emptyGoal, f as formatGoal, g as goalFilePath, l as loadGoal, s as saveGoal, b as summarizeUsage } from './goal-store-C7jcumEh.js';
|
|
55
|
-
import { a as RetryPolicy, E as ErrorHandler } from './retry-policy-
|
|
55
|
+
import { a as RetryPolicy, E as ErrorHandler } from './retry-policy-BYkq0ugs.js';
|
|
56
56
|
import { a as Logger } from './logger-DDd5C--Z.js';
|
|
57
57
|
export { L as LogLevel } from './logger-DDd5C--Z.js';
|
|
58
58
|
export { M as ModelsDevPayload, a as ModelsDevProvider, b as ModelsRegistry, R as ResolvedModel, c as ResolvedProvider, W as WireFamily } from './models-registry-BcYJDKLm.js';
|
|
59
59
|
export { S as SecretVault } from './secret-vault-DoISxaKO.js';
|
|
60
60
|
import './path-resolver-CPRj4bFY.js';
|
|
61
|
-
import './selector-
|
|
61
|
+
import './selector-pox8abg0.js';
|
|
62
62
|
import 'node:events';
|
|
63
63
|
|
|
64
64
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1021,6 +1021,9 @@ var DEFAULT_CONTEXT_CONFIG = Object.freeze({
|
|
|
1021
1021
|
preserveK: 10,
|
|
1022
1022
|
eliseThreshold: 2e3
|
|
1023
1023
|
});
|
|
1024
|
+
var DEFAULT_AUTONOMY_CONFIG = Object.freeze({
|
|
1025
|
+
autoProceedDelayMs: 45e3
|
|
1026
|
+
});
|
|
1024
1027
|
|
|
1025
1028
|
// src/types/secret-vault.ts
|
|
1026
1029
|
var ENCRYPTED_PREFIX = "enc:v1:";
|
|
@@ -2061,7 +2064,10 @@ var PATTERNS = [
|
|
|
2061
2064
|
type: "bearer_token",
|
|
2062
2065
|
// Anchored with alternation instead of negative lookahead — avoids V8
|
|
2063
2066
|
// backtracking risk on adversarial input. Bounded at 512 chars.
|
|
2064
|
-
|
|
2067
|
+
// Min 12 chars: some OAuth providers issue shorter-lived tokens (< 20
|
|
2068
|
+
// chars). A 12-char base64 string has ~71 bits of entropy — above the
|
|
2069
|
+
// threshold where random strings are unlikely to produce false matches.
|
|
2070
|
+
regex: /(?:^|[^A-Za-z0-9_.~+/-])Bearer\s+[A-Za-z0-9._~+/-]{12,512}=*(?:$|[^A-Za-z0-9_.~+/-])/g
|
|
2065
2071
|
},
|
|
2066
2072
|
{
|
|
2067
2073
|
type: "high_entropy_env",
|
|
@@ -4125,24 +4131,30 @@ var DefaultSessionStore = class {
|
|
|
4125
4131
|
this.dir = opts.dir;
|
|
4126
4132
|
this.events = opts.events;
|
|
4127
4133
|
}
|
|
4128
|
-
|
|
4134
|
+
/** Join session ID to its absolute path within the store directory. */
|
|
4135
|
+
sessionPath(id, ext) {
|
|
4136
|
+
return path6.join(this.dir, `${id}${ext}`);
|
|
4137
|
+
}
|
|
4138
|
+
async ensureShardDir(_id) {
|
|
4129
4139
|
await ensureDir(this.dir);
|
|
4140
|
+
return this.dir;
|
|
4141
|
+
}
|
|
4142
|
+
async create(meta) {
|
|
4130
4143
|
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
4131
4144
|
const id = meta.id ?? `${startedAt.replace(/[:.]/g, "-")}-${randomBytes(2).toString("hex")}`;
|
|
4132
|
-
const
|
|
4145
|
+
const shardDir = await this.ensureShardDir(id);
|
|
4146
|
+
const file = path6.join(shardDir, `${id}.jsonl`);
|
|
4133
4147
|
let handle;
|
|
4134
4148
|
try {
|
|
4135
4149
|
handle = await fsp2.open(file, "a", 384);
|
|
4136
4150
|
} catch (err) {
|
|
4137
4151
|
throw new Error(
|
|
4138
4152
|
`Failed to open session file: ${err instanceof Error ? err.message : String(err)}`,
|
|
4139
|
-
{
|
|
4140
|
-
cause: err
|
|
4141
|
-
}
|
|
4153
|
+
{ cause: err }
|
|
4142
4154
|
);
|
|
4143
4155
|
}
|
|
4144
4156
|
try {
|
|
4145
|
-
return new FileSessionWriter(id, handle, startedAt, meta, this.events, { dir:
|
|
4157
|
+
return new FileSessionWriter(id, handle, startedAt, meta, this.events, { dir: shardDir, filePath: file });
|
|
4146
4158
|
} catch (err) {
|
|
4147
4159
|
await handle.close().catch(() => {
|
|
4148
4160
|
});
|
|
@@ -4150,15 +4162,7 @@ var DefaultSessionStore = class {
|
|
|
4150
4162
|
}
|
|
4151
4163
|
}
|
|
4152
4164
|
async resume(id) {
|
|
4153
|
-
const file =
|
|
4154
|
-
try {
|
|
4155
|
-
await fsp2.access(file, fsp2.constants.R_OK);
|
|
4156
|
-
} catch {
|
|
4157
|
-
throw new Error(
|
|
4158
|
-
`Session "${id}" not found \u2014 the session file does not exist or was deleted.`,
|
|
4159
|
-
{ cause: new Error("ENOENT") }
|
|
4160
|
-
);
|
|
4161
|
-
}
|
|
4165
|
+
const file = this.sessionPath(id, ".jsonl");
|
|
4162
4166
|
const data = await this.load(id);
|
|
4163
4167
|
let handle;
|
|
4164
4168
|
try {
|
|
@@ -4190,7 +4194,7 @@ var DefaultSessionStore = class {
|
|
|
4190
4194
|
}
|
|
4191
4195
|
}
|
|
4192
4196
|
async load(id) {
|
|
4193
|
-
const file =
|
|
4197
|
+
const file = this.sessionPath(id, ".jsonl");
|
|
4194
4198
|
const raw = await fsp2.readFile(file, "utf8");
|
|
4195
4199
|
const lines = raw.split("\n").filter((l) => l.trim());
|
|
4196
4200
|
const events = [];
|
|
@@ -4210,8 +4214,7 @@ var DefaultSessionStore = class {
|
|
|
4210
4214
|
async list(limit = 20) {
|
|
4211
4215
|
try {
|
|
4212
4216
|
await ensureDir(this.dir);
|
|
4213
|
-
const
|
|
4214
|
-
const ids = files.filter((f) => f.endsWith(".jsonl")).map((f) => f.replace(/\.jsonl$/, ""));
|
|
4217
|
+
const ids = await this.collectSessionIds(this.dir);
|
|
4215
4218
|
const sessions = await Promise.all(ids.map((id) => this.summaryFor(id).catch(() => null)));
|
|
4216
4219
|
const out = sessions.filter((s) => s !== null);
|
|
4217
4220
|
out.sort((a, b) => {
|
|
@@ -4224,13 +4227,27 @@ var DefaultSessionStore = class {
|
|
|
4224
4227
|
return [];
|
|
4225
4228
|
}
|
|
4226
4229
|
}
|
|
4230
|
+
/** Recursively collect all session IDs from shard subdirectories. */
|
|
4231
|
+
async collectSessionIds(dir) {
|
|
4232
|
+
const ids = [];
|
|
4233
|
+
const entries = await fsp2.readdir(dir, { withFileTypes: true });
|
|
4234
|
+
for (const entry of entries) {
|
|
4235
|
+
const full = path6.join(dir, entry.name);
|
|
4236
|
+
if (entry.isDirectory()) {
|
|
4237
|
+
ids.push(...await this.collectSessionIds(full));
|
|
4238
|
+
} else if (entry.isFile() && entry.name.endsWith(".jsonl")) {
|
|
4239
|
+
ids.push(entry.name.replace(/\.jsonl$/, ""));
|
|
4240
|
+
}
|
|
4241
|
+
}
|
|
4242
|
+
return ids;
|
|
4243
|
+
}
|
|
4227
4244
|
async summaryFor(id) {
|
|
4228
|
-
const manifest =
|
|
4245
|
+
const manifest = this.sessionPath(id, ".summary.json");
|
|
4229
4246
|
try {
|
|
4230
4247
|
const raw = await fsp2.readFile(manifest, "utf8");
|
|
4231
4248
|
return JSON.parse(raw);
|
|
4232
4249
|
} catch {
|
|
4233
|
-
const full =
|
|
4250
|
+
const full = this.sessionPath(id, ".jsonl");
|
|
4234
4251
|
const stat8 = await fsp2.stat(full);
|
|
4235
4252
|
const summary = await this.summarize(id, stat8.mtime.toISOString());
|
|
4236
4253
|
await atomicWrite(manifest, JSON.stringify(summary), { mode: 384 }).catch((err) => {
|
|
@@ -4243,12 +4260,13 @@ var DefaultSessionStore = class {
|
|
|
4243
4260
|
}
|
|
4244
4261
|
}
|
|
4245
4262
|
async delete(id) {
|
|
4246
|
-
await fsp2.unlink(
|
|
4247
|
-
await fsp2.unlink(
|
|
4263
|
+
await fsp2.unlink(this.sessionPath(id, ".jsonl"));
|
|
4264
|
+
await fsp2.unlink(this.sessionPath(id, ".summary.json")).catch(() => void 0);
|
|
4248
4265
|
}
|
|
4249
4266
|
async clearHistory(id) {
|
|
4250
|
-
|
|
4251
|
-
const
|
|
4267
|
+
await this.ensureShardDir(id);
|
|
4268
|
+
const file = this.sessionPath(id, ".jsonl");
|
|
4269
|
+
const meta = this.sessionPath(id, ".summary.json");
|
|
4252
4270
|
const record = `${JSON.stringify({
|
|
4253
4271
|
type: "session_start",
|
|
4254
4272
|
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -4292,7 +4310,8 @@ var DefaultSessionStore = class {
|
|
|
4292
4310
|
startedAt: start?.ts ?? (/* @__PURE__ */ new Date(0)).toISOString(),
|
|
4293
4311
|
endedAt: end?.ts,
|
|
4294
4312
|
model: start?.model,
|
|
4295
|
-
provider: start?.provider
|
|
4313
|
+
provider: start?.provider,
|
|
4314
|
+
pendingToolUses: end?.pendingToolUses
|
|
4296
4315
|
};
|
|
4297
4316
|
}
|
|
4298
4317
|
replay(events, sessionId = "unknown") {
|
|
@@ -4392,9 +4411,6 @@ var FileSessionWriter = class {
|
|
|
4392
4411
|
tokenIn = 0;
|
|
4393
4412
|
tokenOut = 0;
|
|
4394
4413
|
filePath;
|
|
4395
|
-
/** Public accessor for the JSONL path — required by SessionWriter so
|
|
4396
|
-
* observability surfaces (`/fleet log`, FleetPanel) can locate the
|
|
4397
|
-
* transcript without recomputing the path from session metadata. */
|
|
4398
4414
|
get transcriptPath() {
|
|
4399
4415
|
return this.filePath || void 0;
|
|
4400
4416
|
}
|
|
@@ -4402,13 +4418,16 @@ var FileSessionWriter = class {
|
|
|
4402
4418
|
resumed;
|
|
4403
4419
|
appendFailCount = 0;
|
|
4404
4420
|
lastAppendWarnAt = 0;
|
|
4405
|
-
// Rewind support: track pending file changes and prompt index
|
|
4406
4421
|
promptIndex = 0;
|
|
4407
4422
|
pendingFileSnapshots = [];
|
|
4408
|
-
|
|
4423
|
+
/** Tracks open tool_use IDs during the current run to serialize on close for resume. */
|
|
4424
|
+
openToolUses = /* @__PURE__ */ new Set();
|
|
4409
4425
|
recordFileChange(input) {
|
|
4410
4426
|
this.pendingFileSnapshots.push(input);
|
|
4411
4427
|
}
|
|
4428
|
+
get pendingToolUses() {
|
|
4429
|
+
return Array.from(this.openToolUses);
|
|
4430
|
+
}
|
|
4412
4431
|
async writeSessionStartLazy() {
|
|
4413
4432
|
const record = `${JSON.stringify({
|
|
4414
4433
|
type: this.resumed ? "session_resumed" : "session_start",
|
|
@@ -4451,13 +4470,12 @@ var FileSessionWriter = class {
|
|
|
4451
4470
|
}
|
|
4452
4471
|
}
|
|
4453
4472
|
}
|
|
4454
|
-
/**
|
|
4455
|
-
* Watch events as they're appended and keep the summary state hot, so
|
|
4456
|
-
* `close()` can flush a `<id>.summary.json` manifest without re-reading
|
|
4457
|
-
* the JSONL. `list()` reads only manifests, turning a per-session full
|
|
4458
|
-
* parse into a single stat+read.
|
|
4459
|
-
*/
|
|
4460
4473
|
observeForSummary(event) {
|
|
4474
|
+
if (event.type === "tool_use") {
|
|
4475
|
+
this.openToolUses.add(event.id);
|
|
4476
|
+
} else if (event.type === "tool_result") {
|
|
4477
|
+
this.openToolUses.delete(event.id);
|
|
4478
|
+
}
|
|
4461
4479
|
if (event.type === "user_input" && this.summary.title === "(empty session)") {
|
|
4462
4480
|
this.summary = { ...this.summary, title: userInputTitle(event.content) };
|
|
4463
4481
|
} else if (event.type === "llm_response") {
|
|
@@ -4551,7 +4569,16 @@ var FileSessionWriter = class {
|
|
|
4551
4569
|
}
|
|
4552
4570
|
}
|
|
4553
4571
|
const truncated = kept.join("\n");
|
|
4554
|
-
|
|
4572
|
+
const tmpPath = `${this.filePath}.rewind.tmp`;
|
|
4573
|
+
await fsp2.writeFile(tmpPath, truncated + "\n", "utf8");
|
|
4574
|
+
try {
|
|
4575
|
+
await this.handle.close();
|
|
4576
|
+
await fsp2.rename(tmpPath, this.filePath);
|
|
4577
|
+
this.handle = await fsp2.open(this.filePath, "a", 384);
|
|
4578
|
+
} catch (err) {
|
|
4579
|
+
await fsp2.unlink(tmpPath).catch(() => void 0);
|
|
4580
|
+
throw err;
|
|
4581
|
+
}
|
|
4555
4582
|
await this.append({
|
|
4556
4583
|
type: "rewound",
|
|
4557
4584
|
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -5244,7 +5271,10 @@ var DefaultConfigLoader = class {
|
|
|
5244
5271
|
}
|
|
5245
5272
|
if (c.mode !== void 0 && !isContextWindowModeId(c.mode)) {
|
|
5246
5273
|
const known = listContextWindowModes().map((m) => m.id).join(", ");
|
|
5247
|
-
|
|
5274
|
+
console.warn(
|
|
5275
|
+
`[config] Ignoring unknown context.mode "${c.mode}" (expected one of: ${known}); falling back to "${DEFAULT_CONTEXT_WINDOW_MODE_ID}".`
|
|
5276
|
+
);
|
|
5277
|
+
c.mode = DEFAULT_CONTEXT_WINDOW_MODE_ID;
|
|
5248
5278
|
}
|
|
5249
5279
|
}
|
|
5250
5280
|
validateIdentity(cfg) {
|
|
@@ -6165,7 +6195,7 @@ var DefaultPermissionPolicy = class {
|
|
|
6165
6195
|
return { permission: "auto", source: "context", reason: "file already read in this session" };
|
|
6166
6196
|
}
|
|
6167
6197
|
}
|
|
6168
|
-
if (tool.permission === "auto") {
|
|
6198
|
+
if (tool.permission === "auto" && !tool.mutating) {
|
|
6169
6199
|
return { permission: "auto", source: "default" };
|
|
6170
6200
|
}
|
|
6171
6201
|
if (this.promptDelegate) {
|
|
@@ -20793,7 +20823,7 @@ function createMcpControlTool(opts) {
|
|
|
20793
20823
|
description: "Manage MCP server lifecycle: list available servers, search by name or capability, enable or disable servers at runtime, restart running servers.",
|
|
20794
20824
|
category: "mcp",
|
|
20795
20825
|
permission: "auto",
|
|
20796
|
-
mutating:
|
|
20826
|
+
mutating: true,
|
|
20797
20827
|
riskTier: "standard",
|
|
20798
20828
|
inputSchema,
|
|
20799
20829
|
async execute(raw, ctx) {
|
|
@@ -24897,6 +24927,6 @@ function assertSafePath(dir, projectRoot) {
|
|
|
24897
24927
|
}
|
|
24898
24928
|
}
|
|
24899
24929
|
|
|
24900
|
-
export { AGENTS_BY_PHASE, AGENT_CATALOG, AISpecBuilder, ALL_AGENT_DEFINITIONS, ALL_FLEET_AGENTS, AUDIT_LOG_AGENT, Agent, AgentError, AutoApprovePermissionPolicy, AutoCompactionMiddleware, AutoExecutor, AutoPhasePlanner, AutoPhaseRunner, AutonomousRunner, BUG_HUNTER_AGENT, BudgetExceededError, CONTEXT_WINDOW_MODES, CheckpointManager, ConfigError, ConfigMigrationError, Container, Context, ConversationState, DEFAULT_CONFIG_MIGRATIONS, DEFAULT_CONTEXT_CONFIG, DEFAULT_CONTEXT_WINDOW_MODE_ID, DEFAULT_DIRECTOR_PREAMBLE, DEFAULT_DISPATCH_ROLE, DEFAULT_MAX_ITERATIONS, DEFAULT_MODES, DEFAULT_RECOVERY_STRATEGIES, DEFAULT_SPEC_TEMPLATE, DEFAULT_SUBAGENT_BASELINE, DEFAULT_TOOLS_CONFIG, DefaultAttachmentStore, DefaultConfigLoader, DefaultConfigStore, DefaultErrorHandler, DefaultHealthRegistry, DefaultLogger, DefaultMemoryStore, DefaultModeStore, DefaultModelsRegistry, DefaultMultiAgentCoordinator, DefaultPathResolver, DefaultPermissionPolicy, DefaultPluginAPI, DefaultProviderRunner, DefaultRetryPolicy, DefaultSecretScrubber, DefaultSecretVault, DefaultSessionReader, DefaultSessionRewinder, DefaultSessionStore, DefaultSkillLoader, DefaultSystemPromptBuilder, DefaultTaskStore, DefaultTokenCounter, Director, DirectorStateCheckpoint, DoneConditionChecker, ERROR_CODES, EternalAutonomyEngine, EventBus, ExtensionRegistry, FLEET_ROSTER, FLEET_ROSTER_BUDGETS, FleetBus, FleetManager, FleetSpawnBudgetError, FleetUsageAggregator, FsError, GitignoreUpdater, HybridCompactor, InMemoryAgentBridge, InMemoryBridgeTransport, InMemoryMetricsSink, InputBuilder, IntelligentCompactor, KERNEL_API_VERSION, LAYER_1_IDENTITY, LLMSelector, MAX_JOURNAL_ENTRIES, NULL_FLEET_BUS, NoopMetricsSink, NoopTracer, OTelTracer, PROMETHEUS_CONTENT_TYPE, ParallelEternalEngine, PhaseGraphBuilder, PhaseOrchestrator, PhaseStore, Pipeline, PluginError, ProviderError, ProviderRegistry, QueueStore, REFACTOR_PLANNER_AGENT, RecoveryLock, ReportGenerator, RunController, SECURITY_SCANNER_AGENT, SPEC_TEMPLATES, ScopedEventBus, SddParallelRun, SddTaskDecomposer, SecurityScanner, SecurityScannerOrchestrator, SelectiveCompactor, SessionAnalyzer, SessionError, SkillGenerator, SkillInstaller, SkillManifestStore, SlashCommandRegistry, SpecDrivenDev, SpecParser, SpecStore, SpecVersioning, SubagentBudget, TOKENS, TaskFlow, TaskGenerator, TaskGraphStore, TaskTracker, TechStackDetector, ToolError, ToolExecutor, ToolRegistry, WorktreeManager, WrongStackError, addPlanItem, allServers, analyzeCriticalPath, appendJournal, applyRosterBudget, asBlocks, asText, assertSafePath, atomicWrite, attachAutoExtend, attachPlanCheckpoint, attachTodosCheckpoint, awsServer, blockServer, braveSearchServer, buildBtwBlock, buildChildEnv, buildGoalPreamble, buildOtlpMetricsRequest, buildOtlpTracesRequest, buildRecoveryStrategies, classifyFamily, clearPlan, color, compileGlob, compileUserRegex, composeDirectorPrompt, composeSubagentPrompt, computeTaskProgress, consumeBtwNotes, context7Server, contextManagerTool, createAutoExecutor, createAutoPhaseFromTaskGraph, createContextManagerTool, createDefaultPipelines, createDelegateTool, createMcpControlTool, createMessage, createSecuritySlashCommand, createToolOutputSerializer, decryptConfigSecrets, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, deriveTodosFromPlanItem, detectNewlineStyle, dispatchAgent, downloadGitHubTarball, emptyGoal, emptyPlan, encryptConfigSecrets, ensureDir, estimateRequestTokens, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, everArtServer, extractRunEnv, filesystemServer, findCriticalPath, formatContextWindowModeList, formatGoal, formatPlan, formatPlanTemplates, formatTodosList, getAgentDefinition, getContextWindowMode, getPlanTemplate, getTemplate, githubServer, goalFilePath, googleMapsServer, isAgentError, isConfigError, isContextWindowModeId, isFsError, isImageBlock, isPluginError, isSessionError, isTextBlock, isThinkingBlock, isToolError, isToolResultBlock, isToolUseBlock, isWrongStackError, listContextWindowModes, listPlanTemplates, listTemplates, loadDirectorState, loadGoal, loadPlan, loadPlugins, loadProjectModes, loadTodosCheckpoint, loadUserModes, makeAgentSubagentRunner, makeAutonomyPromptContributor, makeContinueToNextIterationTool, makeDirectorSessionFactory, makeLLMClassifier, matchAny, matchGlob, migratePlaintextSecrets, miniMaxVisionServer, normalizeToLf, parseContinueDirective, parseSkillRef, pendingBtwCount, projectHash, removePlanItem, renderProgress, renderPrometheus, renderSpecAnalysis, renderTaskGraph, renderTaskList, repairToolUseAdjacency, resolveContextWindowPolicy, resolveWstackPaths, rewriteConfigEncrypted, rosterSummaryFromConfigs, runConfigMigrations, safeParse, safeStringify, sanitizeJsonString, saveGoal, savePlan, saveTodosCheckpoint, scoreAgents, securitySlashCommand, sentinelServer, setBtwNote, setPlanItemStatus, slackServer, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, stripAnsi, summarizeUsage, templateToMarkdown, toStyle, toWrongStackError, topologicalSort, unifiedDiff, unloadPlugins, validateAgainstSchema, wireMetricsToEvents, wrapAsState, zaiVisionServer };
|
|
24930
|
+
export { AGENTS_BY_PHASE, AGENT_CATALOG, AISpecBuilder, ALL_AGENT_DEFINITIONS, ALL_FLEET_AGENTS, AUDIT_LOG_AGENT, Agent, AgentError, AutoApprovePermissionPolicy, AutoCompactionMiddleware, AutoExecutor, AutoPhasePlanner, AutoPhaseRunner, AutonomousRunner, BUG_HUNTER_AGENT, BudgetExceededError, CONTEXT_WINDOW_MODES, CheckpointManager, ConfigError, ConfigMigrationError, Container, Context, ConversationState, DEFAULT_AUTONOMY_CONFIG, DEFAULT_CONFIG_MIGRATIONS, DEFAULT_CONTEXT_CONFIG, DEFAULT_CONTEXT_WINDOW_MODE_ID, DEFAULT_DIRECTOR_PREAMBLE, DEFAULT_DISPATCH_ROLE, DEFAULT_MAX_ITERATIONS, DEFAULT_MODES, DEFAULT_RECOVERY_STRATEGIES, DEFAULT_SPEC_TEMPLATE, DEFAULT_SUBAGENT_BASELINE, DEFAULT_TOOLS_CONFIG, DefaultAttachmentStore, DefaultConfigLoader, DefaultConfigStore, DefaultErrorHandler, DefaultHealthRegistry, DefaultLogger, DefaultMemoryStore, DefaultModeStore, DefaultModelsRegistry, DefaultMultiAgentCoordinator, DefaultPathResolver, DefaultPermissionPolicy, DefaultPluginAPI, DefaultProviderRunner, DefaultRetryPolicy, DefaultSecretScrubber, DefaultSecretVault, DefaultSessionReader, DefaultSessionRewinder, DefaultSessionStore, DefaultSkillLoader, DefaultSystemPromptBuilder, DefaultTaskStore, DefaultTokenCounter, Director, DirectorStateCheckpoint, DoneConditionChecker, ERROR_CODES, EternalAutonomyEngine, EventBus, ExtensionRegistry, FLEET_ROSTER, FLEET_ROSTER_BUDGETS, FleetBus, FleetManager, FleetSpawnBudgetError, FleetUsageAggregator, FsError, GitignoreUpdater, HybridCompactor, InMemoryAgentBridge, InMemoryBridgeTransport, InMemoryMetricsSink, InputBuilder, IntelligentCompactor, KERNEL_API_VERSION, LAYER_1_IDENTITY, LLMSelector, MAX_JOURNAL_ENTRIES, NULL_FLEET_BUS, NoopMetricsSink, NoopTracer, OTelTracer, PROMETHEUS_CONTENT_TYPE, ParallelEternalEngine, PhaseGraphBuilder, PhaseOrchestrator, PhaseStore, Pipeline, PluginError, ProviderError, ProviderRegistry, QueueStore, REFACTOR_PLANNER_AGENT, RecoveryLock, ReportGenerator, RunController, SECURITY_SCANNER_AGENT, SPEC_TEMPLATES, ScopedEventBus, SddParallelRun, SddTaskDecomposer, SecurityScanner, SecurityScannerOrchestrator, SelectiveCompactor, SessionAnalyzer, SessionError, SkillGenerator, SkillInstaller, SkillManifestStore, SlashCommandRegistry, SpecDrivenDev, SpecParser, SpecStore, SpecVersioning, SubagentBudget, TOKENS, TaskFlow, TaskGenerator, TaskGraphStore, TaskTracker, TechStackDetector, ToolError, ToolExecutor, ToolRegistry, WorktreeManager, WrongStackError, addPlanItem, allServers, analyzeCriticalPath, appendJournal, applyRosterBudget, asBlocks, asText, assertSafePath, atomicWrite, attachAutoExtend, attachPlanCheckpoint, attachTodosCheckpoint, awsServer, blockServer, braveSearchServer, buildBtwBlock, buildChildEnv, buildGoalPreamble, buildOtlpMetricsRequest, buildOtlpTracesRequest, buildRecoveryStrategies, classifyFamily, clearPlan, color, compileGlob, compileUserRegex, composeDirectorPrompt, composeSubagentPrompt, computeTaskProgress, consumeBtwNotes, context7Server, contextManagerTool, createAutoExecutor, createAutoPhaseFromTaskGraph, createContextManagerTool, createDefaultPipelines, createDelegateTool, createMcpControlTool, createMessage, createSecuritySlashCommand, createToolOutputSerializer, decryptConfigSecrets, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, deriveTodosFromPlanItem, detectNewlineStyle, dispatchAgent, downloadGitHubTarball, emptyGoal, emptyPlan, encryptConfigSecrets, ensureDir, estimateRequestTokens, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, everArtServer, extractRunEnv, filesystemServer, findCriticalPath, formatContextWindowModeList, formatGoal, formatPlan, formatPlanTemplates, formatTodosList, getAgentDefinition, getContextWindowMode, getPlanTemplate, getTemplate, githubServer, goalFilePath, googleMapsServer, isAgentError, isConfigError, isContextWindowModeId, isFsError, isImageBlock, isPluginError, isSessionError, isTextBlock, isThinkingBlock, isToolError, isToolResultBlock, isToolUseBlock, isWrongStackError, listContextWindowModes, listPlanTemplates, listTemplates, loadDirectorState, loadGoal, loadPlan, loadPlugins, loadProjectModes, loadTodosCheckpoint, loadUserModes, makeAgentSubagentRunner, makeAutonomyPromptContributor, makeContinueToNextIterationTool, makeDirectorSessionFactory, makeLLMClassifier, matchAny, matchGlob, migratePlaintextSecrets, miniMaxVisionServer, normalizeToLf, parseContinueDirective, parseSkillRef, pendingBtwCount, projectHash, removePlanItem, renderProgress, renderPrometheus, renderSpecAnalysis, renderTaskGraph, renderTaskList, repairToolUseAdjacency, resolveContextWindowPolicy, resolveWstackPaths, rewriteConfigEncrypted, rosterSummaryFromConfigs, runConfigMigrations, safeParse, safeStringify, sanitizeJsonString, saveGoal, savePlan, saveTodosCheckpoint, scoreAgents, securitySlashCommand, sentinelServer, setBtwNote, setPlanItemStatus, slackServer, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, stripAnsi, summarizeUsage, templateToMarkdown, toStyle, toWrongStackError, topologicalSort, unifiedDiff, unloadPlugins, validateAgainstSchema, wireMetricsToEvents, wrapAsState, zaiVisionServer };
|
|
24901
24931
|
//# sourceMappingURL=index.js.map
|
|
24902
24932
|
//# sourceMappingURL=index.js.map
|