@ginkoai/cli 1.6.2 → 1.7.1

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 (224) hide show
  1. package/dist/commands/agent/agent-client.d.ts +150 -0
  2. package/dist/commands/agent/agent-client.d.ts.map +1 -0
  3. package/dist/commands/agent/agent-client.js +170 -0
  4. package/dist/commands/agent/agent-client.js.map +1 -0
  5. package/dist/commands/agent/index.d.ts +22 -0
  6. package/dist/commands/agent/index.d.ts.map +1 -0
  7. package/dist/commands/agent/index.js +121 -0
  8. package/dist/commands/agent/index.js.map +1 -0
  9. package/dist/commands/agent/list.d.ts +22 -0
  10. package/dist/commands/agent/list.d.ts.map +1 -0
  11. package/dist/commands/agent/list.js +119 -0
  12. package/dist/commands/agent/list.js.map +1 -0
  13. package/dist/commands/agent/register.d.ts +21 -0
  14. package/dist/commands/agent/register.d.ts.map +1 -0
  15. package/dist/commands/agent/register.js +97 -0
  16. package/dist/commands/agent/register.js.map +1 -0
  17. package/dist/commands/agent/status.d.ts +19 -0
  18. package/dist/commands/agent/status.d.ts.map +1 -0
  19. package/dist/commands/agent/status.js +271 -0
  20. package/dist/commands/agent/status.js.map +1 -0
  21. package/dist/commands/agent/work.d.ts +22 -0
  22. package/dist/commands/agent/work.d.ts.map +1 -0
  23. package/dist/commands/agent/work.js +459 -0
  24. package/dist/commands/agent/work.js.map +1 -0
  25. package/dist/commands/checkpoint/create.d.ts +27 -0
  26. package/dist/commands/checkpoint/create.d.ts.map +1 -0
  27. package/dist/commands/checkpoint/create.js +82 -0
  28. package/dist/commands/checkpoint/create.js.map +1 -0
  29. package/dist/commands/checkpoint/index.d.ts +23 -0
  30. package/dist/commands/checkpoint/index.d.ts.map +1 -0
  31. package/dist/commands/checkpoint/index.js +91 -0
  32. package/dist/commands/checkpoint/index.js.map +1 -0
  33. package/dist/commands/checkpoint/list.d.ts +27 -0
  34. package/dist/commands/checkpoint/list.d.ts.map +1 -0
  35. package/dist/commands/checkpoint/list.js +115 -0
  36. package/dist/commands/checkpoint/list.js.map +1 -0
  37. package/dist/commands/checkpoint/show.d.ts +23 -0
  38. package/dist/commands/checkpoint/show.d.ts.map +1 -0
  39. package/dist/commands/checkpoint/show.js +102 -0
  40. package/dist/commands/checkpoint/show.js.map +1 -0
  41. package/dist/commands/dlq.d.ts +24 -0
  42. package/dist/commands/dlq.d.ts.map +1 -0
  43. package/dist/commands/dlq.js +172 -0
  44. package/dist/commands/dlq.js.map +1 -0
  45. package/dist/commands/escalation/create.d.ts +22 -0
  46. package/dist/commands/escalation/create.d.ts.map +1 -0
  47. package/dist/commands/escalation/create.js +122 -0
  48. package/dist/commands/escalation/create.js.map +1 -0
  49. package/dist/commands/escalation/escalation-client.d.ts +101 -0
  50. package/dist/commands/escalation/escalation-client.d.ts.map +1 -0
  51. package/dist/commands/escalation/escalation-client.js +129 -0
  52. package/dist/commands/escalation/escalation-client.js.map +1 -0
  53. package/dist/commands/escalation/index.d.ts +22 -0
  54. package/dist/commands/escalation/index.d.ts.map +1 -0
  55. package/dist/commands/escalation/index.js +94 -0
  56. package/dist/commands/escalation/index.js.map +1 -0
  57. package/dist/commands/escalation/list.d.ts +24 -0
  58. package/dist/commands/escalation/list.d.ts.map +1 -0
  59. package/dist/commands/escalation/list.js +170 -0
  60. package/dist/commands/escalation/list.js.map +1 -0
  61. package/dist/commands/escalation/resolve.d.ts +20 -0
  62. package/dist/commands/escalation/resolve.d.ts.map +1 -0
  63. package/dist/commands/escalation/resolve.js +102 -0
  64. package/dist/commands/escalation/resolve.js.map +1 -0
  65. package/dist/commands/graph/api-client.d.ts +21 -1
  66. package/dist/commands/graph/api-client.d.ts.map +1 -1
  67. package/dist/commands/graph/api-client.js +23 -0
  68. package/dist/commands/graph/api-client.js.map +1 -1
  69. package/dist/commands/handoff.d.ts.map +1 -1
  70. package/dist/commands/handoff.js +9 -1
  71. package/dist/commands/handoff.js.map +1 -1
  72. package/dist/commands/log.d.ts +3 -0
  73. package/dist/commands/log.d.ts.map +1 -1
  74. package/dist/commands/log.js +73 -14
  75. package/dist/commands/log.js.map +1 -1
  76. package/dist/commands/notifications/history.d.ts +21 -0
  77. package/dist/commands/notifications/history.d.ts.map +1 -0
  78. package/dist/commands/notifications/history.js +160 -0
  79. package/dist/commands/notifications/history.js.map +1 -0
  80. package/dist/commands/notifications/index.d.ts +22 -0
  81. package/dist/commands/notifications/index.d.ts.map +1 -0
  82. package/dist/commands/notifications/index.js +87 -0
  83. package/dist/commands/notifications/index.js.map +1 -0
  84. package/dist/commands/notifications/list.d.ts +19 -0
  85. package/dist/commands/notifications/list.d.ts.map +1 -0
  86. package/dist/commands/notifications/list.js +132 -0
  87. package/dist/commands/notifications/list.js.map +1 -0
  88. package/dist/commands/notifications/test.d.ts +19 -0
  89. package/dist/commands/notifications/test.d.ts.map +1 -0
  90. package/dist/commands/notifications/test.js +217 -0
  91. package/dist/commands/notifications/test.js.map +1 -0
  92. package/dist/commands/orchestrate.d.ts +25 -0
  93. package/dist/commands/orchestrate.d.ts.map +1 -0
  94. package/dist/commands/orchestrate.js +858 -0
  95. package/dist/commands/orchestrate.js.map +1 -0
  96. package/dist/commands/sprint/deps.d.ts +29 -0
  97. package/dist/commands/sprint/deps.d.ts.map +1 -0
  98. package/dist/commands/sprint/deps.js +269 -0
  99. package/dist/commands/sprint/deps.js.map +1 -0
  100. package/dist/commands/sprint/index.d.ts +10 -5
  101. package/dist/commands/sprint/index.d.ts.map +1 -1
  102. package/dist/commands/sprint/index.js +26 -5
  103. package/dist/commands/sprint/index.js.map +1 -1
  104. package/dist/commands/start/index.d.ts.map +1 -1
  105. package/dist/commands/start/index.js +6 -0
  106. package/dist/commands/start/index.js.map +1 -1
  107. package/dist/commands/start/start-reflection.d.ts.map +1 -1
  108. package/dist/commands/start/start-reflection.js +8 -0
  109. package/dist/commands/start/start-reflection.js.map +1 -1
  110. package/dist/commands/verify.d.ts +17 -0
  111. package/dist/commands/verify.d.ts.map +1 -0
  112. package/dist/commands/verify.js +232 -0
  113. package/dist/commands/verify.js.map +1 -0
  114. package/dist/core/session-log-manager.d.ts +1 -1
  115. package/dist/core/session-log-manager.d.ts.map +1 -1
  116. package/dist/index.js +78 -1
  117. package/dist/index.js.map +1 -1
  118. package/dist/lib/__tests__/task-timeout.test.d.ts +12 -0
  119. package/dist/lib/__tests__/task-timeout.test.d.ts.map +1 -0
  120. package/dist/lib/__tests__/task-timeout.test.js +278 -0
  121. package/dist/lib/__tests__/task-timeout.test.js.map +1 -0
  122. package/dist/lib/agent-heartbeat.d.ts +68 -0
  123. package/dist/lib/agent-heartbeat.d.ts.map +1 -0
  124. package/dist/lib/agent-heartbeat.js +117 -0
  125. package/dist/lib/agent-heartbeat.js.map +1 -0
  126. package/dist/lib/checkpoint.d.ts +85 -0
  127. package/dist/lib/checkpoint.d.ts.map +1 -0
  128. package/dist/lib/checkpoint.js +323 -0
  129. package/dist/lib/checkpoint.js.map +1 -0
  130. package/dist/lib/context-metrics.d.ts +230 -0
  131. package/dist/lib/context-metrics.d.ts.map +1 -0
  132. package/dist/lib/context-metrics.js +372 -0
  133. package/dist/lib/context-metrics.js.map +1 -0
  134. package/dist/lib/dead-letter-queue.d.ts +108 -0
  135. package/dist/lib/dead-letter-queue.d.ts.map +1 -0
  136. package/dist/lib/dead-letter-queue.js +378 -0
  137. package/dist/lib/dead-letter-queue.js.map +1 -0
  138. package/dist/lib/event-logger.d.ts +9 -1
  139. package/dist/lib/event-logger.d.ts.map +1 -1
  140. package/dist/lib/event-logger.js +45 -3
  141. package/dist/lib/event-logger.js.map +1 -1
  142. package/dist/lib/event-queue.d.ts.map +1 -1
  143. package/dist/lib/event-queue.js +13 -2
  144. package/dist/lib/event-queue.js.map +1 -1
  145. package/dist/lib/examples/timeout-demo.d.ts +13 -0
  146. package/dist/lib/examples/timeout-demo.d.ts.map +1 -0
  147. package/dist/lib/examples/timeout-demo.js +102 -0
  148. package/dist/lib/examples/timeout-demo.js.map +1 -0
  149. package/dist/lib/examples/timeout-integration-example.d.ts +17 -0
  150. package/dist/lib/examples/timeout-integration-example.d.ts.map +1 -0
  151. package/dist/lib/examples/timeout-integration-example.js +223 -0
  152. package/dist/lib/examples/timeout-integration-example.js.map +1 -0
  153. package/dist/lib/notification-hooks.d.ts +103 -0
  154. package/dist/lib/notification-hooks.d.ts.map +1 -0
  155. package/dist/lib/notification-hooks.js +223 -0
  156. package/dist/lib/notification-hooks.js.map +1 -0
  157. package/dist/lib/notifications/discord.d.ts +20 -0
  158. package/dist/lib/notifications/discord.d.ts.map +1 -0
  159. package/dist/lib/notifications/discord.js +140 -0
  160. package/dist/lib/notifications/discord.js.map +1 -0
  161. package/dist/lib/notifications/index.d.ts +66 -0
  162. package/dist/lib/notifications/index.d.ts.map +1 -0
  163. package/dist/lib/notifications/index.js +120 -0
  164. package/dist/lib/notifications/index.js.map +1 -0
  165. package/dist/lib/notifications/slack.d.ts +20 -0
  166. package/dist/lib/notifications/slack.d.ts.map +1 -0
  167. package/dist/lib/notifications/slack.js +186 -0
  168. package/dist/lib/notifications/slack.js.map +1 -0
  169. package/dist/lib/notifications/teams.d.ts +20 -0
  170. package/dist/lib/notifications/teams.d.ts.map +1 -0
  171. package/dist/lib/notifications/teams.js +146 -0
  172. package/dist/lib/notifications/teams.js.map +1 -0
  173. package/dist/lib/notifications/webhook.d.ts +23 -0
  174. package/dist/lib/notifications/webhook.d.ts.map +1 -0
  175. package/dist/lib/notifications/webhook.js +65 -0
  176. package/dist/lib/notifications/webhook.js.map +1 -0
  177. package/dist/lib/orchestrator-state.d.ts +194 -0
  178. package/dist/lib/orchestrator-state.d.ts.map +1 -0
  179. package/dist/lib/orchestrator-state.js +332 -0
  180. package/dist/lib/orchestrator-state.js.map +1 -0
  181. package/dist/lib/realtime-cursor.d.ts +107 -0
  182. package/dist/lib/realtime-cursor.d.ts.map +1 -0
  183. package/dist/lib/realtime-cursor.js +260 -0
  184. package/dist/lib/realtime-cursor.js.map +1 -0
  185. package/dist/lib/rollback.d.ts +86 -0
  186. package/dist/lib/rollback.d.ts.map +1 -0
  187. package/dist/lib/rollback.js +405 -0
  188. package/dist/lib/rollback.js.map +1 -0
  189. package/dist/lib/sprint-loader.d.ts +39 -2
  190. package/dist/lib/sprint-loader.d.ts.map +1 -1
  191. package/dist/lib/sprint-loader.js +269 -5
  192. package/dist/lib/sprint-loader.js.map +1 -1
  193. package/dist/lib/stale-agent-detector.d.ts +102 -0
  194. package/dist/lib/stale-agent-detector.d.ts.map +1 -0
  195. package/dist/lib/stale-agent-detector.js +156 -0
  196. package/dist/lib/stale-agent-detector.js.map +1 -0
  197. package/dist/lib/task-dependencies.d.ts +143 -0
  198. package/dist/lib/task-dependencies.d.ts.map +1 -0
  199. package/dist/lib/task-dependencies.js +357 -0
  200. package/dist/lib/task-dependencies.js.map +1 -0
  201. package/dist/lib/task-timeout.d.ts +153 -0
  202. package/dist/lib/task-timeout.d.ts.map +1 -0
  203. package/dist/lib/task-timeout.js +505 -0
  204. package/dist/lib/task-timeout.js.map +1 -0
  205. package/dist/lib/verification/build-check.d.ts +55 -0
  206. package/dist/lib/verification/build-check.d.ts.map +1 -0
  207. package/dist/lib/verification/build-check.js +111 -0
  208. package/dist/lib/verification/build-check.js.map +1 -0
  209. package/dist/lib/verification/index.d.ts +19 -0
  210. package/dist/lib/verification/index.d.ts.map +1 -0
  211. package/dist/lib/verification/index.js +17 -0
  212. package/dist/lib/verification/index.js.map +1 -0
  213. package/dist/lib/verification/lint-check.d.ts +34 -0
  214. package/dist/lib/verification/lint-check.d.ts.map +1 -0
  215. package/dist/lib/verification/lint-check.js +215 -0
  216. package/dist/lib/verification/lint-check.js.map +1 -0
  217. package/dist/lib/verification/test-runner.d.ts +50 -0
  218. package/dist/lib/verification/test-runner.d.ts.map +1 -0
  219. package/dist/lib/verification/test-runner.js +225 -0
  220. package/dist/lib/verification/test-runner.js.map +1 -0
  221. package/dist/utils/command-helpers.d.ts.map +1 -1
  222. package/dist/utils/command-helpers.js +7 -0
  223. package/dist/utils/command-helpers.js.map +1 -1
  224. package/package.json +1 -1
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @fileType: utility
3
+ * @status: current
4
+ * @updated: 2025-12-05
5
+ * @tags: verification, build, health-check, CI
6
+ * @related: packages/cli/src/lib/verification/test-check.ts
7
+ * @priority: high
8
+ * @complexity: medium
9
+ * @dependencies: fs-extra, child_process
10
+ */
11
+ /**
12
+ * Result of running a build verification
13
+ */
14
+ export interface BuildResult {
15
+ passed: boolean;
16
+ output: string;
17
+ errorOutput?: string;
18
+ duration_ms: number;
19
+ }
20
+ /**
21
+ * Options for build verification
22
+ */
23
+ export interface BuildCheckOptions {
24
+ /** Maximum time to wait for build in milliseconds (default: 600000 = 10 min) */
25
+ timeout?: number;
26
+ }
27
+ /**
28
+ * Runs build verification for a project
29
+ *
30
+ * Automatically detects build command and executes it, capturing output.
31
+ * Handles errors gracefully and returns structured results.
32
+ *
33
+ * @param projectRoot - Absolute path to project root
34
+ * @param options - Build check options
35
+ * @returns Build result with success status, output, and duration
36
+ *
37
+ * @example
38
+ * ```typescript
39
+ * const result = await runBuild('/path/to/project');
40
+ * if (result.passed) {
41
+ * console.log('Build successful in', result.duration_ms, 'ms');
42
+ * } else {
43
+ * console.error('Build failed:', result.errorOutput);
44
+ * }
45
+ * ```
46
+ */
47
+ export declare function runBuild(projectRoot: string, options?: BuildCheckOptions): Promise<BuildResult>;
48
+ /**
49
+ * Checks if a project has a buildable configuration
50
+ *
51
+ * @param projectRoot - Absolute path to project root
52
+ * @returns True if project has package.json or tsconfig.json
53
+ */
54
+ export declare function isBuildable(projectRoot: string): Promise<boolean>;
55
+ //# sourceMappingURL=build-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-check.d.ts","sourceRoot":"","sources":["../../../src/lib/verification/build-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAqCD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,QAAQ,CAC5B,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,WAAW,CAAC,CAkCtB;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOvE"}
@@ -0,0 +1,111 @@
1
+ /**
2
+ * @fileType: utility
3
+ * @status: current
4
+ * @updated: 2025-12-05
5
+ * @tags: verification, build, health-check, CI
6
+ * @related: packages/cli/src/lib/verification/test-check.ts
7
+ * @priority: high
8
+ * @complexity: medium
9
+ * @dependencies: fs-extra, child_process
10
+ */
11
+ import * as fs from 'fs-extra';
12
+ import { exec } from 'child_process';
13
+ import { promisify } from 'util';
14
+ import path from 'path';
15
+ const execAsync = promisify(exec);
16
+ /**
17
+ * Detects the appropriate build command for a project
18
+ *
19
+ * Detection order:
20
+ * 1. package.json "build" script
21
+ * 2. tsconfig.json → npx tsc --noEmit
22
+ * 3. Fallback to npm run build
23
+ *
24
+ * @param projectRoot - Absolute path to project root
25
+ * @returns Build command to execute
26
+ */
27
+ async function detectBuildCommand(projectRoot) {
28
+ // Check for package.json with build script
29
+ const packageJsonPath = path.join(projectRoot, 'package.json');
30
+ if (await fs.pathExists(packageJsonPath)) {
31
+ try {
32
+ const packageJson = JSON.parse(await fs.readFile(packageJsonPath, 'utf-8'));
33
+ if (packageJson.scripts?.build) {
34
+ return 'npm run build';
35
+ }
36
+ }
37
+ catch (error) {
38
+ // Invalid package.json, continue to next detection
39
+ }
40
+ }
41
+ // Check for tsconfig.json → use TypeScript compiler
42
+ const tsconfigPath = path.join(projectRoot, 'tsconfig.json');
43
+ if (await fs.pathExists(tsconfigPath)) {
44
+ return 'npx tsc --noEmit';
45
+ }
46
+ // Default fallback
47
+ return 'npm run build';
48
+ }
49
+ /**
50
+ * Runs build verification for a project
51
+ *
52
+ * Automatically detects build command and executes it, capturing output.
53
+ * Handles errors gracefully and returns structured results.
54
+ *
55
+ * @param projectRoot - Absolute path to project root
56
+ * @param options - Build check options
57
+ * @returns Build result with success status, output, and duration
58
+ *
59
+ * @example
60
+ * ```typescript
61
+ * const result = await runBuild('/path/to/project');
62
+ * if (result.passed) {
63
+ * console.log('Build successful in', result.duration_ms, 'ms');
64
+ * } else {
65
+ * console.error('Build failed:', result.errorOutput);
66
+ * }
67
+ * ```
68
+ */
69
+ export async function runBuild(projectRoot, options) {
70
+ const startTime = Date.now();
71
+ const timeout = options?.timeout ?? 600000; // 10 minutes default
72
+ try {
73
+ // Detect appropriate build command
74
+ const buildCommand = await detectBuildCommand(projectRoot);
75
+ // Execute build with timeout
76
+ const { stdout, stderr } = await execAsync(buildCommand, {
77
+ cwd: projectRoot,
78
+ timeout,
79
+ maxBuffer: 10 * 1024 * 1024, // 10MB buffer for large build outputs
80
+ });
81
+ const duration_ms = Date.now() - startTime;
82
+ // Build succeeded
83
+ return {
84
+ passed: true,
85
+ output: stdout || stderr || 'Build completed successfully (no output)',
86
+ duration_ms,
87
+ };
88
+ }
89
+ catch (error) {
90
+ const duration_ms = Date.now() - startTime;
91
+ // Build failed or timed out
92
+ return {
93
+ passed: false,
94
+ output: error.stdout || '',
95
+ errorOutput: error.stderr || error.message || 'Build failed with unknown error',
96
+ duration_ms,
97
+ };
98
+ }
99
+ }
100
+ /**
101
+ * Checks if a project has a buildable configuration
102
+ *
103
+ * @param projectRoot - Absolute path to project root
104
+ * @returns True if project has package.json or tsconfig.json
105
+ */
106
+ export async function isBuildable(projectRoot) {
107
+ const packageJsonPath = path.join(projectRoot, 'package.json');
108
+ const tsconfigPath = path.join(projectRoot, 'tsconfig.json');
109
+ return ((await fs.pathExists(packageJsonPath)) || (await fs.pathExists(tsconfigPath)));
110
+ }
111
+ //# sourceMappingURL=build-check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-check.js","sourceRoot":"","sources":["../../../src/lib/verification/build-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AAoBlC;;;;;;;;;;GAUG;AACH,KAAK,UAAU,kBAAkB,CAAC,WAAmB;IACnD,2CAA2C;IAC3C,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IAC/D,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;YAC5E,IAAI,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;gBAC/B,OAAO,eAAe,CAAC;YACzB,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,mDAAmD;QACrD,CAAC;IACH,CAAC;IAED,oDAAoD;IACpD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IAC7D,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACtC,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED,mBAAmB;IACnB,OAAO,eAAe,CAAC;AACzB,CAAC;AAED;;;;;;;;;;;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AAW,EAAE,eAAe,CAAC,CAAC;IAE7D,OAAO,CACL,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAC9E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @fileType: utility
3
+ * @status: current
4
+ * @updated: 2025-12-05
5
+ * @tags: [verification, barrel-export, epic-004, sprint-3]
6
+ * @related: [test-runner.ts, build-check.ts, lint-check.ts]
7
+ * @priority: high
8
+ * @complexity: low
9
+ * @dependencies: []
10
+ */
11
+ /**
12
+ * Verification utilities for task acceptance criteria
13
+ * EPIC-004 Sprint 3: Verification & Quality
14
+ */
15
+ export { runTests } from './test-runner.js';
16
+ export type { TestResult, TestOptions } from './test-runner.js';
17
+ export { runLint } from './lint-check.js';
18
+ export type { LintResult, LintOptions } from './lint-check.js';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/verification/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @fileType: utility
3
+ * @status: current
4
+ * @updated: 2025-12-05
5
+ * @tags: [verification, barrel-export, epic-004, sprint-3]
6
+ * @related: [test-runner.ts, build-check.ts, lint-check.ts]
7
+ * @priority: high
8
+ * @complexity: low
9
+ * @dependencies: []
10
+ */
11
+ /**
12
+ * Verification utilities for task acceptance criteria
13
+ * EPIC-004 Sprint 3: Verification & Quality
14
+ */
15
+ export { runTests } from './test-runner.js';
16
+ export { runLint } from './lint-check.js';
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/verification/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @fileType: utility
3
+ * @status: current
4
+ * @updated: 2025-12-05
5
+ * @tags: [verification, lint, quality, epic-004-s3]
6
+ * @related: [test-runner.ts, build-check.ts, ../commands/verify.ts]
7
+ * @priority: high
8
+ * @complexity: medium
9
+ * @dependencies: [fs, child_process]
10
+ */
11
+ export interface LintResult {
12
+ passed: boolean;
13
+ errorCount: number;
14
+ warningCount: number;
15
+ output: string;
16
+ duration_ms: number;
17
+ }
18
+ export interface LintOptions {
19
+ /** Timeout in milliseconds (default: 120000 = 2 minutes) */
20
+ timeout?: number;
21
+ /** Baseline error count - only fail if errors exceed this number */
22
+ baseline?: number;
23
+ }
24
+ /**
25
+ * Run lint command and return structured result
26
+ *
27
+ * @param projectRoot - Absolute path to project root directory
28
+ * @param options - Optional configuration (timeout, baseline)
29
+ * @returns LintResult with pass/fail status and details
30
+ *
31
+ * @throws Error if projectRoot doesn't exist or lint command fails to execute
32
+ */
33
+ export declare function runLint(projectRoot: string, options?: LintOptions): Promise<LintResult>;
34
+ //# sourceMappingURL=lint-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lint-check.d.ts","sourceRoot":"","sources":["../../../src/lib/verification/lint-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA+CH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAgGD;;;;;;;;GAQG;AACH,wBAAsB,OAAO,CAC3B,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,UAAU,CAAC,CAgFrB"}
@@ -0,0 +1,215 @@
1
+ /**
2
+ * @fileType: utility
3
+ * @status: current
4
+ * @updated: 2025-12-05
5
+ * @tags: [verification, lint, quality, epic-004-s3]
6
+ * @related: [test-runner.ts, build-check.ts, ../commands/verify.ts]
7
+ * @priority: high
8
+ * @complexity: medium
9
+ * @dependencies: [fs, child_process]
10
+ */
11
+ /**
12
+ * Lint Verification Utility
13
+ *
14
+ * Detects and runs lint commands to verify code quality standards.
15
+ *
16
+ * Pattern:
17
+ * - Auto-detects lint command from package.json scripts
18
+ * - Checks for common lint config files (.eslintrc, eslint.config.js, etc.)
19
+ * - Parses lint output to extract error/warning counts
20
+ * - Supports baseline comparison to detect new errors
21
+ * - Returns structured result with pass/fail status
22
+ *
23
+ * Detection Logic:
24
+ * 1. Check package.json for "lint" script
25
+ * 2. Check for lint config files
26
+ * 3. Default to `npm run lint` if both exist
27
+ *
28
+ * Parsing:
29
+ * - ESLint format: "✖ N problems (X errors, Y warnings)"
30
+ * - Alternative formats: Look for "error(s)" and "warning(s)" patterns
31
+ *
32
+ * Usage:
33
+ * ```typescript
34
+ * const { runLint } = require('./lint-check');
35
+ *
36
+ * // Basic usage
37
+ * const result = await runLint('/path/to/project');
38
+ * console.log(`Passed: ${result.passed}, Errors: ${result.errorCount}`);
39
+ *
40
+ * // With baseline comparison
41
+ * const result = await runLint('/path/to/project', { baseline: 5 });
42
+ * // Only fails if error count > 5 (new errors introduced)
43
+ *
44
+ * // With timeout
45
+ * const result = await runLint('/path/to/project', { timeout: 60000 });
46
+ * ```
47
+ */
48
+ import { promises as fs } from 'fs';
49
+ import { exec } from 'child_process';
50
+ import { promisify } from 'util';
51
+ import * as path from 'path';
52
+ const execAsync = promisify(exec);
53
+ /**
54
+ * Detect lint command from project configuration
55
+ */
56
+ async function detectLintCommand(projectRoot) {
57
+ try {
58
+ // Check package.json for lint script
59
+ const packageJsonPath = path.join(projectRoot, 'package.json');
60
+ const packageJsonContent = await fs.readFile(packageJsonPath, 'utf-8');
61
+ const packageJson = JSON.parse(packageJsonContent);
62
+ if (packageJson.scripts?.lint) {
63
+ return 'npm run lint';
64
+ }
65
+ // Check for common lint config files
66
+ const lintConfigFiles = [
67
+ '.eslintrc',
68
+ '.eslintrc.js',
69
+ '.eslintrc.json',
70
+ '.eslintrc.yaml',
71
+ '.eslintrc.yml',
72
+ 'eslint.config.js',
73
+ 'eslint.config.mjs',
74
+ '.prettierrc',
75
+ '.prettierrc.js',
76
+ '.prettierrc.json',
77
+ ];
78
+ for (const configFile of lintConfigFiles) {
79
+ const configPath = path.join(projectRoot, configFile);
80
+ try {
81
+ await fs.access(configPath);
82
+ // Config exists, assume eslint is available
83
+ return 'npx eslint .';
84
+ }
85
+ catch {
86
+ // Config doesn't exist, try next
87
+ }
88
+ }
89
+ return null;
90
+ }
91
+ catch (error) {
92
+ return null;
93
+ }
94
+ }
95
+ /**
96
+ * Parse lint output to extract error and warning counts
97
+ */
98
+ function parseLintOutput(output) {
99
+ let errorCount = 0;
100
+ let warningCount = 0;
101
+ // ESLint format: "✖ 42 problems (23 errors, 19 warnings)"
102
+ const eslintMatch = output.match(/(\d+)\s+problems?\s+\((\d+)\s+errors?,\s+(\d+)\s+warnings?\)/i);
103
+ if (eslintMatch) {
104
+ errorCount = parseInt(eslintMatch[2], 10);
105
+ warningCount = parseInt(eslintMatch[3], 10);
106
+ return { errorCount, warningCount };
107
+ }
108
+ // Alternative ESLint format: "✖ 23 errors, 19 warnings"
109
+ const eslintAltMatch = output.match(/(\d+)\s+errors?,\s+(\d+)\s+warnings?/i);
110
+ if (eslintAltMatch) {
111
+ errorCount = parseInt(eslintAltMatch[1], 10);
112
+ warningCount = parseInt(eslintAltMatch[2], 10);
113
+ return { errorCount, warningCount };
114
+ }
115
+ // Generic error pattern
116
+ const errorMatch = output.match(/(\d+)\s+errors?/i);
117
+ if (errorMatch) {
118
+ errorCount = parseInt(errorMatch[1], 10);
119
+ }
120
+ // Generic warning pattern
121
+ const warningMatch = output.match(/(\d+)\s+warnings?/i);
122
+ if (warningMatch) {
123
+ warningCount = parseInt(warningMatch[1], 10);
124
+ }
125
+ // If no counts found, check for "no problems" or similar success messages
126
+ if (errorCount === 0 && warningCount === 0) {
127
+ if (output.includes('no problems') ||
128
+ output.includes('0 errors') ||
129
+ output.includes('All matched files use Prettier code style')) {
130
+ return { errorCount: 0, warningCount: 0 };
131
+ }
132
+ }
133
+ return { errorCount, warningCount };
134
+ }
135
+ /**
136
+ * Run lint command and return structured result
137
+ *
138
+ * @param projectRoot - Absolute path to project root directory
139
+ * @param options - Optional configuration (timeout, baseline)
140
+ * @returns LintResult with pass/fail status and details
141
+ *
142
+ * @throws Error if projectRoot doesn't exist or lint command fails to execute
143
+ */
144
+ export async function runLint(projectRoot, options = {}) {
145
+ const { timeout = 120000, baseline } = options;
146
+ const startTime = Date.now();
147
+ try {
148
+ // Verify project root exists
149
+ await fs.access(projectRoot);
150
+ // Detect lint command
151
+ const lintCommand = await detectLintCommand(projectRoot);
152
+ if (!lintCommand) {
153
+ return {
154
+ passed: true,
155
+ errorCount: 0,
156
+ warningCount: 0,
157
+ output: 'No lint command detected. Skipping lint verification.',
158
+ duration_ms: Date.now() - startTime,
159
+ };
160
+ }
161
+ // Run lint command
162
+ let output = '';
163
+ let errorCount = 0;
164
+ let warningCount = 0;
165
+ try {
166
+ const { stdout, stderr } = await execAsync(lintCommand, {
167
+ cwd: projectRoot,
168
+ timeout,
169
+ maxBuffer: 1024 * 1024 * 10, // 10MB buffer
170
+ });
171
+ output = stdout + stderr;
172
+ const counts = parseLintOutput(output);
173
+ errorCount = counts.errorCount;
174
+ warningCount = counts.warningCount;
175
+ }
176
+ catch (error) {
177
+ // Lint commands typically exit with non-zero on errors
178
+ // Capture output even on failure
179
+ output = (error.stdout || '') + (error.stderr || '');
180
+ const counts = parseLintOutput(output);
181
+ errorCount = counts.errorCount;
182
+ warningCount = counts.warningCount;
183
+ // If parsing found no errors but command failed, it's likely a real error
184
+ if (errorCount === 0 && error.code !== 0) {
185
+ throw error;
186
+ }
187
+ }
188
+ const duration_ms = Date.now() - startTime;
189
+ // Determine pass/fail
190
+ let passed = errorCount === 0;
191
+ // Apply baseline comparison if provided
192
+ if (baseline !== undefined) {
193
+ passed = errorCount <= baseline;
194
+ }
195
+ return {
196
+ passed,
197
+ errorCount,
198
+ warningCount,
199
+ output: output.trim(),
200
+ duration_ms,
201
+ };
202
+ }
203
+ catch (error) {
204
+ const duration_ms = Date.now() - startTime;
205
+ // Handle execution errors gracefully
206
+ return {
207
+ passed: false,
208
+ errorCount: -1,
209
+ warningCount: -1,
210
+ output: `Lint execution failed: ${error.message}\n${error.stdout || ''}\n${error.stderr || ''}`,
211
+ duration_ms,
212
+ };
213
+ }
214
+ }
215
+ //# sourceMappingURL=lint-check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lint-check.js","sourceRoot":"","sources":["../../../src/lib/verification/lint-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;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"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * @fileType: utility
3
+ * @status: current
4
+ * @updated: 2025-12-05
5
+ * @tags: [verification, testing, task-validation, epic-004, sprint-3]
6
+ * @related: [build-check.ts, lint-check.ts, ../sprint-loader.ts]
7
+ * @priority: high
8
+ * @complexity: medium
9
+ * @dependencies: [child_process, fs, path]
10
+ */
11
+ /**
12
+ * Result from running project tests
13
+ * EPIC-004 Sprint 3 TASK-3: Test Runner Integration
14
+ */
15
+ export interface TestResult {
16
+ passed: boolean;
17
+ passCount: number;
18
+ failCount: number;
19
+ coverage?: number;
20
+ output: string;
21
+ duration_ms: number;
22
+ }
23
+ /**
24
+ * Options for test execution
25
+ */
26
+ export interface TestOptions {
27
+ timeout?: number;
28
+ }
29
+ /**
30
+ * Run tests and capture results
31
+ *
32
+ * Detects test framework from package.json scripts or config files.
33
+ * Runs tests with timeout, captures output, parses pass/fail counts.
34
+ *
35
+ * @param projectRoot - Path to project root directory
36
+ * @param options - Test execution options (timeout)
37
+ * @returns Structured test result with pass/fail counts
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * const result = await runTests('/path/to/project');
42
+ * if (result.passed) {
43
+ * console.log(`✓ All tests passed (${result.passCount})`);
44
+ * } else {
45
+ * console.log(`✗ ${result.failCount} tests failed`);
46
+ * }
47
+ * ```
48
+ */
49
+ export declare function runTests(projectRoot: string, options?: TestOptions): Promise<TestResult>;
50
+ //# sourceMappingURL=test-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-runner.d.ts","sourceRoot":"","sources":["../../../src/lib/verification/test-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AA8ID;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,QAAQ,CAC5B,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,UAAU,CAAC,CAwFrB"}