@wrongstack/core 0.1.8 → 0.1.10

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 (73) hide show
  1. package/dist/agent-bridge-6KPqsFx6.d.ts +33 -0
  2. package/dist/compactor-B4mQZXf2.d.ts +17 -0
  3. package/dist/config-BU9f_5yH.d.ts +193 -0
  4. package/dist/{provider-txgB0Oq9.d.ts → context-BmM2xGUZ.d.ts} +532 -472
  5. package/dist/coordination/index.d.ts +694 -0
  6. package/dist/coordination/index.js +1995 -0
  7. package/dist/coordination/index.js.map +1 -0
  8. package/dist/defaults/index.d.ts +34 -2206
  9. package/dist/defaults/index.js +4116 -3790
  10. package/dist/defaults/index.js.map +1 -1
  11. package/dist/events-BMNaEFZl.d.ts +218 -0
  12. package/dist/execution/index.d.ts +260 -0
  13. package/dist/execution/index.js +1625 -0
  14. package/dist/execution/index.js.map +1 -0
  15. package/dist/index.d.ts +50 -12
  16. package/dist/index.js +6669 -5909
  17. package/dist/index.js.map +1 -1
  18. package/dist/infrastructure/index.d.ts +10 -0
  19. package/dist/infrastructure/index.js +575 -0
  20. package/dist/infrastructure/index.js.map +1 -0
  21. package/dist/input-reader-E-ffP2ee.d.ts +12 -0
  22. package/dist/kernel/index.d.ts +15 -4
  23. package/dist/kernel/index.js.map +1 -1
  24. package/dist/logger-BH6AE0W9.d.ts +24 -0
  25. package/dist/logger-BMQgxvdy.d.ts +12 -0
  26. package/dist/mcp-servers-Dzgg4x1w.d.ts +100 -0
  27. package/dist/memory-CEXuo7sz.d.ts +16 -0
  28. package/dist/mode-CV077NjV.d.ts +27 -0
  29. package/dist/models/index.d.ts +60 -0
  30. package/dist/models/index.js +621 -0
  31. package/dist/models/index.js.map +1 -0
  32. package/dist/models-registry-DqzwpBQy.d.ts +46 -0
  33. package/dist/models-registry-Y2xbog0E.d.ts +95 -0
  34. package/dist/multi-agent-fmkRHtof.d.ts +283 -0
  35. package/dist/observability/index.d.ts +353 -0
  36. package/dist/observability/index.js +691 -0
  37. package/dist/observability/index.js.map +1 -0
  38. package/dist/observability-BhnVLBLS.d.ts +67 -0
  39. package/dist/path-resolver-CPRj4bFY.d.ts +10 -0
  40. package/dist/path-resolver-DBjaoXFq.d.ts +54 -0
  41. package/dist/plugin-DJk6LL8B.d.ts +434 -0
  42. package/dist/renderer-rk_1Swwc.d.ts +158 -0
  43. package/dist/sdd/index.d.ts +206 -0
  44. package/dist/sdd/index.js +864 -0
  45. package/dist/sdd/index.js.map +1 -0
  46. package/dist/secret-scrubber-CicHLN4G.d.ts +31 -0
  47. package/dist/secret-scrubber-DF88luOe.d.ts +54 -0
  48. package/dist/secret-vault-DoISxaKO.d.ts +19 -0
  49. package/dist/security/index.d.ts +30 -0
  50. package/dist/security/index.js +524 -0
  51. package/dist/security/index.js.map +1 -0
  52. package/dist/selector-BbJqiEP4.d.ts +51 -0
  53. package/dist/session-reader-Drq8RvJu.d.ts +150 -0
  54. package/dist/skill-DhfSizKv.d.ts +72 -0
  55. package/dist/storage/index.d.ts +382 -0
  56. package/dist/storage/index.js +1530 -0
  57. package/dist/storage/index.js.map +1 -0
  58. package/dist/{system-prompt-vAB0F54-.d.ts → system-prompt-BC_8ypCG.d.ts} +1 -1
  59. package/dist/task-graph-BITvWt4t.d.ts +160 -0
  60. package/dist/tool-executor-CpuJPYm9.d.ts +97 -0
  61. package/dist/types/index.d.ts +26 -4
  62. package/dist/types/index.js +1787 -4
  63. package/dist/types/index.js.map +1 -1
  64. package/dist/utils/index.d.ts +49 -2
  65. package/dist/utils/index.js +100 -2
  66. package/dist/utils/index.js.map +1 -1
  67. package/package.json +34 -2
  68. package/skills/audit-log/SKILL.md +67 -0
  69. package/skills/bug-hunter/SKILL.md +87 -0
  70. package/skills/refactor-planner/SKILL.md +94 -0
  71. package/skills/security-scanner/SKILL.md +117 -0
  72. package/dist/mode-Pjt5vMS6.d.ts +0 -815
  73. package/dist/session-reader-9sOTgmeC.d.ts +0 -1087
