@jeger-ai/opengantry 1.0.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 (515) hide show
  1. package/LICENSE +235 -0
  2. package/NOTICE +16 -0
  3. package/README.md +337 -0
  4. package/dist/cli/commands/arch.d.ts +19 -0
  5. package/dist/cli/commands/arch.d.ts.map +1 -0
  6. package/dist/cli/commands/arch.js +86 -0
  7. package/dist/cli/commands/arch.js.map +1 -0
  8. package/dist/cli/commands/check.d.ts +2 -0
  9. package/dist/cli/commands/check.d.ts.map +1 -0
  10. package/dist/cli/commands/check.js +16 -0
  11. package/dist/cli/commands/check.js.map +1 -0
  12. package/dist/cli/commands/doctor.d.ts +12 -0
  13. package/dist/cli/commands/doctor.d.ts.map +1 -0
  14. package/dist/cli/commands/doctor.js +40 -0
  15. package/dist/cli/commands/doctor.js.map +1 -0
  16. package/dist/cli/commands/init.d.ts +18 -0
  17. package/dist/cli/commands/init.d.ts.map +1 -0
  18. package/dist/cli/commands/init.js +185 -0
  19. package/dist/cli/commands/init.js.map +1 -0
  20. package/dist/cli/commands/legislate.d.ts +21 -0
  21. package/dist/cli/commands/legislate.d.ts.map +1 -0
  22. package/dist/cli/commands/legislate.js +143 -0
  23. package/dist/cli/commands/legislate.js.map +1 -0
  24. package/dist/cli/commands/mcp-serve.d.ts +2 -0
  25. package/dist/cli/commands/mcp-serve.d.ts.map +1 -0
  26. package/dist/cli/commands/mcp-serve.js +14 -0
  27. package/dist/cli/commands/mcp-serve.js.map +1 -0
  28. package/dist/cli/commands/metrics.d.ts +6 -0
  29. package/dist/cli/commands/metrics.d.ts.map +1 -0
  30. package/dist/cli/commands/metrics.js +20 -0
  31. package/dist/cli/commands/metrics.js.map +1 -0
  32. package/dist/cli/commands/mission.d.ts +3 -0
  33. package/dist/cli/commands/mission.d.ts.map +1 -0
  34. package/dist/cli/commands/mission.js +29 -0
  35. package/dist/cli/commands/mission.js.map +1 -0
  36. package/dist/cli/commands/onboarding.d.ts +2 -0
  37. package/dist/cli/commands/onboarding.d.ts.map +1 -0
  38. package/dist/cli/commands/onboarding.js +85 -0
  39. package/dist/cli/commands/onboarding.js.map +1 -0
  40. package/dist/cli/commands/runtime.d.ts +19 -0
  41. package/dist/cli/commands/runtime.d.ts.map +1 -0
  42. package/dist/cli/commands/runtime.js +101 -0
  43. package/dist/cli/commands/runtime.js.map +1 -0
  44. package/dist/cli/commands/start.d.ts +4 -0
  45. package/dist/cli/commands/start.d.ts.map +1 -0
  46. package/dist/cli/commands/start.js +3 -0
  47. package/dist/cli/commands/start.js.map +1 -0
  48. package/dist/cli/commands/status.d.ts +8 -0
  49. package/dist/cli/commands/status.d.ts.map +1 -0
  50. package/dist/cli/commands/status.js +65 -0
  51. package/dist/cli/commands/status.js.map +1 -0
  52. package/dist/cli/commands/teacher.d.ts +11 -0
  53. package/dist/cli/commands/teacher.d.ts.map +1 -0
  54. package/dist/cli/commands/teacher.js +48 -0
  55. package/dist/cli/commands/teacher.js.map +1 -0
  56. package/dist/cli/commands/triage.d.ts +10 -0
  57. package/dist/cli/commands/triage.d.ts.map +1 -0
  58. package/dist/cli/commands/triage.js +48 -0
  59. package/dist/cli/commands/triage.js.map +1 -0
  60. package/dist/cli/commands/upgrade.d.ts +10 -0
  61. package/dist/cli/commands/upgrade.d.ts.map +1 -0
  62. package/dist/cli/commands/upgrade.js +89 -0
  63. package/dist/cli/commands/upgrade.js.map +1 -0
  64. package/dist/cli/commands/verify.d.ts +6 -0
  65. package/dist/cli/commands/verify.d.ts.map +1 -0
  66. package/dist/cli/commands/verify.js +33 -0
  67. package/dist/cli/commands/verify.js.map +1 -0
  68. package/dist/cli/index.d.ts +3 -0
  69. package/dist/cli/index.d.ts.map +1 -0
  70. package/dist/cli/index.js +13 -0
  71. package/dist/cli/index.js.map +1 -0
  72. package/dist/cli/lib/agent-error.d.ts +20 -0
  73. package/dist/cli/lib/agent-error.d.ts.map +1 -0
  74. package/dist/cli/lib/agent-error.js +58 -0
  75. package/dist/cli/lib/agent-error.js.map +1 -0
  76. package/dist/cli/lib/architecture-credential.d.ts +22 -0
  77. package/dist/cli/lib/architecture-credential.d.ts.map +1 -0
  78. package/dist/cli/lib/architecture-credential.js +198 -0
  79. package/dist/cli/lib/architecture-credential.js.map +1 -0
  80. package/dist/cli/lib/architecture-pointer-discovery.d.ts +7 -0
  81. package/dist/cli/lib/architecture-pointer-discovery.d.ts.map +1 -0
  82. package/dist/cli/lib/architecture-pointer-discovery.js +60 -0
  83. package/dist/cli/lib/architecture-pointer-discovery.js.map +1 -0
  84. package/dist/cli/lib/architecture-pointer-doctor.d.ts +3 -0
  85. package/dist/cli/lib/architecture-pointer-doctor.d.ts.map +1 -0
  86. package/dist/cli/lib/architecture-pointer-doctor.js +114 -0
  87. package/dist/cli/lib/architecture-pointer-doctor.js.map +1 -0
  88. package/dist/cli/lib/architecture-pointer-schema.d.ts +5 -0
  89. package/dist/cli/lib/architecture-pointer-schema.d.ts.map +1 -0
  90. package/dist/cli/lib/architecture-pointer-schema.js +137 -0
  91. package/dist/cli/lib/architecture-pointer-schema.js.map +1 -0
  92. package/dist/cli/lib/architecture-pointer-types.d.ts +24 -0
  93. package/dist/cli/lib/architecture-pointer-types.d.ts.map +1 -0
  94. package/dist/cli/lib/architecture-pointer-types.js +7 -0
  95. package/dist/cli/lib/architecture-pointer-types.js.map +1 -0
  96. package/dist/cli/lib/architecture-pointer.d.ts +7 -0
  97. package/dist/cli/lib/architecture-pointer.d.ts.map +1 -0
  98. package/dist/cli/lib/architecture-pointer.js +10 -0
  99. package/dist/cli/lib/architecture-pointer.js.map +1 -0
  100. package/dist/cli/lib/atomic-fs.d.ts +9 -0
  101. package/dist/cli/lib/atomic-fs.d.ts.map +1 -0
  102. package/dist/cli/lib/atomic-fs.js +63 -0
  103. package/dist/cli/lib/atomic-fs.js.map +1 -0
  104. package/dist/cli/lib/audience-output.d.ts +18 -0
  105. package/dist/cli/lib/audience-output.d.ts.map +1 -0
  106. package/dist/cli/lib/audience-output.js +80 -0
  107. package/dist/cli/lib/audience-output.js.map +1 -0
  108. package/dist/cli/lib/break-glass.d.ts +25 -0
  109. package/dist/cli/lib/break-glass.d.ts.map +1 -0
  110. package/dist/cli/lib/break-glass.js +134 -0
  111. package/dist/cli/lib/break-glass.js.map +1 -0
  112. package/dist/cli/lib/cli-io.d.ts +9 -0
  113. package/dist/cli/lib/cli-io.d.ts.map +1 -0
  114. package/dist/cli/lib/cli-io.js +38 -0
  115. package/dist/cli/lib/cli-io.js.map +1 -0
  116. package/dist/cli/lib/cli-timeout.d.ts +9 -0
  117. package/dist/cli/lib/cli-timeout.d.ts.map +1 -0
  118. package/dist/cli/lib/cli-timeout.js +17 -0
  119. package/dist/cli/lib/cli-timeout.js.map +1 -0
  120. package/dist/cli/lib/constants.d.ts +26 -0
  121. package/dist/cli/lib/constants.d.ts.map +1 -0
  122. package/dist/cli/lib/constants.js +26 -0
  123. package/dist/cli/lib/constants.js.map +1 -0
  124. package/dist/cli/lib/dirty-missions.d.ts +8 -0
  125. package/dist/cli/lib/dirty-missions.d.ts.map +1 -0
  126. package/dist/cli/lib/dirty-missions.js +65 -0
  127. package/dist/cli/lib/dirty-missions.js.map +1 -0
  128. package/dist/cli/lib/doctor-checks.d.ts +16 -0
  129. package/dist/cli/lib/doctor-checks.d.ts.map +1 -0
  130. package/dist/cli/lib/doctor-checks.js +138 -0
  131. package/dist/cli/lib/doctor-checks.js.map +1 -0
  132. package/dist/cli/lib/doctor-integration-checks.d.ts +5 -0
  133. package/dist/cli/lib/doctor-integration-checks.d.ts.map +1 -0
  134. package/dist/cli/lib/doctor-integration-checks.js +88 -0
  135. package/dist/cli/lib/doctor-integration-checks.js.map +1 -0
  136. package/dist/cli/lib/doctor-orchestration.d.ts +10 -0
  137. package/dist/cli/lib/doctor-orchestration.d.ts.map +1 -0
  138. package/dist/cli/lib/doctor-orchestration.js +25 -0
  139. package/dist/cli/lib/doctor-orchestration.js.map +1 -0
  140. package/dist/cli/lib/draft-token.d.ts +37 -0
  141. package/dist/cli/lib/draft-token.d.ts.map +1 -0
  142. package/dist/cli/lib/draft-token.js +171 -0
  143. package/dist/cli/lib/draft-token.js.map +1 -0
  144. package/dist/cli/lib/fix-hints.d.ts +51 -0
  145. package/dist/cli/lib/fix-hints.d.ts.map +1 -0
  146. package/dist/cli/lib/fix-hints.js +197 -0
  147. package/dist/cli/lib/fix-hints.js.map +1 -0
  148. package/dist/cli/lib/forbidden-scan.d.ts +18 -0
  149. package/dist/cli/lib/forbidden-scan.d.ts.map +1 -0
  150. package/dist/cli/lib/forbidden-scan.js +96 -0
  151. package/dist/cli/lib/forbidden-scan.js.map +1 -0
  152. package/dist/cli/lib/gate.d.ts +10 -0
  153. package/dist/cli/lib/gate.d.ts.map +1 -0
  154. package/dist/cli/lib/gate.js +30 -0
  155. package/dist/cli/lib/gate.js.map +1 -0
  156. package/dist/cli/lib/git-metrics-missions.d.ts +3 -0
  157. package/dist/cli/lib/git-metrics-missions.d.ts.map +1 -0
  158. package/dist/cli/lib/git-metrics-missions.js +51 -0
  159. package/dist/cli/lib/git-metrics-missions.js.map +1 -0
  160. package/dist/cli/lib/git-metrics-stream.d.ts +24 -0
  161. package/dist/cli/lib/git-metrics-stream.d.ts.map +1 -0
  162. package/dist/cli/lib/git-metrics-stream.js +137 -0
  163. package/dist/cli/lib/git-metrics-stream.js.map +1 -0
  164. package/dist/cli/lib/git-metrics.d.ts +18 -0
  165. package/dist/cli/lib/git-metrics.d.ts.map +1 -0
  166. package/dist/cli/lib/git-metrics.js +39 -0
  167. package/dist/cli/lib/git-metrics.js.map +1 -0
  168. package/dist/cli/lib/git-proof-errors.d.ts +3 -0
  169. package/dist/cli/lib/git-proof-errors.d.ts.map +1 -0
  170. package/dist/cli/lib/git-proof-errors.js +7 -0
  171. package/dist/cli/lib/git-proof-errors.js.map +1 -0
  172. package/dist/cli/lib/git-proof.d.ts +37 -0
  173. package/dist/cli/lib/git-proof.d.ts.map +1 -0
  174. package/dist/cli/lib/git-proof.js +147 -0
  175. package/dist/cli/lib/git-proof.js.map +1 -0
  176. package/dist/cli/lib/git-repo.d.ts +17 -0
  177. package/dist/cli/lib/git-repo.d.ts.map +1 -0
  178. package/dist/cli/lib/git-repo.js +39 -0
  179. package/dist/cli/lib/git-repo.js.map +1 -0
  180. package/dist/cli/lib/git.d.ts +2 -0
  181. package/dist/cli/lib/git.d.ts.map +1 -0
  182. package/dist/cli/lib/git.js +19 -0
  183. package/dist/cli/lib/git.js.map +1 -0
  184. package/dist/cli/lib/gitignore-gxt.d.ts +2 -0
  185. package/dist/cli/lib/gitignore-gxt.d.ts.map +1 -0
  186. package/dist/cli/lib/gitignore-gxt.js +24 -0
  187. package/dist/cli/lib/gitignore-gxt.js.map +1 -0
  188. package/dist/cli/lib/gxt-error-codes.d.ts +19 -0
  189. package/dist/cli/lib/gxt-error-codes.d.ts.map +1 -0
  190. package/dist/cli/lib/gxt-error-codes.js +60 -0
  191. package/dist/cli/lib/gxt-error-codes.js.map +1 -0
  192. package/dist/cli/lib/init-asset-catalog.d.ts +15 -0
  193. package/dist/cli/lib/init-asset-catalog.d.ts.map +1 -0
  194. package/dist/cli/lib/init-asset-catalog.js +163 -0
  195. package/dist/cli/lib/init-asset-catalog.js.map +1 -0
  196. package/dist/cli/lib/init-assets.d.ts +8 -0
  197. package/dist/cli/lib/init-assets.d.ts.map +1 -0
  198. package/dist/cli/lib/init-assets.js +3 -0
  199. package/dist/cli/lib/init-assets.js.map +1 -0
  200. package/dist/cli/lib/init-compose-arch-pointer.d.ts +6 -0
  201. package/dist/cli/lib/init-compose-arch-pointer.d.ts.map +1 -0
  202. package/dist/cli/lib/init-compose-arch-pointer.js +64 -0
  203. package/dist/cli/lib/init-compose-arch-pointer.js.map +1 -0
  204. package/dist/cli/lib/init-compose-doc.d.ts +5 -0
  205. package/dist/cli/lib/init-compose-doc.d.ts.map +1 -0
  206. package/dist/cli/lib/init-compose-doc.js +37 -0
  207. package/dist/cli/lib/init-compose-doc.js.map +1 -0
  208. package/dist/cli/lib/init-interactive.d.ts +8 -0
  209. package/dist/cli/lib/init-interactive.d.ts.map +1 -0
  210. package/dist/cli/lib/init-interactive.js +195 -0
  211. package/dist/cli/lib/init-interactive.js.map +1 -0
  212. package/dist/cli/lib/init-plan.d.ts +20 -0
  213. package/dist/cli/lib/init-plan.d.ts.map +1 -0
  214. package/dist/cli/lib/init-plan.js +92 -0
  215. package/dist/cli/lib/init-plan.js.map +1 -0
  216. package/dist/cli/lib/init-profile.d.ts +39 -0
  217. package/dist/cli/lib/init-profile.d.ts.map +1 -0
  218. package/dist/cli/lib/init-profile.js +93 -0
  219. package/dist/cli/lib/init-profile.js.map +1 -0
  220. package/dist/cli/lib/init-tutorial.d.ts +2 -0
  221. package/dist/cli/lib/init-tutorial.d.ts.map +1 -0
  222. package/dist/cli/lib/init-tutorial.js +156 -0
  223. package/dist/cli/lib/init-tutorial.js.map +1 -0
  224. package/dist/cli/lib/integration-compat.d.ts +24 -0
  225. package/dist/cli/lib/integration-compat.d.ts.map +1 -0
  226. package/dist/cli/lib/integration-compat.js +50 -0
  227. package/dist/cli/lib/integration-compat.js.map +1 -0
  228. package/dist/cli/lib/legislate-skill.d.ts +20 -0
  229. package/dist/cli/lib/legislate-skill.d.ts.map +1 -0
  230. package/dist/cli/lib/legislate-skill.js +30 -0
  231. package/dist/cli/lib/legislate-skill.js.map +1 -0
  232. package/dist/cli/lib/manifest.d.ts +6 -0
  233. package/dist/cli/lib/manifest.d.ts.map +1 -0
  234. package/dist/cli/lib/manifest.js +53 -0
  235. package/dist/cli/lib/manifest.js.map +1 -0
  236. package/dist/cli/lib/mcp-legislation.d.ts +82 -0
  237. package/dist/cli/lib/mcp-legislation.d.ts.map +1 -0
  238. package/dist/cli/lib/mcp-legislation.js +181 -0
  239. package/dist/cli/lib/mcp-legislation.js.map +1 -0
  240. package/dist/cli/lib/mcp-orchestration.d.ts +12 -0
  241. package/dist/cli/lib/mcp-orchestration.d.ts.map +1 -0
  242. package/dist/cli/lib/mcp-orchestration.js +54 -0
  243. package/dist/cli/lib/mcp-orchestration.js.map +1 -0
  244. package/dist/cli/lib/mcp-runtime.d.ts +60 -0
  245. package/dist/cli/lib/mcp-runtime.d.ts.map +1 -0
  246. package/dist/cli/lib/mcp-runtime.js +133 -0
  247. package/dist/cli/lib/mcp-runtime.js.map +1 -0
  248. package/dist/cli/lib/mcp-tools-register.d.ts +4 -0
  249. package/dist/cli/lib/mcp-tools-register.d.ts.map +1 -0
  250. package/dist/cli/lib/mcp-tools-register.js +78 -0
  251. package/dist/cli/lib/mcp-tools-register.js.map +1 -0
  252. package/dist/cli/lib/mcp-upgrade.d.ts +7 -0
  253. package/dist/cli/lib/mcp-upgrade.d.ts.map +1 -0
  254. package/dist/cli/lib/mcp-upgrade.js +38 -0
  255. package/dist/cli/lib/mcp-upgrade.js.map +1 -0
  256. package/dist/cli/lib/mission-emit.d.ts +7 -0
  257. package/dist/cli/lib/mission-emit.d.ts.map +1 -0
  258. package/dist/cli/lib/mission-emit.js +23 -0
  259. package/dist/cli/lib/mission-emit.js.map +1 -0
  260. package/dist/cli/lib/mission-legislative-stub.d.ts +9 -0
  261. package/dist/cli/lib/mission-legislative-stub.d.ts.map +1 -0
  262. package/dist/cli/lib/mission-legislative-stub.js +36 -0
  263. package/dist/cli/lib/mission-legislative-stub.js.map +1 -0
  264. package/dist/cli/lib/mission-markdown.d.ts +6 -0
  265. package/dist/cli/lib/mission-markdown.d.ts.map +1 -0
  266. package/dist/cli/lib/mission-markdown.js +84 -0
  267. package/dist/cli/lib/mission-markdown.js.map +1 -0
  268. package/dist/cli/lib/mission-msn.d.ts +10 -0
  269. package/dist/cli/lib/mission-msn.d.ts.map +1 -0
  270. package/dist/cli/lib/mission-msn.js +85 -0
  271. package/dist/cli/lib/mission-msn.js.map +1 -0
  272. package/dist/cli/lib/mission-parser.d.ts +6 -0
  273. package/dist/cli/lib/mission-parser.d.ts.map +1 -0
  274. package/dist/cli/lib/mission-parser.js +29 -0
  275. package/dist/cli/lib/mission-parser.js.map +1 -0
  276. package/dist/cli/lib/mission-path.d.ts +4 -0
  277. package/dist/cli/lib/mission-path.d.ts.map +1 -0
  278. package/dist/cli/lib/mission-path.js +28 -0
  279. package/dist/cli/lib/mission-path.js.map +1 -0
  280. package/dist/cli/lib/mission-resolution.d.ts +14 -0
  281. package/dist/cli/lib/mission-resolution.d.ts.map +1 -0
  282. package/dist/cli/lib/mission-resolution.js +60 -0
  283. package/dist/cli/lib/mission-resolution.js.map +1 -0
  284. package/dist/cli/lib/mission-yaml.d.ts +12 -0
  285. package/dist/cli/lib/mission-yaml.d.ts.map +1 -0
  286. package/dist/cli/lib/mission-yaml.js +96 -0
  287. package/dist/cli/lib/mission-yaml.js.map +1 -0
  288. package/dist/cli/lib/msn-allocate.d.ts +13 -0
  289. package/dist/cli/lib/msn-allocate.d.ts.map +1 -0
  290. package/dist/cli/lib/msn-allocate.js +98 -0
  291. package/dist/cli/lib/msn-allocate.js.map +1 -0
  292. package/dist/cli/lib/msn.d.ts +2 -0
  293. package/dist/cli/lib/msn.d.ts.map +1 -0
  294. package/dist/cli/lib/msn.js +5 -0
  295. package/dist/cli/lib/msn.js.map +1 -0
  296. package/dist/cli/lib/onboarding-flow.d.ts +11 -0
  297. package/dist/cli/lib/onboarding-flow.d.ts.map +1 -0
  298. package/dist/cli/lib/onboarding-flow.js +25 -0
  299. package/dist/cli/lib/onboarding-flow.js.map +1 -0
  300. package/dist/cli/lib/out-of-scope-hint.d.ts +7 -0
  301. package/dist/cli/lib/out-of-scope-hint.d.ts.map +1 -0
  302. package/dist/cli/lib/out-of-scope-hint.js +79 -0
  303. package/dist/cli/lib/out-of-scope-hint.js.map +1 -0
  304. package/dist/cli/lib/output-context.d.ts +22 -0
  305. package/dist/cli/lib/output-context.d.ts.map +1 -0
  306. package/dist/cli/lib/output-context.js +55 -0
  307. package/dist/cli/lib/output-context.js.map +1 -0
  308. package/dist/cli/lib/program-audience-hook.d.ts +4 -0
  309. package/dist/cli/lib/program-audience-hook.d.ts.map +1 -0
  310. package/dist/cli/lib/program-audience-hook.js +35 -0
  311. package/dist/cli/lib/program-audience-hook.js.map +1 -0
  312. package/dist/cli/lib/runtime-env.d.ts +23 -0
  313. package/dist/cli/lib/runtime-env.d.ts.map +1 -0
  314. package/dist/cli/lib/runtime-env.js +64 -0
  315. package/dist/cli/lib/runtime-env.js.map +1 -0
  316. package/dist/cli/lib/runtime-exec-orchestrator.d.ts +14 -0
  317. package/dist/cli/lib/runtime-exec-orchestrator.d.ts.map +1 -0
  318. package/dist/cli/lib/runtime-exec-orchestrator.js +131 -0
  319. package/dist/cli/lib/runtime-exec-orchestrator.js.map +1 -0
  320. package/dist/cli/lib/runtime-exec-process.d.ts +23 -0
  321. package/dist/cli/lib/runtime-exec-process.d.ts.map +1 -0
  322. package/dist/cli/lib/runtime-exec-process.js +55 -0
  323. package/dist/cli/lib/runtime-exec-process.js.map +1 -0
  324. package/dist/cli/lib/runtime-exec-result.d.ts +21 -0
  325. package/dist/cli/lib/runtime-exec-result.d.ts.map +1 -0
  326. package/dist/cli/lib/runtime-exec-result.js +42 -0
  327. package/dist/cli/lib/runtime-exec-result.js.map +1 -0
  328. package/dist/cli/lib/runtime-exec-worker.d.ts +18 -0
  329. package/dist/cli/lib/runtime-exec-worker.d.ts.map +1 -0
  330. package/dist/cli/lib/runtime-exec-worker.js +49 -0
  331. package/dist/cli/lib/runtime-exec-worker.js.map +1 -0
  332. package/dist/cli/lib/runtime-exec.d.ts +5 -0
  333. package/dist/cli/lib/runtime-exec.d.ts.map +1 -0
  334. package/dist/cli/lib/runtime-exec.js +5 -0
  335. package/dist/cli/lib/runtime-exec.js.map +1 -0
  336. package/dist/cli/lib/skill-sync.d.ts +11 -0
  337. package/dist/cli/lib/skill-sync.d.ts.map +1 -0
  338. package/dist/cli/lib/skill-sync.js +39 -0
  339. package/dist/cli/lib/skill-sync.js.map +1 -0
  340. package/dist/cli/lib/start-orchestration.d.ts +29 -0
  341. package/dist/cli/lib/start-orchestration.d.ts.map +1 -0
  342. package/dist/cli/lib/start-orchestration.js +176 -0
  343. package/dist/cli/lib/start-orchestration.js.map +1 -0
  344. package/dist/cli/lib/start-state.d.ts +12 -0
  345. package/dist/cli/lib/start-state.d.ts.map +1 -0
  346. package/dist/cli/lib/start-state.js +86 -0
  347. package/dist/cli/lib/start-state.js.map +1 -0
  348. package/dist/cli/lib/status-report.d.ts +21 -0
  349. package/dist/cli/lib/status-report.d.ts.map +1 -0
  350. package/dist/cli/lib/status-report.js +77 -0
  351. package/dist/cli/lib/status-report.js.map +1 -0
  352. package/dist/cli/lib/substrate-version.d.ts +22 -0
  353. package/dist/cli/lib/substrate-version.d.ts.map +1 -0
  354. package/dist/cli/lib/substrate-version.js +97 -0
  355. package/dist/cli/lib/substrate-version.js.map +1 -0
  356. package/dist/cli/lib/teacher-identity.d.ts +24 -0
  357. package/dist/cli/lib/teacher-identity.d.ts.map +1 -0
  358. package/dist/cli/lib/teacher-identity.js +123 -0
  359. package/dist/cli/lib/teacher-identity.js.map +1 -0
  360. package/dist/cli/lib/telemetry-log.d.ts +22 -0
  361. package/dist/cli/lib/telemetry-log.d.ts.map +1 -0
  362. package/dist/cli/lib/telemetry-log.js +50 -0
  363. package/dist/cli/lib/telemetry-log.js.map +1 -0
  364. package/dist/cli/lib/trace-failure-kind.d.ts +4 -0
  365. package/dist/cli/lib/trace-failure-kind.d.ts.map +1 -0
  366. package/dist/cli/lib/trace-failure-kind.js +23 -0
  367. package/dist/cli/lib/trace-failure-kind.js.map +1 -0
  368. package/dist/cli/lib/trace.d.ts +25 -0
  369. package/dist/cli/lib/trace.d.ts.map +1 -0
  370. package/dist/cli/lib/trace.js +121 -0
  371. package/dist/cli/lib/trace.js.map +1 -0
  372. package/dist/cli/lib/triage-logic.d.ts +10 -0
  373. package/dist/cli/lib/triage-logic.d.ts.map +1 -0
  374. package/dist/cli/lib/triage-logic.js +105 -0
  375. package/dist/cli/lib/triage-logic.js.map +1 -0
  376. package/dist/cli/lib/types.d.ts +62 -0
  377. package/dist/cli/lib/types.d.ts.map +1 -0
  378. package/dist/cli/lib/types.js +2 -0
  379. package/dist/cli/lib/types.js.map +1 -0
  380. package/dist/cli/lib/upgrade-apply.d.ts +15 -0
  381. package/dist/cli/lib/upgrade-apply.d.ts.map +1 -0
  382. package/dist/cli/lib/upgrade-apply.js +122 -0
  383. package/dist/cli/lib/upgrade-apply.js.map +1 -0
  384. package/dist/cli/lib/upgrade-eligible-assets.d.ts +5 -0
  385. package/dist/cli/lib/upgrade-eligible-assets.d.ts.map +1 -0
  386. package/dist/cli/lib/upgrade-eligible-assets.js +9 -0
  387. package/dist/cli/lib/upgrade-eligible-assets.js.map +1 -0
  388. package/dist/cli/lib/upgrade-plan.d.ts +43 -0
  389. package/dist/cli/lib/upgrade-plan.d.ts.map +1 -0
  390. package/dist/cli/lib/upgrade-plan.js +220 -0
  391. package/dist/cli/lib/upgrade-plan.js.map +1 -0
  392. package/dist/cli/lib/upgrade-profile.d.ts +4 -0
  393. package/dist/cli/lib/upgrade-profile.d.ts.map +1 -0
  394. package/dist/cli/lib/upgrade-profile.js +27 -0
  395. package/dist/cli/lib/upgrade-profile.js.map +1 -0
  396. package/dist/cli/lib/user-error.d.ts +20 -0
  397. package/dist/cli/lib/user-error.d.ts.map +1 -0
  398. package/dist/cli/lib/user-error.js +64 -0
  399. package/dist/cli/lib/user-error.js.map +1 -0
  400. package/dist/cli/lib/verify-engine.d.ts +33 -0
  401. package/dist/cli/lib/verify-engine.d.ts.map +1 -0
  402. package/dist/cli/lib/verify-engine.js +104 -0
  403. package/dist/cli/lib/verify-engine.js.map +1 -0
  404. package/dist/cli/lib/verify-failure-presentation.d.ts +31 -0
  405. package/dist/cli/lib/verify-failure-presentation.d.ts.map +1 -0
  406. package/dist/cli/lib/verify-failure-presentation.js +93 -0
  407. package/dist/cli/lib/verify-failure-presentation.js.map +1 -0
  408. package/dist/cli/lib/verify-flow.d.ts +21 -0
  409. package/dist/cli/lib/verify-flow.d.ts.map +1 -0
  410. package/dist/cli/lib/verify-flow.js +103 -0
  411. package/dist/cli/lib/verify-flow.js.map +1 -0
  412. package/dist/cli/lib/verify-repair.d.ts +4 -0
  413. package/dist/cli/lib/verify-repair.d.ts.map +1 -0
  414. package/dist/cli/lib/verify-repair.js +61 -0
  415. package/dist/cli/lib/verify-repair.js.map +1 -0
  416. package/dist/cli/lib/verify-types.d.ts +21 -0
  417. package/dist/cli/lib/verify-types.d.ts.map +1 -0
  418. package/dist/cli/lib/verify-types.js +2 -0
  419. package/dist/cli/lib/verify-types.js.map +1 -0
  420. package/dist/cli/lib/version.gen.d.ts +4 -0
  421. package/dist/cli/lib/version.gen.d.ts.map +1 -0
  422. package/dist/cli/lib/version.gen.js +4 -0
  423. package/dist/cli/lib/version.gen.js.map +1 -0
  424. package/dist/cli/lib/worker-log-line-map.d.ts +12 -0
  425. package/dist/cli/lib/worker-log-line-map.d.ts.map +1 -0
  426. package/dist/cli/lib/worker-log-line-map.js +29 -0
  427. package/dist/cli/lib/worker-log-line-map.js.map +1 -0
  428. package/dist/cli/lib/workspace.d.ts +11 -0
  429. package/dist/cli/lib/workspace.d.ts.map +1 -0
  430. package/dist/cli/lib/workspace.js +14 -0
  431. package/dist/cli/lib/workspace.js.map +1 -0
  432. package/dist/cli/program-arch.d.ts +3 -0
  433. package/dist/cli/program-arch.d.ts.map +1 -0
  434. package/dist/cli/program-arch.js +45 -0
  435. package/dist/cli/program-arch.js.map +1 -0
  436. package/dist/cli/program-core.d.ts +3 -0
  437. package/dist/cli/program-core.d.ts.map +1 -0
  438. package/dist/cli/program-core.js +154 -0
  439. package/dist/cli/program-core.js.map +1 -0
  440. package/dist/cli/program-mcp.d.ts +3 -0
  441. package/dist/cli/program-mcp.d.ts.map +1 -0
  442. package/dist/cli/program-mcp.js +12 -0
  443. package/dist/cli/program-mcp.js.map +1 -0
  444. package/dist/cli/program-mission.d.ts +3 -0
  445. package/dist/cli/program-mission.d.ts.map +1 -0
  446. package/dist/cli/program-mission.js +77 -0
  447. package/dist/cli/program-mission.js.map +1 -0
  448. package/dist/cli/program-teacher.d.ts +3 -0
  449. package/dist/cli/program-teacher.d.ts.map +1 -0
  450. package/dist/cli/program-teacher.js +19 -0
  451. package/dist/cli/program-teacher.js.map +1 -0
  452. package/dist/cli/program-workflow.d.ts +3 -0
  453. package/dist/cli/program-workflow.d.ts.map +1 -0
  454. package/dist/cli/program-workflow.js +81 -0
  455. package/dist/cli/program-workflow.js.map +1 -0
  456. package/dist/cli/program.d.ts +4 -0
  457. package/dist/cli/program.d.ts.map +1 -0
  458. package/dist/cli/program.js +25 -0
  459. package/dist/cli/program.js.map +1 -0
  460. package/package.json +66 -0
  461. package/templates/.cursor/hooks/gxt-before-shell.sh +63 -0
  462. package/templates/.cursor/hooks/gxt-session-start.sh +68 -0
  463. package/templates/.cursor/hooks.json +15 -0
  464. package/templates/.cursor/mcp.json +8 -0
  465. package/templates/.cursor/rules/opengantry-gxt-substrate.mdc +43 -0
  466. package/templates/.gitagent/ARCHITECTURE.pointer.external.example.json +13 -0
  467. package/templates/.gitagent/ARCHITECTURE.pointer.json +9 -0
  468. package/templates/.gitagent/foreman/BYPASS.sha256 +2 -0
  469. package/templates/.gitagent/foreman/MANIFEST.json +37 -0
  470. package/templates/.gitagent/foreman/SUBSTRATE.version.json +6 -0
  471. package/templates/.gitagent/foreman/TEACHER.allowlist.example +4 -0
  472. package/templates/.gitagent/missions/README.md +18 -0
  473. package/templates/.gitagent/teacher/ARCHITECTURE-ACCESS.md +85 -0
  474. package/templates/.gitagent/teacher/ARCHITECTURE-DISCOVERY.md +40 -0
  475. package/templates/.gitagent/teacher/MISSION-ARCHITECT.md +93 -0
  476. package/templates/.gitagent/teacher/MISSION.schema.yaml +80 -0
  477. package/templates/.gitagent/teacher/RULES.md +36 -0
  478. package/templates/.gitagent/teacher/WORKER_LOG.template.md +2 -0
  479. package/templates/.githooks/post-checkout +26 -0
  480. package/templates/.githooks/pre-push +53 -0
  481. package/templates/.github/workflows/gxt-validate.yml +129 -0
  482. package/templates/.gitignore.gxt +8 -0
  483. package/templates/AGENTS.md +24 -0
  484. package/templates/docs/ARCHITECTURE.md +23 -0
  485. package/templates/integrations/aider/.aider.conf.yml +4 -0
  486. package/templates/integrations/antigravity/.agent/rules/gxt.md +11 -0
  487. package/templates/integrations/claude-code/CLAUDE.md +9 -0
  488. package/templates/integrations/cline/.clinerules/gxt.md +7 -0
  489. package/templates/integrations/codex-cli/.codex/config.toml +3 -0
  490. package/templates/integrations/compatibility.json +92 -0
  491. package/templates/integrations/junie/.junie/guidelines.md +11 -0
  492. package/templates/integrations/opencode/opencode.json +3 -0
  493. package/templates/integrations/openhands/.openhands/microagents/gxt.md +11 -0
  494. package/templates/integrations/recipes/_footer.md +20 -0
  495. package/templates/integrations/recipes/_preamble.md +46 -0
  496. package/templates/integrations/recipes/aider.md +13 -0
  497. package/templates/integrations/recipes/antigravity.md +8 -0
  498. package/templates/integrations/recipes/claude-code.md +14 -0
  499. package/templates/integrations/recipes/cline.md +8 -0
  500. package/templates/integrations/recipes/codex-cli.md +16 -0
  501. package/templates/integrations/recipes/cursor.md +19 -0
  502. package/templates/integrations/recipes/junie.md +8 -0
  503. package/templates/integrations/recipes/opencode.md +8 -0
  504. package/templates/integrations/recipes/openhands.md +8 -0
  505. package/templates/scripts/dev-validate.sh +24 -0
  506. package/templates/scripts/gxt-cursor-env.sh +5 -0
  507. package/templates/scripts/gxt-manifest-lib.mjs +139 -0
  508. package/templates/scripts/gxt-pin-mission.sh +31 -0
  509. package/templates/scripts/gxt-resolve-mission.sh +47 -0
  510. package/templates/scripts/gxt-runtime-env.sh +32 -0
  511. package/templates/scripts/validate-gxt.sh +184 -0
  512. package/templates/skills/gapman.md +5 -0
  513. package/templates/skills/logic.md +3 -0
  514. package/templates/skills/substrate.md +3 -0
  515. package/templates/skills/ui.md +3 -0
