@wrongstack/core 0.7.0 → 0.7.2

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 (52) hide show
  1. package/dist/{agent-bridge-CrQpYjM7.d.ts → agent-bridge-Bji75Iv9.d.ts} +1 -1
  2. package/dist/{compactor-CWV1u-IU.d.ts → compactor-BFKGzKd5.d.ts} +1 -1
  3. package/dist/{config-C34JRwl4.d.ts → config-BXAhlqJb.d.ts} +1 -1
  4. package/dist/{context-bmR0YgBm.d.ts → context-BwxhvyW8.d.ts} +4 -0
  5. package/dist/coordination/index.d.ts +41 -11
  6. package/dist/coordination/index.js +2522 -33
  7. package/dist/coordination/index.js.map +1 -1
  8. package/dist/defaults/index.d.ts +20 -20
  9. package/dist/defaults/index.js +2783 -228
  10. package/dist/defaults/index.js.map +1 -1
  11. package/dist/{director-state-BmYi3DGA.d.ts → director-state-BUB7JRUr.d.ts} +1 -1
  12. package/dist/{events-CEKFTmIY.d.ts → events-AjrvHJ9V.d.ts} +25 -1
  13. package/dist/execution/index.d.ts +35 -12
  14. package/dist/execution/index.js +2406 -21
  15. package/dist/execution/index.js.map +1 -1
  16. package/dist/extension/index.d.ts +6 -6
  17. package/dist/{index-BJIFLGII.d.ts → index-B2WWETRP.d.ts} +6 -6
  18. package/dist/index.d.ts +35 -27
  19. package/dist/index.js +2810 -215
  20. package/dist/index.js.map +1 -1
  21. package/dist/infrastructure/index.d.ts +6 -6
  22. package/dist/infrastructure/index.js +12 -0
  23. package/dist/infrastructure/index.js.map +1 -1
  24. package/dist/kernel/index.d.ts +9 -9
  25. package/dist/kernel/index.js +12 -0
  26. package/dist/kernel/index.js.map +1 -1
  27. package/dist/{mcp-servers-BRJicm5o.d.ts → mcp-servers-BDM2Leff.d.ts} +3 -3
  28. package/dist/models/index.d.ts +2 -2
  29. package/dist/{multi-agent-Cm1wYSrw.d.ts → multi-agent-DenFfUv5.d.ts} +6 -3
  30. package/dist/{multi-agent-coordinator-CCupVFqv.d.ts → multi-agent-coordinator-DGUn-5Bb.d.ts} +165 -4
  31. package/dist/{index-CZR0HjxM.d.ts → null-fleet-bus-DJMbqYhL.d.ts} +98 -7
  32. package/dist/observability/index.d.ts +2 -2
  33. package/dist/{path-resolver-CfT7e_HT.d.ts → path-resolver-C1NM67-u.d.ts} +2 -2
  34. package/dist/{plan-templates-Q78an-GJ.d.ts → plan-templates-CNY6f82B.d.ts} +4 -4
  35. package/dist/{provider-runner-WDj28o7J.d.ts → provider-runner-Cmuevptw.d.ts} +3 -3
  36. package/dist/{retry-policy-Dpxp4SET.d.ts → retry-policy-mEBn5qpv.d.ts} +1 -1
  37. package/dist/sdd/index.d.ts +3 -3
  38. package/dist/{secret-scrubber-CowtdEF8.d.ts → secret-scrubber-BmiGszvl.d.ts} +1 -1
  39. package/dist/{secret-scrubber-C2YCYtkn.d.ts → secret-scrubber-bZ5AyhwJ.d.ts} +1 -1
  40. package/dist/security/index.d.ts +3 -3
  41. package/dist/{selector-CP39HhCe.d.ts → selector-BmUma5iG.d.ts} +1 -1
  42. package/dist/{session-reader-Dwjn4WZR.d.ts → session-reader-g-FKCyBw.d.ts} +1 -1
  43. package/dist/storage/index.d.ts +6 -6
  44. package/dist/storage/index.js +8 -4
  45. package/dist/storage/index.js.map +1 -1
  46. package/dist/{system-prompt-CfgXqyv2.d.ts → system-prompt-BKrzd_ci.d.ts} +1 -1
  47. package/dist/{tool-executor-D5NFi_LV.d.ts → tool-executor-BoM0U0qn.d.ts} +5 -4
  48. package/dist/types/index.d.ts +15 -15
  49. package/dist/types/index.js +29 -0
  50. package/dist/types/index.js.map +1 -1
  51. package/dist/utils/index.d.ts +1 -1
  52. package/package.json +1 -1
