gsd-trae 1.0.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/.claude/settings.local.json +8 -0
- package/.gitmodules +6 -0
- package/.trae/project_rules.md +56 -0
- package/.trae/rules/project_rules.md +56 -0
- package/.vscode/code-counter/code-counter.db +0 -0
- package/.vscode/settings.json +5 -0
- package/README.md +193 -0
- package/bin/cli.js +13 -0
- package/install.sh +77 -0
- package/package.json +29 -0
- package/refs/gsd/.github/CODEOWNERS +2 -0
- package/refs/gsd/.github/FUNDING.yml +1 -0
- package/refs/gsd/.github/ISSUE_TEMPLATE/bug_report.yml +59 -0
- package/refs/gsd/.github/ISSUE_TEMPLATE/feature_request.yml +37 -0
- package/refs/gsd/.github/pull_request_template.md +24 -0
- package/refs/gsd/.github/workflows/auto-label-issues.yml +21 -0
- package/refs/gsd/CHANGELOG.md +1520 -0
- package/refs/gsd/LICENSE +21 -0
- package/refs/gsd/README.md +704 -0
- package/refs/gsd/SECURITY.md +33 -0
- package/refs/gsd/agents/gsd-codebase-mapper.md +764 -0
- package/refs/gsd/agents/gsd-debugger.md +1246 -0
- package/refs/gsd/agents/gsd-executor.md +469 -0
- package/refs/gsd/agents/gsd-integration-checker.md +443 -0
- package/refs/gsd/agents/gsd-phase-researcher.md +546 -0
- package/refs/gsd/agents/gsd-plan-checker.md +690 -0
- package/refs/gsd/agents/gsd-planner.md +1275 -0
- package/refs/gsd/agents/gsd-project-researcher.md +621 -0
- package/refs/gsd/agents/gsd-research-synthesizer.md +239 -0
- package/refs/gsd/agents/gsd-roadmapper.md +642 -0
- package/refs/gsd/agents/gsd-verifier.md +573 -0
- package/refs/gsd/assets/gsd-logo-2000-transparent.png +0 -0
- package/refs/gsd/assets/gsd-logo-2000-transparent.svg +17 -0
- package/refs/gsd/assets/gsd-logo-2000.png +0 -0
- package/refs/gsd/assets/gsd-logo-2000.svg +21 -0
- package/refs/gsd/assets/terminal.svg +68 -0
- package/refs/gsd/bin/install.js +2090 -0
- package/refs/gsd/commands/gsd/add-phase.md +43 -0
- package/refs/gsd/commands/gsd/add-tests.md +41 -0
- package/refs/gsd/commands/gsd/add-todo.md +47 -0
- package/refs/gsd/commands/gsd/audit-milestone.md +36 -0
- package/refs/gsd/commands/gsd/check-todos.md +45 -0
- package/refs/gsd/commands/gsd/cleanup.md +18 -0
- package/refs/gsd/commands/gsd/complete-milestone.md +136 -0
- package/refs/gsd/commands/gsd/debug.md +167 -0
- package/refs/gsd/commands/gsd/discuss-phase.md +83 -0
- package/refs/gsd/commands/gsd/execute-phase.md +41 -0
- package/refs/gsd/commands/gsd/health.md +22 -0
- package/refs/gsd/commands/gsd/help.md +22 -0
- package/refs/gsd/commands/gsd/insert-phase.md +32 -0
- package/refs/gsd/commands/gsd/join-discord.md +18 -0
- package/refs/gsd/commands/gsd/list-phase-assumptions.md +46 -0
- package/refs/gsd/commands/gsd/map-codebase.md +71 -0
- package/refs/gsd/commands/gsd/new-milestone.md +44 -0
- package/refs/gsd/commands/gsd/new-project.md +42 -0
- package/refs/gsd/commands/gsd/new-project.md.bak +1041 -0
- package/refs/gsd/commands/gsd/pause-work.md +38 -0
- package/refs/gsd/commands/gsd/plan-milestone-gaps.md +34 -0
- package/refs/gsd/commands/gsd/plan-phase.md +45 -0
- package/refs/gsd/commands/gsd/progress.md +24 -0
- package/refs/gsd/commands/gsd/quick.md +41 -0
- package/refs/gsd/commands/gsd/reapply-patches.md +110 -0
- package/refs/gsd/commands/gsd/remove-phase.md +31 -0
- package/refs/gsd/commands/gsd/research-phase.md +189 -0
- package/refs/gsd/commands/gsd/resume-work.md +40 -0
- package/refs/gsd/commands/gsd/set-profile.md +34 -0
- package/refs/gsd/commands/gsd/settings.md +36 -0
- package/refs/gsd/commands/gsd/update.md +37 -0
- package/refs/gsd/commands/gsd/verify-work.md +38 -0
- package/refs/gsd/docs/USER-GUIDE.md +471 -0
- package/refs/gsd/docs/context-monitor.md +96 -0
- package/refs/gsd/get-shit-done/bin/gsd-tools.cjs +585 -0
- package/refs/gsd/get-shit-done/bin/lib/commands.cjs +553 -0
- package/refs/gsd/get-shit-done/bin/lib/config.cjs +162 -0
- package/refs/gsd/get-shit-done/bin/lib/core.cjs +411 -0
- package/refs/gsd/get-shit-done/bin/lib/frontmatter.cjs +299 -0
- package/refs/gsd/get-shit-done/bin/lib/init.cjs +710 -0
- package/refs/gsd/get-shit-done/bin/lib/milestone.cjs +215 -0
- package/refs/gsd/get-shit-done/bin/lib/phase.cjs +870 -0
- package/refs/gsd/get-shit-done/bin/lib/roadmap.cjs +298 -0
- package/refs/gsd/get-shit-done/bin/lib/state.cjs +521 -0
- package/refs/gsd/get-shit-done/bin/lib/template.cjs +222 -0
- package/refs/gsd/get-shit-done/bin/lib/verify.cjs +772 -0
- package/refs/gsd/get-shit-done/references/checkpoints.md +776 -0
- package/refs/gsd/get-shit-done/references/continuation-format.md +249 -0
- package/refs/gsd/get-shit-done/references/decimal-phase-calculation.md +65 -0
- package/refs/gsd/get-shit-done/references/git-integration.md +248 -0
- package/refs/gsd/get-shit-done/references/git-planning-commit.md +38 -0
- package/refs/gsd/get-shit-done/references/model-profile-resolution.md +34 -0
- package/refs/gsd/get-shit-done/references/model-profiles.md +92 -0
- package/refs/gsd/get-shit-done/references/phase-argument-parsing.md +61 -0
- package/refs/gsd/get-shit-done/references/planning-config.md +196 -0
- package/refs/gsd/get-shit-done/references/questioning.md +145 -0
- package/refs/gsd/get-shit-done/references/tdd.md +263 -0
- package/refs/gsd/get-shit-done/references/ui-brand.md +160 -0
- package/refs/gsd/get-shit-done/references/verification-patterns.md +612 -0
- package/refs/gsd/get-shit-done/templates/DEBUG.md +164 -0
- package/refs/gsd/get-shit-done/templates/UAT.md +247 -0
- package/refs/gsd/get-shit-done/templates/VALIDATION.md +76 -0
- package/refs/gsd/get-shit-done/templates/codebase/architecture.md +255 -0
- package/refs/gsd/get-shit-done/templates/codebase/concerns.md +310 -0
- package/refs/gsd/get-shit-done/templates/codebase/conventions.md +307 -0
- package/refs/gsd/get-shit-done/templates/codebase/integrations.md +280 -0
- package/refs/gsd/get-shit-done/templates/codebase/stack.md +186 -0
- package/refs/gsd/get-shit-done/templates/codebase/structure.md +285 -0
- package/refs/gsd/get-shit-done/templates/codebase/testing.md +480 -0
- package/refs/gsd/get-shit-done/templates/config.json +37 -0
- package/refs/gsd/get-shit-done/templates/context.md +283 -0
- package/refs/gsd/get-shit-done/templates/continue-here.md +78 -0
- package/refs/gsd/get-shit-done/templates/debug-subagent-prompt.md +91 -0
- package/refs/gsd/get-shit-done/templates/discovery.md +146 -0
- package/refs/gsd/get-shit-done/templates/milestone-archive.md +123 -0
- package/refs/gsd/get-shit-done/templates/milestone.md +115 -0
- package/refs/gsd/get-shit-done/templates/phase-prompt.md +569 -0
- package/refs/gsd/get-shit-done/templates/planner-subagent-prompt.md +117 -0
- package/refs/gsd/get-shit-done/templates/project.md +184 -0
- package/refs/gsd/get-shit-done/templates/requirements.md +231 -0
- package/refs/gsd/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
- package/refs/gsd/get-shit-done/templates/research-project/FEATURES.md +147 -0
- package/refs/gsd/get-shit-done/templates/research-project/PITFALLS.md +200 -0
- package/refs/gsd/get-shit-done/templates/research-project/STACK.md +120 -0
- package/refs/gsd/get-shit-done/templates/research-project/SUMMARY.md +170 -0
- package/refs/gsd/get-shit-done/templates/research.md +552 -0
- package/refs/gsd/get-shit-done/templates/retrospective.md +54 -0
- package/refs/gsd/get-shit-done/templates/roadmap.md +202 -0
- package/refs/gsd/get-shit-done/templates/state.md +176 -0
- package/refs/gsd/get-shit-done/templates/summary-complex.md +59 -0
- package/refs/gsd/get-shit-done/templates/summary-minimal.md +41 -0
- package/refs/gsd/get-shit-done/templates/summary-standard.md +48 -0
- package/refs/gsd/get-shit-done/templates/summary.md +248 -0
- package/refs/gsd/get-shit-done/templates/user-setup.md +311 -0
- package/refs/gsd/get-shit-done/templates/verification-report.md +322 -0
- package/refs/gsd/get-shit-done/workflows/add-phase.md +111 -0
- package/refs/gsd/get-shit-done/workflows/add-tests.md +350 -0
- package/refs/gsd/get-shit-done/workflows/add-todo.md +157 -0
- package/refs/gsd/get-shit-done/workflows/audit-milestone.md +297 -0
- package/refs/gsd/get-shit-done/workflows/check-todos.md +176 -0
- package/refs/gsd/get-shit-done/workflows/cleanup.md +152 -0
- package/refs/gsd/get-shit-done/workflows/complete-milestone.md +763 -0
- package/refs/gsd/get-shit-done/workflows/diagnose-issues.md +219 -0
- package/refs/gsd/get-shit-done/workflows/discovery-phase.md +289 -0
- package/refs/gsd/get-shit-done/workflows/discuss-phase.md +542 -0
- package/refs/gsd/get-shit-done/workflows/execute-phase.md +449 -0
- package/refs/gsd/get-shit-done/workflows/execute-plan.md +448 -0
- package/refs/gsd/get-shit-done/workflows/health.md +156 -0
- package/refs/gsd/get-shit-done/workflows/help.md +489 -0
- package/refs/gsd/get-shit-done/workflows/insert-phase.md +129 -0
- package/refs/gsd/get-shit-done/workflows/list-phase-assumptions.md +178 -0
- package/refs/gsd/get-shit-done/workflows/map-codebase.md +315 -0
- package/refs/gsd/get-shit-done/workflows/new-milestone.md +382 -0
- package/refs/gsd/get-shit-done/workflows/new-project.md +1116 -0
- package/refs/gsd/get-shit-done/workflows/pause-work.md +122 -0
- package/refs/gsd/get-shit-done/workflows/plan-milestone-gaps.md +274 -0
- package/refs/gsd/get-shit-done/workflows/plan-phase.md +569 -0
- package/refs/gsd/get-shit-done/workflows/progress.md +381 -0
- package/refs/gsd/get-shit-done/workflows/quick.md +453 -0
- package/refs/gsd/get-shit-done/workflows/remove-phase.md +154 -0
- package/refs/gsd/get-shit-done/workflows/research-phase.md +73 -0
- package/refs/gsd/get-shit-done/workflows/resume-project.md +306 -0
- package/refs/gsd/get-shit-done/workflows/set-profile.md +80 -0
- package/refs/gsd/get-shit-done/workflows/settings.md +213 -0
- package/refs/gsd/get-shit-done/workflows/transition.md +544 -0
- package/refs/gsd/get-shit-done/workflows/update.md +219 -0
- package/refs/gsd/get-shit-done/workflows/verify-phase.md +242 -0
- package/refs/gsd/get-shit-done/workflows/verify-work.md +569 -0
- package/refs/gsd/hooks/gsd-check-update.js +62 -0
- package/refs/gsd/hooks/gsd-context-monitor.js +122 -0
- package/refs/gsd/hooks/gsd-statusline.js +108 -0
- package/refs/gsd/package.json +50 -0
- package/refs/gsd/scripts/build-hooks.js +43 -0
- package/refs/gsd/tests/commands.test.cjs +661 -0
- package/refs/gsd/tests/helpers.cjs +40 -0
- package/refs/gsd/tests/init.test.cjs +205 -0
- package/refs/gsd/tests/milestone.test.cjs +98 -0
- package/refs/gsd/tests/phase.test.cjs +1241 -0
- package/refs/gsd/tests/roadmap.test.cjs +265 -0
- package/refs/gsd/tests/state.test.cjs +302 -0
- package/refs/gsd/tests/verify.test.cjs +80 -0
- package/refs/vbenchmark/.agent/agents/codebase-explorer.md +224 -0
- package/refs/vbenchmark/.agent/agents/debugger.md +180 -0
- package/refs/vbenchmark/.agent/agents/documenter.md +166 -0
- package/refs/vbenchmark/.agent/agents/implementer.md +70 -0
- package/refs/vbenchmark/.agent/agents/orchestrator.md +212 -0
- package/refs/vbenchmark/.agent/agents/researcher.md +80 -0
- package/refs/vbenchmark/.agent/agents/reviewer.md +184 -0
- package/refs/vbenchmark/.agent/agents/tester.md +170 -0
- package/refs/vbenchmark/.agent/commands/commit.md +29 -0
- package/refs/vbenchmark/.agent/commands/debug.md +59 -0
- package/refs/vbenchmark/.agent/commands/document.md +52 -0
- package/refs/vbenchmark/.agent/commands/gather-context.md +58 -0
- package/refs/vbenchmark/.agent/commands/init.md +56 -0
- package/refs/vbenchmark/.agent/commands/preset-help.md +50 -0
- package/refs/vbenchmark/.agent/commands/refactor.md +71 -0
- package/refs/vbenchmark/.agent/commands/research.md +37 -0
- package/refs/vbenchmark/.agent/commands/review.md +38 -0
- package/refs/vbenchmark/.agent/commands/test.md +61 -0
- package/refs/vbenchmark/.agent/rules/01-code-quality.md +33 -0
- package/refs/vbenchmark/.agent/rules/02-typescript-go.md +46 -0
- package/refs/vbenchmark/.agent/rules/03-security-git.md +34 -0
- package/refs/vbenchmark/.agent/rules/04-architecture.md +40 -0
- package/refs/vbenchmark/.agent/sync.js +536 -0
- package/refs/vbenchmark/.agent/workflows/commit.md +29 -0
- package/refs/vbenchmark/.agent/workflows/debug.md +59 -0
- package/refs/vbenchmark/.agent/workflows/document.md +52 -0
- package/refs/vbenchmark/.agent/workflows/gather-context.md +58 -0
- package/refs/vbenchmark/.agent/workflows/init.md +56 -0
- package/refs/vbenchmark/.agent/workflows/preset-help.md +50 -0
- package/refs/vbenchmark/.agent/workflows/refactor.md +71 -0
- package/refs/vbenchmark/.agent/workflows/research.md +37 -0
- package/refs/vbenchmark/.agent/workflows/review.md +38 -0
- package/refs/vbenchmark/.agent/workflows/test.md +61 -0
- package/refs/vbenchmark/.claude/commands/agentic-dev/apply.md +222 -0
- package/refs/vbenchmark/.claude/commands/agentic-dev/done.md +166 -0
- package/refs/vbenchmark/.claude/commands/agentic-dev/proposal.md +220 -0
- package/refs/vbenchmark/.claude/commands/openspec/apply.md +23 -0
- package/refs/vbenchmark/.claude/commands/openspec/archive.md +27 -0
- package/refs/vbenchmark/.claude/commands/openspec/proposal.md +28 -0
- package/refs/vbenchmark/.clinerules/01-rules.md +73 -0
- package/refs/vbenchmark/.clinerules/02-agents.md +34 -0
- package/refs/vbenchmark/.cursor/commands/commit.md +29 -0
- package/refs/vbenchmark/.cursor/commands/debug.md +59 -0
- package/refs/vbenchmark/.cursor/commands/document.md +52 -0
- package/refs/vbenchmark/.cursor/commands/gather-context.md +58 -0
- package/refs/vbenchmark/.cursor/commands/init.md +56 -0
- package/refs/vbenchmark/.cursor/commands/preset-help.md +50 -0
- package/refs/vbenchmark/.cursor/commands/refactor.md +71 -0
- package/refs/vbenchmark/.cursor/commands/research.md +37 -0
- package/refs/vbenchmark/.cursor/commands/review.md +38 -0
- package/refs/vbenchmark/.cursor/commands/test.md +61 -0
- package/refs/vbenchmark/.cursor/rules/agents.mdc +1357 -0
- package/refs/vbenchmark/.factory/droids/codebase-explorer.md +224 -0
- package/refs/vbenchmark/.factory/droids/debugger.md +180 -0
- package/refs/vbenchmark/.factory/droids/documenter.md +166 -0
- package/refs/vbenchmark/.factory/droids/implementer.md +70 -0
- package/refs/vbenchmark/.factory/droids/orchestrator.md +212 -0
- package/refs/vbenchmark/.factory/droids/researcher.md +80 -0
- package/refs/vbenchmark/.factory/droids/reviewer.md +184 -0
- package/refs/vbenchmark/.factory/droids/tester.md +170 -0
- package/refs/vbenchmark/.gemini/workflows/commit.md +29 -0
- package/refs/vbenchmark/.gemini/workflows/debug.md +59 -0
- package/refs/vbenchmark/.gemini/workflows/document.md +52 -0
- package/refs/vbenchmark/.gemini/workflows/gather-context.md +58 -0
- package/refs/vbenchmark/.gemini/workflows/init.md +56 -0
- package/refs/vbenchmark/.gemini/workflows/preset-help.md +50 -0
- package/refs/vbenchmark/.gemini/workflows/refactor.md +71 -0
- package/refs/vbenchmark/.gemini/workflows/research.md +37 -0
- package/refs/vbenchmark/.gemini/workflows/review.md +38 -0
- package/refs/vbenchmark/.gemini/workflows/test.md +61 -0
- package/refs/vbenchmark/.github/CODEOWNERS +20 -0
- package/refs/vbenchmark/.github/FUNDING.yml +4 -0
- package/refs/vbenchmark/.github/ISSUE_TEMPLATE/bug-report.yml +76 -0
- package/refs/vbenchmark/.github/ISSUE_TEMPLATE/new-task.yml +106 -0
- package/refs/vbenchmark/.github/PULL_REQUEST_TEMPLATE.md +38 -0
- package/refs/vbenchmark/.github/copilot-instructions.md +73 -0
- package/refs/vbenchmark/.github/workflows/ci.yaml +33 -0
- package/refs/vbenchmark/.github/workflows/vercel-auto-pr.yml +478 -0
- package/refs/vbenchmark/.github/workflows/vercel-deploy.yaml +487 -0
- package/refs/vbenchmark/.github/workflows/vercel-pr-command.yaml +337 -0
- package/refs/vbenchmark/.github/workflows/vercel-project-init.yaml +208 -0
- package/refs/vbenchmark/.opencode/agent/codebase-explorer.md +224 -0
- package/refs/vbenchmark/.opencode/agent/debugger.md +180 -0
- package/refs/vbenchmark/.opencode/agent/documenter.md +166 -0
- package/refs/vbenchmark/.opencode/agent/implementer.md +70 -0
- package/refs/vbenchmark/.opencode/agent/orchestrator.md +212 -0
- package/refs/vbenchmark/.opencode/agent/researcher.md +80 -0
- package/refs/vbenchmark/.opencode/agent/reviewer.md +184 -0
- package/refs/vbenchmark/.opencode/agent/tester.md +170 -0
- package/refs/vbenchmark/.opencode/command/commit.md +29 -0
- package/refs/vbenchmark/.opencode/command/debug.md +59 -0
- package/refs/vbenchmark/.opencode/command/document.md +52 -0
- package/refs/vbenchmark/.opencode/command/gather-context.md +58 -0
- package/refs/vbenchmark/.opencode/command/init.md +56 -0
- package/refs/vbenchmark/.opencode/command/preset-help.md +50 -0
- package/refs/vbenchmark/.opencode/command/refactor.md +71 -0
- package/refs/vbenchmark/.opencode/command/research.md +37 -0
- package/refs/vbenchmark/.opencode/command/review.md +38 -0
- package/refs/vbenchmark/.opencode/command/test.md +61 -0
- package/refs/vbenchmark/.trae/project_rules.md +73 -0
- package/refs/vbenchmark/.windsurf/rules/rules.md +85 -0
- package/refs/vbenchmark/AGENTS.md +73 -0
- package/refs/vbenchmark/CONTRIBUTING.md +332 -0
- package/refs/vbenchmark/Caddyfile +3 -0
- package/refs/vbenchmark/LICENSE +47 -0
- package/refs/vbenchmark/README.md +354 -0
- package/refs/vbenchmark/docker-compose.prod.yaml +35 -0
- package/refs/vbenchmark/docker-compose.yaml +53 -0
- package/refs/vbenchmark/docs/TASK_EXPANSION_PLAN.md +211 -0
- package/refs/vbenchmark/docs/THESIS.md +441 -0
- package/refs/vbenchmark/docs/categories/code-evolution.md +138 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/design.md +111 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/proposal.md +15 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/specs/evaluation/spec.md +105 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/specs/leaderboard/spec.md +68 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/specs/task-definition/spec.md +45 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/specs/task-runner/spec.md +49 -0
- package/refs/vbenchmark/openspec/changes/init-vibecodingbench/tasks.md +413 -0
- package/refs/vbenchmark/package.json +51 -0
- package/refs/vbenchmark/packages/cli/eslint.config.js +16 -0
- package/refs/vbenchmark/packages/cli/package.json +35 -0
- package/refs/vbenchmark/packages/cli/src/agents/index.ts +655 -0
- package/refs/vbenchmark/packages/cli/src/commands/eval.ts +197 -0
- package/refs/vbenchmark/packages/cli/src/commands/list.ts +63 -0
- package/refs/vbenchmark/packages/cli/src/commands/run.ts +147 -0
- package/refs/vbenchmark/packages/cli/src/evaluator.ts +125 -0
- package/refs/vbenchmark/packages/cli/src/index.ts +21 -0
- package/refs/vbenchmark/packages/cli/src/lib/task-variation.ts +153 -0
- package/refs/vbenchmark/packages/cli/src/loader.ts +258 -0
- package/refs/vbenchmark/packages/cli/src/reporter.ts +222 -0
- package/refs/vbenchmark/packages/cli/src/runtime/docker.ts +385 -0
- package/refs/vbenchmark/packages/cli/tsconfig.json +8 -0
- package/refs/vbenchmark/packages/dashboard/Dockerfile +42 -0
- package/refs/vbenchmark/packages/dashboard/index.html +21 -0
- package/refs/vbenchmark/packages/dashboard/package.json +29 -0
- package/refs/vbenchmark/packages/dashboard/postcss.config.js +6 -0
- package/refs/vbenchmark/packages/dashboard/public/favicon.svg +24 -0
- package/refs/vbenchmark/packages/dashboard/public/logo.png +0 -0
- package/refs/vbenchmark/packages/dashboard/public/logo.svg +39 -0
- package/refs/vbenchmark/packages/dashboard/src/App.tsx +1468 -0
- package/refs/vbenchmark/packages/dashboard/src/data/category-performance.json +1 -0
- package/refs/vbenchmark/packages/dashboard/src/data/leaderboard.json +1 -0
- package/refs/vbenchmark/packages/dashboard/src/data/task-results.json +1 -0
- package/refs/vbenchmark/packages/dashboard/src/data/tasks.json +1 -0
- package/refs/vbenchmark/packages/dashboard/src/index.css +3 -0
- package/refs/vbenchmark/packages/dashboard/src/main.tsx +13 -0
- package/refs/vbenchmark/packages/dashboard/src/vite-env.d.ts +9 -0
- package/refs/vbenchmark/packages/dashboard/tailwind.config.js +11 -0
- package/refs/vbenchmark/packages/dashboard/tsconfig.json +21 -0
- package/refs/vbenchmark/packages/dashboard/tsconfig.node.json +11 -0
- package/refs/vbenchmark/packages/dashboard/vercel.json +6 -0
- package/refs/vbenchmark/packages/dashboard/vite.config.ts +28 -0
- package/refs/vbenchmark/packages/evaluator/eslint.config.js +16 -0
- package/refs/vbenchmark/packages/evaluator/package.json +24 -0
- package/refs/vbenchmark/packages/evaluator/src/index.ts +15 -0
- package/refs/vbenchmark/packages/evaluator/src/runners/functional.ts +88 -0
- package/refs/vbenchmark/packages/evaluator/src/runners/quality.ts +140 -0
- package/refs/vbenchmark/packages/evaluator/src/runners/security.ts +94 -0
- package/refs/vbenchmark/packages/evaluator/src/runners/visual.ts +108 -0
- package/refs/vbenchmark/packages/evaluator/src/types.d.ts +19 -0
- package/refs/vbenchmark/packages/evaluator/tsconfig.json +8 -0
- package/refs/vbenchmark/packages/leaderboard/Dockerfile +38 -0
- package/refs/vbenchmark/packages/leaderboard/drizzle.config.ts +10 -0
- package/refs/vbenchmark/packages/leaderboard/eslint.config.js +16 -0
- package/refs/vbenchmark/packages/leaderboard/fly.toml +29 -0
- package/refs/vbenchmark/packages/leaderboard/package.json +36 -0
- package/refs/vbenchmark/packages/leaderboard/src/app.ts +29 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/BrowserPreview.tsx +190 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/ComparisonView.tsx +205 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/LeaderboardTable.tsx +150 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/LiveRunCard.tsx +133 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/SubmissionForm.tsx +406 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/SubmitForm.tsx +293 -0
- package/refs/vbenchmark/packages/leaderboard/src/components/TerminalStream.tsx +111 -0
- package/refs/vbenchmark/packages/leaderboard/src/config/pricing.ts +206 -0
- package/refs/vbenchmark/packages/leaderboard/src/db/index.ts +31 -0
- package/refs/vbenchmark/packages/leaderboard/src/db/schema.ts +125 -0
- package/refs/vbenchmark/packages/leaderboard/src/index.ts +13 -0
- package/refs/vbenchmark/packages/leaderboard/src/lib/websocket.ts +124 -0
- package/refs/vbenchmark/packages/leaderboard/src/routes/leaderboard.ts +698 -0
- package/refs/vbenchmark/packages/leaderboard/src/routes/live.ts +175 -0
- package/refs/vbenchmark/packages/leaderboard/src/routes/submissions.ts +183 -0
- package/refs/vbenchmark/packages/leaderboard/src/routes/tasks.ts +215 -0
- package/refs/vbenchmark/packages/leaderboard/tests/api.test.ts +228 -0
- package/refs/vbenchmark/packages/leaderboard/tsconfig.json +9 -0
- package/refs/vbenchmark/scripts/deploy.sh +70 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/context-management/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/context-management/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/evaluation-framework/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/evaluation-framework/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/guardrails-safety/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/guardrails-safety/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/memory-system/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/memory-system/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/model-routing/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/model-routing/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/multi-agent-system/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/multi-agent-system/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/prompt-optimization/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/prompt-optimization/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/reasoning-chain/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/reasoning-chain/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/streaming-pipeline/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/streaming-pipeline/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/tool-use-orchestration/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/ai-integration/advanced/tool-use-orchestration/task.yaml +16 -0
- package/refs/vbenchmark/tasks/ai-integration/agents/code-review-agent/PROMPT.md +64 -0
- package/refs/vbenchmark/tasks/ai-integration/agents/code-review-agent/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/agents/research-agent/PROMPT.md +61 -0
- package/refs/vbenchmark/tasks/ai-integration/agents/research-agent/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/agents/web-scraper-agent/PROMPT.md +57 -0
- package/refs/vbenchmark/tasks/ai-integration/agents/web-scraper-agent/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/embeddings/duplicate-detection/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/ai-integration/embeddings/duplicate-detection/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/embeddings/recommendation-engine/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/ai-integration/embeddings/recommendation-engine/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/embeddings/semantic-search/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/ai-integration/embeddings/semantic-search/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/fine-tuning/classification-model/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/ai-integration/fine-tuning/classification-model/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/function-calling/api-orchestrator/PROMPT.md +60 -0
- package/refs/vbenchmark/tasks/ai-integration/function-calling/api-orchestrator/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/function-calling/calendar-assistant/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/ai-integration/function-calling/calendar-assistant/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/function-calling/database-query/PROMPT.md +62 -0
- package/refs/vbenchmark/tasks/ai-integration/function-calling/database-query/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/multimodal/chart-interpreter/PROMPT.md +60 -0
- package/refs/vbenchmark/tasks/ai-integration/multimodal/chart-interpreter/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/multimodal/image-captioning/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/ai-integration/multimodal/image-captioning/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/code-assistant/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/code-assistant/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/doc-search/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/doc-search/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/pdf-qa/PROMPT.md +76 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/pdf-qa/docker-compose.yaml +30 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/pdf-qa/task.yaml +30 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/pdf-qa/tests/functional/qa.test.py +146 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/support-bot/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/support-bot/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/contract-analyzer/PROMPT.md +67 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/contract-analyzer/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/invoice-parser/PROMPT.md +61 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/invoice-parser/task.yaml +27 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/receipt-scanner/PROMPT.md +65 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/receipt-scanner/task.yaml +24 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/resume-parser/PROMPT.md +70 -0
- package/refs/vbenchmark/tasks/ai-integration/structured-output/resume-parser/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/api-analytics/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/api-analytics/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/api-gateway/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/api-gateway/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/api-mocking/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/api-mocking/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/contract-testing/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/contract-testing/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/graphql-federation/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/graphql-federation/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/grpc-gateway/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/grpc-gateway/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/rate-limiter/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/rate-limiter/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/request-validator/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/request-validator/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/sdk-generator/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/sdk-generator/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/webhook-processor/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/api-integrations/advanced/webhook-processor/task.yaml +16 -0
- package/refs/vbenchmark/tasks/api-integrations/analytics/mixpanel-events/PROMPT.md +42 -0
- package/refs/vbenchmark/tasks/api-integrations/analytics/mixpanel-events/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/analytics/segment-tracking/PROMPT.md +42 -0
- package/refs/vbenchmark/tasks/api-integrations/analytics/segment-tracking/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/auth-provider/oauth2-github/PROMPT.md +42 -0
- package/refs/vbenchmark/tasks/api-integrations/auth-provider/oauth2-github/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/auth-provider/okta-integration/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/api-integrations/auth-provider/okta-integration/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/auth-provider/saml-sso/PROMPT.md +42 -0
- package/refs/vbenchmark/tasks/api-integrations/auth-provider/saml-sso/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/communication/discord-webhook/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/api-integrations/communication/discord-webhook/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/communication/slack-bot/PROMPT.md +42 -0
- package/refs/vbenchmark/tasks/api-integrations/communication/slack-bot/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/communication/twilio-sms/PROMPT.md +42 -0
- package/refs/vbenchmark/tasks/api-integrations/communication/twilio-sms/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/email/transactional/PROMPT.md +82 -0
- package/refs/vbenchmark/tasks/api-integrations/email/transactional/task.yaml +27 -0
- package/refs/vbenchmark/tasks/api-integrations/maps/google-maps-geocoding/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/maps/google-maps-geocoding/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/maps/mapbox-directions/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/maps/mapbox-directions/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/payment/crypto-payments/PROMPT.md +43 -0
- package/refs/vbenchmark/tasks/api-integrations/payment/crypto-payments/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/payment/paypal-integration/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/payment/paypal-integration/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/social/twitter-api/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/social/twitter-api/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/storage/cloudinary-upload/PROMPT.md +43 -0
- package/refs/vbenchmark/tasks/api-integrations/storage/cloudinary-upload/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/storage/gcs-streaming/PROMPT.md +43 -0
- package/refs/vbenchmark/tasks/api-integrations/storage/gcs-streaming/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/storage/s3-presigned-urls/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/storage/s3-presigned-urls/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/checkout-session/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/checkout-session/task.yaml +24 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/payment-webhook/PROMPT.md +60 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/payment-webhook/docker-compose.yaml +38 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/payment-webhook/task.yaml +31 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/payment-webhook/tests/webhook.test.ts +193 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/subscription-portal/PROMPT.md +41 -0
- package/refs/vbenchmark/tasks/api-integrations/stripe/subscription-portal/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/api-deprecation/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/api-deprecation/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/ast-refactoring/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/ast-refactoring/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/concurrency-fix/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/concurrency-fix/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/database-schema-migration/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/database-schema-migration/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/dead-code-elimination/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/dead-code-elimination/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/dependency-upgrade/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/dependency-upgrade/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/memory-optimization/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/memory-optimization/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/monorepo-extraction/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/monorepo-extraction/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/performance-profiling/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/performance-profiling/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/type-migration/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/code-evolution/advanced/type-migration/task.yaml +16 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/callback-to-async/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/callback-to-async/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/express-to-fastify/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/express-to-fastify/base-code/src/app.ts +22 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/express-to-fastify/task.yaml +37 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/express-to-fastify/tests/api.test.ts +70 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/flask-to-fastapi/PROMPT.md +46 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/flask-to-fastapi/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/java-to-kotlin/PROMPT.md +45 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/java-to-kotlin/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/jquery-to-react/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/jquery-to-react/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/rest-to-grpc/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/legacy-migration/rest-to-grpc/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/performance/async-refactor/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/performance/async-refactor/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/performance/memory-leak-fix/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/performance/memory-leak-fix/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/performance/query-optimization/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/code-evolution/performance/query-optimization/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/class-to-hooks/PROMPT.md +96 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/class-to-hooks/task.yaml +27 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/dependency-injection/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/dependency-injection/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/error-handling/PROMPT.md +48 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/error-handling/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/monolith-to-modules/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/monolith-to-modules/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/orm-migration/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/refactoring/orm-migration/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/security/secrets-rotation/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/code-evolution/security/secrets-rotation/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/security/sql-injection-fix/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/code-evolution/security/sql-injection-fix/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/security/xss-prevention/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/security/xss-prevention/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/testing/add-unit-tests/PROMPT.md +48 -0
- package/refs/vbenchmark/tasks/code-evolution/testing/add-unit-tests/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/testing/e2e-playwright/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/code-evolution/testing/e2e-playwright/task.yaml +24 -0
- package/refs/vbenchmark/tasks/code-evolution/testing/pytest-fixtures/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/code-evolution/testing/pytest-fixtures/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/accessibility/keyboard-shortcuts/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/frontend/accessibility/keyboard-shortcuts/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/accessibility/screen-reader-nav/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/frontend/accessibility/screen-reader-nav/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/advanced/canvas-editor/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/canvas-editor/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/micro-frontend/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/micro-frontend/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/offline-first/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/offline-first/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/realtime-collab/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/realtime-collab/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/service-worker/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/service-worker/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/state-machine/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/state-machine/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/virtual-list/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/virtual-list/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/wasm-integration/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/wasm-integration/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/web-worker/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/web-worker/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/advanced/webgl-visualization/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/frontend/advanced/webgl-visualization/task.yaml +16 -0
- package/refs/vbenchmark/tasks/frontend/animation/page-transitions/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/frontend/animation/page-transitions/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/components/data-grid/PROMPT.md +59 -0
- package/refs/vbenchmark/tasks/frontend/components/data-grid/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/components/date-range-picker/PROMPT.md +57 -0
- package/refs/vbenchmark/tasks/frontend/components/date-range-picker/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/components/file-uploader/PROMPT.md +55 -0
- package/refs/vbenchmark/tasks/frontend/components/file-uploader/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/components/form-builder/PROMPT.md +96 -0
- package/refs/vbenchmark/tasks/frontend/components/form-builder/task.yaml +28 -0
- package/refs/vbenchmark/tasks/frontend/components/rich-text-editor/PROMPT.md +45 -0
- package/refs/vbenchmark/tasks/frontend/components/rich-text-editor/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/dashboard-layout/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/dashboard-layout/task.yaml +25 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/landing-page/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/landing-page/task.yaml +25 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/mobile-app-screen/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/mobile-app-screen/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/PROMPT.md +93 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/docker-compose.yaml +23 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/task.yaml +30 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/tests/visual/diff.test.ts +107 -0
- package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/tests/visual/interaction.test.ts +88 -0
- package/refs/vbenchmark/tasks/frontend/performance/image-lazy-load/PROMPT.md +43 -0
- package/refs/vbenchmark/tasks/frontend/performance/image-lazy-load/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/performance/infinite-scroll/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/frontend/performance/infinite-scroll/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/state-management/collaborative-editor/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/frontend/state-management/collaborative-editor/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/state-management/shopping-cart/PROMPT.md +53 -0
- package/refs/vbenchmark/tasks/frontend/state-management/shopping-cart/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/visualization/chart-dashboard/PROMPT.md +83 -0
- package/refs/vbenchmark/tasks/frontend/visualization/chart-dashboard/task.yaml +28 -0
- package/refs/vbenchmark/tasks/frontend/visualization/gantt-chart/PROMPT.md +57 -0
- package/refs/vbenchmark/tasks/frontend/visualization/gantt-chart/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/visualization/map-dashboard/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/frontend/visualization/map-dashboard/task.yaml +24 -0
- package/refs/vbenchmark/tasks/frontend/visualization/realtime-charts/PROMPT.md +43 -0
- package/refs/vbenchmark/tasks/frontend/visualization/realtime-charts/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/blue-green-deploy/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/blue-green-deploy/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/canary-release/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/canary-release/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/change-data-capture/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/change-data-capture/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/config-management/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/config-management/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/data-pipeline/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/data-pipeline/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/distributed-tracing/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/distributed-tracing/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/log-aggregation/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/log-aggregation/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/schema-registry/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/schema-registry/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/secret-rotation/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/secret-rotation/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/stream-processing/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/glue-code/advanced/stream-processing/task.yaml +16 -0
- package/refs/vbenchmark/tasks/glue-code/api-sync/rest-to-graphql/PROMPT.md +66 -0
- package/refs/vbenchmark/tasks/glue-code/api-sync/rest-to-graphql/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/caching/redis-cache/PROMPT.md +82 -0
- package/refs/vbenchmark/tasks/glue-code/caching/redis-cache/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/avro-schema-evolution/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/avro-schema-evolution/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/csv-normalizer/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/csv-normalizer/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/excel-to-json/PROMPT.md +67 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/excel-to-json/task.yaml +28 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/excel-to-json/tests/transform.test.py +137 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/json-to-xml/PROMPT.md +45 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/json-to-xml/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/protobuf-converter/PROMPT.md +44 -0
- package/refs/vbenchmark/tasks/glue-code/data-transform/protobuf-converter/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/etl/cdc-pipeline/PROMPT.md +52 -0
- package/refs/vbenchmark/tasks/glue-code/etl/cdc-pipeline/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/etl/database-sync/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/glue-code/etl/database-sync/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/etl/s3-to-warehouse/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/glue-code/etl/s3-to-warehouse/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/file-processing/image-resizer/PROMPT.md +52 -0
- package/refs/vbenchmark/tasks/glue-code/file-processing/image-resizer/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/file-processing/pdf-merger/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/glue-code/file-processing/pdf-merger/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/file-processing/video-transcoder/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/glue-code/file-processing/video-transcoder/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/migration/data-backfill/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/glue-code/migration/data-backfill/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/migration/database-versioning/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/glue-code/migration/database-versioning/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/queue/kafka-producer/PROMPT.md +49 -0
- package/refs/vbenchmark/tasks/glue-code/queue/kafka-producer/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/queue/rabbitmq-consumer/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/glue-code/queue/rabbitmq-consumer/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/queue/sqs-batch-processor/PROMPT.md +47 -0
- package/refs/vbenchmark/tasks/glue-code/queue/sqs-batch-processor/task.yaml +24 -0
- package/refs/vbenchmark/tasks/glue-code/scheduler/cron-job-manager/PROMPT.md +52 -0
- package/refs/vbenchmark/tasks/glue-code/scheduler/cron-job-manager/task.yaml +27 -0
- package/refs/vbenchmark/tasks/glue-code/scheduler/delayed-tasks/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/glue-code/scheduler/delayed-tasks/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/api-versioning/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/api-versioning/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/circuit-breaker/PROMPT.md +13 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/circuit-breaker/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/compliance-gdpr/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/compliance-gdpr/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/cqrs-pattern/PROMPT.md +13 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/cqrs-pattern/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/data-encryption/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/data-encryption/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/distributed-locking/PROMPT.md +46 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/distributed-locking/task.yaml +24 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/event-sourcing/PROMPT.md +23 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/event-sourcing/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/feature-flags-ab/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/feature-flags-ab/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/saga-orchestration/PROMPT.md +13 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/saga-orchestration/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/webhook-delivery/PROMPT.md +15 -0
- package/refs/vbenchmark/tasks/saas-core/advanced/webhook-delivery/task.yaml +16 -0
- package/refs/vbenchmark/tasks/saas-core/audit/activity-logging/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/saas-core/audit/activity-logging/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/auth/jwt-refresh-tokens/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/saas-core/auth/jwt-refresh-tokens/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/auth/magic-link-email/PROMPT.md +53 -0
- package/refs/vbenchmark/tasks/saas-core/auth/magic-link-email/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/auth/mfa-totp/PROMPT.md +79 -0
- package/refs/vbenchmark/tasks/saas-core/auth/mfa-totp/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/auth/rbac-permissions/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/saas-core/auth/rbac-permissions/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/auth/session-management/PROMPT.md +52 -0
- package/refs/vbenchmark/tasks/saas-core/auth/session-management/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/auth/supabase-oauth/PROMPT.md +45 -0
- package/refs/vbenchmark/tasks/saas-core/auth/supabase-oauth/docker-compose.yaml +47 -0
- package/refs/vbenchmark/tasks/saas-core/auth/supabase-oauth/task.yaml +32 -0
- package/refs/vbenchmark/tasks/saas-core/auth/supabase-oauth/tests/auth.test.ts +59 -0
- package/refs/vbenchmark/tasks/saas-core/billing/invoice-generation/PROMPT.md +53 -0
- package/refs/vbenchmark/tasks/saas-core/billing/invoice-generation/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/billing/stripe-subscriptions/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/saas-core/billing/stripe-subscriptions/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/billing/usage-metering/PROMPT.md +52 -0
- package/refs/vbenchmark/tasks/saas-core/billing/usage-metering/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/crud/dashboard-table/PROMPT.md +48 -0
- package/refs/vbenchmark/tasks/saas-core/crud/dashboard-table/task.yaml +28 -0
- package/refs/vbenchmark/tasks/saas-core/multi-tenant/org-isolation/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/saas-core/multi-tenant/org-isolation/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/multi-tenant/subdomain-routing/PROMPT.md +50 -0
- package/refs/vbenchmark/tasks/saas-core/multi-tenant/subdomain-routing/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/notifications/email-queue/PROMPT.md +53 -0
- package/refs/vbenchmark/tasks/saas-core/notifications/email-queue/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/notifications/in-app-alerts/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/saas-core/notifications/in-app-alerts/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/notifications/push-notifications/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/saas-core/notifications/push-notifications/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/realtime/websocket-chat/PROMPT.md +80 -0
- package/refs/vbenchmark/tasks/saas-core/realtime/websocket-chat/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/search/full-text-search/PROMPT.md +51 -0
- package/refs/vbenchmark/tasks/saas-core/search/full-text-search/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/security/rate-limiter/PROMPT.md +99 -0
- package/refs/vbenchmark/tasks/saas-core/security/rate-limiter/task.yaml +27 -0
- package/refs/vbenchmark/tasks/saas-core/settings/user-preferences/PROMPT.md +78 -0
- package/refs/vbenchmark/tasks/saas-core/settings/user-preferences/task.yaml +27 -0
- package/refs/vbenchmark/templates/fastapi-postgres/docker-compose.yaml +36 -0
- package/refs/vbenchmark/templates/fastapi-postgres/pyproject.toml +34 -0
- package/refs/vbenchmark/templates/fastapi-postgres/src/__init__.py +0 -0
- package/refs/vbenchmark/templates/fastapi-postgres/src/config.py +12 -0
- package/refs/vbenchmark/templates/fastapi-postgres/src/database.py +15 -0
- package/refs/vbenchmark/templates/fastapi-postgres/src/main.py +51 -0
- package/refs/vbenchmark/templates/fastapi-postgres/src/models.py +12 -0
- package/refs/vbenchmark/templates/fastapi-postgres/src/schemas.py +20 -0
- package/refs/vbenchmark/templates/go-fiber/docker-compose.yaml +34 -0
- package/refs/vbenchmark/templates/go-fiber/go.mod +33 -0
- package/refs/vbenchmark/templates/go-fiber/go.sum +68 -0
- package/refs/vbenchmark/templates/go-fiber/main.go +98 -0
- package/refs/vbenchmark/templates/nextjs-supabase/.env.example +3 -0
- package/refs/vbenchmark/templates/nextjs-supabase/docker-compose.yaml +68 -0
- package/refs/vbenchmark/templates/nextjs-supabase/src/app/globals.css +13 -0
- package/refs/vbenchmark/templates/nextjs-supabase/src/app/layout.tsx +19 -0
- package/refs/vbenchmark/templates/nextjs-supabase/src/app/page.tsx +38 -0
- package/refs/vbenchmark/templates/nextjs-supabase/src/lib/supabase/client.ts +8 -0
- package/refs/vbenchmark/templates/nextjs-supabase/src/lib/supabase/server.ts +32 -0
- package/refs/vbenchmark/templates/rust-axum/Cargo.lock +2371 -0
- package/refs/vbenchmark/templates/rust-axum/Cargo.toml +16 -0
- package/refs/vbenchmark/templates/rust-axum/docker-compose.yaml +34 -0
- package/refs/vbenchmark/templates/rust-axum/migrations/20240101000000_init.sql +20 -0
- package/refs/vbenchmark/templates/rust-axum/src/main.rs +121 -0
- package/refs/vbenchmark/tsconfig.base.json +18 -0
- package/refs/vbenchmark/turbo.json +23 -0
- package/refs/vbenchmark/vercel.json +10 -0
|
@@ -0,0 +1,655 @@
|
|
|
1
|
+
import type { Task } from '../loader.js';
|
|
2
|
+
|
|
3
|
+
export interface AgentMessage {
|
|
4
|
+
role: 'user' | 'assistant';
|
|
5
|
+
content: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface AgentConfig {
|
|
9
|
+
name: string;
|
|
10
|
+
model: string;
|
|
11
|
+
apiKey: string;
|
|
12
|
+
baseUrl?: string;
|
|
13
|
+
maxTokens?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface Agent {
|
|
17
|
+
name: string;
|
|
18
|
+
config: AgentConfig;
|
|
19
|
+
execute(task: Task, prompt: string): AsyncGenerator<AgentEvent>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface AgentEvent {
|
|
23
|
+
type: 'thinking' | 'tool_use' | 'text' | 'error' | 'done';
|
|
24
|
+
message: string;
|
|
25
|
+
data?: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function createAgent(name: string): Agent {
|
|
29
|
+
switch (name.toLowerCase()) {
|
|
30
|
+
case 'claude':
|
|
31
|
+
return new ClaudeAgent();
|
|
32
|
+
case 'glm':
|
|
33
|
+
return new GLMAgent();
|
|
34
|
+
case 'minimax':
|
|
35
|
+
return new MiniMaxAgent();
|
|
36
|
+
case 'openai':
|
|
37
|
+
return new OpenAIAgent();
|
|
38
|
+
case 'deepseek':
|
|
39
|
+
return new DeepSeekAgent();
|
|
40
|
+
case 'gemini':
|
|
41
|
+
return new GeminiAgent();
|
|
42
|
+
case 'qwen':
|
|
43
|
+
return new QwenAgent();
|
|
44
|
+
case 'mock':
|
|
45
|
+
return new MockAgent();
|
|
46
|
+
default:
|
|
47
|
+
throw new Error(`Unknown agent: ${name}. Available: claude, glm, minimax, openai, deepseek, gemini, qwen, mock`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
class ClaudeAgent implements Agent {
|
|
52
|
+
name = 'claude';
|
|
53
|
+
config: AgentConfig;
|
|
54
|
+
|
|
55
|
+
constructor() {
|
|
56
|
+
this.config = {
|
|
57
|
+
name: 'claude',
|
|
58
|
+
model: process.env.CLAUDE_MODEL || 'claude-sonnet-4-5',
|
|
59
|
+
apiKey: process.env.ANTHROPIC_API_KEY || '',
|
|
60
|
+
baseUrl: process.env.ANTHROPIC_BASE_URL || 'https://api.anthropic.com',
|
|
61
|
+
maxTokens: 4096
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async *execute(task: Task, prompt: string): AsyncGenerator<AgentEvent> {
|
|
66
|
+
yield { type: 'thinking', message: 'Connecting to Claude API...' };
|
|
67
|
+
|
|
68
|
+
const systemPrompt = `You are an AI coding agent. Complete the following task by writing code.
|
|
69
|
+
|
|
70
|
+
Task: ${task.name}
|
|
71
|
+
Description: ${task.description}
|
|
72
|
+
Stack: ${task.stack}
|
|
73
|
+
|
|
74
|
+
Respond with your implementation plan and code.`;
|
|
75
|
+
|
|
76
|
+
try {
|
|
77
|
+
const response = await fetch(`${this.config.baseUrl}/v1/messages`, {
|
|
78
|
+
method: 'POST',
|
|
79
|
+
headers: {
|
|
80
|
+
'Content-Type': 'application/json',
|
|
81
|
+
'x-api-key': this.config.apiKey,
|
|
82
|
+
'anthropic-version': '2023-06-01'
|
|
83
|
+
},
|
|
84
|
+
body: JSON.stringify({
|
|
85
|
+
model: this.config.model,
|
|
86
|
+
max_tokens: this.config.maxTokens,
|
|
87
|
+
system: systemPrompt,
|
|
88
|
+
messages: [{ role: 'user', content: prompt }]
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
if (!response.ok) {
|
|
93
|
+
const error = await response.text();
|
|
94
|
+
yield { type: 'error', message: `API error: ${response.status} - ${error}` };
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const data = await response.json() as {
|
|
99
|
+
content: Array<{ type: string; text?: string }>;
|
|
100
|
+
usage?: { input_tokens: number; output_tokens: number };
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
for (const block of data.content) {
|
|
104
|
+
if (block.type === 'text' && block.text) {
|
|
105
|
+
yield { type: 'text', message: block.text };
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
yield {
|
|
110
|
+
type: 'done',
|
|
111
|
+
message: 'Completed',
|
|
112
|
+
data: {
|
|
113
|
+
tokens: (data.usage?.input_tokens || 0) + (data.usage?.output_tokens || 0),
|
|
114
|
+
model: this.config.model
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
} catch (error) {
|
|
118
|
+
yield { type: 'error', message: `Request failed: ${error}` };
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
class GLMAgent implements Agent {
|
|
124
|
+
name = 'glm';
|
|
125
|
+
config: AgentConfig;
|
|
126
|
+
private useAnthropicApi: boolean;
|
|
127
|
+
|
|
128
|
+
constructor() {
|
|
129
|
+
// Support both Zhipu API and z.ai Anthropic-compatible API
|
|
130
|
+
this.useAnthropicApi = !!process.env.GLM_USE_ANTHROPIC || (process.env.GLM_BASE_URL?.includes('anthropic') ?? false);
|
|
131
|
+
this.config = {
|
|
132
|
+
name: 'glm',
|
|
133
|
+
model: process.env.GLM_MODEL || (this.useAnthropicApi ? 'glm-4-plus' : 'glm-4-plus'),
|
|
134
|
+
apiKey: process.env.GLM_API_KEY || '',
|
|
135
|
+
baseUrl: process.env.GLM_BASE_URL || 'https://open.bigmodel.cn/api/paas/v4',
|
|
136
|
+
maxTokens: 4096
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
async *execute(task: Task, prompt: string): AsyncGenerator<AgentEvent> {
|
|
141
|
+
yield { type: 'thinking', message: `Connecting to GLM API (${this.useAnthropicApi ? 'Anthropic format' : 'OpenAI format'})...` };
|
|
142
|
+
|
|
143
|
+
const systemPrompt = `You are an AI coding agent. Complete the following task by writing code.
|
|
144
|
+
|
|
145
|
+
Task: ${task.name}
|
|
146
|
+
Description: ${task.description}
|
|
147
|
+
Stack: ${task.stack}
|
|
148
|
+
|
|
149
|
+
Respond with your implementation plan and code.`;
|
|
150
|
+
|
|
151
|
+
try {
|
|
152
|
+
if (this.useAnthropicApi) {
|
|
153
|
+
// Use Anthropic API format (for z.ai)
|
|
154
|
+
const response = await fetch(`${this.config.baseUrl}/v1/messages`, {
|
|
155
|
+
method: 'POST',
|
|
156
|
+
headers: {
|
|
157
|
+
'Content-Type': 'application/json',
|
|
158
|
+
'x-api-key': this.config.apiKey,
|
|
159
|
+
'anthropic-version': '2023-06-01'
|
|
160
|
+
},
|
|
161
|
+
body: JSON.stringify({
|
|
162
|
+
model: this.config.model,
|
|
163
|
+
max_tokens: this.config.maxTokens,
|
|
164
|
+
system: systemPrompt,
|
|
165
|
+
messages: [{ role: 'user', content: prompt }]
|
|
166
|
+
})
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
if (!response.ok) {
|
|
170
|
+
const error = await response.text();
|
|
171
|
+
yield { type: 'error', message: `API error: ${response.status} - ${error}` };
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const data = await response.json() as {
|
|
176
|
+
content: Array<{ type: string; text?: string }>;
|
|
177
|
+
usage?: { input_tokens: number; output_tokens: number };
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
for (const block of data.content) {
|
|
181
|
+
if (block.type === 'text' && block.text) {
|
|
182
|
+
yield { type: 'text', message: block.text };
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
yield {
|
|
187
|
+
type: 'done',
|
|
188
|
+
message: 'Completed',
|
|
189
|
+
data: {
|
|
190
|
+
tokens: (data.usage?.input_tokens || 0) + (data.usage?.output_tokens || 0),
|
|
191
|
+
model: this.config.model
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
} else {
|
|
195
|
+
// Use OpenAI-compatible format (for Zhipu/OpenRouter)
|
|
196
|
+
const requestBody: Record<string, unknown> = {
|
|
197
|
+
model: this.config.model,
|
|
198
|
+
max_tokens: this.config.maxTokens,
|
|
199
|
+
messages: [
|
|
200
|
+
{ role: 'system', content: systemPrompt },
|
|
201
|
+
{ role: 'user', content: prompt }
|
|
202
|
+
]
|
|
203
|
+
};
|
|
204
|
+
// Support OpenRouter provider selection
|
|
205
|
+
const provider = process.env.GLM_PROVIDER;
|
|
206
|
+
if (provider) {
|
|
207
|
+
requestBody.provider = { order: [provider] };
|
|
208
|
+
}
|
|
209
|
+
const response = await fetch(`${this.config.baseUrl}/chat/completions`, {
|
|
210
|
+
method: 'POST',
|
|
211
|
+
headers: {
|
|
212
|
+
'Content-Type': 'application/json',
|
|
213
|
+
'Authorization': `Bearer ${this.config.apiKey}`
|
|
214
|
+
},
|
|
215
|
+
body: JSON.stringify(requestBody)
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
if (!response.ok) {
|
|
219
|
+
const error = await response.text();
|
|
220
|
+
yield { type: 'error', message: `API error: ${response.status} - ${error}` };
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const data = await response.json() as {
|
|
225
|
+
choices: Array<{ message: { content: string } }>;
|
|
226
|
+
usage?: { total_tokens: number };
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
if (data.choices?.[0]?.message?.content) {
|
|
230
|
+
yield { type: 'text', message: data.choices[0].message.content };
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
yield {
|
|
234
|
+
type: 'done',
|
|
235
|
+
message: 'Completed',
|
|
236
|
+
data: {
|
|
237
|
+
tokens: data.usage?.total_tokens || 0,
|
|
238
|
+
model: this.config.model
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
} catch (error) {
|
|
243
|
+
yield { type: 'error', message: `Request failed: ${error}` };
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
class MiniMaxAgent implements Agent {
|
|
249
|
+
name = 'minimax';
|
|
250
|
+
config: AgentConfig;
|
|
251
|
+
|
|
252
|
+
constructor() {
|
|
253
|
+
// MiniMax M2.1 configuration
|
|
254
|
+
this.config = {
|
|
255
|
+
name: 'minimax',
|
|
256
|
+
model: process.env.MINIMAX_MODEL || 'MiniMax-M2.1',
|
|
257
|
+
apiKey: process.env.MINIMAX_API_KEY || '',
|
|
258
|
+
baseUrl: process.env.MINIMAX_BASE_URL || 'https://api.minimax.io/anthropic',
|
|
259
|
+
maxTokens: 16384
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
async *execute(task: Task, prompt: string): AsyncGenerator<AgentEvent> {
|
|
264
|
+
yield { type: 'thinking', message: `Connecting to MiniMax API (${this.config.model})...` };
|
|
265
|
+
|
|
266
|
+
const systemPrompt = `You are an expert AI coding agent. Your task is to write complete, working code implementations.
|
|
267
|
+
|
|
268
|
+
IMPORTANT INSTRUCTIONS:
|
|
269
|
+
1. Write COMPLETE, PRODUCTION-READY code - not snippets or pseudocode
|
|
270
|
+
2. Include ALL necessary imports, types, and error handling
|
|
271
|
+
3. Follow best practices for the specified stack
|
|
272
|
+
4. Use proper code blocks with filenames: \`\`\`typescript src/index.ts
|
|
273
|
+
|
|
274
|
+
Task: ${task.name}
|
|
275
|
+
Description: ${task.description}
|
|
276
|
+
Stack: ${task.stack}
|
|
277
|
+
|
|
278
|
+
Provide a complete implementation with all files needed.`;
|
|
279
|
+
|
|
280
|
+
try {
|
|
281
|
+
// Use Anthropic-compatible messages API
|
|
282
|
+
const response = await fetch(`${this.config.baseUrl}/v1/messages`, {
|
|
283
|
+
method: 'POST',
|
|
284
|
+
headers: {
|
|
285
|
+
'Content-Type': 'application/json',
|
|
286
|
+
'x-api-key': this.config.apiKey,
|
|
287
|
+
'anthropic-version': '2023-06-01'
|
|
288
|
+
},
|
|
289
|
+
body: JSON.stringify({
|
|
290
|
+
model: this.config.model,
|
|
291
|
+
max_tokens: this.config.maxTokens,
|
|
292
|
+
system: systemPrompt,
|
|
293
|
+
messages: [
|
|
294
|
+
{ role: 'user', content: prompt }
|
|
295
|
+
]
|
|
296
|
+
})
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
if (!response.ok) {
|
|
300
|
+
const error = await response.text();
|
|
301
|
+
yield { type: 'error', message: `API error: ${response.status} - ${error}` };
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const data = await response.json() as {
|
|
306
|
+
content?: Array<{ type: string; text?: string }>;
|
|
307
|
+
usage?: { input_tokens: number; output_tokens: number };
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
const text = data.content?.find(c => c.type === 'text')?.text;
|
|
311
|
+
if (text) {
|
|
312
|
+
yield { type: 'text', message: text };
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const inputTokens = data.usage?.input_tokens || 0;
|
|
316
|
+
const outputTokens = data.usage?.output_tokens || 0;
|
|
317
|
+
const totalTokens = inputTokens + outputTokens;
|
|
318
|
+
|
|
319
|
+
yield {
|
|
320
|
+
type: 'done',
|
|
321
|
+
message: 'Completed',
|
|
322
|
+
data: {
|
|
323
|
+
tokens: totalTokens,
|
|
324
|
+
inputTokens,
|
|
325
|
+
outputTokens,
|
|
326
|
+
model: this.config.model
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
} catch (error) {
|
|
330
|
+
yield { type: 'error', message: `Request failed: ${error}` };
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
class OpenAIAgent implements Agent {
|
|
336
|
+
name = 'openai';
|
|
337
|
+
config: AgentConfig;
|
|
338
|
+
|
|
339
|
+
constructor() {
|
|
340
|
+
this.config = {
|
|
341
|
+
name: 'openai',
|
|
342
|
+
model: process.env.OPENAI_MODEL || 'gpt-4o',
|
|
343
|
+
apiKey: process.env.OPENAI_API_KEY || '',
|
|
344
|
+
baseUrl: process.env.OPENAI_BASE_URL || 'https://api.openai.com',
|
|
345
|
+
maxTokens: 4096
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
async *execute(task: Task, prompt: string): AsyncGenerator<AgentEvent> {
|
|
350
|
+
yield { type: 'thinking', message: `Connecting to OpenAI (${this.config.model})...` };
|
|
351
|
+
|
|
352
|
+
const systemPrompt = `You are an AI coding agent. Complete the following task by writing code.
|
|
353
|
+
|
|
354
|
+
Task: ${task.name}
|
|
355
|
+
Description: ${task.description}
|
|
356
|
+
Stack: ${task.stack}
|
|
357
|
+
|
|
358
|
+
Respond with your implementation plan and code.`;
|
|
359
|
+
|
|
360
|
+
try {
|
|
361
|
+
const response = await fetch(`${this.config.baseUrl}/v1/chat/completions`, {
|
|
362
|
+
method: 'POST',
|
|
363
|
+
headers: {
|
|
364
|
+
'Content-Type': 'application/json',
|
|
365
|
+
'Authorization': `Bearer ${this.config.apiKey}`,
|
|
366
|
+
'HTTP-Referer': 'https://vibecoding.llmbench.xyz',
|
|
367
|
+
'X-Title': 'VibeCodingBench'
|
|
368
|
+
},
|
|
369
|
+
body: JSON.stringify({
|
|
370
|
+
model: this.config.model,
|
|
371
|
+
max_tokens: this.config.maxTokens,
|
|
372
|
+
messages: [
|
|
373
|
+
{ role: 'system', content: systemPrompt },
|
|
374
|
+
{ role: 'user', content: prompt }
|
|
375
|
+
]
|
|
376
|
+
})
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
if (!response.ok) {
|
|
380
|
+
const error = await response.text();
|
|
381
|
+
yield { type: 'error', message: `API error: ${response.status} - ${error}` };
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
const data = await response.json() as {
|
|
386
|
+
choices: Array<{ message: { content: string } }>;
|
|
387
|
+
usage?: { prompt_tokens: number; completion_tokens: number; total_tokens: number };
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
if (data.choices?.[0]?.message?.content) {
|
|
391
|
+
yield { type: 'text', message: data.choices[0].message.content };
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
yield {
|
|
395
|
+
type: 'done',
|
|
396
|
+
message: 'Completed',
|
|
397
|
+
data: {
|
|
398
|
+
tokens: data.usage?.total_tokens || 0,
|
|
399
|
+
inputTokens: data.usage?.prompt_tokens || 0,
|
|
400
|
+
outputTokens: data.usage?.completion_tokens || 0,
|
|
401
|
+
model: this.config.model
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
} catch (error) {
|
|
405
|
+
yield { type: 'error', message: `Request failed: ${error}` };
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
class DeepSeekAgent implements Agent {
|
|
411
|
+
name = 'deepseek';
|
|
412
|
+
config: AgentConfig;
|
|
413
|
+
|
|
414
|
+
constructor() {
|
|
415
|
+
this.config = {
|
|
416
|
+
name: 'deepseek',
|
|
417
|
+
model: process.env.DEEPSEEK_MODEL || 'deepseek-chat',
|
|
418
|
+
apiKey: process.env.DEEPSEEK_API_KEY || '',
|
|
419
|
+
baseUrl: process.env.DEEPSEEK_BASE_URL || 'https://api.deepseek.com',
|
|
420
|
+
maxTokens: 4096
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
async *execute(task: Task, prompt: string): AsyncGenerator<AgentEvent> {
|
|
425
|
+
yield { type: 'thinking', message: `Connecting to DeepSeek (${this.config.model})...` };
|
|
426
|
+
|
|
427
|
+
const systemPrompt = `You are an AI coding agent. Complete the following task by writing code.
|
|
428
|
+
|
|
429
|
+
Task: ${task.name}
|
|
430
|
+
Description: ${task.description}
|
|
431
|
+
Stack: ${task.stack}
|
|
432
|
+
|
|
433
|
+
Respond with your implementation plan and code.`;
|
|
434
|
+
|
|
435
|
+
try {
|
|
436
|
+
const response = await fetch(`${this.config.baseUrl}/v1/chat/completions`, {
|
|
437
|
+
method: 'POST',
|
|
438
|
+
headers: {
|
|
439
|
+
'Content-Type': 'application/json',
|
|
440
|
+
'Authorization': `Bearer ${this.config.apiKey}`,
|
|
441
|
+
'HTTP-Referer': 'https://vibecoding.llmbench.xyz',
|
|
442
|
+
'X-Title': 'VibeCodingBench'
|
|
443
|
+
},
|
|
444
|
+
body: JSON.stringify({
|
|
445
|
+
model: this.config.model,
|
|
446
|
+
max_tokens: this.config.maxTokens,
|
|
447
|
+
messages: [
|
|
448
|
+
{ role: 'system', content: systemPrompt },
|
|
449
|
+
{ role: 'user', content: prompt }
|
|
450
|
+
]
|
|
451
|
+
})
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
if (!response.ok) {
|
|
455
|
+
const error = await response.text();
|
|
456
|
+
yield { type: 'error', message: `API error: ${response.status} - ${error}` };
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
const data = await response.json() as {
|
|
461
|
+
choices: Array<{ message: { content: string } }>;
|
|
462
|
+
usage?: { prompt_tokens: number; completion_tokens: number; total_tokens: number };
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
if (data.choices?.[0]?.message?.content) {
|
|
466
|
+
yield { type: 'text', message: data.choices[0].message.content };
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
yield {
|
|
470
|
+
type: 'done',
|
|
471
|
+
message: 'Completed',
|
|
472
|
+
data: {
|
|
473
|
+
tokens: data.usage?.total_tokens || 0,
|
|
474
|
+
inputTokens: data.usage?.prompt_tokens || 0,
|
|
475
|
+
outputTokens: data.usage?.completion_tokens || 0,
|
|
476
|
+
model: this.config.model
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
} catch (error) {
|
|
480
|
+
yield { type: 'error', message: `Request failed: ${error}` };
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
class GeminiAgent implements Agent {
|
|
486
|
+
name = 'gemini';
|
|
487
|
+
config: AgentConfig;
|
|
488
|
+
|
|
489
|
+
constructor() {
|
|
490
|
+
this.config = {
|
|
491
|
+
name: 'gemini',
|
|
492
|
+
model: process.env.GEMINI_MODEL || 'gemini-2.0-flash',
|
|
493
|
+
apiKey: process.env.GEMINI_API_KEY || process.env.GOOGLE_API_KEY || '',
|
|
494
|
+
baseUrl: process.env.GEMINI_BASE_URL || 'https://generativelanguage.googleapis.com',
|
|
495
|
+
maxTokens: 4096
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
async *execute(task: Task, prompt: string): AsyncGenerator<AgentEvent> {
|
|
500
|
+
yield { type: 'thinking', message: `Connecting to Gemini (${this.config.model})...` };
|
|
501
|
+
|
|
502
|
+
const systemPrompt = `You are an AI coding agent. Complete the following task by writing code.
|
|
503
|
+
|
|
504
|
+
Task: ${task.name}
|
|
505
|
+
Description: ${task.description}
|
|
506
|
+
Stack: ${task.stack}
|
|
507
|
+
|
|
508
|
+
Respond with your implementation plan and code.`;
|
|
509
|
+
|
|
510
|
+
const combinedPrompt = `${systemPrompt}\n\n---\n\n${prompt}`;
|
|
511
|
+
|
|
512
|
+
try {
|
|
513
|
+
// Use Google AI generateContent endpoint
|
|
514
|
+
const response = await fetch(`${this.config.baseUrl}/v1beta/models/${this.config.model}:generateContent`, {
|
|
515
|
+
method: 'POST',
|
|
516
|
+
headers: {
|
|
517
|
+
'Content-Type': 'application/json',
|
|
518
|
+
'x-goog-api-key': this.config.apiKey
|
|
519
|
+
},
|
|
520
|
+
body: JSON.stringify({
|
|
521
|
+
contents: [
|
|
522
|
+
{ role: 'user', parts: [{ text: combinedPrompt }] }
|
|
523
|
+
]
|
|
524
|
+
})
|
|
525
|
+
});
|
|
526
|
+
|
|
527
|
+
if (!response.ok) {
|
|
528
|
+
const error = await response.text();
|
|
529
|
+
yield { type: 'error', message: `API error: ${response.status} - ${error}` };
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
const data = await response.json() as {
|
|
534
|
+
candidates?: Array<{ content: { parts: Array<{ text?: string }> } }>;
|
|
535
|
+
usageMetadata?: { totalTokenCount: number };
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
const text = data.candidates?.[0]?.content?.parts?.[0]?.text;
|
|
539
|
+
if (text) {
|
|
540
|
+
yield { type: 'text', message: text };
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
yield {
|
|
544
|
+
type: 'done',
|
|
545
|
+
message: 'Completed',
|
|
546
|
+
data: {
|
|
547
|
+
tokens: data.usageMetadata?.totalTokenCount || 0,
|
|
548
|
+
model: this.config.model
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
} catch (error) {
|
|
552
|
+
yield { type: 'error', message: `Request failed: ${error}` };
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
class QwenAgent implements Agent {
|
|
558
|
+
name = 'qwen';
|
|
559
|
+
config: AgentConfig;
|
|
560
|
+
|
|
561
|
+
constructor() {
|
|
562
|
+
this.config = {
|
|
563
|
+
name: 'qwen',
|
|
564
|
+
model: process.env.QWEN_MODEL || 'qwen3-max',
|
|
565
|
+
apiKey: process.env.QWEN_API_KEY || '',
|
|
566
|
+
baseUrl: process.env.QWEN_BASE_URL || 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1',
|
|
567
|
+
maxTokens: 8192
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
async *execute(task: Task, prompt: string): AsyncGenerator<AgentEvent> {
|
|
572
|
+
yield { type: 'thinking', message: 'Connecting to Qwen API...' };
|
|
573
|
+
|
|
574
|
+
const systemPrompt = `You are an AI coding agent. Complete the following task by writing code.
|
|
575
|
+
|
|
576
|
+
Task: ${task.name}
|
|
577
|
+
Description: ${task.description}
|
|
578
|
+
Stack: ${task.stack}
|
|
579
|
+
|
|
580
|
+
Respond with your implementation plan and code.`;
|
|
581
|
+
|
|
582
|
+
try {
|
|
583
|
+
const requestBody: Record<string, unknown> = {
|
|
584
|
+
model: this.config.model,
|
|
585
|
+
max_tokens: this.config.maxTokens,
|
|
586
|
+
messages: [
|
|
587
|
+
{ role: 'system', content: systemPrompt },
|
|
588
|
+
{ role: 'user', content: prompt }
|
|
589
|
+
]
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
// Enable thinking mode if specified
|
|
593
|
+
if (process.env.QWEN_ENABLE_THINKING === 'true') {
|
|
594
|
+
requestBody.enable_thinking = true;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
const response = await fetch(`${this.config.baseUrl}/chat/completions`, {
|
|
598
|
+
method: 'POST',
|
|
599
|
+
headers: {
|
|
600
|
+
'Content-Type': 'application/json',
|
|
601
|
+
'Authorization': `Bearer ${this.config.apiKey}`
|
|
602
|
+
},
|
|
603
|
+
body: JSON.stringify(requestBody)
|
|
604
|
+
});
|
|
605
|
+
|
|
606
|
+
if (!response.ok) {
|
|
607
|
+
const error = await response.text();
|
|
608
|
+
yield { type: 'error', message: `API error: ${response.status} - ${error}` };
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
const data = await response.json() as {
|
|
613
|
+
choices: Array<{ message: { content: string } }>;
|
|
614
|
+
usage?: { prompt_tokens: number; completion_tokens: number; total_tokens: number };
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
if (data.choices?.[0]?.message?.content) {
|
|
618
|
+
yield { type: 'text', message: data.choices[0].message.content };
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
yield {
|
|
622
|
+
type: 'done',
|
|
623
|
+
message: 'Completed',
|
|
624
|
+
data: {
|
|
625
|
+
tokens: data.usage?.total_tokens || 0,
|
|
626
|
+
inputTokens: data.usage?.prompt_tokens || 0,
|
|
627
|
+
outputTokens: data.usage?.completion_tokens || 0,
|
|
628
|
+
model: this.config.model
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
} catch (error) {
|
|
632
|
+
yield { type: 'error', message: `Request failed: ${error}` };
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
class MockAgent implements Agent {
|
|
638
|
+
name = 'mock';
|
|
639
|
+
config: AgentConfig;
|
|
640
|
+
|
|
641
|
+
constructor() {
|
|
642
|
+
this.config = {
|
|
643
|
+
name: 'mock',
|
|
644
|
+
model: 'mock-v1',
|
|
645
|
+
apiKey: 'mock'
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
async *execute(_task: Task, _prompt: string): AsyncGenerator<AgentEvent> {
|
|
650
|
+
yield { type: 'thinking', message: 'Mock thinking...' };
|
|
651
|
+
yield { type: 'tool_use', message: 'Writing file...', data: { file: 'index.ts' } };
|
|
652
|
+
yield { type: 'text', message: 'Implementation complete' };
|
|
653
|
+
yield { type: 'done', message: 'Completed' };
|
|
654
|
+
}
|
|
655
|
+
}
|