@shepai/cli 1.14.2 → 1.15.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 +191 -101
- package/dist/src/application/ports/output/external-issue-fetcher.interface.d.ts +69 -0
- package/dist/src/application/ports/output/external-issue-fetcher.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/external-issue-fetcher.interface.js +46 -0
- package/dist/src/application/ports/output/feature-agent-process.interface.d.ts +44 -0
- package/dist/src/application/ports/output/feature-agent-process.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/feature-agent-process.interface.js +12 -0
- package/dist/src/application/ports/output/feature-repository.interface.d.ts +76 -0
- package/dist/src/application/ports/output/feature-repository.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/feature-repository.interface.js +11 -0
- package/dist/src/application/ports/output/index.d.ts +3 -0
- package/dist/src/application/ports/output/index.d.ts.map +1 -1
- package/dist/src/application/ports/output/index.js +1 -1
- package/dist/src/application/ports/output/spec-initializer.interface.d.ts +33 -0
- package/dist/src/application/ports/output/spec-initializer.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/spec-initializer.interface.js +8 -0
- package/dist/src/application/ports/output/worktree-service.interface.d.ts +83 -0
- package/dist/src/application/ports/output/worktree-service.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/worktree-service.interface.js +30 -0
- package/dist/src/application/use-cases/agents/approve-agent-run.use-case.d.ts +22 -0
- package/dist/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map +1 -0
- package/dist/src/application/use-cases/agents/approve-agent-run.use-case.js +67 -0
- package/dist/src/application/use-cases/agents/delete-agent-run.use-case.d.ts +16 -0
- package/dist/src/application/use-cases/agents/delete-agent-run.use-case.d.ts.map +1 -0
- package/dist/src/application/use-cases/agents/delete-agent-run.use-case.js +46 -0
- package/dist/src/application/use-cases/agents/get-agent-run.use-case.d.ts +22 -0
- package/dist/src/application/use-cases/agents/get-agent-run.use-case.d.ts.map +1 -0
- package/dist/src/application/use-cases/agents/get-agent-run.use-case.js +42 -0
- package/dist/src/application/use-cases/agents/list-agent-runs.use-case.d.ts +21 -0
- package/dist/src/application/use-cases/agents/list-agent-runs.use-case.d.ts.map +1 -0
- package/dist/src/application/use-cases/agents/list-agent-runs.use-case.js +54 -0
- package/dist/src/application/use-cases/agents/reject-agent-run.use-case.d.ts +16 -0
- package/dist/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map +1 -0
- package/dist/src/application/use-cases/agents/reject-agent-run.use-case.js +52 -0
- package/dist/src/application/use-cases/agents/show-agent-run.use-case.d.ts +24 -0
- package/dist/src/application/use-cases/agents/show-agent-run.use-case.d.ts.map +1 -0
- package/dist/src/application/use-cases/agents/show-agent-run.use-case.js +52 -0
- package/dist/src/application/use-cases/agents/stop-agent-run.use-case.d.ts +15 -0
- package/dist/src/application/use-cases/agents/stop-agent-run.use-case.d.ts.map +1 -0
- package/dist/src/application/use-cases/agents/stop-agent-run.use-case.js +86 -0
- package/dist/src/application/use-cases/features/create-feature.use-case.d.ts +43 -0
- package/dist/src/application/use-cases/features/create-feature.use-case.d.ts.map +1 -0
- package/dist/src/application/use-cases/features/create-feature.use-case.js +166 -0
- package/dist/src/application/use-cases/features/delete-feature.use-case.d.ts +27 -0
- package/dist/src/application/use-cases/features/delete-feature.use-case.d.ts.map +1 -0
- package/dist/src/application/use-cases/features/delete-feature.use-case.js +83 -0
- package/dist/src/application/use-cases/features/list-features.use-case.d.ts +17 -0
- package/dist/src/application/use-cases/features/list-features.use-case.d.ts.map +1 -0
- package/dist/src/application/use-cases/features/list-features.use-case.js +37 -0
- package/dist/src/application/use-cases/features/resume-feature.use-case.d.ts +24 -0
- package/dist/src/application/use-cases/features/resume-feature.use-case.d.ts.map +1 -0
- package/dist/src/application/use-cases/features/resume-feature.use-case.js +100 -0
- package/dist/src/application/use-cases/features/show-feature.use-case.d.ts +17 -0
- package/dist/src/application/use-cases/features/show-feature.use-case.d.ts.map +1 -0
- package/dist/src/application/use-cases/features/show-feature.use-case.js +43 -0
- package/dist/src/domain/generated/output.d.ts +26 -1
- package/dist/src/domain/generated/output.d.ts.map +1 -1
- package/dist/src/domain/generated/output.js +1 -0
- package/dist/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/src/infrastructure/di/container.js +64 -14
- package/dist/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.d.ts +4 -0
- package/dist/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.d.ts.map +1 -1
- package/dist/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.js +8 -0
- package/dist/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts +50 -0
- package/dist/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts.map +1 -0
- package/dist/src/infrastructure/persistence/sqlite/mappers/feature.mapper.js +62 -0
- package/dist/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
- package/dist/src/infrastructure/persistence/sqlite/migrations.js +49 -0
- package/dist/src/infrastructure/repositories/agent-run.repository.d.ts.map +1 -1
- package/dist/src/infrastructure/repositories/agent-run.repository.js +30 -8
- package/dist/src/infrastructure/repositories/sqlite-feature.repository.d.ts +25 -0
- package/dist/src/infrastructure/repositories/sqlite-feature.repository.d.ts.map +1 -0
- package/dist/src/infrastructure/repositories/sqlite-feature.repository.js +113 -0
- package/dist/src/infrastructure/services/agents/{langgraph → analyze-repo}/analyze-repository-graph.d.ts +0 -22
- package/dist/src/infrastructure/services/agents/analyze-repo/analyze-repository-graph.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/{langgraph → analyze-repo}/analyze-repository-graph.js +4 -11
- package/dist/src/infrastructure/services/agents/analyze-repo/prompts/analyze-repository.prompt.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/{agent-executor-factory.service.d.ts → common/agent-executor-factory.service.d.ts} +3 -3
- package/dist/src/infrastructure/services/agents/common/agent-executor-factory.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/{agent-registry.service.d.ts → common/agent-registry.service.d.ts} +1 -1
- package/dist/src/infrastructure/services/agents/common/agent-registry.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/{agent-registry.service.js → common/agent-registry.service.js} +7 -1
- package/dist/src/infrastructure/services/agents/{agent-runner.service.d.ts → common/agent-runner.service.d.ts} +5 -5
- package/dist/src/infrastructure/services/agents/common/agent-runner.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/{agent-runner.service.js → common/agent-runner.service.js} +4 -4
- package/dist/src/infrastructure/services/agents/{agent-validator.service.d.ts → common/agent-validator.service.d.ts} +2 -2
- package/dist/src/infrastructure/services/agents/common/agent-validator.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/{langgraph → common}/checkpointer.d.ts +1 -0
- package/dist/src/infrastructure/services/agents/common/checkpointer.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/{langgraph → common}/checkpointer.js +6 -0
- package/dist/src/infrastructure/services/agents/{executors → common/executors}/claude-code-executor.service.d.ts +9 -2
- package/dist/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/{executors → common/executors}/claude-code-executor.service.js +103 -6
- package/dist/src/infrastructure/services/agents/common/executors/mock-executor-factory.service.d.ts +15 -0
- package/dist/src/infrastructure/services/agents/common/executors/mock-executor-factory.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/common/executors/mock-executor-factory.service.js +16 -0
- package/dist/src/infrastructure/services/agents/common/executors/mock-executor.service.d.ts +17 -0
- package/dist/src/infrastructure/services/agents/common/executors/mock-executor.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/common/executors/mock-executor.service.js +49 -0
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +244 -0
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-graph.js +36 -0
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +20 -0
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +90 -0
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +31 -0
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +236 -0
- package/dist/src/infrastructure/services/agents/feature-agent/heartbeat.d.ts +19 -0
- package/dist/src/infrastructure/services/agents/feature-agent/heartbeat.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/heartbeat.js +38 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/analyze.node.d.ts +7 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/analyze.node.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/analyze.node.js +9 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.d.ts +11 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/implement.node.js +23 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts +40 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +114 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/plan.node.d.ts +7 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/plan.node.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/plan.node.js +9 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/analyze.prompt.d.ts +9 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/analyze.prompt.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/analyze.prompt.js +94 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/implement.prompt.d.ts +8 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/implement.prompt.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/implement.prompt.js +18 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.d.ts +11 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.js +170 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.d.ts +10 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.js +116 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/research.prompt.d.ts +10 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/research.prompt.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/prompts/research.prompt.js +121 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/requirements.node.d.ts +7 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/requirements.node.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/requirements.node.js +9 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/research.node.d.ts +7 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/research.node.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/nodes/research.node.js +9 -0
- package/dist/src/infrastructure/services/agents/feature-agent/state.d.ts +39 -0
- package/dist/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -0
- package/dist/src/infrastructure/services/agents/feature-agent/state.js +27 -0
- package/dist/src/infrastructure/services/external/github-issue.service.d.ts +19 -0
- package/dist/src/infrastructure/services/external/github-issue.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/external/github-issue.service.js +59 -0
- package/dist/src/infrastructure/services/external/jira-ticket.service.d.ts +23 -0
- package/dist/src/infrastructure/services/external/jira-ticket.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/external/jira-ticket.service.js +57 -0
- package/dist/src/infrastructure/services/git/worktree.service.d.ts +28 -0
- package/dist/src/infrastructure/services/git/worktree.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/git/worktree.service.js +112 -0
- package/dist/src/infrastructure/services/spec/spec-initializer.service.d.ts +17 -0
- package/dist/src/infrastructure/services/spec/spec-initializer.service.d.ts.map +1 -0
- package/dist/src/infrastructure/services/spec/spec-initializer.service.js +281 -0
- package/dist/src/presentation/cli/commands/agent/approve.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/agent/approve.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/agent/approve.command.js +42 -0
- package/dist/src/presentation/cli/commands/agent/delete.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/agent/delete.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/agent/delete.command.js +49 -0
- package/dist/src/presentation/cli/commands/agent/index.d.ts +21 -0
- package/dist/src/presentation/cli/commands/agent/index.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/agent/index.js +38 -0
- package/dist/src/presentation/cli/commands/agent/logs.command.d.ts +13 -0
- package/dist/src/presentation/cli/commands/agent/logs.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/agent/logs.command.js +163 -0
- package/dist/src/presentation/cli/commands/agent/ls.command.d.ts +12 -0
- package/dist/src/presentation/cli/commands/agent/ls.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/agent/ls.command.js +111 -0
- package/dist/src/presentation/cli/commands/agent/reject.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/agent/reject.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/agent/reject.command.js +43 -0
- package/dist/src/presentation/cli/commands/agent/resolve-run.d.ts +10 -0
- package/dist/src/presentation/cli/commands/agent/resolve-run.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/agent/resolve-run.js +27 -0
- package/dist/src/presentation/cli/commands/agent/show.command.d.ts +12 -0
- package/dist/src/presentation/cli/commands/agent/show.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/agent/show.command.js +202 -0
- package/dist/src/presentation/cli/commands/agent/stop.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/agent/stop.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/agent/stop.command.js +42 -0
- package/dist/src/presentation/cli/commands/feat/del.command.d.ts +17 -0
- package/dist/src/presentation/cli/commands/feat/del.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/feat/del.command.js +55 -0
- package/dist/src/presentation/cli/commands/feat/index.d.ts +17 -0
- package/dist/src/presentation/cli/commands/feat/index.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/feat/index.js +29 -0
- package/dist/src/presentation/cli/commands/feat/ls.command.d.ts +15 -0
- package/dist/src/presentation/cli/commands/feat/ls.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/feat/ls.command.js +112 -0
- package/dist/src/presentation/cli/commands/feat/new.command.d.ts +17 -0
- package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/feat/new.command.js +64 -0
- package/dist/src/presentation/cli/commands/feat/resume.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/feat/resume.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/feat/resume.command.js +33 -0
- package/dist/src/presentation/cli/commands/feat/show.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/feat/show.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/feat/show.command.js +128 -0
- package/dist/src/presentation/cli/index.d.ts +8 -4
- package/dist/src/presentation/cli/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/index.js +12 -4
- package/dist/src/presentation/cli/ui/detail-view.d.ts +43 -0
- package/dist/src/presentation/cli/ui/detail-view.d.ts.map +1 -0
- package/dist/src/presentation/cli/ui/detail-view.js +57 -0
- package/dist/src/presentation/cli/ui/index.d.ts +2 -0
- package/dist/src/presentation/cli/ui/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/ui/index.js +2 -0
- package/dist/src/presentation/cli/ui/list-view.d.ts +34 -0
- package/dist/src/presentation/cli/ui/list-view.d.ts.map +1 -0
- package/dist/src/presentation/cli/ui/list-view.js +65 -0
- package/dist/src/presentation/cli/ui/symbols.d.ts +5 -1
- package/dist/src/presentation/cli/ui/symbols.d.ts.map +1 -1
- package/dist/src/presentation/cli/ui/symbols.js +4 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/cache/.previewinfo +1 -1
- package/web/.next/cache/.rscinfo +1 -1
- package/web/.next/cache/config.json +3 -3
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.html +2 -2
- package/web/.next/server/app/_not-found.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/index.html +2 -2
- package/web/.next/server/app/index.rsc +1 -1
- package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/version.html +2 -2
- package/web/.next/server/app/version.rsc +1 -1
- package/web/.next/server/app/version.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/version/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/version.segments/version.segment.rsc +1 -1
- package/web/.next/server/chunks/ssr/_19be0743._.js +1 -1
- package/web/.next/server/pages/404.html +2 -2
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/trace +1 -1
- package/web/.next/trace-build +1 -1
- package/dist/src/infrastructure/services/agents/agent-executor-factory.service.d.ts.map +0 -1
- package/dist/src/infrastructure/services/agents/agent-registry.service.d.ts.map +0 -1
- package/dist/src/infrastructure/services/agents/agent-runner.service.d.ts.map +0 -1
- package/dist/src/infrastructure/services/agents/agent-validator.service.d.ts.map +0 -1
- package/dist/src/infrastructure/services/agents/executors/claude-code-executor.service.d.ts.map +0 -1
- package/dist/src/infrastructure/services/agents/langgraph/analyze-repository-graph.d.ts.map +0 -1
- package/dist/src/infrastructure/services/agents/langgraph/checkpointer.d.ts.map +0 -1
- package/dist/src/infrastructure/services/agents/langgraph/prompts/analyze-repository.prompt.d.ts.map +0 -1
- /package/dist/src/infrastructure/services/agents/{langgraph → analyze-repo}/prompts/analyze-repository.prompt.d.ts +0 -0
- /package/dist/src/infrastructure/services/agents/{langgraph → analyze-repo}/prompts/analyze-repository.prompt.js +0 -0
- /package/dist/src/infrastructure/services/agents/{agent-executor-factory.service.js → common/agent-executor-factory.service.js} +0 -0
- /package/dist/src/infrastructure/services/agents/{agent-validator.service.js → common/agent-validator.service.js} +0 -0
- /package/web/.next/static/{rCkFI74-eja9LrkBfHFpp → XV-wYY85Xk9ANCuQDQ6_H}/_buildManifest.js +0 -0
- /package/web/.next/static/{rCkFI74-eja9LrkBfHFpp → XV-wYY85Xk9ANCuQDQ6_H}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{rCkFI74-eja9LrkBfHFpp → XV-wYY85Xk9ANCuQDQ6_H}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mock Agent Executor
|
|
3
|
+
*
|
|
4
|
+
* Deterministic executor for E2E tests. Returns predictable responses
|
|
5
|
+
* so tests can assert on exact slugs, names, and descriptions.
|
|
6
|
+
*
|
|
7
|
+
* Activated via SHEP_MOCK_EXECUTOR=1 environment variable.
|
|
8
|
+
*/
|
|
9
|
+
function toSlug(text) {
|
|
10
|
+
return text
|
|
11
|
+
.toLowerCase()
|
|
12
|
+
.replace(/[^a-z0-9\s-]/g, '')
|
|
13
|
+
.replace(/\s+/g, '-')
|
|
14
|
+
.replace(/-+/g, '-')
|
|
15
|
+
.replace(/^-|-$/g, '');
|
|
16
|
+
}
|
|
17
|
+
function toTitleCase(text) {
|
|
18
|
+
return text.replace(/\b\w/g, (c) => c.toUpperCase());
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Extract the quoted user input from the metadata generation prompt.
|
|
22
|
+
* Prompt format: `Generate feature metadata from this user request:\n"<input>"\n...`
|
|
23
|
+
*/
|
|
24
|
+
function extractUserInput(prompt) {
|
|
25
|
+
const match = prompt.match(/user request:\n"(.+?)"\n/s);
|
|
26
|
+
return match ? match[1] : null;
|
|
27
|
+
}
|
|
28
|
+
export class MockAgentExecutorService {
|
|
29
|
+
agentType = 'claude-code';
|
|
30
|
+
async execute(prompt, _options) {
|
|
31
|
+
const userInput = extractUserInput(prompt);
|
|
32
|
+
if (userInput) {
|
|
33
|
+
const slug = toSlug(userInput);
|
|
34
|
+
const name = toTitleCase(userInput);
|
|
35
|
+
return {
|
|
36
|
+
result: JSON.stringify({ slug, name, description: userInput }),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
// Default fallback for any other prompt
|
|
40
|
+
return { result: '{}' };
|
|
41
|
+
}
|
|
42
|
+
async *executeStream(prompt, options) {
|
|
43
|
+
const result = await this.execute(prompt, options);
|
|
44
|
+
yield { type: 'result', content: result.result, timestamp: new Date() };
|
|
45
|
+
}
|
|
46
|
+
supportsFeature(_feature) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { type BaseCheckpointSaver } from '@langchain/langgraph';
|
|
2
|
+
import type { IAgentExecutor } from '../../../../application/ports/output/agent-executor.interface.js';
|
|
3
|
+
export { FeatureAgentAnnotation, type FeatureAgentState } from './state.js';
|
|
4
|
+
/**
|
|
5
|
+
* Factory function that creates and compiles the feature-agent LangGraph.
|
|
6
|
+
*
|
|
7
|
+
* The graph defines a linear SDLC workflow:
|
|
8
|
+
* analyze → requirements → research → plan → implement
|
|
9
|
+
*
|
|
10
|
+
* Each node delegates work to the injected IAgentExecutor (e.g. Claude Code).
|
|
11
|
+
*
|
|
12
|
+
* @param executor - The agent executor to delegate prompt execution to
|
|
13
|
+
* @param checkpointer - Optional checkpoint saver for state persistence
|
|
14
|
+
* @returns A compiled LangGraph ready to be invoked
|
|
15
|
+
*/
|
|
16
|
+
export declare function createFeatureAgentGraph(executor: IAgentExecutor, checkpointer?: BaseCheckpointSaver): import("@langchain/langgraph").CompiledStateGraph<{
|
|
17
|
+
featureId: string;
|
|
18
|
+
repositoryPath: string;
|
|
19
|
+
specDir: string;
|
|
20
|
+
worktreePath: string;
|
|
21
|
+
currentNode: string;
|
|
22
|
+
error: string | null;
|
|
23
|
+
approvalMode: string | undefined;
|
|
24
|
+
messages: string[];
|
|
25
|
+
}, {
|
|
26
|
+
featureId?: string | undefined;
|
|
27
|
+
repositoryPath?: string | undefined;
|
|
28
|
+
specDir?: string | undefined;
|
|
29
|
+
worktreePath?: string | undefined;
|
|
30
|
+
currentNode?: string | undefined;
|
|
31
|
+
error?: string | null | undefined;
|
|
32
|
+
approvalMode?: string | undefined;
|
|
33
|
+
messages?: string[] | undefined;
|
|
34
|
+
}, "__start__" | "analyze" | "requirements" | "research" | "plan" | "implement", {
|
|
35
|
+
featureId: {
|
|
36
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
37
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
38
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
39
|
+
};
|
|
40
|
+
repositoryPath: {
|
|
41
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
42
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
43
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
44
|
+
};
|
|
45
|
+
specDir: {
|
|
46
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
47
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
48
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
49
|
+
};
|
|
50
|
+
worktreePath: {
|
|
51
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
52
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
53
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
54
|
+
};
|
|
55
|
+
currentNode: {
|
|
56
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
57
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
58
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
59
|
+
};
|
|
60
|
+
error: import("@langchain/langgraph").BinaryOperatorAggregate<string | null, string | null>;
|
|
61
|
+
approvalMode: import("@langchain/langgraph").BinaryOperatorAggregate<string | undefined, string | undefined>;
|
|
62
|
+
messages: import("@langchain/langgraph").BinaryOperatorAggregate<string[], string[]>;
|
|
63
|
+
}, {
|
|
64
|
+
featureId: {
|
|
65
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
66
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
67
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
68
|
+
};
|
|
69
|
+
repositoryPath: {
|
|
70
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
71
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
72
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
73
|
+
};
|
|
74
|
+
specDir: {
|
|
75
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
76
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
77
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
78
|
+
};
|
|
79
|
+
worktreePath: {
|
|
80
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
81
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
82
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
83
|
+
};
|
|
84
|
+
currentNode: {
|
|
85
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
86
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
87
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
88
|
+
};
|
|
89
|
+
error: import("@langchain/langgraph").BinaryOperatorAggregate<string | null, string | null>;
|
|
90
|
+
approvalMode: import("@langchain/langgraph").BinaryOperatorAggregate<string | undefined, string | undefined>;
|
|
91
|
+
messages: import("@langchain/langgraph").BinaryOperatorAggregate<string[], string[]>;
|
|
92
|
+
}, import("@langchain/langgraph").StateDefinition, {
|
|
93
|
+
analyze: Partial<import("@langchain/langgraph").StateType<{
|
|
94
|
+
featureId: {
|
|
95
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
96
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
97
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
98
|
+
};
|
|
99
|
+
repositoryPath: {
|
|
100
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
101
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
102
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
103
|
+
};
|
|
104
|
+
specDir: {
|
|
105
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
106
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
107
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
108
|
+
};
|
|
109
|
+
worktreePath: {
|
|
110
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
111
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
112
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
113
|
+
};
|
|
114
|
+
currentNode: {
|
|
115
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
116
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
117
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
118
|
+
};
|
|
119
|
+
error: import("@langchain/langgraph").BinaryOperatorAggregate<string | null, string | null>;
|
|
120
|
+
approvalMode: import("@langchain/langgraph").BinaryOperatorAggregate<string | undefined, string | undefined>;
|
|
121
|
+
messages: import("@langchain/langgraph").BinaryOperatorAggregate<string[], string[]>;
|
|
122
|
+
}>>;
|
|
123
|
+
requirements: Partial<import("@langchain/langgraph").StateType<{
|
|
124
|
+
featureId: {
|
|
125
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
126
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
127
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
128
|
+
};
|
|
129
|
+
repositoryPath: {
|
|
130
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
131
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
132
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
133
|
+
};
|
|
134
|
+
specDir: {
|
|
135
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
136
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
137
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
138
|
+
};
|
|
139
|
+
worktreePath: {
|
|
140
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
141
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
142
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
143
|
+
};
|
|
144
|
+
currentNode: {
|
|
145
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
146
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
147
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
148
|
+
};
|
|
149
|
+
error: import("@langchain/langgraph").BinaryOperatorAggregate<string | null, string | null>;
|
|
150
|
+
approvalMode: import("@langchain/langgraph").BinaryOperatorAggregate<string | undefined, string | undefined>;
|
|
151
|
+
messages: import("@langchain/langgraph").BinaryOperatorAggregate<string[], string[]>;
|
|
152
|
+
}>>;
|
|
153
|
+
research: Partial<import("@langchain/langgraph").StateType<{
|
|
154
|
+
featureId: {
|
|
155
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
156
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
157
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
158
|
+
};
|
|
159
|
+
repositoryPath: {
|
|
160
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
161
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
162
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
163
|
+
};
|
|
164
|
+
specDir: {
|
|
165
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
166
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
167
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
168
|
+
};
|
|
169
|
+
worktreePath: {
|
|
170
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
171
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
172
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
173
|
+
};
|
|
174
|
+
currentNode: {
|
|
175
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
176
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
177
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
178
|
+
};
|
|
179
|
+
error: import("@langchain/langgraph").BinaryOperatorAggregate<string | null, string | null>;
|
|
180
|
+
approvalMode: import("@langchain/langgraph").BinaryOperatorAggregate<string | undefined, string | undefined>;
|
|
181
|
+
messages: import("@langchain/langgraph").BinaryOperatorAggregate<string[], string[]>;
|
|
182
|
+
}>>;
|
|
183
|
+
plan: Partial<import("@langchain/langgraph").StateType<{
|
|
184
|
+
featureId: {
|
|
185
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
186
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
187
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
188
|
+
};
|
|
189
|
+
repositoryPath: {
|
|
190
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
191
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
192
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
193
|
+
};
|
|
194
|
+
specDir: {
|
|
195
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
196
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
197
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
198
|
+
};
|
|
199
|
+
worktreePath: {
|
|
200
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
201
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
202
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
203
|
+
};
|
|
204
|
+
currentNode: {
|
|
205
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
206
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
207
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
208
|
+
};
|
|
209
|
+
error: import("@langchain/langgraph").BinaryOperatorAggregate<string | null, string | null>;
|
|
210
|
+
approvalMode: import("@langchain/langgraph").BinaryOperatorAggregate<string | undefined, string | undefined>;
|
|
211
|
+
messages: import("@langchain/langgraph").BinaryOperatorAggregate<string[], string[]>;
|
|
212
|
+
}>>;
|
|
213
|
+
implement: Partial<import("@langchain/langgraph").StateType<{
|
|
214
|
+
featureId: {
|
|
215
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
216
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
217
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
218
|
+
};
|
|
219
|
+
repositoryPath: {
|
|
220
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
221
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
222
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
223
|
+
};
|
|
224
|
+
specDir: {
|
|
225
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
226
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
227
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
228
|
+
};
|
|
229
|
+
worktreePath: {
|
|
230
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
231
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
232
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
233
|
+
};
|
|
234
|
+
currentNode: {
|
|
235
|
+
(): import("@langchain/langgraph").LastValue<string>;
|
|
236
|
+
(annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BinaryOperatorAggregate<string, string>;
|
|
237
|
+
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
238
|
+
};
|
|
239
|
+
error: import("@langchain/langgraph").BinaryOperatorAggregate<string | null, string | null>;
|
|
240
|
+
approvalMode: import("@langchain/langgraph").BinaryOperatorAggregate<string | undefined, string | undefined>;
|
|
241
|
+
messages: import("@langchain/langgraph").BinaryOperatorAggregate<string[], string[]>;
|
|
242
|
+
}>>;
|
|
243
|
+
}, unknown, unknown>;
|
|
244
|
+
//# sourceMappingURL=feature-agent-graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-agent-graph.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/services/agents/feature-agent/feature-agent-graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AAS7F,OAAO,EAAE,sBAAsB,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE5E;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,cAAc,EACxB,YAAY,CAAC,EAAE,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgBnC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { StateGraph, START, END } from '@langchain/langgraph';
|
|
2
|
+
import { FeatureAgentAnnotation } from './state.js';
|
|
3
|
+
import { createAnalyzeNode } from './nodes/analyze.node.js';
|
|
4
|
+
import { createRequirementsNode } from './nodes/requirements.node.js';
|
|
5
|
+
import { createResearchNode } from './nodes/research.node.js';
|
|
6
|
+
import { createPlanNode } from './nodes/plan.node.js';
|
|
7
|
+
import { createImplementNode } from './nodes/implement.node.js';
|
|
8
|
+
// Re-export state types for consumers
|
|
9
|
+
export { FeatureAgentAnnotation } from './state.js';
|
|
10
|
+
/**
|
|
11
|
+
* Factory function that creates and compiles the feature-agent LangGraph.
|
|
12
|
+
*
|
|
13
|
+
* The graph defines a linear SDLC workflow:
|
|
14
|
+
* analyze → requirements → research → plan → implement
|
|
15
|
+
*
|
|
16
|
+
* Each node delegates work to the injected IAgentExecutor (e.g. Claude Code).
|
|
17
|
+
*
|
|
18
|
+
* @param executor - The agent executor to delegate prompt execution to
|
|
19
|
+
* @param checkpointer - Optional checkpoint saver for state persistence
|
|
20
|
+
* @returns A compiled LangGraph ready to be invoked
|
|
21
|
+
*/
|
|
22
|
+
export function createFeatureAgentGraph(executor, checkpointer) {
|
|
23
|
+
const graph = new StateGraph(FeatureAgentAnnotation)
|
|
24
|
+
.addNode('analyze', createAnalyzeNode(executor))
|
|
25
|
+
.addNode('requirements', createRequirementsNode(executor))
|
|
26
|
+
.addNode('research', createResearchNode(executor))
|
|
27
|
+
.addNode('plan', createPlanNode(executor))
|
|
28
|
+
.addNode('implement', createImplementNode(executor))
|
|
29
|
+
.addEdge(START, 'analyze')
|
|
30
|
+
.addEdge('analyze', 'requirements')
|
|
31
|
+
.addEdge('requirements', 'research')
|
|
32
|
+
.addEdge('research', 'plan')
|
|
33
|
+
.addEdge('plan', 'implement')
|
|
34
|
+
.addEdge('implement', END);
|
|
35
|
+
return graph.compile({ checkpointer });
|
|
36
|
+
}
|
package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Agent Process Service
|
|
3
|
+
*
|
|
4
|
+
* Infrastructure implementation of IFeatureAgentProcessService.
|
|
5
|
+
* Manages background worker processes for feature agent execution
|
|
6
|
+
* using Node.js child_process.fork().
|
|
7
|
+
*/
|
|
8
|
+
import type { IFeatureAgentProcessService } from '../../../../application/ports/output/feature-agent-process.interface.js';
|
|
9
|
+
import type { IAgentRunRepository } from '../../../../application/ports/output/agent-run-repository.interface.js';
|
|
10
|
+
export declare class FeatureAgentProcessService implements IFeatureAgentProcessService {
|
|
11
|
+
private readonly runRepository;
|
|
12
|
+
constructor(runRepository: IAgentRunRepository);
|
|
13
|
+
spawn(featureId: string, runId: string, repoPath: string, specDir: string, worktreePath?: string, options?: {
|
|
14
|
+
approvalMode?: string;
|
|
15
|
+
resume?: boolean;
|
|
16
|
+
}): number;
|
|
17
|
+
isAlive(pid: number): boolean;
|
|
18
|
+
checkAndMarkCrashed(runId: string): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=feature-agent-process.service.d.ts.map
|
package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-agent-process.service.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/services/agents/feature-agent/feature-agent-process.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+DAA+D,CAAC;AACjH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AAaxG,qBAAa,0BAA2B,YAAW,2BAA2B;IAChE,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,mBAAmB;IAE/D,KAAK,CACH,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GACpD,MAAM;IA4CT,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IASvB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAexD"}
|
package/dist/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Agent Process Service
|
|
3
|
+
*
|
|
4
|
+
* Infrastructure implementation of IFeatureAgentProcessService.
|
|
5
|
+
* Manages background worker processes for feature agent execution
|
|
6
|
+
* using Node.js child_process.fork().
|
|
7
|
+
*/
|
|
8
|
+
import { dirname } from 'node:path';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
import { fork } from 'node:child_process';
|
|
11
|
+
import { join } from 'node:path';
|
|
12
|
+
import { openSync } from 'node:fs';
|
|
13
|
+
import { homedir } from 'node:os';
|
|
14
|
+
import { mkdirSync } from 'node:fs';
|
|
15
|
+
import { AgentRunStatus } from '../../../../domain/generated/output.js';
|
|
16
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
17
|
+
/** Terminal statuses that should not be updated */
|
|
18
|
+
const TERMINAL_STATUSES = new Set([
|
|
19
|
+
AgentRunStatus.completed,
|
|
20
|
+
AgentRunStatus.failed,
|
|
21
|
+
AgentRunStatus.interrupted,
|
|
22
|
+
AgentRunStatus.cancelled,
|
|
23
|
+
]);
|
|
24
|
+
export class FeatureAgentProcessService {
|
|
25
|
+
runRepository;
|
|
26
|
+
constructor(runRepository) {
|
|
27
|
+
this.runRepository = runRepository;
|
|
28
|
+
}
|
|
29
|
+
spawn(featureId, runId, repoPath, specDir, worktreePath, options) {
|
|
30
|
+
const workerPath = join(__dirname, 'feature-agent-worker.js');
|
|
31
|
+
const args = [
|
|
32
|
+
'--feature-id',
|
|
33
|
+
featureId,
|
|
34
|
+
'--run-id',
|
|
35
|
+
runId,
|
|
36
|
+
'--repo',
|
|
37
|
+
repoPath,
|
|
38
|
+
'--spec-dir',
|
|
39
|
+
specDir,
|
|
40
|
+
];
|
|
41
|
+
if (worktreePath) {
|
|
42
|
+
args.push('--worktree-path', worktreePath);
|
|
43
|
+
}
|
|
44
|
+
if (options?.approvalMode) {
|
|
45
|
+
args.push('--approval-mode', options.approvalMode);
|
|
46
|
+
}
|
|
47
|
+
if (options?.resume) {
|
|
48
|
+
args.push('--resume');
|
|
49
|
+
}
|
|
50
|
+
// Create log file for worker output (for debugging)
|
|
51
|
+
const logsDir = join(homedir(), '.shep', 'logs');
|
|
52
|
+
mkdirSync(logsDir, { recursive: true });
|
|
53
|
+
const logPath = join(logsDir, `worker-${runId}.log`);
|
|
54
|
+
const logFd = openSync(logPath, 'a');
|
|
55
|
+
const child = fork(workerPath, args, {
|
|
56
|
+
detached: true,
|
|
57
|
+
stdio: ['ignore', logFd, logFd, 'ipc'],
|
|
58
|
+
});
|
|
59
|
+
if (!child.pid) {
|
|
60
|
+
throw new Error('Failed to spawn feature agent worker: no PID returned');
|
|
61
|
+
}
|
|
62
|
+
// Disconnect IPC so parent can exit cleanly without breaking the child
|
|
63
|
+
child.disconnect();
|
|
64
|
+
child.unref();
|
|
65
|
+
return child.pid;
|
|
66
|
+
}
|
|
67
|
+
isAlive(pid) {
|
|
68
|
+
try {
|
|
69
|
+
process.kill(pid, 0);
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
async checkAndMarkCrashed(runId) {
|
|
77
|
+
const run = await this.runRepository.findById(runId);
|
|
78
|
+
if (!run || !run.pid || TERMINAL_STATUSES.has(run.status)) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (!this.isAlive(run.pid)) {
|
|
82
|
+
const now = new Date().toISOString();
|
|
83
|
+
await this.runRepository.updateStatus(runId, AgentRunStatus.interrupted, {
|
|
84
|
+
error: `Agent process (PID ${run.pid}) crashed or was killed`,
|
|
85
|
+
completedAt: now,
|
|
86
|
+
updatedAt: now,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Feature Agent Worker
|
|
4
|
+
*
|
|
5
|
+
* Background worker entry point that runs as a child process via fork().
|
|
6
|
+
* Initializes DI, creates the feature agent graph, and executes it.
|
|
7
|
+
* Sends periodic heartbeats so the CLI can detect stuck/crashed workers.
|
|
8
|
+
*
|
|
9
|
+
* CLI Args: --feature-id <id> --run-id <id> --repo <path> --spec-dir <path>
|
|
10
|
+
*/
|
|
11
|
+
import 'reflect-metadata';
|
|
12
|
+
export interface WorkerArgs {
|
|
13
|
+
featureId: string;
|
|
14
|
+
runId: string;
|
|
15
|
+
repo: string;
|
|
16
|
+
specDir: string;
|
|
17
|
+
worktreePath?: string;
|
|
18
|
+
approvalMode?: string;
|
|
19
|
+
resume?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Parse CLI arguments into a WorkerArgs object.
|
|
23
|
+
* Throws if any required argument is missing.
|
|
24
|
+
*/
|
|
25
|
+
export declare function parseWorkerArgs(args: string[]): WorkerArgs;
|
|
26
|
+
/**
|
|
27
|
+
* Run the feature agent worker with the given arguments.
|
|
28
|
+
* Initializes DI, creates the graph, and executes it.
|
|
29
|
+
*/
|
|
30
|
+
export declare function runWorker(args: WorkerArgs): Promise<void>;
|
|
31
|
+
//# sourceMappingURL=feature-agent-worker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-agent-worker.d.ts","sourceRoot":"","sources":["../../../../../../src/infrastructure/services/agents/feature-agent/feature-agent-worker.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG;AAEH,OAAO,kBAAkB,CAAC;AAc1B,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA4B1D;AAgCD;;;GAGG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAqH/D"}
|