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,224 @@
1
+ import { randomBytes } from "node:crypto";
2
+ import { resolve } from "node:path";
3
+ import { cleanupScaffold, cleanupSummary, createScaffold } from "../foundation/owned-write/index.js";
4
+ import { encodeUlid } from "../foundation/idea-model/index.js";
5
+ import { createCommandRun } from "../foundation/command-message/index.js";
6
+ import { diagnosticProblem, dialogueReadyObservation } from "../foundation/report/index.js";
7
+ import { localize } from "../foundation/language/index.js";
8
+ import { inspectPhaseGuidance } from "../foundation/guidance/index.js";
9
+ import { ideaTemplates } from "../foundation/idea-template/index.js";
10
+ import { phaseGuidanceInstructions, projectInstructions } from "../foundation/report/index.js";
11
+ import { canonicalizeLanguageTag } from "../foundation/language/index.js";
12
+ import { observeSnapshot } from "./shared/index.js";
13
+ import { assessIdeaCreationReadiness } from "./shared/index.js";
14
+ import { errorMessage } from "./shared/business-types.js";
15
+ export function generateUlid({ now = Date.now(), random = randomBytes(10), } = {}) {
16
+ return encodeUlid({ now, random });
17
+ }
18
+ function failureReport({ cleanup, problem: actionProblem, observation, runtime, language, }) {
19
+ const problem = {
20
+ type: "idea-scaffold-failed",
21
+ summary: localize(language, `Idea creation failed: ${actionProblem.summary} ${cleanupSummary(cleanup.items)}`, `创建 idea 失败:${actionProblem.summary} ${cleanupSummary(cleanup.items)}`),
22
+ };
23
+ return runtime.complete(dialogueReadyObservation(observation, "idea-create-failed", {
24
+ cleanup,
25
+ problems: [...observation.problems, problem],
26
+ }), {
27
+ nextSteps: localize(language, "Preserve any reported paths, resolve the filesystem error, and retry `silvermoon create-idea`.", "保留报告中的路径,解决文件系统错误后,再运行 `silvermoon create-idea`。"),
28
+ });
29
+ }
30
+ function projectCreationObservation(observation) {
31
+ if (observation.state === "project-setup-required") {
32
+ if (observation.observedThrough !== "ideas")
33
+ return observation;
34
+ const { ideas: _ideas, ...project } = observation;
35
+ return { ...project, observedThrough: "configuration" };
36
+ }
37
+ if (observation.state !== "project-ready")
38
+ return observation;
39
+ return {
40
+ state: "project-setup-required",
41
+ observedThrough: "configuration",
42
+ root: observation.root,
43
+ version: observation.version,
44
+ configuration: observation.configuration,
45
+ ...(observation.device === undefined ? {} : { device: observation.device }),
46
+ ...(observation.schemas === undefined
47
+ ? {}
48
+ : { schemas: observation.schemas }),
49
+ outputLanguage: observation.outputLanguage,
50
+ problems: observation.problems,
51
+ };
52
+ }
53
+ function cleanupPlan(value) {
54
+ if (value === null || typeof value !== "object"
55
+ || !("cleanupFiles" in value) || !Array.isArray(value.cleanupFiles)
56
+ || !value.cleanupFiles.every((item) => Array.isArray(item) && item.length === 2
57
+ && typeof item[0] === "string"
58
+ && (typeof item[1] === "string" || item[1] instanceof Uint8Array))
59
+ || !("collisionPath" in value)
60
+ || (typeof value.collisionPath !== "string" && value.collisionPath !== null)
61
+ || !("createdDirectories" in value) || !Array.isArray(value.createdDirectories)
62
+ || !value.createdDirectories.every((item) => typeof item === "string")
63
+ || !("rootDirectories" in value) || !Array.isArray(value.rootDirectories)
64
+ || !value.rootDirectories.every((item) => typeof item === "string")) {
65
+ throw new TypeError("Idea scaffold failure returned an invalid cleanup plan.");
66
+ }
67
+ const cleanupFiles = [];
68
+ for (const item of value.cleanupFiles) {
69
+ if (!Array.isArray(item) || typeof item[0] !== "string"
70
+ || (typeof item[1] !== "string" && !(item[1] instanceof Uint8Array))) {
71
+ throw new TypeError("Idea scaffold cleanup file is invalid.");
72
+ }
73
+ cleanupFiles.push([item[0], item[1]]);
74
+ }
75
+ return {
76
+ cleanupFiles,
77
+ collisionPath: value.collisionPath,
78
+ createdDirectories: [...value.createdDirectories],
79
+ rootDirectories: [...value.rootDirectories],
80
+ };
81
+ }
82
+ const CREATEIDEA_PORTS = Object.freeze({ createCommandRun, observeSnapshot, assessIdeaCreationReadiness, createScaffold, cleanupScaffold });
83
+ export async function createIdeaUseCase({ generateId = generateUlid, guidanceReader = inspectPhaseGuidance, language, operations = {}, root = process.cwd(), userHome, } = {}, ports = CREATEIDEA_PORTS) {
84
+ const { createCommandRun, observeSnapshot, assessIdeaCreationReadiness, createScaffold, cleanupScaffold } = ports;
85
+ const requestedRoot = resolve(root);
86
+ const canonicalLanguage = language === undefined
87
+ ? undefined
88
+ : canonicalizeLanguageTag(language);
89
+ const intention = {
90
+ command: "create-idea",
91
+ args: { language: canonicalLanguage ?? null },
92
+ };
93
+ const runtime = createCommandRun(intention);
94
+ const observed = await observeSnapshot({
95
+ allowMissingIdeas: true,
96
+ ideaLanguage: canonicalLanguage,
97
+ root: requestedRoot,
98
+ userHome,
99
+ version: { type: "worktree" },
100
+ });
101
+ runtime.observe(projectCreationObservation(observed.observation), {
102
+ factType: "project.snapshot",
103
+ });
104
+ const recheckCommand = canonicalLanguage === undefined
105
+ ? "silvermoon create-idea"
106
+ : `silvermoon create-idea --language ${canonicalLanguage}`;
107
+ if (!observed.projectReady) {
108
+ return runtime.complete(projectCreationObservation(observed.observation), {
109
+ nextSteps: projectInstructions(observed, observed.observation.root, observed.outputLanguage, recheckCommand),
110
+ });
111
+ }
112
+ const repositoryRoot = observed.observation.root;
113
+ const readiness = await assessIdeaCreationReadiness({
114
+ observed,
115
+ runtime,
116
+ recheckCommand,
117
+ root: repositoryRoot,
118
+ });
119
+ if (!readiness.ready) {
120
+ const { observation } = readiness;
121
+ if (observation.version === undefined || observation.configuration === undefined) {
122
+ throw new TypeError("Repository preparation observation omitted project identity.");
123
+ }
124
+ const preparationObservation = {
125
+ state: "repository-preparation-required",
126
+ root: observation.root,
127
+ version: observation.version,
128
+ configuration: observation.configuration,
129
+ outputLanguage: observation.outputLanguage,
130
+ problems: observation.problems,
131
+ };
132
+ return runtime.complete(preparationObservation, { nextSteps: readiness.instructions });
133
+ }
134
+ const inspectedGuidance = await guidanceReader({
135
+ gitRoot: repositoryRoot,
136
+ phase: "preparing",
137
+ snapshotTree: readiness.head,
138
+ });
139
+ if (inspectedGuidance.state === "invalid") {
140
+ return runtime.complete(dialogueReadyObservation(readiness.observation, "phase-guidance-invalid", {
141
+ problems: inspectedGuidance.diagnostics.map((diagnostic) => diagnosticProblem(diagnostic, observed.outputLanguage)),
142
+ }), {
143
+ nextSteps: phaseGuidanceInstructions(inspectedGuidance.diagnostics, repositoryRoot, observed.outputLanguage, recheckCommand),
144
+ });
145
+ }
146
+ const completion = await runtime.performAction({
147
+ type: "create-idea-scaffold",
148
+ contentLanguage: observed.contentLanguage,
149
+ }, () => createScaffold({
150
+ ...(canonicalLanguage === undefined ? {} : { canonicalLanguage }),
151
+ contentLanguage: observed.contentLanguage,
152
+ formatVersion: observed.config.version,
153
+ generateId,
154
+ ...(Object.keys(operations).length === 0 ? {} : { operations }),
155
+ repositoryRoot,
156
+ }), (caught) => ({
157
+ problem: {
158
+ type: "idea-scaffold-failed",
159
+ summary: errorMessage(caught),
160
+ },
161
+ internal: {
162
+ cleanupPlan: caught instanceof Error && "cleanupPlan" in caught
163
+ ? caught.cleanupPlan
164
+ : [],
165
+ },
166
+ }));
167
+ if (completion.status === "failure") {
168
+ const cleanupCompletion = await runtime.performAction({ type: "remove-owned-creation-paths" }, () => cleanupScaffold(cleanupPlan(completion.internal?.cleanupPlan), ...(Object.keys(operations).length === 0 ? [] : [operations])), (caught) => ({
169
+ problem: {
170
+ type: "idea-cleanup-failed",
171
+ summary: errorMessage(caught),
172
+ },
173
+ }));
174
+ const cleanup = cleanupCompletion.status === "success"
175
+ ? cleanupCompletion.result
176
+ : {
177
+ removed: 0,
178
+ preserved: 1,
179
+ items: [{
180
+ path: repositoryRoot,
181
+ status: "preserved",
182
+ error: cleanupCompletion.problem.summary,
183
+ }],
184
+ };
185
+ return failureReport({
186
+ cleanup,
187
+ problem: completion.problem,
188
+ observation: readiness.observation,
189
+ runtime,
190
+ language: observed.outputLanguage,
191
+ });
192
+ }
193
+ const { createdIdea, paths } = completion.result;
194
+ const templates = ideaTemplates(observed.contentLanguage);
195
+ const languageInstruction = templates.localized
196
+ ? localize(observed.outputLanguage, `Use ${observed.contentLanguage} for all natural-language content in the canonical idea documents and ledger.`, `在 canonical idea 文档和 ledger 的所有自然语言内容中使用 ${observed.contentLanguage}。`)
197
+ : localize(observed.outputLanguage, `Silvermoon has no built-in ${observed.contentLanguage} scaffold, so the new files contain explicit ${templates.templateLanguage} fallback placeholders. Replace all natural-language placeholders with ${observed.contentLanguage} before continuing.`, `Silvermoon 没有内置的 ${observed.contentLanguage} 脚手架,因此新文件包含明确的 ${templates.templateLanguage} fallback 占位。继续前,将所有自然语言占位替换为 ${observed.contentLanguage}。`);
198
+ const creationObservation = {
199
+ state: "idea-created",
200
+ root: readiness.observation.root,
201
+ version: readiness.observation.version,
202
+ configuration: readiness.observation.configuration,
203
+ ...(readiness.observation.device === undefined
204
+ ? {}
205
+ : { device: readiness.observation.device }),
206
+ ...(readiness.observation.schemas === undefined
207
+ ? {}
208
+ : { schemas: readiness.observation.schemas }),
209
+ outputLanguage: readiness.observation.outputLanguage,
210
+ problems: readiness.observation.problems,
211
+ createdIdea,
212
+ ...(inspectedGuidance.state !== "valid"
213
+ || inspectedGuidance.guidance === undefined
214
+ ? {}
215
+ : { guidance: inspectedGuidance.guidance }),
216
+ };
217
+ return runtime.complete(creationObservation, {
218
+ nextSteps: localize(observed.outputLanguage, `${languageInstruction} Complete the requested Idea contract in ${paths.ideaDocumentPath}. Before requesting Idea acceptance, replace the placeholders in ${paths.implementationDocumentPath} and ${paths.deploymentDocumentPath} with lightweight first versions of no more than three high-level steps and three observable criteria each, then mirror their stable IDs and short titles in ${paths.ledgerPath}. Idea acceptance covers only ${paths.ideaDocumentPath}; the two downstream versions remain provisional.`, `${languageInstruction} 在 ${paths.ideaDocumentPath} 中完成请求的构想契约。请求构想验收前,把 ${paths.implementationDocumentPath} 和 ${paths.deploymentDocumentPath} 中的占位替换为轻量初版;每份最多三个高层步骤和三个可观察标准,并在 ${paths.ledgerPath} 中镜像其稳定 ID 与短标题。构想验收只覆盖 ${paths.ideaDocumentPath};两份下游初版仍可调整。`),
219
+ });
220
+ }
221
+ export async function createIdea(options = {}) {
222
+ return createIdeaUseCase(options);
223
+ }
224
+ //# sourceMappingURL=create-idea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-idea.js","sourceRoot":"","sources":["../../../src/business/create-idea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACrG,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,i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AO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;QAC/C,cAAc,EAAE,SAAS,CAAC,WAAW,CAAC,cAAc;QACpD,QAAQ,EAAE,SAAS,CAAC,WAAW,CAAC,QAAQ;QACxC,WAAW;QACX,GAAG,CAAC,iBAAiB,CAAC,KAAK,KAAK,OAAO;eAClC,iBAAiB,CAAC,QAAQ,KAAK,SAAS;YAC3C,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,EAAE,QAAQ,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC;KAC9C,CAAC;IACF,OAAO,OAAO,CAAC,QAAQ,CACrB,mBAAmB,EACnB;QACE,SAAS,EAAE,QAAQ,CACjB,QAAQ,CAAC,cAAc,EACvB,GAAG,mBAAmB,4CAA4C,KAAK,CAAC,gBAAgB,oEAAoE,KAAK,CAAC,0BAA0B,QAAQ,KAAK,CAAC,sBAAsB,gKAAgK,KAAK,CAAC,UAAU,iCAAiC,KAAK,CAAC,gBAAgB,mDAAmD,EAC1f,GAAG,mBAAmB,MAAM,KAAK,CAAC,gBAAgB,yBAAyB,KAAK,CAAC,0BAA0B,MAAM,KAAK,CAAC,sBAAsB,sCAAsC,KAAK,CAAC,UAAU,2BAA2B,KAAK,CAAC,gBAAgB,cAAc,CACnQ;KACF,CACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,UAA6B,EAAE;IAC9D,OAAO,iBAAiB,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC"}
@@ -0,0 +1,111 @@
1
+ import { appendFullEvent } from "./append-event-history.ts";
2
+ import { resolveIdea } from "./shared/index.ts";
3
+ import { replayStoredEvents } from "./replay-events.ts";
4
+ import { appendProjectedInteraction, appendProjectedMetadata } from "./append-event.ts";
5
+ import { inspectAdoption } from "../foundation/skill-registration/index.ts";
6
+ import { createCommandRun } from "../foundation/command-message/index.ts";
7
+ import { readEventDelta } from "../foundation/event-cursor/index.ts";
8
+ import { readEventStorage } from "../foundation/event-store/index.ts";
9
+ import { createGitSnapshotFileSystem } from "../foundation/snapshot/index.ts";
10
+ import { worktreeSnapshot } from "../foundation/git/index.ts";
11
+ interface EventCommandOptions {
12
+ operation?: string;
13
+ idea?: string;
14
+ root?: string;
15
+ input?: unknown;
16
+ language?: string;
17
+ expectedLength?: number;
18
+ expectedDigest?: string;
19
+ expectedPrimary?: string;
20
+ afterLength?: number;
21
+ afterDigest?: string;
22
+ fullHistory?: boolean;
23
+ confirmDecision?: boolean;
24
+ }
25
+ declare const EVENTCOMMAND_PORTS: Readonly<{
26
+ createCommandRun: typeof createCommandRun;
27
+ inspectAdoption: typeof inspectAdoption;
28
+ worktreeSnapshot: typeof worktreeSnapshot;
29
+ resolveIdea: typeof resolveIdea;
30
+ readEventStorage: typeof readEventStorage;
31
+ readEventDelta: typeof readEventDelta;
32
+ createGitSnapshotFileSystem: typeof createGitSnapshotFileSystem;
33
+ appendProjectedInteraction: typeof appendProjectedInteraction;
34
+ appendProjectedMetadata: typeof appendProjectedMetadata;
35
+ appendFullEvent: typeof appendFullEvent;
36
+ replayStoredEvents: typeof replayStoredEvents;
37
+ }>;
38
+ export declare function eventCommandUseCase({ operation, idea: selector, root, input, language, expectedLength, expectedDigest, expectedPrimary, afterLength, afterDigest, fullHistory, confirmDecision, }?: EventCommandOptions, ports?: typeof EVENTCOMMAND_PORTS): Promise<{
39
+ intention: import("../foundation/report/types.ts").CommandIntention;
40
+ observation: import("../foundation/report/types.ts").ProjectSetupObservation | import("../foundation/report/types.ts").CheckUnavailableObservation | import("../foundation/report/types.ts").ProjectReadyObservation | import("../foundation/report/types.ts").RepositoryBlockedObservation | import("../foundation/report/types.ts").NavigationReadyObservation | import("../foundation/report/types.ts").IdeaNotFoundObservation | import("../foundation/report/types.ts").IdeaSelectedObservation | import("../foundation/report/types.ts").IdeaCreatedObservation | import("../foundation/report/types.ts").IdeasListedObservation | import("../foundation/report/types.ts").EventResultObservation | {
41
+ guidance: {
42
+ phase: string;
43
+ path: string;
44
+ contentRevision: string;
45
+ };
46
+ state: "idea-selected";
47
+ configuration: import("../foundation/report/types.ts").ProjectConfiguration;
48
+ version: import("../foundation/report/types.ts").ProjectVersion;
49
+ selectedIdea: import("../foundation/report/types.ts").IdeaReference;
50
+ root: string;
51
+ outputLanguage: string;
52
+ problems: import("./shared/index.ts").Problem[];
53
+ device?: import("../foundation/report/types.ts").DeviceAdvisory;
54
+ schemas?: import("../foundation/schema-capability/inspection.ts").ProjectSchemaReadiness;
55
+ } | {
56
+ guidance: {
57
+ phase: string;
58
+ path: string;
59
+ contentRevision: string;
60
+ };
61
+ state: "idea-created";
62
+ configuration: import("../foundation/report/types.ts").ProjectConfiguration;
63
+ version: import("../foundation/report/types.ts").ProjectVersion;
64
+ createdIdea: import("../foundation/report/types.ts").CreatedIdea;
65
+ root: string;
66
+ outputLanguage: string;
67
+ problems: import("./shared/index.ts").Problem[];
68
+ device?: import("../foundation/report/types.ts").DeviceAdvisory;
69
+ schemas?: import("../foundation/schema-capability/inspection.ts").ProjectSchemaReadiness;
70
+ };
71
+ actions: import("../foundation/command-message/observation.ts").ProjectedAction[];
72
+ response: import("../foundation/report/types.ts").ReportResponse;
73
+ }>;
74
+ export declare function eventCommand(options?: EventCommandOptions): Promise<{
75
+ intention: import("../foundation/report/types.ts").CommandIntention;
76
+ observation: import("../foundation/report/types.ts").ProjectSetupObservation | import("../foundation/report/types.ts").CheckUnavailableObservation | import("../foundation/report/types.ts").ProjectReadyObservation | import("../foundation/report/types.ts").RepositoryBlockedObservation | import("../foundation/report/types.ts").NavigationReadyObservation | import("../foundation/report/types.ts").IdeaNotFoundObservation | import("../foundation/report/types.ts").IdeaSelectedObservation | import("../foundation/report/types.ts").IdeaCreatedObservation | import("../foundation/report/types.ts").IdeasListedObservation | import("../foundation/report/types.ts").EventResultObservation | {
77
+ guidance: {
78
+ phase: string;
79
+ path: string;
80
+ contentRevision: string;
81
+ };
82
+ state: "idea-selected";
83
+ configuration: import("../foundation/report/types.ts").ProjectConfiguration;
84
+ version: import("../foundation/report/types.ts").ProjectVersion;
85
+ selectedIdea: import("../foundation/report/types.ts").IdeaReference;
86
+ root: string;
87
+ outputLanguage: string;
88
+ problems: import("./shared/index.ts").Problem[];
89
+ device?: import("../foundation/report/types.ts").DeviceAdvisory;
90
+ schemas?: import("../foundation/schema-capability/inspection.ts").ProjectSchemaReadiness;
91
+ } | {
92
+ guidance: {
93
+ phase: string;
94
+ path: string;
95
+ contentRevision: string;
96
+ };
97
+ state: "idea-created";
98
+ configuration: import("../foundation/report/types.ts").ProjectConfiguration;
99
+ version: import("../foundation/report/types.ts").ProjectVersion;
100
+ createdIdea: import("../foundation/report/types.ts").CreatedIdea;
101
+ root: string;
102
+ outputLanguage: string;
103
+ problems: import("./shared/index.ts").Problem[];
104
+ device?: import("../foundation/report/types.ts").DeviceAdvisory;
105
+ schemas?: import("../foundation/schema-capability/inspection.ts").ProjectSchemaReadiness;
106
+ };
107
+ actions: import("../foundation/command-message/observation.ts").ProjectedAction[];
108
+ response: import("../foundation/report/types.ts").ReportResponse;
109
+ }>;
110
+ export {};
111
+ //# sourceMappingURL=event-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-command.d.ts","sourceRoot":"","sources":["../../../src/business/event-command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAExF,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAW9D,UAAU,mBAAmB;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAkED,QAAA,MAAM,kBAAkB;;;;;;;;;;;;EAA+O,CAAC;AAExQ,wBAAsB,mBAAmB,CAAC,EACxC,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAoB,EAAE,KAAK,EAAE,QAAQ,EAChE,cAAc,EAAE,cAAc,EAAE,eAAe,EAC/C,WAAW,EAAE,WAAW,EACxB,WAAmB,EACnB,eAAuB,GACxB,GAAE,mBAAwB,EAAE,KAAK,GAAE,OAAO,kBAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuKjF;AAED,wBAAsB,YAAY,CAAC,OAAO,GAAE,mBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAEnE"}
@@ -0,0 +1,239 @@
1
+ import { resolve } from "node:path";
2
+ import { appendFullEvent } from "./append-event-history.js";
3
+ import { resolveIdea } from "./shared/index.js";
4
+ import { replayStoredEvents } from "./replay-events.js";
5
+ import { appendProjectedInteraction, appendProjectedMetadata } from "./append-event.js";
6
+ import { inspectAdoption } from "../foundation/skill-registration/index.js";
7
+ import { createCommandRun } from "../foundation/command-message/index.js";
8
+ import { readEventDelta } from "../foundation/event-cursor/index.js";
9
+ import { readEventStorage } from "../foundation/event-store/index.js";
10
+ import { createGitSnapshotFileSystem } from "../foundation/snapshot/index.js";
11
+ import { worktreeSnapshot } from "../foundation/git/index.js";
12
+ import { isValidUlid } from "../foundation/idea-model/index.js";
13
+ import { localize, resolveOutputLanguage } from "../foundation/language/index.js";
14
+ import { ideaPaths } from "../foundation/coordinates/index.js";
15
+ import { errorMessage } from "./shared/business-types.js";
16
+ import { asBusinessFileSystem, requireSnapshotFileSystem, } from "./shared/business-types.js";
17
+ function requestObject(value) {
18
+ if (value === null || value === undefined)
19
+ return null;
20
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
21
+ throw new TypeError("Event input must be a JSON object.");
22
+ }
23
+ return Object.fromEntries(Object.entries(value));
24
+ }
25
+ function eventReceipt(value) {
26
+ if (value === null || typeof value !== "object" || Array.isArray(value)
27
+ || !("outcome" in value) || typeof value.outcome !== "string") {
28
+ throw new TypeError("Event operation returned an invalid receipt.");
29
+ }
30
+ const receipt = { outcome: value.outcome };
31
+ for (const [key, entry] of Object.entries(value)) {
32
+ if (entry === null || entry === undefined
33
+ || typeof entry === "string" || typeof entry === "number"
34
+ || typeof entry === "boolean" || typeof entry === "object") {
35
+ receipt[key] = entry;
36
+ }
37
+ else {
38
+ throw new TypeError(`Event receipt field ${key} is not serializable.`);
39
+ }
40
+ }
41
+ return receipt;
42
+ }
43
+ function eventCursorFileSystem(filesystem) {
44
+ const cursorEntry = (entry) => {
45
+ if (entry === null || entry === undefined)
46
+ return entry;
47
+ if (entry.size === null) {
48
+ throw new TypeError(`Snapshot entry ${entry.name} does not have a file size.`);
49
+ }
50
+ return { ...entry, size: entry.size };
51
+ };
52
+ return {
53
+ lstat: filesystem.lstat,
54
+ readFile: filesystem.readFile,
55
+ readdir: (path) => filesystem.readdir(path),
56
+ snapshotEntry: (path) => cursorEntry(filesystem.snapshotEntry(path)),
57
+ snapshotEntries: (path) => {
58
+ if (typeof path !== "string") {
59
+ throw new TypeError("Snapshot directory path must be a string.");
60
+ }
61
+ return filesystem.snapshotEntries(path).map((entry) => {
62
+ const validated = cursorEntry(entry);
63
+ if (validated === null || validated === undefined) {
64
+ throw new TypeError("Snapshot directory returned an empty entry.");
65
+ }
66
+ return validated;
67
+ });
68
+ },
69
+ snapshotFile: (path) => {
70
+ if (typeof path !== "string") {
71
+ throw new TypeError("Snapshot file path must be a string.");
72
+ }
73
+ return filesystem.snapshotFile(path);
74
+ },
75
+ };
76
+ }
77
+ const EVENTCOMMAND_PORTS = Object.freeze({ createCommandRun, inspectAdoption, worktreeSnapshot, resolveIdea, readEventStorage, readEventDelta, createGitSnapshotFileSystem, appendProjectedInteraction, appendProjectedMetadata, appendFullEvent, replayStoredEvents });
78
+ export async function eventCommandUseCase({ operation, idea: selector, root = process.cwd(), input, language, expectedLength, expectedDigest, expectedPrimary, afterLength, afterDigest, fullHistory = false, confirmDecision = false, } = {}, ports = EVENTCOMMAND_PORTS) {
79
+ const { createCommandRun, inspectAdoption, worktreeSnapshot, resolveIdea, readEventStorage, readEventDelta, createGitSnapshotFileSystem, appendProjectedInteraction, appendProjectedMetadata, appendFullEvent, replayStoredEvents } = ports;
80
+ root = resolve(root);
81
+ const runtime = createCommandRun({
82
+ command: "event",
83
+ args: { operation, idea: selector ?? null, language: language ?? null },
84
+ });
85
+ let outputLanguage = resolveOutputLanguage({
86
+ ...(language === undefined ? {} : { override: language }),
87
+ }).tag;
88
+ let receipt;
89
+ try {
90
+ if (operation !== "replay" && operation !== "append") {
91
+ throw new Error(`Unknown event operation: ${operation}`);
92
+ }
93
+ if (typeof selector !== "string") {
94
+ throw new Error("Event commands require an idea selector.");
95
+ }
96
+ const adoption = await inspectAdoption({ root });
97
+ if (adoption.findings.length || adoption.config?.version !== 2) {
98
+ const summaries = adoption.problems.flatMap((problem) => problem === undefined ? [] : [problem.summary]);
99
+ throw new Error(summaries.join("; ") || "Event commands require an explicitly initialized or migrated event project.");
100
+ }
101
+ root = adoption.root;
102
+ const config = adoption.config;
103
+ outputLanguage = resolveOutputLanguage({
104
+ ...(config.preferredLanguage === undefined
105
+ ? {}
106
+ : { content: config.preferredLanguage }),
107
+ ...(language === undefined ? {} : { override: language }),
108
+ }).tag;
109
+ const incremental = operation === "replay" && (afterLength !== undefined || afterDigest !== undefined);
110
+ if (incremental && !isValidUlid(selector)) {
111
+ throw new Error("Incremental replay requires the canonical idea ULID; resolve an alias with full replay first.");
112
+ }
113
+ if (operation !== "replay" && (afterLength !== undefined || afterDigest !== undefined)) {
114
+ throw new Error("Cursor options are only available for replay.");
115
+ }
116
+ if (fullHistory && operation !== "append")
117
+ throw new Error("Full history output is only available for append.");
118
+ const parsedInput = requestObject(input);
119
+ const projectedInteraction = operation === "append" && ["ping", "pong"].includes(typeof parsedInput?.type === "string" ? parsedInput.type : "");
120
+ const projectedMetadata = operation === "append" && !projectedInteraction && !fullHistory;
121
+ const { tree } = worktreeSnapshot(root, { reuseIndex: incremental || projectedInteraction || projectedMetadata });
122
+ const options = {
123
+ objectIdLength: tree.length,
124
+ };
125
+ if (incremental) {
126
+ if (typeof afterLength !== "number" || !Number.isSafeInteger(afterLength)
127
+ || typeof afterDigest !== "string") {
128
+ throw new Error("Incremental replay requires both --after-length and --after-digest.");
129
+ }
130
+ const incrementalFilesystem = requireSnapshotFileSystem(asBusinessFileSystem(createGitSnapshotFileSystem({ gitRoot: root, tree })));
131
+ receipt = {
132
+ id: selector, ...await readEventDelta(root, ideaPaths(selector), options, eventCursorFileSystem(incrementalFilesystem), { length: afterLength, digest: afterDigest })
133
+ };
134
+ return runtime.complete({
135
+ state: "event-result",
136
+ root,
137
+ outputLanguage,
138
+ problems: [],
139
+ receipt: eventReceipt(receipt),
140
+ });
141
+ }
142
+ const snapshot = createGitSnapshotFileSystem({ gitRoot: root, tree });
143
+ const businessSnapshot = asBusinessFileSystem(snapshot);
144
+ let fullHistoryReason = fullHistory ? "explicit-full-history" : null;
145
+ const projectedId = projectedInteraction
146
+ ? await resolveIdea(root, tree, config, selector, {
147
+ projectedEvents: true,
148
+ filesystem: businessSnapshot,
149
+ })
150
+ : null;
151
+ if (projectedId && snapshot.snapshotEntry(ideaPaths(projectedId).eventsPath)) {
152
+ if (expectedPrimary !== undefined)
153
+ throw new Error("Local interaction append does not accept --expected-primary.");
154
+ const action = await runtime.performAction({ type: "write-idea-events" }, () => appendProjectedInteraction({
155
+ root, id: projectedId, paths: ideaPaths(projectedId), filesystem: businessSnapshot, input: parsedInput,
156
+ expectedLength, expectedDigest, options,
157
+ }), (cause) => ({ problem: { type: "event.write-failed", summary: errorMessage(cause) } }));
158
+ if (action.status === "failure")
159
+ throw new Error(action.problem.summary);
160
+ return runtime.complete({
161
+ state: "event-result",
162
+ root,
163
+ outputLanguage,
164
+ problems: [],
165
+ receipt: eventReceipt(action.result),
166
+ });
167
+ }
168
+ if (projectedMetadata) {
169
+ const id = await resolveIdea(root, tree, config, selector, {
170
+ projectedEvents: true,
171
+ filesystem: businessSnapshot,
172
+ });
173
+ if (snapshot.snapshotEntry(ideaPaths(id).eventsPath)) {
174
+ const result = await appendProjectedMetadata({
175
+ root, id, paths: ideaPaths(id), filesystem: businessSnapshot, tree, config, input: parsedInput,
176
+ ...(expectedLength === undefined ? {} : { expectedLength }),
177
+ ...(expectedDigest === undefined ? {} : { expectedDigest }),
178
+ ...(expectedPrimary === undefined ? {} : { expectedPrimary }),
179
+ confirmDecision, options, runtime,
180
+ });
181
+ if (result.supported && "receipt" in result) {
182
+ return runtime.complete({
183
+ state: "event-result",
184
+ root,
185
+ outputLanguage,
186
+ problems: [],
187
+ receipt: eventReceipt(result.receipt),
188
+ });
189
+ }
190
+ if (!("reason" in result) || typeof result.reason !== "string") {
191
+ throw new TypeError("Projected history returned an invalid unsupported result.");
192
+ }
193
+ fullHistoryReason = result.reason;
194
+ }
195
+ }
196
+ const protectedPaths = [".silvermoon/ideas", ".silvermoon/config.yaml"];
197
+ const protectedTree = worktreeSnapshot(root, { paths: protectedPaths }).tree;
198
+ const id = await resolveIdea(root, tree, config, selector);
199
+ const paths = ideaPaths(id);
200
+ const store = await readEventStorage(root, paths, options, businessSnapshot);
201
+ const { bytes } = store;
202
+ const observation = { id, length: bytes.length, digest: store.digest };
203
+ if (operation === "replay") {
204
+ receipt = eventReceipt(replayStoredEvents({ root, config, id, store, options, observation }));
205
+ }
206
+ else {
207
+ receipt = eventReceipt(await appendFullEvent({
208
+ root, config, id, tree, paths, store, options, runtime, observation, input: parsedInput,
209
+ ...(expectedLength === undefined ? {} : { expectedLength }),
210
+ ...(expectedDigest === undefined ? {} : { expectedDigest }),
211
+ ...(expectedPrimary === undefined ? {} : { expectedPrimary }),
212
+ confirmDecision,
213
+ fullHistoryReason,
214
+ protectedPaths, protectedTree,
215
+ }));
216
+ }
217
+ return runtime.complete({
218
+ state: "event-result",
219
+ root,
220
+ outputLanguage,
221
+ problems: [],
222
+ receipt: eventReceipt(receipt),
223
+ });
224
+ }
225
+ catch (cause) {
226
+ if (runtime.observation.progress === "ready")
227
+ throw cause;
228
+ return runtime.complete({
229
+ state: "check-unavailable", root, outputLanguage,
230
+ problems: [{ type: "event.failed", summary: errorMessage(cause) }],
231
+ }, {
232
+ nextSteps: localize(outputLanguage, "Preserve unknown work and reobserve the exact idea and primary. Exceptional history maintenance requires direct review of the complete events.jsonl file.", "保留未知修改并重新观察准确 idea 和 primary。异常历史维护需要直接审阅完整 events.jsonl 文件。")
233
+ });
234
+ }
235
+ }
236
+ export async function eventCommand(options = {}) {
237
+ return eventCommandUseCase(options);
238
+ }
239
+ //# sourceMappingURL=event-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-command.js","sourceRoot":"","sources":["../../../src/business/event-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,W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C;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,UAA+B,EAAE;IAClE,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { checkRepository, checkRepositoryUseCase, } from "./check-repository.ts";
2
+ export { createIdea, createIdeaUseCase, generateUlid, } from "./create-idea.ts";
3
+ export { eventCommand, eventCommandUseCase, } from "./event-command.ts";
4
+ export { listIdeas, listIdeasUseCase, } from "./list-ideas.ts";
5
+ export { IMPLEMENTED_SCHEMA_MIGRATIONS, runSchemaMigration, } from "./schema-migration.ts";
6
+ export { CHANGE_SAMPLE_BYTE_LIMIT, CHANGE_SAMPLE_ITEM_LIMIT, assessIdeaCreationReadiness, assessRepositoryReadiness, phaseGuidanceInstructions, projectInstructions, summarizeWorktreeChanges, whatsNext, whatsNextUseCase, } from "./whats-next.ts";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/business/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,YAAY,EACZ,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,SAAS,EACT,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,6BAA6B,EAC7B,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACT,gBAAgB,GACjB,MAAM,iBAAiB,CAAC"}