@wrongstack/core 0.9.7 → 0.9.20
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-DMVOX0cF.d.ts → agent-bridge-Dti3KXGk.d.ts} +1 -1
- package/dist/{agent-subagent-runner-DaF_EgRG.d.ts → agent-subagent-runner-U-rs7kk7.d.ts} +3 -4
- package/dist/compactor-D7X96RLZ.d.ts +41 -0
- package/dist/{config-SkMIDN9L.d.ts → config-CLXMDOSs.d.ts} +5 -1
- package/dist/{context-BRNbHmRM.d.ts → context-zkZeILpr.d.ts} +46 -0
- package/dist/coordination/index.d.ts +14 -13
- package/dist/coordination/index.js +1263 -123
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +22 -21
- package/dist/defaults/index.js +1477 -152
- package/dist/defaults/index.js.map +1 -1
- package/dist/{events-CiG9qUM_.d.ts → events-DH-9r-_C.d.ts} +42 -1
- package/dist/execution/index.d.ts +42 -30
- package/dist/execution/index.js +359 -112
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +7 -6
- package/dist/extension/index.js.map +1 -1
- package/dist/{index-CP8638Wm.d.ts → index-BIHJ4uII.d.ts} +12 -8
- package/dist/{index-Bsha5K4D.d.ts → index-CFO9QmJo.d.ts} +9 -8
- package/dist/index.d.ts +319 -37
- package/dist/index.js +2571 -324
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/infrastructure/index.js +36 -0
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/kernel/index.d.ts +10 -9
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-BouUWYW6.d.ts → mcp-servers-DkESgh0G.d.ts} +25 -3
- package/dist/models/index.d.ts +2 -2
- package/dist/models/index.js +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/{multi-agent-3ZnTB1aT.d.ts → multi-agent-DNp6lAzg.d.ts} +35 -23
- package/dist/{multi-agent-coordinator-DTXF2aAl.d.ts → multi-agent-coordinator-CAhsegPz.d.ts} +20 -2
- package/dist/{null-fleet-bus-Chrc_3Pp.d.ts → null-fleet-bus-Dnl19vmf.d.ts} +496 -15
- package/dist/observability/index.d.ts +2 -2
- package/dist/{path-resolver-TcJfc29Y.d.ts → path-resolver-CHiBL0DD.d.ts} +2 -2
- package/dist/{secret-scrubber-DttNiGYA.d.ts → permission-H35s9Evv.d.ts} +2 -7
- package/dist/{permission-policy-BpCGYBud.d.ts → permission-policy-CT-nRmTn.d.ts} +9 -2
- package/dist/{plan-templates-envSmNlZ.d.ts → plan-templates-Bs8iRwi6.d.ts} +28 -4
- package/dist/{provider-runner-BEpikbbN.d.ts → provider-runner-BZdDrWrS.d.ts} +3 -3
- package/dist/{retry-policy-BYkq0ugs.d.ts → retry-policy-J9N_PM40.d.ts} +1 -1
- package/dist/sdd/index.d.ts +10 -10
- package/dist/sdd/index.js +225 -68
- package/dist/sdd/index.js.map +1 -1
- package/dist/secret-scrubber-3MHDDAtm.d.ts +6 -0
- package/dist/{secret-scrubber-QSeI0ADi.d.ts → secret-scrubber-7rSC_emZ.d.ts} +1 -1
- package/dist/security/index.d.ts +5 -4
- package/dist/security/index.js +37 -6
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-pox8abg0.d.ts → selector-CFTh3Z6p.d.ts} +1 -1
- package/dist/{session-reader-CSWcb5Ga.d.ts → session-reader-C7JJlxOw.d.ts} +2 -2
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/storage/index.d.ts +391 -6
- package/dist/storage/index.js +760 -40
- package/dist/storage/index.js.map +1 -1
- package/dist/{system-prompt-Bs-Wliab.d.ts → system-prompt-CneIxVip.d.ts} +1 -1
- package/dist/{tool-executor-CsktM3h9.d.ts → tool-executor-flTuxsqO.d.ts} +9 -4
- package/dist/types/index.d.ts +16 -15
- package/dist/types/index.js +60 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +25 -2
- package/dist/utils/index.js +90 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/compactor-DVTKL7XD.d.ts +0 -23
package/dist/index.d.ts
CHANGED
|
@@ -1,67 +1,68 @@
|
|
|
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,
|
|
9
|
-
|
|
10
|
-
import { M as MCPServerConfig, a as Config, c as ConfigStore } from './config-
|
|
11
|
-
export { A as AutonomyConfig, C as CONTEXT_WINDOW_MODES, b as ConfigLoader, 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, S as SyncCategory, m as SyncConfig, T as ToolsConfig, n as formatContextWindowModeList, o as getContextWindowMode, p as isContextWindowModeId, q 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,
|
|
1
|
+
import { S as SystemPromptBuilder, c as ModelCapabilities, a as BuildContext, C as Container } from './system-prompt-CneIxVip.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-CneIxVip.js';
|
|
3
|
+
import { E as EventBus, c as EventName, L as Listener } from './events-DH-9r-_C.js';
|
|
4
|
+
export { a as EventLogger, b as EventMap, S as ScopedEventBus } from './events-DH-9r-_C.js';
|
|
5
|
+
import { d as WorktreeManager } from './index-CFO9QmJo.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-CFO9QmJo.js';
|
|
7
|
+
import { d as Context, m as Provider, Q as Tool, p as Request, q as Response, c as ContentBlock, T as TextBlock } from './context-zkZeILpr.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, 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-zkZeILpr.js';
|
|
9
|
+
import { P as ProviderRunner, R as RunProviderOptions$1 } from './provider-runner-BZdDrWrS.js';
|
|
10
|
+
import { M as MCPServerConfig, a as Config, c as ConfigStore } from './config-CLXMDOSs.js';
|
|
11
|
+
export { A as AutonomyConfig, C as CONTEXT_WINDOW_MODES, b as ConfigLoader, 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, S as SyncCategory, m as SyncConfig, T as ToolsConfig, n as formatContextWindowModeList, o as getContextWindowMode, p as isContextWindowModeId, q as listContextWindowModes, r as resolveContextWindowPolicy } from './config-CLXMDOSs.js';
|
|
12
|
+
export { C as CompactReport, a as Compactor } from './compactor-D7X96RLZ.js';
|
|
13
|
+
export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from './permission-H35s9Evv.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-
|
|
15
|
+
import { e as AttachmentStore, d as AttachmentRef, A as AddAttachmentInput } from './session-reader-C7JJlxOw.js';
|
|
16
|
+
export { a as Attachment, b as AttachmentKind, c as AttachmentMeta, D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from './session-reader-C7JJlxOw.js';
|
|
17
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-
|
|
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-7rSC_emZ.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-CHiBL0DD.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-flTuxsqO.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,
|
|
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,
|
|
27
|
+
import { u as SlashCommand, w as SystemPromptContributor, k as PluginAPI, n as PluginPipelines, F as ToolRegistryView, r as ProviderRegistryView, M as MCPRegistryView, v as SlashCommandRegistryView, E as ExtensionRegistry, S as SessionWriterView, j as MetricsSinkView, C as ToolRegistry, q as ProviderRegistry, P as Plugin, x as ToolCallPipelinePayload } from './index-BIHJ4uII.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, G as ToolWrapper, U as UserInputPayload, H as createDefaultPipelines } from './index-BIHJ4uII.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-Dti3KXGk.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-DNp6lAzg.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
|
-
import { e as MetricsSink, b as HealthRegistry } from './observability-BhnVLBLS.js';
|
|
37
|
-
export { A as AggregateHealth, H as HealthCheck, a as HealthCheckResult, c as HealthStatus, M as MetricLabels, d as MetricSeries, f as MetricsSnapshot, S as Span
|
|
38
|
-
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';
|
|
36
|
+
import { T as Tracer, e as MetricsSink, b as HealthRegistry } from './observability-BhnVLBLS.js';
|
|
37
|
+
export { A as AggregateHealth, H as HealthCheck, a as HealthCheckResult, c as HealthStatus, M as MetricLabels, d as MetricSeries, f as MetricsSnapshot, S as Span } from './observability-BhnVLBLS.js';
|
|
38
|
+
export { AtomicWriteOptions, BuildChildEnvOptions, CompileFail, CompileResult, MessageRepairReport, MessageRepairResult, NewlineStyle, RequestTokenBreakdown, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, atomicWrite, buildChildEnv, color, compileGlob, compileUserRegex, completePartialObject, createToolOutputSerializer, detectNewlineStyle, ensureDir, estimateRequestTokens, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, formatTodosList, matchAny, matchGlob, normalizeToLf, repairToolUseAdjacency, safeParse, safeStringify, sanitizeJsonString, stripAnsi, toStyle, unifiedDiff, validateAgainstSchema } from './utils/index.js';
|
|
39
39
|
import { a as WstackPaths } from './wstack-paths-BCgmTNlG.js';
|
|
40
40
|
export { W as WstackPathOptions, p as projectHash, r as resolveWstackPaths } from './wstack-paths-BCgmTNlG.js';
|
|
41
|
-
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-
|
|
41
|
+
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-Bs8iRwi6.js';
|
|
42
42
|
export { D as DirectorStateCheckpoint, a as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from './director-state-BmYi3DGA.js';
|
|
43
|
-
export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from './permission-policy-
|
|
43
|
+
export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from './permission-policy-CT-nRmTn.js';
|
|
44
44
|
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';
|
|
45
45
|
export { DefaultProviderRunner } from './defaults/index.js';
|
|
46
|
-
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,
|
|
47
|
-
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-
|
|
48
|
-
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-
|
|
46
|
+
export { A as ACP_AGENTS, 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, n as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, q as DEFAULT_SUBAGENT_BASELINE, r as DelegateHost, s as Director, w as DirectorPromptParts, x as DirectorSessionFactory, y as DirectorSessionFactoryOptions, F as FLEET_ROSTER, z as FLEET_ROSTER_BUDGETS, E as FLEET_ROSTER_WITHACP, G as FleetCostCapError, H as FleetManager, I as FleetManagerOptions, J as FleetRosterBudget, K as FleetSpawnBudgetError, L as ICoordinator, M as IFleetManager, N as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, U as SubagentPromptParts, V as applyRosterBudget, W as attachAutoExtend, X as composeDirectorPrompt, Y as composeSubagentPrompt, Z as createDelegateTool, _ as getAgentDefinition, $ as makeAskTool, a0 as makeAssignTool, a1 as makeAwaitTasksTool, a2 as makeCollabDebugTool, a3 as makeDirectorSessionFactory, a4 as makeFleetEmitTool, a5 as makeFleetHealthTool, a6 as makeFleetSessionTool, a7 as makeFleetStatusTool, a8 as makeFleetUsageTool, a9 as makeRollUpTool, aa as makeSpawnTool, ab as makeTerminateTool, ad as rosterSummaryFromConfigs } from './null-fleet-bus-Dnl19vmf.js';
|
|
47
|
+
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-CAhsegPz.js';
|
|
48
|
+
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-U-rs7kk7.js';
|
|
49
49
|
export { DefaultModeStore, LLMSelector, LLMSelectorOptions, ModeLoaderOptions, loadProjectModes, loadUserModes } from './models/index.js';
|
|
50
50
|
import { TaskStore } from './sdd/index.js';
|
|
51
51
|
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';
|
|
52
52
|
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';
|
|
53
|
-
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-
|
|
53
|
+
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-DkESgh0G.js';
|
|
54
54
|
export { DownloadResult, InstallResult, InstalledSkillEntry, ManifestData, ParsedRef, SkillInstaller, SkillInstallerOptions, SkillManifestStore, UpdateResult, downloadGitHubTarball, parseSkillRef } from './skills/index.js';
|
|
55
|
-
import { DefaultPromptStore } from './storage/index.js';
|
|
56
|
-
export { ALL_SYNC_CATEGORIES, CloudSync, DefaultSessionRewinder, PromptEntry, PromptStore, SessionRewinderOptions, SyncResult } from './storage/index.js';
|
|
55
|
+
import { ReplayLogStore, DefaultPromptStore } from './storage/index.js';
|
|
56
|
+
export { ALL_SYNC_CATEGORIES, Annotation, AnnotationsStore, AnnotationsStoreOptions, AuditEntry, CloudSync, DefaultSessionRewinder, PromptEntry, PromptStore, RecoveryPlan, ReplayEntry, ReplayLogStoreOptions, SessionRecovery, SessionRewinderOptions, StaleSession, SyncResult, ToolAuditLog, ToolAuditLogOptions, VerifyResult } from './storage/index.js';
|
|
57
57
|
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';
|
|
58
|
-
import { a as RetryPolicy, E as ErrorHandler } from './retry-policy-
|
|
58
|
+
import { a as RetryPolicy, E as ErrorHandler } from './retry-policy-J9N_PM40.js';
|
|
59
59
|
import { a as Logger } from './logger-DDd5C--Z.js';
|
|
60
60
|
export { L as LogLevel } from './logger-DDd5C--Z.js';
|
|
61
61
|
export { M as ModelsDevPayload, a as ModelsDevProvider, b as ModelsRegistry, R as ResolvedModel, c as ResolvedProvider, W as WireFamily } from './models-registry-BcYJDKLm.js';
|
|
62
62
|
export { S as SecretVault } from './secret-vault-DoISxaKO.js';
|
|
63
|
+
export { S as SecretScrubber } from './secret-scrubber-3MHDDAtm.js';
|
|
63
64
|
import './path-resolver-CPRj4bFY.js';
|
|
64
|
-
import './selector-
|
|
65
|
+
import './selector-CFTh3Z6p.js';
|
|
65
66
|
import 'node:events';
|
|
66
67
|
|
|
67
68
|
/**
|
|
@@ -303,7 +304,6 @@ declare class SecurityScannerOrchestrator {
|
|
|
303
304
|
private readonly retryPolicy?;
|
|
304
305
|
private readonly errorHandler?;
|
|
305
306
|
private detector;
|
|
306
|
-
private reportGenerator;
|
|
307
307
|
private gitignoreUpdater;
|
|
308
308
|
constructor(retryPolicy?: RetryPolicy | undefined, errorHandler?: ErrorHandler | undefined);
|
|
309
309
|
/**
|
|
@@ -399,6 +399,24 @@ interface CreateMcpControlToolOptions {
|
|
|
399
399
|
}
|
|
400
400
|
declare function createMcpControlTool(opts: CreateMcpControlToolOptions): Tool;
|
|
401
401
|
|
|
402
|
+
interface RunProviderOptions {
|
|
403
|
+
provider: Provider;
|
|
404
|
+
request: Request;
|
|
405
|
+
signal: AbortSignal;
|
|
406
|
+
ctx: Context;
|
|
407
|
+
events: EventBus;
|
|
408
|
+
retry: RetryPolicy;
|
|
409
|
+
logger: Logger;
|
|
410
|
+
tracer?: Tracer;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Call a provider with the retry policy applied. Emits `provider.retry`
|
|
414
|
+
* before each retry and `provider.error` once when the retries are
|
|
415
|
+
* exhausted. Streaming providers route through the streaming-response
|
|
416
|
+
* builder so deltas reach the renderer.
|
|
417
|
+
*/
|
|
418
|
+
declare function runProviderWithRetry(opts: RunProviderOptions): Promise<Response>;
|
|
419
|
+
|
|
402
420
|
/**
|
|
403
421
|
* L1-E: Autonomous continue — model-driven self-iteration continuation.
|
|
404
422
|
*
|
|
@@ -1360,6 +1378,265 @@ declare class CheckpointManager {
|
|
|
1360
1378
|
private pruneCheckpoints;
|
|
1361
1379
|
}
|
|
1362
1380
|
|
|
1381
|
+
/**
|
|
1382
|
+
* CollaborationBus — kernel-level pause/resume signal for the
|
|
1383
|
+
* collaboration `controller` role (Phase 3 of idea #13 from IDEAS.md).
|
|
1384
|
+
*
|
|
1385
|
+
* The bus is a single-process singleton. The webui server (which hosts
|
|
1386
|
+
* the agent loop) creates one at boot, passes it to both the agent's
|
|
1387
|
+
* `toolCall` pipeline (as a middleware) and the `CollaborationWsHandler`
|
|
1388
|
+
* (which toggles it on client requests).
|
|
1389
|
+
*
|
|
1390
|
+
* Semantics:
|
|
1391
|
+
* - `requestPause(by)` flips the bus into the "paused" state. The
|
|
1392
|
+
* state has no timeout of its own — the *middleware* decides how
|
|
1393
|
+
* long to wait before auto-resuming (default 60s).
|
|
1394
|
+
* - `resume()` returns the bus to the running state. Idempotent:
|
|
1395
|
+
* calling resume() when not paused is a no-op returning `false`.
|
|
1396
|
+
* - `waitForResume(timeoutMs)` is what the middleware calls. It
|
|
1397
|
+
* returns `true` if the bus was resumed in time, `false` if the
|
|
1398
|
+
* timeout fired (in which case it also auto-resumes, so the agent
|
|
1399
|
+
* loop is never permanently stuck).
|
|
1400
|
+
* - `getState()` returns a snapshot for observability surfaces
|
|
1401
|
+
* (UI badges, CLI `/collab status`).
|
|
1402
|
+
*
|
|
1403
|
+
* Why a separate bus object rather than putting state on RunController?
|
|
1404
|
+
*
|
|
1405
|
+
* - The RunController is per-run; the bus is per-process. A single
|
|
1406
|
+
* pause signal across the whole webui process is the right
|
|
1407
|
+
* granularity (the webui hosts exactly one Agent.run at a time).
|
|
1408
|
+
* - The bus can be unit-tested without spinning up an Agent. The
|
|
1409
|
+
* middleware can be tested by injecting a fake bus.
|
|
1410
|
+
* - Future multi-session webui (when the bus is upgraded to filter
|
|
1411
|
+
* by sessionId) does not require touching the agent loop — the
|
|
1412
|
+
* middleware already receives the sessionId in its payload.
|
|
1413
|
+
*/
|
|
1414
|
+
type CollabBusState = {
|
|
1415
|
+
paused: boolean;
|
|
1416
|
+
pausedAt: string | null;
|
|
1417
|
+
pausedBy: string | null;
|
|
1418
|
+
};
|
|
1419
|
+
declare class CollaborationBus {
|
|
1420
|
+
private pausePromise;
|
|
1421
|
+
private pauseResolve;
|
|
1422
|
+
private pausedAtMs;
|
|
1423
|
+
private pausedBy;
|
|
1424
|
+
isPaused(): boolean;
|
|
1425
|
+
getState(): CollabBusState;
|
|
1426
|
+
/**
|
|
1427
|
+
* Pause the agent loop. Idempotent: a second `requestPause` while
|
|
1428
|
+
* already paused is a no-op (the original pause wins; we do not
|
|
1429
|
+
* overwrite `pausedBy`). Returns true when the state actually
|
|
1430
|
+
* transitioned, false when it was already paused.
|
|
1431
|
+
*/
|
|
1432
|
+
requestPause(byParticipant: string): boolean;
|
|
1433
|
+
/**
|
|
1434
|
+
* Resume the agent loop. Returns true when the state actually
|
|
1435
|
+
* transitioned from paused → running, false when it was already
|
|
1436
|
+
* running (no-op).
|
|
1437
|
+
*/
|
|
1438
|
+
resume(): boolean;
|
|
1439
|
+
/**
|
|
1440
|
+
* Block until the bus is resumed or the timeout fires. Returns:
|
|
1441
|
+
* - `true` → bus was resumed in time
|
|
1442
|
+
* - `false` → timeout fired; bus was auto-resumed as a side effect
|
|
1443
|
+
*
|
|
1444
|
+
* When `timeoutMs` is `0` the wait is unbounded (the middleware must
|
|
1445
|
+
* be paired with an external AbortSignal in that case — we don't
|
|
1446
|
+
* expose one here to keep the API simple).
|
|
1447
|
+
*/
|
|
1448
|
+
waitForResume(timeoutMs: number): Promise<boolean>;
|
|
1449
|
+
private readonly injectionQueue;
|
|
1450
|
+
/**
|
|
1451
|
+
* Queue a manual tool result. The next time the agent's toolCall
|
|
1452
|
+
* pipeline sees a matching `toolUse.id`, the
|
|
1453
|
+
* `collabInjectMiddleware` consumes this entry and replaces the
|
|
1454
|
+
* real tool execution. Returns `false` if an injection for the
|
|
1455
|
+
* same id is already queued (idempotent — first write wins).
|
|
1456
|
+
*/
|
|
1457
|
+
injectToolResult(input: InjectedToolResult): boolean;
|
|
1458
|
+
/**
|
|
1459
|
+
* Pop an injection from the queue. Returns the payload (and
|
|
1460
|
+
* removes it) if one is pending, or `null` when nothing matches.
|
|
1461
|
+
* Called by the middleware on every tool call.
|
|
1462
|
+
*/
|
|
1463
|
+
takeInjection(toolUseId: string): InjectedToolResult | null;
|
|
1464
|
+
/** Inspect the queue size (for observability / tests). */
|
|
1465
|
+
pendingInjectionCount(): number;
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* Payload for a queued manual tool-call injection. The middleware
|
|
1469
|
+
* splices this into the toolCall pipeline as a synthetic result.
|
|
1470
|
+
*/
|
|
1471
|
+
interface InjectedToolResult {
|
|
1472
|
+
toolUseId: string;
|
|
1473
|
+
/** Serialized content the model will see (string, JSON, etc.). */
|
|
1474
|
+
content: unknown;
|
|
1475
|
+
/** When true, the result is rendered as a tool error. */
|
|
1476
|
+
isError: boolean;
|
|
1477
|
+
/**
|
|
1478
|
+
* Free-form context surfaced in the broadcast and the audit log,
|
|
1479
|
+
* e.g. "controller: read returned the right file but with these
|
|
1480
|
+
* contents" or "controller: skipped the destructive bash call".
|
|
1481
|
+
*/
|
|
1482
|
+
reason: string;
|
|
1483
|
+
/** Participant id of the controller who issued the injection. */
|
|
1484
|
+
authorId: string;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
/**
|
|
1488
|
+
* collabPauseMiddleware — gates the agent's `toolCall` pipeline on
|
|
1489
|
+
* the collaboration pause signal.
|
|
1490
|
+
*
|
|
1491
|
+
* Position: must be installed as the *first* middleware in the
|
|
1492
|
+
* `toolCall` pipeline so it runs before permission checks, retries,
|
|
1493
|
+
* and the tool itself. That way the controller can halt an agent
|
|
1494
|
+
* regardless of what the model is about to do.
|
|
1495
|
+
*
|
|
1496
|
+
* Semantics:
|
|
1497
|
+
* - When the bus is not paused: pass through (`next()`).
|
|
1498
|
+
* - When the bus is paused: await `bus.waitForResume(timeoutMs)`.
|
|
1499
|
+
* The default timeout is 60s — long enough for a human to think,
|
|
1500
|
+
* short enough that a forgotten controller doesn't pin the agent
|
|
1501
|
+
* forever. The auto-resume on timeout is logged below.
|
|
1502
|
+
*
|
|
1503
|
+
* Phase 3 of idea #13. Manual tool-call injection (a controller
|
|
1504
|
+
* "writing" a tool result) is *not* in scope for this middleware —
|
|
1505
|
+
* that requires splicing the injected result into the agent's
|
|
1506
|
+
* message stream and is a follow-up.
|
|
1507
|
+
*/
|
|
1508
|
+
interface CollabPauseMiddlewareOptions {
|
|
1509
|
+
/**
|
|
1510
|
+
* How long to wait for a resume before auto-resuming the bus.
|
|
1511
|
+
* Defaults to 60_000 ms. Set to 0 for an unbounded wait (the
|
|
1512
|
+
* caller is then responsible for cancellation via the bus itself).
|
|
1513
|
+
*/
|
|
1514
|
+
defaultTimeoutMs?: number;
|
|
1515
|
+
/**
|
|
1516
|
+
* Optional logger — receives a debug line on pause entry and on
|
|
1517
|
+
* timeout-driven auto-resume. Matches the `Logger` token surface
|
|
1518
|
+
* so the runtime can pass its existing logger.
|
|
1519
|
+
*/
|
|
1520
|
+
logger?: {
|
|
1521
|
+
debug?: (msg: string) => void;
|
|
1522
|
+
warn?: (msg: string) => void;
|
|
1523
|
+
};
|
|
1524
|
+
}
|
|
1525
|
+
declare function collabPauseMiddleware(bus: CollaborationBus, opts?: CollabPauseMiddlewareOptions): (payload: ToolCallPipelinePayload, next: () => Promise<void>) => Promise<void>;
|
|
1526
|
+
/**
|
|
1527
|
+
* collabInjectMiddleware — Phase 4 of idea #13. Splices
|
|
1528
|
+
* controller-injected tool results into the toolCall pipeline.
|
|
1529
|
+
*
|
|
1530
|
+
* Position: should run AFTER `collabPauseMiddleware` so the
|
|
1531
|
+
* controller has a chance to pause + inject before the next tool
|
|
1532
|
+
* executes. Install order:
|
|
1533
|
+
* - `pipeline.toolCall.prepend(collabPause)`
|
|
1534
|
+
* - `pipeline.toolCall.prepend(collabInject)` // runs second
|
|
1535
|
+
*
|
|
1536
|
+
* Semantics:
|
|
1537
|
+
* - On every tool call, the middleware asks the bus for an
|
|
1538
|
+
* injection matching `payload.toolUse.id`.
|
|
1539
|
+
* - If one is queued, the payload's `result` is replaced with
|
|
1540
|
+
* a synthetic ToolResultBlock carrying the injected content +
|
|
1541
|
+
* `is_error` flag. The real `next()` is NOT called — the
|
|
1542
|
+
* downstream tool executor sees a payload that's already
|
|
1543
|
+
* "complete" and skips the actual tool.
|
|
1544
|
+
* - The injection is consumed once and removed from the bus.
|
|
1545
|
+
*
|
|
1546
|
+
* Why this shape: by replacing the result *before* the executor
|
|
1547
|
+
* runs, we keep the kernel's `ToolExecutor` untouched. The agent
|
|
1548
|
+
* loop's existing `tool.executed` event still fires (carrying
|
|
1549
|
+
* the injected content), so the session log + observers see a
|
|
1550
|
+
* normal-looking call — just with the controller's intent in
|
|
1551
|
+
* the result instead of the real tool's output.
|
|
1552
|
+
*/
|
|
1553
|
+
declare function collabInjectMiddleware(bus: CollaborationBus, opts?: {
|
|
1554
|
+
logger?: {
|
|
1555
|
+
debug?: (msg: string) => void;
|
|
1556
|
+
warn?: (msg: string) => void;
|
|
1557
|
+
};
|
|
1558
|
+
}): (payload: ToolCallPipelinePayload, next: () => Promise<void>) => Promise<void>;
|
|
1559
|
+
|
|
1560
|
+
/**
|
|
1561
|
+
* Idea #2 from IDEAS.md — Deterministic Replay.
|
|
1562
|
+
*
|
|
1563
|
+
* The hash function is the foundation of replay: given a `Request`,
|
|
1564
|
+
* produce a stable identifier so a recorded `Response` can be looked
|
|
1565
|
+
* up later when we want to "re-run" the same agent loop without
|
|
1566
|
+
* burning API credits.
|
|
1567
|
+
*
|
|
1568
|
+
* Stability rules:
|
|
1569
|
+
*
|
|
1570
|
+
* - All object keys are sorted recursively before stringification.
|
|
1571
|
+
* Without this, two semantically identical requests that differ
|
|
1572
|
+
* only in key insertion order would produce different hashes.
|
|
1573
|
+
* - We hash ONLY the fields that affect the response: `model`,
|
|
1574
|
+
* `system`, `messages`, `tools`, `maxTokens`, and the four
|
|
1575
|
+
* sampling knobs (`temperature`, `topP`, `stopSequences`,
|
|
1576
|
+
* `toolChoice`). Anything else on the `Request` (metadata,
|
|
1577
|
+
* future extensions) is ignored so replay stays forward-compat.
|
|
1578
|
+
* - We serialize to JSON. The `ContentBlock` and `Message` shapes
|
|
1579
|
+
* are pure data; this works as long as no `undefined` values
|
|
1580
|
+
* sneak in (those get dropped by `JSON.stringify`, which is
|
|
1581
|
+
* fine — the structural diff is what matters).
|
|
1582
|
+
*
|
|
1583
|
+
* The SHA-256 output is hex-encoded and prefixed with the algorithm
|
|
1584
|
+
* tag so a future migration to a different hash (e.g. blake3) is
|
|
1585
|
+
* trivial to detect.
|
|
1586
|
+
*/
|
|
1587
|
+
declare function stableStringify(value: unknown): string;
|
|
1588
|
+
declare function hashRequest(request: Request): string;
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* ReplayProviderRunner — idea #2 from IDEAS.md.
|
|
1592
|
+
*
|
|
1593
|
+
* A drop-in `ProviderRunner` that wraps an inner runner and either
|
|
1594
|
+
* - records every (request, response) pair it observes (mode: 'record'),
|
|
1595
|
+
* - serves a recorded response when the request hash matches (mode: 'replay'),
|
|
1596
|
+
* - or does both: serve when present, record when not (mode: 'auto').
|
|
1597
|
+
*
|
|
1598
|
+
* Bind to `TOKENS.ProviderRunner` to completely replace the default
|
|
1599
|
+
* runner. Or use `AgentExtension.wrapProviderRunner` to chain in
|
|
1600
|
+
* alongside other extensions.
|
|
1601
|
+
*
|
|
1602
|
+
* Mode semantics:
|
|
1603
|
+
* - 'record' is the production mode. Every real API call is
|
|
1604
|
+
* persisted; the user can later `wstack replay <sessionId>` to
|
|
1605
|
+
* re-run with frozen responses.
|
|
1606
|
+
* - 'replay' is the debugging mode. The agent loop runs normally
|
|
1607
|
+
* (same permissions, same tool dispatch) but every LLM call
|
|
1608
|
+
* comes from the recorded log. If a request hash is not in the
|
|
1609
|
+
* log, we throw — the user is expected to either rebuild the
|
|
1610
|
+
* session or fall back to record mode.
|
|
1611
|
+
* - 'auto' is the warm-start mode for development. The first time
|
|
1612
|
+
* a particular request is seen, it's recorded; the next time
|
|
1613
|
+
* the same request is made, the recorded response is served.
|
|
1614
|
+
* This is the cheapest path to a deterministic test harness.
|
|
1615
|
+
*/
|
|
1616
|
+
type ReplayMode = 'record' | 'replay' | 'auto';
|
|
1617
|
+
interface ReplayProviderRunnerOptions {
|
|
1618
|
+
log: ReplayLogStore;
|
|
1619
|
+
sessionId: string;
|
|
1620
|
+
mode: ReplayMode;
|
|
1621
|
+
/**
|
|
1622
|
+
* Optional logger — receives a debug line on every replay hit
|
|
1623
|
+
* ("served cached response for hash sha256:…") and a warn on
|
|
1624
|
+
* every miss in 'replay' mode (the throw that follows is the
|
|
1625
|
+
* real signal, but the warn helps when the throw is caught
|
|
1626
|
+
* upstream).
|
|
1627
|
+
*/
|
|
1628
|
+
logger?: {
|
|
1629
|
+
debug?: (msg: string) => void;
|
|
1630
|
+
warn?: (msg: string) => void;
|
|
1631
|
+
};
|
|
1632
|
+
}
|
|
1633
|
+
declare class ReplayProviderRunner implements ProviderRunner {
|
|
1634
|
+
private readonly inner;
|
|
1635
|
+
private readonly opts;
|
|
1636
|
+
constructor(inner: ProviderRunner, opts: ReplayProviderRunnerOptions);
|
|
1637
|
+
run(runOpts: RunProviderOptions$1): Promise<Response>;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1363
1640
|
interface PromptsPluginOptions {
|
|
1364
1641
|
store?: DefaultPromptStore;
|
|
1365
1642
|
paths?: WstackPaths;
|
|
@@ -1376,6 +1653,11 @@ declare function createPromptsPlugin(opts?: PromptsPluginOptions): Plugin;
|
|
|
1376
1653
|
interface SyncPluginOptions {
|
|
1377
1654
|
paths?: WstackPaths;
|
|
1378
1655
|
configStore?: ConfigStore;
|
|
1656
|
+
/** Secret vault for encrypting the GitHub token before persisting to disk. */
|
|
1657
|
+
vault?: {
|
|
1658
|
+
encrypt(plaintext: string): string;
|
|
1659
|
+
decrypt?(value: string): string;
|
|
1660
|
+
};
|
|
1379
1661
|
}
|
|
1380
1662
|
/**
|
|
1381
1663
|
* SyncPlugin — GitHub-backed cloud sync for WrongStack user data.
|
|
@@ -1442,4 +1724,4 @@ interface PlanPluginOptions {
|
|
|
1442
1724
|
*/
|
|
1443
1725
|
declare function createPlanPlugin(opts?: PlanPluginOptions): Plugin;
|
|
1444
1726
|
|
|
1445
|
-
export { AddAttachmentInput, AttachmentRef, AttachmentStore, type AutoPhaseOptions, type AutoPhasePlanResult, AutoPhasePlanner, type AutoPhasePlannerOptions, AutoPhaseRunner, type AutoPhaseRunnerOptions, BuildContext, type Checkpoint, CheckpointManager, type CheckpointManagerOptions, Config, ConfigStore, Container, ContentBlock, Context, type ContinueDirective, DefaultPluginAPI, DefaultPromptStore, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, type DetectedDependency, type DetectionResult, EventBus, EventName, ExtensionRegistry, type Finding, type FullScanResult, type GeneratedSecuritySkill, type GeneratedSkill, type GeneratedSkillContent, GitignoreUpdater, HealthRegistry, InputBuilder, type InputBuilderEvent, type InputBuilderOptions, KERNEL_API_VERSION, LAYER_1_IDENTITY, Listener, type LoadPluginsOptions, Logger, type MCPRegistryHandle, MCPRegistryView, MCPServerConfig, MemoryStore, MetricsSink, MetricsSinkView, ModeStore, ModelCapabilities, type PackageManager, type PhaseEventMap, type PhaseEventName, type PhaseExecutionContext, type PhaseFilter, type PhaseGraph, PhaseGraphBuilder, type PhaseGraphBuilderOptions, type PhaseNode, PhaseOrchestrator, type PhaseOrchestratorOptions, type PhaseProgress, type PhaseSort, type PhaseStatus, PhaseStore, type PhaseStoreOptions, type PhaseTemplate, Plugin, PluginAPI, type PluginAPIInit, PluginPipelines, Provider, ProviderRegistry, ProviderRegistryView, ReportGenerator, type ReportOptions, type ScanOptions, type ScanResult, type ScanScope, type SecurityPattern, SecurityScanner, type SecurityScannerContext, type SecurityScannerOptions, SecurityScannerOrchestrator, SessionWriterView, type SeverityLevel, type SkillGenerationContext, SkillGenerator, type SkillGeneratorOptions, SkillLoader, SlashCommand, SlashCommandRegistry, SlashCommandRegistryView, SystemPromptBuilder, SystemPromptContributor, TaskGraph, TaskNode, TaskPriority, TaskStore, TaskType, type TechStack, TechStackDetector, type TechStackInfo, TextBlock, Tool, ToolRegistry, ToolRegistryView, WorktreeManager, WstackPaths, buildBtwBlock, consumeBtwNotes, createAutoPhaseFromTaskGraph, createGitPlugin, createMcpControlTool, createObservabilityPlugin, createPlanPlugin, createPromptsPlugin, createSecurityPlugin, createSecuritySlashCommand, createSkillsPlugin, createSyncPlugin, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, loadPlugins, makeContinueToNextIterationTool, parseContinueDirective, pendingBtwCount, securitySlashCommand, setBtwNote, unloadPlugins };
|
|
1727
|
+
export { AddAttachmentInput, AttachmentRef, AttachmentStore, type AutoPhaseOptions, type AutoPhasePlanResult, AutoPhasePlanner, type AutoPhasePlannerOptions, AutoPhaseRunner, type AutoPhaseRunnerOptions, BuildContext, type Checkpoint, CheckpointManager, type CheckpointManagerOptions, type CollabBusState, type InjectedToolResult as CollabInjectedToolResult, type CollabPauseMiddlewareOptions, CollaborationBus, Config, ConfigStore, Container, ContentBlock, Context, type ContinueDirective, DefaultPluginAPI, DefaultPromptStore, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, type DetectedDependency, type DetectionResult, EventBus, EventName, ExtensionRegistry, type Finding, type FullScanResult, type GeneratedSecuritySkill, type GeneratedSkill, type GeneratedSkillContent, GitignoreUpdater, HealthRegistry, InputBuilder, type InputBuilderEvent, type InputBuilderOptions, KERNEL_API_VERSION, LAYER_1_IDENTITY, Listener, type LoadPluginsOptions, Logger, type MCPRegistryHandle, MCPRegistryView, MCPServerConfig, MemoryStore, MetricsSink, MetricsSinkView, ModeStore, ModelCapabilities, type PackageManager, type PhaseEventMap, type PhaseEventName, type PhaseExecutionContext, type PhaseFilter, type PhaseGraph, PhaseGraphBuilder, type PhaseGraphBuilderOptions, type PhaseNode, PhaseOrchestrator, type PhaseOrchestratorOptions, type PhaseProgress, type PhaseSort, type PhaseStatus, PhaseStore, type PhaseStoreOptions, type PhaseTemplate, Plugin, PluginAPI, type PluginAPIInit, PluginPipelines, Provider, ProviderRegistry, ProviderRegistryView, ProviderRunner, ReplayLogStore, type ReplayMode, ReplayProviderRunner, type ReplayProviderRunnerOptions, ReportGenerator, type ReportOptions, Request, Response, RunProviderOptions$1 as RunProviderOptions, type ScanOptions, type ScanResult, type ScanScope, type SecurityPattern, SecurityScanner, type SecurityScannerContext, type SecurityScannerOptions, SecurityScannerOrchestrator, SessionWriterView, type SeverityLevel, type SkillGenerationContext, SkillGenerator, type SkillGeneratorOptions, SkillLoader, SlashCommand, SlashCommandRegistry, SlashCommandRegistryView, SystemPromptBuilder, SystemPromptContributor, TaskGraph, TaskNode, TaskPriority, TaskStore, TaskType, type TechStack, TechStackDetector, type TechStackInfo, TextBlock, Tool, ToolRegistry, ToolRegistryView, Tracer, WorktreeManager, WstackPaths, buildBtwBlock, collabInjectMiddleware, collabPauseMiddleware, consumeBtwNotes, createAutoPhaseFromTaskGraph, createGitPlugin, createMcpControlTool, createObservabilityPlugin, createPlanPlugin, createPromptsPlugin, createSecurityPlugin, createSecuritySlashCommand, createSkillsPlugin, createSyncPlugin, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, hashRequest, loadPlugins, makeContinueToNextIterationTool, parseContinueDirective, pendingBtwCount, runProviderWithRetry, securitySlashCommand, setBtwNote, stableStringify, unloadPlugins };
|