@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,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Repository Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for Feature persistence operations.
|
|
5
|
+
* Implementations handle database-specific logic (SQLite, etc.).
|
|
6
|
+
*
|
|
7
|
+
* Following Clean Architecture:
|
|
8
|
+
* - Domain and Application layers depend on this interface
|
|
9
|
+
* - Infrastructure layer provides concrete implementations
|
|
10
|
+
*/
|
|
11
|
+
import type { Feature, SdlcLifecycle } from '../../../../domain/generated/output.js';
|
|
12
|
+
/**
|
|
13
|
+
* Filters for listing features.
|
|
14
|
+
*/
|
|
15
|
+
export interface FeatureListFilters {
|
|
16
|
+
repositoryPath?: string;
|
|
17
|
+
lifecycle?: SdlcLifecycle;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Repository interface for Feature entity persistence.
|
|
21
|
+
*
|
|
22
|
+
* Implementations must:
|
|
23
|
+
* - Handle database connection management
|
|
24
|
+
* - Provide thread-safe operations
|
|
25
|
+
* - Support query by slug + repositoryPath for uniqueness
|
|
26
|
+
*/
|
|
27
|
+
export interface IFeatureRepository {
|
|
28
|
+
/**
|
|
29
|
+
* Create a new feature record.
|
|
30
|
+
*
|
|
31
|
+
* @param feature - The feature to persist
|
|
32
|
+
*/
|
|
33
|
+
create(feature: Feature): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Find a feature by its unique ID.
|
|
36
|
+
*
|
|
37
|
+
* @param id - The feature ID
|
|
38
|
+
* @returns The feature or null if not found
|
|
39
|
+
*/
|
|
40
|
+
findById(id: string): Promise<Feature | null>;
|
|
41
|
+
/**
|
|
42
|
+
* Find a feature by an ID prefix (e.g. first 8 chars from `feat ls`).
|
|
43
|
+
*
|
|
44
|
+
* @param prefix - A prefix of the feature UUID
|
|
45
|
+
* @returns The feature if exactly one match, null if none, throws if ambiguous
|
|
46
|
+
*/
|
|
47
|
+
findByIdPrefix(prefix: string): Promise<Feature | null>;
|
|
48
|
+
/**
|
|
49
|
+
* Find a feature by its slug within a repository.
|
|
50
|
+
*
|
|
51
|
+
* @param slug - The URL-friendly feature identifier
|
|
52
|
+
* @param repositoryPath - The repository path to scope the search
|
|
53
|
+
* @returns The feature or null if not found
|
|
54
|
+
*/
|
|
55
|
+
findBySlug(slug: string, repositoryPath: string): Promise<Feature | null>;
|
|
56
|
+
/**
|
|
57
|
+
* List features with optional filters.
|
|
58
|
+
*
|
|
59
|
+
* @param filters - Optional filters for repositoryPath and lifecycle
|
|
60
|
+
* @returns Array of matching features
|
|
61
|
+
*/
|
|
62
|
+
list(filters?: FeatureListFilters): Promise<Feature[]>;
|
|
63
|
+
/**
|
|
64
|
+
* Update an existing feature.
|
|
65
|
+
*
|
|
66
|
+
* @param feature - The feature with updated fields
|
|
67
|
+
*/
|
|
68
|
+
update(feature: Feature): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Delete a feature by ID.
|
|
71
|
+
*
|
|
72
|
+
* @param id - The feature ID to delete
|
|
73
|
+
*/
|
|
74
|
+
delete(id: string): Promise<void>;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=feature-repository.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-repository.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/repositories/feature-repository.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAErF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAE9C;;;;;OAKG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAExD;;;;;;OAMG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAE1E;;;;;OAKG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAEvD;;;;OAIG;IACH,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;OAIG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Repository Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for Feature persistence operations.
|
|
5
|
+
* Implementations handle database-specific logic (SQLite, etc.).
|
|
6
|
+
*
|
|
7
|
+
* Following Clean Architecture:
|
|
8
|
+
* - Domain and Application layers depend on this interface
|
|
9
|
+
* - Infrastructure layer provides concrete implementations
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repository Output Ports
|
|
3
|
+
*
|
|
4
|
+
* Interfaces for data persistence operations.
|
|
5
|
+
*/
|
|
6
|
+
export type { IFeatureRepository, FeatureListFilters } from './feature-repository.interface.js';
|
|
7
|
+
export type { ISettingsRepository } from './settings.repository.interface.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/repositories/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAChG,YAAY,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Domain and Application layers depend on this interface
|
|
9
9
|
* - Infrastructure layer provides concrete implementations
|
|
10
10
|
*/
|
|
11
|
-
import type { Settings } from '
|
|
11
|
+
import type { Settings } from '../../../../domain/generated/output.js';
|
|
12
12
|
/**
|
|
13
13
|
* Repository interface for Settings entity persistence.
|
|
14
14
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.repository.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/repositories/settings.repository.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9C;;;;OAIG;IACH,IAAI,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAEjC;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External Issue Fetcher Port Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for fetching issues/tickets from external systems (GitHub, Jira).
|
|
5
|
+
* Returns a normalized ExternalIssue that can be appended to feature context.
|
|
6
|
+
*
|
|
7
|
+
* Following Clean Architecture:
|
|
8
|
+
* - Application layer depends on this interface
|
|
9
|
+
* - Infrastructure layer provides concrete implementations
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Normalized issue representation from any external source.
|
|
13
|
+
*/
|
|
14
|
+
export interface ExternalIssue {
|
|
15
|
+
title: string;
|
|
16
|
+
description: string;
|
|
17
|
+
labels: string[];
|
|
18
|
+
url: string;
|
|
19
|
+
source: 'github' | 'jira';
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Service interface for fetching issues from external systems.
|
|
23
|
+
*/
|
|
24
|
+
export interface IExternalIssueFetcher {
|
|
25
|
+
/**
|
|
26
|
+
* Fetch a GitHub issue by reference.
|
|
27
|
+
* Supports formats: owner/repo#123 or #123 (uses current repo).
|
|
28
|
+
*
|
|
29
|
+
* @param ref - GitHub issue reference (e.g., "owner/repo#42" or "#42")
|
|
30
|
+
* @returns Normalized external issue
|
|
31
|
+
* @throws IssueNotFoundError if issue doesn't exist
|
|
32
|
+
* @throws IssueServiceUnavailableError if gh CLI is not installed
|
|
33
|
+
*/
|
|
34
|
+
fetchGitHubIssue(ref: string): Promise<ExternalIssue>;
|
|
35
|
+
/**
|
|
36
|
+
* Fetch a Jira ticket by key.
|
|
37
|
+
*
|
|
38
|
+
* @param key - Jira ticket key (e.g., "PROJ-123")
|
|
39
|
+
* @returns Normalized external issue
|
|
40
|
+
* @throws IssueNotFoundError if ticket doesn't exist
|
|
41
|
+
* @throws IssueAuthenticationError if credentials are invalid
|
|
42
|
+
*/
|
|
43
|
+
fetchJiraTicket(key: string): Promise<ExternalIssue>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Base error for issue fetcher failures.
|
|
47
|
+
*/
|
|
48
|
+
export declare class IssueFetcherError extends Error {
|
|
49
|
+
constructor(message: string);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Thrown when the requested issue/ticket is not found.
|
|
53
|
+
*/
|
|
54
|
+
export declare class IssueNotFoundError extends IssueFetcherError {
|
|
55
|
+
constructor(message: string);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Thrown when authentication to the external service fails.
|
|
59
|
+
*/
|
|
60
|
+
export declare class IssueAuthenticationError extends IssueFetcherError {
|
|
61
|
+
constructor(message: string);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Thrown when the external service is unavailable (e.g., gh CLI not installed).
|
|
65
|
+
*/
|
|
66
|
+
export declare class IssueServiceUnavailableError extends IssueFetcherError {
|
|
67
|
+
constructor(message: string);
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=external-issue-fetcher.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-issue-fetcher.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/services/external-issue-fetcher.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;OAQG;IACH,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAEtD;;;;;;;OAOG;IACH,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CACtD;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,iBAAiB;gBAC3C,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,iBAAiB;gBACjD,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,iBAAiB;gBACrD,OAAO,EAAE,MAAM;CAI5B"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External Issue Fetcher Port Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for fetching issues/tickets from external systems (GitHub, Jira).
|
|
5
|
+
* Returns a normalized ExternalIssue that can be appended to feature context.
|
|
6
|
+
*
|
|
7
|
+
* Following Clean Architecture:
|
|
8
|
+
* - Application layer depends on this interface
|
|
9
|
+
* - Infrastructure layer provides concrete implementations
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Base error for issue fetcher failures.
|
|
13
|
+
*/
|
|
14
|
+
export class IssueFetcherError extends Error {
|
|
15
|
+
constructor(message) {
|
|
16
|
+
super(message);
|
|
17
|
+
this.name = 'IssueFetcherError';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Thrown when the requested issue/ticket is not found.
|
|
22
|
+
*/
|
|
23
|
+
export class IssueNotFoundError extends IssueFetcherError {
|
|
24
|
+
constructor(message) {
|
|
25
|
+
super(message);
|
|
26
|
+
this.name = 'IssueNotFoundError';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Thrown when authentication to the external service fails.
|
|
31
|
+
*/
|
|
32
|
+
export class IssueAuthenticationError extends IssueFetcherError {
|
|
33
|
+
constructor(message) {
|
|
34
|
+
super(message);
|
|
35
|
+
this.name = 'IssueAuthenticationError';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Thrown when the external service is unavailable (e.g., gh CLI not installed).
|
|
40
|
+
*/
|
|
41
|
+
export class IssueServiceUnavailableError extends IssueFetcherError {
|
|
42
|
+
constructor(message) {
|
|
43
|
+
super(message);
|
|
44
|
+
this.name = 'IssueServiceUnavailableError';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service Output Ports
|
|
3
|
+
*
|
|
4
|
+
* Interfaces for external services and integrations.
|
|
5
|
+
*/
|
|
6
|
+
export type { IExternalIssueFetcher, ExternalIssue } from './external-issue-fetcher.interface.js';
|
|
7
|
+
export { IssueFetcherError, IssueNotFoundError, IssueAuthenticationError, IssueServiceUnavailableError, } from './external-issue-fetcher.interface.js';
|
|
8
|
+
export type { ISpecInitializerService, SpecInitializerResult, } from './spec-initializer.interface.js';
|
|
9
|
+
export type { IVersionService } from './version-service.interface.js';
|
|
10
|
+
export type { IWebServerService } from './web-server-service.interface.js';
|
|
11
|
+
export type { IWorktreeService, WorktreeInfo } from './worktree-service.interface.js';
|
|
12
|
+
export { WorktreeError, WorktreeErrorCode } from './worktree-service.interface.js';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/services/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAClG,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EACV,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service Output Ports
|
|
3
|
+
*
|
|
4
|
+
* Interfaces for external services and integrations.
|
|
5
|
+
*/
|
|
6
|
+
export { IssueFetcherError, IssueNotFoundError, IssueAuthenticationError, IssueServiceUnavailableError, } from './external-issue-fetcher.interface.js';
|
|
7
|
+
export { WorktreeError, WorktreeErrorCode } from './worktree-service.interface.js';
|
|
@@ -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/services/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 {};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Domain and Application layers depend on this interface
|
|
9
9
|
* - Infrastructure layer provides concrete implementations
|
|
10
10
|
*/
|
|
11
|
-
import type { VersionInfo } from '
|
|
11
|
+
import type { VersionInfo } from '../../../../domain/value-objects/version-info.js';
|
|
12
12
|
/**
|
|
13
13
|
* Port interface for reading version information.
|
|
14
14
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/services/version-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAC;AAEpF;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,UAAU,IAAI,WAAW,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-server-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/application/ports/output/services/web-server-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/D;;OAEG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB"}
|
|
@@ -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/services/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/agents/agent-run-repository.interface.js';
|
|
8
|
+
import type { IFeatureAgentProcessService } from '../../ports/output/agents/feature-agent-process.interface.js';
|
|
9
|
+
import type { IFeatureRepository } from '../../ports/output/repositories/feature-repository.interface.js';
|
|
10
|
+
import type { IWorktreeService } from '../../ports/output/services/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,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAGlG,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 };
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* - Returns updated settings after persistence
|
|
12
12
|
*/
|
|
13
13
|
import type { Settings, AgentType, AgentAuthMethod } from '../../../domain/generated/output.js';
|
|
14
|
-
import type { ISettingsRepository } from '../../ports/output/settings.repository.interface.js';
|
|
15
|
-
import type { IAgentValidator } from '../../ports/output/agent-validator.interface.js';
|
|
14
|
+
import type { ISettingsRepository } from '../../ports/output/repositories/settings.repository.interface.js';
|
|
15
|
+
import type { IAgentValidator } from '../../ports/output/agents/agent-validator.interface.js';
|
|
16
16
|
/**
|
|
17
17
|
* Input for configuring an AI coding agent.
|
|
18
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure-agent.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/agents/configure-agent.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAChG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"configure-agent.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/application/use-cases/agents/configure-agent.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAChG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAC5G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AAE9F;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,qBACa,qBAAqB;IAG9B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAFd,kBAAkB,EAAE,mBAAmB,EAEvC,cAAc,EAAE,eAAe;IAGlD;;;;;;OAMG;IACG,OAAO,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC;CA+B7D"}
|
|
@@ -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/agents/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,6DAA6D,CAAC;AAGvG,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 };
|