@open-agent-toolkit/cli 0.0.10

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 (797) hide show
  1. package/README.md +50 -0
  2. package/assets/agents/oat-codebase-mapper.md +275 -0
  3. package/assets/agents/oat-reviewer.md +350 -0
  4. package/assets/agents/skeptical-evaluator.md +126 -0
  5. package/assets/docs/contributing/code.md +95 -0
  6. package/assets/docs/contributing/commit-conventions.md +41 -0
  7. package/assets/docs/contributing/design-principles.md +124 -0
  8. package/assets/docs/contributing/documentation.md +69 -0
  9. package/assets/docs/contributing/hooks-and-safety.md +31 -0
  10. package/assets/docs/contributing/index.md +18 -0
  11. package/assets/docs/contributing/markdown-features.md +117 -0
  12. package/assets/docs/contributing/skills.md +68 -0
  13. package/assets/docs/guide/cli-reference.md +211 -0
  14. package/assets/docs/guide/concepts.md +88 -0
  15. package/assets/docs/guide/configuration.md +130 -0
  16. package/assets/docs/guide/documentation/commands.md +157 -0
  17. package/assets/docs/guide/documentation/index.md +27 -0
  18. package/assets/docs/guide/documentation/quickstart.md +164 -0
  19. package/assets/docs/guide/documentation/workflows.md +67 -0
  20. package/assets/docs/guide/getting-started.md +63 -0
  21. package/assets/docs/guide/ideas/index.md +34 -0
  22. package/assets/docs/guide/ideas/lifecycle.md +106 -0
  23. package/assets/docs/guide/index.md +20 -0
  24. package/assets/docs/guide/provider-sync/commands.md +100 -0
  25. package/assets/docs/guide/provider-sync/config.md +77 -0
  26. package/assets/docs/guide/provider-sync/index.md +65 -0
  27. package/assets/docs/guide/provider-sync/manifest-and-drift.md +55 -0
  28. package/assets/docs/guide/provider-sync/providers.md +67 -0
  29. package/assets/docs/guide/provider-sync/scope-and-surface.md +64 -0
  30. package/assets/docs/guide/skills/index.md +115 -0
  31. package/assets/docs/guide/tool-packs.md +167 -0
  32. package/assets/docs/guide/workflow/artifacts.md +44 -0
  33. package/assets/docs/guide/workflow/hill-checkpoints.md +53 -0
  34. package/assets/docs/guide/workflow/index.md +34 -0
  35. package/assets/docs/guide/workflow/lifecycle.md +207 -0
  36. package/assets/docs/guide/workflow/pr-flow.md +55 -0
  37. package/assets/docs/guide/workflow/repo-analysis.md +96 -0
  38. package/assets/docs/guide/workflow/reviews.md +98 -0
  39. package/assets/docs/guide/workflow/state-machine.md +74 -0
  40. package/assets/docs/index.md +45 -0
  41. package/assets/docs/quickstart.md +162 -0
  42. package/assets/docs/reference/docs-index-contract.md +53 -0
  43. package/assets/docs/reference/file-locations.md +109 -0
  44. package/assets/docs/reference/index.md +29 -0
  45. package/assets/docs/reference/oat-directory-structure.md +236 -0
  46. package/assets/docs/reference/troubleshooting.md +63 -0
  47. package/assets/public-package-versions.json +6 -0
  48. package/assets/scripts/resolve-tracking.sh +233 -0
  49. package/assets/skills/analyze/SKILL.md +358 -0
  50. package/assets/skills/compare/SKILL.md +276 -0
  51. package/assets/skills/create-agnostic-skill/SKILL.md +410 -0
  52. package/assets/skills/create-agnostic-skill/references/skill-template.md +195 -0
  53. package/assets/skills/deep-research/SKILL.md +350 -0
  54. package/assets/skills/deep-research/references/schema-analysis.md +93 -0
  55. package/assets/skills/deep-research/references/schema-architectural.md +75 -0
  56. package/assets/skills/deep-research/references/schema-base.md +70 -0
  57. package/assets/skills/deep-research/references/schema-comparative.md +72 -0
  58. package/assets/skills/deep-research/references/schema-conceptual.md +68 -0
  59. package/assets/skills/deep-research/references/schema-technical.md +64 -0
  60. package/assets/skills/oat-agent-instructions-analyze/SKILL.md +500 -0
  61. package/assets/skills/oat-agent-instructions-analyze/references/analysis-artifact-template.md +248 -0
  62. package/assets/skills/oat-agent-instructions-analyze/references/bundle-summary-template.md +31 -0
  63. package/assets/skills/oat-agent-instructions-analyze/references/directory-assessment-criteria.md +93 -0
  64. package/assets/skills/oat-agent-instructions-analyze/references/docs/agent-instruction.md +575 -0
  65. package/assets/skills/oat-agent-instructions-analyze/references/docs/cursor-rules-files.md +510 -0
  66. package/assets/skills/oat-agent-instructions-analyze/references/docs/provider-reference.md +429 -0
  67. package/assets/skills/oat-agent-instructions-analyze/references/docs/rules-files.md +594 -0
  68. package/assets/skills/oat-agent-instructions-analyze/references/file-type-discovery-checklist.md +273 -0
  69. package/assets/skills/oat-agent-instructions-analyze/references/quality-checklist.md +125 -0
  70. package/assets/skills/oat-agent-instructions-analyze/references/recommendation-pack-template.md +45 -0
  71. package/assets/skills/oat-agent-instructions-analyze/references/recommendations-manifest-template.yaml +27 -0
  72. package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-instruction-files.sh +120 -0
  73. package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-providers.sh +135 -0
  74. package/assets/skills/oat-agent-instructions-apply/SKILL.md +507 -0
  75. package/assets/skills/oat-agent-instructions-apply/references/apply-plan-template.md +80 -0
  76. package/assets/skills/oat-agent-instructions-apply/references/docs/agent-instruction.md +575 -0
  77. package/assets/skills/oat-agent-instructions-apply/references/docs/cursor-rules-files.md +510 -0
  78. package/assets/skills/oat-agent-instructions-apply/references/docs/provider-reference.md +429 -0
  79. package/assets/skills/oat-agent-instructions-apply/references/docs/rules-files.md +594 -0
  80. package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/agents-md-root.md +85 -0
  81. package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/agents-md-scoped.md +62 -0
  82. package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/frontmatter/claude-rule.md +67 -0
  83. package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/frontmatter/copilot-instruction.md +70 -0
  84. package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/frontmatter/copilot-shim.md +35 -0
  85. package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/frontmatter/cursor-rule.md +84 -0
  86. package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/glob-scoped-rule.md +59 -0
  87. package/assets/skills/oat-docs/SKILL.md +214 -0
  88. package/assets/skills/oat-docs-analyze/SKILL.md +355 -0
  89. package/assets/skills/oat-docs-analyze/references/analysis-artifact-template.md +192 -0
  90. package/assets/skills/oat-docs-analyze/references/directory-assessment-criteria.md +46 -0
  91. package/assets/skills/oat-docs-analyze/references/quality-checklist.md +48 -0
  92. package/assets/skills/oat-docs-apply/SKILL.md +339 -0
  93. package/assets/skills/oat-docs-apply/references/apply-plan-template.md +69 -0
  94. package/assets/skills/oat-doctor/SKILL.md +293 -0
  95. package/assets/skills/oat-idea-ideate/SKILL.md +187 -0
  96. package/assets/skills/oat-idea-new/SKILL.md +152 -0
  97. package/assets/skills/oat-idea-scratchpad/SKILL.md +115 -0
  98. package/assets/skills/oat-idea-summarize/SKILL.md +172 -0
  99. package/assets/skills/oat-pjm-add-backlog-item/SKILL.md +155 -0
  100. package/assets/skills/oat-pjm-review-backlog/SKILL.md +171 -0
  101. package/assets/skills/oat-pjm-review-backlog/references/backlog-review-template.md +172 -0
  102. package/assets/skills/oat-pjm-update-repo-reference/SKILL.md +128 -0
  103. package/assets/skills/oat-project-capture/SKILL.md +306 -0
  104. package/assets/skills/oat-project-clear-active/SKILL.md +50 -0
  105. package/assets/skills/oat-project-complete/SKILL.md +461 -0
  106. package/assets/skills/oat-project-design/SKILL.md +461 -0
  107. package/assets/skills/oat-project-discover/SKILL.md +395 -0
  108. package/assets/skills/oat-project-document/SKILL.md +468 -0
  109. package/assets/skills/oat-project-implement/SKILL.md +736 -0
  110. package/assets/skills/oat-project-import-plan/SKILL.md +228 -0
  111. package/assets/skills/oat-project-import-plan/scripts/find-recent-provider-plans.sh +149 -0
  112. package/assets/skills/oat-project-new/SKILL.md +74 -0
  113. package/assets/skills/oat-project-next/SKILL.md +345 -0
  114. package/assets/skills/oat-project-open/SKILL.md +47 -0
  115. package/assets/skills/oat-project-plan/SKILL.md +415 -0
  116. package/assets/skills/oat-project-plan-writing/SKILL.md +116 -0
  117. package/assets/skills/oat-project-pr-final/SKILL.md +391 -0
  118. package/assets/skills/oat-project-pr-progress/SKILL.md +354 -0
  119. package/assets/skills/oat-project-progress/SKILL.md +342 -0
  120. package/assets/skills/oat-project-promote-spec-driven/SKILL.md +155 -0
  121. package/assets/skills/oat-project-quick-start/SKILL.md +363 -0
  122. package/assets/skills/oat-project-reconcile/SKILL.md +738 -0
  123. package/assets/skills/oat-project-review-provide/SKILL.md +728 -0
  124. package/assets/skills/oat-project-review-receive/SKILL.md +641 -0
  125. package/assets/skills/oat-project-review-receive-remote/SKILL.md +235 -0
  126. package/assets/skills/oat-project-revise/SKILL.md +316 -0
  127. package/assets/skills/oat-project-spec/SKILL.md +471 -0
  128. package/assets/skills/oat-project-subagent-implement/SKILL.md +549 -0
  129. package/assets/skills/oat-project-subagent-implement/examples/pattern-hill-checkpoint.md +110 -0
  130. package/assets/skills/oat-project-subagent-implement/examples/pattern-parallel-phases.md +118 -0
  131. package/assets/skills/oat-project-subagent-implement/scripts/dispatch.sh +133 -0
  132. package/assets/skills/oat-project-subagent-implement/scripts/reconcile.sh +182 -0
  133. package/assets/skills/oat-project-subagent-implement/scripts/review-gate.sh +187 -0
  134. package/assets/skills/oat-project-subagent-implement/tests/fixtures/sample-plan.md +234 -0
  135. package/assets/skills/oat-project-subagent-implement/tests/test-dry-run.sh +126 -0
  136. package/assets/skills/oat-project-subagent-implement/tests/test-hill-checkpoint.sh +127 -0
  137. package/assets/skills/oat-project-subagent-implement/tests/test-reconcile.sh +254 -0
  138. package/assets/skills/oat-project-subagent-implement/tests/test-review-gate.sh +220 -0
  139. package/assets/skills/oat-project-summary/SKILL.md +227 -0
  140. package/assets/skills/oat-repo-knowledge-index/SKILL.md +724 -0
  141. package/assets/skills/oat-repo-knowledge-index/references/templates/architecture.md +83 -0
  142. package/assets/skills/oat-repo-knowledge-index/references/templates/concerns.md +97 -0
  143. package/assets/skills/oat-repo-knowledge-index/references/templates/conventions.md +100 -0
  144. package/assets/skills/oat-repo-knowledge-index/references/templates/integrations.md +91 -0
  145. package/assets/skills/oat-repo-knowledge-index/references/templates/stack.md +86 -0
  146. package/assets/skills/oat-repo-knowledge-index/references/templates/structure.md +88 -0
  147. package/assets/skills/oat-repo-knowledge-index/references/templates/testing.md +137 -0
  148. package/assets/skills/oat-repo-maintainability-review/SKILL.md +198 -0
  149. package/assets/skills/oat-repo-maintainability-review/references/dx-checklist.md +33 -0
  150. package/assets/skills/oat-repo-maintainability-review/references/repo-review-artifact-template.md +72 -0
  151. package/assets/skills/oat-repo-maintainability-review/references/repo-review-rubric.md +66 -0
  152. package/assets/skills/oat-repo-maintainability-review/scripts/resolve-analysis-output.sh +162 -0
  153. package/assets/skills/oat-review-provide/SKILL.md +231 -0
  154. package/assets/skills/oat-review-provide/references/review-artifact-template.md +55 -0
  155. package/assets/skills/oat-review-provide/scripts/resolve-review-output.sh +124 -0
  156. package/assets/skills/oat-review-receive/SKILL.md +238 -0
  157. package/assets/skills/oat-review-receive-remote/SKILL.md +250 -0
  158. package/assets/skills/oat-worktree-bootstrap/SKILL.md +208 -0
  159. package/assets/skills/oat-worktree-bootstrap/references/worktree-conventions.md +58 -0
  160. package/assets/skills/oat-worktree-bootstrap-auto/SKILL.md +245 -0
  161. package/assets/skills/oat-worktree-bootstrap-auto/scripts/bootstrap.sh +194 -0
  162. package/assets/skills/skeptic/SKILL.md +261 -0
  163. package/assets/skills/synthesize/SKILL.md +361 -0
  164. package/assets/templates/backlog-item.md +24 -0
  165. package/assets/templates/design.md +315 -0
  166. package/assets/templates/discovery.md +135 -0
  167. package/assets/templates/docs-app-fuma/app/[[...slug]]/page.tsx +30 -0
  168. package/assets/templates/docs-app-fuma/app/api/search/route.ts +8 -0
  169. package/assets/templates/docs-app-fuma/app/globals.css +69 -0
  170. package/assets/templates/docs-app-fuma/app/layout.tsx +26 -0
  171. package/assets/templates/docs-app-fuma/docs/contributing.md +71 -0
  172. package/assets/templates/docs-app-fuma/docs/getting-started.md +40 -0
  173. package/assets/templates/docs-app-fuma/docs/index.md +13 -0
  174. package/assets/templates/docs-app-fuma/lib/source.ts +8 -0
  175. package/assets/templates/docs-app-fuma/next.config.js +6 -0
  176. package/assets/templates/docs-app-fuma/package.json.template +38 -0
  177. package/assets/templates/docs-app-fuma/postcss.config.mjs +7 -0
  178. package/assets/templates/docs-app-fuma/source.config.ts +14 -0
  179. package/assets/templates/docs-app-fuma/tsconfig.json +25 -0
  180. package/assets/templates/docs-app-mkdocs/docs/contributing.md +122 -0
  181. package/assets/templates/docs-app-mkdocs/docs/getting-started.md +28 -0
  182. package/assets/templates/docs-app-mkdocs/docs/index.md +8 -0
  183. package/assets/templates/docs-app-mkdocs/mkdocs.yml +47 -0
  184. package/assets/templates/docs-app-mkdocs/package.json.template +19 -0
  185. package/assets/templates/docs-app-mkdocs/requirements.txt +6 -0
  186. package/assets/templates/docs-app-mkdocs/setup-docs.sh +18 -0
  187. package/assets/templates/ideas/idea-discovery.md +39 -0
  188. package/assets/templates/ideas/idea-summary.md +42 -0
  189. package/assets/templates/ideas/ideas-backlog.md +21 -0
  190. package/assets/templates/ideas/ideas-scratchpad.md +10 -0
  191. package/assets/templates/implementation.md +207 -0
  192. package/assets/templates/plan.md +171 -0
  193. package/assets/templates/roadmap.md +24 -0
  194. package/assets/templates/spec.md +138 -0
  195. package/assets/templates/state.md +49 -0
  196. package/assets/templates/summary.md +82 -0
  197. package/dist/agents/canonical/index.d.ts +4 -0
  198. package/dist/agents/canonical/index.d.ts.map +1 -0
  199. package/dist/agents/canonical/index.js +2 -0
  200. package/dist/agents/canonical/parse.d.ts +4 -0
  201. package/dist/agents/canonical/parse.d.ts.map +1 -0
  202. package/dist/agents/canonical/parse.js +97 -0
  203. package/dist/agents/canonical/render.d.ts +3 -0
  204. package/dist/agents/canonical/render.d.ts.map +1 -0
  205. package/dist/agents/canonical/render.js +17 -0
  206. package/dist/agents/canonical/types.d.ts +22 -0
  207. package/dist/agents/canonical/types.d.ts.map +1 -0
  208. package/dist/agents/canonical/types.js +1 -0
  209. package/dist/app/command-context.d.ts +21 -0
  210. package/dist/app/command-context.d.ts.map +1 -0
  211. package/dist/app/command-context.js +18 -0
  212. package/dist/app/create-program.d.ts +3 -0
  213. package/dist/app/create-program.d.ts.map +1 -0
  214. package/dist/app/create-program.js +17 -0
  215. package/dist/commands/__tests__/helpers.d.ts +12 -0
  216. package/dist/commands/__tests__/helpers.d.ts.map +1 -0
  217. package/dist/commands/__tests__/helpers.js +36 -0
  218. package/dist/commands/backlog/index.d.ts +14 -0
  219. package/dist/commands/backlog/index.d.ts.map +1 -0
  220. package/dist/commands/backlog/index.js +80 -0
  221. package/dist/commands/backlog/init.d.ts +2 -0
  222. package/dist/commands/backlog/init.d.ts.map +1 -0
  223. package/dist/commands/backlog/init.js +66 -0
  224. package/dist/commands/backlog/regenerate-index.d.ts +2 -0
  225. package/dist/commands/backlog/regenerate-index.d.ts.map +1 -0
  226. package/dist/commands/backlog/regenerate-index.js +78 -0
  227. package/dist/commands/backlog/shared/generate-id.d.ts +4 -0
  228. package/dist/commands/backlog/shared/generate-id.d.ts.map +1 -0
  229. package/dist/commands/backlog/shared/generate-id.js +65 -0
  230. package/dist/commands/cleanup/artifacts/artifacts.d.ts +44 -0
  231. package/dist/commands/cleanup/artifacts/artifacts.d.ts.map +1 -0
  232. package/dist/commands/cleanup/artifacts/artifacts.js +381 -0
  233. package/dist/commands/cleanup/artifacts/artifacts.types.d.ts +13 -0
  234. package/dist/commands/cleanup/artifacts/artifacts.types.d.ts.map +1 -0
  235. package/dist/commands/cleanup/artifacts/artifacts.types.js +1 -0
  236. package/dist/commands/cleanup/artifacts/artifacts.utils.d.ts +14 -0
  237. package/dist/commands/cleanup/artifacts/artifacts.utils.d.ts.map +1 -0
  238. package/dist/commands/cleanup/artifacts/artifacts.utils.js +74 -0
  239. package/dist/commands/cleanup/cleanup.types.d.ts +26 -0
  240. package/dist/commands/cleanup/cleanup.types.d.ts.map +1 -0
  241. package/dist/commands/cleanup/cleanup.types.js +1 -0
  242. package/dist/commands/cleanup/cleanup.utils.d.ts +17 -0
  243. package/dist/commands/cleanup/cleanup.utils.d.ts.map +1 -0
  244. package/dist/commands/cleanup/cleanup.utils.js +44 -0
  245. package/dist/commands/cleanup/index.d.ts +3 -0
  246. package/dist/commands/cleanup/index.d.ts.map +1 -0
  247. package/dist/commands/cleanup/index.js +9 -0
  248. package/dist/commands/cleanup/project/project.d.ts +20 -0
  249. package/dist/commands/cleanup/project/project.d.ts.map +1 -0
  250. package/dist/commands/cleanup/project/project.js +263 -0
  251. package/dist/commands/cleanup/project/project.utils.d.ts +8 -0
  252. package/dist/commands/cleanup/project/project.utils.d.ts.map +1 -0
  253. package/dist/commands/cleanup/project/project.utils.js +48 -0
  254. package/dist/commands/config/index.d.ts +16 -0
  255. package/dist/commands/config/index.d.ts.map +1 -0
  256. package/dist/commands/config/index.js +700 -0
  257. package/dist/commands/docs/analyze.d.ts +8 -0
  258. package/dist/commands/docs/analyze.d.ts.map +1 -0
  259. package/dist/commands/docs/analyze.js +45 -0
  260. package/dist/commands/docs/apply.d.ts +8 -0
  261. package/dist/commands/docs/apply.d.ts.map +1 -0
  262. package/dist/commands/docs/apply.js +45 -0
  263. package/dist/commands/docs/index-generate/generator.d.ts +9 -0
  264. package/dist/commands/docs/index-generate/generator.d.ts.map +1 -0
  265. package/dist/commands/docs/index-generate/generator.js +114 -0
  266. package/dist/commands/docs/index-generate/index.d.ts +16 -0
  267. package/dist/commands/docs/index-generate/index.d.ts.map +1 -0
  268. package/dist/commands/docs/index-generate/index.js +72 -0
  269. package/dist/commands/docs/index.d.ts +3 -0
  270. package/dist/commands/docs/index.d.ts.map +1 -0
  271. package/dist/commands/docs/index.js +17 -0
  272. package/dist/commands/docs/init/index.d.ts +18 -0
  273. package/dist/commands/docs/init/index.d.ts.map +1 -0
  274. package/dist/commands/docs/init/index.js +129 -0
  275. package/dist/commands/docs/init/resolve-options.d.ts +41 -0
  276. package/dist/commands/docs/init/resolve-options.d.ts.map +1 -0
  277. package/dist/commands/docs/init/resolve-options.js +120 -0
  278. package/dist/commands/docs/init/scaffold.d.ts +18 -0
  279. package/dist/commands/docs/init/scaffold.d.ts.map +1 -0
  280. package/dist/commands/docs/init/scaffold.js +233 -0
  281. package/dist/commands/docs/migrate/codemod.d.ts +6 -0
  282. package/dist/commands/docs/migrate/codemod.d.ts.map +1 -0
  283. package/dist/commands/docs/migrate/codemod.js +62 -0
  284. package/dist/commands/docs/migrate/frontmatter.d.ts +12 -0
  285. package/dist/commands/docs/migrate/frontmatter.d.ts.map +1 -0
  286. package/dist/commands/docs/migrate/frontmatter.js +55 -0
  287. package/dist/commands/docs/migrate/index.d.ts +18 -0
  288. package/dist/commands/docs/migrate/index.d.ts.map +1 -0
  289. package/dist/commands/docs/migrate/index.js +138 -0
  290. package/dist/commands/docs/nav/contents.d.ts +14 -0
  291. package/dist/commands/docs/nav/contents.d.ts.map +1 -0
  292. package/dist/commands/docs/nav/contents.js +106 -0
  293. package/dist/commands/docs/nav/index.d.ts +3 -0
  294. package/dist/commands/docs/nav/index.d.ts.map +1 -0
  295. package/dist/commands/docs/nav/index.js +7 -0
  296. package/dist/commands/docs/nav/sync.d.ts +20 -0
  297. package/dist/commands/docs/nav/sync.d.ts.map +1 -0
  298. package/dist/commands/docs/nav/sync.js +92 -0
  299. package/dist/commands/doctor/index.d.ts +32 -0
  300. package/dist/commands/doctor/index.d.ts.map +1 -0
  301. package/dist/commands/doctor/index.js +373 -0
  302. package/dist/commands/index-cmd/index.d.ts +11 -0
  303. package/dist/commands/index-cmd/index.d.ts.map +1 -0
  304. package/dist/commands/index-cmd/index.js +62 -0
  305. package/dist/commands/index-cmd/thin-index.d.ts +19 -0
  306. package/dist/commands/index-cmd/thin-index.d.ts.map +1 -0
  307. package/dist/commands/index-cmd/thin-index.js +330 -0
  308. package/dist/commands/index.d.ts +3 -0
  309. package/dist/commands/index.d.ts.map +1 -0
  310. package/dist/commands/index.js +38 -0
  311. package/dist/commands/init/detect-docs.d.ts +11 -0
  312. package/dist/commands/init/detect-docs.d.ts.map +1 -0
  313. package/dist/commands/init/detect-docs.js +51 -0
  314. package/dist/commands/init/gitignore.d.ts +6 -0
  315. package/dist/commands/init/gitignore.d.ts.map +1 -0
  316. package/dist/commands/init/gitignore.js +41 -0
  317. package/dist/commands/init/index.d.ts +70 -0
  318. package/dist/commands/init/index.d.ts.map +1 -0
  319. package/dist/commands/init/index.js +570 -0
  320. package/dist/commands/init/tools/core/index.d.ts +12 -0
  321. package/dist/commands/init/tools/core/index.d.ts.map +1 -0
  322. package/dist/commands/init/tools/core/index.js +67 -0
  323. package/dist/commands/init/tools/core/install-core.d.ts +30 -0
  324. package/dist/commands/init/tools/core/install-core.d.ts.map +1 -0
  325. package/dist/commands/init/tools/core/install-core.js +50 -0
  326. package/dist/commands/init/tools/docs/index.d.ts +17 -0
  327. package/dist/commands/init/tools/docs/index.d.ts.map +1 -0
  328. package/dist/commands/init/tools/docs/index.js +110 -0
  329. package/dist/commands/init/tools/docs/install-docs.d.ts +23 -0
  330. package/dist/commands/init/tools/docs/install-docs.d.ts.map +1 -0
  331. package/dist/commands/init/tools/docs/install-docs.js +58 -0
  332. package/dist/commands/init/tools/ideas/index.d.ts +16 -0
  333. package/dist/commands/init/tools/ideas/index.d.ts.map +1 -0
  334. package/dist/commands/init/tools/ideas/index.js +94 -0
  335. package/dist/commands/init/tools/ideas/install-ideas.d.ts +25 -0
  336. package/dist/commands/init/tools/ideas/install-ideas.d.ts.map +1 -0
  337. package/dist/commands/init/tools/ideas/install-ideas.js +78 -0
  338. package/dist/commands/init/tools/index.d.ts +51 -0
  339. package/dist/commands/init/tools/index.d.ts.map +1 -0
  340. package/dist/commands/init/tools/index.js +387 -0
  341. package/dist/commands/init/tools/project-management/index.d.ts +12 -0
  342. package/dist/commands/init/tools/project-management/index.d.ts.map +1 -0
  343. package/dist/commands/init/tools/project-management/index.js +61 -0
  344. package/dist/commands/init/tools/project-management/install-project-management.d.ts +22 -0
  345. package/dist/commands/init/tools/project-management/install-project-management.d.ts.map +1 -0
  346. package/dist/commands/init/tools/project-management/install-project-management.js +52 -0
  347. package/dist/commands/init/tools/research/index.d.ts +17 -0
  348. package/dist/commands/init/tools/research/index.d.ts.map +1 -0
  349. package/dist/commands/init/tools/research/index.js +110 -0
  350. package/dist/commands/init/tools/research/install-research.d.ts +23 -0
  351. package/dist/commands/init/tools/research/install-research.d.ts.map +1 -0
  352. package/dist/commands/init/tools/research/install-research.js +52 -0
  353. package/dist/commands/init/tools/shared/copy-helpers.d.ts +12 -0
  354. package/dist/commands/init/tools/shared/copy-helpers.d.ts.map +1 -0
  355. package/dist/commands/init/tools/shared/copy-helpers.js +52 -0
  356. package/dist/commands/init/tools/shared/skill-manifest.d.ts +22 -0
  357. package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -0
  358. package/dist/commands/init/tools/shared/skill-manifest.js +102 -0
  359. package/dist/commands/init/tools/shared/version.d.ts +3 -0
  360. package/dist/commands/init/tools/shared/version.d.ts.map +1 -0
  361. package/dist/commands/init/tools/shared/version.js +27 -0
  362. package/dist/commands/init/tools/utility/index.d.ts +17 -0
  363. package/dist/commands/init/tools/utility/index.d.ts.map +1 -0
  364. package/dist/commands/init/tools/utility/index.js +109 -0
  365. package/dist/commands/init/tools/utility/install-utility.d.ts +20 -0
  366. package/dist/commands/init/tools/utility/install-utility.d.ts.map +1 -0
  367. package/dist/commands/init/tools/utility/install-utility.js +35 -0
  368. package/dist/commands/init/tools/workflows/index.d.ts +14 -0
  369. package/dist/commands/init/tools/workflows/index.d.ts.map +1 -0
  370. package/dist/commands/init/tools/workflows/index.js +84 -0
  371. package/dist/commands/init/tools/workflows/install-workflows.d.ts +32 -0
  372. package/dist/commands/init/tools/workflows/install-workflows.d.ts.map +1 -0
  373. package/dist/commands/init/tools/workflows/install-workflows.js +135 -0
  374. package/dist/commands/instructions/index.d.ts +3 -0
  375. package/dist/commands/instructions/index.d.ts.map +1 -0
  376. package/dist/commands/instructions/index.js +9 -0
  377. package/dist/commands/instructions/instructions.types.d.ts +52 -0
  378. package/dist/commands/instructions/instructions.types.d.ts.map +1 -0
  379. package/dist/commands/instructions/instructions.types.js +1 -0
  380. package/dist/commands/instructions/instructions.utils.d.ts +13 -0
  381. package/dist/commands/instructions/instructions.utils.d.ts.map +1 -0
  382. package/dist/commands/instructions/instructions.utils.js +211 -0
  383. package/dist/commands/instructions/sync/sync.d.ts +4 -0
  384. package/dist/commands/instructions/sync/sync.d.ts.map +1 -0
  385. package/dist/commands/instructions/sync/sync.js +142 -0
  386. package/dist/commands/instructions/validate/validate.d.ts +4 -0
  387. package/dist/commands/instructions/validate/validate.d.ts.map +1 -0
  388. package/dist/commands/instructions/validate/validate.js +53 -0
  389. package/dist/commands/internal/index.d.ts +3 -0
  390. package/dist/commands/internal/index.d.ts.map +1 -0
  391. package/dist/commands/internal/index.js +7 -0
  392. package/dist/commands/internal/validate-oat-skills.d.ts +10 -0
  393. package/dist/commands/internal/validate-oat-skills.d.ts.map +1 -0
  394. package/dist/commands/internal/validate-oat-skills.js +66 -0
  395. package/dist/commands/local/apply.d.ts +6 -0
  396. package/dist/commands/local/apply.d.ts.map +1 -0
  397. package/dist/commands/local/apply.js +56 -0
  398. package/dist/commands/local/expand.d.ts +8 -0
  399. package/dist/commands/local/expand.d.ts.map +1 -0
  400. package/dist/commands/local/expand.js +83 -0
  401. package/dist/commands/local/index.d.ts +3 -0
  402. package/dist/commands/local/index.d.ts.map +1 -0
  403. package/dist/commands/local/index.js +248 -0
  404. package/dist/commands/local/manage.d.ts +18 -0
  405. package/dist/commands/local/manage.d.ts.map +1 -0
  406. package/dist/commands/local/manage.js +66 -0
  407. package/dist/commands/local/status.d.ts +7 -0
  408. package/dist/commands/local/status.d.ts.map +1 -0
  409. package/dist/commands/local/status.js +46 -0
  410. package/dist/commands/local/sync.d.ts +20 -0
  411. package/dist/commands/local/sync.d.ts.map +1 -0
  412. package/dist/commands/local/sync.js +40 -0
  413. package/dist/commands/project/archive/archive-utils.d.ts +70 -0
  414. package/dist/commands/project/archive/archive-utils.d.ts.map +1 -0
  415. package/dist/commands/project/archive/archive-utils.js +236 -0
  416. package/dist/commands/project/archive/index.d.ts +20 -0
  417. package/dist/commands/project/archive/index.d.ts.map +1 -0
  418. package/dist/commands/project/archive/index.js +217 -0
  419. package/dist/commands/project/index.d.ts +3 -0
  420. package/dist/commands/project/index.d.ts.map +1 -0
  421. package/dist/commands/project/index.js +15 -0
  422. package/dist/commands/project/new/index.d.ts +17 -0
  423. package/dist/commands/project/new/index.d.ts.map +1 -0
  424. package/dist/commands/project/new/index.js +76 -0
  425. package/dist/commands/project/new/scaffold.d.ts +24 -0
  426. package/dist/commands/project/new/scaffold.d.ts.map +1 -0
  427. package/dist/commands/project/new/scaffold.js +177 -0
  428. package/dist/commands/project/open/index.d.ts +26 -0
  429. package/dist/commands/project/open/index.d.ts.map +1 -0
  430. package/dist/commands/project/open/index.js +139 -0
  431. package/dist/commands/project/pause/index.d.ts +27 -0
  432. package/dist/commands/project/pause/index.d.ts.map +1 -0
  433. package/dist/commands/project/pause/index.js +120 -0
  434. package/dist/commands/project/set-mode/index.d.ts +14 -0
  435. package/dist/commands/project/set-mode/index.d.ts.map +1 -0
  436. package/dist/commands/project/set-mode/index.js +115 -0
  437. package/dist/commands/providers/index.d.ts +4 -0
  438. package/dist/commands/providers/index.d.ts.map +1 -0
  439. package/dist/commands/providers/index.js +11 -0
  440. package/dist/commands/providers/inspect/inspect.d.ts +4 -0
  441. package/dist/commands/providers/inspect/inspect.d.ts.map +1 -0
  442. package/dist/commands/providers/inspect/inspect.js +156 -0
  443. package/dist/commands/providers/list/list.d.ts +4 -0
  444. package/dist/commands/providers/list/list.d.ts.map +1 -0
  445. package/dist/commands/providers/list/list.js +163 -0
  446. package/dist/commands/providers/providers.types.d.ts +63 -0
  447. package/dist/commands/providers/providers.types.d.ts.map +1 -0
  448. package/dist/commands/providers/providers.types.js +1 -0
  449. package/dist/commands/providers/set/index.d.ts +4 -0
  450. package/dist/commands/providers/set/index.d.ts.map +1 -0
  451. package/dist/commands/providers/set/index.js +138 -0
  452. package/dist/commands/remove/index.d.ts +3 -0
  453. package/dist/commands/remove/index.d.ts.map +1 -0
  454. package/dist/commands/remove/index.js +9 -0
  455. package/dist/commands/remove/skill/index.d.ts +2 -0
  456. package/dist/commands/remove/skill/index.d.ts.map +1 -0
  457. package/dist/commands/remove/skill/index.js +1 -0
  458. package/dist/commands/remove/skill/remove-skill.d.ts +23 -0
  459. package/dist/commands/remove/skill/remove-skill.d.ts.map +1 -0
  460. package/dist/commands/remove/skill/remove-skill.js +231 -0
  461. package/dist/commands/remove/skills/index.d.ts +2 -0
  462. package/dist/commands/remove/skills/index.d.ts.map +1 -0
  463. package/dist/commands/remove/skills/index.js +1 -0
  464. package/dist/commands/remove/skills/remove-skills.d.ts +14 -0
  465. package/dist/commands/remove/skills/remove-skills.d.ts.map +1 -0
  466. package/dist/commands/remove/skills/remove-skills.js +98 -0
  467. package/dist/commands/repo/index.d.ts +3 -0
  468. package/dist/commands/repo/index.d.ts.map +1 -0
  469. package/dist/commands/repo/index.js +7 -0
  470. package/dist/commands/repo/pr-comments/collect/collect-comments.d.ts +9 -0
  471. package/dist/commands/repo/pr-comments/collect/collect-comments.d.ts.map +1 -0
  472. package/dist/commands/repo/pr-comments/collect/collect-comments.js +284 -0
  473. package/dist/commands/repo/pr-comments/collect/graphql-queries.d.ts +3 -0
  474. package/dist/commands/repo/pr-comments/collect/graphql-queries.d.ts.map +1 -0
  475. package/dist/commands/repo/pr-comments/collect/graphql-queries.js +56 -0
  476. package/dist/commands/repo/pr-comments/collect/index.d.ts +4 -0
  477. package/dist/commands/repo/pr-comments/collect/index.d.ts.map +1 -0
  478. package/dist/commands/repo/pr-comments/collect/index.js +25 -0
  479. package/dist/commands/repo/pr-comments/collect/pr-comments.types.d.ts +62 -0
  480. package/dist/commands/repo/pr-comments/collect/pr-comments.types.d.ts.map +1 -0
  481. package/dist/commands/repo/pr-comments/collect/pr-comments.types.js +1 -0
  482. package/dist/commands/repo/pr-comments/index.d.ts +3 -0
  483. package/dist/commands/repo/pr-comments/index.d.ts.map +1 -0
  484. package/dist/commands/repo/pr-comments/index.js +9 -0
  485. package/dist/commands/repo/pr-comments/triage-collection/index.d.ts +4 -0
  486. package/dist/commands/repo/pr-comments/triage-collection/index.d.ts.map +1 -0
  487. package/dist/commands/repo/pr-comments/triage-collection/index.js +21 -0
  488. package/dist/commands/repo/pr-comments/triage-collection/triage-comments.d.ts +13 -0
  489. package/dist/commands/repo/pr-comments/triage-collection/triage-comments.d.ts.map +1 -0
  490. package/dist/commands/repo/pr-comments/triage-collection/triage-comments.js +81 -0
  491. package/dist/commands/shared/adopt-stray.d.ts +22 -0
  492. package/dist/commands/shared/adopt-stray.d.ts.map +1 -0
  493. package/dist/commands/shared/adopt-stray.js +135 -0
  494. package/dist/commands/shared/agents-md.d.ts +18 -0
  495. package/dist/commands/shared/agents-md.d.ts.map +1 -0
  496. package/dist/commands/shared/agents-md.js +81 -0
  497. package/dist/commands/shared/codex-strays.d.ts +16 -0
  498. package/dist/commands/shared/codex-strays.d.ts.map +1 -0
  499. package/dist/commands/shared/codex-strays.js +116 -0
  500. package/dist/commands/shared/frontmatter-write.d.ts +8 -0
  501. package/dist/commands/shared/frontmatter-write.d.ts.map +1 -0
  502. package/dist/commands/shared/frontmatter-write.js +27 -0
  503. package/dist/commands/shared/frontmatter.d.ts +6 -0
  504. package/dist/commands/shared/frontmatter.d.ts.map +1 -0
  505. package/dist/commands/shared/frontmatter.js +35 -0
  506. package/dist/commands/shared/messages.d.ts +2 -0
  507. package/dist/commands/shared/messages.d.ts.map +1 -0
  508. package/dist/commands/shared/messages.js +1 -0
  509. package/dist/commands/shared/oat-paths.d.ts +2 -0
  510. package/dist/commands/shared/oat-paths.d.ts.map +1 -0
  511. package/dist/commands/shared/oat-paths.js +13 -0
  512. package/dist/commands/shared/shared.prompts.d.ts +21 -0
  513. package/dist/commands/shared/shared.prompts.d.ts.map +1 -0
  514. package/dist/commands/shared/shared.prompts.js +107 -0
  515. package/dist/commands/shared/shared.utils.d.ts +6 -0
  516. package/dist/commands/shared/shared.utils.d.ts.map +1 -0
  517. package/dist/commands/shared/shared.utils.js +9 -0
  518. package/dist/commands/state/generate.d.ts +21 -0
  519. package/dist/commands/state/generate.d.ts.map +1 -0
  520. package/dist/commands/state/generate.js +440 -0
  521. package/dist/commands/state/index.d.ts +11 -0
  522. package/dist/commands/state/index.d.ts.map +1 -0
  523. package/dist/commands/state/index.js +58 -0
  524. package/dist/commands/status/index.d.ts +44 -0
  525. package/dist/commands/status/index.d.ts.map +1 -0
  526. package/dist/commands/status/index.js +340 -0
  527. package/dist/commands/sync/apply.d.ts +4 -0
  528. package/dist/commands/sync/apply.d.ts.map +1 -0
  529. package/dist/commands/sync/apply.js +100 -0
  530. package/dist/commands/sync/dry-run.d.ts +4 -0
  531. package/dist/commands/sync/dry-run.d.ts.map +1 -0
  532. package/dist/commands/sync/dry-run.js +74 -0
  533. package/dist/commands/sync/index.d.ts +4 -0
  534. package/dist/commands/sync/index.d.ts.map +1 -0
  535. package/dist/commands/sync/index.js +225 -0
  536. package/dist/commands/sync/sync.types.d.ts +80 -0
  537. package/dist/commands/sync/sync.types.d.ts.map +1 -0
  538. package/dist/commands/sync/sync.types.js +1 -0
  539. package/dist/commands/sync/sync.utils.d.ts +3 -0
  540. package/dist/commands/sync/sync.utils.d.ts.map +1 -0
  541. package/dist/commands/sync/sync.utils.js +8 -0
  542. package/dist/commands/tools/index.d.ts +3 -0
  543. package/dist/commands/tools/index.d.ts.map +1 -0
  544. package/dist/commands/tools/index.js +17 -0
  545. package/dist/commands/tools/info/index.d.ts +4 -0
  546. package/dist/commands/tools/info/index.d.ts.map +1 -0
  547. package/dist/commands/tools/info/index.js +74 -0
  548. package/dist/commands/tools/info/info-tool.d.ts +21 -0
  549. package/dist/commands/tools/info/info-tool.d.ts.map +1 -0
  550. package/dist/commands/tools/info/info-tool.js +52 -0
  551. package/dist/commands/tools/install/index.d.ts +4 -0
  552. package/dist/commands/tools/install/index.d.ts.map +1 -0
  553. package/dist/commands/tools/install/index.js +34 -0
  554. package/dist/commands/tools/list/index.d.ts +4 -0
  555. package/dist/commands/tools/list/index.d.ts.map +1 -0
  556. package/dist/commands/tools/list/index.js +25 -0
  557. package/dist/commands/tools/list/list-tools.d.ts +13 -0
  558. package/dist/commands/tools/list/list-tools.d.ts.map +1 -0
  559. package/dist/commands/tools/list/list-tools.js +43 -0
  560. package/dist/commands/tools/outdated/index.d.ts +4 -0
  561. package/dist/commands/tools/outdated/index.d.ts.map +1 -0
  562. package/dist/commands/tools/outdated/index.js +25 -0
  563. package/dist/commands/tools/outdated/outdated-tools.d.ts +13 -0
  564. package/dist/commands/tools/outdated/outdated-tools.d.ts.map +1 -0
  565. package/dist/commands/tools/outdated/outdated-tools.js +43 -0
  566. package/dist/commands/tools/remove/index.d.ts +5 -0
  567. package/dist/commands/tools/remove/index.d.ts.map +1 -0
  568. package/dist/commands/tools/remove/index.js +122 -0
  569. package/dist/commands/tools/remove/remove-tools.d.ts +31 -0
  570. package/dist/commands/tools/remove/remove-tools.d.ts.map +1 -0
  571. package/dist/commands/tools/remove/remove-tools.js +41 -0
  572. package/dist/commands/tools/shared/auto-sync.d.ts +16 -0
  573. package/dist/commands/tools/shared/auto-sync.d.ts.map +1 -0
  574. package/dist/commands/tools/shared/auto-sync.js +17 -0
  575. package/dist/commands/tools/shared/scan-tools.d.ts +18 -0
  576. package/dist/commands/tools/shared/scan-tools.d.ts.map +1 -0
  577. package/dist/commands/tools/shared/scan-tools.js +128 -0
  578. package/dist/commands/tools/shared/types.d.ts +12 -0
  579. package/dist/commands/tools/shared/types.d.ts.map +1 -0
  580. package/dist/commands/tools/shared/types.js +1 -0
  581. package/dist/commands/tools/update/index.d.ts +8 -0
  582. package/dist/commands/tools/update/index.d.ts.map +1 -0
  583. package/dist/commands/tools/update/index.js +149 -0
  584. package/dist/commands/tools/update/update-tools.d.ts +29 -0
  585. package/dist/commands/tools/update/update-tools.d.ts.map +1 -0
  586. package/dist/commands/tools/update/update-tools.js +148 -0
  587. package/dist/config/index.d.ts +4 -0
  588. package/dist/config/index.d.ts.map +1 -0
  589. package/dist/config/index.js +2 -0
  590. package/dist/config/oat-config.d.ts +61 -0
  591. package/dist/config/oat-config.d.ts.map +1 -0
  592. package/dist/config/oat-config.js +319 -0
  593. package/dist/config/runtime.d.ts +2 -0
  594. package/dist/config/runtime.d.ts.map +1 -0
  595. package/dist/config/runtime.js +3 -0
  596. package/dist/config/sync-config.d.ts +49 -0
  597. package/dist/config/sync-config.d.ts.map +1 -0
  598. package/dist/config/sync-config.js +94 -0
  599. package/dist/drift/detector.d.ts +4 -0
  600. package/dist/drift/detector.d.ts.map +1 -0
  601. package/dist/drift/detector.js +69 -0
  602. package/dist/drift/drift.types.d.ts +17 -0
  603. package/dist/drift/drift.types.d.ts.map +1 -0
  604. package/dist/drift/drift.types.js +1 -0
  605. package/dist/drift/index.d.ts +4 -0
  606. package/dist/drift/index.d.ts.map +1 -0
  607. package/dist/drift/index.js +2 -0
  608. package/dist/drift/strays.d.ts +7 -0
  609. package/dist/drift/strays.d.ts.map +1 -0
  610. package/dist/drift/strays.js +153 -0
  611. package/dist/engine/compute-plan.d.ts +16 -0
  612. package/dist/engine/compute-plan.d.ts.map +1 -0
  613. package/dist/engine/compute-plan.js +234 -0
  614. package/dist/engine/engine.types.d.ts +28 -0
  615. package/dist/engine/engine.types.d.ts.map +1 -0
  616. package/dist/engine/engine.types.js +8 -0
  617. package/dist/engine/execute-plan.d.ts +5 -0
  618. package/dist/engine/execute-plan.d.ts.map +1 -0
  619. package/dist/engine/execute-plan.js +141 -0
  620. package/dist/engine/hook.d.ts +23 -0
  621. package/dist/engine/hook.d.ts.map +1 -0
  622. package/dist/engine/hook.js +254 -0
  623. package/dist/engine/index.d.ts +9 -0
  624. package/dist/engine/index.d.ts.map +1 -0
  625. package/dist/engine/index.js +6 -0
  626. package/dist/engine/markers.d.ts +6 -0
  627. package/dist/engine/markers.d.ts.map +1 -0
  628. package/dist/engine/markers.js +24 -0
  629. package/dist/engine/scanner.d.ts +11 -0
  630. package/dist/engine/scanner.d.ts.map +1 -0
  631. package/dist/engine/scanner.js +65 -0
  632. package/dist/engine/test-helpers.d.ts +3 -0
  633. package/dist/engine/test-helpers.d.ts.map +1 -0
  634. package/dist/engine/test-helpers.js +31 -0
  635. package/dist/errors/cli-error.d.ts +5 -0
  636. package/dist/errors/cli-error.d.ts.map +1 -0
  637. package/dist/errors/cli-error.js +8 -0
  638. package/dist/errors/index.d.ts +2 -0
  639. package/dist/errors/index.d.ts.map +1 -0
  640. package/dist/errors/index.js +1 -0
  641. package/dist/fs/assets.d.ts +2 -0
  642. package/dist/fs/assets.d.ts.map +1 -0
  643. package/dist/fs/assets.js +22 -0
  644. package/dist/fs/index.d.ts +4 -0
  645. package/dist/fs/index.d.ts.map +1 -0
  646. package/dist/fs/index.js +3 -0
  647. package/dist/fs/io.d.ts +9 -0
  648. package/dist/fs/io.d.ts.map +1 -0
  649. package/dist/fs/io.js +74 -0
  650. package/dist/fs/paths.d.ts +9 -0
  651. package/dist/fs/paths.d.ts.map +1 -0
  652. package/dist/fs/paths.js +42 -0
  653. package/dist/index.d.ts +4 -0
  654. package/dist/index.d.ts.map +1 -0
  655. package/dist/index.js +48 -0
  656. package/dist/manifest/hash.d.ts +5 -0
  657. package/dist/manifest/hash.d.ts.map +1 -0
  658. package/dist/manifest/hash.js +75 -0
  659. package/dist/manifest/index.d.ts +5 -0
  660. package/dist/manifest/index.d.ts.map +1 -0
  661. package/dist/manifest/index.js +3 -0
  662. package/dist/manifest/manager.d.ts +8 -0
  663. package/dist/manifest/manager.d.ts.map +1 -0
  664. package/dist/manifest/manager.js +86 -0
  665. package/dist/manifest/manifest.types.d.ts +157 -0
  666. package/dist/manifest/manifest.types.d.ts.map +1 -0
  667. package/dist/manifest/manifest.types.js +56 -0
  668. package/dist/providers/claude/adapter.d.ts +3 -0
  669. package/dist/providers/claude/adapter.d.ts.map +1 -0
  670. package/dist/providers/claude/adapter.js +20 -0
  671. package/dist/providers/claude/index.d.ts +3 -0
  672. package/dist/providers/claude/index.d.ts.map +1 -0
  673. package/dist/providers/claude/index.js +2 -0
  674. package/dist/providers/claude/paths.d.ts +4 -0
  675. package/dist/providers/claude/paths.d.ts.map +1 -0
  676. package/dist/providers/claude/paths.js +38 -0
  677. package/dist/providers/claude/rule-transform.d.ts +3 -0
  678. package/dist/providers/claude/rule-transform.d.ts.map +1 -0
  679. package/dist/providers/claude/rule-transform.js +22 -0
  680. package/dist/providers/codex/adapter.d.ts +3 -0
  681. package/dist/providers/codex/adapter.d.ts.map +1 -0
  682. package/dist/providers/codex/adapter.js +20 -0
  683. package/dist/providers/codex/codec/config-merge.d.ts +17 -0
  684. package/dist/providers/codex/codec/config-merge.d.ts.map +1 -0
  685. package/dist/providers/codex/codec/config-merge.js +61 -0
  686. package/dist/providers/codex/codec/export-to-codex.d.ts +9 -0
  687. package/dist/providers/codex/codec/export-to-codex.d.ts.map +1 -0
  688. package/dist/providers/codex/codec/export-to-codex.js +45 -0
  689. package/dist/providers/codex/codec/import-from-codex.d.ts +9 -0
  690. package/dist/providers/codex/codec/import-from-codex.d.ts.map +1 -0
  691. package/dist/providers/codex/codec/import-from-codex.js +52 -0
  692. package/dist/providers/codex/codec/shared.d.ts +7 -0
  693. package/dist/providers/codex/codec/shared.d.ts.map +1 -0
  694. package/dist/providers/codex/codec/shared.js +21 -0
  695. package/dist/providers/codex/codec/sync-extension.d.ts +32 -0
  696. package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -0
  697. package/dist/providers/codex/codec/sync-extension.js +227 -0
  698. package/dist/providers/codex/index.d.ts +6 -0
  699. package/dist/providers/codex/index.d.ts.map +1 -0
  700. package/dist/providers/codex/index.js +5 -0
  701. package/dist/providers/codex/paths.d.ts +4 -0
  702. package/dist/providers/codex/paths.d.ts.map +1 -0
  703. package/dist/providers/codex/paths.js +28 -0
  704. package/dist/providers/copilot/adapter.d.ts +3 -0
  705. package/dist/providers/copilot/adapter.d.ts.map +1 -0
  706. package/dist/providers/copilot/adapter.js +30 -0
  707. package/dist/providers/copilot/index.d.ts +3 -0
  708. package/dist/providers/copilot/index.d.ts.map +1 -0
  709. package/dist/providers/copilot/index.js +2 -0
  710. package/dist/providers/copilot/paths.d.ts +4 -0
  711. package/dist/providers/copilot/paths.d.ts.map +1 -0
  712. package/dist/providers/copilot/paths.js +38 -0
  713. package/dist/providers/copilot/rule-transform.d.ts +3 -0
  714. package/dist/providers/copilot/rule-transform.d.ts.map +1 -0
  715. package/dist/providers/copilot/rule-transform.js +58 -0
  716. package/dist/providers/cursor/adapter.d.ts +3 -0
  717. package/dist/providers/cursor/adapter.d.ts.map +1 -0
  718. package/dist/providers/cursor/adapter.js +20 -0
  719. package/dist/providers/cursor/index.d.ts +3 -0
  720. package/dist/providers/cursor/index.d.ts.map +1 -0
  721. package/dist/providers/cursor/index.js +2 -0
  722. package/dist/providers/cursor/paths.d.ts +4 -0
  723. package/dist/providers/cursor/paths.d.ts.map +1 -0
  724. package/dist/providers/cursor/paths.js +38 -0
  725. package/dist/providers/cursor/rule-transform.d.ts +3 -0
  726. package/dist/providers/cursor/rule-transform.d.ts.map +1 -0
  727. package/dist/providers/cursor/rule-transform.js +48 -0
  728. package/dist/providers/gemini/adapter.d.ts +3 -0
  729. package/dist/providers/gemini/adapter.d.ts.map +1 -0
  730. package/dist/providers/gemini/adapter.js +20 -0
  731. package/dist/providers/gemini/index.d.ts +3 -0
  732. package/dist/providers/gemini/index.d.ts.map +1 -0
  733. package/dist/providers/gemini/index.js +2 -0
  734. package/dist/providers/gemini/paths.d.ts +4 -0
  735. package/dist/providers/gemini/paths.d.ts.map +1 -0
  736. package/dist/providers/gemini/paths.js +28 -0
  737. package/dist/providers/shared/adapter.types.d.ts +21 -0
  738. package/dist/providers/shared/adapter.types.d.ts.map +1 -0
  739. package/dist/providers/shared/adapter.types.js +1 -0
  740. package/dist/providers/shared/adapter.utils.d.ts +12 -0
  741. package/dist/providers/shared/adapter.utils.d.ts.map +1 -0
  742. package/dist/providers/shared/adapter.utils.js +57 -0
  743. package/dist/providers/shared/agent-codec.types.d.ts +13 -0
  744. package/dist/providers/shared/agent-codec.types.d.ts.map +1 -0
  745. package/dist/providers/shared/agent-codec.types.js +1 -0
  746. package/dist/providers/shared/index.d.ts +6 -0
  747. package/dist/providers/shared/index.d.ts.map +1 -0
  748. package/dist/providers/shared/index.js +2 -0
  749. package/dist/providers/shared/markdown-agent-codec.d.ts +5 -0
  750. package/dist/providers/shared/markdown-agent-codec.d.ts.map +1 -0
  751. package/dist/providers/shared/markdown-agent-codec.js +12 -0
  752. package/dist/release/public-package-contract.d.ts +14 -0
  753. package/dist/release/public-package-contract.d.ts.map +1 -0
  754. package/dist/release/public-package-contract.js +97 -0
  755. package/dist/rules/canonical/index.d.ts +6 -0
  756. package/dist/rules/canonical/index.d.ts.map +1 -0
  757. package/dist/rules/canonical/index.js +4 -0
  758. package/dist/rules/canonical/parse.d.ts +9 -0
  759. package/dist/rules/canonical/parse.d.ts.map +1 -0
  760. package/dist/rules/canonical/parse.js +103 -0
  761. package/dist/rules/canonical/provider-filenames.d.ts +3 -0
  762. package/dist/rules/canonical/provider-filenames.d.ts.map +1 -0
  763. package/dist/rules/canonical/provider-filenames.js +13 -0
  764. package/dist/rules/canonical/render.d.ts +5 -0
  765. package/dist/rules/canonical/render.d.ts.map +1 -0
  766. package/dist/rules/canonical/render.js +32 -0
  767. package/dist/rules/canonical/types.d.ts +16 -0
  768. package/dist/rules/canonical/types.d.ts.map +1 -0
  769. package/dist/rules/canonical/types.js +6 -0
  770. package/dist/shared/index.d.ts +3 -0
  771. package/dist/shared/index.d.ts.map +1 -0
  772. package/dist/shared/index.js +1 -0
  773. package/dist/shared/types.d.ts +10 -0
  774. package/dist/shared/types.d.ts.map +1 -0
  775. package/dist/shared/types.js +14 -0
  776. package/dist/ui/ansi.d.ts +2 -0
  777. package/dist/ui/ansi.d.ts.map +1 -0
  778. package/dist/ui/ansi.js +19 -0
  779. package/dist/ui/index.d.ts +7 -0
  780. package/dist/ui/index.d.ts.map +1 -0
  781. package/dist/ui/index.js +3 -0
  782. package/dist/ui/logger.d.ts +15 -0
  783. package/dist/ui/logger.d.ts.map +1 -0
  784. package/dist/ui/logger.js +52 -0
  785. package/dist/ui/output.d.ts +16 -0
  786. package/dist/ui/output.d.ts.map +1 -0
  787. package/dist/ui/output.js +135 -0
  788. package/dist/ui/spinner.d.ts +16 -0
  789. package/dist/ui/spinner.d.ts.map +1 -0
  790. package/dist/ui/spinner.js +46 -0
  791. package/dist/validation/index.d.ts +3 -0
  792. package/dist/validation/index.d.ts.map +1 -0
  793. package/dist/validation/index.js +1 -0
  794. package/dist/validation/skills.d.ts +10 -0
  795. package/dist/validation/skills.d.ts.map +1 -0
  796. package/dist/validation/skills.js +166 -0
  797. package/package.json +62 -0
