@substrate-ai/sdlc 0.19.54

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 (166) hide show
  1. package/dist/events.d.ts +336 -0
  2. package/dist/events.d.ts.map +1 -0
  3. package/dist/events.js +11 -0
  4. package/dist/events.js.map +1 -0
  5. package/dist/gating/conflict-detector.d.ts +59 -0
  6. package/dist/gating/conflict-detector.d.ts.map +1 -0
  7. package/dist/gating/conflict-detector.js +101 -0
  8. package/dist/gating/conflict-detector.js.map +1 -0
  9. package/dist/gating/dispatch-gate.d.ts +42 -0
  10. package/dist/gating/dispatch-gate.d.ts.map +1 -0
  11. package/dist/gating/dispatch-gate.js +197 -0
  12. package/dist/gating/dispatch-gate.js.map +1 -0
  13. package/dist/gating/index.d.ts +9 -0
  14. package/dist/gating/index.d.ts.map +1 -0
  15. package/dist/gating/index.js +8 -0
  16. package/dist/gating/index.js.map +1 -0
  17. package/dist/gating/types.d.ts +98 -0
  18. package/dist/gating/types.d.ts.map +1 -0
  19. package/dist/gating/types.js +8 -0
  20. package/dist/gating/types.js.map +1 -0
  21. package/dist/handlers/event-bridge.d.ts +56 -0
  22. package/dist/handlers/event-bridge.d.ts.map +1 -0
  23. package/dist/handlers/event-bridge.js +140 -0
  24. package/dist/handlers/event-bridge.js.map +1 -0
  25. package/dist/handlers/index.d.ts +15 -0
  26. package/dist/handlers/index.d.ts.map +1 -0
  27. package/dist/handlers/index.js +14 -0
  28. package/dist/handlers/index.js.map +1 -0
  29. package/dist/handlers/sdlc-code-review-handler.d.ts +119 -0
  30. package/dist/handlers/sdlc-code-review-handler.d.ts.map +1 -0
  31. package/dist/handlers/sdlc-code-review-handler.js +131 -0
  32. package/dist/handlers/sdlc-code-review-handler.js.map +1 -0
  33. package/dist/handlers/sdlc-create-story-handler.d.ts +97 -0
  34. package/dist/handlers/sdlc-create-story-handler.d.ts.map +1 -0
  35. package/dist/handlers/sdlc-create-story-handler.js +91 -0
  36. package/dist/handlers/sdlc-create-story-handler.js.map +1 -0
  37. package/dist/handlers/sdlc-dev-story-handler.d.ts +121 -0
  38. package/dist/handlers/sdlc-dev-story-handler.d.ts.map +1 -0
  39. package/dist/handlers/sdlc-dev-story-handler.js +288 -0
  40. package/dist/handlers/sdlc-dev-story-handler.js.map +1 -0
  41. package/dist/handlers/sdlc-phase-handler.d.ts +32 -0
  42. package/dist/handlers/sdlc-phase-handler.d.ts.map +1 -0
  43. package/dist/handlers/sdlc-phase-handler.js +166 -0
  44. package/dist/handlers/sdlc-phase-handler.js.map +1 -0
  45. package/dist/handlers/types.d.ts +132 -0
  46. package/dist/handlers/types.d.ts.map +1 -0
  47. package/dist/handlers/types.js +10 -0
  48. package/dist/handlers/types.js.map +1 -0
  49. package/dist/index.d.ts +8 -0
  50. package/dist/index.d.ts.map +1 -0
  51. package/dist/index.js +14 -0
  52. package/dist/index.js.map +1 -0
  53. package/dist/learning/failure-classifier.d.ts +23 -0
  54. package/dist/learning/failure-classifier.d.ts.map +1 -0
  55. package/dist/learning/failure-classifier.js +75 -0
  56. package/dist/learning/failure-classifier.js.map +1 -0
  57. package/dist/learning/finding-classifier.d.ts +25 -0
  58. package/dist/learning/finding-classifier.d.ts.map +1 -0
  59. package/dist/learning/finding-classifier.js +37 -0
  60. package/dist/learning/finding-classifier.js.map +1 -0
  61. package/dist/learning/finding-lifecycle.d.ts +69 -0
  62. package/dist/learning/finding-lifecycle.d.ts.map +1 -0
  63. package/dist/learning/finding-lifecycle.js +162 -0
  64. package/dist/learning/finding-lifecycle.js.map +1 -0
  65. package/dist/learning/finding-store.d.ts +16 -0
  66. package/dist/learning/finding-store.d.ts.map +1 -0
  67. package/dist/learning/finding-store.js +26 -0
  68. package/dist/learning/finding-store.js.map +1 -0
  69. package/dist/learning/findings-injector.d.ts +34 -0
  70. package/dist/learning/findings-injector.d.ts.map +1 -0
  71. package/dist/learning/findings-injector.js +140 -0
  72. package/dist/learning/findings-injector.js.map +1 -0
  73. package/dist/learning/index.d.ts +8 -0
  74. package/dist/learning/index.d.ts.map +1 -0
  75. package/dist/learning/index.js +10 -0
  76. package/dist/learning/index.js.map +1 -0
  77. package/dist/learning/relevance-scorer.d.ts +25 -0
  78. package/dist/learning/relevance-scorer.d.ts.map +1 -0
  79. package/dist/learning/relevance-scorer.js +49 -0
  80. package/dist/learning/relevance-scorer.js.map +1 -0
  81. package/dist/learning/types.d.ts +55 -0
  82. package/dist/learning/types.d.ts.map +1 -0
  83. package/dist/learning/types.js +36 -0
  84. package/dist/learning/types.js.map +1 -0
  85. package/dist/orchestrator/graph-orchestrator.d.ts +208 -0
  86. package/dist/orchestrator/graph-orchestrator.d.ts.map +1 -0
  87. package/dist/orchestrator/graph-orchestrator.js +213 -0
  88. package/dist/orchestrator/graph-orchestrator.js.map +1 -0
  89. package/dist/run-manifest/cli-flags.d.ts +11 -0
  90. package/dist/run-manifest/cli-flags.d.ts.map +1 -0
  91. package/dist/run-manifest/cli-flags.js +10 -0
  92. package/dist/run-manifest/cli-flags.js.map +1 -0
  93. package/dist/run-manifest/index.d.ts +10 -0
  94. package/dist/run-manifest/index.d.ts.map +1 -0
  95. package/dist/run-manifest/index.js +10 -0
  96. package/dist/run-manifest/index.js.map +1 -0
  97. package/dist/run-model/cli-flags.d.ts +27 -0
  98. package/dist/run-model/cli-flags.d.ts.map +1 -0
  99. package/dist/run-model/cli-flags.js +31 -0
  100. package/dist/run-model/cli-flags.js.map +1 -0
  101. package/dist/run-model/index.d.ts +21 -0
  102. package/dist/run-model/index.d.ts.map +1 -0
  103. package/dist/run-model/index.js +19 -0
  104. package/dist/run-model/index.js.map +1 -0
  105. package/dist/run-model/per-story-state.d.ts +62 -0
  106. package/dist/run-model/per-story-state.d.ts.map +1 -0
  107. package/dist/run-model/per-story-state.js +70 -0
  108. package/dist/run-model/per-story-state.js.map +1 -0
  109. package/dist/run-model/recovery-history.d.ts +56 -0
  110. package/dist/run-model/recovery-history.d.ts.map +1 -0
  111. package/dist/run-model/recovery-history.js +83 -0
  112. package/dist/run-model/recovery-history.js.map +1 -0
  113. package/dist/run-model/run-manifest.d.ts +146 -0
  114. package/dist/run-model/run-manifest.d.ts.map +1 -0
  115. package/dist/run-model/run-manifest.js +481 -0
  116. package/dist/run-model/run-manifest.js.map +1 -0
  117. package/dist/run-model/schemas.d.ts +117 -0
  118. package/dist/run-model/schemas.d.ts.map +1 -0
  119. package/dist/run-model/schemas.js +83 -0
  120. package/dist/run-model/schemas.js.map +1 -0
  121. package/dist/run-model/supervisor-lock.d.ts +104 -0
  122. package/dist/run-model/supervisor-lock.d.ts.map +1 -0
  123. package/dist/run-model/supervisor-lock.js +284 -0
  124. package/dist/run-model/supervisor-lock.js.map +1 -0
  125. package/dist/run-model/types.d.ts +74 -0
  126. package/dist/run-model/types.d.ts.map +1 -0
  127. package/dist/run-model/types.js +8 -0
  128. package/dist/run-model/types.js.map +1 -0
  129. package/dist/run-model/verification-result.d.ts +60 -0
  130. package/dist/run-model/verification-result.d.ts.map +1 -0
  131. package/dist/run-model/verification-result.js +55 -0
  132. package/dist/run-model/verification-result.js.map +1 -0
  133. package/dist/verification/checks/acceptance-criteria-evidence-check.d.ts +21 -0
  134. package/dist/verification/checks/acceptance-criteria-evidence-check.d.ts.map +1 -0
  135. package/dist/verification/checks/acceptance-criteria-evidence-check.js +159 -0
  136. package/dist/verification/checks/acceptance-criteria-evidence-check.js.map +1 -0
  137. package/dist/verification/checks/build-check.d.ts +52 -0
  138. package/dist/verification/checks/build-check.d.ts.map +1 -0
  139. package/dist/verification/checks/build-check.js +160 -0
  140. package/dist/verification/checks/build-check.js.map +1 -0
  141. package/dist/verification/checks/index.d.ts +15 -0
  142. package/dist/verification/checks/index.d.ts.map +1 -0
  143. package/dist/verification/checks/index.js +15 -0
  144. package/dist/verification/checks/index.js.map +1 -0
  145. package/dist/verification/checks/phantom-review-check.d.ts +29 -0
  146. package/dist/verification/checks/phantom-review-check.d.ts.map +1 -0
  147. package/dist/verification/checks/phantom-review-check.js +70 -0
  148. package/dist/verification/checks/phantom-review-check.js.map +1 -0
  149. package/dist/verification/checks/trivial-output-check.d.ts +47 -0
  150. package/dist/verification/checks/trivial-output-check.d.ts.map +1 -0
  151. package/dist/verification/checks/trivial-output-check.js +72 -0
  152. package/dist/verification/checks/trivial-output-check.js.map +1 -0
  153. package/dist/verification/index.d.ts +13 -0
  154. package/dist/verification/index.d.ts.map +1 -0
  155. package/dist/verification/index.js +13 -0
  156. package/dist/verification/index.js.map +1 -0
  157. package/dist/verification/types.d.ts +149 -0
  158. package/dist/verification/types.d.ts.map +1 -0
  159. package/dist/verification/types.js +12 -0
  160. package/dist/verification/types.js.map +1 -0
  161. package/dist/verification/verification-pipeline.d.ts +65 -0
  162. package/dist/verification/verification-pipeline.d.ts.map +1 -0
  163. package/dist/verification/verification-pipeline.js +149 -0
  164. package/dist/verification/verification-pipeline.js.map +1 -0
  165. package/graphs/sdlc-pipeline.dot +42 -0
  166. package/package.json +22 -0
