@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,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spec Initializer Service Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for initializing feature specification directories.
|
|
5
|
+
* Creates the spec YAML files (spec.yaml, research.yaml, plan.yaml,
|
|
6
|
+
* tasks.yaml, feature.yaml) using the same templates as /shep-kit:new-feature.
|
|
7
|
+
*/
|
|
8
|
+
export interface SpecInitializerResult {
|
|
9
|
+
/** Absolute path to the created spec directory */
|
|
10
|
+
specDir: string;
|
|
11
|
+
/** Zero-padded 3-digit feature number used */
|
|
12
|
+
featureNumber: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ISpecInitializerService {
|
|
15
|
+
/**
|
|
16
|
+
* Initialize a spec directory with template YAML files.
|
|
17
|
+
*
|
|
18
|
+
* Creates specs/NNN-SLUG/ inside the given base directory with:
|
|
19
|
+
* - spec.yaml
|
|
20
|
+
* - research.yaml
|
|
21
|
+
* - plan.yaml
|
|
22
|
+
* - tasks.yaml
|
|
23
|
+
* - feature.yaml
|
|
24
|
+
*
|
|
25
|
+
* @param basePath - Directory to create specs/ in (typically the worktree path)
|
|
26
|
+
* @param slug - Feature slug (kebab-case, e.g., "user-authentication")
|
|
27
|
+
* @param featureNumber - Sequential feature number (will be zero-padded to 3 digits)
|
|
28
|
+
* @param description - Feature description for template substitution
|
|
29
|
+
* @returns The spec directory path and feature number used
|
|
30
|
+
*/
|
|
31
|
+
initialize(basePath: string, slug: string, featureNumber: number, description: string): Promise<SpecInitializerResult>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=spec-initializer.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-initializer.interface.d.ts","sourceRoot":"","sources":["../../../../../src/application/ports/output/spec-initializer.interface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,qBAAqB;IACpC,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;;;;;;;OAeG;IACH,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACnC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spec Initializer Service Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for initializing feature specification directories.
|
|
5
|
+
* Creates the spec YAML files (spec.yaml, research.yaml, plan.yaml,
|
|
6
|
+
* tasks.yaml, feature.yaml) using the same templates as /shep-kit:new-feature.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Worktree Service Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for git worktree operations.
|
|
5
|
+
* Implementations manage git worktree creation, removal, and listing.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Information about a git worktree.
|
|
9
|
+
*/
|
|
10
|
+
export interface WorktreeInfo {
|
|
11
|
+
/** Absolute path to the worktree directory */
|
|
12
|
+
path: string;
|
|
13
|
+
/** HEAD commit hash */
|
|
14
|
+
head: string;
|
|
15
|
+
/** Branch name (empty for detached HEAD) */
|
|
16
|
+
branch: string;
|
|
17
|
+
/** Whether this is the main worktree */
|
|
18
|
+
isMain: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Error codes for worktree operations.
|
|
22
|
+
*/
|
|
23
|
+
export declare enum WorktreeErrorCode {
|
|
24
|
+
ALREADY_EXISTS = "ALREADY_EXISTS",
|
|
25
|
+
BRANCH_IN_USE = "BRANCH_IN_USE",
|
|
26
|
+
NOT_FOUND = "NOT_FOUND",
|
|
27
|
+
DIRTY_WORKTREE = "DIRTY_WORKTREE",
|
|
28
|
+
GIT_ERROR = "GIT_ERROR"
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Typed error for worktree operations.
|
|
32
|
+
*/
|
|
33
|
+
export declare class WorktreeError extends Error {
|
|
34
|
+
readonly code: WorktreeErrorCode;
|
|
35
|
+
readonly cause?: Error | undefined;
|
|
36
|
+
constructor(message: string, code: WorktreeErrorCode, cause?: Error | undefined);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Service interface for git worktree management.
|
|
40
|
+
*/
|
|
41
|
+
export interface IWorktreeService {
|
|
42
|
+
/**
|
|
43
|
+
* Create a new worktree with a new branch.
|
|
44
|
+
*
|
|
45
|
+
* @param repoPath - Path to the git repository
|
|
46
|
+
* @param branch - Branch name to create
|
|
47
|
+
* @param worktreePath - Path for the new worktree directory
|
|
48
|
+
* @returns Information about the created worktree
|
|
49
|
+
* @throws WorktreeError with appropriate code
|
|
50
|
+
*/
|
|
51
|
+
create(repoPath: string, branch: string, worktreePath: string): Promise<WorktreeInfo>;
|
|
52
|
+
/**
|
|
53
|
+
* Remove an existing worktree.
|
|
54
|
+
*
|
|
55
|
+
* @param worktreePath - Path to the worktree to remove
|
|
56
|
+
* @throws WorktreeError if worktree not found or has uncommitted changes
|
|
57
|
+
*/
|
|
58
|
+
remove(worktreePath: string): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* List all worktrees in a repository.
|
|
61
|
+
*
|
|
62
|
+
* @param repoPath - Path to the git repository
|
|
63
|
+
* @returns Array of worktree information
|
|
64
|
+
*/
|
|
65
|
+
list(repoPath: string): Promise<WorktreeInfo[]>;
|
|
66
|
+
/**
|
|
67
|
+
* Check if a worktree for a branch already exists.
|
|
68
|
+
*
|
|
69
|
+
* @param repoPath - Path to the git repository
|
|
70
|
+
* @param branch - Branch name to check
|
|
71
|
+
* @returns True if a worktree for this branch exists
|
|
72
|
+
*/
|
|
73
|
+
exists(repoPath: string, branch: string): Promise<boolean>;
|
|
74
|
+
/**
|
|
75
|
+
* Get the conventional worktree path for a branch.
|
|
76
|
+
*
|
|
77
|
+
* @param repoPath - Path to the git repository
|
|
78
|
+
* @param branch - Branch name
|
|
79
|
+
* @returns Computed worktree path (e.g., /repo/.worktrees/branch-name)
|
|
80
|
+
*/
|
|
81
|
+
getWorktreePath(repoPath: string, branch: string): string;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=worktree-service.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worktree-service.interface.d.ts","sourceRoot":"","sources":["../../../../../src/application/ports/output/worktree-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,oBAAY,iBAAiB;IAC3B,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,SAAS,cAAc;CACxB;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK;aAGpB,IAAI,EAAE,iBAAiB;aACvB,KAAK,CAAC,EAAE,KAAK;gBAF7B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,iBAAiB,EACvB,KAAK,CAAC,EAAE,KAAK,YAAA;CAKhC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEtF;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5C;;;;;OAKG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAEhD;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3D;;;;;;OAMG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Worktree Service Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for git worktree operations.
|
|
5
|
+
* Implementations manage git worktree creation, removal, and listing.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Error codes for worktree operations.
|
|
9
|
+
*/
|
|
10
|
+
export var WorktreeErrorCode;
|
|
11
|
+
(function (WorktreeErrorCode) {
|
|
12
|
+
WorktreeErrorCode["ALREADY_EXISTS"] = "ALREADY_EXISTS";
|
|
13
|
+
WorktreeErrorCode["BRANCH_IN_USE"] = "BRANCH_IN_USE";
|
|
14
|
+
WorktreeErrorCode["NOT_FOUND"] = "NOT_FOUND";
|
|
15
|
+
WorktreeErrorCode["DIRTY_WORKTREE"] = "DIRTY_WORKTREE";
|
|
16
|
+
WorktreeErrorCode["GIT_ERROR"] = "GIT_ERROR";
|
|
17
|
+
})(WorktreeErrorCode || (WorktreeErrorCode = {}));
|
|
18
|
+
/**
|
|
19
|
+
* Typed error for worktree operations.
|
|
20
|
+
*/
|
|
21
|
+
export class WorktreeError extends Error {
|
|
22
|
+
code;
|
|
23
|
+
cause;
|
|
24
|
+
constructor(message, code, cause) {
|
|
25
|
+
super(message);
|
|
26
|
+
this.code = code;
|
|
27
|
+
this.cause = cause;
|
|
28
|
+
this.name = 'WorktreeError';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Approve Agent Run Use Case
|
|
3
|
+
*
|
|
4
|
+
* Approves a paused agent run (waiting_approval status) and
|
|
5
|
+
* spawns a new resume worker to continue graph execution.
|
|
6
|
+
*/
|
|
7
|
+
import type { IAgentRunRepository } from '../../ports/output/agent-run-repository.interface.js';
|
|
8
|
+
import type { IFeatureAgentProcessService } from '../../ports/output/feature-agent-process.interface.js';
|
|
9
|
+
import type { IFeatureRepository } from '../../ports/output/feature-repository.interface.js';
|
|
10
|
+
import type { IWorktreeService } from '../../ports/output/worktree-service.interface.js';
|
|
11
|
+
export declare class ApproveAgentRunUseCase {
|
|
12
|
+
private readonly agentRunRepository;
|
|
13
|
+
private readonly processService;
|
|
14
|
+
private readonly featureRepository;
|
|
15
|
+
private readonly worktreeService;
|
|
16
|
+
constructor(agentRunRepository: IAgentRunRepository, processService: IFeatureAgentProcessService, featureRepository: IFeatureRepository, worktreeService: IWorktreeService);
|
|
17
|
+
execute(id: string): Promise<{
|
|
18
|
+
approved: boolean;
|
|
19
|
+
reason: string;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=approve-agent-run.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approve-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/agents/approve-agent-run.use-case.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AACzG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAC7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AAGzF,qBACa,sBAAsB;IAG/B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,eAAe;gBANf,kBAAkB,EAAE,mBAAmB,EAEvC,cAAc,EAAE,2BAA2B,EAE3C,iBAAiB,EAAE,kBAAkB,EAErC,eAAe,EAAE,gBAAgB;IAG9C,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAsC1E"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Approve Agent Run Use Case
|
|
3
|
+
*
|
|
4
|
+
* Approves a paused agent run (waiting_approval status) and
|
|
5
|
+
* spawns a new resume worker to continue graph execution.
|
|
6
|
+
*/
|
|
7
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
|
+
};
|
|
13
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15
|
+
};
|
|
16
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
17
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
18
|
+
};
|
|
19
|
+
import { injectable, inject } from 'tsyringe';
|
|
20
|
+
import { AgentRunStatus } from '../../../domain/generated/output.js';
|
|
21
|
+
let ApproveAgentRunUseCase = class ApproveAgentRunUseCase {
|
|
22
|
+
agentRunRepository;
|
|
23
|
+
processService;
|
|
24
|
+
featureRepository;
|
|
25
|
+
worktreeService;
|
|
26
|
+
constructor(agentRunRepository, processService, featureRepository, worktreeService) {
|
|
27
|
+
this.agentRunRepository = agentRunRepository;
|
|
28
|
+
this.processService = processService;
|
|
29
|
+
this.featureRepository = featureRepository;
|
|
30
|
+
this.worktreeService = worktreeService;
|
|
31
|
+
}
|
|
32
|
+
async execute(id) {
|
|
33
|
+
const run = await this.agentRunRepository.findById(id);
|
|
34
|
+
if (!run) {
|
|
35
|
+
return { approved: false, reason: 'Agent run not found' };
|
|
36
|
+
}
|
|
37
|
+
if (run.status !== AgentRunStatus.waitingApproval) {
|
|
38
|
+
return {
|
|
39
|
+
approved: false,
|
|
40
|
+
reason: `Agent run is not waiting for approval (status: ${run.status})`,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
// Look up the feature to get the branch for worktree path derivation
|
|
44
|
+
const feature = run.featureId ? await this.featureRepository.findById(run.featureId) : null;
|
|
45
|
+
const repoPath = run.repositoryPath ?? '';
|
|
46
|
+
const worktreePath = feature
|
|
47
|
+
? this.worktreeService.getWorktreePath(repoPath, feature.branch)
|
|
48
|
+
: repoPath;
|
|
49
|
+
const now = new Date();
|
|
50
|
+
await this.agentRunRepository.updateStatus(id, AgentRunStatus.running, {
|
|
51
|
+
approvalStatus: 'approved',
|
|
52
|
+
updatedAt: now,
|
|
53
|
+
});
|
|
54
|
+
this.processService.spawn(run.featureId ?? '', id, repoPath, worktreePath, // specDir = worktree path (same as initial spawn)
|
|
55
|
+
worktreePath, { resume: true, approvalMode: run.approvalMode });
|
|
56
|
+
return { approved: true, reason: 'Approved and resumed' };
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
ApproveAgentRunUseCase = __decorate([
|
|
60
|
+
injectable(),
|
|
61
|
+
__param(0, inject('IAgentRunRepository')),
|
|
62
|
+
__param(1, inject('IFeatureAgentProcessService')),
|
|
63
|
+
__param(2, inject('IFeatureRepository')),
|
|
64
|
+
__param(3, inject('IWorktreeService')),
|
|
65
|
+
__metadata("design:paramtypes", [Object, Object, Object, Object])
|
|
66
|
+
], ApproveAgentRunUseCase);
|
|
67
|
+
export { ApproveAgentRunUseCase };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delete Agent Run Use Case
|
|
3
|
+
*
|
|
4
|
+
* Removes an agent run record from the database.
|
|
5
|
+
* Refuses to delete running agents — stop them first.
|
|
6
|
+
*/
|
|
7
|
+
import type { IAgentRunRepository } from '../../ports/output/agent-run-repository.interface.js';
|
|
8
|
+
export declare class DeleteAgentRunUseCase {
|
|
9
|
+
private readonly agentRunRepository;
|
|
10
|
+
constructor(agentRunRepository: IAgentRunRepository);
|
|
11
|
+
execute(id: string): Promise<{
|
|
12
|
+
deleted: boolean;
|
|
13
|
+
reason: string;
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=delete-agent-run.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/agents/delete-agent-run.use-case.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAGhG,qBACa,qBAAqB;IAG9B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,mBAAmB;IAGpD,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAgBzE"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delete Agent Run Use Case
|
|
3
|
+
*
|
|
4
|
+
* Removes an agent run record from the database.
|
|
5
|
+
* Refuses to delete running agents — stop them first.
|
|
6
|
+
*/
|
|
7
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
|
+
};
|
|
13
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15
|
+
};
|
|
16
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
17
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
18
|
+
};
|
|
19
|
+
import { injectable, inject } from 'tsyringe';
|
|
20
|
+
import { AgentRunStatus } from '../../../domain/generated/output.js';
|
|
21
|
+
let DeleteAgentRunUseCase = class DeleteAgentRunUseCase {
|
|
22
|
+
agentRunRepository;
|
|
23
|
+
constructor(agentRunRepository) {
|
|
24
|
+
this.agentRunRepository = agentRunRepository;
|
|
25
|
+
}
|
|
26
|
+
async execute(id) {
|
|
27
|
+
const run = await this.agentRunRepository.findById(id);
|
|
28
|
+
if (!run) {
|
|
29
|
+
return { deleted: false, reason: 'Agent run not found' };
|
|
30
|
+
}
|
|
31
|
+
if (run.status === AgentRunStatus.running) {
|
|
32
|
+
return {
|
|
33
|
+
deleted: false,
|
|
34
|
+
reason: `Cannot delete a running agent. Stop it first with: shep agent stop ${id.substring(0, 8)}`,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
await this.agentRunRepository.delete(id);
|
|
38
|
+
return { deleted: true, reason: 'Agent run deleted' };
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
DeleteAgentRunUseCase = __decorate([
|
|
42
|
+
injectable(),
|
|
43
|
+
__param(0, inject('IAgentRunRepository')),
|
|
44
|
+
__metadata("design:paramtypes", [Object])
|
|
45
|
+
], DeleteAgentRunUseCase);
|
|
46
|
+
export { DeleteAgentRunUseCase };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Agent Run Use Case
|
|
3
|
+
*
|
|
4
|
+
* Retrieves agent run details by ID for display purposes.
|
|
5
|
+
*/
|
|
6
|
+
import type { AgentRun } from '../../../domain/generated/output.js';
|
|
7
|
+
import type { IAgentRunRepository } from '../../ports/output/agent-run-repository.interface.js';
|
|
8
|
+
/**
|
|
9
|
+
* Use case for getting a specific agent run by ID.
|
|
10
|
+
*/
|
|
11
|
+
export declare class GetAgentRunUseCase {
|
|
12
|
+
private readonly agentRunRepository;
|
|
13
|
+
constructor(agentRunRepository: IAgentRunRepository);
|
|
14
|
+
/**
|
|
15
|
+
* Get an agent run by ID.
|
|
16
|
+
*
|
|
17
|
+
* @param id - The agent run ID
|
|
18
|
+
* @returns The agent run or null if not found
|
|
19
|
+
*/
|
|
20
|
+
execute(id: string): Promise<AgentRun | null>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=get-agent-run.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/agents/get-agent-run.use-case.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAEhG;;GAEG;AACH,qBACa,kBAAkB;IAG3B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,mBAAmB;IAG1D;;;;;OAKG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;CAGpD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Agent Run Use Case
|
|
3
|
+
*
|
|
4
|
+
* Retrieves agent run details by ID for display purposes.
|
|
5
|
+
*/
|
|
6
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
7
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
10
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11
|
+
};
|
|
12
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
13
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
14
|
+
};
|
|
15
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
16
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
17
|
+
};
|
|
18
|
+
import { injectable, inject } from 'tsyringe';
|
|
19
|
+
/**
|
|
20
|
+
* Use case for getting a specific agent run by ID.
|
|
21
|
+
*/
|
|
22
|
+
let GetAgentRunUseCase = class GetAgentRunUseCase {
|
|
23
|
+
agentRunRepository;
|
|
24
|
+
constructor(agentRunRepository) {
|
|
25
|
+
this.agentRunRepository = agentRunRepository;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get an agent run by ID.
|
|
29
|
+
*
|
|
30
|
+
* @param id - The agent run ID
|
|
31
|
+
* @returns The agent run or null if not found
|
|
32
|
+
*/
|
|
33
|
+
async execute(id) {
|
|
34
|
+
return this.agentRunRepository.findById(id);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
GetAgentRunUseCase = __decorate([
|
|
38
|
+
injectable(),
|
|
39
|
+
__param(0, inject('IAgentRunRepository')),
|
|
40
|
+
__metadata("design:paramtypes", [Object])
|
|
41
|
+
], GetAgentRunUseCase);
|
|
42
|
+
export { GetAgentRunUseCase };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List Agent Runs Use Case
|
|
3
|
+
*
|
|
4
|
+
* Retrieves all agent runs for listing/display purposes.
|
|
5
|
+
*/
|
|
6
|
+
import type { AgentRun } from '../../../domain/generated/output.js';
|
|
7
|
+
import type { IAgentRunRepository } from '../../ports/output/agent-run-repository.interface.js';
|
|
8
|
+
/**
|
|
9
|
+
* Use case for listing all agent runs.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ListAgentRunsUseCase {
|
|
12
|
+
private readonly agentRunRepository;
|
|
13
|
+
constructor(agentRunRepository: IAgentRunRepository);
|
|
14
|
+
/**
|
|
15
|
+
* List all agent runs sorted by creation time (most recent first).
|
|
16
|
+
*
|
|
17
|
+
* @returns Array of agent runs sorted by createdAt descending
|
|
18
|
+
*/
|
|
19
|
+
execute(): Promise<AgentRun[]>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=list-agent-runs.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-agent-runs.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/agents/list-agent-runs.use-case.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAEhG;;GAEG;AACH,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,mBAAmB;IAG1D;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;CAoBrC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List Agent Runs Use Case
|
|
3
|
+
*
|
|
4
|
+
* Retrieves all agent runs for listing/display purposes.
|
|
5
|
+
*/
|
|
6
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
7
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
10
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11
|
+
};
|
|
12
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
13
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
14
|
+
};
|
|
15
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
16
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
17
|
+
};
|
|
18
|
+
import { injectable, inject } from 'tsyringe';
|
|
19
|
+
/**
|
|
20
|
+
* Use case for listing all agent runs.
|
|
21
|
+
*/
|
|
22
|
+
let ListAgentRunsUseCase = class ListAgentRunsUseCase {
|
|
23
|
+
agentRunRepository;
|
|
24
|
+
constructor(agentRunRepository) {
|
|
25
|
+
this.agentRunRepository = agentRunRepository;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* List all agent runs sorted by creation time (most recent first).
|
|
29
|
+
*
|
|
30
|
+
* @returns Array of agent runs sorted by createdAt descending
|
|
31
|
+
*/
|
|
32
|
+
async execute() {
|
|
33
|
+
const runs = await this.agentRunRepository.list();
|
|
34
|
+
return runs.sort((a, b) => {
|
|
35
|
+
const dateA = typeof a.createdAt === 'string'
|
|
36
|
+
? new Date(a.createdAt).getTime()
|
|
37
|
+
: a.createdAt instanceof Date
|
|
38
|
+
? a.createdAt.getTime()
|
|
39
|
+
: 0;
|
|
40
|
+
const dateB = typeof b.createdAt === 'string'
|
|
41
|
+
? new Date(b.createdAt).getTime()
|
|
42
|
+
: b.createdAt instanceof Date
|
|
43
|
+
? b.createdAt.getTime()
|
|
44
|
+
: 0;
|
|
45
|
+
return dateB - dateA; // Descending order (most recent first)
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
ListAgentRunsUseCase = __decorate([
|
|
50
|
+
injectable(),
|
|
51
|
+
__param(0, inject('IAgentRunRepository')),
|
|
52
|
+
__metadata("design:paramtypes", [Object])
|
|
53
|
+
], ListAgentRunsUseCase);
|
|
54
|
+
export { ListAgentRunsUseCase };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reject Agent Run Use Case
|
|
3
|
+
*
|
|
4
|
+
* Rejects a paused agent run (waiting_approval status) and
|
|
5
|
+
* marks it as cancelled with the rejection reason.
|
|
6
|
+
*/
|
|
7
|
+
import type { IAgentRunRepository } from '../../ports/output/agent-run-repository.interface.js';
|
|
8
|
+
export declare class RejectAgentRunUseCase {
|
|
9
|
+
private readonly agentRunRepository;
|
|
10
|
+
constructor(agentRunRepository: IAgentRunRepository);
|
|
11
|
+
execute(id: string, reason?: string): Promise<{
|
|
12
|
+
rejected: boolean;
|
|
13
|
+
reason: string;
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=reject-agent-run.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reject-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/agents/reject-agent-run.use-case.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAGhG,qBACa,qBAAqB;IAG9B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,mBAAmB;IAGpD,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAuB3F"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reject Agent Run Use Case
|
|
3
|
+
*
|
|
4
|
+
* Rejects a paused agent run (waiting_approval status) and
|
|
5
|
+
* marks it as cancelled with the rejection reason.
|
|
6
|
+
*/
|
|
7
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
|
+
};
|
|
13
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15
|
+
};
|
|
16
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
17
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
18
|
+
};
|
|
19
|
+
import { injectable, inject } from 'tsyringe';
|
|
20
|
+
import { AgentRunStatus } from '../../../domain/generated/output.js';
|
|
21
|
+
let RejectAgentRunUseCase = class RejectAgentRunUseCase {
|
|
22
|
+
agentRunRepository;
|
|
23
|
+
constructor(agentRunRepository) {
|
|
24
|
+
this.agentRunRepository = agentRunRepository;
|
|
25
|
+
}
|
|
26
|
+
async execute(id, reason) {
|
|
27
|
+
const run = await this.agentRunRepository.findById(id);
|
|
28
|
+
if (!run) {
|
|
29
|
+
return { rejected: false, reason: 'Agent run not found' };
|
|
30
|
+
}
|
|
31
|
+
if (run.status !== AgentRunStatus.waitingApproval) {
|
|
32
|
+
return {
|
|
33
|
+
rejected: false,
|
|
34
|
+
reason: `Agent run is not waiting for approval (status: ${run.status})`,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const now = new Date();
|
|
38
|
+
await this.agentRunRepository.updateStatus(id, AgentRunStatus.cancelled, {
|
|
39
|
+
approvalStatus: 'rejected',
|
|
40
|
+
error: reason ?? 'Rejected by user',
|
|
41
|
+
completedAt: now,
|
|
42
|
+
updatedAt: now,
|
|
43
|
+
});
|
|
44
|
+
return { rejected: true, reason: 'Rejected and cancelled' };
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
RejectAgentRunUseCase = __decorate([
|
|
48
|
+
injectable(),
|
|
49
|
+
__param(0, inject('IAgentRunRepository')),
|
|
50
|
+
__metadata("design:paramtypes", [Object])
|
|
51
|
+
], RejectAgentRunUseCase);
|
|
52
|
+
export { RejectAgentRunUseCase };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Show Agent Run Use Case
|
|
3
|
+
*
|
|
4
|
+
* Retrieves a single agent run by ID with process liveness check.
|
|
5
|
+
*
|
|
6
|
+
* Business Rules:
|
|
7
|
+
* - Tries exact ID match first, then prefix match via list()
|
|
8
|
+
* - Throws if the agent run does not exist
|
|
9
|
+
* - Checks process liveness for runs that have a pid
|
|
10
|
+
*/
|
|
11
|
+
import type { AgentRun } from '../../../domain/generated/output.js';
|
|
12
|
+
import type { IAgentRunRepository } from '../../ports/output/agent-run-repository.interface.js';
|
|
13
|
+
import type { IFeatureAgentProcessService } from '../../ports/output/feature-agent-process.interface.js';
|
|
14
|
+
export interface ShowAgentRunResult {
|
|
15
|
+
run: AgentRun;
|
|
16
|
+
isAlive: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare class ShowAgentRunUseCase {
|
|
19
|
+
private readonly runRepo;
|
|
20
|
+
private readonly processService;
|
|
21
|
+
constructor(runRepo: IAgentRunRepository, processService: IFeatureAgentProcessService);
|
|
22
|
+
execute(runId: string): Promise<ShowAgentRunResult>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=show-agent-run.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/agents/show-agent-run.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AAEzG,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,QAAQ,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,qBACa,mBAAmB;IAG5B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAExB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAFd,OAAO,EAAE,mBAAmB,EAE5B,cAAc,EAAE,2BAA2B;IAGxD,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAkB1D"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Show Agent Run Use Case
|
|
3
|
+
*
|
|
4
|
+
* Retrieves a single agent run by ID with process liveness check.
|
|
5
|
+
*
|
|
6
|
+
* Business Rules:
|
|
7
|
+
* - Tries exact ID match first, then prefix match via list()
|
|
8
|
+
* - Throws if the agent run does not exist
|
|
9
|
+
* - Checks process liveness for runs that have a pid
|
|
10
|
+
*/
|
|
11
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
12
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
13
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16
|
+
};
|
|
17
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
18
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
19
|
+
};
|
|
20
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
21
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
22
|
+
};
|
|
23
|
+
import { injectable, inject } from 'tsyringe';
|
|
24
|
+
let ShowAgentRunUseCase = class ShowAgentRunUseCase {
|
|
25
|
+
runRepo;
|
|
26
|
+
processService;
|
|
27
|
+
constructor(runRepo, processService) {
|
|
28
|
+
this.runRepo = runRepo;
|
|
29
|
+
this.processService = processService;
|
|
30
|
+
}
|
|
31
|
+
async execute(runId) {
|
|
32
|
+
// Try exact match first
|
|
33
|
+
let run = await this.runRepo.findById(runId);
|
|
34
|
+
// Fall back to prefix match
|
|
35
|
+
if (!run) {
|
|
36
|
+
const allRuns = await this.runRepo.list();
|
|
37
|
+
run = allRuns.find((r) => r.id.startsWith(runId)) ?? null;
|
|
38
|
+
}
|
|
39
|
+
if (!run) {
|
|
40
|
+
throw new Error(`Agent run not found: "${runId}"`);
|
|
41
|
+
}
|
|
42
|
+
const isAlive = run.pid != null ? this.processService.isAlive(run.pid) : false;
|
|
43
|
+
return { run, isAlive };
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
ShowAgentRunUseCase = __decorate([
|
|
47
|
+
injectable(),
|
|
48
|
+
__param(0, inject('IAgentRunRepository')),
|
|
49
|
+
__param(1, inject('IFeatureAgentProcessService')),
|
|
50
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
51
|
+
], ShowAgentRunUseCase);
|
|
52
|
+
export { ShowAgentRunUseCase };
|