@shipit-ai/cli 1.165.0 → 1.166.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -1
- package/README.md +6 -0
- package/apis/json-schema/AgentSession.yaml +1 -1
- package/apis/json-schema/AgentType.yaml +2 -0
- package/dist/eslint.config.mjs +2 -0
- package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts +1 -1
- package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.js +1 -1
- package/dist/packages/core/src/application/use-cases/agents/delete-agent-run.use-case.js +1 -1
- package/dist/packages/core/src/domain/generated/output.d.ts +3 -1
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/domain/generated/output.js +2 -0
- package/dist/packages/core/src/infrastructure/di/modules/agents.module.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/modules/agents.module.js +6 -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 +33 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/agent-validator.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/agent-validator.service.js +2 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.js +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/copilot-cli-executor.service.d.ts +34 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/copilot-cli-executor.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/copilot-cli-executor.service.js +149 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/cursor-executor.service.js +2 -2
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/research.fixture.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/research.fixture.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/research.fixture.js +2 -2
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/tasks.fixture.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/tasks.fixture.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/fixtures/tasks.fixture.js +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/rovo-dev-executor.service.d.ts +37 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/rovo-dev-executor.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/rovo-dev-executor.service.js +150 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +1 -1
- package/dist/packages/core/src/infrastructure/services/git/merge-strategy.service.js +1 -1
- package/dist/packages/core/src/infrastructure/services/interactive/feature-context.builder.js +1 -1
- package/dist/packages/core/src/infrastructure/services/notifications/notification-bus.js +1 -1
- package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.js +3 -3
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/copilot-cli.json +31 -0
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/rovo-dev.json +31 -0
- package/dist/src/presentation/web/app/actions/check-agent-auth.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/check-agent-auth.js +35 -0
- package/dist/src/presentation/web/app/actions/check-agent-tool.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/check-agent-tool.js +4 -0
- package/dist/src/presentation/web/app/actions/get-all-agent-models.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/get-all-agent-models.js +8 -2
- package/dist/src/presentation/web/components/assistant-ui/thread.js +2 -2
- package/dist/src/presentation/web/components/common/action-button/action-button.js +2 -2
- package/dist/src/presentation/web/components/common/action-button/action-button.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/action-button/action-button.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.js +3 -2
- package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.stories.js +1 -1
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.js +2 -2
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.js +1 -1
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.js +2 -2
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.js +1 -1
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/ci-status-badge/ci-status-badge.js +4 -4
- package/dist/src/presentation/web/components/common/ci-status-badge/ci-status-badge.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/ci-status-badge/ci-status-badge.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.js +3 -3
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.js +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.stories.d.ts.map +1 -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 +3 -3
- package/dist/src/presentation/web/components/common/control-center-drawer/global-chat-drawer-client.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/global-chat-drawer-client.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.js +5 -5
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.js +2 -2
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.js +1 -1
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.js +2 -2
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.js +2 -2
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.stories.js +1 -1
- package/dist/src/presentation/web/components/common/drawer-revision-input/drawer-revision-input.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/drawer-revision-input/drawer-revision-input.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/drawer-revision-input/drawer-revision-input.stories.js +1 -1
- package/dist/src/presentation/web/components/common/editor-type-icons.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/editor-type-icons.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/elapsed-time/elapsed-time.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/elapsed-time/elapsed-time.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/empty-state/empty-state.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/empty-state/empty-state.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/parent-feature-combobox.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/parent-feature-combobox.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/prompt-section.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/prompt-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/prompt-section.stories.js +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.js +2 -2
- package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/workflow-options-section.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/workflow-options-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/workflow-options-section.stories.js +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.js +7 -7
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.js +2 -2
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.stories.js +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/event-log-viewer.js +4 -6
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/event-log-viewer.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/event-log-viewer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +2 -2
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/log-tab.js +2 -2
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/log-tab.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/log-tab.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +4 -4
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.js +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/plan-tab.js +4 -4
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/plan-tab.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/plan-tab.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-list-item/feature-list-item.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-list-item/feature-list-item.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-node/agent-type-icons.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.js +3 -3
- package/dist/src/presentation/web/components/common/feature-node/feature-node.js +5 -11
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.js +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-status-badges/feature-status-badges.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-status-badges/feature-status-badges.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-status-config.js +2 -2
- package/dist/src/presentation/web/components/common/feature-status-group/feature-status-group.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-status-group/feature-status-group.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.js +2 -2
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/github-import-dialog/github-import-dialog.stories.js +1 -1
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.js +3 -3
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.js +1 -1
- package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.js +2 -2
- package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/github-import-dialog/github-url-input.stories.js +1 -1
- package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/inline-attachments/inline-attachments.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/loading-skeleton/loading-skeleton.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/loading-skeleton/loading-skeleton.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/merge-review/diff-view.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/merge-review/diff-view.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/merge-review/merge-review.js +3 -5
- package/dist/src/presentation/web/components/common/merge-review/merge-review.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/merge-review/merge-review.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/merge-review/merge-review.stories.js +1 -1
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.js +2 -2
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.js +1 -1
- package/dist/src/presentation/web/components/common/page-header/page-header.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/page-header/page-header.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.stories.js +1 -1
- package/dist/src/presentation/web/components/common/product-decisions-summary/product-decisions-summary.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/product-decisions-summary/product-decisions-summary.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/react-file-manager-dialog/react-file-manager-dialog.js +2 -2
- package/dist/src/presentation/web/components/common/react-file-manager-dialog/react-file-manager-dialog.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/react-file-manager-dialog/react-file-manager-dialog.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/react-file-manager-dialog/react-file-manager-dialog.stories.js +1 -1
- package/dist/src/presentation/web/components/common/reject-feedback-dialog/reject-feedback-dialog.js +2 -2
- package/dist/src/presentation/web/components/common/reject-feedback-dialog/reject-feedback-dialog.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/reject-feedback-dialog/reject-feedback-dialog.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/reject-feedback-dialog/reject-feedback-dialog.stories.js +1 -1
- package/dist/src/presentation/web/components/common/repo-group/repo-group.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/repo-group/repo-group.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-node.js +4 -7
- package/dist/src/presentation/web/components/common/repository-node/repository-node.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-node.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/server-log-viewer/server-log-viewer.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/server-log-viewer/server-log-viewer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/shipit-ai-logo/shipit-ai-logo.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/shipit-ai-logo/shipit-ai-logo.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/sidebar-collapse-toggle/sidebar-collapse-toggle.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/sidebar-collapse-toggle/sidebar-collapse-toggle.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/sidebar-nav-item/sidebar-nav-item.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/sidebar-nav-item/sidebar-nav-item.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/sidebar-section-header/sidebar-section-header.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/sidebar-section-header/sidebar-section-header.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/sound-toggle/sound-toggle.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/sound-toggle/sound-toggle.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.js +4 -4
- package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.stories.js +1 -1
- package/dist/src/presentation/web/components/common/theme-toggle/theme-toggle.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/theme-toggle/theme-toggle.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/version-badge/version-badge.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/common/version-badge/version-badge.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/AgentStatusBadge.js +7 -7
- package/dist/src/presentation/web/components/features/chat/AgentStatusBadge.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/chat/AgentStatusBadge.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatComposer.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatComposer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatComposer.stories.js +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatInput.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatInput.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatMessageBubble.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatMessageBubble.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatMessageList.stories.d.ts +2 -2
- package/dist/src/presentation/web/components/features/chat/ChatMessageList.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatSheet.stories.d.ts +2 -2
- package/dist/src/presentation/web/components/features/chat/ChatSheet.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatTab.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatTab.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.js +9 -13
- package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.stories.d.ts.map +1 -1
- 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 +3 -2
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.stories.d.ts +2 -2
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.js +3 -3
- package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.stories.js +1 -1
- package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.stories.d.ts +2 -2
- package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.stories.js +1 -1
- package/dist/src/presentation/web/components/features/features-canvas/dependency-edge.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/features-canvas/dependency-edge.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.stories.js +1 -4
- package/dist/src/presentation/web/components/features/settings/AgentModelPicker/AgentModelPicker.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/AgentModelPicker/AgentModelPicker.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/AgentModelPicker/AgentModelPicker.stories.js +1 -1
- package/dist/src/presentation/web/components/features/settings/ModelPicker/ModelPicker.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/ModelPicker/ModelPicker.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/ModelPicker/ModelPicker.stories.js +1 -1
- package/dist/src/presentation/web/components/features/settings/agent-settings-section.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/agent-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/ci-settings-section.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/ci-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/database-settings-section.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/database-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/environment-settings-section.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/environment-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/fab-layout-settings-section.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/fab-layout-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/interactive-agent-settings-section.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/interactive-agent-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/language-settings-section.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/language-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/notification-settings-section.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/notification-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-section-utils.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-section-utils.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-section-utils.stories.js +1 -1
- package/dist/src/presentation/web/components/features/settings/stage-timeouts-settings-section.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/stage-timeouts-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/timeout-slider.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/timeout-slider.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/workflow-settings-section.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/settings/workflow-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/skills/category-filter.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/skills/category-filter.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/skills/skill-card.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/skills/skill-card.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/skills/skill-card.stories.js +3 -3
- package/dist/src/presentation/web/components/features/skills/skill-detail-drawer.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/skills/skill-detail-drawer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/skills/skill-detail-drawer.stories.js +3 -3
- package/dist/src/presentation/web/components/features/skills/skill-list.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/skills/skill-list.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/skills/skill-list.stories.js +4 -4
- package/dist/src/presentation/web/components/features/skills/skills-page-client.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/skills/skills-page-client.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/skills/skills-page-client.stories.js +8 -8
- package/dist/src/presentation/web/components/features/tools/tool-card.js +3 -5
- package/dist/src/presentation/web/components/features/tools/tool-card.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/tools/tool-card.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/tools/tool-detail-drawer.js +3 -7
- package/dist/src/presentation/web/components/features/tools/tool-detail-drawer.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/tools/tool-detail-drawer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/tools/tools-page-client.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/tools/tools-page-client.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/version/version-page-client.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/features/version/version-page-client.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/dashboard-layout/dashboard-layout.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/layouts/dashboard-layout/dashboard-layout.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/header/header.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/layouts/header/header.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/sidebar/sidebar.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/layouts/sidebar/sidebar.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/accordion.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/accordion.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/alert-dialog.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/alert-dialog.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/alert.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/alert.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/alert.stories.js +2 -2
- package/dist/src/presentation/web/components/ui/badge.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/badge.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/button.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/button.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/card.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/card.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/checkbox-group-item.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/checkbox-group-item.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/checkbox-group.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/checkbox-group.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/checkbox.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/checkbox.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/comet-spinner.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/comet-spinner.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/command.stories.d.ts +2 -2
- package/dist/src/presentation/web/components/ui/command.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/dialog.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/dialog.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/drawer.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/drawer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/dropdown-menu.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/dropdown-menu.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/github-icon.d.ts +13 -0
- package/dist/src/presentation/web/components/ui/github-icon.d.ts.map +1 -0
- package/dist/src/presentation/web/components/ui/github-icon.js +15 -0
- package/dist/src/presentation/web/components/ui/github-icon.stories.d.ts +10 -0
- package/dist/src/presentation/web/components/ui/github-icon.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/ui/github-icon.stories.js +22 -0
- package/dist/src/presentation/web/components/ui/input.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/input.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/label.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/label.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/popover.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/popover.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/scroll-area.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/scroll-area.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/select.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/select.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/separator.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/separator.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/sheet.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/sheet.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/sidebar.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/sidebar.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/skeleton.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/skeleton.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/slider.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/slider.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/sonner.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/sonner.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/spinner.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/spinner.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/switch.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/switch.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/tabs.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/tabs.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/textarea.stories.d.ts +1 -1
- package/dist/src/presentation/web/components/ui/textarea.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/tooltip.stories.d.ts +2 -2
- package/dist/src/presentation/web/components/ui/tooltip.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/use-notifications.stories.d.ts +1 -1
- package/dist/src/presentation/web/hooks/use-notifications.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/use-sound-action.stories.d.ts +1 -1
- package/dist/src/presentation/web/hooks/use-sound-action.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/use-sound.stories.d.ts +1 -1
- package/dist/src/presentation/web/hooks/use-sound.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/session-scanner.js +2 -2
- package/dist/src/presentation/web/lib/skills.js +2 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +21 -24
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +5 -5
- package/web/.next/fallback-build-manifest.json +3 -3
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -2
- package/web/.next/required-server-files.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
- 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/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/create/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
- 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 +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -1
- 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 +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
- 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/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- 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/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/chat/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/create/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
- 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 +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -1
- 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 +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
- 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 +2 -2
- package/web/.next/server/app/(dashboard)/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
- 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/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- 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 +2 -2
- package/web/.next/server/app/_global-error.html +1 -1
- 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 +2 -2
- package/web/.next/server/app/_not-found/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
- 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.nft.json +1 -1
- package/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +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.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
- package/web/.next/server/app/api/sessions/route.js +2 -2
- package/web/.next/server/app/settings/page/build-manifest.json +2 -2
- package/web/.next/server/app/settings/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/settings/page/server-reference-manifest.json +11 -11
- 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 +2 -2
- package/web/.next/server/app/skills/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
- 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 +2 -2
- package/web/.next/server/app/tools/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
- 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 +2 -2
- package/web/.next/server/app/version/page/react-loadable-manifest.json +3 -3
- package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/0n.o_server_app_api_interactive_chat_[featureId]_stop_route_actions_09da~zt.js +1 -1
- package/web/.next/server/chunks/11es_next_dist_esm_build_templates_app-route_067cwst.js +1 -1
- package/web/.next/server/chunks/11es_next_dist_esm_build_templates_app-route_067cwst.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__07suer1._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0_.w-eb._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0_.w-eb._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__13ni_ow._.js +1 -1
- package/web/.next/server/chunks/ssr/{0lyk_lucide-react_dist_esm_icons_0shxsmr._.js → 08qz_lucide-react_dist_esm_icons_0_gqlce._.js} +2 -2
- package/web/.next/server/chunks/ssr/08qz_lucide-react_dist_esm_icons_0_gqlce._.js.map +1 -0
- package/web/.next/server/chunks/ssr/08qz_lucide-react_dist_esm_icons_0zwb4s4._.js +3 -0
- package/web/.next/server/chunks/ssr/08qz_lucide-react_dist_esm_icons_0zwb4s4._.js.map +1 -0
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_00~eq5i.js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_00~eq5i.js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_0979_c..js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_0979_c..js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_chat_page_actions_0dqll_1.js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web__next-internal_server_app_(dashboard)_chat_page_actions_0dqll_1.js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js +3 -3
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js +1 -1
- package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map +1 -1
- package/web/.next/server/chunks/ssr/11es_next_dist_0e36~wi._.js +2 -2
- package/web/.next/server/chunks/ssr/11es_next_dist_client_components_058~c_t._.js +1 -1
- package/web/.next/server/chunks/ssr/11es_next_dist_esm_build_templates_app-page_0l-25e2.js +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_global-chat-drawer-client_tsx_03s32.q._.js +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__0uxn6-j._.js → [root-of-the-server]__045sv4b._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__0uxn6-j._.js.map → [root-of-the-server]__045sv4b._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0brje6_._.js +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__0np51e2._.js → [root-of-the-server]__0d_0_fp._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__0np51e2._.js.map → [root-of-the-server]__0d_0_fp._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__0~h382a._.js → [root-of-the-server]__0l4d7e.._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__0~h382a._.js.map → [root-of-the-server]__0l4d7e.._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__0_ag.8y._.js → [root-of-the-server]__0lslgap._.js} +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0lslgap._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0o3qggc._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0o3qggc._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__01~y8wi._.js → [root-of-the-server]__0r32z03._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__01~y8wi._.js.map → [root-of-the-server]__0r32z03._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__122xqm6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__12g8h3_._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__12g8h3_._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_0d-pkk0._.js → _0-09vq7._.js} +2 -2
- package/web/.next/server/chunks/ssr/_0-09vq7._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0.rsra~._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_00k65h-._.js +3 -0
- package/web/.next/server/chunks/ssr/_00k65h-._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_01mq~sm._.js +2 -2
- package/web/.next/server/chunks/ssr/_01mq~sm._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_01sesw0._.js +3 -0
- package/web/.next/server/chunks/ssr/_01sesw0._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_04s_q5r._.js +1 -1
- package/web/.next/server/chunks/ssr/_04s_q5r._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_0xtds88._.js → _08i-c2n._.js} +2 -2
- package/web/.next/server/chunks/ssr/_08i-c2n._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_0jk5q_z._.js → _09di2m~._.js} +2 -2
- package/web/.next/server/chunks/ssr/_09di2m~._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0gdghcr._.js +3 -0
- package/web/.next/server/chunks/ssr/_0gdghcr._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0hwjfpu._.js +3 -0
- package/web/.next/server/chunks/ssr/_0hwjfpu._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0hw~zvl._.js +3 -0
- package/web/.next/server/chunks/ssr/_0hw~zvl._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0jpbsh_._.js +1 -1
- package/web/.next/server/chunks/ssr/_0jpbsh_._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0phryzt._.js +3 -0
- package/web/.next/server/chunks/ssr/_0phryzt._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0r~xv6k._.js +3 -0
- package/web/.next/server/chunks/ssr/_0r~xv6k._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0vyfc4b._.js +3 -0
- package/web/.next/server/chunks/ssr/_0vyfc4b._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0w-_hww._.js +1 -1
- package/web/.next/server/chunks/ssr/_0w-_hww._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_0j9vx-1._.js → _0y8u4.e._.js} +3 -3
- package/web/.next/server/chunks/ssr/_0y8u4.e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0~7lwu_._.js +3 -0
- package/web/.next/server/chunks/ssr/_0~7lwu_._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_0rvaoj4._.js → _109n-y4._.js} +2 -2
- package/web/.next/server/chunks/ssr/_109n-y4._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_13bl-l1._.js → _12104w0._.js} +2 -2
- package/web/.next/server/chunks/ssr/_12104w0._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_09g41d0._.js → _12un22l._.js} +3 -3
- package/web/.next/server/chunks/ssr/_12un22l._.js.map +1 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_0l8_ov3._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_0l8_ov3._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_0.e4~xc._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0.e4~xc._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_00dvh.m._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_00dvh.m._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_05-w-~v._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_05-w-~v._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_06b6~lt._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_06b6~lt._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_08fy2mf._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_08fy2mf._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0f~udu1._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0f~udu1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0qys821._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_0qys821._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0q~dt0o._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0q~dt0o._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0y11iiz._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0y11iiz._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_11jrkxt._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_11jrkxt._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_1199d3x.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_1199d3x.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_0m2jqxx.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_0m2jqxx.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_0krkh_0.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_0krkh_0.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_load-settings_ts_0b8f3pf._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_0aji.op._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_0aji.op._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_select_tsx_0b.-59k._.js +1 -1
- package/web/.next/server/middleware-build-manifest.js +5 -5
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +49 -49
- package/web/.next/static/chunks/0-lu0b1ewsb0_.js +1 -0
- package/web/.next/static/chunks/00uywouqbytc0.js +5 -0
- package/web/.next/static/chunks/{0t_48qc0x7bhs.js → 01hf_nf2ge.tn.js} +3 -3
- package/web/.next/static/chunks/01~dudieyb7wl.js +5 -0
- package/web/.next/static/chunks/{0riti1bs-erm~.js → 02kpdawdtqcxm.js} +1 -1
- package/web/.next/static/chunks/{0~er~22zwvx0i.js → 09_oo_kc.j.df.js} +1 -1
- package/web/.next/static/chunks/0b01fd0lkhnzf.js +1 -0
- package/web/.next/static/chunks/0b_anwzlzr9p7.js +1 -0
- package/web/.next/static/chunks/0fg~vc93spa9c.js +1 -0
- package/web/.next/static/chunks/0fmbl3o08a~-h.js +1 -0
- package/web/.next/static/chunks/0j_0i2qsrwh-c.js +1 -0
- package/web/.next/static/chunks/{07yqyvabetyrh.js → 0l.kymg3jmf7n.js} +2 -2
- package/web/.next/static/chunks/0m5~9kij3s~81.js +1 -0
- package/web/.next/static/chunks/0ntps8p7wo1re.js +1 -0
- package/web/.next/static/chunks/{0wmckrtphfa12.js → 0odlgm-ixqorl.js} +1 -1
- package/web/.next/static/chunks/0q~uf2s33.48w.js +1 -0
- package/web/.next/static/chunks/0rfap2l5xz_-p.js +1 -0
- package/web/.next/static/chunks/0rhoh5o1y7grf.js +7 -0
- package/web/.next/static/chunks/0sywjtf8m0_fb.js +1 -0
- package/web/.next/static/chunks/{071_2_.sfp-im.js → 0tutcr7trd_7d.js} +1 -1
- package/web/.next/static/chunks/11bi612fz8agh.js +1 -0
- package/web/.next/static/chunks/121l3o3vd~hvn.js +1 -0
- package/web/.next/static/chunks/13ryk8qc9y3qu.js +1 -0
- package/web/.next/static/chunks/164dnpi666fv_.js +5 -0
- package/web/.next/static/chunks/16jcg65-2mxc..js +1 -0
- package/web/.next/static/chunks/{turbopack-0ve8f54_veg.u.js → turbopack-0wsav6to5abtk.js} +1 -1
- package/web/package.json +5 -5
- package/web/.next/server/chunks/ssr/0lyk_lucide-react_dist_esm_icons_06zrfq4._.js +0 -3
- package/web/.next/server/chunks/ssr/0lyk_lucide-react_dist_esm_icons_06zrfq4._.js.map +0 -1
- package/web/.next/server/chunks/ssr/0lyk_lucide-react_dist_esm_icons_0shxsmr._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0_ag.8y._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__12qqi.~._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__12qqi.~._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0.gy.n8._.js +0 -3
- package/web/.next/server/chunks/ssr/_0.gy.n8._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0.k7wl.._.js +0 -3
- package/web/.next/server/chunks/ssr/_0.k7wl.._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_09g41d0._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0aa~oer._.js +0 -3
- package/web/.next/server/chunks/ssr/_0aa~oer._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0d-pkk0._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0ez.1o4._.js +0 -3
- package/web/.next/server/chunks/ssr/_0ez.1o4._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0j9vx-1._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0jk5q_z._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0n.xy38._.js +0 -3
- package/web/.next/server/chunks/ssr/_0n.xy38._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0rvaoj4._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0v.yfmg._.js +0 -3
- package/web/.next/server/chunks/ssr/_0v.yfmg._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0vl.03w._.js +0 -3
- package/web/.next/server/chunks/ssr/_0vl.03w._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0xtds88._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_11kuznh._.js +0 -3
- package/web/.next/server/chunks/ssr/_11kuznh._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_13bl-l1._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_13euo-f._.js +0 -3
- package/web/.next/server/chunks/ssr/_13euo-f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_0xyo1be._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_0xyo1be._.js.map +0 -1
- package/web/.next/static/chunks/00racug7sobut.js +0 -1
- package/web/.next/static/chunks/06sdx5zm71_u5.js +0 -1
- package/web/.next/static/chunks/08iq.j3rbmhbm.js +0 -1
- package/web/.next/static/chunks/08iuksm8rvb09.js +0 -1
- package/web/.next/static/chunks/08se-_opmk~.7.js +0 -1
- package/web/.next/static/chunks/09b2usag59_bi.js +0 -5
- package/web/.next/static/chunks/0icjwdqytqa_8.js +0 -5
- package/web/.next/static/chunks/0qjoc4x5q-aeg.js +0 -1
- package/web/.next/static/chunks/0rhzqh.-6e6k7.js +0 -1
- package/web/.next/static/chunks/0s-e-ekdbgoqa.js +0 -1
- package/web/.next/static/chunks/0u5.s.lv2bae5.js +0 -1
- package/web/.next/static/chunks/0vgbvqu82ac1x.js +0 -1
- package/web/.next/static/chunks/0w~84g7r9307~.js +0 -1
- package/web/.next/static/chunks/0y1nwnouroh6k.js +0 -1
- package/web/.next/static/chunks/0zz.xgsd83.3n.js +0 -1
- package/web/.next/static/chunks/0~wymq55b2bn3.js +0 -1
- package/web/.next/static/chunks/10wo3waalauct.js +0 -5
- package/web/.next/static/chunks/15lcx-697j_3z.js +0 -7
- package/web/.next/static/chunks/176x256xw_viv.js +0 -1
- /package/web/.next/static/{xP_-L4TLYvd3i_sEmljLs → 21GZVGanhwKlq9p5dtTCB}/_buildManifest.js +0 -0
- /package/web/.next/static/{xP_-L4TLYvd3i_sEmljLs → 21GZVGanhwKlq9p5dtTCB}/_clientMiddlewareManifest.js +0 -0
- /package/web/.next/static/{xP_-L4TLYvd3i_sEmljLs → 21GZVGanhwKlq9p5dtTCB}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../src/presentation/web/lib/api-helpers.ts","../../../../../../src/presentation/web/lib/session-scanner.ts","../../../../../../src/presentation/web/app/api/sessions-batch/route.ts","../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shipit-ai ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shipitAiContainer';\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 '@shipit-ai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","import { NextResponse } from 'next/server';\n\n/**\n * Create a JSON error response. For 500-level errors, always uses a generic\n * message to prevent internal detail leakage. The actual error is logged\n * server-side for debugging.\n */\nexport function apiError(\n status: number,\n publicMessage: string,\n internalError?: unknown\n): NextResponse {\n if (internalError) {\n const detail = internalError instanceof Error ? internalError.message : String(internalError);\n // eslint-disable-next-line no-console\n console.error(`[API ${status}] ${publicMessage}: ${detail}`);\n }\n return NextResponse.json({ error: publicMessage }, { status });\n}\n\n/**\n * Validate a required query parameter. Returns the trimmed value or an\n * error response.\n */\nexport function validateParam(value: string | null, paramName: string): string | NextResponse {\n if (!value?.trim()) {\n return apiError(400, `${paramName} is required`);\n }\n return value.trim();\n}\n","/**\n * Shared session scanning logic used by both /api/sessions and /api/sessions-batch.\n *\n * Scans Claude Code and Cursor session directories for JSONL session files,\n * parsing headers to extract preview, message count, and timestamps.\n */\n\nimport { createHash } from 'node:crypto';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { readdir, stat } from 'node:fs/promises';\n\nexport interface SessionResult {\n id: string;\n agentType: string;\n preview: string | null;\n messageCount: number;\n firstMessageAt: string | null;\n lastMessageAt: string | null;\n createdAt: string | null;\n projectPath: string;\n filePath: string;\n /** mtime for sorting — not sent to client */\n _mtime: number;\n}\n\n// ── Path encoding helpers ─────────────────────────────────────────────\n\n/**\n * Claude Code encodes paths by replacing '/', '\\', '.' with '-'.\n * e.g. /home/user/.shipit-ai/repos/abc → -home-user--shep-repos-abc\n */\nfunction claudeEncodePath(p: string): string {\n return p.replace(/[/\\\\.]/g, '-');\n}\n\n/**\n * Cursor encodes paths by stripping the leading '/', removing dots,\n * and replacing '/' and '\\' with '-'.\n * e.g. /home/user/.shipit-ai/repos/abc → home-user-shep-repos-abc\n */\nfunction cursorEncodePath(p: string): string {\n return p.replace(/^\\//, '').replace(/\\./g, '').replace(/[/\\\\]/g, '-');\n}\n\n// ── Shared helpers ────────────────────────────────────────────────────\n\nfunction extractText(content: unknown): string | null {\n if (typeof content === 'string') return content;\n if (Array.isArray(content)) {\n for (const block of content) {\n if (typeof block === 'object' && block !== null) {\n const b = block as Record<string, unknown>;\n if (b.type === 'text' && typeof b.text === 'string') return b.text;\n }\n }\n }\n return null;\n}\n\nconst PREVIEW_READ_BYTES = 8_192; // 8KB is enough for first few messages\n\n// ── Claude Code session scanner ───────────────────────────────────────\n\nasync function collectJsonlFiles(\n projectDir: string\n): Promise<{ name: string; filePath: string; mtime: number }[]> {\n let entries: string[];\n try {\n entries = await readdir(projectDir);\n } catch {\n return [];\n }\n const jsonlFiles = entries.filter((e) => e.endsWith('.jsonl'));\n const fileInfos = await Promise.allSettled(\n jsonlFiles.map(async (name) => {\n const filePath = join(projectDir, name);\n const s = await stat(filePath);\n return { name, filePath, mtime: s.mtime.getTime() };\n })\n );\n return fileInfos\n .filter(\n (r): r is PromiseFulfilledResult<{ name: string; filePath: string; mtime: number }> =>\n r.status === 'fulfilled'\n )\n .map((r) => r.value);\n}\n\nasync function parseClaudeSession(\n filePath: string,\n fileName: string,\n mtime: number,\n repositoryPath: string\n): Promise<SessionResult | null> {\n const { createReadStream } = await import('node:fs');\n const id = fileName.replace('.jsonl', '');\n\n let preview: string | null = null;\n let firstTimestamp: string | null = null;\n let messageCount = 0;\n\n const head = await new Promise<string>((resolve) => {\n const chunks: Buffer[] = [];\n let size = 0;\n const stream = createReadStream(filePath, { end: PREVIEW_READ_BYTES - 1 });\n stream.on('data', (chunk: Buffer) => {\n chunks.push(chunk);\n size += chunk.length;\n });\n stream.on('end', () => resolve(Buffer.concat(chunks, size).toString('utf-8')));\n stream.on('error', () => resolve(''));\n });\n\n if (!head) return null;\n\n const lines = head.split('\\n').filter((l) => l.trim());\n for (const line of lines) {\n try {\n const entry = JSON.parse(line) as {\n type?: string;\n timestamp?: string;\n message?: { role?: string; content?: unknown };\n };\n if (entry.type === 'user' || entry.type === 'assistant') {\n const role = entry.message?.role;\n if (role === 'user' || role === 'assistant') {\n messageCount++;\n if (entry.timestamp) {\n firstTimestamp ??= entry.timestamp;\n }\n if (role === 'user' && preview === null) {\n preview = extractText(entry.message?.content);\n }\n }\n }\n } catch {\n break;\n }\n }\n\n if (messageCount === 0) return null;\n\n const mtimeIso = new Date(mtime).toISOString();\n return {\n id,\n agentType: 'claude-code',\n preview,\n messageCount,\n firstMessageAt: firstTimestamp,\n lastMessageAt: mtimeIso,\n createdAt: firstTimestamp ?? mtimeIso,\n projectPath: repositoryPath,\n filePath,\n _mtime: mtime,\n };\n}\n\nexport async function scanClaudeSessions(\n repositoryPath: string,\n limit: number,\n includeWorktrees = false\n): Promise<SessionResult[]> {\n const dirName = claudeEncodePath(repositoryPath);\n const projectsRoot = join(homedir(), '.claude', 'projects');\n\n const primaryDir = join(projectsRoot, dirName);\n let allFiles = await collectJsonlFiles(primaryDir);\n\n if (includeWorktrees) {\n try {\n const allDirs = await readdir(projectsRoot);\n\n const prefixMatches = allDirs.filter((d) => d !== dirName && d.startsWith(dirName));\n\n const normalizedRepoPath = repositoryPath.replace(/\\\\/g, '/');\n const repoHash = createHash('sha256').update(normalizedRepoPath).digest('hex').slice(0, 16);\n const shipitAiHome = join(homedir(), '.shipit-ai').replace(/\\\\/g, '/');\n const shipitAiWorktreePrefix = claudeEncodePath(join(shipitAiHome, 'repos', repoHash));\n const shipitAiMatches = allDirs.filter(\n (d) => d.startsWith(shipitAiWorktreePrefix) && !prefixMatches.includes(d) && d !== dirName\n );\n\n const worktreeDirs = [...prefixMatches, ...shipitAiMatches];\n const worktreeResults = await Promise.all(\n worktreeDirs.map((d) => collectJsonlFiles(join(projectsRoot, d)))\n );\n for (const files of worktreeResults) {\n allFiles = allFiles.concat(files);\n }\n } catch {\n // projectsRoot doesn't exist — no sessions at all\n }\n }\n\n const valid = allFiles.sort((a, b) => b.mtime - a.mtime).slice(0, limit);\n\n const results = await Promise.allSettled(\n valid.map(async (fi) => parseClaudeSession(fi.filePath, fi.name, fi.mtime, repositoryPath))\n );\n\n return results\n .filter((r): r is PromiseFulfilledResult<SessionResult | null> => r.status === 'fulfilled')\n .map((r) => r.value)\n .filter((s): s is SessionResult => s !== null);\n}\n\n// ── Cursor session scanner ────────────────────────────────────────────\n\nasync function parseCursorSession(\n filePath: string,\n fileName: string,\n mtime: number,\n repositoryPath: string\n): Promise<SessionResult | null> {\n const { createReadStream } = await import('node:fs');\n const id = fileName.replace('.jsonl', '');\n\n const head = await new Promise<string>((resolve) => {\n const chunks: Buffer[] = [];\n let size = 0;\n const stream = createReadStream(filePath, { end: PREVIEW_READ_BYTES - 1 });\n stream.on('data', (chunk: Buffer) => {\n chunks.push(chunk);\n size += chunk.length;\n });\n stream.on('end', () => resolve(Buffer.concat(chunks, size).toString('utf-8')));\n stream.on('error', () => resolve(''));\n });\n\n if (!head) return null;\n\n let preview: string | null = null;\n let messageCount = 0;\n\n const lines = head.split('\\n').filter((l) => l.trim());\n for (const line of lines) {\n try {\n const entry = JSON.parse(line) as {\n role?: string;\n message?: { content?: unknown };\n };\n if (entry.role === 'user' || entry.role === 'assistant') {\n messageCount++;\n if (entry.role === 'user' && preview === null) {\n preview = extractText(entry.message?.content);\n }\n }\n } catch {\n break;\n }\n }\n\n if (messageCount === 0) return null;\n\n const mtimeIso = new Date(mtime).toISOString();\n return {\n id,\n agentType: 'cursor',\n preview,\n messageCount,\n firstMessageAt: mtimeIso,\n lastMessageAt: mtimeIso,\n createdAt: mtimeIso,\n projectPath: repositoryPath,\n filePath,\n _mtime: mtime,\n };\n}\n\nexport async function scanCursorSessions(\n repositoryPath: string,\n limit: number\n): Promise<SessionResult[]> {\n const dirName = cursorEncodePath(repositoryPath);\n const transcriptsDir = join(homedir(), '.cursor', 'projects', dirName, 'agent-transcripts');\n\n let entries: string[];\n try {\n entries = await readdir(transcriptsDir);\n } catch {\n return [];\n }\n\n const fileInfos = await Promise.allSettled(\n entries.map(async (entry) => {\n const entryPath = join(transcriptsDir, entry);\n const s = await stat(entryPath);\n\n if (s.isFile() && entry.endsWith('.jsonl')) {\n return { name: entry, filePath: entryPath, mtime: s.mtime.getTime() };\n }\n\n if (s.isDirectory()) {\n const jsonlPath = join(entryPath, `${entry}.jsonl`);\n try {\n const jsonlStat = await stat(jsonlPath);\n return {\n name: `${entry}.jsonl`,\n filePath: jsonlPath,\n mtime: jsonlStat.mtime.getTime(),\n };\n } catch {\n return null;\n }\n }\n\n return null;\n })\n );\n\n const valid = fileInfos\n .filter(\n (\n r\n ): r is PromiseFulfilledResult<{\n name: string;\n filePath: string;\n mtime: number;\n } | null> => r.status === 'fulfilled'\n )\n .map((r) => r.value)\n .filter((v): v is { name: string; filePath: string; mtime: number } => v !== null)\n .sort((a, b) => b.mtime - a.mtime)\n .slice(0, limit);\n\n const results = await Promise.allSettled(\n valid.map(async (fi) => parseCursorSession(fi.filePath, fi.name, fi.mtime, repositoryPath))\n );\n\n return results\n .filter((r): r is PromiseFulfilledResult<SessionResult | null> => r.status === 'fulfilled')\n .map((r) => r.value)\n .filter((s): s is SessionResult => s !== null);\n}\n\n/**\n * Scan sessions for a single repository path from all providers.\n * Merges and sorts by recency.\n */\nexport async function scanSessionsForPath(\n repositoryPath: string,\n limit: number,\n includeWorktrees = false\n): Promise<SessionResult[]> {\n const [claudeSessions, cursorSessions] = await Promise.all([\n scanClaudeSessions(repositoryPath, limit, includeWorktrees),\n scanCursorSessions(repositoryPath, limit),\n ]);\n\n return [...claudeSessions, ...cursorSessions]\n .sort((a, b) => b._mtime - a._mtime)\n .slice(0, Math.min(limit, 50));\n}\n","import { NextResponse } from 'next/server';\nimport { resolve } from '@/lib/server-container';\nimport { apiError } from '@/lib/api-helpers';\nimport type { ListRepositoriesUseCase } from '@shipit-ai/core/application/use-cases/repositories/list-repositories.use-case';\nimport type { ListFeaturesUseCase } from '@shipit-ai/core/application/use-cases/features/list-features.use-case';\nimport { scanSessionsForPath, type SessionResult } from '@/lib/session-scanner';\n\nexport const dynamic = 'force-dynamic';\n\ntype SessionSummaryFromBatch = Omit<SessionResult, '_mtime'>;\n\nconst SESSIONS_PER_PATH = 5;\n\n// ── Server-side cache ─────────────────────────────────────────────────\n\nconst CACHE_TTL_MS = 30_000;\nlet cache: { data: Record<string, SessionSummaryFromBatch[]>; createdAt: number } | null = null;\n\n// ── Route handler ─────────────────────────────────────────────────────\n\n/**\n * GET /api/sessions-batch\n *\n * No parameters needed — resolves all repos and features from the DI container,\n * scans sessions for each, and returns { sessionsByPath: Record<string, SessionSummary[]> }.\n */\nexport async function GET() {\n // Return cache if fresh\n if (cache && Date.now() - cache.createdAt < CACHE_TTL_MS) {\n return NextResponse.json({ sessionsByPath: cache.data });\n }\n\n try {\n const listRepos = resolve<ListRepositoriesUseCase>('ListRepositoriesUseCase');\n const listFeatures = resolve<ListFeaturesUseCase>('ListFeaturesUseCase');\n\n const [repositories, features] = await Promise.all([\n listRepos.execute(),\n listFeatures.execute({ includeArchived: false }),\n ]);\n\n // Build unique path specs: repos with includeWorktrees, features with their worktree path\n const pathSpecs: { path: string; includeWorktrees: boolean }[] = [];\n const seen = new Set<string>();\n\n for (const repo of repositories) {\n if (repo.path && !seen.has(repo.path)) {\n seen.add(repo.path);\n pathSpecs.push({ path: repo.path, includeWorktrees: true });\n }\n }\n\n for (const feature of features) {\n const sessionPath = feature.worktreePath ?? feature.repositoryPath;\n if (sessionPath && !seen.has(sessionPath)) {\n seen.add(sessionPath);\n pathSpecs.push({ path: sessionPath, includeWorktrees: false });\n }\n }\n\n // Scan all paths in parallel\n const results = await Promise.all(\n pathSpecs.map(async ({ path, includeWorktrees }) => {\n const sessions = await scanSessionsForPath(path, SESSIONS_PER_PATH, includeWorktrees);\n return { path, sessions: sessions.map(({ _mtime, ...s }) => s) };\n })\n );\n\n const sessionsByPath: Record<string, SessionSummaryFromBatch[]> = {};\n for (const { path, sessions } of results) {\n sessionsByPath[path] = sessions;\n }\n\n cache = { data: sessionsByPath, createdAt: Date.now() };\n return NextResponse.json({ sessionsByPath });\n } catch (error) {\n return apiError(500, 'Failed to load sessions', error);\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, setRequestMeta } 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/sessions-batch/route\",\n pathname: \"/api/sessions-batch\",\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/sessions-batch/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\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 (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/sessions-batch/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.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 isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n 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 let parentSpan;\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 // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\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 (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\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), undefined, !isWrappedByNextServer);\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":["CONTAINER_KEY","resolve","token","container","globalThis","Error","apiError","status","publicMessage","internalError","detail","message","String","console","error","json","validateParam","value","paramName","trim","claudeEncodePath","p","replace","cursorEncodePath","extractText","content","Array","isArray","block","b","type","text","PREVIEW_READ_BYTES","collectJsonlFiles","projectDir","entries","jsonlFiles","filter","e","endsWith","fileInfos","Promise","allSettled","map","name","filePath","s","mtime","getTime","r","parseClaudeSession","fileName","repositoryPath","createReadStream","id","preview","firstTimestamp","messageCount","head","chunks","size","stream","end","on","chunk","push","length","Buffer","concat","toString","lines","split","l","line","entry","JSON","parse","role","timestamp","mtimeIso","Date","toISOString","agentType","firstMessageAt","lastMessageAt","createdAt","projectPath","_mtime","scanClaudeSessions","limit","includeWorktrees","dirName","projectsRoot","primaryDir","allFiles","allDirs","prefixMatches","d","startsWith","normalizedRepoPath","repoHash","update","digest","slice","shipitAiHome","shipitAiWorktreePrefix","shipitAiMatches","includes","worktreeDirs","worktreeResults","all","files","valid","sort","a","results","fi","parseCursorSession","scanCursorSessions","transcriptsDir","entryPath","isFile","isDirectory","jsonlPath","jsonlStat","v","scanSessionsForPath","claudeSessions","cursorSessions","Math","min","dynamic","SESSIONS_PER_PATH","CACHE_TTL_MS","cache","repositories","GET","now","sessionsByPath","data","listRepos","listFeatures","features","execute","includeArchived","pathSpecs","seen","Set","repo","path","has","add","sessions","feature","sessionPath","worktreePath"],"mappings":"syCAuBO,SAAoBE,AAAXD,CAAmC,EACjD,IAAME,EAAaC,UAAsC,CAACJ,AAdtC,mBAcoD,CAIxE,GAAI,CAACG,EACH,MAAM,AAAIE,GADI,GAEZ,0FAIJ,OAAOF,EAAUF,OAAO,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WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GATmB,AAShB,EAAY,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA3TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAA,AAAW,EAAC,kBACf,uBACAiB,CACJ,EACJ","ignoreList":[4]}
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../src/presentation/web/lib/api-helpers.ts","../../../../../../src/presentation/web/lib/session-scanner.ts","../../../../../../src/presentation/web/app/api/sessions-batch/route.ts","../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shipit-ai ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shipitAiContainer';\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 '@shipit-ai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","import { NextResponse } from 'next/server';\n\n/**\n * Create a JSON error response. For 500-level errors, always uses a generic\n * message to prevent internal detail leakage. The actual error is logged\n * server-side for debugging.\n */\nexport function apiError(\n status: number,\n publicMessage: string,\n internalError?: unknown\n): NextResponse {\n if (internalError) {\n const detail = internalError instanceof Error ? internalError.message : String(internalError);\n // eslint-disable-next-line no-console\n console.error(`[API ${status}] ${publicMessage}: ${detail}`);\n }\n return NextResponse.json({ error: publicMessage }, { status });\n}\n\n/**\n * Validate a required query parameter. Returns the trimmed value or an\n * error response.\n */\nexport function validateParam(value: string | null, paramName: string): string | NextResponse {\n if (!value?.trim()) {\n return apiError(400, `${paramName} is required`);\n }\n return value.trim();\n}\n","/**\n * Shared session scanning logic used by both /api/sessions and /api/sessions-batch.\n *\n * Scans Claude Code and Cursor session directories for JSONL session files,\n * parsing headers to extract preview, message count, and timestamps.\n */\n\nimport { createHash } from 'node:crypto';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { readdir, stat } from 'node:fs/promises';\n\nexport interface SessionResult {\n id: string;\n agentType: string;\n preview: string | null;\n messageCount: number;\n firstMessageAt: string | null;\n lastMessageAt: string | null;\n createdAt: string | null;\n projectPath: string;\n filePath: string;\n /** mtime for sorting — not sent to client */\n _mtime: number;\n}\n\n// ── Path encoding helpers ─────────────────────────────────────────────\n\n/**\n * Claude Code encodes paths by replacing '/', '\\', '.' with '-'.\n * e.g. /home/user/.shipit-ai/repos/abc → -home-user--shipit-ai-repos-abc\n */\nfunction claudeEncodePath(p: string): string {\n return p.replace(/[/\\\\.]/g, '-');\n}\n\n/**\n * Cursor encodes paths by stripping the leading '/', removing dots,\n * and replacing '/' and '\\' with '-'.\n * e.g. /home/user/.shipit-ai/repos/abc → home-user-shipit-ai-repos-abc\n */\nfunction cursorEncodePath(p: string): string {\n return p.replace(/^\\//, '').replace(/\\./g, '').replace(/[/\\\\]/g, '-');\n}\n\n// ── Shared helpers ────────────────────────────────────────────────────\n\nfunction extractText(content: unknown): string | null {\n if (typeof content === 'string') return content;\n if (Array.isArray(content)) {\n for (const block of content) {\n if (typeof block === 'object' && block !== null) {\n const b = block as Record<string, unknown>;\n if (b.type === 'text' && typeof b.text === 'string') return b.text;\n }\n }\n }\n return null;\n}\n\nconst PREVIEW_READ_BYTES = 8_192; // 8KB is enough for first few messages\n\n// ── Claude Code session scanner ───────────────────────────────────────\n\nasync function collectJsonlFiles(\n projectDir: string\n): Promise<{ name: string; filePath: string; mtime: number }[]> {\n let entries: string[];\n try {\n entries = await readdir(projectDir);\n } catch {\n return [];\n }\n const jsonlFiles = entries.filter((e) => e.endsWith('.jsonl'));\n const fileInfos = await Promise.allSettled(\n jsonlFiles.map(async (name) => {\n const filePath = join(projectDir, name);\n const s = await stat(filePath);\n return { name, filePath, mtime: s.mtime.getTime() };\n })\n );\n return fileInfos\n .filter(\n (r): r is PromiseFulfilledResult<{ name: string; filePath: string; mtime: number }> =>\n r.status === 'fulfilled'\n )\n .map((r) => r.value);\n}\n\nasync function parseClaudeSession(\n filePath: string,\n fileName: string,\n mtime: number,\n repositoryPath: string\n): Promise<SessionResult | null> {\n const { createReadStream } = await import('node:fs');\n const id = fileName.replace('.jsonl', '');\n\n let preview: string | null = null;\n let firstTimestamp: string | null = null;\n let messageCount = 0;\n\n const head = await new Promise<string>((resolve) => {\n const chunks: Buffer[] = [];\n let size = 0;\n const stream = createReadStream(filePath, { end: PREVIEW_READ_BYTES - 1 });\n stream.on('data', (chunk: Buffer) => {\n chunks.push(chunk);\n size += chunk.length;\n });\n stream.on('end', () => resolve(Buffer.concat(chunks, size).toString('utf-8')));\n stream.on('error', () => resolve(''));\n });\n\n if (!head) return null;\n\n const lines = head.split('\\n').filter((l) => l.trim());\n for (const line of lines) {\n try {\n const entry = JSON.parse(line) as {\n type?: string;\n timestamp?: string;\n message?: { role?: string; content?: unknown };\n };\n if (entry.type === 'user' || entry.type === 'assistant') {\n const role = entry.message?.role;\n if (role === 'user' || role === 'assistant') {\n messageCount++;\n if (entry.timestamp) {\n firstTimestamp ??= entry.timestamp;\n }\n if (role === 'user' && preview === null) {\n preview = extractText(entry.message?.content);\n }\n }\n }\n } catch {\n break;\n }\n }\n\n if (messageCount === 0) return null;\n\n const mtimeIso = new Date(mtime).toISOString();\n return {\n id,\n agentType: 'claude-code',\n preview,\n messageCount,\n firstMessageAt: firstTimestamp,\n lastMessageAt: mtimeIso,\n createdAt: firstTimestamp ?? mtimeIso,\n projectPath: repositoryPath,\n filePath,\n _mtime: mtime,\n };\n}\n\nexport async function scanClaudeSessions(\n repositoryPath: string,\n limit: number,\n includeWorktrees = false\n): Promise<SessionResult[]> {\n const dirName = claudeEncodePath(repositoryPath);\n const projectsRoot = join(homedir(), '.claude', 'projects');\n\n const primaryDir = join(projectsRoot, dirName);\n let allFiles = await collectJsonlFiles(primaryDir);\n\n if (includeWorktrees) {\n try {\n const allDirs = await readdir(projectsRoot);\n\n const prefixMatches = allDirs.filter((d) => d !== dirName && d.startsWith(dirName));\n\n const normalizedRepoPath = repositoryPath.replace(/\\\\/g, '/');\n const repoHash = createHash('sha256').update(normalizedRepoPath).digest('hex').slice(0, 16);\n const shipitAiHome = join(homedir(), '.shipit-ai').replace(/\\\\/g, '/');\n const shipitAiWorktreePrefix = claudeEncodePath(join(shipitAiHome, 'repos', repoHash));\n const shipitAiMatches = allDirs.filter(\n (d) => d.startsWith(shipitAiWorktreePrefix) && !prefixMatches.includes(d) && d !== dirName\n );\n\n const worktreeDirs = [...prefixMatches, ...shipitAiMatches];\n const worktreeResults = await Promise.all(\n worktreeDirs.map((d) => collectJsonlFiles(join(projectsRoot, d)))\n );\n for (const files of worktreeResults) {\n allFiles = allFiles.concat(files);\n }\n } catch {\n // projectsRoot doesn't exist — no sessions at all\n }\n }\n\n const valid = allFiles.sort((a, b) => b.mtime - a.mtime).slice(0, limit);\n\n const results = await Promise.allSettled(\n valid.map(async (fi) => parseClaudeSession(fi.filePath, fi.name, fi.mtime, repositoryPath))\n );\n\n return results\n .filter((r): r is PromiseFulfilledResult<SessionResult | null> => r.status === 'fulfilled')\n .map((r) => r.value)\n .filter((s): s is SessionResult => s !== null);\n}\n\n// ── Cursor session scanner ────────────────────────────────────────────\n\nasync function parseCursorSession(\n filePath: string,\n fileName: string,\n mtime: number,\n repositoryPath: string\n): Promise<SessionResult | null> {\n const { createReadStream } = await import('node:fs');\n const id = fileName.replace('.jsonl', '');\n\n const head = await new Promise<string>((resolve) => {\n const chunks: Buffer[] = [];\n let size = 0;\n const stream = createReadStream(filePath, { end: PREVIEW_READ_BYTES - 1 });\n stream.on('data', (chunk: Buffer) => {\n chunks.push(chunk);\n size += chunk.length;\n });\n stream.on('end', () => resolve(Buffer.concat(chunks, size).toString('utf-8')));\n stream.on('error', () => resolve(''));\n });\n\n if (!head) return null;\n\n let preview: string | null = null;\n let messageCount = 0;\n\n const lines = head.split('\\n').filter((l) => l.trim());\n for (const line of lines) {\n try {\n const entry = JSON.parse(line) as {\n role?: string;\n message?: { content?: unknown };\n };\n if (entry.role === 'user' || entry.role === 'assistant') {\n messageCount++;\n if (entry.role === 'user' && preview === null) {\n preview = extractText(entry.message?.content);\n }\n }\n } catch {\n break;\n }\n }\n\n if (messageCount === 0) return null;\n\n const mtimeIso = new Date(mtime).toISOString();\n return {\n id,\n agentType: 'cursor',\n preview,\n messageCount,\n firstMessageAt: mtimeIso,\n lastMessageAt: mtimeIso,\n createdAt: mtimeIso,\n projectPath: repositoryPath,\n filePath,\n _mtime: mtime,\n };\n}\n\nexport async function scanCursorSessions(\n repositoryPath: string,\n limit: number\n): Promise<SessionResult[]> {\n const dirName = cursorEncodePath(repositoryPath);\n const transcriptsDir = join(homedir(), '.cursor', 'projects', dirName, 'agent-transcripts');\n\n let entries: string[];\n try {\n entries = await readdir(transcriptsDir);\n } catch {\n return [];\n }\n\n const fileInfos = await Promise.allSettled(\n entries.map(async (entry) => {\n const entryPath = join(transcriptsDir, entry);\n const s = await stat(entryPath);\n\n if (s.isFile() && entry.endsWith('.jsonl')) {\n return { name: entry, filePath: entryPath, mtime: s.mtime.getTime() };\n }\n\n if (s.isDirectory()) {\n const jsonlPath = join(entryPath, `${entry}.jsonl`);\n try {\n const jsonlStat = await stat(jsonlPath);\n return {\n name: `${entry}.jsonl`,\n filePath: jsonlPath,\n mtime: jsonlStat.mtime.getTime(),\n };\n } catch {\n return null;\n }\n }\n\n return null;\n })\n );\n\n const valid = fileInfos\n .filter(\n (\n r\n ): r is PromiseFulfilledResult<{\n name: string;\n filePath: string;\n mtime: number;\n } | null> => r.status === 'fulfilled'\n )\n .map((r) => r.value)\n .filter((v): v is { name: string; filePath: string; mtime: number } => v !== null)\n .sort((a, b) => b.mtime - a.mtime)\n .slice(0, limit);\n\n const results = await Promise.allSettled(\n valid.map(async (fi) => parseCursorSession(fi.filePath, fi.name, fi.mtime, repositoryPath))\n );\n\n return results\n .filter((r): r is PromiseFulfilledResult<SessionResult | null> => r.status === 'fulfilled')\n .map((r) => r.value)\n .filter((s): s is SessionResult => s !== null);\n}\n\n/**\n * Scan sessions for a single repository path from all providers.\n * Merges and sorts by recency.\n */\nexport async function scanSessionsForPath(\n repositoryPath: string,\n limit: number,\n includeWorktrees = false\n): Promise<SessionResult[]> {\n const [claudeSessions, cursorSessions] = await Promise.all([\n scanClaudeSessions(repositoryPath, limit, includeWorktrees),\n scanCursorSessions(repositoryPath, limit),\n ]);\n\n return [...claudeSessions, ...cursorSessions]\n .sort((a, b) => b._mtime - a._mtime)\n .slice(0, Math.min(limit, 50));\n}\n","import { NextResponse } from 'next/server';\nimport { resolve } from '@/lib/server-container';\nimport { apiError } from '@/lib/api-helpers';\nimport type { ListRepositoriesUseCase } from '@shipit-ai/core/application/use-cases/repositories/list-repositories.use-case';\nimport type { ListFeaturesUseCase } from '@shipit-ai/core/application/use-cases/features/list-features.use-case';\nimport { scanSessionsForPath, type SessionResult } from '@/lib/session-scanner';\n\nexport const dynamic = 'force-dynamic';\n\ntype SessionSummaryFromBatch = Omit<SessionResult, '_mtime'>;\n\nconst SESSIONS_PER_PATH = 5;\n\n// ── Server-side cache ─────────────────────────────────────────────────\n\nconst CACHE_TTL_MS = 30_000;\nlet cache: { data: Record<string, SessionSummaryFromBatch[]>; createdAt: number } | null = null;\n\n// ── Route handler ─────────────────────────────────────────────────────\n\n/**\n * GET /api/sessions-batch\n *\n * No parameters needed — resolves all repos and features from the DI container,\n * scans sessions for each, and returns { sessionsByPath: Record<string, SessionSummary[]> }.\n */\nexport async function GET() {\n // Return cache if fresh\n if (cache && Date.now() - cache.createdAt < CACHE_TTL_MS) {\n return NextResponse.json({ sessionsByPath: cache.data });\n }\n\n try {\n const listRepos = resolve<ListRepositoriesUseCase>('ListRepositoriesUseCase');\n const listFeatures = resolve<ListFeaturesUseCase>('ListFeaturesUseCase');\n\n const [repositories, features] = await Promise.all([\n listRepos.execute(),\n listFeatures.execute({ includeArchived: false }),\n ]);\n\n // Build unique path specs: repos with includeWorktrees, features with their worktree path\n const pathSpecs: { path: string; includeWorktrees: boolean }[] = [];\n const seen = new Set<string>();\n\n for (const repo of repositories) {\n if (repo.path && !seen.has(repo.path)) {\n seen.add(repo.path);\n pathSpecs.push({ path: repo.path, includeWorktrees: true });\n }\n }\n\n for (const feature of features) {\n const sessionPath = feature.worktreePath ?? feature.repositoryPath;\n if (sessionPath && !seen.has(sessionPath)) {\n seen.add(sessionPath);\n pathSpecs.push({ path: sessionPath, includeWorktrees: false });\n }\n }\n\n // Scan all paths in parallel\n const results = await Promise.all(\n pathSpecs.map(async ({ path, includeWorktrees }) => {\n const sessions = await scanSessionsForPath(path, SESSIONS_PER_PATH, includeWorktrees);\n return { path, sessions: sessions.map(({ _mtime, ...s }) => s) };\n })\n );\n\n const sessionsByPath: Record<string, SessionSummaryFromBatch[]> = {};\n for (const { path, sessions } of results) {\n sessionsByPath[path] = sessions;\n }\n\n cache = { data: sessionsByPath, createdAt: Date.now() };\n return NextResponse.json({ sessionsByPath });\n } catch (error) {\n return apiError(500, 'Failed to load sessions', error);\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, setRequestMeta } 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/sessions-batch/route\",\n pathname: \"/api/sessions-batch\",\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/sessions-batch/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\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 (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/sessions-batch/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.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 isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n 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 let parentSpan;\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 // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\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 (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\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), undefined, !isWrappedByNextServer);\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":["CONTAINER_KEY","resolve","token","container","globalThis","Error","apiError","status","publicMessage","internalError","detail","message","String","console","error","json","validateParam","value","paramName","trim","claudeEncodePath","p","replace","cursorEncodePath","extractText","content","Array","isArray","block","b","type","text","PREVIEW_READ_BYTES","collectJsonlFiles","projectDir","entries","jsonlFiles","filter","e","endsWith","fileInfos","Promise","allSettled","map","name","filePath","s","mtime","getTime","r","parseClaudeSession","fileName","repositoryPath","createReadStream","id","preview","firstTimestamp","messageCount","head","chunks","size","stream","end","on","chunk","push","length","Buffer","concat","toString","lines","split","l","line","entry","JSON","parse","role","timestamp","mtimeIso","Date","toISOString","agentType","firstMessageAt","lastMessageAt","createdAt","projectPath","_mtime","scanClaudeSessions","limit","includeWorktrees","dirName","projectsRoot","primaryDir","allFiles","allDirs","prefixMatches","d","startsWith","normalizedRepoPath","repoHash","update","digest","slice","shipitAiHome","shipitAiWorktreePrefix","shipitAiMatches","includes","worktreeDirs","worktreeResults","all","files","valid","sort","a","results","fi","parseCursorSession","scanCursorSessions","transcriptsDir","entryPath","isFile","isDirectory","jsonlPath","jsonlStat","v","scanSessionsForPath","claudeSessions","cursorSessions","Math","min","dynamic","SESSIONS_PER_PATH","CACHE_TTL_MS","cache","repositories","GET","now","sessionsByPath","data","listRepos","listFeatures","features","execute","includeArchived","pathSpecs","seen","Set","repo","path","has","add","sessions","feature","sessionPath","worktreePath"],"mappings":"syCAuBO,SAAoBE,AAAXD,CAAmC,EACjD,IAAME,EAAaC,UAAsC,CAACJ,AAdtC,mBAcoD,CAIxE,GAAI,CAACG,EACH,MAAM,AAAIE,GADI,GAEZ,0FAIJ,OAAOF,EAAUF,OAAO,CAACC,EAC3B,4BCnCA,IAAA,EAAA,EAAA,CAAA,CAAA,yBAOO,SAASI,AACdC,CAAc,CACdC,CAAqB,CACrBC,CAAuB,EAEvB,GAAIA,EAAe,CACjB,IAAMC,EAASD,aAAyBJ,MAAQI,EAAcE,OAAO,CAAGC,OAAOH,GAE/EI,QAAQC,KAAK,CAAC,CAAC,KAAK,EAAEP,EAAO,EAAE,EAAEC,EAAc,EAAE,EAAEE,EAAAA,CAAQ,CAC7D,CACA,OAAO,EAAA,YAAY,CAACK,IAAI,CAAC,CAAED,MAAON,CAAc,EAAG,QAAED,CAAO,EAC9D,4BCXA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAsBA,SAASa,EAAiBC,CAAS,EACjC,OAAOA,EAAEC,OAAO,CAAC,UAAW,IAC9B,CAaA,SAASE,EAAYC,CAAgB,EACnC,GAAuB,UAAnB,OAAOA,EAAsB,OAAOA,EACxC,GAAIC,MAAMC,OAAO,CAACF,IAChB,IAAK,EADqB,EACfG,KAASH,EAClB,GAAqB,GADM,OACvB,OAAOG,GAAgC,MAAM,CAAhBA,GAE3BC,AAAW,WAATC,IAAI,EAAe,AAAkB,iBAAXD,EAAEE,IAAI,CAAe,OA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BAAkB,GACtC,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,GAAiB,OAAW,CAAC,GAE5C,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,GATmB,AAShB,EAAY,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA3TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAA,AAAW,EAAC,kBACf,uBACAiB,CACJ,EACJ","ignoreList":[4]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[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"))},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"))},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"))},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"))},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"))},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"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},24934,e=>{"use strict";var t=e.i(25716);e.s(["apiError",0,function(e,r,a){if(a){let t=a instanceof Error?a.message:String(a);console.error(`[API ${e}] ${r}: ${t}`)}return t.NextResponse.json({error:r},{status:e})}])},55042,e=>{"use strict";var t=e.i(66680),r=e.i(60526),a=e.i(50227),n=e.i(12714);function s(e){return e.replace(/[/\\.]/g,"-")}function i(e){if("string"==typeof e)return e;if(Array.isArray(e)){for(let t of e)if("object"==typeof t&&null!==t&&"text"===t.type&&"string"==typeof t.text)return t.text}return null}async function o(e){let t;try{t=await (0,n.readdir)(e)}catch{return[]}let r=t.filter(e=>e.endsWith(".jsonl"));return(await Promise.allSettled(r.map(async t=>{let r=(0,a.join)(e,t),s=await (0,n.stat)(r);return{name:t,filePath:r,mtime:s.mtime.getTime()}}))).filter(e=>"fulfilled"===e.status).map(e=>e.value)}async function l(t,r,a,n){let{createReadStream:s}=await e.A(6714),o=r.replace(".jsonl",""),l=null,u=null,c=0,d=await new Promise(e=>{let r=[],a=0,n=s(t,{end:8191});n.on("data",e=>{r.push(e),a+=e.length}),n.on("end",()=>e(Buffer.concat(r,a).toString("utf-8"))),n.on("error",()=>e(""))});if(!d)return null;for(let e of d.split("\n").filter(e=>e.trim()))try{let t=JSON.parse(e);if("user"===t.type||"assistant"===t.type){let e=t.message?.role;("user"===e||"assistant"===e)&&(c++,t.timestamp&&(u??=t.timestamp),"user"===e&&null===l&&(l=i(t.message?.content)))}}catch{break}if(0===c)return null;let p=new Date(a).toISOString();return{id:o,agentType:"claude-code",preview:l,messageCount:c,firstMessageAt:u,lastMessageAt:p,createdAt:u??p,projectPath:n,filePath:t,_mtime:a}}async function u(e,i,c=!1){let d=s(e),p=(0,a.join)((0,r.homedir)(),".claude","projects"),m=(0,a.join)(p,d),f=await o(m);if(c)try{let i=await (0,n.readdir)(p),l=i.filter(e=>e!==d&&e.startsWith(d)),u=e.replace(/\\/g,"/"),c=(0,t.createHash)("sha256").update(u).digest("hex").slice(0,16),m=(0,a.join)((0,r.homedir)(),".shipit-ai").replace(/\\/g,"/"),h=s((0,a.join)(m,"repos",c)),x=i.filter(e=>e.startsWith(h)&&!l.includes(e)&&e!==d),g=[...l,...x];for(let e of(await Promise.all(g.map(e=>o((0,a.join)(p,e))))))f=f.concat(e)}catch{}let h=f.sort((e,t)=>t.mtime-e.mtime).slice(0,i);return(await Promise.allSettled(h.map(async t=>l(t.filePath,t.name,t.mtime,e)))).filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>null!==e)}async function c(t,r,a,n){let{createReadStream:s}=await e.A(6714),o=r.replace(".jsonl",""),l=await new Promise(e=>{let r=[],a=0,n=s(t,{end:8191});n.on("data",e=>{r.push(e),a+=e.length}),n.on("end",()=>e(Buffer.concat(r,a).toString("utf-8"))),n.on("error",()=>e(""))});if(!l)return null;let u=null,c=0;for(let e of l.split("\n").filter(e=>e.trim()))try{let t=JSON.parse(e);("user"===t.role||"assistant"===t.role)&&(c++,"user"===t.role&&null===u&&(u=i(t.message?.content)))}catch{break}if(0===c)return null;let d=new Date(a).toISOString();return{id:o,agentType:"cursor",preview:u,messageCount:c,firstMessageAt:d,lastMessageAt:d,createdAt:d,projectPath:n,filePath:t,_mtime:a}}async function d(e,t){let s,i=e.replace(/^\//,"").replace(/\./g,"").replace(/[/\\]/g,"-"),o=(0,a.join)((0,r.homedir)(),".cursor","projects",i,"agent-transcripts");try{s=await (0,n.readdir)(o)}catch{return[]}let l=(await Promise.allSettled(s.map(async e=>{let t=(0,a.join)(o,e),r=await (0,n.stat)(t);if(r.isFile()&&e.endsWith(".jsonl"))return{name:e,filePath:t,mtime:r.mtime.getTime()};if(r.isDirectory()){let r=(0,a.join)(t,`${e}.jsonl`);try{let t=await (0,n.stat)(r);return{name:`${e}.jsonl`,filePath:r,mtime:t.mtime.getTime()}}catch{}}return null}))).filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>null!==e).sort((e,t)=>t.mtime-e.mtime).slice(0,t);return(await Promise.allSettled(l.map(async t=>c(t.filePath,t.name,t.mtime,e)))).filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>null!==e)}async function p(e,t,r=!1){let[a,n]=await Promise.all([u(e,t,r),d(e,t)]);return[...a,...n].sort((e,t)=>t._mtime-e._mtime).slice(0,Math.min(t,50))}e.s(["scanSessionsForPath",0,p])},62588,e=>{"use strict";var t=e.i(29932),r=e.i(88797),a=e.i(78439),n=e.i(21387),s=e.i(351),i=e.i(1286),o=e.i(31060),l=e.i(67760),u=e.i(13435),c=e.i(60316),d=e.i(37130),p=e.i(31516),m=e.i(63144),f=e.i(3719),h=e.i(66941),x=e.i(93695);e.i(76574);var g=e.i(45014),y=e.i(25716),w=e.i(55042),v=e.i(24934);async function R(e){let t=new URL(e.url),r=t.searchParams.get("repositoryPath"),a=parseInt(t.searchParams.get("limit")??"10",10),n="true"===t.searchParams.get("includeWorktrees");if(!r?.trim())return y.NextResponse.json({error:"repositoryPath is required"},{status:400});try{let e=await (0,w.scanSessionsForPath)(r,a,n);return y.NextResponse.json({sessions:e.map(({_mtime:e,...t})=>t)})}catch(e){return(0,v.apiError)(500,"Failed to list sessions",e)}}e.s(["GET",0,R,"dynamic",0,"force-dynamic"],17276);var P=e.i(17276);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/sessions/route",pathname:"/api/sessions",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/sessions/route.ts",nextConfigOutput:"",userland:P,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:j,serverHooks:C}=E;async function S(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/sessions/route";y=y.replace(/\/index$/,"")||"/";let w=await E.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:v,params:R,nextConfig:P,parsedUrl:A,isDraftMode:j,prerenderManifest:C,routerServerContext:S,isOnDemandRevalidate:b,revalidateOnlyGenerated:T,resolvedPathname:N,clientReferenceManifest:_,serverActionsManifest:q}=w,k=(0,o.normalizeAppPath)(y),O=!!(C.dynamicRoutes[k]||C.routes[N]),I=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,A,!1):t.end("This page could not be found"),null);if(O&&!j){let e=!!C.routes[N],t=C.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(P.adapterPath)return await I();throw new x.NoFallbackError}}let M=null;!O||E.isDev||j||(M="/index"===(M=N)?"/":M);let H=!0===E.isDev||!O,U=O&&!H;q&&_&&(0,i.setManifestsSingleton)({page:y,clientReferenceManifest:_,serverActionsManifest:q});let D=e.method||"GET",$=(0,s.getTracer)(),F=$.getActiveScopeSpan(),B=!!(null==S?void 0:S.isWrappedByNextServer),K=!!(0,n.getRequestMeta)(e,"minimalMode"),W=(0,n.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,P,C,K);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let L={params:R,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!P.experimental.authInterrupts},cacheComponents:!!P.cacheComponents,supportsDynamicResponse:H,incrementalCache:W,cacheLifeProfiles:P.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>E.onRequestError(e,t,a,n,S)},sharedContext:{buildId:v}},G=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),X=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t));try{let n,i=async e=>E.handle(X,L).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")!==c.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=`${D} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${D} ${y}`)}),o=async n=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&b&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=L.renderOpts.fetchMetrics;let o=L.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=L.renderOpts.collectedTags;if(!O)return await (0,p.sendResponse)(G,V,s,L.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[h.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,a=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:b})},!1,S),t}},u=await E.handleResponse({req:e,nextConfig:P,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:b,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:K});if(!O)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",b?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),j&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,m.fromNodeOutgoingHttpHeaders)(u.value.headers);return K&&O||c.delete(h.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(G,V,new Response(u.value.body,{headers:c,status:u.value.status||200})),null};B&&F?await o(F):(n=$.getActiveScopeSpan(),await $.withPropagatedContext(e.headers,()=>$.trace(c.BaseServerSpan.handleRequest,{spanName:`${D} ${y}`,kind:s.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},o),void 0,!B))}catch(t){if(t instanceof x.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:b})},!1,S),O)throw t;return await (0,p.sendResponse)(G,V,new Response(null,{status:500})),null}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:j})},"routeModule",0,E,"serverHooks",0,C,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,j],62588)},6714,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_node_fs_0~5d6ws._.js"].map(t=>e.l(t))).then(()=>t(2157)))}];
|
|
1
|
+
module.exports=[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"))},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"))},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"))},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"))},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"))},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"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},24934,e=>{"use strict";var t=e.i(25716);e.s(["apiError",0,function(e,r,a){if(a){let t=a instanceof Error?a.message:String(a);console.error(`[API ${e}] ${r}: ${t}`)}return t.NextResponse.json({error:r},{status:e})}])},55042,e=>{"use strict";var t=e.i(66680),r=e.i(60526),a=e.i(50227),n=e.i(12714);function s(e){return e.replace(/[/\\.]/g,"-")}function i(e){if("string"==typeof e)return e;if(Array.isArray(e)){for(let t of e)if("object"==typeof t&&null!==t&&"text"===t.type&&"string"==typeof t.text)return t.text}return null}async function o(e){let t;try{t=await (0,n.readdir)(e)}catch{return[]}let r=t.filter(e=>e.endsWith(".jsonl"));return(await Promise.allSettled(r.map(async t=>{let r=(0,a.join)(e,t),s=await (0,n.stat)(r);return{name:t,filePath:r,mtime:s.mtime.getTime()}}))).filter(e=>"fulfilled"===e.status).map(e=>e.value)}async function l(t,r,a,n){let{createReadStream:s}=await e.A(6714),o=r.replace(".jsonl",""),l=null,u=null,c=0,d=await new Promise(e=>{let r=[],a=0,n=s(t,{end:8191});n.on("data",e=>{r.push(e),a+=e.length}),n.on("end",()=>e(Buffer.concat(r,a).toString("utf-8"))),n.on("error",()=>e(""))});if(!d)return null;for(let e of d.split("\n").filter(e=>e.trim()))try{let t=JSON.parse(e);if("user"===t.type||"assistant"===t.type){let e=t.message?.role;("user"===e||"assistant"===e)&&(c++,t.timestamp&&(u??=t.timestamp),"user"===e&&null===l&&(l=i(t.message?.content)))}}catch{break}if(0===c)return null;let p=new Date(a).toISOString();return{id:o,agentType:"claude-code",preview:l,messageCount:c,firstMessageAt:u,lastMessageAt:p,createdAt:u??p,projectPath:n,filePath:t,_mtime:a}}async function u(e,i,c=!1){let d=s(e),p=(0,a.join)((0,r.homedir)(),".claude","projects"),m=(0,a.join)(p,d),f=await o(m);if(c)try{let i=await (0,n.readdir)(p),l=i.filter(e=>e!==d&&e.startsWith(d)),u=e.replace(/\\/g,"/"),c=(0,t.createHash)("sha256").update(u).digest("hex").slice(0,16),m=(0,a.join)((0,r.homedir)(),".shipit-ai").replace(/\\/g,"/"),h=s((0,a.join)(m,"repos",c)),x=i.filter(e=>e.startsWith(h)&&!l.includes(e)&&e!==d),g=[...l,...x];for(let e of(await Promise.all(g.map(e=>o((0,a.join)(p,e))))))f=f.concat(e)}catch{}let h=f.sort((e,t)=>t.mtime-e.mtime).slice(0,i);return(await Promise.allSettled(h.map(async t=>l(t.filePath,t.name,t.mtime,e)))).filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>null!==e)}async function c(t,r,a,n){let{createReadStream:s}=await e.A(6714),o=r.replace(".jsonl",""),l=await new Promise(e=>{let r=[],a=0,n=s(t,{end:8191});n.on("data",e=>{r.push(e),a+=e.length}),n.on("end",()=>e(Buffer.concat(r,a).toString("utf-8"))),n.on("error",()=>e(""))});if(!l)return null;let u=null,c=0;for(let e of l.split("\n").filter(e=>e.trim()))try{let t=JSON.parse(e);("user"===t.role||"assistant"===t.role)&&(c++,"user"===t.role&&null===u&&(u=i(t.message?.content)))}catch{break}if(0===c)return null;let d=new Date(a).toISOString();return{id:o,agentType:"cursor",preview:u,messageCount:c,firstMessageAt:d,lastMessageAt:d,createdAt:d,projectPath:n,filePath:t,_mtime:a}}async function d(e,t){let s,i=e.replace(/^\//,"").replace(/\./g,"").replace(/[/\\]/g,"-"),o=(0,a.join)((0,r.homedir)(),".cursor","projects",i,"agent-transcripts");try{s=await (0,n.readdir)(o)}catch{return[]}let l=(await Promise.allSettled(s.map(async e=>{let t=(0,a.join)(o,e),r=await (0,n.stat)(t);if(r.isFile()&&e.endsWith(".jsonl"))return{name:e,filePath:t,mtime:r.mtime.getTime()};if(r.isDirectory()){let r=(0,a.join)(t,`${e}.jsonl`);try{let t=await (0,n.stat)(r);return{name:`${e}.jsonl`,filePath:r,mtime:t.mtime.getTime()}}catch{}}return null}))).filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>null!==e).sort((e,t)=>t.mtime-e.mtime).slice(0,t);return(await Promise.allSettled(l.map(async t=>c(t.filePath,t.name,t.mtime,e)))).filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>null!==e)}async function p(e,t,r=!1){let[a,n]=await Promise.all([u(e,t,r),d(e,t)]);return[...a,...n].sort((e,t)=>t._mtime-e._mtime).slice(0,Math.min(t,50))}e.s(["scanSessionsForPath",0,p])},93351,e=>{"use strict";var t=e.i(29932),r=e.i(88797),a=e.i(78439),n=e.i(21387),s=e.i(351),i=e.i(1286),o=e.i(31060),l=e.i(67760),u=e.i(13435),c=e.i(60316),d=e.i(37130),p=e.i(31516),m=e.i(63144),f=e.i(3719),h=e.i(66941),x=e.i(93695);e.i(76574);var g=e.i(45014),y=e.i(25716),w=e.i(55042),v=e.i(24934);async function R(e){let t=new URL(e.url),r=t.searchParams.get("repositoryPath"),a=parseInt(t.searchParams.get("limit")??"10",10),n="true"===t.searchParams.get("includeWorktrees");if(!r?.trim())return y.NextResponse.json({error:"repositoryPath is required"},{status:400});try{let e=await (0,w.scanSessionsForPath)(r,a,n);return y.NextResponse.json({sessions:e.map(({_mtime:e,...t})=>t)})}catch(e){return(0,v.apiError)(500,"Failed to list sessions",e)}}e.s(["GET",0,R,"dynamic",0,"force-dynamic"],17276);var P=e.i(17276);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/sessions/route",pathname:"/api/sessions",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/sessions/route.ts",nextConfigOutput:"",userland:P,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:j,serverHooks:C}=E;async function S(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),E.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/sessions/route";y=y.replace(/\/index$/,"")||"/";let w=await E.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:v,params:R,nextConfig:P,parsedUrl:A,isDraftMode:j,prerenderManifest:C,routerServerContext:S,isOnDemandRevalidate:b,revalidateOnlyGenerated:T,resolvedPathname:N,clientReferenceManifest:_,serverActionsManifest:q}=w,k=(0,o.normalizeAppPath)(y),O=!!(C.dynamicRoutes[k]||C.routes[N]),I=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,A,!1):t.end("This page could not be found"),null);if(O&&!j){let e=!!C.routes[N],t=C.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(P.adapterPath)return await I();throw new x.NoFallbackError}}let M=null;!O||E.isDev||j||(M="/index"===(M=N)?"/":M);let H=!0===E.isDev||!O,U=O&&!H;q&&_&&(0,i.setManifestsSingleton)({page:y,clientReferenceManifest:_,serverActionsManifest:q});let D=e.method||"GET",$=(0,s.getTracer)(),F=$.getActiveScopeSpan(),B=!!(null==S?void 0:S.isWrappedByNextServer),K=!!(0,n.getRequestMeta)(e,"minimalMode"),W=(0,n.getRequestMeta)(e,"incrementalCache")||await E.getIncrementalCache(e,P,C,K);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let L={params:R,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!P.experimental.authInterrupts},cacheComponents:!!P.cacheComponents,supportsDynamicResponse:H,incrementalCache:W,cacheLifeProfiles:P.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>E.onRequestError(e,t,a,n,S)},sharedContext:{buildId:v}},G=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),X=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t));try{let n,i=async e=>E.handle(X,L).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")!==c.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=`${D} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${D} ${y}`)}),o=async n=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&b&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=L.renderOpts.fetchMetrics;let o=L.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=L.renderOpts.collectedTags;if(!O)return await (0,p.sendResponse)(G,V,s,L.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[h.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,a=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:b})},!1,S),t}},u=await E.handleResponse({req:e,nextConfig:P,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:b,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:K});if(!O)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",b?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),j&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,m.fromNodeOutgoingHttpHeaders)(u.value.headers);return K&&O||c.delete(h.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(G,V,new Response(u.value.body,{headers:c,status:u.value.status||200})),null};B&&F?await o(F):(n=$.getActiveScopeSpan(),await $.withPropagatedContext(e.headers,()=>$.trace(c.BaseServerSpan.handleRequest,{spanName:`${D} ${y}`,kind:s.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},o),void 0,!B))}catch(t){if(t instanceof x.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:b})},!1,S),O)throw t;return await (0,p.sendResponse)(G,V,new Response(null,{status:500})),null}}e.s(["handler",0,S,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:j})},"routeModule",0,E,"serverHooks",0,C,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,j],93351)},6714,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_node_fs_0~5d6ws._.js"].map(t=>e.l(t))).then(()=>t(2157)))}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0_.w-eb._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/presentation/web/lib/api-helpers.ts","../../../../../../src/presentation/web/lib/session-scanner.ts","../../../../../../src/presentation/web/app/api/sessions/route.ts","../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.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":["import { NextResponse } from 'next/server';\n\n/**\n * Create a JSON error response. For 500-level errors, always uses a generic\n * message to prevent internal detail leakage. The actual error is logged\n * server-side for debugging.\n */\nexport function apiError(\n status: number,\n publicMessage: string,\n internalError?: unknown\n): NextResponse {\n if (internalError) {\n const detail = internalError instanceof Error ? internalError.message : String(internalError);\n // eslint-disable-next-line no-console\n console.error(`[API ${status}] ${publicMessage}: ${detail}`);\n }\n return NextResponse.json({ error: publicMessage }, { status });\n}\n\n/**\n * Validate a required query parameter. Returns the trimmed value or an\n * error response.\n */\nexport function validateParam(value: string | null, paramName: string): string | NextResponse {\n if (!value?.trim()) {\n return apiError(400, `${paramName} is required`);\n }\n return value.trim();\n}\n","/**\n * Shared session scanning logic used by both /api/sessions and /api/sessions-batch.\n *\n * Scans Claude Code and Cursor session directories for JSONL session files,\n * parsing headers to extract preview, message count, and timestamps.\n */\n\nimport { createHash } from 'node:crypto';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { readdir, stat } from 'node:fs/promises';\n\nexport interface SessionResult {\n id: string;\n agentType: string;\n preview: string | null;\n messageCount: number;\n firstMessageAt: string | null;\n lastMessageAt: string | null;\n createdAt: string | null;\n projectPath: string;\n filePath: string;\n /** mtime for sorting — not sent to client */\n _mtime: number;\n}\n\n// ── Path encoding helpers ─────────────────────────────────────────────\n\n/**\n * Claude Code encodes paths by replacing '/', '\\', '.' with '-'.\n * e.g. /home/user/.shipit-ai/repos/abc → -home-user--shep-repos-abc\n */\nfunction claudeEncodePath(p: string): string {\n return p.replace(/[/\\\\.]/g, '-');\n}\n\n/**\n * Cursor encodes paths by stripping the leading '/', removing dots,\n * and replacing '/' and '\\' with '-'.\n * e.g. /home/user/.shipit-ai/repos/abc → home-user-shep-repos-abc\n */\nfunction cursorEncodePath(p: string): string {\n return p.replace(/^\\//, '').replace(/\\./g, '').replace(/[/\\\\]/g, '-');\n}\n\n// ── Shared helpers ────────────────────────────────────────────────────\n\nfunction extractText(content: unknown): string | null {\n if (typeof content === 'string') return content;\n if (Array.isArray(content)) {\n for (const block of content) {\n if (typeof block === 'object' && block !== null) {\n const b = block as Record<string, unknown>;\n if (b.type === 'text' && typeof b.text === 'string') return b.text;\n }\n }\n }\n return null;\n}\n\nconst PREVIEW_READ_BYTES = 8_192; // 8KB is enough for first few messages\n\n// ── Claude Code session scanner ───────────────────────────────────────\n\nasync function collectJsonlFiles(\n projectDir: string\n): Promise<{ name: string; filePath: string; mtime: number }[]> {\n let entries: string[];\n try {\n entries = await readdir(projectDir);\n } catch {\n return [];\n }\n const jsonlFiles = entries.filter((e) => e.endsWith('.jsonl'));\n const fileInfos = await Promise.allSettled(\n jsonlFiles.map(async (name) => {\n const filePath = join(projectDir, name);\n const s = await stat(filePath);\n return { name, filePath, mtime: s.mtime.getTime() };\n })\n );\n return fileInfos\n .filter(\n (r): r is PromiseFulfilledResult<{ name: string; filePath: string; mtime: number }> =>\n r.status === 'fulfilled'\n )\n .map((r) => r.value);\n}\n\nasync function parseClaudeSession(\n filePath: string,\n fileName: string,\n mtime: number,\n repositoryPath: string\n): Promise<SessionResult | null> {\n const { createReadStream } = await import('node:fs');\n const id = fileName.replace('.jsonl', '');\n\n let preview: string | null = null;\n let firstTimestamp: string | null = null;\n let messageCount = 0;\n\n const head = await new Promise<string>((resolve) => {\n const chunks: Buffer[] = [];\n let size = 0;\n const stream = createReadStream(filePath, { end: PREVIEW_READ_BYTES - 1 });\n stream.on('data', (chunk: Buffer) => {\n chunks.push(chunk);\n size += chunk.length;\n });\n stream.on('end', () => resolve(Buffer.concat(chunks, size).toString('utf-8')));\n stream.on('error', () => resolve(''));\n });\n\n if (!head) return null;\n\n const lines = head.split('\\n').filter((l) => l.trim());\n for (const line of lines) {\n try {\n const entry = JSON.parse(line) as {\n type?: string;\n timestamp?: string;\n message?: { role?: string; content?: unknown };\n };\n if (entry.type === 'user' || entry.type === 'assistant') {\n const role = entry.message?.role;\n if (role === 'user' || role === 'assistant') {\n messageCount++;\n if (entry.timestamp) {\n firstTimestamp ??= entry.timestamp;\n }\n if (role === 'user' && preview === null) {\n preview = extractText(entry.message?.content);\n }\n }\n }\n } catch {\n break;\n }\n }\n\n if (messageCount === 0) return null;\n\n const mtimeIso = new Date(mtime).toISOString();\n return {\n id,\n agentType: 'claude-code',\n preview,\n messageCount,\n firstMessageAt: firstTimestamp,\n lastMessageAt: mtimeIso,\n createdAt: firstTimestamp ?? mtimeIso,\n projectPath: repositoryPath,\n filePath,\n _mtime: mtime,\n };\n}\n\nexport async function scanClaudeSessions(\n repositoryPath: string,\n limit: number,\n includeWorktrees = false\n): Promise<SessionResult[]> {\n const dirName = claudeEncodePath(repositoryPath);\n const projectsRoot = join(homedir(), '.claude', 'projects');\n\n const primaryDir = join(projectsRoot, dirName);\n let allFiles = await collectJsonlFiles(primaryDir);\n\n if (includeWorktrees) {\n try {\n const allDirs = await readdir(projectsRoot);\n\n const prefixMatches = allDirs.filter((d) => d !== dirName && d.startsWith(dirName));\n\n const normalizedRepoPath = repositoryPath.replace(/\\\\/g, '/');\n const repoHash = createHash('sha256').update(normalizedRepoPath).digest('hex').slice(0, 16);\n const shipitAiHome = join(homedir(), '.shipit-ai').replace(/\\\\/g, '/');\n const shipitAiWorktreePrefix = claudeEncodePath(join(shipitAiHome, 'repos', repoHash));\n const shipitAiMatches = allDirs.filter(\n (d) => d.startsWith(shipitAiWorktreePrefix) && !prefixMatches.includes(d) && d !== dirName\n );\n\n const worktreeDirs = [...prefixMatches, ...shipitAiMatches];\n const worktreeResults = await Promise.all(\n worktreeDirs.map((d) => collectJsonlFiles(join(projectsRoot, d)))\n );\n for (const files of worktreeResults) {\n allFiles = allFiles.concat(files);\n }\n } catch {\n // projectsRoot doesn't exist — no sessions at all\n }\n }\n\n const valid = allFiles.sort((a, b) => b.mtime - a.mtime).slice(0, limit);\n\n const results = await Promise.allSettled(\n valid.map(async (fi) => parseClaudeSession(fi.filePath, fi.name, fi.mtime, repositoryPath))\n );\n\n return results\n .filter((r): r is PromiseFulfilledResult<SessionResult | null> => r.status === 'fulfilled')\n .map((r) => r.value)\n .filter((s): s is SessionResult => s !== null);\n}\n\n// ── Cursor session scanner ────────────────────────────────────────────\n\nasync function parseCursorSession(\n filePath: string,\n fileName: string,\n mtime: number,\n repositoryPath: string\n): Promise<SessionResult | null> {\n const { createReadStream } = await import('node:fs');\n const id = fileName.replace('.jsonl', '');\n\n const head = await new Promise<string>((resolve) => {\n const chunks: Buffer[] = [];\n let size = 0;\n const stream = createReadStream(filePath, { end: PREVIEW_READ_BYTES - 1 });\n stream.on('data', (chunk: Buffer) => {\n chunks.push(chunk);\n size += chunk.length;\n });\n stream.on('end', () => resolve(Buffer.concat(chunks, size).toString('utf-8')));\n stream.on('error', () => resolve(''));\n });\n\n if (!head) return null;\n\n let preview: string | null = null;\n let messageCount = 0;\n\n const lines = head.split('\\n').filter((l) => l.trim());\n for (const line of lines) {\n try {\n const entry = JSON.parse(line) as {\n role?: string;\n message?: { content?: unknown };\n };\n if (entry.role === 'user' || entry.role === 'assistant') {\n messageCount++;\n if (entry.role === 'user' && preview === null) {\n preview = extractText(entry.message?.content);\n }\n }\n } catch {\n break;\n }\n }\n\n if (messageCount === 0) return null;\n\n const mtimeIso = new Date(mtime).toISOString();\n return {\n id,\n agentType: 'cursor',\n preview,\n messageCount,\n firstMessageAt: mtimeIso,\n lastMessageAt: mtimeIso,\n createdAt: mtimeIso,\n projectPath: repositoryPath,\n filePath,\n _mtime: mtime,\n };\n}\n\nexport async function scanCursorSessions(\n repositoryPath: string,\n limit: number\n): Promise<SessionResult[]> {\n const dirName = cursorEncodePath(repositoryPath);\n const transcriptsDir = join(homedir(), '.cursor', 'projects', dirName, 'agent-transcripts');\n\n let entries: string[];\n try {\n entries = await readdir(transcriptsDir);\n } catch {\n return [];\n }\n\n const fileInfos = await Promise.allSettled(\n entries.map(async (entry) => {\n const entryPath = join(transcriptsDir, entry);\n const s = await stat(entryPath);\n\n if (s.isFile() && entry.endsWith('.jsonl')) {\n return { name: entry, filePath: entryPath, mtime: s.mtime.getTime() };\n }\n\n if (s.isDirectory()) {\n const jsonlPath = join(entryPath, `${entry}.jsonl`);\n try {\n const jsonlStat = await stat(jsonlPath);\n return {\n name: `${entry}.jsonl`,\n filePath: jsonlPath,\n mtime: jsonlStat.mtime.getTime(),\n };\n } catch {\n return null;\n }\n }\n\n return null;\n })\n );\n\n const valid = fileInfos\n .filter(\n (\n r\n ): r is PromiseFulfilledResult<{\n name: string;\n filePath: string;\n mtime: number;\n } | null> => r.status === 'fulfilled'\n )\n .map((r) => r.value)\n .filter((v): v is { name: string; filePath: string; mtime: number } => v !== null)\n .sort((a, b) => b.mtime - a.mtime)\n .slice(0, limit);\n\n const results = await Promise.allSettled(\n valid.map(async (fi) => parseCursorSession(fi.filePath, fi.name, fi.mtime, repositoryPath))\n );\n\n return results\n .filter((r): r is PromiseFulfilledResult<SessionResult | null> => r.status === 'fulfilled')\n .map((r) => r.value)\n .filter((s): s is SessionResult => s !== null);\n}\n\n/**\n * Scan sessions for a single repository path from all providers.\n * Merges and sorts by recency.\n */\nexport async function scanSessionsForPath(\n repositoryPath: string,\n limit: number,\n includeWorktrees = false\n): Promise<SessionResult[]> {\n const [claudeSessions, cursorSessions] = await Promise.all([\n scanClaudeSessions(repositoryPath, limit, includeWorktrees),\n scanCursorSessions(repositoryPath, limit),\n ]);\n\n return [...claudeSessions, ...cursorSessions]\n .sort((a, b) => b._mtime - a._mtime)\n .slice(0, Math.min(limit, 50));\n}\n","import { NextResponse } from 'next/server';\nimport { scanSessionsForPath } from '@/lib/session-scanner';\nimport { apiError } from '@/lib/api-helpers';\n\nexport const dynamic = 'force-dynamic';\n\n/**\n * GET /api/sessions?repositoryPath=<path>&limit=<n>\n *\n * Returns agent sessions from all supported providers (Claude Code, Cursor)\n * filtered by repository path, merged and sorted by recency.\n */\nexport async function GET(request: Request) {\n const url = new URL(request.url);\n const repositoryPath = url.searchParams.get('repositoryPath');\n const limit = parseInt(url.searchParams.get('limit') ?? '10', 10);\n const includeWorktrees = url.searchParams.get('includeWorktrees') === 'true';\n\n if (!repositoryPath?.trim()) {\n return NextResponse.json({ error: 'repositoryPath is required' }, { status: 400 });\n }\n\n try {\n const allSessions = await scanSessionsForPath(repositoryPath, limit, includeWorktrees);\n\n return NextResponse.json({\n sessions: allSessions.map(({ _mtime, ...s }) => s),\n });\n } catch (error) {\n return apiError(500, 'Failed to list sessions', error);\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, setRequestMeta } 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/sessions/route\",\n pathname: \"/api/sessions\",\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/sessions/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\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 (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/sessions/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.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 isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n 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 let parentSpan;\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 // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\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 (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\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), undefined, !isWrappedByNextServer);\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":["apiError","status","publicMessage","internalError","detail","Error","message","String","console","error","json","validateParam","value","paramName","trim","claudeEncodePath","p","replace","cursorEncodePath","extractText","content","Array","isArray","block","b","type","text","PREVIEW_READ_BYTES","collectJsonlFiles","projectDir","entries","jsonlFiles","filter","e","endsWith","fileInfos","Promise","allSettled","map","name","filePath","s","mtime","getTime","r","parseClaudeSession","fileName","repositoryPath","createReadStream","id","preview","firstTimestamp","messageCount","head","resolve","chunks","size","stream","end","on","chunk","push","length","Buffer","concat","toString","lines","split","l","line","entry","JSON","parse","role","timestamp","mtimeIso","Date","toISOString","agentType","firstMessageAt","lastMessageAt","createdAt","projectPath","_mtime","scanClaudeSessions","limit","includeWorktrees","dirName","projectsRoot","primaryDir","allFiles","allDirs","prefixMatches","d","startsWith","normalizedRepoPath","repoHash","update","digest","slice","shipitAiHome","shipitAiWorktreePrefix","shipitAiMatches","includes","worktreeDirs","worktreeResults","all","files","valid","sort","a","results","fi","parseCursorSession","scanCursorSessions","transcriptsDir","entryPath","isFile","isDirectory","jsonlPath","jsonlStat","v","scanSessionsForPath","claudeSessions","cursorSessions","Math","min","dynamic","allSessions","GET","request","url","URL","searchParams","get","parseInt","sessions"],"mappings":"qxCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,yBAOO,SACLC,AADcD,CACA,CACdE,CAAqB,CACrBC,CAAuB,EAEvB,GAAIA,EAAe,CACjB,IAAMC,EAASD,aAAyBE,MAAQF,EAAcG,OAAO,CAAGC,OAAOJ,GAE/EK,QAAQC,KAAK,CAAC,CAAC,KAAK,EAAER,EAAO,EAAE,EAAEC,EAAc,EAAE,EAAEE,EAAAA,CAAQ,CAC7D,CACA,OAAO,EAAA,YAAY,CAACM,IAAI,CAAC,CAAED,MAAOP,CAAc,EAAG,QAAED,CAAO,EAC9D,4BCXA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAsBA,SAASc,EAAiBC,CAAS,EACjC,OAAOA,EAAEC,OAAO,CAAC,UAAW,IAC9B,CAaA,SAASE,EAAYC,CAAgB,EACnC,GAAuB,UAAnB,OAAOA,EAAsB,OAAOA,EACxC,GAAIC,MAAMC,OAAO,CAACF,IAChB,IAAK,EADqB,EACfG,KAASH,EAClB,GAAqB,GADM,OACvB,OAAOG,GAAgC,MAAM,CAAhBA,GAE3BC,AAAW,WAATC,IAAI,EAAiC,UAAlB,OAAOD,EAAEE,IAAI,CAAe,OAAOF,AADlDD,EACoDG,IAAI,AAEtE,CAEF,OAAO,IACT,CAMA,eAAeE,EACbC,CAAkB,MAEdC,EACJ,GAAI,CACFA,EAAU,MAAM,CAAA,EAAA,EAAA,OAAA,AAAO,EAACD,EAC1B,CAAE,KAAM,CACN,MAAO,EAAE,AACX,CACA,IAAME,EA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GAAyB,EACzB,MAAM,EAAe,EADgB,EAGrC,EAAa,EAAO,kBAAkB,GACtC,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,GAAiB,OAAW,CAAC,GAE5C,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,mCA3TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAW,AAAX,EAAY,kBACf,uBACA,CACJ,EACJ","ignoreList":[3]}
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/presentation/web/lib/api-helpers.ts","../../../../../../src/presentation/web/lib/session-scanner.ts","../../../../../../src/presentation/web/app/api/sessions/route.ts","../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.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":["import { NextResponse } from 'next/server';\n\n/**\n * Create a JSON error response. For 500-level errors, always uses a generic\n * message to prevent internal detail leakage. The actual error is logged\n * server-side for debugging.\n */\nexport function apiError(\n status: number,\n publicMessage: string,\n internalError?: unknown\n): NextResponse {\n if (internalError) {\n const detail = internalError instanceof Error ? internalError.message : String(internalError);\n // eslint-disable-next-line no-console\n console.error(`[API ${status}] ${publicMessage}: ${detail}`);\n }\n return NextResponse.json({ error: publicMessage }, { status });\n}\n\n/**\n * Validate a required query parameter. Returns the trimmed value or an\n * error response.\n */\nexport function validateParam(value: string | null, paramName: string): string | NextResponse {\n if (!value?.trim()) {\n return apiError(400, `${paramName} is required`);\n }\n return value.trim();\n}\n","/**\n * Shared session scanning logic used by both /api/sessions and /api/sessions-batch.\n *\n * Scans Claude Code and Cursor session directories for JSONL session files,\n * parsing headers to extract preview, message count, and timestamps.\n */\n\nimport { createHash } from 'node:crypto';\nimport { homedir } from 'node:os';\nimport { join } from 'node:path';\nimport { readdir, stat } from 'node:fs/promises';\n\nexport interface SessionResult {\n id: string;\n agentType: string;\n preview: string | null;\n messageCount: number;\n firstMessageAt: string | null;\n lastMessageAt: string | null;\n createdAt: string | null;\n projectPath: string;\n filePath: string;\n /** mtime for sorting — not sent to client */\n _mtime: number;\n}\n\n// ── Path encoding helpers ─────────────────────────────────────────────\n\n/**\n * Claude Code encodes paths by replacing '/', '\\', '.' with '-'.\n * e.g. /home/user/.shipit-ai/repos/abc → -home-user--shipit-ai-repos-abc\n */\nfunction claudeEncodePath(p: string): string {\n return p.replace(/[/\\\\.]/g, '-');\n}\n\n/**\n * Cursor encodes paths by stripping the leading '/', removing dots,\n * and replacing '/' and '\\' with '-'.\n * e.g. /home/user/.shipit-ai/repos/abc → home-user-shipit-ai-repos-abc\n */\nfunction cursorEncodePath(p: string): string {\n return p.replace(/^\\//, '').replace(/\\./g, '').replace(/[/\\\\]/g, '-');\n}\n\n// ── Shared helpers ────────────────────────────────────────────────────\n\nfunction extractText(content: unknown): string | null {\n if (typeof content === 'string') return content;\n if (Array.isArray(content)) {\n for (const block of content) {\n if (typeof block === 'object' && block !== null) {\n const b = block as Record<string, unknown>;\n if (b.type === 'text' && typeof b.text === 'string') return b.text;\n }\n }\n }\n return null;\n}\n\nconst PREVIEW_READ_BYTES = 8_192; // 8KB is enough for first few messages\n\n// ── Claude Code session scanner ───────────────────────────────────────\n\nasync function collectJsonlFiles(\n projectDir: string\n): Promise<{ name: string; filePath: string; mtime: number }[]> {\n let entries: string[];\n try {\n entries = await readdir(projectDir);\n } catch {\n return [];\n }\n const jsonlFiles = entries.filter((e) => e.endsWith('.jsonl'));\n const fileInfos = await Promise.allSettled(\n jsonlFiles.map(async (name) => {\n const filePath = join(projectDir, name);\n const s = await stat(filePath);\n return { name, filePath, mtime: s.mtime.getTime() };\n })\n );\n return fileInfos\n .filter(\n (r): r is PromiseFulfilledResult<{ name: string; filePath: string; mtime: number }> =>\n r.status === 'fulfilled'\n )\n .map((r) => r.value);\n}\n\nasync function parseClaudeSession(\n filePath: string,\n fileName: string,\n mtime: number,\n repositoryPath: string\n): Promise<SessionResult | null> {\n const { createReadStream } = await import('node:fs');\n const id = fileName.replace('.jsonl', '');\n\n let preview: string | null = null;\n let firstTimestamp: string | null = null;\n let messageCount = 0;\n\n const head = await new Promise<string>((resolve) => {\n const chunks: Buffer[] = [];\n let size = 0;\n const stream = createReadStream(filePath, { end: PREVIEW_READ_BYTES - 1 });\n stream.on('data', (chunk: Buffer) => {\n chunks.push(chunk);\n size += chunk.length;\n });\n stream.on('end', () => resolve(Buffer.concat(chunks, size).toString('utf-8')));\n stream.on('error', () => resolve(''));\n });\n\n if (!head) return null;\n\n const lines = head.split('\\n').filter((l) => l.trim());\n for (const line of lines) {\n try {\n const entry = JSON.parse(line) as {\n type?: string;\n timestamp?: string;\n message?: { role?: string; content?: unknown };\n };\n if (entry.type === 'user' || entry.type === 'assistant') {\n const role = entry.message?.role;\n if (role === 'user' || role === 'assistant') {\n messageCount++;\n if (entry.timestamp) {\n firstTimestamp ??= entry.timestamp;\n }\n if (role === 'user' && preview === null) {\n preview = extractText(entry.message?.content);\n }\n }\n }\n } catch {\n break;\n }\n }\n\n if (messageCount === 0) return null;\n\n const mtimeIso = new Date(mtime).toISOString();\n return {\n id,\n agentType: 'claude-code',\n preview,\n messageCount,\n firstMessageAt: firstTimestamp,\n lastMessageAt: mtimeIso,\n createdAt: firstTimestamp ?? mtimeIso,\n projectPath: repositoryPath,\n filePath,\n _mtime: mtime,\n };\n}\n\nexport async function scanClaudeSessions(\n repositoryPath: string,\n limit: number,\n includeWorktrees = false\n): Promise<SessionResult[]> {\n const dirName = claudeEncodePath(repositoryPath);\n const projectsRoot = join(homedir(), '.claude', 'projects');\n\n const primaryDir = join(projectsRoot, dirName);\n let allFiles = await collectJsonlFiles(primaryDir);\n\n if (includeWorktrees) {\n try {\n const allDirs = await readdir(projectsRoot);\n\n const prefixMatches = allDirs.filter((d) => d !== dirName && d.startsWith(dirName));\n\n const normalizedRepoPath = repositoryPath.replace(/\\\\/g, '/');\n const repoHash = createHash('sha256').update(normalizedRepoPath).digest('hex').slice(0, 16);\n const shipitAiHome = join(homedir(), '.shipit-ai').replace(/\\\\/g, '/');\n const shipitAiWorktreePrefix = claudeEncodePath(join(shipitAiHome, 'repos', repoHash));\n const shipitAiMatches = allDirs.filter(\n (d) => d.startsWith(shipitAiWorktreePrefix) && !prefixMatches.includes(d) && d !== dirName\n );\n\n const worktreeDirs = [...prefixMatches, ...shipitAiMatches];\n const worktreeResults = await Promise.all(\n worktreeDirs.map((d) => collectJsonlFiles(join(projectsRoot, d)))\n );\n for (const files of worktreeResults) {\n allFiles = allFiles.concat(files);\n }\n } catch {\n // projectsRoot doesn't exist — no sessions at all\n }\n }\n\n const valid = allFiles.sort((a, b) => b.mtime - a.mtime).slice(0, limit);\n\n const results = await Promise.allSettled(\n valid.map(async (fi) => parseClaudeSession(fi.filePath, fi.name, fi.mtime, repositoryPath))\n );\n\n return results\n .filter((r): r is PromiseFulfilledResult<SessionResult | null> => r.status === 'fulfilled')\n .map((r) => r.value)\n .filter((s): s is SessionResult => s !== null);\n}\n\n// ── Cursor session scanner ────────────────────────────────────────────\n\nasync function parseCursorSession(\n filePath: string,\n fileName: string,\n mtime: number,\n repositoryPath: string\n): Promise<SessionResult | null> {\n const { createReadStream } = await import('node:fs');\n const id = fileName.replace('.jsonl', '');\n\n const head = await new Promise<string>((resolve) => {\n const chunks: Buffer[] = [];\n let size = 0;\n const stream = createReadStream(filePath, { end: PREVIEW_READ_BYTES - 1 });\n stream.on('data', (chunk: Buffer) => {\n chunks.push(chunk);\n size += chunk.length;\n });\n stream.on('end', () => resolve(Buffer.concat(chunks, size).toString('utf-8')));\n stream.on('error', () => resolve(''));\n });\n\n if (!head) return null;\n\n let preview: string | null = null;\n let messageCount = 0;\n\n const lines = head.split('\\n').filter((l) => l.trim());\n for (const line of lines) {\n try {\n const entry = JSON.parse(line) as {\n role?: string;\n message?: { content?: unknown };\n };\n if (entry.role === 'user' || entry.role === 'assistant') {\n messageCount++;\n if (entry.role === 'user' && preview === null) {\n preview = extractText(entry.message?.content);\n }\n }\n } catch {\n break;\n }\n }\n\n if (messageCount === 0) return null;\n\n const mtimeIso = new Date(mtime).toISOString();\n return {\n id,\n agentType: 'cursor',\n preview,\n messageCount,\n firstMessageAt: mtimeIso,\n lastMessageAt: mtimeIso,\n createdAt: mtimeIso,\n projectPath: repositoryPath,\n filePath,\n _mtime: mtime,\n };\n}\n\nexport async function scanCursorSessions(\n repositoryPath: string,\n limit: number\n): Promise<SessionResult[]> {\n const dirName = cursorEncodePath(repositoryPath);\n const transcriptsDir = join(homedir(), '.cursor', 'projects', dirName, 'agent-transcripts');\n\n let entries: string[];\n try {\n entries = await readdir(transcriptsDir);\n } catch {\n return [];\n }\n\n const fileInfos = await Promise.allSettled(\n entries.map(async (entry) => {\n const entryPath = join(transcriptsDir, entry);\n const s = await stat(entryPath);\n\n if (s.isFile() && entry.endsWith('.jsonl')) {\n return { name: entry, filePath: entryPath, mtime: s.mtime.getTime() };\n }\n\n if (s.isDirectory()) {\n const jsonlPath = join(entryPath, `${entry}.jsonl`);\n try {\n const jsonlStat = await stat(jsonlPath);\n return {\n name: `${entry}.jsonl`,\n filePath: jsonlPath,\n mtime: jsonlStat.mtime.getTime(),\n };\n } catch {\n return null;\n }\n }\n\n return null;\n })\n );\n\n const valid = fileInfos\n .filter(\n (\n r\n ): r is PromiseFulfilledResult<{\n name: string;\n filePath: string;\n mtime: number;\n } | null> => r.status === 'fulfilled'\n )\n .map((r) => r.value)\n .filter((v): v is { name: string; filePath: string; mtime: number } => v !== null)\n .sort((a, b) => b.mtime - a.mtime)\n .slice(0, limit);\n\n const results = await Promise.allSettled(\n valid.map(async (fi) => parseCursorSession(fi.filePath, fi.name, fi.mtime, repositoryPath))\n );\n\n return results\n .filter((r): r is PromiseFulfilledResult<SessionResult | null> => r.status === 'fulfilled')\n .map((r) => r.value)\n .filter((s): s is SessionResult => s !== null);\n}\n\n/**\n * Scan sessions for a single repository path from all providers.\n * Merges and sorts by recency.\n */\nexport async function scanSessionsForPath(\n repositoryPath: string,\n limit: number,\n includeWorktrees = false\n): Promise<SessionResult[]> {\n const [claudeSessions, cursorSessions] = await Promise.all([\n scanClaudeSessions(repositoryPath, limit, includeWorktrees),\n scanCursorSessions(repositoryPath, limit),\n ]);\n\n return [...claudeSessions, ...cursorSessions]\n .sort((a, b) => b._mtime - a._mtime)\n .slice(0, Math.min(limit, 50));\n}\n","import { NextResponse } from 'next/server';\nimport { scanSessionsForPath } from '@/lib/session-scanner';\nimport { apiError } from '@/lib/api-helpers';\n\nexport const dynamic = 'force-dynamic';\n\n/**\n * GET /api/sessions?repositoryPath=<path>&limit=<n>\n *\n * Returns agent sessions from all supported providers (Claude Code, Cursor)\n * filtered by repository path, merged and sorted by recency.\n */\nexport async function GET(request: Request) {\n const url = new URL(request.url);\n const repositoryPath = url.searchParams.get('repositoryPath');\n const limit = parseInt(url.searchParams.get('limit') ?? '10', 10);\n const includeWorktrees = url.searchParams.get('includeWorktrees') === 'true';\n\n if (!repositoryPath?.trim()) {\n return NextResponse.json({ error: 'repositoryPath is required' }, { status: 400 });\n }\n\n try {\n const allSessions = await scanSessionsForPath(repositoryPath, limit, includeWorktrees);\n\n return NextResponse.json({\n sessions: allSessions.map(({ _mtime, ...s }) => s),\n });\n } catch (error) {\n return apiError(500, 'Failed to list sessions', error);\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, setRequestMeta } 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/sessions/route\",\n pathname: \"/api/sessions\",\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/sessions/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\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 (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/sessions/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.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 isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n 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 let parentSpan;\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 // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\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 (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\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), undefined, !isWrappedByNextServer);\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":["apiError","status","publicMessage","internalError","detail","Error","message","String","console","error","json","validateParam","value","paramName","trim","claudeEncodePath","p","replace","cursorEncodePath","extractText","content","Array","isArray","block","b","type","text","PREVIEW_READ_BYTES","collectJsonlFiles","projectDir","entries","jsonlFiles","filter","e","endsWith","fileInfos","Promise","allSettled","map","name","filePath","s","mtime","getTime","r","parseClaudeSession","fileName","repositoryPath","createReadStream","id","preview","firstTimestamp","messageCount","head","resolve","chunks","size","stream","end","on","chunk","push","length","Buffer","concat","toString","lines","split","l","line","entry","JSON","parse","role","timestamp","mtimeIso","Date","toISOString","agentType","firstMessageAt","lastMessageAt","createdAt","projectPath","_mtime","scanClaudeSessions","limit","includeWorktrees","dirName","projectsRoot","primaryDir","allFiles","allDirs","prefixMatches","d","startsWith","normalizedRepoPath","repoHash","update","digest","slice","shipitAiHome","shipitAiWorktreePrefix","shipitAiMatches","includes","worktreeDirs","worktreeResults","all","files","valid","sort","a","results","fi","parseCursorSession","scanCursorSessions","transcriptsDir","entryPath","isFile","isDirectory","jsonlPath","jsonlStat","v","scanSessionsForPath","claudeSessions","cursorSessions","Math","min","dynamic","allSessions","GET","request","url","URL","searchParams","get","parseInt","sessions"],"mappings":"qxCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,yBAOO,SACLC,AADcD,CACA,CACdE,CAAqB,CACrBC,CAAuB,EAEvB,GAAIA,EAAe,CACjB,IAAMC,EAASD,aAAyBE,MAAQF,EAAcG,OAAO,CAAGC,OAAOJ,GAE/EK,QAAQC,KAAK,CAAC,CAAC,KAAK,EAAER,EAAO,EAAE,EAAEC,EAAc,EAAE,EAAEE,EAAAA,CAAQ,CAC7D,CACA,OAAO,EAAA,YAAY,CAACM,IAAI,CAAC,CAAED,MAAOP,CAAc,EAAG,QAAED,CAAO,EAC9D,4BCXA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAsBA,SAASc,EAAiBC,CAAS,EACjC,OAAOA,EAAEC,OAAO,CAAC,UAAW,IAC9B,CAaA,SAASE,EAAYC,CAAgB,EACnC,GAAuB,UAAnB,OAAOA,EAAsB,OAAOA,EACxC,GAAIC,MAAMC,OAAO,CAACF,IAChB,IAAK,EADqB,EACfG,KAASH,EAClB,GAAqB,GADM,OACvB,OAAOG,GAAgC,MAAM,CAAhBA,GAE3BC,AAAW,WAATC,IAAI,EAAiC,UAAlB,OAAOD,EAAEE,IAAI,CAAe,OAAOF,AADlDD,EACoDG,IAAI,AAEtE,CAEF,OAAO,IACT,CAMA,eAAeE,EACbC,CAAkB,MAEdC,EACJ,GAAI,CACFA,EAAU,MAAM,CAAA,EAAA,EAAA,OAAA,AAAO,EAACD,EAC1B,CAAE,KAAM,CACN,MAAO,EAAE,AACX,C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