@@ -0,0 +1,47 @@
1
+ /**
2
+ * TrivialOutputCheck — Story 51-3.
3
+ *
4
+ * Tier A verification check that flags story dispatches which produced
5
+ * fewer output tokens than the configured threshold. A very low output
6
+ * token count is a strong signal that the agent exited early (e.g. hit a
7
+ * maxTurns limit, encountered a fatal error, or did no real work).
8
+ *
9
+ * Architecture constraints (DC-6, FR-V9):
10
+ * - No LLM calls.
11
+ * - No shell invocations — pure in-process computation.
12
+ * - Runs in Tier A: before BuildCheck, after PhantomReviewCheck.
13
+ */
14
+ import type { VerificationCheck, VerificationContext, VerificationResult } from '../types.js';
15
+ /**
16
+ * Default minimum output-token count a story must produce to be
17
+ * considered non-trivial. Configurable via trivialOutputThreshold config field.
18
+ */
19
+ export declare const DEFAULT_TRIVIAL_OUTPUT_THRESHOLD = 100;
20
+ /**
21
+ * Minimal config interface for TrivialOutputCheck.
22
+ * Uses a plain interface instead of Pick<SubstrateConfig, ...> to avoid
23
+ * TypeScript errors when SubstrateConfig uses passthrough (unknown extra keys).
24
+ */
25
+ export interface TrivialOutputCheckConfig {
26
+ trivialOutputThreshold?: number;
27
+ }
28
+ /**
29
+ * Checks that a completed story dispatch produced at least `threshold` output
30
+ * tokens. Dispatches that produced fewer tokens are flagged as failures with
31
+ * an actionable suggestion to re-run with increased maxTurns.
32
+ *
33
+ * AC1: fail when outputTokenCount < threshold.
34
+ * AC2: details string includes "Re-run with increased maxTurns".
35
+ * AC3: pass when outputTokenCount >= threshold.
36
+ * AC4: threshold is configurable via trivialOutputThreshold config field.
37
+ * AC5: warn (not fail) when outputTokenCount is undefined.
38
+ * AC6: implements VerificationCheck with name='trivial-output', tier='A'.
39
+ */
40
+ export declare class TrivialOutputCheck implements VerificationCheck {
41
+ readonly name = "trivial-output";
42
+ readonly tier: "A";
43
+ private readonly threshold;
44
+ constructor(config?: TrivialOutputCheckConfig);
45
+ run(context: VerificationContext): Promise<VerificationResult>;
46
+ }
47
+ //# sourceMappingURL=trivial-output-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trivial-output-check.d.ts","sourceRoot":"","sources":["../../../src/verification/checks/trivial-output-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,aAAa,CAAA;AAMpB;;;GAGG;AACH,eAAO,MAAM,gCAAgC,MAAM,CAAA;AAMnD;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAChC;AAMD;;;;;;;;;;;GAWG;AACH,qBAAa,kBAAmB,YAAW,iBAAiB;IAC1D,QAAQ,CAAC,IAAI,oBAAmB;IAChC,QAAQ,CAAC,IAAI,EAAG,GAAG,CAAS;IAE5B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAQ;gBAEtB,MAAM,CAAC,EAAE,wBAAwB;IAIvC,GAAG,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAgCrE"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * TrivialOutputCheck — Story 51-3.
3
+ *
4
+ * Tier A verification check that flags story dispatches which produced
5
+ * fewer output tokens than the configured threshold. A very low output
6
+ * token count is a strong signal that the agent exited early (e.g. hit a
7
+ * maxTurns limit, encountered a fatal error, or did no real work).
8
+ *
9
+ * Architecture constraints (DC-6, FR-V9):
10
+ * - No LLM calls.
11
+ * - No shell invocations — pure in-process computation.
12
+ * - Runs in Tier A: before BuildCheck, after PhantomReviewCheck.
13
+ */
14
+ // ---------------------------------------------------------------------------
15
+ // Default threshold
16
+ // ---------------------------------------------------------------------------
17
+ /**
18
+ * Default minimum output-token count a story must produce to be
19
+ * considered non-trivial. Configurable via trivialOutputThreshold config field.
20
+ */
21
+ export const DEFAULT_TRIVIAL_OUTPUT_THRESHOLD = 100;
22
+ // ---------------------------------------------------------------------------
23
+ // TrivialOutputCheck
24
+ // ---------------------------------------------------------------------------
25
+ /**
26
+ * Checks that a completed story dispatch produced at least `threshold` output
27
+ * tokens. Dispatches that produced fewer tokens are flagged as failures with
28
+ * an actionable suggestion to re-run with increased maxTurns.
29
+ *
30
+ * AC1: fail when outputTokenCount < threshold.
31
+ * AC2: details string includes "Re-run with increased maxTurns".
32
+ * AC3: pass when outputTokenCount >= threshold.
33
+ * AC4: threshold is configurable via trivialOutputThreshold config field.
34
+ * AC5: warn (not fail) when outputTokenCount is undefined.
35
+ * AC6: implements VerificationCheck with name='trivial-output', tier='A'.
36
+ */
37
+ export class TrivialOutputCheck {
38
+ name = 'trivial-output';
39
+ tier = 'A';
40
+ threshold;
41
+ constructor(config) {
42
+ this.threshold = config?.trivialOutputThreshold ?? DEFAULT_TRIVIAL_OUTPUT_THRESHOLD;
43
+ }
44
+ async run(context) {
45
+ const start = Date.now();
46
+ // AC5: missing token data → warn, not fail
47
+ if (context.outputTokenCount === undefined) {
48
+ return {
49
+ status: 'warn',
50
+ details: 'trivial-output: output token count unavailable — skipping check',
51
+ duration_ms: Date.now() - start,
52
+ };
53
+ }
54
+ const count = context.outputTokenCount;
55
+ // AC1 + AC2: below threshold → fail with actionable message
56
+ if (count < this.threshold) {
57
+ return {
58
+ status: 'fail',
59
+ details: `trivial-output: output token count ${count} is below threshold ${this.threshold}` +
60
+ ` — Re-run with increased maxTurns`,
61
+ duration_ms: Date.now() - start,
62
+ };
63
+ }
64
+ // AC3: at or above threshold → pass
65
+ return {
66
+ status: 'pass',
67
+ details: `output token count ${count} meets threshold ${this.threshold}`,
68
+ duration_ms: Date.now() - start,
69
+ };
70
+ }
71
+ }
72
+ //# sourceMappingURL=trivial-output-check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trivial-output-check.js","sourceRoot":"","sources":["../../../src/verification/checks/trivial-output-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAA;AAenD,8EAA8E;AAC9E,qBAAqB;AACrB,8EAA8E;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,kBAAkB;IACpB,IAAI,GAAG,gBAAgB,CAAA;IACvB,IAAI,GAAG,GAAY,CAAA;IAEX,SAAS,CAAQ;IAElC,YAAY,MAAiC;QAC3C,IAAI,CAAC,SAAS,GAAG,MAAM,EAAE,sBAAsB,IAAI,gCAAgC,CAAA;IACrF,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,OAA4B;QACpC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;QAExB,2CAA2C;QAC3C,IAAI,OAAO,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;YAC3C,OAAO;gBACL,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,iEAAiE;gBAC1E,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;aAChC,CAAA;QACH,CAAC;QAED,MAAM,KAAK,GAAG,OAAO,CAAC,gBAAgB,CAAA;QAEtC,4DAA4D;QAC5D,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAC3B,OAAO;gBACL,MAAM,EAAE,MAAM;gBACd,OAAO,EACL,sCAAsC,KAAK,uBAAuB,IAAI,CAAC,SAAS,EAAE;oBAClF,mCAAmC;gBACrC,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;aAChC,CAAA;QACH,CAAC;QAED,oCAAoC;QACpC,OAAO;YACL,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,sBAAsB,KAAK,oBAAoB,IAAI,CAAC,SAAS,EAAE;YACxE,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;SAChC,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Verification framework barrel export — Stories 51-1 through 51-3.
3
+ *
4
+ * Exports the VerificationPipeline class, all supporting types,
5
+ * and concrete check implementations.
6
+ */
7
+ export { VerificationPipeline, createDefaultVerificationPipeline } from './verification-pipeline.js';
8
+ export type { VerificationCheck, VerificationContext, VerificationResult, VerificationCheckResult, VerificationSummary, ReviewSignals, DevStorySignals, } from './types.js';
9
+ export { PhantomReviewCheck } from './checks/index.js';
10
+ export { TrivialOutputCheck, DEFAULT_TRIVIAL_OUTPUT_THRESHOLD } from './checks/index.js';
11
+ export { AcceptanceCriteriaEvidenceCheck, extractAcceptanceCriteriaIds } from './checks/index.js';
12
+ export { BuildCheck, BUILD_CHECK_TIMEOUT_MS, detectBuildCommand } from './checks/index.js';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/verification/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAA;AACpG,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,eAAe,GAChB,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAA;AACxF,OAAO,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAA;AACjG,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Verification framework barrel export — Stories 51-1 through 51-3.
3
+ *
4
+ * Exports the VerificationPipeline class, all supporting types,
5
+ * and concrete check implementations.
6
+ */
7
+ export { VerificationPipeline, createDefaultVerificationPipeline } from './verification-pipeline.js';
8
+ // Concrete check implementations (story 51-2+)
9
+ export { PhantomReviewCheck } from './checks/index.js';
10
+ export { TrivialOutputCheck, DEFAULT_TRIVIAL_OUTPUT_THRESHOLD } from './checks/index.js';
11
+ export { AcceptanceCriteriaEvidenceCheck, extractAcceptanceCriteriaIds } from './checks/index.js';
12
+ export { BuildCheck, BUILD_CHECK_TIMEOUT_MS, detectBuildCommand } from './checks/index.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/verification/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAA;AAUpG,+CAA+C;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAA;AACxF,OAAO,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAA;AACjG,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,149 @@
1
+ /**
2
+ * Verification framework types — Story 51-1.
3
+ *
4
+ * Defines the VerificationCheck interface and all supporting types
5
+ * consumed by VerificationPipeline and future concrete check implementations
6
+ * (Stories 51-2 through 51-6).
7
+ *
8
+ * Package placement: packages/sdlc/src/verification/ — SDLC-specific fields
9
+ * (storyKey, commitSha, priorStoryFiles) make these types inappropriate for @substrate-ai/core.
10
+ */
11
+ /**
12
+ * Slim projection of code-review dispatch signals needed by PhantomReviewCheck.
13
+ *
14
+ * Intentionally narrow — do NOT import CodeReviewResult from the monolith into
15
+ * this sdlc package. Only the fields required by the phantom detection check are
16
+ * included here (Story 51-2).
17
+ */
18
+ export interface ReviewSignals {
19
+ /** True when dispatch itself failed — covers crash, timeout, non-zero exit, AND schema validation failure */
20
+ dispatchFailed?: boolean;
21
+ /** Error type string (e.g., 'schema_validation_failed', dispatch error message) */
22
+ error?: string;
23
+ /** Raw agent output text — empty/undefined indicates no output was produced */
24
+ rawOutput?: string;
25
+ }
26
+ /**
27
+ * Slim projection of dev-story dispatch output needed by static verification.
28
+ *
29
+ * This intentionally mirrors the YAML output contract names while avoiding an
30
+ * import from the monolith compiled-workflows package into @substrate-ai/sdlc.
31
+ */
32
+ export interface DevStorySignals {
33
+ /** Whether the implementation dispatch reported success or failure. */
34
+ result?: 'success' | 'failed' | string;
35
+ /** Acceptance criteria the implementation agent claims were met. */
36
+ ac_met?: string[];
37
+ /** Acceptance criteria the implementation agent claims failed. */
38
+ ac_failures?: string[];
39
+ /** Files the implementation agent claims it created or modified. */
40
+ files_modified?: string[];
41
+ /** Test outcome reported by the implementation agent. */
42
+ tests?: 'pass' | 'fail' | string;
43
+ }
44
+ /**
45
+ * Contextual data passed to each VerificationCheck when the pipeline runs.
46
+ *
47
+ * AC3: Contains storyKey, workingDir, commitSha, timeout, and optional priorStoryFiles.
48
+ * Tier B fields (priorStoryFiles) are optional and may be undefined for Tier A runs.
49
+ */
50
+ export interface VerificationContext {
51
+ /** Story key being verified (e.g. "51-1"). */
52
+ storyKey: string;
53
+ /** Absolute path to the project working directory. */
54
+ workingDir: string;
55
+ /** Git commit SHA of the story's implementation commit. */
56
+ commitSha: string;
57
+ /** Maximum milliseconds each individual check may consume. */
58
+ timeout: number;
59
+ /** Optional list of file paths modified by prior stories (Tier B). */
60
+ priorStoryFiles?: string[];
61
+ /**
62
+ * Optional code-review dispatch signals for PhantomReviewCheck (Story 51-2).
63
+ *
64
+ * Populated when the context is assembled from a completed code-review result.
65
+ * Left as `undefined` when review data is not available (e.g., Tier B-only runs).
66
+ * PhantomReviewCheck returns 'pass' with a skip note when this field is absent.
67
+ */
68
+ reviewResult?: ReviewSignals;
69
+ /**
70
+ * Raw story markdown used by AcceptanceCriteriaEvidenceCheck.
71
+ *
72
+ * Left undefined when a caller cannot read the story file; the check reports
73
+ * a warning rather than guessing from incomplete context.
74
+ */
75
+ storyContent?: string;
76
+ /**
77
+ * Structured implementation output used by AcceptanceCriteriaEvidenceCheck.
78
+ *
79
+ * This is a narrow projection of the dev-story result so verification can
80
+ * compare story ACs against the agent's explicit claims without importing
81
+ * monolith workflow types.
82
+ */
83
+ devStoryResult?: DevStorySignals;
84
+ /**
85
+ * Total output tokens produced by the story dispatch (Story 51-3).
86
+ *
87
+ * Used by TrivialOutputCheck to flag dispatches that produced fewer tokens
88
+ * than the configured threshold. Left as `undefined` when token tracking
89
+ * data is unavailable — TrivialOutputCheck returns 'warn' in that case.
90
+ */
91
+ outputTokenCount?: number;
92
+ /**
93
+ * Optional explicit build command override for BuildCheck (Story 51-4).
94
+ *
95
+ * When provided, BuildCheck uses this exact command instead of auto-detecting
96
+ * from the project files in `workingDir`. An empty string (`''`) means "skip"
97
+ * (same behaviour as no build system detected — returns `warn`).
98
+ * Left as `undefined` to trigger auto-detection.
99
+ */
100
+ buildCommand?: string;
101
+ }
102
+ /**
103
+ * Result returned by a single VerificationCheck.run() invocation.
104
+ *
105
+ * AC2: status is 'pass' | 'warn' | 'fail'.
106
+ */
107
+ export interface VerificationResult {
108
+ status: 'pass' | 'warn' | 'fail';
109
+ details: string;
110
+ duration_ms: number;
111
+ }
112
+ /**
113
+ * Per-check result included in a VerificationSummary.
114
+ * Extends VerificationResult with the check's name.
115
+ */
116
+ export interface VerificationCheckResult extends VerificationResult {
117
+ checkName: string;
118
+ }
119
+ /**
120
+ * Aggregated summary for a single story's verification pipeline run.
121
+ *
122
+ * AC4: contains storyKey, array of per-check results, worst-case overall status,
123
+ * and total duration.
124
+ */
125
+ export interface VerificationSummary {
126
+ storyKey: string;
127
+ checks: VerificationCheckResult[];
128
+ /** Worst-case aggregate: fail > warn > pass. */
129
+ status: 'pass' | 'warn' | 'fail';
130
+ duration_ms: number;
131
+ }
132
+ /**
133
+ * Interface that all verification check implementations must satisfy.
134
+ *
135
+ * AC1: name, tier ('A' | 'B'), and run(context) method.
136
+ * Tier A checks are static analysis; Tier B checks may use cross-story context.
137
+ */
138
+ export interface VerificationCheck {
139
+ /** Human-readable identifier for this check (used in events and summaries). */
140
+ name: string;
141
+ /** Tier determines execution order: all Tier A checks run before Tier B checks. */
142
+ tier: 'A' | 'B';
143
+ /**
144
+ * Execute this check against the supplied verification context.
145
+ * Must resolve (not reject) — exceptions are caught by the pipeline (AC6).
146
+ */
147
+ run(context: VerificationContext): Promise<VerificationResult>;
148
+ }
149
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/verification/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,6GAA6G;IAC7G,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAMD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,uEAAu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IACjC,gDAAgD;IAChD,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;IAChC,WAAW,EAAE,MAAM,CAAA;CACpB;AAMD;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAA;IACZ,mFAAmF;IACnF,IAAI,EAAE,GAAG,GAAG,GAAG,CAAA;IACf;;;OAGG;IACH,GAAG,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;CAC/D"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Verification framework types — Story 51-1.
3
+ *
4
+ * Defines the VerificationCheck interface and all supporting types
5
+ * consumed by VerificationPipeline and future concrete check implementations
6
+ * (Stories 51-2 through 51-6).
7
+ *
8
+ * Package placement: packages/sdlc/src/verification/ — SDLC-specific fields
9
+ * (storyKey, commitSha, priorStoryFiles) make these types inappropriate for @substrate-ai/core.
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/verification/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * VerificationPipeline — executes an ordered chain of VerificationCheck implementations.
3
+ *
4
+ * Story 51-1: Framework implementation.
5
+ *
6
+ * Design notes:
7
+ * - No LLM calls in this file (FR-V9).
8
+ * - Tier A checks always precede Tier B checks in registration order.
9
+ * - Unhandled exceptions in check.run() are caught, logged at warn, and
10
+ * surfaced as status:'warn' results (AC6).
11
+ * - Events are emitted via the injected TypedEventBus<SdlcEvents> (AC5).
12
+ */
13
+ import type { TypedEventBus } from '@substrate-ai/core';
14
+ import type { SdlcEvents } from '../events.js';
15
+ import type { VerificationCheck, VerificationContext, VerificationSummary } from './types.js';
16
+ import type { TrivialOutputCheckConfig } from './checks/trivial-output-check.js';
17
+ /**
18
+ * Runs an ordered chain of VerificationCheck implementations after each story dispatch.
19
+ *
20
+ * Checks are stored in registration order. When `run()` is called with `tier: 'A'`
21
+ * only Tier A checks execute; when called with `tier: 'B'` only Tier B checks execute.
22
+ * (Story 51-5 will invoke both tiers at the appropriate orchestration points.)
23
+ */
24
+ export declare class VerificationPipeline {
25
+ private readonly _bus;
26
+ private readonly _checks;
27
+ /**
28
+ * @param bus Typed event bus for emitting verification events.
29
+ * @param checks Optional initial list of checks to register at construction time.
30
+ */
31
+ constructor(bus: TypedEventBus<SdlcEvents>, checks?: VerificationCheck[]);
32
+ /**
33
+ * Register a VerificationCheck.
34
+ *
35
+ * Checks are stored in insertion order within their tier.
36
+ * Tier A checks always run before Tier B checks regardless of registration order.
37
+ */
38
+ register(check: VerificationCheck): void;
39
+ /**
40
+ * Execute all checks matching the specified tier sequentially.
41
+ *
42
+ * AC2: Tier A checks execute in registration order.
43
+ * AC4: Results are aggregated into a VerificationSummary.
44
+ * AC5: verification:check-complete and verification:story-complete events are emitted.
45
+ * AC6: Unhandled exceptions are caught and recorded as warn.
46
+ *
47
+ * @param context Verification context for the story being verified.
48
+ * @param tier Which tier of checks to execute ('A' | 'B'). Defaults to 'A'.
49
+ */
50
+ run(context: VerificationContext, tier?: 'A' | 'B'): Promise<VerificationSummary>;
51
+ }
52
+ /**
53
+ * Create a VerificationPipeline pre-loaded with the canonical check set.
54
+ *
55
+ * Canonical Tier A check order (architecture section 3.5):
56
+ * 1. PhantomReviewCheck — story 51-2 (runs first: unreviewed stories skipped)
57
+ * 2. TrivialOutputCheck — story 51-3
58
+ * 3. AcceptanceCriteriaEvidenceCheck
59
+ * 4. BuildCheck — story 51-4
60
+ *
61
+ * @param bus Typed event bus for verification events.
62
+ * @param config Optional config (used to forward threshold to TrivialOutputCheck).
63
+ */
64
+ export declare function createDefaultVerificationPipeline(bus: TypedEventBus<SdlcEvents>, config?: TrivialOutputCheckConfig): VerificationPipeline;
65
+ //# sourceMappingURL=verification-pipeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-pipeline.d.ts","sourceRoot":"","sources":["../../src/verification/verification-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EAEnB,mBAAmB,EACpB,MAAM,YAAY,CAAA;AAGnB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAA;AA2BhF;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA2B;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAElD;;;OAGG;gBACS,GAAG,EAAE,aAAa,CAAC,UAAU,CAAC,EAAE,MAAM,GAAE,iBAAiB,EAAO;IAO5E;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAIxC;;;;;;;;;;OAUG;IACG,GAAG,CAAC,OAAO,EAAE,mBAAmB,EAAE,IAAI,GAAE,GAAG,GAAG,GAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAuD7F;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,iCAAiC,CAC/C,GAAG,EAAE,aAAa,CAAC,UAAU,CAAC,EAC9B,MAAM,CAAC,EAAE,wBAAwB,GAChC,oBAAoB,CAQtB"}
@@ -0,0 +1,149 @@
1
+ /**
2
+ * VerificationPipeline — executes an ordered chain of VerificationCheck implementations.
3
+ *
4
+ * Story 51-1: Framework implementation.
5
+ *
6
+ * Design notes:
7
+ * - No LLM calls in this file (FR-V9).
8
+ * - Tier A checks always precede Tier B checks in registration order.
9
+ * - Unhandled exceptions in check.run() are caught, logged at warn, and
10
+ * surfaced as status:'warn' results (AC6).
11
+ * - Events are emitted via the injected TypedEventBus<SdlcEvents> (AC5).
12
+ */
13
+ import { PhantomReviewCheck } from './checks/phantom-review-check.js';
14
+ import { TrivialOutputCheck } from './checks/trivial-output-check.js';
15
+ import { AcceptanceCriteriaEvidenceCheck } from './checks/acceptance-criteria-evidence-check.js';
16
+ import { BuildCheck } from './checks/build-check.js';
17
+ // ---------------------------------------------------------------------------
18
+ // Helpers
19
+ // ---------------------------------------------------------------------------
20
+ /**
21
+ * Compute the worst-case aggregate status across a list of check results.
22
+ * Precedence: fail > warn > pass.
23
+ */
24
+ function aggregateStatus(checks) {
25
+ let result = 'pass';
26
+ for (const c of checks) {
27
+ if (c.status === 'fail')
28
+ return 'fail';
29
+ if (c.status === 'warn')
30
+ result = 'warn';
31
+ }
32
+ return result;
33
+ }
34
+ // ---------------------------------------------------------------------------
35
+ // VerificationPipeline
36
+ // ---------------------------------------------------------------------------
37
+ /**
38
+ * Runs an ordered chain of VerificationCheck implementations after each story dispatch.
39
+ *
40
+ * Checks are stored in registration order. When `run()` is called with `tier: 'A'`
41
+ * only Tier A checks execute; when called with `tier: 'B'` only Tier B checks execute.
42
+ * (Story 51-5 will invoke both tiers at the appropriate orchestration points.)
43
+ */
44
+ export class VerificationPipeline {
45
+ _bus;
46
+ _checks = [];
47
+ /**
48
+ * @param bus Typed event bus for emitting verification events.
49
+ * @param checks Optional initial list of checks to register at construction time.
50
+ */
51
+ constructor(bus, checks = []) {
52
+ this._bus = bus;
53
+ for (const check of checks) {
54
+ this.register(check);
55
+ }
56
+ }
57
+ /**
58
+ * Register a VerificationCheck.
59
+ *
60
+ * Checks are stored in insertion order within their tier.
61
+ * Tier A checks always run before Tier B checks regardless of registration order.
62
+ */
63
+ register(check) {
64
+ this._checks.push(check);
65
+ }
66
+ /**
67
+ * Execute all checks matching the specified tier sequentially.
68
+ *
69
+ * AC2: Tier A checks execute in registration order.
70
+ * AC4: Results are aggregated into a VerificationSummary.
71
+ * AC5: verification:check-complete and verification:story-complete events are emitted.
72
+ * AC6: Unhandled exceptions are caught and recorded as warn.
73
+ *
74
+ * @param context Verification context for the story being verified.
75
+ * @param tier Which tier of checks to execute ('A' | 'B'). Defaults to 'A'.
76
+ */
77
+ async run(context, tier = 'A') {
78
+ const pipelineStart = Date.now();
79
+ const checks = this._checks.filter((c) => c.tier === tier);
80
+ const checkResults = [];
81
+ for (const check of checks) {
82
+ const checkStart = Date.now();
83
+ let result;
84
+ try {
85
+ const runResult = await check.run(context);
86
+ result = {
87
+ checkName: check.name,
88
+ status: runResult.status,
89
+ details: runResult.details,
90
+ duration_ms: runResult.duration_ms,
91
+ };
92
+ }
93
+ catch (err) {
94
+ const elapsed = Date.now() - checkStart;
95
+ const message = err instanceof Error ? err.message : String(err);
96
+ process.stderr.write(`[verification-pipeline] check "${check.name}" threw an unhandled exception: ${message}\n`);
97
+ result = {
98
+ checkName: check.name,
99
+ status: 'warn',
100
+ details: message,
101
+ duration_ms: elapsed,
102
+ };
103
+ }
104
+ checkResults.push(result);
105
+ // AC5: emit verification:check-complete after each check
106
+ this._bus.emit('verification:check-complete', {
107
+ storyKey: context.storyKey,
108
+ checkName: result.checkName,
109
+ status: result.status,
110
+ details: result.details,
111
+ duration_ms: result.duration_ms,
112
+ });
113
+ }
114
+ const summary = {
115
+ storyKey: context.storyKey,
116
+ checks: checkResults,
117
+ status: aggregateStatus(checkResults),
118
+ duration_ms: Date.now() - pipelineStart,
119
+ };
120
+ // AC5: emit verification:story-complete with full summary
121
+ this._bus.emit('verification:story-complete', summary);
122
+ return summary;
123
+ }
124
+ }
125
+ // ---------------------------------------------------------------------------
126
+ // Default pipeline factory
127
+ // ---------------------------------------------------------------------------
128
+ /**
129
+ * Create a VerificationPipeline pre-loaded with the canonical check set.
130
+ *
131
+ * Canonical Tier A check order (architecture section 3.5):
132
+ * 1. PhantomReviewCheck — story 51-2 (runs first: unreviewed stories skipped)
133
+ * 2. TrivialOutputCheck — story 51-3
134
+ * 3. AcceptanceCriteriaEvidenceCheck
135
+ * 4. BuildCheck — story 51-4
136
+ *
137
+ * @param bus Typed event bus for verification events.
138
+ * @param config Optional config (used to forward threshold to TrivialOutputCheck).
139
+ */
140
+ export function createDefaultVerificationPipeline(bus, config) {
141
+ const checks = [
142
+ new PhantomReviewCheck(),
143
+ new TrivialOutputCheck(config),
144
+ new AcceptanceCriteriaEvidenceCheck(),
145
+ new BuildCheck(), // story 51-4: runs last in Tier A (expensive, 60s worst-case)
146
+ ];
147
+ return new VerificationPipeline(bus, checks);
148
+ }
149
+ //# sourceMappingURL=verification-pipeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-pipeline.js","sourceRoot":"","sources":["../../src/verification/verification-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAErE,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAA;AAChG,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;;GAGG;AACH,SAAS,eAAe,CACtB,MAAiC;IAEjC,IAAI,MAAM,GAA6B,MAAM,CAAA;IAC7C,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM;YAAE,OAAO,MAAM,CAAA;QACtC,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM;YAAE,MAAM,GAAG,MAAM,CAAA;IAC1C,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,8EAA8E;AAC9E,uBAAuB;AACvB,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,OAAO,oBAAoB;IACd,IAAI,CAA2B;IAC/B,OAAO,GAAwB,EAAE,CAAA;IAElD;;;OAGG;IACH,YAAY,GAA8B,EAAE,SAA8B,EAAE;QAC1E,IAAI,CAAC,IAAI,GAAG,GAAG,CAAA;QACf,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AC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * SDLC Pipeline DOT Graph Definition
3
+ *
4
+ * Encodes the existing linear SDLC pipeline topology so the graph executor
5
+ * can drive the same pipeline logic as an alternative to the linear orchestrator.
6
+ *
7
+ * Story 43-1
8
+ */
9
+
10
+ digraph sdlc_pipeline {
11
+ graph [
12
+ goal="Implement SDLC pipeline stories end-to-end",
13
+ label="SDLC Pipeline"
14
+ ]
15
+
16
+ // ── Entry / exit terminals ─────────────────────────────────────────────────
17
+ start [shape=Mdiamond, label="Start"]
18
+ exit [shape=Msquare, label="Exit"]
19
+
20
+ // ── Phase nodes ────────────────────────────────────────────────────────────
21
+ analysis [type="sdlc.phase", label="Analysis Phase"]
22
+ planning [type="sdlc.phase", label="Planning Phase"]
23
+ solutioning [type="sdlc.phase", label="Solutioning Phase"]
24
+
25
+ // ── Story lifecycle nodes ──────────────────────────────────────────────────
26
+ create_story [type="sdlc.create-story", label="Create Story"]
27
+ dev_story [type="sdlc.dev-story", label="Dev Story",
28
+ goal_gate=true, retry_target=dev_story, max_retries=2]
29
+ code_review [type="sdlc.code-review", label="Code Review", shape=diamond]
30
+
31
+ // ── Linear happy-path edges ────────────────────────────────────────────────
32
+ start -> analysis
33
+ analysis -> planning
34
+ planning -> solutioning
35
+ solutioning -> create_story
36
+ create_story -> dev_story
37
+ dev_story -> code_review
38
+
39
+ // ── Conditional edges from code_review ────────────────────────────────────
40
+ code_review -> exit [condition="outcome=success"]
41
+ code_review -> dev_story [condition="outcome=fail"]
42
+ }
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@substrate-ai/sdlc",
3
+ "version": "0.19.54",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/index.js",
10
+ "types": "./dist/index.d.ts"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "graphs"
16
+ ],
17
+ "dependencies": {
18
+ "@substrate-ai/core": "0.19.54",
19
+ "zod": "^4.3.6"
20
+ },
21
+ "devDependencies": {}
22
+ }