@mycodemap/mycodemap 1.9.0 → 2.7.0

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 (527) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +63 -978
  3. package/README.zh-CN.md +1096 -0
  4. package/dist/cli/commands/agent-metrics/human.d.ts +4 -0
  5. package/dist/cli/commands/agent-metrics/human.d.ts.map +1 -0
  6. package/dist/cli/commands/agent-metrics/human.js +134 -0
  7. package/dist/cli/commands/agent-metrics/human.js.map +1 -0
  8. package/dist/cli/commands/agent-metrics/index.d.ts +15 -0
  9. package/dist/cli/commands/agent-metrics/index.d.ts.map +1 -0
  10. package/dist/cli/commands/agent-metrics/index.js +116 -0
  11. package/dist/cli/commands/agent-metrics/index.js.map +1 -0
  12. package/dist/cli/commands/analyze-options.d.ts.map +1 -1
  13. package/dist/cli/commands/analyze-options.js +8 -0
  14. package/dist/cli/commands/analyze-options.js.map +1 -1
  15. package/dist/cli/commands/analyze.d.ts +3 -196
  16. package/dist/cli/commands/analyze.d.ts.map +1 -1
  17. package/dist/cli/commands/analyze.js +27 -1162
  18. package/dist/cli/commands/analyze.js.map +1 -1
  19. package/dist/cli/commands/benchmark.d.ts +8 -0
  20. package/dist/cli/commands/benchmark.d.ts.map +1 -0
  21. package/dist/cli/commands/benchmark.js +153 -0
  22. package/dist/cli/commands/benchmark.js.map +1 -0
  23. package/dist/cli/commands/complexity.d.ts.map +1 -1
  24. package/dist/cli/commands/complexity.js +62 -95
  25. package/dist/cli/commands/complexity.js.map +1 -1
  26. package/dist/cli/commands/deps.d.ts +3 -59
  27. package/dist/cli/commands/deps.d.ts.map +1 -1
  28. package/dist/cli/commands/deps.js +25 -331
  29. package/dist/cli/commands/deps.js.map +1 -1
  30. package/dist/cli/commands/doctor.d.ts +3 -0
  31. package/dist/cli/commands/doctor.d.ts.map +1 -0
  32. package/dist/cli/commands/doctor.js +34 -0
  33. package/dist/cli/commands/doctor.js.map +1 -0
  34. package/dist/cli/commands/env-contract.d.ts +3 -0
  35. package/dist/cli/commands/env-contract.d.ts.map +1 -0
  36. package/dist/cli/commands/env-contract.js +221 -0
  37. package/dist/cli/commands/env-contract.js.map +1 -0
  38. package/dist/cli/commands/generate.d.ts +19 -1
  39. package/dist/cli/commands/generate.d.ts.map +1 -1
  40. package/dist/cli/commands/generate.js +735 -89
  41. package/dist/cli/commands/generate.js.map +1 -1
  42. package/dist/cli/commands/impact.d.ts +4 -38
  43. package/dist/cli/commands/impact.d.ts.map +1 -1
  44. package/dist/cli/commands/impact.js +133 -375
  45. package/dist/cli/commands/impact.js.map +1 -1
  46. package/dist/cli/commands/init.d.ts +1 -0
  47. package/dist/cli/commands/init.d.ts.map +1 -1
  48. package/dist/cli/commands/init.js +61 -2
  49. package/dist/cli/commands/init.js.map +1 -1
  50. package/dist/cli/commands/preview.d.ts +3 -0
  51. package/dist/cli/commands/preview.d.ts.map +1 -0
  52. package/dist/cli/commands/preview.js +216 -0
  53. package/dist/cli/commands/preview.js.map +1 -0
  54. package/dist/cli/commands/query.d.ts +2 -20
  55. package/dist/cli/commands/query.d.ts.map +1 -1
  56. package/dist/cli/commands/query.js +23 -708
  57. package/dist/cli/commands/query.js.map +1 -1
  58. package/dist/cli/commands/watch-foreground.d.ts.map +1 -1
  59. package/dist/cli/commands/watch-foreground.js +5 -1
  60. package/dist/cli/commands/watch-foreground.js.map +1 -1
  61. package/dist/cli/config-loader.d.ts.map +1 -1
  62. package/dist/cli/config-loader.js +51 -13
  63. package/dist/cli/config-loader.js.map +1 -1
  64. package/dist/cli/doctor/check-agent.d.ts +3 -0
  65. package/dist/cli/doctor/check-agent.d.ts.map +1 -0
  66. package/dist/cli/doctor/check-agent.js +60 -0
  67. package/dist/cli/doctor/check-agent.js.map +1 -0
  68. package/dist/cli/doctor/check-env-contract.d.ts +3 -0
  69. package/dist/cli/doctor/check-env-contract.d.ts.map +1 -0
  70. package/dist/cli/doctor/check-env-contract.js +96 -0
  71. package/dist/cli/doctor/check-env-contract.js.map +1 -0
  72. package/dist/cli/doctor/check-ghost-commands.d.ts +3 -0
  73. package/dist/cli/doctor/check-ghost-commands.d.ts.map +1 -0
  74. package/dist/cli/doctor/check-ghost-commands.js +86 -0
  75. package/dist/cli/doctor/check-ghost-commands.js.map +1 -0
  76. package/dist/cli/doctor/check-native-deps.d.ts +3 -0
  77. package/dist/cli/doctor/check-native-deps.d.ts.map +1 -0
  78. package/dist/cli/doctor/check-native-deps.js +70 -0
  79. package/dist/cli/doctor/check-native-deps.js.map +1 -0
  80. package/dist/cli/doctor/check-workspace-drift.d.ts +3 -0
  81. package/dist/cli/doctor/check-workspace-drift.d.ts.map +1 -0
  82. package/dist/cli/doctor/check-workspace-drift.js +83 -0
  83. package/dist/cli/doctor/check-workspace-drift.js.map +1 -0
  84. package/dist/cli/doctor/formatter.d.ts +20 -0
  85. package/dist/cli/doctor/formatter.d.ts.map +1 -0
  86. package/dist/cli/doctor/formatter.js +91 -0
  87. package/dist/cli/doctor/formatter.js.map +1 -0
  88. package/dist/cli/doctor/index.d.ts +8 -0
  89. package/dist/cli/doctor/index.d.ts.map +1 -0
  90. package/dist/cli/doctor/index.js +9 -0
  91. package/dist/cli/doctor/index.js.map +1 -0
  92. package/dist/cli/doctor/orchestrator.d.ts +3 -0
  93. package/dist/cli/doctor/orchestrator.d.ts.map +1 -0
  94. package/dist/cli/doctor/orchestrator.js +40 -0
  95. package/dist/cli/doctor/orchestrator.js.map +1 -0
  96. package/dist/cli/doctor/types.d.ts +19 -0
  97. package/dist/cli/doctor/types.d.ts.map +1 -0
  98. package/dist/cli/doctor/types.js +4 -0
  99. package/dist/cli/doctor/types.js.map +1 -0
  100. package/dist/cli/env-contract/check.d.ts +18 -0
  101. package/dist/cli/env-contract/check.d.ts.map +1 -0
  102. package/dist/cli/env-contract/check.js +118 -0
  103. package/dist/cli/env-contract/check.js.map +1 -0
  104. package/dist/cli/env-contract/discovery.d.ts +12 -0
  105. package/dist/cli/env-contract/discovery.d.ts.map +1 -0
  106. package/dist/cli/env-contract/discovery.js +249 -0
  107. package/dist/cli/env-contract/discovery.js.map +1 -0
  108. package/dist/cli/env-contract/filters.d.ts +10 -0
  109. package/dist/cli/env-contract/filters.d.ts.map +1 -0
  110. package/dist/cli/env-contract/filters.js +23 -0
  111. package/dist/cli/env-contract/filters.js.map +1 -0
  112. package/dist/cli/env-contract/index.d.ts +6 -0
  113. package/dist/cli/env-contract/index.d.ts.map +1 -0
  114. package/dist/cli/env-contract/index.js +8 -0
  115. package/dist/cli/env-contract/index.js.map +1 -0
  116. package/dist/cli/env-contract/reminder-engine.d.ts +34 -0
  117. package/dist/cli/env-contract/reminder-engine.d.ts.map +1 -0
  118. package/dist/cli/env-contract/reminder-engine.js +51 -0
  119. package/dist/cli/env-contract/reminder-engine.js.map +1 -0
  120. package/dist/cli/env-contract/reminder-hook-runner.d.ts +45 -0
  121. package/dist/cli/env-contract/reminder-hook-runner.d.ts.map +1 -0
  122. package/dist/cli/env-contract/reminder-hook-runner.js +273 -0
  123. package/dist/cli/env-contract/reminder-hook-runner.js.map +1 -0
  124. package/dist/cli/env-contract/reminder-ledger.d.ts +11 -0
  125. package/dist/cli/env-contract/reminder-ledger.d.ts.map +1 -0
  126. package/dist/cli/env-contract/reminder-ledger.js +37 -0
  127. package/dist/cli/env-contract/reminder-ledger.js.map +1 -0
  128. package/dist/cli/env-contract/types.d.ts +48 -0
  129. package/dist/cli/env-contract/types.d.ts.map +1 -0
  130. package/dist/cli/env-contract/types.js +22 -0
  131. package/dist/cli/env-contract/types.js.map +1 -0
  132. package/dist/cli/env-contract/validation.d.ts +10 -0
  133. package/dist/cli/env-contract/validation.d.ts.map +1 -0
  134. package/dist/cli/env-contract/validation.js +116 -0
  135. package/dist/cli/env-contract/validation.js.map +1 -0
  136. package/dist/cli/first-run-guide.d.ts.map +1 -1
  137. package/dist/cli/first-run-guide.js +8 -3
  138. package/dist/cli/first-run-guide.js.map +1 -1
  139. package/dist/cli/index.js +94 -22
  140. package/dist/cli/index.js.map +1 -1
  141. package/dist/cli/init/assistant-plan.d.ts +14 -0
  142. package/dist/cli/init/assistant-plan.d.ts.map +1 -0
  143. package/dist/cli/init/assistant-plan.js +208 -0
  144. package/dist/cli/init/assistant-plan.js.map +1 -0
  145. package/dist/cli/init/detect.d.ts +28 -0
  146. package/dist/cli/init/detect.d.ts.map +1 -0
  147. package/dist/cli/init/detect.js +63 -0
  148. package/dist/cli/init/detect.js.map +1 -0
  149. package/dist/cli/init/env-contract-plan.d.ts +28 -0
  150. package/dist/cli/init/env-contract-plan.d.ts.map +1 -0
  151. package/dist/cli/init/env-contract-plan.js +184 -0
  152. package/dist/cli/init/env-contract-plan.js.map +1 -0
  153. package/dist/cli/init/manifest-extractors.d.ts +22 -0
  154. package/dist/cli/init/manifest-extractors.d.ts.map +1 -0
  155. package/dist/cli/init/manifest-extractors.js +185 -0
  156. package/dist/cli/init/manifest-extractors.js.map +1 -0
  157. package/dist/cli/init/profile-loader.d.ts +49 -0
  158. package/dist/cli/init/profile-loader.d.ts.map +1 -0
  159. package/dist/cli/init/profile-loader.js +107 -0
  160. package/dist/cli/init/profile-loader.js.map +1 -0
  161. package/dist/cli/init/profile-plan.d.ts +38 -0
  162. package/dist/cli/init/profile-plan.d.ts.map +1 -0
  163. package/dist/cli/init/profile-plan.js +120 -0
  164. package/dist/cli/init/profile-plan.js.map +1 -0
  165. package/dist/cli/init/profiles/generic.json +16 -0
  166. package/dist/cli/init/profiles/go.json +12 -0
  167. package/dist/cli/init/profiles/nodejs.json +16 -0
  168. package/dist/cli/init/profiles/python.json +17 -0
  169. package/dist/cli/init/profiles/rust.json +12 -0
  170. package/dist/cli/init/receipt.d.ts.map +1 -1
  171. package/dist/cli/init/receipt.js +107 -7
  172. package/dist/cli/init/receipt.js.map +1 -1
  173. package/dist/cli/init/reconciler.d.ts +10 -1
  174. package/dist/cli/init/reconciler.d.ts.map +1 -1
  175. package/dist/cli/init/reconciler.js +85 -15
  176. package/dist/cli/init/reconciler.js.map +1 -1
  177. package/dist/cli/interface-contract/commands/agent-metrics.d.ts +3 -0
  178. package/dist/cli/interface-contract/commands/agent-metrics.d.ts.map +1 -0
  179. package/dist/cli/interface-contract/commands/agent-metrics.js +217 -0
  180. package/dist/cli/interface-contract/commands/agent-metrics.js.map +1 -0
  181. package/dist/cli/interface-contract/commands/analyze.d.ts +3 -0
  182. package/dist/cli/interface-contract/commands/analyze.d.ts.map +1 -0
  183. package/dist/cli/interface-contract/commands/analyze.js +139 -0
  184. package/dist/cli/interface-contract/commands/analyze.js.map +1 -0
  185. package/dist/cli/interface-contract/commands/benchmark.d.ts +3 -0
  186. package/dist/cli/interface-contract/commands/benchmark.d.ts.map +1 -0
  187. package/dist/cli/interface-contract/commands/benchmark.js +108 -0
  188. package/dist/cli/interface-contract/commands/benchmark.js.map +1 -0
  189. package/dist/cli/interface-contract/commands/deps.d.ts +3 -0
  190. package/dist/cli/interface-contract/commands/deps.d.ts.map +1 -0
  191. package/dist/cli/interface-contract/commands/deps.js +130 -0
  192. package/dist/cli/interface-contract/commands/deps.js.map +1 -0
  193. package/dist/cli/interface-contract/commands/doctor.d.ts +3 -0
  194. package/dist/cli/interface-contract/commands/doctor.d.ts.map +1 -0
  195. package/dist/cli/interface-contract/commands/doctor.js +60 -0
  196. package/dist/cli/interface-contract/commands/doctor.js.map +1 -0
  197. package/dist/cli/interface-contract/commands/env-contract.d.ts +3 -0
  198. package/dist/cli/interface-contract/commands/env-contract.d.ts.map +1 -0
  199. package/dist/cli/interface-contract/commands/env-contract.js +168 -0
  200. package/dist/cli/interface-contract/commands/env-contract.js.map +1 -0
  201. package/dist/cli/interface-contract/commands/index.d.ts +12 -0
  202. package/dist/cli/interface-contract/commands/index.d.ts.map +1 -0
  203. package/dist/cli/interface-contract/commands/index.js +24 -0
  204. package/dist/cli/interface-contract/commands/index.js.map +1 -0
  205. package/dist/cli/interface-contract/commands/init.d.ts +3 -0
  206. package/dist/cli/interface-contract/commands/init.d.ts.map +1 -0
  207. package/dist/cli/interface-contract/commands/init.js +96 -0
  208. package/dist/cli/interface-contract/commands/init.js.map +1 -0
  209. package/dist/cli/interface-contract/commands/preview.d.ts +3 -0
  210. package/dist/cli/interface-contract/commands/preview.d.ts.map +1 -0
  211. package/dist/cli/interface-contract/commands/preview.js +118 -0
  212. package/dist/cli/interface-contract/commands/preview.js.map +1 -0
  213. package/dist/cli/interface-contract/commands/query.d.ts +3 -0
  214. package/dist/cli/interface-contract/commands/query.d.ts.map +1 -0
  215. package/dist/cli/interface-contract/commands/query.js +186 -0
  216. package/dist/cli/interface-contract/commands/query.js.map +1 -0
  217. package/dist/cli/interface-contract/index.d.ts +22 -0
  218. package/dist/cli/interface-contract/index.d.ts.map +1 -0
  219. package/dist/cli/interface-contract/index.js +41 -0
  220. package/dist/cli/interface-contract/index.js.map +1 -0
  221. package/dist/cli/interface-contract/schema.d.ts +30 -0
  222. package/dist/cli/interface-contract/schema.d.ts.map +1 -0
  223. package/dist/cli/interface-contract/schema.js +73 -0
  224. package/dist/cli/interface-contract/schema.js.map +1 -0
  225. package/dist/cli/interface-contract/types.d.ts +77 -0
  226. package/dist/cli/interface-contract/types.d.ts.map +1 -0
  227. package/dist/cli/interface-contract/types.js +4 -0
  228. package/dist/cli/interface-contract/types.js.map +1 -0
  229. package/dist/cli/output/apply-suggestion.d.ts +12 -0
  230. package/dist/cli/output/apply-suggestion.d.ts.map +1 -0
  231. package/dist/cli/output/apply-suggestion.js +29 -0
  232. package/dist/cli/output/apply-suggestion.js.map +1 -0
  233. package/dist/cli/output/error-codes.d.ts +24 -0
  234. package/dist/cli/output/error-codes.d.ts.map +1 -0
  235. package/dist/cli/output/error-codes.js +94 -0
  236. package/dist/cli/output/error-codes.js.map +1 -0
  237. package/dist/cli/output/errors.d.ts +14 -0
  238. package/dist/cli/output/errors.d.ts.map +1 -0
  239. package/dist/cli/output/errors.js +182 -0
  240. package/dist/cli/output/errors.js.map +1 -0
  241. package/dist/cli/output/index.d.ts +13 -0
  242. package/dist/cli/output/index.d.ts.map +1 -0
  243. package/dist/cli/output/index.js +11 -0
  244. package/dist/cli/output/index.js.map +1 -0
  245. package/dist/cli/output/mode.d.ts +12 -0
  246. package/dist/cli/output/mode.d.ts.map +1 -0
  247. package/dist/cli/output/mode.js +23 -0
  248. package/dist/cli/output/mode.js.map +1 -0
  249. package/dist/cli/output/progress.d.ts +9 -0
  250. package/dist/cli/output/progress.d.ts.map +1 -0
  251. package/dist/cli/output/progress.js +65 -0
  252. package/dist/cli/output/progress.js.map +1 -0
  253. package/dist/cli/output/render.d.ts +11 -0
  254. package/dist/cli/output/render.d.ts.map +1 -0
  255. package/dist/cli/output/render.js +18 -0
  256. package/dist/cli/output/render.js.map +1 -0
  257. package/dist/cli/output/types.d.ts +53 -0
  258. package/dist/cli/output/types.d.ts.map +1 -0
  259. package/dist/cli/output/types.js +14 -0
  260. package/dist/cli/output/types.js.map +1 -0
  261. package/dist/cli/output/wasm-fallback.d.ts +14 -0
  262. package/dist/cli/output/wasm-fallback.d.ts.map +1 -0
  263. package/dist/cli/output/wasm-fallback.js +92 -0
  264. package/dist/cli/output/wasm-fallback.js.map +1 -0
  265. package/dist/cli/preview/complexity-scanner.d.ts +21 -0
  266. package/dist/cli/preview/complexity-scanner.d.ts.map +1 -0
  267. package/dist/cli/preview/complexity-scanner.js +52 -0
  268. package/dist/cli/preview/complexity-scanner.js.map +1 -0
  269. package/dist/cli/preview/dependency-extractor.d.ts +38 -0
  270. package/dist/cli/preview/dependency-extractor.d.ts.map +1 -0
  271. package/dist/cli/preview/dependency-extractor.js +140 -0
  272. package/dist/cli/preview/dependency-extractor.js.map +1 -0
  273. package/dist/cli/preview/preview-renderer.d.ts +32 -0
  274. package/dist/cli/preview/preview-renderer.d.ts.map +1 -0
  275. package/dist/cli/preview/preview-renderer.js +54 -0
  276. package/dist/cli/preview/preview-renderer.js.map +1 -0
  277. package/dist/cli/storage-runtime.d.ts +7 -0
  278. package/dist/cli/storage-runtime.d.ts.map +1 -1
  279. package/dist/cli/storage-runtime.js +22 -0
  280. package/dist/cli/storage-runtime.js.map +1 -1
  281. package/dist/cli/tree-sitter-check.d.ts +6 -1
  282. package/dist/cli/tree-sitter-check.d.ts.map +1 -1
  283. package/dist/cli/tree-sitter-check.js +23 -1
  284. package/dist/cli/tree-sitter-check.js.map +1 -1
  285. package/dist/cli-new/index.js +1 -1
  286. package/dist/cli-new/index.js.map +1 -1
  287. package/dist/composition/parser-composition.d.ts +7 -0
  288. package/dist/composition/parser-composition.d.ts.map +1 -0
  289. package/dist/composition/parser-composition.js +15 -0
  290. package/dist/composition/parser-composition.js.map +1 -0
  291. package/dist/core/analyzer.d.ts.map +1 -1
  292. package/dist/core/analyzer.js +83 -67
  293. package/dist/core/analyzer.js.map +1 -1
  294. package/dist/core/ast-complexity-analyzer.d.ts +12 -6
  295. package/dist/core/ast-complexity-analyzer.d.ts.map +1 -1
  296. package/dist/core/ast-complexity-analyzer.js +368 -209
  297. package/dist/core/ast-complexity-analyzer.js.map +1 -1
  298. package/dist/core/file-discovery.d.ts +1 -1
  299. package/dist/core/file-discovery.d.ts.map +1 -1
  300. package/dist/core/file-discovery.js +3 -0
  301. package/dist/core/file-discovery.js.map +1 -1
  302. package/dist/core/global-index.d.ts +3 -1
  303. package/dist/core/global-index.d.ts.map +1 -1
  304. package/dist/core/global-index.js +69 -4
  305. package/dist/core/global-index.js.map +1 -1
  306. package/dist/domain/entities/CodeGraph.d.ts +3 -0
  307. package/dist/domain/entities/CodeGraph.d.ts.map +1 -1
  308. package/dist/domain/entities/CodeGraph.js +19 -2
  309. package/dist/domain/entities/CodeGraph.js.map +1 -1
  310. package/dist/domain/entities/Dependency.d.ts +5 -2
  311. package/dist/domain/entities/Dependency.d.ts.map +1 -1
  312. package/dist/domain/entities/Dependency.js +49 -3
  313. package/dist/domain/entities/Dependency.js.map +1 -1
  314. package/dist/domain/repositories/CodeGraphRepository.d.ts +5 -0
  315. package/dist/domain/repositories/CodeGraphRepository.d.ts.map +1 -1
  316. package/dist/domain/repositories/CodeGraphRepository.js.map +1 -1
  317. package/dist/execution/contract-tools/analyze.d.ts +205 -0
  318. package/dist/execution/contract-tools/analyze.d.ts.map +1 -0
  319. package/dist/execution/contract-tools/analyze.js +1215 -0
  320. package/dist/execution/contract-tools/analyze.js.map +1 -0
  321. package/dist/execution/contract-tools/deps.d.ts +62 -0
  322. package/dist/execution/contract-tools/deps.d.ts.map +1 -0
  323. package/dist/execution/contract-tools/deps.js +234 -0
  324. package/dist/execution/contract-tools/deps.js.map +1 -0
  325. package/dist/execution/contract-tools/index.d.ts +5 -0
  326. package/dist/execution/contract-tools/index.d.ts.map +1 -0
  327. package/dist/execution/contract-tools/index.js +7 -0
  328. package/dist/execution/contract-tools/index.js.map +1 -0
  329. package/dist/execution/contract-tools/query.d.ts +60 -0
  330. package/dist/execution/contract-tools/query.d.ts.map +1 -0
  331. package/dist/execution/contract-tools/query.js +532 -0
  332. package/dist/execution/contract-tools/query.js.map +1 -0
  333. package/dist/execution/contract-tools/types.d.ts +26 -0
  334. package/dist/execution/contract-tools/types.d.ts.map +1 -0
  335. package/dist/execution/contract-tools/types.js +32 -0
  336. package/dist/execution/contract-tools/types.js.map +1 -0
  337. package/dist/generator/index.d.ts.map +1 -1
  338. package/dist/generator/index.js +0 -3
  339. package/dist/generator/index.js.map +1 -1
  340. package/dist/infrastructure/parser/enhancers/TypeScriptTypeEnhancer.d.ts +12 -0
  341. package/dist/infrastructure/parser/enhancers/TypeScriptTypeEnhancer.d.ts.map +1 -0
  342. package/dist/infrastructure/parser/enhancers/TypeScriptTypeEnhancer.js +55 -0
  343. package/dist/infrastructure/parser/enhancers/TypeScriptTypeEnhancer.js.map +1 -0
  344. package/dist/infrastructure/parser/implementations/GoParser.d.ts +2 -1
  345. package/dist/infrastructure/parser/implementations/GoParser.d.ts.map +1 -1
  346. package/dist/infrastructure/parser/implementations/GoParser.js +13 -1
  347. package/dist/infrastructure/parser/implementations/GoParser.js.map +1 -1
  348. package/dist/infrastructure/parser/implementations/PythonTreeSitterParser.d.ts +114 -0
  349. package/dist/infrastructure/parser/implementations/PythonTreeSitterParser.d.ts.map +1 -0
  350. package/dist/infrastructure/parser/implementations/PythonTreeSitterParser.js +1022 -0
  351. package/dist/infrastructure/parser/implementations/PythonTreeSitterParser.js.map +1 -0
  352. package/dist/infrastructure/parser/implementations/TreeSitterParser.d.ts +78 -0
  353. package/dist/infrastructure/parser/implementations/TreeSitterParser.d.ts.map +1 -0
  354. package/dist/infrastructure/parser/implementations/TreeSitterParser.js +648 -0
  355. package/dist/infrastructure/parser/implementations/TreeSitterParser.js.map +1 -0
  356. package/dist/infrastructure/parser/implementations/TypeScriptParser.d.ts +3 -55
  357. package/dist/infrastructure/parser/implementations/TypeScriptParser.d.ts.map +1 -1
  358. package/dist/infrastructure/parser/implementations/TypeScriptParser.js +4 -411
  359. package/dist/infrastructure/parser/implementations/TypeScriptParser.js.map +1 -1
  360. package/dist/infrastructure/parser/index.d.ts +2 -0
  361. package/dist/infrastructure/parser/index.d.ts.map +1 -1
  362. package/dist/infrastructure/parser/index.js +9 -6
  363. package/dist/infrastructure/parser/index.js.map +1 -1
  364. package/dist/infrastructure/parser/interfaces/ParserBase.d.ts.map +1 -1
  365. package/dist/infrastructure/parser/interfaces/ParserBase.js +1 -0
  366. package/dist/infrastructure/parser/interfaces/ParserBase.js.map +1 -1
  367. package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.d.ts +2 -0
  368. package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.d.ts.map +1 -1
  369. package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.js +4 -0
  370. package/dist/infrastructure/repositories/CodeGraphRepositoryImpl.js.map +1 -1
  371. package/dist/infrastructure/storage/StorageFactory.d.ts +5 -18
  372. package/dist/infrastructure/storage/StorageFactory.d.ts.map +1 -1
  373. package/dist/infrastructure/storage/StorageFactory.js +30 -98
  374. package/dist/infrastructure/storage/StorageFactory.js.map +1 -1
  375. package/dist/infrastructure/storage/adapters/SQLiteStorage.d.ts +13 -1
  376. package/dist/infrastructure/storage/adapters/SQLiteStorage.d.ts.map +1 -1
  377. package/dist/infrastructure/storage/adapters/SQLiteStorage.js +322 -76
  378. package/dist/infrastructure/storage/adapters/SQLiteStorage.js.map +1 -1
  379. package/dist/infrastructure/storage/adapters/sqlite-loader.d.ts +45 -0
  380. package/dist/infrastructure/storage/adapters/sqlite-loader.d.ts.map +1 -0
  381. package/dist/infrastructure/storage/adapters/sqlite-loader.js +266 -0
  382. package/dist/infrastructure/storage/adapters/sqlite-loader.js.map +1 -0
  383. package/dist/infrastructure/storage/community-helpers.d.ts +4 -0
  384. package/dist/infrastructure/storage/community-helpers.d.ts.map +1 -0
  385. package/dist/infrastructure/storage/community-helpers.js +392 -0
  386. package/dist/infrastructure/storage/community-helpers.js.map +1 -0
  387. package/dist/infrastructure/storage/graph-helpers.d.ts +22 -5
  388. package/dist/infrastructure/storage/graph-helpers.d.ts.map +1 -1
  389. package/dist/infrastructure/storage/graph-helpers.js +496 -91
  390. package/dist/infrastructure/storage/graph-helpers.js.map +1 -1
  391. package/dist/infrastructure/storage/index.d.ts +1 -1
  392. package/dist/infrastructure/storage/index.d.ts.map +1 -1
  393. package/dist/infrastructure/storage/index.js +1 -1
  394. package/dist/infrastructure/storage/index.js.map +1 -1
  395. package/dist/infrastructure/storage/interfaces/StorageBase.d.ts +2 -2
  396. package/dist/infrastructure/storage/interfaces/StorageBase.d.ts.map +1 -1
  397. package/dist/infrastructure/storage/interfaces/StorageBase.js.map +1 -1
  398. package/dist/infrastructure/storage/sqlite/GovernanceGraphCache.d.ts +2 -0
  399. package/dist/infrastructure/storage/sqlite/GovernanceGraphCache.d.ts.map +1 -1
  400. package/dist/infrastructure/storage/sqlite/GovernanceGraphCache.js +52 -12
  401. package/dist/infrastructure/storage/sqlite/GovernanceGraphCache.js.map +1 -1
  402. package/dist/infrastructure/storage/sqlite/schema.d.ts +2 -2
  403. package/dist/infrastructure/storage/sqlite/schema.d.ts.map +1 -1
  404. package/dist/infrastructure/storage/sqlite/schema.js +49 -1
  405. package/dist/infrastructure/storage/sqlite/schema.js.map +1 -1
  406. package/dist/interface/config/index.d.ts +5 -3
  407. package/dist/interface/config/index.d.ts.map +1 -1
  408. package/dist/interface/types/index.d.ts +37 -6
  409. package/dist/interface/types/index.d.ts.map +1 -1
  410. package/dist/interface/types/parser.d.ts +85 -0
  411. package/dist/interface/types/parser.d.ts.map +1 -1
  412. package/dist/interface/types/storage.d.ts +227 -10
  413. package/dist/interface/types/storage.d.ts.map +1 -1
  414. package/dist/orchestrator/agent-metrics-service.d.ts +126 -0
  415. package/dist/orchestrator/agent-metrics-service.d.ts.map +1 -0
  416. package/dist/orchestrator/agent-metrics-service.js +444 -0
  417. package/dist/orchestrator/agent-metrics-service.js.map +1 -0
  418. package/dist/orchestrator/types.d.ts +2 -0
  419. package/dist/orchestrator/types.d.ts.map +1 -1
  420. package/dist/orchestrator/types.js.map +1 -1
  421. package/dist/parser/enhancers/PythonTypeEnhancer.d.ts +26 -0
  422. package/dist/parser/enhancers/PythonTypeEnhancer.d.ts.map +1 -0
  423. package/dist/parser/enhancers/PythonTypeEnhancer.js +440 -0
  424. package/dist/parser/enhancers/PythonTypeEnhancer.js.map +1 -0
  425. package/dist/parser/implementations/smart-parser.d.ts.map +1 -1
  426. package/dist/parser/implementations/smart-parser.js +7 -69
  427. package/dist/parser/implementations/smart-parser.js.map +1 -1
  428. package/dist/parser/implementations/tree-sitter-loader.d.ts +18 -0
  429. package/dist/parser/implementations/tree-sitter-loader.d.ts.map +1 -0
  430. package/dist/parser/implementations/tree-sitter-loader.js +136 -0
  431. package/dist/parser/implementations/tree-sitter-loader.js.map +1 -0
  432. package/dist/parser/index.d.ts +5 -3
  433. package/dist/parser/index.d.ts.map +1 -1
  434. package/dist/parser/index.js +68 -6
  435. package/dist/parser/index.js.map +1 -1
  436. package/dist/parser/interfaces/IParser.d.ts +19 -6
  437. package/dist/parser/interfaces/IParser.d.ts.map +1 -1
  438. package/dist/parser/interfaces/IParser.js +2 -3
  439. package/dist/parser/interfaces/IParser.js.map +1 -1
  440. package/dist/server/handlers/AnalysisHandler.d.ts +13 -2
  441. package/dist/server/handlers/AnalysisHandler.d.ts.map +1 -1
  442. package/dist/server/handlers/AnalysisHandler.js +24 -0
  443. package/dist/server/handlers/AnalysisHandler.js.map +1 -1
  444. package/dist/server/handlers/QueryHandler.d.ts.map +1 -1
  445. package/dist/server/handlers/QueryHandler.js +11 -30
  446. package/dist/server/handlers/QueryHandler.js.map +1 -1
  447. package/dist/server/mcp/context-tool.d.ts +9 -0
  448. package/dist/server/mcp/context-tool.d.ts.map +1 -0
  449. package/dist/server/mcp/context-tool.js +257 -0
  450. package/dist/server/mcp/context-tool.js.map +1 -0
  451. package/dist/server/mcp/schema-adapter.d.ts +55 -0
  452. package/dist/server/mcp/schema-adapter.d.ts.map +1 -0
  453. package/dist/server/mcp/schema-adapter.js +409 -0
  454. package/dist/server/mcp/schema-adapter.js.map +1 -0
  455. package/dist/server/mcp/server.d.ts +3 -3
  456. package/dist/server/mcp/server.d.ts.map +1 -1
  457. package/dist/server/mcp/server.js +134 -20
  458. package/dist/server/mcp/server.js.map +1 -1
  459. package/dist/server/mcp/service.d.ts +6 -2
  460. package/dist/server/mcp/service.d.ts.map +1 -1
  461. package/dist/server/mcp/service.js +138 -36
  462. package/dist/server/mcp/service.js.map +1 -1
  463. package/dist/server/mcp/stdio-transport.d.ts +23 -0
  464. package/dist/server/mcp/stdio-transport.d.ts.map +1 -0
  465. package/dist/server/mcp/stdio-transport.js +101 -0
  466. package/dist/server/mcp/stdio-transport.js.map +1 -0
  467. package/dist/server/mcp/types.d.ts +133 -8
  468. package/dist/server/mcp/types.d.ts.map +1 -1
  469. package/dist/server/routes/api.d.ts.map +1 -1
  470. package/dist/server/routes/api.js +11 -2
  471. package/dist/server/routes/api.js.map +1 -1
  472. package/docs/AI_ASSISTANT_SETUP.md +281 -12
  473. package/docs/API.md +170 -0
  474. package/docs/CONFIGURATION.md +141 -0
  475. package/docs/DEVELOPMENT.md +96 -0
  476. package/docs/GETTING-STARTED.md +114 -0
  477. package/docs/README.md +40 -1
  478. package/docs/SETUP_GUIDE.md +60 -14
  479. package/docs/TESTING.md +81 -0
  480. package/docs/ai-guide/COMMANDS.md +68 -10
  481. package/docs/ai-guide/INTEGRATION.md +77 -10
  482. package/docs/ai-guide/OUTPUT.md +345 -9
  483. package/docs/ai-guide/PROMPTS.md +2 -2
  484. package/docs/ai-guide/QUICKSTART.md +28 -1
  485. package/docs/ai-guide/README.md +2 -2
  486. package/docs/archive/ideation/2026-04-15-executable-architecture-constitution-ideation-archive.md +70 -0
  487. package/docs/archive/ideation/2026-04-20-mycodemap-init-enhancements-ideation-archive.md +109 -0
  488. package/docs/archive/ideation/2026-04-22-rules-entry-docs-optimization-consolidated-ideation-archive.md +54 -0
  489. package/docs/backlog.md +232 -144
  490. package/docs/brainstorms/2026-05-10-agent-effectiveness-validation-requirements.md +112 -0
  491. package/docs/generated/phase-58/subagent-evidence/claude-hook-example.json +15 -0
  492. package/docs/generated/phase-58/subagent-evidence/claude-session.md +146 -0
  493. package/docs/generated/phase-58/subagent-evidence/claude-subagent.json +28 -0
  494. package/docs/generated/phase-58/subagent-evidence/codex-agent-example.toml +19 -0
  495. package/docs/generated/phase-58/subagent-evidence/codex-session.md +150 -0
  496. package/docs/generated/phase-58/subagent-evidence/codex-subagent.json +20 -0
  497. package/docs/generated/phase-58/subagent-evidence/negative-no-retrieval.json +12 -0
  498. package/docs/generated/phase-58/subagent-evidence/verification-manifest.json +19 -0
  499. package/docs/ideation/2026-04-15-executable-architecture-constitution-ideation.md +10 -22
  500. package/docs/ideation/2026-04-20-mycodemap-init-enhancements-ideation.md +15 -60
  501. package/docs/ideation/2026-04-22-rules-entry-docs-optimization-consolidated-ideation.md +47 -52
  502. package/docs/ideation/2026-04-29-ux-install-agent-experience-ideation.md +256 -0
  503. package/docs/ideation/2026-05-02-subagent-environment-contract-injection-ideation.md +183 -0
  504. package/docs/ideation/2026-05-04-subagent-hooks-deep-dive-ideation.md +133 -0
  505. package/docs/ideation/2026-05-10-agent-effectiveness-validation-ideation.md +219 -0
  506. package/docs/plans/2026-04-30-install-guide-and-repo-analyzer-design.md +394 -0
  507. package/docs/rules/README.md +1 -0
  508. package/docs/rules/architecture-guardrails.md +2 -1
  509. package/docs/rules/engineering-with-codex-openai.md +1 -1
  510. package/docs/rules/harness.md +106 -0
  511. package/docs/rules/pre-release-checklist.md +28 -0
  512. package/docs/rules/testing.md +51 -0
  513. package/examples/claude/skills/mycodemap-repo-analyzer/SKILL.md +294 -0
  514. package/examples/claude/skills/mycodemap-repo-analyzer/references/analysis-guide.md +166 -0
  515. package/examples/claude/skills/mycodemap-repo-analyzer/references/module-analysis-guide.md +150 -0
  516. package/package.json +12 -4
  517. package/scripts/copy-build-assets.mjs +23 -0
  518. package/scripts/hooks/templates/pre-commit +33 -2
  519. package/scripts/sync-analyze-docs.js +2 -2
  520. package/scripts/tests/test_rule_control_workflow.py +15 -1
  521. package/scripts/validate-docs.js +113 -16
  522. package/scripts/verify-subagent-env-contract.mjs +279 -0
  523. package/dist/parser/implementations/tree-sitter-parser.d.ts +0 -57
  524. package/dist/parser/implementations/tree-sitter-parser.d.ts.map +0 -1
  525. package/dist/parser/implementations/tree-sitter-parser.js +0 -375
  526. package/dist/parser/implementations/tree-sitter-parser.js.map +0 -1
  527. package/docs/references/tmp.md +0 -527
