@shepai/cli 1.122.2-pr395.d35739a → 1.123.0-pr394.80f3f1f
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/repositories/feature-repository.interface.d.ts +11 -0
- package/dist/packages/core/src/application/ports/output/repositories/feature-repository.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +1 -55
- 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 +0 -2
- package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts +25 -0
- package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.d.ts +40 -0
- package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.js +146 -0
- package/dist/packages/core/src/application/use-cases/features/branch-name-utils.d.ts +33 -0
- package/dist/packages/core/src/application/use-cases/features/branch-name-utils.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/features/branch-name-utils.js +77 -0
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +5 -10
- package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.js +8 -0
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +0 -9
- 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 -93
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts +2 -0
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.js +39 -0
- package/dist/src/presentation/cli/commands/feat/adopt.command.d.ts +14 -0
- package/dist/src/presentation/cli/commands/feat/adopt.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/feat/adopt.command.js +43 -0
- package/dist/src/presentation/cli/commands/feat/index.js +2 -2
- package/dist/src/presentation/cli/commands/repo/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/repo/index.js +1 -3
- package/dist/src/presentation/web/app/(dashboard)/@drawer/adopt/page.d.ts +10 -0
- package/dist/src/presentation/web/app/(dashboard)/@drawer/adopt/page.d.ts.map +1 -0
- package/dist/src/presentation/web/app/(dashboard)/@drawer/adopt/page.js +22 -0
- package/dist/src/presentation/web/app/actions/adopt-branch.d.ts +11 -0
- package/dist/src/presentation/web/app/actions/adopt-branch.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/adopt-branch.js +20 -0
- package/dist/src/presentation/web/app/actions/list-branches.d.ts +6 -0
- package/dist/src/presentation/web/app/actions/list-branches.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/list-branches.js +18 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.d.ts +13 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.js +69 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.d.ts +35 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.js +135 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.d.ts +5 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-drawer-client.js +69 -0
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.js +12 -3
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +1 -0
- package/web/.next/build-manifest.json +4 -4
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -2
- package/web/.next/required-server-files.json +2 -2
- package/web/.next/routes-manifest.json +6 -0
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/app-paths-manifest.json +3 -0
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/build-manifest.json +18 -0
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/next-font-manifest.json +6 -0
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/react-loadable-manifest.json +1 -0
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +335 -0
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +20 -0
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.map +5 -0
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -0
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +2 -0
- package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +22 -22
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +28 -28
- 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/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
- 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/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +22 -22
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +20 -20
- 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/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +20 -20
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/skills/page.js +4 -4
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- 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/app-paths-manifest.json +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_client_components_94d75bc3._.js +3 -0
- package/web/.next/server/chunks/ssr/403f9_next_dist_client_components_94d75bc3._.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_cfc9281c.js +3 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_cfc9281c.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__02c84e6b._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__02c84e6b._.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]__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 +1 -1
- package/web/.next/server/chunks/ssr/[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 +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9e8b25ad._.js.map +1 -1
- 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 +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aed1d6f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ce6057f6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ce6057f6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e2227c0f._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e2227c0f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f0589cc3._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f0589cc3._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_037585d1._.js +3 -0
- package/web/.next/server/chunks/ssr/_037585d1._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0a97d643._.js +3 -0
- package/web/.next/server/chunks/ssr/_0a97d643._.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/_19a2fb35._.js +3 -0
- package/web/.next/server/chunks/ssr/_19a2fb35._.js.map +1 -0
- 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/_4093a637._.js +5 -0
- package/web/.next/server/chunks/ssr/_4093a637._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_583a83fb._.js +3 -0
- package/web/.next/server/chunks/ssr/_583a83fb._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_59905c6b._.js → _60922fc4._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_59905c6b._.js.map → _60922fc4._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_9f56cf8f._.js +3 -0
- package/web/.next/server/chunks/ssr/_9f56cf8f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_a187fd7e._.js +3 -0
- package/web/.next/server/chunks/ssr/_a187fd7e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_a5aa6371._.js +9 -0
- package/web/.next/server/chunks/ssr/_a5aa6371._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_a9f57758._.js +3 -0
- package/web/.next/server/chunks/ssr/_a9f57758._.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/_d5206f22._.js +4 -0
- package/web/.next/server/chunks/ssr/_d5206f22._.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/f7870_sonner_dist_index_mjs_dbf63824._.js +3 -0
- package/web/.next/server/chunks/ssr/f7870_sonner_dist_index_mjs_dbf63824._.js.map +1 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_026172d1._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_026172d1._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_5f039db1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_7a78701e._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_7a78701e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js.map +1 -1
- 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 +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_c4337169._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/middleware-build-manifest.js +2 -2
- 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 +204 -34
- package/web/.next/static/chunks/{16c125d4054dae40.js → 14d6411c627ccc15.js} +3 -3
- package/web/.next/static/chunks/26110def6c1641a5.js +1 -0
- package/web/.next/static/chunks/{4aadcf496c0c45da.js → 2dade33cf8b0e03e.js} +1 -1
- package/web/.next/static/chunks/3e3e9c6552a6574f.css +1 -0
- package/web/.next/static/chunks/44e35ac2426a1bd0.js +1 -0
- package/web/.next/static/chunks/6295f27fe47da052.js +1 -0
- package/web/.next/static/chunks/8080c842b0358904.js +1 -0
- package/web/.next/static/chunks/{ed3a602003bcb31b.js → 89aac43287d73b02.js} +1 -1
- package/web/.next/static/chunks/8c50a0b7a7d9a4d5.js +1 -0
- package/web/.next/static/chunks/{5738cc053b378225.js → 9fe8af38605fa69a.js} +1 -1
- package/web/.next/static/chunks/a73b4cc8c0548c91.js +1 -0
- package/web/.next/static/chunks/a8ba3f3e2b0f87aa.js +1 -0
- package/web/.next/static/chunks/{47030173ef438c4c.js → b626e6ad69805e9a.js} +2 -2
- package/web/.next/static/chunks/d04de4be30ab78ca.js +3 -0
- package/web/.next/static/chunks/{44ec09b4f33c494d.js → e1de6b08082f5365.js} +1 -1
- package/web/.next/static/chunks/{28882fc716f51419.js → e413cc49d94d7093.js} +2 -2
- package/web/.next/static/chunks/{3c8f903477aacd29.js → fc45997b8b835378.js} +1 -1
- package/web/.next/static/chunks/{turbopack-426d9bc2450816ba.js → turbopack-080e470ea902d0ba.js} +1 -1
- package/dist/packages/core/src/application/use-cases/features/rebase-feature.use-case.d.ts +0 -21
- package/dist/packages/core/src/application/use-cases/features/rebase-feature.use-case.d.ts.map +0 -1
- package/dist/packages/core/src/application/use-cases/features/rebase-feature.use-case.js +0 -58
- package/dist/packages/core/src/application/use-cases/sync-fork-main.use-case.d.ts +0 -18
- package/dist/packages/core/src/application/use-cases/sync-fork-main.use-case.d.ts.map +0 -1
- package/dist/packages/core/src/application/use-cases/sync-fork-main.use-case.js +0 -40
- package/dist/src/presentation/cli/commands/feat/rebase.command.d.ts +0 -13
- package/dist/src/presentation/cli/commands/feat/rebase.command.d.ts.map +0 -1
- package/dist/src/presentation/cli/commands/feat/rebase.command.js +0 -45
- package/dist/src/presentation/cli/commands/repo/sync.command.d.ts +0 -12
- package/dist/src/presentation/cli/commands/repo/sync.command.d.ts.map +0 -1
- package/dist/src/presentation/cli/commands/repo/sync.command.js +0 -38
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_d0119342._.js +0 -3
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_d0119342._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__52485955._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__52485955._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_3a4c94e3._.js +0 -3
- package/web/.next/server/chunks/ssr/_3a4c94e3._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_6d26a08f._.js +0 -3
- package/web/.next/server/chunks/ssr/_6d26a08f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_8042b250._.js +0 -3
- package/web/.next/server/chunks/ssr/_8042b250._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_9ac70f88._.js +0 -5
- package/web/.next/server/chunks/ssr/_9ac70f88._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_b56e7571._.js +0 -3
- package/web/.next/server/chunks/ssr/_b56e7571._.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 +0 -9
- 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_7df6451f._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_7df6451f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js.map +0 -1
- package/web/.next/static/chunks/0b7e384fe33dc5d4.js +0 -1
- package/web/.next/static/chunks/2d718a04eb97fa9c.js +0 -1
- package/web/.next/static/chunks/303a1217006489b9.js +0 -1
- package/web/.next/static/chunks/3925626b99dcd57a.css +0 -1
- package/web/.next/static/chunks/4443ee9c7733399b.js +0 -1
- package/web/.next/static/chunks/52b56677c842e45f.js +0 -3
- package/web/.next/static/chunks/6bc9ac207dab5ad3.js +0 -1
- package/web/.next/static/chunks/dbbb446493f21874.js +0 -1
- /package/web/.next/static/{8e_LzmibF0x2F_XwXUjHz → -FOfzDf8kOTPigHYVlPm4}/_buildManifest.js +0 -0
- /package/web/.next/static/{8e_LzmibF0x2F_XwXUjHz → -FOfzDf8kOTPigHYVlPm4}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{8e_LzmibF0x2F_XwXUjHz → -FOfzDf8kOTPigHYVlPm4}/_ssgManifest.js +0 -0
|
@@ -652,99 +652,6 @@ let GitPrService = class GitPrService {
|
|
|
652
652
|
commitCount,
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
|
-
async isFork(cwd) {
|
|
656
|
-
try {
|
|
657
|
-
const { stdout } = await this.execFile('gh', ['repo', 'view', '--json', 'parent', '--jq', '.parent.url'], { cwd });
|
|
658
|
-
const url = stdout.trim();
|
|
659
|
-
if (!url || url === 'null') {
|
|
660
|
-
return { isFork: false };
|
|
661
|
-
}
|
|
662
|
-
return { isFork: true, upstreamUrl: url };
|
|
663
|
-
}
|
|
664
|
-
catch {
|
|
665
|
-
return { isFork: false };
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
async ensureUpstreamRemote(cwd, upstreamUrl) {
|
|
669
|
-
try {
|
|
670
|
-
await this.execFile('git', ['remote', 'get-url', 'upstream'], { cwd });
|
|
671
|
-
// Remote already exists — no-op
|
|
672
|
-
}
|
|
673
|
-
catch {
|
|
674
|
-
// Remote does not exist — add it
|
|
675
|
-
try {
|
|
676
|
-
await this.execFile('git', ['remote', 'add', 'upstream', upstreamUrl], { cwd });
|
|
677
|
-
}
|
|
678
|
-
catch (error) {
|
|
679
|
-
throw this.parseGitError(error);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
async fetchUpstream(cwd) {
|
|
684
|
-
try {
|
|
685
|
-
await this.execFile('git', ['fetch', 'upstream'], { cwd });
|
|
686
|
-
}
|
|
687
|
-
catch (error) {
|
|
688
|
-
throw this.parseGitError(error);
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
async syncForkMain(cwd) {
|
|
692
|
-
// Save current branch to restore after sync
|
|
693
|
-
let currentBranch;
|
|
694
|
-
try {
|
|
695
|
-
const { stdout } = await this.execFile('git', ['symbolic-ref', '--short', 'HEAD'], { cwd });
|
|
696
|
-
currentBranch = stdout.trim();
|
|
697
|
-
}
|
|
698
|
-
catch {
|
|
699
|
-
// Detached HEAD — save commit hash instead
|
|
700
|
-
const { stdout } = await this.execFile('git', ['rev-parse', 'HEAD'], { cwd });
|
|
701
|
-
currentBranch = stdout.trim();
|
|
702
|
-
}
|
|
703
|
-
try {
|
|
704
|
-
await this.fetchUpstream(cwd);
|
|
705
|
-
await this.execFile('git', ['checkout', 'main'], { cwd });
|
|
706
|
-
await this.execFile('git', ['reset', '--hard', 'upstream/main'], { cwd });
|
|
707
|
-
}
|
|
708
|
-
finally {
|
|
709
|
-
// Restore previous branch even if sync partially fails
|
|
710
|
-
try {
|
|
711
|
-
await this.execFile('git', ['checkout', currentBranch], { cwd });
|
|
712
|
-
}
|
|
713
|
-
catch {
|
|
714
|
-
// best effort — ignore restore failure
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
async rebase(cwd, branch, onto) {
|
|
719
|
-
try {
|
|
720
|
-
await this.execFile('git', ['rebase', onto], { cwd });
|
|
721
|
-
}
|
|
722
|
-
catch (error) {
|
|
723
|
-
// Extract stdout/stderr from the exec error to find conflict file names
|
|
724
|
-
const stdout = error.stdout ?? '';
|
|
725
|
-
const stderr = error.stderr ?? '';
|
|
726
|
-
const combined = `${stdout}\n${stderr}`;
|
|
727
|
-
const conflictFiles = this.parseConflictFiles(combined);
|
|
728
|
-
// Abort to keep the worktree clean
|
|
729
|
-
try {
|
|
730
|
-
await this.execFile('git', ['rebase', '--abort'], { cwd });
|
|
731
|
-
}
|
|
732
|
-
catch {
|
|
733
|
-
// abort is best-effort — ignore failure
|
|
734
|
-
}
|
|
735
|
-
if (conflictFiles.length > 0) {
|
|
736
|
-
const fileList = conflictFiles.map((f) => ` - ${f}`).join('\n');
|
|
737
|
-
throw new GitPrError(`Rebase of '${branch}' onto '${onto}' failed due to conflicts.\n` +
|
|
738
|
-
`Conflicting files:\n${fileList}\n\n` +
|
|
739
|
-
`Resolve the conflicts manually then re-run the rebase command.`, GitPrErrorCode.REBASE_CONFLICT, error instanceof Error ? error : undefined);
|
|
740
|
-
}
|
|
741
|
-
throw this.parseGitError(error);
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
parseConflictFiles(output) {
|
|
745
|
-
const matches = output.matchAll(/CONFLICT \(content\): Merge conflict in (.+)/g);
|
|
746
|
-
return [...matches].map((m) => m[1].trim());
|
|
747
|
-
}
|
|
748
655
|
};
|
|
749
656
|
GitPrService = __decorate([
|
|
750
657
|
injectable(),
|
|
@@ -18,12 +18,14 @@ export declare class WorktreeService implements IWorktreeService {
|
|
|
18
18
|
private readonly execFile;
|
|
19
19
|
constructor(execFile: ExecFunction);
|
|
20
20
|
create(repoPath: string, branch: string, worktreePath: string, startPoint?: string): Promise<WorktreeInfo>;
|
|
21
|
+
addExisting(repoPath: string, branch: string, worktreePath: string): Promise<WorktreeInfo>;
|
|
21
22
|
remove(repoPath: string, worktreePath: string, force?: boolean): Promise<void>;
|
|
22
23
|
prune(repoPath: string): Promise<void>;
|
|
23
24
|
list(repoPath: string): Promise<WorktreeInfo[]>;
|
|
24
25
|
exists(repoPath: string, branch: string): Promise<boolean>;
|
|
25
26
|
branchExists(repoPath: string, branch: string): Promise<boolean>;
|
|
26
27
|
remoteBranchExists(repoPath: string, branch: string): Promise<boolean>;
|
|
28
|
+
listBranches(repoPath: string): Promise<string[]>;
|
|
27
29
|
ensureGitRepository(repoPath: string): Promise<void>;
|
|
28
30
|
getWorktreePath(repoPath: string, branch: string): string;
|
|
29
31
|
private parseWorktreeOutput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/worktree.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,0EAA0E,CAAC;AAQlF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE,MAAM,KACb,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjD,qBACa,eAAgB,YAAW,gBAAgB;IAClB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,MAAM,CACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,CAAC;IAuBlB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAW9E,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQtC,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAO/C,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK1D,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWhE,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWtE,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwC1D,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAQzD,OAAO,CAAC,mBAAmB;IA2B3B,OAAO,CAAC,aAAa;IAgCrB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,qBAAqB;CAsB9B"}
|
|
1
|
+
{"version":3,"file":"worktree.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/worktree.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,0EAA0E,CAAC;AAQlF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE,MAAM,KACb,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjD,qBACa,eAAgB,YAAW,gBAAgB;IAClB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,MAAM,CACV,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,CAAC;IAuBlB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAoB1F,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAW9E,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQtC,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAO/C,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK1D,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWhE,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWtE,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAuBjD,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwC1D,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAQzD,OAAO,CAAC,mBAAmB;IA2B3B,OAAO,CAAC,aAAa;IAgCrB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,qBAAqB;CAsB9B"}
|
|
@@ -50,6 +50,21 @@ let WorktreeService = class WorktreeService {
|
|
|
50
50
|
}
|
|
51
51
|
return created;
|
|
52
52
|
}
|
|
53
|
+
async addExisting(repoPath, branch, worktreePath) {
|
|
54
|
+
try {
|
|
55
|
+
await this.execFile('git', ['worktree', 'add', worktreePath, branch], { cwd: repoPath });
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
throw this.parseGitError(error);
|
|
59
|
+
}
|
|
60
|
+
const worktrees = await this.list(repoPath);
|
|
61
|
+
const created = worktrees.find((w) => w.branch === branch) ??
|
|
62
|
+
worktrees.find((w) => this.arePathsEquivalent(w.path, worktreePath));
|
|
63
|
+
if (!created) {
|
|
64
|
+
throw new WorktreeError('Worktree created but not found in list', WorktreeErrorCode.GIT_ERROR);
|
|
65
|
+
}
|
|
66
|
+
return created;
|
|
67
|
+
}
|
|
53
68
|
async remove(repoPath, worktreePath, force) {
|
|
54
69
|
try {
|
|
55
70
|
const args = ['worktree', 'remove'];
|
|
@@ -102,6 +117,30 @@ let WorktreeService = class WorktreeService {
|
|
|
102
117
|
return false;
|
|
103
118
|
}
|
|
104
119
|
}
|
|
120
|
+
async listBranches(repoPath) {
|
|
121
|
+
try {
|
|
122
|
+
const { stdout } = await this.execFile('git', ['branch', '-a', '--format=%(refname:short)'], {
|
|
123
|
+
cwd: repoPath,
|
|
124
|
+
});
|
|
125
|
+
const seen = new Set();
|
|
126
|
+
const branches = [];
|
|
127
|
+
for (const line of stdout.split('\n')) {
|
|
128
|
+
const trimmed = line.trim();
|
|
129
|
+
if (!trimmed || trimmed === 'origin/HEAD' || trimmed.startsWith('origin/HEAD ->'))
|
|
130
|
+
continue;
|
|
131
|
+
// Strip "origin/" prefix for remote branches
|
|
132
|
+
const name = trimmed.startsWith('origin/') ? trimmed.slice('origin/'.length) : trimmed;
|
|
133
|
+
if (!seen.has(name)) {
|
|
134
|
+
seen.add(name);
|
|
135
|
+
branches.push(name);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return branches.sort();
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
return [];
|
|
142
|
+
}
|
|
143
|
+
}
|
|
105
144
|
async ensureGitRepository(repoPath) {
|
|
106
145
|
let isExistingRepo = false;
|
|
107
146
|
try {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Adopt Command
|
|
3
|
+
*
|
|
4
|
+
* Adopts an existing git branch into Shep's feature tracking system.
|
|
5
|
+
* Creates a worktree (if needed), derives metadata from the branch name,
|
|
6
|
+
* and persists a Feature with lifecycle=Maintain (agent inactive).
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* shep feat adopt <branch>
|
|
10
|
+
* shep feat adopt <branch> -r /path/to/repo
|
|
11
|
+
*/
|
|
12
|
+
import { Command } from 'commander';
|
|
13
|
+
export declare function createAdoptCommand(): Command;
|
|
14
|
+
//# sourceMappingURL=adopt.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adopt.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/adopt.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,kBAAkB,IAAI,OAAO,CA6B5C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Adopt Command
|
|
3
|
+
*
|
|
4
|
+
* Adopts an existing git branch into Shep's feature tracking system.
|
|
5
|
+
* Creates a worktree (if needed), derives metadata from the branch name,
|
|
6
|
+
* and persists a Feature with lifecycle=Maintain (agent inactive).
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* shep feat adopt <branch>
|
|
10
|
+
* shep feat adopt <branch> -r /path/to/repo
|
|
11
|
+
*/
|
|
12
|
+
import { Command } from 'commander';
|
|
13
|
+
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
14
|
+
import { AdoptBranchUseCase } from '../../../../../packages/core/src/application/use-cases/features/adopt-branch.use-case.js';
|
|
15
|
+
import { colors, messages, spinner } from '../../ui/index.js';
|
|
16
|
+
export function createAdoptCommand() {
|
|
17
|
+
return new Command('adopt')
|
|
18
|
+
.description('Adopt an existing branch as a tracked feature')
|
|
19
|
+
.argument('<branch>', 'Branch name to adopt')
|
|
20
|
+
.option('-r, --repo <path>', 'Repository path (defaults to cwd)')
|
|
21
|
+
.action(async (branch, options) => {
|
|
22
|
+
try {
|
|
23
|
+
const useCase = container.resolve(AdoptBranchUseCase);
|
|
24
|
+
const { feature } = await spinner('Adopting branch', () => useCase.execute({
|
|
25
|
+
branchName: branch,
|
|
26
|
+
repositoryPath: options.repo ?? process.cwd(),
|
|
27
|
+
}));
|
|
28
|
+
messages.newline();
|
|
29
|
+
messages.success('Branch adopted');
|
|
30
|
+
console.log(` ${colors.muted('ID:')} ${colors.accent(feature.id.slice(0, 8))}`);
|
|
31
|
+
console.log(` ${colors.muted('Name:')} ${feature.name}`);
|
|
32
|
+
console.log(` ${colors.muted('Branch:')} ${colors.accent(feature.branch)}`);
|
|
33
|
+
console.log(` ${colors.muted('Status:')} ${feature.lifecycle}`);
|
|
34
|
+
console.log(` ${colors.muted('Worktree:')} ${colors.accent(feature.worktreePath ?? '')}`);
|
|
35
|
+
messages.newline();
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
39
|
+
messages.error('Failed to adopt branch', err);
|
|
40
|
+
process.exitCode = 1;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
@@ -20,7 +20,7 @@ import { createReviewCommand } from './review.command.js';
|
|
|
20
20
|
import { createApproveCommand } from './approve.command.js';
|
|
21
21
|
import { createRejectCommand } from './reject.command.js';
|
|
22
22
|
import { createLogsCommand } from './logs.command.js';
|
|
23
|
-
import {
|
|
23
|
+
import { createAdoptCommand } from './adopt.command.js';
|
|
24
24
|
/**
|
|
25
25
|
* Create the feat command group
|
|
26
26
|
*/
|
|
@@ -37,5 +37,5 @@ export function createFeatCommand() {
|
|
|
37
37
|
.addCommand(createApproveCommand())
|
|
38
38
|
.addCommand(createRejectCommand())
|
|
39
39
|
.addCommand(createLogsCommand())
|
|
40
|
-
.addCommand(
|
|
40
|
+
.addCommand(createAdoptCommand());
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/repo/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/repo/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAO3C"}
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
import { Command } from 'commander';
|
|
14
14
|
import { createShowCommand } from './show.command.js';
|
|
15
15
|
import { createLsCommand } from './ls.command.js';
|
|
16
|
-
import { createSyncCommand } from './sync.command.js';
|
|
17
16
|
/**
|
|
18
17
|
* Create the repo command with all subcommands
|
|
19
18
|
*/
|
|
@@ -21,7 +20,6 @@ export function createRepoCommand() {
|
|
|
21
20
|
const repo = new Command('repo')
|
|
22
21
|
.description('Manage tracked repositories')
|
|
23
22
|
.addCommand(createLsCommand())
|
|
24
|
-
.addCommand(createShowCommand())
|
|
25
|
-
.addCommand(createSyncCommand());
|
|
23
|
+
.addCommand(createShowCommand());
|
|
26
24
|
return repo;
|
|
27
25
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Skip static pre-rendering since we need runtime DI container. */
|
|
2
|
+
export declare const dynamic = "force-dynamic";
|
|
3
|
+
interface AdoptDrawerPageProps {
|
|
4
|
+
searchParams: Promise<{
|
|
5
|
+
repo?: string;
|
|
6
|
+
}>;
|
|
7
|
+
}
|
|
8
|
+
export default function AdoptDrawerPage({ searchParams }: AdoptDrawerPageProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../src/presentation/web/app/(dashboard)/@drawer/adopt/page.tsx"],"names":[],"mappings":"AAIA,oEAAoE;AACpE,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,UAAU,oBAAoB;IAC5B,YAAY,EAAE,OAAO,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1C;AAED,wBAA8B,eAAe,CAAC,EAAE,YAAY,EAAE,EAAE,oBAAoB,oDAkBnF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { resolve } from '../../../../lib/server-container.js';
|
|
3
|
+
import { AdoptDrawerClient } from '../../../../components/common/control-center-drawer/adopt-drawer-client.js';
|
|
4
|
+
/** Skip static pre-rendering since we need runtime DI container. */
|
|
5
|
+
export const dynamic = 'force-dynamic';
|
|
6
|
+
export default async function AdoptDrawerPage({ searchParams }) {
|
|
7
|
+
const { repo } = await searchParams;
|
|
8
|
+
let repositoryPath = repo ?? '';
|
|
9
|
+
if (!repositoryPath) {
|
|
10
|
+
try {
|
|
11
|
+
const listRepos = resolve('ListRepositoriesUseCase');
|
|
12
|
+
const repositories = await listRepos.execute();
|
|
13
|
+
if (repositories.length > 0) {
|
|
14
|
+
repositoryPath = repositories[0].path;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
// Fall through with empty path — server action will validate
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return _jsx(AdoptDrawerClient, { repositoryPath: repositoryPath });
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Feature } from '../../../../../packages/core/src/domain/generated/output.js';
|
|
2
|
+
interface AdoptBranchInput {
|
|
3
|
+
branchName: string;
|
|
4
|
+
repositoryPath: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function adoptBranch(input: AdoptBranchInput): Promise<{
|
|
7
|
+
feature?: Feature;
|
|
8
|
+
error?: string;
|
|
9
|
+
}>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=adopt-branch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adopt-branch.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/adopt-branch.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAEpE,UAAU,gBAAgB;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAsB,WAAW,CAC/B,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAkBhD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use server';
|
|
2
|
+
import { resolve } from '../../lib/server-container.js';
|
|
3
|
+
export async function adoptBranch(input) {
|
|
4
|
+
const { branchName, repositoryPath } = input;
|
|
5
|
+
if (!branchName?.trim()) {
|
|
6
|
+
return { error: 'Branch name is required' };
|
|
7
|
+
}
|
|
8
|
+
if (!repositoryPath?.trim()) {
|
|
9
|
+
return { error: 'Repository path is required' };
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
const useCase = resolve('AdoptBranchUseCase');
|
|
13
|
+
const result = await useCase.execute({ branchName, repositoryPath });
|
|
14
|
+
return { feature: result.feature };
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
const message = error instanceof Error ? error.message : 'Failed to adopt branch';
|
|
18
|
+
return { error: message };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server action that returns all branch names (local + remote) for a repository.
|
|
3
|
+
* Used by the adopt branch drawer to populate the branch combobox.
|
|
4
|
+
*/
|
|
5
|
+
export declare function listBranches(repositoryPath: string): Promise<string[]>;
|
|
6
|
+
//# sourceMappingURL=list-branches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-branches.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/list-branches.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,YAAY,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAW5E"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use server';
|
|
2
|
+
import { resolve } from '../../lib/server-container.js';
|
|
3
|
+
/**
|
|
4
|
+
* Server action that returns all branch names (local + remote) for a repository.
|
|
5
|
+
* Used by the adopt branch drawer to populate the branch combobox.
|
|
6
|
+
*/
|
|
7
|
+
export async function listBranches(repositoryPath) {
|
|
8
|
+
if (!repositoryPath?.trim()) {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
const worktreeService = resolve('IWorktreeService');
|
|
13
|
+
return await worktreeService.listBranches(repositoryPath);
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
}
|
package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface AdoptBranchDrawerProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
onSubmit: (branchName: string) => void;
|
|
5
|
+
isSubmitting?: boolean;
|
|
6
|
+
error?: string;
|
|
7
|
+
/** Available branch names for the combobox dropdown */
|
|
8
|
+
branches?: string[];
|
|
9
|
+
/** Whether branches are still loading */
|
|
10
|
+
branchesLoading?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function AdoptBranchDrawer({ open, onClose, onSubmit, isSubmitting, error, branches, branchesLoading, }: AdoptBranchDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=adopt-branch-drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adopt-branch-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.tsx"],"names":[],"mappings":"AAmBA,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,yCAAyC;IACzC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,YAAoB,EACpB,KAAK,EACL,QAAa,EACb,eAAuB,GACxB,EAAE,sBAAsB,2CAgNxB"}
|
package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useCallback, useEffect, useRef } from 'react';
|
|
4
|
+
import { Check, ChevronsUpDown, GitBranch, Loader2 } from 'lucide-react';
|
|
5
|
+
import { BaseDrawer } from '../../common/base-drawer/index.js';
|
|
6
|
+
import { DrawerTitle, DrawerDescription } from '../../ui/drawer.js';
|
|
7
|
+
import { Button } from '../../ui/button.js';
|
|
8
|
+
import { Label } from '../../ui/label.js';
|
|
9
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from '../../ui/command.js';
|
|
10
|
+
import { Popover, PopoverContent, PopoverTrigger } from '../../ui/popover.js';
|
|
11
|
+
import { cn } from '../../../lib/utils.js';
|
|
12
|
+
export function AdoptBranchDrawer({ open, onClose, onSubmit, isSubmitting = false, error, branches = [], branchesLoading = false, }) {
|
|
13
|
+
const [branchName, setBranchName] = useState('');
|
|
14
|
+
const [comboboxOpen, setComboboxOpen] = useState(false);
|
|
15
|
+
const [inputValue, setInputValue] = useState('');
|
|
16
|
+
const inputRef = useRef(null);
|
|
17
|
+
// Reset state when drawer closes
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (!open) {
|
|
20
|
+
setBranchName('');
|
|
21
|
+
setInputValue('');
|
|
22
|
+
setComboboxOpen(false);
|
|
23
|
+
}
|
|
24
|
+
}, [open]);
|
|
25
|
+
const handleSubmit = useCallback((e) => {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
const trimmed = branchName.trim();
|
|
28
|
+
if (!trimmed || isSubmitting)
|
|
29
|
+
return;
|
|
30
|
+
onSubmit(trimmed);
|
|
31
|
+
}, [branchName, isSubmitting, onSubmit]);
|
|
32
|
+
const handleClose = useCallback(() => {
|
|
33
|
+
setBranchName('');
|
|
34
|
+
setInputValue('');
|
|
35
|
+
onClose();
|
|
36
|
+
}, [onClose]);
|
|
37
|
+
const handleSelect = useCallback((branch) => {
|
|
38
|
+
setBranchName(branch);
|
|
39
|
+
setInputValue(branch);
|
|
40
|
+
setComboboxOpen(false);
|
|
41
|
+
}, []);
|
|
42
|
+
const handleInputChange = useCallback((e) => {
|
|
43
|
+
setInputValue(e.target.value);
|
|
44
|
+
if (!comboboxOpen)
|
|
45
|
+
setComboboxOpen(true);
|
|
46
|
+
}, [comboboxOpen]);
|
|
47
|
+
const handleInputKeyDown = useCallback((e) => {
|
|
48
|
+
if (e.key === 'Enter') {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
const trimmed = inputValue.trim();
|
|
51
|
+
if (trimmed) {
|
|
52
|
+
setBranchName(trimmed);
|
|
53
|
+
setComboboxOpen(false);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (e.key === 'Escape') {
|
|
57
|
+
setComboboxOpen(false);
|
|
58
|
+
setInputValue(branchName);
|
|
59
|
+
}
|
|
60
|
+
}, [inputValue, branchName]);
|
|
61
|
+
const filteredBranches = branches.filter((b) => b.toLowerCase().includes(inputValue.toLowerCase()));
|
|
62
|
+
const isDisabled = !branchName.trim() || isSubmitting;
|
|
63
|
+
const header = (_jsxs("div", { children: [_jsxs(DrawerTitle, { className: "flex items-center gap-2", children: [_jsx(GitBranch, { className: "h-4 w-4" }), "Adopt Branch"] }), _jsx(DrawerDescription, { className: "text-muted-foreground text-sm", children: "Import an existing git branch into Shep's feature tracking" })] }));
|
|
64
|
+
return (_jsx(BaseDrawer, { open: open, onClose: handleClose, size: "sm", modal: false, header: header, "data-testid": "adopt-branch-drawer", children: _jsxs("form", { onSubmit: handleSubmit, className: "flex flex-1 flex-col", children: [_jsx("div", { className: "flex-1 overflow-y-auto p-4", children: _jsxs("div", { className: "flex flex-col gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { htmlFor: "branch-name", children: "Branch name" }), _jsxs(Popover, { open: comboboxOpen, onOpenChange: setComboboxOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { variant: "outline", role: "combobox", "aria-expanded": comboboxOpen, disabled: isSubmitting, className: "w-full justify-between font-normal", "data-testid": "adopt-branch-input", children: [_jsx("span", { className: "truncate", children: branchesLoading ? 'Loading branches...' : branchName || 'Select a branch...' }), _jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }) }), _jsx(PopoverContent, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: _jsxs(Command, { children: [_jsx(CommandInput, { ref: inputRef, placeholder: "Search branches...", value: inputValue, onChange: handleInputChange, onKeyDown: handleInputKeyDown, "data-testid": "adopt-branch-search" }), _jsxs(CommandList, { children: [!branchesLoading && filteredBranches.length === 0 && (_jsx(CommandEmpty, { children: branches.length === 0
|
|
65
|
+
? 'No branches found.'
|
|
66
|
+
: inputValue
|
|
67
|
+
? 'No match — press Enter to use this value.'
|
|
68
|
+
: 'No branches available.' })), branchesLoading ? (_jsx(CommandEmpty, { children: _jsx(Loader2, { className: "mx-auto h-4 w-4 animate-spin" }) })) : null, filteredBranches.length > 0 && (_jsx(CommandGroup, { children: filteredBranches.map((branch) => (_jsxs(CommandItem, { selected: branch === branchName, onClick: () => handleSelect(branch), children: [_jsx(Check, { className: cn('mr-2 h-4 w-4', branch === branchName ? 'opacity-100' : 'opacity-0') }), _jsx(GitBranch, { className: "mr-2 h-3 w-3 opacity-50" }), branch] }, branch))) }))] })] }) })] }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Select a branch from the dropdown or type to search. Local and remote branches are shown." })] }), error ? (_jsx("p", { className: "text-destructive text-sm", "data-testid": "adopt-branch-error", children: error })) : null] }) }), _jsx("div", { className: "border-t p-4", children: _jsxs("div", { className: "flex gap-2", children: [_jsx(Button, { type: "button", variant: "outline", onClick: handleClose, disabled: isSubmitting, className: "flex-1", children: "Cancel" }), _jsx(Button, { type: "submit", disabled: isDisabled, className: "flex-1", "data-testid": "adopt-branch-submit", children: isSubmitting ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), "Adopting..."] })) : ('Adopt Branch') })] }) })] }) }));
|
|
69
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { AdoptBranchDrawer } from './adopt-branch-drawer.js';
|
|
3
|
+
/**
|
|
4
|
+
* **AdoptBranchDrawer** is a right-side sliding drawer for importing an
|
|
5
|
+
* existing git branch into Shep's feature tracking system.
|
|
6
|
+
*
|
|
7
|
+
* ### Form
|
|
8
|
+
* - **Branch name** (required) — combobox with search for selecting a branch
|
|
9
|
+
* - **Adopt Branch** button — disabled when no branch is selected or submitting
|
|
10
|
+
* - **Cancel** button — closes the drawer
|
|
11
|
+
*
|
|
12
|
+
* ### States
|
|
13
|
+
* - Default: no branch selected, submit disabled
|
|
14
|
+
* - Loading branches: combobox shows loading spinner
|
|
15
|
+
* - Loading submit: button shows spinner
|
|
16
|
+
* - Error: error message shown below combobox
|
|
17
|
+
*/
|
|
18
|
+
declare const meta: Meta<typeof AdoptBranchDrawer>;
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof AdoptBranchDrawer>;
|
|
21
|
+
/** Default — click the trigger button to open the adopt branch drawer with branch combobox. */
|
|
22
|
+
export declare const Default: Story;
|
|
23
|
+
/** Pre-opened drawer with branch combobox for quick visual inspection. */
|
|
24
|
+
export declare const PreOpened: Story;
|
|
25
|
+
/** Branches loading state — combobox shows "Loading branches..." */
|
|
26
|
+
export declare const BranchesLoading: Story;
|
|
27
|
+
/** Loading state — submit in progress, button shows spinner. */
|
|
28
|
+
export declare const Loading: Story;
|
|
29
|
+
/** Error state — error message visible below combobox. */
|
|
30
|
+
export declare const WithError: Story;
|
|
31
|
+
/** No branches available — empty state in the combobox dropdown. */
|
|
32
|
+
export declare const NoBranches: Story;
|
|
33
|
+
/** Adopt branch drawer rendered inside a full-page context — starts open. */
|
|
34
|
+
export declare const InDrawer: Story;
|
|
35
|
+
//# sourceMappingURL=adopt-branch-drawer.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adopt-branch-drawer.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAO1D;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAgBxC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAqEhD,+FAA+F;AAC/F,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,eAAe,EAAE,KAM7B,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,SAAS,EAAE,KAWvB,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC;AAkCF,6EAA6E;AAC7E,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC"}
|