@@ -0,0 +1,206 @@
1
+ import { h as Specification, S as SpecAnalysis, g as SpecValidationResult, l as TaskGraph, m as TaskNode, k as TaskFilter, p as TaskSort, o as TaskProgress, r as TaskType, n as TaskPriority } from '../task-graph-BITvWt4t.js';
2
+ import { E as EventBus } from '../events-BMNaEFZl.js';
3
+ import { D as DoneCondition } from '../multi-agent-fmkRHtof.js';
4
+ import '../context-BmM2xGUZ.js';
5
+
6
+ declare class SpecParser {
7
+ parse(content: string): Specification;
8
+ private extractTitle;
9
+ private extractVersion;
10
+ private extractOverview;
11
+ private extractSections;
12
+ private extractRequirements;
13
+ private parseRequirementLine;
14
+ private mapSectionType;
15
+ analyze(spec: Specification): SpecAnalysis;
16
+ validate(spec: Specification): SpecValidationResult;
17
+ }
18
+
19
+ interface TaskStore {
20
+ saveGraph(graph: TaskGraph): Promise<void>;
21
+ loadGraph(id: string): Promise<TaskGraph | null>;
22
+ listGraphs(): Promise<{
23
+ id: string;
24
+ title: string;
25
+ updatedAt: number;
26
+ }[]>;
27
+ deleteGraph(id: string): Promise<void>;
28
+ }
29
+ interface TaskTrackerOptions {
30
+ store: TaskStore;
31
+ /**
32
+ * Called when an in-the-background persistence (`saveGraph`) rejects.
33
+ * The synchronous TaskTracker methods (addNode/addEdge/updateNodeStatus)
34
+ * fire-and-forget their writes; without this, a failing store silently
35
+ * loses graph mutations. Defaults to a console.warn.
36
+ */
37
+ onPersistError?: (err: unknown) => void;
38
+ }
39
+ interface TaskTransition {
40
+ from: TaskNode['status'];
41
+ to: TaskNode['status'];
42
+ timestamp: number;
43
+ reason?: string;
44
+ }
45
+ declare class TaskTracker {
46
+ private readonly opts;
47
+ private graph;
48
+ private transitions;
49
+ constructor(opts: TaskTrackerOptions);
50
+ createGraph(specId: string, title: string): Promise<TaskGraph>;
51
+ loadGraph(id: string): Promise<TaskGraph | null>;
52
+ addNode(node: Omit<TaskNode, 'id' | 'createdAt' | 'updatedAt'>): TaskNode;
53
+ addEdge(from: string, to: string, type?: TaskGraph['edges'][0]['type']): void;
54
+ updateNodeStatus(id: string, status: TaskNode['status'], reason?: string): void;
55
+ getNode(id: string): TaskNode | undefined;
56
+ getAllNodes(filter?: TaskFilter, sort?: TaskSort): TaskNode[];
57
+ getChildren(parentId: string): TaskNode[];
58
+ getDependents(taskId: string): string[];
59
+ getBlockers(taskId: string): string[];
60
+ canStart(taskId: string): boolean;
61
+ getProgress(): TaskProgress;
62
+ getTransitions(taskId?: string): TaskTransition[];
63
+ private unblockDependents;
64
+ private checkAndBlockIfNeeded;
65
+ /**
66
+ * Fire-and-forget persistence with attached error handler.
67
+ * Synchronous mutators (addNode/addEdge/updateNodeStatus) use this to
68
+ * avoid forcing an async cascade through every caller; if the store
69
+ * rejects, the configured `onPersistError` is invoked so failures are
70
+ * surfaced instead of swallowed by an unhandled promise rejection.
71
+ */
72
+ private persist;
73
+ }
74
+
75
+ interface TaskGeneratorOptions {
76
+ taskTracker: TaskTracker;
77
+ }
78
+ interface GeneratedTask {
79
+ specRequirementId?: string;
80
+ title: string;
81
+ description: string;
82
+ type: TaskType;
83
+ priority: TaskPriority;
84
+ estimateHours?: number;
85
+ tags?: string[];
86
+ }
87
+ declare class TaskGenerator {
88
+ private readonly opts;
89
+ constructor(opts: TaskGeneratorOptions);
90
+ generateFromSpec(spec: Specification): Promise<TaskGraph>;
91
+ private createTaskFromRequirement;
92
+ private createTaskFromEndpoint;
93
+ private buildDescription;
94
+ private mapRequirementType;
95
+ private estimateHours;
96
+ private estimateForEndpoint;
97
+ generateSubtasks(parentTaskId: string, spec: Specification): Promise<void>;
98
+ }
99
+ declare class DefaultTaskStore implements TaskStore {
100
+ private graphs;
101
+ saveGraph(graph: TaskGraph): Promise<void>;
102
+ loadGraph(id: string): Promise<TaskGraph | null>;
103
+ listGraphs(): Promise<{
104
+ id: string;
105
+ title: string;
106
+ updatedAt: number;
107
+ }[]>;
108
+ deleteGraph(id: string): Promise<void>;
109
+ private cloneGraph;
110
+ }
111
+
112
+ /**
113
+ * Extended event map used internally by TaskFlow and multi-agent components.
114
+ * These events are emitted on the injected EventBus and are a subset of
115
+ * the full EventMap — they do not require a separate registration.
116
+ */
117
+ interface TaskFlowEventMap {
118
+ 'phase.change': {
119
+ from: TaskFlowPhase;
120
+ to: TaskFlowPhase;
121
+ };
122
+ 'task.started': {
123
+ taskId: string;
124
+ };
125
+ 'task.completed': {
126
+ taskId: string;
127
+ result?: unknown;
128
+ };
129
+ 'task.failed': {
130
+ taskId: string;
131
+ error: string;
132
+ };
133
+ 'task.review': {
134
+ taskId: string;
135
+ };
136
+ 'spec.analyzed': {
137
+ analysis: SpecAnalysis;
138
+ };
139
+ progress: {
140
+ percent: number;
141
+ message: string;
142
+ };
143
+ done: {
144
+ graph: TaskGraph;
145
+ };
146
+ error: {
147
+ phase: TaskFlowPhase;
148
+ error: Error;
149
+ };
150
+ }
151
+ type TaskFlowPhase = 'idle' | 'parsing' | 'analyzing' | 'generating' | 'executing' | 'reviewing' | 'completing' | 'done' | 'failed';
152
+ type TaskFlowEventName = keyof TaskFlowEventMap;
153
+ interface TaskFlowOptions {
154
+ tracker: TaskTracker;
155
+ events: EventBus;
156
+ doneCondition?: DoneCondition;
157
+ maxConcurrent?: number;
158
+ }
159
+ interface TaskFlowExecutionContext {
160
+ executeTask: (task: TaskNode) => Promise<unknown>;
161
+ onTaskComplete?: (task: TaskNode, result: unknown) => void;
162
+ onTaskFail?: (task: TaskNode, error: Error) => void;
163
+ }
164
+ declare class TaskFlow {
165
+ private readonly opts;
166
+ private phase;
167
+ private spec;
168
+ private graph;
169
+ private stopped;
170
+ constructor(opts: TaskFlowOptions);
171
+ private emit;
172
+ fromSpec(specContent: string): Promise<TaskGraph>;
173
+ execute(ctx: TaskFlowExecutionContext): Promise<TaskGraph>;
174
+ reviewTask(taskId: string, approved: boolean, comment?: string): Promise<void>;
175
+ stop(): void;
176
+ getPhase(): TaskFlowPhase;
177
+ getGraph(): TaskGraph | null;
178
+ getSpec(): Specification | null;
179
+ private setPhase;
180
+ private getExecutableTasks;
181
+ private executeSingleTask;
182
+ private checkDoneCondition;
183
+ private emitProgress;
184
+ }
185
+ interface SpecDrivenDevOptions {
186
+ workingDirectory: string;
187
+ events: EventBus;
188
+ doneCondition?: DoneCondition;
189
+ }
190
+ declare class SpecDrivenDev {
191
+ private store;
192
+ private tracker;
193
+ private readonly events;
194
+ private flows;
195
+ constructor(opts: SpecDrivenDevOptions);
196
+ createFlow(specContent: string, options?: Partial<TaskFlowOptions>): Promise<TaskFlow>;
197
+ getTracker(): TaskTracker;
198
+ getFlow(graphId: string): TaskFlow | undefined;
199
+ listFlows(): {
200
+ id: string;
201
+ title: string;
202
+ phase: TaskFlowPhase;
203
+ }[];
204
+ }
205
+
206
+ export { DefaultTaskStore, type GeneratedTask, SpecDrivenDev, type SpecDrivenDevOptions, SpecParser, TaskFlow, type TaskFlowEventMap, type TaskFlowEventName, type TaskFlowExecutionContext, type TaskFlowOptions, type TaskFlowPhase, TaskGenerator, type TaskGeneratorOptions, type TaskStore, TaskTracker, type TaskTrackerOptions, type TaskTransition };