@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.
- package/README.md +50 -0
- package/assets/agents/oat-codebase-mapper.md +275 -0
- package/assets/agents/oat-reviewer.md +350 -0
- package/assets/agents/skeptical-evaluator.md +126 -0
- package/assets/docs/contributing/code.md +95 -0
- package/assets/docs/contributing/commit-conventions.md +41 -0
- package/assets/docs/contributing/design-principles.md +124 -0
- package/assets/docs/contributing/documentation.md +69 -0
- package/assets/docs/contributing/hooks-and-safety.md +31 -0
- package/assets/docs/contributing/index.md +18 -0
- package/assets/docs/contributing/markdown-features.md +117 -0
- package/assets/docs/contributing/skills.md +68 -0
- package/assets/docs/guide/cli-reference.md +211 -0
- package/assets/docs/guide/concepts.md +88 -0
- package/assets/docs/guide/configuration.md +130 -0
- package/assets/docs/guide/documentation/commands.md +157 -0
- package/assets/docs/guide/documentation/index.md +27 -0
- package/assets/docs/guide/documentation/quickstart.md +164 -0
- package/assets/docs/guide/documentation/workflows.md +67 -0
- package/assets/docs/guide/getting-started.md +63 -0
- package/assets/docs/guide/ideas/index.md +34 -0
- package/assets/docs/guide/ideas/lifecycle.md +106 -0
- package/assets/docs/guide/index.md +20 -0
- package/assets/docs/guide/provider-sync/commands.md +100 -0
- package/assets/docs/guide/provider-sync/config.md +77 -0
- package/assets/docs/guide/provider-sync/index.md +65 -0
- package/assets/docs/guide/provider-sync/manifest-and-drift.md +55 -0
- package/assets/docs/guide/provider-sync/providers.md +67 -0
- package/assets/docs/guide/provider-sync/scope-and-surface.md +64 -0
- package/assets/docs/guide/skills/index.md +115 -0
- package/assets/docs/guide/tool-packs.md +167 -0
- package/assets/docs/guide/workflow/artifacts.md +44 -0
- package/assets/docs/guide/workflow/hill-checkpoints.md +53 -0
- package/assets/docs/guide/workflow/index.md +34 -0
- package/assets/docs/guide/workflow/lifecycle.md +207 -0
- package/assets/docs/guide/workflow/pr-flow.md +55 -0
- package/assets/docs/guide/workflow/repo-analysis.md +96 -0
- package/assets/docs/guide/workflow/reviews.md +98 -0
- package/assets/docs/guide/workflow/state-machine.md +74 -0
- package/assets/docs/index.md +45 -0
- package/assets/docs/quickstart.md +162 -0
- package/assets/docs/reference/docs-index-contract.md +53 -0
- package/assets/docs/reference/file-locations.md +109 -0
- package/assets/docs/reference/index.md +29 -0
- package/assets/docs/reference/oat-directory-structure.md +236 -0
- package/assets/docs/reference/troubleshooting.md +63 -0
- package/assets/public-package-versions.json +6 -0
- package/assets/scripts/resolve-tracking.sh +233 -0
- package/assets/skills/analyze/SKILL.md +358 -0
- package/assets/skills/compare/SKILL.md +276 -0
- package/assets/skills/create-agnostic-skill/SKILL.md +410 -0
- package/assets/skills/create-agnostic-skill/references/skill-template.md +195 -0
- package/assets/skills/deep-research/SKILL.md +350 -0
- package/assets/skills/deep-research/references/schema-analysis.md +93 -0
- package/assets/skills/deep-research/references/schema-architectural.md +75 -0
- package/assets/skills/deep-research/references/schema-base.md +70 -0
- package/assets/skills/deep-research/references/schema-comparative.md +72 -0
- package/assets/skills/deep-research/references/schema-conceptual.md +68 -0
- package/assets/skills/deep-research/references/schema-technical.md +64 -0
- package/assets/skills/oat-agent-instructions-analyze/SKILL.md +500 -0
- package/assets/skills/oat-agent-instructions-analyze/references/analysis-artifact-template.md +248 -0
- package/assets/skills/oat-agent-instructions-analyze/references/bundle-summary-template.md +31 -0
- package/assets/skills/oat-agent-instructions-analyze/references/directory-assessment-criteria.md +93 -0
- package/assets/skills/oat-agent-instructions-analyze/references/docs/agent-instruction.md +575 -0
- package/assets/skills/oat-agent-instructions-analyze/references/docs/cursor-rules-files.md +510 -0
- package/assets/skills/oat-agent-instructions-analyze/references/docs/provider-reference.md +429 -0
- package/assets/skills/oat-agent-instructions-analyze/references/docs/rules-files.md +594 -0
- package/assets/skills/oat-agent-instructions-analyze/references/file-type-discovery-checklist.md +273 -0
- package/assets/skills/oat-agent-instructions-analyze/references/quality-checklist.md +125 -0
- package/assets/skills/oat-agent-instructions-analyze/references/recommendation-pack-template.md +45 -0
- package/assets/skills/oat-agent-instructions-analyze/references/recommendations-manifest-template.yaml +27 -0
- package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-instruction-files.sh +120 -0
- package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-providers.sh +135 -0
- package/assets/skills/oat-agent-instructions-apply/SKILL.md +507 -0
- package/assets/skills/oat-agent-instructions-apply/references/apply-plan-template.md +80 -0
- package/assets/skills/oat-agent-instructions-apply/references/docs/agent-instruction.md +575 -0
- package/assets/skills/oat-agent-instructions-apply/references/docs/cursor-rules-files.md +510 -0
- package/assets/skills/oat-agent-instructions-apply/references/docs/provider-reference.md +429 -0
- package/assets/skills/oat-agent-instructions-apply/references/docs/rules-files.md +594 -0
- package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/agents-md-root.md +85 -0
- package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/agents-md-scoped.md +62 -0
- package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/frontmatter/claude-rule.md +67 -0
- package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/frontmatter/copilot-instruction.md +70 -0
- package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/frontmatter/copilot-shim.md +35 -0
- package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/frontmatter/cursor-rule.md +84 -0
- package/assets/skills/oat-agent-instructions-apply/references/instruction-file-templates/glob-scoped-rule.md +59 -0
- package/assets/skills/oat-docs/SKILL.md +214 -0
- package/assets/skills/oat-docs-analyze/SKILL.md +355 -0
- package/assets/skills/oat-docs-analyze/references/analysis-artifact-template.md +192 -0
- package/assets/skills/oat-docs-analyze/references/directory-assessment-criteria.md +46 -0
- package/assets/skills/oat-docs-analyze/references/quality-checklist.md +48 -0
- package/assets/skills/oat-docs-apply/SKILL.md +339 -0
- package/assets/skills/oat-docs-apply/references/apply-plan-template.md +69 -0
- package/assets/skills/oat-doctor/SKILL.md +293 -0
- package/assets/skills/oat-idea-ideate/SKILL.md +187 -0
- package/assets/skills/oat-idea-new/SKILL.md +152 -0
- package/assets/skills/oat-idea-scratchpad/SKILL.md +115 -0
- package/assets/skills/oat-idea-summarize/SKILL.md +172 -0
- package/assets/skills/oat-pjm-add-backlog-item/SKILL.md +155 -0
- package/assets/skills/oat-pjm-review-backlog/SKILL.md +171 -0
- package/assets/skills/oat-pjm-review-backlog/references/backlog-review-template.md +172 -0
- package/assets/skills/oat-pjm-update-repo-reference/SKILL.md +128 -0
- package/assets/skills/oat-project-capture/SKILL.md +306 -0
- package/assets/skills/oat-project-clear-active/SKILL.md +50 -0
- package/assets/skills/oat-project-complete/SKILL.md +461 -0
- package/assets/skills/oat-project-design/SKILL.md +461 -0
- package/assets/skills/oat-project-discover/SKILL.md +395 -0
- package/assets/skills/oat-project-document/SKILL.md +468 -0
- package/assets/skills/oat-project-implement/SKILL.md +736 -0
- package/assets/skills/oat-project-import-plan/SKILL.md +228 -0
- package/assets/skills/oat-project-import-plan/scripts/find-recent-provider-plans.sh +149 -0
- package/assets/skills/oat-project-new/SKILL.md +74 -0
- package/assets/skills/oat-project-next/SKILL.md +345 -0
- package/assets/skills/oat-project-open/SKILL.md +47 -0
- package/assets/skills/oat-project-plan/SKILL.md +415 -0
- package/assets/skills/oat-project-plan-writing/SKILL.md +116 -0
- package/assets/skills/oat-project-pr-final/SKILL.md +391 -0
- package/assets/skills/oat-project-pr-progress/SKILL.md +354 -0
- package/assets/skills/oat-project-progress/SKILL.md +342 -0
- package/assets/skills/oat-project-promote-spec-driven/SKILL.md +155 -0
- package/assets/skills/oat-project-quick-start/SKILL.md +363 -0
- package/assets/skills/oat-project-reconcile/SKILL.md +738 -0
- package/assets/skills/oat-project-review-provide/SKILL.md +728 -0
- package/assets/skills/oat-project-review-receive/SKILL.md +641 -0
- package/assets/skills/oat-project-review-receive-remote/SKILL.md +235 -0
- package/assets/skills/oat-project-revise/SKILL.md +316 -0
- package/assets/skills/oat-project-spec/SKILL.md +471 -0
- package/assets/skills/oat-project-subagent-implement/SKILL.md +549 -0
- package/assets/skills/oat-project-subagent-implement/examples/pattern-hill-checkpoint.md +110 -0
- package/assets/skills/oat-project-subagent-implement/examples/pattern-parallel-phases.md +118 -0
- package/assets/skills/oat-project-subagent-implement/scripts/dispatch.sh +133 -0
- package/assets/skills/oat-project-subagent-implement/scripts/reconcile.sh +182 -0
- package/assets/skills/oat-project-subagent-implement/scripts/review-gate.sh +187 -0
- package/assets/skills/oat-project-subagent-implement/tests/fixtures/sample-plan.md +234 -0
- package/assets/skills/oat-project-subagent-implement/tests/test-dry-run.sh +126 -0
- package/assets/skills/oat-project-subagent-implement/tests/test-hill-checkpoint.sh +127 -0
- package/assets/skills/oat-project-subagent-implement/tests/test-reconcile.sh +254 -0
- package/assets/skills/oat-project-subagent-implement/tests/test-review-gate.sh +220 -0
- package/assets/skills/oat-project-summary/SKILL.md +227 -0
- package/assets/skills/oat-repo-knowledge-index/SKILL.md +724 -0
- package/assets/skills/oat-repo-knowledge-index/references/templates/architecture.md +83 -0
- package/assets/skills/oat-repo-knowledge-index/references/templates/concerns.md +97 -0
- package/assets/skills/oat-repo-knowledge-index/references/templates/conventions.md +100 -0
- package/assets/skills/oat-repo-knowledge-index/references/templates/integrations.md +91 -0
- package/assets/skills/oat-repo-knowledge-index/references/templates/stack.md +86 -0
- package/assets/skills/oat-repo-knowledge-index/references/templates/structure.md +88 -0
- package/assets/skills/oat-repo-knowledge-index/references/templates/testing.md +137 -0
- package/assets/skills/oat-repo-maintainability-review/SKILL.md +198 -0
- package/assets/skills/oat-repo-maintainability-review/references/dx-checklist.md +33 -0
- package/assets/skills/oat-repo-maintainability-review/references/repo-review-artifact-template.md +72 -0
- package/assets/skills/oat-repo-maintainability-review/references/repo-review-rubric.md +66 -0
- package/assets/skills/oat-repo-maintainability-review/scripts/resolve-analysis-output.sh +162 -0
- package/assets/skills/oat-review-provide/SKILL.md +231 -0
- package/assets/skills/oat-review-provide/references/review-artifact-template.md +55 -0
- package/assets/skills/oat-review-provide/scripts/resolve-review-output.sh +124 -0
- package/assets/skills/oat-review-receive/SKILL.md +238 -0
- package/assets/skills/oat-review-receive-remote/SKILL.md +250 -0
- package/assets/skills/oat-worktree-bootstrap/SKILL.md +208 -0
- package/assets/skills/oat-worktree-bootstrap/references/worktree-conventions.md +58 -0
- package/assets/skills/oat-worktree-bootstrap-auto/SKILL.md +245 -0
- package/assets/skills/oat-worktree-bootstrap-auto/scripts/bootstrap.sh +194 -0
- package/assets/skills/skeptic/SKILL.md +261 -0
- package/assets/skills/synthesize/SKILL.md +361 -0
- package/assets/templates/backlog-item.md +24 -0
- package/assets/templates/design.md +315 -0
- package/assets/templates/discovery.md +135 -0
- package/assets/templates/docs-app-fuma/app/[[...slug]]/page.tsx +30 -0
- package/assets/templates/docs-app-fuma/app/api/search/route.ts +8 -0
- package/assets/templates/docs-app-fuma/app/globals.css +69 -0
- package/assets/templates/docs-app-fuma/app/layout.tsx +26 -0
- package/assets/templates/docs-app-fuma/docs/contributing.md +71 -0
- package/assets/templates/docs-app-fuma/docs/getting-started.md +40 -0
- package/assets/templates/docs-app-fuma/docs/index.md +13 -0
- package/assets/templates/docs-app-fuma/lib/source.ts +8 -0
- package/assets/templates/docs-app-fuma/next.config.js +6 -0
- package/assets/templates/docs-app-fuma/package.json.template +38 -0
- package/assets/templates/docs-app-fuma/postcss.config.mjs +7 -0
- package/assets/templates/docs-app-fuma/source.config.ts +14 -0
- package/assets/templates/docs-app-fuma/tsconfig.json +25 -0
- package/assets/templates/docs-app-mkdocs/docs/contributing.md +122 -0
- package/assets/templates/docs-app-mkdocs/docs/getting-started.md +28 -0
- package/assets/templates/docs-app-mkdocs/docs/index.md +8 -0
- package/assets/templates/docs-app-mkdocs/mkdocs.yml +47 -0
- package/assets/templates/docs-app-mkdocs/package.json.template +19 -0
- package/assets/templates/docs-app-mkdocs/requirements.txt +6 -0
- package/assets/templates/docs-app-mkdocs/setup-docs.sh +18 -0
- package/assets/templates/ideas/idea-discovery.md +39 -0
- package/assets/templates/ideas/idea-summary.md +42 -0
- package/assets/templates/ideas/ideas-backlog.md +21 -0
- package/assets/templates/ideas/ideas-scratchpad.md +10 -0
- package/assets/templates/implementation.md +207 -0
- package/assets/templates/plan.md +171 -0
- package/assets/templates/roadmap.md +24 -0
- package/assets/templates/spec.md +138 -0
- package/assets/templates/state.md +49 -0
- package/assets/templates/summary.md +82 -0
- package/dist/agents/canonical/index.d.ts +4 -0
- package/dist/agents/canonical/index.d.ts.map +1 -0
- package/dist/agents/canonical/index.js +2 -0
- package/dist/agents/canonical/parse.d.ts +4 -0
- package/dist/agents/canonical/parse.d.ts.map +1 -0
- package/dist/agents/canonical/parse.js +97 -0
- package/dist/agents/canonical/render.d.ts +3 -0
- package/dist/agents/canonical/render.d.ts.map +1 -0
- package/dist/agents/canonical/render.js +17 -0
- package/dist/agents/canonical/types.d.ts +22 -0
- package/dist/agents/canonical/types.d.ts.map +1 -0
- package/dist/agents/canonical/types.js +1 -0
- package/dist/app/command-context.d.ts +21 -0
- package/dist/app/command-context.d.ts.map +1 -0
- package/dist/app/command-context.js +18 -0
- package/dist/app/create-program.d.ts +3 -0
- package/dist/app/create-program.d.ts.map +1 -0
- package/dist/app/create-program.js +17 -0
- package/dist/commands/__tests__/helpers.d.ts +12 -0
- package/dist/commands/__tests__/helpers.d.ts.map +1 -0
- package/dist/commands/__tests__/helpers.js +36 -0
- package/dist/commands/backlog/index.d.ts +14 -0
- package/dist/commands/backlog/index.d.ts.map +1 -0
- package/dist/commands/backlog/index.js +80 -0
- package/dist/commands/backlog/init.d.ts +2 -0
- package/dist/commands/backlog/init.d.ts.map +1 -0
- package/dist/commands/backlog/init.js +66 -0
- package/dist/commands/backlog/regenerate-index.d.ts +2 -0
- package/dist/commands/backlog/regenerate-index.d.ts.map +1 -0
- package/dist/commands/backlog/regenerate-index.js +78 -0
- package/dist/commands/backlog/shared/generate-id.d.ts +4 -0
- package/dist/commands/backlog/shared/generate-id.d.ts.map +1 -0
- package/dist/commands/backlog/shared/generate-id.js +65 -0
- package/dist/commands/cleanup/artifacts/artifacts.d.ts +44 -0
- package/dist/commands/cleanup/artifacts/artifacts.d.ts.map +1 -0
- package/dist/commands/cleanup/artifacts/artifacts.js +381 -0
- package/dist/commands/cleanup/artifacts/artifacts.types.d.ts +13 -0
- package/dist/commands/cleanup/artifacts/artifacts.types.d.ts.map +1 -0
- package/dist/commands/cleanup/artifacts/artifacts.types.js +1 -0
- package/dist/commands/cleanup/artifacts/artifacts.utils.d.ts +14 -0
- package/dist/commands/cleanup/artifacts/artifacts.utils.d.ts.map +1 -0
- package/dist/commands/cleanup/artifacts/artifacts.utils.js +74 -0
- package/dist/commands/cleanup/cleanup.types.d.ts +26 -0
- package/dist/commands/cleanup/cleanup.types.d.ts.map +1 -0
- package/dist/commands/cleanup/cleanup.types.js +1 -0
- package/dist/commands/cleanup/cleanup.utils.d.ts +17 -0
- package/dist/commands/cleanup/cleanup.utils.d.ts.map +1 -0
- package/dist/commands/cleanup/cleanup.utils.js +44 -0
- package/dist/commands/cleanup/index.d.ts +3 -0
- package/dist/commands/cleanup/index.d.ts.map +1 -0
- package/dist/commands/cleanup/index.js +9 -0
- package/dist/commands/cleanup/project/project.d.ts +20 -0
- package/dist/commands/cleanup/project/project.d.ts.map +1 -0
- package/dist/commands/cleanup/project/project.js +263 -0
- package/dist/commands/cleanup/project/project.utils.d.ts +8 -0
- package/dist/commands/cleanup/project/project.utils.d.ts.map +1 -0
- package/dist/commands/cleanup/project/project.utils.js +48 -0
- package/dist/commands/config/index.d.ts +16 -0
- package/dist/commands/config/index.d.ts.map +1 -0
- package/dist/commands/config/index.js +700 -0
- package/dist/commands/docs/analyze.d.ts +8 -0
- package/dist/commands/docs/analyze.d.ts.map +1 -0
- package/dist/commands/docs/analyze.js +45 -0
- package/dist/commands/docs/apply.d.ts +8 -0
- package/dist/commands/docs/apply.d.ts.map +1 -0
- package/dist/commands/docs/apply.js +45 -0
- package/dist/commands/docs/index-generate/generator.d.ts +9 -0
- package/dist/commands/docs/index-generate/generator.d.ts.map +1 -0
- package/dist/commands/docs/index-generate/generator.js +114 -0
- package/dist/commands/docs/index-generate/index.d.ts +16 -0
- package/dist/commands/docs/index-generate/index.d.ts.map +1 -0
- package/dist/commands/docs/index-generate/index.js +72 -0
- package/dist/commands/docs/index.d.ts +3 -0
- package/dist/commands/docs/index.d.ts.map +1 -0
- package/dist/commands/docs/index.js +17 -0
- package/dist/commands/docs/init/index.d.ts +18 -0
- package/dist/commands/docs/init/index.d.ts.map +1 -0
- package/dist/commands/docs/init/index.js +129 -0
- package/dist/commands/docs/init/resolve-options.d.ts +41 -0
- package/dist/commands/docs/init/resolve-options.d.ts.map +1 -0
- package/dist/commands/docs/init/resolve-options.js +120 -0
- package/dist/commands/docs/init/scaffold.d.ts +18 -0
- package/dist/commands/docs/init/scaffold.d.ts.map +1 -0
- package/dist/commands/docs/init/scaffold.js +233 -0
- package/dist/commands/docs/migrate/codemod.d.ts +6 -0
- package/dist/commands/docs/migrate/codemod.d.ts.map +1 -0
- package/dist/commands/docs/migrate/codemod.js +62 -0
- package/dist/commands/docs/migrate/frontmatter.d.ts +12 -0
- package/dist/commands/docs/migrate/frontmatter.d.ts.map +1 -0
- package/dist/commands/docs/migrate/frontmatter.js +55 -0
- package/dist/commands/docs/migrate/index.d.ts +18 -0
- package/dist/commands/docs/migrate/index.d.ts.map +1 -0
- package/dist/commands/docs/migrate/index.js +138 -0
- package/dist/commands/docs/nav/contents.d.ts +14 -0
- package/dist/commands/docs/nav/contents.d.ts.map +1 -0
- package/dist/commands/docs/nav/contents.js +106 -0
- package/dist/commands/docs/nav/index.d.ts +3 -0
- package/dist/commands/docs/nav/index.d.ts.map +1 -0
- package/dist/commands/docs/nav/index.js +7 -0
- package/dist/commands/docs/nav/sync.d.ts +20 -0
- package/dist/commands/docs/nav/sync.d.ts.map +1 -0
- package/dist/commands/docs/nav/sync.js +92 -0
- package/dist/commands/doctor/index.d.ts +32 -0
- package/dist/commands/doctor/index.d.ts.map +1 -0
- package/dist/commands/doctor/index.js +373 -0
- package/dist/commands/index-cmd/index.d.ts +11 -0
- package/dist/commands/index-cmd/index.d.ts.map +1 -0
- package/dist/commands/index-cmd/index.js +62 -0
- package/dist/commands/index-cmd/thin-index.d.ts +19 -0
- package/dist/commands/index-cmd/thin-index.d.ts.map +1 -0
- package/dist/commands/index-cmd/thin-index.js +330 -0
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +38 -0
- package/dist/commands/init/detect-docs.d.ts +11 -0
- package/dist/commands/init/detect-docs.d.ts.map +1 -0
- package/dist/commands/init/detect-docs.js +51 -0
- package/dist/commands/init/gitignore.d.ts +6 -0
- package/dist/commands/init/gitignore.d.ts.map +1 -0
- package/dist/commands/init/gitignore.js +41 -0
- package/dist/commands/init/index.d.ts +70 -0
- package/dist/commands/init/index.d.ts.map +1 -0
- package/dist/commands/init/index.js +570 -0
- package/dist/commands/init/tools/core/index.d.ts +12 -0
- package/dist/commands/init/tools/core/index.d.ts.map +1 -0
- package/dist/commands/init/tools/core/index.js +67 -0
- package/dist/commands/init/tools/core/install-core.d.ts +30 -0
- package/dist/commands/init/tools/core/install-core.d.ts.map +1 -0
- package/dist/commands/init/tools/core/install-core.js +50 -0
- package/dist/commands/init/tools/docs/index.d.ts +17 -0
- package/dist/commands/init/tools/docs/index.d.ts.map +1 -0
- package/dist/commands/init/tools/docs/index.js +110 -0
- package/dist/commands/init/tools/docs/install-docs.d.ts +23 -0
- package/dist/commands/init/tools/docs/install-docs.d.ts.map +1 -0
- package/dist/commands/init/tools/docs/install-docs.js +58 -0
- package/dist/commands/init/tools/ideas/index.d.ts +16 -0
- package/dist/commands/init/tools/ideas/index.d.ts.map +1 -0
- package/dist/commands/init/tools/ideas/index.js +94 -0
- package/dist/commands/init/tools/ideas/install-ideas.d.ts +25 -0
- package/dist/commands/init/tools/ideas/install-ideas.d.ts.map +1 -0
- package/dist/commands/init/tools/ideas/install-ideas.js +78 -0
- package/dist/commands/init/tools/index.d.ts +51 -0
- package/dist/commands/init/tools/index.d.ts.map +1 -0
- package/dist/commands/init/tools/index.js +387 -0
- package/dist/commands/init/tools/project-management/index.d.ts +12 -0
- package/dist/commands/init/tools/project-management/index.d.ts.map +1 -0
- package/dist/commands/init/tools/project-management/index.js +61 -0
- package/dist/commands/init/tools/project-management/install-project-management.d.ts +22 -0
- package/dist/commands/init/tools/project-management/install-project-management.d.ts.map +1 -0
- package/dist/commands/init/tools/project-management/install-project-management.js +52 -0
- package/dist/commands/init/tools/research/index.d.ts +17 -0
- package/dist/commands/init/tools/research/index.d.ts.map +1 -0
- package/dist/commands/init/tools/research/index.js +110 -0
- package/dist/commands/init/tools/research/install-research.d.ts +23 -0
- package/dist/commands/init/tools/research/install-research.d.ts.map +1 -0
- package/dist/commands/init/tools/research/install-research.js +52 -0
- package/dist/commands/init/tools/shared/copy-helpers.d.ts +12 -0
- package/dist/commands/init/tools/shared/copy-helpers.d.ts.map +1 -0
- package/dist/commands/init/tools/shared/copy-helpers.js +52 -0
- package/dist/commands/init/tools/shared/skill-manifest.d.ts +22 -0
- package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -0
- package/dist/commands/init/tools/shared/skill-manifest.js +102 -0
- package/dist/commands/init/tools/shared/version.d.ts +3 -0
- package/dist/commands/init/tools/shared/version.d.ts.map +1 -0
- package/dist/commands/init/tools/shared/version.js +27 -0
- package/dist/commands/init/tools/utility/index.d.ts +17 -0
- package/dist/commands/init/tools/utility/index.d.ts.map +1 -0
- package/dist/commands/init/tools/utility/index.js +109 -0
- package/dist/commands/init/tools/utility/install-utility.d.ts +20 -0
- package/dist/commands/init/tools/utility/install-utility.d.ts.map +1 -0
- package/dist/commands/init/tools/utility/install-utility.js +35 -0
- package/dist/commands/init/tools/workflows/index.d.ts +14 -0
- package/dist/commands/init/tools/workflows/index.d.ts.map +1 -0
- package/dist/commands/init/tools/workflows/index.js +84 -0
- package/dist/commands/init/tools/workflows/install-workflows.d.ts +32 -0
- package/dist/commands/init/tools/workflows/install-workflows.d.ts.map +1 -0
- package/dist/commands/init/tools/workflows/install-workflows.js +135 -0
- package/dist/commands/instructions/index.d.ts +3 -0
- package/dist/commands/instructions/index.d.ts.map +1 -0
- package/dist/commands/instructions/index.js +9 -0
- package/dist/commands/instructions/instructions.types.d.ts +52 -0
- package/dist/commands/instructions/instructions.types.d.ts.map +1 -0
- package/dist/commands/instructions/instructions.types.js +1 -0
- package/dist/commands/instructions/instructions.utils.d.ts +13 -0
- package/dist/commands/instructions/instructions.utils.d.ts.map +1 -0
- package/dist/commands/instructions/instructions.utils.js +211 -0
- package/dist/commands/instructions/sync/sync.d.ts +4 -0
- package/dist/commands/instructions/sync/sync.d.ts.map +1 -0
- package/dist/commands/instructions/sync/sync.js +142 -0
- package/dist/commands/instructions/validate/validate.d.ts +4 -0
- package/dist/commands/instructions/validate/validate.d.ts.map +1 -0
- package/dist/commands/instructions/validate/validate.js +53 -0
- package/dist/commands/internal/index.d.ts +3 -0
- package/dist/commands/internal/index.d.ts.map +1 -0
- package/dist/commands/internal/index.js +7 -0
- package/dist/commands/internal/validate-oat-skills.d.ts +10 -0
- package/dist/commands/internal/validate-oat-skills.d.ts.map +1 -0
- package/dist/commands/internal/validate-oat-skills.js +66 -0
- package/dist/commands/local/apply.d.ts +6 -0
- package/dist/commands/local/apply.d.ts.map +1 -0
- package/dist/commands/local/apply.js +56 -0
- package/dist/commands/local/expand.d.ts +8 -0
- package/dist/commands/local/expand.d.ts.map +1 -0
- package/dist/commands/local/expand.js +83 -0
- package/dist/commands/local/index.d.ts +3 -0
- package/dist/commands/local/index.d.ts.map +1 -0
- package/dist/commands/local/index.js +248 -0
- package/dist/commands/local/manage.d.ts +18 -0
- package/dist/commands/local/manage.d.ts.map +1 -0
- package/dist/commands/local/manage.js +66 -0
- package/dist/commands/local/status.d.ts +7 -0
- package/dist/commands/local/status.d.ts.map +1 -0
- package/dist/commands/local/status.js +46 -0
- package/dist/commands/local/sync.d.ts +20 -0
- package/dist/commands/local/sync.d.ts.map +1 -0
- package/dist/commands/local/sync.js +40 -0
- package/dist/commands/project/archive/archive-utils.d.ts +70 -0
- package/dist/commands/project/archive/archive-utils.d.ts.map +1 -0
- package/dist/commands/project/archive/archive-utils.js +236 -0
- package/dist/commands/project/archive/index.d.ts +20 -0
- package/dist/commands/project/archive/index.d.ts.map +1 -0
- package/dist/commands/project/archive/index.js +217 -0
- package/dist/commands/project/index.d.ts +3 -0
- package/dist/commands/project/index.d.ts.map +1 -0
- package/dist/commands/project/index.js +15 -0
- package/dist/commands/project/new/index.d.ts +17 -0
- package/dist/commands/project/new/index.d.ts.map +1 -0
- package/dist/commands/project/new/index.js +76 -0
- package/dist/commands/project/new/scaffold.d.ts +24 -0
- package/dist/commands/project/new/scaffold.d.ts.map +1 -0
- package/dist/commands/project/new/scaffold.js +177 -0
- package/dist/commands/project/open/index.d.ts +26 -0
- package/dist/commands/project/open/index.d.ts.map +1 -0
- package/dist/commands/project/open/index.js +139 -0
- package/dist/commands/project/pause/index.d.ts +27 -0
- package/dist/commands/project/pause/index.d.ts.map +1 -0
- package/dist/commands/project/pause/index.js +120 -0
- package/dist/commands/project/set-mode/index.d.ts +14 -0
- package/dist/commands/project/set-mode/index.d.ts.map +1 -0
- package/dist/commands/project/set-mode/index.js +115 -0
- package/dist/commands/providers/index.d.ts +4 -0
- package/dist/commands/providers/index.d.ts.map +1 -0
- package/dist/commands/providers/index.js +11 -0
- package/dist/commands/providers/inspect/inspect.d.ts +4 -0
- package/dist/commands/providers/inspect/inspect.d.ts.map +1 -0
- package/dist/commands/providers/inspect/inspect.js +156 -0
- package/dist/commands/providers/list/list.d.ts +4 -0
- package/dist/commands/providers/list/list.d.ts.map +1 -0
- package/dist/commands/providers/list/list.js +163 -0
- package/dist/commands/providers/providers.types.d.ts +63 -0
- package/dist/commands/providers/providers.types.d.ts.map +1 -0
- package/dist/commands/providers/providers.types.js +1 -0
- package/dist/commands/providers/set/index.d.ts +4 -0
- package/dist/commands/providers/set/index.d.ts.map +1 -0
- package/dist/commands/providers/set/index.js +138 -0
- package/dist/commands/remove/index.d.ts +3 -0
- package/dist/commands/remove/index.d.ts.map +1 -0
- package/dist/commands/remove/index.js +9 -0
- package/dist/commands/remove/skill/index.d.ts +2 -0
- package/dist/commands/remove/skill/index.d.ts.map +1 -0
- package/dist/commands/remove/skill/index.js +1 -0
- package/dist/commands/remove/skill/remove-skill.d.ts +23 -0
- package/dist/commands/remove/skill/remove-skill.d.ts.map +1 -0
- package/dist/commands/remove/skill/remove-skill.js +231 -0
- package/dist/commands/remove/skills/index.d.ts +2 -0
- package/dist/commands/remove/skills/index.d.ts.map +1 -0
- package/dist/commands/remove/skills/index.js +1 -0
- package/dist/commands/remove/skills/remove-skills.d.ts +14 -0
- package/dist/commands/remove/skills/remove-skills.d.ts.map +1 -0
- package/dist/commands/remove/skills/remove-skills.js +98 -0
- package/dist/commands/repo/index.d.ts +3 -0
- package/dist/commands/repo/index.d.ts.map +1 -0
- package/dist/commands/repo/index.js +7 -0
- package/dist/commands/repo/pr-comments/collect/collect-comments.d.ts +9 -0
- package/dist/commands/repo/pr-comments/collect/collect-comments.d.ts.map +1 -0
- package/dist/commands/repo/pr-comments/collect/collect-comments.js +284 -0
- package/dist/commands/repo/pr-comments/collect/graphql-queries.d.ts +3 -0
- package/dist/commands/repo/pr-comments/collect/graphql-queries.d.ts.map +1 -0
- package/dist/commands/repo/pr-comments/collect/graphql-queries.js +56 -0
- package/dist/commands/repo/pr-comments/collect/index.d.ts +4 -0
- package/dist/commands/repo/pr-comments/collect/index.d.ts.map +1 -0
- package/dist/commands/repo/pr-comments/collect/index.js +25 -0
- package/dist/commands/repo/pr-comments/collect/pr-comments.types.d.ts +62 -0
- package/dist/commands/repo/pr-comments/collect/pr-comments.types.d.ts.map +1 -0
- package/dist/commands/repo/pr-comments/collect/pr-comments.types.js +1 -0
- package/dist/commands/repo/pr-comments/index.d.ts +3 -0
- package/dist/commands/repo/pr-comments/index.d.ts.map +1 -0
- package/dist/commands/repo/pr-comments/index.js +9 -0
- package/dist/commands/repo/pr-comments/triage-collection/index.d.ts +4 -0
- package/dist/commands/repo/pr-comments/triage-collection/index.d.ts.map +1 -0
- package/dist/commands/repo/pr-comments/triage-collection/index.js +21 -0
- package/dist/commands/repo/pr-comments/triage-collection/triage-comments.d.ts +13 -0
- package/dist/commands/repo/pr-comments/triage-collection/triage-comments.d.ts.map +1 -0
- package/dist/commands/repo/pr-comments/triage-collection/triage-comments.js +81 -0
- package/dist/commands/shared/adopt-stray.d.ts +22 -0
- package/dist/commands/shared/adopt-stray.d.ts.map +1 -0
- package/dist/commands/shared/adopt-stray.js +135 -0
- package/dist/commands/shared/agents-md.d.ts +18 -0
- package/dist/commands/shared/agents-md.d.ts.map +1 -0
- package/dist/commands/shared/agents-md.js +81 -0
- package/dist/commands/shared/codex-strays.d.ts +16 -0
- package/dist/commands/shared/codex-strays.d.ts.map +1 -0
- package/dist/commands/shared/codex-strays.js +116 -0
- package/dist/commands/shared/frontmatter-write.d.ts +8 -0
- package/dist/commands/shared/frontmatter-write.d.ts.map +1 -0
- package/dist/commands/shared/frontmatter-write.js +27 -0
- package/dist/commands/shared/frontmatter.d.ts +6 -0
- package/dist/commands/shared/frontmatter.d.ts.map +1 -0
- package/dist/commands/shared/frontmatter.js +35 -0
- package/dist/commands/shared/messages.d.ts +2 -0
- package/dist/commands/shared/messages.d.ts.map +1 -0
- package/dist/commands/shared/messages.js +1 -0
- package/dist/commands/shared/oat-paths.d.ts +2 -0
- package/dist/commands/shared/oat-paths.d.ts.map +1 -0
- package/dist/commands/shared/oat-paths.js +13 -0
- package/dist/commands/shared/shared.prompts.d.ts +21 -0
- package/dist/commands/shared/shared.prompts.d.ts.map +1 -0
- package/dist/commands/shared/shared.prompts.js +107 -0
- package/dist/commands/shared/shared.utils.d.ts +6 -0
- package/dist/commands/shared/shared.utils.d.ts.map +1 -0
- package/dist/commands/shared/shared.utils.js +9 -0
- package/dist/commands/state/generate.d.ts +21 -0
- package/dist/commands/state/generate.d.ts.map +1 -0
- package/dist/commands/state/generate.js +440 -0
- package/dist/commands/state/index.d.ts +11 -0
- package/dist/commands/state/index.d.ts.map +1 -0
- package/dist/commands/state/index.js +58 -0
- package/dist/commands/status/index.d.ts +44 -0
- package/dist/commands/status/index.d.ts.map +1 -0
- package/dist/commands/status/index.js +340 -0
- package/dist/commands/sync/apply.d.ts +4 -0
- package/dist/commands/sync/apply.d.ts.map +1 -0
- package/dist/commands/sync/apply.js +100 -0
- package/dist/commands/sync/dry-run.d.ts +4 -0
- package/dist/commands/sync/dry-run.d.ts.map +1 -0
- package/dist/commands/sync/dry-run.js +74 -0
- package/dist/commands/sync/index.d.ts +4 -0
- package/dist/commands/sync/index.d.ts.map +1 -0
- package/dist/commands/sync/index.js +225 -0
- package/dist/commands/sync/sync.types.d.ts +80 -0
- package/dist/commands/sync/sync.types.d.ts.map +1 -0
- package/dist/commands/sync/sync.types.js +1 -0
- package/dist/commands/sync/sync.utils.d.ts +3 -0
- package/dist/commands/sync/sync.utils.d.ts.map +1 -0
- package/dist/commands/sync/sync.utils.js +8 -0
- package/dist/commands/tools/index.d.ts +3 -0
- package/dist/commands/tools/index.d.ts.map +1 -0
- package/dist/commands/tools/index.js +17 -0
- package/dist/commands/tools/info/index.d.ts +4 -0
- package/dist/commands/tools/info/index.d.ts.map +1 -0
- package/dist/commands/tools/info/index.js +74 -0
- package/dist/commands/tools/info/info-tool.d.ts +21 -0
- package/dist/commands/tools/info/info-tool.d.ts.map +1 -0
- package/dist/commands/tools/info/info-tool.js +52 -0
- package/dist/commands/tools/install/index.d.ts +4 -0
- package/dist/commands/tools/install/index.d.ts.map +1 -0
- package/dist/commands/tools/install/index.js +34 -0
- package/dist/commands/tools/list/index.d.ts +4 -0
- package/dist/commands/tools/list/index.d.ts.map +1 -0
- package/dist/commands/tools/list/index.js +25 -0
- package/dist/commands/tools/list/list-tools.d.ts +13 -0
- package/dist/commands/tools/list/list-tools.d.ts.map +1 -0
- package/dist/commands/tools/list/list-tools.js +43 -0
- package/dist/commands/tools/outdated/index.d.ts +4 -0
- package/dist/commands/tools/outdated/index.d.ts.map +1 -0
- package/dist/commands/tools/outdated/index.js +25 -0
- package/dist/commands/tools/outdated/outdated-tools.d.ts +13 -0
- package/dist/commands/tools/outdated/outdated-tools.d.ts.map +1 -0
- package/dist/commands/tools/outdated/outdated-tools.js +43 -0
- package/dist/commands/tools/remove/index.d.ts +5 -0
- package/dist/commands/tools/remove/index.d.ts.map +1 -0
- package/dist/commands/tools/remove/index.js +122 -0
- package/dist/commands/tools/remove/remove-tools.d.ts +31 -0
- package/dist/commands/tools/remove/remove-tools.d.ts.map +1 -0
- package/dist/commands/tools/remove/remove-tools.js +41 -0
- package/dist/commands/tools/shared/auto-sync.d.ts +16 -0
- package/dist/commands/tools/shared/auto-sync.d.ts.map +1 -0
- package/dist/commands/tools/shared/auto-sync.js +17 -0
- package/dist/commands/tools/shared/scan-tools.d.ts +18 -0
- package/dist/commands/tools/shared/scan-tools.d.ts.map +1 -0
- package/dist/commands/tools/shared/scan-tools.js +128 -0
- package/dist/commands/tools/shared/types.d.ts +12 -0
- package/dist/commands/tools/shared/types.d.ts.map +1 -0
- package/dist/commands/tools/shared/types.js +1 -0
- package/dist/commands/tools/update/index.d.ts +8 -0
- package/dist/commands/tools/update/index.d.ts.map +1 -0
- package/dist/commands/tools/update/index.js +149 -0
- package/dist/commands/tools/update/update-tools.d.ts +29 -0
- package/dist/commands/tools/update/update-tools.d.ts.map +1 -0
- package/dist/commands/tools/update/update-tools.js +148 -0
- package/dist/config/index.d.ts +4 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +2 -0
- package/dist/config/oat-config.d.ts +61 -0
- package/dist/config/oat-config.d.ts.map +1 -0
- package/dist/config/oat-config.js +319 -0
- package/dist/config/runtime.d.ts +2 -0
- package/dist/config/runtime.d.ts.map +1 -0
- package/dist/config/runtime.js +3 -0
- package/dist/config/sync-config.d.ts +49 -0
- package/dist/config/sync-config.d.ts.map +1 -0
- package/dist/config/sync-config.js +94 -0
- package/dist/drift/detector.d.ts +4 -0
- package/dist/drift/detector.d.ts.map +1 -0
- package/dist/drift/detector.js +69 -0
- package/dist/drift/drift.types.d.ts +17 -0
- package/dist/drift/drift.types.d.ts.map +1 -0
- package/dist/drift/drift.types.js +1 -0
- package/dist/drift/index.d.ts +4 -0
- package/dist/drift/index.d.ts.map +1 -0
- package/dist/drift/index.js +2 -0
- package/dist/drift/strays.d.ts +7 -0
- package/dist/drift/strays.d.ts.map +1 -0
- package/dist/drift/strays.js +153 -0
- package/dist/engine/compute-plan.d.ts +16 -0
- package/dist/engine/compute-plan.d.ts.map +1 -0
- package/dist/engine/compute-plan.js +234 -0
- package/dist/engine/engine.types.d.ts +28 -0
- package/dist/engine/engine.types.d.ts.map +1 -0
- package/dist/engine/engine.types.js +8 -0
- package/dist/engine/execute-plan.d.ts +5 -0
- package/dist/engine/execute-plan.d.ts.map +1 -0
- package/dist/engine/execute-plan.js +141 -0
- package/dist/engine/hook.d.ts +23 -0
- package/dist/engine/hook.d.ts.map +1 -0
- package/dist/engine/hook.js +254 -0
- package/dist/engine/index.d.ts +9 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/index.js +6 -0
- package/dist/engine/markers.d.ts +6 -0
- package/dist/engine/markers.d.ts.map +1 -0
- package/dist/engine/markers.js +24 -0
- package/dist/engine/scanner.d.ts +11 -0
- package/dist/engine/scanner.d.ts.map +1 -0
- package/dist/engine/scanner.js +65 -0
- package/dist/engine/test-helpers.d.ts +3 -0
- package/dist/engine/test-helpers.d.ts.map +1 -0
- package/dist/engine/test-helpers.js +31 -0
- package/dist/errors/cli-error.d.ts +5 -0
- package/dist/errors/cli-error.d.ts.map +1 -0
- package/dist/errors/cli-error.js +8 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +1 -0
- package/dist/fs/assets.d.ts +2 -0
- package/dist/fs/assets.d.ts.map +1 -0
- package/dist/fs/assets.js +22 -0
- package/dist/fs/index.d.ts +4 -0
- package/dist/fs/index.d.ts.map +1 -0
- package/dist/fs/index.js +3 -0
- package/dist/fs/io.d.ts +9 -0
- package/dist/fs/io.d.ts.map +1 -0
- package/dist/fs/io.js +74 -0
- package/dist/fs/paths.d.ts +9 -0
- package/dist/fs/paths.d.ts.map +1 -0
- package/dist/fs/paths.js +42 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +48 -0
- package/dist/manifest/hash.d.ts +5 -0
- package/dist/manifest/hash.d.ts.map +1 -0
- package/dist/manifest/hash.js +75 -0
- package/dist/manifest/index.d.ts +5 -0
- package/dist/manifest/index.d.ts.map +1 -0
- package/dist/manifest/index.js +3 -0
- package/dist/manifest/manager.d.ts +8 -0
- package/dist/manifest/manager.d.ts.map +1 -0
- package/dist/manifest/manager.js +86 -0
- package/dist/manifest/manifest.types.d.ts +157 -0
- package/dist/manifest/manifest.types.d.ts.map +1 -0
- package/dist/manifest/manifest.types.js +56 -0
- package/dist/providers/claude/adapter.d.ts +3 -0
- package/dist/providers/claude/adapter.d.ts.map +1 -0
- package/dist/providers/claude/adapter.js +20 -0
- package/dist/providers/claude/index.d.ts +3 -0
- package/dist/providers/claude/index.d.ts.map +1 -0
- package/dist/providers/claude/index.js +2 -0
- package/dist/providers/claude/paths.d.ts +4 -0
- package/dist/providers/claude/paths.d.ts.map +1 -0
- package/dist/providers/claude/paths.js +38 -0
- package/dist/providers/claude/rule-transform.d.ts +3 -0
- package/dist/providers/claude/rule-transform.d.ts.map +1 -0
- package/dist/providers/claude/rule-transform.js +22 -0
- package/dist/providers/codex/adapter.d.ts +3 -0
- package/dist/providers/codex/adapter.d.ts.map +1 -0
- package/dist/providers/codex/adapter.js +20 -0
- package/dist/providers/codex/codec/config-merge.d.ts +17 -0
- package/dist/providers/codex/codec/config-merge.d.ts.map +1 -0
- package/dist/providers/codex/codec/config-merge.js +61 -0
- package/dist/providers/codex/codec/export-to-codex.d.ts +9 -0
- package/dist/providers/codex/codec/export-to-codex.d.ts.map +1 -0
- package/dist/providers/codex/codec/export-to-codex.js +45 -0
- package/dist/providers/codex/codec/import-from-codex.d.ts +9 -0
- package/dist/providers/codex/codec/import-from-codex.d.ts.map +1 -0
- package/dist/providers/codex/codec/import-from-codex.js +52 -0
- package/dist/providers/codex/codec/shared.d.ts +7 -0
- package/dist/providers/codex/codec/shared.d.ts.map +1 -0
- package/dist/providers/codex/codec/shared.js +21 -0
- package/dist/providers/codex/codec/sync-extension.d.ts +32 -0
- package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -0
- package/dist/providers/codex/codec/sync-extension.js +227 -0
- package/dist/providers/codex/index.d.ts +6 -0
- package/dist/providers/codex/index.d.ts.map +1 -0
- package/dist/providers/codex/index.js +5 -0
- package/dist/providers/codex/paths.d.ts +4 -0
- package/dist/providers/codex/paths.d.ts.map +1 -0
- package/dist/providers/codex/paths.js +28 -0
- package/dist/providers/copilot/adapter.d.ts +3 -0
- package/dist/providers/copilot/adapter.d.ts.map +1 -0
- package/dist/providers/copilot/adapter.js +30 -0
- package/dist/providers/copilot/index.d.ts +3 -0
- package/dist/providers/copilot/index.d.ts.map +1 -0
- package/dist/providers/copilot/index.js +2 -0
- package/dist/providers/copilot/paths.d.ts +4 -0
- package/dist/providers/copilot/paths.d.ts.map +1 -0
- package/dist/providers/copilot/paths.js +38 -0
- package/dist/providers/copilot/rule-transform.d.ts +3 -0
- package/dist/providers/copilot/rule-transform.d.ts.map +1 -0
- package/dist/providers/copilot/rule-transform.js +58 -0
- package/dist/providers/cursor/adapter.d.ts +3 -0
- package/dist/providers/cursor/adapter.d.ts.map +1 -0
- package/dist/providers/cursor/adapter.js +20 -0
- package/dist/providers/cursor/index.d.ts +3 -0
- package/dist/providers/cursor/index.d.ts.map +1 -0
- package/dist/providers/cursor/index.js +2 -0
- package/dist/providers/cursor/paths.d.ts +4 -0
- package/dist/providers/cursor/paths.d.ts.map +1 -0
- package/dist/providers/cursor/paths.js +38 -0
- package/dist/providers/cursor/rule-transform.d.ts +3 -0
- package/dist/providers/cursor/rule-transform.d.ts.map +1 -0
- package/dist/providers/cursor/rule-transform.js +48 -0
- package/dist/providers/gemini/adapter.d.ts +3 -0
- package/dist/providers/gemini/adapter.d.ts.map +1 -0
- package/dist/providers/gemini/adapter.js +20 -0
- package/dist/providers/gemini/index.d.ts +3 -0
- package/dist/providers/gemini/index.d.ts.map +1 -0
- package/dist/providers/gemini/index.js +2 -0
- package/dist/providers/gemini/paths.d.ts +4 -0
- package/dist/providers/gemini/paths.d.ts.map +1 -0
- package/dist/providers/gemini/paths.js +28 -0
- package/dist/providers/shared/adapter.types.d.ts +21 -0
- package/dist/providers/shared/adapter.types.d.ts.map +1 -0
- package/dist/providers/shared/adapter.types.js +1 -0
- package/dist/providers/shared/adapter.utils.d.ts +12 -0
- package/dist/providers/shared/adapter.utils.d.ts.map +1 -0
- package/dist/providers/shared/adapter.utils.js +57 -0
- package/dist/providers/shared/agent-codec.types.d.ts +13 -0
- package/dist/providers/shared/agent-codec.types.d.ts.map +1 -0
- package/dist/providers/shared/agent-codec.types.js +1 -0
- package/dist/providers/shared/index.d.ts +6 -0
- package/dist/providers/shared/index.d.ts.map +1 -0
- package/dist/providers/shared/index.js +2 -0
- package/dist/providers/shared/markdown-agent-codec.d.ts +5 -0
- package/dist/providers/shared/markdown-agent-codec.d.ts.map +1 -0
- package/dist/providers/shared/markdown-agent-codec.js +12 -0
- package/dist/release/public-package-contract.d.ts +14 -0
- package/dist/release/public-package-contract.d.ts.map +1 -0
- package/dist/release/public-package-contract.js +97 -0
- package/dist/rules/canonical/index.d.ts +6 -0
- package/dist/rules/canonical/index.d.ts.map +1 -0
- package/dist/rules/canonical/index.js +4 -0
- package/dist/rules/canonical/parse.d.ts +9 -0
- package/dist/rules/canonical/parse.d.ts.map +1 -0
- package/dist/rules/canonical/parse.js +103 -0
- package/dist/rules/canonical/provider-filenames.d.ts +3 -0
- package/dist/rules/canonical/provider-filenames.d.ts.map +1 -0
- package/dist/rules/canonical/provider-filenames.js +13 -0
- package/dist/rules/canonical/render.d.ts +5 -0
- package/dist/rules/canonical/render.d.ts.map +1 -0
- package/dist/rules/canonical/render.js +32 -0
- package/dist/rules/canonical/types.d.ts +16 -0
- package/dist/rules/canonical/types.d.ts.map +1 -0
- package/dist/rules/canonical/types.js +6 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +1 -0
- package/dist/shared/types.d.ts +10 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +14 -0
- package/dist/ui/ansi.d.ts +2 -0
- package/dist/ui/ansi.d.ts.map +1 -0
- package/dist/ui/ansi.js +19 -0
- package/dist/ui/index.d.ts +7 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +3 -0
- package/dist/ui/logger.d.ts +15 -0
- package/dist/ui/logger.d.ts.map +1 -0
- package/dist/ui/logger.js +52 -0
- package/dist/ui/output.d.ts +16 -0
- package/dist/ui/output.d.ts.map +1 -0
- package/dist/ui/output.js +135 -0
- package/dist/ui/spinner.d.ts +16 -0
- package/dist/ui/spinner.d.ts.map +1 -0
- package/dist/ui/spinner.js +46 -0
- package/dist/validation/index.d.ts +3 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +1 -0
- package/dist/validation/skills.d.ts +10 -0
- package/dist/validation/skills.d.ts.map +1 -0
- package/dist/validation/skills.js +166 -0
- package/package.json +62 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
2
|
+
import { chmod, lstat, readFile, readlink, rm, writeFile, } from 'node:fs/promises';
|
|
3
|
+
import { dirname, join, resolve } from 'node:path';
|
|
4
|
+
import { promisify } from 'node:util';
|
|
5
|
+
import { ensureDir } from '../fs/io.js';
|
|
6
|
+
const execFileAsync = promisify(execFile);
|
|
7
|
+
export const HOOK_MARKER_START = '# >>> oat pre-commit hook >>>';
|
|
8
|
+
export const HOOK_MARKER_END = '# <<< oat pre-commit hook <<<';
|
|
9
|
+
export const HOOK_DRIFT_WARNING = "oat: project provider views are out of sync - run 'oat status --scope project' or 'oat sync --scope project'";
|
|
10
|
+
export const REPO_GITHOOKS_PATH = '.githooks';
|
|
11
|
+
function escapeRegExp(value) {
|
|
12
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
13
|
+
}
|
|
14
|
+
function createHookSnippet(options = {}) {
|
|
15
|
+
const lines = [
|
|
16
|
+
HOOK_MARKER_START,
|
|
17
|
+
'if command -v oat >/dev/null 2>&1; then',
|
|
18
|
+
' if ! oat status --scope project >/dev/null 2>&1; then',
|
|
19
|
+
` echo "${HOOK_DRIFT_WARNING}" >&2`,
|
|
20
|
+
' fi',
|
|
21
|
+
'fi',
|
|
22
|
+
HOOK_MARKER_END,
|
|
23
|
+
];
|
|
24
|
+
if (!options.includeShebang) {
|
|
25
|
+
return lines.join('\n');
|
|
26
|
+
}
|
|
27
|
+
return ['#!/bin/sh', '', ...lines].join('\n');
|
|
28
|
+
}
|
|
29
|
+
async function resolveGitDirectory(projectRoot) {
|
|
30
|
+
const gitPath = join(projectRoot, '.git');
|
|
31
|
+
try {
|
|
32
|
+
const gitStat = await lstat(gitPath);
|
|
33
|
+
if (gitStat.isSymbolicLink()) {
|
|
34
|
+
const symlinkTarget = await readlink(gitPath);
|
|
35
|
+
return resolve(dirname(gitPath), symlinkTarget);
|
|
36
|
+
}
|
|
37
|
+
if (gitStat.isFile()) {
|
|
38
|
+
const content = await readFile(gitPath, 'utf8');
|
|
39
|
+
const match = /^gitdir:\s*(.+)$/m.exec(content.trim());
|
|
40
|
+
if (match?.[1]) {
|
|
41
|
+
return resolve(projectRoot, match[1].trim());
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
if (typeof error === 'object' &&
|
|
47
|
+
error !== null &&
|
|
48
|
+
'code' in error &&
|
|
49
|
+
error.code === 'ENOENT') {
|
|
50
|
+
return gitPath;
|
|
51
|
+
}
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
return gitPath;
|
|
55
|
+
}
|
|
56
|
+
async function resolveConfiguredHooksPath(projectRoot) {
|
|
57
|
+
try {
|
|
58
|
+
const { stdout } = await execFileAsync('git', ['config', '--get', 'core.hooksPath'], { cwd: projectRoot });
|
|
59
|
+
const configured = stdout.trim();
|
|
60
|
+
if (configured) {
|
|
61
|
+
return resolve(projectRoot, configured);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
// Not set or git not available — fall through to default resolution.
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
async function resolveHooksDirectory(projectRoot, options = {}) {
|
|
70
|
+
const shouldCreate = options.createIfMissing ?? false;
|
|
71
|
+
const configuredPath = await resolveConfiguredHooksPath(projectRoot);
|
|
72
|
+
if (configuredPath) {
|
|
73
|
+
if (shouldCreate) {
|
|
74
|
+
await ensureDir(configuredPath);
|
|
75
|
+
}
|
|
76
|
+
return configuredPath;
|
|
77
|
+
}
|
|
78
|
+
const gitDir = await resolveGitDirectory(projectRoot);
|
|
79
|
+
const hooksDir = join(gitDir, 'hooks');
|
|
80
|
+
try {
|
|
81
|
+
const hooksStat = await lstat(hooksDir);
|
|
82
|
+
if (!hooksStat.isSymbolicLink()) {
|
|
83
|
+
return hooksDir;
|
|
84
|
+
}
|
|
85
|
+
const symlinkTarget = await readlink(hooksDir);
|
|
86
|
+
const resolvedTarget = resolve(dirname(hooksDir), symlinkTarget);
|
|
87
|
+
if (shouldCreate) {
|
|
88
|
+
await ensureDir(resolvedTarget);
|
|
89
|
+
}
|
|
90
|
+
return resolvedTarget;
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if (typeof error === 'object' &&
|
|
94
|
+
error !== null &&
|
|
95
|
+
'code' in error &&
|
|
96
|
+
error.code === 'ENOENT') {
|
|
97
|
+
if (shouldCreate) {
|
|
98
|
+
await ensureDir(hooksDir);
|
|
99
|
+
}
|
|
100
|
+
return hooksDir;
|
|
101
|
+
}
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
export async function getHookInstallInfo(projectRoot) {
|
|
106
|
+
const hooksDir = await resolveHooksDirectory(projectRoot);
|
|
107
|
+
const hookPath = join(hooksDir, 'pre-commit');
|
|
108
|
+
const suggestedHookPath = join(projectRoot, REPO_GITHOOKS_PATH, 'pre-commit');
|
|
109
|
+
let suggestedHooksPath = null;
|
|
110
|
+
if (!(await resolveConfiguredHooksPath(projectRoot))) {
|
|
111
|
+
try {
|
|
112
|
+
await lstat(suggestedHookPath);
|
|
113
|
+
suggestedHooksPath = REPO_GITHOOKS_PATH;
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
if (typeof error === 'object' &&
|
|
117
|
+
error !== null &&
|
|
118
|
+
'code' in error &&
|
|
119
|
+
error.code !== 'ENOENT') {
|
|
120
|
+
throw error;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
hookPath,
|
|
126
|
+
suggestedHooksPath,
|
|
127
|
+
suggestedHookPath: suggestedHooksPath ? suggestedHookPath : null,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export async function configureLocalHooksPath(projectRoot, hooksPath) {
|
|
131
|
+
await execFileAsync('git', ['config', '--local', 'core.hooksPath', hooksPath], {
|
|
132
|
+
cwd: projectRoot,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
export async function isHookInstalled(projectRoot) {
|
|
136
|
+
const { hookPath } = await getHookInstallInfo(projectRoot);
|
|
137
|
+
try {
|
|
138
|
+
const content = await readFile(hookPath, 'utf8');
|
|
139
|
+
return content.includes(HOOK_MARKER_START);
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
if (typeof error === 'object' &&
|
|
143
|
+
error !== null &&
|
|
144
|
+
'code' in error &&
|
|
145
|
+
error.code === 'ENOENT') {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
throw error;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
export async function installHook(projectRoot) {
|
|
152
|
+
const hookPath = (await getHookInstallInfo(projectRoot)).hookPath;
|
|
153
|
+
let current = '';
|
|
154
|
+
try {
|
|
155
|
+
current = await readFile(hookPath, 'utf8');
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
if (typeof error === 'object' &&
|
|
159
|
+
error !== null &&
|
|
160
|
+
'code' in error &&
|
|
161
|
+
error.code !== 'ENOENT') {
|
|
162
|
+
throw error;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
if (current.includes(HOOK_MARKER_START)) {
|
|
166
|
+
await chmod(hookPath, 0o755);
|
|
167
|
+
return hookPath;
|
|
168
|
+
}
|
|
169
|
+
const includeShebang = current.trim().length === 0;
|
|
170
|
+
const snippet = createHookSnippet({ includeShebang });
|
|
171
|
+
await ensureDir(dirname(hookPath));
|
|
172
|
+
const next = current.trim().length > 0
|
|
173
|
+
? `${current.trimEnd()}\n\n${snippet}\n`
|
|
174
|
+
: `${snippet}\n`;
|
|
175
|
+
await writeFile(hookPath, next, 'utf8');
|
|
176
|
+
await chmod(hookPath, 0o755);
|
|
177
|
+
return hookPath;
|
|
178
|
+
}
|
|
179
|
+
function removeHookSnippet(content) {
|
|
180
|
+
const markerStart = escapeRegExp(HOOK_MARKER_START);
|
|
181
|
+
const markerEnd = escapeRegExp(HOOK_MARKER_END);
|
|
182
|
+
const normalized = content.replaceAll('\r\n', '\n');
|
|
183
|
+
const wholeSnippetPattern = new RegExp(`^#!/bin/sh\\n\\n${markerStart}[\\s\\S]*?${markerEnd}\\n?$`);
|
|
184
|
+
if (wholeSnippetPattern.test(normalized)) {
|
|
185
|
+
return '';
|
|
186
|
+
}
|
|
187
|
+
const markerBlockPattern = new RegExp(`\\n?${markerStart}[\\s\\S]*?${markerEnd}\\n?`, 'm');
|
|
188
|
+
const withoutMarker = normalized.replace(markerBlockPattern, '\n');
|
|
189
|
+
const compacted = withoutMarker.replace(/\n{3,}/g, '\n\n').trimEnd();
|
|
190
|
+
return compacted.length > 0 ? `${compacted}\n` : '';
|
|
191
|
+
}
|
|
192
|
+
export async function uninstallHook(projectRoot) {
|
|
193
|
+
const hooksDir = await resolveHooksDirectory(projectRoot);
|
|
194
|
+
const hookPath = join(hooksDir, 'pre-commit');
|
|
195
|
+
let current = '';
|
|
196
|
+
try {
|
|
197
|
+
current = await readFile(hookPath, 'utf8');
|
|
198
|
+
}
|
|
199
|
+
catch (error) {
|
|
200
|
+
if (typeof error === 'object' &&
|
|
201
|
+
error !== null &&
|
|
202
|
+
'code' in error &&
|
|
203
|
+
error.code === 'ENOENT') {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
throw error;
|
|
207
|
+
}
|
|
208
|
+
if (!current.includes(HOOK_MARKER_START)) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const next = removeHookSnippet(current);
|
|
212
|
+
if (next.trim().length === 0) {
|
|
213
|
+
const hookStat = await lstat(hookPath);
|
|
214
|
+
if (hookStat.isSymbolicLink()) {
|
|
215
|
+
// Preserve the symlink — write empty content through it instead of
|
|
216
|
+
// deleting the link itself (which would break managed hook setups).
|
|
217
|
+
await writeFile(hookPath, '', 'utf8');
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
await rm(hookPath, { force: true });
|
|
221
|
+
}
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
await writeFile(hookPath, next, 'utf8');
|
|
225
|
+
}
|
|
226
|
+
async function runStatusCommandDefault(cwd) {
|
|
227
|
+
try {
|
|
228
|
+
await execFileAsync('oat', ['status', '--scope', 'project'], { cwd });
|
|
229
|
+
return true;
|
|
230
|
+
}
|
|
231
|
+
catch {
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
export async function runHookCheck(cwd, options = {}) {
|
|
236
|
+
const runStatusCommand = options.runStatusCommand ?? runStatusCommandDefault;
|
|
237
|
+
const warn = options.warn ??
|
|
238
|
+
((message) => {
|
|
239
|
+
process.stderr.write(`${message}\n`);
|
|
240
|
+
});
|
|
241
|
+
let inSync = false;
|
|
242
|
+
try {
|
|
243
|
+
// Default impl already returns boolean on failures, but this catch
|
|
244
|
+
// protects custom injected implementations from escaping exceptions.
|
|
245
|
+
inSync = await runStatusCommand(cwd);
|
|
246
|
+
}
|
|
247
|
+
catch {
|
|
248
|
+
inSync = false;
|
|
249
|
+
}
|
|
250
|
+
if (!inSync) {
|
|
251
|
+
warn(HOOK_DRIFT_WARNING);
|
|
252
|
+
}
|
|
253
|
+
return { inSync };
|
|
254
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { computeSyncPlan } from './compute-plan.js';
|
|
2
|
+
export { type EngineScope, type RemovalSyncPlanEntry, SYNC_OPERATION_TYPES, type SyncOperationType, type SyncPlan, type SyncPlanEntry, type SyncResult, } from './engine.types.js';
|
|
3
|
+
export { executeSyncPlan } from './execute-plan.js';
|
|
4
|
+
export { configureLocalHooksPath, getHookInstallInfo, HOOK_DRIFT_WARNING, HOOK_MARKER_END, HOOK_MARKER_START, installHook, isHookInstalled, REPO_GITHOOKS_PATH, runHookCheck, uninstallHook, } from './hook.js';
|
|
5
|
+
export type { HookInstallInfo } from './hook.js';
|
|
6
|
+
export { hasMarker, insertMarker, OAT_DIRECTORY_SENTINEL, OAT_MARKER_PREFIX, writeDirectorySentinel, } from './markers.js';
|
|
7
|
+
export type { CanonicalEntry } from './scanner.js';
|
|
8
|
+
export { scanCanonical } from './scanner.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/engine/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,UAAU,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,aAAa,GACd,MAAM,QAAQ,CAAC;AAChB,YAAY,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,SAAS,EACT,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { computeSyncPlan } from './compute-plan.js';
|
|
2
|
+
export { SYNC_OPERATION_TYPES, } from './engine.types.js';
|
|
3
|
+
export { executeSyncPlan } from './execute-plan.js';
|
|
4
|
+
export { configureLocalHooksPath, getHookInstallInfo, HOOK_DRIFT_WARNING, HOOK_MARKER_END, HOOK_MARKER_START, installHook, isHookInstalled, REPO_GITHOOKS_PATH, runHookCheck, uninstallHook, } from './hook.js';
|
|
5
|
+
export { hasMarker, insertMarker, OAT_DIRECTORY_SENTINEL, OAT_MARKER_PREFIX, writeDirectorySentinel, } from './markers.js';
|
|
6
|
+
export { scanCanonical } from './scanner.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const OAT_MARKER_PREFIX = "<!-- OAT-managed: do not edit directly.";
|
|
2
|
+
export declare const OAT_DIRECTORY_SENTINEL = ".oat-generated";
|
|
3
|
+
export declare function hasMarker(filePath: string): Promise<boolean>;
|
|
4
|
+
export declare function insertMarker(filePath: string, canonicalPath: string): Promise<void>;
|
|
5
|
+
export declare function writeDirectorySentinel(directoryPath: string, canonicalPath: string): Promise<void>;
|
|
6
|
+
//# sourceMappingURL=markers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markers.d.ts","sourceRoot":"","sources":["../../src/engine/markers.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,4CAA4C,CAAC;AAC3E,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AAMvD,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGlE;AAED,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAsB,sBAAsB,CAC1C,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { readFile, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
export const OAT_MARKER_PREFIX = '<!-- OAT-managed: do not edit directly.';
|
|
4
|
+
export const OAT_DIRECTORY_SENTINEL = '.oat-generated';
|
|
5
|
+
function buildMarkerLine(canonicalPath) {
|
|
6
|
+
return `${OAT_MARKER_PREFIX} Source: ${canonicalPath} -->`;
|
|
7
|
+
}
|
|
8
|
+
export async function hasMarker(filePath) {
|
|
9
|
+
const contents = await readFile(filePath, 'utf8');
|
|
10
|
+
return contents.startsWith(OAT_MARKER_PREFIX);
|
|
11
|
+
}
|
|
12
|
+
export async function insertMarker(filePath, canonicalPath) {
|
|
13
|
+
const contents = await readFile(filePath, 'utf8');
|
|
14
|
+
if (contents.startsWith(OAT_MARKER_PREFIX)) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const marker = buildMarkerLine(canonicalPath);
|
|
18
|
+
await writeFile(filePath, `${marker}\n${contents}`, 'utf8');
|
|
19
|
+
}
|
|
20
|
+
export async function writeDirectorySentinel(directoryPath, canonicalPath) {
|
|
21
|
+
const sentinelPath = join(directoryPath, OAT_DIRECTORY_SENTINEL);
|
|
22
|
+
const marker = buildMarkerLine(canonicalPath);
|
|
23
|
+
await writeFile(sentinelPath, `${marker}\n`, 'utf8');
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Scope } from '../shared/types.js';
|
|
2
|
+
type ConcreteScope = Exclude<Scope, 'all'>;
|
|
3
|
+
export interface CanonicalEntry {
|
|
4
|
+
name: string;
|
|
5
|
+
type: 'skill' | 'agent' | 'rule';
|
|
6
|
+
canonicalPath: string;
|
|
7
|
+
isFile: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function scanCanonical(basePath: string, scope: ConcreteScope): Promise<CanonicalEntry[]>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=scanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../src/engine/scanner.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAEhE,KAAK,aAAa,GAAG,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;CACjB;AA0DD,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,cAAc,EAAE,CAAC,CA2B3B"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { readdir } from 'node:fs/promises';
|
|
2
|
+
import { join, resolve } from 'node:path';
|
|
3
|
+
import { CliError } from '../errors/index.js';
|
|
4
|
+
import { SCOPE_CONTENT_TYPES } from '../shared/types.js';
|
|
5
|
+
function canonicalDirectoryName(contentType) {
|
|
6
|
+
if (contentType === 'skill') {
|
|
7
|
+
return 'skills';
|
|
8
|
+
}
|
|
9
|
+
if (contentType === 'agent') {
|
|
10
|
+
return 'agents';
|
|
11
|
+
}
|
|
12
|
+
return 'rules';
|
|
13
|
+
}
|
|
14
|
+
async function readEntries(dirPath) {
|
|
15
|
+
try {
|
|
16
|
+
const entries = await readdir(dirPath, { withFileTypes: true });
|
|
17
|
+
const results = [];
|
|
18
|
+
for (const entry of entries) {
|
|
19
|
+
if (entry.isDirectory()) {
|
|
20
|
+
results.push({ name: entry.name, isFile: false });
|
|
21
|
+
}
|
|
22
|
+
else if (entry.isFile() && entry.name.endsWith('.md')) {
|
|
23
|
+
results.push({ name: entry.name, isFile: true });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
results.sort((left, right) => left.name.localeCompare(right.name));
|
|
27
|
+
return results;
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
if (typeof error === 'object' &&
|
|
31
|
+
error !== null &&
|
|
32
|
+
'code' in error &&
|
|
33
|
+
error.code === 'ENOENT') {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
if (typeof error === 'object' &&
|
|
37
|
+
error !== null &&
|
|
38
|
+
'code' in error &&
|
|
39
|
+
(error.code === 'EACCES' || error.code === 'EPERM')) {
|
|
40
|
+
throw new CliError(`Permission denied reading canonical directory ${dirPath}. Adjust permissions and retry.`);
|
|
41
|
+
}
|
|
42
|
+
throw error;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export async function scanCanonical(basePath, scope) {
|
|
46
|
+
const scopeRoot = resolve(basePath);
|
|
47
|
+
const entries = [];
|
|
48
|
+
for (const contentType of SCOPE_CONTENT_TYPES[scope]) {
|
|
49
|
+
const contentDir = join(scopeRoot, '.agents', canonicalDirectoryName(contentType));
|
|
50
|
+
const includeFiles = contentType === 'agent' || contentType === 'rule';
|
|
51
|
+
const scanned = await readEntries(contentDir);
|
|
52
|
+
for (const scannedEntry of scanned) {
|
|
53
|
+
if (scannedEntry.isFile && !includeFiles) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
entries.push({
|
|
57
|
+
name: scannedEntry.name,
|
|
58
|
+
type: contentType,
|
|
59
|
+
canonicalPath: join(contentDir, scannedEntry.name),
|
|
60
|
+
isFile: scannedEntry.isFile,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return entries;
|
|
65
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-helpers.d.ts","sourceRoot":"","sources":["../../src/engine/test-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAEvE,wBAAgB,iBAAiB,CAC/B,SAAS,GAAE,OAAO,CAAC,eAAe,CAAM,GACvC,eAAe,CA8BjB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export function createTestAdapter(overrides = {}) {
|
|
2
|
+
return {
|
|
3
|
+
name: 'claude',
|
|
4
|
+
displayName: 'Claude Code',
|
|
5
|
+
defaultStrategy: 'symlink',
|
|
6
|
+
projectMappings: [
|
|
7
|
+
{
|
|
8
|
+
contentType: 'skill',
|
|
9
|
+
canonicalDir: '.agents/skills',
|
|
10
|
+
providerDir: '.claude/skills',
|
|
11
|
+
nativeRead: false,
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
contentType: 'agent',
|
|
15
|
+
canonicalDir: '.agents/agents',
|
|
16
|
+
providerDir: '.claude/agents',
|
|
17
|
+
nativeRead: false,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
userMappings: [
|
|
21
|
+
{
|
|
22
|
+
contentType: 'skill',
|
|
23
|
+
canonicalDir: '.agents/skills',
|
|
24
|
+
providerDir: '.claude/skills',
|
|
25
|
+
nativeRead: false,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
detect: async () => true,
|
|
29
|
+
...overrides,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-error.d.ts","sourceRoot":"","sources":["../../src/errors/cli-error.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;aAGf,QAAQ,EAAE,CAAC,GAAG,CAAC;gBAD/B,OAAO,EAAE,MAAM,EACC,QAAQ,GAAE,CAAC,GAAG,CAAK;CAKtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CliError } from './cli-error.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/fs/assets.ts"],"names":[],"mappings":"AAMA,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAsBzD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { stat } from 'node:fs/promises';
|
|
2
|
+
import { dirname, join, resolve } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { CliError } from '../errors/index.js';
|
|
5
|
+
export async function resolveAssetsRoot() {
|
|
6
|
+
const modulePath = fileURLToPath(import.meta.url);
|
|
7
|
+
const cliRoot = resolve(dirname(modulePath), '..', '..');
|
|
8
|
+
const assetsRoot = join(cliRoot, 'assets');
|
|
9
|
+
try {
|
|
10
|
+
const assetsStat = await stat(assetsRoot);
|
|
11
|
+
if (!assetsStat.isDirectory()) {
|
|
12
|
+
throw new CliError(`Assets path is not a directory: ${assetsRoot}`, 2);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
if (error instanceof CliError) {
|
|
17
|
+
throw error;
|
|
18
|
+
}
|
|
19
|
+
throw new CliError(`Assets directory not found: ${assetsRoot}. Run 'pnpm build' to generate bundled assets.`, 2);
|
|
20
|
+
}
|
|
21
|
+
return assetsRoot;
|
|
22
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { resolveAssetsRoot } from './assets.js';
|
|
2
|
+
export { atomicWriteJson, copyDirectory, copySingleFile, createSymlink, dirExists, ensureDir, fileExists, } from './io.js';
|
|
3
|
+
export { normalizeToPosixPath, resolveProjectRoot, resolveScopeRoot, toPosixPath, validatePathWithinScope, } from './paths.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EACL,eAAe,EACf,aAAa,EACb,cAAc,EACd,aAAa,EACb,SAAS,EACT,SAAS,EACT,UAAU,GACX,MAAM,MAAM,CAAC;AACd,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
|
package/dist/fs/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { resolveAssetsRoot } from './assets.js';
|
|
2
|
+
export { atomicWriteJson, copyDirectory, copySingleFile, createSymlink, dirExists, ensureDir, fileExists, } from './io.js';
|
|
3
|
+
export { normalizeToPosixPath, resolveProjectRoot, resolveScopeRoot, toPosixPath, validatePathWithinScope, } from './paths.js';
|
package/dist/fs/io.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function fileExists(path: string): Promise<boolean>;
|
|
2
|
+
export declare function dirExists(path: string): Promise<boolean>;
|
|
3
|
+
export type LinkStrategy = 'symlink' | 'copy';
|
|
4
|
+
export declare function ensureDir(dirPath: string): Promise<void>;
|
|
5
|
+
export declare function copyDirectory(src: string, dest: string): Promise<void>;
|
|
6
|
+
export declare function copySingleFile(src: string, dest: string): Promise<void>;
|
|
7
|
+
export declare function createSymlink(target: string, linkPath: string, onFallback?: (error: unknown) => void, isFile?: boolean): Promise<LinkStrategy>;
|
|
8
|
+
export declare function atomicWriteJson(filePath: string, data: unknown): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=io.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../src/fs/io.ts"],"names":[],"mappings":"AAYA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO/D;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO9D;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9C,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB5E;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI7E;AAED,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EACrC,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,YAAY,CAAC,CAuBvB;AAED,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,IAAI,CAAC,CAKf"}
|
package/dist/fs/io.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { mkdir, readdir, readFile, rename, rm, stat, symlink, writeFile, } from 'node:fs/promises';
|
|
2
|
+
import { dirname, isAbsolute, join, relative } from 'node:path';
|
|
3
|
+
export async function fileExists(path) {
|
|
4
|
+
try {
|
|
5
|
+
const s = await stat(path);
|
|
6
|
+
return s.isFile();
|
|
7
|
+
}
|
|
8
|
+
catch {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export async function dirExists(path) {
|
|
13
|
+
try {
|
|
14
|
+
const s = await stat(path);
|
|
15
|
+
return s.isDirectory();
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export async function ensureDir(dirPath) {
|
|
22
|
+
await mkdir(dirPath, { recursive: true });
|
|
23
|
+
}
|
|
24
|
+
export async function copyDirectory(src, dest) {
|
|
25
|
+
await ensureDir(dest);
|
|
26
|
+
const entries = await readdir(src, { withFileTypes: true });
|
|
27
|
+
for (const entry of entries) {
|
|
28
|
+
const sourcePath = join(src, entry.name);
|
|
29
|
+
const destPath = join(dest, entry.name);
|
|
30
|
+
if (entry.isDirectory()) {
|
|
31
|
+
await copyDirectory(sourcePath, destPath);
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (entry.isFile()) {
|
|
35
|
+
const content = await readFile(sourcePath);
|
|
36
|
+
await writeFile(destPath, content);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export async function copySingleFile(src, dest) {
|
|
41
|
+
await ensureDir(dirname(dest));
|
|
42
|
+
const content = await readFile(src);
|
|
43
|
+
await writeFile(dest, content);
|
|
44
|
+
}
|
|
45
|
+
export async function createSymlink(target, linkPath, onFallback, isFile) {
|
|
46
|
+
await ensureDir(dirname(linkPath));
|
|
47
|
+
// Use relative symlink targets so links stay valid when the source tree
|
|
48
|
+
// moves (e.g., git worktrees that are later deleted). The original absolute
|
|
49
|
+
// path is preserved for the copy fallback below.
|
|
50
|
+
const symlinkTarget = isAbsolute(target)
|
|
51
|
+
? relative(dirname(linkPath), target)
|
|
52
|
+
: target;
|
|
53
|
+
try {
|
|
54
|
+
await symlink(symlinkTarget, linkPath, isFile ? 'file' : 'dir');
|
|
55
|
+
return 'symlink';
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
onFallback?.(error);
|
|
59
|
+
await rm(linkPath, { recursive: true, force: true });
|
|
60
|
+
if (isFile) {
|
|
61
|
+
await copySingleFile(target, linkPath);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
await copyDirectory(target, linkPath);
|
|
65
|
+
}
|
|
66
|
+
return 'copy';
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export async function atomicWriteJson(filePath, data) {
|
|
70
|
+
const tempPath = `${filePath}.tmp`;
|
|
71
|
+
await ensureDir(dirname(filePath));
|
|
72
|
+
await writeFile(tempPath, `${JSON.stringify(data, null, 2)}\n`, 'utf8');
|
|
73
|
+
await rename(tempPath, filePath);
|
|
74
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Scope } from '../shared/types.js';
|
|
2
|
+
type ConcreteScope = Exclude<Scope, 'all'>;
|
|
3
|
+
export declare function resolveProjectRoot(cwd: string): Promise<string>;
|
|
4
|
+
export declare function resolveScopeRoot(scope: ConcreteScope, cwd: string, home: string): string;
|
|
5
|
+
export declare function toPosixPath(pathValue: string): string;
|
|
6
|
+
export declare function normalizeToPosixPath(pathValue: string): string;
|
|
7
|
+
export declare function validatePathWithinScope(candidatePath: string, scopeRoot: string): string;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/fs/paths.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,KAAK,aAAa,GAAG,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAE3C,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBrE;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,MAAM,CAMR;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,GAChB,MAAM,CAcR"}
|
package/dist/fs/paths.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { access } from 'node:fs/promises';
|
|
2
|
+
import { dirname, posix, resolve, sep } from 'node:path';
|
|
3
|
+
import { CliError } from '../errors/index.js';
|
|
4
|
+
export async function resolveProjectRoot(cwd) {
|
|
5
|
+
let current = resolve(cwd);
|
|
6
|
+
while (true) {
|
|
7
|
+
try {
|
|
8
|
+
await access(resolve(current, '.git'));
|
|
9
|
+
return current;
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
const parent = dirname(current);
|
|
13
|
+
if (parent === current) {
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
current = parent;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
throw new CliError(`Unable to resolve project root from ${cwd}`, 2);
|
|
20
|
+
}
|
|
21
|
+
export function resolveScopeRoot(scope, cwd, home) {
|
|
22
|
+
if (scope === 'user') {
|
|
23
|
+
return resolve(home);
|
|
24
|
+
}
|
|
25
|
+
return resolve(cwd);
|
|
26
|
+
}
|
|
27
|
+
export function toPosixPath(pathValue) {
|
|
28
|
+
return pathValue.replaceAll('\\', '/');
|
|
29
|
+
}
|
|
30
|
+
export function normalizeToPosixPath(pathValue) {
|
|
31
|
+
return posix.normalize(toPosixPath(pathValue));
|
|
32
|
+
}
|
|
33
|
+
export function validatePathWithinScope(candidatePath, scopeRoot) {
|
|
34
|
+
const resolvedScopeRoot = resolve(scopeRoot);
|
|
35
|
+
const resolvedCandidatePath = resolve(candidatePath);
|
|
36
|
+
const isInside = resolvedCandidatePath === resolvedScopeRoot ||
|
|
37
|
+
resolvedCandidatePath.startsWith(`${resolvedScopeRoot}${sep}`);
|
|
38
|
+
if (!isInside) {
|
|
39
|
+
throw new CliError(`Path ${candidatePath} is outside scope root ${scopeRoot}`);
|
|
40
|
+
}
|
|
41
|
+
return resolvedCandidatePath;
|
|
42
|
+
}
|