@shepai/cli 1.139.0 → 1.139.1-pr448.31ab24e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.js +41 -20
- package/dist/src/presentation/web/app/actions/deploy-feature.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/deploy-feature.js +8 -0
- package/dist/src/presentation/web/app/actions/deploy-repository.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/deploy-repository.js +8 -0
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.js +1 -1
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.js +1 -1
- 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 +10 -8
- package/dist/src/presentation/web/lib/is-same-shep-instance.d.ts +7 -0
- package/dist/src/presentation/web/lib/is-same-shep-instance.d.ts.map +1 -0
- package/dist/src/presentation/web/lib/is-same-shep-instance.js +18 -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 +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 +28 -28
- 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 +28 -28
- 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 +36 -36
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
- 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 +28 -28
- 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 +36 -36
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +26 -26
- 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 +26 -26
- 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_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.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.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_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2bdf88a0._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2bdf88a0._.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]__42faf5ae._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__42faf5ae._.js.map +1 -0
- 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]__685ee565._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__685ee565._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__74756aae._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__74756aae._.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]__a5f9c6e5._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a5f9c6e5._.js.map +1 -1
- 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]__d48c5b11._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.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/_0c5f56e3._.js +2 -2
- package/web/.next/server/chunks/ssr/_0c5f56e3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1b719e7f._.js +1 -1
- package/web/.next/server/chunks/ssr/_1b719e7f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_37e8548b._.js +1 -1
- package/web/.next/server/chunks/ssr/_37e8548b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_55d763e2._.js +1 -1
- package/web/.next/server/chunks/ssr/_55d763e2._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_64bdfc6f._.js +2 -2
- package/web/.next/server/chunks/ssr/_64bdfc6f._.js.map +1 -1
- 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/{_a3a344a8._.js → _97e801b4._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_a3a344a8._.js.map → _97e801b4._.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/_b71645b4._.js +1 -1
- package/web/.next/server/chunks/ssr/_b71645b4._.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/_de127a3d._.js +3 -0
- package/web/.next/server/chunks/ssr/{_ebd0ef7f._.js.map → _de127a3d._.js.map} +1 -1
- 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_5aad507f._.js +3 -0
- package/web/.next/server/chunks/ssr/{src_presentation_web_582e5037._.js.map → src_presentation_web_5aad507f._.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 +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 +44 -44
- package/web/.next/static/chunks/183c9b64c8cccf86.js +1 -0
- package/web/.next/static/chunks/{5aac1b0e10edc3d4.js → 1c2fefc77d2a9c81.js} +2 -2
- package/web/.next/static/chunks/{2a318598dee02204.js → 233c1976fe0b0361.js} +1 -1
- package/web/.next/static/chunks/{13451dd1c5eb854a.js → 237e44d4d4e5c272.js} +1 -1
- package/web/.next/static/chunks/{d14b401b9ac6b439.js → 3bb01f02cd85a97d.js} +1 -1
- package/web/.next/static/chunks/5ce9df220e4162da.js +2 -0
- package/web/.next/static/chunks/{add583b93a6e62ef.js → a1e9348107cadde6.js} +1 -1
- package/web/.next/static/chunks/d3cbcb7f2c264324.css +1 -0
- package/web/.next/static/chunks/de8647d47a2f99cb.js +1 -0
- package/web/.next/static/chunks/{9d59552a1eb58b20.js → dff0a6efda22693e.js} +1 -1
- package/web/.next/static/chunks/{1a46d832fb5dbb4d.js → e022e4309d682752.js} +1 -1
- package/web/.next/static/chunks/e38910b4d10a0db7.js +1 -0
- package/web/.next/static/chunks/{26f8c1dc8e8d3a85.js → e562e3212978ee39.js} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2c703b78._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2c703b78._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__59a3897b._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__59a3897b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__78aecdd5._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__78aecdd5._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f222995d._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f222995d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_ebd0ef7f._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_582e5037._.js +0 -3
- package/web/.next/static/chunks/284bdcf374b23190.js +0 -1
- package/web/.next/static/chunks/4d521e80c86070db.js +0 -1
- package/web/.next/static/chunks/7d4461c2f06d2cb9.js +0 -1
- package/web/.next/static/chunks/ba967f7de77cd5ee.css +0 -1
- package/web/.next/static/chunks/c4c3d56eac00b6a3.js +0 -2
- /package/web/.next/static/{dDoTmkPtcr9knH6GiOhGo → AxByPKlCXrQcJZrQNibBp}/_buildManifest.js +0 -0
- /package/web/.next/static/{dDoTmkPtcr9knH6GiOhGo → AxByPKlCXrQcJZrQNibBp}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{dDoTmkPtcr9knH6GiOhGo → AxByPKlCXrQcJZrQNibBp}/_ssgManifest.js +0 -0
package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployment.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/deployment/deployment.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,EAAmC,MAAM,oBAAoB,CAAC;AAK5E,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACT,MAAM,qEAAqE,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAiCzD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,eAAe,EAAE,OAAO,eAAe,CAAC;IACxC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,KAAK,IAAI,CAAC;IAC7D,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACnC;AA0CD,qBAAa,iBAAkB,YAAW,kBAAkB;IAC1D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAsC;IAClE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAwB;IAC7C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;IAC9C,OAAO,CAAC,EAAE,CAAkC;gBAEhC,IAAI,GAAE,OAAO,CAAC,qBAAqB,CAAM;IAIrD;;OAEG;IACH,WAAW,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI;IAIxC;;;;;;;;;;;;OAYG;IACH,UAAU,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"deployment.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/deployment/deployment.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,EAAmC,MAAM,oBAAoB,CAAC;AAK5E,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAK3C,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACT,MAAM,qEAAqE,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAiCzD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,eAAe,EAAE,OAAO,eAAe,CAAC;IACxC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,KAAK,IAAI,CAAC;IAC7D,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACnC;AA0CD,qBAAa,iBAAkB,YAAW,kBAAkB;IAC1D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAsC;IAClE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAwB;IAC7C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;IAC9C,OAAO,CAAC,EAAE,CAAkC;gBAEhC,IAAI,GAAE,OAAO,CAAC,qBAAqB,CAAM;IAIrD;;OAEG;IACH,WAAW,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI;IAIxC;;;;;;;;;;;;OAYG;IACH,UAAU,IAAI,IAAI;IAqFlB;;;OAGG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,SAAe,GAAG,IAAI;IA6H5E;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IA4CpD;;OAEG;IACG,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA0D3C;;OAEG;IACH,OAAO,IAAI,IAAI;IAef;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,GAAG,IAAI;IAM5C;;OAEG;IACH,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI;IAI1D;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI;IAM3D,OAAO,CAAC,QAAQ;IAuBhB,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,MAAM;IAed,OAAO,CAAC,WAAW;IAQnB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;YA4Dd,aAAa;IAW3B,OAAO,CAAC,WAAW;IAUnB;;;;OAIG;YACW,kBAAkB;IAsChC;;;OAGG;IACH,OAAO,CAAC,SAAS;CAwBlB"}
|
|
@@ -99,6 +99,12 @@ export class DeploymentService {
|
|
|
99
99
|
recoverAll() {
|
|
100
100
|
if (!this.db)
|
|
101
101
|
return;
|
|
102
|
+
// Child dev servers spawned by DeploymentService share the same global DB.
|
|
103
|
+
// Skip recovery to avoid killing processes owned by the parent instance.
|
|
104
|
+
if (process.env.SHEP_SKIP_RECOVERY) {
|
|
105
|
+
log.info('SHEP_SKIP_RECOVERY set — skipping dev server recovery');
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
102
108
|
let rows;
|
|
103
109
|
try {
|
|
104
110
|
const stmt = this.db.prepare('SELECT * FROM dev_servers');
|
|
@@ -137,20 +143,16 @@ export class DeploymentService {
|
|
|
137
143
|
continue;
|
|
138
144
|
}
|
|
139
145
|
if (alive) {
|
|
140
|
-
// Strategy 2: Process alive but stuck in Booting —
|
|
141
|
-
//
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
// already dead
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
log.info(`Dev server "${row.target_id}" (pid=${row.pid}) is dead — will re-spawn`);
|
|
146
|
+
// Strategy 2: Process alive but stuck in Booting — leave it running.
|
|
147
|
+
// We can't re-attach stdout so we can't detect when it becomes Ready,
|
|
148
|
+
// but killing it would be destructive (another process on the same
|
|
149
|
+
// shared DB may have just spawned it). The user can restart manually.
|
|
150
|
+
log.info(`Orphan "${row.target_id}" (pid=${row.pid}) stuck in ${row.state} — leaving alive (cannot re-attach)`);
|
|
151
|
+
this.dbDelete(row.target_id);
|
|
152
|
+
continue;
|
|
152
153
|
}
|
|
153
|
-
// Strategy
|
|
154
|
+
// Strategy 3: Dead process — re-spawn if target directory still exists
|
|
155
|
+
log.info(`Dev server "${row.target_id}" (pid=${row.pid}) is dead — will re-spawn`);
|
|
154
156
|
this.dbDelete(row.target_id);
|
|
155
157
|
if (!existsSync(join(row.target_path, 'package.json'))) {
|
|
156
158
|
log.warn(`Skipping re-spawn for "${row.target_id}" — no package.json at "${row.target_path}"`);
|
|
@@ -215,6 +217,9 @@ export class DeploymentService {
|
|
|
215
217
|
// stdout/stderr — we don't need it because taskkill /F /T handles tree kill.
|
|
216
218
|
...(IS_WINDOWS ? { windowsHide: true } : { detached: true }),
|
|
217
219
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
220
|
+
// Prevent child shep instances (e.g. worktree dev servers) from running
|
|
221
|
+
// recoverAll() on the shared ~/.shep/data DB and killing our processes.
|
|
222
|
+
env: { ...process.env, SHEP_SKIP_RECOVERY: '1' },
|
|
218
223
|
});
|
|
219
224
|
if (!child.pid) {
|
|
220
225
|
log.error('spawn() returned no PID — process failed to start');
|
|
@@ -234,7 +239,10 @@ export class DeploymentService {
|
|
|
234
239
|
logs: new LogRingBuffer(),
|
|
235
240
|
};
|
|
236
241
|
this.deployments.set(targetId, entry);
|
|
237
|
-
|
|
242
|
+
// NOTE: Do NOT write to DB during Booting. The spawned process may be
|
|
243
|
+
// another shep instance sharing ~/.shep/data — its recoverAll() would
|
|
244
|
+
// find this Booting entry, see its own PID as alive, and SIGKILL itself.
|
|
245
|
+
// We persist to DB only when the state transitions to Ready (URL detected).
|
|
238
246
|
// Attach stdout/stderr listeners for port detection
|
|
239
247
|
this.attachOutputListener(entry, 'stdout');
|
|
240
248
|
this.attachOutputListener(entry, 'stderr');
|
|
@@ -245,12 +253,25 @@ export class DeploymentService {
|
|
|
245
253
|
this.deployments.delete(targetId);
|
|
246
254
|
this.dbDelete(targetId);
|
|
247
255
|
});
|
|
248
|
-
//
|
|
249
|
-
|
|
256
|
+
// Use 'close' instead of 'exit' — 'close' fires after stdio streams are
|
|
257
|
+
// fully consumed, so entry.logs will contain all captured output.
|
|
258
|
+
child.on('close', (code, signal) => {
|
|
250
259
|
const wasBooting = entry.state === DeploymentState.Booting;
|
|
251
|
-
log.info(`Process
|
|
260
|
+
log.info(`Process closed for "${targetId}" (pid=${entry.pid}) — code=${code}, signal=${signal}, wasBooting=${wasBooting}`);
|
|
252
261
|
if (wasBooting) {
|
|
253
|
-
log.warn(
|
|
262
|
+
log.warn(`Process exited while still in Booting state — dev server likely crashed on startup (code=${code}, signal=${signal}).`);
|
|
263
|
+
const allLogs = entry.logs.getAll();
|
|
264
|
+
const stdoutLines = allLogs.filter((l) => l.stream === 'stdout');
|
|
265
|
+
const stderrLines = allLogs.filter((l) => l.stream === 'stderr');
|
|
266
|
+
if (stdoutLines.length > 0) {
|
|
267
|
+
log.warn(`[${targetId}] stdout:\n${stdoutLines.map((l) => l.line).join('\n')}`);
|
|
268
|
+
}
|
|
269
|
+
if (stderrLines.length > 0) {
|
|
270
|
+
log.warn(`[${targetId}] stderr:\n${stderrLines.map((l) => l.line).join('\n')}`);
|
|
271
|
+
}
|
|
272
|
+
if (allLogs.length === 0) {
|
|
273
|
+
log.warn(`[${targetId}] No output captured from the process.`);
|
|
274
|
+
}
|
|
254
275
|
}
|
|
255
276
|
this.deployments.delete(targetId);
|
|
256
277
|
this.dbDelete(targetId);
|
|
@@ -485,7 +506,7 @@ export class DeploymentService {
|
|
|
485
506
|
log.info(`[${entry.targetId}] Port detected — url="${url}" (from ${stream})`);
|
|
486
507
|
entry.state = DeploymentState.Ready;
|
|
487
508
|
entry.url = url;
|
|
488
|
-
this.
|
|
509
|
+
this.dbUpsert(entry);
|
|
489
510
|
}
|
|
490
511
|
}
|
|
491
512
|
}
|
|
@@ -500,7 +521,7 @@ export class DeploymentService {
|
|
|
500
521
|
log.info(`[${entry.targetId}] Port detected in flushed buffer — url="${url}"`);
|
|
501
522
|
entry.state = DeploymentState.Ready;
|
|
502
523
|
entry.url = url;
|
|
503
|
-
this.
|
|
524
|
+
this.dbUpsert(entry);
|
|
504
525
|
}
|
|
505
526
|
}
|
|
506
527
|
entry[bufferKey] = '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/deploy-feature.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/deploy-feature.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAKvE,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,eAAe,CAAA;CAAE,CAAC,CAgDxE"}
|
|
@@ -4,6 +4,7 @@ import { resolve } from '../../lib/server-container.js';
|
|
|
4
4
|
import { createDeploymentLogger } from '../../../../../packages/core/src/infrastructure/services/deployment/deployment-logger.js';
|
|
5
5
|
import { computeWorktreePath } from '../../../../../packages/core/src/infrastructure/services/ide-launchers/compute-worktree-path.js';
|
|
6
6
|
import { DeploymentState } from '../../../../../packages/core/src/domain/generated/output.js';
|
|
7
|
+
import { isSameShepInstance } from '../../lib/is-same-shep-instance.js';
|
|
7
8
|
const log = createDeploymentLogger('[deployFeature]');
|
|
8
9
|
export async function deployFeature(featureId) {
|
|
9
10
|
log.info(`called — featureId="${featureId}"`);
|
|
@@ -25,6 +26,13 @@ export async function deployFeature(featureId) {
|
|
|
25
26
|
log.warn(`worktree path does not exist on disk: "${worktreePath}"`);
|
|
26
27
|
return { success: false, error: `Worktree path does not exist: ${worktreePath}` };
|
|
27
28
|
}
|
|
29
|
+
if (isSameShepInstance(feature.repositoryPath)) {
|
|
30
|
+
log.warn('rejected — feature belongs to the running shep instance');
|
|
31
|
+
return {
|
|
32
|
+
success: false,
|
|
33
|
+
error: 'Cannot start a dev server for features of the repository Shep is running from',
|
|
34
|
+
};
|
|
35
|
+
}
|
|
28
36
|
log.info('worktree path exists, calling deploymentService.start()');
|
|
29
37
|
const deploymentService = resolve('IDeploymentService');
|
|
30
38
|
deploymentService.start(featureId, worktreePath, 'feature');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-repository.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/deploy-repository.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy-repository.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/deploy-repository.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAKvE,wBAAsB,gBAAgB,CACpC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,eAAe,CAAA;CAAE,CAAC,CAiCxE"}
|
|
@@ -4,6 +4,7 @@ import { isAbsolute } from 'node:path';
|
|
|
4
4
|
import { resolve } from '../../lib/server-container.js';
|
|
5
5
|
import { createDeploymentLogger } from '../../../../../packages/core/src/infrastructure/services/deployment/deployment-logger.js';
|
|
6
6
|
import { DeploymentState } from '../../../../../packages/core/src/domain/generated/output.js';
|
|
7
|
+
import { isSameShepInstance } from '../../lib/is-same-shep-instance.js';
|
|
7
8
|
const log = createDeploymentLogger('[deployRepository]');
|
|
8
9
|
export async function deployRepository(repositoryPath) {
|
|
9
10
|
log.info(`called — repositoryPath="${repositoryPath}"`);
|
|
@@ -16,6 +17,13 @@ export async function deployRepository(repositoryPath) {
|
|
|
16
17
|
log.warn(`directory does not exist: "${repositoryPath}"`);
|
|
17
18
|
return { success: false, error: `Directory does not exist: ${repositoryPath}` };
|
|
18
19
|
}
|
|
20
|
+
if (isSameShepInstance(repositoryPath)) {
|
|
21
|
+
log.warn('rejected — target is the running shep instance');
|
|
22
|
+
return {
|
|
23
|
+
success: false,
|
|
24
|
+
error: 'Cannot start a dev server for the repository Shep is running from',
|
|
25
|
+
};
|
|
26
|
+
}
|
|
19
27
|
log.info('directory exists, calling deploymentService.start()');
|
|
20
28
|
const deploymentService = resolve('IDeploymentService');
|
|
21
29
|
deploymentService.start(repositoryPath, repositoryPath, 'repository');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/base-drawer/base-drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAelE,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGpF,QAAA,MAAM,cAAc;;8EAUlB,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,YAAY,CAAC,OAAO,cAAc,CAAC;IAC1E,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yGAAyG;IACzG,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAClC;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,KAAa,EACb,qBAA6B,EAC7B,KAAgB,EAChB,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,MAAM,EACN,SAAS,EACT,aAAa,EAAE,MAAM,EACrB,YAAY,GACb,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"base-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/base-drawer/base-drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAelE,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGpF,QAAA,MAAM,cAAc;;8EAUlB,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,YAAY,CAAC,OAAO,cAAc,CAAC;IAC1E,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yGAAyG;IACzG,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAClC;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,KAAa,EACb,qBAA6B,EAC7B,KAAgB,EAChB,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,MAAM,EACN,SAAS,EACT,aAAa,EAAE,MAAM,EACrB,YAAY,GACb,EAAE,eAAe,2CA0FjB"}
|
|
@@ -54,7 +54,7 @@ export function BaseDrawer({ open, onClose, modal = false, dismissOnOutsideClick
|
|
|
54
54
|
return (_jsxs(Drawer, { direction: "right", modal: modal, handleOnly: true, open: open, onOpenChange: (isOpen) => {
|
|
55
55
|
if (!isOpen)
|
|
56
56
|
onClose();
|
|
57
|
-
}, children: [modal ? _jsx(DrawerOverlay, {}) : null, _jsxs(DrawerContent, { ref: contentRef, direction: "right", showCloseButton: false, className: cn(drawerVariants({ size }), className), "data-testid": testId, onInteractOutside: modal ? undefined : (e) => e.preventDefault(), children: [_jsx(DrawerTitle, { asChild: true, children: _jsx("span", { className: "sr-only", children: title }) }), _jsx(DrawerDescription, { asChild: true, children: _jsx("span", { className: "sr-only", children: title }) }), _jsxs("button", { type: "button", "aria-label": "Close", onClick: onClose, className: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden", "data-testid": testId ? `${testId}-close-button` : undefined, children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }), header ? _jsx(DrawerHeader, { className: "shrink-0", children: header }) : null, header ? _jsx(Separator, {}) : null, featureFlags.envDeploy && deployTarget ? _jsx(DeployBar, { deployTarget: deployTarget }) : null, _jsx("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: children }), footer ? _jsx(DrawerFooter, { className: "shrink-0", children: footer }) : null] })] }));
|
|
57
|
+
}, children: [modal ? _jsx(DrawerOverlay, {}) : null, _jsxs(DrawerContent, { ref: contentRef, direction: "right", showCloseButton: false, className: cn(drawerVariants({ size }), 'bg-white/85 backdrop-blur-xl dark:bg-neutral-800/85', className), "data-testid": testId, onInteractOutside: modal ? undefined : (e) => e.preventDefault(), children: [_jsx(DrawerTitle, { asChild: true, children: _jsx("span", { className: "sr-only", children: title }) }), _jsx(DrawerDescription, { asChild: true, children: _jsx("span", { className: "sr-only", children: title }) }), _jsxs("button", { type: "button", "aria-label": "Close", onClick: onClose, className: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden", "data-testid": testId ? `${testId}-close-button` : undefined, children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }), header ? _jsx(DrawerHeader, { className: "shrink-0", children: header }) : null, header ? _jsx(Separator, {}) : null, featureFlags.envDeploy && deployTarget ? _jsx(DeployBar, { deployTarget: deployTarget }) : null, _jsx("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: children }), footer ? _jsx(DrawerFooter, { className: "shrink-0", children: footer }) : null] })] }));
|
|
58
58
|
}
|
|
59
59
|
function DeployBar({ deployTarget }) {
|
|
60
60
|
const deployAction = useDeployAction(deployTarget);
|
|
@@ -274,7 +274,7 @@ export function DrawerActionBar({ onReject, onApprove, approveLabel, approveVari
|
|
|
274
274
|
}
|
|
275
275
|
}, []);
|
|
276
276
|
const modKey = typeof navigator !== 'undefined' && /Mac/i.test(navigator.userAgent) ? '⌘' : 'Ctrl';
|
|
277
|
-
return (_jsxs("div", { className: "border-border shrink-0 border-t", children: [children, onReject ? (_jsx(TooltipProvider, { delayDuration: 400, children: _jsx("form", { ref: formRef, onSubmit: handleFormSubmit, className: "p-3", children: _jsx("div", { role: "region", "aria-label": "File drop zone", "data-drag-over": isDragOver ? 'true' : 'false', onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDragOver: handleDragOver, onDrop: handleDrop, className: cn('rounded-md border-2 border-transparent transition-colors', isDragOver && 'border-primary/50 bg-primary/5'), children: _jsxs("div", { className: "border-input focus-within:ring-ring/50 focus-within:border-ring flex flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]", children: [_jsx(Textarea, { placeholder: revisionPlaceholder ?? 'Ask AI to revise...', "aria-label": revisionPlaceholder ?? 'Ask AI to revise...', disabled: disabled, value: chatInput, onChange: (e) => setChatInput(e.target.value), onKeyDown: handleKeyDown, onPaste: handlePaste, rows:
|
|
277
|
+
return (_jsxs("div", { className: "border-border shrink-0 border-t", children: [children, onReject ? (_jsx(TooltipProvider, { delayDuration: 400, children: _jsx("form", { ref: formRef, onSubmit: handleFormSubmit, className: "p-3", children: _jsx("div", { role: "region", "aria-label": "File drop zone", "data-drag-over": isDragOver ? 'true' : 'false', onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDragOver: handleDragOver, onDrop: handleDrop, className: cn('rounded-md border-2 border-transparent transition-colors', isDragOver && 'border-primary/50 bg-primary/5'), children: _jsxs("div", { className: "border-input focus-within:ring-ring/50 focus-within:border-ring flex flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]", children: [_jsx(Textarea, { placeholder: revisionPlaceholder ?? 'Ask AI to revise...', "aria-label": revisionPlaceholder ?? 'Ask AI to revise...', disabled: disabled, value: chatInput, onChange: (e) => setChatInput(e.target.value), onKeyDown: handleKeyDown, onPaste: handlePaste, rows: 1, className: "max-h-[35dvh] min-h-9 flex-1 resize-none overflow-y-auto rounded-none border-0 py-2 shadow-none focus-visible:ring-0", "data-testid": "drawer-chat-input" }), attachments.length > 0 && (_jsx("div", { className: "flex flex-wrap items-center gap-1.5 px-3 py-2", children: attachments.map((file) => (_jsx(AttachmentChip, { name: file.name, size: file.size, mimeType: file.mimeType, path: file.path, onRemove: () => handleRemoveFile(file.id), disabled: disabled, loading: file.loading }, file.id))) })), uploadError ? (_jsx("p", { className: "text-destructive px-3 pb-2 text-xs", children: uploadError })) : null, _jsxs("div", { className: "border-input flex items-center gap-2 border-t px-3 py-1.5", children: [_jsxs("span", { className: "text-muted-foreground flex-1 truncate text-[11px]", children: [_jsxs("kbd", { className: "bg-muted rounded px-1 py-0.5 font-mono text-[10px]", children: [modKey, "+Enter"] }), ' ', hasText ? 'reject' : 'approve'] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: handleAddFiles, disabled: disabled, "aria-label": "Attach files", className: "text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors", children: _jsx(PaperclipIcon, { className: "h-4 w-4" }) }) }), _jsx(TooltipContent, { side: "top", children: "Attach files" })] }), _jsx("div", { onMouseLeave: () => setHoverExpanded(false), children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("button", { type: "submit", disabled: disabled, "data-testid": "drawer-action-submit", className: cn('relative flex h-9 min-w-[12rem] cursor-pointer items-center overflow-hidden rounded-md border pr-10 pl-4 text-sm font-medium whitespace-nowrap transition-colors', 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50', approveExpanded
|
|
278
278
|
? `${accentBorder} text-white`
|
|
279
279
|
: rejectHighlighted
|
|
280
280
|
? 'border-primary bg-muted ring-primary/30 shadow-sm ring-1'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-node.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AA4CnE,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,
|
|
1
|
+
{"version":3,"file":"feature-node.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AA4CnE,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,2CA2cA"}
|
|
@@ -61,13 +61,13 @@ export function FeatureNode({ data, selected, }) {
|
|
|
61
61
|
data.state !== 'archived' ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { "aria-label": "Archive feature", "data-testid": "feature-node-archive-button", onClick: (e) => {
|
|
62
62
|
e.stopPropagation();
|
|
63
63
|
setArchiveConfirmOpen(true);
|
|
64
|
-
}, className: "bg-card text-muted-foreground flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors hover:border-gray-500 hover:text-gray-600", children: _jsx(Archive, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Archive feature" })] }) })) : null, data.onDelete && data.featureId && data.state !== 'deleting' ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { "aria-label": "Delete feature", "data-testid": "feature-node-delete-button", onClick: (e) => {
|
|
64
|
+
}, className: "bg-card text-muted-foreground flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors hover:border-gray-500 hover:text-gray-600", children: _jsx(Archive, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { side: "left", children: "Archive feature" })] }) })) : null, data.onDelete && data.featureId && data.state !== 'deleting' ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { "aria-label": "Delete feature", "data-testid": "feature-node-delete-button", onClick: (e) => {
|
|
65
65
|
e.stopPropagation();
|
|
66
66
|
setConfirmOpen(true);
|
|
67
|
-
}, className: "bg-card text-muted-foreground hover:border-destructive hover:text-destructive flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors", children: _jsx(Trash2, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Delete feature" })] }) })) : null, data.onUnarchive && data.featureId && data.state === 'archived' ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { "aria-label": "Unarchive feature", "data-testid": "feature-node-unarchive-button", onClick: (e) => {
|
|
67
|
+
}, className: "bg-card text-muted-foreground hover:border-destructive hover:text-destructive flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors", children: _jsx(Trash2, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { side: "left", children: "Delete feature" })] }) })) : null, data.onUnarchive && data.featureId && data.state === 'archived' ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { "aria-label": "Unarchive feature", "data-testid": "feature-node-unarchive-button", onClick: (e) => {
|
|
68
68
|
e.stopPropagation();
|
|
69
69
|
data.onUnarchive?.(data.featureId);
|
|
70
|
-
}, className: "bg-card text-muted-foreground hover:border-primary hover:text-primary flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors", children: _jsx(ArchiveRestore, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Unarchive feature" })] }) })) : null] }), data.onDelete && data.featureId && data.state !== 'deleting' ? (_jsx(DeleteFeatureDialog, { open: confirmOpen, onOpenChange: setConfirmOpen, onConfirm: (cleanup, cascadeDelete, closePr) => {
|
|
70
|
+
}, className: "bg-card text-muted-foreground hover:border-primary hover:text-primary flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors", children: _jsx(ArchiveRestore, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { side: "left", children: "Unarchive feature" })] }) })) : null] }), data.onDelete && data.featureId && data.state !== 'deleting' ? (_jsx(DeleteFeatureDialog, { open: confirmOpen, onOpenChange: setConfirmOpen, onConfirm: (cleanup, cascadeDelete, closePr) => {
|
|
71
71
|
setConfirmOpen(false);
|
|
72
72
|
data.onDelete?.(data.featureId, cleanup, cascadeDelete, closePr);
|
|
73
73
|
}, isDeleting: false, featureName: data.name ?? 'this feature', featureId: data.featureId, hasChildren: data.hasChildren, hasOpenPr: !!data.pr && data.pr.status === 'Open' })) : null, data.onArchive &&
|
|
@@ -77,7 +77,9 @@ export function FeatureNode({ data, selected, }) {
|
|
|
77
77
|
setArchiveConfirmOpen(false);
|
|
78
78
|
data.onArchive?.(data.featureId);
|
|
79
79
|
}, children: "Archive" })] })] }) })) : null, _jsxs("div", { "data-testid": "feature-node-card", "aria-busy": data.state === 'creating' || data.state === 'deleting' ? 'true' : undefined, className: cn('bg-card flex min-h-35 w-97 cursor-pointer flex-col rounded-lg border p-3 shadow-sm dark:bg-neutral-800/80', data.state === 'action-required' &&
|
|
80
|
-
'border-l-[3px] border-l-rose-400 dark:border-l-amber-500',
|
|
80
|
+
'border-l-[3px] border-l-rose-400 dark:border-l-amber-500', data.state === 'action-required' &&
|
|
81
|
+
selected &&
|
|
82
|
+
'border-t-rose-400 border-r-rose-400 border-b-rose-400 dark:border-t-amber-500 dark:border-r-amber-500 dark:border-b-amber-500', selected && data.state !== 'action-required' && 'ring-primary ring-1', data.state === 'deleting' && 'opacity-60', data.state === 'archived' && 'opacity-50'), children: [data.state !== 'creating' ? (_jsx("div", { className: "absolute top-3 right-4", children: _jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("span", { "data-testid": "feature-node-phase-badge", className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted-foreground text-[10px]", children: lifecyclePhaseBadge[data.lifecycle].tooltip }), _jsx("span", { className: cn('h-1.5 w-1.5 -translate-y-px rounded-full', lifecyclePhaseBadge[data.lifecycle].dot) })] }) }), _jsxs(TooltipContent, { side: "bottom", className: "max-w-56 bg-white text-neutral-900 shadow-lg dark:bg-neutral-100 dark:text-neutral-900 [&_svg]:!bg-white [&_svg]:!fill-white dark:[&_svg]:!bg-neutral-100 dark:[&_svg]:!fill-neutral-100", children: [_jsx("p", { className: "font-semibold", children: lifecyclePhaseBadge[data.lifecycle].tooltip }), _jsx("p", { className: "mt-1 text-xs leading-relaxed text-neutral-500", children: lifecyclePhaseBadge[data.lifecycle].description })] })] }) }) })) : null, _jsxs("div", { className: "flex items-center gap-1.5 pr-24", children: [data.agentType ? (_jsx(AgentIcon, { agentType: data.agentType, className: "h-4 w-4 shrink-0" })) : null, _jsx("h3", { className: "min-w-0 truncate text-sm font-bold", children: data.name })] }), data.description ? (_jsx("p", { "data-testid": "feature-node-description", className: "text-muted-foreground mt-1 line-clamp-2 text-xs", children: data.description })) : null, _jsxs("div", { className: "mt-auto pt-2", children: [config.showProgressBar ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-muted-foreground flex items-center justify-end text-[10px]", children: _jsxs("span", { children: [data.progress, "%"] }) }), _jsx("div", { "data-testid": "feature-node-progress-bar", className: "bg-muted mt-1.5 h-1 w-full overflow-hidden rounded-full", children: _jsx("div", { className: cn('h-full rounded-full transition-all', config.progressClass), style: { width: `${data.progress}%` } }) })] })) : null, !config.showProgressBar &&
|
|
81
83
|
![
|
|
82
84
|
'deleting',
|
|
83
85
|
'creating',
|
|
@@ -118,8 +120,8 @@ export function FeatureNode({ data, selected, }) {
|
|
|
118
120
|
})(), _jsx("span", { className: cn('text-[11px] font-medium', config.badgeClass), children: getBadgeText(data) })] })) : data.state === 'pending' && data.onStart ? (_jsxs(Button, { variant: "outline", size: "xs", "aria-label": "Start", "data-testid": "feature-node-start-button", onClick: (e) => {
|
|
119
121
|
e.stopPropagation();
|
|
120
122
|
data.onStart(data.featureId);
|
|
121
|
-
}, className: "nodrag cursor-pointer text-[11px] font-medium", children: [_jsx(Play, { className: "h-3 w-3" }), "Start"] })) : null] })] })] }), data.onAction && data.state !== 'deleting' ? (_jsx(Handle, { type: "source", position: Position.Right, className: "h-0! w-0! border-0! bg-transparent!", style: { top: 70 }, children: _jsx("button", { type: "button", "aria-label": "Add", "data-testid": "feature-node-action-button", onClick: (e) => {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
}, className: "nodrag cursor-pointer text-[11px] font-medium", children: [_jsx(Play, { className: "h-3 w-3" }), "Start"] })) : null] })] })] }), data.onAction && data.state !== 'deleting' ? (_jsx(Handle, { type: "source", position: Position.Right, className: "h-0! w-0! border-0! bg-transparent!", style: { top: 70 }, children: _jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": "Add feature", "data-testid": "feature-node-action-button", onClick: (e) => {
|
|
124
|
+
e.stopPropagation();
|
|
125
|
+
data.onAction?.();
|
|
126
|
+
}, className: "nodrag absolute top-1/2 left-1/2 flex h-6 w-6 -translate-x-1/2 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-blue-500 text-white opacity-0 shadow-md transition-opacity group-hover:opacity-100 hover:bg-blue-600", children: _jsx(Plus, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { side: "right", children: "Add feature" })] }) }) })) : data.showHandles ? (_jsx(Handle, { type: "source", position: Position.Right, isConnectable: false, className: "opacity-0!", style: { top: 70 } })) : null] }));
|
|
125
127
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if a target path is the same directory (or a worktree of) the
|
|
3
|
+
* currently running shep instance. Starting a dev server there would spawn
|
|
4
|
+
* another shep instance that conflicts with the shared ~/.shep/data DB.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isSameShepInstance(targetPath: string): boolean;
|
|
7
|
+
//# sourceMappingURL=is-same-shep-instance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-same-shep-instance.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/lib/is-same-shep-instance.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAU9D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { realpathSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* Check if a target path is the same directory (or a worktree of) the
|
|
5
|
+
* currently running shep instance. Starting a dev server there would spawn
|
|
6
|
+
* another shep instance that conflicts with the shared ~/.shep/data DB.
|
|
7
|
+
*/
|
|
8
|
+
export function isSameShepInstance(targetPath) {
|
|
9
|
+
const instancePath = process.env.NEXT_PUBLIC_SHEP_INSTANCE_PATH ?? process.cwd();
|
|
10
|
+
try {
|
|
11
|
+
const normalizedTarget = realpathSync(resolve(targetPath)).replace(/\\/g, '/');
|
|
12
|
+
const normalizedInstance = realpathSync(resolve(instancePath)).replace(/\\/g, '/');
|
|
13
|
+
return normalizedTarget === normalizedInstance;
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|