@@ -0,0 +1,61 @@
1
+ import { CliError } from '../../../errors/index.js';
2
+ import TOML from '@iarna/toml';
3
+ import { stringifyToml } from './shared.js';
4
+ function parseConfig(content) {
5
+ if (!content || content.trim() === '') {
6
+ return {};
7
+ }
8
+ try {
9
+ const parsed = TOML.parse(content);
10
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
11
+ throw new CliError('Codex config TOML must parse to an object.');
12
+ }
13
+ return parsed;
14
+ }
15
+ catch (error) {
16
+ if (error instanceof CliError) {
17
+ throw error;
18
+ }
19
+ throw new CliError(`Failed to parse .codex/config.toml: ${error instanceof Error ? error.message : 'unknown parse error'}`);
20
+ }
21
+ }
22
+ function getObject(value) {
23
+ if (!value || typeof value !== 'object' || Array.isArray(value)) {
24
+ return {};
25
+ }
26
+ return { ...value };
27
+ }
28
+ export function mergeCodexConfig({ existingContent, desiredRoles, staleManagedRoles = [], }) {
29
+ const parsed = parseConfig(existingContent);
30
+ const features = getObject(parsed.features);
31
+ const agents = getObject(parsed.agents);
32
+ const nextConfig = {
33
+ ...parsed,
34
+ features: {
35
+ ...features,
36
+ multi_agent: true,
37
+ },
38
+ agents,
39
+ };
40
+ for (const role of desiredRoles) {
41
+ agents[role.roleName] = {
42
+ ...getObject(agents[role.roleName]),
43
+ description: role.description,
44
+ config_file: role.configFile,
45
+ };
46
+ }
47
+ const removedRoles = [];
48
+ for (const staleRole of staleManagedRoles) {
49
+ if (staleRole in agents) {
50
+ delete agents[staleRole];
51
+ removedRoles.push(staleRole);
52
+ }
53
+ }
54
+ const mergedContent = stringifyToml(nextConfig);
55
+ const changed = (existingContent ?? '').trimEnd() !== mergedContent.trimEnd();
56
+ return {
57
+ mergedContent,
58
+ changed,
59
+ removedRoles,
60
+ };
61
+ }
@@ -0,0 +1,9 @@
1
+ import type { CanonicalAgentDocument } from '../../../agents/canonical/index.js';
2
+ export interface CodexRoleExport {
3
+ roleName: string;
4
+ description: string;
5
+ configFile: string;
6
+ content: string;
7
+ }
8
+ export declare function exportCanonicalAgentToCodexRole(agent: CanonicalAgentDocument): CodexRoleExport;
9
+ //# sourceMappingURL=export-to-codex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-to-codex.d.ts","sourceRoot":"","sources":["../../../../src/providers/codex/codec/export-to-codex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAShE,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAgCD,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,sBAAsB,GAC5B,eAAe,CA2BjB"}
@@ -0,0 +1,45 @@
1
+ import { CliError } from '../../../errors/index.js';
2
+ import { sanitizeCodexRoleName, stringifyToml, withOatManagedCodexHeader, } from './shared.js';
3
+ function resolveSandboxMode(agent) {
4
+ const codexExtension = agent.extensions.x_codex;
5
+ if (codexExtension &&
6
+ typeof codexExtension === 'object' &&
7
+ codexExtension !== null &&
8
+ 'sandbox_mode' in codexExtension &&
9
+ typeof codexExtension.sandbox_mode === 'string') {
10
+ return codexExtension.sandbox_mode;
11
+ }
12
+ if (agent.readonly === true) {
13
+ return 'read-only';
14
+ }
15
+ return 'workspace-write';
16
+ }
17
+ function codexExtensionMap(agent) {
18
+ const extension = agent.extensions.x_codex;
19
+ if (!extension || typeof extension !== 'object' || Array.isArray(extension)) {
20
+ return {};
21
+ }
22
+ return { ...extension };
23
+ }
24
+ export function exportCanonicalAgentToCodexRole(agent) {
25
+ const roleName = sanitizeCodexRoleName(agent.name);
26
+ if (!roleName) {
27
+ throw new CliError('Cannot export Codex role: missing canonical agent name.');
28
+ }
29
+ const extension = codexExtensionMap(agent);
30
+ const roleObject = {
31
+ ...extension,
32
+ developer_instructions: agent.body,
33
+ sandbox_mode: resolveSandboxMode(agent),
34
+ };
35
+ if (agent.model && typeof roleObject.model !== 'string') {
36
+ roleObject.model = agent.model;
37
+ }
38
+ const tomlBody = stringifyToml(roleObject);
39
+ return {
40
+ roleName,
41
+ description: agent.description,
42
+ configFile: `agents/${roleName}.toml`,
43
+ content: withOatManagedCodexHeader(roleName, tomlBody),
44
+ };
45
+ }
@@ -0,0 +1,9 @@
1
+ import { type CanonicalAgentDocument } from '../../../agents/canonical/index.js';
2
+ export interface CodexRoleImportArgs {
3
+ roleName: string;
4
+ roleContent: string;
5
+ description?: string;
6
+ tools?: string;
7
+ }
8
+ export declare function importCanonicalAgentFromCodexRole({ roleName, roleContent, description, tools, }: CodexRoleImportArgs): CanonicalAgentDocument;
9
+ //# sourceMappingURL=import-from-codex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-from-codex.d.ts","sourceRoot":"","sources":["../../../../src/providers/codex/codec/import-from-codex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,mBAAmB,CAAC;AAyC3B,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,iCAAiC,CAAC,EAChD,QAAQ,EACR,WAAW,EACX,WAAW,EACX,KAAK,GACN,EAAE,mBAAmB,GAAG,sBAAsB,CA4B9C"}
@@ -0,0 +1,52 @@
1
+ import { parseCanonicalAgentMarkdown, } from '../../../agents/canonical/index.js';
2
+ import { CliError } from '../../../errors/index.js';
3
+ import TOML from '@iarna/toml';
4
+ import YAML from 'yaml';
5
+ import { sanitizeCodexRoleName } from './shared.js';
6
+ const DEFAULT_CANONICAL_TOOLS = 'Read, Grep, Glob, Bash';
7
+ function parseCodexRoleToml(roleContent) {
8
+ try {
9
+ const parsed = TOML.parse(roleContent);
10
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
11
+ throw new CliError('Codex role TOML must parse to an object.');
12
+ }
13
+ return parsed;
14
+ }
15
+ catch (error) {
16
+ if (error instanceof CliError) {
17
+ throw error;
18
+ }
19
+ throw new CliError(`Failed to parse Codex role TOML: ${error instanceof Error ? error.message : 'unknown parse error'}`);
20
+ }
21
+ }
22
+ function pickCodexExtension(role) {
23
+ const extension = { ...role };
24
+ delete extension.developer_instructions;
25
+ return extension;
26
+ }
27
+ function renderMarkdown(frontmatter, body) {
28
+ return `---\n${YAML.stringify(frontmatter).trimEnd()}\n---\n\n${body}`;
29
+ }
30
+ export function importCanonicalAgentFromCodexRole({ roleName, roleContent, description, tools, }) {
31
+ const normalizedRoleName = sanitizeCodexRoleName(roleName);
32
+ const parsed = parseCodexRoleToml(roleContent);
33
+ const instructions = typeof parsed.developer_instructions === 'string'
34
+ ? parsed.developer_instructions
35
+ : '';
36
+ const extension = pickCodexExtension(parsed);
37
+ const frontmatter = {
38
+ name: normalizedRoleName,
39
+ description: description && description.trim().length > 0
40
+ ? description
41
+ : `Imported from Codex role ${normalizedRoleName}`,
42
+ tools: tools ?? DEFAULT_CANONICAL_TOOLS,
43
+ };
44
+ if (parsed.sandbox_mode === 'read-only') {
45
+ frontmatter.readonly = true;
46
+ }
47
+ if (Object.keys(extension).length > 0) {
48
+ frontmatter.x_codex = extension;
49
+ }
50
+ const markdown = renderMarkdown(frontmatter, instructions);
51
+ return parseCanonicalAgentMarkdown(markdown, `codex:${normalizedRoleName}`);
52
+ }
@@ -0,0 +1,7 @@
1
+ export declare const OAT_MANAGED_ROLE_HEADER = "# oat-managed: true";
2
+ export declare const OAT_MANAGED_ROLE_NAME_PREFIX = "# oat-role: ";
3
+ export declare function sanitizeCodexRoleName(input: string): string;
4
+ export declare function isOatManagedCodexRoleFile(content: string, roleName?: string): boolean;
5
+ export declare function withOatManagedCodexHeader(roleName: string, tomlBody: string): string;
6
+ export declare function stringifyToml(object: Record<string, unknown>): string;
7
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/providers/codex/codec/shared.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAC7D,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAE3D,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAUT;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,MAAM,CAER;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAErE"}
@@ -0,0 +1,21 @@
1
+ import TOML from '@iarna/toml';
2
+ export const OAT_MANAGED_ROLE_HEADER = '# oat-managed: true';
3
+ export const OAT_MANAGED_ROLE_NAME_PREFIX = '# oat-role: ';
4
+ export function sanitizeCodexRoleName(input) {
5
+ return input.trim().replace(/\.md$/i, '');
6
+ }
7
+ export function isOatManagedCodexRoleFile(content, roleName) {
8
+ if (!content.includes(OAT_MANAGED_ROLE_HEADER)) {
9
+ return false;
10
+ }
11
+ if (!roleName) {
12
+ return true;
13
+ }
14
+ return content.includes(`${OAT_MANAGED_ROLE_NAME_PREFIX}${roleName}`);
15
+ }
16
+ export function withOatManagedCodexHeader(roleName, tomlBody) {
17
+ return `${OAT_MANAGED_ROLE_HEADER}\n${OAT_MANAGED_ROLE_NAME_PREFIX}${roleName}\n${tomlBody}`;
18
+ }
19
+ export function stringifyToml(object) {
20
+ return TOML.stringify(object);
21
+ }
@@ -0,0 +1,32 @@
1
+ import type { CanonicalEntry } from '../../../engine/index.js';
2
+ export type CodexExtensionAction = 'create' | 'update' | 'remove' | 'skip';
3
+ export type CodexExtensionTarget = 'role' | 'config';
4
+ export interface CodexExtensionOperation {
5
+ action: CodexExtensionAction;
6
+ target: CodexExtensionTarget;
7
+ path: string;
8
+ reason: string;
9
+ roleName?: string;
10
+ }
11
+ export interface CodexExtensionWriteOperation extends CodexExtensionOperation {
12
+ content?: string;
13
+ }
14
+ export interface CodexExtensionPlan {
15
+ operations: CodexExtensionWriteOperation[];
16
+ managedRoles: string[];
17
+ aggregateConfigHash: string;
18
+ }
19
+ export interface CodexExtensionApplyResult {
20
+ applied: number;
21
+ failed: number;
22
+ skipped: number;
23
+ }
24
+ export declare function computeCodexProjectExtensionPlan(scopeRoot: string, canonicalEntries: CanonicalEntry[]): Promise<CodexExtensionPlan>;
25
+ export declare function applyCodexProjectExtensionPlan(scopeRoot: string, plan: CodexExtensionPlan): Promise<CodexExtensionApplyResult>;
26
+ export declare function hasCodexExtensionChanges(plan: CodexExtensionPlan): boolean;
27
+ export declare function summarizeCodexExtension(plan: CodexExtensionPlan): {
28
+ plannedOperations: number;
29
+ skipped: number;
30
+ };
31
+ export declare function toCodexExtensionOperations(plan: CodexExtensionPlan): CodexExtensionOperation[];
32
+ //# sourceMappingURL=sync-extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-extension.d.ts","sourceRoot":"","sources":["../../../../src/providers/codex/codec/sync-extension.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAQpD,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAC3E,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,MAAM,EAAE,oBAAoB,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,4BAA6B,SAAQ,uBAAuB;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,4BAA4B,EAAE,CAAC;IAC3C,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAuID,wBAAsB,gCAAgC,CACpD,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,cAAc,EAAE,GACjC,OAAO,CAAC,kBAAkB,CAAC,CAuG7B;AAED,wBAAsB,8BAA8B,CAClD,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,yBAAyB,CAAC,CA6BpC;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAE1E;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,kBAAkB,GAAG;IACjE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CAaA;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,kBAAkB,GACvB,uBAAuB,EAAE,CAQ3B"}
@@ -0,0 +1,227 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { readFile, rm, writeFile } from 'node:fs/promises';
3
+ import { dirname, join, relative, resolve } from 'node:path';
4
+ import { parseCanonicalAgentFile } from '../../../agents/canonical/index.js';
5
+ import { ensureDir, fileExists } from '../../../fs/io.js';
6
+ import TOML from '@iarna/toml';
7
+ import { mergeCodexConfig } from './config-merge.js';
8
+ import { exportCanonicalAgentToCodexRole } from './export-to-codex.js';
9
+ import { isOatManagedCodexRoleFile } from './shared.js';
10
+ function hashContent(content) {
11
+ return createHash('sha256').update(content).digest('hex');
12
+ }
13
+ function configPath(scopeRoot) {
14
+ return join(scopeRoot, '.codex', 'config.toml');
15
+ }
16
+ function toRelativePath(scopeRoot, absolutePath) {
17
+ return relative(scopeRoot, absolutePath).replaceAll('\\', '/');
18
+ }
19
+ async function readOptionalFile(path) {
20
+ if (!(await fileExists(path))) {
21
+ return null;
22
+ }
23
+ return readFile(path, 'utf8');
24
+ }
25
+ function normalizeManagedRolesConfig(desiredRoles) {
26
+ return desiredRoles.map((role) => ({
27
+ roleName: role.roleName,
28
+ description: role.description,
29
+ configFile: role.configFile,
30
+ }));
31
+ }
32
+ async function desiredRolesFromCanonical(canonicalEntries, scopeRoot) {
33
+ const roles = [];
34
+ for (const entry of canonicalEntries) {
35
+ if (entry.type !== 'agent' ||
36
+ !entry.isFile ||
37
+ !entry.name.endsWith('.md')) {
38
+ continue;
39
+ }
40
+ const parsed = await parseCanonicalAgentFile(entry.canonicalPath);
41
+ const exported = exportCanonicalAgentToCodexRole(parsed);
42
+ roles.push({
43
+ roleName: exported.roleName,
44
+ description: exported.description,
45
+ configFile: exported.configFile,
46
+ rolePath: join(scopeRoot, '.codex', exported.configFile),
47
+ content: exported.content,
48
+ });
49
+ }
50
+ return roles.sort((left, right) => left.roleName.localeCompare(right.roleName));
51
+ }
52
+ function parseConfigAgentTable(content) {
53
+ if (!content || content.trim() === '') {
54
+ return {};
55
+ }
56
+ try {
57
+ const parsed = TOML.parse(content);
58
+ const agents = parsed.agents;
59
+ if (!agents || typeof agents !== 'object' || Array.isArray(agents)) {
60
+ return {};
61
+ }
62
+ const normalized = {};
63
+ for (const [roleName, roleConfig] of Object.entries(agents)) {
64
+ if (!roleConfig ||
65
+ typeof roleConfig !== 'object' ||
66
+ Array.isArray(roleConfig)) {
67
+ continue;
68
+ }
69
+ normalized[roleName] = roleConfig;
70
+ }
71
+ return normalized;
72
+ }
73
+ catch {
74
+ return {};
75
+ }
76
+ }
77
+ async function collectStaleManagedRoles(scopeRoot, existingConfigContent, desiredRoleNames) {
78
+ const agents = parseConfigAgentTable(existingConfigContent);
79
+ const stale = [];
80
+ for (const [roleName, roleConfig] of Object.entries(agents)) {
81
+ if (desiredRoleNames.has(roleName)) {
82
+ continue;
83
+ }
84
+ const configFile = roleConfig.config_file;
85
+ if (typeof configFile !== 'string' || !configFile.startsWith('agents/')) {
86
+ continue;
87
+ }
88
+ const rolePath = join(scopeRoot, '.codex', configFile);
89
+ const roleContent = await readOptionalFile(rolePath);
90
+ if (!roleContent || !isOatManagedCodexRoleFile(roleContent, roleName)) {
91
+ continue;
92
+ }
93
+ stale.push(roleName);
94
+ }
95
+ return stale.sort((left, right) => left.localeCompare(right));
96
+ }
97
+ export async function computeCodexProjectExtensionPlan(scopeRoot, canonicalEntries) {
98
+ const desiredRoles = await desiredRolesFromCanonical(canonicalEntries, scopeRoot);
99
+ const desiredRoleNames = new Set(desiredRoles.map((role) => role.roleName));
100
+ const existingConfigPath = configPath(scopeRoot);
101
+ const existingConfigContent = await readOptionalFile(existingConfigPath);
102
+ const staleRoles = await collectStaleManagedRoles(scopeRoot, existingConfigContent, desiredRoleNames);
103
+ const operations = [];
104
+ for (const role of desiredRoles) {
105
+ const existingRoleContent = await readOptionalFile(role.rolePath);
106
+ if (existingRoleContent === null) {
107
+ operations.push({
108
+ action: 'create',
109
+ target: 'role',
110
+ path: toRelativePath(scopeRoot, role.rolePath),
111
+ reason: 'managed role file missing',
112
+ roleName: role.roleName,
113
+ content: role.content,
114
+ });
115
+ continue;
116
+ }
117
+ if (existingRoleContent.trimEnd() !== role.content.trimEnd()) {
118
+ operations.push({
119
+ action: 'update',
120
+ target: 'role',
121
+ path: toRelativePath(scopeRoot, role.rolePath),
122
+ reason: 'managed role file differs from canonical export',
123
+ roleName: role.roleName,
124
+ content: role.content,
125
+ });
126
+ continue;
127
+ }
128
+ operations.push({
129
+ action: 'skip',
130
+ target: 'role',
131
+ path: toRelativePath(scopeRoot, role.rolePath),
132
+ reason: 'managed role file already in sync',
133
+ roleName: role.roleName,
134
+ });
135
+ }
136
+ for (const staleRole of staleRoles) {
137
+ const staleRolePath = join(scopeRoot, '.codex', 'agents', `${staleRole}.toml`);
138
+ const staleRoleContent = await readOptionalFile(staleRolePath);
139
+ if (staleRoleContent &&
140
+ isOatManagedCodexRoleFile(staleRoleContent, staleRole)) {
141
+ operations.push({
142
+ action: 'remove',
143
+ target: 'role',
144
+ path: toRelativePath(scopeRoot, staleRolePath),
145
+ reason: 'stale managed role removed',
146
+ roleName: staleRole,
147
+ });
148
+ }
149
+ }
150
+ const configMerge = mergeCodexConfig({
151
+ existingContent: existingConfigContent,
152
+ desiredRoles: normalizeManagedRolesConfig(desiredRoles),
153
+ staleManagedRoles: staleRoles,
154
+ });
155
+ operations.push({
156
+ action: existingConfigContent === null
157
+ ? 'create'
158
+ : configMerge.changed
159
+ ? 'update'
160
+ : 'skip',
161
+ target: 'config',
162
+ path: '.codex/config.toml',
163
+ reason: existingConfigContent === null
164
+ ? 'codex config missing'
165
+ : configMerge.changed
166
+ ? 'codex config differs from desired managed state'
167
+ : 'codex config already in sync',
168
+ content: configMerge.mergedContent,
169
+ });
170
+ return {
171
+ operations,
172
+ managedRoles: desiredRoles.map((role) => role.roleName),
173
+ aggregateConfigHash: hashContent(configMerge.mergedContent),
174
+ };
175
+ }
176
+ export async function applyCodexProjectExtensionPlan(scopeRoot, plan) {
177
+ const result = {
178
+ applied: 0,
179
+ failed: 0,
180
+ skipped: 0,
181
+ };
182
+ for (const operation of plan.operations) {
183
+ if (operation.action === 'skip') {
184
+ result.skipped += 1;
185
+ continue;
186
+ }
187
+ const absolutePath = resolve(scopeRoot, operation.path);
188
+ try {
189
+ if (operation.action === 'remove') {
190
+ await rm(absolutePath, { recursive: true, force: true });
191
+ }
192
+ else {
193
+ await ensureDir(dirname(absolutePath));
194
+ await writeFile(absolutePath, operation.content ?? '', 'utf8');
195
+ }
196
+ result.applied += 1;
197
+ }
198
+ catch {
199
+ result.failed += 1;
200
+ }
201
+ }
202
+ return result;
203
+ }
204
+ export function hasCodexExtensionChanges(plan) {
205
+ return plan.operations.some((operation) => operation.action !== 'skip');
206
+ }
207
+ export function summarizeCodexExtension(plan) {
208
+ let plannedOperations = 0;
209
+ let skipped = 0;
210
+ for (const operation of plan.operations) {
211
+ if (operation.action === 'skip') {
212
+ skipped += 1;
213
+ continue;
214
+ }
215
+ plannedOperations += 1;
216
+ }
217
+ return { plannedOperations, skipped };
218
+ }
219
+ export function toCodexExtensionOperations(plan) {
220
+ return plan.operations.map((operation) => ({
221
+ action: operation.action,
222
+ target: operation.target,
223
+ path: operation.path,
224
+ reason: operation.reason,
225
+ roleName: operation.roleName,
226
+ }));
227
+ }
@@ -0,0 +1,6 @@
1
+ export { codexAdapter } from './adapter.js';
2
+ export { mergeCodexConfig } from './codec/config-merge.js';
3
+ export { exportCanonicalAgentToCodexRole } from './codec/export-to-codex.js';
4
+ export { importCanonicalAgentFromCodexRole } from './codec/import-from-codex.js';
5
+ export { CODEX_PROJECT_MAPPINGS, CODEX_USER_MAPPINGS } from './paths.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/codex/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,iCAAiC,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { codexAdapter } from './adapter.js';
2
+ export { mergeCodexConfig } from './codec/config-merge.js';
3
+ export { exportCanonicalAgentToCodexRole } from './codec/export-to-codex.js';
4
+ export { importCanonicalAgentFromCodexRole } from './codec/import-from-codex.js';
5
+ export { CODEX_PROJECT_MAPPINGS, CODEX_USER_MAPPINGS } from './paths.js';
@@ -0,0 +1,4 @@
1
+ import type { PathMapping } from '../shared/adapter.types.js';
2
+ export declare const CODEX_PROJECT_MAPPINGS: PathMapping[];
3
+ export declare const CODEX_USER_MAPPINGS: PathMapping[];
4
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/providers/codex/paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,eAAO,MAAM,sBAAsB,EAAE,WAAW,EAa/C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,WAAW,EAa5C,CAAC"}
@@ -0,0 +1,28 @@
1
+ export const CODEX_PROJECT_MAPPINGS = [
2
+ {
3
+ contentType: 'skill',
4
+ canonicalDir: '.agents/skills',
5
+ providerDir: '.agents/skills',
6
+ nativeRead: true,
7
+ },
8
+ {
9
+ contentType: 'agent',
10
+ canonicalDir: '.agents/agents',
11
+ providerDir: '.agents/agents',
12
+ nativeRead: true,
13
+ },
14
+ ];
15
+ export const CODEX_USER_MAPPINGS = [
16
+ {
17
+ contentType: 'skill',
18
+ canonicalDir: '.agents/skills',
19
+ providerDir: '.agents/skills',
20
+ nativeRead: true,
21
+ },
22
+ {
23
+ contentType: 'agent',
24
+ canonicalDir: '.agents/agents',
25
+ providerDir: '.agents/agents',
26
+ nativeRead: true,
27
+ },
28
+ ];
@@ -0,0 +1,3 @@
1
+ import type { ProviderAdapter } from '../shared/adapter.types.js';
2
+ export declare const copilotAdapter: ProviderAdapter;
3
+ //# sourceMappingURL=adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/providers/copilot/adapter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAyBvE,eAAO,MAAM,cAAc,EAAE,eAO5B,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { access } from 'node:fs/promises';
2
+ import { join } from 'node:path';
3
+ import { COPILOT_PROJECT_MAPPINGS, COPILOT_USER_MAPPINGS } from './paths.js';
4
+ async function detectCopilot(scopeRoot) {
5
+ const markers = [
6
+ join(scopeRoot, '.copilot'),
7
+ join(scopeRoot, '.github', 'copilot-instructions.md'),
8
+ join(scopeRoot, '.github', 'agents'),
9
+ join(scopeRoot, '.github', 'skills'),
10
+ join(scopeRoot, '.github', 'instructions'),
11
+ ];
12
+ for (const marker of markers) {
13
+ try {
14
+ await access(marker);
15
+ return true;
16
+ }
17
+ catch {
18
+ // continue to next marker
19
+ }
20
+ }
21
+ return false;
22
+ }
23
+ export const copilotAdapter = {
24
+ name: 'copilot',
25
+ displayName: 'GitHub Copilot',
26
+ defaultStrategy: 'symlink',
27
+ projectMappings: COPILOT_PROJECT_MAPPINGS,
28
+ userMappings: COPILOT_USER_MAPPINGS,
29
+ detect: detectCopilot,
30
+ };
@@ -0,0 +1,3 @@
1
+ export { copilotAdapter } from './adapter.js';
2
+ export { COPILOT_PROJECT_MAPPINGS, COPILOT_USER_MAPPINGS } from './paths.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/copilot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { copilotAdapter } from './adapter.js';
2
+ export { COPILOT_PROJECT_MAPPINGS, COPILOT_USER_MAPPINGS } from './paths.js';
@@ -0,0 +1,4 @@
1
+ import type { PathMapping } from '../shared/adapter.types.js';
2
+ export declare const COPILOT_PROJECT_MAPPINGS: PathMapping[];
3
+ export declare const COPILOT_USER_MAPPINGS: PathMapping[];
4
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/providers/copilot/paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAOnE,eAAO,MAAM,wBAAwB,EAAE,WAAW,EAsBjD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,WAAW,EAa9C,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { parseCopilotRuleToCanonical, transformCanonicalToCopilotRule, } from './rule-transform.js';
2
+ export const COPILOT_PROJECT_MAPPINGS = [
3
+ {
4
+ contentType: 'skill',
5
+ canonicalDir: '.agents/skills',
6
+ providerDir: '.github/skills',
7
+ nativeRead: false,
8
+ },
9
+ {
10
+ contentType: 'agent',
11
+ canonicalDir: '.agents/agents',
12
+ providerDir: '.github/agents',
13
+ nativeRead: false,
14
+ },
15
+ {
16
+ contentType: 'rule',
17
+ canonicalDir: '.agents/rules',
18
+ providerDir: '.github/instructions',
19
+ nativeRead: false,
20
+ providerExtension: '.instructions.md',
21
+ transformCanonical: transformCanonicalToCopilotRule,
22
+ parseToCanonical: parseCopilotRuleToCanonical,
23
+ },
24
+ ];
25
+ export const COPILOT_USER_MAPPINGS = [
26
+ {
27
+ contentType: 'skill',
28
+ canonicalDir: '.agents/skills',
29
+ providerDir: '.copilot/skills',
30
+ nativeRead: false,
31
+ },
32
+ {
33
+ contentType: 'agent',
34
+ canonicalDir: '.agents/agents',
35
+ providerDir: '.copilot/agents',
36
+ nativeRead: false,
37
+ },
38
+ ];
@@ -0,0 +1,3 @@
1
+ export declare function transformCanonicalToCopilotRule(canonicalContent: string, canonicalPath?: string): string;
2
+ export declare function parseCopilotRuleToCanonical(providerContent: string): string;
3
+ //# sourceMappingURL=rule-transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-transform.d.ts","sourceRoot":"","sources":["../../../src/providers/copilot/rule-transform.ts"],"names":[],"mappings":"AAkDA,wBAAgB,+BAA+B,CAC7C,gBAAgB,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,MAAM,GACrB,MAAM,CAqBR;AAED,wBAAgB,2BAA2B,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAa3E"}