@shepai/cli 1.173.0 → 1.174.0-pr531.0f666b7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apis/json-schema/Repository.yaml +6 -0
- package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts +3 -1
- package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +28 -0
- 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 +2 -0
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts +47 -0
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.js +12 -0
- package/dist/packages/core/src/application/use-cases/features/create/create-feature-from-remote.use-case.d.ts +67 -0
- package/dist/packages/core/src/application/use-cases/features/create/create-feature-from-remote.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/features/create/create-feature-from-remote.use-case.js +125 -0
- package/dist/packages/core/src/application/use-cases/repositories/import-github-repository.use-case.d.ts +13 -4
- package/dist/packages/core/src/application/use-cases/repositories/import-github-repository.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/repositories/import-github-repository.use-case.js +54 -10
- package/dist/packages/core/src/application/use-cases/repositories/init-remote-repository.use-case.d.ts +30 -0
- package/dist/packages/core/src/application/use-cases/repositories/init-remote-repository.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/repositories/init-remote-repository.use-case.js +50 -0
- package/dist/packages/core/src/domain/generated/output.d.ts +8 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +10 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/repository.mapper.d.ts +2 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/repository.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/repository.mapper.js +4 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/055-add-repository-fork-fields.d.ts +12 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/055-add-repository-fork-fields.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/055-add-repository-fork-fields.js +26 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts +2 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.js +14 -0
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts +4 -1
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +55 -1
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +5 -0
- 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 +32 -0
- package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/new.command.js +32 -6
- package/dist/src/presentation/cli/commands/repo/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/repo/index.js +3 -1
- package/dist/src/presentation/cli/commands/repo/init-remote.command.d.ts +15 -0
- package/dist/src/presentation/cli/commands/repo/init-remote.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/repo/init-remote.command.js +44 -0
- package/dist/src/presentation/web/app/actions/create-feature-from-remote.d.ts +31 -0
- package/dist/src/presentation/web/app/actions/create-feature-from-remote.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/create-feature-from-remote.js +69 -0
- package/dist/src/presentation/web/app/actions/import-github-repository.d.ts +1 -0
- package/dist/src/presentation/web/app/actions/import-github-repository.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/import-github-repository.js +1 -1
- package/dist/src/presentation/web/app/features/feature-tree-page-client.d.ts +7 -1
- package/dist/src/presentation/web/app/features/feature-tree-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/app/features/feature-tree-page-client.js +142 -3
- package/dist/src/presentation/web/app/features/get-feature-tree-data.d.ts.map +1 -1
- package/dist/src/presentation/web/app/features/get-feature-tree-data.js +4 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +2 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.d.ts +2 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/repository-combobox.stories.js +22 -0
- package/dist/src/presentation/web/components/features/feature-tree-table/feature-tree-table.d.ts +21 -5
- package/dist/src/presentation/web/components/features/feature-tree-table/feature-tree-table.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/feature-tree-table/feature-tree-table.js +169 -87
- package/dist/src/presentation/web/components/features/feature-tree-table/index.d.ts +2 -2
- package/dist/src/presentation/web/components/features/feature-tree-table/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/feature-tree-table/index.js +1 -1
- package/dist/src/presentation/web/lib/feature-flags.js +1 -1
- package/dist/translations/ar/cli.json +12 -0
- package/dist/translations/de/cli.json +12 -0
- package/dist/translations/en/cli.json +12 -0
- package/dist/translations/es/cli.json +12 -0
- package/dist/translations/fr/cli.json +12 -0
- package/dist/translations/he/cli.json +12 -0
- package/dist/translations/pt/cli.json +12 -0
- package/dist/translations/ru/cli.json +12 -0
- 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 +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 +3 -3
- package/web/.next/required-server-files.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +2 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js +2 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +2 -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/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +38 -38
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +2 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +38 -38
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +2 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +2 -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)/chat/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/chat/page.js +2 -1
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/create/page.js +2 -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/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +38 -38
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +2 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +38 -38
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/page.js +2 -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]/[tab]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +2 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +2 -2
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +2 -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/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 +6 -6
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
- package/web/.next/server/app/features/page/build-manifest.json +2 -2
- package/web/.next/server/app/features/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/features/page.js.nft.json +1 -1
- package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/build-manifest.json +2 -2
- package/web/.next/server/app/settings/page/server-reference-manifest.json +9 -9
- 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 +13 -13
- package/web/.next/server/app/skills/page.js +2 -1
- 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 +11 -11
- package/web/.next/server/app/tools/page.js +2 -1
- 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 +6 -6
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_a53cb908._.js +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_ceb2fa1e._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js +3 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js +3 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js +3 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__08c912ab._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__08c912ab._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0c5452c3._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__22d17c66._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__22d17c66._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__51ec77a8._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__51ec77a8._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__b020c17d._.js → [root-of-the-server]__540c615f._.js} +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__540c615f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__851f6adb._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__86ff0bc5._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_073183f4._.js +3 -0
- package/web/.next/server/chunks/ssr/_073183f4._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1879404a._.js +1 -1
- package/web/.next/server/chunks/ssr/_1b7dae9a._.js +1 -1
- package/web/.next/server/chunks/ssr/{_cd92091d._.js → _1c627e53._.js} +3 -3
- package/web/.next/server/chunks/ssr/{_cd92091d._.js.map → _1c627e53._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_5119a3df._.js → _295fffde._.js} +2 -2
- package/web/.next/server/chunks/ssr/_295fffde._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_817ddf8a._.js → _398f5019._.js} +3 -3
- package/web/.next/server/chunks/ssr/{_817ddf8a._.js.map → _398f5019._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_43ba79e7._.js +1 -1
- package/web/.next/server/chunks/ssr/_45496654._.js +1 -1
- package/web/.next/server/chunks/ssr/_45496654._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_6f35fb9a._.js → _49b8d085._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_6f35fb9a._.js.map → _49b8d085._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_4cbb7f95._.js +1 -1
- package/web/.next/server/chunks/ssr/_4cbb7f95._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_6abfa39e._.js +3 -0
- package/web/.next/server/chunks/ssr/_6abfa39e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_7476c702._.js +3 -0
- package/web/.next/server/chunks/ssr/_7476c702._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_7cb0396e._.js +3 -0
- package/web/.next/server/chunks/ssr/_7cb0396e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_bb09579b._.js +1 -1
- package/web/.next/server/chunks/ssr/{_0020fddd._.js → _d9c0a97a._.js} +3 -3
- package/web/.next/server/chunks/ssr/_d9c0a97a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_e680c57c._.js +9 -0
- package/web/.next/server/chunks/ssr/_e680c57c._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_f080a56e._.js +3 -0
- package/web/.next/server/chunks/ssr/_f080a56e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_f8c55130._.js +4 -0
- package/web/.next/server/chunks/ssr/_f8c55130._.js.map +1 -0
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_global-chat-drawer-client_tsx_158c4b12._.js +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_63d47a3e._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_63d47a3e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_747b43ac._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_747b43ac._.js.map +1 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_ef15a0bd._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js +5 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js +5 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_features_feature-tree-page-client_tsx_34c5cbbf._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_app_features_feature-tree-page-client_tsx_34c5cbbf._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_a5e6c910._.js +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/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_select_tsx_45d6b8ae._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e1cd1869._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_e1cd1869._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js.map +1 -0
- package/web/.next/server/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 +50 -50
- package/web/.next/static/chunks/{ab5970241b29b648.js → 041bbd573f24c747.js} +1 -1
- package/web/.next/static/chunks/{0658f5f58d5b60c5.js → 273d92d4c2d7785c.js} +1 -1
- package/web/.next/static/chunks/2ceebcc839ee0d4b.js +1 -0
- package/web/.next/static/chunks/46e2693dbc9262fd.js +5 -0
- package/web/.next/static/chunks/{51bb2fb93740d2cb.js → 53fc463b54ef2b4b.js} +2 -2
- package/web/.next/static/chunks/{641583aadf11b219.js → 6129f01524593835.js} +1 -1
- package/web/.next/static/chunks/{e5c06df7f30a05b9.js → 659ee5c3bcd5908a.js} +1 -1
- package/web/.next/static/chunks/{96b63a24ad83be21.js → 6adf506943611449.js} +1 -1
- package/web/.next/static/chunks/{a1f976e9c8b07306.js → 79b8efa054660be8.js} +1 -1
- package/web/.next/static/chunks/7e50572eaeede7f0.js +3 -0
- package/web/.next/static/chunks/8492d8e0b5f9a4e8.js +1 -0
- package/web/.next/static/chunks/88192bc55f93b89e.js +1 -0
- package/web/.next/static/chunks/98e3a7cf58fc912a.js +1 -0
- package/web/.next/static/chunks/9f5327851ad07bdf.js +7 -0
- package/web/.next/static/chunks/a20f2d6f76f469b7.css +1 -0
- package/web/.next/static/chunks/ad7590436eef8a9e.js +1 -0
- package/web/.next/static/chunks/{819d8097ac0ca319.js → ae65839330ff1113.js} +1 -1
- package/web/.next/static/chunks/b49ab0b290e9342d.js +1 -0
- package/web/.next/static/chunks/b88dd71478d03b6a.js +1 -0
- package/web/.next/static/chunks/bb479c31b5b53bac.js +8 -0
- package/web/.next/static/chunks/c10c0d6d458453bc.js +1 -0
- package/web/.next/static/chunks/{4161d4663009140f.js → dbaa2ef826fd65d6.js} +1 -1
- package/web/.next/static/chunks/{185e4f36cb6efb24.js → eb1ca1b0a34166f5.js} +1 -1
- package/web/.next/static/chunks/fc0232384ec2b48d.js +1 -0
- package/web/.next/static/chunks/{turbopack-b38a68b1b1c41a87.js → turbopack-fa58b7ea4a4b26e7.js} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4fb81977._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4fb81977._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7dcd0917._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7dcd0917._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__92ffd5ee._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__92ffd5ee._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b020c17d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba7f5873._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba7f5873._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c5e09f6f._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c5e09f6f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fa525872._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fa525872._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0020fddd._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_02e01240._.js +0 -4
- package/web/.next/server/chunks/ssr/_02e01240._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_068492bf._.js +0 -3
- package/web/.next/server/chunks/ssr/_068492bf._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_18886033._.js +0 -4
- package/web/.next/server/chunks/ssr/_18886033._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_22e00a14._.js +0 -4
- package/web/.next/server/chunks/ssr/_22e00a14._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_5119a3df._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_560f2971._.js +0 -3
- package/web/.next/server/chunks/ssr/_560f2971._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_a5a5901d._.js +0 -4
- package/web/.next/server/chunks/ssr/_a5a5901d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_a963dd3c._.js +0 -3
- package/web/.next/server/chunks/ssr/_a963dd3c._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_ad09f271._.js +0 -4
- package/web/.next/server/chunks/ssr/_ad09f271._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_c3f595c6._.js +0 -4
- package/web/.next/server/chunks/ssr/_c3f595c6._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_df737cce._.js +0 -3
- package/web/.next/server/chunks/ssr/_df737cce._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e3f14907._.js +0 -9
- package/web/.next/server/chunks/ssr/_e3f14907._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_ea9e1556._.js +0 -4
- package/web/.next/server/chunks/ssr/_ea9e1556._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_f1ba9be6._.js +0 -6
- package/web/.next/server/chunks/ssr/_f1ba9be6._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_f33cd07e._.js +0 -6
- package/web/.next/server/chunks/ssr/_f33cd07e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_f535d854._.js +0 -3
- package/web/.next/server/chunks/ssr/_f535d854._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_f8b45233._.js +0 -4
- package/web/.next/server/chunks/ssr/_f8b45233._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_1300ae39._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_1300ae39._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_common_page-header_index_ts_bdf4db0b._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_components_common_page-header_index_ts_bdf4db0b._.js.map +0 -1
- package/web/.next/static/chunks/3e393d6a78b2ade4.js +0 -1
- package/web/.next/static/chunks/453ad57269a1004f.js +0 -1
- package/web/.next/static/chunks/4559a403ee40dd19.js +0 -7
- package/web/.next/static/chunks/4855528484f00bd6.js +0 -1
- package/web/.next/static/chunks/4bacc77e3952f063.js +0 -3
- package/web/.next/static/chunks/5ed47e998707b519.js +0 -8
- package/web/.next/static/chunks/9f59ea29d6034111.js +0 -1
- package/web/.next/static/chunks/bb5400da64270df6.js +0 -1
- package/web/.next/static/chunks/cc5fe8d1d9e1e519.js +0 -5
- package/web/.next/static/chunks/d5366257d6b9f855.js +0 -1
- package/web/.next/static/chunks/dcf8bb4389557a76.css +0 -1
- package/web/.next/static/chunks/f37a5e031a5d0f75.js +0 -1
- package/web/.next/static/chunks/f998b42b5cddafd6.js +0 -1
- /package/web/.next/static/{1awQPFeGEuNwpeu1Kgpxd → UWgKy2y_bjIYkCFOMl8Am}/_buildManifest.js +0 -0
- /package/web/.next/static/{1awQPFeGEuNwpeu1Kgpxd → UWgKy2y_bjIYkCFOMl8Am}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{1awQPFeGEuNwpeu1Kgpxd → UWgKy2y_bjIYkCFOMl8Am}/_ssgManifest.js +0 -0
|
@@ -11,6 +11,12 @@ properties:
|
|
|
11
11
|
remoteUrl:
|
|
12
12
|
type: string
|
|
13
13
|
description: "Remote GitHub URL this repository was cloned from (normalized: lowercase, no .git suffix)"
|
|
14
|
+
isFork:
|
|
15
|
+
type: boolean
|
|
16
|
+
description: Whether this repository was auto-forked by shep because the user lacked push access
|
|
17
|
+
upstreamUrl:
|
|
18
|
+
type: string
|
|
19
|
+
description: "Original upstream URL when isFork is true (normalized: lowercase, no .git suffix)"
|
|
14
20
|
required:
|
|
15
21
|
- name
|
|
16
22
|
- path
|
|
@@ -12,12 +12,14 @@ export interface IRepositoryRepository {
|
|
|
12
12
|
findByPathIncludingDeleted(path: string): Promise<Repository | null>;
|
|
13
13
|
/** Find a non-deleted repository by its remote URL (normalized: lowercase, no .git suffix). */
|
|
14
14
|
findByRemoteUrl(url: string): Promise<Repository | null>;
|
|
15
|
+
/** Find a non-deleted repository by its upstream URL (for fork deduplication). */
|
|
16
|
+
findByUpstreamUrl(url: string): Promise<Repository | null>;
|
|
15
17
|
list(): Promise<Repository[]>;
|
|
16
18
|
remove(id: string): Promise<void>;
|
|
17
19
|
softDelete(id: string): Promise<void>;
|
|
18
20
|
/** Restore a soft-deleted repository by clearing deletedAt. */
|
|
19
21
|
restore(id: string): Promise<void>;
|
|
20
22
|
/** Update specific fields on an existing repository. */
|
|
21
|
-
update(id: string, fields: Partial<Pick<Repository, 'name' | 'path' | 'remoteUrl'>>): Promise<Repository>;
|
|
23
|
+
update(id: string, fields: Partial<Pick<Repository, 'name' | 'path' | 'remoteUrl' | 'isFork' | 'upstreamUrl'>>): Promise<Repository>;
|
|
22
24
|
}
|
|
23
25
|
//# sourceMappingURL=repository-repository.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository-repository.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/repositories/repository-repository.interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEzE,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACpD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACjD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACrD,uEAAuE;IACvE,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACrE,+FAA+F;IAC/F,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACzD,IAAI,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,wDAAwD;IACxD,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"repository-repository.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/repositories/repository-repository.interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEzE,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACpD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACjD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACrD,uEAAuE;IACvE,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACrE,+FAA+F;IAC/F,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACzD,kFAAkF;IAClF,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IAC3D,IAAI,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,wDAAwD;IACxD,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,CAAC,CAAC,GAC1F,OAAO,CAAC,UAAU,CAAC,CAAC;CACxB"}
|
package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export declare enum GitPrErrorCode {
|
|
|
18
18
|
MERGE_FAILED = "MERGE_FAILED",
|
|
19
19
|
NETWORK_ERROR = "NETWORK_ERROR",
|
|
20
20
|
PR_NOT_FOUND = "PR_NOT_FOUND",
|
|
21
|
+
REMOTE_ALREADY_EXISTS = "REMOTE_ALREADY_EXISTS",
|
|
22
|
+
REPO_CREATE_FAILED = "REPO_CREATE_FAILED",
|
|
21
23
|
REBASE_CONFLICT = "REBASE_CONFLICT",
|
|
22
24
|
SYNC_FAILED = "SYNC_FAILED"
|
|
23
25
|
}
|
|
@@ -144,6 +146,32 @@ export interface IGitPrService {
|
|
|
144
146
|
* @returns The remote URL, or null if no remote is configured
|
|
145
147
|
*/
|
|
146
148
|
getRemoteUrl(cwd: string): Promise<string | null>;
|
|
149
|
+
/**
|
|
150
|
+
* Create a GitHub repository and link it to the local repo.
|
|
151
|
+
* Uses `gh repo create` with `--source=.` and `--push` to atomically
|
|
152
|
+
* create the remote repo, add the origin remote, and push the current branch.
|
|
153
|
+
*
|
|
154
|
+
* @param cwd - Working directory path
|
|
155
|
+
* @param name - Repository name (e.g. "my-repo" or "org/my-repo")
|
|
156
|
+
* @param options - Creation options
|
|
157
|
+
* @returns The URL of the created GitHub repository
|
|
158
|
+
* @throws GitPrError with REPO_CREATE_FAILED code on creation failure
|
|
159
|
+
* @throws GitPrError with GH_NOT_FOUND code if gh CLI is not installed
|
|
160
|
+
* @throws GitPrError with AUTH_FAILURE code if gh is not authenticated
|
|
161
|
+
*/
|
|
162
|
+
createGitHubRepo(cwd: string, name: string, options: {
|
|
163
|
+
isPrivate: boolean;
|
|
164
|
+
org?: string;
|
|
165
|
+
}): Promise<string>;
|
|
166
|
+
/**
|
|
167
|
+
* Add a git remote to the local repository.
|
|
168
|
+
*
|
|
169
|
+
* @param cwd - Working directory path
|
|
170
|
+
* @param remoteName - Name for the remote (e.g. "origin")
|
|
171
|
+
* @param remoteUrl - URL of the remote repository
|
|
172
|
+
* @throws GitPrError with GIT_ERROR code on failure
|
|
173
|
+
*/
|
|
174
|
+
addRemote(cwd: string, remoteName: string, remoteUrl: string): Promise<void>;
|
|
147
175
|
/**
|
|
148
176
|
* Detect the repository's default branch with robust fallback chain:
|
|
149
177
|
* 1. Remote HEAD (git symbolic-ref refs/remotes/origin/HEAD)
|
package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-pr-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/git-pr-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAEvE;;GAEG;AACH,oBAAY,cAAc;IACxB,YAAY,iBAAiB;IAC7B,gBAAgB,qBAAqB;IACrC,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;CAC5B;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;aAGjB,IAAI,EAAE,cAAc;aACpB,KAAK,CAAC,EAAE,KAAK;gBAF7B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,cAAc,EACpB,KAAK,CAAC,EAAE,KAAK,YAAA;CAKhC;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,wBAAwB;IACxB,MAAM,EAAE,QAAQ,CAAC;IACjB,uDAAuD;I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M,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvD;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC;;;;;;OAMG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtC;;;;;;;;;;;;;OAaG;IACH,mBAAmB,CACjB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/C"}
|
|
1
|
+
{"version":3,"file":"git-pr-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/git-pr-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAEvE;;GAEG;AACH,oBAAY,cAAc;IACxB,YAAY,iBAAiB;IAC7B,gBAAgB,qBAAqB;IACrC,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,qBAAqB,0BAA0B;IAC/C,kBAAkB,uBAAuB;IACzC,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;CAC5B;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;aAGjB,IAAI,EAAE,cAAc;aACpB,KAAK,CAAC,EAAE,KAAK;gBAF7B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,cAAc,EACpB,KAAK,CAAC,EAAE,KAAK,YAAA;CAKhC;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,S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,CAAC;IAEpF;;;;;;;OAOG;IACH,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEnD;;;;;;;OAOG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExD;;;;;;;;OAQG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3C;;;;;;OAMG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;;;;;OAQG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvD;;;;;;OAMG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC;;;;;;OAMG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtC;;;;;;;;;;;;;OAaG;IACH,mBAAmB,CACjB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/C"}
|
package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.js
CHANGED
|
@@ -18,6 +18,8 @@ export var GitPrErrorCode;
|
|
|
18
18
|
GitPrErrorCode["MERGE_FAILED"] = "MERGE_FAILED";
|
|
19
19
|
GitPrErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR";
|
|
20
20
|
GitPrErrorCode["PR_NOT_FOUND"] = "PR_NOT_FOUND";
|
|
21
|
+
GitPrErrorCode["REMOTE_ALREADY_EXISTS"] = "REMOTE_ALREADY_EXISTS";
|
|
22
|
+
GitPrErrorCode["REPO_CREATE_FAILED"] = "REPO_CREATE_FAILED";
|
|
21
23
|
GitPrErrorCode["REBASE_CONFLICT"] = "REBASE_CONFLICT";
|
|
22
24
|
GitPrErrorCode["SYNC_FAILED"] = "SYNC_FAILED";
|
|
23
25
|
})(GitPrErrorCode || (GitPrErrorCode = {}));
|
|
@@ -35,6 +35,12 @@ export declare class GitHubRepoListError extends Error {
|
|
|
35
35
|
export declare class GitHubPermissionError extends Error {
|
|
36
36
|
constructor(message: string, cause?: Error);
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Thrown when a fork operation fails.
|
|
40
|
+
*/
|
|
41
|
+
export declare class GitHubForkError extends Error {
|
|
42
|
+
constructor(message: string, cause?: Error);
|
|
43
|
+
}
|
|
38
44
|
/**
|
|
39
45
|
* A GitHub repository as returned by `gh repo list --json`.
|
|
40
46
|
*/
|
|
@@ -88,6 +94,26 @@ export interface ParsedGitHubUrl {
|
|
|
88
94
|
/** Combined owner/repo (e.g. "octocat/my-project") */
|
|
89
95
|
nameWithOwner: string;
|
|
90
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Options for forking a repository.
|
|
99
|
+
*/
|
|
100
|
+
export interface ForkOptions {
|
|
101
|
+
onProgress?: (message: string) => void;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Result of checking push access on a repository.
|
|
105
|
+
*/
|
|
106
|
+
export interface PushAccessResult {
|
|
107
|
+
hasPushAccess: boolean;
|
|
108
|
+
viewerLogin: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Result of forking a repository.
|
|
112
|
+
*/
|
|
113
|
+
export interface ForkResult {
|
|
114
|
+
nameWithOwner: string;
|
|
115
|
+
alreadyExisted: boolean;
|
|
116
|
+
}
|
|
91
117
|
/**
|
|
92
118
|
* Output port for GitHub repository operations.
|
|
93
119
|
*
|
|
@@ -151,5 +177,26 @@ export interface IGitHubRepositoryService {
|
|
|
151
177
|
* @throws {GitHubPermissionError} if the permission check fails (e.g. gh not installed, not authenticated)
|
|
152
178
|
*/
|
|
153
179
|
getViewerPermission(repoPath: string): Promise<string>;
|
|
180
|
+
/**
|
|
181
|
+
* Get the authenticated GitHub user's login.
|
|
182
|
+
* @returns The login username
|
|
183
|
+
* @throws {GitHubAuthError} if not authenticated
|
|
184
|
+
*/
|
|
185
|
+
getAuthenticatedUser(): Promise<string>;
|
|
186
|
+
/**
|
|
187
|
+
* Check if the authenticated user has push access to a repository.
|
|
188
|
+
* @param nameWithOwner - Full owner/repo identifier
|
|
189
|
+
* @returns Push access result with viewer login
|
|
190
|
+
* @throws {GitHubPermissionError} on failure
|
|
191
|
+
*/
|
|
192
|
+
checkPushAccess(nameWithOwner: string): Promise<PushAccessResult>;
|
|
193
|
+
/**
|
|
194
|
+
* Fork a repository to the authenticated user's account.
|
|
195
|
+
* @param nameWithOwner - Full owner/repo identifier to fork
|
|
196
|
+
* @param options - Optional progress callback
|
|
197
|
+
* @returns Fork result with the fork's nameWithOwner
|
|
198
|
+
* @throws {GitHubForkError} on failure
|
|
199
|
+
*/
|
|
200
|
+
forkRepository(nameWithOwner: string, options?: ForkOptions): Promise<ForkResult>;
|
|
154
201
|
}
|
|
155
202
|
//# sourceMappingURL=github-repository-service.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-repository-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,mBA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ACvC;;;;OAIG;IACH,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B;;;;;;;OAOG;IACH,eAAe,CACb,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;;;OAQG;IACH,oBAAoB,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAEnF;;;;;OAKG;IACH,iBAAiB,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAEnD;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAC;IAE7C;;;;;;;;;OASG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"github-repository-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE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;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;CACzB;AAMD;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B;;;;;;;OAOG;IACH,eAAe,CACb,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;;;OAQG;IACH,oBAAoB,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAEnF;;;;;OAKG;IACH,iBAAiB,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAEnD;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAC;IAE7C;;;;;;;;;OASG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEvD;;;;OAIG;IACH,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAExC;;;;;OAKG;IACH,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAElE;;;;;;OAMG;IACH,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACnF"}
|
|
@@ -68,3 +68,15 @@ export class GitHubPermissionError extends Error {
|
|
|
68
68
|
this.cause = cause;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Thrown when a fork operation fails.
|
|
73
|
+
*/
|
|
74
|
+
export class GitHubForkError extends Error {
|
|
75
|
+
constructor(message, cause) {
|
|
76
|
+
super(message);
|
|
77
|
+
this.name = 'GitHubForkError';
|
|
78
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
79
|
+
if (cause)
|
|
80
|
+
this.cause = cause;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create Feature From Remote Use Case
|
|
3
|
+
*
|
|
4
|
+
* Composite use case that chains ImportGitHubRepositoryUseCase with
|
|
5
|
+
* CreateFeatureUseCase. Enables creating a feature on a remote GitHub
|
|
6
|
+
* repo in a single command — clone (or fork), register, then create feature.
|
|
7
|
+
*
|
|
8
|
+
* Provides two execution modes:
|
|
9
|
+
* - execute(): synchronous full flow for CLI
|
|
10
|
+
* - createRecord() + initializeAndSpawn(): two-phase for Web UI (fast response + background work)
|
|
11
|
+
*/
|
|
12
|
+
import type { Feature } from '../../../../domain/generated/output.js';
|
|
13
|
+
import type { ApprovalGates, Attachment } from '../../../../domain/generated/output.js';
|
|
14
|
+
import type { CloneOptions, ForkOptions } from '../../../ports/output/services/github-repository-service.interface.js';
|
|
15
|
+
import { ImportGitHubRepositoryUseCase } from '../../repositories/import-github-repository.use-case.js';
|
|
16
|
+
import { CreateFeatureUseCase } from './create-feature.use-case.js';
|
|
17
|
+
import type { CreateFeatureResult, CreateRecordResult } from './types.js';
|
|
18
|
+
export interface CreateFeatureFromRemoteInput {
|
|
19
|
+
/** GitHub URL or owner/repo shorthand */
|
|
20
|
+
remoteUrl: string;
|
|
21
|
+
/** Override clone destination directory */
|
|
22
|
+
cloneDest?: string;
|
|
23
|
+
/** Default base directory for clones (from settings) */
|
|
24
|
+
defaultCloneDir?: string;
|
|
25
|
+
/** Options for the clone subprocess */
|
|
26
|
+
cloneOptions?: CloneOptions;
|
|
27
|
+
/** Options for fork operations */
|
|
28
|
+
forkOptions?: ForkOptions;
|
|
29
|
+
userInput: string;
|
|
30
|
+
approvalGates?: ApprovalGates;
|
|
31
|
+
push?: boolean;
|
|
32
|
+
openPr?: boolean;
|
|
33
|
+
parentId?: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
fast?: boolean;
|
|
37
|
+
pending?: boolean;
|
|
38
|
+
agentType?: string;
|
|
39
|
+
model?: string;
|
|
40
|
+
attachments?: Attachment[];
|
|
41
|
+
sessionId?: string;
|
|
42
|
+
attachmentPaths?: string[];
|
|
43
|
+
}
|
|
44
|
+
export declare class CreateFeatureFromRemoteUseCase {
|
|
45
|
+
private readonly importUseCase;
|
|
46
|
+
private readonly createFeatureUseCase;
|
|
47
|
+
constructor(importUseCase: ImportGitHubRepositoryUseCase, createFeatureUseCase: CreateFeatureUseCase);
|
|
48
|
+
/**
|
|
49
|
+
* Full synchronous execution: import repo then create feature.
|
|
50
|
+
* Used by the CLI which shows a spinner and needs everything done before returning.
|
|
51
|
+
*/
|
|
52
|
+
execute(input: CreateFeatureFromRemoteInput): Promise<CreateFeatureResult>;
|
|
53
|
+
/**
|
|
54
|
+
* Phase 1 (fast): import repo + create DB record. Returns immediately with real feature ID.
|
|
55
|
+
* Used by the Web UI for optimistic display.
|
|
56
|
+
*/
|
|
57
|
+
createRecord(input: CreateFeatureFromRemoteInput): Promise<CreateRecordResult>;
|
|
58
|
+
/**
|
|
59
|
+
* Phase 2 (background): metadata generation, worktree, spec, agent spawn.
|
|
60
|
+
* Fire-and-forget from the Web UI.
|
|
61
|
+
*/
|
|
62
|
+
initializeAndSpawn(feature: Feature, input: CreateFeatureFromRemoteInput, shouldSpawn: boolean): Promise<{
|
|
63
|
+
warning?: string;
|
|
64
|
+
updatedFeature: Feature;
|
|
65
|
+
}>;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=create-feature-from-remote.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-feature-from-remote.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/use-cases/features/create/create-feature-from-remote.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;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OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAFpB,aAAa,EAAE,6BAA6B,EAE5C,oBAAoB,EAAE,oBAAoB;IAG7D;;;OAGG;IACG,OAAO,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA4BhF;;;OAGG;IACG,YAAY,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA4BpF;;;OAGG;IACG,kBAAkB,CACtB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,4BAA4B,EACnC,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,OAAO,CAAA;KAAE,CAAC;CAuB1D"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create Feature From Remote Use Case
|
|
3
|
+
*
|
|
4
|
+
* Composite use case that chains ImportGitHubRepositoryUseCase with
|
|
5
|
+
* CreateFeatureUseCase. Enables creating a feature on a remote GitHub
|
|
6
|
+
* repo in a single command — clone (or fork), register, then create feature.
|
|
7
|
+
*
|
|
8
|
+
* Provides two execution modes:
|
|
9
|
+
* - execute(): synchronous full flow for CLI
|
|
10
|
+
* - createRecord() + initializeAndSpawn(): two-phase for Web UI (fast response + background work)
|
|
11
|
+
*/
|
|
12
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
13
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15
|
+
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;
|
|
16
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
|
+
};
|
|
18
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
20
|
+
};
|
|
21
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
22
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
23
|
+
};
|
|
24
|
+
import { injectable, inject } from 'tsyringe';
|
|
25
|
+
import { ImportGitHubRepositoryUseCase } from '../../repositories/import-github-repository.use-case.js';
|
|
26
|
+
import { CreateFeatureUseCase } from './create-feature.use-case.js';
|
|
27
|
+
let CreateFeatureFromRemoteUseCase = class CreateFeatureFromRemoteUseCase {
|
|
28
|
+
importUseCase;
|
|
29
|
+
createFeatureUseCase;
|
|
30
|
+
constructor(importUseCase, createFeatureUseCase) {
|
|
31
|
+
this.importUseCase = importUseCase;
|
|
32
|
+
this.createFeatureUseCase = createFeatureUseCase;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Full synchronous execution: import repo then create feature.
|
|
36
|
+
* Used by the CLI which shows a spinner and needs everything done before returning.
|
|
37
|
+
*/
|
|
38
|
+
async execute(input) {
|
|
39
|
+
const repository = await this.importUseCase.execute({
|
|
40
|
+
url: input.remoteUrl,
|
|
41
|
+
dest: input.cloneDest,
|
|
42
|
+
defaultCloneDir: input.defaultCloneDir,
|
|
43
|
+
cloneOptions: input.cloneOptions,
|
|
44
|
+
forkOptions: input.forkOptions,
|
|
45
|
+
});
|
|
46
|
+
return this.createFeatureUseCase.execute({
|
|
47
|
+
userInput: input.userInput,
|
|
48
|
+
repositoryPath: repository.path,
|
|
49
|
+
approvalGates: input.approvalGates,
|
|
50
|
+
push: input.push,
|
|
51
|
+
openPr: input.openPr,
|
|
52
|
+
parentId: input.parentId,
|
|
53
|
+
name: input.name,
|
|
54
|
+
description: input.description,
|
|
55
|
+
fast: input.fast,
|
|
56
|
+
pending: input.pending,
|
|
57
|
+
agentType: input.agentType,
|
|
58
|
+
model: input.model,
|
|
59
|
+
attachments: input.attachments,
|
|
60
|
+
sessionId: input.sessionId,
|
|
61
|
+
attachmentPaths: input.attachmentPaths,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Phase 1 (fast): import repo + create DB record. Returns immediately with real feature ID.
|
|
66
|
+
* Used by the Web UI for optimistic display.
|
|
67
|
+
*/
|
|
68
|
+
async createRecord(input) {
|
|
69
|
+
const repository = await this.importUseCase.execute({
|
|
70
|
+
url: input.remoteUrl,
|
|
71
|
+
dest: input.cloneDest,
|
|
72
|
+
defaultCloneDir: input.defaultCloneDir,
|
|
73
|
+
cloneOptions: input.cloneOptions,
|
|
74
|
+
forkOptions: input.forkOptions,
|
|
75
|
+
});
|
|
76
|
+
return this.createFeatureUseCase.createRecord({
|
|
77
|
+
userInput: input.userInput,
|
|
78
|
+
repositoryPath: repository.path,
|
|
79
|
+
approvalGates: input.approvalGates,
|
|
80
|
+
push: input.push,
|
|
81
|
+
openPr: input.openPr,
|
|
82
|
+
parentId: input.parentId,
|
|
83
|
+
name: input.name,
|
|
84
|
+
description: input.description,
|
|
85
|
+
fast: input.fast,
|
|
86
|
+
pending: input.pending,
|
|
87
|
+
agentType: input.agentType,
|
|
88
|
+
model: input.model,
|
|
89
|
+
attachments: input.attachments,
|
|
90
|
+
sessionId: input.sessionId,
|
|
91
|
+
attachmentPaths: input.attachmentPaths,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Phase 2 (background): metadata generation, worktree, spec, agent spawn.
|
|
96
|
+
* Fire-and-forget from the Web UI.
|
|
97
|
+
*/
|
|
98
|
+
async initializeAndSpawn(feature, input, shouldSpawn) {
|
|
99
|
+
return this.createFeatureUseCase.initializeAndSpawn(feature, {
|
|
100
|
+
userInput: input.userInput,
|
|
101
|
+
repositoryPath: '', // Will be resolved from feature.repositoryId
|
|
102
|
+
approvalGates: input.approvalGates,
|
|
103
|
+
push: input.push,
|
|
104
|
+
openPr: input.openPr,
|
|
105
|
+
parentId: input.parentId,
|
|
106
|
+
name: input.name,
|
|
107
|
+
description: input.description,
|
|
108
|
+
fast: input.fast,
|
|
109
|
+
pending: input.pending,
|
|
110
|
+
agentType: input.agentType,
|
|
111
|
+
model: input.model,
|
|
112
|
+
attachments: input.attachments,
|
|
113
|
+
sessionId: input.sessionId,
|
|
114
|
+
attachmentPaths: input.attachmentPaths,
|
|
115
|
+
}, shouldSpawn);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
CreateFeatureFromRemoteUseCase = __decorate([
|
|
119
|
+
injectable(),
|
|
120
|
+
__param(0, inject(ImportGitHubRepositoryUseCase)),
|
|
121
|
+
__param(1, inject(CreateFeatureUseCase)),
|
|
122
|
+
__metadata("design:paramtypes", [ImportGitHubRepositoryUseCase,
|
|
123
|
+
CreateFeatureUseCase])
|
|
124
|
+
], CreateFeatureFromRemoteUseCase);
|
|
125
|
+
export { CreateFeatureFromRemoteUseCase };
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
* Import GitHub Repository Use Case
|
|
3
3
|
*
|
|
4
4
|
* Orchestrates importing a GitHub repository: validates the URL, checks auth,
|
|
5
|
-
* detects duplicates by remoteUrl,
|
|
6
|
-
*
|
|
7
|
-
* repository record with the normalized remoteUrl.
|
|
5
|
+
* detects duplicates by remoteUrl/upstreamUrl, checks push access, and either
|
|
6
|
+
* clones directly or auto-forks when the user lacks push access.
|
|
8
7
|
*/
|
|
9
8
|
import type { Repository } from '../../../domain/generated/output.js';
|
|
10
|
-
import type { IGitHubRepositoryService, CloneOptions } from '../../ports/output/services/github-repository-service.interface.js';
|
|
9
|
+
import type { IGitHubRepositoryService, CloneOptions, ForkOptions } from '../../ports/output/services/github-repository-service.interface.js';
|
|
11
10
|
import type { IRepositoryRepository } from '../../ports/output/repositories/repository-repository.interface.js';
|
|
12
11
|
import { AddRepositoryUseCase } from './add-repository.use-case.js';
|
|
13
12
|
export interface ImportGitHubRepositoryInput {
|
|
@@ -19,6 +18,8 @@ export interface ImportGitHubRepositoryInput {
|
|
|
19
18
|
defaultCloneDir?: string;
|
|
20
19
|
/** Options for the clone subprocess (e.g. progress callback) */
|
|
21
20
|
cloneOptions?: CloneOptions;
|
|
21
|
+
/** Options for fork operations (e.g. progress callback) */
|
|
22
|
+
forkOptions?: ForkOptions;
|
|
22
23
|
}
|
|
23
24
|
export declare class ImportGitHubRepositoryUseCase {
|
|
24
25
|
private readonly gitHubService;
|
|
@@ -26,6 +27,14 @@ export declare class ImportGitHubRepositoryUseCase {
|
|
|
26
27
|
private readonly addRepositoryUseCase;
|
|
27
28
|
constructor(gitHubService: IGitHubRepositoryService, repositoryRepo: IRepositoryRepository, addRepositoryUseCase: AddRepositoryUseCase);
|
|
28
29
|
execute(input: ImportGitHubRepositoryInput): Promise<Repository>;
|
|
30
|
+
/**
|
|
31
|
+
* Direct clone path — user has push access to the repository.
|
|
32
|
+
*/
|
|
33
|
+
private cloneDirect;
|
|
34
|
+
/**
|
|
35
|
+
* Fork-and-clone path — user lacks push access, so we auto-fork first.
|
|
36
|
+
*/
|
|
37
|
+
private forkAndClone;
|
|
29
38
|
private resolveDestination;
|
|
30
39
|
}
|
|
31
40
|
//# sourceMappingURL=import-github-repository.use-case.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-github-repository.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/repositories/import-github-repository.use-case.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"import-github-repository.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/repositories/import-github-repository.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,KAAK,EACV,wBAAwB,EACxB,YAAY,EACZ,WAAW,EACZ,MAAM,oEAAoE,CAAC;AAC5E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAC;AAChH,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,WAAW,2BAA2B;IAC1C,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAC;IACZ,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,2DAA2D;IAC3D,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAUD,qBACa,6BAA6B;IAGtC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAJpB,aAAa,EAAE,wBAAwB,EAEvC,cAAc,EAAE,qBAAqB,EAErC,oBAAoB,EAAE,oBAAoB;IAGvD,OAAO,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,UAAU,CAAC;IAgCtE;;OAEG;YACW,WAAW;IAsBzB;;OAEG;YACW,YAAY;IAgD1B,OAAO,CAAC,kBAAkB;CAW3B"}
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
* Import GitHub Repository Use Case
|
|
3
3
|
*
|
|
4
4
|
* Orchestrates importing a GitHub repository: validates the URL, checks auth,
|
|
5
|
-
* detects duplicates by remoteUrl,
|
|
6
|
-
*
|
|
7
|
-
* repository record with the normalized remoteUrl.
|
|
5
|
+
* detects duplicates by remoteUrl/upstreamUrl, checks push access, and either
|
|
6
|
+
* clones directly or auto-forks when the user lacks push access.
|
|
8
7
|
*/
|
|
9
8
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
10
9
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -48,23 +47,68 @@ let ImportGitHubRepositoryUseCase = class ImportGitHubRepositoryUseCase {
|
|
|
48
47
|
if (existing) {
|
|
49
48
|
return existing;
|
|
50
49
|
}
|
|
50
|
+
// 3b. Check for duplicate by upstreamUrl (fork of this repo already imported)
|
|
51
|
+
const existingFork = await this.repositoryRepo.findByUpstreamUrl(normalizedUrl);
|
|
52
|
+
if (existingFork) {
|
|
53
|
+
return existingFork;
|
|
54
|
+
}
|
|
51
55
|
// 4. Check auth — throws GitHubAuthError if not authenticated
|
|
52
56
|
await this.gitHubService.checkAuth();
|
|
53
|
-
// 5.
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
// 5. Check push access to determine if we need to fork
|
|
58
|
+
const { hasPushAccess } = await this.gitHubService.checkPushAccess(parsed.nameWithOwner);
|
|
59
|
+
if (hasPushAccess) {
|
|
60
|
+
return this.cloneDirect(input, parsed.nameWithOwner, parsed.repo, normalizedUrl);
|
|
61
|
+
}
|
|
62
|
+
return this.forkAndClone(input, parsed.nameWithOwner, parsed.repo, normalizedUrl);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Direct clone path — user has push access to the repository.
|
|
66
|
+
*/
|
|
67
|
+
async cloneDirect(input, nameWithOwner, repoName, normalizedUrl) {
|
|
68
|
+
const destination = this.resolveDestination(input, repoName);
|
|
69
|
+
await this.gitHubService.cloneRepository(nameWithOwner, destination, input.cloneOptions);
|
|
58
70
|
const repository = await this.addRepositoryUseCase.execute({
|
|
59
71
|
path: destination,
|
|
60
|
-
name:
|
|
72
|
+
name: repoName,
|
|
61
73
|
});
|
|
62
|
-
// 8. Update with normalized remoteUrl
|
|
63
74
|
await this.repositoryRepo.update(repository.id, {
|
|
64
75
|
remoteUrl: normalizedUrl,
|
|
65
76
|
});
|
|
66
77
|
return { ...repository, remoteUrl: normalizedUrl };
|
|
67
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Fork-and-clone path — user lacks push access, so we auto-fork first.
|
|
81
|
+
*/
|
|
82
|
+
async forkAndClone(input, originalNameWithOwner, repoName, normalizedOriginalUrl) {
|
|
83
|
+
// Fork the repository
|
|
84
|
+
const forkResult = await this.gitHubService.forkRepository(originalNameWithOwner, input.forkOptions);
|
|
85
|
+
// Check if fork was already tracked
|
|
86
|
+
const normalizedForkUrl = normalizeRemoteUrl(forkResult.nameWithOwner);
|
|
87
|
+
const existingForkByRemote = await this.repositoryRepo.findByRemoteUrl(normalizedForkUrl);
|
|
88
|
+
if (existingForkByRemote) {
|
|
89
|
+
return existingForkByRemote;
|
|
90
|
+
}
|
|
91
|
+
// Clone the fork
|
|
92
|
+
const destination = this.resolveDestination(input, repoName);
|
|
93
|
+
await this.gitHubService.cloneRepository(forkResult.nameWithOwner, destination, input.cloneOptions);
|
|
94
|
+
// Register the cloned fork
|
|
95
|
+
const repository = await this.addRepositoryUseCase.execute({
|
|
96
|
+
path: destination,
|
|
97
|
+
name: repoName,
|
|
98
|
+
});
|
|
99
|
+
// Update with fork metadata
|
|
100
|
+
await this.repositoryRepo.update(repository.id, {
|
|
101
|
+
remoteUrl: normalizedForkUrl,
|
|
102
|
+
isFork: true,
|
|
103
|
+
upstreamUrl: normalizedOriginalUrl,
|
|
104
|
+
});
|
|
105
|
+
return {
|
|
106
|
+
...repository,
|
|
107
|
+
remoteUrl: normalizedForkUrl,
|
|
108
|
+
isFork: true,
|
|
109
|
+
upstreamUrl: normalizedOriginalUrl,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
68
112
|
resolveDestination(input, repoName) {
|
|
69
113
|
if (input.dest) {
|
|
70
114
|
return input.dest;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Init Remote Repository Use Case
|
|
3
|
+
*
|
|
4
|
+
* Orchestrates creating a GitHub repository from a local repo that has
|
|
5
|
+
* no remote yet. Uses `gh repo create` with `--source=.` to create the
|
|
6
|
+
* remote repo, configure the origin remote, and push the current branch.
|
|
7
|
+
*/
|
|
8
|
+
import type { IGitPrService } from '../../ports/output/services/git-pr-service.interface.js';
|
|
9
|
+
export interface InitRemoteRepositoryInput {
|
|
10
|
+
/** Working directory of the local repository */
|
|
11
|
+
cwd: string;
|
|
12
|
+
/** Repository name (defaults to directory basename) */
|
|
13
|
+
name?: string;
|
|
14
|
+
/** Whether to create a private repository (default: true) */
|
|
15
|
+
isPrivate?: boolean;
|
|
16
|
+
/** GitHub organization to create the repo under */
|
|
17
|
+
org?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface InitRemoteRepositoryResult {
|
|
20
|
+
/** URL of the created GitHub repository */
|
|
21
|
+
url: string;
|
|
22
|
+
/** Name used for the repository */
|
|
23
|
+
name: string;
|
|
24
|
+
}
|
|
25
|
+
export declare class InitRemoteRepositoryUseCase {
|
|
26
|
+
private readonly gitPrService;
|
|
27
|
+
constructor(gitPrService: IGitPrService);
|
|
28
|
+
execute(input: InitRemoteRepositoryInput): Promise<InitRemoteRepositoryResult>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=init-remote-repository.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-remote-repository.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/repositories/init-remote-repository.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yDAAyD,CAAC;AAE7F,MAAM,WAAW,yBAAyB;IACxC,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mDAAmD;IACnD,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,0BAA0B;IACzC,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBACa,2BAA2B;IAGpC,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,aAAa;IAGxC,OAAO,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,0BAA0B,CAAC;CAsBrF"}
|
package/dist/packages/core/src/application/use-cases/repositories/init-remote-repository.use-case.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Init Remote Repository Use Case
|
|
3
|
+
*
|
|
4
|
+
* Orchestrates creating a GitHub repository from a local repo that has
|
|
5
|
+
* no remote yet. Uses `gh repo create` with `--source=.` to create the
|
|
6
|
+
* remote repo, configure the origin remote, and push the current branch.
|
|
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
|
+
import { basename } from 'node:path';
|
|
22
|
+
let InitRemoteRepositoryUseCase = class InitRemoteRepositoryUseCase {
|
|
23
|
+
gitPrService;
|
|
24
|
+
constructor(gitPrService) {
|
|
25
|
+
this.gitPrService = gitPrService;
|
|
26
|
+
}
|
|
27
|
+
async execute(input) {
|
|
28
|
+
// 1. Guard: check if the repo already has a remote
|
|
29
|
+
const hasRemote = await this.gitPrService.hasRemote(input.cwd);
|
|
30
|
+
if (hasRemote) {
|
|
31
|
+
const existingUrl = await this.gitPrService.getRemoteUrl(input.cwd);
|
|
32
|
+
throw new Error(`Repository already has a remote configured${existingUrl ? ` (${existingUrl})` : ''}. ` +
|
|
33
|
+
'Use `git remote set-url origin <url>` to change it.');
|
|
34
|
+
}
|
|
35
|
+
// 2. Derive repo name from directory if not provided
|
|
36
|
+
const name = input.name ?? basename(input.cwd);
|
|
37
|
+
// 3. Create the GitHub repo (also adds origin remote and pushes)
|
|
38
|
+
const url = await this.gitPrService.createGitHubRepo(input.cwd, name, {
|
|
39
|
+
isPrivate: input.isPrivate ?? true,
|
|
40
|
+
org: input.org,
|
|
41
|
+
});
|
|
42
|
+
return { url, name };
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
InitRemoteRepositoryUseCase = __decorate([
|
|
46
|
+
injectable(),
|
|
47
|
+
__param(0, inject('IGitPrService')),
|
|
48
|
+
__metadata("design:paramtypes", [Object])
|
|
49
|
+
], InitRemoteRepositoryUseCase);
|
|
50
|
+
export { InitRemoteRepositoryUseCase };
|