@lssm/bundle.contractspec-workspace 0.0.0-canary-20251217083314 → 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,137 +0,0 @@
1
- //#region ../../modules/contractspec-workspace/dist/ai/code-generation.js
2
- /**
3
- * AI prompts for code generation.
4
- * Extracted from cli-contracts/src/ai/prompts/code-generation.ts
5
- */
6
- /**
7
- * Build prompt for generating handler implementation.
8
- */
9
- function buildHandlerPrompt(specCode) {
10
- return `You are a senior TypeScript developer implementing a handler for a contract specification.
11
-
12
- Here is the contract spec:
13
-
14
- \`\`\`typescript
15
- ${specCode}
16
- \`\`\`
17
-
18
- Generate a complete handler implementation that:
19
-
20
- 1. **Matches the spec signature**: Input/output types from the spec
21
- 2. **Handles errors**: Implement error cases defined in spec.io.errors
22
- 3. **Emits events**: Use the events declared in spec.sideEffects.emits
23
- 4. **Validates input**: Use zod validation from the schema
24
- 5. **Follows best practices**: Clean, type-safe TypeScript
25
- 6. **Includes comments**: Explain business logic
26
-
27
- The handler should be production-ready with proper error handling, logging points, and clear structure.
28
-
29
- Return only the TypeScript code for the handler function.`;
30
- }
31
- /**
32
- * Build prompt for generating React component from presentation spec.
33
- */
34
- function buildComponentPrompt(specCode) {
35
- return `You are a senior React developer creating a component for a presentation specification.
36
-
37
- Here is the presentation spec:
38
-
39
- \`\`\`typescript
40
- ${specCode}
41
- \`\`\`
42
-
43
- Generate a complete React component that:
44
-
45
- 1. **Props interface**: Typed props from the spec
46
- 2. **Accessibility**: Proper ARIA labels, roles, keyboard navigation
47
- 3. **Mobile-first**: Optimized for small screens and touch
48
- 4. **Clean UI**: Simple, intuitive interface
49
- 5. **Type-safe**: Full TypeScript with no 'any' types
50
- 6. **Best practices**: React hooks, proper state management
51
-
52
- The component should follow Atomic Design principles and be reusable.
53
-
54
- Return only the TypeScript/TSX code for the component.`;
55
- }
56
- /**
57
- * Build prompt for generating form component.
58
- */
59
- function buildFormPrompt(specCode) {
60
- return `You are a senior React developer creating a form component from a form specification.
61
-
62
- Here is the form spec:
63
-
64
- \`\`\`typescript
65
- ${specCode}
66
- \`\`\`
67
-
68
- Generate a complete form component using react-hook-form that:
69
-
70
- 1. **Form validation**: Use zod schema for validation
71
- 2. **Field types**: Proper inputs for each field type
72
- 3. **Conditional logic**: Support visibleWhen, enabledWhen, requiredWhen predicates
73
- 4. **Error handling**: Clear, user-friendly error messages
74
- 5. **Accessibility**: Labels, hints, ARIA attributes
75
- 6. **Mobile-optimized**: Touch-friendly, appropriate input types
76
- 7. **Type-safe**: Full TypeScript
77
-
78
- The form should provide excellent UX with real-time validation and helpful feedback.
79
-
80
- Return only the TypeScript/TSX code for the form component.`;
81
- }
82
- /**
83
- * Build prompt for generating tests.
84
- */
85
- function buildTestPrompt(specCode, implementationCode, testType) {
86
- return `You are a senior developer writing comprehensive tests.
87
-
88
- Spec:
89
- \`\`\`typescript
90
- ${specCode}
91
- \`\`\`
92
-
93
- Implementation:
94
- \`\`\`typescript
95
- ${implementationCode}
96
- \`\`\`
97
-
98
- Generate complete test suite using Vitest that:
99
- ${testType === "handler" ? `
100
- - Test all acceptance scenarios from the spec
101
- - Test error cases defined in spec.io.errors
102
- - Verify events are emitted correctly
103
- - Test input validation
104
- - Test happy path and edge cases` : `
105
- - Test rendering with various props
106
- - Test user interactions
107
- - Test accessibility (a11y)
108
- - Test responsive behavior
109
- - Test error states`}
110
-
111
- Use clear test descriptions and follow AAA pattern (Arrange, Act, Assert).
112
-
113
- Return only the TypeScript test code.`;
114
- }
115
- /**
116
- * System prompt for code generation.
117
- */
118
- function getCodeGenSystemPrompt() {
119
- return `You are an expert TypeScript developer with deep knowledge of:
120
- - Type-safe API design
121
- - React and modern hooks
122
- - Test-driven development
123
- - Accessibility best practices
124
- - Clean code principles
125
-
126
- Generate production-ready code that is:
127
- - Fully typed (no 'any' or type assertions unless absolutely necessary)
128
- - Well-documented with TSDoc comments
129
- - Following project conventions
130
- - Defensive and error-safe
131
- - Easy to maintain and extend
132
-
133
- Always prioritize code quality, safety, and user experience.`;
134
- }
135
-
136
- //#endregion
137
- export { buildComponentPrompt, buildFormPrompt, buildHandlerPrompt, buildTestPrompt, getCodeGenSystemPrompt };
@@ -1,101 +0,0 @@
1
- //#region ../../modules/contractspec-workspace/dist/ai/spec-creation.js
2
- /**
3
- * Build prompt for creating operation spec from description.
4
- */
5
- function buildOperationSpecPrompt(description, kind) {
6
- return `You are a senior software architect creating a contract specification for an operation.
7
-
8
- The operation is a ${kind} (${kind === "command" ? "changes state, has side effects" : "read-only, idempotent"}).
9
-
10
- User description: ${description}
11
-
12
- Create a complete contract specification following these guidelines:
13
-
14
- 1. **Name**: Use dot notation like "domain.operationName" (e.g., "user.signup", "payment.charge")
15
- 2. **Version**: Start at 1
16
- 3. **Description**: Clear, concise summary (1-2 sentences)
17
- 4. **Goal**: Business purpose - why this operation exists
18
- 5. **Context**: Background, constraints, scope (what it does and doesn't do)
19
- 6. **Input/Output**: Describe the shape (we'll create schemas separately)
20
- 7. **Auth**: Who can call this - anonymous, user, or admin
21
- 8. **Feature Flags**: Any flags that gate this operation
22
- 9. **Side Effects**: What events might be emitted, analytics to track
23
-
24
- Respond with a structured spec.`;
25
- }
26
- /**
27
- * Build prompt for creating event spec from description.
28
- */
29
- function buildEventSpecPrompt(description) {
30
- return `You are a senior software architect creating an event specification.
31
-
32
- User description: ${description}
33
-
34
- Create a complete event specification following these guidelines:
35
-
36
- 1. **Name**: Use dot notation like "domain.event_name" (e.g., "user.signup_completed", "payment.charged")
37
- 2. **Version**: Start at 1
38
- 3. **Description**: Clear description of when this event is emitted
39
- 4. **Payload**: Describe what data the event carries
40
- 5. **PII Fields**: List any personally identifiable information fields (e.g., ["email", "name"])
41
-
42
- Events represent things that have already happened and should use past tense.
43
-
44
- Respond with a structured spec.`;
45
- }
46
- /**
47
- * Build prompt for creating presentation spec from description.
48
- */
49
- function buildPresentationSpecPrompt(description, kind) {
50
- return `You are a senior software architect creating a presentation specification.
51
-
52
- This is a ${kind} presentation - ${{
53
- web_component: "a React component with props schema",
54
- markdown: "markdown/MDX documentation or guide",
55
- data: "structured data export (JSON/XML)"
56
- }[kind]}.
57
-
58
- User description: ${description}
59
-
60
- Create a complete presentation specification following these guidelines:
61
-
62
- 1. **Name**: Use dot notation like "domain.presentation_name" (e.g., "user.profile_card", "docs.api_guide")
63
- 2. **Version**: Start at 1
64
- 3. **Description**: What this presentation shows/provides
65
- 4. **Kind-specific details**:
66
- ${kind === "web_component" ? "- Component key (symbolic, resolved by host app)\n - Props structure\n - Analytics events to track" : kind === "markdown" ? "- Content or resource URI\n - Target audience" : "- MIME type (e.g., application/json)\n - Data structure description"}
67
-
68
- Respond with a structured spec.`;
69
- }
70
- /**
71
- * Build system prompt for all spec generation.
72
- */
73
- function getSystemPrompt() {
74
- return `You are an expert software architect specializing in API design and contract-driven development.
75
-
76
- You create clear, well-documented specifications that serve as the single source of truth for operations, events, and presentations.
77
-
78
- Your specs are:
79
- - Precise and unambiguous
80
- - Following TypeScript conventions
81
- - Business-oriented (capturing the "why" not just "what")
82
- - Designed for both humans and AI agents to understand
83
-
84
- Always use proper dot notation for names and ensure all metadata is meaningful and accurate.`;
85
- }
86
- /**
87
- * Create example-based prompt for better results.
88
- */
89
- function addExampleContext(basePrompt, examples) {
90
- if (examples.length === 0) return basePrompt;
91
- return `${basePrompt}
92
-
93
- Here are some good examples for reference:
94
-
95
- ${examples.join("\n\n")}
96
-
97
- Follow this structure and quality level.`;
98
- }
99
-
100
- //#endregion
101
- export { addExampleContext, buildEventSpecPrompt, buildOperationSpecPrompt, buildPresentationSpecPrompt, getSystemPrompt };
@@ -1,84 +0,0 @@
1
- //#region ../../modules/contractspec-workspace/dist/analysis/deps/graph.js
2
- /**
3
- * Build reverse edges (dependents) for all nodes in the graph.
4
- */
5
- function buildReverseEdges(graph) {
6
- for (const node of graph.values()) node.dependents = [];
7
- for (const [name, node] of graph) for (const dep of node.dependencies) {
8
- const depNode = graph.get(dep);
9
- if (depNode) depNode.dependents.push(name);
10
- }
11
- for (const node of graph.values()) node.dependents.sort((a, b) => a.localeCompare(b));
12
- }
13
- /**
14
- * Detect circular dependencies in the graph.
15
- */
16
- function detectCycles(graph) {
17
- const visited = /* @__PURE__ */ new Set();
18
- const stack = /* @__PURE__ */ new Set();
19
- const cycles = [];
20
- function dfs(name, path) {
21
- if (stack.has(name)) {
22
- const start = path.indexOf(name);
23
- if (start >= 0) cycles.push([...path.slice(start), name]);
24
- return;
25
- }
26
- if (visited.has(name)) return;
27
- visited.add(name);
28
- stack.add(name);
29
- const node = graph.get(name);
30
- if (node) for (const dep of node.dependencies) dfs(dep, [...path, name]);
31
- stack.delete(name);
32
- }
33
- for (const name of graph.keys()) if (!visited.has(name)) dfs(name, []);
34
- return cycles;
35
- }
36
- /**
37
- * Find missing dependencies (referenced but not defined).
38
- */
39
- function findMissingDependencies(graph) {
40
- const missing = [];
41
- for (const [name, node] of graph) {
42
- const absent = node.dependencies.filter((dep) => !graph.has(dep));
43
- if (absent.length > 0) missing.push({
44
- contract: name,
45
- missing: absent
46
- });
47
- }
48
- return missing;
49
- }
50
- /**
51
- * Generate DOT format output for visualization.
52
- */
53
- function toDot(graph) {
54
- const lines = [];
55
- lines.push("digraph ContractDependencies {");
56
- lines.push(" rankdir=LR;");
57
- lines.push(" node [shape=box];");
58
- for (const [name, node] of graph) {
59
- for (const dep of node.dependencies) lines.push(` "${name}" -> "${dep}";`);
60
- if (node.dependencies.length === 0) lines.push(` "${name}";`);
61
- }
62
- lines.push("}");
63
- return lines.join("\n");
64
- }
65
- /**
66
- * Create an empty contract graph.
67
- */
68
- function createContractGraph() {
69
- return /* @__PURE__ */ new Map();
70
- }
71
- /**
72
- * Add a node to the contract graph.
73
- */
74
- function addContractNode(graph, name, file, dependencies) {
75
- graph.set(name, {
76
- name,
77
- file,
78
- dependencies,
79
- dependents: []
80
- });
81
- }
82
-
83
- //#endregion
84
- export { addContractNode, buildReverseEdges, createContractGraph, detectCycles, findMissingDependencies, toDot };
@@ -1,30 +0,0 @@
1
- //#region ../../modules/contractspec-workspace/dist/analysis/deps/parse-imports.js
2
- /**
3
- * Import parsing utilities for dependency analysis.
4
- * Extracted from cli-contracts/src/commands/deps/parse-imports.ts
5
- */
6
- /**
7
- * Parse spec imports from source code.
8
- * Returns the names of imported specs based on file naming conventions.
9
- *
10
- * @param sourceCode - The source code to parse
11
- * @param fromFilePath - The path of the file being parsed (for relative resolution)
12
- * @returns Array of imported spec names
13
- */
14
- function parseImportedSpecNames(sourceCode, _fromFilePath) {
15
- const imports = [];
16
- const importRegex = /import\s+.*?\s+from\s+['"]([^'"]+\.(?:contracts|event|presentation|workflow|data-view|migration|telemetry|experiment|app-config|integration|knowledge)(?:\.[jt]s)?)['"]/g;
17
- let match;
18
- while ((match = importRegex.exec(sourceCode)) !== null) {
19
- const importPath = match[1];
20
- if (!importPath) continue;
21
- if (!importPath.startsWith(".") && !importPath.startsWith("/")) continue;
22
- const pathParts = importPath.split("/");
23
- const name = (pathParts[pathParts.length - 1] ?? "").replace(/\.(ts|js)$/, "").replace(/\.(contracts|event|presentation|workflow|data-view|migration|telemetry|experiment|app-config|integration|knowledge)$/, "");
24
- if (name.length > 0) imports.push(name);
25
- }
26
- return Array.from(new Set(imports)).sort((a, b) => a.localeCompare(b));
27
- }
28
-
29
- //#endregion
30
- export { parseImportedSpecNames };
@@ -1,96 +0,0 @@
1
- import { scanSpecSource } from "../spec-scan.js";
2
-
3
- //#region ../../modules/contractspec-workspace/dist/analysis/diff/semantic.js
4
- /**
5
- * Compute semantic differences between two spec sources.
6
- */
7
- function computeSemanticDiff(aCode, aPath, bCode, bPath, options = {}) {
8
- const a = scanSpecSource(aCode, aPath);
9
- const b = scanSpecSource(bCode, bPath);
10
- const diffs = [];
11
- compareScalar(diffs, "specType", a.specType, b.specType, {
12
- breaking: true,
13
- label: "Spec type"
14
- });
15
- compareScalar(diffs, "name", a.name, b.name, {
16
- breaking: true,
17
- label: "Name"
18
- });
19
- compareScalar(diffs, "version", a.version, b.version, {
20
- breaking: true,
21
- label: "Version"
22
- });
23
- compareScalar(diffs, "kind", a.kind, b.kind, {
24
- breaking: true,
25
- label: "Kind"
26
- });
27
- compareScalar(diffs, "stability", a.stability, b.stability, {
28
- breaking: isStabilityDowngrade(a, b),
29
- label: "Stability"
30
- });
31
- compareArray(diffs, "owners", a.owners ?? [], b.owners ?? [], { label: "Owners" });
32
- compareArray(diffs, "tags", a.tags ?? [], b.tags ?? [], { label: "Tags" });
33
- compareStructuralHints(diffs, a, b);
34
- return options.breakingOnly ? diffs.filter((d) => d.type === "breaking") : diffs;
35
- }
36
- function compareScalar(diffs, path, a, b, config) {
37
- if (a === b) return;
38
- diffs.push({
39
- type: config.breaking ? "breaking" : "changed",
40
- path,
41
- oldValue: a,
42
- newValue: b,
43
- description: `${config.label} changed`
44
- });
45
- }
46
- function compareArray(diffs, path, a, b, config) {
47
- const aSorted = [...a].sort();
48
- const bSorted = [...b].sort();
49
- if (JSON.stringify(aSorted) === JSON.stringify(bSorted)) return;
50
- diffs.push({
51
- type: "changed",
52
- path,
53
- oldValue: aSorted,
54
- newValue: bSorted,
55
- description: `${config.label} changed`
56
- });
57
- }
58
- function isStabilityDowngrade(a, b) {
59
- const order = {
60
- experimental: 0,
61
- beta: 1,
62
- stable: 2,
63
- deprecated: 3
64
- };
65
- const aValue = a.stability ? order[a.stability] ?? 0 : 0;
66
- return (b.stability ? order[b.stability] ?? 0 : 0) > aValue;
67
- }
68
- function compareStructuralHints(diffs, a, b) {
69
- compareScalar(diffs, "hasMeta", a.hasMeta, b.hasMeta, {
70
- breaking: a.specType === "operation" || b.specType === "operation",
71
- label: "meta section presence"
72
- });
73
- compareScalar(diffs, "hasIo", a.hasIo, b.hasIo, {
74
- breaking: a.specType === "operation" || b.specType === "operation",
75
- label: "io section presence"
76
- });
77
- compareScalar(diffs, "hasPolicy", a.hasPolicy, b.hasPolicy, {
78
- breaking: a.specType === "operation" || b.specType === "operation",
79
- label: "policy section presence"
80
- });
81
- compareScalar(diffs, "hasPayload", a.hasPayload, b.hasPayload, {
82
- breaking: a.specType === "event" || b.specType === "event",
83
- label: "payload section presence"
84
- });
85
- compareScalar(diffs, "hasContent", a.hasContent, b.hasContent, {
86
- breaking: a.specType === "presentation" || b.specType === "presentation",
87
- label: "content section presence"
88
- });
89
- compareScalar(diffs, "hasDefinition", a.hasDefinition, b.hasDefinition, {
90
- breaking: a.specType === "workflow" || b.specType === "workflow",
91
- label: "definition section presence"
92
- });
93
- }
94
-
95
- //#endregion
96
- export { computeSemanticDiff };
@@ -1,151 +0,0 @@
1
- //#region ../../modules/contractspec-workspace/dist/analysis/feature-scan.js
2
- /**
3
- * Check if a file is a feature file based on naming conventions.
4
- */
5
- function isFeatureFile(filePath) {
6
- return filePath.includes(".feature.");
7
- }
8
- /**
9
- * Scan a feature source file to extract metadata.
10
- */
11
- function scanFeatureSource(code, filePath) {
12
- const key = matchStringField(code, "key") ?? extractKeyFromFilePath(filePath);
13
- const title = matchStringField(code, "title") ?? void 0;
14
- const description = matchStringField(code, "description") ?? void 0;
15
- const domain = matchStringField(code, "domain") ?? void 0;
16
- const stabilityRaw = matchStringField(code, "stability");
17
- return {
18
- filePath,
19
- key,
20
- title,
21
- description,
22
- domain,
23
- stability: isStability(stabilityRaw) ? stabilityRaw : void 0,
24
- owners: matchStringArrayField(code, "owners"),
25
- tags: matchStringArrayField(code, "tags"),
26
- operations: extractRefsFromArray(code, "operations"),
27
- events: extractRefsFromArray(code, "events"),
28
- presentations: extractRefsFromArray(code, "presentations"),
29
- experiments: extractRefsFromArray(code, "experiments"),
30
- capabilities: extractCapabilities(code),
31
- opToPresentationLinks: extractOpToPresentationLinks(code)
32
- };
33
- }
34
- /**
35
- * Extract refs from a named array (e.g., operations, events, presentations).
36
- */
37
- function extractRefsFromArray(code, fieldName) {
38
- const refs = [];
39
- const arrayPattern = new RegExp(`${escapeRegex(fieldName)}\\s*:\\s*\\[([\\s\\S]*?)\\]`, "m");
40
- const arrayMatch = code.match(arrayPattern);
41
- if (!arrayMatch?.[1]) return refs;
42
- const refPattern = /\{\s*name:\s*['"]([^'"]+)['"]\s*,\s*version:\s*(\d+)/g;
43
- let match;
44
- while ((match = refPattern.exec(arrayMatch[1])) !== null) if (match[1] && match[2]) refs.push({
45
- name: match[1],
46
- version: Number(match[2])
47
- });
48
- return refs;
49
- }
50
- /**
51
- * Extract capability bindings (provides and requires).
52
- */
53
- function extractCapabilities(code) {
54
- const provides = [];
55
- const requires = [];
56
- const capabilitiesMatch = code.match(/capabilities\s*:\s*\{([\s\S]*?)\}/);
57
- if (!capabilitiesMatch?.[1]) return {
58
- provides,
59
- requires
60
- };
61
- const capabilitiesContent = capabilitiesMatch[1];
62
- const providesMatch = capabilitiesContent.match(/provides\s*:\s*\[([\s\S]*?)\]/);
63
- if (providesMatch?.[1]) {
64
- const refPattern = /\{\s*key:\s*['"]([^'"]+)['"]\s*,\s*version:\s*(\d+)/g;
65
- let match;
66
- while ((match = refPattern.exec(providesMatch[1])) !== null) if (match[1] && match[2]) provides.push({
67
- name: match[1],
68
- version: Number(match[2])
69
- });
70
- }
71
- const requiresMatch = capabilitiesContent.match(/requires\s*:\s*\[([\s\S]*?)\]/);
72
- if (requiresMatch?.[1]) {
73
- const refPatternWithVersion = /\{\s*key:\s*['"]([^'"]+)['"]\s*,\s*version:\s*(\d+)/g;
74
- const refPatternKeyOnly = /\{\s*key:\s*['"]([^'"]+)['"]\s*\}/g;
75
- let match = null;
76
- while ((match = refPatternWithVersion.exec(requiresMatch[1])) !== null) if (match[1] && match[2]) requires.push({
77
- name: match[1],
78
- version: Number(match[2])
79
- });
80
- while ((match = refPatternKeyOnly.exec(requiresMatch[1])) !== null) if (match && match[1]) {
81
- if (!requires.some((r) => r.name === match[1])) requires.push({
82
- name: match[1],
83
- version: 1
84
- });
85
- }
86
- }
87
- return {
88
- provides,
89
- requires
90
- };
91
- }
92
- /**
93
- * Extract opToPresentation links.
94
- */
95
- function extractOpToPresentationLinks(code) {
96
- const links = [];
97
- const arrayMatch = code.match(/opToPresentation\s*:\s*\[([\s\S]*?)\]/);
98
- if (!arrayMatch?.[1]) return links;
99
- const linkPattern = /\{\s*op:\s*\{\s*name:\s*['"]([^'"]+)['"]\s*,\s*version:\s*(\d+)\s*\}\s*,\s*pres:\s*\{\s*name:\s*['"]([^'"]+)['"]\s*,\s*version:\s*(\d+)\s*\}/g;
100
- let match;
101
- while ((match = linkPattern.exec(arrayMatch[1])) !== null) if (match[1] && match[2] && match[3] && match[4]) links.push({
102
- op: {
103
- name: match[1],
104
- version: Number(match[2])
105
- },
106
- pres: {
107
- name: match[3],
108
- version: Number(match[4])
109
- }
110
- });
111
- return links;
112
- }
113
- /**
114
- * Extract key from file path as fallback.
115
- */
116
- function extractKeyFromFilePath(filePath) {
117
- return (filePath.split("/").pop() ?? filePath).replace(/\.feature\.[jt]s$/, "").replace(/[^a-zA-Z0-9-]/g, "-");
118
- }
119
- /**
120
- * Match a string field in source code.
121
- */
122
- function matchStringField(code, field) {
123
- const regex = /* @__PURE__ */ new RegExp(`${escapeRegex(field)}\\s*:\\s*['"]([^'"]+)['"]`);
124
- return code.match(regex)?.[1] ?? null;
125
- }
126
- /**
127
- * Match a string array field in source code.
128
- */
129
- function matchStringArrayField(code, field) {
130
- const regex = /* @__PURE__ */ new RegExp(`${escapeRegex(field)}\\s*:\\s*\\[([\\s\\S]*?)\\]`);
131
- const match = code.match(regex);
132
- if (!match?.[1]) return void 0;
133
- const inner = match[1];
134
- const items = Array.from(inner.matchAll(/['"]([^'"]+)['"]/g)).map((m) => m[1]).filter((value) => typeof value === "string" && value.length > 0);
135
- return items.length > 0 ? items : void 0;
136
- }
137
- /**
138
- * Check if a value is a valid stability.
139
- */
140
- function isStability(value) {
141
- return value === "experimental" || value === "beta" || value === "stable" || value === "deprecated";
142
- }
143
- /**
144
- * Escape regex special characters.
145
- */
146
- function escapeRegex(value) {
147
- return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
148
- }
149
-
150
- //#endregion
151
- export { isFeatureFile, scanFeatureSource };