gennady 0.6.0 → 0.7.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/README.md +2 -15
- package/ai/agents/agent-resolve-conflicts.xml +6 -0
- package/ai/agents/agent-review-verifier.xml +6 -0
- package/ai/directives/architecture/README.md +21 -0
- package/ai/directives/coding/README.md +23 -0
- package/ai/directives/coding/result-conventions.xml +55 -0
- package/ai/directives/coding/svelte5-runes.xml +248 -0
- package/ai/directives/coding/sveltekit-rules.xml +247 -0
- package/ai/directives/coding/typescript-rules.xml +589 -0
- package/ai/directives/coding/uikit-component-storybook.xml +347 -0
- package/ai/directives/coding/uikit-component-svelte.xml +344 -0
- package/ai/directives/coding/uikit-spec-drafting.xml +243 -0
- package/ai/directives/dbc-audit.directive.xml +131 -0
- package/ai/directives/dev-review.directive.xml +148 -0
- package/ai/directives/infra/README.md +11 -0
- package/ai/directives/infra/eslint-setup.xml +467 -0
- package/ai/directives/infra/git-setup.xml +261 -0
- package/ai/directives/infra/nodejs-npm-setup.xml +354 -0
- package/ai/directives/infra/storybook-setup.xml +153 -0
- package/ai/directives/knowledge.xml +206 -0
- package/ai/directives/perf-auditor/perf-auditor.directive.xml +75 -0
- package/ai/directives/perf-auditor/rules/async-latency.xml +101 -0
- package/ai/directives/perf-auditor/rules/data-structures.xml +103 -0
- package/ai/directives/perf-auditor/rules/iteration-fusion.xml +96 -0
- package/ai/directives/perf-auditor/rules/memory-gc.xml +102 -0
- package/ai/directives/sdd/README.md +49 -0
- package/ai/directives/sdd/audit.directive.xml +543 -0
- package/ai/directives/sdd/discovery.directive.xml +824 -0
- package/ai/directives/sdd/fix.directive.xml +249 -0
- package/ai/directives/sdd/module-decomposition.directive.xml +666 -0
- package/ai/directives/sdd/phase-execution-protocol.xml +339 -0
- package/ai/directives/sdd/scaffold.directive.xml +717 -0
- package/ai/directives/sdd/setup.directive.xml +213 -0
- package/ai/directives/sdd/svelte-ui-discovery.directive.xml +263 -0
- package/ai/directives/semantic-change-extractor.directive.xml +99 -0
- package/ai/directives/testing/README.md +25 -0
- package/ai/directives/testing/common.xml +234 -0
- package/ai/directives/testing/node-test.xml +288 -0
- package/ai/directives/testing/playwright-cli.xml +199 -0
- package/ai/directives/testing/playwright-e2e.xml +292 -0
- package/ai/directives/testing/storybook-usage.xml +173 -0
- package/ai/directives/testing/svelte-testing.xml +237 -0
- package/ai/directives/testing/vitest-rules.xml +326 -0
- package/ai/docs/README.md +17 -0
- package/ai/docs/ai-icl.md +538 -0
- package/ai/docs/ai-priming.md +548 -0
- package/ai/docs/ai-prompt-formats.md +406 -0
- package/ai/docs/ai-promting.md +572 -0
- package/ai/drafts/DRAFT.md +120 -0
- package/ai/drafts/agent-devgen-class-from-description.rules.xml +123 -0
- package/ai/drafts/agent-typescript-devgen.v1.xml +303 -0
- package/ai/drafts/d.md +65 -0
- package/ai/drafts/music-posts.md +105 -0
- package/ai/fw/v1/architecture/blueprint-factory.xml +77 -0
- package/ai/fw/v1/core/mental-model.xml +50 -0
- package/ai/fw/v1/discovery/intent-reactor.xml +92 -0
- package/ai/fw/v1/production/swarm-protocol.xml +122 -0
- package/ai/fw/v1/review/quality-pipeline.xml +102 -0
- package/ai/fw/v2/arch-universal.xml +73 -0
- package/ai/fw-draft/README.md +79 -0
- package/ai/fw-draft/bin/discovery.sh +116 -0
- package/ai/fw-draft/gennady.xml +58 -0
- package/ai/fw-draft/provider/claude.xml +16 -0
- package/ai/fw-draft/provider/cursor.xml +23 -0
- package/ai/fw-draft/provider/default.xml +12 -0
- package/ai/fw-draft/roles/developer.xml +18 -0
- package/ai/fw-draft/router.xml +39 -0
- package/ai/fw-draft/routes/development.xml +32 -0
- package/ai/fw-draft/routes/universal.xml +58 -0
- package/ai/fw-draft/rules/dev/base/file-structure-rules.xml +89 -0
- package/ai/fw-draft/rules/dev/typescript/contacts.xml +194 -0
- package/dist/ai/agents/agent-resolve-conflicts.xml +6 -0
- package/dist/ai/agents/agent-review-verifier.xml +6 -0
- package/dist/ai/directives/architecture/README.md +21 -0
- package/dist/ai/directives/coding/README.md +23 -0
- package/dist/ai/directives/coding/result-conventions.xml +55 -0
- package/dist/ai/directives/coding/svelte5-runes.xml +248 -0
- package/dist/ai/directives/coding/sveltekit-rules.xml +247 -0
- package/dist/ai/directives/coding/typescript-rules.xml +589 -0
- package/dist/ai/directives/coding/uikit-component-storybook.xml +347 -0
- package/dist/ai/directives/coding/uikit-component-svelte.xml +344 -0
- package/dist/ai/directives/coding/uikit-spec-drafting.xml +243 -0
- package/dist/ai/directives/dbc-audit.directive.xml +131 -0
- package/dist/ai/directives/dev-review.directive.xml +148 -0
- package/dist/ai/directives/infra/README.md +11 -0
- package/dist/ai/directives/infra/eslint-setup.xml +467 -0
- package/dist/ai/directives/infra/git-setup.xml +261 -0
- package/dist/ai/directives/infra/nodejs-npm-setup.xml +354 -0
- package/dist/ai/directives/infra/storybook-setup.xml +153 -0
- package/dist/ai/directives/knowledge.xml +206 -0
- package/dist/ai/directives/perf-auditor/perf-auditor.directive.xml +75 -0
- package/dist/ai/directives/perf-auditor/rules/async-latency.xml +101 -0
- package/dist/ai/directives/perf-auditor/rules/data-structures.xml +103 -0
- package/dist/ai/directives/perf-auditor/rules/iteration-fusion.xml +96 -0
- package/dist/ai/directives/perf-auditor/rules/memory-gc.xml +102 -0
- package/dist/ai/directives/sdd/README.md +49 -0
- package/dist/ai/directives/sdd/audit.directive.xml +543 -0
- package/dist/ai/directives/sdd/discovery.directive.xml +824 -0
- package/dist/ai/directives/sdd/fix.directive.xml +249 -0
- package/dist/ai/directives/sdd/module-decomposition.directive.xml +666 -0
- package/dist/ai/directives/sdd/phase-execution-protocol.xml +339 -0
- package/dist/ai/directives/sdd/scaffold.directive.xml +717 -0
- package/dist/ai/directives/sdd/setup.directive.xml +213 -0
- package/dist/ai/directives/sdd/svelte-ui-discovery.directive.xml +263 -0
- package/dist/ai/directives/semantic-change-extractor.directive.xml +99 -0
- package/dist/ai/directives/testing/README.md +25 -0
- package/dist/ai/directives/testing/common.xml +234 -0
- package/dist/ai/directives/testing/node-test.xml +288 -0
- package/dist/ai/directives/testing/playwright-cli.xml +199 -0
- package/dist/ai/directives/testing/playwright-e2e.xml +292 -0
- package/dist/ai/directives/testing/storybook-usage.xml +173 -0
- package/dist/ai/directives/testing/svelte-testing.xml +237 -0
- package/dist/ai/directives/testing/vitest-rules.xml +326 -0
- package/dist/ai/docs/README.md +17 -0
- package/dist/ai/docs/ai-icl.md +538 -0
- package/dist/ai/docs/ai-priming.md +548 -0
- package/dist/ai/docs/ai-prompt-formats.md +406 -0
- package/dist/ai/docs/ai-promting.md +572 -0
- package/dist/ai/drafts/DRAFT.md +120 -0
- package/dist/ai/drafts/agent-devgen-class-from-description.rules.xml +123 -0
- package/dist/ai/drafts/agent-typescript-devgen.v1.xml +303 -0
- package/dist/ai/drafts/d.md +65 -0
- package/dist/ai/drafts/music-posts.md +105 -0
- package/dist/ai/fw/v1/architecture/blueprint-factory.xml +77 -0
- package/dist/ai/fw/v1/core/mental-model.xml +50 -0
- package/dist/ai/fw/v1/discovery/intent-reactor.xml +92 -0
- package/dist/ai/fw/v1/production/swarm-protocol.xml +122 -0
- package/dist/ai/fw/v1/review/quality-pipeline.xml +102 -0
- package/dist/ai/fw/v2/arch-universal.xml +73 -0
- package/dist/ai/fw-draft/README.md +79 -0
- package/dist/ai/fw-draft/bin/discovery.sh +116 -0
- package/dist/ai/fw-draft/gennady.xml +58 -0
- package/dist/ai/fw-draft/provider/claude.xml +16 -0
- package/dist/ai/fw-draft/provider/cursor.xml +23 -0
- package/dist/ai/fw-draft/provider/default.xml +12 -0
- package/dist/ai/fw-draft/roles/developer.xml +18 -0
- package/dist/ai/fw-draft/router.xml +39 -0
- package/dist/ai/fw-draft/routes/development.xml +32 -0
- package/dist/ai/fw-draft/routes/universal.xml +58 -0
- package/dist/ai/fw-draft/rules/dev/base/file-structure-rules.xml +89 -0
- package/dist/ai/fw-draft/rules/dev/typescript/contacts.xml +194 -0
- package/dist/chunks/devtools-B-7ugZhF.js +79 -0
- package/dist/chunks/{help.cmd-CWasx25o.js → help.cmd-B_G7EWzF.js} +9 -2
- package/dist/chunks/{index-B63fYXL2.js → index-BeL1Zcbg.js} +1 -1
- package/dist/chunks/index-CVR66voe.js +26963 -0
- package/dist/chunks/index-CXuhZzS3.js +16979 -0
- package/dist/chunks/{index-B5bA2T7A.js → index-CaahtXiM.js} +33 -9
- package/dist/chunks/{index-iqg0w_pE.js → index-CiEM-8nJ.js} +35 -19
- package/dist/chunks/{index-B4m0-PAT.js → index-D1qsi0Uc.js} +57 -33
- package/dist/chunks/index-D9ceRUyB.js +443 -0
- package/dist/chunks/index-DJpVmyp2.js +176 -0
- package/dist/chunks/{index-C0andxna.js → index-DU6jD7SS.js} +1 -1
- package/dist/chunks/index-KxSZKmZn.js +540 -0
- package/dist/chunks/{index-Dqe1TdW4.js → index-UbHoePfr.js} +12 -12
- package/dist/chunks/{index-5xIgwwKx.js → index-g1LXlp77.js} +2 -2
- package/dist/chunks/index-zBnnuvLA.js +3788 -0
- package/dist/chunks/{run-review-command.logic-a_M3CkeZ.js → run-review-command.logic-DpkRoEi8.js} +2 -2
- package/dist/chunks/services-CaLOhuLV.js +2889 -0
- package/dist/chunks/shared-Bjy30TeM.js +665 -0
- package/dist/cli/cmd/_shared/prompt/io/load-agent-template.io.d.ts +3 -3
- package/dist/cli/cmd/_shared/prompt/logic/build-ai-first-knowledge-block.logic.d.ts +3 -3
- package/dist/cli/cmd/_shared/prompt/logic/build-ai-verify-placeholders.logic.d.ts +7 -4
- package/dist/cli/cmd/_shared/prompt/logic/verify-commands/resolve-verify-commands.logic.d.ts +5 -0
- package/dist/cli/cmd/_shared/update-check-worker.d.ts +1 -0
- package/dist/cli/cmd/_shared/update-check.d.ts +38 -0
- package/dist/cli/cmd/agent-mon/cmd/create-providers.d.ts +15 -0
- package/dist/cli/cmd/agent-mon/cmd/index.d.ts +1 -0
- package/dist/cli/cmd/agent-mon/cmd/run.d.ts +12 -0
- package/dist/cli/cmd/agent-mon/state/create-state-manager.d.ts +32 -0
- package/dist/cli/cmd/agent-mon/state/group-by-provider.d.ts +14 -0
- package/dist/cli/cmd/agent-mon/state/index.d.ts +5 -0
- package/dist/cli/cmd/agent-mon/state/is-waiting.d.ts +9 -0
- package/dist/cli/cmd/agent-mon/state/view-model.type.d.ts +74 -0
- package/dist/cli/cmd/agent-mon/ui/app.d.ts +16 -0
- package/dist/cli/cmd/agent-mon/ui/column-view.d.ts +14 -0
- package/dist/cli/cmd/agent-mon/ui/index.d.ts +10 -0
- package/dist/cli/cmd/agent-mon/ui/provider-column.d.ts +14 -0
- package/dist/cli/cmd/agent-mon/ui/session-card.d.ts +12 -0
- package/dist/cli/cmd/agent-mon/ui/status-badge.d.ts +10 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion-parser.d.ts +18 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion-runner.d.ts +32 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion.cmd.d.ts +34 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion.types.d.ts +88 -0
- package/dist/cli/cmd/alt-opinion/index.d.ts +1 -0
- package/dist/cli/cmd/cat/cat-url.fn.d.ts +19 -0
- package/dist/cli/cmd/lint/checks/anchor.check.d.ts +11 -0
- package/dist/cli/cmd/lint/checks/dbc-contract.check.d.ts +16 -0
- package/dist/cli/cmd/lint/checks/disables.check.d.ts +12 -0
- package/dist/cli/cmd/lint/checks/file-header.check.d.ts +10 -0
- package/dist/cli/cmd/lint/checks/language.check.d.ts +11 -0
- package/dist/cli/cmd/lint/index.d.ts +1 -0
- package/dist/cli/cmd/lint/lint.cmd.d.ts +18 -0
- package/dist/cli/cmd/lint/lint.types.d.ts +72 -0
- package/dist/cli/cmd/lint/utils/resolve-references.fn.d.ts +32 -0
- package/dist/cli/cmd/remote-console/index.d.ts +2 -0
- package/dist/cli/cmd/remote-console/remote-console.cmd.d.ts +55 -0
- package/dist/cli/cmd/resolve-conflicts/_core/io/resolve-conflicts-template-load.io.d.ts +2 -2
- package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-command-args-parse.logic.d.ts +3 -3
- package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-command-run.logic.d.ts +3 -3
- package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-context-git-build.logic.d.ts +4 -4
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-artifact.type.d.ts +3 -1
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-command-args.type.d.ts +3 -1
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-command-result.type.d.ts +5 -1
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-context-git.type.d.ts +18 -2
- package/dist/cli/cmd/resolve-conflicts/_core/xml/resolve-conflicts-artifact-build.xml.d.ts +6 -6
- package/dist/cli/cmd/resolve-conflicts/_core/xml/resolve-conflicts-render.xml.d.ts +4 -4
- package/dist/cli/cmd/review/_core/io/load-review-verify-template.io.d.ts +2 -2
- package/dist/cli/cmd/review/_core/logic/build-review-context-git.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/logic/build-review-context-vcs.logic.d.ts +2 -2
- package/dist/cli/cmd/review/_core/logic/load-review-context-mr.logic.d.ts +5 -5
- package/dist/cli/cmd/review/_core/logic/parse-review-command-args.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/logic/resolve-review-intent.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/logic/run-review-command.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/types/review-artifact.type.d.ts +4 -1
- package/dist/cli/cmd/review/_core/types/review-command-args.type.d.ts +7 -1
- package/dist/cli/cmd/review/_core/types/review-command-mode.type.d.ts +1 -1
- package/dist/cli/cmd/review/_core/types/review-command-options.type.d.ts +3 -1
- package/dist/cli/cmd/review/_core/types/review-command-result.type.d.ts +5 -1
- package/dist/cli/cmd/review/_core/types/review-context-git.type.d.ts +3 -1
- package/dist/cli/cmd/review/_core/types/review-context-mr.type.d.ts +22 -3
- package/dist/cli/cmd/review/_core/types/review-context-vcs.type.d.ts +4 -1
- package/dist/cli/cmd/review/_core/types/review-intent.type.d.ts +1 -1
- package/dist/cli/cmd/review/_core/xml/build-review-artifact.xml.d.ts +10 -10
- package/dist/cli/cmd/review/_core/xml/render-review-issues.xml.d.ts +3 -3
- package/dist/cli/cmd/review/_core/xml/render-review-verify.xml.d.ts +4 -4
- package/dist/cli/cmd/sync/index.d.ts +1 -0
- package/dist/cli/cmd/sync/sync-core.d.ts +65 -0
- package/dist/cli/cmd/sync/sync-formatter.d.ts +12 -0
- package/dist/cli/cmd/sync/sync.cmd.d.ts +33 -0
- package/dist/cli/cmd/sync/sync.types.d.ts +50 -0
- package/dist/cli/cmd/vcs-reply/vcs-reply.cmd.d.ts +4 -4
- package/dist/cli/utils/ai-legacy/ai-legacy-agent.d.ts +12 -11
- package/dist/cli/utils/ai-legacy/ai-legacy-core.d.ts +33 -17
- package/dist/cli/utils/ai-legacy/ai-legacy-model.d.ts +42 -23
- package/dist/cli/utils/cat-gen/cat-gen.d.ts +19 -8
- package/dist/cli/utils/commit-gen/commit-gen.d.ts +39 -15
- package/dist/cli/utils/prompts/index.d.ts +6 -6
- package/dist/cli/utils/review-gen/review-gen.d.ts +33 -9
- package/dist/gennady.js +30 -10
- package/dist/index.d.ts +1 -0
- package/dist/index.js +44 -23
- package/dist/services/agent-mon/diff/diff.d.ts +9 -0
- package/dist/services/agent-mon/diff/index.d.ts +1 -0
- package/dist/services/agent-mon/index.d.ts +10 -0
- package/dist/services/agent-mon/model/agent-provider.type.d.ts +20 -0
- package/dist/services/agent-mon/model/agent-session.type.d.ts +49 -0
- package/dist/services/agent-mon/model/errors.d.ts +20 -0
- package/dist/services/agent-mon/model/index.d.ts +7 -0
- package/dist/services/agent-mon/model/observe-opts.type.d.ts +7 -0
- package/dist/services/agent-mon/model/scan-opts.type.d.ts +7 -0
- package/dist/services/agent-mon/model/session-changes.type.d.ts +10 -0
- package/dist/services/agent-mon/monitor/agent-monitor.d.ts +44 -0
- package/dist/services/agent-mon/monitor/create-monitor.d.ts +6 -0
- package/dist/services/agent-mon/monitor/index.d.ts +2 -0
- package/dist/services/agent-mon/observe/index.d.ts +1 -0
- package/dist/services/agent-mon/observe/observe.d.ts +12 -0
- package/dist/services/agent-mon/providers/claude/claude-provider.d.ts +50 -0
- package/dist/services/agent-mon/providers/claude/index.d.ts +5 -0
- package/dist/services/agent-mon/providers/claude/ps.d.ts +36 -0
- package/dist/services/agent-mon/providers/claude/session-json.d.ts +37 -0
- package/dist/services/agent-mon/providers/opencode/db.d.ts +41 -0
- package/dist/services/agent-mon/providers/opencode/index.d.ts +3 -0
- package/dist/services/agent-mon/providers/opencode/model-parser.d.ts +6 -0
- package/dist/services/agent-mon/providers/opencode/opencode-provider.d.ts +45 -0
- package/dist/services/ai-client/providers/ai-model.type.d.ts +14 -0
- package/dist/services/ai-client/providers/open-router/open-router-model.type.d.ts +1 -4
- package/dist/services/ai-client/providers/open-router/open-router-provider.d.ts +17 -0
- package/dist/services/ai-client/providers/openai-like-provider.d.ts +1 -0
- package/dist/services/data-ore/telegram/telegram-data-ore.d.ts +17 -0
- package/dist/services/data-ore/telegram/telegram-data-ore.types.d.ts +4 -0
- package/dist/services/data-ore/telegram/telegram-demo-music-helper.d.ts +1 -0
- package/dist/services/data-ore/telegram/telegram-demo.d.ts +1 -0
- package/dist/services/dbc/linter/dbc-ast-adapter.types.d.ts +82 -0
- package/dist/services/dbc/linter/dbc-linter.types.d.ts +95 -0
- package/dist/services/dbc/linter/implementations/ts/dbc-ts-ast-adapter.d.ts +183 -0
- package/dist/services/dbc/linter/implementations/ts/dbc-ts-linter.d.ts +152 -0
- package/dist/services/dbc/parser/dbc-parser.types.d.ts +16 -16
- package/dist/services/dbc/parser/implementations/jsdoc/dbc-jsdoc-parser.d.ts +14 -4
- package/dist/services/logger/logger.d.ts +26 -6
- package/dist/services/remote-console/client/remote-console-client-serializer.d.ts +7 -0
- package/dist/services/remote-console/client/remote-console-client.d.ts +20 -0
- package/dist/services/remote-console/client/remote-console-client.types.d.ts +88 -0
- package/dist/services/remote-console/remote-console.d.ts +6 -0
- package/dist/services/remote-console/server/remote-console-server.d.ts +10 -0
- package/dist/services/remote-console/server/remote-console-server.types.d.ts +44 -0
- package/dist/services/remote-console/server/remote-console-stdout-writer.d.ts +26 -0
- package/dist/services/vcs-client/abstract/vcs-client-merge-discussions.d.ts +22 -14
- package/dist/services/vcs-client/abstract/vcs-client-merge-requests.d.ts +31 -14
- package/dist/services/vcs-client/abstract/vcs-client-repository-files.d.ts +16 -0
- package/dist/services/vcs-client/abstract/vcs-client.d.ts +9 -5
- package/dist/services/vcs-client/entities/vcs-file-content.type.d.ts +24 -0
- package/dist/services/vcs-client/entities/vcs-merge-request-changes.type.d.ts +32 -0
- package/dist/services/vcs-client/entities/vcs-url.type.d.ts +14 -0
- package/dist/services/vcs-client/entities/vcs-user.type.d.ts +3 -0
- package/dist/services/vcs-client/github/vcs-github-client.d.ts +31 -0
- package/dist/services/vcs-client/github/vcs-github-merge-requests.d.ts +40 -0
- package/dist/services/vcs-client/github/vcs-github-repository-files.d.ts +27 -0
- package/dist/services/vcs-client/gitlab/vcs-gitlab-client.d.ts +13 -4
- package/dist/services/vcs-client/gitlab/vcs-gitlab-merge-discussions.d.ts +16 -5
- package/dist/services/vcs-client/gitlab/vcs-gitlab-merge-requests.d.ts +24 -5
- package/dist/services/vcs-client/gitlab/vcs-gitlab-repository-files.d.ts +27 -0
- package/dist/services/vcs-client/parse-vcs-url.d.ts +3 -0
- package/dist/shared/backend/git/git-core.d.ts +24 -22
- package/dist/shared/backend/git/git-diff.d.ts +16 -5
- package/dist/shared/backend/rc/rc-config.d.ts +27 -15
- package/dist/shared/common/exec.d.ts +4 -6
- package/dist/shared/common/files.d.ts +1 -3
- package/dist/shared/common/language.d.ts +3 -6
- package/dist/shared/common/parse-args.d.ts +1 -4
- package/dist/shared/common/style.d.ts +3 -3
- package/dist/shared/common/think.d.ts +1 -5
- package/dist/shared/common/tokens.d.ts +1 -5
- package/dist/shared/common/unguard.d.ts +4 -8
- package/dist/shared/common/xml.d.ts +16 -12
- package/package.json +20 -4
- package/dist/.ai/agents/agent-review-verifier.xml +0 -181
- package/dist/chunks/index-CNbmXK8M.js +0 -3548
- package/dist/chunks/services-Sb7TwLxt.js +0 -122
- package/dist/chunks/shared-BgLzFWMH.js +0 -577
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/** @purpose Single lint error in ESLint-compatible format. */
|
|
2
|
+
export type LintError = {
|
|
3
|
+
/** @purpose Path to the file containing the error */
|
|
4
|
+
file: string;
|
|
5
|
+
/** @purpose 1-based line number */
|
|
6
|
+
line: number;
|
|
7
|
+
/** @purpose 1-based column number */
|
|
8
|
+
col: number;
|
|
9
|
+
/** @purpose Always 'error' for lint violations */
|
|
10
|
+
severity: 'error';
|
|
11
|
+
/** @purpose Error code from ERR_CLI_LINT_* or ERR_DBC_LINT_* set */
|
|
12
|
+
code: string;
|
|
13
|
+
/** @purpose Human-readable description with corrective action */
|
|
14
|
+
message: string;
|
|
15
|
+
};
|
|
16
|
+
/** @purpose Configuration for a single lint run. */
|
|
17
|
+
export type LintOptions = {
|
|
18
|
+
/** @purpose List of .ts file paths to lint */
|
|
19
|
+
files: string[];
|
|
20
|
+
/** @purpose Enable autofix for dbc contract checks */
|
|
21
|
+
autofix: boolean;
|
|
22
|
+
/** @purpose Git scan mode — collect files from git index */
|
|
23
|
+
gitMode?: 'staged';
|
|
24
|
+
};
|
|
25
|
+
/** @purpose Aggregated lint result with ESLint-compatible formatting. | @invariant exitCode is 0 when errors is empty, 1 otherwise. */
|
|
26
|
+
export declare class LintReport {
|
|
27
|
+
/** @purpose Collected lint errors — empty array when clean. */
|
|
28
|
+
readonly errors: LintError[];
|
|
29
|
+
/** @purpose Count of errors auto-fixed by DbcContractCheck. */
|
|
30
|
+
readonly autoFixed: number;
|
|
31
|
+
/** @purpose Deduplicated task file paths resolved from @tasks annotations in linted files. */
|
|
32
|
+
readonly taskPaths: string[];
|
|
33
|
+
/** @purpose Deduplicated spec file paths resolved from task files. */
|
|
34
|
+
readonly specPaths: string[];
|
|
35
|
+
/**
|
|
36
|
+
* @purpose Creates a LintReport with collected errors, autoFixed count, and resolved references.
|
|
37
|
+
* @param errors Collected lint errors.
|
|
38
|
+
* @param [autoFixed] Count of auto-fixed errors, defaults to 0.
|
|
39
|
+
* @param [taskPaths] Resolved task file paths (deduplicated).
|
|
40
|
+
* @param [specPaths] Resolved spec file paths (deduplicated).
|
|
41
|
+
*/
|
|
42
|
+
constructor(errors: LintError[], autoFixed?: number, taskPaths?: string[], specPaths?: string[]);
|
|
43
|
+
/** @purpose Returns 0 when no errors, 1 otherwise — ESLint convention. | @returns 0 for clean, 1 for errors. */
|
|
44
|
+
get exitCode(): 0 | 1;
|
|
45
|
+
/**
|
|
46
|
+
* @purpose Formats errors in ESLint-compatible output with resolved task/spec references.
|
|
47
|
+
* @returns ESLint-compatible formatted string with References block.
|
|
48
|
+
*/
|
|
49
|
+
format(): string;
|
|
50
|
+
}
|
|
51
|
+
/** @purpose File is missing the mandatory // @file: directive before the first import. */
|
|
52
|
+
export declare const ERR_CLI_LINT_MISSING_FILE: "ERR_CLI_LINT_MISSING_FILE";
|
|
53
|
+
/** @purpose File is missing the mandatory // @consumers: directive before the first import. */
|
|
54
|
+
export declare const ERR_CLI_LINT_MISSING_CONSUMERS: "ERR_CLI_LINT_MISSING_CONSUMERS";
|
|
55
|
+
/** @purpose A START anchor has no matching END anchor — opening block never closed. */
|
|
56
|
+
export declare const ERR_CLI_LINT_ANCHOR_UNPAIRED_START: "ERR_CLI_LINT_ANCHOR_UNPAIRED_START";
|
|
57
|
+
/** @purpose An END anchor has no matching START anchor — closing block never opened. */
|
|
58
|
+
export declare const ERR_CLI_LINT_ANCHOR_UNPAIRED_END: "ERR_CLI_LINT_ANCHOR_UNPAIRED_END";
|
|
59
|
+
/** @purpose Anchors violate nesting — parent closed before child. */
|
|
60
|
+
export declare const ERR_CLI_LINT_ANCHOR_NESTING: "ERR_CLI_LINT_ANCHOR_NESTING";
|
|
61
|
+
/** @purpose Bare #region/#endregion without START_/END_ prefix — malformed anchor. */
|
|
62
|
+
export declare const ERR_CLI_LINT_ANCHOR_MALFORMED: "ERR_CLI_LINT_ANCHOR_MALFORMED";
|
|
63
|
+
/** @purpose Cyrillic characters found in JSDoc contracts or file headers — English required. */
|
|
64
|
+
export declare const ERR_CLI_LINT_NON_ENGLISH: "ERR_CLI_LINT_NON_ENGLISH";
|
|
65
|
+
/** @purpose Target resolution failed — path does not exist (ENOENT) or permission denied (EACCES). | @invariant Used by resolveTargets for graceful degradation. */
|
|
66
|
+
export declare const ERR_CLI_LINT_RESOLVE_FAILED: "ERR_CLI_LINT_RESOLVE_FAILED";
|
|
67
|
+
/** @purpose Mutually exclusive flags: --staged and positional targets cannot be used together. */
|
|
68
|
+
export declare const ERR_CLI_LINT_STAGED_CONFLICT: "ERR_CLI_LINT_STAGED_CONFLICT";
|
|
69
|
+
/** @purpose TypeScript / linter disable comment without a Decision Log reference (D-NNN) in the same line. | @invariant Implements policy D-007 (cli.spec.md): every @ts-ignore / @ts-nocheck / @ts-expect-error / eslint-disable* must cite D-NNN in the same comment. */
|
|
70
|
+
export declare const ERR_CLI_LINT_UNAUTHORIZED_DISABLE: "ERR_CLI_LINT_UNAUTHORIZED_DISABLE";
|
|
71
|
+
/** @purpose TypeScript / linter disable comment has a D-NNN reference but lacks a purpose explanation. | @invariant Implements D-007 contract tightening (TSK-52): >= 8 non-whitespace characters of purpose must remain after stripping the comment opener, the marker, and the D-NNN token. */
|
|
72
|
+
export declare const ERR_CLI_LINT_DISABLE_MISSING_PURPOSE: "ERR_CLI_LINT_DISABLE_MISSING_PURPOSE";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** @purpose Resolved reference pair: task file path and its linked spec paths. */
|
|
2
|
+
export type ResolvedReference = {
|
|
3
|
+
/** @purpose Relative path to the task file from project root */
|
|
4
|
+
taskPath: string;
|
|
5
|
+
/** @purpose Relative paths to spec files referenced by the task */
|
|
6
|
+
specPaths: string[];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @purpose Scan all task .md files in tasks/ directory and build a map of taskId -> ResolvedReference.
|
|
10
|
+
* Walks the directory tree recursively, parses each task file for Task-ID and Spec References.
|
|
11
|
+
* @param projectRoot Absolute path to the project root (where tasks/ lives).
|
|
12
|
+
* @param [taskDir] Relative path to the tasks directory (default: 'tasks').
|
|
13
|
+
* @returns Map from task ID string (e.g. 'TSK-21') to its ResolvedReference.
|
|
14
|
+
*/
|
|
15
|
+
export declare function loadTaskReferences(projectRoot: string, taskDir?: string): Map<string, ResolvedReference>;
|
|
16
|
+
/**
|
|
17
|
+
* @purpose Extract task IDs from a file's @tasks annotation in the header.
|
|
18
|
+
* Parses lines like: `// @tasks: TSK-12, TSK-15`
|
|
19
|
+
* @param content File content to parse.
|
|
20
|
+
* @returns Array of task ID strings (e.g. ['TSK-12', 'TSK-15']), empty if no @tasks found.
|
|
21
|
+
*/
|
|
22
|
+
export declare function extractTaskIdsFromHeader(content: string): string[];
|
|
23
|
+
/**
|
|
24
|
+
* @purpose Resolve references for a set of task IDs into deduplicated task and spec path lists.
|
|
25
|
+
* @param taskIds Array of task ID strings.
|
|
26
|
+
* @param taskRefMap Pre-loaded task reference map from loadTaskReferences().
|
|
27
|
+
* @returns Object with deduplicated, sorted arrays of taskPaths and specPaths.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveReferencesForTasks(taskIds: string[], taskRefMap: Map<string, ResolvedReference>): {
|
|
30
|
+
taskPaths: string[];
|
|
31
|
+
specPaths: string[];
|
|
32
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { startRemoteConsoleServer } from '../../../services/remote-console/remote-console.js';
|
|
3
|
+
/** @purpose Defines parsed CLI arguments for remote-console command execution. */
|
|
4
|
+
export type RemoteConsoleCommandArgs = {
|
|
5
|
+
/** @purpose Overrides default server port when provided by operator. */
|
|
6
|
+
port?: number;
|
|
7
|
+
/** @purpose Overrides default loopback bind host for server startup. */
|
|
8
|
+
host?: string;
|
|
9
|
+
/** @purpose Provides optional page URL to open with remote-console activation flag. */
|
|
10
|
+
url?: string;
|
|
11
|
+
};
|
|
12
|
+
/** @purpose Describes injectable dependencies for command testing and runtime orchestration. */
|
|
13
|
+
export type RemoteConsoleCommandDeps = {
|
|
14
|
+
/** @purpose Starts remote-console server runtime and returns lifecycle handle. */
|
|
15
|
+
startServer: typeof startRemoteConsoleServer;
|
|
16
|
+
/**
|
|
17
|
+
* @purpose Opens target URL in default browser process.
|
|
18
|
+
* @param targetUrl Absolute browser URL provided by CLI user.
|
|
19
|
+
* @returns Promise resolving after the browser opens.
|
|
20
|
+
*/
|
|
21
|
+
openBrowser: (targetUrl: string) => Promise<unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* @purpose Emits informational command diagnostics for operator feedback.
|
|
24
|
+
* @param args Format arguments passed to console.info.
|
|
25
|
+
*/
|
|
26
|
+
info: (...args: unknown[]) => void;
|
|
27
|
+
/**
|
|
28
|
+
* @purpose Emits degraded-path diagnostics when optional browser opening fails.
|
|
29
|
+
* @param args Format arguments passed to console.warn.
|
|
30
|
+
*/
|
|
31
|
+
warn: (...args: unknown[]) => void;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* @purpose Runs remote-console CLI command, starts server and optionally opens a browser URL with activation flag.
|
|
35
|
+
* @param argv Process argv or compatible command argument list.
|
|
36
|
+
* @param [deps] Optional dependency overrides for deterministic tests.
|
|
37
|
+
* @returns void — process stays alive while server runs.
|
|
38
|
+
* @sideEffect Network: starts HTTP server runtime for remote console envelopes.
|
|
39
|
+
* @sideEffect Process: writes startup diagnostics to stdout.
|
|
40
|
+
* @sideEffect OS: opens default browser when --url is passed.
|
|
41
|
+
*/
|
|
42
|
+
export declare function runRemoteConsoleCommand(argv: string[], deps?: RemoteConsoleCommandDeps): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* @purpose Parses command arguments for remote-console startup options.
|
|
45
|
+
* @param argv Raw process argument vector.
|
|
46
|
+
* @returns Normalized command arguments with optional port, host and url values.
|
|
47
|
+
*/
|
|
48
|
+
export declare function parseRemoteConsoleCommandArgs(argv: string[]): RemoteConsoleCommandArgs;
|
|
49
|
+
/**
|
|
50
|
+
* @purpose Adds deterministic activation query flag without dropping existing query params or hash fragment.
|
|
51
|
+
* @param targetUrl Absolute browser URL provided by CLI user.
|
|
52
|
+
* @throws {Error} When URL cannot be parsed as absolute URL.
|
|
53
|
+
* @returns Mutated URL with `__remote_console__=1` query parameter.
|
|
54
|
+
*/
|
|
55
|
+
export declare function composeRemoteConsoleActivationUrl(targetUrl: string): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose
|
|
2
|
+
* @purpose Load resolve-conflicts template from the project or fallback from the library.
|
|
3
|
+
* @returns XML template content.
|
|
3
4
|
* @consumer resolve-conflicts-render.xml
|
|
4
|
-
* @returns Содержимое XML-шаблона.
|
|
5
5
|
*/
|
|
6
6
|
export declare function loadResolveConflictsTemplate(): Promise<string>;
|
package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-command-args-parse.logic.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ResolveConflictsCommandArgs } from '../types/resolve-conflicts-command-args.type.js';
|
|
2
2
|
/**
|
|
3
|
-
* @purpose
|
|
4
|
-
* @
|
|
5
|
-
* @param argv Массив process.argv.
|
|
3
|
+
* @purpose Normalize resolve-conflicts CLI arguments into a single contract.
|
|
4
|
+
* @param argv process.argv array.
|
|
6
5
|
* @returns ResolveConflictsCommandArgs.
|
|
6
|
+
* @consumer resolve-conflicts.cmd
|
|
7
7
|
*/
|
|
8
8
|
export declare function parseResolveConflictsCommandArgs(argv: string[]): ResolveConflictsCommandArgs;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ResolveConflictsCommandArgs } from '../types/resolve-conflicts-command-args.type.js';
|
|
2
2
|
import type { ResolveConflictsCommandResult } from '../types/resolve-conflicts-command-result.type.js';
|
|
3
3
|
/**
|
|
4
|
-
* @purpose
|
|
4
|
+
* @purpose Execute resolve-conflicts pipeline and return the final prompt.
|
|
5
|
+
* @param args Normalized launch arguments.
|
|
6
|
+
* @returns Exit code and ready output.
|
|
5
7
|
* @consumer resolve-conflicts.cmd
|
|
6
|
-
* @param args Нормализованные аргументы запуска.
|
|
7
|
-
* @returns Код выполнения и готовый output.
|
|
8
8
|
*/
|
|
9
9
|
export declare function runResolveConflictsCommand(args: ResolveConflictsCommandArgs): Promise<ResolveConflictsCommandResult>;
|
package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-context-git-build.logic.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ResolveConflictsCommandArgs } from '../types/resolve-conflicts-command-args.type.js';
|
|
2
2
|
import type { ResolveConflictsContextGit } from '../types/resolve-conflicts-context-git.type.js';
|
|
3
3
|
/**
|
|
4
|
-
* @purpose
|
|
5
|
-
* @
|
|
6
|
-
* @
|
|
7
|
-
* @throws {Error} Когда текущая директория не git-репозиторий, нет активного merge или нет конфликтов.
|
|
4
|
+
* @purpose Build merge context from git for resolve-conflicts prompt generation.
|
|
5
|
+
* @param args Command launch arguments.
|
|
6
|
+
* @throws {Error} When the current directory is not a git repository, no active merge, or no conflicts.
|
|
8
7
|
* @returns ResolveConflictsContextGit.
|
|
8
|
+
* @consumer resolve-conflicts-command-run.logic
|
|
9
9
|
*/
|
|
10
10
|
export declare function buildResolveConflictsContextGit(args: ResolveConflictsCommandArgs): ResolveConflictsContextGit;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { ResolveConflictsContextGit } from './resolve-conflicts-context-git.type.js';
|
|
2
2
|
/**
|
|
3
|
-
* @purpose
|
|
3
|
+
* @purpose Base artifact of the resolve-conflicts command: git context and XML.
|
|
4
4
|
* @consumer resolve-conflicts-command-run.logic
|
|
5
5
|
*/
|
|
6
6
|
export type ResolveConflictsArtifact = {
|
|
7
|
+
/** @purpose Git context for resolve-conflicts prompt generation. */
|
|
7
8
|
resolveConflictsContextGit: ResolveConflictsContextGit;
|
|
9
|
+
/** @purpose XML artifact generated from the resolve-conflicts pipeline. */
|
|
8
10
|
resolveConflictsArtifactXml: string;
|
|
9
11
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose
|
|
2
|
+
* @purpose Normalized launch arguments for resolve-conflicts.
|
|
3
3
|
* @consumer resolve-conflicts-command-args-parse.logic
|
|
4
4
|
*/
|
|
5
5
|
export type ResolveConflictsCommandArgs = {
|
|
6
|
+
/** @purpose Target branch name for the merge resolution. */
|
|
6
7
|
branch?: string;
|
|
8
|
+
/** @purpose Incoming branch name to merge into the target. */
|
|
7
9
|
incoming?: string;
|
|
8
10
|
};
|
package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-command-result.type.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { ResolveConflictsArtifact } from './resolve-conflicts-artifact.type.js';
|
|
2
2
|
/**
|
|
3
|
-
* @purpose
|
|
3
|
+
* @purpose Resolve-conflicts execution result.
|
|
4
4
|
* @consumer resolve-conflicts.cmd
|
|
5
5
|
*/
|
|
6
6
|
export type ResolveConflictsCommandResult = {
|
|
7
|
+
/** @purpose Whether the command completed successfully. */
|
|
7
8
|
ok: boolean;
|
|
9
|
+
/** @purpose Process exit code (0 = success). */
|
|
8
10
|
code: number;
|
|
11
|
+
/** @purpose Optional text output produced by the command. */
|
|
9
12
|
output?: string;
|
|
13
|
+
/** @purpose Optional structured artifact from the resolve-conflicts pipeline. */
|
|
10
14
|
artifact?: ResolveConflictsArtifact;
|
|
11
15
|
};
|
|
@@ -1,29 +1,45 @@
|
|
|
1
1
|
import type { GitRemoteInfo } from '../../../../../shared/backend/git/git-core.js';
|
|
2
2
|
/**
|
|
3
|
-
* @purpose
|
|
3
|
+
* @purpose Describe a single conflicting file in the merge context.
|
|
4
4
|
* @consumer resolve-conflicts-context-git-build.logic, resolve-conflicts-artifact-build.xml
|
|
5
5
|
*/
|
|
6
6
|
export type ResolveConflictsContextFile = {
|
|
7
|
+
/** @purpose File path relative to repository root. */
|
|
7
8
|
path: string;
|
|
9
|
+
/** @purpose Git file status (e.g. "modified", "both modified"). */
|
|
8
10
|
status: string;
|
|
11
|
+
/** @purpose Kind of conflict (e.g. "content", "rename"). */
|
|
9
12
|
kind: string;
|
|
13
|
+
/** @purpose Whether the file exists on disk. */
|
|
10
14
|
exists: boolean;
|
|
15
|
+
/** @purpose Whether the file is binary. */
|
|
11
16
|
binary: boolean;
|
|
17
|
+
/** @purpose Number of conflict marker regions in the file. */
|
|
12
18
|
conflictRegions: number;
|
|
13
19
|
};
|
|
14
20
|
/**
|
|
15
|
-
* @purpose
|
|
21
|
+
* @purpose Build git context for resolve-conflicts prompt generation.
|
|
16
22
|
* @consumer resolve-conflicts-command-run.logic
|
|
17
23
|
*/
|
|
18
24
|
export type ResolveConflictsContextGit = {
|
|
25
|
+
/** @purpose Current branch name. */
|
|
19
26
|
currentBranch: string;
|
|
27
|
+
/** @purpose Incoming branch name to merge. */
|
|
20
28
|
incomingBranch: string;
|
|
29
|
+
/** @purpose HEAD SHA of the current branch. */
|
|
21
30
|
currentHead: string;
|
|
31
|
+
/** @purpose HEAD SHA of the incoming branch. */
|
|
22
32
|
incomingHead: string;
|
|
33
|
+
/** @purpose Merge base commit SHA. */
|
|
23
34
|
mergeBase: string;
|
|
35
|
+
/** @purpose Merge commit message. */
|
|
24
36
|
mergeMessage: string;
|
|
37
|
+
/** @purpose Number of commits unique to the current branch. */
|
|
25
38
|
currentOnlyCommits: number;
|
|
39
|
+
/** @purpose Number of commits unique to the incoming branch. */
|
|
26
40
|
incomingOnlyCommits: number;
|
|
41
|
+
/** @purpose Remote repository info (null if no remote configured). */
|
|
27
42
|
remote: GitRemoteInfo | null;
|
|
43
|
+
/** @purpose List of conflicting files in the merge context. */
|
|
28
44
|
conflictFiles: ResolveConflictsContextFile[];
|
|
29
45
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { XmlNode } from '../../../../../shared/common/xml.js';
|
|
2
2
|
import type { ResolveConflictsContextGit } from '../types/resolve-conflicts-context-git.type.js';
|
|
3
3
|
/**
|
|
4
|
-
* @purpose
|
|
4
|
+
* @purpose Build the resolve-conflicts artifact XmlNode tree from merge git context.
|
|
5
|
+
* @param resolveConflictsContextGit Merge context and conflicting files.
|
|
6
|
+
* @returns Root XmlNode (tag: Merge_Conflict_Context).
|
|
5
7
|
* @consumer resolve-conflicts-artifact-build.xml
|
|
6
|
-
* @param resolveConflictsContextGit Контекст merge и конфликтующих файлов.
|
|
7
|
-
* @returns Корневой XmlNode (tag: Merge_Conflict_Context).
|
|
8
8
|
*/
|
|
9
9
|
export declare function createResolveConflictsArtifactXmlNode(resolveConflictsContextGit: ResolveConflictsContextGit): XmlNode;
|
|
10
10
|
/**
|
|
11
|
-
* @purpose
|
|
11
|
+
* @purpose Build the XML artifact for resolve-conflicts.
|
|
12
|
+
* @param resolveConflictsContextGit Git merge context.
|
|
13
|
+
* @returns XML string (Merge_Conflict_Context).
|
|
12
14
|
* @consumer resolve-conflicts-command-run.logic
|
|
13
|
-
* @param resolveConflictsContextGit Git-контекст merge.
|
|
14
|
-
* @returns Строка XML (Merge_Conflict_Context).
|
|
15
15
|
*/
|
|
16
16
|
export declare function buildResolveConflictsArtifactXml(resolveConflictsContextGit: ResolveConflictsContextGit): string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose
|
|
2
|
+
* @purpose Build the final XML for resolve-conflicts (template + artifact + project placeholders).
|
|
3
|
+
* @param resolveConflictsArtifactXml Merge conflicts XML artifact.
|
|
4
|
+
* @param [projectRoot] Repository root for searching knowledge and verify commands.
|
|
5
|
+
* @returns Full XML prompt for resolve-conflicts.
|
|
3
6
|
* @consumer resolve-conflicts-command-run.logic
|
|
4
|
-
* @param resolveConflictsArtifactXml XML-артефакт merge conflicts.
|
|
5
|
-
* @param projectRoot Корень репозитория для поиска знаний и verify-команд.
|
|
6
|
-
* @returns Полный XML-промпт для resolve-conflicts.
|
|
7
7
|
*/
|
|
8
8
|
export declare function renderResolveConflictsXml(resolveConflictsArtifactXml: string, projectRoot?: string): Promise<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose
|
|
2
|
+
* @purpose Load review-verify template from the project or fallback from the library.
|
|
3
|
+
* @returns XML template content.
|
|
3
4
|
* @consumer render-review-verify.xml
|
|
4
|
-
* @returns Содержимое XML-шаблона.
|
|
5
5
|
*/
|
|
6
6
|
export declare function loadReviewVerifyTemplate(): Promise<string>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ReviewContextGit } from '../types/review-context-git.type.js';
|
|
2
2
|
/**
|
|
3
|
-
* @purpose
|
|
4
|
-
* @
|
|
5
|
-
* @param [branchOverride] Явно заданная ветка из CLI.
|
|
3
|
+
* @purpose Build git context for review launch (branch + origin remote).
|
|
4
|
+
* @param [branchOverride] Explicitly specified branch from CLI.
|
|
6
5
|
* @returns ReviewContextGit.
|
|
6
|
+
* @consumer run-review-command.logic
|
|
7
7
|
*/
|
|
8
8
|
export declare function buildReviewContextGit(branchOverride?: string): ReviewContextGit;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ReviewContextVcs } from '../types/review-context-vcs.type.js';
|
|
2
2
|
/**
|
|
3
|
-
* @purpose
|
|
4
|
-
* @consumer run-review-command.logic
|
|
3
|
+
* @purpose Build VCS context and GitLab API client.
|
|
5
4
|
* @param host GitLab host.
|
|
6
5
|
* @param project GitLab project path/id.
|
|
7
6
|
* @returns ReviewContextVcs.
|
|
7
|
+
* @consumer run-review-command.logic
|
|
8
8
|
*/
|
|
9
9
|
export declare function buildReviewContextVcs(host: string, project: string): ReviewContextVcs;
|
|
@@ -4,12 +4,12 @@ import type { ReviewContextVcs } from '../types/review-context-vcs.type.js';
|
|
|
4
4
|
import type { ReviewIntent } from '../types/review-intent.type.js';
|
|
5
5
|
import type { ReviewContextGit } from '../types/review-context-git.type.js';
|
|
6
6
|
/**
|
|
7
|
-
* @purpose
|
|
7
|
+
* @purpose Load MR and discussions by ReviewIntent.
|
|
8
|
+
* @param reviewIntent Review command launch intent.
|
|
9
|
+
* @param reviewContextVcs VCS context with GitLab client.
|
|
10
|
+
* @param [reviewContextGit] Git context (needed for branch fallback).
|
|
11
|
+
* @returns MR and list of discussions or null if MR not found.
|
|
8
12
|
* @consumer run-review-command.logic
|
|
9
|
-
* @param reviewIntent Намерение запуска review-команды.
|
|
10
|
-
* @param reviewContextVcs VCS-контекст с клиентом GitLab.
|
|
11
|
-
* @param [reviewContextGit] Git-контекст (нужен для branch fallback).
|
|
12
|
-
* @returns MR и список discussions или null, если MR не найден.
|
|
13
13
|
*/
|
|
14
14
|
export declare function loadReviewContextMr(reviewIntent: ReviewIntent, reviewContextVcs: ReviewContextVcs, reviewContextGit?: ReviewContextGit): Promise<{
|
|
15
15
|
mergeRequest: ReviewContextMr;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ReviewCommandArgs } from '../types/review-command-args.type.js';
|
|
2
2
|
/**
|
|
3
|
-
* @purpose
|
|
4
|
-
* @
|
|
5
|
-
* @param argv Массив process.argv.
|
|
3
|
+
* @purpose Normalize review command CLI arguments into a single contract.
|
|
4
|
+
* @param argv process.argv array.
|
|
6
5
|
* @returns ReviewCommandArgs.
|
|
6
|
+
* @consumer review-verify.cmd, review-issues.cmd
|
|
7
7
|
*/
|
|
8
8
|
export declare function parseReviewCommandArgs(argv: string[]): ReviewCommandArgs;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ReviewCommandArgs } from '../types/review-command-args.type.js';
|
|
2
2
|
import type { ReviewIntent } from '../types/review-intent.type.js';
|
|
3
3
|
/**
|
|
4
|
-
* @purpose
|
|
4
|
+
* @purpose Resolve review launch intent from arguments (url/ref/project+iid/branch).
|
|
5
|
+
* @param args Normalized review command arguments.
|
|
6
|
+
* @returns ReviewIntent with priority url > ref > project+iid > branch fallback.
|
|
5
7
|
* @consumer run-review-command.logic
|
|
6
|
-
* @param args Нормализованные аргументы review-команды.
|
|
7
|
-
* @returns ReviewIntent с приоритетом url > ref > project+iid > branch fallback.
|
|
8
8
|
*/
|
|
9
9
|
export declare function resolveReviewIntent(args: ReviewCommandArgs): ReviewIntent;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ReviewCommandOptions } from '../types/review-command-options.type.js';
|
|
2
2
|
import type { ReviewCommandResult } from '../types/review-command-result.type.js';
|
|
3
3
|
/**
|
|
4
|
-
* @purpose
|
|
4
|
+
* @purpose Execute common review command pipeline and return the final output.
|
|
5
|
+
* @param options Command mode and launch arguments.
|
|
6
|
+
* @returns Exit code and ready output.
|
|
5
7
|
* @consumer review-verify.cmd, review-issues.cmd
|
|
6
|
-
* @param options Режим команды и аргументы запуска.
|
|
7
|
-
* @returns Код выполнения и готовый output.
|
|
8
8
|
*/
|
|
9
9
|
export declare function runReviewCommand(options: ReviewCommandOptions): Promise<ReviewCommandResult>;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { ReviewContextMr } from './review-context-mr.type.js';
|
|
2
2
|
import type { ReviewContextMrDiscussion } from './review-context-mr.type.js';
|
|
3
3
|
/**
|
|
4
|
-
* @purpose
|
|
4
|
+
* @purpose Base artifact of review commands: MR + discussions + XML.
|
|
5
5
|
* @consumer run-review-command.logic
|
|
6
6
|
*/
|
|
7
7
|
export type ReviewArtifact = {
|
|
8
|
+
/** @purpose MR context used for review artifact generation. */
|
|
8
9
|
mergeRequest: ReviewContextMr;
|
|
10
|
+
/** @purpose Discussions on the MR. */
|
|
9
11
|
discussions: ReviewContextMrDiscussion[];
|
|
12
|
+
/** @purpose XML artifact generated from the review pipeline. */
|
|
10
13
|
reviewArtifactXml: string;
|
|
11
14
|
};
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose
|
|
2
|
+
* @purpose Normalized launch arguments for review commands.
|
|
3
3
|
* @consumer review-verify.cmd, review-issues.cmd
|
|
4
4
|
*/
|
|
5
5
|
export type ReviewCommandArgs = {
|
|
6
|
+
/** @purpose Branch name for the review. */
|
|
6
7
|
branch?: string;
|
|
8
|
+
/** @purpose MR URL for VCS-based review. */
|
|
7
9
|
url?: string;
|
|
10
|
+
/** @purpose Git ref to review. */
|
|
8
11
|
ref?: string;
|
|
12
|
+
/** @purpose VCS project path (owner/repo). */
|
|
9
13
|
project?: string;
|
|
14
|
+
/** @purpose MR IID for GitLab-based review. */
|
|
10
15
|
iid?: string;
|
|
16
|
+
/** @purpose Review all MRs (for review-verify --all). */
|
|
11
17
|
all?: boolean;
|
|
12
18
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { ReviewCommandArgs } from './review-command-args.type.js';
|
|
2
2
|
import type { ReviewCommandMode } from './review-command-mode.type.js';
|
|
3
3
|
/**
|
|
4
|
-
* @purpose
|
|
4
|
+
* @purpose Review pipeline launch options.
|
|
5
5
|
* @consumer run-review-command.logic
|
|
6
6
|
*/
|
|
7
7
|
export type ReviewCommandOptions = {
|
|
8
|
+
/** @purpose Review command mode (verify or issues). */
|
|
8
9
|
mode: ReviewCommandMode;
|
|
10
|
+
/** @purpose Normalized launch arguments for the review command. */
|
|
9
11
|
args: ReviewCommandArgs;
|
|
10
12
|
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { ReviewArtifact } from './review-artifact.type.js';
|
|
2
2
|
/**
|
|
3
|
-
* @purpose
|
|
3
|
+
* @purpose Review command execution result.
|
|
4
4
|
* @consumer review-verify.cmd, review-issues.cmd
|
|
5
5
|
*/
|
|
6
6
|
export type ReviewCommandResult = {
|
|
7
|
+
/** @purpose Whether the command completed successfully. */
|
|
7
8
|
ok: boolean;
|
|
9
|
+
/** @purpose Process exit code (0 = success). */
|
|
8
10
|
code: number;
|
|
11
|
+
/** @purpose Optional text output produced by the command. */
|
|
9
12
|
output?: string;
|
|
13
|
+
/** @purpose Optional structured artifact from the review pipeline. */
|
|
10
14
|
artifact?: ReviewArtifact;
|
|
11
15
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { GitRemoteInfo } from '../../../../../shared/backend/git/git-core.js';
|
|
2
2
|
/**
|
|
3
|
-
* @purpose Git
|
|
3
|
+
* @purpose Git context for review commands.
|
|
4
4
|
* @consumer build-review-context-git.logic
|
|
5
5
|
*/
|
|
6
6
|
export type ReviewContextGit = {
|
|
7
|
+
/** @purpose Current branch name for the review. */
|
|
7
8
|
branch: string;
|
|
9
|
+
/** @purpose Remote repository info extracted from git config. */
|
|
8
10
|
remote: GitRemoteInfo;
|
|
9
11
|
};
|
|
@@ -1,28 +1,39 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose
|
|
2
|
+
* @purpose Minimal MR context for review artifact generation.
|
|
3
3
|
* @consumer load-review-context-mr.logic
|
|
4
4
|
*/
|
|
5
5
|
export type ReviewContextMr = {
|
|
6
|
+
/** @purpose GitLab MR internal ID. */
|
|
6
7
|
iid: number;
|
|
8
|
+
/** @purpose GitLab project ID. */
|
|
7
9
|
project_id?: number;
|
|
10
|
+
/** @purpose Source branch of the MR. */
|
|
8
11
|
source_branch?: string;
|
|
12
|
+
/** @purpose MR title. */
|
|
9
13
|
title?: string;
|
|
14
|
+
/** @purpose Web URL of the MR. */
|
|
10
15
|
web_url?: string;
|
|
16
|
+
/** @purpose Author info of the MR. */
|
|
11
17
|
author?: {
|
|
12
18
|
username?: string;
|
|
13
19
|
};
|
|
14
20
|
};
|
|
15
21
|
/**
|
|
16
|
-
* @purpose
|
|
22
|
+
* @purpose GitLab discussion note type used in the XML artifact.
|
|
17
23
|
* @consumer build-review-artifact.xml
|
|
18
24
|
*/
|
|
19
25
|
export type ReviewContextMrNote = {
|
|
26
|
+
/** @purpose Note ID. */
|
|
20
27
|
id?: number;
|
|
28
|
+
/** @purpose Note body text. */
|
|
21
29
|
body?: string;
|
|
30
|
+
/** @purpose Note author info. */
|
|
22
31
|
author?: {
|
|
23
32
|
username?: string;
|
|
24
33
|
};
|
|
34
|
+
/** @purpose Whether this is a system-generated note. */
|
|
25
35
|
system?: boolean;
|
|
36
|
+
/** @purpose Diff position the note applies to. */
|
|
26
37
|
position?: {
|
|
27
38
|
new_path?: string;
|
|
28
39
|
old_path?: string;
|
|
@@ -30,21 +41,29 @@ export type ReviewContextMrNote = {
|
|
|
30
41
|
old_line?: number;
|
|
31
42
|
head_sha?: string;
|
|
32
43
|
};
|
|
44
|
+
/** @purpose Whether the note is resolvable. */
|
|
33
45
|
resolvable?: boolean;
|
|
46
|
+
/** @purpose Whether the note is resolved. */
|
|
34
47
|
resolved?: boolean;
|
|
48
|
+
/** @purpose Who resolved the note. */
|
|
35
49
|
resolved_by?: {
|
|
36
50
|
username?: string;
|
|
37
51
|
} | null;
|
|
38
52
|
};
|
|
39
53
|
/**
|
|
40
|
-
* @purpose
|
|
54
|
+
* @purpose GitLab discussion type used in the XML artifact.
|
|
41
55
|
* @consumer build-review-artifact.xml
|
|
42
56
|
*/
|
|
43
57
|
export type ReviewContextMrDiscussion = {
|
|
58
|
+
/** @purpose Discussion ID. */
|
|
44
59
|
id: string;
|
|
60
|
+
/** @purpose Notes in this discussion thread. */
|
|
45
61
|
notes?: ReviewContextMrNote[];
|
|
62
|
+
/** @purpose Whether the discussion is resolvable. */
|
|
46
63
|
resolvable?: boolean;
|
|
64
|
+
/** @purpose Whether the discussion is resolved. */
|
|
47
65
|
resolved?: boolean;
|
|
66
|
+
/** @purpose Who resolved the discussion. */
|
|
48
67
|
resolved_by?: {
|
|
49
68
|
username?: string;
|
|
50
69
|
} | null;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { VcsGitlabClient } from '../../../../../services/vcs-client/gitlab/vcs-gitlab-client.js';
|
|
2
2
|
/**
|
|
3
|
-
* @purpose VCS
|
|
3
|
+
* @purpose VCS context for GitLab API requests.
|
|
4
4
|
* @consumer build-review-context-vcs.logic
|
|
5
5
|
*/
|
|
6
6
|
export type ReviewContextVcs = {
|
|
7
|
+
/** @purpose GitLab host (e.g. "gitlab.example.com"). */
|
|
7
8
|
host: string;
|
|
9
|
+
/** @purpose GitLab project path (owner/repo). */
|
|
8
10
|
project: string;
|
|
11
|
+
/** @purpose Initialized VCS client for GitLab API requests. */
|
|
9
12
|
vcs: VcsGitlabClient;
|
|
10
13
|
};
|