@wrongstack/core 0.281.3 → 0.282.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 (55) hide show
  1. package/dist/{agent-subagent-runner-DyOSK2Wy.d.ts → agent-subagent-runner-Dksf0QVU.d.ts} +15 -4
  2. package/dist/{config-CN-vdDEI.d.ts → config-BCAEJicb.d.ts} +33 -1
  3. package/dist/coordination/index.d.ts +147 -48
  4. package/dist/coordination/index.js +1244 -274
  5. package/dist/coordination/index.js.map +1 -1
  6. package/dist/defaults/index.d.ts +18 -18
  7. package/dist/defaults/index.js +980 -166
  8. package/dist/defaults/index.js.map +1 -1
  9. package/dist/{director-state-BfeCUbmk.d.ts → director-state-B_GPa78Q.d.ts} +14 -0
  10. package/dist/{events-C5hLU0AT.d.ts → events-CovDylaH.d.ts} +2 -1
  11. package/dist/execution/index.d.ts +10 -10
  12. package/dist/execution/index.js +69 -3
  13. package/dist/execution/index.js.map +1 -1
  14. package/dist/extension/index.d.ts +4 -4
  15. package/dist/{global-mailbox-CHM1QkCi.d.ts → global-mailbox-CNfgvRw3.d.ts} +1 -1
  16. package/dist/{goal-store-BLGZq16t.d.ts → goal-store-CBd749M4.d.ts} +1 -1
  17. package/dist/hq/index.d.ts +4 -4
  18. package/dist/{index-C1E-_71T.d.ts → index-D5HB7WkV.d.ts} +4 -3
  19. package/dist/index.d.ts +3005 -2704
  20. package/dist/index.js +51862 -49927
  21. package/dist/index.js.map +1 -1
  22. package/dist/infrastructure/index.d.ts +3 -3
  23. package/dist/kernel/index.d.ts +7 -7
  24. package/dist/kernel/index.js.map +1 -1
  25. package/dist/{mcp-servers-EKRAcJDi.d.ts → mcp-servers-DJYwZXyH.d.ts} +1 -1
  26. package/dist/models/index.d.ts +2 -2
  27. package/dist/models/index.js +100 -14
  28. package/dist/models/index.js.map +1 -1
  29. package/dist/{multi-agent-coordinator-IpHCuHUa.d.ts → multi-agent-coordinator-4DC31QWu.d.ts} +1 -1
  30. package/dist/{null-fleet-bus-ZBkKGR9j.d.ts → null-fleet-bus-DuvA8PIR.d.ts} +74 -6
  31. package/dist/observability/index.d.ts +1 -1
  32. package/dist/{parallel-eternal-engine-Cc2CNgmv.d.ts → parallel-eternal-engine-BwcA0bAt.d.ts} +4 -4
  33. package/dist/{pipeline-E7_jqGyV.d.ts → pipeline-DM-CPTUs.d.ts} +1 -1
  34. package/dist/{provider-model-resolve-KgIdiEQ6.d.ts → provider-model-resolve-hNUbewMd.d.ts} +1 -1
  35. package/dist/{provider-runner-DxWXNHL1.d.ts → provider-runner-Bz4GyUqo.d.ts} +1 -1
  36. package/dist/sdd/index.d.ts +6 -6
  37. package/dist/sdd/index.js +76 -2
  38. package/dist/sdd/index.js.map +1 -1
  39. package/dist/{session-event-bridge-vA2fLV58.d.ts → session-event-bridge-Bkp7ORfc.d.ts} +2 -2
  40. package/dist/skills/index.d.ts +84 -84
  41. package/dist/storage/index.d.ts +168 -168
  42. package/dist/storage/index.js +19 -7
  43. package/dist/storage/index.js.map +1 -1
  44. package/dist/{todos-checkpoint-B1QVkoa8.d.ts → todos-checkpoint-addCdQ9f.d.ts} +2 -2
  45. package/dist/{tool-executor-BWtYwuPI.d.ts → tool-executor-B3spV_Q6.d.ts} +7 -7
  46. package/dist/tools/index.d.ts +1 -1
  47. package/dist/types/index.d.ts +33 -33
  48. package/dist/types/index.js.map +1 -1
  49. package/dist/utils/index.d.ts +113 -113
  50. package/dist/{worktree-manager-C6CIilTT.d.ts → worktree-manager-BBXdJq-Y.d.ts} +1 -1
  51. package/instructions/agents/reviewer.md +25 -0
  52. package/instructions/agents/verifier.md +24 -0
  53. package/instructions/coordination/director-preamble.md +24 -2
  54. package/instructions/coordination/subagent-baseline.md +8 -1
  55. package/package.json +1 -1
