@wrongstack/core 0.5.3 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/{agent-bridge-EiUFe3if.d.ts → agent-bridge-B07AYFBk.d.ts} +1 -1
  2. package/dist/{compactor-BP4xhKVi.d.ts → compactor-BWhJXxsW.d.ts} +1 -1
  3. package/dist/{config-BOD_HQBw.d.ts → config-BgM0BIpz.d.ts} +1 -1
  4. package/dist/{context-PH4DvBZV.d.ts → context-CLZXPPYk.d.ts} +18 -1
  5. package/dist/coordination/index.d.ts +9 -9
  6. package/dist/defaults/index.d.ts +19 -19
  7. package/dist/defaults/index.js +50 -2
  8. package/dist/defaults/index.js.map +1 -1
  9. package/dist/{director-state-CVzkjKRZ.d.ts → director-state-BUxlqkOa.d.ts} +5 -5
  10. package/dist/{events-oxn-Wkub.d.ts → events-qnDZbrtb.d.ts} +67 -2
  11. package/dist/execution/index.d.ts +12 -12
  12. package/dist/extension/index.d.ts +6 -6
  13. package/dist/{index-a12jc7-r.d.ts → index-DPLJw_ZI.d.ts} +5 -5
  14. package/dist/{index-CcbWbcpy.d.ts → index-De4R4rQ7.d.ts} +5 -5
  15. package/dist/index.d.ts +328 -27
  16. package/dist/index.js +1996 -14
  17. package/dist/index.js.map +1 -1
  18. package/dist/infrastructure/index.d.ts +6 -6
  19. package/dist/kernel/index.d.ts +9 -9
  20. package/dist/kernel/index.js +98 -1
  21. package/dist/kernel/index.js.map +1 -1
  22. package/dist/{mcp-servers-uPmBxZ1B.d.ts → mcp-servers-CSMfaBuL.d.ts} +3 -3
  23. package/dist/models/index.d.ts +2 -2
  24. package/dist/{multi-agent-D6S4Z7H8.d.ts → multi-agent-Cv8wk47i.d.ts} +2 -2
  25. package/dist/observability/index.d.ts +2 -2
  26. package/dist/{path-resolver-CprD5DhS.d.ts → path-resolver-DiCUvEg6.d.ts} +2 -2
  27. package/dist/{provider-runner-DGisz_lG.d.ts → provider-runner-3SHqk9zB.d.ts} +3 -3
  28. package/dist/{retry-policy-DUJ8-Qc_.d.ts → retry-policy-LLUxJmYY.d.ts} +1 -1
  29. package/dist/sdd/index.d.ts +3 -3
  30. package/dist/{secret-scrubber-CB11A2P7.d.ts → secret-scrubber-BhJTNr9v.d.ts} +4 -2
  31. package/dist/{secret-scrubber-EqFa0SyI.d.ts → secret-scrubber-Z_VXuXQT.d.ts} +1 -1
  32. package/dist/security/index.d.ts +13 -3
  33. package/dist/security/index.js +34 -1
  34. package/dist/security/index.js.map +1 -1
  35. package/dist/{selector-yqyxt-Ii.d.ts → selector-DB2-byKH.d.ts} +1 -1
  36. package/dist/{session-reader-1tOyoY1s.d.ts → session-reader-4jxsYLZ8.d.ts} +1 -1
  37. package/dist/storage/index.d.ts +6 -6
  38. package/dist/storage/index.js +16 -1
  39. package/dist/storage/index.js.map +1 -1
  40. package/dist/{system-prompt-BJlzKGO6.d.ts → system-prompt-DI4Dtc1I.d.ts} +1 -1
  41. package/dist/{tool-executor-B6kRcWeF.d.ts → tool-executor-DSvmOBe6.d.ts} +4 -4
  42. package/dist/types/index.d.ts +15 -15
  43. package/dist/types/index.js +9 -1
  44. package/dist/types/index.js.map +1 -1
  45. package/dist/utils/index.d.ts +2 -2
  46. package/dist/{wstack-paths-BGu2INTm.d.ts → wstack-paths-86YPFktR.d.ts} +1 -1
  47. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { B as BridgeTransport, l as BridgeMessage, A as AgentBridge, m as AgentBridgeConfig } from './multi-agent-D6S4Z7H8.js';
