@wrongstack/core 0.73.1 → 0.77.0

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 (41) hide show
  1. package/dist/{agent-bridge-C0Ze7Ldm.d.ts → agent-bridge-EWdqs8v6.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-BmITbs1Q.d.ts → agent-subagent-runner-D8qW8OSC.d.ts} +2 -2
  3. package/dist/coordination/index.d.ts +7 -7
  4. package/dist/coordination/index.js +64 -6
  5. package/dist/coordination/index.js.map +1 -1
  6. package/dist/defaults/index.d.ts +11 -11
  7. package/dist/defaults/index.js +107 -45
  8. package/dist/defaults/index.js.map +1 -1
  9. package/dist/{events-BBAlxBuw.d.ts → events-CYaoLN5_.d.ts} +37 -0
  10. package/dist/execution/index.d.ts +6 -6
  11. package/dist/extension/index.d.ts +2 -2
  12. package/dist/{index-yQbZ2NQx.d.ts → index-DIxjTOga.d.ts} +2 -2
  13. package/dist/{index-BN6i2Nfg.d.ts → index-Dsda0uCn.d.ts} +1 -1
  14. package/dist/index.d.ts +96 -23
  15. package/dist/index.js +234 -25
  16. package/dist/index.js.map +1 -1
  17. package/dist/infrastructure/index.d.ts +3 -3
  18. package/dist/infrastructure/index.js +16 -2
  19. package/dist/infrastructure/index.js.map +1 -1
  20. package/dist/kernel/index.d.ts +3 -3
  21. package/dist/kernel/index.js.map +1 -1
  22. package/dist/{logger-bOzkF5LL.d.ts → logger-BppKxDqZ.d.ts} +9 -0
  23. package/dist/{multi-agent-coordinator-BSBbZt0e.d.ts → multi-agent-coordinator-DpbG3wiy.d.ts} +1 -1
  24. package/dist/{null-fleet-bus-BCIRT_nV.d.ts → null-fleet-bus-u5ys3lW_.d.ts} +13 -4
  25. package/dist/observability/index.d.ts +1 -1
  26. package/dist/{parallel-eternal-engine-CjAYGaCw.d.ts → parallel-eternal-engine-Dn0P8Pbj.d.ts} +3 -3
  27. package/dist/{path-resolver-BnqXa9Ze.d.ts → path-resolver-B32v2JIq.d.ts} +1 -1
  28. package/dist/{plan-templates-DBgrTGPu.d.ts → plan-templates-BcUwLlMQ.d.ts} +7 -2
  29. package/dist/{provider-runner-n3KkHT_w.d.ts → provider-runner-CSi_7l0h.d.ts} +1 -1
  30. package/dist/sdd/index.d.ts +3 -3
  31. package/dist/storage/index.d.ts +3 -3
  32. package/dist/storage/index.js +22 -6
  33. package/dist/storage/index.js.map +1 -1
  34. package/dist/types/index.d.ts +10 -10
  35. package/dist/types/index.js +16 -2
  36. package/dist/types/index.js.map +1 -1
  37. package/dist/utils/index.d.ts +1 -1
  38. package/dist/utils/index.js +12 -2
  39. package/dist/utils/index.js.map +1 -1
  40. package/dist/{wstack-paths-eMXnY1_X.d.ts → wstack-paths-D7evAFWM.d.ts} +8 -1
  41. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
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-y87Jc5ei.js';
2
- export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-n3KkHT_w.js';
2
+ export { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-CSi_7l0h.js';
3
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, H as HookEntry, l as HookEvent, m as HookInput, n as HookMatcher, o as HookOutcome, I as InProcessHook, p as IndexingConfig, L as LaunchConfig, q as LogConfig, M as MCPServerConfig, r as ModelMatrixEntry, P as PluginConfig, s as ProviderApiKey, t as ProviderConfig, S as SessionLoggingConfig, u as ShellHook, v as SyncCategory, w as SyncConfig, T as ToolsConfig, x as formatContextWindowModeList, y as getContextWindowMode, z as isContextWindowModeId, B as listContextWindowModes, E as resolveContextWindowPolicy } from '../config-Dy0CK_o6.js';
4
4
  export { C as CompactReport, a as Compactor } from '../compactor-D_ExJajC.js';