@@ -1,8 +1,33 @@
1
- import { a as DirectorStateSnapshot } from './director-state-BmYi3DGA.js';
2
- import { c as SubagentConfig, j as TaskResult, a as CoordinatorStatus, k as TaskSpec, M as MultiAgentConfig, i as SubagentRunner } from './multi-agent-Cm1wYSrw.js';
3
- import { t as SessionWriter, x as Tool, r as SessionStore } from './context-bmR0YgBm.js';
4
- import { I as InMemoryAgentBridge } from './agent-bridge-CrQpYjM7.js';
5
- import { F as FleetBus, e as FleetUsage, f as FleetUsageAggregator } from './multi-agent-coordinator-CCupVFqv.js';
1
+ import { e as AgentPhase, A as AgentDefinition, F as FleetBus, o as FleetUsage, p as FleetUsageAggregator } from './multi-agent-coordinator-DGUn-5Bb.js';
2
+ import { c as SubagentConfig, j as TaskResult, a as CoordinatorStatus, k as TaskSpec, M as MultiAgentConfig, i as SubagentRunner } from './multi-agent-DenFfUv5.js';
3
+ import { t as SessionWriter, x as Tool, r as SessionStore } from './context-BwxhvyW8.js';
4
+ import { D as DirectorStateSnapshot } from './director-state-BUB7JRUr.js';
5
+ import { I as InMemoryAgentBridge } from './agent-bridge-Bji75Iv9.js';
6
+ import { E as EventBus } from './events-AjrvHJ9V.js';
7
+
8
+ /**
9
+ * Agent catalog aggregator.
10
+ *
11
+ * Collects every phase's `AgentDefinition[]` into:
12
+ * - `ALL_AGENT_DEFINITIONS` — flat list, catalog order (phase 1 → 9)
13
+ * - `AGENT_CATALOG` — keyed by role for O(1) lookup
14
+ * - `AGENTS_BY_PHASE` — grouped for statusline / dispatcher tie-breaks
15
+ *
16
+ * `fleet.ts` derives `FLEET_ROSTER` + `FLEET_ROSTER_BUDGETS` from this, and the
17
+ * dispatcher routes free-form tasks against `capability` metadata here.
18
+ */
19
+
20
+ /** Every catalog agent, in phase order. */
21
+ declare const ALL_AGENT_DEFINITIONS: AgentDefinition[];
22
+ /** Phase → its agents, for grouped display and dispatcher fallbacks. */
23
+ declare const AGENTS_BY_PHASE: Record<AgentPhase, AgentDefinition[]>;
24
+ /**
25
+ * Role → definition. Built once at module load. Throws on a duplicate role so
26
+ * a copy-paste collision fails loudly at startup instead of silently shadowing.
27
+ */
28
+ declare const AGENT_CATALOG: Record<string, AgentDefinition>;
29
+ /** Role lookup helper. Returns undefined for unknown roles. */
30
+ declare function getAgentDefinition(role: string): AgentDefinition | undefined;
6
31
 
7
32
  /**
8
33
  * Interface for a fleet coordinator. Implemented by both `Director`
@@ -575,6 +600,9 @@ declare class Director implements ICoordinator {
575
600
  /** Snapshot of which subagent owns each task — drives state-checkpoint
576
601
  * status updates without re-walking the manifest. */
577
602
  private readonly taskOwners;
603
+ /** Cumulative auto-extension grants per subagent (all budget kinds). Lets
604
+ * /fleet render "⚡ extended ×N" without replaying the event stream. */
605
+ private readonly extendTotals;
578
606
  /**
579
607
  * Handle to the coordinator-side `task.completed` listener so we can
580
608
  * unsubscribe in `shutdown()`. Without this, repeated Director
@@ -584,6 +612,14 @@ declare class Director implements ICoordinator {
584
612
  */
585
613
  private taskCompletedListener;
586
614
  constructor(opts: DirectorOptions);
615
+ /**
616
+ * Record a granted budget extension and broadcast it on the FleetBus so
617
+ * the host can re-emit `subagent.budget_extended` for live UI badges.
618
+ * Called from both the timeout heartbeat path and the per-kind grant path.
619
+ */
620
+ private recordExtension;
621
+ /** Cumulative auto-extension count for one subagent (0 when never extended). */
622
+ extensionsFor(subagentId: string): number;
587
623
  /** Best-effort session-writer append. Swallows failures — the director
588
624
  * must not break a fleet run because the session JSONL handle closed. */
