@shepai/cli 1.151.1 → 1.151.2-pr460.095bbae
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/InteractiveAgentConfig.yaml +25 -0
- package/apis/json-schema/InteractiveMessage.yaml +23 -0
- package/apis/json-schema/InteractiveMessageRole.yaml +7 -0
- package/apis/json-schema/InteractiveSession.yaml +30 -0
- package/apis/json-schema/InteractiveSessionStatus.yaml +9 -0
- package/apis/json-schema/Settings.yaml +3 -0
- package/dist/packages/core/src/application/ports/output/agents/agent-executor-factory.interface.d.ts +17 -0
- package/dist/packages/core/src/application/ports/output/agents/agent-executor-factory.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/agents/index.d.ts +1 -0
- package/dist/packages/core/src/application/ports/output/agents/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/agents/interactive-agent-executor.interface.d.ts +53 -0
- package/dist/packages/core/src/application/ports/output/agents/interactive-agent-executor.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/agents/interactive-agent-executor.interface.js +13 -0
- package/dist/packages/core/src/application/ports/output/repositories/index.d.ts +2 -0
- package/dist/packages/core/src/application/ports/output/repositories/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/repositories/interactive-message-repository.interface.d.ts +37 -0
- package/dist/packages/core/src/application/ports/output/repositories/interactive-message-repository.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/repositories/interactive-message-repository.interface.js +10 -0
- package/dist/packages/core/src/application/ports/output/repositories/interactive-session-repository.interface.d.ts +54 -0
- package/dist/packages/core/src/application/ports/output/repositories/interactive-session-repository.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/repositories/interactive-session-repository.interface.js +10 -0
- package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -0
- package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/interactive-session-service.interface.d.ts +169 -0
- package/dist/packages/core/src/application/ports/output/services/interactive-session-service.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/services/interactive-session-service.interface.js +12 -0
- package/dist/packages/core/src/application/use-cases/interactive/get-interactive-chat-state.use-case.d.ts +26 -0
- package/dist/packages/core/src/application/use-cases/interactive/get-interactive-chat-state.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/interactive/get-interactive-chat-state.use-case.js +41 -0
- package/dist/packages/core/src/application/use-cases/interactive/index.d.ts +14 -0
- package/dist/packages/core/src/application/use-cases/interactive/index.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/interactive/index.js +9 -0
- package/dist/packages/core/src/application/use-cases/interactive/send-interactive-message.use-case.d.ts +31 -0
- package/dist/packages/core/src/application/use-cases/interactive/send-interactive-message.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/interactive/send-interactive-message.use-case.js +43 -0
- package/dist/packages/core/src/application/use-cases/interactive/start-interactive-session.use-case.d.ts +34 -0
- package/dist/packages/core/src/application/use-cases/interactive/start-interactive-session.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/interactive/start-interactive-session.use-case.js +43 -0
- package/dist/packages/core/src/application/use-cases/interactive/stop-interactive-session.use-case.d.ts +27 -0
- package/dist/packages/core/src/application/use-cases/interactive/stop-interactive-session.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/interactive/stop-interactive-session.use-case.js +42 -0
- package/dist/packages/core/src/domain/errors/concurrent-session-limit.error.d.ts +13 -0
- package/dist/packages/core/src/domain/errors/concurrent-session-limit.error.d.ts.map +1 -0
- package/dist/packages/core/src/domain/errors/concurrent-session-limit.error.js +19 -0
- package/dist/packages/core/src/domain/generated/output.d.ts +77 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/domain/generated/output.js +12 -0
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +47 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/interactive-message.mapper.d.ts +36 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/interactive-message.mapper.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/interactive-message.mapper.js +41 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/interactive-session.mapper.d.ts +37 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/interactive-session.mapper.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/interactive-session.mapper.js +45 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +3 -0
- 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 +10 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/045-create-interactive-tables.d.ts +22 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/045-create-interactive-tables.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/045-create-interactive-tables.js +52 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/046-add-interactive-agent-settings.d.ts +16 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/046-add-interactive-agent-settings.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/046-add-interactive-agent-settings.js +27 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-interactive-message.repository.d.ts +18 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-interactive-message.repository.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-interactive-message.repository.js +58 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-interactive-session.repository.d.ts +23 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-interactive-session.repository.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-interactive-session.repository.js +85 -0
- 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 +10 -3
- package/dist/packages/core/src/infrastructure/services/agents/common/agent-executor-factory.service.d.ts +18 -0
- 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 +27 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.d.ts +43 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.js +280 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/mock-executor-factory.service.d.ts +3 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/mock-executor-factory.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/mock-executor-factory.service.js +6 -0
- 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/nodes/evidence.node.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.js +8 -2
- package/dist/packages/core/src/infrastructure/services/interactive/feature-context.builder.d.ts +26 -0
- package/dist/packages/core/src/infrastructure/services/interactive/feature-context.builder.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/interactive/feature-context.builder.js +140 -0
- package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.d.ts +87 -0
- package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.js +786 -0
- package/dist/src/presentation/web/app/(dashboard)/@drawer/chat/page.d.ts +3 -0
- package/dist/src/presentation/web/app/(dashboard)/@drawer/chat/page.d.ts.map +1 -0
- package/dist/src/presentation/web/app/(dashboard)/@drawer/chat/page.js +6 -0
- package/dist/src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.d.ts.map +1 -1
- package/dist/src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +2 -2
- package/dist/src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/page.d.ts.map +1 -1
- package/dist/src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -2
- package/dist/src/presentation/web/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.d.ts +11 -0
- package/dist/src/presentation/web/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.d.ts.map +1 -0
- package/dist/src/presentation/web/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +18 -0
- package/dist/src/presentation/web/app/(dashboard)/chat/page.d.ts +3 -0
- package/dist/src/presentation/web/app/(dashboard)/chat/page.d.ts.map +1 -0
- package/dist/src/presentation/web/app/(dashboard)/chat/page.js +4 -0
- package/dist/src/presentation/web/app/(dashboard)/repository/[repositoryId]/[tab]/page.d.ts +3 -0
- package/dist/src/presentation/web/app/(dashboard)/repository/[repositoryId]/[tab]/page.d.ts.map +1 -0
- package/dist/src/presentation/web/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +4 -0
- package/dist/src/presentation/web/app/api/agent-events/route.d.ts +6 -0
- 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 +54 -1
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/messages/route.d.ts +24 -0
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/messages/route.d.ts.map +1 -0
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/messages/route.js +76 -0
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stop/route.d.ts +16 -0
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stop/route.d.ts.map +1 -0
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stop/route.js +21 -0
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stream/route.d.ts +21 -0
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stream/route.d.ts.map +1 -0
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stream/route.js +87 -0
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/messages/route.d.ts +19 -0
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/messages/route.d.ts.map +1 -0
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/messages/route.js +78 -0
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/route.d.ts +18 -0
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/route.d.ts.map +1 -0
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/route.js +43 -0
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/stream/route.d.ts +19 -0
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/stream/route.d.ts.map +1 -0
- package/dist/src/presentation/web/app/api/interactive/sessions/[id]/stream/route.js +92 -0
- package/dist/src/presentation/web/app/api/interactive/sessions/route.d.ts +12 -0
- package/dist/src/presentation/web/app/api/interactive/sessions/route.d.ts.map +1 -0
- package/dist/src/presentation/web/app/api/interactive/sessions/route.js +37 -0
- package/dist/src/presentation/web/app/layout.d.ts.map +1 -1
- package/dist/src/presentation/web/app/layout.js +2 -1
- package/dist/src/presentation/web/components/assistant-ui/thread.d.ts +6 -0
- package/dist/src/presentation/web/components/assistant-ui/thread.d.ts.map +1 -0
- package/dist/src/presentation/web/components/assistant-ui/thread.js +192 -0
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts +1 -1
- 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 +1 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/drawer-view.d.ts +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/drawer-view.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/drawer-view.js +1 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts +3 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +5 -6
- package/dist/src/presentation/web/components/common/control-center-drawer/global-chat-drawer-client.d.ts +2 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/global-chat-drawer-client.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/global-chat-drawer-client.js +17 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.d.ts +3 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.js +15 -8
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts +7 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +11 -4
- package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.js +7 -2
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.d.ts +1 -0
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.js +6 -14
- package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-node.js +6 -2
- package/dist/src/presentation/web/components/features/chat/AgentStatusBadge.d.ts +21 -0
- package/dist/src/presentation/web/components/features/chat/AgentStatusBadge.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/AgentStatusBadge.js +46 -0
- package/dist/src/presentation/web/components/features/chat/AgentStatusBadge.stories.d.ts +20 -0
- package/dist/src/presentation/web/components/features/chat/AgentStatusBadge.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/AgentStatusBadge.stories.js +52 -0
- package/dist/src/presentation/web/components/features/chat/ChatComposer.d.ts +18 -0
- package/dist/src/presentation/web/components/features/chat/ChatComposer.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/ChatComposer.js +16 -0
- package/dist/src/presentation/web/components/features/chat/ChatInput.d.ts +19 -0
- package/dist/src/presentation/web/components/features/chat/ChatInput.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/ChatInput.js +42 -0
- package/dist/src/presentation/web/components/features/chat/ChatInput.stories.d.ts +14 -0
- package/dist/src/presentation/web/components/features/chat/ChatInput.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/ChatInput.stories.js +56 -0
- package/dist/src/presentation/web/components/features/chat/ChatMessageBubble.d.ts +21 -0
- package/dist/src/presentation/web/components/features/chat/ChatMessageBubble.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/ChatMessageBubble.js +43 -0
- package/dist/src/presentation/web/components/features/chat/ChatMessageBubble.stories.d.ts +24 -0
- package/dist/src/presentation/web/components/features/chat/ChatMessageBubble.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/ChatMessageBubble.stories.js +84 -0
- package/dist/src/presentation/web/components/features/chat/ChatMessageList.d.ts +25 -0
- package/dist/src/presentation/web/components/features/chat/ChatMessageList.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/ChatMessageList.js +36 -0
- package/dist/src/presentation/web/components/features/chat/ChatSheet.d.ts +2 -0
- package/dist/src/presentation/web/components/features/chat/ChatSheet.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/ChatSheet.js +243 -0
- package/dist/src/presentation/web/components/features/chat/ChatTab.d.ts +6 -0
- package/dist/src/presentation/web/components/features/chat/ChatTab.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/ChatTab.js +67 -0
- package/dist/src/presentation/web/components/features/chat/ChatTab.stories.d.ts +25 -0
- package/dist/src/presentation/web/components/features/chat/ChatTab.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/ChatTab.stories.js +237 -0
- package/dist/src/presentation/web/components/features/chat/useChatRuntime.d.ts +34 -0
- package/dist/src/presentation/web/components/features/chat/useChatRuntime.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/chat/useChatRuntime.js +266 -0
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +8 -8
- package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.d.ts +13 -0
- package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.js +30 -0
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.d.ts +1 -2
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.js +5 -13
- package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.js +45 -2
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.js +13 -65
- package/dist/src/presentation/web/components/providers/query-provider.d.ts +4 -0
- package/dist/src/presentation/web/components/providers/query-provider.d.ts.map +1 -0
- package/dist/src/presentation/web/components/providers/query-provider.js +16 -0
- package/dist/src/presentation/web/hooks/use-attachments.d.ts +26 -0
- package/dist/src/presentation/web/hooks/use-attachments.d.ts.map +1 -0
- package/dist/src/presentation/web/hooks/use-attachments.js +227 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +11 -0
- package/web/.next/build-manifest.json +5 -5
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +3 -3
- package/web/.next/required-server-files.json +3 -3
- package/web/.next/routes-manifest.json +69 -0
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/build-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +82 -82
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +2 -2
- 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/app-paths-manifest.json +3 -0
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/build-manifest.json +18 -0
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/next-font-manifest.json +6 -0
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/react-loadable-manifest.json +8 -0
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +395 -0
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js +22 -0
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.map +5 -0
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -0
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +2 -0
- package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +84 -84
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +2 -2
- 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/build-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +98 -98
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +2 -2
- 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/build-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +98 -98
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -2
- 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/app-paths-manifest.json +3 -0
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/build-manifest.json +18 -0
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/next-font-manifest.json +6 -0
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +8 -0
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +395 -0
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +22 -0
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.map +5 -0
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -0
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +2 -0
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +78 -78
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +2 -2
- 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/app-paths-manifest.json +3 -0
- package/web/.next/server/app/(dashboard)/chat/page/build-manifest.json +18 -0
- package/web/.next/server/app/(dashboard)/chat/page/next-font-manifest.json +6 -0
- package/web/.next/server/app/(dashboard)/chat/page/react-loadable-manifest.json +8 -0
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +395 -0
- package/web/.next/server/app/(dashboard)/chat/page.js +22 -0
- package/web/.next/server/app/(dashboard)/chat/page.js.map +5 -0
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -0
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +2 -0
- package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +84 -84
- package/web/.next/server/app/(dashboard)/create/page.js +2 -2
- 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/build-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +98 -98
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +2 -2
- 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/build-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +98 -98
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -2
- 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/build-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +78 -78
- package/web/.next/server/app/(dashboard)/page.js +2 -2
- 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/app-paths-manifest.json +3 -0
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/build-manifest.json +18 -0
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/next-font-manifest.json +6 -0
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +8 -0
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +395 -0
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +22 -0
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.map +5 -0
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -0
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +2 -0
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +78 -78
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +2 -2
- 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/build-manifest.json +3 -3
- 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/build-manifest.json +3 -3
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +36 -6
- package/web/.next/server/app/_not-found/page.js +2 -2
- 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/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/evidence/route.js +1 -1
- package/web/.next/server/app/api/evidence/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]/messages/route/app-paths-manifest.json +3 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route/build-manifest.json +11 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route/server-reference-manifest.json +4 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js +7 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.map +5 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route_client-reference-manifest.js +2 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stop/route/app-paths-manifest.json +3 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stop/route/build-manifest.json +11 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stop/route/server-reference-manifest.json +4 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stop/route.js +7 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stop/route.js.map +5 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stop/route.js.nft.json +1 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stop/route_client-reference-manifest.js +2 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stream/route/app-paths-manifest.json +3 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stream/route/build-manifest.json +11 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stream/route/server-reference-manifest.json +4 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stream/route.js +6 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stream/route.js.map +5 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stream/route.js.nft.json +1 -0
- package/web/.next/server/app/api/interactive/chat/[featureId]/stream/route_client-reference-manifest.js +2 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/messages/route/app-paths-manifest.json +3 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/messages/route/build-manifest.json +11 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/messages/route/server-reference-manifest.json +4 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/messages/route.js +7 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/messages/route.js.map +5 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/messages/route.js.nft.json +1 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/messages/route_client-reference-manifest.js +2 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/route/app-paths-manifest.json +3 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/route/build-manifest.json +11 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/route/server-reference-manifest.json +4 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/route.js +7 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/route.js.map +5 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/route.js.nft.json +1 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/route_client-reference-manifest.js +2 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/stream/route/app-paths-manifest.json +3 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/stream/route/build-manifest.json +11 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/stream/route/server-reference-manifest.json +4 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/stream/route.js +6 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/stream/route.js.map +5 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/stream/route.js.nft.json +1 -0
- package/web/.next/server/app/api/interactive/sessions/[id]/stream/route_client-reference-manifest.js +2 -0
- package/web/.next/server/app/api/interactive/sessions/route/app-paths-manifest.json +3 -0
- package/web/.next/server/app/api/interactive/sessions/route/build-manifest.json +11 -0
- package/web/.next/server/app/api/interactive/sessions/route/server-reference-manifest.json +4 -0
- package/web/.next/server/app/api/interactive/sessions/route.js +7 -0
- package/web/.next/server/app/api/interactive/sessions/route.js.map +5 -0
- package/web/.next/server/app/api/interactive/sessions/route.js.nft.json +1 -0
- package/web/.next/server/app/api/interactive/sessions/route_client-reference-manifest.js +2 -0
- package/web/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/web/.next/server/app/api/sessions-batch/route.js.nft.json +1 -1
- package/web/.next/server/app/api/tools/route.js +2 -2
- package/web/.next/server/app/settings/page/build-manifest.json +3 -3
- package/web/.next/server/app/settings/page/server-reference-manifest.json +42 -42
- package/web/.next/server/app/settings/page.js +3 -3
- 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/build-manifest.json +3 -3
- package/web/.next/server/app/skills/page/server-reference-manifest.json +46 -16
- package/web/.next/server/app/skills/page.js +3 -3
- 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/build-manifest.json +3 -3
- package/web/.next/server/app/tools/page/server-reference-manifest.json +46 -16
- package/web/.next/server/app/tools/page.js +3 -3
- 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/build-manifest.json +3 -3
- package/web/.next/server/app/version/page/server-reference-manifest.json +36 -6
- package/web/.next/server/app/version/page.js +2 -2
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app-paths-manifest.json +11 -0
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js +8 -2
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_interactive_sessions_route_actions_f2e7447f.js +3 -0
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_interactive_sessions_route_actions_f2e7447f.js.map +1 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_chat_[featureId]_messages_route_actions_f98e5802.js +3 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_chat_[featureId]_messages_route_actions_f98e5802.js.map +1 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_chat_[featureId]_stop_route_actions_36518d35.js +3 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_chat_[featureId]_stop_route_actions_36518d35.js.map +1 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_chat_[featureId]_stream_route_actions_e6210931.js +3 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_chat_[featureId]_stream_route_actions_e6210931.js.map +1 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_sessions_[id]_messages_route_actions_be179971.js +3 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_sessions_[id]_messages_route_actions_be179971.js.map +1 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_sessions_[id]_stream_route_actions_58ab2b5b.js +3 -0
- package/web/.next/server/chunks/8ba4b_server_app_api_interactive_sessions_[id]_stream_route_actions_58ab2b5b.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]__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]__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 +18 -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 +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__9191749c._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/{[root-of-the-server]__26565141._.js → [root-of-the-server]__acea6565._.js} +2 -2
- package/web/.next/server/chunks/{[root-of-the-server]__26565141._.js.map → [root-of-the-server]__acea6565._.js.map} +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__beda892a._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__beda892a._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
- package/web/.next/server/chunks/{[root-of-the-server]__25f23d5d._.js → [root-of-the-server]__e3692208._.js} +2 -2
- package/web/.next/server/chunks/{[root-of-the-server]__25f23d5d._.js.map → [root-of-the-server]__e3692208._.js.map} +1 -1
- package/web/.next/server/chunks/f3a1f__next-internal_server_app_api_interactive_sessions_[id]_route_actions_a4ea4d16.js +3 -0
- package/web/.next/server/chunks/f3a1f__next-internal_server_app_api_interactive_sessions_[id]_route_actions_a4ea4d16.js.map +1 -0
- package/web/.next/server/chunks/ssr/403f9_next_dist_c9d9b4d7._.js +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_2c44200f.js +4 -0
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_2c44200f.js.map +1 -0
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_56f4f121.js +4 -0
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_56f4f121.js.map +1 -0
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_77436e06.js +4 -0
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_77436e06.js.map +1 -0
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_b9bb0443.js +4 -0
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_build_templates_app-page_b9bb0443.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web_app_(dashboard)_repository_[repositoryId]_[tab]_page_tsx_2e9a3025._.js +3 -0
- package/web/.next/server/chunks/ssr/744ca_web_app_(dashboard)_repository_[repositoryId]_[tab]_page_tsx_2e9a3025._.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 +7 -0
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_4b319ae6._.js +3 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_4b319ae6._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0b150ddf._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0b150ddf._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17ed7ed1._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17ed7ed1._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__28d0d265._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__28d0d265._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__31f1c3b0._.js +7 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__31f1c3b0._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__42bf1807._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__42bf1807._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__684a868c._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__684a868c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7528eb6f._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7528eb6f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__88f7e8e6._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__88f7e8e6._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8b0aac03._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8b0aac03._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b14946f5._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b8d4bd27._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b8d4bd27._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c16bf5de._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c16bf5de._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ede6df1f._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ede6df1f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f80bfc75._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f80bfc75._.js.map +1 -0
- 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/{_2a9037e8._.js → _320a4303._.js} +3 -3
- package/web/.next/server/chunks/ssr/_320a4303._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_3a0b989f._.js +6 -0
- package/web/.next/server/chunks/ssr/_3a0b989f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_48e5757d._.js +9 -0
- package/web/.next/server/chunks/ssr/_48e5757d._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_6c7faa01._.js → _507a8382._.js} +2 -2
- package/web/.next/server/chunks/ssr/_507a8382._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_56b9d60f._.js +3 -0
- package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_5f69c13f._.js +4 -0
- package/web/.next/server/chunks/ssr/_5f69c13f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_78ff6f1d._.js +3 -0
- package/web/.next/server/chunks/ssr/_78ff6f1d._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_7c5b97c6._.js +4 -0
- package/web/.next/server/chunks/ssr/_7c5b97c6._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_8219712a._.js +3 -0
- package/web/.next/server/chunks/ssr/_8219712a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_82c57f10._.js +4 -0
- package/web/.next/server/chunks/ssr/_82c57f10._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_0020fddd._.js → _8b57edb8._.js} +2 -2
- package/web/.next/server/chunks/ssr/_8b57edb8._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_8d733ce4._.js +3 -0
- package/web/.next/server/chunks/ssr/_8d733ce4._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_6256a985._.js → _9495d50b._.js} +3 -3
- package/web/.next/server/chunks/ssr/{_6256a985._.js.map → _9495d50b._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_a0e3f7e4._.js +4 -0
- package/web/.next/server/chunks/ssr/_a0e3f7e4._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ac4a3873._.js +3 -0
- package/web/.next/server/chunks/ssr/_ac4a3873._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_acc33591._.js +3 -0
- package/web/.next/server/chunks/ssr/_acc33591._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ca0aa7f0._.js +4 -0
- package/web/.next/server/chunks/ssr/_ca0aa7f0._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_cb5a021e._.js +4 -0
- package/web/.next/server/chunks/ssr/_cb5a021e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_cfbd1d7e._.js +1 -1
- package/web/.next/server/chunks/ssr/_cfbd1d7e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d4b20e29._.js +1 -1
- package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d86175ae._.js +4 -0
- package/web/.next/server/chunks/ssr/_d86175ae._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_d8bedf13._.js +4 -0
- package/web/.next/server/chunks/ssr/_d8bedf13._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_fa7efce3._.js +6 -0
- package/web/.next/server/chunks/ssr/_fa7efce3._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_4093a637._.js → _ffa39df5._.js} +2 -2
- package/web/.next/server/chunks/ssr/_ffa39df5._.js.map +1 -0
- 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_global-chat-drawer-client_tsx_158c4b12._.js +3 -0
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_global-chat-drawer-client_tsx_158c4b12._.js.map +1 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_8ec2c790._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_8ec2c790._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_cdc632e3.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_cdc632e3.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_(dashboard)_chat_page_tsx_85327270._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_(dashboard)_chat_page_tsx_85327270._.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_ca99d62d._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_357e3eb0._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_357e3eb0._.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/middleware-build-manifest.js +3 -3
- 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 +1346 -562
- package/web/.next/static/chunks/011f98455d1a2f64.js +7 -0
- package/web/.next/static/chunks/036f4b19acb4fcf9.js +3 -0
- package/web/.next/static/chunks/0c38793438b8c038.js +1 -0
- package/web/.next/static/chunks/101c183087b9984f.js +1 -0
- package/web/.next/static/chunks/11091b676d1b3bd4.js +1 -0
- package/web/.next/static/chunks/16f6471485cbfed1.css +1 -0
- package/web/.next/static/chunks/22c459f1877b1e4f.js +1 -0
- package/web/.next/static/chunks/2354d39c63978576.js +1 -0
- package/web/.next/static/chunks/40b6bcf1a2de4a0f.js +1 -0
- package/web/.next/static/chunks/460a633a069f7114.js +1 -0
- package/web/.next/static/chunks/4b2c4a5c35ebb70d.js +1 -0
- package/web/.next/static/chunks/5ae60a052ab5f437.js +5 -0
- package/web/.next/static/chunks/686164c73f381a39.js +5 -0
- package/web/.next/static/chunks/77e04d00f3460226.js +1 -0
- package/web/.next/static/chunks/7b93fa5e0054de38.js +1 -0
- package/web/.next/static/chunks/932d27878bf6ad1d.js +1 -0
- package/web/.next/static/chunks/95f3089ebd3a0ad8.js +1 -0
- package/web/.next/static/chunks/a9a2a4964b06aedd.js +1 -0
- package/web/.next/static/chunks/{b113da1fbdb83ffa.js → ade96a2ab608bded.js} +2 -2
- package/web/.next/static/chunks/b868f9defe50a18f.js +1 -0
- package/web/.next/static/chunks/cd54b758f58061d0.js +1 -0
- package/web/.next/static/chunks/{cfe4dc9904fcfddb.js → d0e04c4bd51d2553.js} +1 -1
- package/web/.next/static/chunks/feed0046c419c228.js +5 -0
- package/web/.next/static/chunks/{turbopack-c2d183e05f30c7dc.js → turbopack-432ef324fc27240c.js} +1 -1
- package/web/package.json +7 -2
- package/web/.next/server/chunks/[root-of-the-server]__c6e32a23._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__c6e32a23._.js.map +0 -1
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_8b618f7d._.js +0 -3
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_8b618f7d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +0 -7
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__df7c1cd3._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__df7c1cd3._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0020fddd._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_01046927._.js +0 -9
- package/web/.next/server/chunks/ssr/_01046927._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0c473fef._.js +0 -6
- package/web/.next/server/chunks/ssr/_0c473fef._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_1b719e7f._.js +0 -4
- package/web/.next/server/chunks/ssr/_1b719e7f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_2a9037e8._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_37e8548b._.js +0 -4
- package/web/.next/server/chunks/ssr/_37e8548b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_4093a637._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_55d763e2._.js +0 -4
- package/web/.next/server/chunks/ssr/_55d763e2._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_5b5dbf5b._.js +0 -3
- package/web/.next/server/chunks/ssr/_5b5dbf5b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_6c7faa01._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_8fcc39d4._.js +0 -3
- package/web/.next/server/chunks/ssr/_8fcc39d4._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_b71645b4._.js +0 -4
- package/web/.next/server/chunks/ssr/_b71645b4._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_d8575088._.js +0 -3
- package/web/.next/server/chunks/ssr/_d8575088._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e9e9ed20._.js +0 -6
- package/web/.next/server/chunks/ssr/_e9e9ed20._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_55c7a131._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_55c7a131._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_1be4a9a5._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_1be4a9a5._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +0 -1
- package/web/.next/static/chunks/067e63e1f8a471c7.js +0 -5
- package/web/.next/static/chunks/08baac5434d9528e.js +0 -13
- package/web/.next/static/chunks/176b3e6837dce4ad.js +0 -1
- package/web/.next/static/chunks/1dc8d2933f22de05.js +0 -1
- package/web/.next/static/chunks/2dfeeccc2f180ab8.js +0 -1
- package/web/.next/static/chunks/49057cf8cd37e262.js +0 -1
- package/web/.next/static/chunks/4cec255f2754e5ec.js +0 -1
- package/web/.next/static/chunks/56f68c783c480176.js +0 -1
- package/web/.next/static/chunks/601d93593f5f664f.js +0 -1
- package/web/.next/static/chunks/768e2db272a413cc.js +0 -1
- package/web/.next/static/chunks/9b8678597fa1db84.css +0 -1
- package/web/.next/static/chunks/b02205ef744953bc.js +0 -1
- package/web/.next/static/chunks/b70dd4985a814b27.js +0 -1
- package/web/.next/static/chunks/c28ae41d01ad3130.js +0 -1
- package/web/.next/static/chunks/db5dc8b848e7ddd1.js +0 -1
- package/web/.next/static/chunks/e860f0c546deeabc.js +0 -1
- package/web/.next/static/chunks/f66c996402a430f5.js +0 -1
- package/web/.next/static/chunks/fdd703b4cec873bb.js +0 -1
- /package/web/.next/static/{qifXEaEcnY1cbH8eHlEIN → 2rfPfTfJJx4Mf-4AeVzgA}/_buildManifest.js +0 -0
- /package/web/.next/static/{qifXEaEcnY1cbH8eHlEIN → 2rfPfTfJJx4Mf-4AeVzgA}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{qifXEaEcnY1cbH8eHlEIN → 2rfPfTfJJx4Mf-4AeVzgA}/_ssgManifest.js +0 -0
package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map
CHANGED
|
@@ -1 +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 { Feature, AgentRun } from '@shepai/core/domain/generated/output';\nimport {\n AgentRunStatus,\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\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 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 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//# source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S,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,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":[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,O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C,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GACvB,AAD0B,CAE9B,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":[1]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -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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,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,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,EACA,sBACJ,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":[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"))},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 m=e.i(35162),g=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}=await e.json();if(!a||"string"!=typeof a||0===a.trim().length)return g.NextResponse.json({error:"content must be a non-empty string"},{status:400});if(Buffer.byteLength(a,"utf8")>32768)return g.NextResponse.json({error:"content exceeds maximum size of 32 KB"},{status:400});let s=n;s&&"string"==typeof s||(s=(0,E.getShepHomeDir)());let o=(0,R.resolve)("SendInteractiveMessageUseCase"),i=await o.execute({featureId:r,content:a,worktreePath:s});return g.NextResponse.json({message:i},{status:201})}catch(e){if(e instanceof Error&&e.message.includes("concurrent session limit"))return g.NextResponse.json({error:e.message},{status:429});return console.error("[POST /api/interactive/chat/:featureId/messages]",e),g.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),g.NextResponse.json({ok:!0})}catch(e){return console.error("[DELETE /api/interactive/chat/:featureId/messages]",e),g.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 g.NextResponse.json(a)}catch(e){return console.error("[GET /api/interactive/chat/:featureId/messages]",e),g.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:I,workUnitAsyncStorage:T,serverHooks:A}=N;function j(){return(0,a.patchFetch)({workAsyncStorage:I,workUnitAsyncStorage:T})}async function S(e,t,a){N.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/interactive/chat/[featureId]/messages/route";g=g.replace(/\/index$/,"")||"/";let R=await N.prepare(e,t,{srcPage:g,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:I,routerServerContext:T,isOnDemandRevalidate:A,revalidateOnlyGenerated:j,resolvedPathname:S,clientReferenceManifest:P,serverActionsManifest:q}=R,O=(0,i.normalizeAppPath)(g),k=!!(I.dynamicRoutes[O]||I.routes[S]),_=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,C,!1):t.end("This page could not be found"),null);if(k&&!b){let e=!!I.routes[S],t=I.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:g,clientReferenceManifest:P,serverActionsManifest:q});let M=e.method||"GET",K=(0,s.getTracer)(),L=K.getActiveScopeSpan(),$={params:w,prerenderManifest:I,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,T)},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} ${g}`)}),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:m.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:g,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,T),t}},d=await N.handleResponse({req:e,nextConfig:y,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:I,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)!==m.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} ${g}`,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,T),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",()=>I,"workUnitAsyncStorage",()=>T],24183)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__2b71641f._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../packages/core/src/infrastructure/services/filesystem/shep-directory.service.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/messages/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","/**\n * Shep Directory Service\n *\n * Manages the ~/.shep/ directory for global settings and data storage.\n * Ensures directory exists with correct permissions before database operations.\n *\n * Supports SHEP_HOME env var for test isolation (overrides default ~/.shep/).\n */\n\nimport { mkdir } from 'node:fs/promises';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { existsSync } from 'node:fs';\n\n/**\n * Resolves the Shep home directory.\n * Respects SHEP_HOME env var for test isolation, falls back to ~/.shep/\n */\nfunction resolveShepHomeDir(): string {\n return process.env.SHEP_HOME ?? join(homedir(), '.shep');\n}\n\n/**\n * Gets the path to the Shep home directory.\n * Uses SHEP_HOME env var if set, otherwise ~/.shep/\n *\n * @returns Path to shep home directory\n */\nexport function getShepHomeDir(): string {\n return resolveShepHomeDir();\n}\n\n/**\n * Gets the path to the SQLite database file.\n *\n * @returns Path to the database file\n */\nexport function getShepDbPath(): string {\n return join(resolveShepHomeDir(), 'data');\n}\n\n/**\n * Gets the path to the daemon state file.\n * Uses SHEP_HOME env var if set (for test isolation), otherwise ~/.shep/daemon.json\n *\n * @returns Path to daemon.json\n */\nexport function getDaemonStatePath(): string {\n return join(resolveShepHomeDir(), 'daemon.json');\n}\n\n/**\n * Gets the path to the daemon log file.\n * Uses SHEP_HOME env var if set (for test isolation), otherwise ~/.shep/daemon.log\n *\n * @returns Path to daemon.log\n */\nexport function getDaemonLogPath(): string {\n return join(resolveShepHomeDir(), 'daemon.log');\n}\n\n/**\n * Ensures the shep home directory exists with correct permissions.\n * Creates the directory if it doesn't exist.\n * Safe to call multiple times (idempotent).\n *\n * Permissions: 700 (rwx------) - only owner can read/write/execute\n *\n * @throws Error if directory cannot be created (permissions, disk space, etc.)\n */\nexport async function ensureShepDirectory(): Promise<void> {\n const shepDir = resolveShepHomeDir();\n\n if (existsSync(shepDir)) {\n return;\n }\n\n try {\n await mkdir(shepDir, {\n recursive: true,\n mode: 0o700,\n });\n } catch (error) {\n throw new Error(\n `Failed to create Shep directory at ${shepDir}: ${error instanceof Error ? error.message : String(error)}`\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/interactive/chat/[featureId]/messages/route\",\n pathname: \"/api/interactive/chat/[featureId]/messages\",\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]/messages/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]/messages/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 chat messages API.\n *\n * POST - Send a user message. Backend handles session lifecycle.\n * GET - Get chat state: messages + session status + streaming text.\n * DELETE - Clear chat message history for the feature.\n *\n * The frontend never manages sessions — it just sends messages for a feature.\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 { SendInteractiveMessageUseCase } from '@shepai/core/application/use-cases/interactive/send-interactive-message.use-case';\nimport type { GetInteractiveChatStateUseCase } from '@shepai/core/application/use-cases/interactive/get-interactive-chat-state.use-case';\nimport type { IInteractiveSessionService } from '@shepai/core/application/ports/output/services/interactive-session-service.interface';\nimport { getShepHomeDir } from '@shepai/core/infrastructure/services/filesystem/shep-directory.service';\n\nexport const dynamic = 'force-dynamic';\n\nconst MAX_CONTENT_BYTES = 32 * 1024;\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 body = (await request.json()) as { content?: string; worktreePath?: string };\n const { content, worktreePath } = body;\n\n if (!content || typeof content !== 'string' || content.trim().length === 0) {\n return NextResponse.json({ error: 'content must be a non-empty string' }, { status: 400 });\n }\n\n if (Buffer.byteLength(content, 'utf8') > MAX_CONTENT_BYTES) {\n return NextResponse.json({ error: 'content exceeds maximum size of 32 KB' }, { status: 400 });\n }\n\n // worktreePath is optional — defaults to SHEP_HOME for global/repo sessions\n let resolvedWorktreePath = worktreePath;\n if (!resolvedWorktreePath || typeof resolvedWorktreePath !== 'string') {\n resolvedWorktreePath = getShepHomeDir();\n }\n\n const useCase = resolve<SendInteractiveMessageUseCase>('SendInteractiveMessageUseCase');\n const message = await useCase.execute({\n featureId,\n content,\n worktreePath: resolvedWorktreePath,\n });\n\n return NextResponse.json({ message }, { status: 201 });\n } catch (error) {\n if (error instanceof Error && error.message.includes('concurrent session limit')) {\n return NextResponse.json({ error: error.message }, { status: 429 });\n }\n // eslint-disable-next-line no-console\n console.error('[POST /api/interactive/chat/:featureId/messages]', error);\n return NextResponse.json(\n { error: error instanceof Error ? error.message : 'Internal server error' },\n { status: 500 }\n );\n }\n}\n\nexport async function DELETE(\n _request: NextRequest,\n { params }: RouteParams\n): Promise<NextResponse> {\n try {\n const { featureId } = await params;\n // clearMessages is not yet exposed as a use case — use service directly\n const service = resolve<IInteractiveSessionService>('IInteractiveSessionService');\n await service.clearMessages(featureId);\n\n return NextResponse.json({ ok: true });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('[DELETE /api/interactive/chat/:featureId/messages]', error);\n return NextResponse.json(\n { error: error instanceof Error ? error.message : 'Internal server error' },\n { status: 500 }\n );\n }\n}\n\nexport async function GET(_request: NextRequest, { params }: RouteParams): Promise<NextResponse> {\n try {\n const { featureId } = await params;\n const useCase = resolve<GetInteractiveChatStateUseCase>('GetInteractiveChatStateUseCase');\n const chatState = await useCase.execute({ featureId });\n\n return NextResponse.json(chatState);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('[GET /api/interactive/chat/:featureId/messages]', error);\n return NextResponse.json(\n { error: error instanceof Error ? error.message : 'Internal server error' },\n { status: 500 }\n );\n }\n}\n"],"names":[],"mappings":"4wCAuBO,SAAS,EAAW,CAAwB,EACjD,IAAM,EAAa,UAAsC,CAAC,AAdtC,eAc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gB,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"))},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])},9675,e=>{"use strict";var t=e.i(22925),r=e.i(62995),s=e.i(14112),n=e.i(31716),a=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),x=e.i(92435),v=e.i(41260),h=e.i(80556),f=e.i(93695);e.i(97230);var g=e.i(35162),R=e.i(27980),m=e.i(40060);async function w(e,{params:t}){try{let{id:r}=await t,{content:s}=await e.json();if(!s||"string"!=typeof s||0===s.trim().length)return R.NextResponse.json({error:"content must be a non-empty string"},{status:400});if(Buffer.byteLength(s,"utf8")>32768)return R.NextResponse.json({error:"content exceeds maximum size of 32 KB"},{status:400});let n=(0,m.resolve)("IInteractiveSessionService");if(!await n.getSession(r))return R.NextResponse.json({error:"Session not found"},{status:404});return await n.sendMessage(r,s),new R.NextResponse(null,{status:202})}catch(e){if(e instanceof Error&&e.message.includes("not ready"))return R.NextResponse.json({error:e.message},{status:409});return console.error("[POST /api/interactive/sessions/:id/messages]",e),R.NextResponse.json({error:e instanceof Error?e.message:"Internal server error"},{status:500})}}async function E(e,{params:t}){try{let{id:e}=await t,r=(0,m.resolve)("IInteractiveSessionService"),s=await r.getSession(e);if(!s)return R.NextResponse.json({error:"Session not found"},{status:404});return await r.clearMessages(s.featureId),new R.NextResponse(null,{status:204})}catch(e){return console.error("[DELETE /api/interactive/sessions/:id/messages]",e),R.NextResponse.json({error:e instanceof Error?e.message:"Internal server error"},{status:500})}}async function y(e,{params:t}){try{let{id:r}=await t,s=new URL(e.url).searchParams.get("limit"),n=s?parseInt(s,10):void 0,a=(0,m.resolve)("IInteractiveSessionService"),o=await a.getSession(r);if(!o)return R.NextResponse.json({error:"Session not found"},{status:404});let i=await a.getMessages(o.featureId,n);return R.NextResponse.json(i)}catch(e){return console.error("[GET /api/interactive/sessions/:id/messages]",e),R.NextResponse.json({error:e instanceof Error?e.message:"Internal server error"},{status:500})}}e.s(["DELETE",()=>E,"GET",()=>y,"POST",()=>w,"dynamic",0,"force-dynamic"],22204);var C=e.i(22204);let N=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/interactive/sessions/[id]/messages/route",pathname:"/api/interactive/sessions/[id]/messages",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/interactive/sessions/[id]/messages/route.ts",nextConfigOutput:"",userland:C}),{workAsyncStorage:b,workUnitAsyncStorage:S,serverHooks:T}=N;function A(){return(0,s.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:S})}async function I(e,t,s){N.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/interactive/sessions/[id]/messages/route";R=R.replace(/\/index$/,"")||"/";let m=await N.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!m)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:w,params:E,nextConfig:y,parsedUrl:C,isDraftMode:b,prerenderManifest:S,routerServerContext:T,isOnDemandRevalidate:A,revalidateOnlyGenerated:I,resolvedPathname:j,clientReferenceManifest:P,serverActionsManifest:O}=m,_=(0,i.normalizeAppPath)(R),k=!!(S.dynamicRoutes[_]||S.routes[j]),q=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,C,!1):t.end("This page could not be found"),null);if(k&&!b){let e=!!S.routes[j],t=S.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(y.experimental.adapterPath)return await q();throw new f.NoFallbackError}}let H=null;!k||N.isDev||b||(H="/index"===(H=j)?"/":H);let U=!0===N.isDev||!k,D=k&&!U;O&&P&&(0,o.setManifestsSingleton)({page:R,clientReferenceManifest:P,serverActionsManifest:O});let M=e.method||"GET",L=(0,a.getTracer)(),K=L.getActiveScopeSpan(),$={params:E,prerenderManifest:S,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts},cacheComponents:!!y.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:y.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,n)=>N.onRequestError(e,t,s,n,T)},sharedContext:{buildId:w}},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=L.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 s=r.get("next.route");if(s){let t=`${M} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${R}`)}),i=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var a,l;let u=async({previousCacheEntry:r})=>{try{if(!i&&A&&I&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(n);e.fetchMetrics=$.renderOpts.fetchMetrics;let l=$.renderOpts.pendingWaitUntil;l&&s.waitUntil&&(s.waitUntil(l),l=void 0);let u=$.renderOpts.collectedTags;if(!k)return await (0,p.sendResponse)(F,B,a,$.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,x.toNodeOutgoingHttpHeaders)(a.headers);u&&(t[h.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,s=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await N.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:A})},!1,T),t}},d=await N.handleResponse({req:e,nextConfig:y,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:I,responseGenerator:u,waitUntil:s.waitUntil,isMinimalMode:i});if(!k)return null;if((null==d||null==(a=d.value)?void 0:a.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,x.fromNodeOutgoingHttpHeaders)(d.value.headers);return i&&k||f.delete(h.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,v.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(F,B,new Response(d.value.body,{headers:f,status:d.value.status||200})),null};K?await l(K):await L.withPropagatedContext(e.headers,()=>L.trace(d.BaseServerSpan.handleRequest,{spanName:`${M} ${R}`,kind:a.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:_,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:A})},!1,T),k)throw t;return await (0,p.sendResponse)(F,B,new Response(null,{status:500})),null}}e.s(["handler",()=>I,"patchFetch",()=>A,"routeModule",()=>N,"serverHooks",()=>T,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>S],9675)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__2bb675ff._.js.map
|