5
5
  export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from '../permission-V5BLOrY6.js';
@@ -7,22 +7,22 @@ export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as
7
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-BIpwM60D.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
- export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-bOzkF5LL.js';
11
- export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-BnqXa9Ze.js';
10
+ export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-BppKxDqZ.js';
11
+ export { D as DefaultPathResolver, a as DefaultTokenCounter } from '../path-resolver-B32v2JIq.js';
12
12
  export { M as MemoryEntry, a as MemoryScope, b as MemoryStore } from '../memory-CEXuo7sz.js';
13
- import { I as IterationStage, g as ParallelIterationStage } from '../parallel-eternal-engine-CjAYGaCw.js';
14
- export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, h as buildRecoveryStrategies } from '../parallel-eternal-engine-CjAYGaCw.js';
13
+ import { I as IterationStage, g as ParallelIterationStage } from '../parallel-eternal-engine-Dn0P8Pbj.js';
14
+ export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, h as buildRecoveryStrategies } from '../parallel-eternal-engine-Dn0P8Pbj.js';
15
15
  export { S as SkillEntry, a as SkillLoader, b as SkillManifest } from '../skill-CxuWrsKK.js';
16
16
  export { a as BuildContext, c as ModelCapabilities, e as Renderer, S as SystemPromptBuilder } from '../system-prompt-CA11g6Jo.js';
17
17
  export { I as InputReader, P as PromptOption } from '../input-reader-E-ffP2ee.js';
18
- export { C as CoordinatorEvents, o as CoordinatorStatus, D as DoneCondition, M as MCPRegistryView, t as MetricsSinkView, u as MultiAgentConfig, v as MultiAgentCoordinator, P as Plugin, w as PluginAPI, x as PluginCapabilities, y as PluginDependency, z as PluginPipelines, E as ProviderFactory, G as ProviderRegistryView, S as SessionWriterView, H as SlashCommand, I as SlashCommandRegistryView, J as SpawnResult, L as SubagentConfig, N as SubagentContext, O as SubagentError, Q as SubagentErrorKind, R as SubagentRunContext, T as SubagentRunOutcome, U as SubagentRunner, W as TaskDelegation, X as TaskResult, Y as TaskSpec, Z as ToolRegistryView } from '../agent-subagent-runner-BmITbs1Q.js';
18
+ export { C as CoordinatorEvents, o as CoordinatorStatus, D as DoneCondition, M as MCPRegistryView, t as MetricsSinkView, u as MultiAgentConfig, v as MultiAgentCoordinator, P as Plugin, w as PluginAPI, x as PluginCapabilities, y as PluginDependency, z as PluginPipelines, E as ProviderFactory, G as ProviderRegistryView, S as SessionWriterView, H as SlashCommand, I as SlashCommandRegistryView, J as SpawnResult, L as SubagentConfig, N as SubagentContext, O as SubagentError, Q as SubagentErrorKind, R as SubagentRunContext, T as SubagentRunOutcome, U as SubagentRunner, W as TaskDelegation, X as TaskResult, Y as TaskSpec, Z as ToolRegistryView } from '../agent-subagent-runner-D8qW8OSC.js';
19
19
  export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-Cuq1C8V9.js';
20
20
  export { D as DEFAULT_MODES, M as Mode, a as ModeConfig, b as ModeManifest, c as ModeStore } from '../mode-BO4SEUIv.js';
21
- export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-C0Ze7Ldm.js';
21
+ export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-EWdqs8v6.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
- export { S as SystemPromptContributor } from '../index-BN6i2Nfg.js';
25
- import '../events-BBAlxBuw.js';
24
+ export { S as SystemPromptContributor } from '../index-Dsda0uCn.js';
25
+ import '../events-CYaoLN5_.js';
26
26
  import '../logger-DDd5C--Z.js';
27
27
  import '../retry-policy-CG3qvH_e.js';
28
28
  import '../models-registry-BcYJDKLm.js';
@@ -30,7 +30,7 @@ import '../secret-vault-DoISxaKO.js';
30
30
  import '../secret-scrubber-3MHDDAtm.js';
