@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,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Show Command
|
|
3
|
+
*
|
|
4
|
+
* Displays detailed information about a specific feature.
|
|
5
|
+
* Derives real-time status from the agent run.
|
|
6
|
+
*
|
|
7
|
+
* Usage: shep feat show <id>
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
export declare function createShowCommand(): Command;
|
|
11
|
+
//# sourceMappingURL=show.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/show.command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4DpC,wBAAgB,iBAAiB,IAAI,OAAO,CAyE3C"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Show Command
|
|
3
|
+
*
|
|
4
|
+
* Displays detailed information about a specific feature.
|
|
5
|
+
* Derives real-time status from the agent run.
|
|
6
|
+
*
|
|
7
|
+
* Usage: shep feat show <id>
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
import { createHash } from 'node:crypto';
|
|
11
|
+
import { join } from 'node:path';
|
|
12
|
+
import { container } from '../../../../infrastructure/di/container.js';
|
|
13
|
+
import { ShowFeatureUseCase } from '../../../../application/use-cases/features/show-feature.use-case.js';
|
|
14
|
+
import { colors, symbols, messages, renderDetailView } from '../../ui/index.js';
|
|
15
|
+
import { SHEP_HOME_DIR } from '../../../../infrastructure/services/filesystem/shep-directory.service.js';
|
|
16
|
+
function computeWorktreePath(repoPath, branch) {
|
|
17
|
+
const repoHash = createHash('sha256').update(repoPath).digest('hex').slice(0, 16);
|
|
18
|
+
const slug = branch.replace(/\//g, '-');
|
|
19
|
+
return join(SHEP_HOME_DIR, 'repos', repoHash, 'wt', slug);
|
|
20
|
+
}
|
|
21
|
+
/** Map graph node names to human-readable phase labels. */
|
|
22
|
+
const NODE_TO_PHASE = {
|
|
23
|
+
analyze: 'Analyzing',
|
|
24
|
+
requirements: 'Requirements',
|
|
25
|
+
research: 'Researching',
|
|
26
|
+
plan: 'Planning',
|
|
27
|
+
implement: 'Implementing',
|
|
28
|
+
};
|
|
29
|
+
function formatStatus(feature, run) {
|
|
30
|
+
if (!run) {
|
|
31
|
+
return `${colors.muted(symbols.dotEmpty)} ${colors.muted(feature.lifecycle)}`;
|
|
32
|
+
}
|
|
33
|
+
const isRunning = run.status === 'running' || run.status === 'pending';
|
|
34
|
+
const phase = run.result?.startsWith('node:')
|
|
35
|
+
? (NODE_TO_PHASE[run.result.slice(5)] ?? run.result.slice(5))
|
|
36
|
+
: feature.lifecycle;
|
|
37
|
+
if (isRunning) {
|
|
38
|
+
if (run.pid && !isProcessAlive(run.pid)) {
|
|
39
|
+
return `${colors.error(symbols.error)} ${colors.error('crashed')}`;
|
|
40
|
+
}
|
|
41
|
+
return `${colors.info(symbols.spinner[0])} ${colors.info(phase)}`;
|
|
42
|
+
}
|
|
43
|
+
if (run.status === 'completed')
|
|
44
|
+
return `${colors.success(symbols.success)} ${colors.success('Completed')}`;
|
|
45
|
+
if (run.status === 'failed')
|
|
46
|
+
return `${colors.error(symbols.error)} ${colors.error('Failed')}`;
|
|
47
|
+
if (run.status === 'waiting_approval')
|
|
48
|
+
return `${colors.warning(symbols.warning)} ${colors.warning(phase)}`;
|
|
49
|
+
if (run.status === 'interrupted')
|
|
50
|
+
return `${colors.error(symbols.error)} ${colors.error('Interrupted')}`;
|
|
51
|
+
return `${colors.muted(symbols.dotEmpty)} ${colors.muted(phase)}`;
|
|
52
|
+
}
|
|
53
|
+
function isProcessAlive(pid) {
|
|
54
|
+
try {
|
|
55
|
+
process.kill(pid, 0);
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export function createShowCommand() {
|
|
63
|
+
return new Command('show')
|
|
64
|
+
.description('Show feature details')
|
|
65
|
+
.argument('<id>', 'Feature ID')
|
|
66
|
+
.action(async (featureId) => {
|
|
67
|
+
try {
|
|
68
|
+
const useCase = container.resolve(ShowFeatureUseCase);
|
|
69
|
+
const runRepo = container.resolve('IAgentRunRepository');
|
|
70
|
+
const feature = await useCase.execute(featureId);
|
|
71
|
+
const run = feature.agentRunId ? await runRepo.findById(feature.agentRunId) : null;
|
|
72
|
+
const worktreePath = computeWorktreePath(feature.repositoryPath, feature.branch);
|
|
73
|
+
const formatTs = (ts) => {
|
|
74
|
+
if (ts instanceof Date)
|
|
75
|
+
return ts.toLocaleString();
|
|
76
|
+
return String(ts);
|
|
77
|
+
};
|
|
78
|
+
const textBlocks = [];
|
|
79
|
+
if (feature.plan) {
|
|
80
|
+
textBlocks.push({
|
|
81
|
+
title: 'Plan',
|
|
82
|
+
content: [`State ${feature.plan.state}`, `Tasks ${feature.plan.tasks.length}`].join('\n'),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (feature.messages.length > 0) {
|
|
86
|
+
const last5 = feature.messages
|
|
87
|
+
.slice(-5)
|
|
88
|
+
.map((m) => `${colors.muted(`${m.role}:`)} ${m.content.slice(0, 80)}`)
|
|
89
|
+
.join('\n');
|
|
90
|
+
textBlocks.push({
|
|
91
|
+
title: `Messages (${feature.messages.length})`,
|
|
92
|
+
content: last5,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
renderDetailView({
|
|
96
|
+
title: `Feature: ${feature.name}`,
|
|
97
|
+
sections: [
|
|
98
|
+
{
|
|
99
|
+
fields: [
|
|
100
|
+
{ label: 'ID', value: feature.id },
|
|
101
|
+
{ label: 'Slug', value: feature.slug },
|
|
102
|
+
{ label: 'Description', value: feature.description },
|
|
103
|
+
{ label: 'Repository', value: feature.repositoryPath },
|
|
104
|
+
{ label: 'Branch', value: colors.accent(feature.branch) },
|
|
105
|
+
{ label: 'Status', value: formatStatus(feature, run) },
|
|
106
|
+
{ label: 'Worktree', value: worktreePath },
|
|
107
|
+
{ label: 'Spec Dir', value: feature.specPath ?? null },
|
|
108
|
+
{ label: 'Agent Run', value: feature.agentRunId ?? null },
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
title: 'Timestamps',
|
|
113
|
+
fields: [
|
|
114
|
+
{ label: 'Created', value: formatTs(feature.createdAt) },
|
|
115
|
+
{ label: 'Updated', value: formatTs(feature.updatedAt) },
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
textBlocks,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
124
|
+
messages.error('Failed to show feature', err);
|
|
125
|
+
process.exitCode = 1;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
@@ -8,10 +8,14 @@
|
|
|
8
8
|
* shep [command] [options]
|
|
9
9
|
*
|
|
10
10
|
* Commands:
|
|
11
|
-
* shep
|
|
12
|
-
* shep version
|
|
13
|
-
* shep ui
|
|
14
|
-
* shep
|
|
11
|
+
* shep Show help
|
|
12
|
+
* shep version Display version information
|
|
13
|
+
* shep ui Start the web UI
|
|
14
|
+
* shep run Run an AI agent workflow
|
|
15
|
+
* shep agent Manage and view agent runs
|
|
16
|
+
* shep feat Manage features through the SDLC lifecycle
|
|
17
|
+
* shep settings Configure Shep settings
|
|
18
|
+
* shep --version Display version number only
|
|
15
19
|
*
|
|
16
20
|
* Global Options:
|
|
17
21
|
* -v, --version Display version number
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/index.ts"],"names":[],"mappings":";AAEA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,kBAAkB,CAAC"}
|
|
@@ -8,10 +8,14 @@
|
|
|
8
8
|
* shep [command] [options]
|
|
9
9
|
*
|
|
10
10
|
* Commands:
|
|
11
|
-
* shep
|
|
12
|
-
* shep version
|
|
13
|
-
* shep ui
|
|
14
|
-
* shep
|
|
11
|
+
* shep Show help
|
|
12
|
+
* shep version Display version information
|
|
13
|
+
* shep ui Start the web UI
|
|
14
|
+
* shep run Run an AI agent workflow
|
|
15
|
+
* shep agent Manage and view agent runs
|
|
16
|
+
* shep feat Manage features through the SDLC lifecycle
|
|
17
|
+
* shep settings Configure Shep settings
|
|
18
|
+
* shep --version Display version number only
|
|
15
19
|
*
|
|
16
20
|
* Global Options:
|
|
17
21
|
* -v, --version Display version number
|
|
@@ -24,6 +28,8 @@ import { createVersionCommand } from './commands/version.command.js';
|
|
|
24
28
|
import { createSettingsCommand } from './commands/settings/index.js';
|
|
25
29
|
import { createUiCommand } from './commands/ui.command.js';
|
|
26
30
|
import { createRunCommand } from './commands/run.command.js';
|
|
31
|
+
import { createAgentCommand } from './commands/agent/index.js';
|
|
32
|
+
import { createFeatCommand } from './commands/feat/index.js';
|
|
27
33
|
import { messages } from './ui/index.js';
|
|
28
34
|
// DI container and settings
|
|
29
35
|
import { initializeContainer, container } from '../../infrastructure/di/container.js';
|
|
@@ -70,6 +76,8 @@ async function bootstrap() {
|
|
|
70
76
|
program.addCommand(createSettingsCommand());
|
|
71
77
|
program.addCommand(createUiCommand());
|
|
72
78
|
program.addCommand(createRunCommand());
|
|
79
|
+
program.addCommand(createAgentCommand());
|
|
80
|
+
program.addCommand(createFeatCommand());
|
|
73
81
|
// Parse arguments (parseAsync needed for async command actions like init)
|
|
74
82
|
await program.parseAsync();
|
|
75
83
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System - Detail View
|
|
3
|
+
*
|
|
4
|
+
* Renders clean KEY VALUE displays for "show" commands.
|
|
5
|
+
* Aligned labels in muted color, grouped into optional sections,
|
|
6
|
+
* with support for text blocks (prompts, results, errors).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* renderDetailView({
|
|
10
|
+
* title: 'Agent Run',
|
|
11
|
+
* sections: [
|
|
12
|
+
* { fields: [{ label: 'ID', value: '123' }, { label: 'Status', value: colors.success('completed') }] },
|
|
13
|
+
* { title: 'Timing', fields: [{ label: 'Started', value: '...' }] },
|
|
14
|
+
* ],
|
|
15
|
+
* textBlocks: [{ title: 'Result', content: 'output here' }],
|
|
16
|
+
* });
|
|
17
|
+
*/
|
|
18
|
+
export interface DetailField {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string | undefined | null;
|
|
21
|
+
}
|
|
22
|
+
export interface DetailSection {
|
|
23
|
+
title?: string;
|
|
24
|
+
fields: DetailField[];
|
|
25
|
+
}
|
|
26
|
+
export interface DetailTextBlock {
|
|
27
|
+
title: string;
|
|
28
|
+
content: string;
|
|
29
|
+
color?: (text: string) => string;
|
|
30
|
+
}
|
|
31
|
+
export interface DetailViewConfig {
|
|
32
|
+
title: string;
|
|
33
|
+
sections: DetailSection[];
|
|
34
|
+
textBlocks?: DetailTextBlock[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Render a detail view to stdout.
|
|
38
|
+
*
|
|
39
|
+
* Fields with null/undefined values are silently skipped.
|
|
40
|
+
* Each section auto-aligns labels to the longest visible label in that section.
|
|
41
|
+
*/
|
|
42
|
+
export declare function renderDetailView(config: DetailViewConfig): void;
|
|
43
|
+
//# sourceMappingURL=detail-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detail-view.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/ui/detail-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;CAChC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAoC/D"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System - Detail View
|
|
3
|
+
*
|
|
4
|
+
* Renders clean KEY VALUE displays for "show" commands.
|
|
5
|
+
* Aligned labels in muted color, grouped into optional sections,
|
|
6
|
+
* with support for text blocks (prompts, results, errors).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* renderDetailView({
|
|
10
|
+
* title: 'Agent Run',
|
|
11
|
+
* sections: [
|
|
12
|
+
* { fields: [{ label: 'ID', value: '123' }, { label: 'Status', value: colors.success('completed') }] },
|
|
13
|
+
* { title: 'Timing', fields: [{ label: 'Started', value: '...' }] },
|
|
14
|
+
* ],
|
|
15
|
+
* textBlocks: [{ title: 'Result', content: 'output here' }],
|
|
16
|
+
* });
|
|
17
|
+
*/
|
|
18
|
+
import pc from 'picocolors';
|
|
19
|
+
import { colors } from './colors.js';
|
|
20
|
+
import { fmt } from './formatters.js';
|
|
21
|
+
/**
|
|
22
|
+
* Render a detail view to stdout.
|
|
23
|
+
*
|
|
24
|
+
* Fields with null/undefined values are silently skipped.
|
|
25
|
+
* Each section auto-aligns labels to the longest visible label in that section.
|
|
26
|
+
*/
|
|
27
|
+
export function renderDetailView(config) {
|
|
28
|
+
const lines = [];
|
|
29
|
+
lines.push('');
|
|
30
|
+
lines.push(` ${fmt.heading(config.title)}`);
|
|
31
|
+
for (const section of config.sections) {
|
|
32
|
+
const visible = section.fields.filter((f) => f.value != null);
|
|
33
|
+
if (visible.length === 0)
|
|
34
|
+
continue;
|
|
35
|
+
lines.push('');
|
|
36
|
+
if (section.title) {
|
|
37
|
+
lines.push(` ${pc.bold(section.title)}`);
|
|
38
|
+
}
|
|
39
|
+
const labelWidth = Math.max(...visible.map((f) => f.label.length)) + 2;
|
|
40
|
+
for (const field of visible) {
|
|
41
|
+
const padded = field.label.padEnd(labelWidth);
|
|
42
|
+
lines.push(` ${colors.muted(padded)}${field.value}`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (config.textBlocks) {
|
|
46
|
+
for (const block of config.textBlocks) {
|
|
47
|
+
lines.push('');
|
|
48
|
+
lines.push(` ${pc.bold(block.title)}`);
|
|
49
|
+
const text = block.color ? block.color(block.content) : block.content;
|
|
50
|
+
for (const line of text.split('\n')) {
|
|
51
|
+
lines.push(` ${line}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
lines.push('');
|
|
56
|
+
console.log(lines.join('\n'));
|
|
57
|
+
}
|
|
@@ -17,4 +17,6 @@ export { fmt, type Formatters } from './formatters.js';
|
|
|
17
17
|
export { messages, type Messages } from './messages.js';
|
|
18
18
|
export { TableFormatter, type DatabaseMeta } from './tables.js';
|
|
19
19
|
export { OutputFormatter, type OutputFormat } from './output.js';
|
|
20
|
+
export { renderDetailView, type DetailViewConfig, type DetailSection, type DetailField, type DetailTextBlock, } from './detail-view.js';
|
|
21
|
+
export { renderListView, type ListViewConfig, type ListColumn } from './list-view.js';
|
|
20
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -17,3 +17,5 @@ export { fmt } from './formatters.js';
|
|
|
17
17
|
export { messages } from './messages.js';
|
|
18
18
|
export { TableFormatter } from './tables.js';
|
|
19
19
|
export { OutputFormatter } from './output.js';
|
|
20
|
+
export { renderDetailView, } from './detail-view.js';
|
|
21
|
+
export { renderListView } from './list-view.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System - List View
|
|
3
|
+
*
|
|
4
|
+
* Renders clean, borderless columnar tables for "ls" commands.
|
|
5
|
+
* Muted column headers, aligned values, no ASCII grid lines.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* renderListView({
|
|
9
|
+
* title: 'Agent Runs',
|
|
10
|
+
* columns: [
|
|
11
|
+
* { label: 'ID', width: 10 },
|
|
12
|
+
* { label: 'Status', width: 14 },
|
|
13
|
+
* ],
|
|
14
|
+
* rows: [['9144a138', colors.info('running')]],
|
|
15
|
+
* });
|
|
16
|
+
*/
|
|
17
|
+
export interface ListColumn {
|
|
18
|
+
label: string;
|
|
19
|
+
width: number;
|
|
20
|
+
}
|
|
21
|
+
export interface ListViewConfig {
|
|
22
|
+
title: string;
|
|
23
|
+
columns: ListColumn[];
|
|
24
|
+
rows: string[][];
|
|
25
|
+
emptyMessage?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Render a list view to stdout.
|
|
29
|
+
*
|
|
30
|
+
* Columns are padded to their declared width (ANSI-aware).
|
|
31
|
+
* The last column is never padded so long values don't waste space.
|
|
32
|
+
*/
|
|
33
|
+
export declare function renderListView(config: ListViewConfig): void;
|
|
34
|
+
//# sourceMappingURL=list-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-view.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/ui/list-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CA+B3D"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Design System - List View
|
|
3
|
+
*
|
|
4
|
+
* Renders clean, borderless columnar tables for "ls" commands.
|
|
5
|
+
* Muted column headers, aligned values, no ASCII grid lines.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* renderListView({
|
|
9
|
+
* title: 'Agent Runs',
|
|
10
|
+
* columns: [
|
|
11
|
+
* { label: 'ID', width: 10 },
|
|
12
|
+
* { label: 'Status', width: 14 },
|
|
13
|
+
* ],
|
|
14
|
+
* rows: [['9144a138', colors.info('running')]],
|
|
15
|
+
* });
|
|
16
|
+
*/
|
|
17
|
+
import { colors } from './colors.js';
|
|
18
|
+
import { fmt } from './formatters.js';
|
|
19
|
+
import { messages } from './messages.js';
|
|
20
|
+
/**
|
|
21
|
+
* Render a list view to stdout.
|
|
22
|
+
*
|
|
23
|
+
* Columns are padded to their declared width (ANSI-aware).
|
|
24
|
+
* The last column is never padded so long values don't waste space.
|
|
25
|
+
*/
|
|
26
|
+
export function renderListView(config) {
|
|
27
|
+
if (config.rows.length === 0) {
|
|
28
|
+
messages.newline();
|
|
29
|
+
messages.info(config.emptyMessage ?? 'No items found');
|
|
30
|
+
messages.newline();
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const lines = [];
|
|
34
|
+
lines.push('');
|
|
35
|
+
lines.push(` ${fmt.heading(`${config.title} (${config.rows.length})`)}`);
|
|
36
|
+
lines.push('');
|
|
37
|
+
// Header
|
|
38
|
+
const header = config.columns.map((col) => colors.muted(col.label.padEnd(col.width))).join(' ');
|
|
39
|
+
lines.push(` ${header}`);
|
|
40
|
+
// Data rows
|
|
41
|
+
for (const row of config.rows) {
|
|
42
|
+
const cells = row.map((cell, i) => {
|
|
43
|
+
// Don't pad the last column
|
|
44
|
+
if (i === row.length - 1)
|
|
45
|
+
return cell;
|
|
46
|
+
const width = config.columns[i]?.width ?? 10;
|
|
47
|
+
return ansiPad(cell, width);
|
|
48
|
+
});
|
|
49
|
+
lines.push(` ${cells.join(' ')}`);
|
|
50
|
+
}
|
|
51
|
+
lines.push('');
|
|
52
|
+
console.log(lines.join('\n'));
|
|
53
|
+
}
|
|
54
|
+
/** Pad a string that may contain ANSI escape codes to a visible width. */
|
|
55
|
+
function ansiPad(text, width) {
|
|
56
|
+
const visible = stripAnsi(text).length;
|
|
57
|
+
if (visible >= width)
|
|
58
|
+
return text;
|
|
59
|
+
return text + ' '.repeat(width - visible);
|
|
60
|
+
}
|
|
61
|
+
/** Strip ANSI escape sequences to get visible character count. */
|
|
62
|
+
function stripAnsi(text) {
|
|
63
|
+
// eslint-disable-next-line no-control-regex
|
|
64
|
+
return text.replace(/\x1B\[[0-9;]*m/g, '');
|
|
65
|
+
}
|
|
@@ -28,8 +28,12 @@ export declare const symbols: {
|
|
|
28
28
|
readonly pointer: "❯" | ">";
|
|
29
29
|
/** Ellipsis for loading/truncation */
|
|
30
30
|
readonly ellipsis: "…" | "...";
|
|
31
|
+
/** Filled status dot */
|
|
32
|
+
readonly dot: "*" | "●";
|
|
33
|
+
/** Empty status dot */
|
|
34
|
+
readonly dotEmpty: "○" | "o";
|
|
31
35
|
/** Line separator */
|
|
32
|
-
readonly line: "
|
|
36
|
+
readonly line: "-" | "─";
|
|
33
37
|
/** Spinner frames for loading animation */
|
|
34
38
|
readonly spinner: string[];
|
|
35
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/ui/symbols.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAkCH;;GAEG;AACH,eAAO,MAAM,OAAO;IAClB,wBAAwB;;IAExB,kBAAkB;;IAElB,uBAAuB;;IAEvB,kBAAkB;;IAElB,oBAAoB;;IAEpB,mBAAmB;;IAEnB,oBAAoB;;IAEpB,sCAAsC;;IAEtC,qBAAqB;;IAErB,2CAA2C;;CAEnC,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/ui/symbols.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAkCH;;GAEG;AACH,eAAO,MAAM,OAAO;IAClB,wBAAwB;;IAExB,kBAAkB;;IAElB,uBAAuB;;IAEvB,kBAAkB;;IAElB,oBAAoB;;IAEpB,mBAAmB;;IAEnB,oBAAoB;;IAEpB,sCAAsC;;IAEtC,wBAAwB;;IAExB,uBAAuB;;IAEvB,qBAAqB;;IAErB,2CAA2C;;CAEnC,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC"}
|
|
@@ -58,6 +58,10 @@ export const symbols = {
|
|
|
58
58
|
pointer: unicode ? '❯' : '>',
|
|
59
59
|
/** Ellipsis for loading/truncation */
|
|
60
60
|
ellipsis: unicode ? '…' : '...',
|
|
61
|
+
/** Filled status dot */
|
|
62
|
+
dot: unicode ? '●' : '*',
|
|
63
|
+
/** Empty status dot */
|
|
64
|
+
dotEmpty: unicode ? '○' : 'o',
|
|
61
65
|
/** Line separator */
|
|
62
66
|
line: unicode ? '─' : '-',
|
|
63
67
|
/** Spinner frames for loading animation */
|