@wrongstack/core 0.272.0 → 0.272.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 (47) hide show
  1. package/dist/{agent-bridge-jVSZiygR.d.ts → agent-bridge-DFQYEeXf.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-DOLIwBRo.d.ts → agent-subagent-runner-BZa_IEcd.d.ts} +4 -4
  3. package/dist/{brain-CdbbJWi3.d.ts → brain-etbcbRwV.d.ts} +24 -1
  4. package/dist/{config-D2DGoGSQ.d.ts → config-rRS8yorV.d.ts} +43 -1
  5. package/dist/coordination/index.d.ts +74 -14
  6. package/dist/coordination/index.js +285 -97
  7. package/dist/coordination/index.js.map +1 -1
  8. package/dist/defaults/index.d.ts +16 -16
  9. package/dist/defaults/index.js +209 -140
  10. package/dist/defaults/index.js.map +1 -1
  11. package/dist/execution/index.d.ts +9 -9
  12. package/dist/extension/index.d.ts +4 -4
  13. package/dist/{global-mailbox-CQj_C9Dp.d.ts → global-mailbox-DJ4EoRr0.d.ts} +7 -3
  14. package/dist/{goal-preamble-ZXDjjR1y.d.ts → goal-preamble-hM8BH7TK.d.ts} +5 -5
  15. package/dist/{goal-store-CcJBd-g1.d.ts → goal-store-CWlbT0TO.d.ts} +1 -1
  16. package/dist/hq/index.d.ts +6 -4
  17. package/dist/hq/index.js +14 -6
  18. package/dist/hq/index.js.map +1 -1
  19. package/dist/{index-Qo4kTzgw.d.ts → index-DWm_PE9L.d.ts} +3 -3
  20. package/dist/{index-BL7BAx0p.d.ts → index-DqW4o62H.d.ts} +4 -4
  21. package/dist/index.d.ts +27 -27
  22. package/dist/index.js +571 -215
  23. package/dist/index.js.map +1 -1
  24. package/dist/infrastructure/index.d.ts +4 -4
  25. package/dist/kernel/index.d.ts +5 -5
  26. package/dist/kernel/index.js.map +1 -1
  27. package/dist/{mcp-servers-DS-YUXvF.d.ts → mcp-servers-BpWHTKlE.d.ts} +1 -1
  28. package/dist/models/index.d.ts +3 -3
  29. package/dist/{models-registry-DP6pGHet.d.ts → models-registry-CXQFUn5t.d.ts} +1 -1
  30. package/dist/{multi-agent-coordinator-BvbdNQ14.d.ts → multi-agent-coordinator-jyimfo7D.d.ts} +1 -1
  31. package/dist/{null-fleet-bus-BxTfXBKo.d.ts → null-fleet-bus-DOGQcvrY.d.ts} +5 -5
  32. package/dist/observability/index.d.ts +1 -1
  33. package/dist/{parallel-eternal-engine-Cf-GTegR.d.ts → parallel-eternal-engine-rItJBYp9.d.ts} +6 -6
  34. package/dist/{path-resolver-DztfnFcv.d.ts → path-resolver-DrpF5MGK.d.ts} +2 -2
  35. package/dist/{pipeline-sNIkhXeB.d.ts → pipeline-Ckkn3AOA.d.ts} +1 -1
  36. package/dist/{plan-templates-DYiKFmEb.d.ts → plan-templates-BvHw5Znw.d.ts} +24 -6
  37. package/dist/{provider-model-resolve-dYAbTs_i.d.ts → provider-model-resolve-nZqnCeaR.d.ts} +1 -1
  38. package/dist/{provider-runner-Dw8x0F7u.d.ts → provider-runner-zVOn1p67.d.ts} +1 -1
  39. package/dist/sdd/index.d.ts +5 -5
  40. package/dist/storage/index.d.ts +12 -7
  41. package/dist/storage/index.js +250 -111
  42. package/dist/storage/index.js.map +1 -1
  43. package/dist/tools/index.d.ts +1 -1
  44. package/dist/types/index.d.ts +13 -13
  45. package/dist/types/index.js.map +1 -1
  46. package/dist/utils/index.d.ts +1 -1
  47. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { B as BridgeTransport, a as BridgeMessage, A as AgentBridge, b as AgentBridgeConfig } from './agent-subagent-runner-DOLIwBRo.js';
1
+ import { B as BridgeTransport, a as BridgeMessage, A as AgentBridge, b as AgentBridgeConfig } from './agent-subagent-runner-BZa_IEcd.js';
2
2
 
