@harness-engineering/cli 1.15.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/commands/codex/AGENTS.md +39 -0
- package/dist/agents/commands/codex/harness/add-harness-component/SKILL.md +195 -0
- package/dist/agents/commands/codex/harness/add-harness-component/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/cleanup-dead-code/SKILL.md +248 -0
- package/dist/agents/commands/codex/harness/cleanup-dead-code/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/detect-doc-drift/SKILL.md +182 -0
- package/dist/agents/commands/codex/harness/detect-doc-drift/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/enforce-architecture/SKILL.md +299 -0
- package/dist/agents/commands/codex/harness/enforce-architecture/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-architecture-advisor/SKILL.md +452 -0
- package/dist/agents/commands/codex/harness/harness-architecture-advisor/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-autopilot/SKILL.md +919 -0
- package/dist/agents/commands/codex/harness/harness-autopilot/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-brainstorming/SKILL.md +409 -0
- package/dist/agents/commands/codex/harness/harness-brainstorming/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-code-review/SKILL.md +860 -0
- package/dist/agents/commands/codex/harness/harness-code-review/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-codebase-cleanup/SKILL.md +227 -0
- package/dist/agents/commands/codex/harness/harness-codebase-cleanup/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-debugging/SKILL.md +369 -0
- package/dist/agents/commands/codex/harness/harness-debugging/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-dependency-health/SKILL.md +182 -0
- package/dist/agents/commands/codex/harness/harness-dependency-health/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-docs-pipeline/SKILL.md +463 -0
- package/dist/agents/commands/codex/harness/harness-docs-pipeline/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-execution/SKILL.md +513 -0
- package/dist/agents/commands/codex/harness/harness-execution/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-hotspot-detector/SKILL.md +164 -0
- package/dist/agents/commands/codex/harness/harness-hotspot-detector/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-impact-analysis/SKILL.md +187 -0
- package/dist/agents/commands/codex/harness/harness-impact-analysis/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-integrity/SKILL.md +170 -0
- package/dist/agents/commands/codex/harness/harness-integrity/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-onboarding/SKILL.md +291 -0
- package/dist/agents/commands/codex/harness/harness-onboarding/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-perf/SKILL.md +263 -0
- package/dist/agents/commands/codex/harness/harness-perf/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-planning/SKILL.md +582 -0
- package/dist/agents/commands/codex/harness/harness-planning/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-refactoring/SKILL.md +172 -0
- package/dist/agents/commands/codex/harness/harness-refactoring/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-release-readiness/SKILL.md +692 -0
- package/dist/agents/commands/codex/harness/harness-release-readiness/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-roadmap/SKILL.md +598 -0
- package/dist/agents/commands/codex/harness/harness-roadmap/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-security-scan/SKILL.md +157 -0
- package/dist/agents/commands/codex/harness/harness-security-scan/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-skill-authoring/SKILL.md +295 -0
- package/dist/agents/commands/codex/harness/harness-skill-authoring/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-soundness-review/SKILL.md +1270 -0
- package/dist/agents/commands/codex/harness/harness-soundness-review/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-supply-chain-audit/SKILL.md +247 -0
- package/dist/agents/commands/codex/harness/harness-supply-chain-audit/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-tdd/SKILL.md +180 -0
- package/dist/agents/commands/codex/harness/harness-tdd/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-test-advisor/SKILL.md +163 -0
- package/dist/agents/commands/codex/harness/harness-test-advisor/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-verification/SKILL.md +424 -0
- package/dist/agents/commands/codex/harness/harness-verification/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/harness-verify/SKILL.md +162 -0
- package/dist/agents/commands/codex/harness/harness-verify/agents/openai.yaml +3 -0
- package/dist/agents/commands/codex/harness/initialize-harness-project/SKILL.md +235 -0
- package/dist/agents/commands/codex/harness/initialize-harness-project/agents/openai.yaml +3 -0
- package/dist/agents/commands/cursor/harness/add-harness-component.mdc +200 -0
- package/dist/agents/commands/cursor/harness/cleanup-dead-code.mdc +253 -0
- package/dist/agents/commands/cursor/harness/detect-doc-drift.mdc +187 -0
- package/dist/agents/commands/cursor/harness/enforce-architecture.mdc +304 -0
- package/dist/agents/commands/cursor/harness/harness-architecture-advisor.mdc +457 -0
- package/dist/agents/commands/cursor/harness/harness-autopilot.mdc +924 -0
- package/dist/agents/commands/cursor/harness/harness-brainstorming.mdc +414 -0
- package/dist/agents/commands/cursor/harness/harness-code-review.mdc +865 -0
- package/dist/agents/commands/cursor/harness/harness-codebase-cleanup.mdc +232 -0
- package/dist/agents/commands/cursor/harness/harness-debugging.mdc +374 -0
- package/dist/agents/commands/cursor/harness/harness-dependency-health.mdc +187 -0
- package/dist/agents/commands/cursor/harness/harness-docs-pipeline.mdc +468 -0
- package/dist/agents/commands/cursor/harness/harness-execution.mdc +518 -0
- package/dist/agents/commands/cursor/harness/harness-hotspot-detector.mdc +169 -0
- package/dist/agents/commands/cursor/harness/harness-impact-analysis.mdc +192 -0
- package/dist/agents/commands/cursor/harness/harness-integrity.mdc +175 -0
- package/dist/agents/commands/cursor/harness/harness-onboarding.mdc +296 -0
- package/dist/agents/commands/cursor/harness/harness-perf.mdc +268 -0
- package/dist/agents/commands/cursor/harness/harness-planning.mdc +587 -0
- package/dist/agents/commands/cursor/harness/harness-refactoring.mdc +177 -0
- package/dist/agents/commands/cursor/harness/harness-release-readiness.mdc +697 -0
- package/dist/agents/commands/cursor/harness/harness-roadmap.mdc +603 -0
- package/dist/agents/commands/cursor/harness/harness-security-scan.mdc +162 -0
- package/dist/agents/commands/cursor/harness/harness-skill-authoring.mdc +300 -0
- package/dist/agents/commands/cursor/harness/harness-soundness-review.mdc +1275 -0
- package/dist/agents/commands/cursor/harness/harness-supply-chain-audit.mdc +252 -0
- package/dist/agents/commands/cursor/harness/harness-tdd.mdc +185 -0
- package/dist/agents/commands/cursor/harness/harness-test-advisor.mdc +168 -0
- package/dist/agents/commands/cursor/harness/harness-verification.mdc +429 -0
- package/dist/agents/commands/cursor/harness/harness-verify.mdc +167 -0
- package/dist/agents/commands/cursor/harness/initialize-harness-project.mdc +240 -0
- package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-api-design/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-architecture-advisor/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-auth/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +123 -14
- package/dist/agents/skills/claude-code/harness-autopilot/skill.yaml +6 -0
- package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +97 -3
- package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +6 -0
- package/dist/agents/skills/claude-code/harness-codebase-cleanup/SKILL.md +2 -4
- package/dist/agents/skills/claude-code/harness-database/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-deployment/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-planning/SKILL.md +99 -3
- package/dist/agents/skills/claude-code/harness-planning/skill.yaml +6 -0
- package/dist/agents/skills/claude-code/harness-pre-commit-review/SKILL.md +1 -1
- package/dist/agents/skills/claude-code/harness-security-review/SKILL.md +27 -7
- package/dist/agents/skills/claude-code/harness-security-scan/SKILL.md +52 -0
- package/dist/agents/skills/claude-code/harness-supply-chain-audit/SKILL.md +281 -0
- package/dist/agents/skills/claude-code/harness-supply-chain-audit/skill.yaml +51 -0
- package/dist/agents/skills/codex/add-harness-component/SKILL.md +192 -0
- package/dist/agents/skills/codex/add-harness-component/skill.yaml +33 -0
- package/dist/agents/skills/codex/align-documentation/SKILL.md +213 -0
- package/dist/agents/skills/codex/align-documentation/skill.yaml +32 -0
- package/dist/agents/skills/codex/check-mechanical-constraints/SKILL.md +191 -0
- package/dist/agents/skills/codex/check-mechanical-constraints/skill.yaml +33 -0
- package/dist/agents/skills/codex/cleanup-dead-code/SKILL.md +245 -0
- package/dist/agents/skills/codex/cleanup-dead-code/skill.yaml +34 -0
- package/dist/agents/skills/codex/detect-doc-drift/SKILL.md +179 -0
- package/dist/agents/skills/codex/detect-doc-drift/skill.yaml +31 -0
- package/dist/agents/skills/codex/enforce-architecture/SKILL.md +296 -0
- package/dist/agents/skills/codex/enforce-architecture/skill.yaml +35 -0
- package/dist/agents/skills/codex/harness-accessibility/SKILL.md +281 -0
- package/dist/agents/skills/codex/harness-accessibility/skill.yaml +52 -0
- package/dist/agents/skills/codex/harness-api-design/SKILL.md +356 -0
- package/dist/agents/skills/codex/harness-api-design/skill.yaml +74 -0
- package/dist/agents/skills/codex/harness-architecture-advisor/SKILL.md +449 -0
- package/dist/agents/skills/codex/harness-architecture-advisor/skill.yaml +49 -0
- package/dist/agents/skills/codex/harness-auth/SKILL.md +331 -0
- package/dist/agents/skills/codex/harness-auth/skill.yaml +81 -0
- package/dist/agents/skills/codex/harness-autopilot/SKILL.md +916 -0
- package/dist/agents/skills/codex/harness-autopilot/skill.yaml +67 -0
- package/dist/agents/skills/codex/harness-brainstorming/SKILL.md +406 -0
- package/dist/agents/skills/codex/harness-brainstorming/skill.yaml +50 -0
- package/dist/agents/skills/codex/harness-caching/SKILL.md +309 -0
- package/dist/agents/skills/codex/harness-caching/skill.yaml +73 -0
- package/dist/agents/skills/codex/harness-chaos/SKILL.md +295 -0
- package/dist/agents/skills/codex/harness-chaos/skill.yaml +72 -0
- package/dist/agents/skills/codex/harness-code-review/SKILL.md +857 -0
- package/dist/agents/skills/codex/harness-code-review/skill.yaml +52 -0
- package/dist/agents/skills/codex/harness-codebase-cleanup/SKILL.md +224 -0
- package/dist/agents/skills/codex/harness-codebase-cleanup/skill.yaml +65 -0
- package/dist/agents/skills/codex/harness-compliance/SKILL.md +303 -0
- package/dist/agents/skills/codex/harness-compliance/skill.yaml +78 -0
- package/dist/agents/skills/codex/harness-containerization/SKILL.md +284 -0
- package/dist/agents/skills/codex/harness-containerization/skill.yaml +80 -0
- package/dist/agents/skills/codex/harness-data-pipeline/SKILL.md +274 -0
- package/dist/agents/skills/codex/harness-data-pipeline/skill.yaml +81 -0
- package/dist/agents/skills/codex/harness-data-validation/SKILL.md +343 -0
- package/dist/agents/skills/codex/harness-data-validation/skill.yaml +75 -0
- package/dist/agents/skills/codex/harness-database/SKILL.md +310 -0
- package/dist/agents/skills/codex/harness-database/skill.yaml +80 -0
- package/dist/agents/skills/codex/harness-debugging/SKILL.md +366 -0
- package/dist/agents/skills/codex/harness-debugging/skill.yaml +48 -0
- package/dist/agents/skills/codex/harness-dependency-health/SKILL.md +179 -0
- package/dist/agents/skills/codex/harness-dependency-health/skill.yaml +42 -0
- package/dist/agents/skills/codex/harness-deployment/SKILL.md +307 -0
- package/dist/agents/skills/codex/harness-deployment/skill.yaml +77 -0
- package/dist/agents/skills/codex/harness-design/SKILL.md +265 -0
- package/dist/agents/skills/codex/harness-design/skill.yaml +54 -0
- package/dist/agents/skills/codex/harness-design-mobile/SKILL.md +336 -0
- package/dist/agents/skills/codex/harness-design-mobile/skill.yaml +50 -0
- package/dist/agents/skills/codex/harness-design-system/SKILL.md +282 -0
- package/dist/agents/skills/codex/harness-design-system/skill.yaml +51 -0
- package/dist/agents/skills/codex/harness-design-web/SKILL.md +360 -0
- package/dist/agents/skills/codex/harness-design-web/skill.yaml +53 -0
- package/dist/agents/skills/codex/harness-diagnostics/SKILL.md +318 -0
- package/dist/agents/skills/codex/harness-diagnostics/skill.yaml +51 -0
- package/dist/agents/skills/codex/harness-docs-pipeline/SKILL.md +460 -0
- package/dist/agents/skills/codex/harness-docs-pipeline/skill.yaml +70 -0
- package/dist/agents/skills/codex/harness-dx/SKILL.md +276 -0
- package/dist/agents/skills/codex/harness-dx/skill.yaml +76 -0
- package/dist/agents/skills/codex/harness-e2e/SKILL.md +245 -0
- package/dist/agents/skills/codex/harness-e2e/skill.yaml +78 -0
- package/dist/agents/skills/codex/harness-event-driven/SKILL.md +280 -0
- package/dist/agents/skills/codex/harness-event-driven/skill.yaml +77 -0
- package/dist/agents/skills/codex/harness-execution/SKILL.md +510 -0
- package/dist/agents/skills/codex/harness-execution/skill.yaml +52 -0
- package/dist/agents/skills/codex/harness-feature-flags/SKILL.md +287 -0
- package/dist/agents/skills/codex/harness-feature-flags/skill.yaml +74 -0
- package/dist/agents/skills/codex/harness-git-workflow/SKILL.md +268 -0
- package/dist/agents/skills/codex/harness-git-workflow/skill.yaml +32 -0
- package/dist/agents/skills/codex/harness-hotspot-detector/SKILL.md +161 -0
- package/dist/agents/skills/codex/harness-hotspot-detector/skill.yaml +45 -0
- package/dist/agents/skills/codex/harness-i18n/SKILL.md +484 -0
- package/dist/agents/skills/codex/harness-i18n/skill.yaml +55 -0
- package/dist/agents/skills/codex/harness-i18n-process/SKILL.md +388 -0
- package/dist/agents/skills/codex/harness-i18n-process/skill.yaml +44 -0
- package/dist/agents/skills/codex/harness-i18n-workflow/SKILL.md +512 -0
- package/dist/agents/skills/codex/harness-i18n-workflow/skill.yaml +54 -0
- package/dist/agents/skills/codex/harness-impact-analysis/SKILL.md +184 -0
- package/dist/agents/skills/codex/harness-impact-analysis/skill.yaml +45 -0
- package/dist/agents/skills/codex/harness-incident-response/SKILL.md +223 -0
- package/dist/agents/skills/codex/harness-incident-response/skill.yaml +78 -0
- package/dist/agents/skills/codex/harness-infrastructure-as-code/SKILL.md +279 -0
- package/dist/agents/skills/codex/harness-infrastructure-as-code/skill.yaml +80 -0
- package/dist/agents/skills/codex/harness-integration-test/SKILL.md +271 -0
- package/dist/agents/skills/codex/harness-integration-test/skill.yaml +73 -0
- package/dist/agents/skills/codex/harness-integrity/SKILL.md +167 -0
- package/dist/agents/skills/codex/harness-integrity/skill.yaml +48 -0
- package/dist/agents/skills/codex/harness-knowledge-mapper/SKILL.md +195 -0
- package/dist/agents/skills/codex/harness-knowledge-mapper/skill.yaml +50 -0
- package/dist/agents/skills/codex/harness-load-testing/SKILL.md +274 -0
- package/dist/agents/skills/codex/harness-load-testing/skill.yaml +79 -0
- package/dist/agents/skills/codex/harness-ml-ops/SKILL.md +341 -0
- package/dist/agents/skills/codex/harness-ml-ops/skill.yaml +79 -0
- package/dist/agents/skills/codex/harness-mobile-patterns/SKILL.md +326 -0
- package/dist/agents/skills/codex/harness-mobile-patterns/skill.yaml +82 -0
- package/dist/agents/skills/codex/harness-mutation-test/SKILL.md +251 -0
- package/dist/agents/skills/codex/harness-mutation-test/skill.yaml +70 -0
- package/dist/agents/skills/codex/harness-observability/SKILL.md +283 -0
- package/dist/agents/skills/codex/harness-observability/skill.yaml +78 -0
- package/dist/agents/skills/codex/harness-onboarding/SKILL.md +288 -0
- package/dist/agents/skills/codex/harness-onboarding/skill.yaml +31 -0
- package/dist/agents/skills/codex/harness-parallel-agents/SKILL.md +256 -0
- package/dist/agents/skills/codex/harness-parallel-agents/skill.yaml +34 -0
- package/dist/agents/skills/codex/harness-perf/SKILL.md +260 -0
- package/dist/agents/skills/codex/harness-perf/skill.yaml +51 -0
- package/dist/agents/skills/codex/harness-perf-tdd/SKILL.md +249 -0
- package/dist/agents/skills/codex/harness-perf-tdd/skill.yaml +48 -0
- package/dist/agents/skills/codex/harness-planning/SKILL.md +579 -0
- package/dist/agents/skills/codex/harness-planning/skill.yaml +56 -0
- package/dist/agents/skills/codex/harness-pre-commit-review/SKILL.md +324 -0
- package/dist/agents/skills/codex/harness-pre-commit-review/skill.yaml +34 -0
- package/dist/agents/skills/codex/harness-product-spec/SKILL.md +285 -0
- package/dist/agents/skills/codex/harness-product-spec/skill.yaml +72 -0
- package/dist/agents/skills/codex/harness-property-test/SKILL.md +281 -0
- package/dist/agents/skills/codex/harness-property-test/skill.yaml +71 -0
- package/dist/agents/skills/codex/harness-refactoring/SKILL.md +169 -0
- package/dist/agents/skills/codex/harness-refactoring/skill.yaml +34 -0
- package/dist/agents/skills/codex/harness-release-readiness/SKILL.md +689 -0
- package/dist/agents/skills/codex/harness-release-readiness/skill.yaml +58 -0
- package/dist/agents/skills/codex/harness-resilience/SKILL.md +255 -0
- package/dist/agents/skills/codex/harness-resilience/skill.yaml +76 -0
- package/dist/agents/skills/codex/harness-roadmap/SKILL.md +595 -0
- package/dist/agents/skills/codex/harness-roadmap/skill.yaml +44 -0
- package/dist/agents/skills/codex/harness-secrets/SKILL.md +293 -0
- package/dist/agents/skills/codex/harness-secrets/skill.yaml +76 -0
- package/dist/agents/skills/codex/harness-security-review/SKILL.md +260 -0
- package/dist/agents/skills/codex/harness-security-review/skill.yaml +53 -0
- package/dist/agents/skills/codex/harness-security-scan/SKILL.md +154 -0
- package/dist/agents/skills/codex/harness-security-scan/skill.yaml +42 -0
- package/dist/agents/skills/codex/harness-skill-authoring/SKILL.md +292 -0
- package/dist/agents/skills/codex/harness-skill-authoring/skill.yaml +33 -0
- package/dist/agents/skills/codex/harness-soundness-review/SKILL.md +1267 -0
- package/dist/agents/skills/codex/harness-soundness-review/skill.yaml +49 -0
- package/dist/agents/skills/codex/harness-sql-review/SKILL.md +315 -0
- package/dist/agents/skills/codex/harness-sql-review/skill.yaml +74 -0
- package/dist/agents/skills/codex/harness-state-management/SKILL.md +309 -0
- package/dist/agents/skills/codex/harness-state-management/skill.yaml +33 -0
- package/dist/agents/skills/codex/harness-supply-chain-audit/SKILL.md +281 -0
- package/dist/agents/skills/codex/harness-supply-chain-audit/skill.yaml +51 -0
- package/dist/agents/skills/codex/harness-tdd/SKILL.md +177 -0
- package/dist/agents/skills/codex/harness-tdd/skill.yaml +49 -0
- package/dist/agents/skills/codex/harness-test-advisor/SKILL.md +160 -0
- package/dist/agents/skills/codex/harness-test-advisor/skill.yaml +45 -0
- package/dist/agents/skills/codex/harness-test-data/SKILL.md +268 -0
- package/dist/agents/skills/codex/harness-test-data/skill.yaml +74 -0
- package/dist/agents/skills/codex/harness-ux-copy/SKILL.md +271 -0
- package/dist/agents/skills/codex/harness-ux-copy/skill.yaml +77 -0
- package/dist/agents/skills/codex/harness-verification/SKILL.md +421 -0
- package/dist/agents/skills/codex/harness-verification/skill.yaml +43 -0
- package/dist/agents/skills/codex/harness-verify/SKILL.md +159 -0
- package/dist/agents/skills/codex/harness-verify/skill.yaml +41 -0
- package/dist/agents/skills/codex/harness-visual-regression/SKILL.md +257 -0
- package/dist/agents/skills/codex/harness-visual-regression/skill.yaml +74 -0
- package/dist/agents/skills/codex/initialize-harness-project/SKILL.md +232 -0
- package/dist/agents/skills/codex/initialize-harness-project/skill.yaml +32 -0
- package/dist/agents/skills/codex/validate-context-engineering/SKILL.md +150 -0
- package/dist/agents/skills/codex/validate-context-engineering/skill.yaml +32 -0
- package/dist/agents/skills/cursor/add-harness-component/SKILL.md +192 -0
- package/dist/agents/skills/cursor/add-harness-component/skill.yaml +33 -0
- package/dist/agents/skills/cursor/align-documentation/SKILL.md +213 -0
- package/dist/agents/skills/cursor/align-documentation/skill.yaml +32 -0
- package/dist/agents/skills/cursor/check-mechanical-constraints/SKILL.md +191 -0
- package/dist/agents/skills/cursor/check-mechanical-constraints/skill.yaml +33 -0
- package/dist/agents/skills/cursor/cleanup-dead-code/SKILL.md +245 -0
- package/dist/agents/skills/cursor/cleanup-dead-code/skill.yaml +34 -0
- package/dist/agents/skills/cursor/detect-doc-drift/SKILL.md +179 -0
- package/dist/agents/skills/cursor/detect-doc-drift/skill.yaml +31 -0
- package/dist/agents/skills/cursor/enforce-architecture/SKILL.md +296 -0
- package/dist/agents/skills/cursor/enforce-architecture/skill.yaml +35 -0
- package/dist/agents/skills/cursor/harness-accessibility/SKILL.md +281 -0
- package/dist/agents/skills/cursor/harness-accessibility/skill.yaml +52 -0
- package/dist/agents/skills/cursor/harness-api-design/SKILL.md +356 -0
- package/dist/agents/skills/cursor/harness-api-design/skill.yaml +74 -0
- package/dist/agents/skills/cursor/harness-architecture-advisor/SKILL.md +449 -0
- package/dist/agents/skills/cursor/harness-architecture-advisor/skill.yaml +49 -0
- package/dist/agents/skills/cursor/harness-auth/SKILL.md +331 -0
- package/dist/agents/skills/cursor/harness-auth/skill.yaml +81 -0
- package/dist/agents/skills/cursor/harness-autopilot/SKILL.md +916 -0
- package/dist/agents/skills/cursor/harness-autopilot/skill.yaml +67 -0
- package/dist/agents/skills/cursor/harness-brainstorming/SKILL.md +406 -0
- package/dist/agents/skills/cursor/harness-brainstorming/skill.yaml +50 -0
- package/dist/agents/skills/cursor/harness-caching/SKILL.md +309 -0
- package/dist/agents/skills/cursor/harness-caching/skill.yaml +73 -0
- package/dist/agents/skills/cursor/harness-chaos/SKILL.md +295 -0
- package/dist/agents/skills/cursor/harness-chaos/skill.yaml +72 -0
- package/dist/agents/skills/cursor/harness-code-review/SKILL.md +857 -0
- package/dist/agents/skills/cursor/harness-code-review/skill.yaml +52 -0
- package/dist/agents/skills/cursor/harness-codebase-cleanup/SKILL.md +224 -0
- package/dist/agents/skills/cursor/harness-codebase-cleanup/skill.yaml +65 -0
- package/dist/agents/skills/cursor/harness-compliance/SKILL.md +303 -0
- package/dist/agents/skills/cursor/harness-compliance/skill.yaml +78 -0
- package/dist/agents/skills/cursor/harness-containerization/SKILL.md +284 -0
- package/dist/agents/skills/cursor/harness-containerization/skill.yaml +80 -0
- package/dist/agents/skills/cursor/harness-data-pipeline/SKILL.md +274 -0
- package/dist/agents/skills/cursor/harness-data-pipeline/skill.yaml +81 -0
- package/dist/agents/skills/cursor/harness-data-validation/SKILL.md +343 -0
- package/dist/agents/skills/cursor/harness-data-validation/skill.yaml +75 -0
- package/dist/agents/skills/cursor/harness-database/SKILL.md +310 -0
- package/dist/agents/skills/cursor/harness-database/skill.yaml +80 -0
- package/dist/agents/skills/cursor/harness-debugging/SKILL.md +366 -0
- package/dist/agents/skills/cursor/harness-debugging/skill.yaml +48 -0
- package/dist/agents/skills/cursor/harness-dependency-health/SKILL.md +179 -0
- package/dist/agents/skills/cursor/harness-dependency-health/skill.yaml +42 -0
- package/dist/agents/skills/cursor/harness-deployment/SKILL.md +307 -0
- package/dist/agents/skills/cursor/harness-deployment/skill.yaml +77 -0
- package/dist/agents/skills/cursor/harness-design/SKILL.md +265 -0
- package/dist/agents/skills/cursor/harness-design/skill.yaml +54 -0
- package/dist/agents/skills/cursor/harness-design-mobile/SKILL.md +336 -0
- package/dist/agents/skills/cursor/harness-design-mobile/skill.yaml +50 -0
- package/dist/agents/skills/cursor/harness-design-system/SKILL.md +282 -0
- package/dist/agents/skills/cursor/harness-design-system/skill.yaml +51 -0
- package/dist/agents/skills/cursor/harness-design-web/SKILL.md +360 -0
- package/dist/agents/skills/cursor/harness-design-web/skill.yaml +53 -0
- package/dist/agents/skills/cursor/harness-diagnostics/SKILL.md +318 -0
- package/dist/agents/skills/cursor/harness-diagnostics/skill.yaml +51 -0
- package/dist/agents/skills/cursor/harness-docs-pipeline/SKILL.md +460 -0
- package/dist/agents/skills/cursor/harness-docs-pipeline/skill.yaml +70 -0
- package/dist/agents/skills/cursor/harness-dx/SKILL.md +276 -0
- package/dist/agents/skills/cursor/harness-dx/skill.yaml +76 -0
- package/dist/agents/skills/cursor/harness-e2e/SKILL.md +245 -0
- package/dist/agents/skills/cursor/harness-e2e/skill.yaml +78 -0
- package/dist/agents/skills/cursor/harness-event-driven/SKILL.md +280 -0
- package/dist/agents/skills/cursor/harness-event-driven/skill.yaml +77 -0
- package/dist/agents/skills/cursor/harness-execution/SKILL.md +510 -0
- package/dist/agents/skills/cursor/harness-execution/skill.yaml +52 -0
- package/dist/agents/skills/cursor/harness-feature-flags/SKILL.md +287 -0
- package/dist/agents/skills/cursor/harness-feature-flags/skill.yaml +74 -0
- package/dist/agents/skills/cursor/harness-git-workflow/SKILL.md +268 -0
- package/dist/agents/skills/cursor/harness-git-workflow/skill.yaml +32 -0
- package/dist/agents/skills/cursor/harness-hotspot-detector/SKILL.md +161 -0
- package/dist/agents/skills/cursor/harness-hotspot-detector/skill.yaml +45 -0
- package/dist/agents/skills/cursor/harness-i18n/SKILL.md +484 -0
- package/dist/agents/skills/cursor/harness-i18n/skill.yaml +55 -0
- package/dist/agents/skills/cursor/harness-i18n-process/SKILL.md +388 -0
- package/dist/agents/skills/cursor/harness-i18n-process/skill.yaml +44 -0
- package/dist/agents/skills/cursor/harness-i18n-workflow/SKILL.md +512 -0
- package/dist/agents/skills/cursor/harness-i18n-workflow/skill.yaml +54 -0
- package/dist/agents/skills/cursor/harness-impact-analysis/SKILL.md +184 -0
- package/dist/agents/skills/cursor/harness-impact-analysis/skill.yaml +45 -0
- package/dist/agents/skills/cursor/harness-incident-response/SKILL.md +223 -0
- package/dist/agents/skills/cursor/harness-incident-response/skill.yaml +78 -0
- package/dist/agents/skills/cursor/harness-infrastructure-as-code/SKILL.md +279 -0
- package/dist/agents/skills/cursor/harness-infrastructure-as-code/skill.yaml +80 -0
- package/dist/agents/skills/cursor/harness-integration-test/SKILL.md +271 -0
- package/dist/agents/skills/cursor/harness-integration-test/skill.yaml +73 -0
- package/dist/agents/skills/cursor/harness-integrity/SKILL.md +167 -0
- package/dist/agents/skills/cursor/harness-integrity/skill.yaml +48 -0
- package/dist/agents/skills/cursor/harness-knowledge-mapper/SKILL.md +195 -0
- package/dist/agents/skills/cursor/harness-knowledge-mapper/skill.yaml +50 -0
- package/dist/agents/skills/cursor/harness-load-testing/SKILL.md +274 -0
- package/dist/agents/skills/cursor/harness-load-testing/skill.yaml +79 -0
- package/dist/agents/skills/cursor/harness-ml-ops/SKILL.md +341 -0
- package/dist/agents/skills/cursor/harness-ml-ops/skill.yaml +79 -0
- package/dist/agents/skills/cursor/harness-mobile-patterns/SKILL.md +326 -0
- package/dist/agents/skills/cursor/harness-mobile-patterns/skill.yaml +82 -0
- package/dist/agents/skills/cursor/harness-mutation-test/SKILL.md +251 -0
- package/dist/agents/skills/cursor/harness-mutation-test/skill.yaml +70 -0
- package/dist/agents/skills/cursor/harness-observability/SKILL.md +283 -0
- package/dist/agents/skills/cursor/harness-observability/skill.yaml +78 -0
- package/dist/agents/skills/cursor/harness-onboarding/SKILL.md +288 -0
- package/dist/agents/skills/cursor/harness-onboarding/skill.yaml +31 -0
- package/dist/agents/skills/cursor/harness-parallel-agents/SKILL.md +256 -0
- package/dist/agents/skills/cursor/harness-parallel-agents/skill.yaml +34 -0
- package/dist/agents/skills/cursor/harness-perf/SKILL.md +260 -0
- package/dist/agents/skills/cursor/harness-perf/skill.yaml +51 -0
- package/dist/agents/skills/cursor/harness-perf-tdd/SKILL.md +249 -0
- package/dist/agents/skills/cursor/harness-perf-tdd/skill.yaml +48 -0
- package/dist/agents/skills/cursor/harness-planning/SKILL.md +579 -0
- package/dist/agents/skills/cursor/harness-planning/skill.yaml +56 -0
- package/dist/agents/skills/cursor/harness-pre-commit-review/SKILL.md +324 -0
- package/dist/agents/skills/cursor/harness-pre-commit-review/skill.yaml +34 -0
- package/dist/agents/skills/cursor/harness-product-spec/SKILL.md +285 -0
- package/dist/agents/skills/cursor/harness-product-spec/skill.yaml +72 -0
- package/dist/agents/skills/cursor/harness-property-test/SKILL.md +281 -0
- package/dist/agents/skills/cursor/harness-property-test/skill.yaml +71 -0
- package/dist/agents/skills/cursor/harness-refactoring/SKILL.md +169 -0
- package/dist/agents/skills/cursor/harness-refactoring/skill.yaml +34 -0
- package/dist/agents/skills/cursor/harness-release-readiness/SKILL.md +689 -0
- package/dist/agents/skills/cursor/harness-release-readiness/skill.yaml +58 -0
- package/dist/agents/skills/cursor/harness-resilience/SKILL.md +255 -0
- package/dist/agents/skills/cursor/harness-resilience/skill.yaml +76 -0
- package/dist/agents/skills/cursor/harness-roadmap/SKILL.md +595 -0
- package/dist/agents/skills/cursor/harness-roadmap/skill.yaml +44 -0
- package/dist/agents/skills/cursor/harness-secrets/SKILL.md +293 -0
- package/dist/agents/skills/cursor/harness-secrets/skill.yaml +76 -0
- package/dist/agents/skills/cursor/harness-security-review/SKILL.md +260 -0
- package/dist/agents/skills/cursor/harness-security-review/skill.yaml +53 -0
- package/dist/agents/skills/cursor/harness-security-scan/SKILL.md +154 -0
- package/dist/agents/skills/cursor/harness-security-scan/skill.yaml +42 -0
- package/dist/agents/skills/cursor/harness-skill-authoring/SKILL.md +292 -0
- package/dist/agents/skills/cursor/harness-skill-authoring/skill.yaml +33 -0
- package/dist/agents/skills/cursor/harness-soundness-review/SKILL.md +1267 -0
- package/dist/agents/skills/cursor/harness-soundness-review/skill.yaml +49 -0
- package/dist/agents/skills/cursor/harness-sql-review/SKILL.md +315 -0
- package/dist/agents/skills/cursor/harness-sql-review/skill.yaml +74 -0
- package/dist/agents/skills/cursor/harness-state-management/SKILL.md +309 -0
- package/dist/agents/skills/cursor/harness-state-management/skill.yaml +33 -0
- package/dist/agents/skills/cursor/harness-supply-chain-audit/SKILL.md +281 -0
- package/dist/agents/skills/cursor/harness-supply-chain-audit/skill.yaml +51 -0
- package/dist/agents/skills/cursor/harness-tdd/SKILL.md +177 -0
- package/dist/agents/skills/cursor/harness-tdd/skill.yaml +49 -0
- package/dist/agents/skills/cursor/harness-test-advisor/SKILL.md +160 -0
- package/dist/agents/skills/cursor/harness-test-advisor/skill.yaml +45 -0
- package/dist/agents/skills/cursor/harness-test-data/SKILL.md +268 -0
- package/dist/agents/skills/cursor/harness-test-data/skill.yaml +74 -0
- package/dist/agents/skills/cursor/harness-ux-copy/SKILL.md +271 -0
- package/dist/agents/skills/cursor/harness-ux-copy/skill.yaml +77 -0
- package/dist/agents/skills/cursor/harness-verification/SKILL.md +421 -0
- package/dist/agents/skills/cursor/harness-verification/skill.yaml +43 -0
- package/dist/agents/skills/cursor/harness-verify/SKILL.md +159 -0
- package/dist/agents/skills/cursor/harness-verify/skill.yaml +41 -0
- package/dist/agents/skills/cursor/harness-visual-regression/SKILL.md +257 -0
- package/dist/agents/skills/cursor/harness-visual-regression/skill.yaml +74 -0
- package/dist/agents/skills/cursor/initialize-harness-project/SKILL.md +232 -0
- package/dist/agents/skills/cursor/initialize-harness-project/skill.yaml +32 -0
- package/dist/agents/skills/cursor/validate-context-engineering/SKILL.md +150 -0
- package/dist/agents/skills/cursor/validate-context-engineering/skill.yaml +32 -0
- package/dist/agents/skills/gemini-cli/enforce-architecture/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-api-design/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-architecture-advisor/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-auth/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +123 -14
- package/dist/agents/skills/gemini-cli/harness-autopilot/skill.yaml +6 -0
- package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +97 -3
- package/dist/agents/skills/gemini-cli/harness-code-review/skill.yaml +6 -0
- package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/SKILL.md +2 -4
- package/dist/agents/skills/gemini-cli/harness-database/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-deployment/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +99 -3
- package/dist/agents/skills/gemini-cli/harness-planning/skill.yaml +6 -0
- package/dist/agents/skills/gemini-cli/harness-pre-commit-review/SKILL.md +1 -1
- package/dist/agents/skills/gemini-cli/harness-security-review/SKILL.md +27 -7
- package/dist/agents/skills/gemini-cli/harness-security-scan/SKILL.md +52 -0
- package/dist/agents/skills/gemini-cli/harness-supply-chain-audit/SKILL.md +281 -0
- package/dist/agents/skills/gemini-cli/harness-supply-chain-audit/skill.yaml +51 -0
- package/dist/agents/skills/templates/discipline-template.md +49 -0
- package/dist/agents/skills/tests/schema.ts +1 -1
- package/dist/{agents-md-ZGNIDWAF.js → agents-md-VYDFPIRW.js} +1 -1
- package/dist/{architecture-ZLIH5533.js → architecture-K5HSRBGB.js} +2 -2
- package/dist/bin/harness-mcp.js +13 -13
- package/dist/bin/harness.js +18 -18
- package/dist/{check-phase-gate-ZOXVBDCN.js → check-phase-gate-5AS6SXL6.js} +3 -3
- package/dist/{chunk-LGYBN7Y6.js → chunk-5ZXHMCPL.js} +1 -1
- package/dist/{chunk-RCWZBSK5.js → chunk-6KWBH4EO.js} +1 -1
- package/dist/{chunk-Z2OOPXJO.js → chunk-ALFKNAZW.js} +1172 -74
- package/dist/{chunk-VEPAJXBW.js → chunk-AV6KMDO5.js} +2 -2
- package/dist/{chunk-2BKLWLY6.js → chunk-C7DTKLPW.js} +4 -4
- package/dist/{chunk-ZOAWBDWU.js → chunk-CJDVBBPB.js} +5 -1
- package/dist/{chunk-EDXIVMAP.js → chunk-DNDBFIZN.js} +18 -4
- package/dist/{chunk-XYLGHKG6.js → chunk-HKUX2X7O.js} +11 -2
- package/dist/{chunk-NNHDDXYT.js → chunk-JOP2NDNB.js} +396 -114
- package/dist/{chunk-YBJ262QL.js → chunk-LRG3B43J.js} +1 -1
- package/dist/{chunk-AOZRDOIP.js → chunk-M6TIO6NF.js} +1 -1
- package/dist/{chunk-B2HKP423.js → chunk-OCDDCGDE.js} +9 -1
- package/dist/{chunk-3ZZKVN62.js → chunk-QDF7COPQ.js} +1 -1
- package/dist/{chunk-YLXFKVJE.js → chunk-RWZPHW4H.js} +3 -3
- package/dist/{chunk-N25INEIX.js → chunk-SFRGPAK6.js} +1 -1
- package/dist/{chunk-J4RAX7YB.js → chunk-SHYWICGA.js} +1677 -501
- package/dist/{chunk-OFXQSFOW.js → chunk-TF6ZLHJV.js} +2 -2
- package/dist/{chunk-ND2ENWDM.js → chunk-ZJMU7MEV.js} +1 -1
- package/dist/{ci-workflow-765LSHRD.js → ci-workflow-CRWU723U.js} +1 -1
- package/dist/{create-skill-XSWHMSM5.js → create-skill-NDXQSTIK.js} +2 -2
- package/dist/{dist-ALQDD67R.js → dist-4LPXJYVZ.js} +59 -1
- package/dist/{docs-NRMQCOJ6.js → docs-4JRHTLUZ.js} +3 -3
- package/dist/{engine-3RB7MXPP.js → engine-3G3VIM6L.js} +1 -1
- package/dist/{entropy-6AGX2ZUN.js → entropy-G6CZ2A6P.js} +2 -2
- package/dist/{feedback-MY4QZIFD.js → feedback-QYKQ65HB.js} +1 -1
- package/dist/{generate-agent-definitions-ZAE726AU.js → generate-agent-definitions-SAAOAPT4.js} +3 -3
- package/dist/index.d.ts +33 -12
- package/dist/index.js +18 -18
- package/dist/{loader-UUTVMQCC.js → loader-VCOK3PF7.js} +1 -1
- package/dist/{mcp-VU5FMO52.js → mcp-YENEPHBW.js} +13 -13
- package/dist/{performance-2D7G6NMJ.js → performance-UBCFI2UP.js} +4 -2
- package/dist/{review-pipeline-RAQ55ISU.js → review-pipeline-IQAVCWAX.js} +1 -1
- package/dist/{runtime-BCK5RRZQ.js → runtime-PYFFIESU.js} +1 -1
- package/dist/{security-2RPQEN62.js → security-ZDADTPYW.js} +1 -1
- package/dist/{skill-executor-XZLYZYAK.js → skill-executor-XEVDGXUM.js} +2 -2
- package/dist/{validate-KBYQAEWE.js → validate-VRTUHALQ.js} +2 -2
- package/dist/{validate-cross-check-OABMREW4.js → validate-cross-check-4Y6NHNK3.js} +1 -1
- package/package.json +6 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
detectEntropyDefinition,
|
|
3
3
|
handleDetectEntropy
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AV6KMDO5.js";
|
|
5
5
|
import {
|
|
6
6
|
checkPerformanceDefinition,
|
|
7
7
|
getCriticalPathsDefinition,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
handleGetPerfBaselines,
|
|
12
12
|
handleUpdatePerfBaselines,
|
|
13
13
|
updatePerfBaselinesDefinition
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DNDBFIZN.js";
|
|
15
15
|
import {
|
|
16
16
|
analyzeDiffDefinition,
|
|
17
17
|
createSelfReviewDefinition,
|
|
@@ -19,43 +19,45 @@ import {
|
|
|
19
19
|
handleCreateSelfReview,
|
|
20
20
|
handleRequestPeerReview,
|
|
21
21
|
requestPeerReviewDefinition
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-RWZPHW4H.js";
|
|
23
23
|
import {
|
|
24
24
|
handleRunSecurityScan,
|
|
25
25
|
runSecurityScanDefinition
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QDF7COPQ.js";
|
|
27
27
|
import {
|
|
28
28
|
handleRunCodeReview,
|
|
29
29
|
runCodeReviewDefinition
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ZJMU7MEV.js";
|
|
31
31
|
import {
|
|
32
32
|
GENERATED_HEADER_CLAUDE,
|
|
33
|
+
GENERATED_HEADER_CODEX,
|
|
34
|
+
GENERATED_HEADER_CURSOR,
|
|
33
35
|
GENERATED_HEADER_GEMINI,
|
|
34
36
|
VALID_PLATFORMS,
|
|
35
37
|
applySyncPlan,
|
|
36
38
|
computeSyncPlan
|
|
37
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-CJDVBBPB.js";
|
|
38
40
|
import {
|
|
39
41
|
handleValidateProject,
|
|
40
42
|
validateToolDefinition
|
|
41
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-TF6ZLHJV.js";
|
|
42
44
|
import {
|
|
43
45
|
loadGraphStore
|
|
44
46
|
} from "./chunk-FTMXDOR6.js";
|
|
45
47
|
import {
|
|
46
48
|
checkDependenciesDefinition,
|
|
47
49
|
handleCheckDependencies
|
|
48
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-SFRGPAK6.js";
|
|
49
51
|
import {
|
|
50
52
|
resolveProjectConfig
|
|
51
53
|
} from "./chunk-H7Y5CKTM.js";
|
|
52
54
|
import {
|
|
53
55
|
checkDocsDefinition,
|
|
54
56
|
handleCheckDocs
|
|
55
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-C7DTKLPW.js";
|
|
56
58
|
import {
|
|
57
59
|
resolveConfig
|
|
58
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-OCDDCGDE.js";
|
|
59
61
|
import {
|
|
60
62
|
resultToMcpResponse
|
|
61
63
|
} from "./chunk-IDZNPTYD.js";
|
|
@@ -78,7 +80,13 @@ import {
|
|
|
78
80
|
} from "./chunk-3WGJMBKH.js";
|
|
79
81
|
import {
|
|
80
82
|
SkillMetadataSchema
|
|
81
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-HKUX2X7O.js";
|
|
84
|
+
import {
|
|
85
|
+
DESTRUCTIVE_BASH,
|
|
86
|
+
checkTaint,
|
|
87
|
+
scanForInjection,
|
|
88
|
+
writeTaint
|
|
89
|
+
} from "./chunk-ALFKNAZW.js";
|
|
82
90
|
import {
|
|
83
91
|
Err,
|
|
84
92
|
Ok
|
|
@@ -94,6 +102,123 @@ import {
|
|
|
94
102
|
ReadResourceRequestSchema
|
|
95
103
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
96
104
|
|
|
105
|
+
// src/mcp/middleware/injection-guard.ts
|
|
106
|
+
import { realpathSync } from "fs";
|
|
107
|
+
import { resolve } from "path";
|
|
108
|
+
function isDestructiveBash(command) {
|
|
109
|
+
return DESTRUCTIVE_BASH.some((p) => p.test(command));
|
|
110
|
+
}
|
|
111
|
+
function isOutsideWorkspace(filePath, workspaceRoot) {
|
|
112
|
+
if (!filePath || !workspaceRoot) return false;
|
|
113
|
+
const resolved = resolve(workspaceRoot, filePath);
|
|
114
|
+
let realResolved = resolved;
|
|
115
|
+
try {
|
|
116
|
+
realResolved = realpathSync(resolved);
|
|
117
|
+
} catch {
|
|
118
|
+
}
|
|
119
|
+
return !realResolved.startsWith(workspaceRoot);
|
|
120
|
+
}
|
|
121
|
+
var INPUT_EXTRACTORS = {
|
|
122
|
+
Bash: (input) => input?.command ?? "",
|
|
123
|
+
Write: (input) => input?.content ?? "",
|
|
124
|
+
Edit: (input) => `${input?.old_string ?? ""}
|
|
125
|
+
${input?.new_string ?? ""}`,
|
|
126
|
+
Read: (input) => input?.file_path ?? ""
|
|
127
|
+
};
|
|
128
|
+
function extractInputText(toolName, toolInput) {
|
|
129
|
+
const extractor = INPUT_EXTRACTORS[toolName];
|
|
130
|
+
if (extractor) return extractor(toolInput);
|
|
131
|
+
const parts = Object.values(toolInput || {}).filter((v) => typeof v === "string");
|
|
132
|
+
return parts.length > 0 ? parts.join("\n") : null;
|
|
133
|
+
}
|
|
134
|
+
function extractResultText(result) {
|
|
135
|
+
return result.content.filter((c) => c.type === "text").map((c) => c.text).join("\n");
|
|
136
|
+
}
|
|
137
|
+
function isDestructiveOperation(toolName, toolInput, workspaceRoot) {
|
|
138
|
+
const normalized = toolName.toLowerCase().replace(/_/g, "");
|
|
139
|
+
if (normalized === "bash") {
|
|
140
|
+
const command = toolInput?.command ?? "";
|
|
141
|
+
return isDestructiveBash(command);
|
|
142
|
+
}
|
|
143
|
+
if (normalized === "write" || normalized === "edit") {
|
|
144
|
+
const filePath = toolInput?.file_path ?? "";
|
|
145
|
+
return isOutsideWorkspace(filePath, workspaceRoot);
|
|
146
|
+
}
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
function wrapWithInjectionGuard(toolName, handler, options = {}) {
|
|
150
|
+
const projectRoot = options.projectRoot ?? process.cwd();
|
|
151
|
+
const sessionId = options.sessionId ?? "default";
|
|
152
|
+
return async (input) => {
|
|
153
|
+
try {
|
|
154
|
+
const taintCheck = checkTaint(projectRoot, sessionId);
|
|
155
|
+
if (taintCheck.tainted && isDestructiveOperation(toolName, input, projectRoot)) {
|
|
156
|
+
return {
|
|
157
|
+
content: [
|
|
158
|
+
{
|
|
159
|
+
type: "text",
|
|
160
|
+
text: `BLOCKED by Sentinel: "${toolName}" blocked during tainted session. Destructive operations are restricted. Run "harness taint clear" to lift.`
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
isError: true
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
const textToScan = extractInputText(toolName, input);
|
|
167
|
+
if (textToScan) {
|
|
168
|
+
const findings = scanForInjection(textToScan);
|
|
169
|
+
const actionable = findings.filter(
|
|
170
|
+
(f) => f.severity === "high" || f.severity === "medium"
|
|
171
|
+
);
|
|
172
|
+
if (actionable.length > 0) {
|
|
173
|
+
writeTaint(
|
|
174
|
+
projectRoot,
|
|
175
|
+
sessionId,
|
|
176
|
+
`Injection pattern detected in MCP:${toolName} input`,
|
|
177
|
+
actionable,
|
|
178
|
+
`MCP:${toolName}`
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
const result = await handler(input);
|
|
183
|
+
const outputText = extractResultText(result);
|
|
184
|
+
if (outputText) {
|
|
185
|
+
const outputFindings = scanForInjection(outputText);
|
|
186
|
+
const actionableOutput = outputFindings.filter(
|
|
187
|
+
(f) => f.severity === "high" || f.severity === "medium"
|
|
188
|
+
);
|
|
189
|
+
if (actionableOutput.length > 0) {
|
|
190
|
+
writeTaint(
|
|
191
|
+
projectRoot,
|
|
192
|
+
sessionId,
|
|
193
|
+
`Injection pattern detected in MCP:${toolName} result`,
|
|
194
|
+
actionableOutput,
|
|
195
|
+
`MCP:${toolName}:output`
|
|
196
|
+
);
|
|
197
|
+
const warningLines = actionableOutput.map(
|
|
198
|
+
(f) => `Sentinel [${f.severity}] ${f.ruleId}: detected in ${toolName} output`
|
|
199
|
+
);
|
|
200
|
+
result.content.push({
|
|
201
|
+
type: "text",
|
|
202
|
+
text: `
|
|
203
|
+
---
|
|
204
|
+
Sentinel Warning: ${warningLines.join("; ")}`
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return result;
|
|
209
|
+
} catch {
|
|
210
|
+
return handler(input);
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
function applyInjectionGuard(handlers, options = {}) {
|
|
215
|
+
const wrapped = {};
|
|
216
|
+
for (const [name, handler] of Object.entries(handlers)) {
|
|
217
|
+
wrapped[name] = wrapWithInjectionGuard(name, handler, options);
|
|
218
|
+
}
|
|
219
|
+
return wrapped;
|
|
220
|
+
}
|
|
221
|
+
|
|
97
222
|
// src/mcp/tools/linter.ts
|
|
98
223
|
var generateLinterDefinition = {
|
|
99
224
|
name: "generate_linter",
|
|
@@ -428,7 +553,7 @@ ${skippedMsg}`
|
|
|
428
553
|
async function handleInitProject(input) {
|
|
429
554
|
const i = input;
|
|
430
555
|
try {
|
|
431
|
-
const { TemplateEngine } = await import("./engine-
|
|
556
|
+
const { TemplateEngine } = await import("./engine-3G3VIM6L.js");
|
|
432
557
|
const engine = new TemplateEngine(resolveTemplatesDir());
|
|
433
558
|
const safePath = sanitizePath(i.path);
|
|
434
559
|
const detected = tryDetectFramework(engine, safePath, i);
|
|
@@ -449,7 +574,7 @@ var listPersonasDefinition = {
|
|
|
449
574
|
inputSchema: { type: "object", properties: {} }
|
|
450
575
|
};
|
|
451
576
|
async function handleListPersonas() {
|
|
452
|
-
const { listPersonas } = await import("./loader-
|
|
577
|
+
const { listPersonas } = await import("./loader-VCOK3PF7.js");
|
|
453
578
|
const result = listPersonas(resolvePersonasDir());
|
|
454
579
|
return resultToMcpResponse(result);
|
|
455
580
|
}
|
|
@@ -473,10 +598,10 @@ async function handleGeneratePersonaArtifacts(input) {
|
|
|
473
598
|
if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.name)) {
|
|
474
599
|
return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.name}`)));
|
|
475
600
|
}
|
|
476
|
-
const { loadPersona } = await import("./loader-
|
|
477
|
-
const { generateRuntime } = await import("./runtime-
|
|
478
|
-
const { generateAgentsMd } = await import("./agents-md-
|
|
479
|
-
const { generateCIWorkflow } = await import("./ci-workflow-
|
|
601
|
+
const { loadPersona } = await import("./loader-VCOK3PF7.js");
|
|
602
|
+
const { generateRuntime } = await import("./runtime-PYFFIESU.js");
|
|
603
|
+
const { generateAgentsMd } = await import("./agents-md-VYDFPIRW.js");
|
|
604
|
+
const { generateCIWorkflow } = await import("./ci-workflow-CRWU723U.js");
|
|
480
605
|
const personasDir = resolvePersonasDir();
|
|
481
606
|
const filePath = path3.join(personasDir, `${input.name}.yaml`);
|
|
482
607
|
if (!filePath.startsWith(personasDir)) {
|
|
@@ -531,9 +656,9 @@ async function handleRunPersona(input) {
|
|
|
531
656
|
if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.persona)) {
|
|
532
657
|
return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.persona}`)));
|
|
533
658
|
}
|
|
534
|
-
const { loadPersona } = await import("./loader-
|
|
659
|
+
const { loadPersona } = await import("./loader-VCOK3PF7.js");
|
|
535
660
|
const { runPersona } = await import("./runner-VMYLHWOC.js");
|
|
536
|
-
const { executeSkill } = await import("./skill-executor-
|
|
661
|
+
const { executeSkill } = await import("./skill-executor-XEVDGXUM.js");
|
|
537
662
|
const personasDir = resolvePersonasDir();
|
|
538
663
|
const filePath = path3.join(personasDir, `${input.persona}.yaml`);
|
|
539
664
|
if (!filePath.startsWith(personasDir)) {
|
|
@@ -944,8 +1069,8 @@ var runSkillDefinition = {
|
|
|
944
1069
|
path: { type: "string", description: "Path to project root for state context injection" },
|
|
945
1070
|
complexity: {
|
|
946
1071
|
type: "string",
|
|
947
|
-
enum: ["
|
|
948
|
-
description: "
|
|
1072
|
+
enum: ["fast", "standard", "thorough"],
|
|
1073
|
+
description: "Rigor level: fast (minimal), standard (default), thorough (full)"
|
|
949
1074
|
},
|
|
950
1075
|
phase: { type: "string", description: "Start at a specific phase (re-entry)" },
|
|
951
1076
|
party: { type: "boolean", description: "Enable multi-perspective evaluation" }
|
|
@@ -1031,7 +1156,7 @@ var createSkillDefinition = {
|
|
|
1031
1156
|
};
|
|
1032
1157
|
async function handleCreateSkill(input) {
|
|
1033
1158
|
try {
|
|
1034
|
-
const { generateSkillFiles } = await import("./create-skill-
|
|
1159
|
+
const { generateSkillFiles } = await import("./create-skill-NDXQSTIK.js");
|
|
1035
1160
|
const result = generateSkillFiles({
|
|
1036
1161
|
name: input.name,
|
|
1037
1162
|
description: input.description,
|
|
@@ -1149,7 +1274,7 @@ async function autoSyncRoadmap(projectPath) {
|
|
|
1149
1274
|
try {
|
|
1150
1275
|
const roadmapFile = path11.join(projectPath, "docs", "roadmap.md");
|
|
1151
1276
|
if (!fs10.existsSync(roadmapFile)) return;
|
|
1152
|
-
const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-
|
|
1277
|
+
const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-4LPXJYVZ.js");
|
|
1153
1278
|
const raw = fs10.readFileSync(roadmapFile, "utf-8");
|
|
1154
1279
|
const parseResult = parseRoadmap(raw);
|
|
1155
1280
|
if (!parseResult.ok) return;
|
|
@@ -1235,12 +1360,12 @@ var manageStateDefinition = {
|
|
|
1235
1360
|
}
|
|
1236
1361
|
};
|
|
1237
1362
|
async function handleShow(projectPath, input) {
|
|
1238
|
-
const { loadState } = await import("./dist-
|
|
1363
|
+
const { loadState } = await import("./dist-4LPXJYVZ.js");
|
|
1239
1364
|
return resultToMcpResponse(await loadState(projectPath, input.stream, input.session));
|
|
1240
1365
|
}
|
|
1241
1366
|
async function handleLearn(projectPath, input) {
|
|
1242
1367
|
if (!input.learning) return mcpError("Error: learning is required for learn action");
|
|
1243
|
-
const { appendLearning } = await import("./dist-
|
|
1368
|
+
const { appendLearning } = await import("./dist-4LPXJYVZ.js");
|
|
1244
1369
|
const result = await appendLearning(
|
|
1245
1370
|
projectPath,
|
|
1246
1371
|
input.learning,
|
|
@@ -1255,7 +1380,7 @@ async function handleLearn(projectPath, input) {
|
|
|
1255
1380
|
async function handleFailure(projectPath, input) {
|
|
1256
1381
|
if (!input.description) return mcpError("Error: description is required for failure action");
|
|
1257
1382
|
if (!input.failureType) return mcpError("Error: failureType is required for failure action");
|
|
1258
|
-
const { appendFailure } = await import("./dist-
|
|
1383
|
+
const { appendFailure } = await import("./dist-4LPXJYVZ.js");
|
|
1259
1384
|
const result = await appendFailure(
|
|
1260
1385
|
projectPath,
|
|
1261
1386
|
input.description,
|
|
@@ -1268,24 +1393,24 @@ async function handleFailure(projectPath, input) {
|
|
|
1268
1393
|
return resultToMcpResponse(Ok({ recorded: true }));
|
|
1269
1394
|
}
|
|
1270
1395
|
async function handleArchive(projectPath, input) {
|
|
1271
|
-
const { archiveFailures } = await import("./dist-
|
|
1396
|
+
const { archiveFailures } = await import("./dist-4LPXJYVZ.js");
|
|
1272
1397
|
const result = await archiveFailures(projectPath, input.stream, input.session);
|
|
1273
1398
|
if (!result.ok) return resultToMcpResponse(result);
|
|
1274
1399
|
return resultToMcpResponse(Ok({ archived: true }));
|
|
1275
1400
|
}
|
|
1276
1401
|
async function handleReset(projectPath, input) {
|
|
1277
|
-
const { saveState, DEFAULT_STATE } = await import("./dist-
|
|
1402
|
+
const { saveState, DEFAULT_STATE } = await import("./dist-4LPXJYVZ.js");
|
|
1278
1403
|
const result = await saveState(projectPath, { ...DEFAULT_STATE }, input.stream, input.session);
|
|
1279
1404
|
if (!result.ok) return resultToMcpResponse(result);
|
|
1280
1405
|
return resultToMcpResponse(Ok({ reset: true }));
|
|
1281
1406
|
}
|
|
1282
1407
|
async function handleGate(projectPath, _input) {
|
|
1283
|
-
const { runMechanicalGate } = await import("./dist-
|
|
1408
|
+
const { runMechanicalGate } = await import("./dist-4LPXJYVZ.js");
|
|
1284
1409
|
return resultToMcpResponse(await runMechanicalGate(projectPath));
|
|
1285
1410
|
}
|
|
1286
1411
|
async function handleSaveHandoff(projectPath, input) {
|
|
1287
1412
|
if (!input.handoff) return mcpError("Error: handoff is required for save-handoff action");
|
|
1288
|
-
const { saveHandoff } = await import("./dist-
|
|
1413
|
+
const { saveHandoff } = await import("./dist-4LPXJYVZ.js");
|
|
1289
1414
|
const result = await saveHandoff(
|
|
1290
1415
|
projectPath,
|
|
1291
1416
|
input.handoff,
|
|
@@ -1297,7 +1422,7 @@ async function handleSaveHandoff(projectPath, input) {
|
|
|
1297
1422
|
return resultToMcpResponse(Ok({ saved: true }));
|
|
1298
1423
|
}
|
|
1299
1424
|
async function handleLoadHandoff(projectPath, input) {
|
|
1300
|
-
const { loadHandoff } = await import("./dist-
|
|
1425
|
+
const { loadHandoff } = await import("./dist-4LPXJYVZ.js");
|
|
1301
1426
|
return resultToMcpResponse(await loadHandoff(projectPath, input.stream, input.session));
|
|
1302
1427
|
}
|
|
1303
1428
|
async function handleAppendEntry(projectPath, input) {
|
|
@@ -1305,7 +1430,7 @@ async function handleAppendEntry(projectPath, input) {
|
|
|
1305
1430
|
if (!input.section) return mcpError("Error: section is required for append_entry action");
|
|
1306
1431
|
if (!input.authorSkill) return mcpError("Error: authorSkill is required for append_entry action");
|
|
1307
1432
|
if (!input.content) return mcpError("Error: content is required for append_entry action");
|
|
1308
|
-
const { appendSessionEntry } = await import("./dist-
|
|
1433
|
+
const { appendSessionEntry } = await import("./dist-4LPXJYVZ.js");
|
|
1309
1434
|
const result = await appendSessionEntry(
|
|
1310
1435
|
projectPath,
|
|
1311
1436
|
input.session,
|
|
@@ -1321,7 +1446,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
|
|
|
1321
1446
|
if (!input.entryId) return mcpError("Error: entryId is required for update_entry_status action");
|
|
1322
1447
|
if (!input.newStatus)
|
|
1323
1448
|
return mcpError("Error: newStatus is required for update_entry_status action");
|
|
1324
|
-
const { updateSessionEntryStatus } = await import("./dist-
|
|
1449
|
+
const { updateSessionEntryStatus } = await import("./dist-4LPXJYVZ.js");
|
|
1325
1450
|
const result = await updateSessionEntryStatus(
|
|
1326
1451
|
projectPath,
|
|
1327
1452
|
input.session,
|
|
@@ -1334,7 +1459,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
|
|
|
1334
1459
|
async function handleReadSection(projectPath, input) {
|
|
1335
1460
|
if (!input.session) return mcpError("Error: session is required for read_section action");
|
|
1336
1461
|
if (!input.section) return mcpError("Error: section is required for read_section action");
|
|
1337
|
-
const { readSessionSection } = await import("./dist-
|
|
1462
|
+
const { readSessionSection } = await import("./dist-4LPXJYVZ.js");
|
|
1338
1463
|
const result = await readSessionSection(
|
|
1339
1464
|
projectPath,
|
|
1340
1465
|
input.session,
|
|
@@ -1344,13 +1469,13 @@ async function handleReadSection(projectPath, input) {
|
|
|
1344
1469
|
}
|
|
1345
1470
|
async function handleReadSections(projectPath, input) {
|
|
1346
1471
|
if (!input.session) return mcpError("Error: session is required for read_sections action");
|
|
1347
|
-
const { readSessionSections } = await import("./dist-
|
|
1472
|
+
const { readSessionSections } = await import("./dist-4LPXJYVZ.js");
|
|
1348
1473
|
const result = await readSessionSections(projectPath, input.session);
|
|
1349
1474
|
return resultToMcpResponse(result);
|
|
1350
1475
|
}
|
|
1351
1476
|
async function handleArchiveSession(projectPath, input) {
|
|
1352
1477
|
if (!input.session) return mcpError("Error: session is required for archive_session action");
|
|
1353
|
-
const { archiveSession } = await import("./dist-
|
|
1478
|
+
const { archiveSession } = await import("./dist-4LPXJYVZ.js");
|
|
1354
1479
|
const result = await archiveSession(projectPath, input.session);
|
|
1355
1480
|
if (!result.ok) return resultToMcpResponse(result);
|
|
1356
1481
|
await autoSyncRoadmap(projectPath);
|
|
@@ -1394,7 +1519,7 @@ var listStreamsDefinition = {
|
|
|
1394
1519
|
};
|
|
1395
1520
|
async function handleListStreams(input) {
|
|
1396
1521
|
try {
|
|
1397
|
-
const { listStreams, loadStreamIndex } = await import("./dist-
|
|
1522
|
+
const { listStreams, loadStreamIndex } = await import("./dist-4LPXJYVZ.js");
|
|
1398
1523
|
const projectPath = sanitizePath(input.path);
|
|
1399
1524
|
const indexResult = await loadStreamIndex(projectPath);
|
|
1400
1525
|
const streamsResult = await listStreams(projectPath);
|
|
@@ -1432,7 +1557,7 @@ var checkPhaseGateDefinition = {
|
|
|
1432
1557
|
};
|
|
1433
1558
|
async function handleCheckPhaseGate(input) {
|
|
1434
1559
|
try {
|
|
1435
|
-
const { runCheckPhaseGate } = await import("./check-phase-gate-
|
|
1560
|
+
const { runCheckPhaseGate } = await import("./check-phase-gate-5AS6SXL6.js");
|
|
1436
1561
|
const result = await runCheckPhaseGate({ cwd: sanitizePath(input.path) });
|
|
1437
1562
|
if (result.ok) {
|
|
1438
1563
|
return { content: [{ type: "text", text: JSON.stringify(result.value) }] };
|
|
@@ -1488,7 +1613,7 @@ async function handleValidateCrossCheck(input) {
|
|
|
1488
1613
|
};
|
|
1489
1614
|
}
|
|
1490
1615
|
try {
|
|
1491
|
-
const { runCrossCheck } = await import("./validate-cross-check-
|
|
1616
|
+
const { runCrossCheck } = await import("./validate-cross-check-4Y6NHNK3.js");
|
|
1492
1617
|
const specsDir = path12.resolve(projectPath, input.specsDir ?? "docs/specs");
|
|
1493
1618
|
if (!specsDir.startsWith(projectPath)) {
|
|
1494
1619
|
return {
|
|
@@ -1527,8 +1652,8 @@ async function handleValidateCrossCheck(input) {
|
|
|
1527
1652
|
|
|
1528
1653
|
// src/commands/generate-slash-commands.ts
|
|
1529
1654
|
import { Command } from "commander";
|
|
1530
|
-
import
|
|
1531
|
-
import
|
|
1655
|
+
import fs13 from "fs";
|
|
1656
|
+
import path15 from "path";
|
|
1532
1657
|
import os from "os";
|
|
1533
1658
|
import readline from "readline";
|
|
1534
1659
|
|
|
@@ -1560,8 +1685,12 @@ function readSkillYaml(yamlPath) {
|
|
|
1560
1685
|
}
|
|
1561
1686
|
return SkillMetadataSchema.safeParse(parse3(raw));
|
|
1562
1687
|
}
|
|
1688
|
+
var DERIVED_FROM_CLAUDE_CODE = ["cursor", "codex"];
|
|
1563
1689
|
function shouldSkipSkill(meta, platforms) {
|
|
1564
|
-
const
|
|
1690
|
+
const effectivePlatforms = platforms.map(
|
|
1691
|
+
(p) => DERIVED_FROM_CLAUDE_CODE.includes(p) ? "claude-code" : p
|
|
1692
|
+
);
|
|
1693
|
+
const matchesPlatform = effectivePlatforms.some((p) => meta.platforms.includes(p));
|
|
1565
1694
|
if (!matchesPlatform) return true;
|
|
1566
1695
|
if (meta.tier === 3 || meta.internal) return true;
|
|
1567
1696
|
return false;
|
|
@@ -1642,6 +1771,7 @@ function buildSpec(meta, normalized, entry, skillsDir, source) {
|
|
|
1642
1771
|
sourceDir: entry.name,
|
|
1643
1772
|
skillsBaseDir: skillsDir,
|
|
1644
1773
|
source,
|
|
1774
|
+
...meta.cursor ? { cursor: meta.cursor } : {},
|
|
1645
1775
|
prompt: {
|
|
1646
1776
|
context: buildContextLines(meta).join("\n"),
|
|
1647
1777
|
objective: buildObjectiveLines(meta).join("\n"),
|
|
@@ -1766,27 +1896,140 @@ function renderGemini(spec, skillMdContent, skillYamlContent) {
|
|
|
1766
1896
|
return lines.join("\n");
|
|
1767
1897
|
}
|
|
1768
1898
|
|
|
1899
|
+
// src/slash-commands/render-cursor.ts
|
|
1900
|
+
function renderCursor(spec, skillMdContent, cursorConfig) {
|
|
1901
|
+
const lines = ["---"];
|
|
1902
|
+
lines.push(`description: ${spec.description}`);
|
|
1903
|
+
if (cursorConfig?.globs && cursorConfig.globs.length > 0) {
|
|
1904
|
+
lines.push("globs:");
|
|
1905
|
+
for (const glob of cursorConfig.globs) {
|
|
1906
|
+
lines.push(` - ${glob}`);
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
const alwaysApply = cursorConfig?.alwaysApply ?? false;
|
|
1910
|
+
lines.push(`alwaysApply: ${alwaysApply}`);
|
|
1911
|
+
lines.push("---");
|
|
1912
|
+
lines.push("");
|
|
1913
|
+
lines.push(GENERATED_HEADER_CURSOR);
|
|
1914
|
+
lines.push("");
|
|
1915
|
+
lines.push(skillMdContent);
|
|
1916
|
+
lines.push("");
|
|
1917
|
+
return lines.join("\n");
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
// src/slash-commands/render-codex.ts
|
|
1921
|
+
function renderCodexSkill(skillMdContent) {
|
|
1922
|
+
return `<!-- ${GENERATED_HEADER_CODEX.replace(/<!--\s*|\s*-->/g, "").trim()} -->
|
|
1923
|
+
|
|
1924
|
+
${skillMdContent}
|
|
1925
|
+
`;
|
|
1926
|
+
}
|
|
1927
|
+
function renderCodexOpenaiYaml(spec) {
|
|
1928
|
+
return [
|
|
1929
|
+
"# Reserved for Phase B native integration",
|
|
1930
|
+
`name: ${spec.skillYamlName}`,
|
|
1931
|
+
`version: "1.0.0"`,
|
|
1932
|
+
""
|
|
1933
|
+
].join("\n");
|
|
1934
|
+
}
|
|
1935
|
+
function renderCodexAgentsMd(specs) {
|
|
1936
|
+
const lines = [];
|
|
1937
|
+
lines.push(`<!-- ${GENERATED_HEADER_CODEX.replace(/<!--\s*|\s*-->/g, "").trim()} -->`);
|
|
1938
|
+
lines.push("");
|
|
1939
|
+
lines.push("# Harness Skills");
|
|
1940
|
+
lines.push("");
|
|
1941
|
+
lines.push(
|
|
1942
|
+
"This file bootstraps harness context for Codex CLI. Each skill is available as a structured workflow in the `harness/` directory."
|
|
1943
|
+
);
|
|
1944
|
+
lines.push("");
|
|
1945
|
+
lines.push("## Available Skills");
|
|
1946
|
+
lines.push("");
|
|
1947
|
+
for (const spec of specs) {
|
|
1948
|
+
lines.push(`- **${spec.skillYamlName}** \u2014 ${spec.description}`);
|
|
1949
|
+
}
|
|
1950
|
+
lines.push("");
|
|
1951
|
+
return lines.join("\n");
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
// src/slash-commands/sync-codex.ts
|
|
1955
|
+
import fs12 from "fs";
|
|
1956
|
+
import path14 from "path";
|
|
1957
|
+
function computeCodexSync(outputDir, specs, dryRun) {
|
|
1958
|
+
const added = [];
|
|
1959
|
+
const updated = [];
|
|
1960
|
+
const unchanged = [];
|
|
1961
|
+
const specSkillNames = /* @__PURE__ */ new Set();
|
|
1962
|
+
for (const spec of specs) {
|
|
1963
|
+
const mdPath = path14.join(spec.skillsBaseDir, spec.sourceDir, "SKILL.md");
|
|
1964
|
+
const skillMd = fs12.existsSync(mdPath) ? fs12.readFileSync(mdPath, "utf-8") : "";
|
|
1965
|
+
const skillDir = path14.join(outputDir, spec.skillYamlName);
|
|
1966
|
+
specSkillNames.add(spec.skillYamlName);
|
|
1967
|
+
const renderedSkillMd = renderCodexSkill(skillMd);
|
|
1968
|
+
const renderedOpenaiYaml = renderCodexOpenaiYaml(spec);
|
|
1969
|
+
const existingSkillMdPath = path14.join(skillDir, "SKILL.md");
|
|
1970
|
+
const existingOpenaiYamlPath = path14.join(skillDir, "agents", "openai.yaml");
|
|
1971
|
+
if (!fs12.existsSync(skillDir)) {
|
|
1972
|
+
added.push(spec.skillYamlName);
|
|
1973
|
+
} else {
|
|
1974
|
+
const existingSkillMd = fs12.existsSync(existingSkillMdPath) ? fs12.readFileSync(existingSkillMdPath, "utf-8") : "";
|
|
1975
|
+
const existingOpenaiYaml = fs12.existsSync(existingOpenaiYamlPath) ? fs12.readFileSync(existingOpenaiYamlPath, "utf-8") : "";
|
|
1976
|
+
if (existingSkillMd === renderedSkillMd && existingOpenaiYaml === renderedOpenaiYaml) {
|
|
1977
|
+
unchanged.push(spec.skillYamlName);
|
|
1978
|
+
} else {
|
|
1979
|
+
updated.push(spec.skillYamlName);
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
if (!dryRun && !unchanged.includes(spec.skillYamlName)) {
|
|
1983
|
+
const agentsSubDir = path14.join(skillDir, "agents");
|
|
1984
|
+
fs12.mkdirSync(agentsSubDir, { recursive: true });
|
|
1985
|
+
fs12.writeFileSync(existingSkillMdPath, renderedSkillMd, "utf-8");
|
|
1986
|
+
fs12.writeFileSync(existingOpenaiYamlPath, renderedOpenaiYaml, "utf-8");
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
const removed = detectCodexOrphans(outputDir, specSkillNames);
|
|
1990
|
+
return { added, updated, removed, unchanged };
|
|
1991
|
+
}
|
|
1992
|
+
function detectCodexOrphans(outputDir, specSkillNames) {
|
|
1993
|
+
const removed = [];
|
|
1994
|
+
if (!fs12.existsSync(outputDir)) return removed;
|
|
1995
|
+
const existingDirs = fs12.readdirSync(outputDir, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name);
|
|
1996
|
+
for (const dirName of existingDirs) {
|
|
1997
|
+
if (specSkillNames.has(dirName)) continue;
|
|
1998
|
+
const skillMdPath = path14.join(outputDir, dirName, "SKILL.md");
|
|
1999
|
+
if (fs12.existsSync(skillMdPath)) {
|
|
2000
|
+
const content = fs12.readFileSync(skillMdPath, "utf-8");
|
|
2001
|
+
if (content.includes(GENERATED_HEADER_CODEX)) {
|
|
2002
|
+
removed.push(dirName);
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
return removed;
|
|
2007
|
+
}
|
|
2008
|
+
|
|
1769
2009
|
// src/commands/generate-slash-commands.ts
|
|
1770
2010
|
function resolveOutputDir(platform, opts) {
|
|
1771
2011
|
if (opts.output) {
|
|
1772
|
-
return
|
|
2012
|
+
return path15.join(opts.output, "harness");
|
|
1773
2013
|
}
|
|
1774
2014
|
if (opts.global) {
|
|
1775
2015
|
const home = os.homedir();
|
|
1776
|
-
|
|
2016
|
+
if (platform === "claude-code") return path15.join(home, ".claude", "commands", "harness");
|
|
2017
|
+
if (platform === "gemini-cli") return path15.join(home, ".gemini", "commands", "harness");
|
|
2018
|
+
if (platform === "cursor") return path15.join(home, ".cursor", "rules", "harness");
|
|
2019
|
+
return path15.join(home, ".codex", "harness");
|
|
1777
2020
|
}
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
return
|
|
2021
|
+
if (platform === "claude-code") return path15.join("agents", "commands", "claude-code", "harness");
|
|
2022
|
+
if (platform === "gemini-cli") return path15.join("agents", "commands", "gemini-cli", "harness");
|
|
2023
|
+
if (platform === "cursor") return path15.join("agents", "commands", "cursor", "harness");
|
|
2024
|
+
return path15.join("agents", "commands", "codex", "harness");
|
|
1782
2025
|
}
|
|
1783
2026
|
async function confirmDeletion(files) {
|
|
1784
2027
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
1785
|
-
return new Promise((
|
|
2028
|
+
return new Promise((resolve3) => {
|
|
1786
2029
|
rl.question(`
|
|
1787
2030
|
Remove ${files.length} orphaned command(s)? (y/N) `, (answer) => {
|
|
1788
2031
|
rl.close();
|
|
1789
|
-
|
|
2032
|
+
resolve3(answer.toLowerCase() === "y");
|
|
1790
2033
|
});
|
|
1791
2034
|
});
|
|
1792
2035
|
}
|
|
@@ -1800,12 +2043,12 @@ function resolveSkillSources(opts) {
|
|
|
1800
2043
|
sources.push({ dir: projectDir, source: "project" });
|
|
1801
2044
|
}
|
|
1802
2045
|
const communityDir = resolveCommunitySkillsDir();
|
|
1803
|
-
if (
|
|
2046
|
+
if (fs13.existsSync(communityDir)) {
|
|
1804
2047
|
sources.push({ dir: communityDir, source: "community" });
|
|
1805
2048
|
}
|
|
1806
2049
|
if (opts.includeGlobal || sources.length === 0) {
|
|
1807
2050
|
const globalDir = resolveGlobalSkillsDir();
|
|
1808
|
-
if (!projectDir ||
|
|
2051
|
+
if (!projectDir || path15.resolve(globalDir) !== path15.resolve(projectDir)) {
|
|
1809
2052
|
sources.push({ dir: globalDir, source: "global" });
|
|
1810
2053
|
}
|
|
1811
2054
|
}
|
|
@@ -1817,12 +2060,26 @@ function generateSlashCommands(opts) {
|
|
|
1817
2060
|
const results = [];
|
|
1818
2061
|
for (const platform of opts.platforms) {
|
|
1819
2062
|
const outputDir = resolveOutputDir(platform, opts);
|
|
1820
|
-
const ext = fileExtension(platform);
|
|
1821
2063
|
const useAbsolutePaths = opts.global;
|
|
1822
2064
|
const rendered = /* @__PURE__ */ new Map();
|
|
2065
|
+
if (platform === "codex") {
|
|
2066
|
+
const codexSync = computeCodexSync(outputDir, specs, opts.dryRun);
|
|
2067
|
+
const codexRoot = path15.dirname(outputDir);
|
|
2068
|
+
if (!opts.dryRun) {
|
|
2069
|
+
fs13.mkdirSync(codexRoot, { recursive: true });
|
|
2070
|
+
fs13.writeFileSync(path15.join(codexRoot, "AGENTS.md"), renderCodexAgentsMd(specs), "utf-8");
|
|
2071
|
+
}
|
|
2072
|
+
results.push({ platform, ...codexSync, outputDir });
|
|
2073
|
+
continue;
|
|
2074
|
+
}
|
|
1823
2075
|
for (const spec of specs) {
|
|
1824
|
-
|
|
1825
|
-
|
|
2076
|
+
if (platform === "cursor") {
|
|
2077
|
+
const filename = `${spec.skillYamlName}.mdc`;
|
|
2078
|
+
const mdPath = path15.join(spec.skillsBaseDir, spec.sourceDir, "SKILL.md");
|
|
2079
|
+
const skillMd = fs13.existsSync(mdPath) ? fs13.readFileSync(mdPath, "utf-8") : "";
|
|
2080
|
+
rendered.set(filename, renderCursor(spec, skillMd, spec.cursor));
|
|
2081
|
+
} else if (platform === "claude-code") {
|
|
2082
|
+
const filename = `${spec.name}.md`;
|
|
1826
2083
|
const renderSpec = useAbsolutePaths ? {
|
|
1827
2084
|
...spec,
|
|
1828
2085
|
prompt: {
|
|
@@ -1830,7 +2087,7 @@ function generateSlashCommands(opts) {
|
|
|
1830
2087
|
executionContext: spec.prompt.executionContext.split("\n").map((line) => {
|
|
1831
2088
|
if (line.startsWith("@")) {
|
|
1832
2089
|
const relPath = line.slice(1);
|
|
1833
|
-
return `@${
|
|
2090
|
+
return `@${path15.resolve(relPath)}`;
|
|
1834
2091
|
}
|
|
1835
2092
|
return line;
|
|
1836
2093
|
}).join("\n")
|
|
@@ -1838,10 +2095,11 @@ function generateSlashCommands(opts) {
|
|
|
1838
2095
|
} : spec;
|
|
1839
2096
|
rendered.set(filename, renderClaudeCode(renderSpec));
|
|
1840
2097
|
} else {
|
|
1841
|
-
const
|
|
1842
|
-
const
|
|
1843
|
-
const
|
|
1844
|
-
const
|
|
2098
|
+
const filename = `${spec.name}.toml`;
|
|
2099
|
+
const mdPath = path15.join(spec.skillsBaseDir, spec.sourceDir, "SKILL.md");
|
|
2100
|
+
const yamlPath = path15.join(spec.skillsBaseDir, spec.sourceDir, "skill.yaml");
|
|
2101
|
+
const mdContent = fs13.existsSync(mdPath) ? fs13.readFileSync(mdPath, "utf-8") : "";
|
|
2102
|
+
const yamlContent = fs13.existsSync(yamlPath) ? fs13.readFileSync(yamlPath, "utf-8") : "";
|
|
1845
2103
|
rendered.set(filename, renderGemini(spec, mdContent, yamlContent));
|
|
1846
2104
|
}
|
|
1847
2105
|
}
|
|
@@ -1867,9 +2125,14 @@ async function handleOrphanDeletion(results, opts) {
|
|
|
1867
2125
|
const shouldDelete = opts.yes || await confirmDeletion(result.removed);
|
|
1868
2126
|
if (shouldDelete) {
|
|
1869
2127
|
for (const filename of result.removed) {
|
|
1870
|
-
const filePath =
|
|
1871
|
-
if (
|
|
1872
|
-
|
|
2128
|
+
const filePath = path15.join(result.outputDir, filename);
|
|
2129
|
+
if (fs13.existsSync(filePath)) {
|
|
2130
|
+
const stat = fs13.statSync(filePath);
|
|
2131
|
+
if (stat.isDirectory()) {
|
|
2132
|
+
fs13.rmSync(filePath, { recursive: true, force: true });
|
|
2133
|
+
} else {
|
|
2134
|
+
fs13.unlinkSync(filePath);
|
|
2135
|
+
}
|
|
1873
2136
|
}
|
|
1874
2137
|
}
|
|
1875
2138
|
}
|
|
@@ -1877,7 +2140,7 @@ async function handleOrphanDeletion(results, opts) {
|
|
|
1877
2140
|
}
|
|
1878
2141
|
function createGenerateSlashCommandsCommand() {
|
|
1879
2142
|
return new Command("generate-slash-commands").description(
|
|
1880
|
-
"Generate native
|
|
2143
|
+
"Generate native commands for Claude Code, Gemini CLI, Codex CLI, and Cursor from skill metadata"
|
|
1881
2144
|
).option("--platforms <list>", "Target platforms (comma-separated)", "claude-code,gemini-cli").option("--global", "Write to global config directories", false).option("--include-global", "Include built-in global skills alongside project skills", false).option("--output <dir>", "Custom output directory").option("--skills-dir <path>", "Skills directory to scan").option("--dry-run", "Show what would change without writing", false).option("--yes", "Skip deletion confirmation prompts", false).action(async (opts, cmd) => {
|
|
1882
2145
|
const globalOpts = cmd.optsWithGlobals();
|
|
1883
2146
|
const platforms = opts.platforms.split(",").map((p) => p.trim());
|
|
@@ -1995,7 +2258,7 @@ async function handleGenerateSlashCommands(input) {
|
|
|
1995
2258
|
// src/mcp/resources/state.ts
|
|
1996
2259
|
async function getStateResource(projectRoot) {
|
|
1997
2260
|
try {
|
|
1998
|
-
const { loadState, migrateToStreams } = await import("./dist-
|
|
2261
|
+
const { loadState, migrateToStreams } = await import("./dist-4LPXJYVZ.js");
|
|
1999
2262
|
await migrateToStreams(projectRoot);
|
|
2000
2263
|
const result = await loadState(projectRoot);
|
|
2001
2264
|
if (result.ok) {
|
|
@@ -2542,7 +2805,7 @@ async function handleGetImpact(input) {
|
|
|
2542
2805
|
}
|
|
2543
2806
|
|
|
2544
2807
|
// src/mcp/tools/graph/ingest-source.ts
|
|
2545
|
-
import * as
|
|
2808
|
+
import * as path16 from "path";
|
|
2546
2809
|
var ingestSourceDefinition = {
|
|
2547
2810
|
name: "ingest_source",
|
|
2548
2811
|
description: "Ingest sources into the project knowledge graph. Supports code analysis, knowledge documents, git history, or all at once.",
|
|
@@ -2562,10 +2825,10 @@ var ingestSourceDefinition = {
|
|
|
2562
2825
|
async function handleIngestSource(input) {
|
|
2563
2826
|
try {
|
|
2564
2827
|
const projectPath = sanitizePath(input.path);
|
|
2565
|
-
const graphDir =
|
|
2828
|
+
const graphDir = path16.join(projectPath, ".harness", "graph");
|
|
2566
2829
|
const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-B26DFXMP.js");
|
|
2567
|
-
const
|
|
2568
|
-
await
|
|
2830
|
+
const fs16 = await import("fs/promises");
|
|
2831
|
+
await fs16.mkdir(graphDir, { recursive: true });
|
|
2569
2832
|
const store = new GraphStore();
|
|
2570
2833
|
await store.load(graphDir);
|
|
2571
2834
|
const results = [];
|
|
@@ -2697,8 +2960,8 @@ async function handleAskGraph(input) {
|
|
|
2697
2960
|
}
|
|
2698
2961
|
|
|
2699
2962
|
// src/mcp/resources/graph.ts
|
|
2700
|
-
import * as
|
|
2701
|
-
import * as
|
|
2963
|
+
import * as fs14 from "fs/promises";
|
|
2964
|
+
import * as path17 from "path";
|
|
2702
2965
|
var MAX_ITEMS = 5e3;
|
|
2703
2966
|
function formatStaleness(isoTimestamp) {
|
|
2704
2967
|
const then = new Date(isoTimestamp).getTime();
|
|
@@ -2721,11 +2984,11 @@ async function getGraphResource(projectRoot) {
|
|
|
2721
2984
|
message: "No knowledge graph found. Run harness scan to build one."
|
|
2722
2985
|
});
|
|
2723
2986
|
}
|
|
2724
|
-
const graphDir =
|
|
2725
|
-
const metadataPath =
|
|
2987
|
+
const graphDir = path17.join(projectRoot, ".harness", "graph");
|
|
2988
|
+
const metadataPath = path17.join(graphDir, "metadata.json");
|
|
2726
2989
|
let lastScanTimestamp = null;
|
|
2727
2990
|
try {
|
|
2728
|
-
const raw = JSON.parse(await
|
|
2991
|
+
const raw = JSON.parse(await fs14.readFile(metadataPath, "utf-8"));
|
|
2729
2992
|
lastScanTimestamp = raw.lastScanTimestamp ?? null;
|
|
2730
2993
|
} catch {
|
|
2731
2994
|
}
|
|
@@ -2814,7 +3077,7 @@ var generateAgentDefinitionsDefinition = {
|
|
|
2814
3077
|
}
|
|
2815
3078
|
};
|
|
2816
3079
|
async function handleGenerateAgentDefinitions(input) {
|
|
2817
|
-
const { generateAgentDefinitions } = await import("./generate-agent-definitions-
|
|
3080
|
+
const { generateAgentDefinitions } = await import("./generate-agent-definitions-SAAOAPT4.js");
|
|
2818
3081
|
const platforms = input.platform === "all" || !input.platform ? ["claude-code", "gemini-cli"] : [input.platform];
|
|
2819
3082
|
const results = generateAgentDefinitions({
|
|
2820
3083
|
platforms: [...platforms],
|
|
@@ -2825,8 +3088,8 @@ async function handleGenerateAgentDefinitions(input) {
|
|
|
2825
3088
|
}
|
|
2826
3089
|
|
|
2827
3090
|
// src/mcp/tools/roadmap.ts
|
|
2828
|
-
import * as
|
|
2829
|
-
import * as
|
|
3091
|
+
import * as fs15 from "fs";
|
|
3092
|
+
import * as path18 from "path";
|
|
2830
3093
|
var manageRoadmapDefinition = {
|
|
2831
3094
|
name: "manage_roadmap",
|
|
2832
3095
|
description: "Manage the project roadmap: show, add, update, remove, sync features, or query by filter. Reads and writes docs/roadmap.md.",
|
|
@@ -2881,21 +3144,21 @@ var manageRoadmapDefinition = {
|
|
|
2881
3144
|
}
|
|
2882
3145
|
};
|
|
2883
3146
|
function roadmapPath(projectRoot) {
|
|
2884
|
-
return
|
|
3147
|
+
return path18.join(projectRoot, "docs", "roadmap.md");
|
|
2885
3148
|
}
|
|
2886
3149
|
function readRoadmapFile(projectRoot) {
|
|
2887
3150
|
const filePath = roadmapPath(projectRoot);
|
|
2888
3151
|
try {
|
|
2889
|
-
return
|
|
3152
|
+
return fs15.readFileSync(filePath, "utf-8");
|
|
2890
3153
|
} catch {
|
|
2891
3154
|
return null;
|
|
2892
3155
|
}
|
|
2893
3156
|
}
|
|
2894
3157
|
function writeRoadmapFile(projectRoot, content) {
|
|
2895
3158
|
const filePath = roadmapPath(projectRoot);
|
|
2896
|
-
const dir =
|
|
2897
|
-
|
|
2898
|
-
|
|
3159
|
+
const dir = path18.dirname(filePath);
|
|
3160
|
+
fs15.mkdirSync(dir, { recursive: true });
|
|
3161
|
+
fs15.writeFileSync(filePath, content, "utf-8");
|
|
2899
3162
|
}
|
|
2900
3163
|
function roadmapNotFoundError() {
|
|
2901
3164
|
return {
|
|
@@ -3108,7 +3371,7 @@ function handleSync(projectPath, input, deps) {
|
|
|
3108
3371
|
}
|
|
3109
3372
|
async function handleManageRoadmap(input) {
|
|
3110
3373
|
try {
|
|
3111
|
-
const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-
|
|
3374
|
+
const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-4LPXJYVZ.js");
|
|
3112
3375
|
const { Ok: Ok2 } = await import("./dist-USY2C5JL.js");
|
|
3113
3376
|
const projectPath = sanitizePath(input.path);
|
|
3114
3377
|
const deps = { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, Ok: Ok2 };
|
|
@@ -3536,7 +3799,7 @@ async function handleTransition(validInput, projectPath, id) {
|
|
|
3536
3799
|
const transition = transitionResult.data;
|
|
3537
3800
|
const prompt = renderTransition(transition);
|
|
3538
3801
|
try {
|
|
3539
|
-
const { saveHandoff } = await import("./dist-
|
|
3802
|
+
const { saveHandoff } = await import("./dist-4LPXJYVZ.js");
|
|
3540
3803
|
await saveHandoff(
|
|
3541
3804
|
projectPath,
|
|
3542
3805
|
{
|
|
@@ -3606,7 +3869,7 @@ async function handleEmitInteraction(input) {
|
|
|
3606
3869
|
}
|
|
3607
3870
|
async function recordInteraction(projectPath, id, type, decision, stream) {
|
|
3608
3871
|
try {
|
|
3609
|
-
const { loadState, saveState } = await import("./dist-
|
|
3872
|
+
const { loadState, saveState } = await import("./dist-4LPXJYVZ.js");
|
|
3610
3873
|
const stateResult = await loadState(projectPath, stream);
|
|
3611
3874
|
if (stateResult.ok) {
|
|
3612
3875
|
const state = stateResult.value;
|
|
@@ -3695,10 +3958,10 @@ async function handleGatherContext(input) {
|
|
|
3695
3958
|
input.include ?? ["state", "learnings", "handoff", "graph", "validation"]
|
|
3696
3959
|
);
|
|
3697
3960
|
const errors = [];
|
|
3698
|
-
const statePromise = includeSet.has("state") ? import("./dist-
|
|
3961
|
+
const statePromise = includeSet.has("state") ? import("./dist-4LPXJYVZ.js").then(
|
|
3699
3962
|
(core) => core.loadState(projectPath, void 0, input.session)
|
|
3700
3963
|
) : Promise.resolve(null);
|
|
3701
|
-
const learningsPromise = includeSet.has("learnings") ? import("./dist-
|
|
3964
|
+
const learningsPromise = includeSet.has("learnings") ? import("./dist-4LPXJYVZ.js").then(
|
|
3702
3965
|
(core) => core.loadBudgetedLearnings(projectPath, {
|
|
3703
3966
|
intent: input.intent,
|
|
3704
3967
|
tokenBudget: input.learningsBudget ?? 1e3,
|
|
@@ -3707,7 +3970,7 @@ async function handleGatherContext(input) {
|
|
|
3707
3970
|
...input.depth !== void 0 && { depth: input.depth }
|
|
3708
3971
|
})
|
|
3709
3972
|
) : Promise.resolve(null);
|
|
3710
|
-
const handoffPromise = includeSet.has("handoff") ? import("./dist-
|
|
3973
|
+
const handoffPromise = includeSet.has("handoff") ? import("./dist-4LPXJYVZ.js").then(
|
|
3711
3974
|
(core) => core.loadHandoff(projectPath, void 0, input.session)
|
|
3712
3975
|
) : Promise.resolve(null);
|
|
3713
3976
|
const graphPromise = includeSet.has("graph") ? (async () => {
|
|
@@ -3751,11 +4014,11 @@ async function handleGatherContext(input) {
|
|
|
3751
4014
|
context: contextBlocks
|
|
3752
4015
|
};
|
|
3753
4016
|
})() : Promise.resolve(null);
|
|
3754
|
-
const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-
|
|
4017
|
+
const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-4LPXJYVZ.js").then(
|
|
3755
4018
|
(core) => core.readSessionSections(projectPath, input.session)
|
|
3756
4019
|
) : Promise.resolve(null);
|
|
3757
4020
|
const shouldIncludeEvents = input.includeEvents !== void 0 ? input.includeEvents : includeSet.has("events") || !!input.session && !input.include;
|
|
3758
|
-
const eventsPromise = shouldIncludeEvents ? import("./dist-
|
|
4021
|
+
const eventsPromise = shouldIncludeEvents ? import("./dist-4LPXJYVZ.js").then(async (core) => {
|
|
3759
4022
|
const result = await core.loadEvents(projectPath, {
|
|
3760
4023
|
session: input.session
|
|
3761
4024
|
});
|
|
@@ -3763,7 +4026,7 @@ async function handleGatherContext(input) {
|
|
|
3763
4026
|
return core.formatEventTimeline(result.value);
|
|
3764
4027
|
}) : Promise.resolve(null);
|
|
3765
4028
|
const validationPromise = includeSet.has("validation") ? (async () => {
|
|
3766
|
-
const { handleValidateProject: handleValidateProject2 } = await import("./validate-
|
|
4029
|
+
const { handleValidateProject: handleValidateProject2 } = await import("./validate-VRTUHALQ.js");
|
|
3767
4030
|
const result = await handleValidateProject2({ path: projectPath });
|
|
3768
4031
|
const first = result.content[0];
|
|
3769
4032
|
return first ? JSON.parse(first.text) : null;
|
|
@@ -3857,7 +4120,7 @@ async function handleGatherContext(input) {
|
|
|
3857
4120
|
};
|
|
3858
4121
|
if (input.session) {
|
|
3859
4122
|
try {
|
|
3860
|
-
const core = await import("./dist-
|
|
4123
|
+
const core = await import("./dist-4LPXJYVZ.js");
|
|
3861
4124
|
core.updateSessionIndex(
|
|
3862
4125
|
projectPath,
|
|
3863
4126
|
input.session,
|
|
@@ -3927,7 +4190,7 @@ async function handleAssessProject(input) {
|
|
|
3927
4190
|
let validateResult = null;
|
|
3928
4191
|
if (checksToRun.has("validate")) {
|
|
3929
4192
|
try {
|
|
3930
|
-
const { handleValidateProject: handleValidateProject2 } = await import("./validate-
|
|
4193
|
+
const { handleValidateProject: handleValidateProject2 } = await import("./validate-VRTUHALQ.js");
|
|
3931
4194
|
const result = await handleValidateProject2({ path: projectPath });
|
|
3932
4195
|
const first = result.content[0];
|
|
3933
4196
|
const parsed = first ? JSON.parse(first.text) : {};
|
|
@@ -3952,7 +4215,7 @@ async function handleAssessProject(input) {
|
|
|
3952
4215
|
parallelChecks.push(
|
|
3953
4216
|
(async () => {
|
|
3954
4217
|
try {
|
|
3955
|
-
const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-
|
|
4218
|
+
const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-K5HSRBGB.js");
|
|
3956
4219
|
const result = await handleCheckDependencies2({ path: projectPath });
|
|
3957
4220
|
const first = result.content[0];
|
|
3958
4221
|
const parsed = first ? JSON.parse(first.text) : {};
|
|
@@ -3979,7 +4242,7 @@ async function handleAssessProject(input) {
|
|
|
3979
4242
|
parallelChecks.push(
|
|
3980
4243
|
(async () => {
|
|
3981
4244
|
try {
|
|
3982
|
-
const { handleCheckDocs: handleCheckDocs2 } = await import("./docs-
|
|
4245
|
+
const { handleCheckDocs: handleCheckDocs2 } = await import("./docs-4JRHTLUZ.js");
|
|
3983
4246
|
const result = await handleCheckDocs2({ path: projectPath, scope: "coverage" });
|
|
3984
4247
|
const first = result.content[0];
|
|
3985
4248
|
const parsed = first ? JSON.parse(first.text) : {};
|
|
@@ -4006,7 +4269,7 @@ async function handleAssessProject(input) {
|
|
|
4006
4269
|
parallelChecks.push(
|
|
4007
4270
|
(async () => {
|
|
4008
4271
|
try {
|
|
4009
|
-
const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-
|
|
4272
|
+
const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-G6CZ2A6P.js");
|
|
4010
4273
|
const result = await handleDetectEntropy2({ path: projectPath, type: "all" });
|
|
4011
4274
|
const first = result.content[0];
|
|
4012
4275
|
const parsed = first ? JSON.parse(first.text) : {};
|
|
@@ -4033,7 +4296,7 @@ async function handleAssessProject(input) {
|
|
|
4033
4296
|
parallelChecks.push(
|
|
4034
4297
|
(async () => {
|
|
4035
4298
|
try {
|
|
4036
|
-
const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-
|
|
4299
|
+
const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-ZDADTPYW.js");
|
|
4037
4300
|
const result = await handleRunSecurityScan2({ path: projectPath });
|
|
4038
4301
|
const first = result.content[0];
|
|
4039
4302
|
const parsed = first ? JSON.parse(first.text) : {};
|
|
@@ -4065,14 +4328,28 @@ async function handleAssessProject(input) {
|
|
|
4065
4328
|
parallelChecks.push(
|
|
4066
4329
|
(async () => {
|
|
4067
4330
|
try {
|
|
4068
|
-
const { handleCheckPerformance: handleCheckPerformance2 } = await import("./performance-
|
|
4331
|
+
const { handleCheckPerformance: handleCheckPerformance2 } = await import("./performance-UBCFI2UP.js");
|
|
4069
4332
|
const result = await handleCheckPerformance2({ path: projectPath });
|
|
4333
|
+
if ("isError" in result && result.isError) {
|
|
4334
|
+
const msg = result.content[0]?.text ?? "Performance check failed";
|
|
4335
|
+
return { name: "perf", passed: false, issueCount: 1, topIssue: msg };
|
|
4336
|
+
}
|
|
4070
4337
|
const first = result.content[0];
|
|
4071
|
-
|
|
4338
|
+
let parsed = {};
|
|
4339
|
+
try {
|
|
4340
|
+
parsed = first ? JSON.parse(first.text) : {};
|
|
4341
|
+
} catch {
|
|
4342
|
+
return {
|
|
4343
|
+
name: "perf",
|
|
4344
|
+
passed: false,
|
|
4345
|
+
issueCount: 1,
|
|
4346
|
+
topIssue: first?.text ?? "Invalid perf output"
|
|
4347
|
+
};
|
|
4348
|
+
}
|
|
4072
4349
|
const issues = parsed.violations?.length ?? parsed.issues?.length ?? 0;
|
|
4073
4350
|
return {
|
|
4074
4351
|
name: "perf",
|
|
4075
|
-
passed:
|
|
4352
|
+
passed: issues === 0,
|
|
4076
4353
|
issueCount: issues,
|
|
4077
4354
|
...issues > 0 ? { topIssue: "Performance issues detected" } : {},
|
|
4078
4355
|
...mode === "detailed" ? { detailed: parsed } : {}
|
|
@@ -4254,7 +4531,7 @@ async function handleReviewChanges(input) {
|
|
|
4254
4531
|
}
|
|
4255
4532
|
}
|
|
4256
4533
|
async function runQuickReview(projectPath, diff, diffLines, downgraded) {
|
|
4257
|
-
const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-
|
|
4534
|
+
const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-QYKQ65HB.js");
|
|
4258
4535
|
const result = await handleAnalyzeDiff2({ diff, path: projectPath });
|
|
4259
4536
|
const firstContent = result.content[0];
|
|
4260
4537
|
if (!firstContent) throw new Error("Empty analyze_diff response");
|
|
@@ -4285,7 +4562,7 @@ function extractFileCount(diffParsed) {
|
|
|
4285
4562
|
return files?.length ?? 0;
|
|
4286
4563
|
}
|
|
4287
4564
|
async function runStandardReview(projectPath, diff, diffLines, downgraded) {
|
|
4288
|
-
const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-
|
|
4565
|
+
const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-QYKQ65HB.js");
|
|
4289
4566
|
const [diffResult, reviewResult] = await Promise.all([
|
|
4290
4567
|
handleAnalyzeDiff2({ diff, path: projectPath }),
|
|
4291
4568
|
handleCreateSelfReview2({ path: projectPath, diff })
|
|
@@ -4317,7 +4594,7 @@ async function runStandardReview(projectPath, diff, diffLines, downgraded) {
|
|
|
4317
4594
|
};
|
|
4318
4595
|
}
|
|
4319
4596
|
async function runDeepReview(projectPath, diff, diffLines, _downgraded) {
|
|
4320
|
-
const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-
|
|
4597
|
+
const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-IQAVCWAX.js");
|
|
4321
4598
|
const result = await handleRunCodeReview2({ path: projectPath, diff });
|
|
4322
4599
|
const deepContent = result.content[0];
|
|
4323
4600
|
if (!deepContent) throw new Error("Empty code review response");
|
|
@@ -4603,7 +4880,7 @@ async function handleDetectStaleConstraints(input) {
|
|
|
4603
4880
|
]
|
|
4604
4881
|
};
|
|
4605
4882
|
}
|
|
4606
|
-
const { detectStaleConstraints } = await import("./dist-
|
|
4883
|
+
const { detectStaleConstraints } = await import("./dist-4LPXJYVZ.js");
|
|
4607
4884
|
const result = detectStaleConstraints(
|
|
4608
4885
|
store,
|
|
4609
4886
|
windowDays,
|
|
@@ -4735,7 +5012,7 @@ async function handleCodeOutline(input) {
|
|
|
4735
5012
|
};
|
|
4736
5013
|
}
|
|
4737
5014
|
try {
|
|
4738
|
-
const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-
|
|
5015
|
+
const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-4LPXJYVZ.js");
|
|
4739
5016
|
const { stat } = await import("fs/promises");
|
|
4740
5017
|
const stats = await stat(targetPath).catch(() => null);
|
|
4741
5018
|
if (stats?.isFile()) {
|
|
@@ -4815,7 +5092,7 @@ async function handleCodeSearch(input) {
|
|
|
4815
5092
|
};
|
|
4816
5093
|
}
|
|
4817
5094
|
try {
|
|
4818
|
-
const { searchSymbols } = await import("./dist-
|
|
5095
|
+
const { searchSymbols } = await import("./dist-4LPXJYVZ.js");
|
|
4819
5096
|
const result = await searchSymbols(input.query, directory, input.glob);
|
|
4820
5097
|
const lines = [`Search: "${result.query}" \u2014 ${result.matches.length} matches`];
|
|
4821
5098
|
for (const match of result.matches) {
|
|
@@ -4884,7 +5161,7 @@ async function handleCodeUnfold(input) {
|
|
|
4884
5161
|
}
|
|
4885
5162
|
try {
|
|
4886
5163
|
if (input.symbol) {
|
|
4887
|
-
const { unfoldSymbol } = await import("./dist-
|
|
5164
|
+
const { unfoldSymbol } = await import("./dist-4LPXJYVZ.js");
|
|
4888
5165
|
const result = await unfoldSymbol(filePath, input.symbol);
|
|
4889
5166
|
const header = result.warning ? `${result.file}:${result.startLine}-${result.endLine} ${result.warning}
|
|
4890
5167
|
` : `${result.file}:${result.startLine}-${result.endLine}
|
|
@@ -4892,7 +5169,7 @@ async function handleCodeUnfold(input) {
|
|
|
4892
5169
|
return { content: [{ type: "text", text: header + result.content }] };
|
|
4893
5170
|
}
|
|
4894
5171
|
if (input.startLine != null && input.endLine != null) {
|
|
4895
|
-
const { unfoldRange } = await import("./dist-
|
|
5172
|
+
const { unfoldRange } = await import("./dist-4LPXJYVZ.js");
|
|
4896
5173
|
const result = await unfoldRange(filePath, input.startLine, input.endLine);
|
|
4897
5174
|
const header = `${result.file}:${result.startLine}-${result.endLine}
|
|
4898
5175
|
`;
|
|
@@ -5107,7 +5384,7 @@ async function appendUpdateNotification(result, resolvedRoot) {
|
|
|
5107
5384
|
shouldRunCheck,
|
|
5108
5385
|
readCheckState,
|
|
5109
5386
|
spawnBackgroundCheck
|
|
5110
|
-
} = await import("./dist-
|
|
5387
|
+
} = await import("./dist-4LPXJYVZ.js");
|
|
5111
5388
|
const { CLI_VERSION } = await import("./version-KFFPOQAX.js");
|
|
5112
5389
|
const configInterval = readConfigInterval(resolvedRoot);
|
|
5113
5390
|
const DEFAULT_INTERVAL = 864e5;
|
|
@@ -5125,19 +5402,24 @@ ${notification}` });
|
|
|
5125
5402
|
} catch {
|
|
5126
5403
|
}
|
|
5127
5404
|
}
|
|
5128
|
-
function createHarnessServer(projectRoot) {
|
|
5405
|
+
function createHarnessServer(projectRoot, toolFilter) {
|
|
5129
5406
|
const resolvedRoot = projectRoot ?? process.cwd();
|
|
5130
5407
|
let sessionChecked = false;
|
|
5408
|
+
const filteredDefinitions = toolFilter ? TOOL_DEFINITIONS.filter((t) => toolFilter.includes(t.name)) : TOOL_DEFINITIONS;
|
|
5409
|
+
const filteredHandlers = toolFilter ? Object.fromEntries(
|
|
5410
|
+
Object.entries(TOOL_HANDLERS).filter(([name]) => toolFilter.includes(name))
|
|
5411
|
+
) : TOOL_HANDLERS;
|
|
5131
5412
|
const server = new Server(
|
|
5132
5413
|
{ name: "harness-engineering", version: "0.1.0" },
|
|
5133
5414
|
{ capabilities: { tools: {}, resources: {} } }
|
|
5134
5415
|
);
|
|
5135
5416
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
5136
|
-
tools:
|
|
5417
|
+
tools: filteredDefinitions
|
|
5137
5418
|
}));
|
|
5419
|
+
const guardedHandlers = applyInjectionGuard(filteredHandlers, { projectRoot: resolvedRoot });
|
|
5138
5420
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
5139
5421
|
const { name, arguments: args } = request.params;
|
|
5140
|
-
const handler =
|
|
5422
|
+
const handler = guardedHandlers[name];
|
|
5141
5423
|
if (!handler) {
|
|
5142
5424
|
return { content: [{ type: "text", text: `Unknown tool: ${name}` }], isError: true };
|
|
5143
5425
|
}
|
|
@@ -5166,8 +5448,8 @@ function createHarnessServer(projectRoot) {
|
|
|
5166
5448
|
});
|
|
5167
5449
|
return server;
|
|
5168
5450
|
}
|
|
5169
|
-
async function startServer() {
|
|
5170
|
-
const server = createHarnessServer();
|
|
5451
|
+
async function startServer(toolFilter) {
|
|
5452
|
+
const server = createHarnessServer(void 0, toolFilter);
|
|
5171
5453
|
const transport = new StdioServerTransport();
|
|
5172
5454
|
await server.connect(transport);
|
|
5173
5455
|
}
|