@wrongstack/core 0.51.3 → 0.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/{agent-bridge-CjbD-i7-.d.ts → agent-bridge-Dnhw4tnM.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-DfvlBx5N.d.ts → agent-subagent-runner-By7jruZ_.d.ts} +3 -3
  3. package/dist/{compactor-D1RHFRmF.d.ts → compactor-Duhsf0ge.d.ts} +1 -1
  4. package/dist/{config-ZRCf7sTu.d.ts → config-bht0txXS.d.ts} +33 -2
  5. package/dist/{context-7u93AcGD.d.ts → context-DtPKqKYV.d.ts} +1 -0
  6. package/dist/coordination/index.d.ts +12 -12
  7. package/dist/coordination/index.js.map +1 -1
  8. package/dist/defaults/index.d.ts +22 -22
  9. package/dist/defaults/index.js +31 -16
  10. package/dist/defaults/index.js.map +1 -1
  11. package/dist/{events-Bt44ikPN.d.ts → events-CbHTS4ZZ.d.ts} +1 -1
  12. package/dist/execution/index.d.ts +14 -14
  13. package/dist/execution/index.js.map +1 -1
  14. package/dist/extension/index.d.ts +6 -6
  15. package/dist/{goal-store-BeRsj7YX.d.ts → goal-store-DwcTDDiX.d.ts} +1 -1
  16. package/dist/{index-mAWBdLyJ.d.ts → index-CI271MjL.d.ts} +5 -5
  17. package/dist/{index-OzA1XjHL.d.ts → index-ge5F2dnc.d.ts} +8 -8
  18. package/dist/index.d.ts +33 -33
  19. package/dist/index.js +116 -64
  20. package/dist/index.js.map +1 -1
  21. package/dist/infrastructure/index.d.ts +6 -6
  22. package/dist/kernel/index.d.ts +9 -9
  23. package/dist/{mcp-servers-DONdo-XM.d.ts → mcp-servers-DE6gzBry.d.ts} +3 -3
  24. package/dist/models/index.d.ts +3 -3
  25. package/dist/models/index.js +31 -16
  26. package/dist/models/index.js.map +1 -1
  27. package/dist/{models-registry-gwMAo6E3.d.ts → models-registry-Cuq1C8V9.d.ts} +7 -0
  28. package/dist/{multi-agent-Ba9Ni2hC.d.ts → multi-agent-BmC_xiog.d.ts} +2 -2
  29. package/dist/{multi-agent-coordinator-BuKq0q89.d.ts → multi-agent-coordinator-CjNX4uBD.d.ts} +2 -2
  30. package/dist/{null-fleet-bus-C0xd73YP.d.ts → null-fleet-bus-BNiSlTna.d.ts} +7 -7
  31. package/dist/observability/index.d.ts +2 -2
  32. package/dist/{path-resolver-nkmdiFgi.d.ts → path-resolver-Bax85amb.d.ts} +2 -2
  33. package/dist/{permission-B6sldrSp.d.ts → permission-Drm7LpPo.d.ts} +1 -1
  34. package/dist/{permission-policy-CtNscWOA.d.ts → permission-policy-CU6sqWxF.d.ts} +2 -2
  35. package/dist/{plan-templates-BmDdJ7UL.d.ts → plan-templates-CLRcurWN.d.ts} +4 -4
  36. package/dist/{provider-runner-BGro2qQB.d.ts → provider-runner-BikCxGCx.d.ts} +3 -3
  37. package/dist/{retry-policy-KF18W4dg.d.ts → retry-policy-Chtlvr5b.d.ts} +1 -1
  38. package/dist/sdd/index.d.ts +8 -8
  39. package/dist/sdd/index.js.map +1 -1
  40. package/dist/security/index.d.ts +3 -3
  41. package/dist/{selector-DmXxpFyM.d.ts → selector-BvSPdJj6.d.ts} +1 -1
  42. package/dist/{session-reader-bfgsy2a0.d.ts → session-reader-BGhzMir4.d.ts} +1 -1
  43. package/dist/storage/index.d.ts +6 -6
  44. package/dist/storage/index.js +57 -37
  45. package/dist/storage/index.js.map +1 -1
  46. package/dist/{system-prompt-CM6zOhd2.d.ts → system-prompt-dtzV_mLm.d.ts} +1 -1
  47. package/dist/{tool-executor-p4tP9tGF.d.ts → tool-executor-CgU0yWpB.d.ts} +4 -4
  48. package/dist/types/index.d.ts +15 -15
  49. package/dist/types/index.js +31 -16
  50. package/dist/types/index.js.map +1 -1
  51. package/dist/utils/index.d.ts +14 -2
  52. package/dist/utils/index.js +18 -1
  53. package/dist/utils/index.js.map +1 -1
  54. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { T as TextBlock, c as ContentBlock, Q as Tool } from './context-7u93AcGD.js';
