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
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { p as j, s as e, g as x } from "./shared-
|
|
2
|
-
import { p as T, A as E } from "./index-
|
|
1
|
+
import { p as j, s as e, g as x } from "./shared-Bjy30TeM.js";
|
|
2
|
+
import { p as T, A as E } from "./index-CiEM-8nJ.js";
|
|
3
3
|
import { readdirSync as G, readFileSync as P } from "node:fs";
|
|
4
4
|
import { join as h, dirname as k } from "node:path";
|
|
5
5
|
import { fileURLToPath as N } from "node:url";
|
|
6
6
|
const R = h(k(N(import.meta.url)), "specs");
|
|
7
7
|
class v {
|
|
8
|
+
/** @purpose Cached language specs loaded from specs directory on first access. */
|
|
8
9
|
_langSpecs = {};
|
|
10
|
+
/** @purpose Configuration with base prompt template and timeout. */
|
|
9
11
|
init;
|
|
12
|
+
/**
|
|
13
|
+
* @purpose Initialize ReviewGen with configuration and AI core.
|
|
14
|
+
* @param [init] Configuration overrides (timeout, logger).
|
|
15
|
+
*/
|
|
10
16
|
constructor(t = {}) {
|
|
11
17
|
this.init = {
|
|
12
18
|
basePromptTemplate: T.review("base"),
|
|
@@ -17,21 +23,28 @@ class v {
|
|
|
17
23
|
timeout: this.init.timeout
|
|
18
24
|
});
|
|
19
25
|
}
|
|
26
|
+
/** @purpose Instance of AiLegacyCore for calling LLM. */
|
|
20
27
|
_ai;
|
|
21
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* @purpose Instance of AiLegacyCore for calling LLM.
|
|
30
|
+
* @returns AiLegacyCore instance.
|
|
31
|
+
*/
|
|
22
32
|
get ai() {
|
|
23
33
|
return this._ai;
|
|
24
34
|
}
|
|
25
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* @purpose Logger (if passed during initialization).
|
|
37
|
+
* @returns Logger instance or undefined.
|
|
38
|
+
*/
|
|
26
39
|
get logger() {
|
|
27
40
|
return this.init.logger;
|
|
28
41
|
}
|
|
29
42
|
/**
|
|
30
|
-
* @purpose
|
|
31
|
-
* @param code
|
|
32
|
-
* @param [langs]
|
|
33
|
-
* @returns
|
|
34
|
-
* @sideEffect Network:
|
|
43
|
+
* @purpose Generate review text from code and list of languages.
|
|
44
|
+
* @param code Source code for analysis.
|
|
45
|
+
* @param [langs] Languages (default derived from extension in code).
|
|
46
|
+
* @returns Review text from LLM.
|
|
47
|
+
* @sideEffect Network: request to AI; Filesystem: reading specs on first access.
|
|
35
48
|
*/
|
|
36
49
|
async generate(t, s = [t.includes(".ts") ? "TypeScript" : "JavaScript"]) {
|
|
37
50
|
const n = this.init.basePromptTemplate.replaceAll("{LANGUAGES}", s.join(", ")).replaceAll(`
|
|
@@ -39,6 +52,12 @@ class v {
|
|
|
39
52
|
`, this._getExtraRulesPrompt(s, t)).replaceAll("{INPUT}", t);
|
|
40
53
|
return this._ai.generate(n);
|
|
41
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* @purpose Build extra rules prompt from language specs matching the code under review.
|
|
57
|
+
* @param langs List of programming language names.
|
|
58
|
+
* @param code Source code to scan for known constructs.
|
|
59
|
+
* @returns Extra rules prompt string (empty if no matches found).
|
|
60
|
+
*/
|
|
42
61
|
_getExtraRulesPrompt(t, s) {
|
|
43
62
|
const n = this._loadSpec(t), r = Object.keys(n.Global?.properties ?? {}), l = new RegExp(`\\b(${r.join("|")})\\b`, "g"), i = {};
|
|
44
63
|
let o = "", p = null;
|
|
@@ -68,6 +87,11 @@ class v {
|
|
|
68
87
|
${o}
|
|
69
88
|
` : "";
|
|
70
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* @purpose Load and cache language specs from JSON files in the specs directory.
|
|
92
|
+
* @param langs List of programming language names.
|
|
93
|
+
* @returns Merged spec shape for all requested languages.
|
|
94
|
+
*/
|
|
71
95
|
_loadSpec(t) {
|
|
72
96
|
return t.reduce((s, n) => {
|
|
73
97
|
const r = n === "JavaScript" || n === "TypeScript" ? "js" : n, l = h(R, r);
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import { AiLegacyModel as h } from "../index.js";
|
|
2
|
-
import { G as f, u as c } from "./shared-
|
|
3
|
-
import { l as p } from "./services-
|
|
2
|
+
import { G as f, u as c } from "./shared-Bjy30TeM.js";
|
|
3
|
+
import { l as p } from "./services-CaLOhuLV.js";
|
|
4
4
|
import { readFileSync as l } from "node:fs";
|
|
5
5
|
import { dirname as _, join as m } from "node:path";
|
|
6
6
|
import { fileURLToPath as k } from "node:url";
|
|
7
7
|
class M {
|
|
8
|
+
/** @purpose Loaded AI model list from gennadyrc. */
|
|
8
9
|
_models = [];
|
|
10
|
+
/** @purpose Currently active model that passed ping check. */
|
|
9
11
|
_activeModel = null;
|
|
12
|
+
/** @purpose Configuration and dependencies for the core. */
|
|
10
13
|
init;
|
|
14
|
+
/**
|
|
15
|
+
* @purpose Initialize AiLegacyCore with loaded models from gennadyrc.
|
|
16
|
+
* @param [init] Configuration (logger, timeout, maxInputTokens).
|
|
17
|
+
*/
|
|
11
18
|
constructor(e = {}) {
|
|
12
19
|
this.init = {
|
|
13
20
|
logger: p,
|
|
@@ -18,22 +25,31 @@ class M {
|
|
|
18
25
|
o.isValid() && this._models.push(...o.getModels().map((t) => new h(t)));
|
|
19
26
|
}), this._models.length || this._models.push(h.getDefault());
|
|
20
27
|
}
|
|
21
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* @purpose Name of the first loaded model (for CLI display).
|
|
30
|
+
* @returns Model name string or undefined.
|
|
31
|
+
*/
|
|
22
32
|
get model() {
|
|
23
33
|
return this._models[0]?.name;
|
|
24
34
|
}
|
|
25
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* @purpose URL of the first loaded model.
|
|
37
|
+
* @returns API URL string or undefined.
|
|
38
|
+
*/
|
|
26
39
|
get apiUrl() {
|
|
27
40
|
return this._models[0]?.url;
|
|
28
41
|
}
|
|
29
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* @purpose Token limit per batch when splitting diff.
|
|
44
|
+
* @returns Max input tokens count.
|
|
45
|
+
*/
|
|
30
46
|
get maxInputTokens() {
|
|
31
47
|
return this.init.maxInputTokens;
|
|
32
48
|
}
|
|
33
49
|
/**
|
|
34
|
-
* @purpose
|
|
35
|
-
* @param parseDiff
|
|
36
|
-
* @returns
|
|
50
|
+
* @purpose Split parsed diff into batches by maxInputTokens for sequential LLM requests.
|
|
51
|
+
* @param parseDiff Array of ParsedDiffFile (usually parsedCodeDiff from getGitDiffInfo).
|
|
52
|
+
* @returns Array of batches { tokens, diff, languages }.
|
|
37
53
|
*/
|
|
38
54
|
createPromptsBatchesByDiff(e) {
|
|
39
55
|
let o = e;
|
|
@@ -58,11 +74,11 @@ ${g}
|
|
|
58
74
|
);
|
|
59
75
|
}
|
|
60
76
|
/**
|
|
61
|
-
* @purpose
|
|
62
|
-
* @param prompt
|
|
63
|
-
* @param [systemPrompt]
|
|
64
|
-
* @returns
|
|
65
|
-
* @sideEffect Network: ping
|
|
77
|
+
* @purpose Call the first available model (ping) and generate a response from the prompt.
|
|
78
|
+
* @param prompt Prompt text.
|
|
79
|
+
* @param [systemPrompt] Optional system prompt.
|
|
80
|
+
* @returns Model response text or empty string on error.
|
|
81
|
+
* @sideEffect Network: ping then generate; Logs: error/warn on model failure.
|
|
66
82
|
*/
|
|
67
83
|
async generate(e, o) {
|
|
68
84
|
try {
|
|
@@ -76,9 +92,9 @@ ${g}
|
|
|
76
92
|
}
|
|
77
93
|
}
|
|
78
94
|
/**
|
|
79
|
-
* @purpose
|
|
80
|
-
* @returns
|
|
81
|
-
* @sideEffect Network: ping
|
|
95
|
+
* @purpose Select the first model that successfully responded to ping; caches in _activeModel.
|
|
96
|
+
* @returns Tuple [model, null] or [null, Error] if no model is available.
|
|
97
|
+
* @sideEffect Network: ping each model until first success.
|
|
82
98
|
*/
|
|
83
99
|
async _choiceModel() {
|
|
84
100
|
if (this._activeModel)
|
|
@@ -96,11 +112,11 @@ ${g}
|
|
|
96
112
|
}
|
|
97
113
|
}
|
|
98
114
|
const u = _(k(import.meta.url)), w = {
|
|
99
|
-
/** @purpose
|
|
115
|
+
/** @purpose Load agent prompt by name (e.g. 'keywords'). */
|
|
100
116
|
agent: (i) => l(m(u, "agent", `agent-${i}-prompt.md`)).toString(),
|
|
101
|
-
/** @purpose
|
|
117
|
+
/** @purpose Load commit prompt by name ('message' | 'changeset'). */
|
|
102
118
|
commit: (i) => l(m(u, "commit", `commit-${i}-prompt.md`)).toString(),
|
|
103
|
-
/** @purpose
|
|
119
|
+
/** @purpose Load review prompt by name (e.g. 'base'). */
|
|
104
120
|
review: (i) => l(m(u, "review", `review-${i}-prompt.md`)).toString()
|
|
105
121
|
};
|
|
106
122
|
export {
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import u from "node:fs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { execSync as
|
|
5
|
-
import { p as d, A as E } from "./index-
|
|
6
|
-
import { g as H, s as t, x as D, p as F } from "./shared-
|
|
7
|
-
import { l as N } from "./services-
|
|
2
|
+
import S from "node:os";
|
|
3
|
+
import v from "node:path";
|
|
4
|
+
import { execSync as P } from "node:child_process";
|
|
5
|
+
import { p as d, A as E } from "./index-CiEM-8nJ.js";
|
|
6
|
+
import { g as H, s as t, x as D, p as F } from "./shared-Bjy30TeM.js";
|
|
7
|
+
import { l as N } from "./services-CaLOhuLV.js";
|
|
8
8
|
class U {
|
|
9
|
+
/** @purpose Configuration with defaults for mode, prompts, timeout. */
|
|
9
10
|
init;
|
|
11
|
+
/** @purpose AI core instance for LLM requests. */
|
|
10
12
|
ai;
|
|
13
|
+
/**
|
|
14
|
+
* @purpose Initialize CommitGen with configuration and AI core.
|
|
15
|
+
* @param [init] Configuration overrides (mode, oneline, targetBranch, task, timeout).
|
|
16
|
+
*/
|
|
11
17
|
constructor(n = {}) {
|
|
12
18
|
this.init = {
|
|
13
19
|
mode: "auto",
|
|
@@ -24,43 +30,61 @@ class U {
|
|
|
24
30
|
timeout: this.init.timeout
|
|
25
31
|
});
|
|
26
32
|
}
|
|
27
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* @purpose Get the logger instance used during generation.
|
|
35
|
+
* @returns Logger instance.
|
|
36
|
+
*/
|
|
28
37
|
get logger() {
|
|
29
38
|
return this.init.logger;
|
|
30
39
|
}
|
|
31
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* @purpose Commit output mode: auto | oneline | detailed.
|
|
42
|
+
* @returns Mode string.
|
|
43
|
+
*/
|
|
32
44
|
get mode() {
|
|
33
45
|
return this.init.mode;
|
|
34
46
|
}
|
|
35
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* @purpose Active AI model name (from the first available rc).
|
|
49
|
+
* @returns Model name string or undefined.
|
|
50
|
+
*/
|
|
36
51
|
get model() {
|
|
37
52
|
return this.ai.model;
|
|
38
53
|
}
|
|
39
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* @purpose Active model API URL.
|
|
56
|
+
* @returns API URL string or undefined.
|
|
57
|
+
*/
|
|
40
58
|
get apiUrl() {
|
|
41
59
|
return this.ai.apiUrl;
|
|
42
60
|
}
|
|
43
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* @purpose Branch against which the diff is built (if specified).
|
|
63
|
+
* @returns Target branch name or undefined.
|
|
64
|
+
*/
|
|
44
65
|
get targetBranch() {
|
|
45
66
|
return this.init.targetBranch;
|
|
46
67
|
}
|
|
47
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* @purpose Task identifier for substitution in subject (optional).
|
|
70
|
+
* @returns Task ID string or number, or undefined.
|
|
71
|
+
*/
|
|
48
72
|
get task() {
|
|
49
73
|
return this.init.task;
|
|
50
74
|
}
|
|
51
75
|
/**
|
|
52
|
-
* @purpose
|
|
53
|
-
* @param input
|
|
54
|
-
* @returns
|
|
55
|
-
* @sideEffect Network:
|
|
76
|
+
* @purpose Call LLM with a single prompt without think blocks (for tests or custom input).
|
|
77
|
+
* @param input Prompt text.
|
|
78
|
+
* @returns Model response as string.
|
|
79
|
+
* @sideEffect Network: request to AI API.
|
|
56
80
|
*/
|
|
57
81
|
async fetchPrompt(n) {
|
|
58
82
|
return this.ai.generate(`/no_think ${n} /no_think`);
|
|
59
83
|
}
|
|
60
84
|
/**
|
|
61
|
-
* @purpose
|
|
62
|
-
* @returns
|
|
63
|
-
* @sideEffect Network:
|
|
85
|
+
* @purpose Generate commit message from staged diff (batches → changeset → message).
|
|
86
|
+
* @returns Message string (oneline or with description) or undefined on empty diff/error.
|
|
87
|
+
* @sideEffect Network: requests to AI; Logs: info/warn/debug.
|
|
64
88
|
*/
|
|
65
89
|
async generate() {
|
|
66
90
|
const n = performance.now();
|
|
@@ -84,7 +108,7 @@ class U {
|
|
|
84
108
|
);
|
|
85
109
|
const p = this.ai.createPromptsBatchesByDiff(g);
|
|
86
110
|
this.init.logger.debug(`[CommitGen#generate] [batching → ready] queue=${p.length}`);
|
|
87
|
-
const G = performance.now(),
|
|
111
|
+
const G = performance.now(), _ = await Promise.all(
|
|
88
112
|
p.map(async (e) => {
|
|
89
113
|
this.init.logger.debug(
|
|
90
114
|
`[CommitGen#generate] [batching → task] ${e.tokens} tokens, ${e.languages?.join("/")}`
|
|
@@ -92,35 +116,35 @@ class U {
|
|
|
92
116
|
const a = this.init.promptCommitChangeset.replaceAll("{languages}", e.languages.join("/")).replaceAll("{input}", e.diff);
|
|
93
117
|
return this.fetchPrompt(a);
|
|
94
118
|
})
|
|
95
|
-
),
|
|
119
|
+
), A = performance.now() - G;
|
|
96
120
|
this.init.logger.info(
|
|
97
|
-
`[CommitGen#generate] [batching → changeset] (${(
|
|
121
|
+
`[CommitGen#generate] [batching → changeset] (${(A / 1e3).toFixed(2)}s)`
|
|
98
122
|
);
|
|
99
|
-
const
|
|
100
|
-
${
|
|
123
|
+
const T = performance.now(), b = `<changeset>
|
|
124
|
+
${_.flatMap((e) => e.match(/<changeset>([\s\S]*?)<\/changeset>/)?.[1]?.match(/<change.*?>.*?<\/change>/g) ?? []).join(`
|
|
101
125
|
`)}
|
|
102
|
-
</changeset>`,
|
|
103
|
-
this.init.promptCommitMessage.replaceAll("{input}",
|
|
104
|
-
),
|
|
126
|
+
</changeset>`, x = await this.fetchPrompt(
|
|
127
|
+
this.init.promptCommitMessage.replaceAll("{input}", b)
|
|
128
|
+
), M = performance.now() - T;
|
|
105
129
|
this.init.logger.info(
|
|
106
|
-
`[CommitGen#generate] [changeset → message] (${(
|
|
130
|
+
`[CommitGen#generate] [changeset → message] (${(M / 1e3).toFixed(2)}s)`
|
|
107
131
|
);
|
|
108
|
-
const i = D(
|
|
132
|
+
const i = D(x);
|
|
109
133
|
if (!i) return;
|
|
110
134
|
let o = i.subject;
|
|
111
135
|
if (this.init.task) {
|
|
112
136
|
const e = this.init.task.toString(), a = /^\d+$/.test(e) ? `#${e}` : e;
|
|
113
137
|
o = `${o} (${a})`;
|
|
114
138
|
}
|
|
115
|
-
const
|
|
139
|
+
const j = performance.now() - n;
|
|
116
140
|
return this.init.logger.info(
|
|
117
|
-
`[CommitGen#generate] [message → completed] (${(
|
|
141
|
+
`[CommitGen#generate] [message → completed] (${(j / 1e3).toFixed(2)}ms)`
|
|
118
142
|
), h === "oneline" ? `${i.type}: ${o} ${i.icon}` : `${i.type}: ${o} ${i.icon}
|
|
119
143
|
|
|
120
144
|
${i.description}`;
|
|
121
145
|
}
|
|
122
146
|
}
|
|
123
|
-
const C =
|
|
147
|
+
const C = v.join(S.homedir(), ".gennady_commit_cache.json"), c = process.cwd(), $ = I(), m = F(process.argv, {
|
|
124
148
|
apply: ["apply"],
|
|
125
149
|
mode: ["mode", "m"],
|
|
126
150
|
oneline: ["short", "one", "o"],
|
|
@@ -140,7 +164,7 @@ console.info(`- url: ${t.blue(r.apiUrl ?? "")}`);
|
|
|
140
164
|
console.info(t.gray("-".repeat(40)));
|
|
141
165
|
const s = (m.apply && $[c]) ?? await r.generate();
|
|
142
166
|
s || process.exit(0);
|
|
143
|
-
m.apply ? (
|
|
167
|
+
m.apply ? (P(`git commit -am "${String(s).replace(/(["`])/g, "\\$1")}"`, {
|
|
144
168
|
stdio: "inherit"
|
|
145
169
|
}), f({ [c]: void 0 })) : (console.info("-".repeat(40), `
|
|
146
170
|
`), console.info(t.whiteBright(String(s)), `
|