3
3
  /**
4
4
  * In-memory pub/sub transport for agent-to-agent messaging.
@@ -1,12 +1,12 @@
1
- import { c as ToolCallPipelinePayload, d as ToolWrapper, E as ExtensionRegistry, S as SystemPromptContributor, e as ToolRegistry, P as ProviderRegistry, A as AgentPipelines, f as ToolExecutorLike, g as AgentInit, h as AgentInput, R as RunResult } from './index-Qo4kTzgw.js';
2
- import { C as Container, R as ReadonlyPipeline, a as Renderer } from './pipeline-sNIkhXeB.js';
3
- import { E as EventBus, a as EventName, L as Listener } from './brain-CdbbJWi3.js';
1
+ import { c as ToolCallPipelinePayload, d as ToolWrapper, E as ExtensionRegistry, S as SystemPromptContributor, e as ToolRegistry, P as ProviderRegistry, A as AgentPipelines, f as ToolExecutorLike, g as AgentInit, h as AgentInput, R as RunResult } from './index-DWm_PE9L.js';
2
+ import { C as Container, R as ReadonlyPipeline, a as Renderer } from './pipeline-Ckkn3AOA.js';
3
+ import { E as EventBus, a as EventName, L as Listener } from './brain-etbcbRwV.js';
4
4
  import { R as RetryPolicy, E as ErrorHandler } from './retry-policy-BV7nzeAd.js';
5
5
  import { L as Logger } from './logger-B63L5bTg.js';
6
6
  import { T as Tracer } from './observability-D-HZN_mF.js';
7
7
  import { P as PermissionPolicy } from './permission-CC7XFYWG.js';
8
8
  import { U as Usage, C as Context, J as JSONSchema, c as Request, d as Response, i as ContentBlock, q as TextBlock, T as Tool, P as Provider, t as RunOptions } from './context-Dw55zZ_Q.js';
9
- import { W as WireFamily, H as HookEvent, f as HookMatcher, I as InProcessHook, i as Config } from './config-D2DGoGSQ.js';
9
+ import { W as WireFamily, H as HookEvent, f as HookMatcher, I as InProcessHook, i as Config } from './config-rRS8yorV.js';
10
10
 
11
11
  /**
12
12
  * Single fleet-wide event with subagent attribution. Whatever a child
@@ -103,6 +103,7 @@ interface MemoryStore {
103
103
  interface TrackedAgentSnapshot {
104
104
  id: string;
105
105
  name: string;
106
+ startedAt?: string | undefined;
106
107
  status: string;
107
108
  currentTool?: string | undefined;
108
109
  iterations: number;
@@ -176,6 +177,28 @@ interface EventMap {
176
177
  'session.agents_updated': {
177
178
  agents: readonly TrackedAgentSnapshot[];
178
179
  };
180
+ /**
181
+ * Fired around a single Agent.run() call. Status trackers use these to
182
+ * measure active-run elapsed time instead of inferring it from iterations.
183
+ */
184
+ 'agent.run.started': {
185
+ ctx: Context;
186
+ model: string;
187
+ at: string;
188
+ };
189
+ 'agent.run.completed': {
190
+ ctx: Context;
191
+ status: 'done' | 'failed' | 'max_iterations' | 'aborted';
192
+ iterations: number;
193
+ at: string;
194
+ durationMs: number;
195
+ };
196
+ 'agent.run.error': {
197
+ ctx: Context;
198
+ err: Error;
199
+ at: string;
200
+ durationMs: number;
201
+ };
179
202
  'iteration.started': {
180
203
  ctx: Context;
181
204
  index: number;
@@ -1228,4 +1251,4 @@ declare class DefaultBrainArbiter implements BrainArbiter {
1228
1251
  }
1229
1252
  declare function formatHumanPrompt(request: BrainDecisionRequest): string;
1230
1253
 
1231
- export { type BrainArbiter as B, DefaultBrainArbiter as D, EventBus as E, HumanEscalatingBrainArbiter as H, type Listener as L, type MemoryScope as M, ObservableBrainArbiter as O, type ScoredEntry as S, type EventName as a, type MemoryEntry as b, type MemoryStore as c, type MemoryRelevanceContext as d, type BrainDecision as e, type BrainDecisionOption as f, BrainDecisionQueue as g, type BrainDecisionRequest as h, type BrainDecisionSource as i, type BrainFallback as j, type BrainRisk as k, type DefaultBrainArbiterOptions as l, type EventLogger as m, type EventMap as n, MEMORY_TYPE_LABELS as o, type MemoryClearedPayload as p, type MemoryConsolidatedPayload as q, type MemoryForgottenPayload as r, type MemoryPriority as s, type MemoryRememberedPayload as t, type MemoryType as u, ScopedEventBus as v, formatHumanPrompt as w };
1254
+ export { type BrainArbiter as B, DefaultBrainArbiter as D, EventBus as E, HumanEscalatingBrainArbiter as H, type Listener as L, type MemoryScope as M, ObservableBrainArbiter as O, type ScoredEntry as S, type TrackedAgentSnapshot as T, type EventName as a, type MemoryEntry as b, type MemoryStore as c, type MemoryRelevanceContext as d, type BrainDecision as e, type BrainDecisionOption as f, BrainDecisionQueue as g, type BrainDecisionRequest as h, type BrainDecisionSource as i, type BrainFallback as j, type BrainRisk as k, type DefaultBrainArbiterOptions as l, type EventLogger as m, type EventMap as n, MEMORY_TYPE_LABELS as o, type MemoryClearedPayload as p, type MemoryConsolidatedPayload as q, type MemoryForgottenPayload as r, type MemoryPriority as s, type MemoryRememberedPayload as t, type MemoryType as u, ScopedEventBus as v, formatHumanPrompt as w };
@@ -388,6 +388,42 @@ interface CircuitBreakerRuntimeConfig {
388
388
  */
389
389
  autoKillResetMs?: number | undefined;
390
390
  }
391
+ /**
392
+ * Adaptive concurrency controller configuration. When enabled, the controller
393
+ * automatically adjusts `maxConcurrent` based on rate-limit (429) errors:
394
+ * - On 429: halves `maxConcurrent` (floor at 1)
395
+ * - On sustained success (no 429 for `recoveryIntervalMs`): increases `maxConcurrent` by 1
396
+ */
397
+ interface AdaptiveConcurrencyConfig {
398
+ /** Enable adaptive concurrency. Default: false (disabled). */
399
+ enabled?: boolean | undefined;
400
+ /**
401
+ * Minimum concurrency floor. The controller never drops below this.
402
+ * Default: 1.
403
+ */
404
+ minConcurrent?: number | undefined;
405
+ /**
406
+ * Maximum concurrency ceiling. The controller never exceeds this.
407
+ * Default: 16 (matches MultiAgentCoordinator default).
408
+ */
409
+ maxConcurrent?: number | undefined;
410
+ /**
411
+ * Multiplicative decrease factor when a 429 is hit.
412
+ * `newConcurrency = floor(currentConcurrency * decreaseFactor)`.
413
+ * Default: 0.5 (halves concurrency).
414
+ */
415
+ decreaseFactor?: number | undefined;
416
+ /**
417
+ * Number of consecutive successful requests before increasing concurrency by 1.
418
+ * Default: 10.
419
+ */
420
+ successThreshold?: number | undefined;
421
+ /**
422
+ * How often (ms) to check for recovery and bump concurrency.
423
+ * Default: 30_000 (30 seconds).
424
+ */
425
+ recoveryIntervalMs?: number | undefined;
426
+ }
391
427
  interface ToolsConfig {
392
428
  defaultExecutionStrategy: 'parallel' | 'sequential' | 'smart';
393
429
  maxIterations: number;
@@ -777,6 +813,12 @@ interface Config {
777
813
  * failures). Default off — toggle with `/settings breaker on|off`.
778
814
  */
779
815
  circuitBreaker?: CircuitBreakerRuntimeConfig | undefined;
816
+ /**
817
+ * Adaptive concurrency controller — automatically adjusts `maxConcurrent` based on
818
+ * rate-limit (429) errors. On 429: decreases concurrency. On sustained success:
819
+ * gradually increases concurrency back up. Default off.
820
+ */
821
+ adaptiveConcurrency?: AdaptiveConcurrencyConfig | undefined;
780
822
  /** Saved launch preferences — restored on next boot for one-line confirmation. */
781
823
  launch?: LaunchConfig | undefined;
782
824
  /**
@@ -854,4 +896,4 @@ interface ConfigStore {
854
896
  watch(cb: (next: Readonly<Config>, prev: Readonly<Config>) => void): () => void;
855
897
  }
856
898
 
857
- export { listContextWindowModes as $, type AutonomyConfig as A, MAX_TUI_THINKING_WORD_LENGTH as B, type ContextWindowAggressiveOn as C, DEFAULT_CONTEXT_WINDOW_MODE_ID as D, type ModelRuntimeCacheConfig as E, type FeaturesConfig as F, type ModelRuntimeConfig as G, type HookEvent as H, type InProcessHook as I, type ModelRuntimeParametersConfig as J, type ModelRuntimeReasoningConfig as K, type LaunchConfig as L, type ModelsRegistry as M, type ModelsDevProvider as N, type PluginConfig as O, type ProviderConfig as P, type ProviderApiKey as Q, type ResolvedProvider as R, type ShellHook as S, type TokenSavingTier as T, type SessionLoggingConfig as U, type SyncCategory as V, type WireFamily as W, type ToolsConfig as X, formatContextWindowModeList as Y, getContextWindowMode as Z, isContextWindowModeId as _, type ModelsDevPayload as a, normalizeTokenSavingTier as a0, normalizeTuiThinkingWord as a1, resolveContextWindowPolicy as a2, type ResolvedModel as b, type MCPServerConfig as c, type ModelMatrixEntry as d, type ModelsDevModel as e, type HookMatcher as f, type HookEntry as g, type ContextWindowPolicy as h, type Config as i, type ConfigStore as j, type ConfigLoader as k, type SyncConfig as l, type HookInput as m, type HookOutcome as n, CONTEXT_WINDOW_MODES as o, type CircuitBreakerRuntimeConfig as p, type ContextConfig as q, type ContextWindowConfigLike as r, type ContextWindowMode as s, type ContextWindowModeId as t, type ContextWindowThresholds as u, type CustomModelDefinition as v, DEFAULT_TUI_THINKING_WORD as w, type HqClientConfig as x, type IndexingConfig as y, type LogConfig as z };
899
+ export { isContextWindowModeId as $, type AdaptiveConcurrencyConfig as A, type LogConfig as B, type ContextWindowAggressiveOn as C, DEFAULT_CONTEXT_WINDOW_MODE_ID as D, MAX_TUI_THINKING_WORD_LENGTH as E, type FeaturesConfig as F, type ModelRuntimeCacheConfig as G, type HookEvent as H, type InProcessHook as I, type ModelRuntimeConfig as J, type ModelRuntimeParametersConfig as K, type LaunchConfig as L, type ModelsRegistry as M, type ModelRuntimeReasoningConfig as N, type ModelsDevProvider as O, type ProviderConfig as P, type PluginConfig as Q, type ResolvedProvider as R, type ShellHook as S, type TokenSavingTier as T, type ProviderApiKey as U, type SessionLoggingConfig as V, type WireFamily as W, type SyncCategory as X, type ToolsConfig as Y, formatContextWindowModeList as Z, getContextWindowMode as _, type ModelsDevPayload as a, listContextWindowModes as a0, normalizeTokenSavingTier as a1, normalizeTuiThinkingWord as a2, resolveContextWindowPolicy as a3, type ResolvedModel as b, type MCPServerConfig as c, type ModelMatrixEntry as d, type ModelsDevModel as e, type HookMatcher as f, type HookEntry as g, type ContextWindowPolicy as h, type Config as i, type ConfigStore as j, type ConfigLoader as k, type SyncConfig as l, type HookInput as m, type HookOutcome as n, type AutonomyConfig as o, CONTEXT_WINDOW_MODES as p, type CircuitBreakerRuntimeConfig as q, type ContextConfig as r, type ContextWindowConfigLike as s, type ContextWindowMode as t, type ContextWindowModeId as u, type ContextWindowThresholds as v, type CustomModelDefinition as w, DEFAULT_TUI_THINKING_WORD as x, type HqClientConfig as y, type IndexingConfig as z };
@@ -1,22 +1,22 @@
1
- import { E as EventBus, B as BrainArbiter, f as BrainDecisionOption, k as BrainRisk, h as BrainDecisionRequest, e as BrainDecision, i as BrainDecisionSource } from '../brain-CdbbJWi3.js';
2
- export { g as BrainDecisionQueue, j as BrainFallback, D as DefaultBrainArbiter, l as DefaultBrainArbiterOptions, H as HumanEscalatingBrainArbiter, O as ObservableBrainArbiter, w as formatHumanPrompt } from '../brain-CdbbJWi3.js';
3
- import { H as FleetManager, s as Director } from '../null-fleet-bus-BxTfXBKo.js';
4
- 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, h as BugFinding, C as CollabBudgetConfig, i as CollabBudgetOverrides, j as CollabBudgetWarningPayload, k as CollabDebugReport, l as CollabSession, m as CollabSessionOptions, n as CreateDelegateToolOptions, o as CriticConcern, p as CriticEvaluation, D as DEFAULT_DIRECTOR_PREAMBLE, q as DEFAULT_SUBAGENT_BASELINE, r as DelegateHost, t as DirectorAlert, u as DirectorAlertLevel, v as DirectorCancelCollabPayload, 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, I as FleetManagerOptions, J as FleetRosterBudget, K as FleetSpawnBudgetError, L as ICoordinator, M as IFleetManager, N as LargeAnswerStore, O as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, P as RefactorPhase, Q as RefactorPlan, S as SECURITY_SCANNER_AGENT, T as SharedFileEntry, U as SharedFileSnapshot, V as SubagentPromptParts, W as applyRosterBudget, X as attachAutoExtend, Y as composeDirectorPrompt, Z as composeSubagentPrompt, _ as createDelegateTool, $ as getAgentDefinition, a0 as makeAskResultTool, a1 as makeAskTool, a2 as makeAssignTool, a3 as makeAwaitTasksTool, a4 as makeCollabDebugTool, a5 as makeDirectorSessionFactory, a6 as makeFleetEmitTool, a7 as makeFleetHealthTool, a8 as makeFleetSessionTool, a9 as makeFleetStatusTool, aa as makeFleetUsageTool, ab as makeRollUpTool, ac as makeSpawnTool, ad as makeTerminateTool, ae as makeWorkCompleteTool, af as rosterSummaryFromConfigs } from '../null-fleet-bus-BxTfXBKo.js';
5
- import { b as AgentDefinition } from '../multi-agent-coordinator-BvbdNQ14.js';
6
- export { T as AGENT_TOOL_PRESETS, c as AgentBudgetTier, d as AgentCapability, A as AgentPhase, e as DEFAULT_DISPATCH_ROLE, a as DefaultMultiAgentCoordinator, f as DispatchCandidate, D as DispatchClassifier, g as DispatchMethod, h as DispatchOptions, i as DispatchResult, H as HEAVY_BUDGET, L as LIGHT_BUDGET, M as MEDIUM_BUDGET, j as MultiAgentCoordinatorOptions, k as dispatchAgent, m as makeLLMClassifier, s as scoreAgents } from '../multi-agent-coordinator-BvbdNQ14.js';
7
- import { F as FleetBus } from '../agent-subagent-runner-DOLIwBRo.js';
8
- export { h as AgentFactory, v as AgentFactoryResult, w as AgentRunnerOptions, x as BudgetExceededError, y as BudgetKind, z as BudgetLimits, E as BudgetNegotiationMode, G as BudgetThresholdDecision, H as BudgetThresholdHandler, I as BudgetThresholdSignal, J as BudgetUsage, L as DECISION_TIMEOUT_MS, N as FleetEvent, O as FleetHandler, i as FleetUsage, j as FleetUsageAggregator, Q as SubagentBudget, Y as SubagentUsageSnapshot, Z as TIMEOUT_PREEMPT_FRACTION, $ as makeAgentSubagentRunner, a0 as withDisabledToolFiltering } from '../agent-subagent-runner-DOLIwBRo.js';
9
- export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-jVSZiygR.js';
1
+ import { E as EventBus, B as BrainArbiter, f as BrainDecisionOption, k as BrainRisk, h as BrainDecisionRequest, e as BrainDecision, i as BrainDecisionSource } from '../brain-etbcbRwV.js';
2
+ export { g as BrainDecisionQueue, j as BrainFallback, D as DefaultBrainArbiter, l as DefaultBrainArbiterOptions, H as HumanEscalatingBrainArbiter, O as ObservableBrainArbiter, w as formatHumanPrompt } from '../brain-etbcbRwV.js';
3
+ import { H as FleetManager, s as Director } from '../null-fleet-bus-DOGQcvrY.js';
4
+ 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, h as BugFinding, C as CollabBudgetConfig, i as CollabBudgetOverrides, j as CollabBudgetWarningPayload, k as CollabDebugReport, l as CollabSession, m as CollabSessionOptions, n as CreateDelegateToolOptions, o as CriticConcern, p as CriticEvaluation, D as DEFAULT_DIRECTOR_PREAMBLE, q as DEFAULT_SUBAGENT_BASELINE, r as DelegateHost, t as DirectorAlert, u as DirectorAlertLevel, v as DirectorCancelCollabPayload, 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, I as FleetManagerOptions, J as FleetRosterBudget, K as FleetSpawnBudgetError, L as ICoordinator, M as IFleetManager, N as LargeAnswerStore, O as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, P as RefactorPhase, Q as RefactorPlan, S as SECURITY_SCANNER_AGENT, T as SharedFileEntry, U as SharedFileSnapshot, V as SubagentPromptParts, W as applyRosterBudget, X as attachAutoExtend, Y as composeDirectorPrompt, Z as composeSubagentPrompt, _ as createDelegateTool, $ as getAgentDefinition, a0 as makeAskResultTool, a1 as makeAskTool, a2 as makeAssignTool, a3 as makeAwaitTasksTool, a4 as makeCollabDebugTool, a5 as makeDirectorSessionFactory, a6 as makeFleetEmitTool, a7 as makeFleetHealthTool, a8 as makeFleetSessionTool, a9 as makeFleetStatusTool, aa as makeFleetUsageTool, ab as makeRollUpTool, ac as makeSpawnTool, ad as makeTerminateTool, ae as makeWorkCompleteTool, af as rosterSummaryFromConfigs } from '../null-fleet-bus-DOGQcvrY.js';
5
+ import { b as AgentDefinition } from '../multi-agent-coordinator-jyimfo7D.js';
6
+ export { T as AGENT_TOOL_PRESETS, c as AgentBudgetTier, d as AgentCapability, A as AgentPhase, e as DEFAULT_DISPATCH_ROLE, a as DefaultMultiAgentCoordinator, f as DispatchCandidate, D as DispatchClassifier, g as DispatchMethod, h as DispatchOptions, i as DispatchResult, H as HEAVY_BUDGET, L as LIGHT_BUDGET, M as MEDIUM_BUDGET, j as MultiAgentCoordinatorOptions, k as dispatchAgent, m as makeLLMClassifier, s as scoreAgents } from '../multi-agent-coordinator-jyimfo7D.js';
7
+ import { F as FleetBus } from '../agent-subagent-runner-BZa_IEcd.js';
8
+ export { h as AgentFactory, v as AgentFactoryResult, w as AgentRunnerOptions, x as BudgetExceededError, y as BudgetKind, z as BudgetLimits, E as BudgetNegotiationMode, G as BudgetThresholdDecision, H as BudgetThresholdHandler, I as BudgetThresholdSignal, J as BudgetUsage, L as DECISION_TIMEOUT_MS, N as FleetEvent, O as FleetHandler, i as FleetUsage, j as FleetUsageAggregator, Q as SubagentBudget, Y as SubagentUsageSnapshot, Z as TIMEOUT_PREEMPT_FRACTION, $ as makeAgentSubagentRunner, a0 as withDisabledToolFiltering } from '../agent-subagent-runner-BZa_IEcd.js';
9
+ export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-DFQYEeXf.js';
10
10
  import { b as Mailbox, c as MailboxSendInput, M as MailboxMessage, d as MailboxQuery, e as MailboxAckInput, f as MailboxAckBatchInput, a as MailboxAgentStatus, A as AgentRegistrationInput, g as AgentHeartbeatInput, P as PurgeOptions, j as PurgeResult, C as ClientRegistrationInput, h as ClientHeartbeatInput, i as ClientStatus } from '../mailbox-types-Ct2hJq0P.js';
11
11
  export { k as MailboxMessageType, l as MailboxTaskContext, R as ReadReceipts, m as RegisteredAgent, n as normalizeRecipient } from '../mailbox-types-Ct2hJq0P.js';
12
- export { G as GlobalMailbox, aw as resolveProjectDir } from '../global-mailbox-CQj_C9Dp.js';
12
+ export { G as GlobalMailbox, aw as resolveProjectDir } from '../global-mailbox-DJ4EoRr0.js';
13
13
  import { C as Context, T as Tool } from '../context-Dw55zZ_Q.js';
14
+ import { A as AdaptiveConcurrencyConfig } from '../config-rRS8yorV.js';
14
15
  import 'node:events';
15
16
  import '../logger-B63L5bTg.js';
16
17
  import '../director-state-BfeCUbmk.js';
17
- import '../config-D2DGoGSQ.js';
18
- import '../index-Qo4kTzgw.js';
19
- import '../pipeline-sNIkhXeB.js';
18
+ import '../index-DWm_PE9L.js';
19
+ import '../pipeline-Ckkn3AOA.js';
20
20
  import '../observability-D-HZN_mF.js';
21
21
  import '../permission-CC7XFYWG.js';
22
22
  import '../retry-policy-BV7nzeAd.js';
@@ -1827,4 +1827,64 @@ declare class AgentMonitorService {
1827
1827
  }
1828
1828
  declare function createAgentMonitorService(opts: AgentMonitorOptions): AgentMonitorService;
1829
1829
 
1830
- export { AgentDefinition, AgentHeartbeatInput, type AgentMonitorOptions, AgentMonitorService, AgentRegistrationInput, type AgentTimelineEntry, type AgentVirtualSession, type ApplyResult, type ApprovalDecision, AutonomousBrain, type AutonomousBrainOptions, AutonomousCoordinator, type AutonomousCoordinatorOptions, type AutonomousDecisionRequest, type AutonomousDecisionType, BUILD_AGENTS, BrainArbiter, BrainDecision, BrainDecisionOption, BrainDecisionRequest, BrainDecisionSource, type BrainInterventionInput, BrainMonitor, type BrainMonitorOptions, BrainRisk, type ChangeFile, ChangeManager, type ChangeManagerOptions, type ChangeNode, type ChangeProposal, type ChangeStatus, type ConsensusOptions, ConsensusProtocol, type ConsensusResult, type CoordinatorEvent, type CoordinatorStats, type DAGEdgeEvent, type DAGEdgeHandler, type DAGNode, type DAGNodeStatus, DEFAULT_QUALITY_CHECKS, DELIVERY_AGENTS, DEPENDENCY_FILE_PATTERNS, DISCOVERY_AGENTS, DOMAIN_AGENTS, type DecisionNode, type DecisionPrompt, DefaultMailbox, type DepWatchEntry, type DepWatcherBridgeOptions, type DependencyWatcherConfig, Director, type EscalationDecision, type FactCategory, type FactNode, FleetBus, FleetManager, type GoalNode, type GoalPriority, type GoalStatus, type GraphSubscription, KNOWLEDGE_AGENTS, KnowledgeGraph, type LLMProvider, META_AGENTS, type MailToolsOptions, Mailbox, MailboxAckInput, MailboxAgentStatus, type MailboxHooksOptions, MailboxMessage, MailboxQuery, type MailboxResolver, MailboxSendInput, type MailboxToolOptions, type NodeFilter, type NodeType, type OutdatedNotifyMessage, PLANNING_AGENTS, type PackageAuthorEntry, type PackageAuthorLog, type PackageAuthorTrackerOptions, type PackageOutdatedEntry, type PackageOutdatedResult, type PackageOutdatedWatcherOptions, type PrioritizationDecision, type QualityCheck, type QualityGateChecks, type QualityGateResult, type QuorumRule, REVIEW_AGENTS, type RollbackResult, type RunOptions, type RunnablesHandler, type SpawnDecision, type TaskAuctionOptions, TaskAuctioneer, type TaskBid, TaskDAG, VERIFY_AGENTS, type VoteNode, type VoteRecord, type VoteValue, type VoterConfig, attachDepWatcherBridge, createAgentMonitorService, createMailboxHooks, detectEcosystem, getFullPackageLog, getManifestPackages, getPackageAuthor, getPackagesByAgent, mailboxSessionTag, makeDependencyWatcherConfig, makeMailInboxTool, makeMailSendTool, makeMailboxTool, recordPackageAction, resolveMailboxIdentity, startPackageOutdatedWatcher, updatePackageOutdatedStatus };
1830
+ /**
1831
+ * Adaptive Concurrency Controller
1832
+ *
1833
+ * Automatically adjusts `maxConcurrent` based on:
1834
+ * - Rate limit (429) errors → decrease concurrency
1835
+ * - Sustained successful requests → increase concurrency
1836
+ *
1837
+ * This provides automatic backpressure without manual tuning.
1838
+ */
1839
+
1840
+ interface AdaptiveConcurrencyState {
1841
+ current: number;
1842
+ min: number;
1843
+ max: number;
1844
+ consecutiveSuccesses: number;
1845
+ consecutiveFailures: number;
1846
+ totalDecreases: number;
1847
+ totalIncreases: number;
1848
+ enabled: boolean;
1849
+ }
1850
+ /**
1851
+ * Adaptive Concurrency Controller
1852
+ *
1853
+ * Monitors fleet events for rate-limit (429) errors and adjusts concurrency
1854
+ * automatically to prevent overwhelming the API provider.
1855
+ */
1856
+ declare class AdaptiveConcurrencyController {
1857
+ private readonly config;
1858
+ private state;
1859
+ private readonly disposers;
1860
+ private stateChangeHandlers;
1861
+ constructor(fleetBus: FleetBus, setMaxConcurrent: (n: number) => void, config?: Partial<AdaptiveConcurrencyConfig>, onStateChange?: (state: AdaptiveConcurrencyState) => void);
1862
+ private setupEventHandlers;
1863
+ /**
1864
+ * Handle a rate limit (429) error - decrease concurrency
1865
+ */
1866
+ private handleRateLimit;
1867
+ /**
1868
+ * Force a decrease (e.g., manual trigger or other error types)
1869
+ */
1870
+ decrease(target?: number): void;
1871
+ /**
1872
+ * Get the current state
1873
+ */
1874
+ getState(): AdaptiveConcurrencyState;
1875
+ /**
1876
+ * Update configuration at runtime
1877
+ */
1878
+ updateConfig(config: Partial<AdaptiveConcurrencyConfig>): void;
1879
+ /**
1880
+ * Dispose of the controller and clean up event listeners
1881
+ */
1882
+ dispose(): void;
1883
+ private notifyStateChange;
1884
+ /**
1885
+ * Register a state change handler
1886
+ */
1887
+ onStateChange(handler: (state: AdaptiveConcurrencyState) => void): () => void;
1888
+ }
1889
+
1890
+ export { AdaptiveConcurrencyController, type AdaptiveConcurrencyState, AgentDefinition, AgentHeartbeatInput, type AgentMonitorOptions, AgentMonitorService, AgentRegistrationInput, type AgentTimelineEntry, type AgentVirtualSession, type ApplyResult, type ApprovalDecision, AutonomousBrain, type AutonomousBrainOptions, AutonomousCoordinator, type AutonomousCoordinatorOptions, type AutonomousDecisionRequest, type AutonomousDecisionType, BUILD_AGENTS, BrainArbiter, BrainDecision, BrainDecisionOption, BrainDecisionRequest, BrainDecisionSource, type BrainInterventionInput, BrainMonitor, type BrainMonitorOptions, BrainRisk, type ChangeFile, ChangeManager, type ChangeManagerOptions, type ChangeNode, type ChangeProposal, type ChangeStatus, type ConsensusOptions, ConsensusProtocol, type ConsensusResult, type CoordinatorEvent, type CoordinatorStats, type DAGEdgeEvent, type DAGEdgeHandler, type DAGNode, type DAGNodeStatus, DEFAULT_QUALITY_CHECKS, DELIVERY_AGENTS, DEPENDENCY_FILE_PATTERNS, DISCOVERY_AGENTS, DOMAIN_AGENTS, type DecisionNode, type DecisionPrompt, DefaultMailbox, type DepWatchEntry, type DepWatcherBridgeOptions, type DependencyWatcherConfig, Director, type EscalationDecision, type FactCategory, type FactNode, FleetBus, FleetManager, type GoalNode, type GoalPriority, type GoalStatus, type GraphSubscription, KNOWLEDGE_AGENTS, KnowledgeGraph, type LLMProvider, META_AGENTS, type MailToolsOptions, Mailbox, MailboxAckInput, MailboxAgentStatus, type MailboxHooksOptions, MailboxMessage, MailboxQuery, type MailboxResolver, MailboxSendInput, type MailboxToolOptions, type NodeFilter, type NodeType, type OutdatedNotifyMessage, PLANNING_AGENTS, type PackageAuthorEntry, type PackageAuthorLog, type PackageAuthorTrackerOptions, type PackageOutdatedEntry, type PackageOutdatedResult, type PackageOutdatedWatcherOptions, type PrioritizationDecision, type QualityCheck, type QualityGateChecks, type QualityGateResult, type QuorumRule, REVIEW_AGENTS, type RollbackResult, type RunOptions, type RunnablesHandler, type SpawnDecision, type TaskAuctionOptions, TaskAuctioneer, type TaskBid, TaskDAG, VERIFY_AGENTS, type VoteNode, type VoteRecord, type VoteValue, type VoterConfig, attachDepWatcherBridge, createAgentMonitorService, createMailboxHooks, detectEcosystem, getFullPackageLog, getManifestPackages, getPackageAuthor, getPackagesByAgent, mailboxSessionTag, makeDependencyWatcherConfig, makeMailInboxTool, makeMailSendTool, makeMailboxTool, recordPackageAction, resolveMailboxIdentity, startPackageOutdatedWatcher, updatePackageOutdatedStatus };