@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,319 @@
|
|
|
1
|
+
import { execSync } from 'node:child_process';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { basename, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
4
|
+
import { atomicWriteJson, dirExists, fileExists } from '../fs/io.js';
|
|
5
|
+
import { normalizeToPosixPath } from '../fs/paths.js';
|
|
6
|
+
const DEFAULT_OAT_CONFIG = { version: 1 };
|
|
7
|
+
const DEFAULT_OAT_LOCAL_CONFIG = { version: 1 };
|
|
8
|
+
const DEFAULT_USER_CONFIG = { version: 1 };
|
|
9
|
+
function getConfigPath(repoRoot) {
|
|
10
|
+
return join(repoRoot, '.oat', 'config.json');
|
|
11
|
+
}
|
|
12
|
+
function getLocalConfigPath(repoRoot) {
|
|
13
|
+
return join(repoRoot, '.oat', 'config.local.json');
|
|
14
|
+
}
|
|
15
|
+
function isRecord(value) {
|
|
16
|
+
return typeof value === 'object' && value !== null;
|
|
17
|
+
}
|
|
18
|
+
function isMissingFileError(error) {
|
|
19
|
+
return (typeof error === 'object' &&
|
|
20
|
+
error !== null &&
|
|
21
|
+
'code' in error &&
|
|
22
|
+
error.code === 'ENOENT');
|
|
23
|
+
}
|
|
24
|
+
function trimPathValue(value) {
|
|
25
|
+
return value.replace(/\/+$/, '').replace(/^\.\//, '').trim();
|
|
26
|
+
}
|
|
27
|
+
function normalizeProjectPath(repoRoot, pathValue) {
|
|
28
|
+
if (pathValue == null) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
const trimmed = pathValue.trim();
|
|
32
|
+
if (!trimmed) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
if (!isAbsolute(trimmed)) {
|
|
36
|
+
const normalizedRelative = trimPathValue(normalizeToPosixPath(trimmed));
|
|
37
|
+
return normalizedRelative && normalizedRelative !== '.'
|
|
38
|
+
? normalizedRelative
|
|
39
|
+
: null;
|
|
40
|
+
}
|
|
41
|
+
const repoRootResolved = resolve(repoRoot);
|
|
42
|
+
const absoluteResolved = resolve(trimmed);
|
|
43
|
+
const isInsideRepo = absoluteResolved === repoRootResolved ||
|
|
44
|
+
absoluteResolved.startsWith(`${repoRootResolved}${sep}`);
|
|
45
|
+
if (!isInsideRepo) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const relativePath = normalizeToPosixPath(relative(repoRootResolved, absoluteResolved));
|
|
49
|
+
const normalizedRelative = trimPathValue(relativePath);
|
|
50
|
+
return normalizedRelative && normalizedRelative !== '.'
|
|
51
|
+
? normalizedRelative
|
|
52
|
+
: null;
|
|
53
|
+
}
|
|
54
|
+
function normalizeOatConfig(parsed) {
|
|
55
|
+
const next = { ...DEFAULT_OAT_CONFIG };
|
|
56
|
+
if (!isRecord(parsed)) {
|
|
57
|
+
return next;
|
|
58
|
+
}
|
|
59
|
+
if (isRecord(parsed.worktrees) &&
|
|
60
|
+
typeof parsed.worktrees.root === 'string' &&
|
|
61
|
+
parsed.worktrees.root.trim()) {
|
|
62
|
+
next.worktrees = { root: parsed.worktrees.root.trim() };
|
|
63
|
+
}
|
|
64
|
+
if (isRecord(parsed.projects) &&
|
|
65
|
+
typeof parsed.projects.root === 'string' &&
|
|
66
|
+
parsed.projects.root.trim()) {
|
|
67
|
+
next.projects = { root: parsed.projects.root.trim() };
|
|
68
|
+
}
|
|
69
|
+
if (isRecord(parsed.git)) {
|
|
70
|
+
const git = {};
|
|
71
|
+
if (typeof parsed.git.defaultBranch === 'string' &&
|
|
72
|
+
parsed.git.defaultBranch.trim()) {
|
|
73
|
+
git.defaultBranch = parsed.git.defaultBranch.trim();
|
|
74
|
+
}
|
|
75
|
+
if (Object.keys(git).length > 0) {
|
|
76
|
+
next.git = git;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (isRecord(parsed.archive)) {
|
|
80
|
+
const archive = {};
|
|
81
|
+
if (typeof parsed.archive.s3Uri === 'string' &&
|
|
82
|
+
parsed.archive.s3Uri.trim()) {
|
|
83
|
+
archive.s3Uri = parsed.archive.s3Uri.trim().replace(/\/+$/, '');
|
|
84
|
+
}
|
|
85
|
+
if (typeof parsed.archive.s3SyncOnComplete === 'boolean') {
|
|
86
|
+
archive.s3SyncOnComplete = parsed.archive.s3SyncOnComplete;
|
|
87
|
+
}
|
|
88
|
+
if (typeof parsed.archive.summaryExportPath === 'string' &&
|
|
89
|
+
parsed.archive.summaryExportPath.trim()) {
|
|
90
|
+
archive.summaryExportPath = normalizeToPosixPath(parsed.archive.summaryExportPath.trim().replace(/\/+$/, ''));
|
|
91
|
+
}
|
|
92
|
+
if (Object.keys(archive).length > 0) {
|
|
93
|
+
next.archive = archive;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (isRecord(parsed.documentation)) {
|
|
97
|
+
const doc = {};
|
|
98
|
+
if (typeof parsed.documentation.root === 'string' &&
|
|
99
|
+
parsed.documentation.root.trim()) {
|
|
100
|
+
doc.root = parsed.documentation.root.trim();
|
|
101
|
+
}
|
|
102
|
+
if (typeof parsed.documentation.tooling === 'string' &&
|
|
103
|
+
parsed.documentation.tooling.trim()) {
|
|
104
|
+
doc.tooling = parsed.documentation.tooling.trim();
|
|
105
|
+
}
|
|
106
|
+
if (typeof parsed.documentation.config === 'string' &&
|
|
107
|
+
parsed.documentation.config.trim()) {
|
|
108
|
+
doc.config = parsed.documentation.config.trim();
|
|
109
|
+
}
|
|
110
|
+
if (typeof parsed.documentation.index === 'string' &&
|
|
111
|
+
parsed.documentation.index.trim()) {
|
|
112
|
+
doc.index = parsed.documentation.index.trim();
|
|
113
|
+
}
|
|
114
|
+
if (typeof parsed.documentation.requireForProjectCompletion === 'boolean') {
|
|
115
|
+
doc.requireForProjectCompletion =
|
|
116
|
+
parsed.documentation.requireForProjectCompletion;
|
|
117
|
+
}
|
|
118
|
+
if (Object.keys(doc).length > 0) {
|
|
119
|
+
next.documentation = doc;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (Array.isArray(parsed.localPaths)) {
|
|
123
|
+
const filtered = parsed.localPaths.filter((v) => typeof v === 'string' && v.trim() !== '');
|
|
124
|
+
if (filtered.length > 0) {
|
|
125
|
+
next.localPaths = [...new Set(filtered)].sort();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (typeof parsed.autoReviewAtCheckpoints === 'boolean') {
|
|
129
|
+
next.autoReviewAtCheckpoints = parsed.autoReviewAtCheckpoints;
|
|
130
|
+
}
|
|
131
|
+
return next;
|
|
132
|
+
}
|
|
133
|
+
function normalizeOatLocalConfig(repoRoot, parsed) {
|
|
134
|
+
const next = { ...DEFAULT_OAT_LOCAL_CONFIG };
|
|
135
|
+
if (!isRecord(parsed)) {
|
|
136
|
+
return next;
|
|
137
|
+
}
|
|
138
|
+
if ('activeProject' in parsed) {
|
|
139
|
+
const rawValue = typeof parsed.activeProject === 'string' || parsed.activeProject === null
|
|
140
|
+
? parsed.activeProject
|
|
141
|
+
: null;
|
|
142
|
+
next.activeProject = normalizeProjectPath(repoRoot, rawValue);
|
|
143
|
+
}
|
|
144
|
+
if ('lastPausedProject' in parsed) {
|
|
145
|
+
const rawValue = typeof parsed.lastPausedProject === 'string' ||
|
|
146
|
+
parsed.lastPausedProject === null
|
|
147
|
+
? parsed.lastPausedProject
|
|
148
|
+
: null;
|
|
149
|
+
next.lastPausedProject = normalizeProjectPath(repoRoot, rawValue);
|
|
150
|
+
}
|
|
151
|
+
if ('activeIdea' in parsed) {
|
|
152
|
+
next.activeIdea =
|
|
153
|
+
typeof parsed.activeIdea === 'string' && parsed.activeIdea.trim()
|
|
154
|
+
? parsed.activeIdea.trim()
|
|
155
|
+
: null;
|
|
156
|
+
}
|
|
157
|
+
return next;
|
|
158
|
+
}
|
|
159
|
+
export function resolveLocalPaths(config) {
|
|
160
|
+
return config.localPaths ?? [];
|
|
161
|
+
}
|
|
162
|
+
export async function readOatConfig(repoRoot) {
|
|
163
|
+
const configPath = getConfigPath(repoRoot);
|
|
164
|
+
try {
|
|
165
|
+
const raw = await readFile(configPath, 'utf8');
|
|
166
|
+
return normalizeOatConfig(JSON.parse(raw));
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
if (isMissingFileError(error)) {
|
|
170
|
+
return { ...DEFAULT_OAT_CONFIG };
|
|
171
|
+
}
|
|
172
|
+
throw error;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
export async function readOatLocalConfig(repoRoot) {
|
|
176
|
+
const configPath = getLocalConfigPath(repoRoot);
|
|
177
|
+
try {
|
|
178
|
+
const raw = await readFile(configPath, 'utf8');
|
|
179
|
+
return normalizeOatLocalConfig(repoRoot, JSON.parse(raw));
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
if (isMissingFileError(error)) {
|
|
183
|
+
return { ...DEFAULT_OAT_LOCAL_CONFIG };
|
|
184
|
+
}
|
|
185
|
+
throw error;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
export async function writeOatConfig(repoRoot, config) {
|
|
189
|
+
const configPath = getConfigPath(repoRoot);
|
|
190
|
+
const normalized = normalizeOatConfig(config);
|
|
191
|
+
await atomicWriteJson(configPath, normalized);
|
|
192
|
+
}
|
|
193
|
+
export async function writeOatLocalConfig(repoRoot, config) {
|
|
194
|
+
const configPath = getLocalConfigPath(repoRoot);
|
|
195
|
+
const normalized = normalizeOatLocalConfig(repoRoot, config);
|
|
196
|
+
await atomicWriteJson(configPath, normalized);
|
|
197
|
+
}
|
|
198
|
+
export async function resolveActiveProject(repoRoot) {
|
|
199
|
+
const localConfig = await readOatLocalConfig(repoRoot);
|
|
200
|
+
const projectPath = localConfig.activeProject ?? null;
|
|
201
|
+
if (!projectPath) {
|
|
202
|
+
return { name: null, path: null, status: 'unset' };
|
|
203
|
+
}
|
|
204
|
+
const absoluteProjectPath = join(repoRoot, projectPath);
|
|
205
|
+
const statePath = join(absoluteProjectPath, 'state.md');
|
|
206
|
+
const isValid = (await dirExists(absoluteProjectPath)) && (await fileExists(statePath));
|
|
207
|
+
return {
|
|
208
|
+
name: basename(absoluteProjectPath),
|
|
209
|
+
path: projectPath,
|
|
210
|
+
status: isValid ? 'active' : 'missing',
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
export async function setActiveProject(repoRoot, projectRelativePath) {
|
|
214
|
+
const normalizedPath = normalizeProjectPath(repoRoot, projectRelativePath);
|
|
215
|
+
if (!normalizedPath) {
|
|
216
|
+
throw new Error(`Active project path must be repo-relative or inside repo root: ${projectRelativePath}`);
|
|
217
|
+
}
|
|
218
|
+
const localConfig = await readOatLocalConfig(repoRoot);
|
|
219
|
+
await writeOatLocalConfig(repoRoot, {
|
|
220
|
+
...localConfig,
|
|
221
|
+
activeProject: normalizedPath,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
export async function clearActiveProject(repoRoot, options) {
|
|
225
|
+
const localConfig = await readOatLocalConfig(repoRoot);
|
|
226
|
+
const lastPaused = options?.lastPaused === undefined
|
|
227
|
+
? localConfig.lastPausedProject
|
|
228
|
+
: normalizeProjectPath(repoRoot, options.lastPaused);
|
|
229
|
+
await writeOatLocalConfig(repoRoot, {
|
|
230
|
+
...localConfig,
|
|
231
|
+
activeProject: null,
|
|
232
|
+
lastPausedProject: lastPaused,
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
function getUserConfigPath(userConfigDir) {
|
|
236
|
+
return join(userConfigDir, 'config.json');
|
|
237
|
+
}
|
|
238
|
+
function normalizeUserConfig(parsed) {
|
|
239
|
+
const next = { ...DEFAULT_USER_CONFIG };
|
|
240
|
+
if (!isRecord(parsed)) {
|
|
241
|
+
return next;
|
|
242
|
+
}
|
|
243
|
+
if ('activeIdea' in parsed) {
|
|
244
|
+
next.activeIdea =
|
|
245
|
+
typeof parsed.activeIdea === 'string' && parsed.activeIdea.trim()
|
|
246
|
+
? parsed.activeIdea.trim()
|
|
247
|
+
: null;
|
|
248
|
+
}
|
|
249
|
+
return next;
|
|
250
|
+
}
|
|
251
|
+
export async function readUserConfig(userConfigDir) {
|
|
252
|
+
const configPath = getUserConfigPath(userConfigDir);
|
|
253
|
+
try {
|
|
254
|
+
const raw = await readFile(configPath, 'utf8');
|
|
255
|
+
return normalizeUserConfig(JSON.parse(raw));
|
|
256
|
+
}
|
|
257
|
+
catch (error) {
|
|
258
|
+
if (isMissingFileError(error)) {
|
|
259
|
+
return { ...DEFAULT_USER_CONFIG };
|
|
260
|
+
}
|
|
261
|
+
throw error;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
export async function writeUserConfig(userConfigDir, config) {
|
|
265
|
+
const configPath = getUserConfigPath(userConfigDir);
|
|
266
|
+
const normalized = normalizeUserConfig(config);
|
|
267
|
+
await atomicWriteJson(configPath, normalized);
|
|
268
|
+
}
|
|
269
|
+
export async function resolveActiveIdea(repoRoot, userConfigDir) {
|
|
270
|
+
const localConfig = await readOatLocalConfig(repoRoot);
|
|
271
|
+
if (localConfig.activeIdea) {
|
|
272
|
+
return localConfig.activeIdea;
|
|
273
|
+
}
|
|
274
|
+
const userConfig = await readUserConfig(userConfigDir);
|
|
275
|
+
return userConfig.activeIdea ?? null;
|
|
276
|
+
}
|
|
277
|
+
export async function setActiveIdea(repoRoot, ideaPath) {
|
|
278
|
+
const localConfig = await readOatLocalConfig(repoRoot);
|
|
279
|
+
await writeOatLocalConfig(repoRoot, {
|
|
280
|
+
...localConfig,
|
|
281
|
+
activeIdea: ideaPath.trim(),
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
export async function clearActiveIdea(repoRoot) {
|
|
285
|
+
const localConfig = await readOatLocalConfig(repoRoot);
|
|
286
|
+
await writeOatLocalConfig(repoRoot, {
|
|
287
|
+
...localConfig,
|
|
288
|
+
activeIdea: null,
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
export function detectDefaultBranch(repoRoot) {
|
|
292
|
+
try {
|
|
293
|
+
const branch = execSync('gh repo view --json defaultBranchRef --jq .defaultBranchRef.name', {
|
|
294
|
+
cwd: repoRoot,
|
|
295
|
+
encoding: 'utf8',
|
|
296
|
+
timeout: 10_000,
|
|
297
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
298
|
+
}).trim();
|
|
299
|
+
if (branch)
|
|
300
|
+
return branch;
|
|
301
|
+
}
|
|
302
|
+
catch {
|
|
303
|
+
// gh not available or not authenticated — fall through
|
|
304
|
+
}
|
|
305
|
+
try {
|
|
306
|
+
const ref = execSync('git rev-parse --abbrev-ref origin/HEAD', {
|
|
307
|
+
cwd: repoRoot,
|
|
308
|
+
encoding: 'utf8',
|
|
309
|
+
timeout: 5_000,
|
|
310
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
311
|
+
}).trim();
|
|
312
|
+
if (ref.startsWith('origin/'))
|
|
313
|
+
return ref.replace('origin/', '');
|
|
314
|
+
}
|
|
315
|
+
catch {
|
|
316
|
+
// origin/HEAD not set — fall through
|
|
317
|
+
}
|
|
318
|
+
return 'main';
|
|
319
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/config/runtime.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAEpD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const ProviderConfigSchema: z.ZodObject<{
|
|
3
|
+
strategy: z.ZodOptional<z.ZodEnum<["symlink", "copy", "auto"]>>;
|
|
4
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
strategy?: "symlink" | "copy" | "auto" | undefined;
|
|
7
|
+
enabled?: boolean | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
strategy?: "symlink" | "copy" | "auto" | undefined;
|
|
10
|
+
enabled?: boolean | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const SyncConfigSchema: z.ZodObject<{
|
|
13
|
+
version: z.ZodLiteral<1>;
|
|
14
|
+
defaultStrategy: z.ZodEnum<["symlink", "copy", "auto"]>;
|
|
15
|
+
providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
16
|
+
strategy: z.ZodOptional<z.ZodEnum<["symlink", "copy", "auto"]>>;
|
|
17
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
strategy?: "symlink" | "copy" | "auto" | undefined;
|
|
20
|
+
enabled?: boolean | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
strategy?: "symlink" | "copy" | "auto" | undefined;
|
|
23
|
+
enabled?: boolean | undefined;
|
|
24
|
+
}>>>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
version: 1;
|
|
27
|
+
defaultStrategy: "symlink" | "copy" | "auto";
|
|
28
|
+
providers?: Record<string, {
|
|
29
|
+
strategy?: "symlink" | "copy" | "auto" | undefined;
|
|
30
|
+
enabled?: boolean | undefined;
|
|
31
|
+
}> | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
version: 1;
|
|
34
|
+
defaultStrategy: "symlink" | "copy" | "auto";
|
|
35
|
+
providers?: Record<string, {
|
|
36
|
+
strategy?: "symlink" | "copy" | "auto" | undefined;
|
|
37
|
+
enabled?: boolean | undefined;
|
|
38
|
+
}> | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
export type ProviderSyncConfig = z.infer<typeof ProviderConfigSchema>;
|
|
41
|
+
export type SyncConfig = z.infer<typeof SyncConfigSchema> & {
|
|
42
|
+
providers: Record<string, ProviderSyncConfig>;
|
|
43
|
+
};
|
|
44
|
+
export declare const DEFAULT_SYNC_CONFIG: SyncConfig;
|
|
45
|
+
export declare function loadSyncConfig(configPath: string, defaults?: SyncConfig): Promise<SyncConfig>;
|
|
46
|
+
export declare function saveSyncConfig(configPath: string, config: SyncConfig): Promise<SyncConfig>;
|
|
47
|
+
export declare function setProviderEnabled(configPath: string, providerName: string, enabled: boolean): Promise<SyncConfig>;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=sync-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-config.d.ts","sourceRoot":"","sources":["../../src/config/sync-config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,oBAAoB;;;;;;;;;EAGxB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI3B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEtE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,GAAG;IAC1D,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CAC/C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAIjC,CAAC;AAoDF,wBAAsB,cAAc,CAClC,UAAU,EAAE,MAAM,EAClB,QAAQ,GAAE,UAAgC,GACzC,OAAO,CAAC,UAAU,CAAC,CA4BrB;AAED,wBAAsB,cAAc,CAClC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,GACjB,OAAO,CAAC,UAAU,CAAC,CAWrB;AAED,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,UAAU,CAAC,CAcrB"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { CliError } from '../errors/index.js';
|
|
3
|
+
import { atomicWriteJson } from '../fs/io.js';
|
|
4
|
+
import { SyncStrategySchema } from '../shared/types.js';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
const ProviderConfigSchema = z.object({
|
|
7
|
+
strategy: SyncStrategySchema.optional(),
|
|
8
|
+
enabled: z.boolean().optional(),
|
|
9
|
+
});
|
|
10
|
+
export const SyncConfigSchema = z.object({
|
|
11
|
+
version: z.literal(1),
|
|
12
|
+
defaultStrategy: SyncStrategySchema,
|
|
13
|
+
providers: z.record(ProviderConfigSchema).optional(),
|
|
14
|
+
});
|
|
15
|
+
export const DEFAULT_SYNC_CONFIG = {
|
|
16
|
+
version: 1,
|
|
17
|
+
defaultStrategy: 'auto',
|
|
18
|
+
providers: {},
|
|
19
|
+
};
|
|
20
|
+
function mergeProviderConfigs(base, override) {
|
|
21
|
+
const merged = { ...base };
|
|
22
|
+
for (const [name, config] of Object.entries(override)) {
|
|
23
|
+
merged[name] = {
|
|
24
|
+
...(merged[name] ?? {}),
|
|
25
|
+
...config,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return merged;
|
|
29
|
+
}
|
|
30
|
+
function normalizeConfig(config, defaults) {
|
|
31
|
+
return {
|
|
32
|
+
version: 1,
|
|
33
|
+
defaultStrategy: config.defaultStrategy ?? defaults.defaultStrategy,
|
|
34
|
+
providers: mergeProviderConfigs(defaults.providers, config.providers ?? {}),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function parseSyncConfig(raw, configPath) {
|
|
38
|
+
let parsed;
|
|
39
|
+
try {
|
|
40
|
+
parsed = JSON.parse(raw);
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
throw new CliError(`Sync config at ${configPath} is not valid JSON. Fix the file and retry.`);
|
|
44
|
+
}
|
|
45
|
+
const result = SyncConfigSchema.safeParse(parsed);
|
|
46
|
+
if (!result.success) {
|
|
47
|
+
throw new CliError(`Sync config at ${configPath} failed validation. Fix the file and retry.`);
|
|
48
|
+
}
|
|
49
|
+
return result.data;
|
|
50
|
+
}
|
|
51
|
+
export async function loadSyncConfig(configPath, defaults = DEFAULT_SYNC_CONFIG) {
|
|
52
|
+
try {
|
|
53
|
+
const raw = await readFile(configPath, 'utf8');
|
|
54
|
+
return normalizeConfig(parseSyncConfig(raw, configPath), defaults);
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
if (typeof error === 'object' &&
|
|
58
|
+
error !== null &&
|
|
59
|
+
'code' in error &&
|
|
60
|
+
error.code === 'ENOENT') {
|
|
61
|
+
return {
|
|
62
|
+
...defaults,
|
|
63
|
+
providers: { ...defaults.providers },
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
if (error instanceof CliError) {
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
throw new CliError(`Unable to load sync config from ${configPath}: ${error instanceof Error ? error.message : 'unknown error'}`, 2);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export async function saveSyncConfig(configPath, config) {
|
|
73
|
+
const result = SyncConfigSchema.safeParse(config);
|
|
74
|
+
if (!result.success) {
|
|
75
|
+
throw new CliError(`Sync config at ${configPath} failed validation. Fix the config object and retry.`);
|
|
76
|
+
}
|
|
77
|
+
const normalized = normalizeConfig(result.data, DEFAULT_SYNC_CONFIG);
|
|
78
|
+
await atomicWriteJson(configPath, normalized);
|
|
79
|
+
return normalized;
|
|
80
|
+
}
|
|
81
|
+
export async function setProviderEnabled(configPath, providerName, enabled) {
|
|
82
|
+
const current = await loadSyncConfig(configPath, DEFAULT_SYNC_CONFIG);
|
|
83
|
+
const next = {
|
|
84
|
+
...current,
|
|
85
|
+
providers: {
|
|
86
|
+
...current.providers,
|
|
87
|
+
[providerName]: {
|
|
88
|
+
...(current.providers[providerName] ?? {}),
|
|
89
|
+
enabled,
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
return saveSyncConfig(configPath, next);
|
|
94
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../src/drift/detector.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAcjD,wBAAsB,WAAW,CAC/B,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,WAAW,CAAC,CAmEtB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { lstat, readlink, stat } from 'node:fs/promises';
|
|
2
|
+
import { dirname, resolve } from 'node:path';
|
|
3
|
+
import { computeContentHash } from '../manifest/hash.js';
|
|
4
|
+
function createReport(entry, state) {
|
|
5
|
+
return {
|
|
6
|
+
canonical: entry.canonicalPath,
|
|
7
|
+
provider: entry.provider,
|
|
8
|
+
providerPath: entry.providerPath,
|
|
9
|
+
state,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export async function detectDrift(entry, scopeRoot) {
|
|
13
|
+
const providerPath = resolve(scopeRoot, entry.providerPath);
|
|
14
|
+
const canonicalPath = resolve(scopeRoot, entry.canonicalPath);
|
|
15
|
+
// Missing check must run first, before strategy-specific branches.
|
|
16
|
+
let providerStat;
|
|
17
|
+
try {
|
|
18
|
+
providerStat = await lstat(providerPath);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
if (typeof error === 'object' &&
|
|
22
|
+
error !== null &&
|
|
23
|
+
'code' in error &&
|
|
24
|
+
error.code === 'ENOENT') {
|
|
25
|
+
return createReport(entry, { status: 'missing' });
|
|
26
|
+
}
|
|
27
|
+
throw error;
|
|
28
|
+
}
|
|
29
|
+
if (entry.strategy === 'symlink') {
|
|
30
|
+
if (!providerStat.isSymbolicLink()) {
|
|
31
|
+
return createReport(entry, {
|
|
32
|
+
status: 'drifted',
|
|
33
|
+
reason: 'replaced',
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
const linkTarget = await readlink(providerPath);
|
|
37
|
+
const resolvedTarget = resolve(dirname(providerPath), linkTarget);
|
|
38
|
+
try {
|
|
39
|
+
await stat(resolvedTarget);
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
if (typeof error === 'object' &&
|
|
43
|
+
error !== null &&
|
|
44
|
+
'code' in error &&
|
|
45
|
+
error.code === 'ENOENT') {
|
|
46
|
+
return createReport(entry, {
|
|
47
|
+
status: 'drifted',
|
|
48
|
+
reason: 'broken',
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
if (resolvedTarget !== canonicalPath) {
|
|
54
|
+
return createReport(entry, {
|
|
55
|
+
status: 'drifted',
|
|
56
|
+
reason: 'replaced',
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return createReport(entry, { status: 'in_sync' });
|
|
60
|
+
}
|
|
61
|
+
const currentHash = await computeContentHash(providerPath, entry.isFile);
|
|
62
|
+
if (entry.contentHash === currentHash) {
|
|
63
|
+
return createReport(entry, { status: 'in_sync' });
|
|
64
|
+
}
|
|
65
|
+
return createReport(entry, {
|
|
66
|
+
status: 'drifted',
|
|
67
|
+
reason: 'modified',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type DriftState = {
|
|
2
|
+
status: 'in_sync';
|
|
3
|
+
} | {
|
|
4
|
+
status: 'drifted';
|
|
5
|
+
reason: 'modified' | 'broken' | 'replaced';
|
|
6
|
+
} | {
|
|
7
|
+
status: 'missing';
|
|
8
|
+
} | {
|
|
9
|
+
status: 'stray';
|
|
10
|
+
};
|
|
11
|
+
export interface DriftReport {
|
|
12
|
+
canonical: string | null;
|
|
13
|
+
provider: string;
|
|
14
|
+
providerPath: string;
|
|
15
|
+
state: DriftState;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=drift.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drift.types.d.ts","sourceRoot":"","sources":["../../src/drift/drift.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAClB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAA;CAAE,GACjE;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAExB,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,UAAU,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/drift/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CanonicalEntry } from '../engine/scanner.js';
|
|
2
|
+
import type { Manifest } from '../manifest/manifest.types.js';
|
|
3
|
+
import type { PathMapping } from '../providers/shared/adapter.types.js';
|
|
4
|
+
import type { DriftReport } from './drift.types.js';
|
|
5
|
+
export declare function inferScopeRoot(providerDir: string): string;
|
|
6
|
+
export declare function detectStrays(provider: string, providerDir: string, manifest: Manifest, canonicalEntries: CanonicalEntry[], mapping?: Pick<PathMapping, 'contentType' | 'providerExtension'>): Promise<DriftReport[]>;
|
|
7
|
+
//# sourceMappingURL=strays.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strays.d.ts","sourceRoot":"","sources":["../../src/drift/strays.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAGnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAgBjD,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAoB1D;AAoHD,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,cAAc,EAAE,EAClC,OAAO,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,aAAa,GAAG,mBAAmB,CAAC,GAC/D,OAAO,CAAC,WAAW,EAAE,CAAC,CAsDxB"}
|