@lssm/bundle.contractspec-workspace 0.0.0-canary-20251217080011 → 0.0.0-canary-20251219202229

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 (502) hide show
  1. package/LICENSE +21 -0
  2. package/dist/adapters/ai.d.ts +7 -8
  3. package/dist/adapters/ai.d.ts.map +1 -0
  4. package/dist/adapters/factory.d.ts +20 -21
  5. package/dist/adapters/factory.d.ts.map +1 -0
  6. package/dist/adapters/fs.d.ts +6 -7
  7. package/dist/adapters/fs.d.ts.map +1 -0
  8. package/dist/adapters/git.d.ts +6 -7
  9. package/dist/adapters/git.d.ts.map +1 -0
  10. package/dist/adapters/index.d.ts +11 -0
  11. package/dist/adapters/index.d.ts.map +1 -0
  12. package/dist/adapters/logger.d.ts +9 -8
  13. package/dist/adapters/logger.d.ts.map +1 -0
  14. package/dist/adapters/watcher.d.ts +6 -7
  15. package/dist/adapters/watcher.d.ts.map +1 -0
  16. package/dist/adapters/workspace.d.ts +37 -39
  17. package/dist/adapters/workspace.d.ts.map +1 -0
  18. package/dist/ai/agents/claude-code-agent.d.ts +20 -20
  19. package/dist/ai/agents/claude-code-agent.d.ts.map +1 -0
  20. package/dist/ai/agents/cursor-agent.d.ts +66 -66
  21. package/dist/ai/agents/cursor-agent.d.ts.map +1 -0
  22. package/dist/ai/agents/index.d.ts +10 -0
  23. package/dist/ai/agents/index.d.ts.map +1 -0
  24. package/dist/ai/agents/openai-codex-agent.d.ts +20 -20
  25. package/dist/ai/agents/openai-codex-agent.d.ts.map +1 -0
  26. package/dist/ai/agents/orchestrator.d.ts +48 -48
  27. package/dist/ai/agents/orchestrator.d.ts.map +1 -0
  28. package/dist/ai/agents/simple-agent.d.ts +15 -15
  29. package/dist/ai/agents/simple-agent.d.ts.map +1 -0
  30. package/dist/ai/agents/types.d.ts +26 -28
  31. package/dist/ai/agents/types.d.ts.map +1 -0
  32. package/dist/ai/client.d.ts +74 -78
  33. package/dist/ai/client.d.ts.map +1 -0
  34. package/dist/ai/index.d.ts +8 -16
  35. package/dist/ai/index.d.ts.map +1 -0
  36. package/dist/ai/prompts/code-generation.d.ts +6 -10
  37. package/dist/ai/prompts/code-generation.d.ts.map +1 -0
  38. package/dist/ai/prompts/index.d.ts +6 -9
  39. package/dist/ai/prompts/index.d.ts.map +1 -0
  40. package/dist/ai/prompts/spec-creation.d.ts +7 -13
  41. package/dist/ai/prompts/spec-creation.d.ts.map +1 -0
  42. package/dist/ai/providers.d.ts +13 -12
  43. package/dist/ai/providers.d.ts.map +1 -0
  44. package/dist/formatters/index.d.ts +7 -10
  45. package/dist/formatters/index.d.ts.map +1 -0
  46. package/dist/formatters/json.d.ts +65 -63
  47. package/dist/formatters/json.d.ts.map +1 -0
  48. package/dist/formatters/sarif.d.ts +77 -72
  49. package/dist/formatters/sarif.d.ts.map +1 -0
  50. package/dist/formatters/text.d.ts +21 -19
  51. package/dist/formatters/text.d.ts.map +1 -0
  52. package/dist/index.d.ts +14 -66
  53. package/dist/index.d.ts.map +1 -0
  54. package/dist/index.js +4531 -81
  55. package/dist/ports/ai.d.ts +41 -38
  56. package/dist/ports/ai.d.ts.map +1 -0
  57. package/dist/ports/fs.d.ts +63 -65
  58. package/dist/ports/fs.d.ts.map +1 -0
  59. package/dist/ports/git.d.ts +19 -21
  60. package/dist/ports/git.d.ts.map +1 -0
  61. package/dist/ports/index.d.ts +10 -0
  62. package/dist/ports/index.d.ts.map +1 -0
  63. package/dist/ports/logger.d.ts +58 -65
  64. package/dist/ports/logger.d.ts.map +1 -0
  65. package/dist/ports/watcher.d.ts +24 -26
  66. package/dist/ports/watcher.d.ts.map +1 -0
  67. package/dist/services/agent-guide/adapters/claude-code.d.ts +30 -28
  68. package/dist/services/agent-guide/adapters/claude-code.d.ts.map +1 -0
  69. package/dist/services/agent-guide/adapters/cursor-cli.d.ts +34 -32
  70. package/dist/services/agent-guide/adapters/cursor-cli.d.ts.map +1 -0
  71. package/dist/services/agent-guide/adapters/generic-mcp.d.ts +47 -45
  72. package/dist/services/agent-guide/adapters/generic-mcp.d.ts.map +1 -0
  73. package/dist/services/agent-guide/adapters/index.d.ts +15 -13
  74. package/dist/services/agent-guide/adapters/index.d.ts.map +1 -0
  75. package/dist/services/agent-guide/agent-guide-service.d.ts +48 -45
  76. package/dist/services/agent-guide/agent-guide-service.d.ts.map +1 -0
  77. package/dist/services/agent-guide/index.d.ts +12 -0
  78. package/dist/services/agent-guide/index.d.ts.map +1 -0
  79. package/dist/services/agent-guide/types.d.ts +46 -47
  80. package/dist/services/agent-guide/types.d.ts.map +1 -0
  81. package/dist/services/build.d.ts +41 -39
  82. package/dist/services/build.d.ts.map +1 -0
  83. package/dist/services/ci-check/ci-check-service.d.ts +13 -11
  84. package/dist/services/ci-check/ci-check-service.d.ts.map +1 -0
  85. package/dist/services/ci-check/index.d.ts +6 -0
  86. package/dist/services/ci-check/index.d.ts.map +1 -0
  87. package/dist/services/ci-check/types.d.ts +100 -102
  88. package/dist/services/ci-check/types.d.ts.map +1 -0
  89. package/dist/services/clean.d.ts +38 -37
  90. package/dist/services/clean.d.ts.map +1 -0
  91. package/dist/services/config.d.ts +14 -15
  92. package/dist/services/config.d.ts.map +1 -0
  93. package/dist/services/deps.d.ts +29 -30
  94. package/dist/services/deps.d.ts.map +1 -0
  95. package/dist/services/diff.d.ts +20 -21
  96. package/dist/services/diff.d.ts.map +1 -0
  97. package/dist/services/doctor/checks/ai.d.ts +10 -0
  98. package/dist/services/doctor/checks/ai.d.ts.map +1 -0
  99. package/dist/services/doctor/checks/cli.d.ts +10 -0
  100. package/dist/services/doctor/checks/cli.d.ts.map +1 -0
  101. package/dist/services/doctor/checks/config.d.ts +10 -0
  102. package/dist/services/doctor/checks/config.d.ts.map +1 -0
  103. package/dist/services/doctor/checks/deps.d.ts +10 -0
  104. package/dist/services/doctor/checks/deps.d.ts.map +1 -0
  105. package/dist/services/doctor/checks/index.d.ts +10 -0
  106. package/dist/services/doctor/checks/index.d.ts.map +1 -0
  107. package/dist/services/doctor/checks/mcp.d.ts +10 -0
  108. package/dist/services/doctor/checks/mcp.d.ts.map +1 -0
  109. package/dist/services/doctor/checks/workspace.d.ts +12 -0
  110. package/dist/services/doctor/checks/workspace.d.ts.map +1 -0
  111. package/dist/services/doctor/doctor-service.d.ts +14 -13
  112. package/dist/services/doctor/doctor-service.d.ts.map +1 -0
  113. package/dist/services/doctor/index.d.ts +8 -0
  114. package/dist/services/doctor/index.d.ts.map +1 -0
  115. package/dist/services/doctor/types.d.ts +70 -72
  116. package/dist/services/doctor/types.d.ts.map +1 -0
  117. package/dist/services/implementation/discovery.d.ts +16 -14
  118. package/dist/services/implementation/discovery.d.ts.map +1 -0
  119. package/dist/services/implementation/index.d.ts +7 -0
  120. package/dist/services/implementation/index.d.ts.map +1 -0
  121. package/dist/services/implementation/resolver.d.ts +31 -27
  122. package/dist/services/implementation/resolver.d.ts.map +1 -0
  123. package/dist/services/implementation/types.d.ts +55 -56
  124. package/dist/services/implementation/types.d.ts.map +1 -0
  125. package/dist/services/index.d.ts +28 -0
  126. package/dist/services/index.d.ts.map +1 -0
  127. package/dist/services/integrity-diagram.d.ts +29 -25
  128. package/dist/services/integrity-diagram.d.ts.map +1 -0
  129. package/dist/services/integrity.d.ts +100 -96
  130. package/dist/services/integrity.d.ts.map +1 -0
  131. package/dist/services/list.d.ts +18 -19
  132. package/dist/services/list.d.ts.map +1 -0
  133. package/dist/services/openapi/export-service.d.ts +39 -40
  134. package/dist/services/openapi/export-service.d.ts.map +1 -0
  135. package/dist/services/openapi/import-service.d.ts +10 -11
  136. package/dist/services/openapi/import-service.d.ts.map +1 -0
  137. package/dist/services/openapi/index.d.ts +10 -0
  138. package/dist/services/openapi/index.d.ts.map +1 -0
  139. package/dist/services/openapi/sync-service.d.ts +12 -13
  140. package/dist/services/openapi/sync-service.d.ts.map +1 -0
  141. package/dist/services/openapi/types.d.ts +141 -143
  142. package/dist/services/openapi/types.d.ts.map +1 -0
  143. package/dist/services/openapi/validate-service.d.ts +10 -11
  144. package/dist/services/openapi/validate-service.d.ts.map +1 -0
  145. package/dist/services/regenerator.d.ts +18 -16
  146. package/dist/services/regenerator.d.ts.map +1 -0
  147. package/dist/services/registry.d.ts +25 -26
  148. package/dist/services/registry.d.ts.map +1 -0
  149. package/dist/services/setup/config-generators.d.ts +14 -13
  150. package/dist/services/setup/config-generators.d.ts.map +1 -0
  151. package/dist/services/setup/file-merger.d.ts +5 -7
  152. package/dist/services/setup/file-merger.d.ts.map +1 -0
  153. package/dist/services/setup/index.d.ts +10 -0
  154. package/dist/services/setup/index.d.ts.map +1 -0
  155. package/dist/services/setup/setup-service.d.ts +10 -8
  156. package/dist/services/setup/setup-service.d.ts.map +1 -0
  157. package/dist/services/setup/targets/agents-md.d.ts +12 -0
  158. package/dist/services/setup/targets/agents-md.d.ts.map +1 -0
  159. package/dist/services/setup/targets/cli-config.d.ts +12 -0
  160. package/dist/services/setup/targets/cli-config.d.ts.map +1 -0
  161. package/dist/services/setup/targets/cursor-rules.d.ts +10 -0
  162. package/dist/services/setup/targets/cursor-rules.d.ts.map +1 -0
  163. package/dist/services/setup/targets/index.d.ts +10 -0
  164. package/dist/services/setup/targets/index.d.ts.map +1 -0
  165. package/dist/services/setup/targets/mcp-claude.d.ts +11 -0
  166. package/dist/services/setup/targets/mcp-claude.d.ts.map +1 -0
  167. package/dist/services/setup/targets/mcp-cursor.d.ts +10 -0
  168. package/dist/services/setup/targets/mcp-cursor.d.ts.map +1 -0
  169. package/dist/services/setup/targets/vscode-settings.d.ts +13 -0
  170. package/dist/services/setup/targets/vscode-settings.d.ts.map +1 -0
  171. package/dist/services/setup/types.d.ts +51 -53
  172. package/dist/services/setup/types.d.ts.map +1 -0
  173. package/dist/services/sync.d.ts +37 -35
  174. package/dist/services/sync.d.ts.map +1 -0
  175. package/dist/services/test.d.ts +15 -13
  176. package/dist/services/test.d.ts.map +1 -0
  177. package/dist/services/validate-implementation.d.ts +30 -28
  178. package/dist/services/validate-implementation.d.ts.map +1 -0
  179. package/dist/services/validate.d.ts +23 -24
  180. package/dist/services/validate.d.ts.map +1 -0
  181. package/dist/services/verification-cache/adapters/filesystem.d.ts +40 -38
  182. package/dist/services/verification-cache/adapters/filesystem.d.ts.map +1 -0
  183. package/dist/services/verification-cache/adapters/in-memory.d.ts +21 -19
  184. package/dist/services/verification-cache/adapters/in-memory.d.ts.map +1 -0
  185. package/dist/services/verification-cache/adapters/index.d.ts +7 -0
  186. package/dist/services/verification-cache/adapters/index.d.ts.map +1 -0
  187. package/dist/services/verification-cache/adapters/workspace-state.d.ts +39 -37
  188. package/dist/services/verification-cache/adapters/workspace-state.d.ts.map +1 -0
  189. package/dist/services/verification-cache/cache-service.d.ts +55 -53
  190. package/dist/services/verification-cache/cache-service.d.ts.map +1 -0
  191. package/dist/services/verification-cache/index.d.ts +7 -0
  192. package/dist/services/verification-cache/index.d.ts.map +1 -0
  193. package/dist/services/verification-cache/types.d.ts +84 -85
  194. package/dist/services/verification-cache/types.d.ts.map +1 -0
  195. package/dist/services/verify/ai-verifier.d.ts +13 -11
  196. package/dist/services/verify/ai-verifier.d.ts.map +1 -0
  197. package/dist/services/verify/behavior-verifier.d.ts +10 -8
  198. package/dist/services/verify/behavior-verifier.d.ts.map +1 -0
  199. package/dist/services/verify/index.d.ts +18 -0
  200. package/dist/services/verify/index.d.ts.map +1 -0
  201. package/dist/services/verify/structure-verifier.d.ts +12 -8
  202. package/dist/services/verify/structure-verifier.d.ts.map +1 -0
  203. package/dist/services/verify/types.d.ts +114 -115
  204. package/dist/services/verify/types.d.ts.map +1 -0
  205. package/dist/services/verify/verify-service.d.ts +51 -49
  206. package/dist/services/verify/verify-service.d.ts.map +1 -0
  207. package/dist/services/watch.d.ts +22 -21
  208. package/dist/services/watch.d.ts.map +1 -0
  209. package/dist/services/workspace-info.d.ts +40 -37
  210. package/dist/services/workspace-info.d.ts.map +1 -0
  211. package/dist/templates/app-config.template.d.ts +3 -6
  212. package/dist/templates/app-config.template.d.ts.map +1 -0
  213. package/dist/templates/data-view.template.d.ts +3 -6
  214. package/dist/templates/data-view.template.d.ts.map +1 -0
  215. package/dist/templates/event.template.d.ts +3 -7
  216. package/dist/templates/event.template.d.ts.map +1 -0
  217. package/dist/templates/experiment.template.d.ts +3 -6
  218. package/dist/templates/experiment.template.d.ts.map +1 -0
  219. package/dist/templates/handler.template.d.ts +4 -6
  220. package/dist/templates/handler.template.d.ts.map +1 -0
  221. package/dist/templates/index.d.ts +17 -20
  222. package/dist/templates/index.d.ts.map +1 -0
  223. package/dist/templates/integration.template.d.ts +3 -6
  224. package/dist/templates/integration.template.d.ts.map +1 -0
  225. package/dist/templates/knowledge.template.d.ts +3 -6
  226. package/dist/templates/knowledge.template.d.ts.map +1 -0
  227. package/dist/templates/migration.template.d.ts +3 -6
  228. package/dist/templates/migration.template.d.ts.map +1 -0
  229. package/dist/templates/operation.template.d.ts +3 -7
  230. package/dist/templates/operation.template.d.ts.map +1 -0
  231. package/dist/templates/operation.template.test.d.ts +2 -0
  232. package/dist/templates/operation.template.test.d.ts.map +1 -0
  233. package/dist/templates/presentation.template.d.ts +3 -7
  234. package/dist/templates/presentation.template.d.ts.map +1 -0
  235. package/dist/templates/telemetry.template.d.ts +3 -6
  236. package/dist/templates/telemetry.template.d.ts.map +1 -0
  237. package/dist/templates/workflow-runner.template.d.ts +7 -13
  238. package/dist/templates/workflow-runner.template.d.ts.map +1 -0
  239. package/dist/templates/workflow.template.d.ts +3 -6
  240. package/dist/templates/workflow.template.d.ts.map +1 -0
  241. package/dist/types/config.d.ts +18 -20
  242. package/dist/types/config.d.ts.map +1 -0
  243. package/dist/types/index.d.ts +5 -0
  244. package/dist/types/index.d.ts.map +1 -0
  245. package/dist/types.d.ts +338 -311
  246. package/dist/types.d.ts.map +1 -0
  247. package/package.json +16 -15
  248. package/dist/_virtual/rolldown_runtime.js +0 -22
  249. package/dist/adapters/ai.js +0 -82
  250. package/dist/adapters/factory.js +0 -36
  251. package/dist/adapters/fs.js +0 -118
  252. package/dist/adapters/git.js +0 -54
  253. package/dist/adapters/index.js +0 -7
  254. package/dist/adapters/logger.js +0 -80
  255. package/dist/adapters/watcher.js +0 -69
  256. package/dist/adapters/workspace.js +0 -190
  257. package/dist/ai/agents/claude-code-agent.js +0 -181
  258. package/dist/ai/agents/cursor-agent.js +0 -437
  259. package/dist/ai/agents/index.js +0 -5
  260. package/dist/ai/agents/openai-codex-agent.js +0 -166
  261. package/dist/ai/agents/orchestrator.js +0 -142
  262. package/dist/ai/agents/simple-agent.js +0 -91
  263. package/dist/ai/client.js +0 -162
  264. package/dist/ai/index.js +0 -27
  265. package/dist/ai/prompts/code-generation.js +0 -142
  266. package/dist/ai/prompts/index.js +0 -12
  267. package/dist/ai/prompts/spec-creation.js +0 -110
  268. package/dist/ai/providers.js +0 -40
  269. package/dist/formatters/index.js +0 -18
  270. package/dist/formatters/json.js +0 -71
  271. package/dist/formatters/sarif.js +0 -163
  272. package/dist/formatters/text.js +0 -208
  273. package/dist/libs/ai-providers/dist/factory.js +0 -154
  274. package/dist/libs/ai-providers/dist/index.js +0 -4
  275. package/dist/libs/ai-providers/dist/legacy.js +0 -72
  276. package/dist/libs/ai-providers/dist/models.js +0 -287
  277. package/dist/libs/ai-providers/dist/validation.js +0 -1
  278. package/dist/libs/contracts/dist/capabilities/openbanking.js +0 -88
  279. package/dist/libs/contracts/dist/client/index.js +0 -5
  280. package/dist/libs/contracts/dist/client/react/feature-render.js +0 -2
  281. package/dist/libs/contracts/dist/client/react/form-render.js +0 -4
  282. package/dist/libs/contracts/dist/client/react/index.js +0 -4
  283. package/dist/libs/contracts/dist/contract-registry/index.js +0 -1
  284. package/dist/libs/contracts/dist/contract-registry/schemas.js +0 -60
  285. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  286. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
  287. package/dist/libs/contracts/dist/docs/index.js +0 -29
  288. package/dist/libs/contracts/dist/docs/presentations.js +0 -71
  289. package/dist/libs/contracts/dist/docs/registry.js +0 -44
  290. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  291. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  292. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  293. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  294. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  295. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -80
  296. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -57
  297. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
  298. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -357
  299. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
  300. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
  301. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
  302. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
  303. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -79
  304. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -84
  305. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
  306. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
  307. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
  308. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -69
  309. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
  310. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -62
  311. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -155
  312. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
  313. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -101
  314. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
  315. package/dist/libs/contracts/dist/events.js +0 -8
  316. package/dist/libs/contracts/dist/experiments/evaluator.js +0 -1
  317. package/dist/libs/contracts/dist/index.js +0 -72
  318. package/dist/libs/contracts/dist/install.js +0 -2
  319. package/dist/libs/contracts/dist/integrations/contracts.js +0 -377
  320. package/dist/libs/contracts/dist/integrations/index.js +0 -18
  321. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -228
  322. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -159
  323. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
  324. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -210
  325. package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -242
  326. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -13
  327. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -52
  328. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -75
  329. package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -87
  330. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -66
  331. package/dist/libs/contracts/dist/integrations/providers/index.js +0 -11
  332. package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -68
  333. package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -68
  334. package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -116
  335. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -73
  336. package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -10
  337. package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -83
  338. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -61
  339. package/dist/libs/contracts/dist/jsonschema.js +0 -24
  340. package/dist/libs/contracts/dist/knowledge/contracts.js +0 -306
  341. package/dist/libs/contracts/dist/knowledge/index.js +0 -7
  342. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +0 -34
  343. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +0 -34
  344. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +0 -38
  345. package/dist/libs/contracts/dist/knowledge/spaces/index.js +0 -6
  346. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +0 -34
  347. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +0 -37
  348. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -34
  349. package/dist/libs/contracts/dist/llm/exporters.js +0 -352
  350. package/dist/libs/contracts/dist/llm/index.js +0 -2
  351. package/dist/libs/contracts/dist/llm/prompts.js +0 -211
  352. package/dist/libs/contracts/dist/onboarding-base.js +0 -196
  353. package/dist/libs/contracts/dist/openapi.js +0 -75
  354. package/dist/libs/contracts/dist/ownership.js +0 -21
  355. package/dist/libs/contracts/dist/presentations.js +0 -1
  356. package/dist/libs/contracts/dist/presentations.v2.js +0 -11
  357. package/dist/libs/contracts/dist/prompt.js +0 -1
  358. package/dist/libs/contracts/dist/promptRegistry.js +0 -1
  359. package/dist/libs/contracts/dist/regenerator/index.js +0 -2
  360. package/dist/libs/contracts/dist/regenerator/service.js +0 -92
  361. package/dist/libs/contracts/dist/regenerator/utils.js +0 -51
  362. package/dist/libs/contracts/dist/registry.js +0 -208
  363. package/dist/libs/contracts/dist/resources.js +0 -1
  364. package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
  365. package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -49
  366. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
  367. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -34
  368. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  369. package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
  370. package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
  371. package/dist/libs/contracts/dist/schema/dist/index.js +0 -6
  372. package/dist/libs/contracts/dist/server/graphql-pothos.js +0 -6
  373. package/dist/libs/contracts/dist/server/index.js +0 -8
  374. package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +0 -4
  375. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +0 -2
  376. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +0 -1
  377. package/dist/libs/contracts/dist/server/mcp/registerResources.js +0 -2
  378. package/dist/libs/contracts/dist/server/mcp/registerTools.js +0 -1
  379. package/dist/libs/contracts/dist/server/provider-mcp.js +0 -1
  380. package/dist/libs/contracts/dist/server/rest-elysia.js +0 -1
  381. package/dist/libs/contracts/dist/server/rest-express.js +0 -1
  382. package/dist/libs/contracts/dist/server/rest-generic.js +0 -1
  383. package/dist/libs/contracts/dist/server/rest-next-app.js +0 -1
  384. package/dist/libs/contracts/dist/server/rest-next-pages.js +0 -1
  385. package/dist/libs/contracts/dist/spec.js +0 -35
  386. package/dist/libs/contracts/dist/telemetry/index.js +0 -1
  387. package/dist/libs/contracts/dist/telemetry/tracker.js +0 -1
  388. package/dist/libs/contracts/dist/tests/index.js +0 -1
  389. package/dist/libs/contracts/dist/tests/runner.js +0 -150
  390. package/dist/libs/contracts/dist/workflow/index.js +0 -1
  391. package/dist/libs/contracts/dist/workflow/runner.js +0 -1
  392. package/dist/libs/contracts-transformers/dist/common/utils.js +0 -47
  393. package/dist/libs/contracts-transformers/dist/openapi/exporter.js +0 -1
  394. package/dist/libs/contracts-transformers/dist/openapi/importer.js +0 -255
  395. package/dist/libs/contracts-transformers/dist/openapi/index.js +0 -4
  396. package/dist/libs/contracts-transformers/dist/openapi/parser.js +0 -231
  397. package/dist/libs/contracts-transformers/dist/openapi/schema-converter.js +0 -201
  398. package/dist/modules/contractspec-workspace/dist/ai/code-generation.js +0 -137
  399. package/dist/modules/contractspec-workspace/dist/ai/spec-creation.js +0 -101
  400. package/dist/modules/contractspec-workspace/dist/analysis/deps/graph.js +0 -84
  401. package/dist/modules/contractspec-workspace/dist/analysis/deps/parse-imports.js +0 -30
  402. package/dist/modules/contractspec-workspace/dist/analysis/diff/semantic.js +0 -96
  403. package/dist/modules/contractspec-workspace/dist/analysis/feature-scan.js +0 -151
  404. package/dist/modules/contractspec-workspace/dist/analysis/spec-scan.js +0 -344
  405. package/dist/modules/contractspec-workspace/dist/analysis/validate/spec-structure.js +0 -122
  406. package/dist/modules/contractspec-workspace/dist/templates/app-config.js +0 -105
  407. package/dist/modules/contractspec-workspace/dist/templates/data-view.js +0 -68
  408. package/dist/modules/contractspec-workspace/dist/templates/event.js +0 -38
  409. package/dist/modules/contractspec-workspace/dist/templates/experiment.js +0 -87
  410. package/dist/modules/contractspec-workspace/dist/templates/handler.js +0 -95
  411. package/dist/modules/contractspec-workspace/dist/templates/integration-utils.js +0 -104
  412. package/dist/modules/contractspec-workspace/dist/templates/integration.js +0 -62
  413. package/dist/modules/contractspec-workspace/dist/templates/knowledge.js +0 -68
  414. package/dist/modules/contractspec-workspace/dist/templates/migration.js +0 -60
  415. package/dist/modules/contractspec-workspace/dist/templates/operation.js +0 -100
  416. package/dist/modules/contractspec-workspace/dist/templates/presentation.js +0 -78
  417. package/dist/modules/contractspec-workspace/dist/templates/telemetry.js +0 -89
  418. package/dist/modules/contractspec-workspace/dist/templates/utils.js +0 -38
  419. package/dist/modules/contractspec-workspace/dist/templates/workflow-runner.js +0 -48
  420. package/dist/modules/contractspec-workspace/dist/templates/workflow.js +0 -67
  421. package/dist/modules/contractspec-workspace/dist/types/generation-types.js +0 -20
  422. package/dist/services/agent-guide/adapters/claude-code.js +0 -144
  423. package/dist/services/agent-guide/adapters/cursor-cli.js +0 -135
  424. package/dist/services/agent-guide/adapters/generic-mcp.js +0 -159
  425. package/dist/services/agent-guide/adapters/index.js +0 -30
  426. package/dist/services/agent-guide/agent-guide-service.js +0 -148
  427. package/dist/services/agent-guide/index.js +0 -5
  428. package/dist/services/build.js +0 -140
  429. package/dist/services/ci-check/ci-check-service.js +0 -393
  430. package/dist/services/ci-check/index.js +0 -2
  431. package/dist/services/ci-check/types.js +0 -28
  432. package/dist/services/clean.js +0 -71
  433. package/dist/services/config.js +0 -76
  434. package/dist/services/deps.js +0 -62
  435. package/dist/services/diff.js +0 -33
  436. package/dist/services/doctor/checks/ai.js +0 -118
  437. package/dist/services/doctor/checks/cli.js +0 -146
  438. package/dist/services/doctor/checks/config.js +0 -170
  439. package/dist/services/doctor/checks/deps.js +0 -180
  440. package/dist/services/doctor/checks/index.js +0 -6
  441. package/dist/services/doctor/checks/mcp.js +0 -144
  442. package/dist/services/doctor/checks/workspace.js +0 -243
  443. package/dist/services/doctor/doctor-service.js +0 -115
  444. package/dist/services/doctor/index.js +0 -2
  445. package/dist/services/doctor/types.js +0 -26
  446. package/dist/services/implementation/discovery.js +0 -143
  447. package/dist/services/implementation/index.js +0 -2
  448. package/dist/services/implementation/resolver.js +0 -223
  449. package/dist/services/index.js +0 -53
  450. package/dist/services/integrity-diagram.js +0 -274
  451. package/dist/services/integrity.js +0 -272
  452. package/dist/services/list.js +0 -35
  453. package/dist/services/openapi/export-service.js +0 -51
  454. package/dist/services/openapi/import-service.js +0 -75
  455. package/dist/services/openapi/index.js +0 -4
  456. package/dist/services/openapi/sync-service.js +0 -121
  457. package/dist/services/openapi/validate-service.js +0 -130
  458. package/dist/services/regenerator.js +0 -23
  459. package/dist/services/registry.js +0 -73
  460. package/dist/services/setup/config-generators.js +0 -237
  461. package/dist/services/setup/file-merger.js +0 -60
  462. package/dist/services/setup/index.js +0 -4
  463. package/dist/services/setup/setup-service.js +0 -95
  464. package/dist/services/setup/targets/agents-md.js +0 -46
  465. package/dist/services/setup/targets/cli-config.js +0 -59
  466. package/dist/services/setup/targets/cursor-rules.js +0 -47
  467. package/dist/services/setup/targets/mcp-claude.js +0 -59
  468. package/dist/services/setup/targets/mcp-cursor.js +0 -58
  469. package/dist/services/setup/targets/vscode-settings.js +0 -62
  470. package/dist/services/setup/types.js +0 -26
  471. package/dist/services/sync.js +0 -62
  472. package/dist/services/test.js +0 -30
  473. package/dist/services/validate-implementation.js +0 -69
  474. package/dist/services/validate.js +0 -47
  475. package/dist/services/verification-cache/adapters/filesystem.js +0 -121
  476. package/dist/services/verification-cache/adapters/in-memory.js +0 -45
  477. package/dist/services/verification-cache/adapters/index.js +0 -3
  478. package/dist/services/verification-cache/adapters/workspace-state.js +0 -90
  479. package/dist/services/verification-cache/cache-service.js +0 -255
  480. package/dist/services/verification-cache/index.js +0 -6
  481. package/dist/services/verification-cache/types.js +0 -15
  482. package/dist/services/verify/ai-verifier.js +0 -403
  483. package/dist/services/verify/behavior-verifier.js +0 -185
  484. package/dist/services/verify/index.js +0 -4
  485. package/dist/services/verify/structure-verifier.js +0 -195
  486. package/dist/services/verify/verify-service.js +0 -203
  487. package/dist/services/watch.js +0 -31
  488. package/dist/services/workspace-info.js +0 -102
  489. package/dist/templates/app-config.template.js +0 -106
  490. package/dist/templates/data-view.template.js +0 -69
  491. package/dist/templates/event.template.js +0 -39
  492. package/dist/templates/experiment.template.js +0 -88
  493. package/dist/templates/handler.template.js +0 -99
  494. package/dist/templates/index.js +0 -36
  495. package/dist/templates/integration.template.js +0 -159
  496. package/dist/templates/knowledge.template.js +0 -74
  497. package/dist/templates/migration.template.js +0 -61
  498. package/dist/templates/operation.template.js +0 -104
  499. package/dist/templates/presentation.template.js +0 -79
  500. package/dist/templates/telemetry.template.js +0 -90
  501. package/dist/templates/workflow-runner.template.js +0 -49
  502. package/dist/templates/workflow.template.js +0 -68
