silvermoon 0.3.0 → 0.4.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 (812) hide show
  1. package/README.md +28 -28
  2. package/README.zh-CN.md +26 -24
  3. package/dist/bin/build-npm-tarball.d.ts +28 -0
  4. package/dist/bin/build-npm-tarball.d.ts.map +1 -0
  5. package/dist/bin/build-npm-tarball.js +200 -0
  6. package/dist/bin/build-npm-tarball.js.map +1 -0
  7. package/dist/bin/check-pack.d.ts +2 -0
  8. package/dist/bin/check-pack.d.ts.map +1 -0
  9. package/dist/bin/check-pack.js +421 -0
  10. package/dist/bin/check-pack.js.map +1 -0
  11. package/dist/bin/ci-package-risk.d.ts +19 -0
  12. package/dist/bin/ci-package-risk.d.ts.map +1 -0
  13. package/dist/bin/ci-package-risk.js +78 -0
  14. package/dist/bin/ci-package-risk.js.map +1 -0
  15. package/dist/bin/generate-npm-readme.d.ts +7 -0
  16. package/dist/bin/generate-npm-readme.d.ts.map +1 -0
  17. package/dist/bin/generate-npm-readme.js +232 -0
  18. package/dist/bin/generate-npm-readme.js.map +1 -0
  19. package/dist/bin/migrate-v1-to-v2.d.ts +3 -0
  20. package/dist/bin/migrate-v1-to-v2.d.ts.map +1 -0
  21. package/dist/bin/migrate-v1-to-v2.js +25 -0
  22. package/dist/bin/migrate-v1-to-v2.js.map +1 -0
  23. package/dist/bin/prepare-npm-release.d.ts +46 -0
  24. package/dist/bin/prepare-npm-release.d.ts.map +1 -0
  25. package/dist/bin/prepare-npm-release.js +210 -0
  26. package/dist/bin/prepare-npm-release.js.map +1 -0
  27. package/dist/bin/pure-check.d.ts +15 -0
  28. package/dist/bin/pure-check.d.ts.map +1 -0
  29. package/dist/bin/pure-check.js +448 -0
  30. package/dist/bin/pure-check.js.map +1 -0
  31. package/dist/bin/run-checks.d.ts +34 -0
  32. package/dist/bin/run-checks.d.ts.map +1 -0
  33. package/dist/bin/run-checks.js +149 -0
  34. package/dist/bin/run-checks.js.map +1 -0
  35. package/dist/bin/silvermoon.d.ts +76 -0
  36. package/dist/bin/silvermoon.d.ts.map +1 -0
  37. package/dist/bin/silvermoon.js +401 -0
  38. package/dist/bin/silvermoon.js.map +1 -0
  39. package/dist/bin/sync-skills.d.ts +2 -0
  40. package/dist/bin/sync-skills.d.ts.map +1 -0
  41. package/dist/bin/sync-skills.js +78 -0
  42. package/dist/bin/sync-skills.js.map +1 -0
  43. package/dist/bin/verify-npm-release.d.ts +55 -0
  44. package/dist/bin/verify-npm-release.d.ts.map +1 -0
  45. package/dist/bin/verify-npm-release.js +418 -0
  46. package/dist/bin/verify-npm-release.js.map +1 -0
  47. package/dist/src/business/agent-copilot.d.ts +82 -0
  48. package/dist/src/business/agent-copilot.d.ts.map +1 -0
  49. package/dist/src/business/agent-copilot.js +330 -0
  50. package/dist/src/business/agent-copilot.js.map +1 -0
  51. package/dist/src/business/agent-project-registry.d.ts +22 -0
  52. package/dist/src/business/agent-project-registry.d.ts.map +1 -0
  53. package/dist/src/business/agent-project-registry.js +239 -0
  54. package/dist/src/business/agent-project-registry.js.map +1 -0
  55. package/dist/src/business/agent-project-runtime.d.ts +37 -0
  56. package/dist/src/business/agent-project-runtime.d.ts.map +1 -0
  57. package/dist/src/business/agent-project-runtime.js +198 -0
  58. package/dist/src/business/agent-project-runtime.js.map +1 -0
  59. package/dist/src/business/append-event-history.d.ts +21 -0
  60. package/dist/src/business/append-event-history.d.ts.map +1 -0
  61. package/dist/src/business/append-event-history.js +138 -0
  62. package/dist/src/business/append-event-history.js.map +1 -0
  63. package/dist/src/business/append-event.d.ts +140 -0
  64. package/dist/src/business/append-event.d.ts.map +1 -0
  65. package/dist/src/business/append-event.js +292 -0
  66. package/dist/src/business/append-event.js.map +1 -0
  67. package/dist/src/business/check-repository.d.ts +109 -0
  68. package/dist/src/business/check-repository.d.ts.map +1 -0
  69. package/dist/src/business/check-repository.js +379 -0
  70. package/dist/src/business/check-repository.js.map +1 -0
  71. package/dist/src/business/create-idea.d.ts +100 -0
  72. package/dist/src/business/create-idea.d.ts.map +1 -0
  73. package/dist/src/business/create-idea.js +224 -0
  74. package/dist/src/business/create-idea.js.map +1 -0
  75. package/dist/src/business/event-command.d.ts +111 -0
  76. package/dist/src/business/event-command.d.ts.map +1 -0
  77. package/dist/src/business/event-command.js +239 -0
  78. package/dist/src/business/event-command.js.map +1 -0
  79. package/dist/src/business/index.d.ts +7 -0
  80. package/dist/src/business/index.d.ts.map +1 -0
  81. package/dist/src/business/index.js +7 -0
  82. package/dist/src/business/index.js.map +1 -0
  83. package/dist/src/business/list-ideas.d.ts +97 -0
  84. package/dist/src/business/list-ideas.d.ts.map +1 -0
  85. package/dist/src/business/list-ideas.js +177 -0
  86. package/dist/src/business/list-ideas.js.map +1 -0
  87. package/dist/src/business/migrate-v1-to-v2.d.ts +23 -0
  88. package/dist/src/business/migrate-v1-to-v2.d.ts.map +1 -0
  89. package/dist/src/business/migrate-v1-to-v2.js +152 -0
  90. package/dist/src/business/migrate-v1-to-v2.js.map +1 -0
  91. package/dist/src/business/replay-events.d.ts +20 -0
  92. package/dist/src/business/replay-events.d.ts.map +1 -0
  93. package/dist/src/business/replay-events.js +27 -0
  94. package/dist/src/business/replay-events.js.map +1 -0
  95. package/dist/src/business/schema-migration.d.ts +19 -0
  96. package/dist/src/business/schema-migration.d.ts.map +1 -0
  97. package/dist/src/business/schema-migration.js +23 -0
  98. package/dist/src/business/schema-migration.js.map +1 -0
  99. package/dist/src/business/shared/assess-idea-creation-readiness.d.ts +3 -0
  100. package/dist/src/business/shared/assess-idea-creation-readiness.d.ts.map +1 -0
  101. package/dist/src/business/shared/assess-idea-creation-readiness.js +9 -0
  102. package/dist/src/business/shared/assess-idea-creation-readiness.js.map +1 -0
  103. package/dist/src/business/shared/assess-repository-readiness-with.d.ts +18 -0
  104. package/dist/src/business/shared/assess-repository-readiness-with.d.ts.map +1 -0
  105. package/dist/src/business/shared/assess-repository-readiness-with.js +125 -0
  106. package/dist/src/business/shared/assess-repository-readiness-with.js.map +1 -0
  107. package/dist/src/business/shared/assess-repository-readiness.d.ts +3 -0
  108. package/dist/src/business/shared/assess-repository-readiness.d.ts.map +1 -0
  109. package/dist/src/business/shared/assess-repository-readiness.js +6 -0
  110. package/dist/src/business/shared/assess-repository-readiness.js.map +1 -0
  111. package/dist/src/business/shared/business-types.d.ts +151 -0
  112. package/dist/src/business/shared/business-types.d.ts.map +1 -0
  113. package/dist/src/business/shared/business-types.js +83 -0
  114. package/dist/src/business/shared/business-types.js.map +1 -0
  115. package/dist/src/business/shared/evaluate-local-readiness.d.ts +9 -0
  116. package/dist/src/business/shared/evaluate-local-readiness.d.ts.map +1 -0
  117. package/dist/src/business/shared/evaluate-local-readiness.js +97 -0
  118. package/dist/src/business/shared/evaluate-local-readiness.js.map +1 -0
  119. package/dist/src/business/shared/evaluate-primary-relation.d.ts +12 -0
  120. package/dist/src/business/shared/evaluate-primary-relation.d.ts.map +1 -0
  121. package/dist/src/business/shared/evaluate-primary-relation.js +40 -0
  122. package/dist/src/business/shared/evaluate-primary-relation.js.map +1 -0
  123. package/dist/src/business/shared/idea-layout.d.ts +55 -0
  124. package/dist/src/business/shared/idea-layout.d.ts.map +1 -0
  125. package/dist/src/business/shared/idea-layout.js +434 -0
  126. package/dist/src/business/shared/idea-layout.js.map +1 -0
  127. package/dist/src/business/shared/index.d.ts +18 -0
  128. package/dist/src/business/shared/index.d.ts.map +1 -0
  129. package/dist/src/business/shared/index.js +17 -0
  130. package/dist/src/business/shared/index.js.map +1 -0
  131. package/dist/src/business/shared/inspect-candidate.d.ts +5 -0
  132. package/dist/src/business/shared/inspect-candidate.d.ts.map +1 -0
  133. package/dist/src/business/shared/inspect-candidate.js +57 -0
  134. package/dist/src/business/shared/inspect-candidate.js.map +1 -0
  135. package/dist/src/business/shared/metadata-failure-observation.d.ts +21 -0
  136. package/dist/src/business/shared/metadata-failure-observation.d.ts.map +1 -0
  137. package/dist/src/business/shared/metadata-failure-observation.js +30 -0
  138. package/dist/src/business/shared/metadata-failure-observation.js.map +1 -0
  139. package/dist/src/business/shared/observe-device.d.ts +150 -0
  140. package/dist/src/business/shared/observe-device.d.ts.map +1 -0
  141. package/dist/src/business/shared/observe-device.js +71 -0
  142. package/dist/src/business/shared/observe-device.js.map +1 -0
  143. package/dist/src/business/shared/observe-idea.d.ts +14 -0
  144. package/dist/src/business/shared/observe-idea.d.ts.map +1 -0
  145. package/dist/src/business/shared/observe-idea.js +14 -0
  146. package/dist/src/business/shared/observe-idea.js.map +1 -0
  147. package/dist/src/business/shared/observe-project.d.ts +39 -0
  148. package/dist/src/business/shared/observe-project.d.ts.map +1 -0
  149. package/dist/src/business/shared/observe-project.js +11 -0
  150. package/dist/src/business/shared/observe-project.js.map +1 -0
  151. package/dist/src/business/shared/observe-snapshot.d.ts +35 -0
  152. package/dist/src/business/shared/observe-snapshot.d.ts.map +1 -0
  153. package/dist/src/business/shared/observe-snapshot.js +518 -0
  154. package/dist/src/business/shared/observe-snapshot.js.map +1 -0
  155. package/dist/src/business/shared/read-idea-inventory-item.d.ts +13 -0
  156. package/dist/src/business/shared/read-idea-inventory-item.d.ts.map +1 -0
  157. package/dist/src/business/shared/read-idea-inventory-item.js +18 -0
  158. package/dist/src/business/shared/read-idea-inventory-item.js.map +1 -0
  159. package/dist/src/business/shared/resolve-idea.d.ts +7 -0
  160. package/dist/src/business/shared/resolve-idea.d.ts.map +1 -0
  161. package/dist/src/business/shared/resolve-idea.js +14 -0
  162. package/dist/src/business/shared/resolve-idea.js.map +1 -0
  163. package/dist/src/business/shared/with-observation-language.d.ts +3 -0
  164. package/dist/src/business/shared/with-observation-language.d.ts.map +1 -0
  165. package/dist/src/business/shared/with-observation-language.js +20 -0
  166. package/dist/src/business/shared/with-observation-language.js.map +1 -0
  167. package/dist/src/business/whats-next.d.ts +94 -0
  168. package/dist/src/business/whats-next.d.ts.map +1 -0
  169. package/dist/src/business/whats-next.js +208 -0
  170. package/dist/src/business/whats-next.js.map +1 -0
  171. package/dist/src/foundation/command-message/index.d.ts +3 -0
  172. package/dist/src/foundation/command-message/index.d.ts.map +1 -0
  173. package/dist/src/foundation/command-message/index.js +3 -0
  174. package/dist/src/foundation/command-message/index.js.map +1 -0
  175. package/dist/src/foundation/command-message/observation.d.ts +223 -0
  176. package/dist/src/foundation/command-message/observation.d.ts.map +1 -0
  177. package/dist/src/foundation/command-message/observation.js +364 -0
  178. package/dist/src/foundation/command-message/observation.js.map +1 -0
  179. package/dist/src/foundation/command-message/runtime.d.ts +214 -0
  180. package/dist/src/foundation/command-message/runtime.d.ts.map +1 -0
  181. package/dist/src/foundation/command-message/runtime.js +215 -0
  182. package/dist/src/foundation/command-message/runtime.js.map +1 -0
  183. package/dist/src/foundation/coordinates/index.d.ts +3 -0
  184. package/dist/src/foundation/coordinates/index.d.ts.map +1 -0
  185. package/dist/src/foundation/coordinates/index.js +3 -0
  186. package/dist/src/foundation/coordinates/index.js.map +1 -0
  187. package/dist/src/foundation/coordinates/layout.d.ts +27 -0
  188. package/dist/src/foundation/coordinates/layout.d.ts.map +1 -0
  189. package/dist/src/foundation/coordinates/layout.js +41 -0
  190. package/dist/src/foundation/coordinates/layout.js.map +1 -0
  191. package/dist/src/foundation/coordinates/repository.d.ts +16 -0
  192. package/dist/src/foundation/coordinates/repository.d.ts.map +1 -0
  193. package/dist/src/foundation/coordinates/repository.js +75 -0
  194. package/dist/src/foundation/coordinates/repository.js.map +1 -0
  195. package/dist/src/foundation/device-config/index.d.ts +2 -0
  196. package/dist/src/foundation/device-config/index.d.ts.map +1 -0
  197. package/dist/src/foundation/device-config/index.js +2 -0
  198. package/dist/src/foundation/device-config/index.js.map +1 -0
  199. package/dist/src/foundation/device-config/user-config.d.ts +19 -0
  200. package/dist/src/foundation/device-config/user-config.d.ts.map +1 -0
  201. package/dist/src/foundation/device-config/user-config.js +94 -0
  202. package/dist/src/foundation/device-config/user-config.js.map +1 -0
  203. package/dist/src/foundation/event-codec/grammar.d.ts +172 -0
  204. package/dist/src/foundation/event-codec/grammar.d.ts.map +1 -0
  205. package/dist/src/foundation/event-codec/grammar.js +383 -0
  206. package/dist/src/foundation/event-codec/grammar.js.map +1 -0
  207. package/dist/src/foundation/event-codec/index.d.ts +3 -0
  208. package/dist/src/foundation/event-codec/index.d.ts.map +1 -0
  209. package/dist/src/foundation/event-codec/index.js +2 -0
  210. package/dist/src/foundation/event-codec/index.js.map +1 -0
  211. package/dist/src/foundation/event-cursor/cursor.d.ts +40 -0
  212. package/dist/src/foundation/event-cursor/cursor.d.ts.map +1 -0
  213. package/dist/src/foundation/event-cursor/cursor.js +42 -0
  214. package/dist/src/foundation/event-cursor/cursor.js.map +1 -0
  215. package/dist/src/foundation/event-cursor/index.d.ts +2 -0
  216. package/dist/src/foundation/event-cursor/index.d.ts.map +1 -0
  217. package/dist/src/foundation/event-cursor/index.js +2 -0
  218. package/dist/src/foundation/event-cursor/index.js.map +1 -0
  219. package/dist/src/foundation/event-history/digest.d.ts +2 -0
  220. package/dist/src/foundation/event-history/digest.d.ts.map +1 -0
  221. package/dist/src/foundation/event-history/digest.js +2 -0
  222. package/dist/src/foundation/event-history/digest.js.map +1 -0
  223. package/dist/src/foundation/event-history/history.d.ts +86 -0
  224. package/dist/src/foundation/event-history/history.d.ts.map +1 -0
  225. package/dist/src/foundation/event-history/history.js +481 -0
  226. package/dist/src/foundation/event-history/history.js.map +1 -0
  227. package/dist/src/foundation/event-history/index.d.ts +3 -0
  228. package/dist/src/foundation/event-history/index.d.ts.map +1 -0
  229. package/dist/src/foundation/event-history/index.js +3 -0
  230. package/dist/src/foundation/event-history/index.js.map +1 -0
  231. package/dist/src/foundation/event-reducer/index.d.ts +2 -0
  232. package/dist/src/foundation/event-reducer/index.d.ts.map +1 -0
  233. package/dist/src/foundation/event-reducer/index.js +2 -0
  234. package/dist/src/foundation/event-reducer/index.js.map +1 -0
  235. package/dist/src/foundation/event-reducer/policy.d.ts +69 -0
  236. package/dist/src/foundation/event-reducer/policy.d.ts.map +1 -0
  237. package/dist/src/foundation/event-reducer/policy.js +138 -0
  238. package/dist/src/foundation/event-reducer/policy.js.map +1 -0
  239. package/dist/src/foundation/event-store/digest.d.ts +11 -0
  240. package/dist/src/foundation/event-store/digest.d.ts.map +1 -0
  241. package/dist/src/foundation/event-store/digest.js +38 -0
  242. package/dist/src/foundation/event-store/digest.js.map +1 -0
  243. package/dist/src/foundation/event-store/index.d.ts +3 -0
  244. package/dist/src/foundation/event-store/index.d.ts.map +1 -0
  245. package/dist/src/foundation/event-store/index.js +3 -0
  246. package/dist/src/foundation/event-store/index.js.map +1 -0
  247. package/dist/src/foundation/event-store/storage.d.ts +50 -0
  248. package/dist/src/foundation/event-store/storage.d.ts.map +1 -0
  249. package/dist/src/foundation/event-store/storage.js +109 -0
  250. package/dist/src/foundation/event-store/storage.js.map +1 -0
  251. package/dist/src/foundation/git/derived-cache.d.ts +5 -0
  252. package/dist/src/foundation/git/derived-cache.d.ts.map +1 -0
  253. package/dist/src/foundation/git/derived-cache.js +117 -0
  254. package/dist/src/foundation/git/derived-cache.js.map +1 -0
  255. package/dist/src/foundation/git/git.d.ts +100 -0
  256. package/dist/src/foundation/git/git.d.ts.map +1 -0
  257. package/dist/src/foundation/git/git.js +677 -0
  258. package/dist/src/foundation/git/git.js.map +1 -0
  259. package/dist/src/foundation/git/index.d.ts +3 -0
  260. package/dist/src/foundation/git/index.d.ts.map +1 -0
  261. package/dist/src/foundation/git/index.js +3 -0
  262. package/dist/src/foundation/git/index.js.map +1 -0
  263. package/dist/src/foundation/guidance/guidance.d.ts +36 -0
  264. package/dist/src/foundation/guidance/guidance.d.ts.map +1 -0
  265. package/dist/src/foundation/guidance/guidance.js +198 -0
  266. package/dist/src/foundation/guidance/guidance.js.map +1 -0
  267. package/dist/src/foundation/guidance/index.d.ts +3 -0
  268. package/dist/src/foundation/guidance/index.d.ts.map +1 -0
  269. package/dist/src/foundation/guidance/index.js +3 -0
  270. package/dist/src/foundation/guidance/index.js.map +1 -0
  271. package/dist/src/foundation/guidance/rules.d.ts +36 -0
  272. package/dist/src/foundation/guidance/rules.d.ts.map +1 -0
  273. package/dist/src/foundation/guidance/rules.js +65 -0
  274. package/dist/src/foundation/guidance/rules.js.map +1 -0
  275. package/dist/src/foundation/idea-model/index.d.ts +3 -0
  276. package/dist/src/foundation/idea-model/index.d.ts.map +1 -0
  277. package/dist/src/foundation/idea-model/index.js +3 -0
  278. package/dist/src/foundation/idea-model/index.js.map +1 -0
  279. package/dist/src/foundation/idea-model/status.d.ts +28 -0
  280. package/dist/src/foundation/idea-model/status.d.ts.map +1 -0
  281. package/dist/src/foundation/idea-model/status.js +192 -0
  282. package/dist/src/foundation/idea-model/status.js.map +1 -0
  283. package/dist/src/foundation/idea-model/ulid.d.ts +6 -0
  284. package/dist/src/foundation/idea-model/ulid.d.ts.map +1 -0
  285. package/dist/src/foundation/idea-model/ulid.js +16 -0
  286. package/dist/src/foundation/idea-model/ulid.js.map +1 -0
  287. package/dist/src/foundation/idea-query/index.d.ts +3 -0
  288. package/dist/src/foundation/idea-query/index.d.ts.map +1 -0
  289. package/dist/src/foundation/idea-query/index.js +3 -0
  290. package/dist/src/foundation/idea-query/index.js.map +1 -0
  291. package/dist/src/foundation/idea-query/query.d.ts +13 -0
  292. package/dist/src/foundation/idea-query/query.d.ts.map +1 -0
  293. package/dist/src/foundation/idea-query/query.js +17 -0
  294. package/dist/src/foundation/idea-query/query.js.map +1 -0
  295. package/dist/src/foundation/idea-query/rules.d.ts +55 -0
  296. package/dist/src/foundation/idea-query/rules.d.ts.map +1 -0
  297. package/dist/src/foundation/idea-query/rules.js +223 -0
  298. package/dist/src/foundation/idea-query/rules.js.map +1 -0
  299. package/dist/src/foundation/idea-template/index.d.ts +2 -0
  300. package/dist/src/foundation/idea-template/index.d.ts.map +1 -0
  301. package/dist/src/foundation/idea-template/index.js +2 -0
  302. package/dist/src/foundation/idea-template/index.js.map +1 -0
  303. package/dist/src/foundation/idea-template/templates.d.ts +21 -0
  304. package/dist/src/foundation/idea-template/templates.d.ts.map +1 -0
  305. package/dist/src/foundation/idea-template/templates.js +265 -0
  306. package/dist/src/foundation/idea-template/templates.js.map +1 -0
  307. package/dist/src/foundation/installation/device-readiness.d.ts +94 -0
  308. package/dist/src/foundation/installation/device-readiness.d.ts.map +1 -0
  309. package/dist/src/foundation/installation/device-readiness.js +274 -0
  310. package/dist/src/foundation/installation/device-readiness.js.map +1 -0
  311. package/dist/src/foundation/installation/index.d.ts +4 -0
  312. package/dist/src/foundation/installation/index.d.ts.map +1 -0
  313. package/dist/src/foundation/installation/index.js +4 -0
  314. package/dist/src/foundation/installation/index.js.map +1 -0
  315. package/dist/src/foundation/installation/installation.d.ts +25 -0
  316. package/dist/src/foundation/installation/installation.d.ts.map +1 -0
  317. package/dist/src/foundation/installation/installation.js +125 -0
  318. package/dist/src/foundation/installation/installation.js.map +1 -0
  319. package/dist/src/foundation/installation/rules.d.ts +12 -0
  320. package/dist/src/foundation/installation/rules.d.ts.map +1 -0
  321. package/dist/src/foundation/installation/rules.js +63 -0
  322. package/dist/src/foundation/installation/rules.js.map +1 -0
  323. package/dist/src/foundation/language/index.d.ts +3 -0
  324. package/dist/src/foundation/language/index.d.ts.map +1 -0
  325. package/dist/src/foundation/language/index.js +2 -0
  326. package/dist/src/foundation/language/index.js.map +1 -0
  327. package/dist/src/foundation/language/language.d.ts +36 -0
  328. package/dist/src/foundation/language/language.d.ts.map +1 -0
  329. package/dist/src/foundation/language/language.js +94 -0
  330. package/dist/src/foundation/language/language.js.map +1 -0
  331. package/dist/src/foundation/owned-write/index.d.ts +2 -0
  332. package/dist/src/foundation/owned-write/index.d.ts.map +1 -0
  333. package/dist/src/foundation/owned-write/index.js +2 -0
  334. package/dist/src/foundation/owned-write/index.js.map +1 -0
  335. package/dist/src/foundation/owned-write/writer.d.ts +86 -0
  336. package/dist/src/foundation/owned-write/writer.d.ts.map +1 -0
  337. package/dist/src/foundation/owned-write/writer.js +244 -0
  338. package/dist/src/foundation/owned-write/writer.js.map +1 -0
  339. package/dist/src/foundation/package-resource/index.d.ts +2 -0
  340. package/dist/src/foundation/package-resource/index.d.ts.map +1 -0
  341. package/dist/src/foundation/package-resource/index.js +2 -0
  342. package/dist/src/foundation/package-resource/index.js.map +1 -0
  343. package/dist/src/foundation/package-resource/npm-tarball.d.ts +15 -0
  344. package/dist/src/foundation/package-resource/npm-tarball.d.ts.map +1 -0
  345. package/dist/src/foundation/package-resource/npm-tarball.js +124 -0
  346. package/dist/src/foundation/package-resource/npm-tarball.js.map +1 -0
  347. package/dist/src/foundation/process/index.d.ts +3 -0
  348. package/dist/src/foundation/process/index.d.ts.map +1 -0
  349. package/dist/src/foundation/process/index.js +3 -0
  350. package/dist/src/foundation/process/index.js.map +1 -0
  351. package/dist/src/foundation/process/npm-command.d.ts +9 -0
  352. package/dist/src/foundation/process/npm-command.d.ts.map +1 -0
  353. package/dist/src/foundation/process/npm-command.js +11 -0
  354. package/dist/src/foundation/process/npm-command.js.map +1 -0
  355. package/dist/src/foundation/process/subprocess.d.ts +8 -0
  356. package/dist/src/foundation/process/subprocess.d.ts.map +1 -0
  357. package/dist/src/foundation/process/subprocess.js +12 -0
  358. package/dist/src/foundation/process/subprocess.js.map +1 -0
  359. package/dist/src/foundation/project-config/config.d.ts +30 -0
  360. package/dist/src/foundation/project-config/config.d.ts.map +1 -0
  361. package/dist/src/foundation/project-config/config.js +112 -0
  362. package/dist/src/foundation/project-config/config.js.map +1 -0
  363. package/dist/src/foundation/project-config/index.d.ts +3 -0
  364. package/dist/src/foundation/project-config/index.d.ts.map +1 -0
  365. package/dist/src/foundation/project-config/index.js +3 -0
  366. package/dist/src/foundation/project-config/index.js.map +1 -0
  367. package/dist/src/foundation/project-config/rules.d.ts +32 -0
  368. package/dist/src/foundation/project-config/rules.d.ts.map +1 -0
  369. package/dist/src/foundation/project-config/rules.js +119 -0
  370. package/dist/src/foundation/project-config/rules.js.map +1 -0
  371. package/dist/src/foundation/projection-cache/index.d.ts +2 -0
  372. package/dist/src/foundation/projection-cache/index.d.ts.map +1 -0
  373. package/dist/src/foundation/projection-cache/index.js +2 -0
  374. package/dist/src/foundation/projection-cache/index.js.map +1 -0
  375. package/dist/src/foundation/projection-cache/projection.d.ts +36 -0
  376. package/dist/src/foundation/projection-cache/projection.d.ts.map +1 -0
  377. package/dist/src/foundation/projection-cache/projection.js +105 -0
  378. package/dist/src/foundation/projection-cache/projection.js.map +1 -0
  379. package/dist/src/foundation/renderer/index.d.ts +3 -0
  380. package/dist/src/foundation/renderer/index.d.ts.map +1 -0
  381. package/dist/src/foundation/renderer/index.js +3 -0
  382. package/dist/src/foundation/renderer/index.js.map +1 -0
  383. package/dist/src/foundation/renderer/markdown.d.ts +7 -0
  384. package/dist/src/foundation/renderer/markdown.d.ts.map +1 -0
  385. package/dist/src/foundation/renderer/markdown.js +355 -0
  386. package/dist/src/foundation/renderer/markdown.js.map +1 -0
  387. package/dist/src/foundation/renderer/render.d.ts +6 -0
  388. package/dist/src/foundation/renderer/render.d.ts.map +1 -0
  389. package/dist/src/foundation/renderer/render.js +23 -0
  390. package/dist/src/foundation/renderer/render.js.map +1 -0
  391. package/dist/src/foundation/report/dialogue.d.ts +37 -0
  392. package/dist/src/foundation/report/dialogue.d.ts.map +1 -0
  393. package/dist/src/foundation/report/dialogue.js +59 -0
  394. package/dist/src/foundation/report/dialogue.js.map +1 -0
  395. package/dist/src/foundation/report/index.d.ts +6 -0
  396. package/dist/src/foundation/report/index.d.ts.map +1 -0
  397. package/dist/src/foundation/report/index.js +6 -0
  398. package/dist/src/foundation/report/index.js.map +1 -0
  399. package/dist/src/foundation/report/instructions.d.ts +77 -0
  400. package/dist/src/foundation/report/instructions.d.ts.map +1 -0
  401. package/dist/src/foundation/report/instructions.js +374 -0
  402. package/dist/src/foundation/report/instructions.js.map +1 -0
  403. package/dist/src/foundation/report/observation.d.ts +31 -0
  404. package/dist/src/foundation/report/observation.d.ts.map +1 -0
  405. package/dist/src/foundation/report/observation.js +83 -0
  406. package/dist/src/foundation/report/observation.js.map +1 -0
  407. package/dist/src/foundation/report/projection.d.ts +7 -0
  408. package/dist/src/foundation/report/projection.d.ts.map +1 -0
  409. package/dist/src/foundation/report/projection.js +199 -0
  410. package/dist/src/foundation/report/projection.js.map +1 -0
  411. package/dist/src/foundation/report/templates/whats-next/contract.d.ts +148 -0
  412. package/dist/src/foundation/report/templates/whats-next/contract.d.ts.map +1 -0
  413. package/dist/src/foundation/report/templates/whats-next/contract.js +34 -0
  414. package/dist/src/foundation/report/templates/whats-next/contract.js.map +1 -0
  415. package/dist/src/foundation/report/templates/whats-next/en-US/content-language.d.ts +9 -0
  416. package/dist/src/foundation/report/templates/whats-next/en-US/content-language.d.ts.map +1 -0
  417. package/dist/src/foundation/report/templates/whats-next/en-US/content-language.js +5 -0
  418. package/dist/src/foundation/report/templates/whats-next/en-US/content-language.js.map +1 -0
  419. package/dist/src/foundation/report/templates/whats-next/en-US/detached-head.d.ts +9 -0
  420. package/dist/src/foundation/report/templates/whats-next/en-US/detached-head.d.ts.map +1 -0
  421. package/dist/src/foundation/report/templates/whats-next/en-US/detached-head.js +10 -0
  422. package/dist/src/foundation/report/templates/whats-next/en-US/detached-head.js.map +1 -0
  423. package/dist/src/foundation/report/templates/whats-next/en-US/event-history-invalid.d.ts +9 -0
  424. package/dist/src/foundation/report/templates/whats-next/en-US/event-history-invalid.d.ts.map +1 -0
  425. package/dist/src/foundation/report/templates/whats-next/en-US/event-history-invalid.js +5 -0
  426. package/dist/src/foundation/report/templates/whats-next/en-US/event-history-invalid.js.map +1 -0
  427. package/dist/src/foundation/report/templates/whats-next/en-US/head-missing.d.ts +9 -0
  428. package/dist/src/foundation/report/templates/whats-next/en-US/head-missing.d.ts.map +1 -0
  429. package/dist/src/foundation/report/templates/whats-next/en-US/head-missing.js +8 -0
  430. package/dist/src/foundation/report/templates/whats-next/en-US/head-missing.js.map +1 -0
  431. package/dist/src/foundation/report/templates/whats-next/en-US/idea-metadata-unavailable.d.ts +12 -0
  432. package/dist/src/foundation/report/templates/whats-next/en-US/idea-metadata-unavailable.d.ts.map +1 -0
  433. package/dist/src/foundation/report/templates/whats-next/en-US/idea-metadata-unavailable.js +8 -0
  434. package/dist/src/foundation/report/templates/whats-next/en-US/idea-metadata-unavailable.js.map +1 -0
  435. package/dist/src/foundation/report/templates/whats-next/en-US/idea-not-found.d.ts +9 -0
  436. package/dist/src/foundation/report/templates/whats-next/en-US/idea-not-found.d.ts.map +1 -0
  437. package/dist/src/foundation/report/templates/whats-next/en-US/idea-not-found.js +5 -0
  438. package/dist/src/foundation/report/templates/whats-next/en-US/idea-not-found.js.map +1 -0
  439. package/dist/src/foundation/report/templates/whats-next/en-US/index.d.ts +63 -0
  440. package/dist/src/foundation/report/templates/whats-next/en-US/index.d.ts.map +1 -0
  441. package/dist/src/foundation/report/templates/whats-next/en-US/index.js +63 -0
  442. package/dist/src/foundation/report/templates/whats-next/en-US/index.js.map +1 -0
  443. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-deploying.d.ts +9 -0
  444. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-deploying.d.ts.map +1 -0
  445. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-deploying.js +13 -0
  446. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-deploying.js.map +1 -0
  447. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-implementing.d.ts +9 -0
  448. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-implementing.d.ts.map +1 -0
  449. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-implementing.js +13 -0
  450. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-implementing.js.map +1 -0
  451. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-inactive.d.ts +9 -0
  452. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-inactive.d.ts.map +1 -0
  453. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-inactive.js +11 -0
  454. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-inactive.js.map +1 -0
  455. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-preparing.d.ts +9 -0
  456. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-preparing.d.ts.map +1 -0
  457. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-preparing.js +13 -0
  458. package/dist/src/foundation/report/templates/whats-next/en-US/lifecycle-preparing.js.map +1 -0
  459. package/dist/src/foundation/report/templates/whats-next/en-US/navigation-ready.d.ts +9 -0
  460. package/dist/src/foundation/report/templates/whats-next/en-US/navigation-ready.d.ts.map +1 -0
  461. package/dist/src/foundation/report/templates/whats-next/en-US/navigation-ready.js +9 -0
  462. package/dist/src/foundation/report/templates/whats-next/en-US/navigation-ready.js.map +1 -0
  463. package/dist/src/foundation/report/templates/whats-next/en-US/phase-guidance-invalid.d.ts +9 -0
  464. package/dist/src/foundation/report/templates/whats-next/en-US/phase-guidance-invalid.d.ts.map +1 -0
  465. package/dist/src/foundation/report/templates/whats-next/en-US/phase-guidance-invalid.js +5 -0
  466. package/dist/src/foundation/report/templates/whats-next/en-US/phase-guidance-invalid.js.map +1 -0
  467. package/dist/src/foundation/report/templates/whats-next/en-US/preparation-seed.d.ts +9 -0
  468. package/dist/src/foundation/report/templates/whats-next/en-US/preparation-seed.d.ts.map +1 -0
  469. package/dist/src/foundation/report/templates/whats-next/en-US/preparation-seed.js +5 -0
  470. package/dist/src/foundation/report/templates/whats-next/en-US/preparation-seed.js.map +1 -0
  471. package/dist/src/foundation/report/templates/whats-next/en-US/primary-ahead.d.ts +9 -0
  472. package/dist/src/foundation/report/templates/whats-next/en-US/primary-ahead.d.ts.map +1 -0
  473. package/dist/src/foundation/report/templates/whats-next/en-US/primary-ahead.js +8 -0
  474. package/dist/src/foundation/report/templates/whats-next/en-US/primary-ahead.js.map +1 -0
  475. package/dist/src/foundation/report/templates/whats-next/en-US/primary-ancestry-inspection-failed.d.ts +9 -0
  476. package/dist/src/foundation/report/templates/whats-next/en-US/primary-ancestry-inspection-failed.d.ts.map +1 -0
  477. package/dist/src/foundation/report/templates/whats-next/en-US/primary-ancestry-inspection-failed.js +5 -0
  478. package/dist/src/foundation/report/templates/whats-next/en-US/primary-ancestry-inspection-failed.js.map +1 -0
  479. package/dist/src/foundation/report/templates/whats-next/en-US/primary-behind.d.ts +9 -0
  480. package/dist/src/foundation/report/templates/whats-next/en-US/primary-behind.d.ts.map +1 -0
  481. package/dist/src/foundation/report/templates/whats-next/en-US/primary-behind.js +8 -0
  482. package/dist/src/foundation/report/templates/whats-next/en-US/primary-behind.js.map +1 -0
  483. package/dist/src/foundation/report/templates/whats-next/en-US/primary-diverged.d.ts +9 -0
  484. package/dist/src/foundation/report/templates/whats-next/en-US/primary-diverged.d.ts.map +1 -0
  485. package/dist/src/foundation/report/templates/whats-next/en-US/primary-diverged.js +8 -0
  486. package/dist/src/foundation/report/templates/whats-next/en-US/primary-diverged.js.map +1 -0
  487. package/dist/src/foundation/report/templates/whats-next/en-US/primary-fetch-failed.d.ts +9 -0
  488. package/dist/src/foundation/report/templates/whats-next/en-US/primary-fetch-failed.d.ts.map +1 -0
  489. package/dist/src/foundation/report/templates/whats-next/en-US/primary-fetch-failed.js +5 -0
  490. package/dist/src/foundation/report/templates/whats-next/en-US/primary-fetch-failed.js.map +1 -0
  491. package/dist/src/foundation/report/templates/whats-next/en-US/primary-history-incomplete.d.ts +9 -0
  492. package/dist/src/foundation/report/templates/whats-next/en-US/primary-history-incomplete.d.ts.map +1 -0
  493. package/dist/src/foundation/report/templates/whats-next/en-US/primary-history-incomplete.js +8 -0
  494. package/dist/src/foundation/report/templates/whats-next/en-US/primary-history-incomplete.js.map +1 -0
  495. package/dist/src/foundation/report/templates/whats-next/en-US/primary-upstream-mismatch.d.ts +9 -0
  496. package/dist/src/foundation/report/templates/whats-next/en-US/primary-upstream-mismatch.d.ts.map +1 -0
  497. package/dist/src/foundation/report/templates/whats-next/en-US/primary-upstream-mismatch.js +11 -0
  498. package/dist/src/foundation/report/templates/whats-next/en-US/primary-upstream-mismatch.js.map +1 -0
  499. package/dist/src/foundation/report/templates/whats-next/en-US/project-recheck.d.ts +9 -0
  500. package/dist/src/foundation/report/templates/whats-next/en-US/project-recheck.d.ts.map +1 -0
  501. package/dist/src/foundation/report/templates/whats-next/en-US/project-recheck.js +5 -0
  502. package/dist/src/foundation/report/templates/whats-next/en-US/project-recheck.js.map +1 -0
  503. package/dist/src/foundation/report/templates/whats-next/en-US/repository-recheck.d.ts +9 -0
  504. package/dist/src/foundation/report/templates/whats-next/en-US/repository-recheck.d.ts.map +1 -0
  505. package/dist/src/foundation/report/templates/whats-next/en-US/repository-recheck.js +5 -0
  506. package/dist/src/foundation/report/templates/whats-next/en-US/repository-recheck.js.map +1 -0
  507. package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation-instruction.d.ts +8 -0
  508. package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation-instruction.d.ts.map +1 -0
  509. package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation-instruction.js +10 -0
  510. package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation-instruction.js.map +1 -0
  511. package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation.d.ts +9 -0
  512. package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation.d.ts.map +1 -0
  513. package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation.js +39 -0
  514. package/dist/src/foundation/report/templates/whats-next/en-US/review-presentation.js.map +1 -0
  515. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-changes-step.d.ts +8 -0
  516. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-changes-step.d.ts.map +1 -0
  517. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-changes-step.js +10 -0
  518. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-changes-step.js.map +1 -0
  519. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflict-step.d.ts +8 -0
  520. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflict-step.d.ts.map +1 -0
  521. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflict-step.js +10 -0
  522. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflict-step.js.map +1 -0
  523. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflicts.d.ts +9 -0
  524. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflicts.d.ts.map +1 -0
  525. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflicts.js +5 -0
  526. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-conflicts.js.map +1 -0
  527. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-inspection-failed.d.ts +9 -0
  528. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-inspection-failed.d.ts.map +1 -0
  529. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-inspection-failed.js +5 -0
  530. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-inspection-failed.js.map +1 -0
  531. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-summary.d.ts +9 -0
  532. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-summary.d.ts.map +1 -0
  533. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-summary.js +12 -0
  534. package/dist/src/foundation/report/templates/whats-next/en-US/worktree-summary.js.map +1 -0
  535. package/dist/src/foundation/report/templates/whats-next/index.d.ts +5 -0
  536. package/dist/src/foundation/report/templates/whats-next/index.d.ts.map +1 -0
  537. package/dist/src/foundation/report/templates/whats-next/index.js +4 -0
  538. package/dist/src/foundation/report/templates/whats-next/index.js.map +1 -0
  539. package/dist/src/foundation/report/templates/whats-next/registry.d.ts +4 -0
  540. package/dist/src/foundation/report/templates/whats-next/registry.d.ts.map +1 -0
  541. package/dist/src/foundation/report/templates/whats-next/registry.js +14 -0
  542. package/dist/src/foundation/report/templates/whats-next/registry.js.map +1 -0
  543. package/dist/src/foundation/report/templates/whats-next/renderers.d.ts +63 -0
  544. package/dist/src/foundation/report/templates/whats-next/renderers.d.ts.map +1 -0
  545. package/dist/src/foundation/report/templates/whats-next/renderers.js +176 -0
  546. package/dist/src/foundation/report/templates/whats-next/renderers.js.map +1 -0
  547. package/dist/src/foundation/report/templates/whats-next/zh-CN/content-language.d.ts +9 -0
  548. package/dist/src/foundation/report/templates/whats-next/zh-CN/content-language.d.ts.map +1 -0
  549. package/dist/src/foundation/report/templates/whats-next/zh-CN/content-language.js +5 -0
  550. package/dist/src/foundation/report/templates/whats-next/zh-CN/content-language.js.map +1 -0
  551. package/dist/src/foundation/report/templates/whats-next/zh-CN/detached-head.d.ts +9 -0
  552. package/dist/src/foundation/report/templates/whats-next/zh-CN/detached-head.d.ts.map +1 -0
  553. package/dist/src/foundation/report/templates/whats-next/zh-CN/detached-head.js +10 -0
  554. package/dist/src/foundation/report/templates/whats-next/zh-CN/detached-head.js.map +1 -0
  555. package/dist/src/foundation/report/templates/whats-next/zh-CN/event-history-invalid.d.ts +9 -0
  556. package/dist/src/foundation/report/templates/whats-next/zh-CN/event-history-invalid.d.ts.map +1 -0
  557. package/dist/src/foundation/report/templates/whats-next/zh-CN/event-history-invalid.js +5 -0
  558. package/dist/src/foundation/report/templates/whats-next/zh-CN/event-history-invalid.js.map +1 -0
  559. package/dist/src/foundation/report/templates/whats-next/zh-CN/head-missing.d.ts +9 -0
  560. package/dist/src/foundation/report/templates/whats-next/zh-CN/head-missing.d.ts.map +1 -0
  561. package/dist/src/foundation/report/templates/whats-next/zh-CN/head-missing.js +8 -0
  562. package/dist/src/foundation/report/templates/whats-next/zh-CN/head-missing.js.map +1 -0
  563. package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-metadata-unavailable.d.ts +12 -0
  564. package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-metadata-unavailable.d.ts.map +1 -0
  565. package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-metadata-unavailable.js +8 -0
  566. package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-metadata-unavailable.js.map +1 -0
  567. package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-not-found.d.ts +9 -0
  568. package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-not-found.d.ts.map +1 -0
  569. package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-not-found.js +5 -0
  570. package/dist/src/foundation/report/templates/whats-next/zh-CN/idea-not-found.js.map +1 -0
  571. package/dist/src/foundation/report/templates/whats-next/zh-CN/index.d.ts +63 -0
  572. package/dist/src/foundation/report/templates/whats-next/zh-CN/index.d.ts.map +1 -0
  573. package/dist/src/foundation/report/templates/whats-next/zh-CN/index.js +63 -0
  574. package/dist/src/foundation/report/templates/whats-next/zh-CN/index.js.map +1 -0
  575. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-deploying.d.ts +9 -0
  576. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-deploying.d.ts.map +1 -0
  577. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-deploying.js +13 -0
  578. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-deploying.js.map +1 -0
  579. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-implementing.d.ts +9 -0
  580. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-implementing.d.ts.map +1 -0
  581. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-implementing.js +13 -0
  582. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-implementing.js.map +1 -0
  583. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-inactive.d.ts +9 -0
  584. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-inactive.d.ts.map +1 -0
  585. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-inactive.js +11 -0
  586. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-inactive.js.map +1 -0
  587. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-preparing.d.ts +9 -0
  588. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-preparing.d.ts.map +1 -0
  589. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-preparing.js +13 -0
  590. package/dist/src/foundation/report/templates/whats-next/zh-CN/lifecycle-preparing.js.map +1 -0
  591. package/dist/src/foundation/report/templates/whats-next/zh-CN/navigation-ready.d.ts +9 -0
  592. package/dist/src/foundation/report/templates/whats-next/zh-CN/navigation-ready.d.ts.map +1 -0
  593. package/dist/src/foundation/report/templates/whats-next/zh-CN/navigation-ready.js +9 -0
  594. package/dist/src/foundation/report/templates/whats-next/zh-CN/navigation-ready.js.map +1 -0
  595. package/dist/src/foundation/report/templates/whats-next/zh-CN/phase-guidance-invalid.d.ts +9 -0
  596. package/dist/src/foundation/report/templates/whats-next/zh-CN/phase-guidance-invalid.d.ts.map +1 -0
  597. package/dist/src/foundation/report/templates/whats-next/zh-CN/phase-guidance-invalid.js +5 -0
  598. package/dist/src/foundation/report/templates/whats-next/zh-CN/phase-guidance-invalid.js.map +1 -0
  599. package/dist/src/foundation/report/templates/whats-next/zh-CN/preparation-seed.d.ts +9 -0
  600. package/dist/src/foundation/report/templates/whats-next/zh-CN/preparation-seed.d.ts.map +1 -0
  601. package/dist/src/foundation/report/templates/whats-next/zh-CN/preparation-seed.js +5 -0
  602. package/dist/src/foundation/report/templates/whats-next/zh-CN/preparation-seed.js.map +1 -0
  603. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ahead.d.ts +9 -0
  604. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ahead.d.ts.map +1 -0
  605. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ahead.js +8 -0
  606. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ahead.js.map +1 -0
  607. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ancestry-inspection-failed.d.ts +9 -0
  608. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ancestry-inspection-failed.d.ts.map +1 -0
  609. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ancestry-inspection-failed.js +5 -0
  610. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-ancestry-inspection-failed.js.map +1 -0
  611. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-behind.d.ts +9 -0
  612. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-behind.d.ts.map +1 -0
  613. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-behind.js +8 -0
  614. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-behind.js.map +1 -0
  615. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-diverged.d.ts +9 -0
  616. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-diverged.d.ts.map +1 -0
  617. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-diverged.js +8 -0
  618. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-diverged.js.map +1 -0
  619. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-fetch-failed.d.ts +9 -0
  620. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-fetch-failed.d.ts.map +1 -0
  621. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-fetch-failed.js +5 -0
  622. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-fetch-failed.js.map +1 -0
  623. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-history-incomplete.d.ts +9 -0
  624. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-history-incomplete.d.ts.map +1 -0
  625. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-history-incomplete.js +8 -0
  626. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-history-incomplete.js.map +1 -0
  627. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-upstream-mismatch.d.ts +9 -0
  628. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-upstream-mismatch.d.ts.map +1 -0
  629. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-upstream-mismatch.js +11 -0
  630. package/dist/src/foundation/report/templates/whats-next/zh-CN/primary-upstream-mismatch.js.map +1 -0
  631. package/dist/src/foundation/report/templates/whats-next/zh-CN/project-recheck.d.ts +9 -0
  632. package/dist/src/foundation/report/templates/whats-next/zh-CN/project-recheck.d.ts.map +1 -0
  633. package/dist/src/foundation/report/templates/whats-next/zh-CN/project-recheck.js +5 -0
  634. package/dist/src/foundation/report/templates/whats-next/zh-CN/project-recheck.js.map +1 -0
  635. package/dist/src/foundation/report/templates/whats-next/zh-CN/repository-recheck.d.ts +9 -0
  636. package/dist/src/foundation/report/templates/whats-next/zh-CN/repository-recheck.d.ts.map +1 -0
  637. package/dist/src/foundation/report/templates/whats-next/zh-CN/repository-recheck.js +5 -0
  638. package/dist/src/foundation/report/templates/whats-next/zh-CN/repository-recheck.js.map +1 -0
  639. package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation-instruction.d.ts +8 -0
  640. package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation-instruction.d.ts.map +1 -0
  641. package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation-instruction.js +10 -0
  642. package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation-instruction.js.map +1 -0
  643. package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation.d.ts +9 -0
  644. package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation.d.ts.map +1 -0
  645. package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation.js +39 -0
  646. package/dist/src/foundation/report/templates/whats-next/zh-CN/review-presentation.js.map +1 -0
  647. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-changes-step.d.ts +8 -0
  648. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-changes-step.d.ts.map +1 -0
  649. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-changes-step.js +10 -0
  650. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-changes-step.js.map +1 -0
  651. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflict-step.d.ts +8 -0
  652. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflict-step.d.ts.map +1 -0
  653. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflict-step.js +10 -0
  654. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflict-step.js.map +1 -0
  655. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflicts.d.ts +9 -0
  656. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflicts.d.ts.map +1 -0
  657. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflicts.js +5 -0
  658. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-conflicts.js.map +1 -0
  659. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-inspection-failed.d.ts +9 -0
  660. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-inspection-failed.d.ts.map +1 -0
  661. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-inspection-failed.js +5 -0
  662. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-inspection-failed.js.map +1 -0
  663. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-summary.d.ts +9 -0
  664. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-summary.d.ts.map +1 -0
  665. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-summary.js +12 -0
  666. package/dist/src/foundation/report/templates/whats-next/zh-CN/worktree-summary.js.map +1 -0
  667. package/dist/src/foundation/report/types.d.ts +321 -0
  668. package/dist/src/foundation/report/types.d.ts.map +1 -0
  669. package/dist/src/foundation/report/types.js +2 -0
  670. package/dist/src/foundation/report/types.js.map +1 -0
  671. package/dist/src/foundation/scaffold-plan/index.d.ts +2 -0
  672. package/dist/src/foundation/scaffold-plan/index.d.ts.map +1 -0
  673. package/dist/src/foundation/scaffold-plan/index.js +2 -0
  674. package/dist/src/foundation/scaffold-plan/index.js.map +1 -0
  675. package/dist/src/foundation/scaffold-plan/scaffold-plan.d.ts +11 -0
  676. package/dist/src/foundation/scaffold-plan/scaffold-plan.d.ts.map +1 -0
  677. package/dist/src/foundation/scaffold-plan/scaffold-plan.js +36 -0
  678. package/dist/src/foundation/scaffold-plan/scaffold-plan.js.map +1 -0
  679. package/dist/src/foundation/schema/index.d.ts +3 -0
  680. package/dist/src/foundation/schema/index.d.ts.map +1 -0
  681. package/dist/src/foundation/schema/index.js +3 -0
  682. package/dist/src/foundation/schema/index.js.map +1 -0
  683. package/dist/src/foundation/schema/schema.d.ts +3 -0
  684. package/dist/src/foundation/schema/schema.d.ts.map +1 -0
  685. package/dist/src/foundation/schema/schema.js +10 -0
  686. package/dist/src/foundation/schema/schema.js.map +1 -0
  687. package/dist/src/foundation/schema/yaml.d.ts +10 -0
  688. package/dist/src/foundation/schema/yaml.d.ts.map +1 -0
  689. package/dist/src/foundation/schema/yaml.js +60 -0
  690. package/dist/src/foundation/schema/yaml.js.map +1 -0
  691. package/dist/src/foundation/schema-capability/index.d.ts +6 -0
  692. package/dist/src/foundation/schema-capability/index.d.ts.map +1 -0
  693. package/dist/src/foundation/schema-capability/index.js +4 -0
  694. package/dist/src/foundation/schema-capability/index.js.map +1 -0
  695. package/dist/src/foundation/schema-capability/inspection.d.ts +38 -0
  696. package/dist/src/foundation/schema-capability/inspection.d.ts.map +1 -0
  697. package/dist/src/foundation/schema-capability/inspection.js +249 -0
  698. package/dist/src/foundation/schema-capability/inspection.js.map +1 -0
  699. package/dist/src/foundation/schema-capability/manifest.d.ts +6 -0
  700. package/dist/src/foundation/schema-capability/manifest.d.ts.map +1 -0
  701. package/dist/src/foundation/schema-capability/manifest.js +17 -0
  702. package/dist/src/foundation/schema-capability/manifest.js.map +1 -0
  703. package/dist/src/foundation/schema-capability/rules.d.ts +38 -0
  704. package/dist/src/foundation/schema-capability/rules.d.ts.map +1 -0
  705. package/dist/src/foundation/schema-capability/rules.js +297 -0
  706. package/dist/src/foundation/schema-capability/rules.js.map +1 -0
  707. package/dist/src/foundation/skill-registration/adoption.d.ts +40 -0
  708. package/dist/src/foundation/skill-registration/adoption.d.ts.map +1 -0
  709. package/dist/src/foundation/skill-registration/adoption.js +63 -0
  710. package/dist/src/foundation/skill-registration/adoption.js.map +1 -0
  711. package/dist/src/foundation/skill-registration/index.d.ts +2 -0
  712. package/dist/src/foundation/skill-registration/index.d.ts.map +1 -0
  713. package/dist/src/foundation/skill-registration/index.js +2 -0
  714. package/dist/src/foundation/skill-registration/index.js.map +1 -0
  715. package/dist/src/foundation/skill-registration/rules.d.ts +2 -0
  716. package/dist/src/foundation/skill-registration/rules.d.ts.map +1 -0
  717. package/dist/src/foundation/skill-registration/rules.js +2 -0
  718. package/dist/src/foundation/skill-registration/rules.js.map +1 -0
  719. package/dist/src/foundation/snapshot/git-snapshot.d.ts +40 -0
  720. package/dist/src/foundation/snapshot/git-snapshot.d.ts.map +1 -0
  721. package/dist/src/foundation/snapshot/git-snapshot.js +168 -0
  722. package/dist/src/foundation/snapshot/git-snapshot.js.map +1 -0
  723. package/dist/src/foundation/snapshot/index.d.ts +2 -0
  724. package/dist/src/foundation/snapshot/index.d.ts.map +1 -0
  725. package/dist/src/foundation/snapshot/index.js +2 -0
  726. package/dist/src/foundation/snapshot/index.js.map +1 -0
  727. package/dist/src/foundation/state-transaction/index.d.ts +2 -0
  728. package/dist/src/foundation/state-transaction/index.d.ts.map +1 -0
  729. package/dist/src/foundation/state-transaction/index.js +2 -0
  730. package/dist/src/foundation/state-transaction/index.js.map +1 -0
  731. package/dist/src/foundation/state-transaction/state-transaction.d.ts +48 -0
  732. package/dist/src/foundation/state-transaction/state-transaction.d.ts.map +1 -0
  733. package/dist/src/foundation/state-transaction/state-transaction.js +364 -0
  734. package/dist/src/foundation/state-transaction/state-transaction.js.map +1 -0
  735. package/dist/src/foundation/terminal/index.d.ts +2 -0
  736. package/dist/src/foundation/terminal/index.d.ts.map +1 -0
  737. package/dist/src/foundation/terminal/index.js +2 -0
  738. package/dist/src/foundation/terminal/index.js.map +1 -0
  739. package/dist/src/foundation/terminal/terminal.d.ts +17 -0
  740. package/dist/src/foundation/terminal/terminal.d.ts.map +1 -0
  741. package/dist/src/foundation/terminal/terminal.js +12 -0
  742. package/dist/src/foundation/terminal/terminal.js.map +1 -0
  743. package/dist/src/foundation/trace/index.d.ts +2 -0
  744. package/dist/src/foundation/trace/index.d.ts.map +1 -0
  745. package/dist/src/foundation/trace/index.js +2 -0
  746. package/dist/src/foundation/trace/index.js.map +1 -0
  747. package/dist/src/foundation/trace/trace.d.ts +12 -0
  748. package/dist/src/foundation/trace/trace.d.ts.map +1 -0
  749. package/dist/src/foundation/trace/trace.js +299 -0
  750. package/dist/src/foundation/trace/trace.js.map +1 -0
  751. package/dist/src/foundation/tui/index.d.ts +3 -0
  752. package/dist/src/foundation/tui/index.d.ts.map +1 -0
  753. package/dist/src/foundation/tui/index.js +3 -0
  754. package/dist/src/foundation/tui/index.js.map +1 -0
  755. package/dist/src/foundation/tui/table.d.ts +10 -0
  756. package/dist/src/foundation/tui/table.d.ts.map +1 -0
  757. package/dist/src/foundation/tui/table.js +91 -0
  758. package/dist/src/foundation/tui/table.js.map +1 -0
  759. package/dist/src/foundation/tui/tui.d.ts +33 -0
  760. package/dist/src/foundation/tui/tui.d.ts.map +1 -0
  761. package/dist/src/foundation/tui/tui.js +157 -0
  762. package/dist/src/foundation/tui/tui.js.map +1 -0
  763. package/dist/src/index.d.ts +17 -0
  764. package/dist/src/index.d.ts.map +1 -0
  765. package/dist/src/index.js +16 -0
  766. package/dist/src/index.js.map +1 -0
  767. package/docs/core-concepts.md +48 -7
  768. package/docs/getting-started.md +60 -45
  769. package/docs/maintaining.md +132 -9
  770. package/docs/npm-package-releases.md +38 -9
  771. package/docs/operations.md +109 -35
  772. package/docs/reference.md +304 -35
  773. package/docs/repository-tasks.md +61 -20
  774. package/package.json +53 -27
  775. package/schema/capabilities.json +95 -0
  776. package/schema/capability-manifest.schema.json +139 -0
  777. package/schema/v1/command-report.schema.json +4 -2
  778. package/schema/v1/domain-message.schema.json +2 -1
  779. package/schema/v2/config.schema.json +14 -0
  780. package/schema/v2/idea-event.schema.json +121 -0
  781. package/skills/silvermoon/SKILL.md +204 -112
  782. package/skills/silvermoon/references/adoption.md +55 -24
  783. package/skills/silvermoon/references/events.md +296 -0
  784. package/bin/silvermoon.js +0 -10
  785. package/src/adoption.js +0 -559
  786. package/src/cli.js +0 -377
  787. package/src/config.js +0 -253
  788. package/src/create-idea.js +0 -497
  789. package/src/dialogue.js +0 -69
  790. package/src/domain.js +0 -592
  791. package/src/git-snapshot.js +0 -212
  792. package/src/git.js +0 -624
  793. package/src/guidance.js +0 -281
  794. package/src/idea-layout.js +0 -411
  795. package/src/idea-metadata.js +0 -48
  796. package/src/idea-query.js +0 -230
  797. package/src/idea-templates.js +0 -242
  798. package/src/ideas.js +0 -142
  799. package/src/index.js +0 -386
  800. package/src/language.js +0 -78
  801. package/src/layout.js +0 -38
  802. package/src/list-ideas.js +0 -196
  803. package/src/observation.js +0 -370
  804. package/src/repository.js +0 -82
  805. package/src/response.js +0 -492
  806. package/src/subprocess.js +0 -27
  807. package/src/trace.js +0 -292
  808. package/src/tui-table.js +0 -71
  809. package/src/tui.js +0 -205
  810. package/src/user-config.js +0 -135
  811. package/src/whatsnext.js +0 -726
  812. package/src/yaml.js +0 -66