1
+ import { T as TextBlock, c as ContentBlock, Q as Tool } from './context-DtPKqKYV.js';
2
2
 
3
3
  /**
4
4
  * Container — dependency injection with explicit bind / override / decorate.
@@ -1,8 +1,8 @@
1
- import { d as Context, n as ProviderError, Q as Tool, _ as ToolUseBlock, Y as ToolResultBlock } from './context-7u93AcGD.js';
2
- import { a as Compactor, C as CompactReport } from './compactor-D1RHFRmF.js';
3
- import { R as RecoveryDecision, E as ErrorHandler, a as RetryPolicy } from './retry-policy-KF18W4dg.js';
1
+ import { d as Context, n as ProviderError, Q as Tool, _ as ToolUseBlock, Y as ToolResultBlock } from './context-DtPKqKYV.js';
2
+ import { a as Compactor, C as CompactReport } from './compactor-Duhsf0ge.js';
3
+ import { R as RecoveryDecision, E as ErrorHandler, a as RetryPolicy } from './retry-policy-Chtlvr5b.js';
4
4
  import { b as ModelsRegistry } from './models-registry-BcYJDKLm.js';
5
- import { y as ToolExecutorOptions, z as ToolExecutorStrategy, T as ToolBatchResult } from './index-mAWBdLyJ.js';
5
+ import { y as ToolExecutorOptions, z as ToolExecutorStrategy, T as ToolBatchResult } from './index-CI271MjL.js';
6
6
 
7
7
  interface CompactorOptions {
8
8
  preserveK?: number;
@@ -1,29 +1,29 @@
1
- export { A as AgentError, a as Capabilities, b as ConfigError, c as ContentBlock, 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, m as Provider, n as ProviderError, o as ProviderErrorBody, p as Request, q as Response, r as ResumedSession, s as RiskTier, S as SessionData, v as SessionError, w as SessionEvent, x as SessionMetadata, y as SessionStore, z as SessionSummary, B as SessionWriter, H as StopReason, K as StreamEvent, T as TextBlock, L as ThinkingBlock, Q as Tool, 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, 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 } from '../context-7u93AcGD.js';
2
- export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-BGro2qQB.js';
3
- export { A as AutonomyConfig, C as CONTEXT_WINDOW_MODES, a as Config, b as ConfigLoader, c as ConfigStore, d as ContextConfig, e as ContextWindowAggressiveOn, f as ContextWindowConfigLike, g as ContextWindowMode, h as ContextWindowModeId, i as ContextWindowPolicy, j as ContextWindowThresholds, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, L as LogConfig, M as MCPServerConfig, k as ModelMatrixEntry, P as PluginConfig, l as ProviderApiKey, m as ProviderConfig, S as SessionLoggingConfig, n as SyncCategory, o as SyncConfig, T as ToolsConfig, p as formatContextWindowModeList, q as getContextWindowMode, r as isContextWindowModeId, s as listContextWindowModes, t as resolveContextWindowPolicy } from '../config-ZRCf7sTu.js';
4
- export { C as CompactReport, a as Compactor } from '../compactor-D1RHFRmF.js';
5
- export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from '../permission-B6sldrSp.js';
1
+ export { A as AgentError, a as Capabilities, b as ConfigError, c as ContentBlock, 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, m as Provider, n as ProviderError, o as ProviderErrorBody, p as Request, q as Response, r as ResumedSession, s as RiskTier, S as SessionData, v as SessionError, w as SessionEvent, x as SessionMetadata, y as SessionStore, z as SessionSummary, B as SessionWriter, H as StopReason, K as StreamEvent, T as TextBlock, L as ThinkingBlock, Q as Tool, 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, 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 } from '../context-DtPKqKYV.js';
2
+ export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-BikCxGCx.js';
3
+ export { A as AutonomyConfig, C as CONTEXT_WINDOW_MODES, a as Config, b as ConfigLoader, c as ConfigStore, d as ContextConfig, e as ContextWindowAggressiveOn, f as ContextWindowConfigLike, g as ContextWindowMode, h as ContextWindowModeId, i as ContextWindowPolicy, j as ContextWindowThresholds, k as CustomModelDefinition, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, L as LogConfig, M as MCPServerConfig, l as ModelMatrixEntry, P as PluginConfig, m as ProviderApiKey, n as ProviderConfig, S as SessionLoggingConfig, o as SyncCategory, p as SyncConfig, T as ToolsConfig, q as formatContextWindowModeList, r as getContextWindowMode, s as isContextWindowModeId, t as listContextWindowModes, u as resolveContextWindowPolicy } from '../config-bht0txXS.js';
4
+ export { C as CompactReport, a as Compactor } from '../compactor-Duhsf0ge.js';
5
+ export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from '../permission-Drm7LpPo.js';
6
6
  export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as SessionRewinder } from '../session-rewinder-C9HnMkhP.js';
7
- export { A as AddAttachmentInput, a as Attachment, b as AttachmentKind, c as AttachmentMeta, d as AttachmentRef, e as AttachmentStore, D as DefaultSessionReader } from '../session-reader-bfgsy2a0.js';
7
+ export { A as AddAttachmentInput, a as Attachment, b as AttachmentKind, c as AttachmentMeta, d as AttachmentRef, e as AttachmentStore, D as DefaultSessionReader } from '../session-reader-BGhzMir4.js';
8
8
  export { D as DEFAULT_AUTONOMY_CONFIG, a as DEFAULT_CONTEXT_CONFIG, b as DEFAULT_SESSION_LOGGING_CONFIG, c as DEFAULT_TOOLS_CONFIG } from '../default-config-DEXI4jsl.js';
9
9
  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';
10
10
  export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-bOzkF5LL.js';
11
- export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-nkmdiFgi.js';
11
+ export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-Bax85amb.js';
12
12
  export { M as MemoryEntry, a as MemoryScope, b as MemoryStore } from '../memory-CEXuo7sz.js';
13
- 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-p4tP9tGF.js';
13
+ 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-CgU0yWpB.js';
14
14
  export { S as SkillEntry, a as SkillLoader, b as SkillManifest } from '../skill-CxuWrsKK.js';
15
- export { a as BuildContext, c as ModelCapabilities, e as Renderer, S as SystemPromptBuilder } from '../system-prompt-CM6zOhd2.js';
15
+ export { a as BuildContext, c as ModelCapabilities, e as Renderer, S as SystemPromptBuilder } from '../system-prompt-dtzV_mLm.js';
16
16
  export { I as InputReader, P as PromptOption } from '../input-reader-E-ffP2ee.js';
17
- export { M as MCPRegistryView, j as MetricsSinkView, P as Plugin, k as PluginAPI, l as PluginCapabilities, m as PluginDependency, n as PluginPipelines, o as ProviderFactory, r as ProviderRegistryView, S as SessionWriterView, u as SlashCommand, v as SlashCommandRegistryView, w as SystemPromptContributor, F as ToolRegistryView } from '../index-mAWBdLyJ.js';
18
- export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-gwMAo6E3.js';
17
+ export { M as MCPRegistryView, j as MetricsSinkView, P as Plugin, k as PluginAPI, l as PluginCapabilities, m as PluginDependency, n as PluginPipelines, o as ProviderFactory, r as ProviderRegistryView, S as SessionWriterView, u as SlashCommand, v as SlashCommandRegistryView, w as SystemPromptContributor, F as ToolRegistryView } from '../index-CI271MjL.js';
18
+ export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-Cuq1C8V9.js';
19
19
  export { D as DEFAULT_MODES, M as Mode, a as ModeConfig, b as ModeManifest, c as ModeStore } from '../mode-CV077NjV.js';
20
- export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-CjbD-i7-.js';
21
- export { C as CoordinatorEvents, k as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, l as MultiAgentCoordinator, S as SpawnResult, 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-Ba9Ni2hC.js';
20
+ export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-Dnhw4tnM.js';
21
+ export { C as CoordinatorEvents, k as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, l as MultiAgentCoordinator, S as SpawnResult, 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-BmC_xiog.js';
22
22
  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, l as TaskGraph, m as TaskNode, n as TaskPriority, o as TaskProgress, p as TaskSort, q as TaskStatus, r as TaskType, s as computeTaskProgress, t as findCriticalPath, u as topologicalSort } from '../task-graph-D1YQbpxF.js';
23
23
  export { A as AggregateHealth, H as HealthCheck, a as HealthCheckResult, b as HealthRegistry, c as HealthStatus, M as MetricLabels, d as MetricSeries, e as MetricsSink, f as MetricsSnapshot, S as Span, T as Tracer } from '../observability-BhnVLBLS.js';
24
- import '../events-Bt44ikPN.js';
24
+ import '../events-CbHTS4ZZ.js';
25
25
  import '../logger-DDd5C--Z.js';
26
- import '../retry-policy-KF18W4dg.js';
26
+ import '../retry-policy-Chtlvr5b.js';
27
27
  import '../models-registry-BcYJDKLm.js';
28
28
  import '../secret-vault-DoISxaKO.js';
29
29
  import '../secret-scrubber-3MHDDAtm.js';
@@ -1573,6 +1573,7 @@ function stripUndefined(obj) {
1573
1573
  // src/models/models-registry.ts
1574
1574
  var DEFAULT_URL = "https://models.dev/api.json";
1575
1575
  var DEFAULT_TTL_SECONDS = 24 * 3600;
1576
+ var DEFAULT_REFRESH_TIMEOUT_MS = 15e3;
1576
1577
  var FAMILY_BY_NPM = {
1577
1578
  "@ai-sdk/anthropic": "anthropic",
1578
1579
  "@ai-sdk/google-vertex/anthropic": "anthropic",
@@ -1609,6 +1610,7 @@ var DefaultModelsRegistry = class {
1609
1610
  fetchImpl;
1610
1611
  seed;
1611
1612
  maxStaleAgeMs;
1613
+ refreshTimeoutMs;
1612
1614
  overlay;
1613
1615
  overlayUrl;
1614
1616
  overlayFile;
@@ -1621,6 +1623,7 @@ var DefaultModelsRegistry = class {
1621
1623
  this.seed = opts.seed;
1622
1624
  const maxStaleSeconds = opts.maxStaleAgeSeconds ?? 7 * 24 * 3600;
1623
1625
  this.maxStaleAgeMs = maxStaleSeconds * 1e3;
1626
+ this.refreshTimeoutMs = opts.refreshTimeoutMs ?? DEFAULT_REFRESH_TIMEOUT_MS;
1624
1627
  this.overlay = opts.overlay;
1625
1628
  this.overlayUrl = opts.overlayUrl;
1626
1629
  this.overlayFile = opts.overlayFile;
@@ -1672,22 +1675,34 @@ var DefaultModelsRegistry = class {
1672
1675
  }
1673
1676
  /** Fetch + cache the models.dev base. Throws on failure (used by `refresh`). */