@@ -1,223 +0,0 @@
1
- import { scanSpecSource } from "../../modules/contractspec-workspace/dist/analysis/spec-scan.js";
2
- import { discoverImplementationsForSpec } from "./discovery.js";
3
- import { createHash } from "crypto";
4
-
5
- //#region src/services/implementation/resolver.ts
6
- /**
7
- * Implementation resolver service.
8
- *
9
- * Resolves all implementations for a spec by merging:
10
- * 1. Explicit mappings from spec.implementations
11
- * 2. Auto-discovered references from workspace scanning
12
- * 3. Convention-based paths (naming conventions)
13
- */
14
- const DEFAULT_OPTIONS = {
15
- includeExplicit: true,
16
- includeDiscovered: true,
17
- includeConvention: true,
18
- computeHashes: true
19
- };
20
- /**
21
- * Convert string to kebab-case.
22
- */
23
- function toKebabCase(value) {
24
- return value.replace(/\./g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
25
- }
26
- /**
27
- * Compute SHA256 hash of content.
28
- */
29
- function computeHash(content) {
30
- return createHash("sha256").update(content).digest("hex");
31
- }
32
- /**
33
- * Get convention-based implementation paths for a spec.
34
- */
35
- function getConventionPaths(specType, specName, outputDir) {
36
- const kebab = toKebabCase(specName);
37
- const paths = [];
38
- if (specType === "operation") {
39
- paths.push({
40
- path: `${outputDir}/handlers/${kebab}.handler.ts`,
41
- type: "handler"
42
- });
43
- paths.push({
44
- path: `${outputDir}/handlers/${kebab}.handler.test.ts`,
45
- type: "test"
46
- });
47
- }
48
- if (specType === "presentation") {
49
- paths.push({
50
- path: `${outputDir}/components/${kebab}.tsx`,
51
- type: "component"
52
- });
53
- paths.push({
54
- path: `${outputDir}/components/${kebab}.test.tsx`,
55
- type: "test"
56
- });
57
- }
58
- if (specType === "form") {
59
- paths.push({
60
- path: `${outputDir}/forms/${kebab}.form.tsx`,
61
- type: "form"
62
- });
63
- paths.push({
64
- path: `${outputDir}/forms/${kebab}.form.test.tsx`,
65
- type: "test"
66
- });
67
- }
68
- if (specType === "event") {
69
- paths.push({
70
- path: `${outputDir}/handlers/${kebab}.handler.ts`,
71
- type: "handler"
72
- });
73
- paths.push({
74
- path: `${outputDir}/handlers/${kebab}.handler.test.ts`,
75
- type: "test"
76
- });
77
- }
78
- return paths;
79
- }
80
- /**
81
- * Determine overall implementation status.
82
- */
83
- function determineStatus(implementations) {
84
- if (implementations.length === 0) return "missing";
85
- const existingImpls = implementations.filter((i) => i.exists);
86
- implementations.filter((i) => i.type !== "test");
87
- if (existingImpls.filter((i) => i.type !== "test").length === 0) return "missing";
88
- if (implementations.every((i) => i.exists)) return "implemented";
89
- return "partial";
90
- }
91
- /**
92
- * Resolve all implementations for a spec file.
93
- */
94
- async function resolveImplementations(specFile, adapters, config, options = {}) {
95
- const opts = {
96
- ...DEFAULT_OPTIONS,
97
- ...options
98
- };
99
- const { fs } = adapters;
100
- if (!await fs.exists(specFile)) throw new Error(`Spec file not found: ${specFile}`);
101
- const specContent = await fs.readFile(specFile);
102
- const specHash = opts.computeHashes ? computeHash(specContent) : void 0;
103
- const scan = scanSpecSource(specContent, specFile);
104
- const specName = scan.name ?? fs.basename(specFile).replace(/\.[jt]s$/, "");
105
- const specVersion = scan.version ?? 1;
106
- const specType = scan.specType ?? "operation";
107
- const implementations = [];
108
- const seenPaths = /* @__PURE__ */ new Set();
109
- const addImpl = async (path, type, source, description) => {
110
- if (seenPaths.has(path)) return;
111
- seenPaths.add(path);
112
- const exists = await fs.exists(path);
113
- let contentHash;
114
- if (exists && opts.computeHashes) try {
115
- contentHash = computeHash(await fs.readFile(path));
116
- } catch {}
117
- implementations.push({
118
- path,
119
- type,
120
- source,
121
- exists,
122
- contentHash,
123
- description
124
- });
125
- };
126
- if (opts.includeExplicit) {
127
- const explicitImpls = parseExplicitImplementations(specContent);
128
- for (const impl of explicitImpls) await addImpl(impl.path, impl.type, "explicit", impl.description);
129
- }
130
- if (opts.includeDiscovered) {
131
- const discovered = await discoverImplementationsForSpec(specName, adapters, opts);
132
- const specNameVariants = getSpecNameVariants(specName);
133
- for (const variant of specNameVariants) {
134
- const variantDiscovered = await discoverImplementationsForSpec(variant, adapters, opts);
135
- discovered.push(...variantDiscovered);
136
- }
137
- for (const ref of discovered) {
138
- if (ref.filePath === specFile) continue;
139
- await addImpl(ref.filePath, ref.inferredType, "discovered");
140
- }
141
- }
142
- if (opts.includeConvention) {
143
- const conventionPaths = getConventionPaths(specType, specName, opts.outputDir ?? config.outputDir ?? "./src");
144
- for (const { path, type } of conventionPaths) await addImpl(path, type, "convention");
145
- }
146
- return {
147
- specName,
148
- specVersion,
149
- specPath: specFile,
150
- specType,
151
- implementations,
152
- status: determineStatus(implementations),
153
- specHash
154
- };
155
- }
156
- /**
157
- * Parse explicit implementations from spec source code.
158
- * Looks for: implementations: [{ path: '...', type: '...' }]
159
- */
160
- function parseExplicitImplementations(code) {
161
- const implementations = [];
162
- const implMatch = code.match(/implementations\s*:\s*\[([\s\S]*?)\]/);
163
- if (!implMatch) return implementations;
164
- const implBlock = implMatch[1];
165
- if (!implBlock) return implementations;
166
- const objRegex = /\{\s*path\s*:\s*['"`]([^'"`]+)['"`]\s*,\s*type\s*:\s*['"`]([^'"`]+)['"`](?:\s*,\s*description\s*:\s*['"`]([^'"`]+)['"`])?\s*\}/g;
167
- let match;
168
- while ((match = objRegex.exec(implBlock)) !== null) implementations.push({
169
- path: match[1],
170
- type: match[2],
171
- description: match[3]
172
- });
173
- return implementations;
174
- }
175
- /**
176
- * Get common variants of a spec name for discovery.
177
- */
178
- function getSpecNameVariants(specName) {
179
- const variants = [];
180
- const base = specName.replace(/Spec$/, "").replace(/Contract$/, "").replace(/Command$/, "").replace(/Query$/, "");
181
- if (base !== specName) {
182
- variants.push(base);
183
- variants.push(`${base}Spec`);
184
- variants.push(`${base}Contract`);
185
- }
186
- const parts = specName.split(".");
187
- if (parts.length > 1) {
188
- const pascalName = parts.map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join("");
189
- variants.push(pascalName);
190
- }
191
- return variants;
192
- }
193
- /**
194
- * Resolve implementations for multiple spec files.
195
- */
196
- async function resolveAllImplementations(specFiles, adapters, config, options = {}) {
197
- const results = [];
198
- for (const specFile of specFiles) try {
199
- const result = await resolveImplementations(specFile, adapters, config, options);
200
- results.push(result);
201
- } catch (error) {
202
- console.error(`Failed to resolve implementations for ${specFile}:`, error);
203
- }
204
- return results;
205
- }
206
- /**
207
- * Get implementation summary statistics.
208
- */
209
- function getImplementationSummary(results) {
210
- const implemented = results.filter((r) => r.status === "implemented").length;
211
- const partial = results.filter((r) => r.status === "partial").length;
212
- const missing = results.filter((r) => r.status === "missing").length;
213
- return {
214
- total: results.length,
215
- implemented,
216
- partial,
217
- missing,
218
- coverage: results.length > 0 ? Math.round(implemented / results.length * 100) : 100
219
- };
220
- }
221
-
222
- //#endregion
223
- export { getImplementationSummary, resolveAllImplementations, resolveImplementations };
@@ -1,53 +0,0 @@
1
- import { detectPackageManager, findPackageRoot, findWorkspaceRoot, getWorkspaceInfo } from "../adapters/workspace.js";
2
- import { validateSpec, validateSpecs } from "./validate.js";
3
- import { validateImplementationFiles } from "./validate-implementation.js";
4
- import { compareSpecs } from "./diff.js";
5
- import { analyzeDeps, exportGraphAsDot, getContractNode, getGraphStats } from "./deps.js";
6
- import { groupSpecsByType, listSpecs } from "./list.js";
7
- import { getApiKey, loadWorkspaceConfig, mergeWorkspaceConfig } from "./config.js";
8
- import { buildSpec } from "./build.js";
9
- import { importFromOpenApiService } from "./openapi/import-service.js";
10
- import { syncWithOpenApiService } from "./openapi/sync-service.js";
11
- import { validateAgainstOpenApiService } from "./openapi/validate-service.js";
12
- import { exportOpenApi } from "./openapi/export-service.js";
13
- import "./openapi/index.js";
14
- import { RegistryClient, addToRegistry, listFromRegistry, resolveRegistryUrl, searchRegistry } from "./registry.js";
15
- import { syncSpecs } from "./sync.js";
16
- import { watchSpecs } from "./watch.js";
17
- import { cleanArtifacts } from "./clean.js";
18
- import { runTests } from "./test.js";
19
- import { createRegeneratorService } from "./regenerator.js";
20
- import { findAllConfigFiles, formatWorkspaceInfo, getExtendedWorkspaceInfo, mergeMonorepoConfigs } from "./workspace-info.js";
21
- import { analyzeIntegrity, filterIssuesBySeverity, filterIssuesByType, getAllSpecs } from "./integrity.js";
22
- import { generateMermaidDiagram } from "./integrity-diagram.js";
23
- import { ALL_SETUP_TARGETS, SETUP_TARGET_LABELS } from "./setup/types.js";
24
- import { generateAgentsMd, generateClaudeMcpConfig, generateContractsrcConfig, generateCursorMcpConfig, generateCursorRules, generateVscodeSettings, getClaudeDesktopConfigPath } from "./setup/config-generators.js";
25
- import { deepMergeOverwrite, deepMergePreserve, formatJson, safeParseJson } from "./setup/file-merger.js";
26
- import { runSetup } from "./setup/setup-service.js";
27
- import "./setup/index.js";
28
- import { ALL_CHECK_CATEGORIES, CHECK_CATEGORY_LABELS } from "./doctor/types.js";
29
- import { formatCheckResult, formatDoctorSummary, runDoctor } from "./doctor/doctor-service.js";
30
- import "./doctor/index.js";
31
- import { ALL_CI_CHECK_CATEGORIES, CI_CHECK_CATEGORY_LABELS } from "./ci-check/types.js";
32
- import { discoverAllImplementations, discoverImplementationsForSpec, extractSpecReferences, inferImplementationType } from "./implementation/discovery.js";
33
- import { getImplementationSummary, resolveAllImplementations, resolveImplementations } from "./implementation/resolver.js";
34
- import { DEFAULT_CACHE_CONFIG } from "./verification-cache/types.js";
35
- import { VerificationCacheService, cacheKeyToString, computeContentHash, createVerificationCacheService, stringToCacheKey } from "./verification-cache/cache-service.js";
36
- import { InMemoryCacheStorage, createInMemoryCacheStorage } from "./verification-cache/adapters/in-memory.js";
37
- import { FileSystemCacheStorage, createFileSystemCacheStorage } from "./verification-cache/adapters/filesystem.js";
38
- import { WorkspaceStateCacheStorage, createWorkspaceStateCacheStorage } from "./verification-cache/adapters/workspace-state.js";
39
- import "./verification-cache/index.js";
40
- import { runCIChecks } from "./ci-check/ci-check-service.js";
41
- import "./ci-check/index.js";
42
- import { ClaudeCodeAdapter, claudeCodeAdapter } from "./agent-guide/adapters/claude-code.js";
43
- import { CursorCLIAdapter, cursorCLIAdapter } from "./agent-guide/adapters/cursor-cli.js";
44
- import { GenericMCPAdapter, genericMCPAdapter } from "./agent-guide/adapters/generic-mcp.js";
45
- import { agentAdapters, getAgentAdapter, listAgentTypes } from "./agent-guide/adapters/index.js";
46
- import { AgentGuideService, agentGuideService, createAgentGuideService } from "./agent-guide/agent-guide-service.js";
47
- import "./agent-guide/index.js";
48
- import { verifyStructure } from "./verify/structure-verifier.js";
49
- import { verifyBehavior } from "./verify/behavior-verifier.js";
50
- import { createQuickAIReview, verifySemanticFields, verifyWithAI, verifyWithAIEnhanced } from "./verify/ai-verifier.js";
51
- import { VerifyService, createVerifyService, verifyService } from "./verify/verify-service.js";
52
- import "./verify/index.js";
53
- import "./implementation/index.js";
@@ -1,274 +0,0 @@
1
- //#region src/services/integrity-diagram.ts
2
- /**
3
- * Generate a Mermaid diagram from integrity analysis results.
4
- */
5
- function generateMermaidDiagram(result, type = "feature-map", options = {}) {
6
- switch (type) {
7
- case "feature-map": return generateFeatureMapDiagram(result, options);
8
- case "orphans": return generateOrphansDiagram(result, options);
9
- case "dependencies": return generateDependenciesDiagram(result, options);
10
- case "full": return generateFullDiagram(result, options);
11
- default: return generateFeatureMapDiagram(result, options);
12
- }
13
- }
14
- /**
15
- * Generate a feature map diagram showing features and their linked specs.
16
- */
17
- function generateFeatureMapDiagram(result, options) {
18
- const { direction = "LR", showVersions = true, maxNodes = 50 } = options;
19
- const lines = [`flowchart ${direction}`];
20
- let features = result.features;
21
- if (options.featureKeys && options.featureKeys.length > 0) features = features.filter((f) => options.featureKeys.includes(f.key));
22
- let nodeCount = 0;
23
- if (features.length > 0) {
24
- lines.push(" subgraph features [Features]");
25
- for (const feature of features) {
26
- if (nodeCount >= maxNodes) break;
27
- const nodeId = sanitizeId(`F_${feature.key}`);
28
- const label = feature.title ?? feature.key;
29
- lines.push(` ${nodeId}["${escapeLabel(label)}"]`);
30
- nodeCount++;
31
- }
32
- lines.push(" end");
33
- }
34
- const ops = getReferencedSpecs(features, "operations", result.inventory);
35
- if (ops.length > 0 && nodeCount < maxNodes) {
36
- lines.push(" subgraph ops [Operations]");
37
- for (const op of ops) {
38
- if (nodeCount >= maxNodes) break;
39
- const nodeId = sanitizeId(`O_${op.name}_v${op.version}`);
40
- const label = showVersions ? `${op.name}.v${op.version}` : op.name;
41
- lines.push(` ${nodeId}["${escapeLabel(label)}"]`);
42
- nodeCount++;
43
- }
44
- lines.push(" end");
45
- }
46
- const events = getReferencedSpecs(features, "events", result.inventory);
47
- if (events.length > 0 && nodeCount < maxNodes) {
48
- lines.push(" subgraph events [Events]");
49
- for (const event of events) {
50
- if (nodeCount >= maxNodes) break;
51
- const nodeId = sanitizeId(`E_${event.name}_v${event.version}`);
52
- const label = showVersions ? `${event.name}.v${event.version}` : event.name;
53
- lines.push(` ${nodeId}["${escapeLabel(label)}"]`);
54
- nodeCount++;
55
- }
56
- lines.push(" end");
57
- }
58
- const presentations = getReferencedSpecs(features, "presentations", result.inventory);
59
- if (presentations.length > 0 && nodeCount < maxNodes) {
60
- lines.push(" subgraph presentations [Presentations]");
61
- for (const pres of presentations) {
62
- if (nodeCount >= maxNodes) break;
63
- const nodeId = sanitizeId(`P_${pres.name}_v${pres.version}`);
64
- const label = showVersions ? `${pres.name}.v${pres.version}` : pres.name;
65
- lines.push(` ${nodeId}["${escapeLabel(label)}"]`);
66
- nodeCount++;
67
- }
68
- lines.push(" end");
69
- }
70
- for (const feature of features) {
71
- const featureId = sanitizeId(`F_${feature.key}`);
72
- for (const op of feature.operations) {
73
- const opId = sanitizeId(`O_${op.name}_v${op.version}`);
74
- lines.push(` ${featureId} --> ${opId}`);
75
- }
76
- for (const event of feature.events) {
77
- const eventId = sanitizeId(`E_${event.name}_v${event.version}`);
78
- lines.push(` ${featureId} -.-> ${eventId}`);
79
- }
80
- for (const pres of feature.presentations) {
81
- const presId = sanitizeId(`P_${pres.name}_v${pres.version}`);
82
- lines.push(` ${featureId} --> ${presId}`);
83
- }
84
- }
85
- return lines.join("\n");
86
- }
87
- /**
88
- * Generate a diagram highlighting orphaned specs.
89
- */
90
- function generateOrphansDiagram(result, options) {
91
- const { direction = "TB", showVersions = true, maxNodes = 50 } = options;
92
- const lines = [`flowchart ${direction}`];
93
- const linkedOps = /* @__PURE__ */ new Set();
94
- const linkedEvents = /* @__PURE__ */ new Set();
95
- const linkedPres = /* @__PURE__ */ new Set();
96
- for (const feature of result.features) {
97
- for (const op of feature.operations) linkedOps.add(`${op.name}.v${op.version}`);
98
- for (const event of feature.events) linkedEvents.add(`${event.name}.v${event.version}`);
99
- for (const pres of feature.presentations) linkedPres.add(`${pres.name}.v${pres.version}`);
100
- }
101
- let nodeCount = 0;
102
- if (result.features.length > 0) {
103
- lines.push(" subgraph features [Features]");
104
- for (const feature of result.features) {
105
- if (nodeCount >= maxNodes) break;
106
- const nodeId = sanitizeId(`F_${feature.key}`);
107
- lines.push(` ${nodeId}["${escapeLabel(feature.title ?? feature.key)}"]`);
108
- nodeCount++;
109
- }
110
- lines.push(" end");
111
- }
112
- if (result.orphanedSpecs.length > 0) {
113
- lines.push(" subgraph orphaned [Orphaned Specs]");
114
- for (const spec of result.orphanedSpecs) {
115
- if (nodeCount >= maxNodes) break;
116
- const nodeId = sanitizeId(`orphan_${spec.type}_${spec.name}_v${spec.version}`);
117
- const label = showVersions ? `${spec.name}.v${spec.version}` : spec.name;
118
- lines.push(` ${nodeId}["${escapeLabel(label)}"]`);
119
- nodeCount++;
120
- }
121
- lines.push(" end");
122
- }
123
- const allLinked = [];
124
- for (const key of linkedOps) {
125
- const [name, version] = parseSpecKey(key);
126
- if (name && version) allLinked.push({
127
- type: "operation",
128
- name,
129
- version
130
- });
131
- }
132
- for (const key of linkedEvents) {
133
- const [name, version] = parseSpecKey(key);
134
- if (name && version) allLinked.push({
135
- type: "event",
136
- name,
137
- version
138
- });
139
- }
140
- for (const key of linkedPres) {
141
- const [name, version] = parseSpecKey(key);
142
- if (name && version) allLinked.push({
143
- type: "presentation",
144
- name,
145
- version
146
- });
147
- }
148
- if (allLinked.length > 0 && nodeCount < maxNodes) {
149
- lines.push(" subgraph linked [Linked Specs]");
150
- for (const spec of allLinked) {
151
- if (nodeCount >= maxNodes) break;
152
- const nodeId = sanitizeId(`${spec.type}_${spec.name}_v${spec.version}`);
153
- const label = showVersions ? `${spec.name}.v${spec.version}` : spec.name;
154
- lines.push(` ${nodeId}["${escapeLabel(label)}"]`);
155
- nodeCount++;
156
- }
157
- lines.push(" end");
158
- }
159
- for (const feature of result.features) {
160
- const featureId = sanitizeId(`F_${feature.key}`);
161
- for (const op of feature.operations) {
162
- const opId = sanitizeId(`operation_${op.name}_v${op.version}`);
163
- lines.push(` ${featureId} --> ${opId}`);
164
- }
165
- for (const event of feature.events) {
166
- const eventId = sanitizeId(`event_${event.name}_v${event.version}`);
167
- lines.push(` ${featureId} -.-> ${eventId}`);
168
- }
169
- for (const pres of feature.presentations) {
170
- const presId = sanitizeId(`presentation_${pres.name}_v${pres.version}`);
171
- lines.push(` ${featureId} --> ${presId}`);
172
- }
173
- }
174
- return lines.join("\n");
175
- }
176
- /**
177
- * Generate a dependency diagram showing spec relationships.
178
- */
179
- function generateDependenciesDiagram(result, options) {
180
- const { direction = "TB", showVersions = true, maxNodes = 50 } = options;
181
- const lines = [`flowchart ${direction}`];
182
- let nodeCount = 0;
183
- for (const feature of result.features) {
184
- if (nodeCount >= maxNodes) break;
185
- const featureId = sanitizeId(`F_${feature.key}`);
186
- lines.push(` ${featureId}["${escapeLabel(feature.title ?? feature.key)}"]`);
187
- nodeCount++;
188
- for (const op of feature.operations) {
189
- if (nodeCount >= maxNodes) break;
190
- const opId = sanitizeId(`O_${op.name}_v${op.version}`);
191
- const label = showVersions ? `${op.name}.v${op.version}` : op.name;
192
- lines.push(` ${opId}["${escapeLabel(label)}"]`);
193
- lines.push(` ${featureId} --> ${opId}`);
194
- nodeCount++;
195
- }
196
- for (const event of feature.events) {
197
- if (nodeCount >= maxNodes) break;
198
- const eventId = sanitizeId(`E_${event.name}_v${event.version}`);
199
- const label = showVersions ? `${event.name}.v${event.version}` : event.name;
200
- lines.push(` ${eventId}["${escapeLabel(label)}"]`);
201
- lines.push(` ${featureId} -.-> ${eventId}`);
202
- nodeCount++;
203
- }
204
- for (const pres of feature.presentations) {
205
- if (nodeCount >= maxNodes) break;
206
- const presId = sanitizeId(`P_${pres.name}_v${pres.version}`);
207
- const label = showVersions ? `${pres.name}.v${pres.version}` : pres.name;
208
- lines.push(` ${presId}["${escapeLabel(label)}"]`);
209
- lines.push(` ${featureId} --> ${presId}`);
210
- nodeCount++;
211
- }
212
- for (const link of feature.opToPresentationLinks) {
213
- const opId = sanitizeId(`O_${link.op.name}_v${link.op.version}`);
214
- const presId = sanitizeId(`P_${link.pres.name}_v${link.pres.version}`);
215
- lines.push(` ${opId} --> ${presId}`);
216
- }
217
- }
218
- return lines.join("\n");
219
- }
220
- /**
221
- * Generate a full diagram with all relationships.
222
- */
223
- function generateFullDiagram(result, options) {
224
- const featureMap = generateFeatureMapDiagram(result, options);
225
- if (result.orphanedSpecs.length === 0) return featureMap;
226
- const lines = featureMap.split("\n");
227
- lines.push(" subgraph orphaned [Orphaned Specs]");
228
- for (const spec of result.orphanedSpecs.slice(0, 20)) {
229
- const nodeId = sanitizeId(`orphan_${spec.type}_${spec.name}_v${spec.version}`);
230
- const label = `${spec.name}.v${spec.version}`;
231
- lines.push(` ${nodeId}["${escapeLabel(label)}"]:::orphan`);
232
- }
233
- lines.push(" end");
234
- lines.push(" classDef orphan stroke-dasharray: 5 5");
235
- return lines.join("\n");
236
- }
237
- /**
238
- * Get referenced specs from features.
239
- */
240
- function getReferencedSpecs(features, field, _inventory) {
241
- const seen = /* @__PURE__ */ new Set();
242
- const result = [];
243
- for (const feature of features) for (const ref of feature[field]) {
244
- const key = `${ref.name}.v${ref.version}`;
245
- if (!seen.has(key)) {
246
- seen.add(key);
247
- result.push(ref);
248
- }
249
- }
250
- return result;
251
- }
252
- /**
253
- * Parse a spec key like "name.v1" into [name, version].
254
- */
255
- function parseSpecKey(key) {
256
- const match = key.match(/^(.+)\.v(\d+)$/);
257
- if (!match) return [void 0, void 0];
258
- return [match[1], Number(match[2])];
259
- }
260
- /**
261
- * Sanitize an ID for use in Mermaid.
262
- */
263
- function sanitizeId(id) {
264
- return id.replace(/[^a-zA-Z0-9_]/g, "_");
265
- }
266
- /**
267
- * Escape a label for use in Mermaid.
268
- */
269
- function escapeLabel(label) {
270
- return label.replace(/"/g, "'").replace(/\[/g, "(").replace(/\]/g, ")").replace(/\{/g, "(").replace(/\}/g, ")");
271
- }
272
-
273
- //#endregion
274
- export { generateMermaidDiagram };