@@ -0,0 +1,64 @@
1
+ import { REL_ARCHITECTURE_DISCOVERY_SKILL } from "./constants.js";
2
+ const DEFAULT_FILE_LOCATION = "docs/ARCHITECTURE.md";
3
+ const DEFAULT_DIRECTORY_LOCATION = "docs/architecture";
4
+ export function defaultArchitectureLocation(kind) {
5
+ switch (kind) {
6
+ case "file":
7
+ return DEFAULT_FILE_LOCATION;
8
+ case "directory":
9
+ return DEFAULT_DIRECTORY_LOCATION;
10
+ case "external":
11
+ return "https://example.com/architecture";
12
+ default:
13
+ return "";
14
+ }
15
+ }
16
+ export function composeArchitecturePointer(profile) {
17
+ const kind = profile.architectureSource;
18
+ const location = (profile.architectureLocation ?? defaultArchitectureLocation(kind)).trim();
19
+ if (kind === "unset") {
20
+ return {
21
+ schema_version: "0.1.0",
22
+ kind: "unset",
23
+ location: "",
24
+ read_hint: "Architecture source not selected. Do NOT invent layer layout, module boundaries, or dependency rules. Read .gitagent/teacher/ARCHITECTURE-DISCOVERY.md and ask the user structured questions before any application code changes.",
25
+ discovery: { skill: REL_ARCHITECTURE_DISCOVERY_SKILL },
26
+ };
27
+ }
28
+ if (kind === "file") {
29
+ return {
30
+ schema_version: "0.1.0",
31
+ kind: "file",
32
+ location,
33
+ read_hint: "Read this markdown file for repository layout and boundaries. If content is still the init stub, treat as unset and follow ARCHITECTURE-DISCOVERY.md before implementing.",
34
+ discovery: { skill: REL_ARCHITECTURE_DISCOVERY_SKILL },
35
+ };
36
+ }
37
+ if (kind === "directory") {
38
+ return {
39
+ schema_version: "0.1.0",
40
+ kind: "directory",
41
+ location,
42
+ read_hint: "List this folder, read README or index first, then layer notes. If empty or placeholder-only, follow ARCHITECTURE-DISCOVERY.md before implementing.",
43
+ discovery: { skill: REL_ARCHITECTURE_DISCOVERY_SKILL },
44
+ };
45
+ }
46
+ return {
47
+ schema_version: "0.1.0",
48
+ kind: "external",
49
+ location,
50
+ read_hint: "Fetch architecture docs from this external source. If access.required, read ARCHITECTURE-ACCESS.md first. If unreachable or empty, follow ARCHITECTURE-DISCOVERY.md — do not assume layout.",
51
+ discovery: { skill: REL_ARCHITECTURE_DISCOVERY_SKILL },
52
+ access: profile.architectureAccessRequired
53
+ ? {
54
+ required: true,
55
+ credential_slot: profile.architectureCredentialSlot,
56
+ auth_hint: profile.architectureAuthHint,
57
+ }
58
+ : undefined,
59
+ };
60
+ }
61
+ export function serializeArchitecturePointer(pointer) {
62
+ return `${JSON.stringify(pointer, null, 2)}\n`;
63
+ }
64
+ //# sourceMappingURL=init-compose-arch-pointer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-compose-arch-pointer.js","sourceRoot":"","sources":["../../../src/cli/lib/init-compose-arch-pointer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gCAAgC,EAAE,MAAM,gBAAgB,CAAC;AAGlE,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AACrD,MAAM,0BAA0B,GAAG,mBAAmB,CAAC;AAEvD,MAAM,UAAU,2BAA2B,CAAC,IAA4B;IACtE,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,MAAM;YACT,OAAO,qBAAqB,CAAC;QAC/B,KAAK,WAAW;YACd,OAAO,0BAA0B,CAAC;QACpC,KAAK,UAAU;YACb,OAAO,kCAAkC,CAAC;QAC5C;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAAoB;IAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,kBAAkB,CAAC;IACxC,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,oBAAoB,IAAI,2BAA2B,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAE5F,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,OAAO;YACL,cAAc,EAAE,OAAO;YACvB,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,EAAE;YACZ,SAAS,EACP,mOAAmO;YACrO,SAAS,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE;SACvD,CAAC;IACJ,CAAC;IAED,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;QACpB,OAAO;YACL,cAAc,EAAE,OAAO;YACvB,IAAI,EAAE,MAAM;YACZ,QAAQ;YACR,SAAS,EACP,2KAA2K;YAC7K,SAAS,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE;SACvD,CAAC;IACJ,CAAC;IAED,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;QACzB,OAAO;YACL,cAAc,EAAE,OAAO;YACvB,IAAI,EAAE,WAAW;YACjB,QAAQ;YACR,SAAS,EACP,qJAAqJ;YACvJ,SAAS,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE;SACvD,CAAC;IACJ,CAAC;IAED,OAAO;QACL,cAAc,EAAE,OAAO;QACvB,IAAI,EAAE,UAAU;QAChB,QAAQ;QACR,SAAS,EACP,6LAA6L;QAC/L,SAAS,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE;QACtD,MAAM,EAAE,OAAO,CAAC,0BAA0B;YACxC,CAAC,CAAC;gBACE,QAAQ,EAAE,IAAI;gBACd,eAAe,EAAE,OAAO,CAAC,0BAA0B;gBACnD,SAAS,EAAE,OAAO,CAAC,oBAAoB;aACxC;YACH,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,OAA4B;IACvE,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type IntegrationCompatManifest } from "./integration-compat.js";
2
+ import type { InitProfile } from "./init-profile.js";
3
+ export declare function composeIntegrationsDoc(profile: InitProfile, templatesRoot: string, compat?: IntegrationCompatManifest): string;
4
+ export declare function recipeFilesExist(templatesRoot: string, compat?: IntegrationCompatManifest): void;
5
+ //# sourceMappingURL=init-compose-doc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-compose-doc.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/init-compose-doc.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,yBAAyB,EAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAQrD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,MAAM,EACrB,MAAM,CAAC,EAAE,yBAAyB,GACjC,MAAM,CAaR;AAED,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAWhG"}
@@ -0,0 +1,37 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { INTEGRATION_IDE_KEYS, loadIntegrationCompat, } from "./integration-compat.js";
4
+ function readRecipe(templatesRoot, recipeFile) {
5
+ const p = path.join(templatesRoot, "integrations/recipes", recipeFile);
6
+ if (!fs.existsSync(p))
7
+ throw new Error(`init compose: missing recipe ${recipeFile}`);
8
+ return fs.readFileSync(p, "utf8").trimEnd();
9
+ }
10
+ export function composeIntegrationsDoc(profile, templatesRoot, compat) {
11
+ const manifest = compat ?? loadIntegrationCompat(templatesRoot);
12
+ const parts = [];
13
+ parts.push(readRecipe(templatesRoot, "_preamble.md"));
14
+ for (const key of INTEGRATION_IDE_KEYS) {
15
+ if (!profile.ides.includes(key))
16
+ continue;
17
+ const entry = manifest.integrations[key];
18
+ parts.push(readRecipe(templatesRoot, entry.recipe_file));
19
+ }
20
+ parts.push(readRecipe(templatesRoot, "_footer.md"));
21
+ return `${parts.join("\n\n")}\n`;
22
+ }
23
+ export function recipeFilesExist(templatesRoot, compat) {
24
+ const manifest = compat ?? loadIntegrationCompat(templatesRoot);
25
+ for (const key of INTEGRATION_IDE_KEYS) {
26
+ const recipe = manifest.integrations[key].recipe_file;
27
+ const p = path.join(templatesRoot, "integrations/recipes", recipe);
28
+ if (!fs.existsSync(p))
29
+ throw new Error(`init compose: missing recipe file for ${key}: ${recipe}`);
30
+ }
31
+ for (const fixed of ["_preamble.md", "_footer.md"]) {
32
+ const p = path.join(templatesRoot, "integrations/recipes", fixed);
33
+ if (!fs.existsSync(p))
34
+ throw new Error(`init compose: missing ${fixed}`);
35
+ }
36
+ }
37
+ //# sourceMappingURL=init-compose-doc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-compose-doc.js","sourceRoot":"","sources":["../../../src/cli/lib/init-compose-doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GAEtB,MAAM,yBAAyB,CAAC;AAGjC,SAAS,UAAU,CAAC,aAAqB,EAAE,UAAkB;IAC3D,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,sBAAsB,EAAE,UAAU,CAAC,CAAC;IACvE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,UAAU,EAAE,CAAC,CAAC;IACrF,OAAO,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,OAAoB,EACpB,aAAqB,EACrB,MAAkC;IAElC,MAAM,QAAQ,GAAG,MAAM,IAAI,qBAAqB,CAAC,aAAa,CAAC,CAAC;IAChE,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC;IAEtD,KAAK,MAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;QACvC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,SAAS;QAC1C,MAAM,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC;IACpD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,aAAqB,EAAE,MAAkC;IACxF,MAAM,QAAQ,GAAG,MAAM,IAAI,qBAAqB,CAAC,aAAa,CAAC,CAAC;IAChE,KAAK,MAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;QACvC,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC;QACtD,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,sBAAsB,EAAE,MAAM,CAAC,CAAC;QACnE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,yCAAyC,GAAG,KAAK,MAAM,EAAE,CAAC,CAAC;IACpG,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,EAAE,CAAC;QACnD,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,sBAAsB,EAAE,KAAK,CAAC,CAAC;QAClE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,KAAK,EAAE,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type InitProfile } from "./init-profile.js";
2
+ export declare function runInitInteractiveWizard(repoRoot: string, templatesRoot: string, partial: Partial<InitProfile>): Promise<InitProfile | null>;
3
+ export declare function canPromptInitOverwrite(options: {
4
+ dryRun?: boolean;
5
+ force?: boolean;
6
+ }): boolean;
7
+ export declare function promptOverwriteManagedAssets(conflicts: string[]): Promise<boolean | null>;
8
+ //# sourceMappingURL=init-interactive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-interactive.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/init-interactive.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,WAAW,EAEjB,MAAM,mBAAmB,CAAC;AAkK3B,wBAAsB,wBAAwB,CAC5C,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,GAC5B,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAyC7B;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAO9F;AAED,wBAAsB,4BAA4B,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAc/F"}
@@ -0,0 +1,195 @@
1
+ import * as p from "@clack/prompts";
2
+ import { INTEGRATION_IDE_KEYS, integrationWizardLabel, loadIntegrationCompat, } from "./integration-compat.js";
3
+ import { defaultInitProfile, mergeInitProfile, } from "./init-profile.js";
4
+ import { defaultArchitectureLocation } from "./init-compose-arch-pointer.js";
5
+ function wizardCancelled(value) {
6
+ return p.isCancel(value);
7
+ }
8
+ async function promptInitIntegrations(repoRoot, partial, base, compat) {
9
+ const confirmRoot = await p.confirm({
10
+ message: `Initialize OpenGantry in ${repoRoot}?`,
11
+ initialValue: true,
12
+ });
13
+ if (wizardCancelled(confirmRoot) || !confirmRoot) {
14
+ p.cancel("init cancelled");
15
+ return null;
16
+ }
17
+ const ideOptions = INTEGRATION_IDE_KEYS.map((value) => ({
18
+ value,
19
+ label: integrationWizardLabel(compat.integrations[value]),
20
+ }));
21
+ const selectedIdes = await p.multiselect({
22
+ message: "Agent / IDE integrations to scaffold",
23
+ options: ideOptions,
24
+ initialValues: partial.ides ?? base.ides,
25
+ required: true,
26
+ });
27
+ if (wizardCancelled(selectedIdes)) {
28
+ p.cancel("init cancelled");
29
+ return null;
30
+ }
31
+ const docPath = await p.text({
32
+ message: "Integrations documentation path (repo-relative)",
33
+ initialValue: partial.integrationsDocPath ?? base.integrationsDocPath,
34
+ validate: (v) => {
35
+ if (!v.trim())
36
+ return "path required";
37
+ if (v.includes(".."))
38
+ return "path must not contain ..";
39
+ return undefined;
40
+ },
41
+ });
42
+ if (wizardCancelled(docPath)) {
43
+ p.cancel("init cancelled");
44
+ return null;
45
+ }
46
+ return { ides: selectedIdes, integrationsDocPath: docPath.trim() };
47
+ }
48
+ async function promptInitArchitecture(partial, base) {
49
+ const architectureSource = await p.select({
50
+ message: "Code architecture documentation",
51
+ options: [
52
+ {
53
+ value: "unset",
54
+ label: "Not defined yet — agents ask before implementing (recommended)",
55
+ },
56
+ { value: "file", label: "Single markdown file (docs/ARCHITECTURE.md)" },
57
+ { value: "directory", label: "Documentation folder" },
58
+ { value: "external", label: "External wiki / tool (may need auth)" },
59
+ ],
60
+ initialValue: (partial.architectureSource ?? base.architectureSource),
61
+ });
62
+ if (wizardCancelled(architectureSource)) {
63
+ p.cancel("init cancelled");
64
+ return null;
65
+ }
66
+ let architectureLocation;
67
+ if (architectureSource !== "unset") {
68
+ const locAnswer = await p.text({
69
+ message: "Architecture location (repo path or URL)",
70
+ initialValue: partial.architectureLocation ??
71
+ defaultArchitectureLocation(architectureSource),
72
+ validate: (v) => {
73
+ if (!v.trim())
74
+ return "location required";
75
+ if (architectureSource !== "external" && v.includes(".."))
76
+ return "path must not contain ..";
77
+ return undefined;
78
+ },
79
+ });
80
+ if (wizardCancelled(locAnswer)) {
81
+ p.cancel("init cancelled");
82
+ return null;
83
+ }
84
+ architectureLocation = locAnswer.trim();
85
+ }
86
+ let architectureAccessRequired;
87
+ if (architectureSource === "external") {
88
+ const authAnswer = await p.confirm({
89
+ message: "Does this external source require authentication?",
90
+ initialValue: partial.architectureAccessRequired ?? true,
91
+ });
92
+ if (wizardCancelled(authAnswer)) {
93
+ p.cancel("init cancelled");
94
+ return null;
95
+ }
96
+ architectureAccessRequired = authAnswer;
97
+ }
98
+ return {
99
+ architectureSource: architectureSource,
100
+ architectureLocation,
101
+ architectureAccessRequired,
102
+ };
103
+ }
104
+ async function promptInitInfrastructure(partial, base) {
105
+ const skills = await p.select({
106
+ message: "Skills preset",
107
+ options: [
108
+ { value: "minimal", label: "minimal (ui + logic)" },
109
+ { value: "specimen", label: "specimen (ui, logic, gapman, substrate)" },
110
+ ],
111
+ initialValue: (partial.skillsPreset ?? base.skillsPreset),
112
+ });
113
+ if (wizardCancelled(skills)) {
114
+ p.cancel("init cancelled");
115
+ return null;
116
+ }
117
+ const gitHooks = await p.confirm({
118
+ message: "Install .githooks (pre-push verify, post-checkout WORKER_LOG)?",
119
+ initialValue: partial.gitHooks ?? base.gitHooks,
120
+ });
121
+ if (wizardCancelled(gitHooks)) {
122
+ p.cancel("init cancelled");
123
+ return null;
124
+ }
125
+ const ciWorkflow = await p.confirm({
126
+ message: "Install GitHub CI workflow (.github/workflows/gxt-validate.yml)?",
127
+ initialValue: partial.ciWorkflow ?? base.ciWorkflow,
128
+ });
129
+ if (wizardCancelled(ciWorkflow)) {
130
+ p.cancel("init cancelled");
131
+ return null;
132
+ }
133
+ return {
134
+ skillsPreset: skills,
135
+ gitHooks,
136
+ ciWorkflow,
137
+ };
138
+ }
139
+ export async function runInitInteractiveWizard(repoRoot, templatesRoot, partial) {
140
+ const compat = loadIntegrationCompat(templatesRoot);
141
+ p.intro("gapman init — OpenGantry substrate bootstrap");
142
+ const base = defaultInitProfile();
143
+ const integrations = await promptInitIntegrations(repoRoot, partial, base, compat);
144
+ if (!integrations)
145
+ return null;
146
+ const architecture = await promptInitArchitecture(partial, base);
147
+ if (!architecture)
148
+ return null;
149
+ const infrastructure = await promptInitInfrastructure(partial, base);
150
+ if (!infrastructure)
151
+ return null;
152
+ const profile = mergeInitProfile(base, {
153
+ ...partial,
154
+ ...integrations,
155
+ ...architecture,
156
+ ...infrastructure,
157
+ });
158
+ p.note([
159
+ `IDEs: ${profile.ides.join(", ")}`,
160
+ `Doc: ${profile.integrationsDocPath}`,
161
+ `Architecture: ${profile.architectureSource}${profile.architectureLocation ? ` → ${profile.architectureLocation}` : ""}`,
162
+ `Skills: ${profile.skillsPreset}`,
163
+ `Hooks: ${profile.gitHooks ? "yes" : "no"}`,
164
+ `CI: ${profile.ciWorkflow ? "yes" : "no"}`,
165
+ ].join("\n"), "Plan");
166
+ const go = await p.confirm({ message: "Apply this init plan?", initialValue: true });
167
+ if (wizardCancelled(go) || !go) {
168
+ p.cancel("init cancelled");
169
+ return null;
170
+ }
171
+ p.outro("Scaffolding…");
172
+ return profile;
173
+ }
174
+ export function canPromptInitOverwrite(options) {
175
+ return (options.dryRun !== true &&
176
+ options.force !== true &&
177
+ process.stdout.isTTY === true &&
178
+ process.stdin.isTTY === true);
179
+ }
180
+ export async function promptOverwriteManagedAssets(conflicts) {
181
+ p.log.warning("Some managed files already exist and differ from templates:");
182
+ for (const rel of conflicts) {
183
+ p.log.message(` ${rel}`);
184
+ }
185
+ const answer = await p.confirm({
186
+ message: "Overwrite these files?",
187
+ initialValue: false,
188
+ });
189
+ if (p.isCancel(answer)) {
190
+ p.cancel("init cancelled");
191
+ return null;
192
+ }
193
+ return answer;
194
+ }
195
+ //# sourceMappingURL=init-interactive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-interactive.js","sourceRoot":"","sources":["../../../src/cli/lib/init-interactive.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,GAEtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,gBAAgB,GAIjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,2BAA2B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,EAAE,CAAC;QAC/B,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACxB,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,OAA8C;IACnF,OAAO,CACL,OAAO,CAAC,MAAM,KAAK,IAAI;QACvB,OAAO,CAAC,KAAK,KAAK,IAAI;QACtB,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI;QAC7B,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAC7B,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,SAAmB;IACpE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,6DAA6D,CAAC,CAAC;IAC7E,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE,CAAC;QAC5B,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;IAC5B,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,OAAO,CAAC;QAC7B,OAAO,EAAE,wBAAwB;QACjC,YAAY,EAAE,KAAK;KACpB,CAAC,CAAC;IACH,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACvB,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { InitAsset } from "./init-assets.js";
2
+ import { type InitAssetSpec } from "./init-asset-catalog.js";
3
+ import type { InitProfile } from "./init-profile.js";
4
+ export interface PlannedWrite {
5
+ absoluteTarget: string;
6
+ body: string;
7
+ executable: boolean;
8
+ }
9
+ export interface InitPlanResult {
10
+ ok: boolean;
11
+ writes: PlannedWrite[];
12
+ skippedUserMutable: string[];
13
+ unchanged: string[];
14
+ conflicts: string[];
15
+ }
16
+ export declare function planInitAssets(assets: (InitAsset | InitAssetSpec)[], templatesRoot: string, repoRoot: string, force: boolean): InitPlanResult;
17
+ export declare function applyInitWrites(writes: PlannedWrite[]): void;
18
+ export declare function logInitSummary(writes: PlannedWrite[], skippedUserMutable: string[], unchanged: string[]): void;
19
+ export declare function logInitNextSteps(profile?: InitProfile): void;
20
+ //# sourceMappingURL=init-plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-plan.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/init-plan.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,CAAC,SAAS,GAAG,aAAa,CAAC,EAAE,EACrC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,GACb,cAAc,CAwChB;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAM5D;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EAAE,EACtB,kBAAkB,EAAE,MAAM,EAAE,EAC5B,SAAS,EAAE,MAAM,EAAE,GAClB,IAAI,CAQN;AAeD,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAgB5D"}
@@ -0,0 +1,92 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { CLI_NAME } from "./constants.js";
4
+ import { logError, logInfo } from "./cli-io.js";
5
+ import { audienceSectionTitle, filterNextStepsForAudience, formatAudienceNextStep, } from "./audience-output.js";
6
+ import { getOutputAudience } from "./output-context.js";
7
+ import { templatePathForAsset } from "./init-asset-catalog.js";
8
+ export function planInitAssets(assets, templatesRoot, repoRoot, force) {
9
+ const writes = [];
10
+ const conflicts = [];
11
+ const skippedUserMutable = [];
12
+ const unchanged = [];
13
+ for (const asset of assets) {
14
+ const spec = asset;
15
+ const templateRel = "templatePath" in spec && spec.templatePath
16
+ ? spec.templatePath
17
+ : templatePathForAsset(spec);
18
+ const templateAbs = path.join(templatesRoot, templateRel.split("/").join(path.sep));
19
+ const targetAbs = path.join(repoRoot, asset.targetPath.split("/").join(path.sep));
20
+ if (!fs.existsSync(templateAbs)) {
21
+ logError(`init: missing template for ${asset.targetPath} at ${templateAbs}`);
22
+ return { ok: false, writes, skippedUserMutable, unchanged, conflicts };
23
+ }
24
+ const body = fs.readFileSync(templateAbs, "utf8");
25
+ const existing = fs.existsSync(targetAbs) ? fs.readFileSync(targetAbs, "utf8") : null;
26
+ if (existing === null) {
27
+ writes.push({ absoluteTarget: targetAbs, body, executable: asset.executable === true });
28
+ continue;
29
+ }
30
+ if (existing === body) {
31
+ unchanged.push(asset.targetPath);
32
+ continue;
33
+ }
34
+ if (asset.mode === "scaffold_only") {
35
+ skippedUserMutable.push(asset.targetPath);
36
+ continue;
37
+ }
38
+ if (force) {
39
+ writes.push({ absoluteTarget: targetAbs, body, executable: asset.executable === true });
40
+ continue;
41
+ }
42
+ conflicts.push(asset.targetPath);
43
+ }
44
+ return { ok: true, writes, skippedUserMutable, unchanged, conflicts };
45
+ }
46
+ export function applyInitWrites(writes) {
47
+ for (const w of writes) {
48
+ fs.mkdirSync(path.dirname(w.absoluteTarget), { recursive: true });
49
+ fs.writeFileSync(w.absoluteTarget, w.body, "utf8");
50
+ if (w.executable)
51
+ fs.chmodSync(w.absoluteTarget, 0o755);
52
+ }
53
+ }
54
+ export function logInitSummary(writes, skippedUserMutable, unchanged) {
55
+ logInfo(`${CLI_NAME} init: wrote ${writes.length} files`);
56
+ if (skippedUserMutable.length > 0) {
57
+ logInfo(`${CLI_NAME} init: preserved ${skippedUserMutable.length} existing user-managed files`);
58
+ }
59
+ if (unchanged.length > 0) {
60
+ logInfo(`${CLI_NAME} init: ${unchanged.length} files already up to date`);
61
+ }
62
+ }
63
+ const INIT_NEXT_STEPS = [
64
+ "edit .gitagent/foreman/MANIFEST.json (tmvc_roots, forbidden_zones, skills) and run gapman check",
65
+ "git config core.hooksPath .githooks",
66
+ 'gapman teacher set "$(git config user.email)"',
67
+ 'gapman start "<intent>" --msn MSN-0001 --skill-key <manifest-key>',
68
+ 'Teacher: git commit -m "[MSN-0001] legislate mission" including mission file',
69
+ "eval \"$(gapman runtime env --mission .gitagent/missions/<file>.yaml)\"",
70
+ "gapman verify --mission .gitagent/missions/<file>.yaml",
71
+ "source scripts/gxt-runtime-env.sh .gitagent/missions/<file>.yaml",
72
+ "scripts/gxt-pin-mission.sh .gitagent/missions/<file>.yaml",
73
+ "gapman onboarding # guided walkthrough (strict checks)",
74
+ ];
75
+ export function logInitNextSteps(profile) {
76
+ const steps = [...INIT_NEXT_STEPS];
77
+ if (profile?.integrationsDocPath) {
78
+ steps.push(`human IDE setup: ${profile.integrationsDocPath}`);
79
+ }
80
+ if (profile?.gitHooks === false) {
81
+ const hookIdx = steps.indexOf("git config core.hooksPath .githooks");
82
+ if (hookIdx >= 0)
83
+ steps.splice(hookIdx, 1);
84
+ }
85
+ const audience = getOutputAudience();
86
+ const filtered = filterNextStepsForAudience(audience, steps).map((step) => formatAudienceNextStep(step, audience));
87
+ const section = audienceSectionTitle(audience) ?? "next steps";
88
+ logInfo(`${section}:`);
89
+ for (const step of filtered)
90
+ logInfo(` ${step}`);
91
+ }
92
+ //# sourceMappingURL=init-plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-plan.js","sourceRoot":"","sources":["../../../src/cli/lib/init-plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,oBAAoB,EAAsB,MAAM,yBAAyB,CAAC;AAiBnF,MAAM,UAAU,cAAc,CAC5B,MAAqC,EACrC,aAAqB,EACrB,QAAgB,EAChB,KAAc;IAEd,MAAM,MAAM,GAAmB,EAAE,CAAC;IAClC,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,MAAM,kBAAkB,GAAa,EAAE,CAAC;IACxC,MAAM,SAAS,GAAa,EAAE,CAAC;IAE/B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,KAAsB,CAAC;QACpC,MAAM,WAAW,GAAG,cAAc,IAAI,IAAI,IAAI,IAAI,CAAC,YAAY;YAC7D,CAAC,CAAC,IAAI,CAAC,YAAY;YACnB,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACpF,MAAM,SAAS,GAA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;IACxD,kEAAkE;IAClE,2DAA2D;IAC3D,yDAAyD;CAC1D,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,OAAqB;IACpD,MAAM,KAAK,GAAG,CAAC,GAAG,eAAe,CAAC,CAAC;IACnC,IAAI,OAAO,EAAE,mBAAmB,EAAE,CAAC;QACjC,KAAK,CAAC,IAAI,CAAC,oBAAoB,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,IAAI,OAAO,EAAE,QAAQ,KAAK,KAAK,EAAE,CAAC;QAChC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,qCAAqC,CAAC,CAAC;QACrE,IAAI,OAAO,IAAI,CAAC;YAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC;IACD,MAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,0BAA0B,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACxE,sBAAsB,CAAC,IAAI,EAAE,QAAQ,CAAC,CACvC,CAAC;IACF,MAAM,OAAO,GAAG,oBAAoB,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAC;IAC/D,OAAO,CAAC,GAAG,OAAO,GAAG,CAAC,CAAC;IACvB,KAAK,MAAM,IAAI,IAAI,QAAQ;QAAE,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { IntegrationIdeKey } from "./integration-compat.js";
2
+ export type SkillsPreset = "minimal" | "specimen";
3
+ /** Where code architecture docs live — unset means agents must ask before implementing. */
4
+ export type ArchitectureSourceKind = "unset" | "file" | "directory" | "external";
5
+ export interface InitProfile {
6
+ ides: IntegrationIdeKey[];
7
+ integrationsDocPath: string;
8
+ skillsPreset: SkillsPreset;
9
+ gitHooks: boolean;
10
+ ciWorkflow: boolean;
11
+ architectureSource: ArchitectureSourceKind;
12
+ architectureLocation?: string;
13
+ architectureAccessRequired?: boolean;
14
+ architectureCredentialSlot?: string;
15
+ architectureAuthHint?: string;
16
+ }
17
+ export declare const DEFAULT_INTEGRATIONS_DOC_PATH = "docs/INTEGRATIONS.md";
18
+ export declare function defaultInitProfile(): InitProfile;
19
+ export declare function parseArchitectureSource(raw: string): ArchitectureSourceKind;
20
+ export declare function parseIdesCsv(raw: string): IntegrationIdeKey[];
21
+ export declare function validateIntegrationsDocPath(repoRoot: string, relPath: string): string;
22
+ export declare function profileFromCliFlags(opts: {
23
+ ides?: string;
24
+ docsPath?: string;
25
+ skills?: string;
26
+ hooks?: boolean;
27
+ noHooks?: boolean;
28
+ ci?: boolean;
29
+ noCi?: boolean;
30
+ archSource?: string;
31
+ archLocation?: string;
32
+ }): Partial<InitProfile>;
33
+ export declare function mergeInitProfile(base: InitProfile, partial: Partial<InitProfile>): InitProfile;
34
+ export declare function hasFullCliProfile(partial: Partial<InitProfile>): boolean;
35
+ export declare function shouldRunInteractiveWizard(options: {
36
+ yes?: boolean;
37
+ partial: Partial<InitProfile>;
38
+ }): boolean;
39
+ //# sourceMappingURL=init-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-profile.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/init-profile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,UAAU,CAAC;AAElD,2FAA2F;AAC3F,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,CAAC;AAEjF,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,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,CAAC;CAC/B,GAAG,OAAO,CAKV"}
@@ -0,0 +1,93 @@
1
+ import path from "node:path";
2
+ export const DEFAULT_INTEGRATIONS_DOC_PATH = "docs/INTEGRATIONS.md";
3
+ export function defaultInitProfile() {
4
+ return {
5
+ ides: ["cursor"],
6
+ integrationsDocPath: DEFAULT_INTEGRATIONS_DOC_PATH,
7
+ skillsPreset: "specimen",
8
+ gitHooks: true,
9
+ ciWorkflow: true,
10
+ architectureSource: "unset",
11
+ };
12
+ }
13
+ export function parseArchitectureSource(raw) {
14
+ if (raw === "unset" || raw === "file" || raw === "directory" || raw === "external") {
15
+ return raw;
16
+ }
17
+ throw new Error("init: --arch-source must be unset, file, directory, or external");
18
+ }
19
+ export function parseIdesCsv(raw) {
20
+ const parts = raw
21
+ .split(",")
22
+ .map((s) => s.trim())
23
+ .filter(Boolean);
24
+ if (parts.length === 0)
25
+ throw new Error("init: --ides requires at least one IDE key");
26
+ return parts;
27
+ }
28
+ export function validateIntegrationsDocPath(repoRoot, relPath) {
29
+ const normalized = relPath.replace(/\\/g, "/").replace(/^\/+/, "");
30
+ if (normalized.includes(".."))
31
+ throw new Error("init: integrations doc path must not contain ..");
32
+ if (path.isAbsolute(normalized))
33
+ throw new Error("init: integrations doc path must be repo-relative");
34
+ const abs = path.resolve(repoRoot, normalized);
35
+ const rootResolved = path.resolve(repoRoot);
36
+ if (abs !== rootResolved && !abs.startsWith(`${rootResolved}${path.sep}`)) {
37
+ throw new Error("init: integrations doc path escapes repo root");
38
+ }
39
+ return normalized;
40
+ }
41
+ export function profileFromCliFlags(opts) {
42
+ const partial = {};
43
+ if (opts.ides)
44
+ partial.ides = parseIdesCsv(opts.ides);
45
+ if (opts.docsPath)
46
+ partial.integrationsDocPath = opts.docsPath.replace(/\\/g, "/");
47
+ if (opts.skills === "minimal" || opts.skills === "specimen")
48
+ partial.skillsPreset = opts.skills;
49
+ if (opts.noHooks)
50
+ partial.gitHooks = false;
51
+ else if (opts.hooks)
52
+ partial.gitHooks = true;
53
+ if (opts.noCi)
54
+ partial.ciWorkflow = false;
55
+ else if (opts.ci)
56
+ partial.ciWorkflow = true;
57
+ if (opts.archSource)
58
+ partial.architectureSource = parseArchitectureSource(opts.archSource);
59
+ if (opts.archLocation)
60
+ partial.architectureLocation = opts.archLocation.replace(/\\/g, "/");
61
+ return partial;
62
+ }
63
+ export function mergeInitProfile(base, partial) {
64
+ return {
65
+ ides: partial.ides ?? base.ides,
66
+ integrationsDocPath: partial.integrationsDocPath ?? base.integrationsDocPath,
67
+ skillsPreset: partial.skillsPreset ?? base.skillsPreset,
68
+ gitHooks: partial.gitHooks ?? base.gitHooks,
69
+ ciWorkflow: partial.ciWorkflow ?? base.ciWorkflow,
70
+ architectureSource: partial.architectureSource ?? base.architectureSource,
71
+ architectureLocation: partial.architectureLocation ?? base.architectureLocation,
72
+ architectureAccessRequired: partial.architectureAccessRequired ?? base.architectureAccessRequired,
73
+ architectureCredentialSlot: partial.architectureCredentialSlot ?? base.architectureCredentialSlot,
74
+ architectureAuthHint: partial.architectureAuthHint ?? base.architectureAuthHint,
75
+ };
76
+ }
77
+ export function hasFullCliProfile(partial) {
78
+ return (partial.ides !== undefined &&
79
+ partial.integrationsDocPath !== undefined &&
80
+ partial.skillsPreset !== undefined &&
81
+ partial.gitHooks !== undefined &&
82
+ partial.ciWorkflow !== undefined);
83
+ }
84
+ export function shouldRunInteractiveWizard(options) {
85
+ if (options.yes)
86
+ return false;
87
+ if (!process.stdout.isTTY)
88
+ return false;
89
+ if (hasFullCliProfile(options.partial))
90
+ return false;
91
+ return true;
92
+ }
93
+ //# sourceMappingURL=init-profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-profile.js","sourceRoot":"","sources":["../../../src/cli/lib/init-profile.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAqB7B,MAAM,CAAC,MAAM,6BAA6B,GAAG,sBAAsB,CAAC;AAEpE,MAAM,UAAU,kBAAkB;IAChC,OAA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IACxC,IAAI,iBAAiB,CAAC,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IACrD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function runInitTutorial(): Promise<void>;
2
+ //# sourceMappingURL=init-tutorial.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-tutorial.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/init-tutorial.ts"],"names":[],"mappings":"AAgKA,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAkDrD"}