@@ -26,6 +26,19 @@ interface DirectorTaskState {
26
26
  toolCalls?: number | undefined;
27
27
  durationMs?: number | undefined;
28
28
  error?: string | undefined;
29
+ worktree?: DirectorTaskWorktreeState | undefined;
30
+ }
31
+ interface DirectorTaskWorktreeState {
32
+ taskId: string;
33
+ subagentId: string;
34
+ handleId: string;
35
+ dir: string;
36
+ branch: string;
37
+ baseBranch: string;
38
+ status: 'allocated' | 'fallback' | 'committed' | 'merged' | 'kept' | 'released' | 'conflict' | 'failed';
39
+ commitSha?: string | undefined;
40
+ conflictFiles?: string[] | undefined;
41
+ error?: string | undefined;
29
42
  }
30
43
  interface DirectorStateSnapshot {
31
44
  version: 1;
@@ -97,6 +110,7 @@ declare class DirectorStateCheckpoint {
97
110
  recordTaskStatus(taskId: string, patch: Partial<DirectorTaskState> & {
98
111
  status: DirectorTaskState['status'];
99
112
  }): void;
113
+ recordTaskWorktree(taskId: string, worktree: DirectorTaskWorktreeState): void;
100
114
  setUsage(usage: unknown): void;
101
115
  /** Force a synchronous flush — used by Director.shutdown(). */
102
116
  flush(): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { U as Usage, d as Context, l as ToolErrorCategory, m as ToolProgressEvent, g as Tool, n as RiskTier, o as ToolOutputMetadata } from './tool-LVSLiE1s.js';
1
+ import { U as Usage, d as Context, i as ContentBlock, l as ToolErrorCategory, m as ToolProgressEvent, g as Tool, n as RiskTier, o as ToolOutputMetadata } from './tool-LVSLiE1s.js';
2
2
  import { a as PermissionDecision } from './permission-B6YAtNFz.js';
3
3
 
4
4
  /**
@@ -342,6 +342,7 @@ interface EventMap {
342
342
  sessionId?: string | undefined;
343
343
  ctx: Context;
344
344
  model: string;
345
+ content?: ContentBlock[] | undefined;
345
346
  usage: Usage;
346
347
  stopReason: string;
347
348
  };
@@ -1,14 +1,14 @@
1
- export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorOptions, d as CompactorStrategy, Z as ContextWindowBudgetSnapshot, $ as DEFAULT_RECOVERY_STRATEGIES, D as DefaultDesignKitLoader, e as DefaultErrorHandler, f as DefaultPromptLoader, g as DefaultRetryPolicy, h as DefaultSkillLoader, i as DesignKitLoaderOptions, k as DoneCheckResult, l as DoneConditionChecker, H as HybridCompactor, I as IntelligentCompactor, m as IntelligentCompactorOptions, P as PersistedActiveKit, n as PromptLoaderOptions, a0 as RecoveryStrategy, S as SelectiveCompactor, o as SelectiveCompactorOptions, p as SkillLoaderOptions, q as StrategyCompactorOptions, T as ToolExecutor, _ as _resetDesignKitLoaderMemo, r as _resetDesignRulesCache, s as activateDesign, u as buildGoalPreamble, a1 as buildRecoveryStrategies, v as clearActiveKit, w as clearPersistedActiveKit, x as createStrategyCompactor, y as designProjectDir, z as detectFrontendFile, B as detectFrontendIntent, E as getDesignKitLoader, F as getDesignState, G as installDesignStudioMiddleware, J as loadActiveKit, K as loadProjectDesignRules, L as makeAutonomyPromptContributor, M as makeDesignDetectToolCallMiddleware, N as makeDesignDetectUserInputMiddleware, O as makeDesignStudioRequestMiddleware, R as recordKitChoice, V as renderPrompt, W as resolveBundledDesignKitsDir, X as setActiveKit } from '../tool-executor-BWtYwuPI.js';
1
+ export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorOptions, d as CompactorStrategy, Z as ContextWindowBudgetSnapshot, $ as DEFAULT_RECOVERY_STRATEGIES, D as DefaultDesignKitLoader, e as DefaultErrorHandler, f as DefaultPromptLoader, g as DefaultRetryPolicy, h as DefaultSkillLoader, i as DesignKitLoaderOptions, k as DoneCheckResult, l as DoneConditionChecker, H as HybridCompactor, I as IntelligentCompactor, m as IntelligentCompactorOptions, P as PersistedActiveKit, n as PromptLoaderOptions, a0 as RecoveryStrategy, S as SelectiveCompactor, o as SelectiveCompactorOptions, p as SkillLoaderOptions, q as StrategyCompactorOptions, T as ToolExecutor, _ as _resetDesignKitLoaderMemo, r as _resetDesignRulesCache, s as activateDesign, u as buildGoalPreamble, a1 as buildRecoveryStrategies, v as clearActiveKit, w as clearPersistedActiveKit, x as createStrategyCompactor, y as designProjectDir, z as detectFrontendFile, B as detectFrontendIntent, E as getDesignKitLoader, F as getDesignState, G as installDesignStudioMiddleware, J as loadActiveKit, K as loadProjectDesignRules, L as makeAutonomyPromptContributor, M as makeDesignDetectToolCallMiddleware, N as makeDesignDetectUserInputMiddleware, O as makeDesignStudioRequestMiddleware, R as recordKitChoice, V as renderPrompt, W as resolveBundledDesignKitsDir, X as setActiveKit } from '../tool-executor-B3spV_Q6.js';
2
2
  import { P as Provider, a as ReasoningConfig, r as Capabilities, c as Request } from '../tool-LVSLiE1s.js';
3
- import { e as BrainDecision, h as BrainDecisionRequest, B as BrainArbiter } from '../events-C5hLU0AT.js';
4
- export { E as EternalAutonomyEngine, h as EternalAutonomyOptions, i as EternalEngineState, I as IterationStage, P as ParallelEngineState, j as ParallelEternalEngine, k as ParallelEternalOptions, l as ParallelIterationStage } from '../parallel-eternal-engine-Cc2CNgmv.js';
5
- import { h as ModelRuntimeConfig } from '../config-CN-vdDEI.js';
6
- import '../pipeline-E7_jqGyV.js';
3
+ import { e as BrainDecision, h as BrainDecisionRequest, B as BrainArbiter } from '../events-CovDylaH.js';
4
+ export { E as EternalAutonomyEngine, h as EternalAutonomyOptions, i as EternalEngineState, I as IterationStage, P as ParallelEngineState, j as ParallelEternalEngine, k as ParallelEternalOptions, l as ParallelIterationStage } from '../parallel-eternal-engine-BwcA0bAt.js';
5
+ import { h as ModelRuntimeConfig } from '../config-BCAEJicb.js';
6
+ import '../pipeline-DM-CPTUs.js';
7
7
  import '../mailbox-types-BGZWrYTJ.js';
8
- import '../session-event-bridge-vA2fLV58.js';
8
+ import '../session-event-bridge-Bkp7ORfc.js';
9
9
  import '../compactor-BxddyCFu.js';
10
- import '../agent-subagent-runner-DyOSK2Wy.js';
11
- import '../index-C1E-_71T.js';
10
+ import '../agent-subagent-runner-Dksf0QVU.js';
11
+ import '../index-D5HB7WkV.js';
12
12
  import '../logger-B63L5bTg.js';
13
13
  import '../permission-B6YAtNFz.js';
14
14
  import '../observability-D-HZN_mF.js';
@@ -18,8 +18,8 @@ import '../selector-Bx2HgUkU.js';
18
18
  import '../skill-DHniprNl.js';
19
19
  import '../wstack-paths-C3K40Qst.js';
20
20
  import '../prompt-DLd35n4Q.js';
21
- import '../goal-store-BLGZq16t.js';
22
- import '../multi-agent-coordinator-IpHCuHUa.js';
21
+ import '../goal-store-CBd749M4.js';
22
+ import '../multi-agent-coordinator-4DC31QWu.js';
23
23
  import 'node:events';
24
24
 
25
25
  /**
@@ -6119,6 +6119,34 @@ var BUILD_AGENTS = [
6119
6119
 
6120
6120
  // src/coordination/agents/phase4-verify.ts
6121
6121
  var VERIFY_AGENTS = [
6122
+ {
6123
+ config: {
6124
+ id: "verifier",
6125
+ name: "Verifier",
6126
+ role: "verifier",
6127
+ tools: [...TOOLS.inspect, "bash", "exec", "lint", "typecheck", "test", "git"],
6128
+ prompt: agentPrompt("verifier")
6129
+ },
6130
+ budget: HEAVY_BUDGET,
6131
+ capability: {
6132
+ phase: "verify",
6133
+ summary: "Independent verification gate: runs the relevant checks until they pass or returns exact failures that need another implementation pass.",
6134
+ keywords: [
6135
+ "verify",
6136
+ "verification",
6137
+ "quality gate",
6138
+ "prove it works",
6139
+ "run checks",
6140
+ "run tests until pass",
6141
+ "test pass",
6142
+ "green build",
6143
+ "typecheck",
6144
+ "lint",
6145
+ "regression check",
6146
+ "acceptance gate"
6147
+ ]
6148
+ }
6149
+ },
6122
6150
  {
6123
6151
  config: {
6124
6152
  id: "test",
@@ -6385,6 +6413,34 @@ var VERIFY_AGENTS = [
6385
6413
 
6386
6414
  // src/coordination/agents/phase5-review.ts
6387
6415
  var REVIEW_AGENTS = [
6416
+ {
6417
+ config: {
6418
+ id: "reviewer",
6419
+ name: "Reviewer",
6420
+ role: "reviewer",
6421
+ tools: [...TOOLS.inspect, "git"],
6422
+ prompt: agentPrompt("reviewer")
6423
+ },
6424
+ budget: MEDIUM_BUDGET,
6425
+ capability: {
6426
+ phase: "review",
6427
+ summary: "Independent AI reviewer: audits another agent's output, flags uncertainty, correlated-failure risk, and must-fix defects.",
6428
+ keywords: [
6429
+ "reviewer",
6430
+ "independent review",
6431
+ "ai review",
6432
+ "review agent",
6433
+ "quality review",
6434
+ "second opinion",
6435
+ "check another agent",
6436
+ "cross check",
6437
+ "uncertainty",
6438
+ "correlated error",
6439
+ "verify output",
6440
+ "quality control"
6441
+ ]
6442
+ }
6443
+ },
6388
6444
  {
6389
6445
  config: {
6390
6446
  id: "code-reviewer",
@@ -10324,11 +10380,16 @@ ${errorDetails}`,
10324
10380
  ctx
10325
10381
  );
10326
10382
  if (post.additionalContext) {
10327
- const appended = `
10383
+ if (post.contextAs === "separate") {
10384
+ const block = { type: "text", text: post.additionalContext };
10385
+ ctx.state.appendMessage({ role: "user", content: [block] });
10386
+ } else {
10387
+ const appended = `
10328
10388
 
10329
10389
  ${post.additionalContext}`;
10330
- result = { ...result, content: `${result.content}${appended}` };
10331
- budget = Math.max(0, budget - Buffer.byteLength(appended, "utf8"));
10390
+ result = { ...result, content: `${result.content}${appended}` };
10391
+ budget = Math.max(0, budget - Buffer.byteLength(appended, "utf8"));
10392
+ }
10332
10393
  }
10333
10394
  }
10334
10395
  const outputChars = typeof result.content === "string" ? result.content.length : 0;
@@ -10562,6 +10623,11 @@ ${progressTail}`;
10562
10623
  break;
10563
10624
  }
10564
10625
  if (ev.type === "partial_output" && typeof ev.text === "string") {
10626
+ if (ev.data?.["livePreview"] === true) {
10627
+ flushProgressTail(true);
10628
+ emitProgress(ev);
10629
+ continue;
10630
+ }
10565
10631
  if (!headComplete) {
10566
10632
  const remaining = _ToolExecutor.PROGRESS_HEAD_CHARS - progressHead.length;
10567
10633
  if (ev.text.length <= remaining) {