@shepai/cli 1.14.2 → 1.15.1
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/{agent-executor-factory.interface.d.ts → agents/agent-executor-factory.interface.d.ts} +1 -1
- package/dist/src/application/ports/output/agents/agent-executor-factory.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/{agent-executor.interface.d.ts → agents/agent-executor.interface.d.ts} +1 -1
- package/dist/src/application/ports/output/agents/agent-executor.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/{agent-registry.interface.d.ts → agents/agent-registry.interface.d.ts} +1 -1
- package/dist/src/application/ports/output/agents/agent-registry.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/{agent-run-repository.interface.d.ts → agents/agent-run-repository.interface.d.ts} +1 -1
- package/dist/src/application/ports/output/agents/agent-run-repository.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/{agent-runner.interface.d.ts → agents/agent-runner.interface.d.ts} +1 -1
- package/dist/src/application/ports/output/agents/agent-runner.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/{agent-validator.interface.d.ts → agents/agent-validator.interface.d.ts} +1 -1
- package/dist/src/application/ports/output/agents/agent-validator.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/agents/feature-agent-process.interface.d.ts +44 -0
- package/dist/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/agents/feature-agent-process.interface.js +12 -0
- package/dist/src/application/ports/output/agents/index.d.ts +13 -0
- package/dist/src/application/ports/output/agents/index.d.ts.map +1 -0
- package/dist/src/application/ports/output/agents/index.js +6 -0
- package/dist/src/application/ports/output/index.d.ts +8 -11
- package/dist/src/application/ports/output/index.d.ts.map +1 -1
- package/dist/src/application/ports/output/index.js +5 -3
- package/dist/src/application/ports/output/repositories/feature-repository.interface.d.ts +76 -0
- package/dist/src/application/ports/output/repositories/feature-repository.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/repositories/feature-repository.interface.js +11 -0
- package/dist/src/application/ports/output/repositories/index.d.ts +8 -0
- package/dist/src/application/ports/output/repositories/index.d.ts.map +1 -0
- package/dist/src/application/ports/output/repositories/index.js +6 -0
- package/dist/src/application/ports/output/{settings.repository.interface.d.ts → repositories/settings.repository.interface.d.ts} +1 -1
- package/dist/src/application/ports/output/repositories/settings.repository.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/services/external-issue-fetcher.interface.d.ts +69 -0
- package/dist/src/application/ports/output/services/external-issue-fetcher.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/services/external-issue-fetcher.interface.js +46 -0
- package/dist/src/application/ports/output/services/index.d.ts +13 -0
- package/dist/src/application/ports/output/services/index.d.ts.map +1 -0
- package/dist/src/application/ports/output/services/index.js +7 -0
- package/dist/src/application/ports/output/services/spec-initializer.interface.d.ts +33 -0
- package/dist/src/application/ports/output/services/spec-initializer.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/services/spec-initializer.interface.js +8 -0
- package/dist/src/application/ports/output/{version-service.interface.d.ts → services/version-service.interface.d.ts} +1 -1
- package/dist/src/application/ports/output/services/version-service.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/services/web-server-service.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/services/worktree-service.interface.d.ts +83 -0
- package/dist/src/application/ports/output/services/worktree-service.interface.d.ts.map +1 -0
- package/dist/src/application/ports/output/services/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/configure-agent.use-case.d.ts +2 -2
- package/dist/src/application/use-cases/agents/configure-agent.use-case.d.ts.map +1 -1
- 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/run-agent.use-case.d.ts +2 -2
- package/dist/src/application/use-cases/agents/run-agent.use-case.d.ts.map +1 -1
- 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/agents/validate-agent-auth.use-case.d.ts +1 -1
- package/dist/src/application/use-cases/agents/validate-agent-auth.use-case.d.ts.map +1 -1
- 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/application/use-cases/settings/initialize-settings.use-case.d.ts +1 -1
- package/dist/src/application/use-cases/settings/initialize-settings.use-case.d.ts.map +1 -1
- package/dist/src/application/use-cases/settings/load-settings.use-case.d.ts +1 -1
- package/dist/src/application/use-cases/settings/load-settings.use-case.d.ts.map +1 -1
- package/dist/src/application/use-cases/settings/update-settings.use-case.d.ts +1 -1
- package/dist/src/application/use-cases/settings/update-settings.use-case.d.ts.map +1 -1
- 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 +1 -1
- 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/repositories/sqlite-settings.repository.d.ts +1 -1
- package/dist/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
- package/dist/src/infrastructure/services/agents/{langgraph → analyze-repo}/analyze-repository-graph.d.ts +1 -23
- 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/agents/streaming/streaming-executor-proxy.d.ts +1 -1
- package/dist/src/infrastructure/services/agents/streaming/streaming-executor-proxy.d.ts.map +1 -1
- 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/infrastructure/services/web-server.service.d.ts +1 -1
- package/dist/src/infrastructure/services/web-server.service.d.ts.map +1 -1
- 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/application/ports/output/agent-executor-factory.interface.d.ts.map +0 -1
- package/dist/src/application/ports/output/agent-executor.interface.d.ts.map +0 -1
- package/dist/src/application/ports/output/agent-registry.interface.d.ts.map +0 -1
- package/dist/src/application/ports/output/agent-run-repository.interface.d.ts.map +0 -1
- package/dist/src/application/ports/output/agent-runner.interface.d.ts.map +0 -1
- package/dist/src/application/ports/output/agent-validator.interface.d.ts.map +0 -1
- package/dist/src/application/ports/output/settings.repository.interface.d.ts.map +0 -1
- package/dist/src/application/ports/output/version-service.interface.d.ts.map +0 -1
- package/dist/src/application/ports/output/web-server-service.interface.d.ts.map +0 -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/application/ports/output/{agent-executor-factory.interface.js → agents/agent-executor-factory.interface.js} +0 -0
- /package/dist/src/application/ports/output/{agent-executor.interface.js → agents/agent-executor.interface.js} +0 -0
- /package/dist/src/application/ports/output/{agent-registry.interface.js → agents/agent-registry.interface.js} +0 -0
- /package/dist/src/application/ports/output/{agent-run-repository.interface.js → agents/agent-run-repository.interface.js} +0 -0
- /package/dist/src/application/ports/output/{agent-runner.interface.js → agents/agent-runner.interface.js} +0 -0
- /package/dist/src/application/ports/output/{agent-validator.interface.js → agents/agent-validator.interface.js} +0 -0
- /package/dist/src/application/ports/output/{settings.repository.interface.js → repositories/settings.repository.interface.js} +0 -0
- /package/dist/src/application/ports/output/{version-service.interface.js → services/version-service.interface.js} +0 -0
- /package/dist/src/application/ports/output/{web-server-service.interface.d.ts → services/web-server-service.interface.d.ts} +0 -0
- /package/dist/src/application/ports/output/{web-server-service.interface.js → services/web-server-service.interface.js} +0 -0
- /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 → iYaq62xFNOChDTbH3WMrr}/_buildManifest.js +0 -0
- /package/web/.next/static/{rCkFI74-eja9LrkBfHFpp → iYaq62xFNOChDTbH3WMrr}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{rCkFI74-eja9LrkBfHFpp → iYaq62xFNOChDTbH3WMrr}/_ssgManifest.js +0 -0
|
@@ -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/agents/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,6DAA6D,CAAC;AAEvG;;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/agents/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,6DAA6D,CAAC;AAEvG;;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/agents/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,6DAA6D,CAAC;AAGvG,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 };
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* - Options are passed through to the runner as-is
|
|
11
11
|
*/
|
|
12
12
|
import type { AgentRun, AgentRunEvent } from '../../../domain/generated/output.js';
|
|
13
|
-
import type { IAgentRunner, AgentRunOptions } from '../../ports/output/agent-runner.interface.js';
|
|
14
|
-
import type { IAgentRegistry } from '../../ports/output/agent-registry.interface.js';
|
|
13
|
+
import type { IAgentRunner, AgentRunOptions } from '../../ports/output/agents/agent-runner.interface.js';
|
|
14
|
+
import type { IAgentRegistry } from '../../ports/output/agents/agent-registry.interface.js';
|
|
15
15
|
/**
|
|
16
16
|
* Input for running an agent workflow.
|
|
17
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-agent.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/agents/run-agent.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"run-agent.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/agents/run-agent.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EAChB,MAAM,qDAAqD,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uDAAuD,CAAC;AAE5F;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,qBACa,eAAe;IAGxB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAFb,WAAW,EAAE,YAAY,EAEzB,aAAa,EAAE,cAAc;IAGhD;;;;;;OAMG;IACG,OAAO,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC;IAYtD;;;;;;OAMG;IACI,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,CAAC,aAAa,CAAC;CAWzE"}
|
|
@@ -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/agents/agent-run-repository.interface.js';
|
|
13
|
+
import type { IFeatureAgentProcessService } from '../../ports/output/agents/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,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAEhH,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 };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stop Agent Run Use Case
|
|
3
|
+
*
|
|
4
|
+
* Sends SIGTERM to a running agent's worker process and marks it as cancelled.
|
|
5
|
+
*/
|
|
6
|
+
import type { IAgentRunRepository } from '../../ports/output/agents/agent-run-repository.interface.js';
|
|
7
|
+
export declare class StopAgentRunUseCase {
|
|
8
|
+
private readonly agentRunRepository;
|
|
9
|
+
constructor(agentRunRepository: IAgentRunRepository);
|
|
10
|
+
execute(id: string): Promise<{
|
|
11
|
+
stopped: boolean;
|
|
12
|
+
reason: string;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=stop-agent-run.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stop-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/agents/stop-agent-run.use-case.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AAGvG,qBACa,mBAAmB;IAG5B,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;CA4DzE"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stop Agent Run Use Case
|
|
3
|
+
*
|
|
4
|
+
* Sends SIGTERM to a running agent's worker process and marks it as cancelled.
|
|
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
|
+
import { AgentRunStatus } from '../../../domain/generated/output.js';
|
|
20
|
+
let StopAgentRunUseCase = class StopAgentRunUseCase {
|
|
21
|
+
agentRunRepository;
|
|
22
|
+
constructor(agentRunRepository) {
|
|
23
|
+
this.agentRunRepository = agentRunRepository;
|
|
24
|
+
}
|
|
25
|
+
async execute(id) {
|
|
26
|
+
const run = await this.agentRunRepository.findById(id);
|
|
27
|
+
if (!run) {
|
|
28
|
+
return { stopped: false, reason: 'Agent run not found' };
|
|
29
|
+
}
|
|
30
|
+
const terminalStatuses = new Set([
|
|
31
|
+
AgentRunStatus.completed,
|
|
32
|
+
AgentRunStatus.failed,
|
|
33
|
+
AgentRunStatus.interrupted,
|
|
34
|
+
AgentRunStatus.cancelled,
|
|
35
|
+
]);
|
|
36
|
+
if (terminalStatuses.has(run.status)) {
|
|
37
|
+
return { stopped: false, reason: `Agent run already in terminal state: ${run.status}` };
|
|
38
|
+
}
|
|
39
|
+
if (!run.pid) {
|
|
40
|
+
// No PID — just mark as cancelled
|
|
41
|
+
const now = new Date();
|
|
42
|
+
await this.agentRunRepository.updateStatus(id, AgentRunStatus.cancelled, {
|
|
43
|
+
error: 'Cancelled by user (no PID)',
|
|
44
|
+
completedAt: now,
|
|
45
|
+
updatedAt: now,
|
|
46
|
+
});
|
|
47
|
+
return { stopped: true, reason: 'Marked as cancelled (no PID to signal)' };
|
|
48
|
+
}
|
|
49
|
+
// Check if process is alive
|
|
50
|
+
let alive = false;
|
|
51
|
+
try {
|
|
52
|
+
process.kill(run.pid, 0);
|
|
53
|
+
alive = true;
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
alive = false;
|
|
57
|
+
}
|
|
58
|
+
if (alive) {
|
|
59
|
+
// Send SIGTERM for graceful shutdown
|
|
60
|
+
try {
|
|
61
|
+
process.kill(run.pid, 'SIGTERM');
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// Process may have died between check and signal
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const now = new Date();
|
|
68
|
+
await this.agentRunRepository.updateStatus(id, AgentRunStatus.cancelled, {
|
|
69
|
+
error: 'Cancelled by user',
|
|
70
|
+
completedAt: now,
|
|
71
|
+
updatedAt: now,
|
|
72
|
+
});
|
|
73
|
+
return {
|
|
74
|
+
stopped: true,
|
|
75
|
+
reason: alive
|
|
76
|
+
? `Sent SIGTERM to PID ${run.pid}`
|
|
77
|
+
: `Process already dead, marked as cancelled`,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
StopAgentRunUseCase = __decorate([
|
|
82
|
+
injectable(),
|
|
83
|
+
__param(0, inject('IAgentRunRepository')),
|
|
84
|
+
__metadata("design:paramtypes", [Object])
|
|
85
|
+
], StopAgentRunUseCase);
|
|
86
|
+
export { StopAgentRunUseCase };
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - Returns validation result with version or error details
|
|
10
10
|
*/
|
|
11
11
|
import type { AgentType } from '../../../domain/generated/output.js';
|
|
12
|
-
import type { IAgentValidator, AgentValidationResult } from '../../ports/output/agent-validator.interface.js';
|
|
12
|
+
import type { IAgentValidator, AgentValidationResult } from '../../ports/output/agents/agent-validator.interface.js';
|
|
13
13
|
/**
|
|
14
14
|
* Use case for validating agent availability.
|
|
15
15
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-agent-auth.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/agents/validate-agent-auth.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,
|
|
1
|
+
{"version":3,"file":"validate-agent-auth.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/agents/validate-agent-auth.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,wDAAwD,CAAC;AAEhE;;;;;;GAMG;AACH,qBACa,wBAAwB;IAGjC,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,eAAe;IAGlD;;;;;OAKG;IACG,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAGpE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create Feature Use Case
|
|
3
|
+
*
|
|
4
|
+
* Creates a new feature entity with a git worktree for isolated development,
|
|
5
|
+
* initializes the spec directory with YAML templates, then spawns the
|
|
6
|
+
* feature agent to begin autonomous SDLC processing.
|
|
7
|
+
*
|
|
8
|
+
* Business Rules:
|
|
9
|
+
* - AI generates slug/name/description from user's free-text input
|
|
10
|
+
* - Falls back to regex-based slug if AI fails
|
|
11
|
+
* - Full user input is preserved as-is in spec.yaml
|
|
12
|
+
* - Slug must be unique within the repository
|
|
13
|
+
* - A git worktree is created at ~/.shep/repos/HASH/wt/SLUG/
|
|
14
|
+
* - Spec YAML files are scaffolded at WORKTREE/specs/NNN-SLUG/
|
|
15
|
+
* - Feature agent is spawned with the spec dir path
|
|
16
|
+
* - specPath is persisted on the Feature record
|
|
17
|
+
* - Initial lifecycle is Requirements
|
|
18
|
+
*/
|
|
19
|
+
import type { Feature } from '../../../domain/generated/output.js';
|
|
20
|
+
import type { IFeatureRepository } from '../../ports/output/repositories/feature-repository.interface.js';
|
|
21
|
+
import type { IWorktreeService } from '../../ports/output/services/worktree-service.interface.js';
|
|
22
|
+
import type { IFeatureAgentProcessService } from '../../ports/output/agents/feature-agent-process.interface.js';
|
|
23
|
+
import type { IAgentRunRepository } from '../../ports/output/agents/agent-run-repository.interface.js';
|
|
24
|
+
import type { ISpecInitializerService } from '../../ports/output/services/spec-initializer.interface.js';
|
|
25
|
+
import type { IAgentExecutorFactory } from '../../ports/output/agents/agent-executor-factory.interface.js';
|
|
26
|
+
export interface CreateFeatureInput {
|
|
27
|
+
userInput: string;
|
|
28
|
+
repositoryPath: string;
|
|
29
|
+
approvalMode?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare class CreateFeatureUseCase {
|
|
32
|
+
private readonly featureRepo;
|
|
33
|
+
private readonly worktreeService;
|
|
34
|
+
private readonly agentProcess;
|
|
35
|
+
private readonly runRepository;
|
|
36
|
+
private readonly specInitializer;
|
|
37
|
+
private readonly executorFactory;
|
|
38
|
+
constructor(featureRepo: IFeatureRepository, worktreeService: IWorktreeService, agentProcess: IFeatureAgentProcessService, runRepository: IAgentRunRepository, specInitializer: ISpecInitializerService, executorFactory: IAgentExecutorFactory);
|
|
39
|
+
execute(input: CreateFeatureInput): Promise<Feature>;
|
|
40
|
+
private generateMetadata;
|
|
41
|
+
private toSlug;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=create-feature.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/features/create-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAClG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AAO3G,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAQD,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAVf,WAAW,EAAE,kBAAkB,EAE/B,eAAe,EAAE,gBAAgB,EAEjC,YAAY,EAAE,2BAA2B,EAEzC,aAAa,EAAE,mBAAmB,EAElC,eAAe,EAAE,uBAAuB,EAExC,eAAe,EAAE,qBAAqB;IAGnD,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;YA8E5C,gBAAgB;IA6C9B,OAAO,CAAC,MAAM;CAQf"}
|