589
625
  private appendSessionEvent;
@@ -1063,7 +1099,12 @@ declare const REFACTOR_PLANNER_AGENT: SubagentConfig;
1063
1099
  * Use for: CI checks, pre-release audits, dependency vulnerability scanning.
1064
1100
  */
1065
1101
  declare const SECURITY_SCANNER_AGENT: SubagentConfig;
1066
- /** All pre-built agents in a map for easy lookup by role. */
1102
+ /**
1103
+ * All agents in a map for easy lookup by role. The four legacy pre-built
1104
+ * agents plus the phase 1-9 catalog (`ALL_AGENT_DEFINITIONS`). Catalog roles
1105
+ * are guaranteed collision-free by the catalog builder; none overlap the
1106
+ * legacy four.
1107
+ */
1067
1108
  declare const FLEET_ROSTER: Record<string, SubagentConfig>;
1068
1109
  interface FleetRosterBudget {
1069
1110
  timeoutMs?: number;
@@ -1076,6 +1117,56 @@ declare const FLEET_ROSTER_BUDGETS: Record<string, FleetRosterBudget>;
1076
1117
  declare function applyRosterBudget(cfg: SubagentConfig): SubagentConfig;
1077
1118
  /** Quick-access list for spawning all at once. */
1078
1119
  declare const ALL_FLEET_AGENTS: SubagentConfig[];
1120
+ /** All ACP external agents. */
1121
+ declare const ACP_AGENTS: SubagentConfig[];
1122
+ /** Extended roster including ACP agents. */
1123
+ declare const FLEET_ROSTER_WITHACP: Record<string, SubagentConfig>;
1124
+
1125
+ /**
1126
+ * Default auto-extend policy for subagent budgets.
1127
+ *
1128
+ * The budget's soft-limit path (`SubagentBudget` → `budget.threshold_reached`)
1129
+ * only negotiates an extension when SOMETHING listens on the EventBus. Under a
1130
+ * `Director`, that listener is the director's own auto-extend handler. On the
1131
+ * plain coordinator path (e.g. a bare `/spawn` with no director) nothing
1132
+ * listens, so the budget falls back to a hard stop and the subagent dies the
1133
+ * moment it crosses a soft limit.
1134
+ *
1135
+ * `attachAutoExtend` is the additive fix: wire it to a subagent's EventBus and
1136
+ * budget overruns are auto-granted headroom instead of killing the run. It is
1137
+ * heartbeat-aware for the timeout kind — wall-clock time always advances, so a
1138
+ * naive "extend timeout forever" would let a wedged agent run indefinitely.
1139
+ * Instead, a timeout extension is granted only when the agent has executed a
1140
+ * new tool call or started a new iteration since the last timeout extension.
1141
+ * No progress since last time ⇒ the agent is genuinely stuck ⇒ deny and let it
1142
+ * fail. The non-timeout kinds (iterations/tool_calls/tokens/cost) extend up to
1143
+ * a per-kind cap, then deny — those ceilings are the real runaway guard.
1144
+ */
1145
+
1146
+ interface AutoExtendCeiling {
1147
+ maxIterations?: number;
1148
+ maxToolCalls?: number;
1149
+ maxTokens?: number;
1150
+ maxCostUsd?: number;
1151
+ timeoutMs?: number;
1152
+ }
1153
+ interface AutoExtendPolicy {
1154
+ /** Multiplier applied to the tripped limit when extending. Default 0.5 (+50%). */
1155
+ factor?: number;
1156
+ /**
1157
+ * Max extensions per NON-timeout kind before denying. Timeout is governed by
1158
+ * the heartbeat check, not this cap, so it can extend indefinitely while the
1159
+ * agent makes progress. Default 8.
1160
+ */
1161
+ maxExtensionsPerKind?: number;
1162
+ /** Absolute ceilings — an extension never pushes a limit past these. */
1163
+ ceiling?: AutoExtendCeiling;
1164
+ }
1165
+ /**
1166
+ * Attach an auto-extend policy to a subagent's EventBus. Returns an unsubscribe
1167
+ * function that detaches all listeners — call it when the subagent task ends.
1168
+ */
1169
+ declare function attachAutoExtend(events: EventBus, policy?: AutoExtendPolicy): () => void;
1079
1170
 
1080
1171
  /**
1081
1172
  * A no-op FleetBus that discards all events. Used when no real fleet
@@ -1086,4 +1177,4 @@ declare const ALL_FLEET_AGENTS: SubagentConfig[];
1086
1177
  */
1087
1178
  declare const NULL_FLEET_BUS: FleetBus;
1088
1179
 
1089
- export { ALL_FLEET_AGENTS as A, BUG_HUNTER_AGENT as B, type CreateDelegateToolOptions as C, DEFAULT_DIRECTOR_PREAMBLE as D, FLEET_ROSTER as F, type ICoordinator as I, NULL_FLEET_BUS as N, REFACTOR_PLANNER_AGENT as R, SECURITY_SCANNER_AGENT as S, AUDIT_LOG_AGENT as a, DEFAULT_SUBAGENT_BASELINE as b, type DelegateHost as c, Director as d, type DirectorPromptParts as e, type DirectorSessionFactory as f, type DirectorSessionFactoryOptions as g, FLEET_ROSTER_BUDGETS as h, FleetManager as i, type FleetManagerOptions as j, FleetSpawnBudgetError as k, type IFleetManager as l, type SubagentPromptParts as m, applyRosterBudget as n, composeDirectorPrompt as o, composeSubagentPrompt as p, createDelegateTool as q, makeDirectorSessionFactory as r, rosterSummaryFromConfigs as s, FleetCostCapError as t };
1180
+ export { ACP_AGENTS as A, BUG_HUNTER_AGENT as B, type CreateDelegateToolOptions as C, DEFAULT_DIRECTOR_PREAMBLE as D, createDelegateTool as E, FLEET_ROSTER as F, getAgentDefinition as G, makeDirectorSessionFactory as H, type ICoordinator as I, rosterSummaryFromConfigs as J, NULL_FLEET_BUS as N, REFACTOR_PLANNER_AGENT as R, SECURITY_SCANNER_AGENT as S, AGENTS_BY_PHASE as a, AGENT_CATALOG as b, ALL_AGENT_DEFINITIONS as c, ALL_FLEET_AGENTS as d, AUDIT_LOG_AGENT as e, type AutoExtendCeiling as f, type AutoExtendPolicy as g, DEFAULT_SUBAGENT_BASELINE as h, type DelegateHost as i, Director as j, type DirectorPromptParts as k, type DirectorSessionFactory as l, type DirectorSessionFactoryOptions as m, FLEET_ROSTER_BUDGETS as n, FLEET_ROSTER_WITHACP as o, FleetCostCapError as p, FleetManager as q, type FleetManagerOptions as r, type FleetRosterBudget as s, FleetSpawnBudgetError as t, type IFleetManager as u, type SubagentPromptParts as v, applyRosterBudget as w, attachAutoExtend as x, composeDirectorPrompt as y, composeSubagentPrompt as z };
@@ -1,6 +1,6 @@
1
1
  import { e as MetricsSink, M as MetricLabels, f as MetricsSnapshot, b as HealthRegistry, H as HealthCheck, A as AggregateHealth, T as Tracer, S as Span } from '../observability-BhnVLBLS.js';
2
- import { E as EventBus } from '../events-CEKFTmIY.js';
3
- import '../context-bmR0YgBm.js';
2
+ import { E as EventBus } from '../events-AjrvHJ9V.js';
3
+ import '../context-BwxhvyW8.js';
4
4
 
5
5
  /**
6
6
  * In-memory metrics sink. Suitable for embedded use, tests, and /metrics
@@ -1,6 +1,6 @@
1
- import { E as EventBus } from './events-CEKFTmIY.js';
1
+ import { E as EventBus } from './events-AjrvHJ9V.js';
2
2
  import { M as ModelsRegistry, b as ResolvedModel } from './models-registry-Y2xbog0E.js';
3
- import { a6 as TokenCounter, U as Usage, a7 as CacheStats } from './context-bmR0YgBm.js';
3
+ import { a6 as TokenCounter, U as Usage, a7 as CacheStats } from './context-BwxhvyW8.js';
4
4
  import { P as PathResolver } from './path-resolver-CPRj4bFY.js';
5
5
 
6
6
  /**
@@ -1,9 +1,9 @@
1
- import { E as EventBus } from './events-CEKFTmIY.js';
2
- import { r as SessionStore, q as SessionMetadata, t as SessionWriter, m as ResumedSession, S as SessionData, s as SessionSummary, b as ContentBlock, p as SessionEvent, a8 as TodoItem, a9 as ConversationState } from './context-bmR0YgBm.js';
3
- import { e as AttachmentStore, A as AddAttachmentInput, d as AttachmentRef, a as Attachment } from './session-reader-Dwjn4WZR.js';
1
+ import { E as EventBus } from './events-AjrvHJ9V.js';
2
+ import { r as SessionStore, q as SessionMetadata, t as SessionWriter, m as ResumedSession, S as SessionData, s as SessionSummary, b as ContentBlock, p as SessionEvent, a8 as TodoItem, a9 as ConversationState } from './context-BwxhvyW8.js';
3
+ import { e as AttachmentStore, A as AddAttachmentInput, d as AttachmentRef, a as Attachment } from './session-reader-g-FKCyBw.js';
4
4
  import { b as MemoryStore, a as MemoryScope } from './memory-CEXuo7sz.js';
5
5
  import { W as WstackPaths } from './wstack-paths-86YPFktR.js';
6
- import { c as ConfigStore, a as Config, b as ConfigLoader } from './config-C34JRwl4.js';
6
+ import { c as ConfigStore, a as Config, b as ConfigLoader } from './config-BXAhlqJb.js';
7
7
  import { S as SecretVault } from './secret-vault-DoISxaKO.js';
8
8
 
9
9
  interface SessionStoreOptions {
@@ -1,8 +1,8 @@
1
- import { E as EventBus } from './events-CEKFTmIY.js';
1
+ import { E as EventBus } from './events-AjrvHJ9V.js';
2
2
  import { L as Logger } from './logger-BMQgxvdy.js';
3
3
  import { T as Tracer } from './observability-BhnVLBLS.js';
4
- import { i as Provider, R as Request, a5 as Context, l as Response } from './context-bmR0YgBm.js';
5
- import { R as RetryPolicy } from './retry-policy-Dpxp4SET.js';
4
+ import { i as Provider, R as Request, a5 as Context, l as Response } from './context-BwxhvyW8.js';
5
+ import { R as RetryPolicy } from './retry-policy-mEBn5qpv.js';
6
6
 
7
7
  /**
8
8
  * Options passed to a ProviderRunner when calling the provider.
@@ -1,4 +1,4 @@
1
- import { l as Response, a5 as Context, j as ProviderError } from './context-bmR0YgBm.js';
1
+ import { l as Response, a5 as Context, j as ProviderError } from './context-BwxhvyW8.js';
2
2
 
3
3
  type RecoveryDecision = {
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  import { h as Specification, S as SpecAnalysis, g as SpecValidationResult, l as TaskGraph, m as TaskNode, k as TaskFilter, p as TaskSort, o as TaskProgress, r as TaskType, n as TaskPriority, e as SpecStatus, f as SpecTemplate, b as SpecRequirement } from '../task-graph-D1YQbpxF.js';
2
- import { E as EventBus } from '../events-CEKFTmIY.js';
3
- import { D as DoneCondition } from '../multi-agent-Cm1wYSrw.js';
4
- import '../context-bmR0YgBm.js';
2
+ import { E as EventBus } from '../events-AjrvHJ9V.js';
3
+ import { D as DoneCondition } from '../multi-agent-DenFfUv5.js';
4
+ import '../context-BwxhvyW8.js';
5
5
 
6
6
  declare class SpecParser {
7
7
  parse(content: string): Specification;
@@ -1,5 +1,5 @@
1
1
  import { S as SecretVault } from './secret-vault-DoISxaKO.js';
2
- import { S as SecretScrubber } from './secret-scrubber-C2YCYtkn.js';
2
+ import { S as SecretScrubber } from './secret-scrubber-bZ5AyhwJ.js';
3
3
 
4
4
  interface SecretVaultOptions {
5
5
  /** Absolute path to the key file. Created with mode 0o600 if missing. */
@@ -1,4 +1,4 @@
1
- import { x as Tool, a5 as Context, P as Permission } from './context-bmR0YgBm.js';
1
+ import { x as Tool, a5 as Context, P as Permission } from './context-BwxhvyW8.js';
2
2
 
3
3
  interface TrustPolicy {
4
4
  [toolNameOrPattern: string]: {
@@ -1,7 +1,7 @@
1
- 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-CowtdEF8.js';
2
- import { x as Tool, a5 as Context } from '../context-bmR0YgBm.js';
1
+ 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-BmiGszvl.js';
2
+ import { x as Tool, a5 as Context } from '../context-BwxhvyW8.js';
3
3
  import { I as InputReader } from '../input-reader-E-ffP2ee.js';
4
- import { a as PermissionPolicy, P as PermissionDecision } from '../secret-scrubber-C2YCYtkn.js';
4
+ import { a as PermissionPolicy, P as PermissionDecision } from '../secret-scrubber-bZ5AyhwJ.js';
5
5
  import '../secret-vault-DoISxaKO.js';
6
6
 
7
7
  interface PermissionPolicyOptions {
@@ -1,4 +1,4 @@
1
- import { M as Message } from './context-bmR0YgBm.js';
1
+ import { M as Message } from './context-BwxhvyW8.js';
2
2
 
3
3
  /**
4
4
  * Result of LLM-driven message importance analysis.
@@ -1,4 +1,4 @@
1
- import { b as ContentBlock, p as SessionEvent, q as SessionMetadata, r as SessionStore } from './context-bmR0YgBm.js';
1
+ import { b as ContentBlock, p as SessionEvent, q as SessionMetadata, r as SessionStore } from './context-BwxhvyW8.js';
2
2
 
3
3
  type AttachmentKind = 'text' | 'image' | 'file';
4
4
  interface AttachmentMeta {
@@ -1,13 +1,13 @@
1
- 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-Q78an-GJ.js';
2
- export { D as DefaultSessionReader } from '../session-reader-Dwjn4WZR.js';
1
+ 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-CNY6f82B.js';
2
+ export { D as DefaultSessionReader } from '../session-reader-g-FKCyBw.js';
3
3
  import { S as SessionRewinder, C as CheckpointInfo, a as RewindResultExtended } from '../session-rewinder-C9HnMkhP.js';
4
- export { D as DirectorStateCheckpoint, a as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from '../director-state-BmYi3DGA.js';
4
+ export { a as DirectorStateCheckpoint, D as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from '../director-state-BUB7JRUr.js';
5
5
  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-HHgaq5ue.js';
6
- import '../events-CEKFTmIY.js';
7
- import '../context-bmR0YgBm.js';
6
+ import '../events-AjrvHJ9V.js';
7
+ import '../context-BwxhvyW8.js';
8
8
  import '../memory-CEXuo7sz.js';
9
9
  import '../wstack-paths-86YPFktR.js';
10
- import '../config-C34JRwl4.js';
10
+ import '../config-BXAhlqJb.js';
11
11
  import '../models-registry-Y2xbog0E.js';
12
12
  import '../secret-vault-DoISxaKO.js';
13
13
 
@@ -1199,19 +1199,23 @@ var BEHAVIOR_DEFAULTS = {
1199
1199
  var ENV_MAP = {
1200
1200
  WRONGSTACK_PROVIDER: (c, v) => {
1201
1201
  c.provider = v;
1202
- (c._envSource ??= /* @__PURE__ */ new Set()).add("provider");
1202
+ if (c._envSource === void 0) c._envSource = /* @__PURE__ */ new Set();
1203
+ c._envSource.add("provider");
1203
1204
  },
1204
1205
  WRONGSTACK_MODEL: (c, v) => {
1205
1206
  c.model = v;
1206
- (c._envSource ??= /* @__PURE__ */ new Set()).add("model");
1207
+ if (c._envSource === void 0) c._envSource = /* @__PURE__ */ new Set();
1208
+ c._envSource.add("model");
1207
1209
  },
1208
1210
  WRONGSTACK_API_KEY: (c, v) => {
1209
1211
  c.apiKey = v;
1210
- (c._envSource ??= /* @__PURE__ */ new Set()).add("apiKey");
1212
+ if (c._envSource === void 0) c._envSource = /* @__PURE__ */ new Set();
1213
+ c._envSource.add("apiKey");
1211
1214
  },
1212
1215
  WRONGSTACK_BASE_URL: (c, v) => {
1213
1216
  c.baseUrl = v;
1214
- (c._envSource ??= /* @__PURE__ */ new Set()).add("baseUrl");
1217
+ if (c._envSource === void 0) c._envSource = /* @__PURE__ */ new Set();
1218
+ c._envSource.add("baseUrl");
1215
1219
  },
1216
1220
  WRONGSTACK_LOG_LEVEL: (c, v) => {
1217
1221
  if (!c.log) c.log = { level: "info" };