@@ -0,0 +1,130 @@
1
+ // [META] since:2026-04-30 | owner:cli-team | stable:false
2
+ // [WHY] Interface contract for the `deps` command family
3
+ export const depsContract = {
4
+ name: 'deps',
5
+ description: '分析项目模块依赖关系',
6
+ stable: true,
7
+ args: [],
8
+ flags: [
9
+ {
10
+ name: 'module',
11
+ short: 'm',
12
+ long: 'module',
13
+ description: '查看指定模块的依赖',
14
+ type: 'string',
15
+ },
16
+ {
17
+ name: 'json',
18
+ short: 'j',
19
+ long: 'json',
20
+ description: 'JSON 格式输出',
21
+ type: 'boolean',
22
+ defaultValue: false,
23
+ },
24
+ {
25
+ name: 'structured',
26
+ long: 'structured',
27
+ description: '输出完全结构化的 JSON(不包含自然语言字符串,需要配合 --json 使用)',
28
+ type: 'boolean',
29
+ defaultValue: false,
30
+ },
31
+ ],
32
+ outputShape: {
33
+ description: '依赖分析结果',
34
+ type: 'object',
35
+ properties: [
36
+ // Mode A: specific module detail (when -m is used)
37
+ {
38
+ name: 'module',
39
+ type: 'object',
40
+ nullable: true,
41
+ description: '指定模块的依赖详情(当使用 -m 参数时)',
42
+ properties: [
43
+ { name: 'path', type: 'string' },
44
+ { name: 'relativePath', type: 'string' },
45
+ {
46
+ name: 'location',
47
+ type: 'object',
48
+ properties: [
49
+ { name: 'file', type: 'string' },
50
+ { name: 'line', type: 'number' },
51
+ { name: 'column', type: 'number' },
52
+ ],
53
+ },
54
+ {
55
+ name: 'dependencies',
56
+ type: 'array',
57
+ items: {
58
+ name: 'dependencyPath',
59
+ type: 'string',
60
+ },
61
+ },
62
+ {
63
+ name: 'dependents',
64
+ type: 'array',
65
+ items: {
66
+ name: 'dependentPath',
67
+ type: 'string',
68
+ },
69
+ },
70
+ {
71
+ name: 'dependentsMap',
72
+ type: 'array',
73
+ nullable: true,
74
+ items: {
75
+ name: 'dependentEntry',
76
+ type: 'object',
77
+ properties: [
78
+ { name: 'id', type: 'string' },
79
+ { name: 'path', type: 'string' },
80
+ ],
81
+ },
82
+ },
83
+ ],
84
+ },
85
+ // Mode B: all-modules summary (when -m is omitted)
86
+ {
87
+ name: 'allDependencies',
88
+ type: 'object',
89
+ nullable: true,
90
+ description: '全局依赖汇总(当未使用 -m 参数时)',
91
+ },
92
+ {
93
+ name: 'modules',
94
+ type: 'array',
95
+ nullable: true,
96
+ description: '模块列表(当未使用 -m 参数时)',
97
+ items: {
98
+ name: 'moduleSummary',
99
+ type: 'object',
100
+ properties: [
101
+ { name: 'path', type: 'string' },
102
+ { name: 'relativePath', type: 'string' },
103
+ {
104
+ name: 'location',
105
+ type: 'object',
106
+ properties: [
107
+ { name: 'file', type: 'string' },
108
+ { name: 'line', type: 'number' },
109
+ { name: 'column', type: 'number' },
110
+ ],
111
+ },
112
+ { name: 'type', type: 'string' },
113
+ { name: 'count', type: 'number' },
114
+ ],
115
+ },
116
+ },
117
+ ],
118
+ },
119
+ errorCodes: [
120
+ { code: 'INDEX_NOT_FOUND', description: '代码地图索引不存在,需先运行 generate' },
121
+ { code: 'MODULE_NOT_FOUND', description: '指定的模块路径未找到' },
122
+ { code: 'PARSE_ERROR', description: '代码地图 JSON 解析失败' },
123
+ ],
124
+ examples: [
125
+ 'codemap deps -m src/index.ts --json',
126
+ 'codemap deps --json --structured',
127
+ 'codemap deps -m src/utils/helpers.ts',
128
+ ],
129
+ };
130
+ //# sourceMappingURL=deps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deps.js","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/deps.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,yDAAyD;AAIzD,MAAM,CAAC,MAAM,YAAY,GAAoB;IAC3C,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,YAAY;IACzB,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,EAAE;IACR,KAAK,EAAE;QACL;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,QAAQ;SACf;QACD;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;QACD;YACE,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,0CAA0C;YACvD,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;KACF;IACD,WAAW,EAAE;QACX,WAAW,E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iBAAiB;gBACvB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,qBAAqB;aACnC;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,mBAAmB;gBAChC,KAAK,EAAE;oBACL,IAAI,EAAE,eAAe;oBACrB,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAChC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACxC;4BACE,IAAI,EAAE,UAAU;4BAChB,IAAI,EAAE,QAAQ;4BACd,UAAU,EAAE;gCACV,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;gCAChC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;gCAChC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;6BACnC;yBACF;wBACD,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAChC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE;qBAClC;iBACF;aACF;SACF;KACF;IACD,UAAU,EAAE;QACV,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,EAAE,yBAAyB,EAAE;QACnE,EAAE,IAAI,EAAE,kBAAkB,EAAE,WAAW,EAAE,YAAY,EAAE;QACvD,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE;KACvD;IACD,QAAQ,EAAE;QACR,qCAAqC;QACrC,kCAAkC;QAClC,sCAAsC;KACvC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CommandContract } from '../types.js';
2
+ export declare const doctorContract: CommandContract;
3
+ //# sourceMappingURL=doctor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/doctor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,cAAc,EAAE,eAwD5B,CAAC"}
@@ -0,0 +1,60 @@
1
+ // [META] since:2026-05-01 | owner:cli-team | stable:false
2
+ // [WHY] Interface contract for the `doctor` command family
3
+ export const doctorContract = {
4
+ name: 'doctor',
5
+ description: '诊断 CodeMap 生态系统健康状况',
6
+ stable: true,
7
+ args: [],
8
+ flags: [
9
+ {
10
+ name: 'json',
11
+ short: 'j',
12
+ long: 'json',
13
+ description: 'JSON 格式输出诊断结果',
14
+ type: 'boolean',
15
+ defaultValue: false,
16
+ },
17
+ {
18
+ name: 'human',
19
+ long: 'human',
20
+ description: '强制人类可读输出',
21
+ type: 'boolean',
22
+ defaultValue: false,
23
+ },
24
+ ],
25
+ outputShape: {
26
+ description: '诊断报告',
27
+ type: 'object',
28
+ properties: [
29
+ {
30
+ name: 'exitCode',
31
+ type: 'number',
32
+ description: '退出码(0 = 健康,1 = 有问题)',
33
+ },
34
+ {
35
+ name: 'results',
36
+ type: 'array',
37
+ description: '诊断结果列表',
38
+ items: {
39
+ name: 'diagnostic',
40
+ type: 'object',
41
+ properties: [
42
+ { name: 'category', type: 'string', description: '诊断类别: install | config | runtime | agent' },
43
+ { name: 'severity', type: 'string', description: '严重级别: info | warning | error' },
44
+ { name: 'message', type: 'string' },
45
+ { name: 'check', type: 'string', description: '检查项名称' },
46
+ ],
47
+ },
48
+ },
49
+ ],
50
+ },
51
+ errorCodes: [
52
+ { code: 'DOCTOR_RUNTIME_ERROR', description: '诊断运行时出错' },
53
+ ],
54
+ examples: [
55
+ 'codemap doctor',
56
+ 'codemap doctor --json',
57
+ 'codemap doctor --human',
58
+ ],
59
+ };
60
+ //# sourceMappingURL=doctor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/doctor.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,2DAA2D;AAI3D,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC7C,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,qBAAqB;IAClC,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,EAAE;IACR,KAAK,EAAE;QACL;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;QACD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;KACF;IACD,WAAW,EAAE;QACX,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qBAAqB;aACnC;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,QAAQ;gBACrB,KAAK,EAAE;oBACL,IAAI,EAAE,YAAY;oBAClB,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0CAA0C,EAAE;wBAC7F,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8BAA8B,EAAE;wBACjF,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACnC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE;qBACxD;iBACF;aACF;SACF;KACF;IACD,UAAU,EAAE;QACV,EAAE,IAAI,EAAE,sBAAsB,EAAE,WAAW,EAAE,SAAS,EAAE;KACzD;IACD,QAAQ,EAAE;QACR,gBAAgB;QAChB,uBAAuB;QACvB,wBAAwB;KACzB;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CommandContract } from '../types.js';
2
+ export declare const envContractContract: CommandContract;
3
+ //# sourceMappingURL=env-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-contract.d.ts","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/env-contract.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,mBAAmB,EAAE,eAoKjC,CAAC"}
@@ -0,0 +1,168 @@
1
+ // [META] since:2026-05-02 | owner:cli-team | stable:false
2
+ // [WHY] Interface contract for the `env-contract` command — subagent rule retrieval surface.
3
+ export const envContractContract = {
4
+ name: 'env-contract',
5
+ aliases: ['env_contract'],
6
+ description: 'Query the Project Environment Contract for subagent rule retrieval',
7
+ stable: true,
8
+ args: [],
9
+ flags: [
10
+ {
11
+ name: 'json',
12
+ short: 'j',
13
+ long: 'json',
14
+ description: 'Output contract as JSON',
15
+ type: 'boolean',
16
+ defaultValue: false,
17
+ },
18
+ {
19
+ name: 'human',
20
+ long: 'human',
21
+ description: 'Force human-readable output',
22
+ type: 'boolean',
23
+ defaultValue: false,
24
+ },
25
+ {
26
+ name: 'for',
27
+ long: 'for',
28
+ description: 'Agent type filter: explore|plan|edit|worker|review|verify|default',
29
+ type: 'string',
30
+ defaultValue: undefined,
31
+ },
32
+ {
33
+ name: 'category',
34
+ long: 'category',
35
+ description: 'Contract category filter: execution|commit|retrieval|validation|style',
36
+ type: 'string',
37
+ defaultValue: undefined,
38
+ },
39
+ {
40
+ name: 'check',
41
+ long: 'check',
42
+ description: 'Check contract freshness and critical coverage',
43
+ type: 'boolean',
44
+ defaultValue: false,
45
+ },
46
+ {
47
+ name: 'update',
48
+ long: 'update',
49
+ description: 'Regenerate .mycodemap/env-contract.json',
50
+ type: 'boolean',
51
+ defaultValue: false,
52
+ },
53
+ {
54
+ name: 'asHookConfig',
55
+ long: 'as-hook-config',
56
+ description: 'Print Claude Code SubagentStart hook example',
57
+ type: 'boolean',
58
+ defaultValue: false,
59
+ },
60
+ {
61
+ name: 'asCodexAgent',
62
+ long: 'as-codex-agent',
63
+ description: 'Print Codex agent developer_instructions example',
64
+ type: 'boolean',
65
+ defaultValue: false,
66
+ },
67
+ ],
68
+ outputShape: {
69
+ description: 'Project Environment Contract query result',
70
+ type: 'object',
71
+ properties: [
72
+ { name: 'schemaVersion', type: 'string', description: 'Contract schema version (env-contract.v1)' },
73
+ { name: 'generatedAt', type: 'string', description: 'ISO timestamp of contract generation' },
74
+ { name: 'agentType', type: 'string', description: 'Agent type used for filtering' },
75
+ {
76
+ name: 'items',
77
+ type: 'array',
78
+ description: 'Filtered contract items',
79
+ items: {
80
+ name: 'item',
81
+ type: 'object',
82
+ properties: [
83
+ { name: 'id', type: 'string', description: 'Unique contract item identifier' },
84
+ { name: 'category', type: 'string', description: 'Contract category: execution|commit|retrieval|validation|style' },
85
+ { name: 'severity', type: 'string', description: 'Severity level: critical|high|medium|low' },
86
+ { name: 'content', type: 'string', description: 'Human-readable contract rule' },
87
+ {
88
+ name: 'sources',
89
+ type: 'array',
90
+ description: 'Source file references',
91
+ items: {
92
+ name: 'source',
93
+ type: 'object',
94
+ properties: [
95
+ { name: 'file', type: 'string', description: 'Source file path' },
96
+ { name: 'line', type: 'number', description: 'Source line number', nullable: true },
97
+ { name: 'hash', type: 'string', description: 'Content hash' },
98
+ { name: 'authority', type: 'string', description: 'Source authority: executable|governance|generated|example' },
99
+ ],
100
+ },
101
+ },
102
+ ],
103
+ },
104
+ },
105
+ {
106
+ name: 'conflicts',
107
+ type: 'array',
108
+ description: 'Detected conflicts between sources',
109
+ items: {
110
+ name: 'conflict',
111
+ type: 'object',
112
+ properties: [
113
+ { name: 'id', type: 'string' },
114
+ { name: 'severity', type: 'string' },
115
+ { name: 'description', type: 'string' },
116
+ { name: 'recommendation', type: 'string' },
117
+ ],
118
+ },
119
+ },
120
+ {
121
+ name: 'sourceSnapshots',
122
+ type: 'array',
123
+ description: 'Hash snapshots of source files',
124
+ items: {
125
+ name: 'snapshot',
126
+ type: 'object',
127
+ properties: [
128
+ { name: 'file', type: 'string' },
129
+ { name: 'hash', type: 'string' },
130
+ { name: 'lastModified', type: 'string' },
131
+ ],
132
+ },
133
+ },
134
+ {
135
+ name: 'diagnostics',
136
+ type: 'array',
137
+ description: 'Check diagnostics (only present with --check)',
138
+ nullable: true,
139
+ items: {
140
+ name: 'diagnostic',
141
+ type: 'object',
142
+ properties: [
143
+ { name: 'id', type: 'string' },
144
+ { name: 'severity', type: 'string' },
145
+ { name: 'message', type: 'string' },
146
+ { name: 'remediation', type: 'string' },
147
+ ],
148
+ },
149
+ },
150
+ ],
151
+ },
152
+ errorCodes: [
153
+ { code: 'ENV_CONTRACT_NOT_FOUND', description: 'No contract file and discovery failed' },
154
+ { code: 'ENV_CONTRACT_SCHEMA_INVALID', description: 'Contract file fails schema validation' },
155
+ { code: 'ENV_CONTRACT_CHECK_FAILED', description: 'Contract check detected errors (exit code 1)' },
156
+ { code: 'ENV_CONTRACT_CHECK_WARN', description: 'Contract check detected warnings (exit code 2)' },
157
+ ],
158
+ examples: [
159
+ 'codemap env-contract',
160
+ 'codemap env-contract --for worker --json',
161
+ 'codemap env-contract --check',
162
+ 'codemap env-contract --update',
163
+ 'codemap env-contract --as-hook-config',
164
+ 'codemap env-contract --as-codex-agent',
165
+ 'codemap env-contract --category commit --json',
166
+ ],
167
+ };
168
+ //# sourceMappingURL=env-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-contract.js","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/env-contract.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,6FAA6F;AAI7F,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ClB,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC9B,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACpC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACnC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE;qBACxC;iBACF;aACF;SACF;KACF;IACD,UAAU,EAAE;QACV,EAAE,IAAI,EAAE,wBAAwB,EAAE,WAAW,EAAE,uCAAuC,EAAE;QACxF,EAAE,IAAI,EAAE,6BAA6B,EAAE,WAAW,EAAE,uCAAuC,EAAE;QAC7F,EAAE,IAAI,EAAE,2BAA2B,EAAE,WAAW,EAAE,8CAA8C,EAAE;QAClG,EAAE,IAAI,EAAE,yBAAyB,EAAE,WAAW,EAAE,gDAAgD,EAAE;KACnG;IACD,QAAQ,EAAE;QACR,sBAAsB;QACtB,0CAA0C;QAC1C,8BAA8B;QAC9B,+BAA+B;QAC/B,uCAAuC;QACvC,uCAAuC;QACvC,+CAA+C;KAChD;CACF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { analyzeContract } from './analyze.js';
2
+ import { queryContract } from './query.js';
3
+ import { depsContract } from './deps.js';
4
+ import { doctorContract } from './doctor.js';
5
+ import { benchmarkContract } from './benchmark.js';
6
+ import { initContract } from './init.js';
7
+ import { previewContract } from './preview.js';
8
+ import { envContractContract } from './env-contract.js';
9
+ import { agentMetricsContract } from './agent-metrics.js';
10
+ export declare const commandContracts: readonly [import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract, import("../types.js").CommandContract];
11
+ export { analyzeContract, queryContract, depsContract, doctorContract, benchmarkContract, initContract, previewContract, envContractContract, agentMetricsContract };
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,eAAO,MAAM,gBAAgB,0WAUnB,CAAC;AAEX,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,24 @@
1
+ // [META] since:2026-04-30 | owner:cli-team | stable:false
2
+ // [WHY] Registry of all command contracts — central catalog for schema generation and validation
3
+ import { analyzeContract } from './analyze.js';
4
+ import { queryContract } from './query.js';
5
+ import { depsContract } from './deps.js';
6
+ import { doctorContract } from './doctor.js';
7
+ import { benchmarkContract } from './benchmark.js';
8
+ import { initContract } from './init.js';
9
+ import { previewContract } from './preview.js';
10
+ import { envContractContract } from './env-contract.js';
11
+ import { agentMetricsContract } from './agent-metrics.js';
12
+ export const commandContracts = [
13
+ analyzeContract,
14
+ queryContract,
15
+ depsContract,
16
+ doctorContract,
17
+ benchmarkContract,
18
+ initContract,
19
+ previewContract,
20
+ envContractContract,
21
+ agentMetricsContract,
22
+ ];
23
+ export { analyzeContract, queryContract, depsContract, doctorContract, benchmarkContract, initContract, previewContract, envContractContract, agentMetricsContract };
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/index.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,iGAAiG;AAEjG,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,eAAe;IACf,aAAa;IACb,YAAY;IACZ,cAAc;IACd,iBAAiB;IACjB,YAAY;IACZ,eAAe;IACf,mBAAmB;IACnB,oBAAoB;CACZ,CAAC;AAEX,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CommandContract } from '../types.js';
2
+ export declare const initContract: CommandContract;
3
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/init.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,YAAY,EAAE,eA4F1B,CAAC"}
@@ -0,0 +1,96 @@
1
+ // [META] since:2026-05-01 | owner:cli-team | stable:false
2
+ // [WHY] Interface contract for the `init` command family
3
+ export const initContract = {
4
+ name: 'init',
5
+ description: '初始化并收敛 CodeMap 项目状态',
6
+ stable: true,
7
+ args: [],
8
+ flags: [
9
+ {
10
+ name: 'yes',
11
+ short: 'y',
12
+ long: 'yes',
13
+ description: '使用默认配置,不询问',
14
+ type: 'boolean',
15
+ defaultValue: false,
16
+ },
17
+ {
18
+ name: 'interactive',
19
+ long: 'interactive',
20
+ description: '仅显示 reconciliation preview,不写入文件',
21
+ type: 'boolean',
22
+ defaultValue: false,
23
+ },
24
+ {
25
+ name: 'json',
26
+ short: 'j',
27
+ long: 'json',
28
+ description: 'JSON 格式输出收据',
29
+ type: 'boolean',
30
+ defaultValue: false,
31
+ },
32
+ {
33
+ name: 'profile',
34
+ long: 'profile',
35
+ description: '跳过检测,直接应用指定内置 profile',
36
+ type: 'string',
37
+ defaultValue: undefined,
38
+ },
39
+ ],
40
+ outputShape: {
41
+ description: '初始化结果收据',
42
+ type: 'object',
43
+ properties: [
44
+ {
45
+ name: 'converged',
46
+ type: 'boolean',
47
+ description: '是否已收敛',
48
+ },
49
+ {
50
+ name: 'configPath',
51
+ type: 'string',
52
+ nullable: true,
53
+ description: '配置文件路径',
54
+ },
55
+ {
56
+ name: 'created',
57
+ type: 'array',
58
+ description: '创建的文件列表',
59
+ items: {
60
+ name: 'file',
61
+ type: 'object',
62
+ properties: [
63
+ { name: 'path', type: 'string' },
64
+ { name: 'type', type: 'string', description: 'config | hook | rule | receipt' },
65
+ ],
66
+ },
67
+ },
68
+ {
69
+ name: 'warnings',
70
+ type: 'array',
71
+ nullable: true,
72
+ description: '警告信息',
73
+ items: {
74
+ name: 'warning',
75
+ type: 'object',
76
+ properties: [
77
+ { name: 'message', type: 'string' },
78
+ { name: 'severity', type: 'string' },
79
+ ],
80
+ },
81
+ },
82
+ ],
83
+ },
84
+ errorCodes: [
85
+ { code: 'INIT_ALREADY_INITIALIZED', description: '项目已初始化,使用 --yes 强制覆盖' },
86
+ { code: 'INIT_CWD_NOT_FOUND', description: '当前目录不存在' },
87
+ ],
88
+ examples: [
89
+ 'codemap init',
90
+ 'codemap init -y',
91
+ 'codemap init --interactive',
92
+ 'codemap init --json',
93
+ 'codemap init --profile nodejs',
94
+ ],
95
+ };
96
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/init.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,yDAAyD;AAIzD,MAAM,CAAC,MAAM,YAAY,GAAoB;IAC3C,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,qBAAqB;IAClC,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,EAAE;IACR,KAAK,EAAE;QACL;YACE,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;QACD;YACE,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,kCAAkC;YAC/C,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;QACD;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,KAAK;SACpB;QACD;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,uBAAuB;YACpC,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,SAAS;SACxB;KACF;IACD,WAAW,EAAE;QACX,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV;gBACE,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,OAAO;aACrB;YACD;gBACE,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,QAAQ;aACtB;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,SAAS;gBACtB,KAAK,EAAE;oBACL,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAChC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE;qBAChF;iBACF;aACF;YACD;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE;oBACL,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACnC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;qBACrC;iBACF;aACF;SACF;KACF;IACD,UAAU,EAAE;QACV,EAAE,IAAI,EAAE,0BAA0B,EAAE,WAAW,EAAE,sBAAsB,EAAE;QACzE,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,SAAS,EAAE;KACvD;IACD,QAAQ,EAAE;QACR,cAAc;QACd,iBAAiB;QACjB,4BAA4B;QAC5B,qBAAqB;QACrB,+BAA+B;KAChC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CommandContract } from '../types.js';
2
+ export declare const previewContract: CommandContract;
3
+ //# sourceMappingURL=preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../../src/cli/interface-contract/commands/preview.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,eAAe,EAAE,eAkH7B,CAAC"}