@shepai/cli 1.175.1-pr537.fc6a92c → 1.176.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/apis/json-schema/AgentConfig.yaml +0 -3
- package/apis/json-schema/AgentType.yaml +0 -1
- package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts +1 -3
- package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/agents/agent-run-repository.interface.d.ts +0 -7
- package/dist/packages/core/src/application/ports/output/agents/agent-run-repository.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts +0 -7
- package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/index.d.ts +0 -3
- package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/get-agent-session.use-case.d.ts +1 -3
- package/dist/packages/core/src/application/use-cases/agents/get-agent-session.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/get-agent-session.use-case.js +4 -6
- package/dist/packages/core/src/application/use-cases/agents/list-agent-sessions.use-case.d.ts +1 -3
- package/dist/packages/core/src/application/use-cases/agents/list-agent-sessions.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/list-agent-sessions.use-case.js +4 -6
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts +1 -3
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +7 -9
- package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.js +2 -2
- package/dist/packages/core/src/application/use-cases/settings/check-onboarding-status.use-case.d.ts +2 -5
- package/dist/packages/core/src/application/use-cases/settings/check-onboarding-status.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/settings/check-onboarding-status.use-case.js +6 -28
- package/dist/packages/core/src/domain/generated/output.d.ts +35 -42
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/domain/generated/output.js +1 -7
- package/dist/packages/core/src/infrastructure/di/container.d.ts +0 -3
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +501 -27
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/agent-run.mapper.js +2 -2
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +0 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +2 -6
- package/dist/packages/core/src/infrastructure/repositories/agent-run.repository.d.ts +0 -1
- package/dist/packages/core/src/infrastructure/repositories/agent-run.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/agent-run.repository.js +0 -8
- package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts +0 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.js +3 -11
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +2 -3
- package/dist/packages/core/src/infrastructure/services/agents/common/agent-executor-factory.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/agent-executor-factory.service.js +0 -10
- package/dist/packages/core/src/infrastructure/services/agents/common/agent-runner.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/agent-runner.service.js +4 -4
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts +7 -3
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.js +35 -19
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/codex-cli-executor.service.d.ts +7 -3
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/codex-cli-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/codex-cli-executor.service.js +30 -17
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/copilot-cli-executor.service.d.ts +7 -3
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/copilot-cli-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/copilot-cli-executor.service.js +34 -23
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/cursor-executor.service.d.ts +7 -3
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/cursor-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/cursor-executor.service.js +16 -21
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/gemini-cli-executor.service.d.ts +7 -3
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/gemini-cli-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/gemini-cli-executor.service.js +33 -21
- package/dist/packages/core/src/infrastructure/services/agents/common/types.d.ts +0 -5
- package/dist/packages/core/src/infrastructure/services/agents/common/types.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/types.js +1 -5
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +1 -1
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +7 -16
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +47 -44
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +853 -121
- package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.d.ts +70 -19
- package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.js +991 -44
- package/dist/packages/core/src/infrastructure/services/notifications/notification-watcher.service.js +3 -3
- package/dist/packages/core/src/infrastructure/services/pr-sync/pr-sync-watcher.service.js +1 -1
- package/dist/src/presentation/cli/commands/agent/show.command.js +2 -3
- package/dist/src/presentation/cli/commands/feat/new.command.js +1 -1
- package/dist/src/presentation/cli/commands/feat/show.command.js +1 -1
- package/dist/src/presentation/tui/prompts/agent-select.prompt.d.ts.map +1 -1
- package/dist/src/presentation/tui/prompts/agent-select.prompt.js +0 -5
- package/dist/src/presentation/web/app/actions/agent-setup-flag.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/agent-setup-flag.js +2 -3
- package/dist/src/presentation/web/app/actions/check-agent-auth.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/check-agent-auth.js +2 -18
- package/dist/src/presentation/web/app/actions/get-all-agent-models.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/get-all-agent-models.js +0 -2
- package/dist/src/presentation/web/app/actions/get-feature-phase-timings.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/get-feature-phase-timings.js +3 -4
- package/dist/src/presentation/web/app/actions/get-supported-models.js +3 -2
- package/dist/src/presentation/web/app/actions/get-workflow-defaults.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/get-workflow-defaults.js +2 -3
- package/dist/src/presentation/web/app/actions/open-ide.js +3 -2
- package/dist/src/presentation/web/app/actions/open-shell.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/open-shell.js +0 -15
- package/dist/src/presentation/web/app/actions/update-model.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/update-model.js +2 -3
- package/dist/src/presentation/web/app/api/agent-events/health/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/agent-events/health/route.js +12 -9
- package/dist/src/presentation/web/app/api/agent-events/route.d.ts +14 -7
- 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 +301 -20
- package/dist/src/presentation/web/app/api/attachments/preview/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/attachments/preview/route.js +1 -5
- package/dist/src/presentation/web/app/api/attachments/upload/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/attachments/upload/route.js +2 -2
- package/dist/src/presentation/web/app/api/attachments/upload-from-path/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/attachments/upload-from-path/route.js +2 -2
- package/dist/src/presentation/web/app/api/cli-upgrade/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/cli-upgrade/route.js +1 -3
- package/dist/src/presentation/web/app/api/deployment-logs/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/deployment-logs/route.js +6 -2
- 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 +2 -3
- package/dist/src/presentation/web/app/api/directory/list/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/directory/list/route.js +5 -8
- package/dist/src/presentation/web/app/api/feature-logs/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/feature-logs/route.js +6 -2
- package/dist/src/presentation/web/app/api/graph-data/route.d.ts +4 -1
- package/dist/src/presentation/web/app/api/graph-data/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/graph-data/route.js +2 -8
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/mark-read/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/mark-read/route.js +3 -2
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/messages/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/messages/route.js +10 -5
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/respond/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/respond/route.js +5 -5
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stop/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stop/route.js +3 -2
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stream/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stream/route.js +6 -2
- package/dist/src/presentation/web/app/api/interactive/chat/turn-statuses/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/interactive/chat/turn-statuses/route.js +3 -2
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/messages/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/messages/route.js +10 -5
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/route.js +6 -3
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/stream/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/stream/route.js +6 -2
- package/dist/src/presentation/web/app/api/interactive/sessions/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/interactive/sessions/route.js +3 -2
- package/dist/src/presentation/web/app/api/npm-version/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/npm-version/route.js +2 -2
- package/dist/src/presentation/web/app/api/sessions/route.d.ts +15 -1
- package/dist/src/presentation/web/app/api/sessions/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/sessions/route.js +3 -2
- package/dist/src/presentation/web/app/api/sessions-batch/route.d.ts +8 -1
- package/dist/src/presentation/web/app/api/sessions-batch/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/sessions-batch/route.js +3 -2
- package/dist/src/presentation/web/app/api/tools/[id]/install/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/tools/[id]/install/route.js +2 -2
- package/dist/src/presentation/web/app/api/tools/[id]/install/stream/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/tools/[id]/install/stream/route.js +1 -3
- package/dist/src/presentation/web/app/api/tools/[id]/launch/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/tools/[id]/launch/route.js +2 -2
- package/dist/src/presentation/web/app/api/tools/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/tools/route.js +2 -2
- package/dist/src/presentation/web/app/layout.d.ts.map +1 -1
- package/dist/src/presentation/web/app/layout.js +1 -2
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.js +0 -12
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.js +2 -2
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.js +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +1 -1
- package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.d.ts +1 -1
- 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 +0 -2
- package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.stories.js +0 -1
- package/dist/src/presentation/web/components/features/chat/ChatSheet.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatSheet.js +1 -1
- package/dist/src/presentation/web/components/features/settings/AgentModelPicker/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/AgentModelPicker/index.js +3 -7
- package/dist/src/presentation/web/components/features/settings/ModelPicker/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/ModelPicker/index.js +2 -2
- package/dist/src/presentation/web/components/features/settings/agent-settings-section.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/agent-settings-section.js +0 -1
- package/dist/src/presentation/web/hooks/use-agent-events.js +1 -5
- package/dist/src/presentation/web/lib/is-same-shep-instance.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/is-same-shep-instance.js +5 -2
- package/dist/translations/ar/common.json +1 -0
- package/dist/translations/ar/tui.json +0 -4
- package/dist/translations/ar/web.json +0 -1
- package/dist/translations/de/common.json +1 -0
- package/dist/translations/de/tui.json +0 -1
- package/dist/translations/de/web.json +0 -1
- package/dist/translations/en/common.json +1 -0
- package/dist/translations/en/tui.json +0 -4
- package/dist/translations/en/web.json +0 -1
- package/dist/translations/es/common.json +1 -0
- package/dist/translations/es/tui.json +0 -4
- package/dist/translations/es/web.json +0 -1
- package/dist/translations/fr/common.json +1 -0
- package/dist/translations/fr/tui.json +0 -4
- package/dist/translations/fr/web.json +0 -1
- package/dist/translations/he/common.json +1 -0
- package/dist/translations/he/tui.json +0 -4
- package/dist/translations/he/web.json +0 -1
- package/dist/translations/pt/common.json +1 -0
- package/dist/translations/pt/tui.json +0 -4
- package/dist/translations/pt/web.json +0 -1
- package/dist/translations/ru/common.json +1 -0
- package/dist/translations/ru/tui.json +0 -4
- package/dist/translations/ru/web.json +0 -1
- package/dist/translations/uk/cli.json +631 -0
- package/dist/translations/uk/common.json +56 -0
- package/dist/translations/uk/tui.json +134 -0
- package/dist/translations/uk/web.json +615 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -7
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -2
- package/web/.next/required-server-files.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +58 -73
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +5 -5
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +54 -69
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js +5 -5
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +60 -75
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +5 -5
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +76 -91
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +5 -5
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +76 -91
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +5 -5
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +56 -71
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +5 -5
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +56 -71
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +5 -5
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +54 -69
- package/web/.next/server/app/(dashboard)/chat/page.js +5 -5
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +60 -75
- package/web/.next/server/app/(dashboard)/create/page.js +5 -5
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +76 -91
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +5 -5
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +76 -91
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +5 -5
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +54 -69
- package/web/.next/server/app/(dashboard)/page.js +5 -5
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +56 -71
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +5 -5
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +56 -71
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +5 -5
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- 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.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/page/server-reference-manifest.json +12 -27
- package/web/.next/server/app/_not-found/page.js +3 -3
- 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 +2 -2
- package/web/.next/server/app/api/agent-events/route.js.nft.json +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/attachments/upload/route.js +1 -1
- package/web/.next/server/app/api/attachments/upload/route.js.nft.json +1 -1
- package/web/.next/server/app/api/attachments/upload-from-path/route.js +1 -1
- package/web/.next/server/app/api/attachments/upload-from-path/route.js.nft.json +1 -1
- package/web/.next/server/app/api/deployment-logs/route.js +1 -2
- package/web/.next/server/app/api/deployment-logs/route.js.nft.json +1 -1
- package/web/.next/server/app/api/directory/list/route.js +1 -1
- package/web/.next/server/app/api/directory/list/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/api/feature-logs/route.js +1 -2
- package/web/.next/server/app/api/feature-logs/route.js.nft.json +1 -1
- package/web/.next/server/app/api/graph-data/route.js +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/mark-read/route.js +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/mark-read/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/respond/route.js +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/respond/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/stop/route.js +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/stop/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/stream/route.js +1 -2
- package/web/.next/server/app/api/interactive/chat/[featureId]/stream/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/turn-statuses/route.js +1 -1
- package/web/.next/server/app/api/interactive/chat/turn-statuses/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/sessions/[id]/messages/route.js +1 -1
- package/web/.next/server/app/api/interactive/sessions/[id]/messages/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/sessions/[id]/route.js +1 -1
- package/web/.next/server/app/api/interactive/sessions/[id]/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/sessions/[id]/stream/route.js +1 -2
- package/web/.next/server/app/api/interactive/sessions/[id]/stream/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/sessions/route.js +1 -1
- package/web/.next/server/app/api/interactive/sessions/route.js.nft.json +1 -1
- package/web/.next/server/app/api/npm-version/route.js +1 -1
- package/web/.next/server/app/api/npm-version/route.js.nft.json +1 -1
- package/web/.next/server/app/api/sessions/route.js +1 -1
- package/web/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/web/.next/server/app/api/sessions-batch/route.js +1 -1
- package/web/.next/server/app/api/sessions-batch/route.js.nft.json +1 -1
- package/web/.next/server/app/api/tools/[id]/install/route.js +1 -1
- package/web/.next/server/app/api/tools/[id]/install/route.js.nft.json +1 -1
- package/web/.next/server/app/api/tools/[id]/launch/route.js +1 -1
- package/web/.next/server/app/api/tools/[id]/launch/route.js.nft.json +1 -1
- package/web/.next/server/app/api/tools/route.js +1 -1
- package/web/.next/server/app/api/tools/route.js.nft.json +1 -1
- package/web/.next/server/app/features/page/server-reference-manifest.json +12 -27
- package/web/.next/server/app/features/page.js +3 -3
- package/web/.next/server/app/features/page.js.nft.json +1 -1
- package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +18 -33
- package/web/.next/server/app/settings/page.js +3 -4
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +26 -41
- package/web/.next/server/app/skills/page.js +4 -4
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +22 -37
- package/web/.next/server/app/tools/page.js +4 -4
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +12 -27
- package/web/.next/server/app/version/page.js +4 -4
- 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/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js +12 -0
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__0866d2b5._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__0866d2b5._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__10852c5c._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__10852c5c._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__2b1074db._.js +12 -0
- package/web/.next/server/chunks/[root-of-the-server]__2b1074db._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__2b71641f._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__2b71641f._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__2bb675ff._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__2bb675ff._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__2f61738a._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__2f61738a._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__31598852._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__31598852._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__31944fa2._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__31944fa2._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__32b04219._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__32b04219._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__332c8d91._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__332c8d91._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__3b72e8b0._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__3b72e8b0._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__4408a5ba._.js +12 -0
- package/web/.next/server/chunks/[root-of-the-server]__4408a5ba._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__6565a045._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__6565a045._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__8a281f8d._.js +24 -0
- package/web/.next/server/chunks/[root-of-the-server]__8a281f8d._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__8f8d6afe._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__8f8d6afe._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__9191749c._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__9191749c._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__9a136c79._.js +9 -0
- package/web/.next/server/chunks/[root-of-the-server]__9a136c79._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__ab4951b1._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__ab4951b1._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__acea6565._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__acea6565._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js +3 -0
- package/web/.next/server/chunks/{[root-of-the-server]__f1aeae12._.js.map → [root-of-the-server]__b2f9a412._.js.map} +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__b4102cc7._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__b4102cc7._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__d2c18946._.js +3 -3
- package/web/.next/server/chunks/[root-of-the-server]__d2c18946._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__d9d410a8._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__d9d410a8._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__e247a485._.js +3 -3
- package/web/.next/server/chunks/[root-of-the-server]__e247a485._.js.map +1 -1
- package/web/.next/server/chunks/{[root-of-the-server]__937ba94e._.js → [root-of-the-server]__e3692208._.js} +2 -2
- package/web/.next/server/chunks/[root-of-the-server]__ea653642._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__ea653642._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__fc6fd958._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__fc6fd958._.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js +3 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js +3 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js +3 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__08e7a080._.js → [root-of-the-server]__22d17c66._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__08e7a080._.js.map → [root-of-the-server]__22d17c66._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__23b5ca2c._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +3 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__ff332bfb._.js.map → [root-of-the-server]__357d99f9._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__51ec77a8._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__51ec77a8._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__540c615f._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__540c615f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__16c1388b._.js → [root-of-the-server]__69dd3217._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__16c1388b._.js.map → [root-of-the-server]__69dd3217._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7528eb6f._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d1040bd1._.js +3 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__f5614810._.js.map → [root-of-the-server]__d1040bd1._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__efeeaed4._.js +3 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__d5e22d1a._.js.map → [root-of-the-server]__efeeaed4._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_5747febb._.js → _1e08a336._.js} +2 -2
- package/web/.next/server/chunks/ssr/_1e08a336._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_ed2f2799._.js → _295fffde._.js} +2 -2
- package/web/.next/server/chunks/ssr/_295fffde._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_4db4ac1e._.js → _388d1127._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_4db4ac1e._.js.map → _388d1127._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_45496654._.js +1 -1
- package/web/.next/server/chunks/ssr/_45496654._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_4cbb7f95._.js +1 -1
- package/web/.next/server/chunks/ssr/_4cbb7f95._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_6abfa39e._.js +1 -1
- package/web/.next/server/chunks/ssr/_6abfa39e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_080b0309._.js → _8f0d3f07._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_080b0309._.js.map → _8f0d3f07._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_31b68712._.js → _98d94927._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_31b68712._.js.map → _98d94927._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_819f193a._.js → _d9c0a97a._.js} +2 -2
- package/web/.next/server/chunks/ssr/_d9c0a97a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_e680c57c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f8c55130._.js +1 -1
- package/web/.next/server/chunks/ssr/_f8c55130._.js.map +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js +5 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js +5 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{src_presentation_web_components_349d9f24._.js → src_presentation_web_components_895e5bfa._.js} +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e1cd1869._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_e1cd1869._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js.map +1 -0
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js +1 -1
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js.map +1 -1
- 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 +535 -683
- package/web/.next/static/chunks/{10383f321355e09b.js → 0ffb3738269e15c3.js} +1 -1
- package/web/.next/static/chunks/236744ff71b1aadf.js +1 -0
- package/web/.next/static/chunks/{05c0a8ed7621ea2a.js → 2cfc6022d74e2716.js} +3 -3
- package/web/.next/static/chunks/302f474e4978cc80.js +3 -0
- package/web/.next/static/chunks/{316b0e4597f2083d.js → 46e2693dbc9262fd.js} +2 -2
- package/web/.next/static/chunks/{6853929058e53d1a.js → 476873a9bac35ec8.js} +1 -1
- package/web/.next/static/chunks/{81347e69998eef38.js → 4ff21d16947ec853.js} +1 -1
- package/web/.next/static/chunks/626277ca9a4cc477.js +1 -0
- package/web/.next/static/chunks/{a1ad19e21b6ad1ad.js → 6304540c7cf2b46a.js} +2 -2
- package/web/.next/static/chunks/{fd319c0e5f3cc20a.js → 71a07df9dcb42227.js} +1 -1
- package/web/.next/static/chunks/{71ad5a4155ddd207.js → 885bb8fc631bf477.js} +1 -1
- package/web/.next/static/chunks/a20f2d6f76f469b7.css +1 -0
- package/web/.next/static/chunks/{8bf91dcd1b3077d7.js → afa7e5d2a48cabc7.js} +1 -1
- package/web/.next/static/chunks/c10c0d6d458453bc.js +1 -0
- package/web/.next/static/chunks/{8a68402c32c6a206.js → e8444bf5f6c35f8b.js} +1 -1
- package/web/.next/static/chunks/eab3d361f7a24510.js +1 -0
- package/web/.next/static/chunks/{6bfcb5d1b3eafd81.js → eda9ee3c22b71a69.js} +1 -1
- package/web/.next/static/chunks/{e610f5d703696b34.js → f17d2d0279b8db35.js} +1 -1
- package/web/.next/static/chunks/f9d948464ed409cb.js +1 -0
- package/apis/json-schema/PermissionMode.yaml +0 -8
- package/dist/packages/core/src/application/ports/output/services/file-system.interface.d.ts +0 -68
- package/dist/packages/core/src/application/ports/output/services/file-system.interface.d.ts.map +0 -1
- package/dist/packages/core/src/application/ports/output/services/file-system.interface.js +0 -12
- package/dist/packages/core/src/application/ports/output/services/process-monitor.interface.d.ts +0 -29
- package/dist/packages/core/src/application/ports/output/services/process-monitor.interface.d.ts.map +0 -1
- package/dist/packages/core/src/application/ports/output/services/process-monitor.interface.js +0 -12
- package/dist/packages/core/src/application/ports/output/services/settings-reader.interface.d.ts +0 -35
- package/dist/packages/core/src/application/ports/output/services/settings-reader.interface.d.ts.map +0 -1
- package/dist/packages/core/src/application/ports/output/services/settings-reader.interface.js +0 -12
- package/dist/packages/core/src/application/use-cases/notifications/poll-agent-events.use-case.d.ts +0 -61
- package/dist/packages/core/src/application/use-cases/notifications/poll-agent-events.use-case.d.ts.map +0 -1
- package/dist/packages/core/src/application/use-cases/notifications/poll-agent-events.use-case.js +0 -381
- package/dist/packages/core/src/infrastructure/di/modules/agent-infrastructure.module.d.ts +0 -7
- package/dist/packages/core/src/infrastructure/di/modules/agent-infrastructure.module.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/di/modules/agent-infrastructure.module.js +0 -83
- package/dist/packages/core/src/infrastructure/di/modules/database.module.d.ts +0 -12
- package/dist/packages/core/src/infrastructure/di/modules/database.module.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/di/modules/database.module.js +0 -16
- package/dist/packages/core/src/infrastructure/di/modules/interactive.module.d.ts +0 -10
- package/dist/packages/core/src/infrastructure/di/modules/interactive.module.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/di/modules/interactive.module.js +0 -43
- package/dist/packages/core/src/infrastructure/di/modules/notifications.module.d.ts +0 -6
- package/dist/packages/core/src/infrastructure/di/modules/notifications.module.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/di/modules/notifications.module.js +0 -20
- package/dist/packages/core/src/infrastructure/di/modules/repositories.module.d.ts +0 -6
- package/dist/packages/core/src/infrastructure/di/modules/repositories.module.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/di/modules/repositories.module.js +0 -26
- package/dist/packages/core/src/infrastructure/di/modules/services.module.d.ts +0 -8
- package/dist/packages/core/src/infrastructure/di/modules/services.module.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/di/modules/services.module.js +0 -93
- package/dist/packages/core/src/infrastructure/di/modules/use-cases.module.d.ts +0 -6
- package/dist/packages/core/src/infrastructure/di/modules/use-cases.module.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/di/modules/use-cases.module.js +0 -164
- package/dist/packages/core/src/infrastructure/di/modules/web-tokens.module.d.ts +0 -10
- package/dist/packages/core/src/infrastructure/di/modules/web-tokens.module.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/di/modules/web-tokens.module.js +0 -200
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-agent-permission-mode.d.ts +0 -14
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-agent-permission-mode.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-agent-permission-mode.js +0 -19
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/abstract-agent-executor.d.ts +0 -37
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/abstract-agent-executor.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/abstract-agent-executor.js +0 -59
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/rovo-dev-executor.service.d.ts +0 -52
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/rovo-dev-executor.service.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/rovo-dev-executor.service.js +0 -350
- package/dist/packages/core/src/infrastructure/services/filesystem/file-system.service.d.ts +0 -26
- package/dist/packages/core/src/infrastructure/services/filesystem/file-system.service.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/filesystem/file-system.service.js +0 -47
- package/dist/packages/core/src/infrastructure/services/filesystem/path-sanitizers.d.ts +0 -19
- package/dist/packages/core/src/infrastructure/services/filesystem/path-sanitizers.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/filesystem/path-sanitizers.js +0 -38
- package/dist/packages/core/src/infrastructure/services/git/branch-discovery.service.d.ts +0 -23
- package/dist/packages/core/src/infrastructure/services/git/branch-discovery.service.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/git/branch-discovery.service.js +0 -185
- package/dist/packages/core/src/infrastructure/services/git/ci-status.service.d.ts +0 -24
- package/dist/packages/core/src/infrastructure/services/git/ci-status.service.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/git/ci-status.service.js +0 -202
- package/dist/packages/core/src/infrastructure/services/git/diff-analyzer.service.d.ts +0 -19
- package/dist/packages/core/src/infrastructure/services/git/diff-analyzer.service.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/git/diff-analyzer.service.js +0 -173
- package/dist/packages/core/src/infrastructure/services/git/merge-strategy.service.d.ts +0 -30
- package/dist/packages/core/src/infrastructure/services/git/merge-strategy.service.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/git/merge-strategy.service.js +0 -341
- package/dist/packages/core/src/infrastructure/services/git/pr-creation.service.d.ts +0 -34
- package/dist/packages/core/src/infrastructure/services/git/pr-creation.service.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/git/pr-creation.service.js +0 -180
- package/dist/packages/core/src/infrastructure/services/interactive/chat-state-builder.d.ts +0 -21
- package/dist/packages/core/src/infrastructure/services/interactive/chat-state-builder.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/interactive/chat-state-builder.js +0 -112
- package/dist/packages/core/src/infrastructure/services/interactive/session-boot-sequence.d.ts +0 -47
- package/dist/packages/core/src/infrastructure/services/interactive/session-boot-sequence.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/interactive/session-boot-sequence.js +0 -381
- package/dist/packages/core/src/infrastructure/services/interactive/session-state-manager.d.ts +0 -28
- package/dist/packages/core/src/infrastructure/services/interactive/session-state-manager.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/interactive/session-state-manager.js +0 -105
- package/dist/packages/core/src/infrastructure/services/interactive/session-state.d.ts +0 -46
- package/dist/packages/core/src/infrastructure/services/interactive/session-state.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/interactive/session-state.js +0 -10
- package/dist/packages/core/src/infrastructure/services/interactive/subscriber-notifier.d.ts +0 -36
- package/dist/packages/core/src/infrastructure/services/interactive/subscriber-notifier.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/interactive/subscriber-notifier.js +0 -60
- package/dist/packages/core/src/infrastructure/services/interactive/turn-executor.d.ts +0 -57
- package/dist/packages/core/src/infrastructure/services/interactive/turn-executor.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/interactive/turn-executor.js +0 -503
- package/dist/packages/core/src/infrastructure/services/process/process-monitor.service.d.ts +0 -25
- package/dist/packages/core/src/infrastructure/services/process/process-monitor.service.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/process/process-monitor.service.js +0 -45
- package/dist/packages/core/src/infrastructure/services/settings-reader.adapter.d.ts +0 -15
- package/dist/packages/core/src/infrastructure/services/settings-reader.adapter.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/settings-reader.adapter.js +0 -28
- package/dist/src/presentation/web/app/actions/check-agent-auth-for-type.d.ts +0 -11
- package/dist/src/presentation/web/app/actions/check-agent-auth-for-type.d.ts.map +0 -1
- package/dist/src/presentation/web/app/actions/check-agent-auth-for-type.js +0 -147
- package/dist/src/presentation/web/components/common/route-announcer.d.ts +0 -2
- package/dist/src/presentation/web/components/common/route-announcer.d.ts.map +0 -1
- package/dist/src/presentation/web/components/common/route-announcer.js +0 -7
- package/dist/src/presentation/web/components/features/settings/AgentAvailabilityBadge.d.ts +0 -7
- package/dist/src/presentation/web/components/features/settings/AgentAvailabilityBadge.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/settings/AgentAvailabilityBadge.js +0 -26
- package/dist/src/presentation/web/components/features/settings/AgentAvailabilityBadge.stories.d.ts +0 -11
- package/dist/src/presentation/web/components/features/settings/AgentAvailabilityBadge.stories.d.ts.map +0 -1
- package/dist/src/presentation/web/components/features/settings/AgentAvailabilityBadge.stories.js +0 -24
- package/dist/src/presentation/web/hooks/use-agent-availability.d.ts +0 -13
- package/dist/src/presentation/web/hooks/use-agent-availability.d.ts.map +0 -1
- package/dist/src/presentation/web/hooks/use-agent-availability.js +0 -75
- package/dist/src/presentation/web/hooks/use-route-announcer.d.ts +0 -2
- package/dist/src/presentation/web/hooks/use-route-announcer.d.ts.map +0 -1
- package/dist/src/presentation/web/hooks/use-route-announcer.js +0 -16
- package/dist/src/presentation/web/lib/api-error.d.ts +0 -7
- package/dist/src/presentation/web/lib/api-error.d.ts.map +0 -1
- package/dist/src/presentation/web/lib/api-error.js +0 -11
- package/web/.next/server/chunks/[root-of-the-server]__0b88f5f0._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__0b88f5f0._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__0d0a9973._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__0d0a9973._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__1f18a881._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__1f18a881._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__3d08be55._.js +0 -9
- package/web/.next/server/chunks/[root-of-the-server]__3d08be55._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__419be0d1._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__419be0d1._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__4747e669._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__4747e669._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__475afd97._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__475afd97._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__483ccc90._.js +0 -9
- package/web/.next/server/chunks/[root-of-the-server]__483ccc90._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__5e90f1e9._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__5e90f1e9._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__62634db9._.js +0 -12
- package/web/.next/server/chunks/[root-of-the-server]__62634db9._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__645a6d08._.js +0 -12
- package/web/.next/server/chunks/[root-of-the-server]__645a6d08._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__74f3dc5c._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__74f3dc5c._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__810add7c._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__810add7c._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__8cfd9f70._.js +0 -24
- package/web/.next/server/chunks/[root-of-the-server]__8cfd9f70._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__8ec23770._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__8ec23770._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__93c391fe._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__93c391fe._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__9e8fc40c._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__9e8fc40c._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__a2426aa4._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__a2426aa4._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__a96ee39d._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__a96ee39d._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__e10befc1._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__e10befc1._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__e94a4a75._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__e94a4a75._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__ea7e9dc2._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__ea7e9dc2._.js.map +0 -1
- package/web/.next/server/chunks/[root-of-the-server]__f1aeae12._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__f7b38c05._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__f7b38c05._.js.map +0 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_f57e8323.js +0 -3
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_f57e8323.js.map +0 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_c2027d57.js +0 -3
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_c2027d57.js.map +0 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_f70a6774.js +0 -3
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_f70a6774.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0e34e896._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0e34e896._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1eb031d8._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1eb031d8._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__35e7da6b._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__35e7da6b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__36eb7673._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__36eb7673._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4576a805._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4576a805._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b51b0071._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b51b0071._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__bd113e97._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__bd113e97._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c6f02c81._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c6f02c81._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d5e22d1a._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f13f6a81._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f13f6a81._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f5614810._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ff332bfb._.js +0 -3
- package/web/.next/server/chunks/ssr/_5747febb._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_819f193a._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_ed2f2799._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_064c7e73._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_064c7e73._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_1726dc84._.js +0 -5
- package/web/.next/server/chunks/ssr/src_presentation_web_1726dc84._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_28c682ee._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_28c682ee._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_2d7b0e7b._.js +0 -5
- package/web/.next/server/chunks/ssr/src_presentation_web_2d7b0e7b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_bcef11e0.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_bcef11e0.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_02d5029f.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_02d5029f.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_67ca1f81.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_67ca1f81.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b1110b54._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_b1110b54._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_349d9f24._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_d388fcb0._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_d388fcb0._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_da61a4f3._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_da61a4f3._.js.map +0 -1
- package/web/.next/static/chunks/1f232a3618b82ac1.css +0 -1
- package/web/.next/static/chunks/2621b35c0c9da177.js +0 -1
- package/web/.next/static/chunks/2a3edcf98f609bb7.js +0 -1
- package/web/.next/static/chunks/3370f8dc24c64ce4.js +0 -1
- package/web/.next/static/chunks/47ed89fae0f1542e.js +0 -1
- package/web/.next/static/chunks/6c1664f584f34e6f.js +0 -1
- package/web/.next/static/chunks/f952f152ac0a4abe.js +0 -3
- package/web/public/icons/agents/rovo-dev.svg +0 -6
- /package/web/.next/server/chunks/{[root-of-the-server]__937ba94e._.js.map → [root-of-the-server]__e3692208._.js.map} +0 -0
- /package/web/.next/static/{8CNKMABoDvNDVQD3DEuB4 → 36ONyC02R4wfFe7iWMQLU}/_buildManifest.js +0 -0
- /package/web/.next/static/{8CNKMABoDvNDVQD3DEuB4 → 36ONyC02R4wfFe7iWMQLU}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{8CNKMABoDvNDVQD3DEuB4 → 36ONyC02R4wfFe7iWMQLU}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module.exports=[58773,e=>{"use strict";var t=e.i(22925),a=e.i(62995),n=e.i(14112),i=e.i(31716),r=e.i(16340),s=e.i(40522),o=e.i(21994),l=e.i(5802),c=e.i(17171),d=e.i(177),u=e.i(43685),p=e.i(84832),f=e.i(92435),v=e.i(41260),y=e.i(80556),m=e.i(93695);e.i(97230);var g=e.i(35162),h=e.i(40060),S=e.i(96907),R=e.i(45316);let N={[S.SdlcLifecycle.Started]:"requirements",[S.SdlcLifecycle.Analyze]:"analyze",[S.SdlcLifecycle.Requirements]:"requirements",[S.SdlcLifecycle.Research]:"research",[S.SdlcLifecycle.Planning]:"plan",[S.SdlcLifecycle.Implementation]:"implement",[S.SdlcLifecycle.Review]:"merge",[S.SdlcLifecycle.Maintain]:"maintain",[S.SdlcLifecycle.Blocked]:"blocked",[S.SdlcLifecycle.Pending]:"pending",[S.SdlcLifecycle.Deleting]:"blocked",[S.SdlcLifecycle.AwaitingUpstream]:"merge",[S.SdlcLifecycle.Archived]:"archived"},I={[S.AgentRunStatus.running]:{eventType:S.NotificationEventType.AgentStarted,severity:S.NotificationSeverity.Info},[S.AgentRunStatus.waitingApproval]:{eventType:S.NotificationEventType.WaitingApproval,severity:S.NotificationSeverity.Warning},[S.AgentRunStatus.completed]:{eventType:S.NotificationEventType.AgentCompleted,severity:S.NotificationSeverity.Success},[S.AgentRunStatus.failed]:{eventType:S.NotificationEventType.AgentFailed,severity:S.NotificationSeverity.Error},[S.AgentRunStatus.interrupted]:{eventType:S.NotificationEventType.AgentFailed,severity:S.NotificationSeverity.Warning},[S.AgentRunStatus.cancelled]:{eventType:S.NotificationEventType.AgentFailed,severity:S.NotificationSeverity.Warning}};function w(e){if(e?.startsWith("node:"))return e.slice(5)}function E(e){try{let t=new URL(e.url).searchParams.get("runId"),a=new ReadableStream({start(a){let n=new TextEncoder,i=new Map,r=new Map,s=!1;function o(e){if(!s)try{a.enqueue(n.encode(e))}catch{}}function l(e){console.log(`[SSE] emit: ${e.eventType} for "${e.featureName}"${e.phaseName?` (${e.phaseName})`:""}`),o(`event: notification
|
|
2
|
+
data: ${JSON.stringify(e)}
|
|
3
|
+
|
|
4
|
+
`)}let c=0;async function d(){if(!s)try{let e=(0,h.resolve)("ListFeaturesUseCase"),a=(0,h.resolve)("IAgentRunRepository"),n=(0,h.resolve)("IPhaseTimingRepository"),s=await e.execute();for(let{feature:e,run:r}of(await Promise.all(s.map(async e=>{let t=e.agentRunId?await a.findById(e.agentRunId):null;return{feature:e,run:t}})))){if(!r||t&&r.id!==t)continue;let a=i.get(e.id);if(!a){let t=new Set;try{for(let e of(await n.findByRunId(r.id)))e.completedAt&&t.add(e.phase)}catch{}i.set(e.id,{status:r.status,lifecycle:e.lifecycle,completedPhases:t,featureName:e.name,prStatus:e.pr?.status,prMergeable:e.pr?.mergeable,prCiStatus:e.pr?.ciStatus});continue}if(a.status!==r.status){a.status=r.status;let t=I[r.status];if(t){let a=w(r.result);l({eventType:t.eventType,agentRunId:r.id,featureId:e.id,featureName:e.name,...a&&{phaseName:a},message:`Agent status: ${r.status}`,severity:t.severity,timestamp:new Date().toISOString()})}}if((r.status===S.AgentRunStatus.running||r.status===S.AgentRunStatus.pending)&&r.pid&&!a.crashEmitted&&!(0,R.isProcessAlive)(r.pid)){a.crashEmitted=!0;let t=w(r.result);l({eventType:S.NotificationEventType.AgentFailed,agentRunId:r.id,featureId:e.id,featureName:e.name,...t&&{phaseName:t},message:`Agent crashed (PID ${r.pid} dead)`,severity:S.NotificationSeverity.Error,timestamp:new Date().toISOString()})}if(a.featureName!==e.name){a.featureName=e.name;let t=N[e.lifecycle]??"requirements";l({eventType:S.NotificationEventType.PhaseCompleted,agentRunId:r.id,featureId:e.id,featureName:e.name,phaseName:t,message:"Feature metadata updated",severity:S.NotificationSeverity.Info,timestamp:new Date().toISOString()})}if(a.lifecycle!==e.lifecycle){let t=a.lifecycle;a.lifecycle=e.lifecycle;let n=N[e.lifecycle];if(e.lifecycle===S.SdlcLifecycle.Review&&t!==S.SdlcLifecycle.Review){let t=e.pr?.url,a=t?`Ready for merge review — PR: ${t}`:"Ready for merge review";l({eventType:S.NotificationEventType.MergeReviewReady,agentRunId:r.id,featureId:e.id,featureName:e.name,phaseName:"merge",message:a,severity:S.NotificationSeverity.Info,timestamp:new Date().toISOString()})}else n&&l({eventType:S.NotificationEventType.PhaseCompleted,agentRunId:r.id,featureId:e.id,featureName:e.name,phaseName:n,message:`Entered ${n} phase`,severity:S.NotificationSeverity.Info,timestamp:new Date().toISOString()})}let s=e.pr?.status,o=e.pr?.mergeable,c=e.pr?.ciStatus;if(s!==a.prStatus||o!==a.prMergeable||c!==a.prCiStatus){a.prStatus=s,a.prMergeable=o,a.prCiStatus=c;let t=N[e.lifecycle]??"merge";l({eventType:S.NotificationEventType.PhaseCompleted,agentRunId:r.id,featureId:e.id,featureName:e.name,phaseName:t,message:!1===o?`PR #${e.pr?.number} has merge conflicts`:"PR status updated",severity:!1===o?S.NotificationSeverity.Warning:S.NotificationSeverity.Info,timestamp:new Date().toISOString()})}try{for(let t of(await n.findByRunId(r.id)))t.completedAt&&!a.completedPhases.has(t.phase)&&(a.completedPhases.add(t.phase),l({eventType:S.NotificationEventType.PhaseCompleted,agentRunId:r.id,featureId:e.id,featureName:e.name,phaseName:t.phase,message:`Completed ${t.phase} phase`,severity:S.NotificationSeverity.Info,timestamp:new Date().toISOString()}))}catch{}}try{let e=(0,h.resolve)("IInteractiveSessionRepository"),t=await e.findAllActive();for(let e of t){let t=r.get(e.id);if(t?.status!==e.status){r.set(e.id,{status:e.status});let t={type:e.status===S.InteractiveSessionStatus.booting?"interactive_session_booting":e.status===S.InteractiveSessionStatus.ready?"interactive_session_ready":e.status===S.InteractiveSessionStatus.error?"interactive_session_error":"interactive_session_stopped",sessionId:e.id,featureId:e.featureId};o(`event: interactive_session
|
|
5
|
+
data: ${JSON.stringify(t)}
|
|
6
|
+
|
|
7
|
+
`)}}for(let[a,n]of r)if((n.status===S.InteractiveSessionStatus.booting||n.status===S.InteractiveSessionStatus.ready)&&!t.find(e=>e.id===a)){let t=await e.findById(a);if(t){r.set(a,{status:t.status});let e={type:t.status===S.InteractiveSessionStatus.error?"interactive_session_error":"interactive_session_stopped",sessionId:t.id,featureId:t.featureId};o(`event: interactive_session
|
|
8
|
+
data: ${JSON.stringify(e)}
|
|
9
|
+
|
|
10
|
+
`)}else r.delete(a)}}catch{}c=0}catch(e){(++c<=3||c%60==0)&&console.error(`[SSE /api/agent-events] poll error #${c}:`,e instanceof Error?e.message:e)}}d();let u=setInterval(()=>void d(),2e3),p=setInterval(()=>{o(": heartbeat\n\n")},3e4);e.signal.addEventListener("abort",()=>{s=!0,clearInterval(u),clearInterval(p);try{a.close()}catch{}},{once:!0})}});return new Response(a,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}catch(e){return console.error("[SSE route] GET handler error:",e),new Response(JSON.stringify({error:String(e)}),{status:500,headers:{"Content-Type":"application/json"}})}}e.s(["GET",()=>E,"dynamic",0,"force-dynamic"],50328);var T=e.i(50328);let A=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/agent-events/route",pathname:"/api/agent-events",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/agent-events/route.ts",nextConfigOutput:"",userland:T}),{workAsyncStorage:C,workUnitAsyncStorage:P,serverHooks:b}=A;function x(){return(0,n.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:P})}async function _(e,t,n){A.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let h="/api/agent-events/route";h=h.replace(/\/index$/,"")||"/";let S=await A.prepare(e,t,{srcPage:h,multiZoneDraftMode:!1});if(!S)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:R,params:N,nextConfig:I,parsedUrl:w,isDraftMode:E,prerenderManifest:T,routerServerContext:C,isOnDemandRevalidate:P,revalidateOnlyGenerated:b,resolvedPathname:x,clientReferenceManifest:_,serverActionsManifest:O}=S,L=(0,o.normalizeAppPath)(h),$=!!(T.dynamicRoutes[L]||T.routes[x]),D=async()=>((null==C?void 0:C.render404)?await C.render404(e,t,w,!1):t.end("This page could not be found"),null);if($&&!E){let e=!!T.routes[x],t=T.dynamicRoutes[L];if(t&&!1===t.fallback&&!e){if(I.experimental.adapterPath)return await D();throw new m.NoFallbackError}}let q=null;!$||A.isDev||E||(q="/index"===(q=x)?"/":q);let M=!0===A.isDev||!$,U=$&&!M;O&&_&&(0,s.setManifestsSingleton)({page:h,clientReferenceManifest:_,serverActionsManifest:O});let k=e.method||"GET",H=(0,r.getTracer)(),F=H.getActiveScopeSpan(),B={params:N,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!I.experimental.authInterrupts},cacheComponents:!!I.cacheComponents,supportsDynamicResponse:M,incrementalCache:(0,i.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:I.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,n,i)=>A.onRequestError(e,t,n,i,C)},sharedContext:{buildId:R}},j=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),W=c.NextRequestAdapter.fromNodeNextRequest(j,(0,c.signalFromNodeResponse)(t));try{let s=async e=>A.handle(W,B).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=H.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=a.get("next.route");if(n){let t=`${k} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${k} ${h}`)}),o=!!(0,i.getRequestMeta)(e,"minimalMode"),l=async i=>{var r,l;let c=async({previousCacheEntry:a})=>{try{if(!o&&P&&b&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let r=await s(i);e.fetchMetrics=B.renderOpts.fetchMetrics;let l=B.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let c=B.renderOpts.collectedTags;if(!$)return await (0,p.sendResponse)(j,K,r,B.renderOpts.pendingWaitUntil),null;{let e=await r.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(r.headers);c&&(t[y.NEXT_CACHE_TAGS_HEADER]=c),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=y.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,n=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=y.INFINITE_CACHE?void 0:B.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:r.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:n}}}}catch(t){throw(null==a?void 0:a.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:h,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:P})},!1,C),t}},d=await A.handleResponse({req:e,nextConfig:I,cacheKey:q,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:b,responseGenerator:c,waitUntil:n.waitUntil,isMinimalMode:o});if(!$)return null;if((null==d||null==(r=d.value)?void 0:r.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",P?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),E&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return o&&$||m.delete(y.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,v.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(j,K,new Response(d.value.body,{headers:m,status:d.value.status||200})),null};F?await l(F):await H.withPropagatedContext(e.headers,()=>H.trace(d.BaseServerSpan.handleRequest,{spanName:`${k} ${h}`,kind:r.SpanKind.SERVER,attributes:{"http.method":k,"http.target":e.url}},l))}catch(t){if(t instanceof m.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:L,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:P})},!1,C),$)throw t;return await (0,p.sendResponse)(j,K,new Response(null,{status:500})),null}}e.s(["handler",()=>_,"patchFetch",()=>x,"routeModule",()=>A,"serverHooks",()=>b,"workAsyncStorage",()=>C,"workUnitAsyncStorage",()=>P],58773)}];
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/presentation/web/app/api/agent-events/route.ts","../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * SSE API Route: GET /api/agent-events\n *\n * Streams agent lifecycle notification events to connected web UI clients\n * via Server-Sent Events (SSE).\n *\n * Uses DB polling with a per-connection cache so only deltas are sent.\n * This avoids cross-module singleton issues with an in-process event bus.\n *\n * - Polls features + agent runs every 500ms\n * - Compares against cached state and emits only changes\n * - Sends heartbeat comments every 30 seconds to keep connection alive\n * - Supports optional ?runId query parameter to filter events\n * - Cleans up intervals on client disconnect\n */\n\nimport { resolve } from '@/lib/server-container';\nimport type { IAgentRunRepository } from '@shepai/core/application/ports/output/agents/agent-run-repository.interface';\nimport type { IPhaseTimingRepository } from '@shepai/core/application/ports/output/agents/phase-timing-repository.interface';\nimport type { IInteractiveSessionRepository } from '@shepai/core/application/ports/output/repositories/interactive-session-repository.interface';\nimport type { Feature, AgentRun } from '@shepai/core/domain/generated/output';\nimport {\n AgentRunStatus,\n InteractiveSessionStatus,\n SdlcLifecycle,\n NotificationEventType,\n NotificationSeverity,\n} from '@shepai/core/domain/generated/output';\nimport { isProcessAlive } from '@shepai/core/infrastructure/services/process/is-process-alive';\nimport type { NotificationEvent } from '@shepai/core/domain/generated/output';\nimport type { ListFeaturesUseCase } from '@shepai/core/application/use-cases/features/list-features.use-case';\n\n// Force dynamic — SSE streams must never be statically optimized or cached\nexport const dynamic = 'force-dynamic';\n\nconst POLL_INTERVAL_MS = 2_000;\nconst HEARTBEAT_INTERVAL_MS = 30_000;\n\ninterface CachedFeatureState {\n status: AgentRunStatus | null;\n lifecycle: string;\n completedPhases: Set<string>;\n featureName: string;\n prStatus: string | undefined;\n prMergeable: boolean | undefined;\n prCiStatus: string | undefined;\n /** Set to true once we've detected and emitted a crash event for this feature */\n crashEmitted?: boolean;\n}\n\n/**\n * Maps SdlcLifecycle values to agent graph node names so the client\n * can derive the correct FeatureLifecyclePhase via mapPhaseNameToLifecycle().\n */\nconst LIFECYCLE_TO_NODE: Record<SdlcLifecycle, string> = {\n [SdlcLifecycle.Started]: 'requirements',\n [SdlcLifecycle.Analyze]: 'analyze',\n [SdlcLifecycle.Requirements]: 'requirements',\n [SdlcLifecycle.Research]: 'research',\n [SdlcLifecycle.Planning]: 'plan',\n [SdlcLifecycle.Implementation]: 'implement',\n [SdlcLifecycle.Review]: 'merge',\n [SdlcLifecycle.Maintain]: 'maintain',\n [SdlcLifecycle.Blocked]: 'blocked',\n [SdlcLifecycle.Pending]: 'pending',\n [SdlcLifecycle.Deleting]: 'blocked',\n [SdlcLifecycle.AwaitingUpstream]: 'merge',\n [SdlcLifecycle.Archived]: 'archived',\n};\n\nconst STATUS_TO_EVENT: Partial<\n Record<AgentRunStatus, { eventType: NotificationEventType; severity: NotificationSeverity }>\n> = {\n [AgentRunStatus.running]: {\n eventType: NotificationEventType.AgentStarted,\n severity: NotificationSeverity.Info,\n },\n [AgentRunStatus.waitingApproval]: {\n eventType: NotificationEventType.WaitingApproval,\n severity: NotificationSeverity.Warning,\n },\n [AgentRunStatus.completed]: {\n eventType: NotificationEventType.AgentCompleted,\n severity: NotificationSeverity.Success,\n },\n [AgentRunStatus.failed]: {\n eventType: NotificationEventType.AgentFailed,\n severity: NotificationSeverity.Error,\n },\n [AgentRunStatus.interrupted]: {\n eventType: NotificationEventType.AgentFailed,\n severity: NotificationSeverity.Warning,\n },\n [AgentRunStatus.cancelled]: {\n eventType: NotificationEventType.AgentFailed,\n severity: NotificationSeverity.Warning,\n },\n};\n\n/** Map agent graph node name from AgentRun.result to a phase name. */\nfunction resultToPhase(result: string | undefined): string | undefined {\n if (!result?.startsWith('node:')) return undefined;\n return result.slice(5); // \"node:analyze\" → \"analyze\"\n}\n\n/** Payload emitted for interactive session lifecycle SSE events. */\nexport interface InteractiveSessionEvent {\n type:\n | 'interactive_session_booting'\n | 'interactive_session_ready'\n | 'interactive_session_stopped'\n | 'interactive_session_error';\n sessionId: string;\n featureId: string;\n}\n\n/** Per-connection cache entry for interactive sessions. */\ninterface CachedSessionState {\n status: InteractiveSessionStatus;\n}\n\nexport function GET(request: Request): Response {\n try {\n const url = new URL(request.url);\n const runIdFilter = url.searchParams.get('runId');\n\n const stream = new ReadableStream<Uint8Array>({\n start(controller) {\n const encoder = new TextEncoder();\n\n // Per-connection cache: featureId → last-seen state\n const cache = new Map<string, CachedFeatureState>();\n // Per-connection cache: sessionId → last-seen interactive session state\n const sessionCache = new Map<string, CachedSessionState>();\n let stopped = false;\n\n function enqueue(text: string) {\n if (stopped) return;\n try {\n controller.enqueue(encoder.encode(text));\n } catch {\n // Stream may be closed\n }\n }\n\n function emitEvent(event: NotificationEvent) {\n // eslint-disable-next-line no-console\n console.log(\n `[SSE] emit: ${event.eventType} for \"${event.featureName}\"${event.phaseName ? ` (${event.phaseName})` : ''}`\n );\n enqueue(`event: notification\\ndata: ${JSON.stringify(event)}\\n\\n`);\n }\n\n let pollErrorCount = 0;\n\n async function poll() {\n if (stopped) return;\n\n try {\n const listFeatures = resolve<ListFeaturesUseCase>('ListFeaturesUseCase');\n const agentRunRepo = resolve<IAgentRunRepository>('IAgentRunRepository');\n const phaseTimingRepo = resolve<IPhaseTimingRepository>('IPhaseTimingRepository');\n\n const features = await listFeatures.execute();\n\n // Build current state for features with agent runs\n const entries: { feature: Feature; run: AgentRun | null }[] = await Promise.all(\n features.map(async (feature) => {\n const run = feature.agentRunId\n ? await agentRunRepo.findById(feature.agentRunId)\n : null;\n return { feature, run };\n })\n );\n\n for (const { feature, run } of entries) {\n if (!run) continue;\n\n // Apply runId filter if present\n if (runIdFilter && run.id !== runIdFilter) continue;\n\n const prev = cache.get(feature.id);\n\n if (!prev) {\n // First time seeing this feature — seed cache, don't emit\n const completedPhases = new Set<string>();\n try {\n const timings = await phaseTimingRepo.findByRunId(run.id);\n for (const t of timings) {\n if (t.completedAt) completedPhases.add(t.phase);\n }\n } catch {\n // Ignore timing errors\n }\n\n cache.set(feature.id, {\n status: run.status,\n lifecycle: feature.lifecycle,\n completedPhases,\n featureName: feature.name,\n prStatus: feature.pr?.status,\n prMergeable: feature.pr?.mergeable,\n prCiStatus: feature.pr?.ciStatus,\n });\n continue;\n }\n\n // Check for status change\n if (prev.status !== run.status) {\n prev.status = run.status;\n const mapping = STATUS_TO_EVENT[run.status];\n if (mapping) {\n const phase = resultToPhase(run.result);\n emitEvent({\n eventType: mapping.eventType,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n ...(phase && { phaseName: phase }),\n message: `Agent status: ${run.status}`,\n severity: mapping.severity,\n timestamp: new Date().toISOString(),\n });\n }\n }\n\n // Check for crashed agent: status is running/pending but PID is dead\n const isActive =\n run.status === AgentRunStatus.running || run.status === AgentRunStatus.pending;\n if (isActive && run.pid && !prev.crashEmitted && !isProcessAlive(run.pid)) {\n prev.crashEmitted = true;\n const phase = resultToPhase(run.result);\n emitEvent({\n eventType: NotificationEventType.AgentFailed,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n ...(phase && { phaseName: phase }),\n message: `Agent crashed (PID ${run.pid} dead)`,\n severity: NotificationSeverity.Error,\n timestamp: new Date().toISOString(),\n });\n }\n\n // Check for feature name change (AI metadata generation updates name)\n if (prev.featureName !== feature.name) {\n prev.featureName = feature.name;\n const nodeName =\n LIFECYCLE_TO_NODE[feature.lifecycle as SdlcLifecycle] ?? 'requirements';\n emitEvent({\n eventType: NotificationEventType.PhaseCompleted,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: nodeName,\n message: `Feature metadata updated`,\n severity: NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n }\n\n // Check for lifecycle change (agent stays \"running\" but moves through phases)\n if (prev.lifecycle !== feature.lifecycle) {\n const prevLifecycle = prev.lifecycle;\n prev.lifecycle = feature.lifecycle;\n const nodeName = LIFECYCLE_TO_NODE[feature.lifecycle as SdlcLifecycle];\n\n // Emit MergeReviewReady when lifecycle transitions TO Review\n if (\n feature.lifecycle === SdlcLifecycle.Review &&\n prevLifecycle !== SdlcLifecycle.Review\n ) {\n const prUrl = feature.pr?.url;\n const message = prUrl\n ? `Ready for merge review — PR: ${prUrl}`\n : 'Ready for merge review';\n emitEvent({\n eventType: NotificationEventType.MergeReviewReady,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: 'merge',\n message,\n severity: NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n } else if (nodeName) {\n emitEvent({\n eventType: NotificationEventType.PhaseCompleted,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: nodeName,\n message: `Entered ${nodeName} phase`,\n severity: NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n }\n }\n\n // Check for PR data changes (status / mergeable / CI status)\n const curPrStatus = feature.pr?.status;\n const curMergeable = feature.pr?.mergeable;\n const curCiStatus = feature.pr?.ciStatus;\n if (\n curPrStatus !== prev.prStatus ||\n curMergeable !== prev.prMergeable ||\n curCiStatus !== prev.prCiStatus\n ) {\n prev.prStatus = curPrStatus;\n prev.prMergeable = curMergeable;\n prev.prCiStatus = curCiStatus;\n const nodeName = LIFECYCLE_TO_NODE[feature.lifecycle as SdlcLifecycle] ?? 'merge';\n emitEvent({\n eventType: NotificationEventType.PhaseCompleted,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: nodeName,\n message:\n curMergeable === false\n ? `PR #${feature.pr?.number} has merge conflicts`\n : `PR status updated`,\n severity:\n curMergeable === false\n ? NotificationSeverity.Warning\n : NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n }\n\n // Check for new phase completions\n try {\n const timings = await phaseTimingRepo.findByRunId(run.id);\n for (const t of timings) {\n if (t.completedAt && !prev.completedPhases.has(t.phase)) {\n prev.completedPhases.add(t.phase);\n emitEvent({\n eventType: NotificationEventType.PhaseCompleted,\n agentRunId: run.id,\n featureId: feature.id,\n featureName: feature.name,\n phaseName: t.phase,\n message: `Completed ${t.phase} phase`,\n severity: NotificationSeverity.Info,\n timestamp: new Date().toISOString(),\n });\n }\n }\n } catch {\n // Ignore timing errors\n }\n }\n // Poll interactive sessions for lifecycle status changes\n try {\n const sessionRepo = resolve<IInteractiveSessionRepository>(\n 'IInteractiveSessionRepository'\n );\n const activeSessions = await sessionRepo.findAllActive();\n\n for (const session of activeSessions) {\n const prev = sessionCache.get(session.id);\n if (prev?.status !== session.status) {\n sessionCache.set(session.id, { status: session.status });\n const eventType =\n session.status === InteractiveSessionStatus.booting\n ? 'interactive_session_booting'\n : session.status === InteractiveSessionStatus.ready\n ? 'interactive_session_ready'\n : session.status === InteractiveSessionStatus.error\n ? 'interactive_session_error'\n : 'interactive_session_stopped';\n const payload: InteractiveSessionEvent = {\n type: eventType,\n sessionId: session.id,\n featureId: session.featureId,\n };\n enqueue(`event: interactive_session\\ndata: ${JSON.stringify(payload)}\\n\\n`);\n }\n }\n\n // Emit stopped/error events for sessions that disappeared from active list\n for (const [sessionId, cached] of sessionCache) {\n if (\n (cached.status === InteractiveSessionStatus.booting ||\n cached.status === InteractiveSessionStatus.ready) &&\n !activeSessions.find((s) => s.id === sessionId)\n ) {\n // Session no longer active — fetch to get final status\n const session = await sessionRepo.findById(sessionId);\n if (session) {\n sessionCache.set(sessionId, { status: session.status });\n const eventType =\n session.status === InteractiveSessionStatus.error\n ? 'interactive_session_error'\n : 'interactive_session_stopped';\n const payload: InteractiveSessionEvent = {\n type: eventType,\n sessionId: session.id,\n featureId: session.featureId,\n };\n enqueue(`event: interactive_session\\ndata: ${JSON.stringify(payload)}\\n\\n`);\n } else {\n sessionCache.delete(sessionId);\n }\n }\n }\n } catch {\n // Ignore interactive session poll errors to not affect main polling\n }\n\n pollErrorCount = 0; // Reset on success\n } catch (error) {\n pollErrorCount++;\n // Log first few errors, then throttle to avoid spamming\n if (pollErrorCount <= 3 || pollErrorCount % 60 === 0) {\n // eslint-disable-next-line no-console\n console.error(\n `[SSE /api/agent-events] poll error #${pollErrorCount}:`,\n error instanceof Error ? error.message : error\n );\n }\n }\n }\n\n // First poll immediately, then every POLL_INTERVAL_MS\n void poll();\n const pollInterval = setInterval(() => void poll(), POLL_INTERVAL_MS);\n\n // Heartbeat to keep connection alive\n const heartbeatInterval = setInterval(() => {\n enqueue(': heartbeat\\n\\n');\n }, HEARTBEAT_INTERVAL_MS);\n\n // Cleanup on client disconnect\n const cleanup = () => {\n stopped = true;\n clearInterval(pollInterval);\n clearInterval(heartbeatInterval);\n try {\n controller.close();\n } catch {\n // Stream may already be closed\n }\n };\n\n request.signal.addEventListener('abort', cleanup, { once: true });\n },\n });\n\n return new Response(stream, {\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache',\n Connection: 'keep-alive',\n },\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('[SSE route] GET handler error:', error);\n return new Response(JSON.stringify({ error: String(error) }), {\n status: 500,\n headers: { 'Content-Type': 'application/json' },\n });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/agent-events/route\",\n pathname: \"/api/agent-events\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/presentation/web/app/api/agent-events/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/agent-events/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"uCCAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,KACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EA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AAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[1]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";function t(e){let t=globalThis.__shepContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}e.s(["resolve",()=>t])},9550,e=>{"use strict";var t=e.i(22925),r=e.i(62995),a=e.i(14112),n=e.i(31716),s=e.i(16340),o=e.i(40522),i=e.i(21994),l=e.i(5802),d=e.i(17171),u=e.i(177),p=e.i(43685),c=e.i(84832),h=e.i(92435),x=e.i(41260),R=e.i(80556),v=e.i(93695);e.i(97230);var f=e.i(35162),g=e.i(27980),w=e.i(40060);async function E(e,{params:t}){let{id:r}=await t;try{let e=(0,w.resolve)("InstallToolUseCase"),t=await e.execute(r);if("error"===t.status)return g.NextResponse.json({error:t.errorMessage},{status:500});return g.NextResponse.json({status:t})}catch(t){let e=t instanceof Error?t.message:"Failed to install tool";return g.NextResponse.json({error:e},{status:500})}}e.s(["POST",()=>E],55315);var m=e.i(55315);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/tools/[id]/install/route",pathname:"/api/tools/[id]/install",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/tools/[id]/install/route.ts",nextConfigOutput:"",userland:m}),{workAsyncStorage:y,workUnitAsyncStorage:b,serverHooks:A}=C;function T(){return(0,a.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:b})}async function N(e,t,a){C.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/tools/[id]/install/route";g=g.replace(/\/index$/,"")||"/";let w=await C.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,params:m,nextConfig:y,parsedUrl:b,isDraftMode:A,prerenderManifest:T,routerServerContext:N,isOnDemandRevalidate:P,revalidateOnlyGenerated:O,resolvedPathname:_,clientReferenceManifest:k,serverActionsManifest:j}=w,q=(0,i.normalizeAppPath)(g),S=!!(T.dynamicRoutes[q]||T.routes[_]),I=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,b,!1):t.end("This page could not be found"),null);if(S&&!A){let e=!!T.routes[_],t=T.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(y.experimental.adapterPath)return await I();throw new v.NoFallbackError}}let H=null;!S||C.isDev||A||(H="/index"===(H=_)?"/":H);let U=!0===C.isDev||!S,D=S&&!U;j&&k&&(0,o.setManifestsSingleton)({page:g,clientReferenceManifest:k,serverActionsManifest:j});let M=e.method||"GET",F=(0,s.getTracer)(),$=F.getActiveScopeSpan(),K={params:m,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts},cacheComponents:!!y.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:y.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>C.onRequestError(e,t,a,n,N)},sharedContext:{buildId:E}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),G=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let o=async e=>C.handle(G,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${g}`)}),i=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!i&&P&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!S)return await (0,c.sendResponse)(L,B,s,K.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[R.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,a=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=R.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:P})},!1,N),t}},u=await C.handleResponse({req:e,nextConfig:y,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:O,responseGenerator:d,waitUntil:a.waitUntil,isMinimalMode:i});if(!S)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",P?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let v=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return i&&S||v.delete(R.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||v.get("Cache-Control")||v.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(L,B,new Response(u.value.body,{headers:v,status:u.value.status||200})),null};$?await l($):await F.withPropagatedContext(e.headers,()=>F.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${g}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof v.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:P})},!1,N),S)throw t;return await (0,c.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>N,"patchFetch",()=>T,"routeModule",()=>C,"serverHooks",()=>A,"workAsyncStorage",()=>y,"workUnitAsyncStorage",()=>b],9550)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0866d2b5._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../src/presentation/web/app/api/tools/%5Bid%5D/install/route.ts","../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shep ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shepContainer';\n\n/**\n * Resolve a dependency from the DI container.\n *\n * Usage in server components / API routes:\n * ```ts\n * import { resolve } from '@/lib/server-container';\n * import { ListFeaturesUseCase } from '@shepai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","import { NextResponse } from 'next/server';\nimport { resolve } from '@/lib/server-container';\nimport type { InstallToolUseCase } from '@shepai/core/application/use-cases/tools/install-tool.use-case';\nimport type { ToolInstallationStatus } from '@shepai/core/domain/generated/output';\n\n// NOTE: Do NOT import TOOL_METADATA directly in API routes.\n// The module uses import.meta.url + fs.readdirSync to load JSON files,\n// which breaks when Turbopack bundles it (import.meta.url resolves to\n// the bundled chunk location where the tools/ directory doesn't exist).\n// Tool validation is delegated to the use case via the DI container,\n// where the module loads correctly in the Node.js CLI bootstrap context.\n\nexport async function POST(\n _request: Request,\n { params }: { params: Promise<{ id: string }> }\n): Promise<NextResponse> {\n const { id } = await params;\n\n try {\n const useCase = resolve<InstallToolUseCase>('InstallToolUseCase');\n const status: ToolInstallationStatus = await useCase.execute(id);\n\n if (status.status === 'error') {\n return NextResponse.json({ error: status.errorMessage }, { status: 500 });\n }\n\n return NextResponse.json({ status });\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to install tool';\n return NextResponse.json({ error: message }, { status: 500 });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/tools/[id]/install/route\",\n pathname: \"/api/tools/[id]/install\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/presentation/web/app/api/tools/[id]/install/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/tools/[id]/install/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"m/BAuBO,SAAS,EAAW,CAAwB,EACjD,IAAM,EAAa,UAAsC,CAAC,AAdtC,eAcoD,CAIxE,GAAI,CAAC,EACH,MAAM,AAAI,GADI,GAEZ,0FAIJ,OAAO,EAAU,OAAO,CAAC,EAC3B,+CEnCA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,KACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,ODhBA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAWO,eAAe,EACpB,CAAiB,CACjB,QAAE,CAAM,CAAuC,EAE/C,GAAM,IAAE,CAAE,CAAE,CAAG,MAAM,EAErB,GAAI,CACF,IAAM,EA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KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[2]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";function t(e){let t=globalThis.__shepContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}e.s(["resolve",()=>t])},28103,e=>{"use strict";var t=e.i(22925),r=e.i(62995),a=e.i(14112),n=e.i(31716),s=e.i(16340),o=e.i(40522),i=e.i(21994),l=e.i(5802),d=e.i(17171),u=e.i(177),p=e.i(43685),c=e.i(84832),h=e.i(92435),x=e.i(41260),v=e.i(80556),R=e.i(93695);e.i(97230);var f=e.i(35162),g=e.i(27980),m=e.i(40060);async function w(e,{params:t}){try{let{featureId:e}=await t,r=(0,m.resolve)("StopInteractiveSessionUseCase");return await r.execute({featureId:e}),g.NextResponse.json({ok:!0})}catch(e){return console.error("[POST /api/interactive/chat/:featureId/stop]",e),g.NextResponse.json({error:e instanceof Error?e.message:"Internal server error"},{status:500})}}e.s(["POST",()=>w,"dynamic",0,"force-dynamic"],12545);var E=e.i(12545);let y=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/interactive/chat/[featureId]/stop/route",pathname:"/api/interactive/chat/[featureId]/stop",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/interactive/chat/[featureId]/stop/route.ts",nextConfigOutput:"",userland:E}),{workAsyncStorage:C,workUnitAsyncStorage:b,serverHooks:A}=y;function T(){return(0,a.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:b})}async function N(e,t,a){y.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/interactive/chat/[featureId]/stop/route";g=g.replace(/\/index$/,"")||"/";let m=await y.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!m)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:E,nextConfig:C,parsedUrl:b,isDraftMode:A,prerenderManifest:T,routerServerContext:N,isOnDemandRevalidate:P,revalidateOnlyGenerated:I,resolvedPathname:O,clientReferenceManifest:S,serverActionsManifest:k}=m,_=(0,i.normalizeAppPath)(g),q=!!(T.dynamicRoutes[_]||T.routes[O]),j=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,b,!1):t.end("This page could not be found"),null);if(q&&!A){let e=!!T.routes[O],t=T.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(C.experimental.adapterPath)return await j();throw new R.NoFallbackError}}let H=null;!q||y.isDev||A||(H="/index"===(H=O)?"/":H);let U=!0===y.isDev||!q,D=q&&!U;k&&S&&(0,o.setManifestsSingleton)({page:g,clientReferenceManifest:S,serverActionsManifest:k});let M=e.method||"GET",$=(0,s.getTracer)(),F=$.getActiveScopeSpan(),K={params:E,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:C.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>y.onRequestError(e,t,a,n,N)},sharedContext:{buildId:w}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),G=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let o=async e=>y.handle(G,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${g}`)}),i=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!i&&P&&I&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!q)return await (0,c.sendResponse)(L,B,s,K.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[v.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,a=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=v.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await y.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:P})},!1,N),t}},u=await y.handleResponse({req:e,nextConfig:C,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:I,responseGenerator:d,waitUntil:a.waitUntil,isMinimalMode:i});if(!q)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",P?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let R=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return i&&q||R.delete(v.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||R.get("Cache-Control")||R.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(L,B,new Response(u.value.body,{headers:R,status:u.value.status||200})),null};F?await l(F):await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${g}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof R.NoFallbackError||await y.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:P})},!1,N),q)throw t;return await (0,c.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>N,"patchFetch",()=>T,"routeModule",()=>y,"serverHooks",()=>A,"workAsyncStorage",()=>C,"workUnitAsyncStorage",()=>b],28103)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__10852c5c._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js","../../../../../../src/presentation/web/app/api/interactive/chat/%5BfeatureId%5D/stop/route.ts"],"sourcesContent":["/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shep ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shepContainer';\n\n/**\n * Resolve a dependency from the DI container.\n *\n * Usage in server components / API routes:\n * ```ts\n * import { resolve } from '@/lib/server-container';\n * import { ListFeaturesUseCase } from '@shepai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/interactive/chat/[featureId]/stop/route\",\n pathname: \"/api/interactive/chat/[featureId]/stop\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/presentation/web/app/api/interactive/chat/[featureId]/stop/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/interactive/chat/[featureId]/stop/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","/**\n * Feature-scoped stop API — kills the active agent session.\n *\n * `featureId` is a polymorphic scope key: a feature UUID, \"repo-<id>\", or \"global\".\n */\n\nimport type { NextRequest } from 'next/server';\nimport { NextResponse } from 'next/server';\nimport { resolve } from '@/lib/server-container';\nimport type { StopInteractiveSessionUseCase } from '@shepai/core/application/use-cases/interactive/stop-interactive-session.use-case';\n\nexport const dynamic = 'force-dynamic';\n\ninterface RouteParams {\n params: Promise<{ featureId: string }>;\n}\n\nexport async function POST(_request: NextRequest, { params }: RouteParams): Promise<NextResponse> {\n try {\n const { featureId } = await params;\n const useCase = resolve<StopInteractiveSessionUseCase>('StopInteractiveSessionUseCase');\n await useCase.execute({ featureId });\n\n return NextResponse.json({ ok: true });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('[POST /api/interactive/chat/:featureId/stop]', error);\n return NextResponse.json(\n { error: error instanceof Error ? error.message : 'Internal server error' },\n { status: 500 }\n );\n }\n}\n"],"names":[],"mappings":"m/BAuBO,SAAS,EAAW,CAAwB,EACjD,IAAM,EAAa,UAAsC,CAAC,AAdtC,eAcoD,CAIxE,GAAI,CAAC,EACH,MAAM,AAAI,GADI,GAEZ,0FAIJ,OAAO,EAAU,OAAO,CAAC,EAC3B,gDCnCA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,KACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OCTA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OASO,eAAe,EAAK,CAAqB,CAAE,QAAE,CAAM,CAAe,EACvE,GAAI,CACF,GAAM,WAAE,CAAS,CAAE,CAAG,MAAM,EACtB,EAA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
1
|
+
module.exports=[12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";function t(e){let t=globalThis.__shepContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}e.s(["resolve",()=>t])},81280,e=>{"use strict";var t=e.i(22925),r=e.i(62995),n=e.i(14112),a=e.i(31716),o=e.i(16340),i=e.i(40522),s=e.i(21994),l=e.i(5802),u=e.i(17171),d=e.i(177),c=e.i(43685),p=e.i(84832),h=e.i(92435),f=e.i(41260),x=e.i(80556),v=e.i(93695);e.i(97230);var R=e.i(35162),g=e.i(40060),w=e.i(50227),m=e.i(60526),y=e.i(12714),E=e.i(2157);function C(e){return new Response(new ReadableStream({start(t){let r=new TextEncoder;t.enqueue(r.encode(`event: error
|
|
2
|
+
data: ${JSON.stringify({error:e})}
|
|
3
|
+
|
|
4
|
+
`)),t.close()}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}async function b(e){try{let t=new URL(e.url).searchParams.get("featureId");if(!t?.trim())return C("featureId is required");let r=(0,g.resolve)("IFeatureRepository"),n=await r.findById(t);if(!n)return C(`Feature not found: ${t}`);if(!n.agentRunId)return C(`Feature "${n.name}" has no agent run`);let a=(0,w.join)((0,m.homedir)(),".shep","logs",`worker-${n.agentRunId}.log`),o=new ReadableStream({start(t){let r=new TextEncoder,n=!1,o=0,i=null,s=null;function l(e){if(!n)try{t.enqueue(r.encode(e))}catch{}}async function u(){try{if((await (0,y.stat)(a)).size<=o)return null;let e=await (0,y.readFile)(a,"utf-8"),t=e.slice(o);return o=e.length,t||null}catch{return null}}async function d(){if(!n)try{let e=await u();e&&l(`event: log
|
|
5
|
+
data: ${JSON.stringify({content:e})}
|
|
6
|
+
|
|
7
|
+
`)}catch{}}(async()=>{try{let e=await u();if(e&&l(`event: initial
|
|
8
|
+
data: ${JSON.stringify({content:e})}
|
|
9
|
+
|
|
10
|
+
`),n)return;try{(i=(0,E.watch)(a,{persistent:!1},()=>{d()})).on("error",()=>{})}catch{}s=setInterval(()=>{d()},2e3)}catch{}})();let c=setInterval(()=>{l(": heartbeat\n\n")},3e4);e.signal.addEventListener("abort",()=>{n=!0,i&&(i.close(),i=null),s&&(clearInterval(s),s=null),clearInterval(c);try{t.close()}catch{}},{once:!0})}});return new Response(o,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}catch(e){return console.error("[SSE route] GET /api/feature-logs error:",e),new Response(JSON.stringify({error:String(e)}),{status:500,headers:{"Content-Type":"application/json"}})}}e.s(["GET",()=>b,"dynamic",0,"force-dynamic"],91095);var T=e.i(91095);let A=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/feature-logs/route",pathname:"/api/feature-logs",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/feature-logs/route.ts",nextConfigOutput:"",userland:T}),{workAsyncStorage:S,workUnitAsyncStorage:I,serverHooks:N}=A;function q(){return(0,n.patchFetch)({workAsyncStorage:S,workUnitAsyncStorage:I})}async function O(e,t,n){A.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/feature-logs/route";g=g.replace(/\/index$/,"")||"/";let w=await A.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:m,params:y,nextConfig:E,parsedUrl:C,isDraftMode:b,prerenderManifest:T,routerServerContext:S,isOnDemandRevalidate:I,revalidateOnlyGenerated:N,resolvedPathname:q,clientReferenceManifest:O,serverActionsManifest:P}=w,k=(0,s.normalizeAppPath)(g),_=!!(T.dynamicRoutes[k]||T.routes[q]),j=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,C,!1):t.end("This page could not be found"),null);if(_&&!b){let e=!!T.routes[q],t=T.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await j();throw new v.NoFallbackError}}let H=null;!_||A.isDev||b||(H="/index"===(H=q)?"/":H);let U=!0===A.isDev||!_,$=_&&!U;P&&O&&(0,i.setManifestsSingleton)({page:g,clientReferenceManifest:O,serverActionsManifest:P});let D=e.method||"GET",F=(0,o.getTracer)(),M=F.getActiveScopeSpan(),K={params:y,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>A.onRequestError(e,t,n,a,S)},sharedContext:{buildId:m}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),G=u.NextRequestAdapter.fromNodeNextRequest(L,(0,u.signalFromNodeResponse)(t));try{let i=async e=>A.handle(G,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${D} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${g}`)}),s=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var o,l;let u=async({previousCacheEntry:r})=>{try{if(!s&&I&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(a);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let u=K.renderOpts.collectedTags;if(!_)return await (0,p.sendResponse)(L,B,o,K.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(o.headers);u&&(t[x.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:I})},!1,S),t}},d=await A.handleResponse({req:e,nextConfig:E,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:I,revalidateOnlyGenerated:N,responseGenerator:u,waitUntil:n.waitUntil,isMinimalMode:s});if(!_)return null;if((null==d||null==(o=d.value)?void 0:o.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",I?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let v=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return s&&_||v.delete(x.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||v.get("Cache-Control")||v.set("Cache-Control",(0,f.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(L,B,new Response(d.value.body,{headers:v,status:d.value.status||200})),null};M?await l(M):await F.withPropagatedContext(e.headers,()=>F.trace(d.BaseServerSpan.handleRequest,{spanName:`${D} ${g}`,kind:o.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},l))}catch(t){if(t instanceof v.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:I})},!1,S),_)throw t;return await (0,p.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>O,"patchFetch",()=>q,"routeModule",()=>A,"serverHooks",()=>N,"workAsyncStorage",()=>S,"workUnitAsyncStorage",()=>I],81280)}];
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__2b1074db._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../src/presentation/web/app/api/feature-logs/route.ts","../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shep ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shepContainer';\n\n/**\n * Resolve a dependency from the DI container.\n *\n * Usage in server components / API routes:\n * ```ts\n * import { resolve } from '@/lib/server-container';\n * import { ListFeaturesUseCase } from '@shepai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","/**\n * SSE API Route: GET /api/feature-logs\n *\n * Streams feature agent log output to the client via Server-Sent Events.\n * Resolves the feature to find its agentRunId, reads the corresponding\n * worker log file, and watches for new content.\n *\n * - Accepts ?featureId query parameter (required)\n * - Sends existing log content as SSE \"initial\" event\n * - Sends new log content as SSE \"log\" events\n * - Sends heartbeat comments every 30 seconds to keep connection alive\n * - Cleans up watchers/intervals on client disconnect\n */\n\nimport { resolve } from '@/lib/server-container';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\nimport { join } from 'node:path';\nimport { homedir } from 'node:os';\nimport { readFile, stat } from 'node:fs/promises';\nimport { watch, type FSWatcher } from 'node:fs';\n\n// Force dynamic — SSE streams must never be statically optimized or cached\nexport const dynamic = 'force-dynamic';\n\nconst HEARTBEAT_INTERVAL_MS = 30_000;\nconst POLL_INTERVAL_MS = 2_000;\n\n/**\n * Create a short-lived SSE error response.\n */\nfunction sseError(error: string): Response {\n const stream = new ReadableStream<Uint8Array>({\n start(controller) {\n const encoder = new TextEncoder();\n controller.enqueue(encoder.encode(`event: error\\ndata: ${JSON.stringify({ error })}\\n\\n`));\n controller.close();\n },\n });\n\n return new Response(stream, {\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache',\n Connection: 'keep-alive',\n },\n });\n}\n\nexport async function GET(request: Request): Promise<Response> {\n try {\n const url = new URL(request.url);\n const featureId = url.searchParams.get('featureId');\n\n if (!featureId?.trim()) {\n return sseError('featureId is required');\n }\n\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n\n if (!feature) {\n return sseError(`Feature not found: ${featureId}`);\n }\n\n if (!feature.agentRunId) {\n return sseError(`Feature \"${feature.name}\" has no agent run`);\n }\n\n const logPath = join(homedir(), '.shep', 'logs', `worker-${feature.agentRunId}.log`);\n\n const stream = new ReadableStream<Uint8Array>({\n start(controller) {\n const encoder = new TextEncoder();\n let stopped = false;\n let bytesRead = 0;\n let watcher: FSWatcher | null = null;\n let pollInterval: ReturnType<typeof setInterval> | null = null;\n\n function enqueue(text: string) {\n if (stopped) return;\n try {\n controller.enqueue(encoder.encode(text));\n } catch {\n // Stream may be closed\n }\n }\n\n /**\n * Read any new content from the log file starting at `bytesRead`.\n * Returns the content read, or null if the file doesn't exist yet.\n */\n async function readNewContent(): Promise<string | null> {\n try {\n const fileStat = await stat(logPath);\n if (fileStat.size <= bytesRead) return null;\n\n const content = await readFile(logPath, 'utf-8');\n const newContent = content.slice(bytesRead);\n bytesRead = content.length;\n return newContent || null;\n } catch {\n // File doesn't exist yet — agent may have just started\n return null;\n }\n }\n\n /**\n * Check for new content and send it as a log event.\n */\n async function checkForUpdates() {\n if (stopped) return;\n try {\n const content = await readNewContent();\n if (content) {\n enqueue(`event: log\\ndata: ${JSON.stringify({ content })}\\n\\n`);\n }\n } catch {\n // Ignore read errors during polling\n }\n }\n\n // Initialize: read existing content and set up watchers\n (async () => {\n try {\n // Send existing content as initial event\n const initialContent = await readNewContent();\n if (initialContent) {\n enqueue(`event: initial\\ndata: ${JSON.stringify({ content: initialContent })}\\n\\n`);\n }\n\n if (stopped) return;\n\n // Watch for file changes with fs.watch\n try {\n watcher = watch(logPath, { persistent: false }, () => {\n void checkForUpdates();\n });\n\n watcher.on('error', () => {\n // Watcher error — fallback poll will handle it\n });\n } catch {\n // File may not exist yet — poll will handle it\n }\n\n // Fallback poll every 2s (handles cases where fs.watch misses events\n // or the file doesn't exist yet)\n pollInterval = setInterval(() => {\n void checkForUpdates();\n }, POLL_INTERVAL_MS);\n } catch {\n // Initialization error — stream will still stay open for heartbeats\n }\n })();\n\n // Heartbeat to keep connection alive\n const heartbeatInterval = setInterval(() => {\n enqueue(': heartbeat\\n\\n');\n }, HEARTBEAT_INTERVAL_MS);\n\n // Cleanup on client disconnect\n const cleanup = () => {\n stopped = true;\n if (watcher) {\n watcher.close();\n watcher = null;\n }\n if (pollInterval) {\n clearInterval(pollInterval);\n pollInterval = null;\n }\n clearInterval(heartbeatInterval);\n try {\n controller.close();\n } catch {\n // Stream may already be closed\n }\n };\n\n request.signal.addEventListener('abort', cleanup, { once: true });\n },\n });\n\n return new Response(stream, {\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache',\n Connection: 'keep-alive',\n },\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('[SSE route] GET /api/feature-logs error:', error);\n return new Response(JSON.stringify({ error: String(error) }), {\n status: 500,\n headers: { 'Content-Type': 'application/json' },\n });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/feature-logs/route\",\n pathname: \"/api/feature-logs\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/presentation/web/app/api/feature-logs/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/feature-logs/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"ylCAuBO,SAAS,EAAW,CAAwB,EACjD,IAAM,EAAa,UAAsC,CAAC,AAdtC,eAcoD,CAIxE,GAAI,CAAC,EACH,MAAM,AAAI,GADI,GAEZ,0FAIJ,OAAO,EAAU,OAAO,CAAC,EAC3B,gDEnCA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA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CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[2]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";function t(e){let t=globalThis.__shepContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}e.s(["resolve",()=>t])},32828,e=>{"use strict";e.i(12714);var t=e.i(60526),r=e.i(50227);function a(){return process.env.SHEP_HOME??(0,r.join)((0,t.homedir)(),".shep")}e.i(2157),e.s(["getShepHomeDir",()=>a])},24183,e=>{"use strict";var t=e.i(22925),r=e.i(62995),a=e.i(14112),n=e.i(31716),s=e.i(16340),o=e.i(40522),i=e.i(21994),l=e.i(5802),u=e.i(17171),d=e.i(177),c=e.i(43685),p=e.i(84832),h=e.i(92435),x=e.i(41260),v=e.i(80556),f=e.i(93695);e.i(97230);var g=e.i(35162),m=e.i(27980),R=e.i(40060),E=e.i(32828);async function w(e,{params:t}){try{let{featureId:r}=await t,{content:a,worktreePath:n,model:s,agentType:o}=await e.json();if(!a||"string"!=typeof a||0===a.trim().length)return m.NextResponse.json({error:"content must be a non-empty string"},{status:400});if(Buffer.byteLength(a,"utf8")>32768)return m.NextResponse.json({error:"content exceeds maximum size of 32 KB"},{status:400});let i=n;i&&"string"==typeof i||(i=(0,E.getShepHomeDir)());let l=(0,R.resolve)("SendInteractiveMessageUseCase"),u=await l.execute({featureId:r,content:a,worktreePath:i,model:"string"==typeof s?s:void 0,agentType:"string"==typeof o?o:void 0});return m.NextResponse.json({message:u},{status:201})}catch(e){if(e instanceof Error&&e.message.includes("concurrent session limit"))return m.NextResponse.json({error:e.message},{status:429});return console.error("[POST /api/interactive/chat/:featureId/messages]",e),m.NextResponse.json({error:e instanceof Error?e.message:"Internal server error"},{status:500})}}async function y(e,{params:t}){try{let{featureId:e}=await t,r=(0,R.resolve)("IInteractiveSessionService");return await r.clearMessages(e),m.NextResponse.json({ok:!0})}catch(e){return console.error("[DELETE /api/interactive/chat/:featureId/messages]",e),m.NextResponse.json({error:e instanceof Error?e.message:"Internal server error"},{status:500})}}async function C(e,{params:t}){try{let{featureId:e}=await t,r=(0,R.resolve)("GetInteractiveChatStateUseCase"),a=await r.execute({featureId:e});return m.NextResponse.json(a)}catch(e){return console.error("[GET /api/interactive/chat/:featureId/messages]",e),m.NextResponse.json({error:e instanceof Error?e.message:"Internal server error"},{status:500})}}e.s(["DELETE",()=>y,"GET",()=>C,"POST",()=>w,"dynamic",0,"force-dynamic"],45502);var b=e.i(45502);let N=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/interactive/chat/[featureId]/messages/route",pathname:"/api/interactive/chat/[featureId]/messages",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/interactive/chat/[featureId]/messages/route.ts",nextConfigOutput:"",userland:b}),{workAsyncStorage:T,workUnitAsyncStorage:I,serverHooks:A}=N;function j(){return(0,a.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:I})}async function S(e,t,a){N.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/interactive/chat/[featureId]/messages/route";m=m.replace(/\/index$/,"")||"/";let R=await N.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,params:w,nextConfig:y,parsedUrl:C,isDraftMode:b,prerenderManifest:T,routerServerContext:I,isOnDemandRevalidate:A,revalidateOnlyGenerated:j,resolvedPathname:S,clientReferenceManifest:P,serverActionsManifest:q}=R,O=(0,i.normalizeAppPath)(m),k=!!(T.dynamicRoutes[O]||T.routes[S]),_=async()=>((null==I?void 0:I.render404)?await I.render404(e,t,C,!1):t.end("This page could not be found"),null);if(k&&!b){let e=!!T.routes[S],t=T.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(y.experimental.adapterPath)return await _();throw new f.NoFallbackError}}let H=null;!k||N.isDev||b||(H="/index"===(H=S)?"/":H);let D=!0===N.isDev||!k,U=k&&!D;q&&P&&(0,o.setManifestsSingleton)({page:m,clientReferenceManifest:P,serverActionsManifest:q});let M=e.method||"GET",K=(0,s.getTracer)(),L=K.getActiveScopeSpan(),$={params:w,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts},cacheComponents:!!y.cacheComponents,supportsDynamicResponse:D,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:y.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>N.onRequestError(e,t,a,n,I)},sharedContext:{buildId:E}},F=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),G=u.NextRequestAdapter.fromNodeNextRequest(F,(0,u.signalFromNodeResponse)(t));try{let o=async e=>N.handle(G,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=K.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${m}`)}),i=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var s,l;let u=async({previousCacheEntry:r})=>{try{if(!i&&A&&j&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(n);e.fetchMetrics=$.renderOpts.fetchMetrics;let l=$.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let u=$.renderOpts.collectedTags;if(!k)return await (0,p.sendResponse)(F,B,s,$.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);u&&(t[v.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,a=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=v.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await N.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,I),t}},d=await N.handleResponse({req:e,nextConfig:y,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:j,responseGenerator:u,waitUntil:a.waitUntil,isMinimalMode:i});if(!k)return null;if((null==d||null==(s=d.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",A?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return i&&k||f.delete(v.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,x.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(F,B,new Response(d.value.body,{headers:f,status:d.value.status||200})),null};L?await l(L):await K.withPropagatedContext(e.headers,()=>K.trace(d.BaseServerSpan.handleRequest,{spanName:`${M} ${m}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof f.NoFallbackError||await N.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,I),k)throw t;return await (0,p.sendResponse)(F,B,new Response(null,{status:500})),null}}e.s(["handler",()=>S,"patchFetch",()=>j,"routeModule",()=>N,"serverHooks",()=>A,"workAsyncStorage",()=>T,"workUnitAsyncStorage",()=>I],24183)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__2b71641f._.js.map
|