@wrongstack/sdd 1.0.29 → 1.0.33

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.
@@ -59,6 +59,7 @@ export declare class SddBoardStore {
59
59
  private baseDirReady;
60
60
  private cachedIndex;
61
61
  private cachedIndexSignature;
62
+ private indexNeedsRebuild;
62
63
  constructor(opts: SddBoardStoreOptions);
63
64
  snapshotPath(runId: string): string;
64
65
  eventsPath(runId: string): string;
@@ -90,6 +91,7 @@ export declare class SddBoardStore {
90
91
  private compactEventTail;
91
92
  private drainControlInternal;
92
93
  private readIndex;
94
+ private rebuildIndexEntries;
93
95
  private updateIndex;
94
96
  private removeFromIndex;
95
97
  private indexSignature;
@@ -64,6 +64,15 @@ export declare class SddParallelRun {
64
64
  /** Monotonic dispatch counter (unique subagent ids) + dispatch-round counter. */
65
65
  private dispatchSeq;
66
66
  private round;
67
+ /**
68
+ * True once `run()` has returned. A FINISHED run is not "running" even when
69
+ * the graph is left unsettled (deadlock exit): `isRunning()` gates
70
+ * `cleanupWorktrees()` / `rollback()` / the Ctrl+C ladders, and a returned
71
+ * run kept reporting live, silently no-oping cleanup and refusing rollback
72
+ * with "run still active" until the user called `stop()` on a run that had
73
+ * already ended. Cleared again at the top of `run()` so a re-run re-arms.
74
+ */
75
+ private runReturned;
67
76
  constructor(opts: SddParallelRunOptions);
68
77
  /** Type-safe emit on the optional EventBus (no-op when unwired). */
69
78
  private emit;
@@ -252,5 +261,6 @@ export declare class SddParallelRun {
252
261
  private persistRetries;
253
262
  private buildProgress;
254
263
  private sddTaskRecoveryHost;
264
+ private sddTaskDispatchHost;
255
265
  }
256
266
  //# sourceMappingURL=sdd-parallel-run.d.ts.map
@@ -83,7 +83,7 @@ export declare class SddTaskDecomposer {
83
83
  * Sorted by priority (critical first), then by creation time.
84
84
  */
85
85
  private pendingReadyNodes;
86
- /** True when at least one non-completed, non-failed task is blocked. */
86
+ /** True when non-completed, non-failed tasks remain blocked and cannot make progress. */
87
87
  private hasAnyBlockedTasks;
88
88
  }
89
89
  //# sourceMappingURL=sdd-task-decomposer.d.ts.map
@@ -0,0 +1,41 @@
1
+ import type { TaskNode } from '@wrongstack/core/types';
2
+ import type { TaskOutcome, WaveResult } from './sdd-parallel-run-types.js';
3
+ import type { TaskBatch } from './sdd-task-decomposer.js';
4
+ export interface SddTaskDispatchHost {
5
+ executeOne: (task: import('@wrongstack/core/types').TaskNode) => Promise<import('./sdd-parallel-run-types.js').TaskOutcome>;
6
+ stopRequested: boolean;
7
+ opts: import('./sdd-parallel-run-types.js').SddParallelRunOptions;
8
+ coordinator: import('@wrongstack/core/coordination').DefaultMultiAgentCoordinator | null;
9
+ usedNicknames: Set<string>;
10
+ idleTimeoutMs: number;
11
+ timeoutMs: number | undefined;
12
+ runId: string;
13
+ dispatchSeq: number;
14
+ emit: <K extends keyof import('@wrongstack/core/kernel').EventMap>(event: K, payload: import('@wrongstack/core/kernel').EventMap[K]) => void;
15
+ taskCwds: Map<string, string>;
16
+ taskBranches: Map<string, string>;
17
+ taskSubagents: Map<string, string>;
18
+ cancelledTasks: Set<string>;
19
+ allocateWorktrees: (tasks: import('@wrongstack/core/types').TaskNode[]) => Promise<void>;
20
+ resolveWorktrees: (tasks: import('@wrongstack/core/types').TaskNode[]) => Promise<void>;
21
+ integrateWorktree: (task: import('@wrongstack/core/types').TaskNode, result?: import('@wrongstack/core/types').TaskResult<unknown> | undefined) => Promise<{
22
+ ok: boolean;
23
+ conflictFiles?: string[];
24
+ reason?: string;
25
+ fatal?: boolean;
26
+ }>;
27
+ applyTaskFailure: (taskId: string, subagentId: string, errMsg: string) => Promise<void>;
28
+ retryMap: Map<string, number>;
29
+ persistRetries: (taskId: string, retries: number) => void;
30
+ maxRetries: number;
31
+ trySupervisorRescue: (taskId: string, errMsg: string) => Promise<boolean>;
32
+ supervisorEscalations: Map<string, number>;
33
+ maxSupervisorEscalations: number;
34
+ setTaskModel: (taskId: string, model: string | undefined, provider?: string | undefined) => boolean;
35
+ splitTask: (taskId: string, subtasks: import('./sdd-parallel-run-types.js').SddSubtaskSpec[]) => string[];
36
+ }
37
+ export declare function executeWave(this: SddTaskDispatchHost, batch: TaskBatch): Promise<WaveResult>;
38
+ export declare function executeOne(this: SddTaskDispatchHost, task: TaskNode): Promise<TaskOutcome>;
39
+ export declare function applyTaskFailure(this: SddTaskDispatchHost, taskId: string, subagentId: string, errMsg: string): Promise<void>;
40
+ export declare function trySupervisorRescue(this: SddTaskDispatchHost, taskId: string, errMsg: string): Promise<boolean>;
41
+ //# sourceMappingURL=sdd-task-dispatch.d.ts.map
@@ -18,9 +18,11 @@ export interface SpecIndexEntry {
18
18
  export declare class SpecStore {
19
19
  private readonly baseDir;
20
20
  private readonly indexPath;
21
+ private writeChain;
21
22
  constructor(opts: SpecStoreOptions);
22
23
  save(spec: Specification): Promise<void>;
23
24
  load(id: string): Promise<Specification | null>;
25
+ private loadFile;
24
26
  list(): Promise<SpecIndexEntry[]>;
25
27
  delete(id: string): Promise<boolean>;
26
28
  exists(id: string): Promise<boolean>;
@@ -28,6 +30,9 @@ export declare class SpecStore {
28
30
  createDraft(title: string, overview?: string): Promise<Specification>;
29
31
  /** Update spec fields and persist. */
30
32
  update(id: string, patch: Partial<Omit<Specification, 'id' | 'createdAt'>>): Promise<Specification | null>;
33
+ /** Serialize every read-modify-write across this process and other store instances. */
34
+ private enqueueWrite;
35
+ private writeSnapshot;
31
36
  /**
32
37
  * Resolve a spec id to its file, refusing anything that escapes `baseDir`.
33
38
  * `id` arrives from a WebSocket frame (`specs-ws-handler.ts:96-97,152`,
@@ -38,6 +43,7 @@ export declare class SpecStore {
38
43
  */
39
44
  private filePath;
40
45
  private readIndex;
46
+ private rebuildIndex;
41
47
  private updateIndex;
42
48
  private removeFromIndex;
43
49
  }
@@ -24,6 +24,7 @@ export declare class TaskGraphStore implements TaskStore {
24
24
  constructor(opts: TaskGraphStoreOptions);
25
25
  save(graph: TaskGraph): Promise<void>;
26
26
  load(id: string): Promise<TaskGraph | null>;
27
+ private loadFile;
27
28
  list(): Promise<TaskGraphIndexEntry[]>;
28
29
  delete(id: string): Promise<boolean>;
29
30
  exists(id: string): Promise<boolean>;
@@ -46,6 +47,10 @@ export declare class TaskGraphStore implements TaskStore {
46
47
  */
47
48
  private filePath;
48
49
  private readIndex;
50
+ private rebuildIndex;
51
+ /** Serialize graph and index mutations across this process and other store instances. */
52
+ private enqueueWrite;
53
+ private indexEntry;
49
54
  private updateIndex;
50
55
  private removeFromIndex;
51
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/sdd",
3
- "version": "1.0.29",
3
+ "version": "1.0.33",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack Spec-Driven Development engine — standalone package extracted from @wrongstack/core. Task graph generation, tracking, execution, lifecycle management, and AI-driven spec building for SDD workflows.",
6
6
  "repository": {
@@ -27,10 +27,10 @@
27
27
  "!dist/**/*.map"
28
28
  ],
29
29
  "dependencies": {
30
- "@wrongstack/core": "1.0.29",
31
- "@wrongstack/kanban": "1.0.29",
32
- "@wrongstack/primitives": "1.0.29",
33
- "@wrongstack/requirement-intake": "1.0.29"
30
+ "@wrongstack/core": "1.0.33",
31
+ "@wrongstack/kanban": "1.0.33",
32
+ "@wrongstack/primitives": "1.0.33",
33
+ "@wrongstack/requirement-intake": "1.0.33"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^26.5.1",