@dommaker/harness 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/CHANGELOG.md +12 -0
- package/bin/harness.js +6 -0
- package/dist/cli/command-contract.d.ts +4 -4
- package/dist/cli/command-contract.d.ts.map +1 -1
- package/dist/cli/commands/command.d.ts.map +1 -1
- package/dist/cli/commands/command.js +5 -5
- package/dist/cli/commands/command.js.map +1 -1
- package/dist/cli/commands/constraints-disable.d.ts +7 -11
- package/dist/cli/commands/constraints-disable.d.ts.map +1 -1
- package/dist/cli/commands/constraints-disable.js +8 -80
- package/dist/cli/commands/constraints-disable.js.map +1 -1
- package/dist/cli/commands/constraints-pack-proposal.d.ts +7 -20
- package/dist/cli/commands/constraints-pack-proposal.d.ts.map +1 -1
- package/dist/cli/commands/constraints-pack-proposal.js +21 -129
- package/dist/cli/commands/constraints-pack-proposal.js.map +1 -1
- package/dist/cli/commands/constraints-reactivate.d.ts +8 -20
- package/dist/cli/commands/constraints-reactivate.d.ts.map +1 -1
- package/dist/cli/commands/constraints-reactivate.js +11 -105
- package/dist/cli/commands/constraints-reactivate.js.map +1 -1
- package/dist/cli/commands/constraints-retire.d.ts +11 -67
- package/dist/cli/commands/constraints-retire.d.ts.map +1 -1
- package/dist/cli/commands/constraints-retire.js +18 -195
- package/dist/cli/commands/constraints-retire.js.map +1 -1
- package/dist/cli/commands/constraints.d.ts +6 -9
- package/dist/cli/commands/constraints.d.ts.map +1 -1
- package/dist/cli/commands/constraints.js +7 -21
- package/dist/cli/commands/constraints.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +4 -19
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/knowledge.js +1 -1
- package/dist/cli/commands/knowledge.js.map +1 -1
- package/dist/cli/commands/release.d.ts +2 -2
- package/dist/cli/commands/release.js +2 -2
- package/dist/cli/commands/scaffold-templates.d.ts +7 -0
- package/dist/cli/commands/scaffold-templates.d.ts.map +1 -1
- package/dist/cli/commands/scaffold-templates.js +21 -1
- package/dist/cli/commands/scaffold-templates.js.map +1 -1
- package/dist/cli/commands/sync-docs/context-syncer.d.ts +13 -0
- package/dist/cli/commands/sync-docs/context-syncer.d.ts.map +1 -1
- package/dist/cli/commands/sync-docs/context-syncer.js +30 -0
- package/dist/cli/commands/sync-docs/context-syncer.js.map +1 -1
- package/dist/cli/commands/sync-docs/index.d.ts +1 -1
- package/dist/cli/commands/sync-docs/index.d.ts.map +1 -1
- package/dist/cli/commands/sync-docs/index.js +30 -4
- package/dist/cli/commands/sync-docs/index.js.map +1 -1
- package/dist/cli/commands/sync-docs/project-reader.d.ts +5 -0
- package/dist/cli/commands/sync-docs/project-reader.d.ts.map +1 -1
- package/dist/cli/commands/sync-docs/project-reader.js.map +1 -1
- package/dist/cli/commands/validate.d.ts.map +1 -1
- package/dist/cli/commands/validate.js +7 -0
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/gate-command.js +1 -1
- package/dist/cli/gate-command.js.map +1 -1
- package/dist/completion-checkers/glob-match.d.ts +1 -1
- package/dist/completion-checkers/glob-match.d.ts.map +1 -1
- package/dist/completion-checkers/glob-match.js +3 -38
- package/dist/completion-checkers/glob-match.js.map +1 -1
- package/dist/context/index.d.ts +2 -3
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +2 -6
- package/dist/context/index.js.map +1 -1
- package/dist/context/knowledge-injector.d.ts.map +1 -1
- package/dist/context/knowledge-injector.js +3 -4
- package/dist/context/knowledge-injector.js.map +1 -1
- package/dist/context/session-manager.d.ts +0 -6
- package/dist/context/session-manager.d.ts.map +1 -1
- package/dist/context/session-manager.js +0 -9
- package/dist/context/session-manager.js.map +1 -1
- package/dist/context/types.d.ts +0 -24
- package/dist/context/types.d.ts.map +1 -1
- package/dist/core/config-files.d.ts +21 -0
- package/dist/core/config-files.d.ts.map +1 -0
- package/dist/core/config-files.js +75 -0
- package/dist/core/config-files.js.map +1 -0
- package/dist/core/constraint-lifecycle.d.ts +127 -0
- package/dist/core/constraint-lifecycle.d.ts.map +1 -0
- package/dist/core/constraint-lifecycle.js +306 -0
- package/dist/core/constraint-lifecycle.js.map +1 -0
- package/dist/core/constraints/checker.d.ts +9 -1
- package/dist/core/constraints/checker.d.ts.map +1 -1
- package/dist/core/constraints/checker.js +18 -0
- package/dist/core/constraints/checker.js.map +1 -1
- package/dist/core/constraints/checkers/no-completion-without-verification.d.ts +6 -1
- package/dist/core/constraints/checkers/no-completion-without-verification.d.ts.map +1 -1
- package/dist/core/constraints/checkers/no-completion-without-verification.js +17 -1
- package/dist/core/constraints/checkers/no-completion-without-verification.js.map +1 -1
- package/dist/core/constraints/checkers/no-hardcoded-credentials.d.ts +0 -2
- package/dist/core/constraints/checkers/no-hardcoded-credentials.d.ts.map +1 -1
- package/dist/core/constraints/checkers/no-hardcoded-credentials.js +0 -5
- package/dist/core/constraints/checkers/no-hardcoded-credentials.js.map +1 -1
- package/dist/core/constraints/checkers/templated/file-exists.js +1 -1
- package/dist/core/constraints/checkers/templated/file-exists.js.map +1 -1
- package/dist/core/constraints/checkers/templated/glob.d.ts +2 -3
- package/dist/core/constraints/checkers/templated/glob.d.ts.map +1 -1
- package/dist/core/constraints/checkers/templated/glob.js +4 -40
- package/dist/core/constraints/checkers/templated/glob.js.map +1 -1
- package/dist/core/constraints/construction-sites.d.ts +56 -0
- package/dist/core/constraints/construction-sites.d.ts.map +1 -0
- package/dist/core/constraints/construction-sites.js +75 -0
- package/dist/core/constraints/construction-sites.js.map +1 -0
- package/dist/core/constraints/doc-freshness/runner.d.ts.map +1 -1
- package/dist/core/constraints/doc-freshness/runner.js +3 -1
- package/dist/core/constraints/doc-freshness/runner.js.map +1 -1
- package/dist/core/constraints/index.d.ts +0 -2
- package/dist/core/constraints/index.d.ts.map +1 -1
- package/dist/core/constraints/index.js +1 -4
- package/dist/core/constraints/index.js.map +1 -1
- package/dist/core/constraints/meta.d.ts +18 -0
- package/dist/core/constraints/meta.d.ts.map +1 -0
- package/dist/core/constraints/meta.js +31 -0
- package/dist/core/constraints/meta.js.map +1 -0
- package/dist/core/constraints/pack-proposal.d.ts +66 -0
- package/dist/core/constraints/pack-proposal.d.ts.map +1 -0
- package/dist/core/constraints/pack-proposal.js +181 -0
- package/dist/core/constraints/pack-proposal.js.map +1 -0
- package/dist/core/constraints/usage-report.d.ts +3 -1
- package/dist/core/constraints/usage-report.d.ts.map +1 -1
- package/dist/core/constraints/usage-report.js +3 -1
- package/dist/core/constraints/usage-report.js.map +1 -1
- package/dist/core/effective-constraints.d.ts +6 -6
- package/dist/core/effective-constraints.d.ts.map +1 -1
- package/dist/core/effective-constraints.js +6 -6
- package/dist/core/effective-constraints.js.map +1 -1
- package/dist/core/index.d.ts +3 -6
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -6
- package/dist/core/index.js.map +1 -1
- package/dist/core/validators/check-handlers/command.d.ts.map +1 -1
- package/dist/core/validators/check-handlers/command.js +42 -4
- package/dist/core/validators/check-handlers/command.js.map +1 -1
- package/dist/gates/checker-gate.d.ts +2 -1
- package/dist/gates/checker-gate.d.ts.map +1 -1
- package/dist/gates/checker-gate.js +2 -1
- package/dist/gates/checker-gate.js.map +1 -1
- package/dist/gates/command.d.ts +3 -20
- package/dist/gates/command.d.ts.map +1 -1
- package/dist/gates/command.js +2 -35
- package/dist/gates/command.js.map +1 -1
- package/dist/gates/definitions.d.ts +1 -1
- package/dist/gates/definitions.d.ts.map +1 -1
- package/dist/gates/definitions.js +1 -1
- package/dist/gates/definitions.js.map +1 -1
- package/dist/gates/index.d.ts +6 -40
- package/dist/gates/index.d.ts.map +1 -1
- package/dist/gates/index.js +5 -79
- package/dist/gates/index.js.map +1 -1
- package/dist/gates/registry.js +1 -1
- package/dist/gates/registry.js.map +1 -1
- package/dist/gates/types.d.ts +10 -3
- package/dist/gates/types.d.ts.map +1 -1
- package/dist/index.d.ts +16 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -64
- package/dist/index.js.map +1 -1
- package/dist/knowledge/index.d.ts +1 -3
- package/dist/knowledge/index.d.ts.map +1 -1
- package/dist/knowledge/index.js +3 -5
- package/dist/knowledge/index.js.map +1 -1
- package/dist/knowledge/query.d.ts +1 -1
- package/dist/knowledge/query.d.ts.map +1 -1
- package/dist/knowledge/query.js +12 -15
- package/dist/knowledge/query.js.map +1 -1
- package/dist/knowledge/token-estimate.d.ts +14 -0
- package/dist/knowledge/token-estimate.d.ts.map +1 -0
- package/dist/knowledge/token-estimate.js +31 -0
- package/dist/knowledge/token-estimate.js.map +1 -0
- package/dist/monitoring/analyzer-base.d.ts +0 -8
- package/dist/monitoring/analyzer-base.d.ts.map +1 -1
- package/dist/monitoring/analyzer-base.js +0 -20
- package/dist/monitoring/analyzer-base.js.map +1 -1
- package/dist/monitoring/index.d.ts +2 -7
- package/dist/monitoring/index.d.ts.map +1 -1
- package/dist/monitoring/index.js +2 -9
- package/dist/monitoring/index.js.map +1 -1
- package/dist/monitoring/trace-analyzer.d.ts +0 -4
- package/dist/monitoring/trace-analyzer.d.ts.map +1 -1
- package/dist/monitoring/trace-analyzer.js +0 -9
- package/dist/monitoring/trace-analyzer.js.map +1 -1
- package/dist/monitoring/traces.d.ts +14 -10
- package/dist/monitoring/traces.d.ts.map +1 -1
- package/dist/monitoring/traces.js +41 -45
- package/dist/monitoring/traces.js.map +1 -1
- package/dist/pretool-use-hook.js +2 -2
- package/dist/release/integrity.d.ts.map +1 -1
- package/dist/release/integrity.js +0 -2
- package/dist/release/integrity.js.map +1 -1
- package/dist/test-setup/jsonl-fake-fs.d.ts +1 -1
- package/dist/test-setup/jsonl-fake-fs.js +1 -1
- package/dist/utils/glob-match.d.ts +10 -0
- package/dist/utils/glob-match.d.ts.map +1 -0
- package/dist/utils/glob-match.js +47 -0
- package/dist/utils/glob-match.js.map +1 -0
- package/dist/utils/jsonl.d.ts +1 -1
- package/dist/utils/jsonl.js +1 -1
- package/dist/utils/yaml-edit.d.ts +26 -0
- package/dist/utils/yaml-edit.d.ts.map +1 -0
- package/dist/utils/yaml-edit.js +98 -0
- package/dist/utils/yaml-edit.js.map +1 -0
- package/package.json +2 -2
- package/src/CONTEXT.md +13 -6
- package/src/__tests__/acceptance-gate.test.ts +2 -4
- package/src/__tests__/effective-constraints.test.ts +16 -0
- package/src/__tests__/layering.test.ts +2 -3
- package/src/__tests__/no-studio-references.test.ts +13 -5
- package/src/__tests__/pretool-use-hook.test.ts +3 -3
- package/src/__tests__/public-exports.test.ts +195 -41
- package/src/__tests__/public-type-surface.test.ts +25 -65
- package/src/__tests__/public-value-surface.test.ts +13 -36
- package/src/__tests__/trace-analyzer-extra.test.ts +1 -13
- package/src/agents/CONTEXT.md +4 -4
- package/src/cli/__tests__/gate-command.test.ts +1 -1
- package/src/cli/command-contract.ts +4 -4
- package/src/cli/commands/CONTEXT.md +4 -4
- package/src/cli/commands/__tests__/command.test.ts +2 -2
- package/src/cli/commands/__tests__/knowledge-view.test.ts +1 -1
- package/src/cli/commands/__tests__/project-path-convention.test.ts +3 -35
- package/src/cli/commands/__tests__/sync-docs-construction-sites.test.ts +175 -0
- package/src/cli/commands/__tests__/validate.test.ts +49 -0
- package/src/cli/commands/command.ts +2 -1
- package/src/cli/commands/constraints-disable.ts +8 -59
- package/src/cli/commands/constraints-pack-proposal.ts +26 -121
- package/src/cli/commands/constraints-reactivate.ts +22 -113
- package/src/cli/commands/constraints-retire.ts +29 -269
- package/src/cli/commands/constraints.ts +6 -30
- package/src/cli/commands/init.ts +5 -19
- package/src/cli/commands/knowledge.ts +1 -1
- package/src/cli/commands/release.ts +2 -2
- package/src/cli/commands/scaffold-templates.ts +23 -0
- package/src/cli/commands/security.ts +1 -1
- package/src/cli/commands/sync-docs/__tests__/construction-site-count.test.ts +49 -0
- package/src/cli/commands/sync-docs/context-syncer.ts +43 -1
- package/src/cli/commands/sync-docs/index.ts +41 -5
- package/src/cli/commands/sync-docs/project-reader.ts +5 -0
- package/src/cli/commands/validate.ts +7 -0
- package/src/cli/gate-command.ts +1 -1
- package/src/completion-checkers/CONTEXT.md +3 -3
- package/src/completion-checkers/glob-match.ts +3 -35
- package/src/context/CONTEXT.md +5 -8
- package/src/context/__tests__/knowledge-injector.test.ts +21 -2
- package/src/context/__tests__/session-manager.test.ts +0 -7
- package/src/context/index.ts +1 -5
- package/src/context/knowledge-injector.ts +3 -4
- package/src/context/session-manager.ts +0 -10
- package/src/context/types.ts +0 -20
- package/src/core/CONTEXT.md +10 -5
- package/src/core/__tests__/config-files.test.ts +88 -0
- package/src/core/__tests__/constraint-lifecycle.test.ts +255 -0
- package/src/core/__tests__/constraints-meta.test.ts +26 -0
- package/src/core/__tests__/pack-proposal.test.ts +95 -0
- package/src/core/config-files.ts +39 -0
- package/src/core/constraint-lifecycle.ts +435 -0
- package/src/core/constraints/__tests__/check-cache.test.ts +0 -7
- package/src/core/constraints/__tests__/collect-constraints.test.ts +25 -0
- package/src/core/constraints/__tests__/construction-sites.test.ts +147 -0
- package/src/core/constraints/__tests__/context-reconcile.test.ts +16 -16
- package/src/core/constraints/__tests__/trace-injection.test.ts +14 -15
- package/src/core/constraints/__tests__/usage-report.test.ts +9 -0
- package/src/core/constraints/checker.ts +20 -1
- package/src/core/constraints/checkers/__tests__/no-completion-without-verification.test.ts +22 -3
- package/src/core/constraints/checkers/__tests__/no-hardcoded-credentials.test.ts +56 -41
- package/src/core/constraints/checkers/no-completion-without-verification.ts +16 -1
- package/src/core/constraints/checkers/no-hardcoded-credentials.ts +0 -5
- package/src/core/constraints/checkers/templated/file-exists.ts +1 -1
- package/src/core/constraints/checkers/templated/glob.ts +3 -36
- package/src/core/constraints/construction-sites.ts +95 -0
- package/src/core/constraints/doc-freshness/runner.ts +4 -1
- package/src/core/constraints/index.ts +0 -4
- package/src/core/constraints/meta.ts +40 -0
- package/src/core/constraints/pack-proposal.ts +179 -0
- package/src/core/constraints/usage-report.ts +3 -1
- package/src/core/effective-constraints.ts +6 -6
- package/src/core/index.ts +0 -15
- package/src/core/validators/__tests__/command-success-output.test.ts +56 -0
- package/src/core/validators/check-handlers/command.ts +44 -4
- package/src/gates/CONTEXT.md +20 -13
- package/src/gates/__tests__/acceptance-types-single-source.test.ts +7 -6
- package/src/gates/__tests__/acceptance.test.ts +3 -5
- package/src/gates/__tests__/command.test.ts +1 -13
- package/src/gates/__tests__/decision.test.ts +35 -0
- package/src/gates/checker-gate.ts +2 -1
- package/src/gates/command.ts +4 -38
- package/src/gates/definitions.ts +2 -2
- package/src/gates/index.ts +8 -95
- package/src/gates/registry.ts +1 -1
- package/src/gates/types.ts +11 -3
- package/src/hooks/CONTEXT.md +1 -1
- package/src/index.ts +50 -95
- package/src/knowledge/CONTEXT.md +6 -4
- package/src/knowledge/__tests__/token-estimate.test.ts +54 -0
- package/src/knowledge/index.ts +1 -3
- package/src/knowledge/query.ts +13 -14
- package/src/knowledge/token-estimate.ts +27 -0
- package/src/monitoring/CONTEXT.md +6 -8
- package/src/monitoring/__tests__/prune-trace-logs.test.ts +76 -0
- package/src/monitoring/__tests__/traces.test.ts +1 -17
- package/src/monitoring/analyzer-base.ts +0 -18
- package/src/monitoring/index.ts +2 -7
- package/src/monitoring/trace-analyzer.ts +0 -8
- package/src/monitoring/traces.ts +51 -51
- package/src/pretool-use-hook.ts +2 -2
- package/src/release/CONTEXT.md +1 -1
- package/src/release/__tests__/integrity.test.ts +3 -5
- package/src/release/integrity.ts +0 -2
- package/src/test-setup/jsonl-fake-fs.ts +1 -1
- package/src/utils/__tests__/glob-match.test.ts +52 -0
- package/src/utils/__tests__/jsonl-skip-disposition.test.ts +0 -1
- package/src/utils/__tests__/yaml-edit.test.ts +62 -0
- package/src/utils/glob-match.ts +41 -0
- package/src/utils/jsonl.ts +1 -1
- package/src/utils/yaml-edit.ts +67 -0
- package/dist/context/token-budget.d.ts +0 -115
- package/dist/context/token-budget.d.ts.map +0 -1
- package/dist/context/token-budget.js +0 -200
- package/dist/context/token-budget.js.map +0 -1
- package/dist/gates/runner.d.ts +0 -30
- package/dist/gates/runner.d.ts.map +0 -1
- package/dist/gates/runner.js +0 -38
- package/dist/gates/runner.js.map +0 -1
- package/dist/knowledge/primitives/code-structure.d.ts +0 -37
- package/dist/knowledge/primitives/code-structure.d.ts.map +0 -1
- package/dist/knowledge/primitives/code-structure.js +0 -185
- package/dist/knowledge/primitives/code-structure.js.map +0 -1
- package/dist/monitoring/context-tracker.d.ts +0 -38
- package/dist/monitoring/context-tracker.d.ts.map +0 -1
- package/dist/monitoring/context-tracker.js +0 -153
- package/dist/monitoring/context-tracker.js.map +0 -1
- package/dist/tools/definitions/core/code/fingerprint.sh +0 -273
- package/dist/tools/definitions/core/code/fingerprint.yml +0 -72
- package/dist/tools/definitions/core/code/parse.yml +0 -68
- package/dist/tools/definitions/core/code/register-language.sh +0 -475
- package/dist/tools/definitions/core/code/register-language.yml +0 -74
- package/dist/tools/definitions/core/docker/build.yml +0 -73
- package/dist/tools/definitions/core/docker/run.yml +0 -81
- package/dist/tools/definitions/core/file/copy.yml +0 -88
- package/dist/tools/definitions/core/file/read.yml +0 -69
- package/dist/tools/definitions/core/file/write.yml +0 -75
- package/dist/tools/definitions/core/git/branch.yml +0 -61
- package/dist/tools/definitions/core/git/cleanup-worktree.yml +0 -50
- package/dist/tools/definitions/core/git/clone.yml +0 -69
- package/dist/tools/definitions/core/git/commit.yml +0 -65
- package/dist/tools/definitions/core/git/push.yml +0 -79
- package/dist/tools/definitions/core/git/worktree.yml +0 -96
- package/dist/tools/definitions/core/notification/notify.sh +0 -152
- package/dist/tools/definitions/core/notification/notify.yml +0 -59
- package/dist/tools/definitions/core/npm/build.yml +0 -75
- package/dist/tools/definitions/core/npm/install.yml +0 -58
- package/dist/tools/definitions/core/npm/test.yml +0 -75
- package/dist/tools/definitions/core/validation/check-reuse.yml +0 -170
- package/dist/tools/definitions/core/validation/validate-handlers.yml +0 -118
- package/dist/tools/definitions/core/validation/validate-readme-stats.yml +0 -155
- package/dist/tools/definitions/core/validation/validate-yaml-syntax.yml +0 -134
- package/dist/tools/definitions/ext/browser/browser-automate.sh +0 -255
- package/dist/tools/definitions/ext/browser/browser-automate.yml +0 -166
- package/dist/tools/definitions/ext/browser/browser-close.sh +0 -104
- package/dist/tools/definitions/ext/browser/browser-close.yml +0 -54
- package/dist/tools/definitions/ext/browser/browser-mcp-debug.sh +0 -682
- package/dist/tools/definitions/ext/browser/browser-mcp-debug.yml +0 -167
- package/dist/tools/definitions/ext/browser/browser-start.sh +0 -101
- package/dist/tools/definitions/ext/browser/browser-start.yml +0 -61
- package/dist/tools/definitions/registry.json +0 -795
- package/dist/tools/definitions/std/README.md +0 -350
- package/dist/tools/definitions/std/analysis/analyze-codebase.yml +0 -72
- package/dist/tools/definitions/std/analysis/analyze-diff.yml +0 -182
- package/dist/tools/definitions/std/analysis/analyze-git-diff.yml +0 -70
- package/dist/tools/definitions/std/analysis/analyze-impact.yml +0 -78
- package/dist/tools/definitions/std/analysis/analyze-requirements.yml +0 -105
- package/dist/tools/definitions/std/analysis/brainstorm-options.yml +0 -106
- package/dist/tools/definitions/std/analysis/build-graph.yml +0 -154
- package/dist/tools/definitions/std/analysis/clarify-requirements.yml +0 -90
- package/dist/tools/definitions/std/analysis/detect-context.yml +0 -109
- package/dist/tools/definitions/std/analysis/detect-layers.yml +0 -125
- package/dist/tools/definitions/std/analysis/generate-tour.yml +0 -102
- package/dist/tools/definitions/std/analysis/search-enhance.yml +0 -105
- package/dist/tools/definitions/std/backlog/add.yml +0 -51
- package/dist/tools/definitions/std/backlog/decide.yml +0 -39
- package/dist/tools/definitions/std/backlog/github-sync.yml +0 -161
- package/dist/tools/definitions/std/backlog/list.yml +0 -53
- package/dist/tools/definitions/std/backlog/load.yml +0 -46
- package/dist/tools/definitions/std/backlog/resolve.yml +0 -37
- package/dist/tools/definitions/std/backlog/update.yml +0 -42
- package/dist/tools/definitions/std/bugfix/diagnose.yml +0 -68
- package/dist/tools/definitions/std/bugfix/fix.yml +0 -66
- package/dist/tools/definitions/std/bugfix/verify.yml +0 -69
- package/dist/tools/definitions/std/constraint/check-decomposition.yml +0 -103
- package/dist/tools/definitions/std/constraint/check-feature-list.yml +0 -77
- package/dist/tools/definitions/std/constraint/check-progress.yml +0 -97
- package/dist/tools/definitions/std/constraint/generate-report.yml +0 -147
- package/dist/tools/definitions/std/deploy/commit-push.yml +0 -33
- package/dist/tools/definitions/std/deploy/deploy-backend.yml +0 -37
- package/dist/tools/definitions/std/deploy/deploy-frontend.yml +0 -37
- package/dist/tools/definitions/std/deploy/rollback.yml +0 -148
- package/dist/tools/definitions/std/design/analyze-architecture-impact.yml +0 -113
- package/dist/tools/definitions/std/design/design-api.yml +0 -55
- package/dist/tools/definitions/std/design/design-architecture.yml +0 -97
- package/dist/tools/definitions/std/design/design-db.yml +0 -81
- package/dist/tools/definitions/std/design/generate-spec.yml +0 -182
- package/dist/tools/definitions/std/development/develop-api.yml +0 -85
- package/dist/tools/definitions/std/development/develop-backend.yml +0 -88
- package/dist/tools/definitions/std/development/develop-frontend.yml +0 -87
- package/dist/tools/definitions/std/development/develop-shared-types.yml +0 -74
- package/dist/tools/definitions/std/development/develop-task.yml +0 -122
- package/dist/tools/definitions/std/development/develop-tests.yml +0 -76
- package/dist/tools/definitions/std/development/execute-batch.yml +0 -152
- package/dist/tools/definitions/std/development/fix-issues.yml +0 -100
- package/dist/tools/definitions/std/development/implement-task.yml +0 -124
- package/dist/tools/definitions/std/development/review-fix-cycle.yml +0 -232
- package/dist/tools/definitions/std/evolution/implement.yml +0 -124
- package/dist/tools/definitions/std/evolution/prioritize.yml +0 -111
- package/dist/tools/definitions/std/evolution/report-gap.yml +0 -165
- package/dist/tools/definitions/std/file/read.yml +0 -21
- package/dist/tools/definitions/std/governance/aggregate-opinions.sh +0 -201
- package/dist/tools/definitions/std/governance/aggregate-opinions.yml +0 -78
- package/dist/tools/definitions/std/governance/audit-task.yml +0 -177
- package/dist/tools/definitions/std/governance/cast-vote.yml +0 -128
- package/dist/tools/definitions/std/governance/collect-issues.yml +0 -16
- package/dist/tools/definitions/std/governance/create-signed-document.yml +0 -23
- package/dist/tools/definitions/std/governance/create-voting-session.yml +0 -100
- package/dist/tools/definitions/std/governance/define-stance.sh +0 -243
- package/dist/tools/definitions/std/governance/define-stance.yml +0 -81
- package/dist/tools/definitions/std/governance/generate-review-report.yml +0 -23
- package/dist/tools/definitions/std/governance/impeach.yml +0 -178
- package/dist/tools/definitions/std/governance/multi-stance-review.yml +0 -153
- package/dist/tools/definitions/std/governance/prepare-artifact.yml +0 -20
- package/dist/tools/definitions/std/governance/review-spec-approval.yml +0 -262
- package/dist/tools/definitions/std/governance/rollback.yml +0 -185
- package/dist/tools/definitions/std/governance/stance-review.yml +0 -148
- package/dist/tools/definitions/std/governance/track-effect.yml +0 -198
- package/dist/tools/definitions/std/governance/vote-tally.yml +0 -143
- package/dist/tools/definitions/std/patch/execute.yml +0 -51
- package/dist/tools/definitions/std/planning/generate-tasks.yml +0 -36
- package/dist/tools/definitions/std/planning/load-tasks.yml +0 -44
- package/dist/tools/definitions/std/planning/split-batch.yml +0 -480
- package/dist/tools/definitions/std/planning/split-tasks.yml +0 -358
- package/dist/tools/definitions/std/planning/update-tasks.yml +0 -51
- package/dist/tools/definitions/std/planning/validate-tasks.yml +0 -46
- package/dist/tools/definitions/std/project/decide-next-workflow.yml +0 -38
- package/dist/tools/definitions/std/project/load-state.yml +0 -31
- package/dist/tools/definitions/std/project/save-state.yml +0 -32
- package/dist/tools/definitions/std/quality/check-quality.yml +0 -241
- package/dist/tools/definitions/std/quality/debug-systematic.yml +0 -163
- package/dist/tools/definitions/std/quality/handle-feedback.yml +0 -108
- package/dist/tools/definitions/std/quality/review-code.yml +0 -128
- package/dist/tools/definitions/std/quality/review-spec.yml +0 -140
- package/dist/tools/definitions/std/quality/review-task.yml +0 -190
- package/dist/tools/definitions/std/quality/run-tests.yml +0 -80
- package/dist/tools/definitions/std/quick/analyze.yml +0 -56
- package/dist/tools/definitions/std/quick/implement.yml +0 -67
- package/dist/tools/definitions/std/quick/verify.yml +0 -71
- package/dist/tools/definitions/std/verification/verify_completion.yml +0 -113
- package/dist/tools/definitions/std/verification/wait-condition.yml +0 -107
- package/dist/tools/index.d.ts +0 -5
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -10
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/paths.d.ts +0 -9
- package/dist/tools/paths.d.ts.map +0 -1
- package/dist/tools/paths.js +0 -51
- package/dist/tools/paths.js.map +0 -1
- package/src/__tests__/token-budget.test.ts +0 -252
- package/src/context/__tests__/token-budget.test.ts +0 -258
- package/src/context/token-budget.ts +0 -222
- package/src/gates/__tests__/runner.test.ts +0 -81
- package/src/gates/runner.ts +0 -57
- package/src/knowledge/primitives/__tests__/code-structure-degrade.test.ts +0 -24
- package/src/knowledge/primitives/__tests__/code-structure.test.ts +0 -120
- package/src/knowledge/primitives/code-structure.ts +0 -185
- package/src/monitoring/__tests__/context-tracker.test.ts +0 -180
- package/src/monitoring/context-tracker.ts +0 -136
- package/src/tools/CONTEXT.md +0 -24
- package/src/tools/__tests__/registry.test.ts +0 -221
- package/src/tools/definitions/core/code/fingerprint.sh +0 -273
- package/src/tools/definitions/core/code/fingerprint.yml +0 -72
- package/src/tools/definitions/core/code/parse.yml +0 -68
- package/src/tools/definitions/core/code/register-language.sh +0 -475
- package/src/tools/definitions/core/code/register-language.yml +0 -74
- package/src/tools/definitions/core/docker/build.yml +0 -73
- package/src/tools/definitions/core/docker/run.yml +0 -81
- package/src/tools/definitions/core/file/copy.yml +0 -88
- package/src/tools/definitions/core/file/read.yml +0 -69
- package/src/tools/definitions/core/file/write.yml +0 -75
- package/src/tools/definitions/core/git/branch.yml +0 -61
- package/src/tools/definitions/core/git/cleanup-worktree.yml +0 -50
- package/src/tools/definitions/core/git/clone.yml +0 -69
- package/src/tools/definitions/core/git/commit.yml +0 -65
- package/src/tools/definitions/core/git/push.yml +0 -79
- package/src/tools/definitions/core/git/worktree.yml +0 -96
- package/src/tools/definitions/core/notification/notify.sh +0 -152
- package/src/tools/definitions/core/notification/notify.yml +0 -59
- package/src/tools/definitions/core/npm/build.yml +0 -75
- package/src/tools/definitions/core/npm/install.yml +0 -58
- package/src/tools/definitions/core/npm/test.yml +0 -75
- package/src/tools/definitions/core/validation/check-reuse.yml +0 -170
- package/src/tools/definitions/core/validation/validate-handlers.yml +0 -118
- package/src/tools/definitions/core/validation/validate-readme-stats.yml +0 -155
- package/src/tools/definitions/core/validation/validate-yaml-syntax.yml +0 -134
- package/src/tools/definitions/ext/browser/browser-automate.sh +0 -255
- package/src/tools/definitions/ext/browser/browser-automate.yml +0 -166
- package/src/tools/definitions/ext/browser/browser-close.sh +0 -104
- package/src/tools/definitions/ext/browser/browser-close.yml +0 -54
- package/src/tools/definitions/ext/browser/browser-mcp-debug.sh +0 -682
- package/src/tools/definitions/ext/browser/browser-mcp-debug.yml +0 -167
- package/src/tools/definitions/ext/browser/browser-start.sh +0 -101
- package/src/tools/definitions/ext/browser/browser-start.yml +0 -61
- package/src/tools/definitions/registry.json +0 -795
- package/src/tools/definitions/std/README.md +0 -350
- package/src/tools/definitions/std/analysis/analyze-codebase.yml +0 -72
- package/src/tools/definitions/std/analysis/analyze-diff.yml +0 -182
- package/src/tools/definitions/std/analysis/analyze-git-diff.yml +0 -70
- package/src/tools/definitions/std/analysis/analyze-impact.yml +0 -78
- package/src/tools/definitions/std/analysis/analyze-requirements.yml +0 -105
- package/src/tools/definitions/std/analysis/brainstorm-options.yml +0 -106
- package/src/tools/definitions/std/analysis/build-graph.yml +0 -154
- package/src/tools/definitions/std/analysis/clarify-requirements.yml +0 -90
- package/src/tools/definitions/std/analysis/detect-context.yml +0 -109
- package/src/tools/definitions/std/analysis/detect-layers.yml +0 -125
- package/src/tools/definitions/std/analysis/generate-tour.yml +0 -102
- package/src/tools/definitions/std/analysis/search-enhance.yml +0 -105
- package/src/tools/definitions/std/backlog/add.yml +0 -51
- package/src/tools/definitions/std/backlog/decide.yml +0 -39
- package/src/tools/definitions/std/backlog/github-sync.yml +0 -161
- package/src/tools/definitions/std/backlog/list.yml +0 -53
- package/src/tools/definitions/std/backlog/load.yml +0 -46
- package/src/tools/definitions/std/backlog/resolve.yml +0 -37
- package/src/tools/definitions/std/backlog/update.yml +0 -42
- package/src/tools/definitions/std/bugfix/diagnose.yml +0 -68
- package/src/tools/definitions/std/bugfix/fix.yml +0 -66
- package/src/tools/definitions/std/bugfix/verify.yml +0 -69
- package/src/tools/definitions/std/constraint/check-decomposition.yml +0 -103
- package/src/tools/definitions/std/constraint/check-feature-list.yml +0 -77
- package/src/tools/definitions/std/constraint/check-progress.yml +0 -97
- package/src/tools/definitions/std/constraint/generate-report.yml +0 -147
- package/src/tools/definitions/std/deploy/commit-push.yml +0 -33
- package/src/tools/definitions/std/deploy/deploy-backend.yml +0 -37
- package/src/tools/definitions/std/deploy/deploy-frontend.yml +0 -37
- package/src/tools/definitions/std/deploy/rollback.yml +0 -148
- package/src/tools/definitions/std/design/analyze-architecture-impact.yml +0 -113
- package/src/tools/definitions/std/design/design-api.yml +0 -55
- package/src/tools/definitions/std/design/design-architecture.yml +0 -97
- package/src/tools/definitions/std/design/design-db.yml +0 -81
- package/src/tools/definitions/std/design/generate-spec.yml +0 -182
- package/src/tools/definitions/std/development/develop-api.yml +0 -85
- package/src/tools/definitions/std/development/develop-backend.yml +0 -88
- package/src/tools/definitions/std/development/develop-frontend.yml +0 -87
- package/src/tools/definitions/std/development/develop-shared-types.yml +0 -74
- package/src/tools/definitions/std/development/develop-task.yml +0 -122
- package/src/tools/definitions/std/development/develop-tests.yml +0 -76
- package/src/tools/definitions/std/development/execute-batch.yml +0 -152
- package/src/tools/definitions/std/development/fix-issues.yml +0 -100
- package/src/tools/definitions/std/development/implement-task.yml +0 -124
- package/src/tools/definitions/std/development/review-fix-cycle.yml +0 -232
- package/src/tools/definitions/std/evolution/implement.yml +0 -124
- package/src/tools/definitions/std/evolution/prioritize.yml +0 -111
- package/src/tools/definitions/std/evolution/report-gap.yml +0 -165
- package/src/tools/definitions/std/file/read.yml +0 -21
- package/src/tools/definitions/std/governance/aggregate-opinions.sh +0 -201
- package/src/tools/definitions/std/governance/aggregate-opinions.yml +0 -78
- package/src/tools/definitions/std/governance/audit-task.yml +0 -177
- package/src/tools/definitions/std/governance/cast-vote.yml +0 -128
- package/src/tools/definitions/std/governance/collect-issues.yml +0 -16
- package/src/tools/definitions/std/governance/create-signed-document.yml +0 -23
- package/src/tools/definitions/std/governance/create-voting-session.yml +0 -100
- package/src/tools/definitions/std/governance/define-stance.sh +0 -243
- package/src/tools/definitions/std/governance/define-stance.yml +0 -81
- package/src/tools/definitions/std/governance/generate-review-report.yml +0 -23
- package/src/tools/definitions/std/governance/impeach.yml +0 -178
- package/src/tools/definitions/std/governance/multi-stance-review.yml +0 -153
- package/src/tools/definitions/std/governance/prepare-artifact.yml +0 -20
- package/src/tools/definitions/std/governance/review-spec-approval.yml +0 -262
- package/src/tools/definitions/std/governance/rollback.yml +0 -185
- package/src/tools/definitions/std/governance/stance-review.yml +0 -148
- package/src/tools/definitions/std/governance/track-effect.yml +0 -198
- package/src/tools/definitions/std/governance/vote-tally.yml +0 -143
- package/src/tools/definitions/std/patch/execute.yml +0 -51
- package/src/tools/definitions/std/planning/generate-tasks.yml +0 -36
- package/src/tools/definitions/std/planning/load-tasks.yml +0 -44
- package/src/tools/definitions/std/planning/split-batch.yml +0 -480
- package/src/tools/definitions/std/planning/split-tasks.yml +0 -358
- package/src/tools/definitions/std/planning/update-tasks.yml +0 -51
- package/src/tools/definitions/std/planning/validate-tasks.yml +0 -46
- package/src/tools/definitions/std/project/decide-next-workflow.yml +0 -38
- package/src/tools/definitions/std/project/load-state.yml +0 -31
- package/src/tools/definitions/std/project/save-state.yml +0 -32
- package/src/tools/definitions/std/quality/check-quality.yml +0 -241
- package/src/tools/definitions/std/quality/debug-systematic.yml +0 -163
- package/src/tools/definitions/std/quality/handle-feedback.yml +0 -108
- package/src/tools/definitions/std/quality/review-code.yml +0 -128
- package/src/tools/definitions/std/quality/review-spec.yml +0 -140
- package/src/tools/definitions/std/quality/review-task.yml +0 -190
- package/src/tools/definitions/std/quality/run-tests.yml +0 -80
- package/src/tools/definitions/std/quick/analyze.yml +0 -56
- package/src/tools/definitions/std/quick/implement.yml +0 -67
- package/src/tools/definitions/std/quick/verify.yml +0 -71
- package/src/tools/definitions/std/verification/verify_completion.yml +0 -113
- package/src/tools/definitions/std/verification/wait-condition.yml +0 -107
- package/src/tools/index.ts +0 -5
- package/src/tools/paths.ts +0 -15
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# build.yml - Docker 构建
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 能力类型: docker 操作(工具型)
|
|
4
|
-
# 执行方式: 纯脚本,不调用 Agent
|
|
5
|
-
# ============================================================================
|
|
6
|
-
|
|
7
|
-
name: docker-build
|
|
8
|
-
description: 构建 Docker 镜像
|
|
9
|
-
|
|
10
|
-
input:
|
|
11
|
-
repo_path:
|
|
12
|
-
type: path
|
|
13
|
-
required: true
|
|
14
|
-
description: 项目路径
|
|
15
|
-
|
|
16
|
-
image_name:
|
|
17
|
-
type: string
|
|
18
|
-
required: false
|
|
19
|
-
description: 镜像名称(可选,默认使用目录名)
|
|
20
|
-
default: ""
|
|
21
|
-
|
|
22
|
-
tag:
|
|
23
|
-
type: string
|
|
24
|
-
required: false
|
|
25
|
-
description: 镜像标签(可选,默认 latest)
|
|
26
|
-
default: "latest"
|
|
27
|
-
|
|
28
|
-
output:
|
|
29
|
-
image_id:
|
|
30
|
-
type: string
|
|
31
|
-
description: 构建的镜像 ID
|
|
32
|
-
|
|
33
|
-
script: |
|
|
34
|
-
#!/bin/bash
|
|
35
|
-
set -euo pipefail
|
|
36
|
-
|
|
37
|
-
REPO_PATH="{{repo_path}}"
|
|
38
|
-
IMAGE_NAME="{{image_name}}"
|
|
39
|
-
TAG="{{tag}}"
|
|
40
|
-
|
|
41
|
-
cd "$REPO_PATH"
|
|
42
|
-
|
|
43
|
-
# 自动确定镜像名
|
|
44
|
-
if [ -z "$IMAGE_NAME" ]; then
|
|
45
|
-
IMAGE_NAME=$(basename "$REPO_PATH")
|
|
46
|
-
fi
|
|
47
|
-
|
|
48
|
-
FULL_IMAGE="$IMAGE_NAME:$TAG"
|
|
49
|
-
|
|
50
|
-
echo "🐳 构建 Docker 镜像..."
|
|
51
|
-
echo " 路径: $REPO_PATH"
|
|
52
|
-
echo " 镜像: $FULL_IMAGE"
|
|
53
|
-
echo ""
|
|
54
|
-
|
|
55
|
-
# 检查 Dockerfile
|
|
56
|
-
if [ ! -f "Dockerfile" ]; then
|
|
57
|
-
echo "❌ 未找到 Dockerfile"
|
|
58
|
-
echo "IMAGE_ID=none"
|
|
59
|
-
exit 1
|
|
60
|
-
fi
|
|
61
|
-
|
|
62
|
-
# 构建镜像
|
|
63
|
-
if docker build -t "$FULL_IMAGE" . 2>&1; then
|
|
64
|
-
IMAGE_ID=$(docker images -q "$FULL_IMAGE" | head -1)
|
|
65
|
-
echo ""
|
|
66
|
-
echo "✅ 镜像构建成功: $FULL_IMAGE"
|
|
67
|
-
echo "IMAGE_ID=$IMAGE_ID"
|
|
68
|
-
else
|
|
69
|
-
echo ""
|
|
70
|
-
echo "❌ 镜像构建失败"
|
|
71
|
-
echo "IMAGE_ID=none"
|
|
72
|
-
exit 1
|
|
73
|
-
fi
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
# run.yml - Docker 运行
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 能力类型: docker 操作(工具型)
|
|
4
|
-
# 执行方式: 纯脚本,不调用 Agent
|
|
5
|
-
# ============================================================================
|
|
6
|
-
|
|
7
|
-
name: docker-run
|
|
8
|
-
description: 运行 Docker 容器
|
|
9
|
-
|
|
10
|
-
input:
|
|
11
|
-
image_name:
|
|
12
|
-
type: string
|
|
13
|
-
required: true
|
|
14
|
-
description: 镜像名称
|
|
15
|
-
|
|
16
|
-
container_name:
|
|
17
|
-
type: string
|
|
18
|
-
required: false
|
|
19
|
-
description: 容器名称(可选)
|
|
20
|
-
default: ""
|
|
21
|
-
|
|
22
|
-
ports:
|
|
23
|
-
type: string
|
|
24
|
-
required: false
|
|
25
|
-
description: 端口映射(可选,如 "8080:80")
|
|
26
|
-
default: ""
|
|
27
|
-
|
|
28
|
-
env_vars:
|
|
29
|
-
type: string
|
|
30
|
-
required: false
|
|
31
|
-
description: 环境变量(可选,如 "KEY=value")
|
|
32
|
-
default: ""
|
|
33
|
-
|
|
34
|
-
output:
|
|
35
|
-
container_id:
|
|
36
|
-
type: string
|
|
37
|
-
description: 容器 ID
|
|
38
|
-
|
|
39
|
-
script: |
|
|
40
|
-
#!/bin/bash
|
|
41
|
-
set -euo pipefail
|
|
42
|
-
|
|
43
|
-
IMAGE_NAME="{{image_name}}"
|
|
44
|
-
CONTAINER_NAME="{{container_name}}"
|
|
45
|
-
PORTS="{{ports}}"
|
|
46
|
-
ENV_VARS="{{env_vars}}"
|
|
47
|
-
|
|
48
|
-
echo "🐳 运行 Docker 容器..."
|
|
49
|
-
echo " 镜像: $IMAGE_NAME"
|
|
50
|
-
|
|
51
|
-
# 构建参数
|
|
52
|
-
RUN_ARGS=""
|
|
53
|
-
|
|
54
|
-
if [ -n "$CONTAINER_NAME" ]; then
|
|
55
|
-
RUN_ARGS="$RUN_ARGS --name $CONTAINER_NAME"
|
|
56
|
-
echo " 容器名: $CONTAINER_NAME"
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
if [ -n "$PORTS" ]; then
|
|
60
|
-
RUN_ARGS="$RUN_ARGS -p $PORTS"
|
|
61
|
-
echo " 端口: $PORTS"
|
|
62
|
-
fi
|
|
63
|
-
|
|
64
|
-
if [ -n "$ENV_VARS" ]; then
|
|
65
|
-
RUN_ARGS="$RUN_ARGS -e $ENV_VARS"
|
|
66
|
-
echo " 环境变量: $ENV_VARS"
|
|
67
|
-
fi
|
|
68
|
-
|
|
69
|
-
echo ""
|
|
70
|
-
|
|
71
|
-
# 运行容器
|
|
72
|
-
CONTAINER_ID=$(docker run -d $RUN_ARGS "$IMAGE_NAME" 2>&1)
|
|
73
|
-
|
|
74
|
-
if [ $? -eq 0 ]; then
|
|
75
|
-
echo "✅ 容器启动成功"
|
|
76
|
-
echo "CONTAINER_ID=$CONTAINER_ID"
|
|
77
|
-
else
|
|
78
|
-
echo "❌ 容器启动失败"
|
|
79
|
-
echo "CONTAINER_ID=none"
|
|
80
|
-
exit 1
|
|
81
|
-
fi
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
# file-copy.yml - 复制文件
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 能力类型: 文件操作(工具型)
|
|
4
|
-
# 执行方式: 纯脚本,复制文件或目录
|
|
5
|
-
# ============================================================================
|
|
6
|
-
|
|
7
|
-
name: file-copy
|
|
8
|
-
description: 复制文件或目录
|
|
9
|
-
|
|
10
|
-
# 输入参数
|
|
11
|
-
input:
|
|
12
|
-
src:
|
|
13
|
-
type: path
|
|
14
|
-
required: true
|
|
15
|
-
description: 源路径
|
|
16
|
-
|
|
17
|
-
dst:
|
|
18
|
-
type: path
|
|
19
|
-
required: true
|
|
20
|
-
description: 目标路径
|
|
21
|
-
|
|
22
|
-
create_dirs:
|
|
23
|
-
type: boolean
|
|
24
|
-
required: false
|
|
25
|
-
description: 是否创建父目录
|
|
26
|
-
default: true
|
|
27
|
-
|
|
28
|
-
overwrite:
|
|
29
|
-
type: boolean
|
|
30
|
-
required: false
|
|
31
|
-
description: 是否覆盖已存在的文件
|
|
32
|
-
default: true
|
|
33
|
-
|
|
34
|
-
# 输出
|
|
35
|
-
output:
|
|
36
|
-
src:
|
|
37
|
-
type: path
|
|
38
|
-
description: 源路径
|
|
39
|
-
|
|
40
|
-
dst:
|
|
41
|
-
type: path
|
|
42
|
-
description: 目标路径
|
|
43
|
-
|
|
44
|
-
# 执行命令
|
|
45
|
-
script: |
|
|
46
|
-
#!/bin/bash
|
|
47
|
-
set -euo pipefail
|
|
48
|
-
|
|
49
|
-
SRC="{{src}}"
|
|
50
|
-
DST="{{dst}}"
|
|
51
|
-
CREATE_DIRS="{{create_dirs}}"
|
|
52
|
-
OVERWRITE="{{overwrite}}"
|
|
53
|
-
|
|
54
|
-
echo "📋 复制文件"
|
|
55
|
-
echo " 源: $SRC"
|
|
56
|
-
echo " 目标: $DST"
|
|
57
|
-
|
|
58
|
-
# 检查源文件是否存在
|
|
59
|
-
if [ ! -e "$SRC" ]; then
|
|
60
|
-
echo "❌ 源路径不存在: $SRC"
|
|
61
|
-
exit 1
|
|
62
|
-
fi
|
|
63
|
-
|
|
64
|
-
# 创建父目录
|
|
65
|
-
if [ "$CREATE_DIRS" = "true" ]; then
|
|
66
|
-
mkdir -p "$(dirname "$DST")"
|
|
67
|
-
fi
|
|
68
|
-
|
|
69
|
-
# 复制
|
|
70
|
-
if [ -d "$SRC" ]; then
|
|
71
|
-
# 目录
|
|
72
|
-
if [ "$OVERWRITE" = "true" ]; then
|
|
73
|
-
cp -r "$SRC" "$DST"
|
|
74
|
-
else
|
|
75
|
-
cp -rn "$SRC" "$DST" 2>/dev/null || echo "⚠️ 目标已存在,跳过"
|
|
76
|
-
fi
|
|
77
|
-
echo " 复制目录完成"
|
|
78
|
-
else
|
|
79
|
-
# 文件
|
|
80
|
-
if [ "$OVERWRITE" = "true" ]; then
|
|
81
|
-
cp "$SRC" "$DST"
|
|
82
|
-
else
|
|
83
|
-
cp -n "$SRC" "$DST" 2>/dev/null || echo "⚠️ 目标已存在,跳过"
|
|
84
|
-
fi
|
|
85
|
-
echo " 复制文件完成"
|
|
86
|
-
fi
|
|
87
|
-
|
|
88
|
-
echo "✅ 复制完成"
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# file-read.yml - 读取文件
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 能力类型: 文件操作(工具型)
|
|
4
|
-
# 执行方式: 纯脚本,读取文件内容
|
|
5
|
-
# ============================================================================
|
|
6
|
-
|
|
7
|
-
name: file-read
|
|
8
|
-
description: 读取文件内容
|
|
9
|
-
|
|
10
|
-
# 输入参数
|
|
11
|
-
input:
|
|
12
|
-
path:
|
|
13
|
-
type: path
|
|
14
|
-
required: true
|
|
15
|
-
description: 文件路径
|
|
16
|
-
|
|
17
|
-
encoding:
|
|
18
|
-
type: string
|
|
19
|
-
required: false
|
|
20
|
-
description: 文件编码
|
|
21
|
-
default: "utf-8"
|
|
22
|
-
|
|
23
|
-
max_lines:
|
|
24
|
-
type: integer
|
|
25
|
-
required: false
|
|
26
|
-
description: 最大行数(0 表示不限制)
|
|
27
|
-
default: 0
|
|
28
|
-
|
|
29
|
-
# 输出
|
|
30
|
-
output:
|
|
31
|
-
content:
|
|
32
|
-
type: string
|
|
33
|
-
description: 文件内容
|
|
34
|
-
|
|
35
|
-
lines:
|
|
36
|
-
type: integer
|
|
37
|
-
description: 总行数
|
|
38
|
-
|
|
39
|
-
# 执行命令
|
|
40
|
-
script: |
|
|
41
|
-
#!/bin/bash
|
|
42
|
-
set -euo pipefail
|
|
43
|
-
|
|
44
|
-
FILE_PATH="{{path}}"
|
|
45
|
-
MAX_LINES="{{max_lines}}"
|
|
46
|
-
|
|
47
|
-
echo "📖 读取文件: $FILE_PATH"
|
|
48
|
-
|
|
49
|
-
if [ ! -f "$FILE_PATH" ]; then
|
|
50
|
-
echo "❌ 文件不存在: $FILE_PATH"
|
|
51
|
-
exit 1
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
# 统计行数
|
|
55
|
-
TOTAL_LINES=$(wc -l < "$FILE_PATH")
|
|
56
|
-
echo " 总行数: $TOTAL_LINES"
|
|
57
|
-
|
|
58
|
-
# 读取内容
|
|
59
|
-
if [ "$MAX_LINES" -gt 0 ]; then
|
|
60
|
-
head -n "$MAX_LINES" "$FILE_PATH"
|
|
61
|
-
echo ""
|
|
62
|
-
echo "⚠️ 已截断,只显示前 $MAX_LINES 行"
|
|
63
|
-
else
|
|
64
|
-
cat "$FILE_PATH"
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
|
-
echo ""
|
|
68
|
-
echo "✅ 文件读取完成"
|
|
69
|
-
echo "LINES=$TOTAL_LINES"
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# file-write.yml - 写入文件
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 能力类型: 文件操作(工具型)
|
|
4
|
-
# 执行方式: 纯脚本,写入文件内容
|
|
5
|
-
# ============================================================================
|
|
6
|
-
|
|
7
|
-
name: file-write
|
|
8
|
-
description: 写入文件内容
|
|
9
|
-
|
|
10
|
-
# 输入参数
|
|
11
|
-
input:
|
|
12
|
-
path:
|
|
13
|
-
type: path
|
|
14
|
-
required: true
|
|
15
|
-
description: 文件路径
|
|
16
|
-
|
|
17
|
-
content:
|
|
18
|
-
type: string
|
|
19
|
-
required: true
|
|
20
|
-
description: 文件内容
|
|
21
|
-
|
|
22
|
-
mode:
|
|
23
|
-
type: string
|
|
24
|
-
required: false
|
|
25
|
-
description: 写入模式(overwrite/append)
|
|
26
|
-
default: "overwrite"
|
|
27
|
-
|
|
28
|
-
create_dirs:
|
|
29
|
-
type: boolean
|
|
30
|
-
required: false
|
|
31
|
-
description: 是否创建父目录
|
|
32
|
-
default: true
|
|
33
|
-
|
|
34
|
-
# 输出
|
|
35
|
-
output:
|
|
36
|
-
path:
|
|
37
|
-
type: path
|
|
38
|
-
description: 文件路径
|
|
39
|
-
|
|
40
|
-
bytes:
|
|
41
|
-
type: integer
|
|
42
|
-
description: 写入字节数
|
|
43
|
-
|
|
44
|
-
# 执行命令
|
|
45
|
-
script: |
|
|
46
|
-
#!/bin/bash
|
|
47
|
-
set -euo pipefail
|
|
48
|
-
|
|
49
|
-
FILE_PATH="{{path}}"
|
|
50
|
-
CONTENT="{{content}}"
|
|
51
|
-
MODE="{{mode}}"
|
|
52
|
-
CREATE_DIRS="{{create_dirs}}"
|
|
53
|
-
|
|
54
|
-
echo "📝 写入文件: $FILE_PATH"
|
|
55
|
-
echo " 模式: $MODE"
|
|
56
|
-
|
|
57
|
-
# 创建父目录
|
|
58
|
-
if [ "$CREATE_DIRS" = "true" ]; then
|
|
59
|
-
mkdir -p "$(dirname "$FILE_PATH")"
|
|
60
|
-
fi
|
|
61
|
-
|
|
62
|
-
# 写入内容
|
|
63
|
-
if [ "$MODE" = "append" ]; then
|
|
64
|
-
echo "$CONTENT" >> "$FILE_PATH"
|
|
65
|
-
else
|
|
66
|
-
echo "$CONTENT" > "$FILE_PATH"
|
|
67
|
-
fi
|
|
68
|
-
|
|
69
|
-
# 统计字节数
|
|
70
|
-
BYTES=$(wc -c < "$FILE_PATH")
|
|
71
|
-
echo " 写入: $BYTES 字节"
|
|
72
|
-
|
|
73
|
-
echo "✅ 文件写入完成"
|
|
74
|
-
echo "PATH=$FILE_PATH"
|
|
75
|
-
echo "BYTES=$BYTES"
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# branch.yml - Git 创建分支
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 能力类型: git 操作(工具型)
|
|
4
|
-
# 执行方式: 纯脚本,不调用 Agent
|
|
5
|
-
# ============================================================================
|
|
6
|
-
|
|
7
|
-
name: git-branch
|
|
8
|
-
description: 创建并切换 Git 分支
|
|
9
|
-
|
|
10
|
-
input:
|
|
11
|
-
repo_path:
|
|
12
|
-
type: path
|
|
13
|
-
required: true
|
|
14
|
-
description: 仓库路径
|
|
15
|
-
|
|
16
|
-
branch_name:
|
|
17
|
-
type: string
|
|
18
|
-
required: true
|
|
19
|
-
description: 分支名称
|
|
20
|
-
|
|
21
|
-
base_branch:
|
|
22
|
-
type: string
|
|
23
|
-
required: false
|
|
24
|
-
description: 基础分支(可选,默认当前分支)
|
|
25
|
-
default: ""
|
|
26
|
-
|
|
27
|
-
output:
|
|
28
|
-
branch:
|
|
29
|
-
type: string
|
|
30
|
-
description: 创建的分支名
|
|
31
|
-
|
|
32
|
-
script: |
|
|
33
|
-
#!/bin/bash
|
|
34
|
-
set -euo pipefail
|
|
35
|
-
|
|
36
|
-
REPO_PATH="{{repo_path}}"
|
|
37
|
-
BRANCH_NAME="{{branch_name}}"
|
|
38
|
-
BASE_BRANCH="{{base_branch}}"
|
|
39
|
-
|
|
40
|
-
cd "$REPO_PATH"
|
|
41
|
-
|
|
42
|
-
echo "🌿 创建分支..."
|
|
43
|
-
echo " 路径: $REPO_PATH"
|
|
44
|
-
echo " 分支: $BRANCH_NAME"
|
|
45
|
-
|
|
46
|
-
# 检查是否已存在分支
|
|
47
|
-
if git show-ref --verify --quiet "refs/heads/$BRANCH_NAME"; then
|
|
48
|
-
echo "⚠️ 分支已存在,切换到该分支"
|
|
49
|
-
git checkout "$BRANCH_NAME"
|
|
50
|
-
else
|
|
51
|
-
if [ -n "$BASE_BRANCH" ]; then
|
|
52
|
-
echo " 基于分支: $BASE_BRANCH"
|
|
53
|
-
git checkout -b "$BRANCH_NAME" "$BASE_BRANCH"
|
|
54
|
-
else
|
|
55
|
-
git checkout -b "$BRANCH_NAME"
|
|
56
|
-
fi
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
echo ""
|
|
60
|
-
echo "✅ 分支创建成功: $BRANCH_NAME"
|
|
61
|
-
echo "BRANCH=$BRANCH_NAME"
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# cleanup-worktree.yml - 清理 Git Worktree
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 能力类型: git 操作(工具型)
|
|
4
|
-
# 执行方式: 纯脚本,清理隔离工作空间
|
|
5
|
-
# 用途: 完成开发后清理 git worktree
|
|
6
|
-
# ============================================================================
|
|
7
|
-
|
|
8
|
-
name: git-cleanup-worktree
|
|
9
|
-
description: 开发完成后清理 Git Worktree 隔离工作空间
|
|
10
|
-
|
|
11
|
-
input:
|
|
12
|
-
worktree_path:
|
|
13
|
-
type: path
|
|
14
|
-
required: true
|
|
15
|
-
description: 工作树路径
|
|
16
|
-
|
|
17
|
-
force:
|
|
18
|
-
type: boolean
|
|
19
|
-
default: false
|
|
20
|
-
description: 强制删除(即使有未提交的更改)
|
|
21
|
-
|
|
22
|
-
output:
|
|
23
|
-
result:
|
|
24
|
-
type: string
|
|
25
|
-
description: 删除结果
|
|
26
|
-
|
|
27
|
-
script: |
|
|
28
|
-
#!/bin/bash
|
|
29
|
-
set -e
|
|
30
|
-
|
|
31
|
-
WORKTREE_PATH="${input.worktree_path}"
|
|
32
|
-
FORCE="${input.force:-false}"
|
|
33
|
-
|
|
34
|
-
if [ ! -d "$WORKTREE_PATH" ]; then
|
|
35
|
-
echo "Worktree not found: $WORKTREE_PATH"
|
|
36
|
-
exit 1
|
|
37
|
-
fi
|
|
38
|
-
|
|
39
|
-
# 切换到主仓库
|
|
40
|
-
MAIN_REPO=$(git -C "$WORKTREE_PATH" worktree list | head -1 | cut -f1)
|
|
41
|
-
cd "$MAIN_REPO"
|
|
42
|
-
|
|
43
|
-
# 删除 worktree
|
|
44
|
-
if [ "$FORCE" = "true" ]; then
|
|
45
|
-
git worktree remove --force "$WORKTREE_PATH"
|
|
46
|
-
else
|
|
47
|
-
git worktree remove "$WORKTREE_PATH"
|
|
48
|
-
fi
|
|
49
|
-
|
|
50
|
-
echo "Worktree removed: $WORKTREE_PATH"
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# clone.yml - 克隆仓库
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 能力类型: git 操作(工具型)
|
|
4
|
-
# 执行方式: 纯脚本,不调用 Agent
|
|
5
|
-
# 调用方式: engine/core/workflow.sh capability git/clone --repo_url "<url>"
|
|
6
|
-
# ============================================================================
|
|
7
|
-
|
|
8
|
-
name: git-clone
|
|
9
|
-
description: 克隆 Git 仓库到本地
|
|
10
|
-
|
|
11
|
-
# 输入参数
|
|
12
|
-
input:
|
|
13
|
-
repo_url:
|
|
14
|
-
type: string
|
|
15
|
-
required: true
|
|
16
|
-
description: 仓库 URL(支持 HTTPS 和 SSH)
|
|
17
|
-
|
|
18
|
-
version:
|
|
19
|
-
type: string
|
|
20
|
-
required: false
|
|
21
|
-
description: 版本/分支/标签(可选,默认 main)
|
|
22
|
-
default: main
|
|
23
|
-
|
|
24
|
-
depth:
|
|
25
|
-
type: integer
|
|
26
|
-
required: false
|
|
27
|
-
description: 克隆深度(可选,默认 1 表示浅克隆)
|
|
28
|
-
default: 1
|
|
29
|
-
|
|
30
|
-
target_dir:
|
|
31
|
-
type: string
|
|
32
|
-
required: false
|
|
33
|
-
description: 目标目录(可选,默认 /worktrees/research-{timestamp})
|
|
34
|
-
|
|
35
|
-
# 输出
|
|
36
|
-
output:
|
|
37
|
-
repo_path:
|
|
38
|
-
type: path
|
|
39
|
-
description: 克隆后的本地路径
|
|
40
|
-
|
|
41
|
-
# 工具型能力:纯脚本执行
|
|
42
|
-
script: |
|
|
43
|
-
#!/bin/bash
|
|
44
|
-
set -euo pipefail
|
|
45
|
-
|
|
46
|
-
REPO_URL="{{repo_url}}"
|
|
47
|
-
VERSION="{{version}}"
|
|
48
|
-
DEPTH="{{depth}}"
|
|
49
|
-
TARGET_DIR="${TARGET_DIR:-/worktrees/research-$(date +%s)}"
|
|
50
|
-
|
|
51
|
-
mkdir -p "$(dirname "$TARGET_DIR")"
|
|
52
|
-
|
|
53
|
-
echo "📥 克隆仓库: $REPO_URL"
|
|
54
|
-
echo " 版本: $VERSION"
|
|
55
|
-
echo " 深度: $DEPTH"
|
|
56
|
-
echo " 目标: $TARGET_DIR"
|
|
57
|
-
|
|
58
|
-
if [ -n "$VERSION" ] && [ "$VERSION" != "main" ]; then
|
|
59
|
-
git clone --depth "$DEPTH" --branch "$VERSION" "$REPO_URL" "$TARGET_DIR"
|
|
60
|
-
else
|
|
61
|
-
git clone --depth "$DEPTH" "$REPO_URL" "$TARGET_DIR"
|
|
62
|
-
fi
|
|
63
|
-
|
|
64
|
-
echo ""
|
|
65
|
-
echo "✅ 克隆完成: $TARGET_DIR"
|
|
66
|
-
|
|
67
|
-
# 输出变量(供后续步骤使用)
|
|
68
|
-
export REPO_PATH="$TARGET_DIR"
|
|
69
|
-
echo "REPO_PATH=$TARGET_DIR"
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# commit.yml - Git 提交
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 能力类型: git 操作(工具型)
|
|
4
|
-
# 执行方式: 纯脚本,不调用 Agent
|
|
5
|
-
# ============================================================================
|
|
6
|
-
|
|
7
|
-
name: git-commit
|
|
8
|
-
description: Git 提交更改
|
|
9
|
-
|
|
10
|
-
input:
|
|
11
|
-
repo_path:
|
|
12
|
-
type: path
|
|
13
|
-
required: true
|
|
14
|
-
description: 仓库路径
|
|
15
|
-
|
|
16
|
-
message:
|
|
17
|
-
type: string
|
|
18
|
-
required: true
|
|
19
|
-
description: 提交消息
|
|
20
|
-
|
|
21
|
-
add_all:
|
|
22
|
-
type: boolean
|
|
23
|
-
required: false
|
|
24
|
-
description: 是否添加所有更改(可选,默认 true)
|
|
25
|
-
default: true
|
|
26
|
-
|
|
27
|
-
output:
|
|
28
|
-
commit_hash:
|
|
29
|
-
type: string
|
|
30
|
-
description: 提交哈希
|
|
31
|
-
|
|
32
|
-
script: |
|
|
33
|
-
#!/bin/bash
|
|
34
|
-
set -euo pipefail
|
|
35
|
-
|
|
36
|
-
REPO_PATH="{{repo_path}}"
|
|
37
|
-
MESSAGE="{{message}}"
|
|
38
|
-
ADD_ALL="{{add_all}}"
|
|
39
|
-
|
|
40
|
-
cd "$REPO_PATH"
|
|
41
|
-
|
|
42
|
-
echo "📝 提交更改..."
|
|
43
|
-
echo " 路径: $REPO_PATH"
|
|
44
|
-
echo " 消息: $MESSAGE"
|
|
45
|
-
|
|
46
|
-
# 添加文件
|
|
47
|
-
if [ "$ADD_ALL" = "true" ]; then
|
|
48
|
-
git add -A
|
|
49
|
-
fi
|
|
50
|
-
|
|
51
|
-
# 检查是否有更改
|
|
52
|
-
if git diff --cached --quiet; then
|
|
53
|
-
echo "⚠️ 没有更改需要提交"
|
|
54
|
-
echo "COMMIT_HASH=none"
|
|
55
|
-
exit 0
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
# 提交
|
|
59
|
-
git commit -m "$MESSAGE"
|
|
60
|
-
|
|
61
|
-
COMMIT_HASH=$(git rev-parse --short HEAD)
|
|
62
|
-
|
|
63
|
-
echo ""
|
|
64
|
-
echo "✅ 提交成功: $COMMIT_HASH"
|
|
65
|
-
echo "COMMIT_HASH=$COMMIT_HASH"
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# push.yml - Git 推送
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 能力类型: git 操作(工具型)
|
|
4
|
-
# 执行方式: 纯脚本,不调用 Agent
|
|
5
|
-
# ============================================================================
|
|
6
|
-
|
|
7
|
-
name: git-push
|
|
8
|
-
description: 推送 Git 分支到远程
|
|
9
|
-
|
|
10
|
-
input:
|
|
11
|
-
repo_path:
|
|
12
|
-
type: path
|
|
13
|
-
required: true
|
|
14
|
-
description: 仓库路径
|
|
15
|
-
|
|
16
|
-
branch:
|
|
17
|
-
type: string
|
|
18
|
-
required: false
|
|
19
|
-
description: 分支名称(可选,默认当前分支)
|
|
20
|
-
default: ""
|
|
21
|
-
|
|
22
|
-
remote:
|
|
23
|
-
type: string
|
|
24
|
-
required: false
|
|
25
|
-
description: 远程名称(可选,默认 origin)
|
|
26
|
-
default: "origin"
|
|
27
|
-
|
|
28
|
-
set_upstream:
|
|
29
|
-
type: boolean
|
|
30
|
-
required: false
|
|
31
|
-
description: 是否设置上游分支(可选,默认 false)
|
|
32
|
-
default: false
|
|
33
|
-
|
|
34
|
-
output:
|
|
35
|
-
push_result:
|
|
36
|
-
type: string
|
|
37
|
-
description: 推送结果
|
|
38
|
-
|
|
39
|
-
script: |
|
|
40
|
-
#!/bin/bash
|
|
41
|
-
set -euo pipefail
|
|
42
|
-
|
|
43
|
-
REPO_PATH="{{repo_path}}"
|
|
44
|
-
BRANCH="{{branch}}"
|
|
45
|
-
REMOTE="{{remote}}"
|
|
46
|
-
SET_UPSTREAM="{{set_upstream}}"
|
|
47
|
-
|
|
48
|
-
cd "$REPO_PATH"
|
|
49
|
-
|
|
50
|
-
# 获取当前分支
|
|
51
|
-
if [ -z "$BRANCH" ]; then
|
|
52
|
-
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
53
|
-
fi
|
|
54
|
-
|
|
55
|
-
echo "🚀 推送分支..."
|
|
56
|
-
echo " 路径: $REPO_PATH"
|
|
57
|
-
echo " 远程: $REMOTE"
|
|
58
|
-
echo " 分支: $BRANCH"
|
|
59
|
-
|
|
60
|
-
# 构建推送命令
|
|
61
|
-
PUSH_CMD="git push $REMOTE $BRANCH"
|
|
62
|
-
|
|
63
|
-
if [ "$SET_UPSTREAM" = "true" ]; then
|
|
64
|
-
PUSH_CMD="git push -u $REMOTE $BRANCH"
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
|
-
echo ""
|
|
68
|
-
|
|
69
|
-
# 推送
|
|
70
|
-
if $PUSH_CMD 2>&1; then
|
|
71
|
-
echo ""
|
|
72
|
-
echo "✅ 推送成功"
|
|
73
|
-
echo "PUSH_RESULT=success"
|
|
74
|
-
else
|
|
75
|
-
echo ""
|
|
76
|
-
echo "❌ 推送失败"
|
|
77
|
-
echo "PUSH_RESULT=failed"
|
|
78
|
-
exit 1
|
|
79
|
-
fi
|