@@ -0,0 +1,249 @@
1
+ import { lstat, readFile, readdir } from "node:fs/promises";
2
+ import { resolve } from "node:path";
3
+ import { IDEAS_ROOT, ideaPaths } from "../coordinates/index.js";
4
+ import { parseIdeaEvents, replayIdeaEvents, } from "../event-codec/index.js";
5
+ import { validateEventRecordSizes } from "../event-store/index.js";
6
+ import { parseIdeaStatus } from "../idea-model/index.js";
7
+ import { parseConfigSource } from "../project-config/index.js";
8
+ import { parseStrictYaml } from "../schema/index.js";
9
+ import { classifySchemaVersion, } from "./rules.js";
10
+ import { loadSchemaCapabilityManifest } from "./manifest.js";
11
+ const DEFAULT_FILESYSTEM = { lstat, readFile, readdir };
12
+ function errorCode(cause) {
13
+ return cause instanceof Error && "code" in cause
14
+ && typeof cause.code === "string"
15
+ ? cause.code
16
+ : undefined;
17
+ }
18
+ function errorMessage(cause) {
19
+ return cause instanceof Error ? cause.message : String(cause);
20
+ }
21
+ function isMapping(value) {
22
+ return value !== null && typeof value === "object" && !Array.isArray(value);
23
+ }
24
+ async function metadata(path, filesystem) {
25
+ try {
26
+ return await filesystem.lstat(path);
27
+ }
28
+ catch (cause) {
29
+ if (errorCode(cause) === "ENOENT")
30
+ return null;
31
+ throw cause;
32
+ }
33
+ }
34
+ function declaredYamlVersion(source) {
35
+ const value = parseStrictYaml(source);
36
+ if (!isMapping(value)) {
37
+ throw new TypeError("Schema-bearing YAML must be a mapping.");
38
+ }
39
+ return value.version;
40
+ }
41
+ function familyCapability(manifest, family) {
42
+ const capability = manifest.families[family];
43
+ if (capability === undefined) {
44
+ throw new TypeError(`Schema capability manifest is missing ${family}.`);
45
+ }
46
+ return capability;
47
+ }
48
+ function readinessRecord({ family, path, schemaVersion, manifest, validation, }) {
49
+ const capability = familyCapability(manifest, family);
50
+ const classified = classifySchemaVersion(manifest, family, schemaVersion);
51
+ let validity = classified.validity;
52
+ let message = classified.message;
53
+ if (validity !== "unsupported" && validation !== undefined) {
54
+ try {
55
+ validation();
56
+ }
57
+ catch (cause) {
58
+ validity = "invalid";
59
+ message = errorMessage(cause);
60
+ }
61
+ }
62
+ return {
63
+ path,
64
+ family,
65
+ schemaVersion: typeof schemaVersion === "number"
66
+ && Number.isSafeInteger(schemaVersion)
67
+ ? schemaVersion
68
+ : null,
69
+ targetVersion: capability.targetVersion,
70
+ validity,
71
+ readiness: classified.readiness,
72
+ ...(classified.migrationPath === undefined
73
+ ? {}
74
+ : { migrationPath: classified.migrationPath }),
75
+ ...(message === undefined ? {} : { message }),
76
+ };
77
+ }
78
+ function validateConfig(root, path, source) {
79
+ const inspected = parseConfigSource({
80
+ absolutePath: resolve(root, path),
81
+ root,
82
+ source,
83
+ });
84
+ if (inspected.diagnostics.length > 0) {
85
+ throw new Error(inspected.diagnostics.map(({ message }) => message).join("; "));
86
+ }
87
+ }
88
+ function validateEvents(id, bytes) {
89
+ validateEventRecordSizes(bytes);
90
+ const failures = [];
91
+ for (const legacy of [false, true]) {
92
+ try {
93
+ const events = parseIdeaEvents(bytes, legacy ? { legacy: true } : {});
94
+ const replayed = replayIdeaEvents(id, events, legacy ? { legacy: true } : {});
95
+ if (!replayed.ok && "sequence" in replayed && "code" in replayed) {
96
+ throw new Error(`Event ${replayed.sequence}: ${replayed.code}`);
97
+ }
98
+ return;
99
+ }
100
+ catch (cause) {
101
+ failures.push(errorMessage(cause));
102
+ }
103
+ }
104
+ throw new Error(failures.join("; "));
105
+ }
106
+ async function inspectConfig(root, manifest, filesystem) {
107
+ const path = ".silvermoon/config.yaml";
108
+ const file = await metadata(resolve(root, path), filesystem);
109
+ if (file === null)
110
+ return null;
111
+ if (!file.isFile() || file.isSymbolicLink()) {
112
+ return readinessRecord({
113
+ family: "project-config",
114
+ path,
115
+ schemaVersion: null,
116
+ manifest,
117
+ validation: () => {
118
+ throw new TypeError("Configuration must be a repository-owned regular file.");
119
+ },
120
+ });
121
+ }
122
+ let source;
123
+ let version;
124
+ try {
125
+ source = (await filesystem.readFile(resolve(root, path))).toString("utf8");
126
+ version = declaredYamlVersion(source);
127
+ }
128
+ catch (cause) {
129
+ return readinessRecord({
130
+ family: "project-config",
131
+ path,
132
+ schemaVersion: null,
133
+ manifest,
134
+ validation: () => {
135
+ throw cause;
136
+ },
137
+ });
138
+ }
139
+ return readinessRecord({
140
+ family: "project-config",
141
+ path,
142
+ schemaVersion: version,
143
+ manifest,
144
+ validation: () => validateConfig(root, path, source),
145
+ });
146
+ }
147
+ async function inspectIdeaState(root, id, path, projectSchemaVersion, manifest, filesystem) {
148
+ const file = await metadata(resolve(root, path), filesystem);
149
+ if (file === null)
150
+ return null;
151
+ if (!file.isFile() || file.isSymbolicLink()) {
152
+ return readinessRecord({
153
+ family: "idea-state",
154
+ path,
155
+ schemaVersion: null,
156
+ manifest,
157
+ validation: () => {
158
+ throw new TypeError("Idea state must be a repository-owned regular file.");
159
+ },
160
+ });
161
+ }
162
+ let bytes;
163
+ try {
164
+ bytes = await filesystem.readFile(resolve(root, path));
165
+ }
166
+ catch (cause) {
167
+ return readinessRecord({
168
+ family: "idea-state",
169
+ path,
170
+ schemaVersion: null,
171
+ manifest,
172
+ validation: () => {
173
+ throw cause;
174
+ },
175
+ });
176
+ }
177
+ if (path.endsWith("/events.jsonl")) {
178
+ return readinessRecord({
179
+ family: "idea-state",
180
+ path,
181
+ schemaVersion: projectSchemaVersion,
182
+ manifest,
183
+ validation: () => {
184
+ if (projectSchemaVersion !== 2) {
185
+ throw new TypeError(`events.jsonl does not represent idea-state schema version ${String(projectSchemaVersion)}.`);
186
+ }
187
+ validateEvents(id, bytes);
188
+ },
189
+ });
190
+ }
191
+ let version;
192
+ try {
193
+ version = declaredYamlVersion(bytes.toString("utf8"));
194
+ }
195
+ catch (cause) {
196
+ return readinessRecord({
197
+ family: "idea-state",
198
+ path,
199
+ schemaVersion: null,
200
+ manifest,
201
+ validation: () => {
202
+ throw cause;
203
+ },
204
+ });
205
+ }
206
+ return readinessRecord({
207
+ family: "idea-state",
208
+ path,
209
+ schemaVersion: version,
210
+ manifest,
211
+ validation: () => {
212
+ if (version !== 1) {
213
+ throw new TypeError(`status.yaml does not represent idea-state schema version ${String(version)}.`);
214
+ }
215
+ parseIdeaStatus(bytes.toString("utf8"));
216
+ },
217
+ });
218
+ }
219
+ export async function inspectProjectSchemas({ filesystem = DEFAULT_FILESYSTEM, manifest, root, }) {
220
+ const resolvedManifest = manifest ?? await loadSchemaCapabilityManifest();
221
+ const files = [];
222
+ const config = await inspectConfig(root, resolvedManifest, filesystem);
223
+ if (config !== null)
224
+ files.push(config);
225
+ const projectSchemaVersion = config?.schemaVersion ?? null;
226
+ const ideasRoot = resolve(root, IDEAS_ROOT);
227
+ const ideasMetadata = await metadata(ideasRoot, filesystem);
228
+ if (ideasMetadata?.isDirectory() && !ideasMetadata.isSymbolicLink()) {
229
+ const entries = await filesystem.readdir(ideasRoot, {
230
+ withFileTypes: true,
231
+ });
232
+ entries.sort((left, right) => left.name.localeCompare(right.name));
233
+ for (const entry of entries) {
234
+ const paths = ideaPaths(entry.name);
235
+ for (const path of [paths.statusPath, paths.eventsPath]) {
236
+ const inspected = await inspectIdeaState(root, entry.name, path, projectSchemaVersion, resolvedManifest, filesystem);
237
+ if (inspected !== null)
238
+ files.push(inspected);
239
+ }
240
+ }
241
+ }
242
+ files.sort((left, right) => left.path.localeCompare(right.path));
243
+ return {
244
+ manifestVersion: resolvedManifest.manifestVersion,
245
+ releaseBoundary: resolvedManifest.releaseBoundary,
246
+ files,
247
+ };
248
+ }
249
+ //# sourceMappingURL=inspection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspection.js","sourceRoot":"","sources":["../../../../src/foundation/schema-capability/inspection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACL,eAAe,EACf,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,qBAAqB,GAGtB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAwC7D,MAAM,kBAAkB,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAExD,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,KAAK,YAAY,KAAK,IAAI,MAAM,IAAI,KAA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B,CAAC,eAAe;QACjD,eAAe,EAAE,gBAAgB,CAAC,eAAe;QACjD,KAAK;KACN,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const SCHEMA_CAPABILITY_MANIFEST_PATH: string;
2
+ export declare function loadSchemaCapabilityManifest({ filesystem, path, }?: {
3
+ filesystem?: Pick<typeof import("node:fs/promises"), "readFile">;
4
+ path?: string;
5
+ }): Promise<import("./rules.ts").SchemaCapabilityManifest>;
6
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/foundation/schema-capability/manifest.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,+BAA+B,QAI3C,CAAC;AAEF,wBAAsB,4BAA4B,CAAC,EACjD,UAAyB,EACzB,IAAsC,GACvC,GAAE;IACD,UAAU,CAAC,EAAE,IAAI,CAAC,cAAc,kBAAkB,CAAC,EAAE,UAAU,CAAC,CAAC;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;CACV,0DAUL"}
@@ -0,0 +1,17 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { validateSchemaCapabilityManifest } from "./rules.js";
5
+ const packageRoot = fileURLToPath(new URL(import.meta.url.endsWith(".ts") ? "../../.." : "../../../..", import.meta.url));
6
+ export const SCHEMA_CAPABILITY_MANIFEST_PATH = resolve(packageRoot, "schema", "capabilities.json");
7
+ export async function loadSchemaCapabilityManifest({ filesystem = { readFile }, path = SCHEMA_CAPABILITY_MANIFEST_PATH, } = {}) {
8
+ let value;
9
+ try {
10
+ value = JSON.parse(await filesystem.readFile(path, "utf8"));
11
+ }
12
+ catch (cause) {
13
+ throw new Error(`Cannot read Silvermoon schema capability manifest: ${cause instanceof Error ? cause.message : String(cause)}`, { cause });
14
+ }
15
+ return validateSchemaCapabilityManifest(value);
16
+ }
17
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../../src/foundation/schema-capability/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAE9D,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,GAAG,CACvC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa,EAC5D,MAAM,CAAC,IAAI,CAAC,GAAG,CAChB,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,OAAO,CACpD,WAAW,EACX,QAAQ,EACR,mBAAmB,CACpB,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,EACjD,UAAU,GAAG,EAAE,QAAQ,EAAE,EACzB,IAAI,GAAG,+BAA+B,MAIpC,EAAE;IACJ,IAAI,KAAc,CAAC;IACnB,IAAI,CAAC;QACH,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,sDACd,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,gCAAgC,CAAC,KAAK,CAAC,CAAC;AACjD,CAAC"}
@@ -0,0 +1,38 @@
1
+ export type SchemaMigrationGuarantee = "read-only-plan" | "exact-digest-apply" | "resume" | "rollback" | "semantic-projection-equivalence";
2
+ export interface SchemaMigrationCapability {
3
+ id: string;
4
+ kind: "schema";
5
+ fromVersions: Record<string, number>;
6
+ toVersions: Record<string, number>;
7
+ entrypoint: string;
8
+ sourceEntrypoint: string;
9
+ executable: string;
10
+ guarantees: SchemaMigrationGuarantee[];
11
+ }
12
+ export interface SchemaFamilyCapability {
13
+ scope: "project" | "device" | "runtime";
14
+ pathPatterns: string[];
15
+ targetVersion: number;
16
+ readVersions: number[];
17
+ schemas: Record<string, string>;
18
+ migrations: string[];
19
+ }
20
+ export interface SchemaCapabilityManifest {
21
+ manifestVersion: 1;
22
+ releaseBoundary: string;
23
+ families: Record<string, SchemaFamilyCapability>;
24
+ migrations: Record<string, SchemaMigrationCapability>;
25
+ }
26
+ export interface SchemaVersionClassification {
27
+ validity: "valid" | "invalid" | "unsupported";
28
+ readiness: "current" | "migration-required" | "migration-unavailable" | "runtime-upgrade-required" | "unknown";
29
+ migrationPath?: SchemaMigrationCapability[];
30
+ message?: string;
31
+ }
32
+ /** @pure */
33
+ export declare function findSchemaMigrationPath(manifest: SchemaCapabilityManifest, familyName: string, fromVersion: number): SchemaMigrationCapability[] | null;
34
+ /** @pure */
35
+ export declare function validateSchemaCapabilityManifest(value: unknown): SchemaCapabilityManifest;
36
+ /** @pure */
37
+ export declare function classifySchemaVersion(manifest: SchemaCapabilityManifest, familyName: string, schemaVersion: unknown): SchemaVersionClassification;
38
+ //# sourceMappingURL=rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/foundation/schema-capability/rules.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAChC,gBAAgB,GAChB,oBAAoB,GACpB,QAAQ,GACR,UAAU,GACV,iCAAiC,CAAC;AAEtC,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,EAAE,M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,YAAY;AACZ,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,wBAAwB,EAClC,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,OAAO,GACrB,2BAA2B,CAkD7B"}
@@ -0,0 +1,297 @@
1
+ const MIGRATION_GUARANTEES = [
2
+ "read-only-plan",
3
+ "exact-digest-apply",
4
+ "resume",
5
+ "rollback",
6
+ "semantic-projection-equivalence",
7
+ ];
8
+ /** @pure */
9
+ function positiveVersion(value) {
10
+ return typeof value === "number"
11
+ && Number.isSafeInteger(value)
12
+ && value > 0;
13
+ }
14
+ /** @pure */
15
+ function mapping(value) {
16
+ return value !== null && typeof value === "object" && !Array.isArray(value);
17
+ }
18
+ /** @pure */
19
+ function onlyKeys(value, allowed) {
20
+ return Object.keys(value).every((key) => allowed.includes(key));
21
+ }
22
+ /** @pure */
23
+ function identifier(value) {
24
+ return typeof value === "string"
25
+ && /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(value);
26
+ }
27
+ /** @pure */
28
+ function versionSet(value) {
29
+ return mapping(value)
30
+ && Object.keys(value).length > 0
31
+ && Object.entries(value).every(([family, version]) => identifier(family) && positiveVersion(version));
32
+ }
33
+ /** @pure */
34
+ function schemaMigration(id, value) {
35
+ if (!identifier(id)
36
+ || !mapping(value)
37
+ || !onlyKeys(value, [
38
+ "kind",
39
+ "fromVersions",
40
+ "toVersions",
41
+ "entrypoint",
42
+ "sourceEntrypoint",
43
+ "executable",
44
+ "guarantees",
45
+ ])
46
+ || value.kind !== "schema") {
47
+ return null;
48
+ }
49
+ const fromVersions = value.fromVersions;
50
+ const toVersions = value.toVersions;
51
+ if (!versionSet(fromVersions)
52
+ || !versionSet(toVersions)
53
+ || typeof value.entrypoint !== "string"
54
+ || value.entrypoint.length === 0
55
+ || typeof value.sourceEntrypoint !== "string"
56
+ || value.sourceEntrypoint.length === 0
57
+ || !identifier(value.executable)
58
+ || !Array.isArray(value.guarantees)
59
+ || value.guarantees.length !== MIGRATION_GUARANTEES.length
60
+ || !value.guarantees.every((guarantee) => typeof guarantee === "string"
61
+ && MIGRATION_GUARANTEES.includes(guarantee))
62
+ || new Set(value.guarantees).size !== value.guarantees.length) {
63
+ return null;
64
+ }
65
+ const fromFamilies = Object.keys(fromVersions).sort();
66
+ const toFamilies = Object.keys(toVersions).sort();
67
+ if (fromFamilies.join("\0") !== toFamilies.join("\0")
68
+ || fromFamilies.every((family) => fromVersions[family] === toVersions[family])) {
69
+ return null;
70
+ }
71
+ return {
72
+ id,
73
+ kind: "schema",
74
+ fromVersions,
75
+ toVersions,
76
+ entrypoint: value.entrypoint,
77
+ sourceEntrypoint: value.sourceEntrypoint,
78
+ executable: value.executable,
79
+ guarantees: value.guarantees,
80
+ };
81
+ }
82
+ /** @pure */
83
+ function schemaFamily(value) {
84
+ if (!mapping(value)
85
+ || !onlyKeys(value, [
86
+ "scope",
87
+ "pathPatterns",
88
+ "targetVersion",
89
+ "readVersions",
90
+ "schemas",
91
+ "migrations",
92
+ ])) {
93
+ return false;
94
+ }
95
+ if (!["project", "device", "runtime"].includes(String(value.scope))
96
+ || !Array.isArray(value.pathPatterns)
97
+ || value.pathPatterns.length === 0
98
+ || !value.pathPatterns.every((path) => typeof path === "string" && path.length > 0)
99
+ || new Set(value.pathPatterns).size !== value.pathPatterns.length
100
+ || !positiveVersion(value.targetVersion)
101
+ || !Array.isArray(value.readVersions)
102
+ || value.readVersions.length === 0
103
+ || !value.readVersions.every(positiveVersion)
104
+ || !value.readVersions.includes(value.targetVersion)
105
+ || !mapping(value.schemas)
106
+ || !Array.isArray(value.migrations)
107
+ || !value.migrations.every(identifier)
108
+ || new Set(value.migrations).size !== value.migrations.length) {
109
+ return false;
110
+ }
111
+ const versions = new Set(value.readVersions);
112
+ if (versions.size !== value.readVersions.length)
113
+ return false;
114
+ const schemaArtifacts = value.schemas;
115
+ const schemas = Object.entries(schemaArtifacts);
116
+ if (schemas.length === 0 || schemas.some(([version, path]) => !versions.has(Number(version))
117
+ || typeof path !== "string"
118
+ || path.length === 0)) {
119
+ return false;
120
+ }
121
+ return value.readVersions.every((version) => Object.hasOwn(schemaArtifacts, String(version)));
122
+ }
123
+ /** @pure */
124
+ export function findSchemaMigrationPath(manifest, familyName, fromVersion) {
125
+ const family = manifest.families[familyName];
126
+ if (family === undefined || !positiveVersion(fromVersion))
127
+ return null;
128
+ if (fromVersion === family.targetVersion)
129
+ return [];
130
+ const queue = [{ path: [], version: fromVersion }];
131
+ const visited = new Set([fromVersion]);
132
+ for (let index = 0; index < queue.length; index += 1) {
133
+ const current = queue[index];
134
+ if (current === undefined)
135
+ continue;
136
+ for (const migrationId of family.migrations) {
137
+ const migration = manifest.migrations[migrationId];
138
+ if (migration?.fromVersions[familyName] !== current.version)
139
+ continue;
140
+ const nextVersion = migration.toVersions[familyName];
141
+ if (nextVersion === undefined)
142
+ continue;
143
+ const path = [...current.path, migration];
144
+ if (nextVersion === family.targetVersion)
145
+ return path;
146
+ if (!visited.has(nextVersion)) {
147
+ visited.add(nextVersion);
148
+ queue.push({ path, version: nextVersion });
149
+ }
150
+ }
151
+ }
152
+ return null;
153
+ }
154
+ /** @pure */
155
+ export function validateSchemaCapabilityManifest(value) {
156
+ if (!mapping(value)
157
+ || !onlyKeys(value, [
158
+ "$schema",
159
+ "manifestVersion",
160
+ "releaseBoundary",
161
+ "families",
162
+ "migrations",
163
+ ])
164
+ || value.manifestVersion !== 1
165
+ || typeof value.releaseBoundary !== "string"
166
+ || !/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.test(value.releaseBoundary)
167
+ || !mapping(value.families)
168
+ || !mapping(value.migrations)) {
169
+ throw new TypeError("Invalid Silvermoon schema capability manifest.");
170
+ }
171
+ const familyEntries = Object.entries(value.families);
172
+ if (familyEntries.length === 0 || familyEntries.some(([name, family]) => !identifier(name) || !schemaFamily(family))) {
173
+ throw new TypeError("Invalid Silvermoon schema family capability.");
174
+ }
175
+ const migrationEntries = Object.entries(value.migrations);
176
+ const parsedMigrations = migrationEntries.map(([id, migration]) => schemaMigration(id, migration));
177
+ if (parsedMigrations.some((migration) => migration === null)) {
178
+ throw new TypeError("Invalid Silvermoon schema migration capability.");
179
+ }
180
+ const manifest = {
181
+ manifestVersion: 1,
182
+ releaseBoundary: value.releaseBoundary,
183
+ families: Object.fromEntries(familyEntries),
184
+ migrations: Object.fromEntries(parsedMigrations.map((migration) => {
185
+ if (migration === null) {
186
+ throw new TypeError("Invalid Silvermoon schema migration.");
187
+ }
188
+ return [migration.id, migration];
189
+ })),
190
+ };
191
+ for (const [familyName, family] of Object.entries(manifest.families)) {
192
+ const transitions = new Map();
193
+ for (const migrationId of family.migrations) {
194
+ const migration = manifest.migrations[migrationId];
195
+ if (migration === undefined
196
+ || migration.fromVersions[familyName] === undefined
197
+ || migration.toVersions[familyName] === undefined) {
198
+ throw new TypeError(`Schema family ${familyName} references invalid migration ${migrationId}.`);
199
+ }
200
+ const fromVersion = migration.fromVersions[familyName];
201
+ if (fromVersion === undefined) {
202
+ throw new TypeError(`Migration ${migrationId} is missing ${familyName}.`);
203
+ }
204
+ if (transitions.has(fromVersion)) {
205
+ throw new TypeError(`Schema family ${familyName} has ambiguous migrations from version ${fromVersion}.`);
206
+ }
207
+ transitions.set(fromVersion, migrationId);
208
+ }
209
+ for (const version of family.readVersions) {
210
+ const visitedVersions = new Set();
211
+ let cursor = version;
212
+ while (cursor !== family.targetVersion) {
213
+ if (visitedVersions.has(cursor)) {
214
+ throw new TypeError(`Schema family ${familyName} has a cyclic migration path from version ${version}.`);
215
+ }
216
+ visitedVersions.add(cursor);
217
+ const migrationId = transitions.get(cursor);
218
+ if (migrationId === undefined)
219
+ break;
220
+ const nextVersion = manifest.migrations[migrationId]
221
+ ?.toVersions[familyName];
222
+ if (nextVersion === undefined)
223
+ break;
224
+ cursor = nextVersion;
225
+ }
226
+ const path = findSchemaMigrationPath(manifest, familyName, version);
227
+ if (version !== family.targetVersion
228
+ && path === null) {
229
+ throw new TypeError(`Schema family ${familyName} has no continuous migration from version ${version}.`);
230
+ }
231
+ }
232
+ }
233
+ for (const migration of Object.values(manifest.migrations)) {
234
+ for (const [familyName, fromVersion] of Object.entries(migration.fromVersions)) {
235
+ const family = manifest.families[familyName];
236
+ const toVersion = migration.toVersions[familyName];
237
+ if (family === undefined
238
+ || toVersion === undefined
239
+ || !family.migrations.includes(migration.id)
240
+ || !family.readVersions.includes(fromVersion)
241
+ || !family.readVersions.includes(toVersion)
242
+ || fromVersion === toVersion) {
243
+ throw new TypeError(`Migration ${migration.id} is inconsistent with ${familyName}.`);
244
+ }
245
+ }
246
+ }
247
+ return manifest;
248
+ }
249
+ /** @pure */
250
+ export function classifySchemaVersion(manifest, familyName, schemaVersion) {
251
+ const family = manifest.families[familyName];
252
+ if (family === undefined) {
253
+ return {
254
+ validity: "invalid",
255
+ readiness: "unknown",
256
+ message: `Unknown schema family: ${familyName}.`,
257
+ };
258
+ }
259
+ if (!positiveVersion(schemaVersion)) {
260
+ return {
261
+ validity: "invalid",
262
+ readiness: "unknown",
263
+ message: "Schema version must be a positive safe integer.",
264
+ };
265
+ }
266
+ const maximumReadVersion = Math.max(...family.readVersions);
267
+ if (schemaVersion > maximumReadVersion) {
268
+ return {
269
+ validity: "unsupported",
270
+ readiness: "runtime-upgrade-required",
271
+ message: `Runtime read capability ends at schema version ${maximumReadVersion}.`,
272
+ };
273
+ }
274
+ if (!family.readVersions.includes(schemaVersion)) {
275
+ return {
276
+ validity: "invalid",
277
+ readiness: "unknown",
278
+ message: `Schema version ${schemaVersion} is not a supported historical version.`,
279
+ };
280
+ }
281
+ if (schemaVersion === family.targetVersion) {
282
+ return { validity: "valid", readiness: "current" };
283
+ }
284
+ const migrationPath = findSchemaMigrationPath(manifest, familyName, schemaVersion);
285
+ return migrationPath === null
286
+ ? {
287
+ validity: "valid",
288
+ readiness: "migration-unavailable",
289
+ message: `No migration reaches target schema version ${family.targetVersion}.`,
290
+ }
291
+ : {
292
+ validity: "valid",
293
+ readiness: "migration-required",
294
+ migrationPath,
295
+ };
296
+ }
297
+ //# sourceMappingURL=rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../../src/foundation/schema-capability/rules.ts"],"names":[],"mappings":"AA8CA,MAAM,oBAAoB,GAAwC;IAChE,gBAAgB;IAChB,oBAAoB;IACpB,QAAQ;IACR,UAAU;IACV,iCAAiC;CAClC,CAAC;AAEF,YAAY;AACZ,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ;WAC3B,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;WAC3B,KAAK,GAAG,CAAC,CAAC;AACjB,CAAC;AAED,YAAY;AACZ,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,YAAY;AACZ,SAAS,QAAQ,CAAC,KAA8B,EAAE,OAA0B;IAC1E,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,YAAY;AACZ,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ;WAC3B,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAED,YAAY;AACZ,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,CAAC,KAAK,CAAC;WAChB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;WAC7B,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CACnD,UAAU,CAAC,MAAM,CAAC,IAAI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