@shepai/cli 1.135.3 → 1.136.0-pr396.3419613
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/FeatureFlags.yaml +5 -0
- package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +91 -5
- 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 +6 -4
- package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.d.ts +25 -0
- package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.js +62 -0
- package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.d.ts +34 -0
- package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.js +139 -0
- package/dist/packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.d.ts +16 -0
- package/dist/packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.js +43 -0
- package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
- package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +1 -0
- package/dist/packages/core/src/domain/generated/output.d.ts +4 -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 +20 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +2 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/042-add-feature-flag-git-rebase-sync.d.ts +11 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/042-add-feature-flag-git-rebase-sync.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/042-add-feature-flag-git-rebase-sync.js +17 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +3 -2
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.d.ts +35 -0
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.js +66 -0
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.d.ts +42 -0
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.js +169 -0
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +10 -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 +150 -0
- package/dist/src/presentation/web/app/(dashboard)/get-graph-data.d.ts.map +1 -1
- package/dist/src/presentation/web/app/(dashboard)/get-graph-data.js +5 -12
- package/dist/src/presentation/web/app/actions/check-agent-auth.d.ts +2 -0
- package/dist/src/presentation/web/app/actions/check-agent-auth.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/check-agent-auth.js +8 -1
- package/dist/src/presentation/web/app/actions/check-tool-status.d.ts +14 -0
- package/dist/src/presentation/web/app/actions/check-tool-status.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/check-tool-status.js +53 -0
- package/dist/src/presentation/web/app/actions/get-branch-sync-status.d.ts +11 -0
- package/dist/src/presentation/web/app/actions/get-branch-sync-status.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/get-branch-sync-status.js +22 -0
- package/dist/src/presentation/web/app/actions/rebase-feature.d.ts +5 -0
- package/dist/src/presentation/web/app/actions/rebase-feature.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/rebase-feature.js +16 -0
- package/dist/src/presentation/web/app/actions/sync-repository.d.ts +5 -0
- package/dist/src/presentation/web/app/actions/sync-repository.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/sync-repository.js +16 -0
- package/dist/src/presentation/web/app/build-graph-nodes.d.ts.map +1 -1
- package/dist/src/presentation/web/app/build-graph-nodes.js +1 -9
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +16 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.js +4 -4
- package/dist/src/presentation/web/components/common/feature-drawer/use-feature-actions.d.ts +4 -0
- package/dist/src/presentation/web/components/common/feature-drawer/use-feature-actions.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer/use-feature-actions.js +32 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.js +1 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.d.ts +12 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.js +13 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.stories.d.ts +15 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.stories.js +86 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts +9 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +2 -2
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts +9 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +3 -2
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts +6 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.js +34 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +17 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.js +91 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.js +54 -64
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.js +85 -19
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.stories.js +3 -0
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.js +5 -3
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.d.ts +2 -0
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.js +21 -0
- package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-node.js +7 -5
- package/dist/src/presentation/web/components/common/repository-node/use-repository-actions.d.ts +4 -0
- package/dist/src/presentation/web/components/common/repository-node/use-repository-actions.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/use-repository-actions.js +11 -0
- package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.js +35 -9
- package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.stories.d.ts +17 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.stories.js +110 -1
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.js +1 -1
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.stories.d.ts +1 -0
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.stories.js +443 -10
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +3 -0
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +3 -0
- package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.js +5 -0
- package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +1 -0
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.js +1 -0
- package/dist/src/presentation/web/hooks/feature-flags-context.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/feature-flags-context.js +1 -0
- package/dist/src/presentation/web/hooks/use-branch-sync-status.d.ts +14 -0
- package/dist/src/presentation/web/hooks/use-branch-sync-status.d.ts.map +1 -0
- package/dist/src/presentation/web/hooks/use-branch-sync-status.js +67 -0
- package/dist/src/presentation/web/lib/feature-flags.d.ts +2 -0
- package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/feature-flags.js +5 -0
- package/dist/src/presentation/web/lib/layout-with-dagre.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +3 -3
- package/web/.next/required-server-files.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +78 -48
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +3 -3
- 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/create/page/server-reference-manifest.json +78 -48
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +120 -60
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +120 -60
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +74 -44
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +78 -48
- package/web/.next/server/app/(dashboard)/create/page.js +3 -3
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +120 -60
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +120 -60
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +74 -44
- package/web/.next/server/app/(dashboard)/page.js +3 -3
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +74 -44
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +3 -3
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/skills/page.js +1 -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/server-reference-manifest.json +8 -8
- package/web/.next/server/app/tools/page.js +1 -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/server-reference-manifest.json +3 -3
- 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/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__c6e32a23._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1626f5d7._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1626f5d7._.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]__3ef34e4c._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__49557873._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__49557873._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6ec59045._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6ec59045._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__90fdc0ee._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__90fdc0ee._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__96670392._.js → [root-of-the-server]__a5f9c6e5._.js} +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a5f9c6e5._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a7259d16._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a7259d16._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__cb850066._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__cb850066._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +3 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__7894f27f._.js.map → [root-of-the-server]__d48c5b11._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_0020fddd._.js +1 -1
- package/web/.next/server/chunks/ssr/_0020fddd._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_02ec1aea._.js +1 -1
- package/web/.next/server/chunks/ssr/_02ec1aea._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_d17bc20a._.js → _12e70e0f._.js} +2 -2
- package/web/.next/server/chunks/ssr/_12e70e0f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_149f6559._.js +4 -0
- package/web/.next/server/chunks/ssr/_149f6559._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_1a09002f._.js +4 -0
- package/web/.next/server/chunks/ssr/_1a09002f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_48a8ee28._.js +6 -0
- package/web/.next/server/chunks/ssr/_48a8ee28._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_6e8c85b1._.js +6 -0
- package/web/.next/server/chunks/ssr/_6e8c85b1._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_7dca1882._.js +1 -1
- package/web/.next/server/chunks/ssr/_7dca1882._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_83220ba0._.js +4 -0
- package/web/.next/server/chunks/ssr/_83220ba0._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_939287c5._.js +4 -0
- package/web/.next/server/chunks/ssr/_939287c5._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_a37f5f18._.js +1 -1
- package/web/.next/server/chunks/ssr/_a37f5f18._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_a9f57758._.js +1 -1
- package/web/.next/server/chunks/ssr/_a9f57758._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_cfbd1d7e._.js +3 -0
- package/web/.next/server/chunks/ssr/_cfbd1d7e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
- package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_e369d697._.js +3 -0
- package/web/.next/server/chunks/ssr/_e369d697._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_f39a1adb._.js +1 -1
- package/web/.next/server/chunks/ssr/_f39a1adb._.js.map +1 -1
- 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/{src_presentation_web_127fb482._.js → src_presentation_web_7a714e65._.js} +2 -2
- package/web/.next/server/chunks/ssr/{src_presentation_web_127fb482._.js.map → src_presentation_web_7a714e65._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.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/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +524 -296
- package/web/.next/static/chunks/{fdc719494dcd9c92.js → 0d670faed5c6f4db.js} +2 -2
- package/web/.next/static/chunks/10bf6919593a6215.js +1 -0
- package/web/.next/static/chunks/{8c42b7752187f48c.js → 23fa92c62f1acd91.js} +2 -2
- package/web/.next/static/chunks/3b2ee07e89e63eb9.js +1 -0
- package/web/.next/static/chunks/6a370f2709c81d83.js +1 -0
- package/web/.next/static/chunks/{9154973d61eae190.js → 6b031a31d7ed8014.js} +1 -1
- package/web/.next/static/chunks/{61f7d4f0f0f770a4.js → 794d3019bf519ac6.js} +1 -1
- package/web/.next/static/chunks/{7875a9370622a064.js → 9641b9617a7a2eba.js} +1 -1
- package/web/.next/static/chunks/98ca39bc82fc71b7.js +1 -0
- package/web/.next/static/chunks/ab3afb0b942c1eb2.css +1 -0
- package/web/.next/static/chunks/{d8a0dd9bfd0f22fa.js → c52864d53a398329.js} +1 -1
- package/web/.next/static/chunks/d74bcd981f5c6567.js +1 -0
- package/web/.next/static/chunks/{1a9dfc34432387f5.js → db9476ebf7b799ae.js} +1 -1
- package/web/.next/static/chunks/{0b7fe2ac4f078f54.js → f070c67389a686ff.js} +1 -1
- package/web/.next/static/chunks/f66c996402a430f5.js +1 -0
- package/web/.next/static/chunks/{d5342f9be437afd9.js → f79d5a01a5bb399a.js} +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4e741df2.js +0 -3
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4e741df2.js.map +0 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_026fdffa.js +0 -3
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_026fdffa.js.map +0 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_8b91e197.js +0 -3
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_8b91e197.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__31bc28da._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__31bc28da._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__32ecbed9._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__32ecbed9._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7894f27f._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__90ce4b6d._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__90ce4b6d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__90f9ae71._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__90f9ae71._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__96670392._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9c45d070._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9c45d070._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3dbadca._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3dbadca._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_313c9690._.js +0 -3
- package/web/.next/server/chunks/ssr/_313c9690._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_b6960ca0._.js +0 -4
- package/web/.next/server/chunks/ssr/_b6960ca0._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_d17bc20a._.js.map +0 -1
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +0 -3
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_8e7fe0d1._.js +0 -5
- package/web/.next/server/chunks/ssr/src_presentation_web_8e7fe0d1._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_ca051134.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_ca051134.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b9023017._.js +0 -5
- package/web/.next/server/chunks/ssr/src_presentation_web_b9023017._.js.map +0 -1
- package/web/.next/static/chunks/15e6a74ef39fda73.js +0 -1
- package/web/.next/static/chunks/314b8314f77d6921.js +0 -1
- package/web/.next/static/chunks/3e2d7d07926b05bf.css +0 -1
- package/web/.next/static/chunks/55a1c86671bb1a5b.js +0 -1
- package/web/.next/static/chunks/c0c287da1631752f.js +0 -1
- package/web/.next/static/chunks/e6b87832e1382949.js +0 -1
- package/web/.next/static/chunks/eb9841ec4d80af01.js +0 -1
- /package/web/.next/static/{p0KCxpQ0DqKcttVypdnix → 8MYR9uk8PlifTn_WhlpAl}/_buildManifest.js +0 -0
- /package/web/.next/static/{p0KCxpQ0DqKcttVypdnix → 8MYR9uk8PlifTn_WhlpAl}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{p0KCxpQ0DqKcttVypdnix → 8MYR9uk8PlifTn_WhlpAl}/_ssgManifest.js +0 -0
|
@@ -22,6 +22,10 @@ properties:
|
|
|
22
22
|
type: boolean
|
|
23
23
|
default: false
|
|
24
24
|
description: Enable adopt branch feature to import existing branches as tracked features
|
|
25
|
+
gitRebaseSync:
|
|
26
|
+
type: boolean
|
|
27
|
+
default: false
|
|
28
|
+
description: Enable git rebase-on-main and sync-main operations in the web UI
|
|
25
29
|
reactFileManager:
|
|
26
30
|
type: boolean
|
|
27
31
|
default: false
|
|
@@ -32,5 +36,6 @@ required:
|
|
|
32
36
|
- debug
|
|
33
37
|
- githubImport
|
|
34
38
|
- adoptBranch
|
|
39
|
+
- gitRebaseSync
|
|
35
40
|
- reactFileManager
|
|
36
41
|
description: Feature flag toggles for runtime feature control
|
package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts
CHANGED
|
@@ -9,15 +9,17 @@ import type { PrStatus } from '../../../../domain/generated/output.js';
|
|
|
9
9
|
* Error codes for git PR operations.
|
|
10
10
|
*/
|
|
11
11
|
export declare enum GitPrErrorCode {
|
|
12
|
-
MERGE_CONFLICT = "MERGE_CONFLICT",
|
|
13
12
|
AUTH_FAILURE = "AUTH_FAILURE",
|
|
14
|
-
GH_NOT_FOUND = "GH_NOT_FOUND",
|
|
15
|
-
NETWORK_ERROR = "NETWORK_ERROR",
|
|
16
|
-
CI_TIMEOUT = "CI_TIMEOUT",
|
|
17
13
|
BRANCH_NOT_FOUND = "BRANCH_NOT_FOUND",
|
|
14
|
+
CI_TIMEOUT = "CI_TIMEOUT",
|
|
15
|
+
GH_NOT_FOUND = "GH_NOT_FOUND",
|
|
18
16
|
GIT_ERROR = "GIT_ERROR",
|
|
17
|
+
MERGE_CONFLICT = "MERGE_CONFLICT",
|
|
19
18
|
MERGE_FAILED = "MERGE_FAILED",
|
|
20
|
-
|
|
19
|
+
NETWORK_ERROR = "NETWORK_ERROR",
|
|
20
|
+
PR_NOT_FOUND = "PR_NOT_FOUND",
|
|
21
|
+
REBASE_CONFLICT = "REBASE_CONFLICT",
|
|
22
|
+
SYNC_FAILED = "SYNC_FAILED"
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Typed error for git PR operations.
|
|
@@ -321,5 +323,89 @@ export interface IGitPrService {
|
|
|
321
323
|
* @throws GitPrError with GH_NOT_FOUND or GIT_ERROR code on failure
|
|
322
324
|
*/
|
|
323
325
|
getFailureLogs(cwd: string, runId: string, branch: string, logMaxChars?: number): Promise<string>;
|
|
326
|
+
/**
|
|
327
|
+
* Sync the remote-tracking ref for the base branch.
|
|
328
|
+
* If currently on the base branch, uses `git pull --ff-only`.
|
|
329
|
+
* If on a different branch (including worktrees), uses `git fetch origin <baseBranch>`
|
|
330
|
+
* which updates `origin/<baseBranch>` without touching the local branch ref.
|
|
331
|
+
* This avoids the "refusing to fetch into branch checked out at..." error
|
|
332
|
+
* when the local base branch is checked out in another worktree.
|
|
333
|
+
*
|
|
334
|
+
* @param cwd - Working directory path
|
|
335
|
+
* @param baseBranch - The base branch to sync (e.g. "main")
|
|
336
|
+
* @throws GitPrError with SYNC_FAILED code if the branch has diverged and cannot fast-forward
|
|
337
|
+
* @throws GitPrError with GIT_ERROR code on other git failures
|
|
338
|
+
*/
|
|
339
|
+
syncMain(cwd: string, baseBranch: string): Promise<void>;
|
|
340
|
+
/**
|
|
341
|
+
* Rebase the feature branch onto `origin/<baseBranch>`.
|
|
342
|
+
* Uses the remote-tracking ref (not the local branch) to avoid issues
|
|
343
|
+
* when the local base branch is checked out in another worktree.
|
|
344
|
+
* Checks for dirty worktree before starting. Detects conflict state
|
|
345
|
+
* from git exit code and stderr — throws REBASE_CONFLICT if conflicts
|
|
346
|
+
* are encountered (caller is responsible for resolution or abort).
|
|
347
|
+
*
|
|
348
|
+
* @param cwd - Working directory path
|
|
349
|
+
* @param featureBranch - The feature branch to rebase
|
|
350
|
+
* @param baseBranch - The base branch name (rebase target will be origin/<baseBranch>)
|
|
351
|
+
* @throws GitPrError with GIT_ERROR code if the worktree is dirty
|
|
352
|
+
* @throws GitPrError with REBASE_CONFLICT code if conflicts are detected
|
|
353
|
+
* @throws GitPrError with BRANCH_NOT_FOUND code if a branch does not exist
|
|
354
|
+
*/
|
|
355
|
+
rebaseOnMain(cwd: string, featureBranch: string, baseBranch: string): Promise<void>;
|
|
356
|
+
/**
|
|
357
|
+
* Get the list of files with unresolved conflicts (unmerged paths).
|
|
358
|
+
* Uses `git diff --name-only --diff-filter=U` to identify conflicted files.
|
|
359
|
+
*
|
|
360
|
+
* @param cwd - Working directory path
|
|
361
|
+
* @returns Array of file paths with unresolved conflicts
|
|
362
|
+
* @throws GitPrError with GIT_ERROR code on failure
|
|
363
|
+
*/
|
|
364
|
+
getConflictedFiles(cwd: string): Promise<string[]>;
|
|
365
|
+
/**
|
|
366
|
+
* Stage specific files in the working directory.
|
|
367
|
+
* Uses `git add` for the specified file paths.
|
|
368
|
+
*
|
|
369
|
+
* @param cwd - Working directory path
|
|
370
|
+
* @param files - Array of file paths to stage
|
|
371
|
+
* @throws GitPrError with GIT_ERROR code on failure
|
|
372
|
+
*/
|
|
373
|
+
stageFiles(cwd: string, files: string[]): Promise<void>;
|
|
374
|
+
/**
|
|
375
|
+
* Continue an in-progress rebase after conflicts have been resolved.
|
|
376
|
+
* Runs `git rebase --continue`. May throw REBASE_CONFLICT if the next
|
|
377
|
+
* commit in the rebase also has conflicts.
|
|
378
|
+
*
|
|
379
|
+
* @param cwd - Working directory path
|
|
380
|
+
* @throws GitPrError with REBASE_CONFLICT code if new conflicts are detected
|
|
381
|
+
* @throws GitPrError with GIT_ERROR code on other git failures
|
|
382
|
+
*/
|
|
383
|
+
rebaseContinue(cwd: string): Promise<void>;
|
|
384
|
+
/**
|
|
385
|
+
* Abort an in-progress rebase, restoring the branch to its pre-rebase state.
|
|
386
|
+
* Runs `git rebase --abort`.
|
|
387
|
+
*
|
|
388
|
+
* @param cwd - Working directory path
|
|
389
|
+
* @throws GitPrError with GIT_ERROR code on failure
|
|
390
|
+
*/
|
|
391
|
+
rebaseAbort(cwd: string): Promise<void>;
|
|
392
|
+
/**
|
|
393
|
+
* Get the sync status (ahead/behind counts) between a feature branch
|
|
394
|
+
* and a base branch's remote-tracking ref.
|
|
395
|
+
*
|
|
396
|
+
* Uses:
|
|
397
|
+
* - `git rev-list --count origin/<baseBranch>..<featureBranch>` → ahead
|
|
398
|
+
* - `git rev-list --count <featureBranch>..origin/<baseBranch>` → behind
|
|
399
|
+
*
|
|
400
|
+
* @param cwd - Working directory path
|
|
401
|
+
* @param featureBranch - The feature branch to check
|
|
402
|
+
* @param baseBranch - The base branch name (uses origin/<baseBranch>)
|
|
403
|
+
* @returns Object with ahead and behind commit counts
|
|
404
|
+
* @throws GitPrError with GIT_ERROR code on failure
|
|
405
|
+
*/
|
|
406
|
+
getBranchSyncStatus(cwd: string, featureBranch: string, baseBranch: string): Promise<{
|
|
407
|
+
ahead: number;
|
|
408
|
+
behind: number;
|
|
409
|
+
}>;
|
|
324
410
|
}
|
|
325
411
|
//# sourceMappingURL=git-pr-service.interface.d.ts.map
|
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,
|
|
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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G,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzD;;;;;;;;;;;;;;OAcG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,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;;;;;;;;;;;;;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
|
@@ -9,15 +9,17 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export var GitPrErrorCode;
|
|
11
11
|
(function (GitPrErrorCode) {
|
|
12
|
-
GitPrErrorCode["MERGE_CONFLICT"] = "MERGE_CONFLICT";
|
|
13
12
|
GitPrErrorCode["AUTH_FAILURE"] = "AUTH_FAILURE";
|
|
14
|
-
GitPrErrorCode["GH_NOT_FOUND"] = "GH_NOT_FOUND";
|
|
15
|
-
GitPrErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR";
|
|
16
|
-
GitPrErrorCode["CI_TIMEOUT"] = "CI_TIMEOUT";
|
|
17
13
|
GitPrErrorCode["BRANCH_NOT_FOUND"] = "BRANCH_NOT_FOUND";
|
|
14
|
+
GitPrErrorCode["CI_TIMEOUT"] = "CI_TIMEOUT";
|
|
15
|
+
GitPrErrorCode["GH_NOT_FOUND"] = "GH_NOT_FOUND";
|
|
18
16
|
GitPrErrorCode["GIT_ERROR"] = "GIT_ERROR";
|
|
17
|
+
GitPrErrorCode["MERGE_CONFLICT"] = "MERGE_CONFLICT";
|
|
19
18
|
GitPrErrorCode["MERGE_FAILED"] = "MERGE_FAILED";
|
|
19
|
+
GitPrErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR";
|
|
20
20
|
GitPrErrorCode["PR_NOT_FOUND"] = "PR_NOT_FOUND";
|
|
21
|
+
GitPrErrorCode["REBASE_CONFLICT"] = "REBASE_CONFLICT";
|
|
22
|
+
GitPrErrorCode["SYNC_FAILED"] = "SYNC_FAILED";
|
|
21
23
|
})(GitPrErrorCode || (GitPrErrorCode = {}));
|
|
22
24
|
/**
|
|
23
25
|
* Typed error for git PR operations.
|
package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Branch Sync Status Use Case
|
|
3
|
+
*
|
|
4
|
+
* Returns how many commits a feature branch is ahead/behind the base branch.
|
|
5
|
+
*
|
|
6
|
+
* Flow: resolve feature → determine cwd (worktree or repo root) →
|
|
7
|
+
* sync remote tracking ref → get branch sync status.
|
|
8
|
+
*/
|
|
9
|
+
import type { IFeatureRepository } from '../../ports/output/repositories/feature-repository.interface.js';
|
|
10
|
+
import type { IGitPrService } from '../../ports/output/services/git-pr-service.interface.js';
|
|
11
|
+
import type { IWorktreeService } from '../../ports/output/services/worktree-service.interface.js';
|
|
12
|
+
export interface BranchSyncStatusResult {
|
|
13
|
+
ahead: number;
|
|
14
|
+
behind: number;
|
|
15
|
+
baseBranch: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class GetBranchSyncStatusUseCase {
|
|
18
|
+
private readonly featureRepo;
|
|
19
|
+
private readonly gitPrService;
|
|
20
|
+
private readonly worktreeService;
|
|
21
|
+
constructor(featureRepo: IFeatureRepository, gitPrService: IGitPrService, worktreeService: IWorktreeService);
|
|
22
|
+
execute(featureId: string): Promise<BranchSyncStatusResult>;
|
|
23
|
+
private resolveCwd;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=get-branch-sync-status.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-branch-sync-status.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yDAAyD,CAAC;AAC7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAElG,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBACa,0BAA0B;IAGnC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAJf,WAAW,EAAE,kBAAkB,EAE/B,YAAY,EAAE,aAAa,EAE3B,eAAe,EAAE,gBAAgB;IAG9C,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;YA0BnD,UAAU;CAOzB"}
|
package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get Branch Sync Status Use Case
|
|
3
|
+
*
|
|
4
|
+
* Returns how many commits a feature branch is ahead/behind the base branch.
|
|
5
|
+
*
|
|
6
|
+
* Flow: resolve feature → determine cwd (worktree or repo root) →
|
|
7
|
+
* sync remote tracking ref → get branch sync status.
|
|
8
|
+
*/
|
|
9
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
10
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
11
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
12
|
+
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;
|
|
13
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
|
+
};
|
|
15
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
17
|
+
};
|
|
18
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
19
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
20
|
+
};
|
|
21
|
+
import { injectable, inject } from 'tsyringe';
|
|
22
|
+
let GetBranchSyncStatusUseCase = class GetBranchSyncStatusUseCase {
|
|
23
|
+
featureRepo;
|
|
24
|
+
gitPrService;
|
|
25
|
+
worktreeService;
|
|
26
|
+
constructor(featureRepo, gitPrService, worktreeService) {
|
|
27
|
+
this.featureRepo = featureRepo;
|
|
28
|
+
this.gitPrService = gitPrService;
|
|
29
|
+
this.worktreeService = worktreeService;
|
|
30
|
+
}
|
|
31
|
+
async execute(featureId) {
|
|
32
|
+
const feature = (await this.featureRepo.findById(featureId)) ??
|
|
33
|
+
(await this.featureRepo.findByIdPrefix(featureId));
|
|
34
|
+
if (!feature) {
|
|
35
|
+
throw new Error(`Feature not found: "${featureId}"`);
|
|
36
|
+
}
|
|
37
|
+
if (!feature.branch) {
|
|
38
|
+
throw new Error(`Feature "${featureId}" has no branch`);
|
|
39
|
+
}
|
|
40
|
+
const cwd = await this.resolveCwd(feature.repositoryPath, feature.branch);
|
|
41
|
+
const baseBranch = await this.gitPrService.getDefaultBranch(feature.repositoryPath);
|
|
42
|
+
// Sync the remote tracking ref so ahead/behind counts are current
|
|
43
|
+
await this.gitPrService.syncMain(cwd, baseBranch);
|
|
44
|
+
const { ahead, behind } = await this.gitPrService.getBranchSyncStatus(cwd, feature.branch, baseBranch);
|
|
45
|
+
return { ahead, behind, baseBranch };
|
|
46
|
+
}
|
|
47
|
+
async resolveCwd(repositoryPath, branch) {
|
|
48
|
+
const hasWorktree = await this.worktreeService.exists(repositoryPath, branch);
|
|
49
|
+
if (hasWorktree) {
|
|
50
|
+
return this.worktreeService.getWorktreePath(repositoryPath, branch);
|
|
51
|
+
}
|
|
52
|
+
return repositoryPath;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
GetBranchSyncStatusUseCase = __decorate([
|
|
56
|
+
injectable(),
|
|
57
|
+
__param(0, inject('IFeatureRepository')),
|
|
58
|
+
__param(1, inject('IGitPrService')),
|
|
59
|
+
__param(2, inject('IWorktreeService')),
|
|
60
|
+
__metadata("design:paramtypes", [Object, Object, Object])
|
|
61
|
+
], GetBranchSyncStatusUseCase);
|
|
62
|
+
export { GetBranchSyncStatusUseCase };
|
package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rebase Feature on Main Use Case
|
|
3
|
+
*
|
|
4
|
+
* Rebases a feature branch onto the latest main branch with auto-sync
|
|
5
|
+
* and agent-powered conflict resolution.
|
|
6
|
+
*
|
|
7
|
+
* Flow: resolve feature → create standalone agent run → record phase timing →
|
|
8
|
+
* determine cwd (worktree or repo root) → sync main → rebase →
|
|
9
|
+
* on conflict, delegate to ConflictResolutionService → complete timing.
|
|
10
|
+
*/
|
|
11
|
+
import type { IFeatureRepository } from '../../ports/output/repositories/feature-repository.interface.js';
|
|
12
|
+
import type { IGitPrService } from '../../ports/output/services/git-pr-service.interface.js';
|
|
13
|
+
import type { IWorktreeService } from '../../ports/output/services/worktree-service.interface.js';
|
|
14
|
+
import type { IAgentRunRepository } from '../../ports/output/agents/agent-run-repository.interface.js';
|
|
15
|
+
import type { IPhaseTimingRepository } from '../../ports/output/agents/phase-timing-repository.interface.js';
|
|
16
|
+
import type { ConflictResolutionService } from '../../../infrastructure/services/agents/conflict-resolution/conflict-resolution.service.js';
|
|
17
|
+
export declare class RebaseFeatureOnMainUseCase {
|
|
18
|
+
private readonly featureRepo;
|
|
19
|
+
private readonly gitPrService;
|
|
20
|
+
private readonly worktreeService;
|
|
21
|
+
private readonly conflictResolutionService;
|
|
22
|
+
private readonly agentRunRepo;
|
|
23
|
+
private readonly phaseTimingRepo;
|
|
24
|
+
constructor(featureRepo: IFeatureRepository, gitPrService: IGitPrService, worktreeService: IWorktreeService, conflictResolutionService: ConflictResolutionService, agentRunRepo: IAgentRunRepository, phaseTimingRepo: IPhaseTimingRepository);
|
|
25
|
+
execute(featureId: string): Promise<void>;
|
|
26
|
+
private completeTiming;
|
|
27
|
+
/**
|
|
28
|
+
* Resolve the correct working directory for the feature.
|
|
29
|
+
* Uses the worktree path if a worktree exists for this branch,
|
|
30
|
+
* otherwise falls back to the repository root.
|
|
31
|
+
*/
|
|
32
|
+
private resolveCwd;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=rebase-feature-on-main.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rebase-feature-on-main.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yDAAyD,CAAC;AAK7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAClG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gEAAgE,CAAC;AAE7G,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4FAA4F,CAAC;AAE5I,qBACa,0BAA0B;IAGnC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,yBAAyB;IAE1C,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAVf,WAAW,EAAE,kBAAkB,EAE/B,YAAY,EAAE,aAAa,EAE3B,eAAe,EAAE,gBAAgB,EAEjC,yBAAyB,EAAE,yBAAyB,EAEpD,YAAY,EAAE,mBAAmB,EAEjC,eAAe,EAAE,sBAAsB;IAGpD,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAuEjC,cAAc;IAwB5B;;;;OAIG;YACW,UAAU;CAOzB"}
|
package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.js
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rebase Feature on Main Use Case
|
|
3
|
+
*
|
|
4
|
+
* Rebases a feature branch onto the latest main branch with auto-sync
|
|
5
|
+
* and agent-powered conflict resolution.
|
|
6
|
+
*
|
|
7
|
+
* Flow: resolve feature → create standalone agent run → record phase timing →
|
|
8
|
+
* determine cwd (worktree or repo root) → sync main → rebase →
|
|
9
|
+
* on conflict, delegate to ConflictResolutionService → complete timing.
|
|
10
|
+
*/
|
|
11
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
12
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
13
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14
|
+
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;
|
|
15
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16
|
+
};
|
|
17
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
18
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
19
|
+
};
|
|
20
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
21
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
22
|
+
};
|
|
23
|
+
import { injectable, inject } from 'tsyringe';
|
|
24
|
+
import { randomUUID } from 'node:crypto';
|
|
25
|
+
import { GitPrError, GitPrErrorCode, } from '../../ports/output/services/git-pr-service.interface.js';
|
|
26
|
+
import { AgentRunStatus, AgentType } from '../../../domain/generated/output.js';
|
|
27
|
+
let RebaseFeatureOnMainUseCase = class RebaseFeatureOnMainUseCase {
|
|
28
|
+
featureRepo;
|
|
29
|
+
gitPrService;
|
|
30
|
+
worktreeService;
|
|
31
|
+
conflictResolutionService;
|
|
32
|
+
agentRunRepo;
|
|
33
|
+
phaseTimingRepo;
|
|
34
|
+
constructor(featureRepo, gitPrService, worktreeService, conflictResolutionService, agentRunRepo, phaseTimingRepo) {
|
|
35
|
+
this.featureRepo = featureRepo;
|
|
36
|
+
this.gitPrService = gitPrService;
|
|
37
|
+
this.worktreeService = worktreeService;
|
|
38
|
+
this.conflictResolutionService = conflictResolutionService;
|
|
39
|
+
this.agentRunRepo = agentRunRepo;
|
|
40
|
+
this.phaseTimingRepo = phaseTimingRepo;
|
|
41
|
+
}
|
|
42
|
+
async execute(featureId) {
|
|
43
|
+
// Resolve feature by exact ID or prefix
|
|
44
|
+
const feature = (await this.featureRepo.findById(featureId)) ??
|
|
45
|
+
(await this.featureRepo.findByIdPrefix(featureId));
|
|
46
|
+
if (!feature) {
|
|
47
|
+
throw new Error(`Feature not found: "${featureId}"`);
|
|
48
|
+
}
|
|
49
|
+
// Create standalone agent run + phase timing for activity timeline
|
|
50
|
+
const now = new Date().toISOString();
|
|
51
|
+
const agentRunId = randomUUID();
|
|
52
|
+
const phaseTimingId = randomUUID();
|
|
53
|
+
await this.agentRunRepo.create({
|
|
54
|
+
id: agentRunId,
|
|
55
|
+
agentType: AgentType.ClaudeCode,
|
|
56
|
+
agentName: 'rebase',
|
|
57
|
+
status: AgentRunStatus.running,
|
|
58
|
+
prompt: `Rebase ${feature.branch} on main`,
|
|
59
|
+
threadId: agentRunId,
|
|
60
|
+
startedAt: now,
|
|
61
|
+
featureId: feature.id,
|
|
62
|
+
repositoryPath: feature.repositoryPath,
|
|
63
|
+
createdAt: now,
|
|
64
|
+
updatedAt: now,
|
|
65
|
+
});
|
|
66
|
+
await this.phaseTimingRepo.save({
|
|
67
|
+
id: phaseTimingId,
|
|
68
|
+
agentRunId,
|
|
69
|
+
phase: 'rebase',
|
|
70
|
+
startedAt: now,
|
|
71
|
+
createdAt: now,
|
|
72
|
+
updatedAt: now,
|
|
73
|
+
});
|
|
74
|
+
const startMs = Date.now();
|
|
75
|
+
try {
|
|
76
|
+
// Determine working directory — worktree path if it exists, else repo root
|
|
77
|
+
const cwd = await this.resolveCwd(feature.repositoryPath, feature.branch);
|
|
78
|
+
const defaultBranch = await this.gitPrService.getDefaultBranch(feature.repositoryPath);
|
|
79
|
+
// Auto-sync main before rebasing (per spec decision)
|
|
80
|
+
await this.gitPrService.syncMain(cwd, defaultBranch);
|
|
81
|
+
// Attempt rebase
|
|
82
|
+
try {
|
|
83
|
+
await this.gitPrService.rebaseOnMain(cwd, feature.branch, defaultBranch);
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
if (error instanceof GitPrError && error.code === GitPrErrorCode.REBASE_CONFLICT) {
|
|
87
|
+
// Delegate to agent-powered conflict resolution
|
|
88
|
+
await this.conflictResolutionService.resolve(cwd, feature.branch, defaultBranch);
|
|
89
|
+
// Conflict resolution succeeded — complete timing as success
|
|
90
|
+
await this.completeTiming(agentRunId, phaseTimingId, startMs, 'success');
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
throw error;
|
|
94
|
+
}
|
|
95
|
+
// Rebase succeeded without conflicts
|
|
96
|
+
await this.completeTiming(agentRunId, phaseTimingId, startMs, 'success');
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
// Record failure in timing
|
|
100
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
101
|
+
await this.completeTiming(agentRunId, phaseTimingId, startMs, 'error', message);
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
async completeTiming(agentRunId, phaseTimingId, startMs, exitCode, errorMessage) {
|
|
106
|
+
const completedAt = new Date().toISOString();
|
|
107
|
+
const durationMs = Date.now() - startMs;
|
|
108
|
+
await this.phaseTimingRepo.update(phaseTimingId, {
|
|
109
|
+
completedAt,
|
|
110
|
+
durationMs: BigInt(durationMs),
|
|
111
|
+
exitCode,
|
|
112
|
+
...(errorMessage && { errorMessage }),
|
|
113
|
+
});
|
|
114
|
+
await this.agentRunRepo.updateStatus(agentRunId, exitCode === 'success' ? AgentRunStatus.completed : AgentRunStatus.failed, { completedAt, ...(errorMessage && { error: errorMessage }) });
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Resolve the correct working directory for the feature.
|
|
118
|
+
* Uses the worktree path if a worktree exists for this branch,
|
|
119
|
+
* otherwise falls back to the repository root.
|
|
120
|
+
*/
|
|
121
|
+
async resolveCwd(repositoryPath, branch) {
|
|
122
|
+
const hasWorktree = await this.worktreeService.exists(repositoryPath, branch);
|
|
123
|
+
if (hasWorktree) {
|
|
124
|
+
return this.worktreeService.getWorktreePath(repositoryPath, branch);
|
|
125
|
+
}
|
|
126
|
+
return repositoryPath;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
RebaseFeatureOnMainUseCase = __decorate([
|
|
130
|
+
injectable(),
|
|
131
|
+
__param(0, inject('IFeatureRepository')),
|
|
132
|
+
__param(1, inject('IGitPrService')),
|
|
133
|
+
__param(2, inject('IWorktreeService')),
|
|
134
|
+
__param(3, inject('ConflictResolutionService')),
|
|
135
|
+
__param(4, inject('IAgentRunRepository')),
|
|
136
|
+
__param(5, inject('IPhaseTimingRepository')),
|
|
137
|
+
__metadata("design:paramtypes", [Object, Object, Object, Function, Object, Object])
|
|
138
|
+
], RebaseFeatureOnMainUseCase);
|
|
139
|
+
export { RebaseFeatureOnMainUseCase };
|
package/dist/packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sync Repository Main Use Case
|
|
3
|
+
*
|
|
4
|
+
* Syncs a repository's local main branch with the remote.
|
|
5
|
+
* Resolves the repository by ID, determines its path and default branch,
|
|
6
|
+
* then delegates to IGitPrService.syncMain().
|
|
7
|
+
*/
|
|
8
|
+
import type { IRepositoryRepository } from '../../ports/output/repositories/repository-repository.interface.js';
|
|
9
|
+
import type { IGitPrService } from '../../ports/output/services/git-pr-service.interface.js';
|
|
10
|
+
export declare class SyncRepositoryMainUseCase {
|
|
11
|
+
private readonly repositoryRepo;
|
|
12
|
+
private readonly gitPrService;
|
|
13
|
+
constructor(repositoryRepo: IRepositoryRepository, gitPrService: IGitPrService);
|
|
14
|
+
execute(repoId: string): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=sync-repository-main.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-repository-main.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAC;AAChH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yDAAyD,CAAC;AAE7F,qBACa,yBAAyB;IAGlC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAFZ,cAAc,EAAE,qBAAqB,EAErC,YAAY,EAAE,aAAa;IAGxC,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAS7C"}
|
package/dist/packages/core/src/application/use-cases/repositories/sync-repository-main.use-case.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sync Repository Main Use Case
|
|
3
|
+
*
|
|
4
|
+
* Syncs a repository's local main branch with the remote.
|
|
5
|
+
* Resolves the repository by ID, determines its path and default branch,
|
|
6
|
+
* then delegates to IGitPrService.syncMain().
|
|
7
|
+
*/
|
|
8
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
9
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
10
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
11
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
12
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
13
|
+
};
|
|
14
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
15
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
16
|
+
};
|
|
17
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
18
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
19
|
+
};
|
|
20
|
+
import { injectable, inject } from 'tsyringe';
|
|
21
|
+
let SyncRepositoryMainUseCase = class SyncRepositoryMainUseCase {
|
|
22
|
+
repositoryRepo;
|
|
23
|
+
gitPrService;
|
|
24
|
+
constructor(repositoryRepo, gitPrService) {
|
|
25
|
+
this.repositoryRepo = repositoryRepo;
|
|
26
|
+
this.gitPrService = gitPrService;
|
|
27
|
+
}
|
|
28
|
+
async execute(repoId) {
|
|
29
|
+
const repository = await this.repositoryRepo.findById(repoId);
|
|
30
|
+
if (!repository) {
|
|
31
|
+
throw new Error(`Repository not found: "${repoId}"`);
|
|
32
|
+
}
|
|
33
|
+
const defaultBranch = await this.gitPrService.getDefaultBranch(repository.path);
|
|
34
|
+
await this.gitPrService.syncMain(repository.path, defaultBranch);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
SyncRepositoryMainUseCase = __decorate([
|
|
38
|
+
injectable(),
|
|
39
|
+
__param(0, inject('IRepositoryRepository')),
|
|
40
|
+
__param(1, inject('IGitPrService')),
|
|
41
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
42
|
+
], SyncRepositoryMainUseCase);
|
|
43
|
+
export { SyncRepositoryMainUseCase };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-defaults.factory.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/domain/factories/settings-defaults.factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,QAAQ,EAUT,MAAM,qBAAqB,CAAC;AA6C7B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"settings-defaults.factory.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/domain/factories/settings-defaults.factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,QAAQ,EAUT,MAAM,qBAAqB,CAAC;AA6C7B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,IAAI,QAAQ,CAoFhD"}
|
|
@@ -550,6 +550,10 @@ export type FeatureFlags = {
|
|
|
550
550
|
* Enable adopt branch feature to import existing branches as tracked features
|
|
551
551
|
*/
|
|
552
552
|
adoptBranch: boolean;
|
|
553
|
+
/**
|
|
554
|
+
* Enable git rebase-on-main and sync-main operations in the web UI
|
|
555
|
+
*/
|
|
556
|
+
gitRebaseSync: boolean;
|
|
553
557
|
/**
|
|
554
558
|
* Use the built-in React file manager instead of the native OS folder picker
|
|
555
559
|
*/
|