@shepai/cli 1.37.3 → 1.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts +1 -0
- package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.d.ts +5 -4
- package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.js +36 -14
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts +12 -3
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js +88 -8
- package/dist/packages/core/src/application/use-cases/agents/review-feature.use-case.d.ts +35 -0
- package/dist/packages/core/src/application/use-cases/agents/review-feature.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/agents/review-feature.use-case.js +88 -0
- package/dist/packages/core/src/application/use-cases/features/get-feature-artifact.use-case.d.ts +19 -0
- package/dist/packages/core/src/application/use-cases/features/get-feature-artifact.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/features/get-feature-artifact.use-case.js +52 -0
- package/dist/packages/core/src/application/use-cases/features/get-research-artifact.use-case.d.ts +19 -0
- package/dist/packages/core/src/application/use-cases/features/get-research-artifact.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/features/get-research-artifact.use-case.js +52 -0
- package/dist/packages/core/src/domain/factories/spec-yaml-parser.d.ts.map +1 -1
- package/dist/packages/core/src/domain/factories/spec-yaml-parser.js +3 -1
- package/dist/packages/core/src/domain/generated/output.d.ts +186 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +16 -2
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +51 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.js +21 -2
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +3 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +31 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts +19 -3
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +101 -16
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.d.ts +2 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.js +59 -9
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/research.prompt.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/research.prompt.js +14 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.d.ts +3 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.js +28 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts +3 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.js +13 -0
- package/dist/packages/core/src/infrastructure/services/notifications/notification-bus.d.ts +2 -17
- package/dist/packages/core/src/infrastructure/services/notifications/notification-bus.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/notifications/notification-bus.js +3 -27
- package/dist/src/presentation/cli/commands/agent/reject.command.js +1 -1
- package/dist/src/presentation/cli/commands/feat/reject.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/reject.command.js +6 -4
- package/dist/src/presentation/cli/commands/feat/review.command.d.ts +3 -2
- package/dist/src/presentation/cli/commands/feat/review.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/review.command.js +87 -12
- package/dist/src/presentation/cli/commands/feat/show.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/show.command.js +38 -3
- package/dist/src/presentation/tui/prompts/prd-review-question.prompt.d.ts +30 -0
- package/dist/src/presentation/tui/prompts/prd-review-question.prompt.d.ts.map +1 -0
- package/dist/src/presentation/tui/prompts/prd-review-question.prompt.js +23 -0
- package/dist/src/presentation/tui/prompts/prd-review-summary.prompt.d.ts +29 -0
- package/dist/src/presentation/tui/prompts/prd-review-summary.prompt.d.ts.map +1 -0
- package/dist/src/presentation/tui/prompts/prd-review-summary.prompt.js +29 -0
- package/dist/src/presentation/tui/wizards/merge-review.wizard.d.ts +13 -0
- package/dist/src/presentation/tui/wizards/merge-review.wizard.d.ts.map +1 -0
- package/dist/src/presentation/tui/wizards/merge-review.wizard.js +43 -0
- package/dist/src/presentation/tui/wizards/plan-review.wizard.d.ts +13 -0
- package/dist/src/presentation/tui/wizards/plan-review.wizard.d.ts.map +1 -0
- package/dist/src/presentation/tui/wizards/plan-review.wizard.js +43 -0
- package/dist/src/presentation/tui/wizards/prd-review.wizard.d.ts +26 -0
- package/dist/src/presentation/tui/wizards/prd-review.wizard.d.ts.map +1 -0
- package/dist/src/presentation/tui/wizards/prd-review.wizard.js +42 -0
- package/dist/src/presentation/web/app/actions/approve-feature.d.ts +5 -0
- package/dist/src/presentation/web/app/actions/approve-feature.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/approve-feature.js +27 -0
- package/dist/src/presentation/web/app/actions/create-feature.d.ts +22 -0
- package/dist/src/presentation/web/app/actions/create-feature.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/create-feature.js +41 -0
- package/dist/src/presentation/web/app/actions/delete-feature.d.ts +6 -0
- package/dist/src/presentation/web/app/actions/delete-feature.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/delete-feature.js +16 -0
- package/dist/src/presentation/web/app/actions/get-feature-artifact.d.ts +10 -0
- package/dist/src/presentation/web/app/actions/get-feature-artifact.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/get-feature-artifact.js +43 -0
- package/dist/src/presentation/web/app/actions/get-research-artifact.d.ts +14 -0
- package/dist/src/presentation/web/app/actions/get-research-artifact.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/get-research-artifact.js +25 -0
- package/dist/src/presentation/web/app/actions/open-folder.d.ts +6 -0
- package/dist/src/presentation/web/app/actions/open-folder.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/open-folder.js +39 -0
- package/dist/src/presentation/web/app/actions/open-ide.d.ts +12 -0
- package/dist/src/presentation/web/app/actions/open-ide.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/open-ide.js +22 -0
- package/dist/src/presentation/web/app/actions/open-shell.d.ts +12 -0
- package/dist/src/presentation/web/app/actions/open-shell.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/open-shell.js +45 -0
- package/dist/src/presentation/web/app/actions/pick-folder.d.ts +5 -0
- package/dist/src/presentation/web/app/actions/pick-folder.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/pick-folder.js +13 -0
- package/dist/src/presentation/web/app/api/agent-events/route.d.ts +1 -1
- package/dist/src/presentation/web/app/api/agent-events/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/agent-events/route.js +2 -9
- package/dist/src/presentation/web/app/api/dialog/pick-files/route.d.ts +1 -9
- package/dist/src/presentation/web/app/api/dialog/pick-files/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/dialog/pick-files/route.js +3 -6
- package/dist/src/presentation/web/app/page.d.ts.map +1 -1
- package/dist/src/presentation/web/app/page.js +1 -0
- package/dist/src/presentation/web/components/common/add-repository-node/pick-folder.d.ts +1 -1
- package/dist/src/presentation/web/components/common/add-repository-node/pick-folder.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/add-repository-node/pick-folder.js +6 -7
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/pick-files.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/pick-files.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/pick-files.js +6 -7
- package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.js +7 -7
- package/dist/src/presentation/web/components/common/feature-drawer/use-feature-actions.d.ts +4 -0
- package/dist/src/presentation/web/components/common/feature-drawer/use-feature-actions.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer/use-feature-actions.js +52 -14
- package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.js +2 -2
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +2 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.js +33 -2
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.js +10 -0
- package/dist/src/presentation/web/components/common/index.d.ts +3 -0
- package/dist/src/presentation/web/components/common/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/index.js +3 -0
- package/dist/src/presentation/web/components/common/notification-permission-banner/index.d.ts +2 -0
- package/dist/src/presentation/web/components/common/notification-permission-banner/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/notification-permission-banner/index.js +1 -0
- package/dist/src/presentation/web/components/common/notification-permission-banner/notification-permission-banner.d.ts +2 -0
- package/dist/src/presentation/web/components/common/notification-permission-banner/notification-permission-banner.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/notification-permission-banner/notification-permission-banner.js +33 -0
- package/dist/src/presentation/web/components/common/notification-permission-banner/notification-permission-banner.stories.d.ts +6 -0
- package/dist/src/presentation/web/components/common/notification-permission-banner/notification-permission-banner.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/notification-permission-banner/notification-permission-banner.stories.js +24 -0
- package/dist/src/presentation/web/components/common/open-action-menu/config.d.ts +10 -0
- package/dist/src/presentation/web/components/common/open-action-menu/config.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/open-action-menu/config.js +1 -0
- package/dist/src/presentation/web/components/common/open-action-menu/index.d.ts +3 -0
- package/dist/src/presentation/web/components/common/open-action-menu/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/open-action-menu/index.js +1 -0
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.d.ts +3 -0
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.js +18 -0
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.d.ts +14 -0
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.js +54 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/index.d.ts +4 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/index.js +2 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-config.d.ts +41 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-config.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-config.js +1 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-drawer.d.ts +3 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-drawer.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-drawer.js +7 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.d.ts +3 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.js +42 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.stories.d.ts +26 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.stories.js +267 -0
- package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-node.js +2 -2
- package/dist/src/presentation/web/components/common/repository-node/use-repository-actions.d.ts +3 -0
- package/dist/src/presentation/web/components/common/repository-node/use-repository-actions.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/use-repository-actions.js +51 -14
- package/dist/src/presentation/web/components/common/review-drawer-shell/index.d.ts +3 -0
- package/dist/src/presentation/web/components/common/review-drawer-shell/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/review-drawer-shell/index.js +1 -0
- package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell-config.d.ts +24 -0
- package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell-config.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell-config.js +1 -0
- package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.d.ts +3 -0
- package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.js +17 -0
- package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.stories.d.ts +14 -0
- package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.stories.js +33 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/index.d.ts +4 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/index.js +2 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-drawer.d.ts +3 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-drawer.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-drawer.js +7 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review-config.d.ts +39 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review-config.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review-config.js +1 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.d.ts +3 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.js +39 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.stories.d.ts +22 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.stories.js +108 -0
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +133 -2
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +28 -19
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.js +6 -1
- package/dist/src/presentation/web/components/ui/drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/drawer.js +3 -1
- package/dist/src/presentation/web/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/src/presentation/web/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/src/presentation/web/components/ui/dropdown-menu.js +33 -0
- package/dist/src/presentation/web/hooks/agent-events-provider.d.ts +13 -0
- package/dist/src/presentation/web/hooks/agent-events-provider.d.ts.map +1 -0
- package/dist/src/presentation/web/hooks/agent-events-provider.js +20 -0
- package/dist/src/presentation/web/hooks/use-agent-events.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/use-agent-events.js +21 -1
- package/dist/src/presentation/web/hooks/use-notifications.d.ts +1 -5
- package/dist/src/presentation/web/hooks/use-notifications.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/use-notifications.js +5 -10
- package/dist/src/presentation/web/next.config.d.ts.map +1 -1
- package/dist/src/presentation/web/next.config.js +5 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +0 -5
- package/web/.next/build-manifest.json +6 -6
- package/web/.next/cache/.previewinfo +1 -1
- package/web/.next/cache/.rscinfo +1 -1
- package/web/.next/cache/.tsbuildinfo +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 +4 -4
- package/web/.next/required-server-files.json +4 -4
- package/web/.next/routes-manifest.json +1 -34
- package/web/.next/server/app/_global-error/page/build-manifest.json +4 -4
- package/web/.next/server/app/_global-error/page.js +1 -1
- package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +7 -7
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/build-manifest.json +4 -4
- package/web/.next/server/app/_not-found/page.js +1 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/agent-events/route.js +1 -1
- package/web/.next/server/app/api/agent-events/route.js.nft.json +1 -1
- package/web/.next/server/app/api/dialog/pick-files/route.js +2 -2
- package/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +1 -1
- package/web/.next/server/app/page/build-manifest.json +4 -4
- package/web/.next/server/app/page/server-reference-manifest.json +137 -1
- package/web/.next/server/app/page.js +2 -2
- package/web/.next/server/app/page.js.nft.json +1 -1
- package/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/build-manifest.json +4 -4
- package/web/.next/server/app/version/page.js +1 -1
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app-paths-manifest.json +0 -5
- package/web/.next/server/chunks/{403f9_next_567de315._.js → 403f9_next_435614de._.js} +7 -6
- package/web/.next/server/chunks/403f9_next_435614de._.js.map +1 -0
- package/web/.next/server/chunks/[externals]__ba6223e5._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__7d5c8b74._.js +6 -0
- package/web/.next/server/chunks/[root-of-the-server]__7d5c8b74._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[externals]_node:path_d28a9bfe._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__03a0dba7._.js +12 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__03a0dba7._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__19354aea._.js +9 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__19354aea._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js → [root-of-the-server]__32472b89._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__a21ef212._.js → [root-of-the-server]__d21f0894._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d21f0894._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e1c44885._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f12b60be._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f47a461b._.js +3 -0
- package/web/.next/server/chunks/ssr/_285de9aa._.js +3 -0
- package/web/.next/server/chunks/ssr/_285de9aa._.js.map +1 -0
- package/web/.next/{standalone/src/presentation/web/.next/server/chunks/ssr/_94d22d37._.js → server/chunks/ssr/_b1f2507a._.js} +4 -4
- package/web/.next/server/chunks/ssr/_b1f2507a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_version_version-page-client_tsx_fe9db753._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_version_version-page-client_tsx_fe9db753._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_badge_tsx_964c2a3b._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_badge_tsx_964c2a3b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js.map +1 -1
- package/web/.next/server/middleware-build-manifest.js +4 -4
- 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 +138 -2
- package/web/.next/standalone/src/presentation/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/src/presentation/web/.next/app-path-routes-manifest.json +0 -5
- package/web/.next/standalone/src/presentation/web/.next/build-manifest.json +6 -6
- package/web/.next/standalone/src/presentation/web/.next/prerender-manifest.json +3 -3
- package/web/.next/standalone/src/presentation/web/.next/required-server-files.json +4 -4
- package/web/.next/standalone/src/presentation/web/.next/routes-manifest.json +1 -34
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page/build-manifest.json +4 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.rsc +7 -7
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page/build-manifest.json +4 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/agent-events/route.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/agent-events/route.js.nft.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/dialog/pick-files/route.js +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/page/build-manifest.json +4 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/page/server-reference-manifest.json +137 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/page.js +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/app/page.js.nft.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/version/page/build-manifest.json +4 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/version/page.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app-paths-manifest.json +0 -5
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/{403f9_next_567de315._.js → 403f9_next_435614de._.js} +7 -6
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/[externals]__ba6223e5._.js +3 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/[root-of-the-server]__7d5c8b74._.js +6 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[externals]_node:path_d28a9bfe._.js +3 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__03a0dba7._.js +12 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__19354aea._.js +9 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js → [root-of-the-server]__32472b89._.js} +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/{[root-of-the-server]__a21ef212._.js → [root-of-the-server]__d21f0894._.js} +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__e1c44885._.js +3 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__f12b60be._.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__f47a461b._.js +3 -0
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_285de9aa._.js +3 -0
- package/web/.next/{server/chunks/ssr/_94d22d37._.js → standalone/src/presentation/web/.next/server/chunks/ssr/_b1f2507a._.js} +4 -4
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_version_version-page-client_tsx_fe9db753._.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_components_ui_badge_tsx_964c2a3b._.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/middleware-build-manifest.js +4 -4
- package/web/.next/standalone/src/presentation/web/.next/server/pages/500.html +2 -2
- package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.json +138 -2
- package/web/.next/standalone/src/presentation/web/app/actions/approve-feature.ts +38 -0
- package/web/.next/standalone/src/presentation/web/app/actions/create-feature.ts +81 -0
- package/web/.next/standalone/src/presentation/web/app/actions/delete-feature.ts +22 -0
- package/web/.next/standalone/src/presentation/web/app/actions/get-feature-artifact.ts +55 -0
- package/web/.next/standalone/src/presentation/web/app/actions/get-research-artifact.ts +42 -0
- package/web/.next/standalone/src/presentation/web/app/actions/open-folder.ts +44 -0
- package/web/.next/standalone/src/presentation/web/app/actions/open-ide.ts +37 -0
- package/web/.next/standalone/src/presentation/web/app/{api/shell/open/route.ts → actions/open-shell.ts} +19 -27
- package/web/.next/standalone/src/presentation/web/app/{api/dialog/pick-folder/route.ts → actions/pick-folder.ts} +5 -9
- package/web/.next/standalone/src/presentation/web/app/api/agent-events/route.ts +2 -14
- package/web/.next/standalone/src/presentation/web/app/api/dialog/pick-files/route.ts +8 -10
- package/web/.next/standalone/src/presentation/web/app/globals.css +10 -0
- package/web/.next/standalone/src/presentation/web/app/page.tsx +1 -0
- package/web/.next/standalone/src/presentation/web/components/common/add-repository-node/pick-folder.ts +7 -7
- package/web/.next/standalone/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx +1 -1
- package/web/.next/standalone/src/presentation/web/components/common/feature-create-drawer/pick-files.ts +6 -7
- package/web/.next/standalone/src/presentation/web/components/common/feature-drawer/feature-drawer.tsx +15 -19
- package/web/.next/standalone/src/presentation/web/components/common/feature-drawer/use-feature-actions.ts +61 -17
- package/web/.next/standalone/src/presentation/web/components/common/feature-node/agent-type-icons.tsx +10 -2
- package/web/.next/standalone/src/presentation/web/components/common/feature-node/feature-node-state-config.ts +2 -0
- package/web/.next/standalone/src/presentation/web/components/common/feature-node/feature-node.stories.tsx +10 -0
- package/web/.next/standalone/src/presentation/web/components/common/feature-node/feature-node.tsx +38 -7
- package/web/.next/standalone/src/presentation/web/components/common/index.ts +18 -0
- package/web/.next/standalone/src/presentation/web/components/common/notification-permission-banner/index.ts +1 -0
- package/web/.next/standalone/src/presentation/web/components/common/notification-permission-banner/notification-permission-banner.stories.tsx +52 -0
- package/web/.next/standalone/src/presentation/web/components/common/notification-permission-banner/notification-permission-banner.tsx +55 -0
- package/web/.next/standalone/src/presentation/web/components/common/open-action-menu/config.ts +10 -0
- package/web/.next/standalone/src/presentation/web/components/common/open-action-menu/index.ts +2 -0
- package/web/.next/standalone/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.tsx +64 -0
- package/web/.next/standalone/src/presentation/web/components/common/open-action-menu/open-action-menu.tsx +111 -0
- package/web/.next/standalone/src/presentation/web/components/common/prd-questionnaire/index.ts +10 -0
- package/web/.next/standalone/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-config.ts +48 -0
- package/web/.next/standalone/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-drawer.tsx +34 -0
- package/web/.next/standalone/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.stories.tsx +384 -0
- package/web/.next/standalone/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.tsx +216 -0
- package/web/.next/standalone/src/presentation/web/components/common/repository-node/repository-node.tsx +20 -1
- package/web/.next/standalone/src/presentation/web/components/common/repository-node/use-repository-actions.ts +83 -20
- package/web/.next/standalone/src/presentation/web/components/common/review-drawer-shell/index.ts +2 -0
- package/web/.next/standalone/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell-config.ts +24 -0
- package/web/.next/standalone/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.stories.tsx +85 -0
- package/web/.next/standalone/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.tsx +139 -0
- package/web/.next/standalone/src/presentation/web/components/common/tech-decisions-review/index.ts +8 -0
- package/web/.next/standalone/src/presentation/web/components/common/tech-decisions-review/tech-decisions-drawer.tsx +34 -0
- package/web/.next/standalone/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review-config.ts +42 -0
- package/web/.next/standalone/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.stories.tsx +177 -0
- package/web/.next/standalone/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.tsx +188 -0
- package/web/.next/standalone/src/presentation/web/components/features/control-center/control-center-inner.tsx +189 -2
- package/web/.next/standalone/src/presentation/web/components/features/control-center/use-control-center-state.ts +28 -19
- package/web/.next/standalone/src/presentation/web/components/layouts/app-shell/app-shell.tsx +11 -1
- package/web/.next/standalone/src/presentation/web/components/ui/drawer.tsx +4 -2
- package/web/.next/standalone/src/presentation/web/components/ui/dropdown-menu.tsx +187 -0
- package/web/.next/standalone/src/presentation/web/hooks/agent-events-provider.tsx +32 -0
- package/web/.next/standalone/src/presentation/web/hooks/use-agent-events.ts +23 -1
- package/web/.next/standalone/src/presentation/web/hooks/use-notifications.ts +5 -16
- package/web/.next/standalone/src/presentation/web/next.config.ts +6 -0
- package/web/.next/standalone/src/presentation/web/package.json +2 -1
- package/web/.next/standalone/src/presentation/web/server.js +1 -1
- package/web/.next/static/chunks/{70993ebedee7eab0.js → 084314470f2144d2.js} +1 -1
- package/web/.next/static/chunks/36bb03a0314fb990.css +2 -0
- package/web/.next/static/chunks/429ee8f94032181c.js +10 -0
- package/web/.next/static/chunks/83ff3b6bbee54bce.js +1 -0
- package/web/.next/static/chunks/{fe5e04e707adb039.js → 8c0b96eb95dd31a9.js} +1 -1
- package/web/.next/static/chunks/{df7d29673e0ac11d.js → b13aa397579082e7.js} +1 -1
- package/web/.next/static/chunks/{f3b4460b1496ef52.js → cfe4dc9904fcfddb.js} +1 -1
- package/web/.next/static/chunks/e21d644e5a584136.js +1 -0
- package/web/.next/static/chunks/f9519a5c455143e6.js +1 -0
- package/web/.next/static/chunks/{c4b1e95eceaa36ca.js → fe6427c156bda6b0.js} +2 -2
- package/web/.next/static/chunks/{37bc3e283f734dca.js → fe70e73feb07bcfd.js} +1 -1
- package/web/.next/static/chunks/{turbopack-a5a88a85e7ac8e8d.js → turbopack-35ff53de4dab1e56.js} +2 -2
- package/web/.next/trace +1 -1
- package/web/.next/trace-build +1 -1
- package/web/.next/types/link.d.ts +1 -6
- package/web/.next/types/routes.d.ts +1 -6
- package/web/.next/types/validator.ts +0 -45
- package/web/package.json +2 -1
- package/dist/src/presentation/web/app/api/dialog/pick-folder/route.d.ts +0 -11
- package/dist/src/presentation/web/app/api/dialog/pick-folder/route.d.ts.map +0 -1
- package/dist/src/presentation/web/app/api/dialog/pick-folder/route.js +0 -16
- package/dist/src/presentation/web/app/api/features/[id]/route.d.ts +0 -11
- package/dist/src/presentation/web/app/api/features/[id]/route.d.ts.map +0 -1
- package/dist/src/presentation/web/app/api/features/[id]/route.js +0 -17
- package/dist/src/presentation/web/app/api/features/create/route.d.ts +0 -5
- package/dist/src/presentation/web/app/api/features/create/route.d.ts.map +0 -1
- package/dist/src/presentation/web/app/api/features/create/route.js +0 -65
- package/dist/src/presentation/web/app/api/ide/open/route.d.ts +0 -9
- package/dist/src/presentation/web/app/api/ide/open/route.d.ts.map +0 -1
- package/dist/src/presentation/web/app/api/ide/open/route.js +0 -36
- package/dist/src/presentation/web/app/api/shell/open/route.d.ts +0 -9
- package/dist/src/presentation/web/app/api/shell/open/route.d.ts.map +0 -1
- package/dist/src/presentation/web/app/api/shell/open/route.js +0 -57
- package/dist/src/presentation/web/app/api/validate-toolbar-input.d.ts +0 -18
- package/dist/src/presentation/web/app/api/validate-toolbar-input.d.ts.map +0 -1
- package/dist/src/presentation/web/app/api/validate-toolbar-input.js +0 -29
- package/web/.next/server/app/api/dialog/pick-folder/route/app-paths-manifest.json +0 -3
- package/web/.next/server/app/api/dialog/pick-folder/route/build-manifest.json +0 -11
- package/web/.next/server/app/api/dialog/pick-folder/route/server-reference-manifest.json +0 -4
- package/web/.next/server/app/api/dialog/pick-folder/route.js +0 -7
- package/web/.next/server/app/api/dialog/pick-folder/route.js.map +0 -5
- package/web/.next/server/app/api/dialog/pick-folder/route.js.nft.json +0 -1
- package/web/.next/server/app/api/dialog/pick-folder/route_client-reference-manifest.js +0 -2
- package/web/.next/server/app/api/features/[id]/route/app-paths-manifest.json +0 -3
- package/web/.next/server/app/api/features/[id]/route/build-manifest.json +0 -11
- package/web/.next/server/app/api/features/[id]/route/server-reference-manifest.json +0 -4
- package/web/.next/server/app/api/features/[id]/route.js +0 -7
- package/web/.next/server/app/api/features/[id]/route.js.map +0 -5
- package/web/.next/server/app/api/features/[id]/route.js.nft.json +0 -1
- package/web/.next/server/app/api/features/[id]/route_client-reference-manifest.js +0 -2
- package/web/.next/server/app/api/features/create/route/app-paths-manifest.json +0 -3
- package/web/.next/server/app/api/features/create/route/build-manifest.json +0 -11
- package/web/.next/server/app/api/features/create/route/server-reference-manifest.json +0 -4
- package/web/.next/server/app/api/features/create/route.js +0 -7
- package/web/.next/server/app/api/features/create/route.js.map +0 -5
- package/web/.next/server/app/api/features/create/route.js.nft.json +0 -1
- package/web/.next/server/app/api/features/create/route_client-reference-manifest.js +0 -2
- package/web/.next/server/app/api/ide/open/route/app-paths-manifest.json +0 -3
- package/web/.next/server/app/api/ide/open/route/build-manifest.json +0 -11
- package/web/.next/server/app/api/ide/open/route/server-reference-manifest.json +0 -4
- package/web/.next/server/app/api/ide/open/route.js +0 -7
- package/web/.next/server/app/api/ide/open/route.js.map +0 -5
- package/web/.next/server/app/api/ide/open/route.js.nft.json +0 -1
- package/web/.next/server/app/api/ide/open/route_client-reference-manifest.js +0 -2
- package/web/.next/server/app/api/shell/open/route/app-paths-manifest.json +0 -3
- package/web/.next/server/app/api/shell/open/route/build-manifest.json +0 -11
- package/web/.next/server/app/api/shell/open/route/server-reference-manifest.json +0 -4
- package/web/.next/server/app/api/shell/open/route.js +0 -7
- package/web/.next/server/app/api/shell/open/route.js.map +0 -5
- package/web/.next/server/app/api/shell/open/route.js.nft.json +0 -1
- package/web/.next/server/app/api/shell/open/route_client-reference-manifest.js +0 -2
- package/web/.next/server/chunks/403f9_next_567de315._.js.map +0 -1
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_dialog_pick-folder_route_actions_375ed12f.js +0 -3
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_features_[id]_route_actions_03b9a4b5.js +0 -3
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_features_create_route_actions_de49a114.js +0 -3
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_features_create_route_actions_de49a114.js.map +0 -1
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_shell_open_route_actions_814dc5b6.js +0 -3
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_shell_open_route_actions_814dc5b6.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__04ae3a77._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__04ae3a77._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__3d63a020._.js +0 -8
- package/web/.next/server/chunks/[root-of-the-server]__3d63a020._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__a6bf88cc._.js +0 -4
- package/web/.next/server/chunks/[root-of-the-server]__a6bf88cc._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__acfd2769._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__acfd2769._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__ec87d735._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__ec87d735._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__ecaf05bc._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__ecaf05bc._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__f32c280c._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__f32c280c._.js.map +0 -1
- package/web/.next/server/chunks/b1a17_presentation_web__next-internal_server_app_api_ide_open_route_actions_9fe6e1cd.js +0 -3
- package/web/.next/server/chunks/b1a17_presentation_web__next-internal_server_app_api_ide_open_route_actions_9fe6e1cd.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1eade43f._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1eade43f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__97377864._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a21ef212._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f285e474._.js +0 -3
- package/web/.next/server/chunks/ssr/_09afa42a._.js +0 -10
- package/web/.next/server/chunks/ssr/_09afa42a._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_4676cf52._.js +0 -3
- package/web/.next/server/chunks/ssr/_4676cf52._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_94d22d37._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_page_actions_a4e3cb6f.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_page_actions_a4e3cb6f.js.map +0 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/dialog/pick-folder/route/app-paths-manifest.json +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/dialog/pick-folder/route/build-manifest.json +0 -11
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/dialog/pick-folder/route/server-reference-manifest.json +0 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/dialog/pick-folder/route.js +0 -7
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/dialog/pick-folder/route.js.map +0 -5
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/dialog/pick-folder/route.js.nft.json +0 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/dialog/pick-folder/route_client-reference-manifest.js +0 -2
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/[id]/route/app-paths-manifest.json +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/[id]/route/build-manifest.json +0 -11
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/[id]/route/server-reference-manifest.json +0 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/[id]/route.js +0 -7
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/[id]/route.js.map +0 -5
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/[id]/route.js.nft.json +0 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/[id]/route_client-reference-manifest.js +0 -2
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/create/route/app-paths-manifest.json +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/create/route/build-manifest.json +0 -11
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/create/route/server-reference-manifest.json +0 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/create/route.js +0 -7
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/create/route.js.map +0 -5
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/create/route.js.nft.json +0 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/features/create/route_client-reference-manifest.js +0 -2
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/ide/open/route/app-paths-manifest.json +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/ide/open/route/build-manifest.json +0 -11
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/ide/open/route/server-reference-manifest.json +0 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/ide/open/route.js +0 -7
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/ide/open/route.js.map +0 -5
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/ide/open/route.js.nft.json +0 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/ide/open/route_client-reference-manifest.js +0 -2
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/shell/open/route/app-paths-manifest.json +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/shell/open/route/build-manifest.json +0 -11
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/shell/open/route/server-reference-manifest.json +0 -4
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/shell/open/route.js +0 -7
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/shell/open/route.js.map +0 -5
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/shell/open/route.js.nft.json +0 -1
- package/web/.next/standalone/src/presentation/web/.next/server/app/api/shell/open/route_client-reference-manifest.js +0 -2
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/744ca_web__next-internal_server_app_api_dialog_pick-folder_route_actions_375ed12f.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/744ca_web__next-internal_server_app_api_features_[id]_route_actions_03b9a4b5.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/744ca_web__next-internal_server_app_api_features_create_route_actions_de49a114.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/744ca_web__next-internal_server_app_api_shell_open_route_actions_814dc5b6.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/[root-of-the-server]__04ae3a77._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/[root-of-the-server]__3d63a020._.js +0 -8
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/[root-of-the-server]__a6bf88cc._.js +0 -4
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/[root-of-the-server]__acfd2769._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/[root-of-the-server]__ec87d735._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/[root-of-the-server]__ecaf05bc._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/[root-of-the-server]__f32c280c._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/b1a17_presentation_web__next-internal_server_app_api_ide_open_route_actions_9fe6e1cd.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__1eade43f._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__97377864._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__f285e474._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_09afa42a._.js +0 -10
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_4676cf52._.js +0 -3
- package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_page_actions_a4e3cb6f.js +0 -3
- package/web/.next/standalone/src/presentation/web/app/api/features/[id]/route.ts +0 -20
- package/web/.next/standalone/src/presentation/web/app/api/features/create/route.ts +0 -103
- package/web/.next/standalone/src/presentation/web/app/api/ide/open/route.ts +0 -44
- package/web/.next/standalone/src/presentation/web/app/api/validate-toolbar-input.ts +0 -46
- package/web/.next/static/chunks/54743561bbaa307a.js +0 -8
- package/web/.next/static/chunks/74f27128e5fbfe52.css +0 -2
- package/web/.next/static/chunks/9993505b2a26c454.js +0 -1
- package/web/.next/static/chunks/c95b4cf170b7f301.js +0 -1
- package/web/.next/static/chunks/e78d1b265b8110c3.js +0 -1
- /package/web/.next/server/chunks/{744ca_web__next-internal_server_app_api_dialog_pick-folder_route_actions_375ed12f.js.map → [externals]__ba6223e5._.js.map} +0 -0
- /package/web/.next/server/chunks/{744ca_web__next-internal_server_app_api_features_[id]_route_actions_03b9a4b5.js.map → ssr/[externals]_node:path_d28a9bfe._.js.map} +0 -0
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js.map → [root-of-the-server]__32472b89._.js.map} +0 -0
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__f285e474._.js.map → [root-of-the-server]__e1c44885._.js.map} +0 -0
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__97377864._.js.map → [root-of-the-server]__f47a461b._.js.map} +0 -0
- /package/web/.next/static/{O1yesm5Dga4m8eBi7EwM0 → t8z43Apwz2m0TFf1MnAKq}/_buildManifest.js +0 -0
- /package/web/.next/static/{O1yesm5Dga4m8eBi7EwM0 → t8z43Apwz2m0TFf1MnAKq}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{O1yesm5Dga4m8eBi7EwM0 → t8z43Apwz2m0TFf1MnAKq}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -407,7 +407,7 @@ Breakpoints are configurable. In `--allow-all` mode, the agent handles everythin
|
|
|
407
407
|
| TUI Framework | [@inquirer/prompts](https://github.com/SBoudrias/Inquirer.js) |
|
|
408
408
|
| Web UI | Next.js 16 + React 19 + shadcn/ui ([@shepai/web](./src/presentation/web/)) |
|
|
409
409
|
| Design System | Storybook |
|
|
410
|
-
| Build Tool | tsc + tsc-alias (prod),
|
|
410
|
+
| Build Tool | tsc + tsc-alias (prod), tsx (CLI dev), Next.js (web dev) |
|
|
411
411
|
| Database | SQLite |
|
|
412
412
|
| Agent System | [LangGraph](https://www.langchain.com/langgraph) (`@langchain/langgraph`) |
|
|
413
413
|
| Vector DB | [LanceDB](https://lancedb.com/) (file-based) |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-agent-process.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/agents/feature-agent-process.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;;;;;OAQG;IACH,KAAK,CACH,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE;QACR,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"feature-agent-process.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/agents/feature-agent-process.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;;;;;OAQG;IACH,KAAK,CACH,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE;QACR,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,GACA,MAAM,CAAC;IAEV;;;;;OAKG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAE9B;;;;;OAKG;IACH,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD"}
|
|
@@ -3,20 +3,21 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Approves a paused agent run (waiting_approval status) and
|
|
5
5
|
* spawns a new resume worker to continue graph execution.
|
|
6
|
+
* Optionally accepts a PrdApprovalPayload to update spec.yaml
|
|
7
|
+
* selections before resuming.
|
|
6
8
|
*/
|
|
7
9
|
import type { IAgentRunRepository } from '../../ports/output/agents/agent-run-repository.interface.js';
|
|
8
10
|
import type { IFeatureAgentProcessService } from '../../ports/output/agents/feature-agent-process.interface.js';
|
|
9
11
|
import type { IPhaseTimingRepository } from '../../ports/output/agents/phase-timing-repository.interface.js';
|
|
10
12
|
import type { IFeatureRepository } from '../../ports/output/repositories/feature-repository.interface.js';
|
|
11
|
-
import type {
|
|
13
|
+
import type { PrdApprovalPayload } from '../../../domain/generated/output.js';
|
|
12
14
|
export declare class ApproveAgentRunUseCase {
|
|
13
15
|
private readonly agentRunRepository;
|
|
14
16
|
private readonly processService;
|
|
15
17
|
private readonly featureRepository;
|
|
16
|
-
private readonly worktreeService;
|
|
17
18
|
private readonly phaseTimingRepository;
|
|
18
|
-
constructor(agentRunRepository: IAgentRunRepository, processService: IFeatureAgentProcessService, featureRepository: IFeatureRepository,
|
|
19
|
-
execute(id: string): Promise<{
|
|
19
|
+
constructor(agentRunRepository: IAgentRunRepository, processService: IFeatureAgentProcessService, featureRepository: IFeatureRepository, phaseTimingRepository: IPhaseTimingRepository);
|
|
20
|
+
execute(id: string, payload?: PrdApprovalPayload): Promise<{
|
|
20
21
|
approved: boolean;
|
|
21
22
|
reason: string;
|
|
22
23
|
}>;
|
package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approve-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/agents/approve-agent-run.use-case.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"approve-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/agents/approve-agent-run.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gEAAgE,CAAC;AAC7G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAE1G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAG9E,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,qBAAqB;gBANrB,kBAAkB,EAAE,mBAAmB,EAEvC,cAAc,EAAE,2BAA2B,EAE3C,iBAAiB,EAAE,kBAAkB,EAErC,qBAAqB,EAAE,sBAAsB;IAG1D,OAAO,CACX,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAqFlD"}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Approves a paused agent run (waiting_approval status) and
|
|
5
5
|
* spawns a new resume worker to continue graph execution.
|
|
6
|
+
* Optionally accepts a PrdApprovalPayload to update spec.yaml
|
|
7
|
+
* selections before resuming.
|
|
6
8
|
*/
|
|
7
9
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8
10
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -17,21 +19,23 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
17
19
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
18
20
|
};
|
|
19
21
|
import { injectable, inject } from 'tsyringe';
|
|
22
|
+
import yaml from 'js-yaml';
|
|
23
|
+
import { readFileSync } from 'node:fs';
|
|
24
|
+
import { join } from 'node:path';
|
|
20
25
|
import { AgentRunStatus } from '../../../domain/generated/output.js';
|
|
26
|
+
import { writeSpecFileAtomic } from '../../../infrastructure/services/agents/feature-agent/nodes/node-helpers.js';
|
|
21
27
|
let ApproveAgentRunUseCase = class ApproveAgentRunUseCase {
|
|
22
28
|
agentRunRepository;
|
|
23
29
|
processService;
|
|
24
30
|
featureRepository;
|
|
25
|
-
worktreeService;
|
|
26
31
|
phaseTimingRepository;
|
|
27
|
-
constructor(agentRunRepository, processService, featureRepository,
|
|
32
|
+
constructor(agentRunRepository, processService, featureRepository, phaseTimingRepository) {
|
|
28
33
|
this.agentRunRepository = agentRunRepository;
|
|
29
34
|
this.processService = processService;
|
|
30
35
|
this.featureRepository = featureRepository;
|
|
31
|
-
this.worktreeService = worktreeService;
|
|
32
36
|
this.phaseTimingRepository = phaseTimingRepository;
|
|
33
37
|
}
|
|
34
|
-
async execute(id) {
|
|
38
|
+
async execute(id, payload) {
|
|
35
39
|
const run = await this.agentRunRepository.findById(id);
|
|
36
40
|
if (!run) {
|
|
37
41
|
return { approved: false, reason: 'Agent run not found' };
|
|
@@ -42,12 +46,31 @@ let ApproveAgentRunUseCase = class ApproveAgentRunUseCase {
|
|
|
42
46
|
reason: `Agent run is not waiting for approval (status: ${run.status})`,
|
|
43
47
|
};
|
|
44
48
|
}
|
|
45
|
-
// Look up the feature to get
|
|
49
|
+
// Look up the feature to get specPath
|
|
46
50
|
const feature = run.featureId ? await this.featureRepository.findById(run.featureId) : null;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
// Write updated selections to spec.yaml if changedSelections provided
|
|
52
|
+
if (payload?.changedSelections && payload.changedSelections.length > 0 && feature?.specPath) {
|
|
53
|
+
try {
|
|
54
|
+
const specDir = feature.specPath;
|
|
55
|
+
const specContent = readFileSync(join(specDir, 'spec.yaml'), 'utf-8');
|
|
56
|
+
const spec = yaml.load(specContent);
|
|
57
|
+
if (Array.isArray(spec?.openQuestions)) {
|
|
58
|
+
for (const change of payload.changedSelections) {
|
|
59
|
+
const question = spec.openQuestions.find((q) => q.question === change.questionId);
|
|
60
|
+
if (question && Array.isArray(question.options)) {
|
|
61
|
+
for (const opt of question.options) {
|
|
62
|
+
opt.selected = opt.option === change.selectedOption;
|
|
63
|
+
}
|
|
64
|
+
question.answer = change.selectedOption;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
writeSpecFileAtomic(specDir, 'spec.yaml', yaml.dump(spec));
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
// Non-fatal: selection update failure should not block approval
|
|
72
|
+
}
|
|
73
|
+
}
|
|
51
74
|
const now = new Date();
|
|
52
75
|
await this.agentRunRepository.updateStatus(id, AgentRunStatus.running, {
|
|
53
76
|
updatedAt: now,
|
|
@@ -69,14 +92,14 @@ let ApproveAgentRunUseCase = class ApproveAgentRunUseCase {
|
|
|
69
92
|
catch {
|
|
70
93
|
// Non-fatal: approval wait timing failure should not block approval
|
|
71
94
|
}
|
|
72
|
-
this.processService.spawn(run.featureId ?? '', id,
|
|
73
|
-
worktreePath, {
|
|
95
|
+
this.processService.spawn(run.featureId ?? '', id, feature?.repositoryPath ?? run.repositoryPath ?? '', feature?.specPath ?? '', feature?.worktreePath, {
|
|
74
96
|
resume: true,
|
|
75
97
|
approvalGates: run.approvalGates,
|
|
76
98
|
threadId: run.threadId,
|
|
77
99
|
resumeFromInterrupt: true,
|
|
78
100
|
push: feature?.push ?? false,
|
|
79
101
|
openPr: feature?.openPr ?? false,
|
|
102
|
+
...(payload ? { resumePayload: JSON.stringify(payload) } : {}),
|
|
80
103
|
});
|
|
81
104
|
return { approved: true, reason: 'Approved and resumed' };
|
|
82
105
|
}
|
|
@@ -86,8 +109,7 @@ ApproveAgentRunUseCase = __decorate([
|
|
|
86
109
|
__param(0, inject('IAgentRunRepository')),
|
|
87
110
|
__param(1, inject('IFeatureAgentProcessService')),
|
|
88
111
|
__param(2, inject('IFeatureRepository')),
|
|
89
|
-
__param(3, inject('
|
|
90
|
-
|
|
91
|
-
__metadata("design:paramtypes", [Object, Object, Object, Object, Object])
|
|
112
|
+
__param(3, inject('IPhaseTimingRepository')),
|
|
113
|
+
__metadata("design:paramtypes", [Object, Object, Object, Object])
|
|
92
114
|
], ApproveAgentRunUseCase);
|
|
93
115
|
export { ApproveAgentRunUseCase };
|
|
@@ -2,15 +2,24 @@
|
|
|
2
2
|
* Reject Agent Run Use Case
|
|
3
3
|
*
|
|
4
4
|
* Rejects a paused agent run (waiting_approval status) and
|
|
5
|
-
*
|
|
5
|
+
* spawns a resume worker to iterate with user feedback.
|
|
6
|
+
* Appends rejection feedback to spec.yaml for tracking.
|
|
6
7
|
*/
|
|
7
8
|
import type { IAgentRunRepository } from '../../ports/output/agents/agent-run-repository.interface.js';
|
|
9
|
+
import type { IFeatureAgentProcessService } from '../../ports/output/agents/feature-agent-process.interface.js';
|
|
10
|
+
import type { IPhaseTimingRepository } from '../../ports/output/agents/phase-timing-repository.interface.js';
|
|
11
|
+
import type { IFeatureRepository } from '../../ports/output/repositories/feature-repository.interface.js';
|
|
8
12
|
export declare class RejectAgentRunUseCase {
|
|
9
13
|
private readonly agentRunRepository;
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
private readonly processService;
|
|
15
|
+
private readonly featureRepository;
|
|
16
|
+
private readonly phaseTimingRepository;
|
|
17
|
+
constructor(agentRunRepository: IAgentRunRepository, processService: IFeatureAgentProcessService, featureRepository: IFeatureRepository, phaseTimingRepository: IPhaseTimingRepository);
|
|
18
|
+
execute(id: string, feedback: string): Promise<{
|
|
12
19
|
rejected: boolean;
|
|
13
20
|
reason: string;
|
|
21
|
+
iteration?: number;
|
|
22
|
+
iterationWarning?: boolean;
|
|
14
23
|
}>;
|
|
15
24
|
}
|
|
16
25
|
//# sourceMappingURL=reject-agent-run.use-case.d.ts.map
|
package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reject-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/agents/reject-agent-run.use-case.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"reject-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/agents/reject-agent-run.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gEAAgE,CAAC;AAC7G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAQ1G,qBACa,qBAAqB;IAG9B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,qBAAqB;gBANrB,kBAAkB,EAAE,mBAAmB,EAEvC,cAAc,EAAE,2BAA2B,EAE3C,iBAAiB,EAAE,kBAAkB,EAErC,qBAAqB,EAAE,sBAAsB;IAG1D,OAAO,CACX,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;QACT,QAAQ,EAAE,OAAO,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;KAC5B,CAAC;CAuGH"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Reject Agent Run Use Case
|
|
3
3
|
*
|
|
4
4
|
* Rejects a paused agent run (waiting_approval status) and
|
|
5
|
-
*
|
|
5
|
+
* spawns a resume worker to iterate with user feedback.
|
|
6
|
+
* Appends rejection feedback to spec.yaml for tracking.
|
|
6
7
|
*/
|
|
7
8
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8
9
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -17,13 +18,23 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
17
18
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
18
19
|
};
|
|
19
20
|
import { injectable, inject } from 'tsyringe';
|
|
21
|
+
import yaml from 'js-yaml';
|
|
22
|
+
import { readFileSync } from 'node:fs';
|
|
23
|
+
import { join } from 'node:path';
|
|
20
24
|
import { AgentRunStatus } from '../../../domain/generated/output.js';
|
|
25
|
+
import { writeSpecFileAtomic } from '../../../infrastructure/services/agents/feature-agent/nodes/node-helpers.js';
|
|
21
26
|
let RejectAgentRunUseCase = class RejectAgentRunUseCase {
|
|
22
27
|
agentRunRepository;
|
|
23
|
-
|
|
28
|
+
processService;
|
|
29
|
+
featureRepository;
|
|
30
|
+
phaseTimingRepository;
|
|
31
|
+
constructor(agentRunRepository, processService, featureRepository, phaseTimingRepository) {
|
|
24
32
|
this.agentRunRepository = agentRunRepository;
|
|
33
|
+
this.processService = processService;
|
|
34
|
+
this.featureRepository = featureRepository;
|
|
35
|
+
this.phaseTimingRepository = phaseTimingRepository;
|
|
25
36
|
}
|
|
26
|
-
async execute(id,
|
|
37
|
+
async execute(id, feedback) {
|
|
27
38
|
const run = await this.agentRunRepository.findById(id);
|
|
28
39
|
if (!run) {
|
|
29
40
|
return { rejected: false, reason: 'Agent run not found' };
|
|
@@ -34,18 +45,87 @@ let RejectAgentRunUseCase = class RejectAgentRunUseCase {
|
|
|
34
45
|
reason: `Agent run is not waiting for approval (status: ${run.status})`,
|
|
35
46
|
};
|
|
36
47
|
}
|
|
48
|
+
// Validate non-empty feedback
|
|
49
|
+
if (!feedback?.trim()) {
|
|
50
|
+
return { rejected: false, reason: 'Feedback is required for rejection' };
|
|
51
|
+
}
|
|
52
|
+
// Look up feature for spec path
|
|
53
|
+
const feature = run.featureId ? await this.featureRepository.findById(run.featureId) : null;
|
|
54
|
+
if (!feature?.specPath) {
|
|
55
|
+
return { rejected: false, reason: 'Feature has no spec path' };
|
|
56
|
+
}
|
|
57
|
+
// Read and update spec.yaml with rejection feedback
|
|
58
|
+
const specDir = feature.specPath;
|
|
59
|
+
let iteration = 1;
|
|
60
|
+
try {
|
|
61
|
+
const specContent = readFileSync(join(specDir, 'spec.yaml'), 'utf-8');
|
|
62
|
+
const spec = yaml.load(specContent);
|
|
63
|
+
const existingFeedback = Array.isArray(spec?.rejectionFeedback)
|
|
64
|
+
? spec.rejectionFeedback
|
|
65
|
+
: [];
|
|
66
|
+
iteration = existingFeedback.length + 1;
|
|
67
|
+
const newEntry = {
|
|
68
|
+
iteration,
|
|
69
|
+
message: feedback,
|
|
70
|
+
timestamp: new Date().toISOString(),
|
|
71
|
+
};
|
|
72
|
+
spec.rejectionFeedback = [...existingFeedback, newEntry];
|
|
73
|
+
writeSpecFileAtomic(specDir, 'spec.yaml', yaml.dump(spec));
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
// If spec.yaml can't be read, still proceed with iteration 1
|
|
77
|
+
}
|
|
78
|
+
// Update run status to running (NOT cancelled)
|
|
37
79
|
const now = new Date();
|
|
38
|
-
await this.agentRunRepository.updateStatus(id, AgentRunStatus.
|
|
39
|
-
error: reason ?? 'Rejected by user',
|
|
40
|
-
completedAt: now,
|
|
80
|
+
await this.agentRunRepository.updateStatus(id, AgentRunStatus.running, {
|
|
41
81
|
updatedAt: now,
|
|
42
82
|
});
|
|
43
|
-
|
|
83
|
+
// Record approval wait duration
|
|
84
|
+
try {
|
|
85
|
+
const timings = await this.phaseTimingRepository.findByRunId(id);
|
|
86
|
+
const waitingTiming = timings.find((t) => t.waitingApprovalAt && !t.approvalWaitMs);
|
|
87
|
+
if (waitingTiming) {
|
|
88
|
+
const waitStart = waitingTiming.waitingApprovalAt instanceof Date
|
|
89
|
+
? waitingTiming.waitingApprovalAt.getTime()
|
|
90
|
+
: Number(waitingTiming.waitingApprovalAt);
|
|
91
|
+
const approvalWaitMs = BigInt(now.getTime() - waitStart);
|
|
92
|
+
await this.phaseTimingRepository.updateApprovalWait(waitingTiming.id, {
|
|
93
|
+
approvalWaitMs,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
// Non-fatal
|
|
99
|
+
}
|
|
100
|
+
// Spawn worker with rejection payload
|
|
101
|
+
const rejectionPayload = {
|
|
102
|
+
rejected: true,
|
|
103
|
+
feedback,
|
|
104
|
+
iteration,
|
|
105
|
+
};
|
|
106
|
+
this.processService.spawn(run.featureId ?? '', id, feature.repositoryPath, feature.specPath, feature.worktreePath, {
|
|
107
|
+
resume: true,
|
|
108
|
+
approvalGates: run.approvalGates,
|
|
109
|
+
threadId: run.threadId,
|
|
110
|
+
resumeFromInterrupt: true,
|
|
111
|
+
push: feature?.push ?? false,
|
|
112
|
+
openPr: feature?.openPr ?? false,
|
|
113
|
+
resumePayload: JSON.stringify(rejectionPayload),
|
|
114
|
+
});
|
|
115
|
+
return {
|
|
116
|
+
rejected: true,
|
|
117
|
+
reason: 'Rejected and iterating',
|
|
118
|
+
iteration,
|
|
119
|
+
iterationWarning: iteration >= 5,
|
|
120
|
+
};
|
|
44
121
|
}
|
|
45
122
|
};
|
|
46
123
|
RejectAgentRunUseCase = __decorate([
|
|
47
124
|
injectable(),
|
|
48
125
|
__param(0, inject('IAgentRunRepository')),
|
|
49
|
-
|
|
126
|
+
__param(1, inject('IFeatureAgentProcessService')),
|
|
127
|
+
__param(2, inject('IFeatureRepository')),
|
|
128
|
+
__param(3, inject('IPhaseTimingRepository')),
|
|
129
|
+
__metadata("design:paramtypes", [Object, Object, Object, Object])
|
|
50
130
|
], RejectAgentRunUseCase);
|
|
51
131
|
export { RejectAgentRunUseCase };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Review Feature Use Case
|
|
3
|
+
*
|
|
4
|
+
* Reads spec.yaml open questions for a feature waiting for approval,
|
|
5
|
+
* returning structured data for the TUI review wizard.
|
|
6
|
+
*/
|
|
7
|
+
import type { IFeatureRepository } from '../../ports/output/repositories/feature-repository.interface.js';
|
|
8
|
+
import type { IAgentRunRepository } from '../../ports/output/agents/agent-run-repository.interface.js';
|
|
9
|
+
import type { QuestionOption } from '../../../domain/generated/output.js';
|
|
10
|
+
export interface OpenQuestion {
|
|
11
|
+
question: string;
|
|
12
|
+
options: QuestionOption[];
|
|
13
|
+
selectedOption: string;
|
|
14
|
+
selectionRationale?: string;
|
|
15
|
+
answer?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ReviewFeatureResult {
|
|
18
|
+
success: true;
|
|
19
|
+
questions: OpenQuestion[];
|
|
20
|
+
featureName: string;
|
|
21
|
+
phase: string;
|
|
22
|
+
runId: string;
|
|
23
|
+
repoPath: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ReviewFeatureError {
|
|
26
|
+
success: false;
|
|
27
|
+
reason: string;
|
|
28
|
+
}
|
|
29
|
+
export declare class ReviewFeatureUseCase {
|
|
30
|
+
private readonly featureRepository;
|
|
31
|
+
private readonly agentRunRepository;
|
|
32
|
+
constructor(featureRepository: IFeatureRepository, agentRunRepository: IAgentRunRepository);
|
|
33
|
+
execute(featureId: string, repoPath: string): Promise<ReviewFeatureResult | ReviewFeatureError>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=review-feature.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/agents/review-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AAEvG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qBACa,oBAAoB;IAEC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IACjC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBADnB,iBAAiB,EAAE,kBAAkB,EACpC,kBAAkB,EAAE,mBAAmB;IAGnF,OAAO,CACX,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,mBAAmB,GAAG,kBAAkB,CAAC;CAqDrD"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Review Feature Use Case
|
|
3
|
+
*
|
|
4
|
+
* Reads spec.yaml open questions for a feature waiting for approval,
|
|
5
|
+
* returning structured data for the TUI review wizard.
|
|
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 yaml from 'js-yaml';
|
|
21
|
+
import { readFileSync } from 'node:fs';
|
|
22
|
+
import { join } from 'node:path';
|
|
23
|
+
import { AgentRunStatus } from '../../../domain/generated/output.js';
|
|
24
|
+
let ReviewFeatureUseCase = class ReviewFeatureUseCase {
|
|
25
|
+
featureRepository;
|
|
26
|
+
agentRunRepository;
|
|
27
|
+
constructor(featureRepository, agentRunRepository) {
|
|
28
|
+
this.featureRepository = featureRepository;
|
|
29
|
+
this.agentRunRepository = agentRunRepository;
|
|
30
|
+
}
|
|
31
|
+
async execute(featureId, repoPath) {
|
|
32
|
+
// Find feature (try exact match, then prefix)
|
|
33
|
+
const feature = (await this.featureRepository.findById(featureId)) ??
|
|
34
|
+
(await this.featureRepository.findByIdPrefix(featureId));
|
|
35
|
+
if (!feature)
|
|
36
|
+
return { success: false, reason: 'Feature not found' };
|
|
37
|
+
// Find agent run
|
|
38
|
+
if (!feature.agentRunId)
|
|
39
|
+
return { success: false, reason: 'Feature has no agent run' };
|
|
40
|
+
const run = await this.agentRunRepository.findById(feature.agentRunId);
|
|
41
|
+
if (!run || run.status !== AgentRunStatus.waitingApproval) {
|
|
42
|
+
return {
|
|
43
|
+
success: false,
|
|
44
|
+
reason: `Feature is not waiting for approval (status: ${run?.status ?? 'unknown'})`,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
// Read spec.yaml using feature's stored specPath
|
|
48
|
+
if (!feature.specPath) {
|
|
49
|
+
return { success: false, reason: 'Feature has no spec path' };
|
|
50
|
+
}
|
|
51
|
+
const specPath = join(feature.specPath, 'spec.yaml');
|
|
52
|
+
let specContent;
|
|
53
|
+
try {
|
|
54
|
+
specContent = readFileSync(specPath, 'utf-8');
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return { success: false, reason: 'Could not read spec.yaml' };
|
|
58
|
+
}
|
|
59
|
+
// Parse openQuestions
|
|
60
|
+
const spec = yaml.load(specContent);
|
|
61
|
+
const openQuestions = spec?.openQuestions;
|
|
62
|
+
if (!Array.isArray(openQuestions) || openQuestions.length === 0) {
|
|
63
|
+
return { success: false, reason: 'No open questions found in spec.yaml' };
|
|
64
|
+
}
|
|
65
|
+
const questions = openQuestions.map((q) => ({
|
|
66
|
+
question: String(q.question ?? ''),
|
|
67
|
+
options: Array.isArray(q.options) ? q.options : [],
|
|
68
|
+
selectedOption: String(q.answer ?? ''),
|
|
69
|
+
selectionRationale: q.selectionRationale ? String(q.selectionRationale) : undefined,
|
|
70
|
+
answer: q.answer ? String(q.answer) : undefined,
|
|
71
|
+
}));
|
|
72
|
+
return {
|
|
73
|
+
success: true,
|
|
74
|
+
questions,
|
|
75
|
+
featureName: feature.name,
|
|
76
|
+
phase: 'requirements',
|
|
77
|
+
runId: run.id,
|
|
78
|
+
repoPath: run.repositoryPath ?? repoPath,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
ReviewFeatureUseCase = __decorate([
|
|
83
|
+
injectable(),
|
|
84
|
+
__param(0, inject('IFeatureRepository')),
|
|
85
|
+
__param(1, inject('IAgentRunRepository')),
|
|
86
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
87
|
+
], ReviewFeatureUseCase);
|
|
88
|
+
export { ReviewFeatureUseCase };
|
package/dist/packages/core/src/application/use-cases/features/get-feature-artifact.use-case.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Feature Artifact Use Case
|
|
3
|
+
*
|
|
4
|
+
* Retrieves the parsed FeatureArtifact (PRD) for a given feature by
|
|
5
|
+
* reading and parsing the spec.yaml from the feature's spec directory.
|
|
6
|
+
*
|
|
7
|
+
* Business Rules:
|
|
8
|
+
* - Throws if the feature does not exist
|
|
9
|
+
* - Throws if the feature has no specPath
|
|
10
|
+
* - Throws if spec.yaml cannot be read or parsed
|
|
11
|
+
*/
|
|
12
|
+
import type { FeatureArtifact } from '../../../domain/generated/output.js';
|
|
13
|
+
import type { IFeatureRepository } from '../../ports/output/repositories/feature-repository.interface.js';
|
|
14
|
+
export declare class GetFeatureArtifactUseCase {
|
|
15
|
+
private readonly featureRepo;
|
|
16
|
+
constructor(featureRepo: IFeatureRepository);
|
|
17
|
+
execute(featureId: string): Promise<FeatureArtifact>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=get-feature-artifact.use-case.d.ts.map
|
package/dist/packages/core/src/application/use-cases/features/get-feature-artifact.use-case.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-feature-artifact.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/get-feature-artifact.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAE3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAE1G,qBACa,yBAAyB;IAGlC,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,kBAAkB;IAG5C,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CAgB3D"}
|
package/dist/packages/core/src/application/use-cases/features/get-feature-artifact.use-case.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Feature Artifact Use Case
|
|
3
|
+
*
|
|
4
|
+
* Retrieves the parsed FeatureArtifact (PRD) for a given feature by
|
|
5
|
+
* reading and parsing the spec.yaml from the feature's spec directory.
|
|
6
|
+
*
|
|
7
|
+
* Business Rules:
|
|
8
|
+
* - Throws if the feature does not exist
|
|
9
|
+
* - Throws if the feature has no specPath
|
|
10
|
+
* - Throws if spec.yaml cannot be read or parsed
|
|
11
|
+
*/
|
|
12
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
13
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15
|
+
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;
|
|
16
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
|
+
};
|
|
18
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
20
|
+
};
|
|
21
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
22
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
23
|
+
};
|
|
24
|
+
import { injectable, inject } from 'tsyringe';
|
|
25
|
+
import { readFile } from 'node:fs/promises';
|
|
26
|
+
import { join } from 'node:path';
|
|
27
|
+
import { parseSpecYaml } from '../../../domain/factories/spec-yaml-parser.js';
|
|
28
|
+
let GetFeatureArtifactUseCase = class GetFeatureArtifactUseCase {
|
|
29
|
+
featureRepo;
|
|
30
|
+
constructor(featureRepo) {
|
|
31
|
+
this.featureRepo = featureRepo;
|
|
32
|
+
}
|
|
33
|
+
async execute(featureId) {
|
|
34
|
+
const feature = (await this.featureRepo.findById(featureId)) ??
|
|
35
|
+
(await this.featureRepo.findByIdPrefix(featureId));
|
|
36
|
+
if (!feature) {
|
|
37
|
+
throw new Error(`Feature not found: "${featureId}"`);
|
|
38
|
+
}
|
|
39
|
+
if (!feature.specPath) {
|
|
40
|
+
throw new Error(`Feature "${featureId}" has no spec path`);
|
|
41
|
+
}
|
|
42
|
+
const specYamlPath = join(feature.specPath, 'spec.yaml');
|
|
43
|
+
const content = await readFile(specYamlPath, 'utf-8');
|
|
44
|
+
return parseSpecYaml(content);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
GetFeatureArtifactUseCase = __decorate([
|
|
48
|
+
injectable(),
|
|
49
|
+
__param(0, inject('IFeatureRepository')),
|
|
50
|
+
__metadata("design:paramtypes", [Object])
|
|
51
|
+
], GetFeatureArtifactUseCase);
|
|
52
|
+
export { GetFeatureArtifactUseCase };
|
package/dist/packages/core/src/application/use-cases/features/get-research-artifact.use-case.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Research Artifact Use Case
|
|
3
|
+
*
|
|
4
|
+
* Retrieves the parsed ResearchArtifact for a given feature by
|
|
5
|
+
* reading and parsing the research.yaml from the feature's spec directory.
|
|
6
|
+
*
|
|
7
|
+
* Business Rules:
|
|
8
|
+
* - Throws if the feature does not exist
|
|
9
|
+
* - Throws if the feature has no specPath
|
|
10
|
+
* - Throws if research.yaml cannot be read or parsed
|
|
11
|
+
*/
|
|
12
|
+
import type { ResearchArtifact } from '../../../domain/generated/output.js';
|
|
13
|
+
import type { IFeatureRepository } from '../../ports/output/repositories/feature-repository.interface.js';
|
|
14
|
+
export declare class GetResearchArtifactUseCase {
|
|
15
|
+
private readonly featureRepo;
|
|
16
|
+
constructor(featureRepo: IFeatureRepository);
|
|
17
|
+
execute(featureId: string): Promise<ResearchArtifact>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=get-research-artifact.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-research-artifact.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/get-research-artifact.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAE1G,qBACa,0BAA0B;IAGnC,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,kBAAkB;IAG5C,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAgB5D"}
|
package/dist/packages/core/src/application/use-cases/features/get-research-artifact.use-case.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Research Artifact Use Case
|
|
3
|
+
*
|
|
4
|
+
* Retrieves the parsed ResearchArtifact for a given feature by
|
|
5
|
+
* reading and parsing the research.yaml from the feature's spec directory.
|
|
6
|
+
*
|
|
7
|
+
* Business Rules:
|
|
8
|
+
* - Throws if the feature does not exist
|
|
9
|
+
* - Throws if the feature has no specPath
|
|
10
|
+
* - Throws if research.yaml cannot be read or parsed
|
|
11
|
+
*/
|
|
12
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
13
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15
|
+
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;
|
|
16
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
|
+
};
|
|
18
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
20
|
+
};
|
|
21
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
22
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
23
|
+
};
|
|
24
|
+
import { injectable, inject } from 'tsyringe';
|
|
25
|
+
import { readFile } from 'node:fs/promises';
|
|
26
|
+
import { join } from 'node:path';
|
|
27
|
+
import { parseResearchYaml } from '../../../domain/factories/spec-yaml-parser.js';
|
|
28
|
+
let GetResearchArtifactUseCase = class GetResearchArtifactUseCase {
|
|
29
|
+
featureRepo;
|
|
30
|
+
constructor(featureRepo) {
|
|
31
|
+
this.featureRepo = featureRepo;
|
|
32
|
+
}
|
|
33
|
+
async execute(featureId) {
|
|
34
|
+
const feature = (await this.featureRepo.findById(featureId)) ??
|
|
35
|
+
(await this.featureRepo.findByIdPrefix(featureId));
|
|
36
|
+
if (!feature) {
|
|
37
|
+
throw new Error(`Feature not found: "${featureId}"`);
|
|
38
|
+
}
|
|
39
|
+
if (!feature.specPath) {
|
|
40
|
+
throw new Error(`Feature "${featureId}" has no spec path`);
|
|
41
|
+
}
|
|
42
|
+
const researchYamlPath = join(feature.specPath, 'research.yaml');
|
|
43
|
+
const content = await readFile(researchYamlPath, 'utf-8');
|
|
44
|
+
return parseResearchYaml(content);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
GetResearchArtifactUseCase = __decorate([
|
|
48
|
+
injectable(),
|
|
49
|
+
__param(0, inject('IFeatureRepository')),
|
|
50
|
+
__metadata("design:paramtypes", [Object])
|
|
51
|
+
], GetResearchArtifactUseCase);
|
|
52
|
+
export { GetResearchArtifactUseCase };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-yaml-parser.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/domain/factories/spec-yaml-parser.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACd,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"spec-yaml-parser.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/domain/factories/spec-yaml-parser.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACd,MAAM,qBAAqB,CAAC;AAgF7B;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAI9D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAInE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,CAIpE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAI7D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAIrE"}
|
|
@@ -41,7 +41,9 @@ function validateSchema(schemaId, data) {
|
|
|
41
41
|
throw new Error(`Schema not found: ${schemaId}`);
|
|
42
42
|
}
|
|
43
43
|
if (!validate(data)) {
|
|
44
|
-
const errors = validate.errors
|
|
44
|
+
const errors = validate.errors
|
|
45
|
+
?.map((e) => `${e.instancePath} ${e.message}`)
|
|
46
|
+
.join('; ');
|
|
45
47
|
throw new Error(`Validation failed for ${schemaId}: ${errors}`);
|
|
46
48
|
}
|
|
47
49
|
return data;
|