1674
1677
  async refreshBase() {
1675
- const res = await this.fetchImpl(this.url, {
1676
- method: "GET",
1677
- headers: { accept: "application/json" }
1678
- });
1679
- if (!res.ok) {
1680
- throw new Error(`ModelsRegistry: HTTP ${res.status} fetching ${this.url}`);
1681
- }
1682
- const json = await res.json();
1683
- this.fetchedAt = /* @__PURE__ */ new Date();
1684
- const envelope = {
1685
- fetchedAt: this.fetchedAt.toISOString(),
1686
- url: this.url,
1687
- payload: json
1688
- };
1689
- await atomicWrite(this.cacheFile, JSON.stringify(envelope));
1690
- return json;
1678
+ const controller = new AbortController();
1679
+ const timeout = setTimeout(() => controller.abort(), this.refreshTimeoutMs);
1680
+ try {
1681
+ const res = await this.fetchImpl(this.url, {
1682
+ method: "GET",
1683
+ headers: { accept: "application/json" },
1684
+ signal: controller.signal
1685
+ });
1686
+ clearTimeout(timeout);
1687
+ if (!res.ok) {
1688
+ throw new Error(`ModelsRegistry: HTTP ${res.status} fetching ${this.url}`);
1689
+ }
1690
+ const json = await res.json();
1691
+ this.fetchedAt = /* @__PURE__ */ new Date();
1692
+ const envelope = {
1693
+ fetchedAt: this.fetchedAt.toISOString(),
1694
+ url: this.url,
1695
+ payload: json
1696
+ };
1697
+ await atomicWrite(this.cacheFile, JSON.stringify(envelope));
1698
+ return json;
1699
+ } catch (err) {
1700
+ clearTimeout(timeout);
1701
+ if (err instanceof Error && err.name === "AbortError") {
1702
+ throw new Error(`ModelsRegistry: fetch timed out after ${this.refreshTimeoutMs}ms`);
1703
+ }
1704
+ throw err;
1705
+ }
1691
1706
  }
1692
1707
  /**
1693
1708
  * Resolve the curated overlay, memoised. Order: in-memory `overlay` →