@shepai/cli 1.124.0-pr396.2dd2ae6 → 1.124.0-pr401.74b2155
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/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +5 -68
- package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.js +4 -6
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +0 -15
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +0 -6
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +0 -125
- 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 +1 -2
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.js +20 -3
- package/dist/src/presentation/web/components/common/feature-drawer/use-feature-actions.d.ts +0 -4
- package/dist/src/presentation/web/components/common/feature-drawer/use-feature-actions.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer/use-feature-actions.js +1 -32
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts +1 -4
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +2 -2
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts +1 -4
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +3 -8
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts +0 -6
- 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 +0 -30
- 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 +0 -3
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.js +20 -3
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.d.ts +5 -0
- 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-drawer.stories.js +38 -9
- package/dist/src/presentation/web/components/common/repository-node/repository-node.js +1 -1
- package/dist/src/presentation/web/components/common/repository-node/use-repository-actions.d.ts +0 -4
- package/dist/src/presentation/web/components/common/repository-node/use-repository-actions.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/use-repository-actions.js +0 -11
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +44 -59
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +56 -86
- 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/server-reference-manifest.json +56 -86
- 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]/page/server-reference-manifest.json +40 -55
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
- 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)/create/page/server-reference-manifest.json +44 -59
- package/web/.next/server/app/(dashboard)/create/page.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +56 -86
- 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/server-reference-manifest.json +56 -86
- 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/server-reference-manifest.json +40 -55
- package/web/.next/server/app/(dashboard)/page.js +1 -1
- 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]/page/server-reference-manifest.json +40 -55
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
- 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.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/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/settings/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js +3 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js.map +1 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js +3 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__14664e9b._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__14664e9b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7cbda1ea._.js +3 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__a32640a5._.js.map → [root-of-the-server]__7cbda1ea._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9e8b25ad._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9e8b25ad._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aed1d6f8._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aed1d6f8._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ce6057f6._.js +3 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__7a715c73._.js.map → [root-of-the-server]__ce6057f6._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_109ee019._.js +3 -0
- package/web/.next/server/chunks/ssr/_109ee019._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
- package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_2f6f48b8._.js +1 -1
- package/web/.next/server/chunks/ssr/_2f6f48b8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_5d43c3db._.js +3 -0
- package/web/.next/server/chunks/ssr/_5d43c3db._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_a161be0a._.js +3 -0
- package/web/.next/server/chunks/ssr/_a161be0a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_e2638d5f._.js → _b86eec90._.js} +2 -2
- package/web/.next/server/chunks/ssr/_b86eec90._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
- package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_f1a649e3._.js → _f605354c._.js} +3 -3
- package/web/.next/server/chunks/ssr/_f605354c._.js.map +1 -0
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_70f6d54e._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_70f6d54e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{403f9_next_d6c8d28d._.js → node_modules__pnpm_f9ac7604._.js} +2 -2
- package/web/.next/server/chunks/ssr/node_modules__pnpm_f9ac7604._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js +5 -0
- package/web/.next/server/chunks/ssr/{src_presentation_web_e4e3c09b._.js.map → src_presentation_web_5f039db1._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js +5 -0
- package/web/.next/server/chunks/ssr/{src_presentation_web_d1d40a09._.js.map → src_presentation_web_c4337169._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +250 -357
- package/web/.next/static/chunks/{77304c4f9c5bb158.js → 15e868c5ed24e68d.js} +1 -1
- package/web/.next/static/chunks/1dd878b6feb55d2e.js +1 -0
- package/web/.next/static/chunks/44f74b62f897f41c.css +1 -0
- package/web/.next/static/chunks/{8b87caa5e8e72539.js → 683f1449a7acbe69.js} +2 -2
- package/web/.next/static/chunks/{11fbcb908d07e234.js → 8f09849a5cb49bc8.js} +1 -1
- package/web/.next/static/chunks/{cd008e10baaeae9a.js → 94861aa7270facbd.js} +1 -1
- package/web/.next/static/chunks/a09c0c629f88ee12.js +1 -0
- package/web/.next/static/chunks/a7231c3b616020d8.js +2 -0
- package/web/.next/static/chunks/c4e46fbe479ebd88.js +11 -0
- package/web/.next/static/chunks/{9b7dbb75030aac3e.js → e39cee9f73d1fda2.js} +1 -1
- package/web/.next/static/chunks/{db8d50abcf46d8b3.js → efb06f2eab920f11.js} +1 -1
- package/web/.next/static/chunks/{80f9e0cade7d717b.js → fb8b8be474a3e2b5.js} +1 -1
- package/web/.next/static/chunks/{4443ee9c7733399b.js → ffcc006639ba2fd8.js} +1 -1
- package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.d.ts +0 -28
- package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.d.ts.map +0 -1
- package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.js +0 -81
- package/dist/packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.d.ts +0 -16
- package/dist/packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.d.ts.map +0 -1
- package/dist/packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.js +0 -43
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.d.ts +0 -35
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.js +0 -66
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.d.ts +0 -42
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.js +0 -169
- package/dist/src/presentation/web/app/actions/rebase-feature.d.ts +0 -5
- package/dist/src/presentation/web/app/actions/rebase-feature.d.ts.map +0 -1
- package/dist/src/presentation/web/app/actions/rebase-feature.js +0 -16
- package/dist/src/presentation/web/app/actions/sync-repository.d.ts +0 -5
- package/dist/src/presentation/web/app/actions/sync-repository.d.ts.map +0 -1
- package/dist/src/presentation/web/app/actions/sync-repository.js +0 -16
- package/web/.next/server/chunks/ssr/403f9_next_d6c8d28d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_9efdd752.js +0 -3
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_9efdd752.js.map +0 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_6ce19942.js +0 -3
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_6ce19942.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__16a547fc._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__16a547fc._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7a715c73._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a32640a5._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c94704d6._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c94704d6._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_966c4532._.js +0 -3
- package/web/.next/server/chunks/ssr/_966c4532._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e2638d5f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e9703421._.js +0 -3
- package/web/.next/server/chunks/ssr/_e9703421._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_f1a649e3._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_bc66dcc6._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_bc66dcc6._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_883074bc.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_883074bc.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_d1d40a09._.js +0 -5
- package/web/.next/server/chunks/ssr/src_presentation_web_e4e3c09b._.js +0 -5
- package/web/.next/server/chunks/ssr/src_presentation_web_f6b57368._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_f6b57368._.js.map +0 -1
- package/web/.next/static/chunks/0a25d970e4abd189.js +0 -1
- package/web/.next/static/chunks/3925626b99dcd57a.css +0 -1
- package/web/.next/static/chunks/4b51f8f4e49665b8.js +0 -1
- package/web/.next/static/chunks/513b719e49ca003a.js +0 -11
- package/web/.next/static/chunks/d71ce7044ed5a85a.js +0 -2
- /package/web/.next/static/{MpP2wa-zjPqcZxmpuDBjj → FEBom5Y7caLa2hXBqPiA-}/_buildManifest.js +0 -0
- /package/web/.next/static/{MpP2wa-zjPqcZxmpuDBjj → FEBom5Y7caLa2hXBqPiA-}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{MpP2wa-zjPqcZxmpuDBjj → FEBom5Y7caLa2hXBqPiA-}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},81846,e=>{"use strict";var t=e.i(20314),s=e.i(94237),r=e.i(31777);let a=(0,s.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:s,...i}){return(0,t.jsx)("div",{className:(0,r.cn)(a({variant:s}),e),...i})}e.s(["Badge",()=>i])},95230,e=>{"use strict";let t=(0,e.i(3645).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["default",()=>t])},68304,e=>{"use strict";var t=e.i(20314),s=e.i(79054),r=e.i(91967),a=e.i(22528),i=e.i(51080),l=e.i(85995),n=e.i(87620),o=e.i(66033),c=e.i(36589),d=e.i(13123),u="Tabs",[m,f]=(0,a.createContextScope)(u,[i.createRovingFocusGroupScope]),h=(0,i.createRovingFocusGroupScope)(),[x,p]=m(u),g=s.forwardRef((e,s)=>{let{__scopeTabs:r,value:a,onValueChange:i,defaultValue:l,orientation:m="horizontal",dir:f,activationMode:h="automatic",...p}=e,g=(0,o.useDirection)(f),[v,b]=(0,c.useControllableState)({prop:a,onChange:i,defaultProp:l??"",caller:u});return(0,t.jsx)(x,{scope:r,baseId:(0,d.useId)(),value:v,onValueChange:b,orientation:m,dir:g,activationMode:h,children:(0,t.jsx)(n.Primitive.div,{dir:g,"data-orientation":m,...p,ref:s})})});g.displayName=u;var v="TabsList",b=s.forwardRef((e,s)=>{let{__scopeTabs:r,loop:a=!0,...l}=e,o=p(v,r),c=h(r);return(0,t.jsx)(i.Root,{asChild:!0,...c,orientation:o.orientation,dir:o.dir,loop:a,children:(0,t.jsx)(n.Primitive.div,{role:"tablist","aria-orientation":o.orientation,...l,ref:s})})});b.displayName=v;var y="TabsTrigger",j=s.forwardRef((e,s)=>{let{__scopeTabs:a,value:l,disabled:o=!1,...c}=e,d=p(y,a),u=h(a),m=N(d.baseId,l),f=C(d.baseId,l),x=l===d.value;return(0,t.jsx)(i.Item,{asChild:!0,...u,focusable:!o,active:x,children:(0,t.jsx)(n.Primitive.button,{type:"button",role:"tab","aria-selected":x,"aria-controls":f,"data-state":x?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:m,...c,ref:s,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(l)}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(l)}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;x||o||!e||d.onValueChange(l)})})})});j.displayName=y;var k="TabsContent",w=s.forwardRef((e,r)=>{let{__scopeTabs:a,value:i,forceMount:o,children:c,...d}=e,u=p(k,a),m=N(u.baseId,i),f=C(u.baseId,i),h=i===u.value,x=s.useRef(h);return s.useEffect(()=>{let e=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(l.Presence,{present:o||h,children:({present:s})=>(0,t.jsx)(n.Primitive.div,{"data-state":h?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":m,hidden:!s,id:f,tabIndex:0,...d,ref:r,style:{...e.style,animationDuration:x.current?"0s":void 0},children:s&&c})})});function N(e,t){return`${e}-trigger-${t}`}function C(e,t){return`${e}-content-${t}`}w.displayName=k,e.s(["Content",()=>w,"List",()=>b,"Root",()=>g,"Tabs",()=>g,"TabsContent",()=>w,"TabsList",()=>b,"TabsTrigger",()=>j,"Trigger",()=>j,"createTabsScope",()=>f],43133);var T=e.i(43133),T=T,R=e.i(31777);let S=T.Root,I=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)(T.List,{ref:r,className:(0,R.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...s}));I.displayName=T.List.displayName;let A=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)(T.Trigger,{ref:r,className:(0,R.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...s}));A.displayName=T.Trigger.displayName;let z=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)(T.Content,{ref:r,className:(0,R.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...s}));z.displayName=T.Content.displayName,e.s(["Tabs",()=>S,"TabsContent",()=>z,"TabsList",()=>I,"TabsTrigger",()=>A],68304)},95812,35e3,e=>{"use strict";let t=(0,e.i(3645).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",()=>t],95812);var s=e.i(80986);e.s(["CheckCircle2",()=>s.default],35e3)},33548,e=>{"use strict";let t=(0,e.i(3645).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],33548)},51080,e=>{"use strict";var t=e.i(79054),s=e.i(91967),r=e.i(87342),a=e.i(5978),i=e.i(22528),l=e.i(13123),n=e.i(87620),o=e.i(29297),c=e.i(36589),d=e.i(66033),u=e.i(20314),m="rovingFocusGroup.onEntryFocus",f={bubbles:!1,cancelable:!0},h="RovingFocusGroup",[x,p,g]=(0,r.createCollection)(h),[v,b]=(0,i.createContextScope)(h,[g]),[y,j]=v(h),k=t.forwardRef((e,t)=>(0,u.jsx)(x.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(x.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(w,{...e,ref:t})})}));k.displayName=h;var w=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,orientation:l,loop:x=!1,dir:g,currentTabStopId:v,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:j,onEntryFocus:k,preventScrollOnEntryFocus:w=!1,...N}=e,C=t.useRef(null),T=(0,a.useComposedRefs)(r,C),S=(0,d.useDirection)(g),[I,A]=(0,c.useControllableState)({prop:v,defaultProp:b??null,onChange:j,caller:h}),[z,E]=t.useState(!1),M=(0,o.useCallbackRef)(k),D=p(i),L=t.useRef(!1),[F,P]=t.useState(0);return t.useEffect(()=>{let e=C.current;if(e)return e.addEventListener(m,M),()=>e.removeEventListener(m,M)},[M]),(0,u.jsx)(y,{scope:i,orientation:l,dir:S,loop:x,currentTabStopId:I,onItemFocus:t.useCallback(e=>A(e),[A]),onItemShiftTab:t.useCallback(()=>E(!0),[]),onFocusableItemAdd:t.useCallback(()=>P(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>P(e=>e-1),[]),children:(0,u.jsx)(n.Primitive.div,{tabIndex:z||0===F?-1:0,"data-orientation":l,...N,ref:T,style:{outline:"none",...e.style},onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,()=>{L.current=!0}),onFocus:(0,s.composeEventHandlers)(e.onFocus,e=>{let t=!L.current;if(e.target===e.currentTarget&&t&&!z){let t=new CustomEvent(m,f);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=D().filter(e=>e.focusable);R([e.find(e=>e.active),e.find(e=>e.id===I),...e].filter(Boolean).map(e=>e.ref.current),w)}}L.current=!1}),onBlur:(0,s.composeEventHandlers)(e.onBlur,()=>E(!1))})})}),N="RovingFocusGroupItem",C=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:a,focusable:i=!0,active:o=!1,tabStopId:c,children:d,...m}=e,f=(0,l.useId)(),h=c||f,g=j(N,a),v=g.currentTabStopId===h,b=p(a),{onFocusableItemAdd:y,onFocusableItemRemove:k,currentTabStopId:w}=g;return t.useEffect(()=>{if(i)return y(),()=>k()},[i,y,k]),(0,u.jsx)(x.ItemSlot,{scope:a,id:h,focusable:i,active:o,children:(0,u.jsx)(n.Primitive.span,{tabIndex:v?0:-1,"data-orientation":g.orientation,...m,ref:r,onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,e=>{i?g.onItemFocus(h):e.preventDefault()}),onFocus:(0,s.composeEventHandlers)(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void g.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,s){var r;let a=(r=e.key,"rtl"!==s?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(a))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)))return T[a]}(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=b().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){var s,r;"prev"===t&&a.reverse();let i=a.indexOf(e.currentTarget);a=g.loop?(s=a,r=i+1,s.map((e,t)=>s[(r+t)%s.length])):a.slice(i+1)}setTimeout(()=>R(a))}}),children:"function"==typeof d?d({isCurrentTabStop:v,hasTabStop:null!=w}):d})})});C.displayName=N;var T={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function R(e,t=!1){let s=document.activeElement;for(let r of e)if(r===s||(r.focus({preventScroll:t}),document.activeElement!==s))return}e.s(["Item",()=>C,"Root",()=>k,"createRovingFocusGroupScope",()=>b])},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},23925,1012,e=>{"use strict";let t=(0,e.i(3645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],1012),e.s(["Check",()=>t],23925)},87342,e=>{"use strict";var t=e.i(79054),s=e.i(22528),r=e.i(5978),a=e.i(86874),i=e.i(20314);function l(e){let l=e+"CollectionProvider",[n,o]=(0,s.createContextScope)(l),[c,d]=n(l,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:s,children:r}=e,a=t.default.useRef(null),l=t.default.useRef(new Map).current;return(0,i.jsx)(c,{scope:s,itemMap:l,collectionRef:a,children:r})};u.displayName=l;let m=e+"CollectionSlot",f=(0,a.createSlot)(m),h=t.default.forwardRef((e,t)=>{let{scope:s,children:a}=e,l=d(m,s),n=(0,r.useComposedRefs)(t,l.collectionRef);return(0,i.jsx)(f,{ref:n,children:a})});h.displayName=m;let x=e+"CollectionItemSlot",p="data-radix-collection-item",g=(0,a.createSlot)(x),v=t.default.forwardRef((e,s)=>{let{scope:a,children:l,...n}=e,o=t.default.useRef(null),c=(0,r.useComposedRefs)(s,o),u=d(x,a);return t.default.useEffect(()=>(u.itemMap.set(o,{ref:o,...n}),()=>void u.itemMap.delete(o))),(0,i.jsx)(g,{...{[p]:""},ref:c,children:l})});return v.displayName=x,[{Provider:u,Slot:h,ItemSlot:v},function(s){let r=d(e+"CollectionConsumer",s);return t.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(r.itemMap.values()).sort((e,s)=>t.indexOf(e.ref.current)-t.indexOf(s.ref.current))},[r.collectionRef,r.itemMap])},o]}var n=new WeakMap;function o(e,t){var s,r;let a,i,l;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=(s=e,r=t,a=s.length,(l=(i=c(r))>=0?i:a+i)<0||l>=a?-1:l);return -1===n?void 0:e[n]}function c(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],n.set(this,!0)}set(e,t){return n.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,s){let r,a=this.has(t),i=this.#e.length,l=c(e),n=l>=0?l:i+l,o=n<0||n>=i?-1:n;if(o===this.size||a&&o===this.size-1||-1===o)return this.set(t,s),this;let d=this.size+ +!a;l<0&&n++;let u=[...this.#e],m=!1;for(let e=n;e<d;e++)if(n===e){let i=u[e];u[e]===t&&(i=u[e+1]),a&&this.delete(t),r=this.get(i),this.set(t,s)}else{m||u[e-1]!==t||(m=!0);let s=u[m?e:e-1],a=r;r=this.get(s),this.delete(s),this.set(s,a)}return this}with(t,s,r){let a=new e(this);return a.insert(t,s,r),a}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,s){let r=this.#e.indexOf(e);return -1===r?this:this.insert(r,t,s)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,s){let r=this.#e.indexOf(e);return -1===r?this:this.insert(r+1,t,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=o(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=o(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return o(this.#e,e)}from(e,t){let s=this.indexOf(e);if(-1===s)return;let r=s+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let s=this.indexOf(e);if(-1===s)return;let r=s+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let s=0;for(let r of this){if(Reflect.apply(e,t,[r,s,this]))return r;s++}}findIndex(e,t){let s=0;for(let r of this){if(Reflect.apply(e,t,[r,s,this]))return s;s++}return -1}filter(t,s){let r=[],a=0;for(let e of this)Reflect.apply(t,s,[e,a,this])&&r.push(e),a++;return new e(r)}map(t,s){let r=[],a=0;for(let e of this)r.push([e[0],Reflect.apply(t,s,[e,a,this])]),a++;return new e(r)}reduce(...e){let[t,s]=e,r=0,a=s??this.at(0);for(let s of this)a=0===r&&1===e.length?s:Reflect.apply(t,this,[a,s,r,this]),r++;return a}reduceRight(...e){let[t,s]=e,r=s??this.at(-1);for(let s=this.size-1;s>=0;s--){let a=this.at(s);r=s===this.size-1&&1===e.length?a:Reflect.apply(t,this,[r,a,s,this])}return r}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let s=this.keyAt(e),r=this.get(s);t.set(s,r)}return t}toSpliced(...t){let s=[...this.entries()];return s.splice(...t),new e(s)}slice(t,s){let r=new e,a=this.size-1;if(void 0===t)return r;t<0&&(t+=this.size),void 0!==s&&s>0&&(a=s-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),s=this.get(t);r.set(t,s)}return r}every(e,t){let s=0;for(let r of this){if(!Reflect.apply(e,t,[r,s,this]))return!1;s++}return!0}some(e,t){let s=0;for(let r of this){if(Reflect.apply(e,t,[r,s,this]))return!0;s++}return!1}}),e.s(["createCollection",()=>l])},81181,e=>{"use strict";var t=e.i(95230);e.s(["Download",()=>t.default])},83902,e=>{"use strict";let t=(0,e.i(3645).default)("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);e.s(["Rocket",()=>t],83902)},44412,e=>{"use strict";var t=e.i(20314),s=e.i(79054),r=e.i(81975),a=e.i(68304),i=e.i(31777),l=e.i(83428),n=e.i(83902),o=e.i(81181),c=e.i(3645);let d=(0,c.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var u=e.i(38573),m=e.i(49228),f=e.i(54277),h=e.i(95812),x=e.i(35e3);let p=(0,c.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);var g=e.i(35364),v=e.i(2828),b=e.i(33548),y=e.i(23925),j=e.i(30702),k=e.i(11495);let w={linux:"Linux",darwin:"macOS",win32:"Windows"},N={ide:{label:"IDE",icon:d},"cli-agent":{label:"CLI Agent",icon:u.Terminal},vcs:{label:"VCS",icon:m.GitBranch},terminal:{label:"Terminal",icon:u.Terminal}};function C({status:e}){return"available"===e?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-100 px-2 py-0.5 text-xs font-medium text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400",children:[(0,t.jsx)(y.Check,{className:"h-3 w-3"}),"Installed"]}):"error"===e?(0,t.jsx)("span",{className:"inline-flex items-center gap-1 rounded-full bg-red-100 px-2 py-0.5 text-xs font-medium text-red-700 dark:bg-red-900/30 dark:text-red-400",children:"Error"}):(0,t.jsx)("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-100 px-2 py-0.5 text-xs font-medium text-amber-700 dark:bg-amber-900/30 dark:text-amber-400",children:"Missing"})}function T({tool:e,open:r,onClose:a,onRefresh:i,autoStart:c}){let[u,m]=(0,s.useState)(!1),[f,h]=(0,s.useState)(!1),{logs:x,status:v,startInstall:T}=function(e){let[t,r]=(0,s.useState)([]),[a,i]=(0,s.useState)("idle"),[l,n]=(0,s.useState)(null),o=(0,s.useRef)(null),c=(0,s.useCallback)(()=>{o.current&&(o.current.close(),o.current=null)},[]);return(0,s.useEffect)(()=>c,[c]),{logs:t,status:a,result:l,startInstall:(0,s.useCallback)(()=>{c(),r([]),n(null),i("streaming");let t=new EventSource(`/api/tools/${e}/install/stream`);o.current=t,t.onmessage=e=>{r(t=>[...t,e.data])},t.addEventListener("done",e=>{let t=JSON.parse(e.data);n(t),i("error"===t.status?"error":"done"),c()}),t.onerror=()=>{i("error"),c()}},[e,c])}}(e.id),R=(0,s.useRef)(null),S=(0,s.useRef)(!0),I=(0,s.useRef)(!1),A="available"===e.status.status,z="error"===e.status.status,E=A&&!!e.openDirectory,M=!A&&!z&&e.autoInstall;async function D(){h(!0);try{await fetch(`/api/tools/${e.id}/launch`,{method:"POST"})}finally{h(!1)}}(0,s.useEffect)(()=>{r&&c&&M&&"idle"===v&&!I.current&&(I.current=!0,T()),r||(I.current=!1)},[r,c,M,v,T]);let L=(0,s.useCallback)(()=>{let e=R.current;e&&(S.current=e.scrollTop+e.clientHeight>=e.scrollHeight-50)},[]);(0,s.useEffect)(()=>{S.current&&R.current&&(R.current.scrollTop=R.current.scrollHeight)},[x,v]),(0,s.useEffect)(()=>{"done"===v&&i&&i()},[v,i]);let F=(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 pr-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[e.iconUrl?(0,t.jsx)("img",{src:e.iconUrl,alt:"",width:24,height:24,className:"shrink-0 dark:invert"}):(0,t.jsx)(p,{className:"text-muted-foreground h-6 w-6 shrink-0"}),(0,t.jsx)("h2",{className:"text-base font-bold",children:e.name}),(0,t.jsx)(C,{status:e.status.status})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:e.tags.map(e=>{let s=N[e]??{label:e,icon:d},r=s.icon;return(0,t.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5 text-[10px]",children:[(0,t.jsx)(r,{className:"h-3 w-3"}),s.label]},e)})})]});return(0,t.jsx)(k.BaseDrawer,{open:r,onClose:a,size:"md",modal:!0,title:e.name,header:F,"data-testid":"tool-detail-drawer",children:(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-4 overflow-y-auto p-4",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:e.description}),e.author||e.platforms?(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs",children:[e.author?(0,t.jsxs)("span",{className:"text-muted-foreground",children:["by"," ",e.website?(0,t.jsx)("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",className:"text-foreground hover:underline",children:e.author}):(0,t.jsx)("span",{className:"text-foreground",children:e.author})]}):null,e.platforms&&e.platforms.length>0?(0,t.jsx)("span",{className:"text-muted-foreground",children:e.platforms.map(e=>w[e]??e).join(" · ")}):null]}):null,e.installCommand?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-semibold tracking-wide uppercase",children:"Install command"}),(0,t.jsxs)("div",{className:"relative rounded-md bg-zinc-900 text-zinc-100",children:[(0,t.jsx)("pre",{className:"overflow-x-auto px-3 py-2.5 pr-16 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap",children:(0,t.jsx)("code",{children:e.installCommand})}),(0,t.jsxs)(g.Button,{variant:"ghost",size:"sm",className:"absolute top-1.5 right-1.5 h-7 cursor-pointer px-2 text-zinc-400 hover:text-zinc-100",onClick:function(){e.installCommand&&navigator.clipboard.writeText(e.installCommand).then(()=>{m(!0),setTimeout(()=>m(!1),2e3)})},"aria-label":u?"Copied!":"Copy install command",children:[u?(0,t.jsx)(y.Check,{className:"h-3.5 w-3.5 text-emerald-500"}):(0,t.jsx)(b.Copy,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"ml-1 text-[10px]",children:u?"Copied!":"Copy"})]})]})]}):null,(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[M?(0,t.jsxs)(g.Button,{size:"sm",onClick:T,disabled:"streaming"===v,"aria-label":`Install ${e.name}`,className:"cursor-pointer",children:["streaming"===v?(0,t.jsx)(l.Loader2,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(o.Download,{className:"mr-1.5 h-3.5 w-3.5"}),"streaming"===v?"Installing...":"Install"]}):null,E?(0,t.jsxs)(g.Button,{size:"sm",variant:"outline",onClick:()=>void D(),disabled:f,"aria-label":`Launch ${e.name}`,className:"cursor-pointer",children:[f?(0,t.jsx)(l.Loader2,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(n.Rocket,{className:"mr-1.5 h-3.5 w-3.5"}),"Launch"]}):null,e.documentationUrl?(0,t.jsx)(g.Button,{variant:"outline",size:"sm",className:"cursor-pointer",asChild:!0,children:(0,t.jsxs)("a",{href:e.documentationUrl,target:"_blank",rel:"noopener noreferrer",children:["Docs",(0,t.jsx)(j.ExternalLink,{className:"ml-1 h-3 w-3"})]})}):null]}),("streaming"===v||"done"===v||"error"===v)&&x.length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-semibold tracking-wide uppercase",children:"Install log"}),(0,t.jsxs)("div",{ref:R,onScroll:L,className:"max-h-60 overflow-auto rounded-md bg-zinc-900 p-3 font-mono text-xs leading-relaxed text-zinc-100","data-testid":"tool-install-log",children:[x.map((e,s)=>(0,t.jsx)("div",{className:"break-all whitespace-pre-wrap",children:e},s)),"done"===v?(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-700 pt-2 text-emerald-400",children:"Installation complete"}):null,"error"===v?(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-700 pt-2 text-red-400",children:"Installation failed"}):null]})]}):null]})})}let R={ide:{label:"IDE",icon:d},"cli-agent":{label:"CLI Agent",icon:u.Terminal},vcs:{label:"VCS",icon:m.GitBranch},terminal:{label:"Terminal",icon:u.Terminal}};function S({tool:e,onRefresh:r,className:a}){let[c,u]=(0,s.useState)(!1),[m,b]=(0,s.useState)(!1),[y,j]=(0,s.useTransition)(),k="available"===e.status.status,w="error"===e.status.status,N=k&&!!e.openDirectory;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{"data-testid":"tool-card",onClick:function(){b(!1),u(!0)},className:(0,i.cn)("bg-card group flex h-30 w-full cursor-pointer flex-col rounded-lg border p-3 transition-shadow hover:shadow-md",a),children:[(0,t.jsxs)("div",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[e.iconUrl?(0,t.jsx)("img",{src:e.iconUrl,alt:"",width:20,height:20,className:"shrink-0 dark:invert"}):(0,t.jsx)(p,{className:"text-muted-foreground h-5 w-5 shrink-0"}),(0,t.jsx)("h3",{"data-testid":"tool-card-name",className:"truncate text-sm font-bold",children:e.name})]}),(0,t.jsx)("div",{"data-testid":"tool-card-tags",className:"flex shrink-0 items-center gap-1",children:e.tags.map(e=>{let s=R[e]??{label:e,icon:d},r=s.icon;return(0,t.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5 text-[9px]",children:[(0,t.jsx)(r,{className:"h-2.5 w-2.5"}),s.label]},e)})})]}),(0,t.jsx)("p",{"data-testid":"tool-card-summary",className:"text-muted-foreground mt-1 truncate text-xs",children:e.summary}),(0,t.jsxs)("div",{className:"mt-auto flex items-center justify-between pt-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[w&&"error"===e.status.status?(0,t.jsxs)("span",{className:"flex items-center gap-1 truncate text-[10px] text-red-600 dark:text-red-400",title:e.status.errorMessage,children:[(0,t.jsx)(f.CircleX,{className:"h-3 w-3 shrink-0"}),e.status.errorMessage??"Error"]}):k?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-[10px] text-emerald-600 dark:text-emerald-400",children:[(0,t.jsx)(x.CheckCircle2,{className:"h-3 w-3"}),"Installed"]}):(0,t.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1 text-[10px]",children:[(0,t.jsx)(h.Circle,{className:"h-3 w-3"}),"Not installed"]}),e.required?(0,t.jsx)(v.TooltipProvider,{children:(0,t.jsxs)(v.Tooltip,{children:[(0,t.jsx)(v.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"rounded bg-amber-100 px-1.5 py-0.5 text-[9px] font-medium text-amber-700 dark:bg-amber-900/50 dark:text-amber-400",children:"Required"})}),(0,t.jsx)(v.TooltipContent,{side:"top",children:"This tool is required for Shep to function properly"})]})}):null]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:k&&N?(0,t.jsxs)(g.Button,{size:"sm",variant:"outline",onClick:function(t){t.stopPropagation(),j(async()=>{await fetch(`/api/tools/${e.id}/launch`,{method:"POST"})})},disabled:y,"aria-label":`Launch ${e.name}`,"data-testid":"tool-card-launch-button",className:"h-7 cursor-pointer rounded-md px-3 text-xs",children:[y?(0,t.jsx)(l.Loader2,{className:"mr-1 h-3 w-3 animate-spin"}):(0,t.jsx)(n.Rocket,{className:"mr-1 h-3 w-3"}),"Launch"]}):k||w?null:(0,t.jsxs)(g.Button,{size:"sm",variant:"default",onClick:function(t){t.stopPropagation(),b(e.autoInstall),u(!0)},"aria-label":`Install ${e.name}`,"data-testid":"tool-card-install-button",className:"h-7 cursor-pointer rounded-md px-3 text-xs",children:[(0,t.jsx)(o.Download,{className:"mr-1 h-3 w-3"}),"Install"]})})]})]}),(0,t.jsx)(T,{tool:e,open:c,onClose:()=>u(!1),onRefresh:r,autoStart:m})]})}let I={all:()=>!0,ide:e=>e.tags.includes("ide"),"cli-agent":e=>e.tags.includes("cli-agent"),vcs:e=>e.tags.includes("vcs"),terminal:e=>e.tags.includes("terminal")};function A({tools:e,className:l}){let[n,o]=(0,s.useState)(e),[c,d]=(0,s.useState)("all"),u=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/tools");if(e.ok){let t=await e.json();o(t)}}catch{}},[]),m=n.filter(I[c]);return(0,t.jsxs)("div",{"data-testid":"tools-page-client",className:(0,i.cn)("space-y-4",l),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.Wrench,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Tools"}),(0,t.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:[n.filter(e=>"available"===e.status.status).length,"/",n.length," installed"]})]}),(0,t.jsxs)(a.Tabs,{value:c,onValueChange:e=>d(e),"data-testid":"tools-page-tabs",children:[(0,t.jsxs)(a.TabsList,{className:"h-7",children:[(0,t.jsx)(a.TabsTrigger,{value:"all","data-testid":"tools-tab-all",className:"px-2.5 text-xs",children:"All"}),(0,t.jsx)(a.TabsTrigger,{value:"ide","data-testid":"tools-tab-ide",className:"px-2.5 text-xs",children:"IDEs"}),(0,t.jsx)(a.TabsTrigger,{value:"cli-agent","data-testid":"tools-tab-cli-agent",className:"px-2.5 text-xs",children:"CLI Agents"}),(0,t.jsx)(a.TabsTrigger,{value:"vcs","data-testid":"tools-tab-vcs",className:"px-2.5 text-xs",children:"Version Control"}),(0,t.jsx)(a.TabsTrigger,{value:"terminal","data-testid":"tools-tab-terminal",className:"px-2.5 text-xs",children:"Terminals"})]}),(0,t.jsx)(a.TabsContent,{value:c,className:"mt-3",children:0===m.length?(0,t.jsxs)("div",{"data-testid":"tools-page-empty",className:"text-muted-foreground flex flex-col items-center justify-center py-12 text-center",children:[(0,t.jsx)(r.Wrench,{className:"mb-2 h-6 w-6 opacity-20"}),(0,t.jsx)("p",{className:"text-xs",children:"No tools in this category."})]}):(0,t.jsx)("div",{"data-testid":"tools-page-grid",className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:m.map(e=>(0,t.jsx)(S,{tool:e,onRefresh:u},e.id))})})]})]})}e.s(["ToolsPageClient",()=>A],44412)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},81846,e=>{"use strict";var t=e.i(20314),s=e.i(94237),r=e.i(31777);let a=(0,s.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:s,...i}){return(0,t.jsx)("div",{className:(0,r.cn)(a({variant:s}),e),...i})}e.s(["Badge",()=>i])},95230,e=>{"use strict";let t=(0,e.i(3645).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["default",()=>t])},68304,e=>{"use strict";var t=e.i(20314),s=e.i(79054),r=e.i(91967),a=e.i(22528),i=e.i(51080),l=e.i(85995),n=e.i(87620),o=e.i(66033),c=e.i(36589),d=e.i(13123),u="Tabs",[m,f]=(0,a.createContextScope)(u,[i.createRovingFocusGroupScope]),h=(0,i.createRovingFocusGroupScope)(),[x,p]=m(u),g=s.forwardRef((e,s)=>{let{__scopeTabs:r,value:a,onValueChange:i,defaultValue:l,orientation:m="horizontal",dir:f,activationMode:h="automatic",...p}=e,g=(0,o.useDirection)(f),[v,b]=(0,c.useControllableState)({prop:a,onChange:i,defaultProp:l??"",caller:u});return(0,t.jsx)(x,{scope:r,baseId:(0,d.useId)(),value:v,onValueChange:b,orientation:m,dir:g,activationMode:h,children:(0,t.jsx)(n.Primitive.div,{dir:g,"data-orientation":m,...p,ref:s})})});g.displayName=u;var v="TabsList",b=s.forwardRef((e,s)=>{let{__scopeTabs:r,loop:a=!0,...l}=e,o=p(v,r),c=h(r);return(0,t.jsx)(i.Root,{asChild:!0,...c,orientation:o.orientation,dir:o.dir,loop:a,children:(0,t.jsx)(n.Primitive.div,{role:"tablist","aria-orientation":o.orientation,...l,ref:s})})});b.displayName=v;var y="TabsTrigger",j=s.forwardRef((e,s)=>{let{__scopeTabs:a,value:l,disabled:o=!1,...c}=e,d=p(y,a),u=h(a),m=N(d.baseId,l),f=C(d.baseId,l),x=l===d.value;return(0,t.jsx)(i.Item,{asChild:!0,...u,focusable:!o,active:x,children:(0,t.jsx)(n.Primitive.button,{type:"button",role:"tab","aria-selected":x,"aria-controls":f,"data-state":x?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:m,...c,ref:s,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(l)}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(l)}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;x||o||!e||d.onValueChange(l)})})})});j.displayName=y;var k="TabsContent",w=s.forwardRef((e,r)=>{let{__scopeTabs:a,value:i,forceMount:o,children:c,...d}=e,u=p(k,a),m=N(u.baseId,i),f=C(u.baseId,i),h=i===u.value,x=s.useRef(h);return s.useEffect(()=>{let e=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(l.Presence,{present:o||h,children:({present:s})=>(0,t.jsx)(n.Primitive.div,{"data-state":h?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":m,hidden:!s,id:f,tabIndex:0,...d,ref:r,style:{...e.style,animationDuration:x.current?"0s":void 0},children:s&&c})})});function N(e,t){return`${e}-trigger-${t}`}function C(e,t){return`${e}-content-${t}`}w.displayName=k,e.s(["Content",()=>w,"List",()=>b,"Root",()=>g,"Tabs",()=>g,"TabsContent",()=>w,"TabsList",()=>b,"TabsTrigger",()=>j,"Trigger",()=>j,"createTabsScope",()=>f],43133);var T=e.i(43133),T=T,R=e.i(31777);let S=T.Root,I=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)(T.List,{ref:r,className:(0,R.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...s}));I.displayName=T.List.displayName;let A=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)(T.Trigger,{ref:r,className:(0,R.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...s}));A.displayName=T.Trigger.displayName;let z=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)(T.Content,{ref:r,className:(0,R.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...s}));z.displayName=T.Content.displayName,e.s(["Tabs",()=>S,"TabsContent",()=>z,"TabsList",()=>I,"TabsTrigger",()=>A],68304)},95812,35e3,e=>{"use strict";let t=(0,e.i(3645).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",()=>t],95812);var s=e.i(80986);e.s(["CheckCircle2",()=>s.default],35e3)},33548,e=>{"use strict";let t=(0,e.i(3645).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],33548)},51080,e=>{"use strict";var t=e.i(79054),s=e.i(91967),r=e.i(87342),a=e.i(5978),i=e.i(22528),l=e.i(13123),n=e.i(87620),o=e.i(29297),c=e.i(36589),d=e.i(66033),u=e.i(20314),m="rovingFocusGroup.onEntryFocus",f={bubbles:!1,cancelable:!0},h="RovingFocusGroup",[x,p,g]=(0,r.createCollection)(h),[v,b]=(0,i.createContextScope)(h,[g]),[y,j]=v(h),k=t.forwardRef((e,t)=>(0,u.jsx)(x.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(x.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(w,{...e,ref:t})})}));k.displayName=h;var w=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,orientation:l,loop:x=!1,dir:g,currentTabStopId:v,defaultCurrentTabStopId:b,onCurrentTabStopIdChange:j,onEntryFocus:k,preventScrollOnEntryFocus:w=!1,...N}=e,C=t.useRef(null),T=(0,a.useComposedRefs)(r,C),S=(0,d.useDirection)(g),[I,A]=(0,c.useControllableState)({prop:v,defaultProp:b??null,onChange:j,caller:h}),[z,E]=t.useState(!1),M=(0,o.useCallbackRef)(k),D=p(i),L=t.useRef(!1),[F,P]=t.useState(0);return t.useEffect(()=>{let e=C.current;if(e)return e.addEventListener(m,M),()=>e.removeEventListener(m,M)},[M]),(0,u.jsx)(y,{scope:i,orientation:l,dir:S,loop:x,currentTabStopId:I,onItemFocus:t.useCallback(e=>A(e),[A]),onItemShiftTab:t.useCallback(()=>E(!0),[]),onFocusableItemAdd:t.useCallback(()=>P(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>P(e=>e-1),[]),children:(0,u.jsx)(n.Primitive.div,{tabIndex:z||0===F?-1:0,"data-orientation":l,...N,ref:T,style:{outline:"none",...e.style},onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,()=>{L.current=!0}),onFocus:(0,s.composeEventHandlers)(e.onFocus,e=>{let t=!L.current;if(e.target===e.currentTarget&&t&&!z){let t=new CustomEvent(m,f);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=D().filter(e=>e.focusable);R([e.find(e=>e.active),e.find(e=>e.id===I),...e].filter(Boolean).map(e=>e.ref.current),w)}}L.current=!1}),onBlur:(0,s.composeEventHandlers)(e.onBlur,()=>E(!1))})})}),N="RovingFocusGroupItem",C=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:a,focusable:i=!0,active:o=!1,tabStopId:c,children:d,...m}=e,f=(0,l.useId)(),h=c||f,g=j(N,a),v=g.currentTabStopId===h,b=p(a),{onFocusableItemAdd:y,onFocusableItemRemove:k,currentTabStopId:w}=g;return t.useEffect(()=>{if(i)return y(),()=>k()},[i,y,k]),(0,u.jsx)(x.ItemSlot,{scope:a,id:h,focusable:i,active:o,children:(0,u.jsx)(n.Primitive.span,{tabIndex:v?0:-1,"data-orientation":g.orientation,...m,ref:r,onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,e=>{i?g.onItemFocus(h):e.preventDefault()}),onFocus:(0,s.composeEventHandlers)(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void g.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,s){var r;let a=(r=e.key,"rtl"!==s?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(a))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)))return T[a]}(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=b().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){var s,r;"prev"===t&&a.reverse();let i=a.indexOf(e.currentTarget);a=g.loop?(s=a,r=i+1,s.map((e,t)=>s[(r+t)%s.length])):a.slice(i+1)}setTimeout(()=>R(a))}}),children:"function"==typeof d?d({isCurrentTabStop:v,hasTabStop:null!=w}):d})})});C.displayName=N;var T={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function R(e,t=!1){let s=document.activeElement;for(let r of e)if(r===s||(r.focus({preventScroll:t}),document.activeElement!==s))return}e.s(["Item",()=>C,"Root",()=>k,"createRovingFocusGroupScope",()=>b])},87342,e=>{"use strict";var t=e.i(79054),s=e.i(22528),r=e.i(5978),a=e.i(86874),i=e.i(20314);function l(e){let l=e+"CollectionProvider",[n,o]=(0,s.createContextScope)(l),[c,d]=n(l,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:s,children:r}=e,a=t.default.useRef(null),l=t.default.useRef(new Map).current;return(0,i.jsx)(c,{scope:s,itemMap:l,collectionRef:a,children:r})};u.displayName=l;let m=e+"CollectionSlot",f=(0,a.createSlot)(m),h=t.default.forwardRef((e,t)=>{let{scope:s,children:a}=e,l=d(m,s),n=(0,r.useComposedRefs)(t,l.collectionRef);return(0,i.jsx)(f,{ref:n,children:a})});h.displayName=m;let x=e+"CollectionItemSlot",p="data-radix-collection-item",g=(0,a.createSlot)(x),v=t.default.forwardRef((e,s)=>{let{scope:a,children:l,...n}=e,o=t.default.useRef(null),c=(0,r.useComposedRefs)(s,o),u=d(x,a);return t.default.useEffect(()=>(u.itemMap.set(o,{ref:o,...n}),()=>void u.itemMap.delete(o))),(0,i.jsx)(g,{...{[p]:""},ref:c,children:l})});return v.displayName=x,[{Provider:u,Slot:h,ItemSlot:v},function(s){let r=d(e+"CollectionConsumer",s);return t.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(r.itemMap.values()).sort((e,s)=>t.indexOf(e.ref.current)-t.indexOf(s.ref.current))},[r.collectionRef,r.itemMap])},o]}var n=new WeakMap;function o(e,t){var s,r;let a,i,l;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=(s=e,r=t,a=s.length,(l=(i=c(r))>=0?i:a+i)<0||l>=a?-1:l);return -1===n?void 0:e[n]}function c(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],n.set(this,!0)}set(e,t){return n.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,s){let r,a=this.has(t),i=this.#e.length,l=c(e),n=l>=0?l:i+l,o=n<0||n>=i?-1:n;if(o===this.size||a&&o===this.size-1||-1===o)return this.set(t,s),this;let d=this.size+ +!a;l<0&&n++;let u=[...this.#e],m=!1;for(let e=n;e<d;e++)if(n===e){let i=u[e];u[e]===t&&(i=u[e+1]),a&&this.delete(t),r=this.get(i),this.set(t,s)}else{m||u[e-1]!==t||(m=!0);let s=u[m?e:e-1],a=r;r=this.get(s),this.delete(s),this.set(s,a)}return this}with(t,s,r){let a=new e(this);return a.insert(t,s,r),a}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,s){let r=this.#e.indexOf(e);return -1===r?this:this.insert(r,t,s)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,s){let r=this.#e.indexOf(e);return -1===r?this:this.insert(r+1,t,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=o(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=o(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return o(this.#e,e)}from(e,t){let s=this.indexOf(e);if(-1===s)return;let r=s+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let s=this.indexOf(e);if(-1===s)return;let r=s+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let s=0;for(let r of this){if(Reflect.apply(e,t,[r,s,this]))return r;s++}}findIndex(e,t){let s=0;for(let r of this){if(Reflect.apply(e,t,[r,s,this]))return s;s++}return -1}filter(t,s){let r=[],a=0;for(let e of this)Reflect.apply(t,s,[e,a,this])&&r.push(e),a++;return new e(r)}map(t,s){let r=[],a=0;for(let e of this)r.push([e[0],Reflect.apply(t,s,[e,a,this])]),a++;return new e(r)}reduce(...e){let[t,s]=e,r=0,a=s??this.at(0);for(let s of this)a=0===r&&1===e.length?s:Reflect.apply(t,this,[a,s,r,this]),r++;return a}reduceRight(...e){let[t,s]=e,r=s??this.at(-1);for(let s=this.size-1;s>=0;s--){let a=this.at(s);r=s===this.size-1&&1===e.length?a:Reflect.apply(t,this,[r,a,s,this])}return r}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let s=this.keyAt(e),r=this.get(s);t.set(s,r)}return t}toSpliced(...t){let s=[...this.entries()];return s.splice(...t),new e(s)}slice(t,s){let r=new e,a=this.size-1;if(void 0===t)return r;t<0&&(t+=this.size),void 0!==s&&s>0&&(a=s-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),s=this.get(t);r.set(t,s)}return r}every(e,t){let s=0;for(let r of this){if(!Reflect.apply(e,t,[r,s,this]))return!1;s++}return!0}some(e,t){let s=0;for(let r of this){if(Reflect.apply(e,t,[r,s,this]))return!0;s++}return!1}}),e.s(["createCollection",()=>l])},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},23925,1012,e=>{"use strict";let t=(0,e.i(3645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],1012),e.s(["Check",()=>t],23925)},81181,e=>{"use strict";var t=e.i(95230);e.s(["Download",()=>t.default])},83902,e=>{"use strict";let t=(0,e.i(3645).default)("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);e.s(["Rocket",()=>t],83902)},44412,e=>{"use strict";var t=e.i(20314),s=e.i(79054),r=e.i(81975),a=e.i(68304),i=e.i(31777),l=e.i(83428),n=e.i(83902),o=e.i(81181),c=e.i(3645);let d=(0,c.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var u=e.i(38573),m=e.i(49228),f=e.i(54277),h=e.i(95812),x=e.i(35e3);let p=(0,c.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);var g=e.i(35364),v=e.i(2828),b=e.i(33548),y=e.i(23925),j=e.i(30702),k=e.i(11495);let w={linux:"Linux",darwin:"macOS",win32:"Windows"},N={ide:{label:"IDE",icon:d},"cli-agent":{label:"CLI Agent",icon:u.Terminal},vcs:{label:"VCS",icon:m.GitBranch},terminal:{label:"Terminal",icon:u.Terminal}};function C({status:e}){return"available"===e?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-100 px-2 py-0.5 text-xs font-medium text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400",children:[(0,t.jsx)(y.Check,{className:"h-3 w-3"}),"Installed"]}):"error"===e?(0,t.jsx)("span",{className:"inline-flex items-center gap-1 rounded-full bg-red-100 px-2 py-0.5 text-xs font-medium text-red-700 dark:bg-red-900/30 dark:text-red-400",children:"Error"}):(0,t.jsx)("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-100 px-2 py-0.5 text-xs font-medium text-amber-700 dark:bg-amber-900/30 dark:text-amber-400",children:"Missing"})}function T({tool:e,open:r,onClose:a,onRefresh:i,autoStart:c}){let[u,m]=(0,s.useState)(!1),[f,h]=(0,s.useState)(!1),{logs:x,status:v,startInstall:T}=function(e){let[t,r]=(0,s.useState)([]),[a,i]=(0,s.useState)("idle"),[l,n]=(0,s.useState)(null),o=(0,s.useRef)(null),c=(0,s.useCallback)(()=>{o.current&&(o.current.close(),o.current=null)},[]);return(0,s.useEffect)(()=>c,[c]),{logs:t,status:a,result:l,startInstall:(0,s.useCallback)(()=>{c(),r([]),n(null),i("streaming");let t=new EventSource(`/api/tools/${e}/install/stream`);o.current=t,t.onmessage=e=>{r(t=>[...t,e.data])},t.addEventListener("done",e=>{let t=JSON.parse(e.data);n(t),i("error"===t.status?"error":"done"),c()}),t.onerror=()=>{i("error"),c()}},[e,c])}}(e.id),R=(0,s.useRef)(null),S=(0,s.useRef)(!0),I=(0,s.useRef)(!1),A="available"===e.status.status,z="error"===e.status.status,E=A&&!!e.openDirectory,M=!A&&!z&&e.autoInstall;async function D(){h(!0);try{await fetch(`/api/tools/${e.id}/launch`,{method:"POST"})}finally{h(!1)}}(0,s.useEffect)(()=>{r&&c&&M&&"idle"===v&&!I.current&&(I.current=!0,T()),r||(I.current=!1)},[r,c,M,v,T]);let L=(0,s.useCallback)(()=>{let e=R.current;e&&(S.current=e.scrollTop+e.clientHeight>=e.scrollHeight-50)},[]);(0,s.useEffect)(()=>{S.current&&R.current&&(R.current.scrollTop=R.current.scrollHeight)},[x,v]),(0,s.useEffect)(()=>{"done"===v&&i&&i()},[v,i]);let F=(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 pr-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[e.iconUrl?(0,t.jsx)("img",{src:e.iconUrl,alt:"",width:24,height:24,className:"shrink-0 dark:invert"}):(0,t.jsx)(p,{className:"text-muted-foreground h-6 w-6 shrink-0"}),(0,t.jsx)("h2",{className:"text-base font-bold",children:e.name}),(0,t.jsx)(C,{status:e.status.status})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:e.tags.map(e=>{let s=N[e]??{label:e,icon:d},r=s.icon;return(0,t.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5 text-[10px]",children:[(0,t.jsx)(r,{className:"h-3 w-3"}),s.label]},e)})})]});return(0,t.jsx)(k.BaseDrawer,{open:r,onClose:a,size:"md",modal:!0,title:e.name,header:F,"data-testid":"tool-detail-drawer",children:(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-4 overflow-y-auto p-4",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:e.description}),e.author||e.platforms?(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs",children:[e.author?(0,t.jsxs)("span",{className:"text-muted-foreground",children:["by"," ",e.website?(0,t.jsx)("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",className:"text-foreground hover:underline",children:e.author}):(0,t.jsx)("span",{className:"text-foreground",children:e.author})]}):null,e.platforms&&e.platforms.length>0?(0,t.jsx)("span",{className:"text-muted-foreground",children:e.platforms.map(e=>w[e]??e).join(" · ")}):null]}):null,e.installCommand?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-semibold tracking-wide uppercase",children:"Install command"}),(0,t.jsxs)("div",{className:"relative rounded-md bg-zinc-900 text-zinc-100",children:[(0,t.jsx)("pre",{className:"overflow-x-auto px-3 py-2.5 pr-16 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap",children:(0,t.jsx)("code",{children:e.installCommand})}),(0,t.jsxs)(g.Button,{variant:"ghost",size:"sm",className:"absolute top-1.5 right-1.5 h-7 cursor-pointer px-2 text-zinc-400 hover:text-zinc-100",onClick:function(){e.installCommand&&navigator.clipboard.writeText(e.installCommand).then(()=>{m(!0),setTimeout(()=>m(!1),2e3)})},"aria-label":u?"Copied!":"Copy install command",children:[u?(0,t.jsx)(y.Check,{className:"h-3.5 w-3.5 text-emerald-500"}):(0,t.jsx)(b.Copy,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"ml-1 text-[10px]",children:u?"Copied!":"Copy"})]})]})]}):null,(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[M?(0,t.jsxs)(g.Button,{size:"sm",onClick:T,disabled:"streaming"===v,"aria-label":`Install ${e.name}`,className:"cursor-pointer",children:["streaming"===v?(0,t.jsx)(l.Loader2,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(o.Download,{className:"mr-1.5 h-3.5 w-3.5"}),"streaming"===v?"Installing...":"Install"]}):null,E?(0,t.jsxs)(g.Button,{size:"sm",variant:"outline",onClick:()=>void D(),disabled:f,"aria-label":`Launch ${e.name}`,className:"cursor-pointer",children:[f?(0,t.jsx)(l.Loader2,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(n.Rocket,{className:"mr-1.5 h-3.5 w-3.5"}),"Launch"]}):null,e.documentationUrl?(0,t.jsx)(g.Button,{variant:"outline",size:"sm",className:"cursor-pointer",asChild:!0,children:(0,t.jsxs)("a",{href:e.documentationUrl,target:"_blank",rel:"noopener noreferrer",children:["Docs",(0,t.jsx)(j.ExternalLink,{className:"ml-1 h-3 w-3"})]})}):null]}),("streaming"===v||"done"===v||"error"===v)&&x.length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-semibold tracking-wide uppercase",children:"Install log"}),(0,t.jsxs)("div",{ref:R,onScroll:L,className:"max-h-60 overflow-auto rounded-md bg-zinc-900 p-3 font-mono text-xs leading-relaxed text-zinc-100","data-testid":"tool-install-log",children:[x.map((e,s)=>(0,t.jsx)("div",{className:"break-all whitespace-pre-wrap",children:e},s)),"done"===v?(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-700 pt-2 text-emerald-400",children:"Installation complete"}):null,"error"===v?(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-700 pt-2 text-red-400",children:"Installation failed"}):null]})]}):null]})})}let R={ide:{label:"IDE",icon:d},"cli-agent":{label:"CLI Agent",icon:u.Terminal},vcs:{label:"VCS",icon:m.GitBranch},terminal:{label:"Terminal",icon:u.Terminal}};function S({tool:e,onRefresh:r,className:a}){let[c,u]=(0,s.useState)(!1),[m,b]=(0,s.useState)(!1),[y,j]=(0,s.useTransition)(),k="available"===e.status.status,w="error"===e.status.status,N=k&&!!e.openDirectory;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{"data-testid":"tool-card",onClick:function(){b(!1),u(!0)},className:(0,i.cn)("bg-card group flex h-30 w-full cursor-pointer flex-col rounded-lg border p-3 transition-shadow hover:shadow-md",a),children:[(0,t.jsxs)("div",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[e.iconUrl?(0,t.jsx)("img",{src:e.iconUrl,alt:"",width:20,height:20,className:"shrink-0 dark:invert"}):(0,t.jsx)(p,{className:"text-muted-foreground h-5 w-5 shrink-0"}),(0,t.jsx)("h3",{"data-testid":"tool-card-name",className:"truncate text-sm font-bold",children:e.name})]}),(0,t.jsx)("div",{"data-testid":"tool-card-tags",className:"flex shrink-0 items-center gap-1",children:e.tags.map(e=>{let s=R[e]??{label:e,icon:d},r=s.icon;return(0,t.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5 text-[9px]",children:[(0,t.jsx)(r,{className:"h-2.5 w-2.5"}),s.label]},e)})})]}),(0,t.jsx)("p",{"data-testid":"tool-card-summary",className:"text-muted-foreground mt-1 truncate text-xs",children:e.summary}),(0,t.jsxs)("div",{className:"mt-auto flex items-center justify-between pt-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[w&&"error"===e.status.status?(0,t.jsxs)("span",{className:"flex items-center gap-1 truncate text-[10px] text-red-600 dark:text-red-400",title:e.status.errorMessage,children:[(0,t.jsx)(f.CircleX,{className:"h-3 w-3 shrink-0"}),e.status.errorMessage??"Error"]}):k?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-[10px] text-emerald-600 dark:text-emerald-400",children:[(0,t.jsx)(x.CheckCircle2,{className:"h-3 w-3"}),"Installed"]}):(0,t.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1 text-[10px]",children:[(0,t.jsx)(h.Circle,{className:"h-3 w-3"}),"Not installed"]}),e.required?(0,t.jsx)(v.TooltipProvider,{children:(0,t.jsxs)(v.Tooltip,{children:[(0,t.jsx)(v.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"rounded bg-amber-100 px-1.5 py-0.5 text-[9px] font-medium text-amber-700 dark:bg-amber-900/50 dark:text-amber-400",children:"Required"})}),(0,t.jsx)(v.TooltipContent,{side:"top",children:"This tool is required for Shep to function properly"})]})}):null]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:k&&N?(0,t.jsxs)(g.Button,{size:"sm",variant:"outline",onClick:function(t){t.stopPropagation(),j(async()=>{await fetch(`/api/tools/${e.id}/launch`,{method:"POST"})})},disabled:y,"aria-label":`Launch ${e.name}`,"data-testid":"tool-card-launch-button",className:"h-7 cursor-pointer rounded-md px-3 text-xs",children:[y?(0,t.jsx)(l.Loader2,{className:"mr-1 h-3 w-3 animate-spin"}):(0,t.jsx)(n.Rocket,{className:"mr-1 h-3 w-3"}),"Launch"]}):k||w?null:(0,t.jsxs)(g.Button,{size:"sm",variant:"default",onClick:function(t){t.stopPropagation(),b(e.autoInstall),u(!0)},"aria-label":`Install ${e.name}`,"data-testid":"tool-card-install-button",className:"h-7 cursor-pointer rounded-md px-3 text-xs",children:[(0,t.jsx)(o.Download,{className:"mr-1 h-3 w-3"}),"Install"]})})]})]}),(0,t.jsx)(T,{tool:e,open:c,onClose:()=>u(!1),onRefresh:r,autoStart:m})]})}let I={all:()=>!0,ide:e=>e.tags.includes("ide"),"cli-agent":e=>e.tags.includes("cli-agent"),vcs:e=>e.tags.includes("vcs"),terminal:e=>e.tags.includes("terminal")};function A({tools:e,className:l}){let[n,o]=(0,s.useState)(e),[c,d]=(0,s.useState)("all"),u=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/tools");if(e.ok){let t=await e.json();o(t)}}catch{}},[]),m=n.filter(I[c]);return(0,t.jsxs)("div",{"data-testid":"tools-page-client",className:(0,i.cn)("space-y-4",l),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.Wrench,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Tools"}),(0,t.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:[n.filter(e=>"available"===e.status.status).length,"/",n.length," installed"]})]}),(0,t.jsxs)(a.Tabs,{value:c,onValueChange:e=>d(e),"data-testid":"tools-page-tabs",children:[(0,t.jsxs)(a.TabsList,{className:"h-7",children:[(0,t.jsx)(a.TabsTrigger,{value:"all","data-testid":"tools-tab-all",className:"px-2.5 text-xs",children:"All"}),(0,t.jsx)(a.TabsTrigger,{value:"ide","data-testid":"tools-tab-ide",className:"px-2.5 text-xs",children:"IDEs"}),(0,t.jsx)(a.TabsTrigger,{value:"cli-agent","data-testid":"tools-tab-cli-agent",className:"px-2.5 text-xs",children:"CLI Agents"}),(0,t.jsx)(a.TabsTrigger,{value:"vcs","data-testid":"tools-tab-vcs",className:"px-2.5 text-xs",children:"Version Control"}),(0,t.jsx)(a.TabsTrigger,{value:"terminal","data-testid":"tools-tab-terminal",className:"px-2.5 text-xs",children:"Terminals"})]}),(0,t.jsx)(a.TabsContent,{value:c,className:"mt-3",children:0===m.length?(0,t.jsxs)("div",{"data-testid":"tools-page-empty",className:"text-muted-foreground flex flex-col items-center justify-center py-12 text-center",children:[(0,t.jsx)(r.Wrench,{className:"mb-2 h-6 w-6 opacity-20"}),(0,t.jsx)("p",{className:"text-xs",children:"No tools in this category."})]}):(0,t.jsx)("div",{"data-testid":"tools-page-grid",className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:m.map(e=>(0,t.jsx)(S,{tool:e,onRefresh:u},e.id))})})]})]})}e.s(["ToolsPageClient",()=>A],44412)}]);
|
package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rebase Feature on Main Use Case
|
|
3
|
-
*
|
|
4
|
-
* Rebases a feature branch onto the latest main branch with auto-sync
|
|
5
|
-
* and agent-powered conflict resolution.
|
|
6
|
-
*
|
|
7
|
-
* Flow: resolve feature → determine cwd (worktree or repo root) →
|
|
8
|
-
* sync main → rebase → on conflict, delegate to ConflictResolutionService.
|
|
9
|
-
*/
|
|
10
|
-
import type { IFeatureRepository } from '../../ports/output/repositories/feature-repository.interface.js';
|
|
11
|
-
import type { IGitPrService } from '../../ports/output/services/git-pr-service.interface.js';
|
|
12
|
-
import type { IWorktreeService } from '../../ports/output/services/worktree-service.interface.js';
|
|
13
|
-
import type { ConflictResolutionService } from '../../../infrastructure/services/agents/conflict-resolution/conflict-resolution.service.js';
|
|
14
|
-
export declare class RebaseFeatureOnMainUseCase {
|
|
15
|
-
private readonly featureRepo;
|
|
16
|
-
private readonly gitPrService;
|
|
17
|
-
private readonly worktreeService;
|
|
18
|
-
private readonly conflictResolutionService;
|
|
19
|
-
constructor(featureRepo: IFeatureRepository, gitPrService: IGitPrService, worktreeService: IWorktreeService, conflictResolutionService: ConflictResolutionService);
|
|
20
|
-
execute(featureId: string): Promise<void>;
|
|
21
|
-
/**
|
|
22
|
-
* Resolve the correct working directory for the feature.
|
|
23
|
-
* Uses the worktree path if a worktree exists for this branch,
|
|
24
|
-
* otherwise falls back to the repository root.
|
|
25
|
-
*/
|
|
26
|
-
private resolveCwd;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=rebase-feature-on-main.use-case.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rebase-feature-on-main.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yDAAyD,CAAC;AAK7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAClG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4FAA4F,CAAC;AAE5I,qBACa,0BAA0B;IAGnC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,yBAAyB;gBANzB,WAAW,EAAE,kBAAkB,EAE/B,YAAY,EAAE,aAAa,EAE3B,eAAe,EAAE,gBAAgB,EAEjC,yBAAyB,EAAE,yBAAyB;IAGjE,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA6B/C;;;;OAIG;YACW,UAAU;CAOzB"}
|
package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rebase Feature on Main Use Case
|
|
3
|
-
*
|
|
4
|
-
* Rebases a feature branch onto the latest main branch with auto-sync
|
|
5
|
-
* and agent-powered conflict resolution.
|
|
6
|
-
*
|
|
7
|
-
* Flow: resolve feature → determine cwd (worktree or repo root) →
|
|
8
|
-
* sync main → rebase → on conflict, delegate to ConflictResolutionService.
|
|
9
|
-
*/
|
|
10
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
11
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
13
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
|
-
};
|
|
16
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
17
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
18
|
-
};
|
|
19
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
20
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
21
|
-
};
|
|
22
|
-
import { injectable, inject } from 'tsyringe';
|
|
23
|
-
import { GitPrError, GitPrErrorCode, } from '../../ports/output/services/git-pr-service.interface.js';
|
|
24
|
-
let RebaseFeatureOnMainUseCase = class RebaseFeatureOnMainUseCase {
|
|
25
|
-
featureRepo;
|
|
26
|
-
gitPrService;
|
|
27
|
-
worktreeService;
|
|
28
|
-
conflictResolutionService;
|
|
29
|
-
constructor(featureRepo, gitPrService, worktreeService, conflictResolutionService) {
|
|
30
|
-
this.featureRepo = featureRepo;
|
|
31
|
-
this.gitPrService = gitPrService;
|
|
32
|
-
this.worktreeService = worktreeService;
|
|
33
|
-
this.conflictResolutionService = conflictResolutionService;
|
|
34
|
-
}
|
|
35
|
-
async execute(featureId) {
|
|
36
|
-
// Resolve feature by exact ID or prefix
|
|
37
|
-
const feature = (await this.featureRepo.findById(featureId)) ??
|
|
38
|
-
(await this.featureRepo.findByIdPrefix(featureId));
|
|
39
|
-
if (!feature) {
|
|
40
|
-
throw new Error(`Feature not found: "${featureId}"`);
|
|
41
|
-
}
|
|
42
|
-
// Determine working directory — worktree path if it exists, else repo root
|
|
43
|
-
const cwd = await this.resolveCwd(feature.repositoryPath, feature.branch);
|
|
44
|
-
const defaultBranch = await this.gitPrService.getDefaultBranch(feature.repositoryPath);
|
|
45
|
-
// Auto-sync main before rebasing (per spec decision)
|
|
46
|
-
await this.gitPrService.syncMain(cwd, defaultBranch);
|
|
47
|
-
// Attempt rebase
|
|
48
|
-
try {
|
|
49
|
-
await this.gitPrService.rebaseOnMain(cwd, feature.branch, defaultBranch);
|
|
50
|
-
}
|
|
51
|
-
catch (error) {
|
|
52
|
-
if (error instanceof GitPrError && error.code === GitPrErrorCode.REBASE_CONFLICT) {
|
|
53
|
-
// Delegate to agent-powered conflict resolution
|
|
54
|
-
await this.conflictResolutionService.resolve(cwd, feature.branch, defaultBranch);
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
throw error;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Resolve the correct working directory for the feature.
|
|
62
|
-
* Uses the worktree path if a worktree exists for this branch,
|
|
63
|
-
* otherwise falls back to the repository root.
|
|
64
|
-
*/
|
|
65
|
-
async resolveCwd(repositoryPath, branch) {
|
|
66
|
-
const hasWorktree = await this.worktreeService.exists(repositoryPath, branch);
|
|
67
|
-
if (hasWorktree) {
|
|
68
|
-
return this.worktreeService.getWorktreePath(repositoryPath, branch);
|
|
69
|
-
}
|
|
70
|
-
return repositoryPath;
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
RebaseFeatureOnMainUseCase = __decorate([
|
|
74
|
-
injectable(),
|
|
75
|
-
__param(0, inject('IFeatureRepository')),
|
|
76
|
-
__param(1, inject('IGitPrService')),
|
|
77
|
-
__param(2, inject('IWorktreeService')),
|
|
78
|
-
__param(3, inject('ConflictResolutionService')),
|
|
79
|
-
__metadata("design:paramtypes", [Object, Object, Object, Function])
|
|
80
|
-
], RebaseFeatureOnMainUseCase);
|
|
81
|
-
export { RebaseFeatureOnMainUseCase };
|
package/dist/packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sync Repository Main Use Case
|
|
3
|
-
*
|
|
4
|
-
* Syncs a repository's local main branch with the remote.
|
|
5
|
-
* Resolves the repository by ID, determines its path and default branch,
|
|
6
|
-
* then delegates to IGitPrService.syncMain().
|
|
7
|
-
*/
|
|
8
|
-
import type { IRepositoryRepository } from '../../ports/output/repositories/repository-repository.interface.js';
|
|
9
|
-
import type { IGitPrService } from '../../ports/output/services/git-pr-service.interface.js';
|
|
10
|
-
export declare class SyncRepositoryMainUseCase {
|
|
11
|
-
private readonly repositoryRepo;
|
|
12
|
-
private readonly gitPrService;
|
|
13
|
-
constructor(repositoryRepo: IRepositoryRepository, gitPrService: IGitPrService);
|
|
14
|
-
execute(repoId: string): Promise<void>;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=sync-repository-main.use-case.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sync-repository-main.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAC;AAChH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yDAAyD,CAAC;AAE7F,qBACa,yBAAyB;IAGlC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAFZ,cAAc,EAAE,qBAAqB,EAErC,YAAY,EAAE,aAAa;IAGxC,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAS7C"}
|
package/dist/packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sync Repository Main Use Case
|
|
3
|
-
*
|
|
4
|
-
* Syncs a repository's local main branch with the remote.
|
|
5
|
-
* Resolves the repository by ID, determines its path and default branch,
|
|
6
|
-
* then delegates to IGitPrService.syncMain().
|
|
7
|
-
*/
|
|
8
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
9
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
10
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
11
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
12
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
13
|
-
};
|
|
14
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
15
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
16
|
-
};
|
|
17
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
18
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
19
|
-
};
|
|
20
|
-
import { injectable, inject } from 'tsyringe';
|
|
21
|
-
let SyncRepositoryMainUseCase = class SyncRepositoryMainUseCase {
|
|
22
|
-
repositoryRepo;
|
|
23
|
-
gitPrService;
|
|
24
|
-
constructor(repositoryRepo, gitPrService) {
|
|
25
|
-
this.repositoryRepo = repositoryRepo;
|
|
26
|
-
this.gitPrService = gitPrService;
|
|
27
|
-
}
|
|
28
|
-
async execute(repoId) {
|
|
29
|
-
const repository = await this.repositoryRepo.findById(repoId);
|
|
30
|
-
if (!repository) {
|
|
31
|
-
throw new Error(`Repository not found: "${repoId}"`);
|
|
32
|
-
}
|
|
33
|
-
const defaultBranch = await this.gitPrService.getDefaultBranch(repository.path);
|
|
34
|
-
await this.gitPrService.syncMain(repository.path, defaultBranch);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
SyncRepositoryMainUseCase = __decorate([
|
|
38
|
-
injectable(),
|
|
39
|
-
__param(0, inject('IRepositoryRepository')),
|
|
40
|
-
__param(1, inject('IGitPrService')),
|
|
41
|
-
__metadata("design:paramtypes", [Object, Object])
|
|
42
|
-
], SyncRepositoryMainUseCase);
|
|
43
|
-
export { SyncRepositoryMainUseCase };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conflict Resolution Prompt Builder
|
|
3
|
-
*
|
|
4
|
-
* Builds prompts for the AI agent to resolve git rebase conflicts.
|
|
5
|
-
* Follows the merge-prompts.ts pattern of pure functions returning
|
|
6
|
-
* markdown strings.
|
|
7
|
-
*/
|
|
8
|
-
export interface ConflictedFile {
|
|
9
|
-
/** Relative file path from repo root */
|
|
10
|
-
path: string;
|
|
11
|
-
/** Full file contents including conflict markers */
|
|
12
|
-
content: string;
|
|
13
|
-
}
|
|
14
|
-
export interface ConflictResolutionPromptParams {
|
|
15
|
-
/** Files with conflict markers */
|
|
16
|
-
conflictedFiles: ConflictedFile[];
|
|
17
|
-
/** The feature branch being rebased */
|
|
18
|
-
featureBranch: string;
|
|
19
|
-
/** The base branch being rebased onto */
|
|
20
|
-
baseBranch: string;
|
|
21
|
-
/** 1-based attempt number */
|
|
22
|
-
attemptNumber: number;
|
|
23
|
-
/** Maximum allowed attempts */
|
|
24
|
-
maxAttempts: number;
|
|
25
|
-
/** Feedback from previous failed attempt (remaining markers info) */
|
|
26
|
-
previousFeedback?: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Build a prompt for the conflict resolution agent.
|
|
30
|
-
*
|
|
31
|
-
* The agent receives conflicted file contents and instructions to resolve
|
|
32
|
-
* all conflict markers by editing files in the working directory.
|
|
33
|
-
*/
|
|
34
|
-
export declare function buildConflictResolutionPrompt(params: ConflictResolutionPromptParams): string;
|
|
35
|
-
//# sourceMappingURL=conflict-resolution.prompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conflict-resolution.prompt.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,8BAA8B;IAC7C,kCAAkC;IAClC,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,uCAAuC;IACvC,aAAa,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,8BAA8B,GAAG,MAAM,CAgE5F"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conflict Resolution Prompt Builder
|
|
3
|
-
*
|
|
4
|
-
* Builds prompts for the AI agent to resolve git rebase conflicts.
|
|
5
|
-
* Follows the merge-prompts.ts pattern of pure functions returning
|
|
6
|
-
* markdown strings.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Build a prompt for the conflict resolution agent.
|
|
10
|
-
*
|
|
11
|
-
* The agent receives conflicted file contents and instructions to resolve
|
|
12
|
-
* all conflict markers by editing files in the working directory.
|
|
13
|
-
*/
|
|
14
|
-
export function buildConflictResolutionPrompt(params) {
|
|
15
|
-
const { conflictedFiles, featureBranch, baseBranch, attemptNumber, maxAttempts, previousFeedback, } = params;
|
|
16
|
-
const fileSection = conflictedFiles
|
|
17
|
-
.map((f) => `### \`${f.path}\`
|
|
18
|
-
|
|
19
|
-
\`\`\`
|
|
20
|
-
${f.content}
|
|
21
|
-
\`\`\``)
|
|
22
|
-
.join('\n\n');
|
|
23
|
-
const feedbackSection = previousFeedback
|
|
24
|
-
? `
|
|
25
|
-
## Previous Attempt Feedback
|
|
26
|
-
|
|
27
|
-
Your previous resolution attempt (${attemptNumber - 1}/${maxAttempts}) was incomplete:
|
|
28
|
-
|
|
29
|
-
${previousFeedback}
|
|
30
|
-
|
|
31
|
-
You MUST resolve all remaining conflict markers in this attempt.
|
|
32
|
-
`
|
|
33
|
-
: '';
|
|
34
|
-
return `You are resolving git rebase conflicts (attempt ${attemptNumber}/${maxAttempts}).
|
|
35
|
-
|
|
36
|
-
## Branch Context
|
|
37
|
-
|
|
38
|
-
- Feature branch: \`${featureBranch}\`
|
|
39
|
-
- Base branch: \`${baseBranch}\`
|
|
40
|
-
- The feature branch is being rebased onto the latest \`${baseBranch}\`.
|
|
41
|
-
${feedbackSection}
|
|
42
|
-
## Conflicted Files
|
|
43
|
-
|
|
44
|
-
The following files contain conflict markers that must be resolved:
|
|
45
|
-
|
|
46
|
-
${fileSection}
|
|
47
|
-
|
|
48
|
-
## Instructions
|
|
49
|
-
|
|
50
|
-
1. Read each conflicted file listed above
|
|
51
|
-
2. Resolve ALL conflict markers (\`<<<<<<<\`, \`=======\`, \`>>>>>>>\`) by editing the files
|
|
52
|
-
3. For each conflict, determine the correct resolution by understanding the intent of both sides:
|
|
53
|
-
- The \`<<<<<<< HEAD\` section contains changes from \`${baseBranch}\` (theirs during rebase)
|
|
54
|
-
- The \`>>>>>>> ...\` section contains changes from \`${featureBranch}\` (ours during rebase)
|
|
55
|
-
4. Produce a merged result that preserves the intent of both sides where possible
|
|
56
|
-
5. If the changes conflict logically (not just textually), prefer the feature branch changes but ensure compatibility with the base branch
|
|
57
|
-
|
|
58
|
-
## Constraints
|
|
59
|
-
|
|
60
|
-
- Edit ONLY the conflicted files listed above — do NOT modify any other files
|
|
61
|
-
- Remove ALL conflict markers (\`<<<<<<<\`, \`=======\`, \`>>>>>>>\`) from every conflicted file
|
|
62
|
-
- Do NOT add new files or delete files
|
|
63
|
-
- Do NOT run git commands — only edit files to resolve conflicts
|
|
64
|
-
- Do NOT run tests, builds, or linters — only resolve the conflict markers
|
|
65
|
-
- Every conflicted file must have zero remaining conflict markers when you are done`;
|
|
66
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conflict Resolution Service
|
|
3
|
-
*
|
|
4
|
-
* Orchestrates agent-powered conflict resolution during git rebase.
|
|
5
|
-
* Follows the CI watch/fix loop pattern: detect conflict → invoke agent →
|
|
6
|
-
* validate resolution → stage files → continue rebase, with retry logic.
|
|
7
|
-
*/
|
|
8
|
-
import type { IAgentExecutorProvider } from '../../../../application/ports/output/agents/agent-executor-provider.interface.js';
|
|
9
|
-
import type { IGitPrService } from '../../../../application/ports/output/services/git-pr-service.interface.js';
|
|
10
|
-
export declare class ConflictResolutionService {
|
|
11
|
-
private readonly agentProvider;
|
|
12
|
-
private readonly gitPrService;
|
|
13
|
-
constructor(agentProvider: IAgentExecutorProvider, gitPrService: IGitPrService);
|
|
14
|
-
/**
|
|
15
|
-
* Resolve all conflicts during a rebase operation.
|
|
16
|
-
*
|
|
17
|
-
* Handles multi-commit rebases where each commit may introduce conflicts.
|
|
18
|
-
* For each conflicted commit: reads conflicted files, invokes agent to
|
|
19
|
-
* resolve, validates no remaining markers, stages resolved files, and
|
|
20
|
-
* continues the rebase. Retries up to MAX_RETRIES_PER_COMMIT times.
|
|
21
|
-
*
|
|
22
|
-
* If retries are exhausted, aborts the rebase and throws REBASE_CONFLICT.
|
|
23
|
-
*
|
|
24
|
-
* @param cwd - Working directory (repo root or worktree path)
|
|
25
|
-
* @param featureBranch - Feature branch being rebased
|
|
26
|
-
* @param baseBranch - Base branch being rebased onto
|
|
27
|
-
*/
|
|
28
|
-
resolve(cwd: string, featureBranch: string, baseBranch: string): Promise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* Read the contents of conflicted files from the working directory.
|
|
31
|
-
*/
|
|
32
|
-
private readConflictedFileContents;
|
|
33
|
-
/**
|
|
34
|
-
* Validate that no conflict markers remain in the previously-conflicted files.
|
|
35
|
-
*/
|
|
36
|
-
private validateResolution;
|
|
37
|
-
/**
|
|
38
|
-
* Build feedback about remaining conflict markers for retry attempts.
|
|
39
|
-
*/
|
|
40
|
-
private buildFeedbackFromRemainingMarkers;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=conflict-resolution.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conflict-resolution.service.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wEAAwE,CAAC;AACrH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iEAAiE,CAAC;AAerG,qBACa,yBAAyB;IAGlC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAFZ,aAAa,EAAE,sBAAsB,EAErC,YAAY,EAAE,aAAa;IAG9C;;;;;;;;;;;;;OAaG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkEpF;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAWlC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAgB1B;;OAEG;IACH,OAAO,CAAC,iCAAiC;CAyB1C"}
|