1
+ import { B as BridgeTransport, l as BridgeMessage, A as AgentBridge, m as AgentBridgeConfig } from './multi-agent-Cv8wk47i.js';
2
2
 
3
3
  /**
4
4
  * In-memory pub/sub transport for agent-to-agent messaging.
@@ -1,4 +1,4 @@
1
- import { a1 as Context } from './context-PH4DvBZV.js';
1
+ import { a2 as Context } from './context-CLZXPPYk.js';
2
2
 
3
3
  interface CompactRepairReport {
4
4
  removedToolUses: string[];
@@ -1,5 +1,5 @@
1
1
  import { W as WireFamily } from './models-registry-Y2xbog0E.js';
2
- import { P as Permission } from './context-PH4DvBZV.js';
2
+ import { P as Permission } from './context-CLZXPPYk.js';
3
3
 
4
4
  type ContextWindowModeId = 'balanced' | 'frugal' | 'deep' | 'archival';
5
5
  type ContextWindowAggressiveOn = 'hard' | 'soft' | 'warn';
@@ -194,6 +194,16 @@ declare function isSessionError(err: unknown): err is SessionError;
194
194
  declare function isAgentError(err: unknown): err is AgentError;
195
195
 
196
196
  type Permission = 'auto' | 'confirm' | 'deny';
197
+ /**
198
+ * Risk tier for tools in YOLO mode. Even in YOLO, tools classified as
199
+ * `destructive` still prompt for confirmation unless `--force-all-yolo`
200
+ * is set.
201
+ *
202
+ * - `safe` — read-only, no side effects (read, glob, grep, etc.)
203
+ * - `standard` — non-destructive writes and mutations (write, edit, bash with safe commands)
204
+ * - `destructive` — irreversible or broadside effects (recursive deletes, db drops, etc.)
205
+ */
206
+ type RiskTier = 'safe' | 'standard' | 'destructive';
197
207
  interface JSONSchema {
198
208
  type?: string;
199
209
  properties?: Record<string, JSONSchema>;
@@ -243,6 +253,13 @@ interface Tool<I = unknown, O = unknown> {
243
253
  inputSchema: JSONSchema;
244
254
  permission: Permission;
245
255
  mutating: boolean;
256
+ /**
257
+ * Risk tier for selective YOLO gating. When YOLO is active, `destructive`
258
+ * tools still emit `confirm` unless `forceAllYolo` is set. Defaults to
259
+ * `standard` when omitted — callers should always check `riskTier` after
260
+ * the basic permission decision.
261
+ */
262
+ riskTier?: RiskTier;
246
263
  /**
247
264
  * Input-field name that the permission policy should match trust rules
248
265
  * against. Without this, the policy falls back to a heuristic
@@ -937,4 +954,4 @@ declare class Context implements RunEnv {
937
954
  usage(): Usage;
938
955
  }
939
956
 
940
- export { isWrongStackError as $, AgentError as A, type ToolStreamEvent as B, type Capabilities as C, type ToolUseBlock as D, type ErrorCode as E, type FileSnapshot as F, asBlocks as G, asText as H, type ImageBlock as I, type JSONSchema as J, isAgentError as K, isConfigError as L, type Message as M, isImageBlock as N, isPluginError as O, type Permission as P, isSessionError as Q, type Request as R, type SessionData as S, type TextBlock as T, type Usage as U, isTextBlock as V, WrongStackError as W, isThinkingBlock as X, isToolError as Y, isToolResultBlock as Z, isToolUseBlock as _, ConfigError as a, toWrongStackError as a0, Context as a1, type TokenCounter as a2, type CacheStats as a3, type ContextInit as a4, ConversationState as a5, type ReadonlyConversationState as a6, type RunEnv as a7, type RunOptions as a8, type StateChange as a9, type StateChangeHandler as aa, type TodoItem as ab, extractRunEnv as ac, wrapAsState as ad, type ContentBlock as b, type ErrorSeverity as c, type ErrorSubsystem as d, type MessageRole as e, PluginError as f, type Provider as g, ProviderError as h, type ProviderErrorBody as i, type Response as j, type ResumedSession as k, SessionError as l, type SessionEvent as m, type SessionMetadata as n, type SessionStore as o, type SessionSummary as p, type SessionWriter as q, type StopReason as r, type StreamEvent as s, type ThinkingBlock as t, type Tool as u, type ToolCallContext as v, ToolError as w, type ToolFinalEvent as x, type ToolProgressEvent as y, type ToolResultBlock as z };
957
+ export { isToolUseBlock as $, AgentError as A, type ToolResultBlock as B, type Capabilities as C, type ToolStreamEvent as D, type ErrorCode as E, type FileSnapshot as F, type ToolUseBlock as G, asBlocks as H, type ImageBlock as I, type JSONSchema as J, asText as K, isAgentError as L, type Message as M, isConfigError as N, isImageBlock as O, type Permission as P, isPluginError as Q, type Request as R, type SessionData as S, type TextBlock as T, type Usage as U, isSessionError as V, WrongStackError as W, isTextBlock as X, isThinkingBlock as Y, isToolError as Z, isToolResultBlock as _, ConfigError as a, isWrongStackError as a0, toWrongStackError as a1, Context as a2, type TokenCounter as a3, type CacheStats as a4, type TodoItem as a5, ConversationState as a6, type ContextInit as a7, type ReadonlyConversationState as a8, type RunEnv as a9, type RunOptions as aa, type StateChange as ab, type StateChangeHandler as ac, extractRunEnv as ad, wrapAsState as ae, type ContentBlock as b, type ErrorSeverity as c, type ErrorSubsystem as d, type MessageRole as e, PluginError as f, type Provider as g, ProviderError as h, type ProviderErrorBody as i, type Response as j, type ResumedSession as k, type RiskTier as l, SessionError as m, type SessionEvent as n, type SessionMetadata as o, type SessionStore as p, type SessionSummary as q, type SessionWriter as r, type StopReason as s, type StreamEvent as t, type ThinkingBlock as u, type Tool as v, type ToolCallContext as w, ToolError as x, type ToolFinalEvent as y, type ToolProgressEvent as z };
@@ -1,13 +1,13 @@
1
- export { A as ALL_FLEET_AGENTS, a as AUDIT_LOG_AGENT, b as AgentFactory, c as AgentFactoryResult, d as AgentRunnerOptions, B as BUG_HUNTER_AGENT, C as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, e as DEFAULT_SUBAGENT_BASELINE, f as DefaultMultiAgentCoordinator, g as DelegateHost, h as Director, i as DirectorBudgetError, j as DirectorPromptParts, k as DirectorSessionFactory, l as DirectorSessionFactoryOptions, F as FLEET_ROSTER, n as FleetBus, o as FleetEvent, p as FleetHandler, q as FleetUsage, r as FleetUsageAggregator, M as MultiAgentCoordinatorOptions, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, s as SubagentPromptParts, t as SubagentUsageSnapshot, v as composeDirectorPrompt, w as composeSubagentPrompt, x as createDelegateTool, y as makeAgentSubagentRunner, z as makeDirectorSessionFactory, E as rosterSummaryFromConfigs } from '../index-CcbWbcpy.js';
2
- export { n as BudgetExceededError, o as BudgetKind, p as BudgetLimits, s as BudgetThresholdDecision, t as BudgetThresholdHandler, u as BudgetThresholdSignal, q as BudgetUsage, r as SubagentBudget } from '../multi-agent-D6S4Z7H8.js';
3
- export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-EiUFe3if.js';
4
- import '../context-PH4DvBZV.js';
5
- import '../events-oxn-Wkub.js';
1
+ export { A as ALL_FLEET_AGENTS, a as AUDIT_LOG_AGENT, b as AgentFactory, c as AgentFactoryResult, d as AgentRunnerOptions, B as BUG_HUNTER_AGENT, C as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, e as DEFAULT_SUBAGENT_BASELINE, f as DefaultMultiAgentCoordinator, g as DelegateHost, h as Director, i as DirectorBudgetError, j as DirectorPromptParts, k as DirectorSessionFactory, l as DirectorSessionFactoryOptions, F as FLEET_ROSTER, n as FleetBus, o as FleetEvent, p as FleetHandler, q as FleetUsage, r as FleetUsageAggregator, M as MultiAgentCoordinatorOptions, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, s as SubagentPromptParts, t as SubagentUsageSnapshot, v as composeDirectorPrompt, w as composeSubagentPrompt, x as createDelegateTool, y as makeAgentSubagentRunner, z as makeDirectorSessionFactory, E as rosterSummaryFromConfigs } from '../index-De4R4rQ7.js';
2
+ export { n as BudgetExceededError, o as BudgetKind, p as BudgetLimits, s as BudgetThresholdDecision, t as BudgetThresholdHandler, u as BudgetThresholdSignal, q as BudgetUsage, r as SubagentBudget } from '../multi-agent-Cv8wk47i.js';
3
+ export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-B07AYFBk.js';
4
+ import '../context-CLZXPPYk.js';
5
+ import '../events-qnDZbrtb.js';
6
6
  import 'node:events';
7
- import '../index-a12jc7-r.js';
7
+ import '../index-DPLJw_ZI.js';
8
8
  import '../logger-BMQgxvdy.js';
9
- import '../system-prompt-BJlzKGO6.js';
9
+ import '../system-prompt-DI4Dtc1I.js';
10
10
  import '../observability-BhnVLBLS.js';
11
- import '../secret-scrubber-CB11A2P7.js';
12
- import '../config-BOD_HQBw.js';
11
+ import '../secret-scrubber-BhJTNr9v.js';
12
+ import '../config-BgM0BIpz.js';
13
13
  import '../models-registry-Y2xbog0E.js';
@@ -1,35 +1,35 @@
1
1
  export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-BH6AE0W9.js';
2
- 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, j as DirectorStateCheckpoint, k as DirectorStateSnapshot, l as DirectorSubagentState, m as DirectorTaskState, M as MemoryStoreOptions, n as MigrationContext, o as MigrationResult, P as PersistedQueueItem, p as PlanFile, q as PlanItem, Q as QueueStore, R as RecoveryLock, r as RecoveryLockOptions, S as SessionAnalyzer, s as SessionStoreOptions, T as TodosCheckpointFile, t as addPlanItem, u as attachPlanCheckpoint, v as attachTodosCheckpoint, w as clearPlan, x as emptyPlan, y as formatPlan, z as loadDirectorState, B as loadPlan, E as loadTodosCheckpoint, F as removePlanItem, G as runConfigMigrations, H as savePlan, I as saveTodosCheckpoint, J as setPlanItemStatus } from '../director-state-CVzkjKRZ.js';
3
- export { D as DefaultSessionReader } from '../session-reader-1tOyoY1s.js';
4
- 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-EqFa0SyI.js';
2
+ 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, j as DirectorStateCheckpoint, k as DirectorStateSnapshot, l as DirectorSubagentState, m as DirectorTaskState, M as MemoryStoreOptions, n as MigrationContext, o as MigrationResult, P as PersistedQueueItem, p as PlanFile, q as PlanItem, Q as QueueStore, R as RecoveryLock, r as RecoveryLockOptions, S as SessionAnalyzer, s as SessionStoreOptions, T as TodosCheckpointFile, t as addPlanItem, u as attachPlanCheckpoint, v as attachTodosCheckpoint, w as clearPlan, x as emptyPlan, y as formatPlan, z as loadDirectorState, B as loadPlan, E as loadTodosCheckpoint, F as removePlanItem, G as runConfigMigrations, H as savePlan, I as saveTodosCheckpoint, J as setPlanItemStatus } from '../director-state-BUxlqkOa.js';
3
+ export { D as DefaultSessionReader } from '../session-reader-4jxsYLZ8.js';
4
+ 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-Z_VXuXQT.js';
5
5
  export { AutoApprovePermissionPolicy, DefaultPermissionPolicy, PermissionPolicyOptions } from '../security/index.js';
6
- export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, T as ToolExecutor } from '../tool-executor-B6kRcWeF.js';
6
+ export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, T as ToolExecutor } from '../tool-executor-DSvmOBe6.js';
7
7
  export { AutoCompactionMiddleware, AutonomousRunner, AutonomousRunnerOptions, DefaultSkillLoader, DoneCheckResult, DoneConditionChecker, IntelligentCompactor, IntelligentCompactorOptions, SelectiveCompactor, SelectiveCompactorOptions, SkillLoaderOptions } from '../execution/index.js';
8
- import { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-DGisz_lG.js';
9
- import { j as Response } from '../context-PH4DvBZV.js';
10
- export { A as ALL_FLEET_AGENTS, a as AUDIT_LOG_AGENT, b as AgentFactory, c as AgentFactoryResult, d as AgentRunnerOptions, B as BUG_HUNTER_AGENT, C as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, e as DEFAULT_SUBAGENT_BASELINE, f as DefaultMultiAgentCoordinator, g as DelegateHost, h as Director, i as DirectorBudgetError, j as DirectorPromptParts, k as DirectorSessionFactory, l as DirectorSessionFactoryOptions, F as FLEET_ROSTER, m as FLEET_ROSTER_BUDGETS, n as FleetBus, o as FleetEvent, p as FleetHandler, q as FleetUsage, r as FleetUsageAggregator, M as MultiAgentCoordinatorOptions, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, s as SubagentPromptParts, t as SubagentUsageSnapshot, u as applyRosterBudget, v as composeDirectorPrompt, w as composeSubagentPrompt, x as createDelegateTool, y as makeAgentSubagentRunner, z as makeDirectorSessionFactory, E as rosterSummaryFromConfigs } from '../index-CcbWbcpy.js';
11
- export { n as BudgetExceededError, o as BudgetKind, p as BudgetLimits, q as BudgetUsage, r as SubagentBudget } from '../multi-agent-D6S4Z7H8.js';
12
- export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-EiUFe3if.js';
8
+ import { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-3SHqk9zB.js';
9
+ import { j as Response } from '../context-CLZXPPYk.js';
10
+ export { A as ALL_FLEET_AGENTS, a as AUDIT_LOG_AGENT, b as AgentFactory, c as AgentFactoryResult, d as AgentRunnerOptions, B as BUG_HUNTER_AGENT, C as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, e as DEFAULT_SUBAGENT_BASELINE, f as DefaultMultiAgentCoordinator, g as DelegateHost, h as Director, i as DirectorBudgetError, j as DirectorPromptParts, k as DirectorSessionFactory, l as DirectorSessionFactoryOptions, F as FLEET_ROSTER, m as FLEET_ROSTER_BUDGETS, n as FleetBus, o as FleetEvent, p as FleetHandler, q as FleetUsage, r as FleetUsageAggregator, M as MultiAgentCoordinatorOptions, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, s as SubagentPromptParts, t as SubagentUsageSnapshot, u as applyRosterBudget, v as composeDirectorPrompt, w as composeSubagentPrompt, x as createDelegateTool, y as makeAgentSubagentRunner, z as makeDirectorSessionFactory, E as rosterSummaryFromConfigs } from '../index-De4R4rQ7.js';
11
+ export { n as BudgetExceededError, o as BudgetKind, p as BudgetLimits, q as BudgetUsage, r as SubagentBudget } from '../multi-agent-Cv8wk47i.js';
12
+ export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-B07AYFBk.js';
13
13
  export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-DqzwpBQy.js';
14
14
  export { DefaultModeStore, LLMSelector, LLMSelectorOptions, ModeLoaderOptions, loadProjectModes, loadUserModes } from '../models/index.js';
15
15
  export { AISpecBuilder, AISpecBuilderOptions, AISpecPhase, AISpecSession, AutoExecutor, AutoExecutorOptions, BottleneckTask, CollectedAnswer, CriticalPathAnalysis, DefaultTaskStore, ExecutionSummary, GeneratedTask, SPEC_TEMPLATES, SpecDiff, SpecDrivenDev, SpecDrivenDevOptions, SpecIndexEntry, SpecParser, SpecStore, SpecStoreOptions, SpecVersion, SpecVersioning, TaskExecutionContext, TaskExecutionResult, TaskFlow, TaskFlowEventMap, TaskFlowEventName, TaskFlowExecutionContext, TaskFlowOptions, TaskFlowPhase, TaskGenerator, TaskGeneratorOptions, TaskGraphIndexEntry, TaskGraphStore, TaskGraphStoreOptions, TaskStore, TaskTracker, TaskTrackerOptions, TaskTransition, analyzeCriticalPath, createAutoExecutor, getTemplate, listTemplates, renderProgress, renderSpecAnalysis, renderTaskGraph, renderTaskList, templateToMarkdown } from '../sdd/index.js';
16
16
  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';
17
- 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-uPmBxZ1B.js';
17
+ 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-CSMfaBuL.js';
18
18
  import '../logger-BMQgxvdy.js';
19
- import '../events-oxn-Wkub.js';
19
+ import '../events-qnDZbrtb.js';
20
20
  import '../memory-CEXuo7sz.js';
21
- import '../wstack-paths-BGu2INTm.js';
22
- import '../config-BOD_HQBw.js';
21
+ import '../wstack-paths-86YPFktR.js';
22
+ import '../config-BgM0BIpz.js';
23
23
  import '../models-registry-Y2xbog0E.js';
24
24
  import '../secret-vault-DoISxaKO.js';
25
- import '../secret-scrubber-CB11A2P7.js';
25
+ import '../secret-scrubber-BhJTNr9v.js';
26
26
  import '../input-reader-E-ffP2ee.js';
27
- import '../compactor-BP4xhKVi.js';
28
- import '../retry-policy-DUJ8-Qc_.js';
29
- import '../index-a12jc7-r.js';
30
- import '../system-prompt-BJlzKGO6.js';
27
+ import '../compactor-BWhJXxsW.js';
28
+ import '../retry-policy-LLUxJmYY.js';
29
+ import '../index-DPLJw_ZI.js';
30
+ import '../system-prompt-DI4Dtc1I.js';
31
31
  import '../observability-BhnVLBLS.js';
32
- import '../selector-yqyxt-Ii.js';
32
+ import '../selector-DB2-byKH.js';
33
33
  import '../skill-CxuWrsKK.js';
34
34
  import 'node:events';
35
35
  import '../mode-CV077NjV.js';
@@ -1052,6 +1052,16 @@ function labelOf(scope) {
1052
1052
  }
1053
1053
 
1054
1054
  // src/storage/config-store.ts
1055
+ function stripEphemeralFields(cfg) {
1056
+ const env = cfg._envSource;
1057
+ if (!env?.size) return cfg;
1058
+ const out = { ...cfg };
1059
+ for (const field of env) {
1060
+ delete out[field];
1061
+ }
1062
+ delete out._envSource;
1063
+ return out;
1064
+ }
1055
1065
  var DefaultConfigStore = class {
1056
1066
  current;
1057
1067
  watchers = /* @__PURE__ */ new Set();
@@ -1069,7 +1079,8 @@ var DefaultConfigStore = class {
1069
1079
  return ext ? ext : FROZEN_EMPTY;
1070
1080
  }
1071
1081
  update(partial) {
1072
- const next = deepFreeze(structuredClone({ ...this.current, ...partial }));
1082
+ const scrubbed = stripEphemeralFields(partial);
1083
+ const next = deepFreeze(structuredClone({ ...this.current, ...scrubbed }));
1073
1084
  if (next.version !== 1) {
1074
1085
  throw new Error(`ConfigStore.update: version must remain 1, got ${String(next.version)}`);
1075
1086
  }
@@ -1240,15 +1251,19 @@ var BEHAVIOR_DEFAULTS = {
1240
1251
  var ENV_MAP = {
1241
1252
  WRONGSTACK_PROVIDER: (c, v) => {
1242
1253
  c.provider = v;
1254
+ (c._envSource ??= /* @__PURE__ */ new Set()).add("provider");
1243
1255
  },
1244
1256
  WRONGSTACK_MODEL: (c, v) => {
1245
1257
  c.model = v;
1258
+ (c._envSource ??= /* @__PURE__ */ new Set()).add("model");
1246
1259
  },
1247
1260
  WRONGSTACK_API_KEY: (c, v) => {
1248
1261
  c.apiKey = v;
1262
+ (c._envSource ??= /* @__PURE__ */ new Set()).add("apiKey");
1249
1263
  },
1250
1264
  WRONGSTACK_BASE_URL: (c, v) => {
1251
1265
  c.baseUrl = v;
1266
+ (c._envSource ??= /* @__PURE__ */ new Set()).add("baseUrl");
1252
1267
  },
1253
1268
  WRONGSTACK_LOG_LEVEL: (c, v) => {
1254
1269
  if (!c.log) c.log = { level: "info" };
@@ -2279,7 +2294,15 @@ var PATTERNS = [
2279
2294
  type: "stripe_key",
2280
2295
  regex: /(?<![A-Za-z0-9])sk_(?:live|test)_[A-Za-z0-9]{24,}(?![A-Za-z0-9])/g
2281
2296
  },
2282
- { type: "twilio_sid", regex: /(?<![A-Za-z0-9])AC[a-f0-9]{32}(?![A-Za-z0-9])/g },
2297
+ {
2298
+ type: "twilio_sid",
2299
+ regex: /(?<![A-Za-z0-9])AC[a-f0-9]{32}(?![A-Za-z0-9])/g
2300
+ },
2301
+ {
2302
+ type: "telegram_bot_token",
2303
+ // Telegram tokens are of the form bot<digits>:<alphanum> in URL paths
2304
+ regex: /\/bot\d+:[A-Za-z0-9_-]{20,}(?![A-Za-z0-9_-])/g
2305
+ },
2283
2306
  {
2284
2307
  type: "jwt",
2285
2308
  // Anchored: look for literal "eyJ" which is unambiguous for JWT header
@@ -2635,6 +2658,7 @@ var DefaultPermissionPolicy = class {
2635
2658
  loaded = false;
2636
2659
  trustFile;
2637
2660
  yolo;
2661
+ forceAllYolo;
2638
2662
  /**
2639
2663
  * Session-scoped "soft deny" map. When the user presses 'n' (block once),
2640
2664
  * the tool+pattern is added here. If the LLM retries in the same session,
@@ -2667,6 +2691,7 @@ var DefaultPermissionPolicy = class {
2667
2691
  constructor(opts) {
2668
2692
  this.trustFile = opts.trustFile;
2669
2693
  this.yolo = opts.yolo ?? false;
2694
+ this.forceAllYolo = opts.forceAllYolo ?? false;
2670
2695
  this.promptDelegate = opts.promptDelegate;
2671
2696
  }
2672
2697
  /**
@@ -2686,6 +2711,14 @@ var DefaultPermissionPolicy = class {
2686
2711
  getYolo() {
2687
2712
  return this.yolo;
2688
2713
  }
2714
+ /** Toggle force-all-YOLO at runtime. */
2715
+ setForceAllYolo(enabled) {
2716
+ this.forceAllYolo = enabled;
2717
+ }
2718
+ /** Check whether force-all-YOLO is active. */
2719
+ getForceAllYolo() {
2720
+ return this.forceAllYolo;
2721
+ }
2689
2722
  async reload() {
2690
2723
  try {
2691
2724
  const raw = await fsp.readFile(this.trustFile, "utf8");
@@ -2727,6 +2760,21 @@ var DefaultPermissionPolicy = class {
2727
2760
  return { permission: "auto", source: "trust" };
2728
2761
  }
2729
2762
  if (this.yolo) {
2763
+ if (tool.riskTier === "destructive" && !this.forceAllYolo) {
2764
+ if (this.promptDelegate) {
2765
+ const decision = await this.promptDelegate(tool, input, subject ?? tool.name);
2766
+ if (decision === "always") {
2767
+ await this.trust({ tool: tool.name, pattern: subject ?? tool.name });
2768
+ return { permission: "auto", source: "user", reason: "destructive yolo always-allowed" };
2769
+ }
2770
+ if (decision === "deny") {
2771
+ await this.deny({ tool: tool.name, pattern: subject ?? tool.name });
2772
+ return { permission: "deny", source: "user", reason: "user denied destructive yolo" };
2773
+ }
2774
+ return { permission: decision === "yes" ? "auto" : "deny", source: "user" };
2775
+ }
2776
+ return { permission: "confirm", source: "yolo_destructive", riskTier: "destructive", reason: "destructive tool needs explicit approval even in yolo mode" };
2777
+ }
2730
2778
  return { permission: "auto", source: "yolo" };
2731
2779
  }
2732
2780
  if (tool.name === "write" && subject) {