@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,147 @@
1
+ import path from "node:path";
2
+ import { CLI_NAME, MSN_ID_PATTERN } from "./constants.js";
3
+ import { gitRun } from "./git-repo.js";
4
+ import { throwGitProofError } from "./git-proof-errors.js";
5
+ import { extractMsnIdFromMissionPath } from "./mission-msn.js";
6
+ import { resolveTeacherEmails } from "./teacher-identity.js";
7
+ /** Missions verified by `gapman verify` must live under this repo-relative prefix. */
8
+ export const REL_MISSIONS_PREFIX = ".gitagent/missions/";
9
+ export { ENV_TEACHER_EMAILS, parseTeacherEmailsFromEnv } from "./teacher-identity.js";
10
+ const DEFAULT_MSN_SCAN_DEPTH = 200;
11
+ export function missionPathRepoRelative(root, missionAbsolutePath) {
12
+ const absMission = path.resolve(missionAbsolutePath);
13
+ const absRoot = path.resolve(root);
14
+ const rel = path.relative(absRoot, absMission);
15
+ if (rel.startsWith("..") || path.isAbsolute(rel)) {
16
+ throw new Error(`${CLI_NAME} verify: mission file is outside repository root (${missionAbsolutePath})`);
17
+ }
18
+ return rel.split(path.sep).join("/");
19
+ }
20
+ export function assertMissionUnderMissionsDir(repoRelMissionPath) {
21
+ const norm = repoRelMissionPath.replace(/\\/g, "/");
22
+ if (!norm.startsWith(REL_MISSIONS_PREFIX)) {
23
+ throwGitProofError("MISSION_OUTSIDE_MISSIONS_DIR", `mission must live under ${REL_MISSIONS_PREFIX} (got "${norm}")`, { repoRelMission: norm });
24
+ }
25
+ }
26
+ /**
27
+ * True iff the commit **subject line** (`git log` %s) begins with `[msnId]` as legislation.
28
+ * Does not inspect the commit body — avoids matching `[MSN-…]` that appears only in the body.
29
+ */
30
+ export function commitSubjectHasMsnPrefix(subject, msnId) {
31
+ if (!MSN_ID_PATTERN.test(msnId))
32
+ return false;
33
+ const prefix = `[${msnId}]`;
34
+ const s = subject.trimStart();
35
+ return s.startsWith(prefix);
36
+ }
37
+ /**
38
+ * Newest-first commits among the last `scanDepth` history entries whose **subject** (%s) starts
39
+ * with `[msnId]`. Uses plain `git log` (no `--grep`) so matches cannot come from the body alone.
40
+ */
41
+ export function listMsnSubjectCommits(root, msnId, scanDepth = DEFAULT_MSN_SCAN_DEPTH) {
42
+ const depth = Number.isFinite(scanDepth) && scanDepth > 0 ? Math.floor(scanDepth) : DEFAULT_MSN_SCAN_DEPTH;
43
+ const { ok, stdout, stderr } = gitRun(root, [
44
+ "log",
45
+ "-z",
46
+ "--format=%H%x1f%s%x1f%aE",
47
+ "-n",
48
+ String(depth),
49
+ ]);
50
+ if (!ok) {
51
+ throw new Error(`${CLI_NAME} verify: git-proof: git log failed: ${stderr.trim() || stdout.trim() || "unknown"}`);
52
+ }
53
+ if (!stdout.trim())
54
+ return [];
55
+ const chunks = stdout.split("\0").filter((c) => c.length > 0);
56
+ const rows = [];
57
+ for (const chunk of chunks) {
58
+ const parts = chunk.split("\x1f");
59
+ if (parts.length < 3)
60
+ continue;
61
+ const [hash, subject, authorEmail] = parts;
62
+ if (!hash || !subject || !authorEmail)
63
+ continue;
64
+ if (!commitSubjectHasMsnPrefix(subject, msnId))
65
+ continue;
66
+ rows.push({ hash, subject, authorEmail });
67
+ }
68
+ return rows;
69
+ }
70
+ function normalizeChangedPath(p) {
71
+ return p.trim().split(path.sep).join("/");
72
+ }
73
+ /** Paths changed in commit `hash` (repo-relative forward slashes). */
74
+ export function listCommitChangedPaths(root, hash) {
75
+ const { ok, stdout, stderr } = gitRun(root, ["show", "--name-only", "--pretty=format:", hash]);
76
+ if (!ok) {
77
+ throw new Error(`${CLI_NAME} verify: git-proof: git show failed for ${hash}: ${stderr.trim() || "unknown"}`);
78
+ }
79
+ return stdout
80
+ .split("\n")
81
+ .map((l) => normalizeChangedPath(l))
82
+ .filter((l) => l.length > 0);
83
+ }
84
+ function isTeacherEmail(authorEmail, teacherEmails) {
85
+ return teacherEmails.includes(authorEmail.trim().toLowerCase());
86
+ }
87
+ function commitTouchesMission(changed, repoRelMission) {
88
+ const normMission = repoRelMission.replace(/\\/g, "/");
89
+ return changed.some((p) => p.replace(/\\/g, "/") === normMission);
90
+ }
91
+ /**
92
+ * Forensic gate (v0.6.2): MSN is read from the mission file; the most recent
93
+ * Teacher-authored commit whose subject starts with `[MSN-XXXX]` must modify
94
+ * that mission path. Returns the resolved MSN id.
95
+ */
96
+ export function assertTeacherMissionProof(root, missionAbsolutePath, options) {
97
+ const msnId = options?.msnId && MSN_ID_PATTERN.test(options.msnId)
98
+ ? options.msnId
99
+ : extractMsnIdFromMissionPath(missionAbsolutePath);
100
+ const missionPath = missionAbsolutePath;
101
+ if (!msnId || !MSN_ID_PATTERN.test(msnId)) {
102
+ throwGitProofError("MISSION_MISSING_MSN", "The mission file is missing a valid [MSN-XXXX] identifier (YAML/frontmatter msn_id or msnId, line-start [MSN-NNNN], or # Mission: line).", { root, missionPath });
103
+ }
104
+ const teacherIdentity = resolveTeacherEmails(root);
105
+ const teacherEmails = teacherIdentity.emails;
106
+ if (teacherEmails.length === 0) {
107
+ throwGitProofError("TEACHER_IDENTITY_UNCONFIGURED", "No Teacher allowlist configured for this repository.", { root, missionPath, msnId });
108
+ }
109
+ const repoRelMission = missionPathRepoRelative(root, missionAbsolutePath);
110
+ assertMissionUnderMissionsDir(repoRelMission);
111
+ const scanDepth = options?.scanDepth;
112
+ const rows = listMsnSubjectCommits(root, msnId, scanDepth);
113
+ if (rows.length === 0) {
114
+ throwGitProofError("NO_MSN_COMMITS", `No commits found starting with [${msnId}]. Did you commit the mission?`, { root, missionPath, msnId, repoRelMission });
115
+ }
116
+ const stamp = rows.find((r) => isTeacherEmail(r.authorEmail, teacherEmails));
117
+ if (!stamp) {
118
+ const latest = rows[0];
119
+ throwGitProofError("NO_TEACHER_MSN_COMMIT", `The legislation was committed by ${JSON.stringify(latest.authorEmail)}, who is not in the Teacher allowlist (${teacherIdentity.detail}). ` +
120
+ `Add that email to .gitagent/foreman/TEACHER.allowlist.local, git config gapman.teacherEmails, or run gapman teacher set.`, { root, missionPath, msnId, latestAuthorEmail: latest.authorEmail });
121
+ }
122
+ const changed = listCommitChangedPaths(root, stamp.hash);
123
+ if (!commitTouchesMission(changed, repoRelMission)) {
124
+ throwGitProofError("MISSION_FILE_NOT_MODIFIED_BY_TEACHER", `The Teacher stamp for [${msnId}] is commit ${stamp.hash}: ${stamp.subject.trim()}; it did not change this mission file (${repoRelMission}). ` +
125
+ `The stamp is the newest (scanning backward) commit authored by a Teacher allowlist email (${teacherIdentity.detail}) whose subject begins with [${msnId}]. ` +
126
+ `Either add a newer Teacher commit with that subject that includes ${repoRelMission}, or reuse a distinct MSN whose only qualifying commits touch this file.`, {
127
+ root,
128
+ missionPath,
129
+ msnId,
130
+ repoRelMission,
131
+ stampHash: stamp.hash,
132
+ stampSubject: stamp.subject.trim(),
133
+ });
134
+ }
135
+ return msnId;
136
+ }
137
+ /** Non-throwing git-proof check for onboarding/tutorial flows. */
138
+ export function teacherMissionStamped(root, missionAbsolutePath, options) {
139
+ try {
140
+ assertTeacherMissionProof(root, missionAbsolutePath, options);
141
+ return true;
142
+ }
143
+ catch {
144
+ return false;
145
+ }
146
+ }
147
+ //# sourceMappingURL=git-proof.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-proof.js","sourceRoot":"","sources":["../../../src/cli/lib/git-proof.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,sFAAsF;AACtF,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAA8B,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAEtF,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAEnC,MAAM,UAAU,uBAAuB,CAAC,IAAY,EAAE,mBAA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AAC,CAAC;QAC9D,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -0,0 +1,17 @@
1
+ export interface GitRunResult {
2
+ ok: boolean;
3
+ stdout: string;
4
+ stderr: string;
5
+ status: number | null;
6
+ }
7
+ /** Run git in repository root (`git -C root ...args`). */
8
+ export declare function gitRun(repoRoot: string, args: string[], maxBuffer?: number): GitRunResult;
9
+ export declare function gitRunOk(repoRoot: string, args: string[], maxBuffer?: number): {
10
+ ok: boolean;
11
+ stdout: string;
12
+ };
13
+ export declare function gitRevParse(repoRoot: string, ref: string): string | null;
14
+ export declare function gitHead(repoRoot: string): string | null;
15
+ export declare function gitLogSubjects(repoRoot: string, grep: string, limit: number): string[];
16
+ export declare function gitConfigGet(repoRoot: string, key: string): string | null;
17
+ //# sourceMappingURL=git-repo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-repo.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/git-repo.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,0DAA0D;AAC1D,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,SAAS,SAAmB,GAAG,YAAY,CAWnG;AAED,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EAAE,EACd,SAAS,SAAmB,GAC3B;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAGjC;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGxE;AAED,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGvD;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAItF;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIzE"}
@@ -0,0 +1,39 @@
1
+ import { spawnSync } from "node:child_process";
2
+ /** Run git in repository root (`git -C root ...args`). */
3
+ export function gitRun(repoRoot, args, maxBuffer = 32 * 1024 * 1024) {
4
+ const r = spawnSync("git", ["-C", repoRoot, ...args], {
5
+ encoding: "utf8",
6
+ maxBuffer,
7
+ });
8
+ return {
9
+ ok: r.status === 0,
10
+ stdout: typeof r.stdout === "string" ? r.stdout : "",
11
+ stderr: typeof r.stderr === "string" ? r.stderr : "",
12
+ status: r.status,
13
+ };
14
+ }
15
+ export function gitRunOk(repoRoot, args, maxBuffer = 32 * 1024 * 1024) {
16
+ const r = gitRun(repoRoot, args, maxBuffer);
17
+ return { ok: r.ok, stdout: r.stdout };
18
+ }
19
+ export function gitRevParse(repoRoot, ref) {
20
+ const r = gitRunOk(repoRoot, ["rev-parse", "--verify", `${ref}^{commit}`]);
21
+ return r.ok && r.stdout.trim() ? r.stdout.trim() : null;
22
+ }
23
+ export function gitHead(repoRoot) {
24
+ const r = gitRunOk(repoRoot, ["rev-parse", "HEAD"]);
25
+ return r.ok && r.stdout.trim() ? r.stdout.trim() : null;
26
+ }
27
+ export function gitLogSubjects(repoRoot, grep, limit) {
28
+ const r = gitRunOk(repoRoot, ["log", `--grep=${grep}`, `-${limit}`, "--format=%s"]);
29
+ if (!r.ok || !r.stdout.trim())
30
+ return [];
31
+ return r.stdout.split("\n").filter(Boolean);
32
+ }
33
+ export function gitConfigGet(repoRoot, key) {
34
+ const r = gitRunOk(repoRoot, ["config", "--get", key]);
35
+ if (!r.ok || !r.stdout.trim())
36
+ return null;
37
+ return r.stdout.trim();
38
+ }
39
+ //# sourceMappingURL=git-repo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-repo.js","sourceRoot":"","sources":["../../../src/cli/lib/git-repo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAS/C,0DAA0D;AAC1D,MAAM,UAAU,MAAM,CAAC,QAAgB,EAAE,IAAc,EAAE,SAAS,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI;IACnF,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,EAAE;QACpD,QAAQ,EAAE,MAAM;QAChB,SAAS;KACV,CAAC,CAAC;IACH,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC;QAClB,MAAM,EAAE,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;QACpD,MAAM,EAAE,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;QACpD,MAAM,EAAE,CAAC,CAAC,MAAM;KACjB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,QAAQ,CACtB,QAAgB,EAChB,IAAc,EACd,SAAS,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI;IAE5B,MAAM,CAAC,GAAG,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAC5C,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAgB,EAAE,GAAW;IACvD,MAAM,CAAC,GAAG,QAAQ,CAA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;IAC3C,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function getRepoRoot(cwd?: string): string;
2
+ //# sourceMappingURL=git.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/git.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,GAAG,SAAgB,GAAG,MAAM,CAYvD"}
@@ -0,0 +1,19 @@
1
+ import { execSync } from "node:child_process";
2
+ import path from "node:path";
3
+ import { CLI_NAME } from "./constants.js";
4
+ export function getRepoRoot(cwd = process.cwd()) {
5
+ try {
6
+ const out = execSync("git rev-parse --show-toplevel", {
7
+ cwd,
8
+ encoding: "utf8",
9
+ stdio: ["ignore", "pipe", "pipe"],
10
+ }).trim();
11
+ if (!out)
12
+ throw new Error("empty root");
13
+ return path.resolve(cwd, out);
14
+ }
15
+ catch {
16
+ throw new Error(`${CLI_NAME}: not inside a git repository`);
17
+ }
18
+ }
19
+ //# sourceMappingURL=git.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.js","sourceRoot":"","sources":["../../../src/cli/lib/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,UAAU,WAAW,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE;IAC7C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,QAAQ,CAAC,+BAA+B,EAAE;YACpD,GAAG;YACH,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;SAClC,CAAC,CAAC,IAAI,EAAE,CAAC;QACV,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,+BAA+B,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function mergeGitignoreFromTemplate(repoRoot: string, templatesRoot: string): void;
2
+ //# sourceMappingURL=gitignore-gxt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitignore-gxt.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/gitignore-gxt.ts"],"names":[],"mappings":"AAKA,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAmBxF"}
@@ -0,0 +1,24 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { CLI_NAME } from "./constants.js";
4
+ import { logInfo } from "./cli-io.js";
5
+ export function mergeGitignoreFromTemplate(repoRoot, templatesRoot) {
6
+ const fragmentPath = path.join(templatesRoot, ".gitignore.gxt");
7
+ if (!fs.existsSync(fragmentPath))
8
+ return;
9
+ const lines = fs
10
+ .readFileSync(fragmentPath, "utf8")
11
+ .split(/\r?\n/)
12
+ .map((l) => l.trim())
13
+ .filter((l) => l.length > 0 && !l.startsWith("#"));
14
+ const gitignorePath = path.join(repoRoot, ".gitignore");
15
+ const existing = fs.existsSync(gitignorePath) ? fs.readFileSync(gitignorePath, "utf8") : "";
16
+ const missing = lines.filter((line) => !existing.includes(line));
17
+ if (missing.length === 0)
18
+ return;
19
+ const prefix = existing.length > 0 && !existing.endsWith("\n") ? "\n" : existing.length > 0 ? "" : "";
20
+ const block = `${prefix}\n# OpenGantry (gapman init)\n${missing.join("\n")}\n`;
21
+ fs.writeFileSync(gitignorePath, existing + block, "utf8");
22
+ logInfo(`${CLI_NAME}: appended ${missing.length} line(s) to .gitignore`);
23
+ }
24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,KAAK,CAAC;QAAE,OAAO;IAEjC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACtG,MAAM,KAAK,GAAG,GAAG,MAAM,iCAAiC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;IAC/E,EAAE,CAAC,aAAa,CAAC,aAAa,EAAE,QAAQ,GAAG,KAAK,EAAE,MAAM,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,QAAQ,cAAc,OAAO,CAAC,MAAM,wBAAwB,CAAC,CAAC;AAC3E,CAAC"}
@@ -0,0 +1,19 @@
1
+ /** Stable machine-readable error codes for CLI JSON and MCP payloads. */
2
+ export declare const GXT_ERROR: {
3
+ readonly MISSION_UNSTAMPED: "GXT_MISSION_UNSTAMPED";
4
+ readonly GATE_FAILED: "GXT_GATE_FAILED";
5
+ readonly TRACE_MISSING: "GXT_TRACE_MISSING";
6
+ readonly TRACE_AMBIGUOUS: "GXT_TRACE_AMBIGUOUS";
7
+ readonly TRACE_PENDING: "GXT_TRACE_PENDING";
8
+ readonly FORBIDDEN_ZONE: "GXT_FORBIDDEN_ZONE";
9
+ readonly RUNTIME_EXEC_FAILED: "GXT_RUNTIME_EXEC_FAILED";
10
+ readonly VERIFY_FAILED: "GXT_VERIFY_FAILED";
11
+ };
12
+ export type GxtErrorCode = (typeof GXT_ERROR)[keyof typeof GXT_ERROR];
13
+ /** Map runtime exec / MCP error codes to stable GXT codes. */
14
+ export declare function mapRuntimeErrorCodeToGxt(code: string): GxtErrorCode;
15
+ export declare function mapGitProofCodeToGxt(code: string): GxtErrorCode;
16
+ export declare function gxtCodeFromGapmanUserError(code: string): GxtErrorCode;
17
+ /** @internal Test helper — returns undefined when code would fall through to VERIFY_FAILED unexpectedly. */
18
+ export declare function isKnownGapmanUserErrorCode(code: string): boolean;
19
+ //# sourceMappingURL=gxt-error-codes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gxt-error-codes.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/gxt-error-codes.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,eAAO,MAAM,SAAS;;;;;;;;;CASZ,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AA0BtE,8DAA8D;AAC9D,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAMnE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAE/D;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAMrE;AAED,4GAA4G;AAC5G,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhE"}
@@ -0,0 +1,60 @@
1
+ /** Stable machine-readable error codes for CLI JSON and MCP payloads. */
2
+ export const GXT_ERROR = {
3
+ MISSION_UNSTAMPED: "GXT_MISSION_UNSTAMPED",
4
+ GATE_FAILED: "GXT_GATE_FAILED",
5
+ TRACE_MISSING: "GXT_TRACE_MISSING",
6
+ TRACE_AMBIGUOUS: "GXT_TRACE_AMBIGUOUS",
7
+ TRACE_PENDING: "GXT_TRACE_PENDING",
8
+ FORBIDDEN_ZONE: "GXT_FORBIDDEN_ZONE",
9
+ RUNTIME_EXEC_FAILED: "GXT_RUNTIME_EXEC_FAILED",
10
+ VERIFY_FAILED: "GXT_VERIFY_FAILED",
11
+ };
12
+ const GIT_PROOF_TO_GXT = {
13
+ MISSION_MISSING_MSN: GXT_ERROR.MISSION_UNSTAMPED,
14
+ TEACHER_IDENTITY_UNCONFIGURED: GXT_ERROR.MISSION_UNSTAMPED,
15
+ NO_MSN_COMMITS: GXT_ERROR.MISSION_UNSTAMPED,
16
+ NO_TEACHER_MSN_COMMIT: GXT_ERROR.MISSION_UNSTAMPED,
17
+ MISSION_FILE_NOT_MODIFIED_BY_TEACHER: GXT_ERROR.MISSION_UNSTAMPED,
18
+ MISSION_OUTSIDE_MISSIONS_DIR: GXT_ERROR.MISSION_UNSTAMPED,
19
+ MISSION_NO_GATE: GXT_ERROR.MISSION_UNSTAMPED,
20
+ };
21
+ /** Explicit mapping for non-git-proof GapmanUserError codes. */
22
+ const GAPMAN_USER_ERROR_TO_GXT = {
23
+ UPGRADE_STAGING_MISSING: GXT_ERROR.VERIFY_FAILED,
24
+ UPGRADE_EMPTY_MANIFEST: GXT_ERROR.VERIFY_FAILED,
25
+ UPGRADE_STAGING_DRIFT: GXT_ERROR.VERIFY_FAILED,
26
+ UPGRADE_HASH_MISMATCH: GXT_ERROR.VERIFY_FAILED,
27
+ MISSION_NOT_FOUND: GXT_ERROR.VERIFY_FAILED,
28
+ UPGRADE_MISSION_REQUIRED: GXT_ERROR.VERIFY_FAILED,
29
+ UPGRADE_INVALID_MISSION: GXT_ERROR.VERIFY_FAILED,
30
+ FORBIDDEN_ZONE_VIOLATION: GXT_ERROR.FORBIDDEN_ZONE,
31
+ RUNTIME_EXEC_FAILED: GXT_ERROR.RUNTIME_EXEC_FAILED,
32
+ RUNTIME_ENV_FAILED: GXT_ERROR.VERIFY_FAILED,
33
+ };
34
+ /** Map runtime exec / MCP error codes to stable GXT codes. */
35
+ export function mapRuntimeErrorCodeToGxt(code) {
36
+ if (code === "FORBIDDEN_ZONE_VIOLATION" || code === "forbidden_zone_violation") {
37
+ return GXT_ERROR.FORBIDDEN_ZONE;
38
+ }
39
+ if (code === "RUNTIME_EXEC_FAILED")
40
+ return GXT_ERROR.RUNTIME_EXEC_FAILED;
41
+ return GAPMAN_USER_ERROR_TO_GXT[code] ?? GXT_ERROR.VERIFY_FAILED;
42
+ }
43
+ export function mapGitProofCodeToGxt(code) {
44
+ return GIT_PROOF_TO_GXT[code] ?? GXT_ERROR.MISSION_UNSTAMPED;
45
+ }
46
+ export function gxtCodeFromGapmanUserError(code) {
47
+ if (code.startsWith("GXT_"))
48
+ return code;
49
+ if (code in GIT_PROOF_TO_GXT)
50
+ return mapGitProofCodeToGxt(code);
51
+ const mapped = GAPMAN_USER_ERROR_TO_GXT[code];
52
+ if (mapped)
53
+ return mapped;
54
+ return GXT_ERROR.VERIFY_FAILED;
55
+ }
56
+ /** @internal Test helper — returns undefined when code would fall through to VERIFY_FAILED unexpectedly. */
57
+ export function isKnownGapmanUserErrorCode(code) {
58
+ return code.startsWith("GXT_") || code in GIT_PROOF_TO_GXT || code in GAPMAN_USER_ERROR_TO_GXT;
59
+ }
60
+ //# sourceMappingURL=gxt-error-codes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gxt-error-codes.js","sourceRoot":"","sources":["../../../src/cli/lib/gxt-error-codes.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,iBAAiB,EAAE,uBAAuB;IAC1C,WAAW,EAAE,iBAAiB;IAC9B,aAAa,EAAE,mBAAmB;IAClC,eAAe,EAAE,qBAAqB;IACtC,aAAa,EAAE,mBAAmB;IAClC,cAAc,EAAE,oBAAoB;IACpC,mBAAmB,EAAE,yBAAyB;IAC9C,aAAa,EAAE,mBAAmB;CAC1B,CAAC;AAIX,MAAM,gBAAgB,GAAiC;IACrD,mBAAmB,EAAE,SAAS,CAAC,iBAAiB;IAChD,6BAA6B,EAAE,SAAS,CAAC,iBAAiB;IAC1D,cAAc,EAAE,SAAS,CAAC,iBAAiB;IAC3C,qBAAqB,EAAE,SAAS,CAAC,iBAAiB;IAClD,oCAAoC,EAAE,SAAS,CAAC,iBAAiB;IACjE,4BAA4B,EAAE,SAAS,CAAC,iBAAiB;IACzD,eAAe,EAAE,SAAS,CAAC,iBAAiB;CAC7C,CAAC;AAEF,gEAAgE;A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AC5G,MAAM,UAAU,0BAA0B,CAAC,IAAY;IACrD,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,gBAAgB,IAAI,IAAI,IAAI,wBAAwB,CAAC;AACjG,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { InitAsset } from "./init-assets.js";
2
+ import type { IntegrationCompatManifest } from "./integration-compat.js";
3
+ import type { InitProfile } from "./init-profile.js";
4
+ export type InitAssetTag = "core" | "skill-minimal" | "skill-specimen" | "hooks" | "ci" | "runtime" | "cursor" | "claude-code" | "codex-cli" | "opencode" | "junie" | "antigravity" | "cline" | "aider" | "openhands";
5
+ export interface InitAssetSpec extends InitAsset {
6
+ /** Template path relative to templates/ (defaults to targetPath). */
7
+ templatePath?: string;
8
+ tags: InitAssetTag[];
9
+ }
10
+ export declare const INIT_ASSET_CATALOG: readonly InitAssetSpec[];
11
+ export declare function resolveAssetsFromProfile(profile: InitProfile, _compat: IntegrationCompatManifest): InitAssetSpec[];
12
+ export declare function templatePathForAsset(asset: InitAssetSpec): string;
13
+ /** Legacy default profile asset target paths (non-TTY / --yes parity). */
14
+ export declare function legacyDefaultInitTargetPaths(): string[];
15
+ //# sourceMappingURL=init-asset-catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-asset-catalog.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/init-asset-catalog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,eAAe,GACf,gBAAgB,GAChB,OAAO,GACP,IAAI,GACJ,SAAS,GACT,QAAQ,GACR,aAAa,GACb,WAAW,GACX,UAAU,GACV,OAAO,GACP,aAAa,GACb,OAAO,GACP,OAAO,GACP,WAAW,CAAC;AAEhB,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,YAAY,EAAE,CAAC;CACtB;AAgID,eAAO,MAAM,kBAAkB,EAAE,SAAS,aAAa,EAQtD,CAAC;AAmBF,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,yBAAyB,GACjC,aAAa,EAAE,CAGjB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAEjE;AAED,0EAA0E;AAC1E,wBAAgB,4BAA4B,IAAI,MAAM,EAAE,CAYvD"}
@@ -0,0 +1,163 @@
1
+ import path from "node:path";
2
+ const CORE_ASSETS = [
3
+ { targetPath: ".gitagent/foreman/MANIFEST.json", mode: "scaffold_only", tags: ["core"] },
4
+ { targetPath: ".gitagent/foreman/BYPASS.sha256", mode: "scaffold_only", tags: ["core"] },
5
+ {
6
+ targetPath: ".gitagent/foreman/SUBSTRATE.version.json",
7
+ mode: "scaffold_only",
8
+ tags: ["core"],
9
+ },
10
+ { targetPath: ".gitagent/teacher/RULES.md", mode: "scaffold_only", tags: ["core"] },
11
+ { targetPath: ".gitagent/missions/README.md", mode: "scaffold_only", tags: ["core"] },
12
+ { targetPath: "AGENTS.md", mode: "scaffold_only", tags: ["core"] },
13
+ { targetPath: ".gitagent/teacher/ARCHITECTURE-DISCOVERY.md", mode: "scaffold_only", tags: ["core"] },
14
+ { targetPath: ".gitagent/teacher/ARCHITECTURE-ACCESS.md", mode: "scaffold_only", tags: ["core"] },
15
+ { targetPath: ".gitagent/teacher/MISSION-ARCHITECT.md", mode: "scaffold_only", tags: ["core"] },
16
+ { targetPath: "docs/ARCHITECTURE.md", mode: "scaffold_only", tags: ["core"] },
17
+ { targetPath: ".gitagent/teacher/MISSION.schema.yaml", mode: "managed_strict", tags: ["core"] },
18
+ { targetPath: ".gitagent/teacher/WORKER_LOG.template.md", mode: "managed_strict", tags: ["core"] },
19
+ { targetPath: "scripts/validate-gxt.sh", mode: "managed_strict", executable: true, tags: ["core"] },
20
+ {
21
+ targetPath: "scripts/gxt-manifest-lib.mjs",
22
+ mode: "managed_strict",
23
+ executable: true,
24
+ tags: ["core"],
25
+ },
26
+ ];
27
+ const SKILL_ASSETS = [
28
+ { targetPath: "skills/ui.md", mode: "scaffold_only", tags: ["skill-minimal", "skill-specimen"] },
29
+ { targetPath: "skills/logic.md", mode: "scaffold_only", tags: ["skill-minimal", "skill-specimen"] },
30
+ { targetPath: "skills/gapman.md", mode: "scaffold_only", tags: ["skill-specimen"] },
31
+ { targetPath: "skills/substrate.md", mode: "scaffold_only", tags: ["skill-specimen"] },
32
+ ];
33
+ const HOOK_ASSETS = [
34
+ { targetPath: ".githooks/post-checkout", mode: "managed_strict", executable: true, tags: ["hooks"] },
35
+ { targetPath: ".githooks/pre-push", mode: "managed_strict", executable: true, tags: ["hooks"] },
36
+ ];
37
+ const CI_ASSETS = [
38
+ {
39
+ targetPath: ".github/workflows/gxt-validate.yml",
40
+ mode: "managed_strict",
41
+ tags: ["ci"],
42
+ },
43
+ ];
44
+ const RUNTIME_ASSETS = [
45
+ { targetPath: "scripts/gxt-runtime-env.sh", mode: "managed_strict", executable: true, tags: ["runtime"] },
46
+ { targetPath: "scripts/gxt-resolve-mission.sh", mode: "managed_strict", executable: true, tags: ["runtime"] },
47
+ { targetPath: "scripts/gxt-pin-mission.sh", mode: "managed_strict", executable: true, tags: ["runtime"] },
48
+ { targetPath: "scripts/gxt-cursor-env.sh", mode: "managed_strict", executable: true, tags: ["runtime"] },
49
+ ];
50
+ const CURSOR_ASSETS = [
51
+ {
52
+ targetPath: ".cursor/rules/opengantry-gxt-substrate.mdc",
53
+ mode: "managed_strict",
54
+ tags: ["cursor"],
55
+ },
56
+ { targetPath: ".cursor/hooks.json", mode: "managed_strict", tags: ["cursor"] },
57
+ {
58
+ targetPath: ".cursor/hooks/gxt-before-shell.sh",
59
+ mode: "managed_strict",
60
+ executable: true,
61
+ tags: ["cursor"],
62
+ },
63
+ {
64
+ targetPath: ".cursor/hooks/gxt-session-start.sh",
65
+ mode: "managed_strict",
66
+ executable: true,
67
+ tags: ["cursor"],
68
+ },
69
+ { targetPath: ".cursor/mcp.json", mode: "managed_strict", tags: ["cursor"] },
70
+ ];
71
+ const IDE_PACK_ASSETS = [
72
+ {
73
+ targetPath: "CLAUDE.md",
74
+ templatePath: "integrations/claude-code/CLAUDE.md",
75
+ mode: "scaffold_only",
76
+ tags: ["claude-code"],
77
+ },
78
+ {
79
+ targetPath: ".codex/config.toml",
80
+ templatePath: "integrations/codex-cli/.codex/config.toml",
81
+ mode: "scaffold_only",
82
+ tags: ["codex-cli"],
83
+ },
84
+ {
85
+ targetPath: "opencode.json",
86
+ templatePath: "integrations/opencode/opencode.json",
87
+ mode: "scaffold_only",
88
+ tags: ["opencode"],
89
+ },
90
+ {
91
+ targetPath: ".junie/guidelines.md",
92
+ templatePath: "integrations/junie/.junie/guidelines.md",
93
+ mode: "scaffold_only",
94
+ tags: ["junie"],
95
+ },
96
+ {
97
+ targetPath: ".agent/rules/gxt.md",
98
+ templatePath: "integrations/antigravity/.agent/rules/gxt.md",
99
+ mode: "scaffold_only",
100
+ tags: ["antigravity"],
101
+ },
102
+ {
103
+ targetPath: ".clinerules/gxt.md",
104
+ templatePath: "integrations/cline/.clinerules/gxt.md",
105
+ mode: "scaffold_only",
106
+ tags: ["cline"],
107
+ },
108
+ {
109
+ targetPath: ".aider.conf.yml",
110
+ templatePath: "integrations/aider/.aider.conf.yml",
111
+ mode: "scaffold_only",
112
+ tags: ["aider"],
113
+ },
114
+ {
115
+ targetPath: ".openhands/microagents/gxt.md",
116
+ templatePath: "integrations/openhands/.openhands/microagents/gxt.md",
117
+ mode: "scaffold_only",
118
+ tags: ["openhands"],
119
+ },
120
+ ];
121
+ export const INIT_ASSET_CATALOG = [
122
+ ...CORE_ASSETS,
123
+ ...SKILL_ASSETS,
124
+ ...HOOK_ASSETS,
125
+ ...CI_ASSETS,
126
+ ...RUNTIME_ASSETS,
127
+ ...CURSOR_ASSETS,
128
+ ...IDE_PACK_ASSETS,
129
+ ];
130
+ function skillTag(profile) {
131
+ return profile.skillsPreset === "minimal" ? "skill-minimal" : "skill-specimen";
132
+ }
133
+ function assetMatchesProfile(asset, profile) {
134
+ const skill = skillTag(profile);
135
+ const activeTags = new Set([
136
+ "core",
137
+ skill,
138
+ "runtime",
139
+ ...(profile.gitHooks ? ["hooks"] : []),
140
+ ...(profile.ciWorkflow ? ["ci"] : []),
141
+ ...profile.ides,
142
+ ]);
143
+ return asset.tags.some((t) => activeTags.has(t));
144
+ }
145
+ export function resolveAssetsFromProfile(profile, _compat) {
146
+ void _compat;
147
+ return INIT_ASSET_CATALOG.filter((a) => assetMatchesProfile(a, profile));
148
+ }
149
+ export function templatePathForAsset(asset) {
150
+ return (asset.templatePath ?? asset.targetPath).split("/").join(path.sep);
151
+ }
152
+ /** Legacy default profile asset target paths (non-TTY / --yes parity). */
153
+ export function legacyDefaultInitTargetPaths() {
154
+ return resolveAssetsFromProfile({
155
+ ides: ["cursor"],
156
+ integrationsDocPath: "docs/INTEGRATIONS.md",
157
+ skillsPreset: "specimen",
158
+ gitHooks: true,
159
+ ciWorkflow: true,
160
+ architectureSource: "unset",
161
+ }, { schema_version: "1", opengantry_version: "1.0.0", integrations: {} }).map((a) => a.targetPath);
162
+ }
163
+ //# sourceMappingURL=init-asset-catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-asset-catalog.js","sourceRoot":"","sources":["../../../src/cli/lib/init-asset-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AA4B7B,MAAM,WAAW,GAAoB;IACnC,EAAE,UAAU,EAAE,iCAAiC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE;IACxF,EAAE,UAAU,EAAE,iCAAiC,EA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 mode: InitAssetMode;
5
+ executable?: boolean;
6
+ }
7
+ /** @deprecated Use INIT_ASSET_CATALOG via resolveAssetsFromProfile — types only retained for catalog specs. */
8
+ //# sourceMappingURL=init-assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-assets.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/init-assets.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAE/D,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,+GAA+G"}
@@ -0,0 +1,3 @@
1
+ export {};
2
+ /** @deprecated Use INIT_ASSET_CATALOG via resolveAssetsFromProfile — types only retained for catalog specs. */
3
+ //# sourceMappingURL=init-assets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-assets.js","sourceRoot":"","sources":["../../../src/cli/lib/init-assets.ts"],"names":[],"mappings":";AAQA,+GAA+G"}
@@ -0,0 +1,6 @@
1
+ import type { ArchitecturePointer } from "./architecture-pointer.js";
2
+ import type { ArchitectureSourceKind, InitProfile } from "./init-profile.js";
3
+ export declare function defaultArchitectureLocation(kind: ArchitectureSourceKind): string;
4
+ export declare function composeArchitecturePointer(profile: InitProfile): ArchitecturePointer;
5
+ export declare function serializeArchitecturePointer(pointer: ArchitecturePointer): string;
6
+ //# sourceMappingURL=init-compose-arch-pointer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-compose-arch-pointer.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/init-compose-arch-pointer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAK7E,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,sBAAsB,GAAG,MAAM,CAWhF;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,WAAW,GAAG,mBAAmB,CAoDpF;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAEjF"}