silvermoon 0.3.0-rc.2 → 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,18 @@
1
+ import { inspectEventHistory } from "../../foundation/event-history/index.ts";
2
+ import { compareCommits, fetchPrimary, inspectRepositoryState } from "../../foundation/git/index.ts";
3
+ import type { CommandRuntime, ReadyObservation, RepositoryReadiness } from "./business-types.ts";
4
+ declare const READINESS_PORTS: Readonly<{
5
+ inspectRepositoryState: typeof inspectRepositoryState;
6
+ fetchPrimary: typeof fetchPrimary;
7
+ compareCommits: typeof compareCommits;
8
+ inspectEventHistory: typeof inspectEventHistory;
9
+ }>;
10
+ export declare function assessRepositoryReadinessWith({ observed, runtime, recheckCommand, root, synchronizePrimary, }: {
11
+ observed: ReadyObservation;
12
+ runtime: CommandRuntime;
13
+ recheckCommand?: string;
14
+ root: string;
15
+ synchronizePrimary?: boolean;
16
+ }, ports?: typeof READINESS_PORTS): Promise<RepositoryReadiness>;
17
+ export {};
18
+ //# sourceMappingURL=assess-repository-readiness-with.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assess-repository-readiness-with.d.ts","sourceRoot":"","sources":["../../../../src/business/shared/assess-repository-readiness-with.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,sBAAsB,EAAsB,MAAM,+BAA+B,CAAC;AAUzH,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAG7B,QAAA,MAAM,eAAe;;;;;EAEnB,CAAC;AASH,wBAAsB,6BAA6B,CAAC,EAClD,QAAQ,EACR,OAAO,EACP,cAAwC,EACxC,IAAI,EACJ,kBAAyB,GAC1B,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,cAAc,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,EAAE,KAAK,GAAE,OAAO,eAAiC,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA+GhF"}
@@ -0,0 +1,125 @@
1
+ import { inspectEventHistory } from "../../foundation/event-history/index.js";
2
+ import { compareCommits, fetchPrimary, inspectRepositoryState, sanitizeGitMessage } from "../../foundation/git/index.js";
3
+ import { command, renderEventHistoryInvalid, renderPrimaryAncestryInspectionFailed, renderPrimaryFetchFailed, renderWorktreeInspectionFailed, } from "../../foundation/report/index.js";
4
+ import { evaluateLocalReadiness } from "./evaluate-local-readiness.js";
5
+ import { evaluatePrimaryRelation } from "./evaluate-primary-relation.js";
6
+ import { errorMessage, repositoryProblem } from "./business-types.js";
7
+ const READINESS_PORTS = Object.freeze({
8
+ inspectRepositoryState, fetchPrimary, compareCommits, inspectEventHistory,
9
+ });
10
+ function isPrimaryRelation(value) {
11
+ return value === "aligned" || value === "unknown" || value === "behind"
12
+ || value === "ahead" || value === "diverged";
13
+ }
14
+ export async function assessRepositoryReadinessWith({ observed, runtime, recheckCommand = "silvermoon whats-next", root, synchronizePrimary = true, }, ports = READINESS_PORTS) {
15
+ const { inspectRepositoryState, fetchPrimary, compareCommits, inspectEventHistory } = ports;
16
+ const language = observed.outputLanguage;
17
+ let repository;
18
+ try {
19
+ repository = inspectRepositoryState(root);
20
+ }
21
+ catch (caught) {
22
+ const problem = {
23
+ type: "worktree-inspection-failed",
24
+ summary: sanitizeGitMessage(errorMessage(caught)),
25
+ };
26
+ return {
27
+ observation: repositoryProblem(observed.observation, [problem]),
28
+ instructions: renderWorktreeInspectionFailed(language, {
29
+ recheckCommand: command(root, recheckCommand),
30
+ }),
31
+ ready: false,
32
+ };
33
+ }
34
+ const local = evaluateLocalReadiness({ repository, observed, root, recheckCommand });
35
+ if (!local.ready)
36
+ return local;
37
+ const { branch, changes, head } = repository;
38
+ if (head === null)
39
+ throw new Error("Repository readiness unexpectedly omitted HEAD.");
40
+ if (!synchronizePrimary) {
41
+ return {
42
+ branch,
43
+ changes,
44
+ head,
45
+ observation: observed.observation,
46
+ ready: true,
47
+ };
48
+ }
49
+ const fetched = await runtime.performAction({
50
+ type: "fetch-primary",
51
+ repository: observed.config.primaryRepository,
52
+ branch: observed.config.primaryBranch,
53
+ }, () => ({
54
+ commit: fetchPrimary(root, observed.config),
55
+ }), (caught) => ({
56
+ problem: {
57
+ type: "primary-fetch-failed",
58
+ summary: sanitizeGitMessage(errorMessage(caught)),
59
+ },
60
+ }));
61
+ if (fetched.status === "failure") {
62
+ const message = fetched.problem.summary;
63
+ return {
64
+ observation: repositoryProblem(observed.observation, [{
65
+ type: "primary-fetch-failed",
66
+ summary: message,
67
+ }]),
68
+ instructions: renderPrimaryFetchFailed(language, {
69
+ primaryBranch: observed.config.primaryBranch,
70
+ primaryRepository: observed.config.primaryRepository,
71
+ recheckCommand: command(root, recheckCommand),
72
+ }),
73
+ ready: false,
74
+ };
75
+ }
76
+ const primary = fetched.result.commit;
77
+ let relation;
78
+ try {
79
+ const compared = compareCommits(root, head, primary);
80
+ if (!isPrimaryRelation(compared)) {
81
+ throw new Error(`Git returned an unsupported primary relation: ${compared}`);
82
+ }
83
+ relation = compared;
84
+ }
85
+ catch (caught) {
86
+ return {
87
+ branch,
88
+ head,
89
+ observation: repositoryProblem(observed.observation, [{
90
+ type: "primary-ancestry-inspection-failed",
91
+ summary: sanitizeGitMessage(errorMessage(caught)),
92
+ }]),
93
+ primary,
94
+ instructions: renderPrimaryAncestryInspectionFailed(language, {
95
+ head,
96
+ primary,
97
+ recheckCommand: command(root, recheckCommand),
98
+ }),
99
+ ready: false,
100
+ };
101
+ }
102
+ if (relation === "aligned") {
103
+ if (observed.config.version === 2) {
104
+ try {
105
+ await inspectEventHistory({ root, tree: head, commit: head, config: observed.config, primary });
106
+ }
107
+ catch (caught) {
108
+ return {
109
+ branch, head, primary, ready: false,
110
+ observation: repositoryProblem(observed.observation, [{
111
+ type: "idea.events.history-invalid", summary: errorMessage(caught),
112
+ }]),
113
+ instructions: renderEventHistoryInvalid(language, {
114
+ recheckCommand,
115
+ }),
116
+ };
117
+ }
118
+ }
119
+ return { branch, head, observation: observed.observation, primary, ready: true };
120
+ }
121
+ return evaluatePrimaryRelation({
122
+ relation, branch, head, primary, observed, root, recheckCommand,
123
+ });
124
+ }
125
+ //# sourceMappingURL=assess-repository-readiness-with.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assess-repository-readiness-with.js","sourceRoot":"","sources":["../../../../src/business/shared/assess-repository-readiness-with.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACzH,OAAO,EACL,OAAO,EACP,yBAAyB,EACzB,qC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M,CAAC,OAAO,KAAK,CAAC,EAAE,CAAC;YAClC,IAAI,CAAC;gBACH,MAAM,mBAAmB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;YAClG,CAAC;YAAC,OAAO,MAAM,EAAE,CAAC;gBAChB,OAAO;oBACL,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK;oBACnC,WAAW,EAAE,iBAAiB,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;4BACpD,IAAI,EAAE,6BAA6B,EAAE,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC;yBACnE,CAAC,CAAC;oBACH,YAAY,EAAE,yBAAyB,CAAC,QAAQ,EAAE;wBAChD,cAAc;qBACf,CAAC;iBACH,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACnF,CAAC;IACD,OAAO,uBAAuB,CAAC;QAC7B,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc;KAChE,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { assessRepositoryReadinessWith } from "./assess-repository-readiness-with.ts";
2
+ export declare function assessRepositoryReadiness(options: Parameters<typeof assessRepositoryReadinessWith>[0]): Promise<import("./business-types.ts").RepositoryReadiness>;
3
+ //# sourceMappingURL=assess-repository-readiness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assess-repository-readiness.d.ts","sourceRoot":"","sources":["../../../../src/business/shared/assess-repository-readiness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AAGtF,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC,CAAC,CAAC,8DAO7D"}
@@ -0,0 +1,6 @@
1
+ import { assessRepositoryReadinessWith } from "./assess-repository-readiness-with.js";
2
+ import { traceBusinessAsync } from "./business-types.js";
3
+ export async function assessRepositoryReadiness(options) {
4
+ return traceBusinessAsync("repository.assess-readiness", {}, () => assessRepositoryReadinessWith(options));
5
+ }
6
+ //# sourceMappingURL=assess-repository-readiness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assess-repository-readiness.js","sourceRoot":"","sources":["../../../../src/business/shared/assess-repository-readiness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,OAA4D;IAE5D,OAAO,kBAAkB,CACvB,6BAA6B,EAC7B,EAAE,EACF,GAAG,EAAE,CAAC,6BAA6B,CAAC,OAAO,CAAC,CAC7C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,151 @@
1
+ import type { EventStore as FoundationEventStore } from "../../foundation/event-store/storage.ts";
2
+ import type { Observation, Problem, RepositoryBlockedObservation, ProjectReadyObservation } from "../../foundation/report/types.ts";
3
+ export interface Diagnostic {
4
+ code: string;
5
+ level: string;
6
+ message: string;
7
+ remediation: string;
8
+ path?: string;
9
+ }
10
+ export interface ProjectConfig {
11
+ version: 1 | 2;
12
+ primaryRepository: string;
13
+ primaryBranch: string;
14
+ preferredLanguage?: string;
15
+ }
16
+ export interface IdeaPaths {
17
+ ideaPath: string;
18
+ statusPath: string;
19
+ eventsPath: string;
20
+ ledgerPath: string;
21
+ outerPath: string;
22
+ innerPath: string;
23
+ idealPath: string;
24
+ deploymentDocumentPath: string;
25
+ implementationDocumentPath: string;
26
+ ideaDocumentPath: string;
27
+ }
28
+ export interface EventOptions {
29
+ objectIdLength: number;
30
+ legacy?: boolean;
31
+ }
32
+ export type EventStore = FoundationEventStore;
33
+ export interface SnapshotEntry {
34
+ type: string;
35
+ mode: string;
36
+ object: string;
37
+ size: number | null;
38
+ name: string;
39
+ }
40
+ export interface FileMetadata {
41
+ isDirectory(): boolean;
42
+ isFile(): boolean;
43
+ isSymbolicLink(): boolean;
44
+ }
45
+ export interface DirectoryEntry {
46
+ name: string;
47
+ }
48
+ export interface BusinessFileSystem {
49
+ lstat(path: string): Promise<FileMetadata>;
50
+ readFile(path: string): Promise<Buffer>;
51
+ readdir(path: string): Promise<string[]>;
52
+ readdir(path: string, options: {
53
+ withFileTypes: true;
54
+ }): Promise<DirectoryEntry[]>;
55
+ snapshotEntry?(path: string): SnapshotEntry | null | undefined;
56
+ snapshotEntries?(path: string): SnapshotEntry[];
57
+ snapshotFile?(path: string): Promise<Buffer>;
58
+ }
59
+ export interface SnapshotBusinessFileSystem extends BusinessFileSystem {
60
+ snapshotEntry(path: string): SnapshotEntry | null | undefined;
61
+ snapshotEntries(path: string): SnapshotEntry[];
62
+ snapshotFile(path: string): Promise<Buffer>;
63
+ }
64
+ export type GitSnapshotFileSystem = ReturnType<typeof import("../../foundation/snapshot/index.ts").createGitSnapshotFileSystem>;
65
+ export declare function asBusinessFileSystem(filesystem: GitSnapshotFileSystem): BusinessFileSystem;
66
+ export declare function requireSnapshotFileSystem(filesystem: BusinessFileSystem): SnapshotBusinessFileSystem;
67
+ export interface RepositoryChanges {
68
+ conflicted: {
69
+ path: string;
70
+ kind?: string;
71
+ originalPath?: string;
72
+ }[];
73
+ staged: {
74
+ path: string;
75
+ kind?: string;
76
+ originalPath?: string;
77
+ }[];
78
+ unstaged: {
79
+ path: string;
80
+ kind?: string;
81
+ originalPath?: string;
82
+ }[];
83
+ untracked: {
84
+ path: string;
85
+ kind?: string;
86
+ originalPath?: string;
87
+ }[];
88
+ }
89
+ export interface RepositoryBranch {
90
+ branch: string | null;
91
+ remote: string | null;
92
+ repository: string | null;
93
+ upstreamBranch: string | null;
94
+ }
95
+ export interface RepositoryState {
96
+ branch: RepositoryBranch;
97
+ changes: RepositoryChanges;
98
+ head: string | null;
99
+ }
100
+ export type { Problem };
101
+ export type ProjectObservation = Observation;
102
+ export interface ReadyObservation {
103
+ config: ProjectConfig;
104
+ contentLanguage: string;
105
+ layout: import("./idea-layout.ts").IdeaLayout;
106
+ observation: ProjectReadyObservation;
107
+ outputLanguage: string;
108
+ outputLanguageOverride?: string;
109
+ findings: {
110
+ instruction: string;
111
+ }[];
112
+ projectReady: true;
113
+ schemas?: import("../../foundation/schema-capability/index.ts").ProjectSchemaReadiness;
114
+ }
115
+ export interface UnreadyObservation {
116
+ config: ProjectConfig | null;
117
+ contentLanguage: string;
118
+ findings: {
119
+ instruction: string;
120
+ }[];
121
+ layout: import("./idea-layout.ts").IdeaLayout | null;
122
+ observation: ProjectObservation;
123
+ outputLanguage: string;
124
+ outputLanguageOverride?: string;
125
+ projectReady: false;
126
+ schemas?: import("../../foundation/schema-capability/index.ts").ProjectSchemaReadiness;
127
+ }
128
+ export type SnapshotObservation = ReadyObservation | UnreadyObservation;
129
+ export type RepositoryReadiness = {
130
+ branch?: RepositoryBranch;
131
+ changes?: RepositoryChanges;
132
+ head?: string | null;
133
+ observation: RepositoryBlockedObservation;
134
+ primary?: string;
135
+ instructions: string;
136
+ ready: false;
137
+ } | {
138
+ branch: RepositoryBranch;
139
+ changes?: RepositoryChanges;
140
+ head: string;
141
+ observation: ProjectReadyObservation;
142
+ primary?: string;
143
+ ready: true;
144
+ };
145
+ /** @pure */
146
+ export declare function repositoryProblem(observation: ProjectReadyObservation, problems: Problem[]): RepositoryBlockedObservation;
147
+ export type CommandRuntime = ReturnType<typeof import("../../foundation/command-message/index.ts").createCommandRun>;
148
+ /** @pure */
149
+ export declare function errorMessage(value: unknown): string;
150
+ export declare function traceBusinessAsync<Result>(name: string, attributes: Record<string, unknown>, operation: () => Promise<Result>, finish?: (result: Result) => Record<string, unknown>): Promise<Result>;
151
+ //# sourceMappingURL=business-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-types.d.ts","sourceRoot":"","sources":["../../../../src/business/shared/business-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,KAAK,EACV,WAAW,EACX,OAAO,EACP,4BAA4B,EAC5B,uBAAuB,EACxB,MAAM,kCAAkC,CAAC;AAG1C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,0BAA0B,EAAE,MAAM,CAAC;IACnC,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAE9C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IAC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AAW,EAAE,uBAAuB,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,IAAI,CAAC;CACb,CAAC;AAEN,YAAY;AACZ,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,uBAAuB,EACpC,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,CAM9B;AAED,MAAM,MAAM,cAAc,GAAG,UAAU,CACrC,cAAc,2CAA2C,EAAE,gBAAgB,CAC5E,CAAC;AAEF,YAAY;AACZ,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEnD;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAC7C,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,SAAS,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EAChC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnD,OAAO,CAAC,MAAM,CAAC,CAcjB"}
@@ -0,0 +1,83 @@
1
+ import { traceAsync } from "../../foundation/trace/index.js";
2
+ export function asBusinessFileSystem(filesystem) {
3
+ async function readdir(path, options) {
4
+ const entries = await filesystem.readdir(path, options);
5
+ if (options === undefined) {
6
+ const names = [];
7
+ for (const entry of entries) {
8
+ if (typeof entry !== "string") {
9
+ throw new TypeError("Snapshot filesystem returned non-string directory entries.");
10
+ }
11
+ names.push(entry);
12
+ }
13
+ return names;
14
+ }
15
+ const metadata = [];
16
+ for (const entry of entries) {
17
+ if (typeof entry !== "object" || entry === null
18
+ || !("name" in entry) || typeof entry.name !== "string") {
19
+ throw new TypeError("Snapshot filesystem returned invalid directory metadata.");
20
+ }
21
+ metadata.push(entry);
22
+ }
23
+ return metadata;
24
+ }
25
+ return {
26
+ lstat: (path) => filesystem.lstat(path),
27
+ readFile: async (path) => {
28
+ const value = await filesystem.readFile(path);
29
+ if (!Buffer.isBuffer(value)) {
30
+ throw new TypeError("Snapshot filesystem returned non-buffer file content.");
31
+ }
32
+ return value;
33
+ },
34
+ readdir,
35
+ snapshotEntry: (path) => filesystem.snapshotEntry(path),
36
+ snapshotEntries: (path) => filesystem.snapshotEntries(path),
37
+ snapshotFile: (path) => filesystem.snapshotFile(path),
38
+ };
39
+ }
40
+ export function requireSnapshotFileSystem(filesystem) {
41
+ if (typeof filesystem.snapshotEntry !== "function"
42
+ || typeof filesystem.snapshotEntries !== "function"
43
+ || typeof filesystem.snapshotFile !== "function") {
44
+ throw new TypeError("Snapshot filesystem capabilities are required.");
45
+ }
46
+ return {
47
+ lstat: filesystem.lstat,
48
+ readFile: filesystem.readFile,
49
+ readdir: filesystem.readdir,
50
+ snapshotEntry: filesystem.snapshotEntry,
51
+ snapshotEntries: filesystem.snapshotEntries,
52
+ snapshotFile: filesystem.snapshotFile,
53
+ };
54
+ }
55
+ /** @pure */
56
+ export function repositoryProblem(observation, problems) {
57
+ return {
58
+ ...observation,
59
+ state: "repository-sync-required",
60
+ problems,
61
+ };
62
+ }
63
+ /** @pure */
64
+ export function errorMessage(value) {
65
+ return value instanceof Error ? value.message : String(value);
66
+ }
67
+ export async function traceBusinessAsync(name, attributes, operation, finish) {
68
+ let result;
69
+ const invoke = () => {
70
+ result ??= operation();
71
+ return result;
72
+ };
73
+ await Reflect.apply(traceAsync, undefined, [
74
+ name,
75
+ attributes,
76
+ invoke,
77
+ ...(finish ? [finish] : []),
78
+ ]);
79
+ if (!result)
80
+ throw new Error(`Trace ${name} did not invoke its operation.`);
81
+ return result;
82
+ }
83
+ //# sourceMappingURL=business-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"business-types.js","sourceRoot":"","sources":["../../../../src/business/shared/business-types.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AA2E7D,MAAM,UAAU,oBAAoB,CAClC,UAAiC;IAOjC,KAAK,UAAU,OAAO,CACpB,IAAY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C;IACxC,MAAM,MAAM,GAAG,GAAoB,EAAE;QACnC,MAAM,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IACF,MAAM,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE;QACzC,IAAI;QACJ,UAAU;QACV,MAAM;QACN,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,SAAS,IAAI,gCAAgC,CAAC,CAAC;IAC5E,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { ReadyObservation, RepositoryReadiness, RepositoryState } from "./business-types.ts";
2
+ /** @pure */
3
+ export declare function evaluateLocalReadiness({ repository, observed, root, recheckCommand, }: {
4
+ repository: RepositoryState;
5
+ observed: ReadyObservation;
6
+ root: string;
7
+ recheckCommand: string;
8
+ }): RepositoryReadiness;
9
+ //# sourceMappingURL=evaluate-local-readiness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-local-readiness.d.ts","sourceRoot":"","sources":["../../../../src/business/shared/evaluate-local-readiness.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAG7B,YAAY;AACZ,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,cAAc,GACf,EAAE;IACD,UAAU,EAAE,eAAe,CAAC;IAC5B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,mBAAmB,CAgHtB"}
@@ -0,0 +1,97 @@
1
+ import { command, localRepositoryInstructions, renderDetachedHead, renderHeadMissing, renderPrimaryUpstreamMismatch, renderWorktreeConflicts, summarizeWorktreeChanges, worktreeInstructionSteps, } from "../../foundation/report/index.js";
2
+ import { repositoryProblem } from "./business-types.js";
3
+ /** @pure */
4
+ export function evaluateLocalReadiness({ repository, observed, root, recheckCommand, }) {
5
+ const language = observed.outputLanguage;
6
+ const { branch, changes, head } = repository;
7
+ const dirty = changes.conflicted.length > 0
8
+ || changes.staged.length > 0
9
+ || changes.unstaged.length > 0
10
+ || changes.untracked.length > 0;
11
+ const localProblems = [];
12
+ const localSteps = [];
13
+ if (dirty) {
14
+ if (changes.conflicted.length > 0) {
15
+ localProblems.push({
16
+ type: "worktree-conflicts",
17
+ summary: renderWorktreeConflicts(language, {
18
+ count: changes.conflicted.length,
19
+ summary: summarizeWorktreeChanges({
20
+ conflicted: changes.conflicted,
21
+ staged: [],
22
+ unstaged: [],
23
+ untracked: [],
24
+ }, language),
25
+ }),
26
+ });
27
+ }
28
+ if (changes.staged.length > 0
29
+ || changes.unstaged.length > 0
30
+ || changes.untracked.length > 0) {
31
+ localProblems.push({
32
+ type: "worktree-changes",
33
+ summary: summarizeWorktreeChanges({
34
+ conflicted: [],
35
+ staged: changes.staged,
36
+ unstaged: changes.unstaged,
37
+ untracked: changes.untracked,
38
+ }, language),
39
+ });
40
+ }
41
+ localSteps.push(...worktreeInstructionSteps(changes, language));
42
+ }
43
+ if (head === null) {
44
+ const headMissing = renderHeadMissing(language);
45
+ localProblems.push({
46
+ type: "head-missing",
47
+ summary: headMissing.summary,
48
+ });
49
+ localSteps.push(headMissing.step);
50
+ }
51
+ if (branch.branch === null) {
52
+ const detachedHead = renderDetachedHead(language, {
53
+ expectedBranch: observed.config.primaryBranch,
54
+ expectedRepository: observed.config.primaryRepository,
55
+ head,
56
+ });
57
+ localProblems.push({
58
+ type: "detached-head",
59
+ summary: detachedHead.summary,
60
+ });
61
+ localSteps.push(detachedHead.step);
62
+ }
63
+ else {
64
+ if (branch.repository !== observed.config.primaryRepository
65
+ || branch.upstreamBranch !== observed.config.primaryBranch) {
66
+ const mismatch = renderPrimaryUpstreamMismatch(language, {
67
+ branch: branch.branch,
68
+ expectedBranch: observed.config.primaryBranch,
69
+ expectedRepository: observed.config.primaryRepository,
70
+ remote: branch.remote,
71
+ repository: branch.repository,
72
+ upstreamBranch: branch.upstreamBranch,
73
+ verifyCommand: command(root, 'git -C "<root>" rev-parse --abbrev-ref --symbolic-full-name \'@{upstream}\''),
74
+ });
75
+ localProblems.push({
76
+ type: "primary-upstream-mismatch",
77
+ summary: mismatch.summary,
78
+ });
79
+ localSteps.push(mismatch.step);
80
+ }
81
+ }
82
+ if (localProblems.length > 0) {
83
+ return {
84
+ branch,
85
+ changes,
86
+ head,
87
+ observation: repositoryProblem(observed.observation, localProblems),
88
+ instructions: localRepositoryInstructions(root, localSteps, language, recheckCommand),
89
+ ready: false,
90
+ };
91
+ }
92
+ if (head === null) {
93
+ throw new Error("Ready repository unexpectedly omitted HEAD.");
94
+ }
95
+ return { branch, changes, head, observation: observed.observation, ready: true };
96
+ }
97
+ //# sourceMappingURL=evaluate-local-readiness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-local-readiness.js","sourceRoot":"","sources":["../../../../src/business/shared/evaluate-local-readiness.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,2BAA2B,EAC3B,kBAAkB,EAClB,iBAAiB,EACjB,6BAA6B,EAC7B,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,kCAAkC,CAAC;AAM1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,YAAY;AACZ,MAAM,UAAU,sBAAsB,CAAC,EACrC,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,cAAc,GAMf;IACC,MAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC;IACzC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC;IAE7C,MAAM,KAAK,GACT,OAAO,CAA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IAAI,EACJ,6EAA6E,CAC9E;aACF,CAAC,CAAC;YACH,aAAa,CAAC,IAAI,CAAC;gBACjB,IAAI,EAAE,2BAA2B;gBACjC,OAAO,EAAE,QAAQ,CAAC,OAAO;aAC1B,CAAC,CAAC;YACH,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7B,OAAO;YACL,MAAM;YACN,OAAO;YACP,IAAI;YACJ,WAAW,EAAE,iBAAiB,CAC5B,QAAQ,CAAC,WAAW,EACpB,aAAa,CACd;YACD,YAAY,EAAE,2BAA2B,CACvC,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,cAAc,CACf;YACD,KAAK,EAAE,KAAK;SACb,CAAC;IACJ,CAAC;IAED,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACnF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { ReadyObservation, RepositoryBranch, RepositoryReadiness } from "./business-types.ts";
2
+ /** @pure */
3
+ export declare function evaluatePrimaryRelation({ relation, branch, head, primary, observed, root, recheckCommand, }: {
4
+ relation: "aligned" | "unknown" | "behind" | "ahead" | "diverged";
5
+ branch: RepositoryBranch;
6
+ head: string;
7
+ primary: string;
8
+ observed: ReadyObservation;
9
+ root: string;
10
+ recheckCommand: string;
11
+ }): RepositoryReadiness;
12
+ //# sourceMappingURL=evaluate-primary-relation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-primary-relation.d.ts","sourceRoot":"","sources":["../../../../src/business/shared/evaluate-primary-relation.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAG7B,YAAY;AACZ,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,cAAc,GACf,EAAE;IACD,QAAQ,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;IAClE,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,mBAAmB,CAsCtB"}
@@ -0,0 +1,40 @@
1
+ import { command, renderPrimaryAhead, renderPrimaryBehind, renderPrimaryDiverged, renderPrimaryHistoryIncomplete, } from "../../foundation/report/index.js";
2
+ import { repositoryProblem } from "./business-types.js";
3
+ /** @pure */
4
+ export function evaluatePrimaryRelation({ relation, branch, head, primary, observed, root, recheckCommand, }) {
5
+ if (relation === "aligned") {
6
+ return { branch, head, observation: observed.observation, primary, ready: true };
7
+ }
8
+ const language = observed.outputLanguage;
9
+ const parameters = {
10
+ branch: branch.branch,
11
+ head,
12
+ mergeCommand: command(root, `git -C "<root>" merge --ff-only ${primary}`),
13
+ primary,
14
+ primaryBranch: observed.config.primaryBranch,
15
+ recheckCommand: command(root, recheckCommand),
16
+ remote: branch.remote,
17
+ };
18
+ const rendered = relation === "unknown"
19
+ ? renderPrimaryHistoryIncomplete(language, parameters)
20
+ : relation === "behind"
21
+ ? renderPrimaryBehind(language, parameters)
22
+ : relation === "ahead"
23
+ ? renderPrimaryAhead(language, parameters)
24
+ : renderPrimaryDiverged(language, parameters);
25
+ const problem = {
26
+ type: relation === "unknown"
27
+ ? "primary-history-incomplete"
28
+ : `primary-${relation}`,
29
+ summary: rendered.summary,
30
+ };
31
+ return {
32
+ branch,
33
+ head,
34
+ observation: repositoryProblem(observed.observation, [problem]),
35
+ primary,
36
+ instructions: rendered.instructions,
37
+ ready: false,
38
+ };
39
+ }
40
+ //# sourceMappingURL=evaluate-primary-relation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-primary-relation.js","sourceRoot":"","sources":["../../../../src/business/shared/evaluate-primary-relation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,kCAAkC,CAAC;AAM1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,YAAY;AACZ,MAAM,UAAU,uBAAuB,CAAC,EACtC,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,cAAc,GASf;IACC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACnF,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC;IACzC,MAAM,UAAU,GAAG;QACjB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,IAAI;QACJ,YAAY,EAAE,OAAO,CACnB,IAAI,EACJ,mCAAmC,OAAO,EAAE,CAC7C;QACD,OAAO;QACP,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,aAAa;QAC5C,cAAc,EAAE,OAAO,CAAC,IAAI,EAAE,cAAc,CAAC;QAC7C,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB,CAAC;IACF,MAAM,QAAQ,GAAG,QAAQ,KAAK,SAAS;QACrC,CAAC,CAAC,8BAA8B,CAAC,QAAQ,EAAE,UAAU,CAAC;QACtD,CAAC,CAAC,QAAQ,KAA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