31
31
  import '../path-resolver-CPRj4bFY.js';
32
32
  import '../goal-store-C7jcumEh.js';
33
- import '../multi-agent-coordinator-BSBbZt0e.js';
33
+ import '../multi-agent-coordinator-DpbG3wiy.js';
34
34
  import 'node:events';
35
35
 
36
36
  /** Union of serial and parallel autonomy engine stage types (from EternalAutonomyEngine / ParallelEternalEngine). */
@@ -2,6 +2,7 @@ import { randomBytes, createCipheriv, createDecipheriv, randomUUID } from 'crypt
2
2
  import * as fs2 from 'fs';
3
3
  import * as fs from 'fs/promises';
4
4
  import * as path4 from 'path';
5
+ import * as os from 'os';
5
6
 
6
7
  // src/types/blocks.ts
7
8
  function isTextBlock(b) {
@@ -659,11 +660,13 @@ var DefaultLogger = class _DefaultLogger {
659
660
  file;
660
661
  bindings;
661
662
  pretty;
663
+ stderr;
662
664
  constructor(opts = {}) {
663
665
  this.level = opts.level ?? process.env.WRONGSTACK_LOG_LEVEL ?? "info";
664
666
  this.file = opts.file;
665
667
  this.bindings = opts.bindings ?? {};
666
668
  this.pretty = opts.pretty ?? true;
669
+ this.stderr = opts.stderr !== false;
667
670
  if (this.file) {
668
671
  try {
669
672
  fs2.mkdirSync(path4.dirname(this.file), { recursive: true });
@@ -691,6 +694,7 @@ var DefaultLogger = class _DefaultLogger {
691
694
  level: this.level,
692
695
  file: this.file,
693
696
  pretty: this.pretty,
697
+ stderr: this.stderr,
694
698
  bindings: { ...this.bindings, ...bindings }
695
699
  });
696
700
  }
@@ -710,6 +714,7 @@ var DefaultLogger = class _DefaultLogger {
710
714
  } catch {
711
715
  }
712
716
  }
717
+ if (!this.stderr) return;
713
718
  if (r <= LEVEL_RANK.warn || this.level === "debug" || this.level === "trace") {
714
719
  const head = `${color.dim(ts)} ${COLORS[level](level.toUpperCase().padEnd(5))} ${msg}`;
715
720
  if (ctx !== void 0) {
@@ -1205,7 +1210,11 @@ var PROJECT_MARKERS = [
1205
1210
  "go.mod",
1206
1211
  "Cargo.toml",
1207
1212
  "pyproject.toml",
1208
- ".wrongstack"
1213
+ // Use AGENTS.md, not the bare .wrongstack directory. A bare .wrongstack/
1214
+ // directory can be the global config directory (~/.wrongstack), which is
1215
+ // NOT a project marker. Only .wrongstack/AGENTS.md signals a real
1216
+ // WrongStack project.
1217
+ ".wrongstack/AGENTS.md"
1209
1218
  ];
1210
1219
  var DefaultPathResolver = class {
1211
1220
  projectRoot;
@@ -1217,7 +1226,12 @@ var DefaultPathResolver = class {
1217
1226
  detectProjectRoot(start) {
1218
1227
  let dir = path4.resolve(start);
1219
1228
  const root = path4.parse(dir).root;
1229
+ const home = path4.resolve(os.homedir());
1230
+ const startPath = path4.resolve(start);
1220
1231
  while (dir !== root) {
1232
+ if (dir === home && dir !== startPath) {
1233
+ break;
1234
+ }
1221
1235
  for (const marker of PROJECT_MARKERS) {
1222
1236
  try {
1223
1237
  fs2.accessSync(path4.join(dir, marker));
@@ -1229,7 +1243,7 @@ var DefaultPathResolver = class {
1229
1243
  if (parent === dir) break;
1230
1244
  dir = parent;
1231
1245
  }
1232
- return path4.resolve(start);
1246
+ return startPath;
1233
1247
  }
1234
1248
  resolve(input) {
1235
1249
  const abs = path4.isAbsolute(input) ? input : path4.resolve(this.cwd, input);