@shepai/cli 1.154.0-pr479.ab1d6e4 → 1.154.0-pr480.e648d12
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/agents/feature-agent/nodes/prompts/merge-prompts.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.js +4 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/pr-branding.d.ts +5 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/pr-branding.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/pr-branding.js +4 -0
- 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 +5 -6
- package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.d.ts +0 -2
- package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.js +3 -52
- package/dist/packages/core/src/infrastructure/services/git/git-fork.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/git-fork.service.js +3 -1
- 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 +2 -1
- package/dist/packages/core/src/infrastructure/services/git/pr-branding.d.ts +17 -0
- package/dist/packages/core/src/infrastructure/services/git/pr-branding.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/git/pr-branding.js +31 -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 +1 -1
- package/web/.next/required-server-files.json +1 -1
- 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/chat/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +29 -29
- 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.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.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/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)/chat/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +29 -29
- 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.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.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]/[tab]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/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 +5 -5
- 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/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 +10 -10
- 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 +10 -10
- 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 +5 -5
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__6565a045._.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/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17ed7ed1._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17ed7ed1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__28d0d265._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__42bf1807._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__42bf1807._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__88f7e8e6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__88f7e8e6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8b0aac03._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f80bfc75._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f80bfc75._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f8dd4422._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f8dd4422._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_3a0b989f._.js +2 -2
- package/web/.next/server/chunks/ssr/_3a0b989f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_5f69c13f._.js +1 -1
- package/web/.next/server/chunks/ssr/_5f69c13f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_7c5b97c6._.js +1 -1
- package/web/.next/server/chunks/ssr/_7c5b97c6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_82c57f10._.js +1 -1
- package/web/.next/server/chunks/ssr/_82c57f10._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_f9a4fecb._.js → _8401cafd._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_f9a4fecb._.js.map → _8401cafd._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_9495d50b._.js +1 -1
- package/web/.next/server/chunks/ssr/_9495d50b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_c402d513._.js → _9ae7a653._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_c402d513._.js.map → _9ae7a653._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_a0e3f7e4._.js +1 -1
- package/web/.next/server/chunks/ssr/_a0e3f7e4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_ac4a3873._.js +1 -1
- package/web/.next/server/chunks/ssr/{_cca387dc._.js → _b959e656._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_cca387dc._.js.map → _b959e656._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_ca0aa7f0._.js +1 -1
- package/web/.next/server/chunks/ssr/_ca0aa7f0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_cb5a021e._.js +1 -1
- package/web/.next/server/chunks/ssr/_cb5a021e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d86175ae._.js +1 -1
- package/web/.next/server/chunks/ssr/_d86175ae._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d8bedf13._.js +1 -1
- package/web/.next/server/chunks/ssr/_d8bedf13._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_fa7efce3._.js +2 -2
- package/web/.next/server/chunks/ssr/_fa7efce3._.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__next-internal_server_app_skills_page_actions_cdc632e3.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_cdc632e3.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.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_357e3eb0._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_357e3eb0._.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 +45 -45
- package/web/.next/static/chunks/{5137bba42f9f0471.js → 2201b69bab7f5c23.js} +1 -1
- package/web/.next/static/chunks/{8a0f87eae02050b5.js → 2491f2aaffeeef95.js} +2 -2
- package/web/.next/static/chunks/{f066634ebee801a2.js → 34331406b85a7f88.js} +1 -1
- package/web/.next/static/chunks/{0dc9ccd977e71ca5.js → 37bf276f01b6ed2f.js} +1 -1
- package/web/.next/static/chunks/{163a9b511f011413.js → 392e09fb07ed3645.js} +1 -1
- package/web/.next/static/chunks/{0c9699ac344d7fdc.js → 3e0f9071bbd21632.js} +1 -1
- package/web/.next/static/chunks/{3435db49fb1d9ca1.js → 3e7df10f4565829a.js} +3 -3
- package/web/.next/static/chunks/{295c8bae374d81d1.js → 3f1a01541ae3b89b.js} +1 -1
- package/web/.next/static/chunks/{474262e5d0623ad7.js → a94b6582730a0415.js} +1 -1
- package/web/.next/static/chunks/{bc9f980db72f59b7.js → d2c957a8a3ede6c9.js} +1 -1
- package/web/.next/static/chunks/{9d64ae99b767b638.js → e24859c0ac035932.js} +1 -1
- package/web/.next/static/chunks/{df326fea0c719d06.js → fdda1d8b67c4c0ee.js} +1 -1
- /package/web/.next/static/{jCFPs9oKV5JFhluhP5C1O → q5DI6MeYtBkAF8Og8Qst0}/_buildManifest.js +0 -0
- /package/web/.next/static/{jCFPs9oKV5JFhluhP5C1O → q5DI6MeYtBkAF8Og8Qst0}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{jCFPs9oKV5JFhluhP5C1O → q5DI6MeYtBkAF8Og8Qst0}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-prompts.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAE3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"merge-prompts.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAE3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAyCxD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAU9F;AAuCD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,QAAQ,EAAE,EACpB,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CAUR;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CA2ER;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,MAAM,CA0BR;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAqDzD"}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import yaml from 'js-yaml';
|
|
12
12
|
import { EvidenceType } from '../../../../../../domain/generated/output.js';
|
|
13
13
|
import { readSpecFile, buildResumeContext } from '../node-helpers.js';
|
|
14
|
+
import { PR_BRANDING } from './pr-branding.js';
|
|
14
15
|
/**
|
|
15
16
|
* Extract merge-phase rejection feedback from spec.yaml.
|
|
16
17
|
*/
|
|
@@ -152,7 +153,9 @@ export function buildCommitPushPrPrompt(state, branch, baseBranch, repoUrl) {
|
|
|
152
153
|
steps.push(`${shouldPush ? '6' : '4'}. Create a pull request:
|
|
153
154
|
- Run \`gh pr create --base ${baseBranch} --head ${branch} --title "<title>" --body "<body>"\`
|
|
154
155
|
- Write a descriptive PR title using conventional commit format
|
|
155
|
-
- Write a rich PR body that summarizes the changes using the spec context below
|
|
156
|
+
- Write a rich PR body that summarizes the changes using the spec context below
|
|
157
|
+
- The PR body MUST end with this exact branding line (on its own line): \`${PR_BRANDING}\`
|
|
158
|
+
- Do NOT include any other attribution footer (e.g. "Generated with Claude Code" or similar) — only the Shep branding line above`);
|
|
156
159
|
}
|
|
157
160
|
const resumeContext = buildResumeContext(state.resumeReason);
|
|
158
161
|
return `${resumeContext}You are performing git operations in a feature worktree.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-branding.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/pr-branding.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC"}
|
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;IAqFlB;;;OAGG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,SAAe,GAAG,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"}
|
|
@@ -188,15 +188,14 @@ export class DeploymentService {
|
|
|
188
188
|
throw new Error(detection.error);
|
|
189
189
|
}
|
|
190
190
|
// Build spawn args based on package manager
|
|
191
|
-
const { packageManager, scriptName, command, needsInstall
|
|
192
|
-
const spawnDir = resolvedDir;
|
|
191
|
+
const { packageManager, scriptName, command, needsInstall } = detection;
|
|
193
192
|
const args = packageManager === 'npm' ? ['run', scriptName] : [scriptName];
|
|
194
193
|
// Install dependencies if node_modules is missing (e.g. fresh worktree)
|
|
195
194
|
if (needsInstall) {
|
|
196
|
-
log.info(`node_modules missing in "${
|
|
195
|
+
log.info(`node_modules missing in "${targetPath}" — running ${packageManager} install`);
|
|
197
196
|
try {
|
|
198
197
|
execFileSync(packageManager, ['install'], {
|
|
199
|
-
cwd:
|
|
198
|
+
cwd: targetPath,
|
|
200
199
|
shell: true,
|
|
201
200
|
stdio: 'ignore',
|
|
202
201
|
...(IS_WINDOWS ? { windowsHide: true } : {}),
|
|
@@ -208,10 +207,10 @@ export class DeploymentService {
|
|
|
208
207
|
throw new Error(`Failed to install dependencies: ${err}`);
|
|
209
208
|
}
|
|
210
209
|
}
|
|
211
|
-
log.info(`Spawning dev server: command="${command}", packageManager="${packageManager}", scriptName="${scriptName}", cwd="${
|
|
210
|
+
log.info(`Spawning dev server: command="${command}", packageManager="${packageManager}", scriptName="${scriptName}", cwd="${targetPath}"`);
|
|
212
211
|
const child = this.deps.spawn(packageManager, args, {
|
|
213
212
|
shell: true,
|
|
214
|
-
cwd:
|
|
213
|
+
cwd: targetPath,
|
|
215
214
|
// On Unix, detached: true creates a process group via setsid() so we can
|
|
216
215
|
// kill the entire tree with process.kill(-pid). On Windows this flag causes
|
|
217
216
|
// CREATE_NEW_CONSOLE which opens a visible terminal window and disconnects
|
|
@@ -11,8 +11,6 @@ export interface DetectDevScriptSuccess {
|
|
|
11
11
|
scriptName: string;
|
|
12
12
|
command: string;
|
|
13
13
|
needsInstall: boolean;
|
|
14
|
-
/** The directory where package.json was found (may differ from input when scanning subdirs) */
|
|
15
|
-
resolvedDir: string;
|
|
16
14
|
}
|
|
17
15
|
export interface DetectDevScriptError {
|
|
18
16
|
success: false;
|
package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect-dev-script.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/deployment/detect-dev-script.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,IAAI,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"detect-dev-script.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/deployment/detect-dev-script.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,IAAI,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,GAAG,oBAAoB,CAAC;AAIlF;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,CAwCtE"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* scripts (dev, start, serve), and detects the package manager from lockfile
|
|
6
6
|
* presence. Returns the detected command or an error.
|
|
7
7
|
*/
|
|
8
|
-
import { readFileSync, existsSync
|
|
8
|
+
import { readFileSync, existsSync } from 'node:fs';
|
|
9
9
|
import { join } from 'node:path';
|
|
10
10
|
import { createDeploymentLogger } from './deployment-logger.js';
|
|
11
11
|
/** Script names to search for, in priority order */
|
|
@@ -25,23 +25,6 @@ const log = createDeploymentLogger('[detectDevScript]');
|
|
|
25
25
|
*/
|
|
26
26
|
export function detectDevScript(dirPath) {
|
|
27
27
|
log.info(`scanning dirPath="${dirPath}"`);
|
|
28
|
-
// Try the given directory first
|
|
29
|
-
const directResult = detectDevScriptInDir(dirPath);
|
|
30
|
-
if (directResult.success)
|
|
31
|
-
return directResult;
|
|
32
|
-
// Fallback: scan immediate subdirectories for a package.json with a dev script.
|
|
33
|
-
// This handles monorepos and projects where the app lives in a subdirectory
|
|
34
|
-
// (e.g., worktree root has no package.json but `site/` or `app/` does).
|
|
35
|
-
log.info(`no dev script at root, scanning subdirectories of "${dirPath}"`);
|
|
36
|
-
const subdirResult = scanSubdirectories(dirPath);
|
|
37
|
-
if (subdirResult)
|
|
38
|
-
return subdirResult;
|
|
39
|
-
return directResult;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Attempt detection in a single directory.
|
|
43
|
-
*/
|
|
44
|
-
function detectDevScriptInDir(dirPath) {
|
|
45
28
|
// Read and parse package.json
|
|
46
29
|
let packageJson;
|
|
47
30
|
try {
|
|
@@ -68,40 +51,8 @@ function detectDevScriptInDir(dirPath) {
|
|
|
68
51
|
// Build the command — pnpm/yarn use `<pm> <script>`, npm uses `npm run <script>`
|
|
69
52
|
const command = packageManager === 'npm' ? `npm run ${scriptName}` : `${packageManager} ${scriptName}`;
|
|
70
53
|
const needsInstall = !existsSync(join(dirPath, 'node_modules'));
|
|
71
|
-
log.info(`detected — packageManager="${packageManager}", scriptName="${scriptName}", command="${command}", needsInstall=${needsInstall}
|
|
72
|
-
return { success: true, packageManager, scriptName, command, needsInstall
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Scan immediate subdirectories for a package.json with a dev script.
|
|
76
|
-
* Skips hidden dirs, node_modules, and common non-project directories.
|
|
77
|
-
*/
|
|
78
|
-
function scanSubdirectories(dirPath) {
|
|
79
|
-
const SKIP_DIRS = new Set(['node_modules', '.git', '.next', 'dist', 'build', 'out', '.cache']);
|
|
80
|
-
let entries;
|
|
81
|
-
try {
|
|
82
|
-
entries = readdirSync(dirPath);
|
|
83
|
-
}
|
|
84
|
-
catch {
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
for (const entry of entries) {
|
|
88
|
-
if (entry.startsWith('.') || SKIP_DIRS.has(entry))
|
|
89
|
-
continue;
|
|
90
|
-
const subPath = join(dirPath, entry);
|
|
91
|
-
try {
|
|
92
|
-
if (!statSync(subPath).isDirectory())
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
|
-
catch {
|
|
96
|
-
continue;
|
|
97
|
-
}
|
|
98
|
-
const result = detectDevScriptInDir(subPath);
|
|
99
|
-
if (result.success) {
|
|
100
|
-
log.info(`found dev script in subdirectory "${entry}" — resolvedDir="${subPath}"`);
|
|
101
|
-
return result;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return null;
|
|
54
|
+
log.info(`detected — packageManager="${packageManager}", scriptName="${scriptName}", command="${command}", needsInstall=${needsInstall}`);
|
|
55
|
+
return { success: true, packageManager, scriptName, command, needsInstall };
|
|
105
56
|
}
|
|
106
57
|
/**
|
|
107
58
|
* Detect the package manager by checking for lockfile presence.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-fork.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/git-fork.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0EAA0E,CAAC;AAChH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0EAA0E,CAAC;AAKjH,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"git-fork.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/git-fork.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0EAA0E,CAAC;AAChH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0EAA0E,CAAC;AAKjH,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,qBACa,cAAe,YAAW,eAAe;IAChB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA0C1C,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAatD,gBAAgB,CACpB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,gBAAgB,CAAC;IAkDtB,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAsBpF;;;OAGG;IACH,OAAO,CAAC,kBAAkB;CAU3B"}
|
|
@@ -20,6 +20,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
20
20
|
import { injectable, inject } from 'tsyringe';
|
|
21
21
|
import { GitForkError, GitForkErrorCode, } from '../../../application/ports/output/services/git-fork-service.interface.js';
|
|
22
22
|
import { PrStatus } from '../../../domain/generated/output.js';
|
|
23
|
+
import { applyPrBranding } from './pr-branding.js';
|
|
23
24
|
let GitForkService = class GitForkService {
|
|
24
25
|
execFile;
|
|
25
26
|
constructor(execFile) {
|
|
@@ -80,6 +81,7 @@ let GitForkService = class GitForkService {
|
|
|
80
81
|
});
|
|
81
82
|
const forkRepo = this.extractRepoFromUrl(forkUrl.trim());
|
|
82
83
|
const forkOwner = forkRepo.split('/')[0];
|
|
84
|
+
const brandedBody = applyPrBranding(body);
|
|
83
85
|
const { stdout } = await this.execFile('gh', [
|
|
84
86
|
'pr',
|
|
85
87
|
'create',
|
|
@@ -88,7 +90,7 @@ let GitForkService = class GitForkService {
|
|
|
88
90
|
'--title',
|
|
89
91
|
title,
|
|
90
92
|
'--body',
|
|
91
|
-
|
|
93
|
+
brandedBody,
|
|
92
94
|
'--head',
|
|
93
95
|
`${forkOwner}:${head}`,
|
|
94
96
|
'--base',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-pr.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/git-pr.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wEAAwE,CAAC;AAC5G,OAAO,KAAK,EACV,cAAc,EAGd,WAAW,EACX,QAAQ,EACR,aAAa,EACb,cAAc,EACd,YAAY,EACb,MAAM,wEAAwE,CAAC;AAUhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"git-pr.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/git-pr.service.ts"],"names":[],"mappings":"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"}
|
|
@@ -22,6 +22,7 @@ import { readFileSync, writeFileSync, unlinkSync } from 'node:fs';
|
|
|
22
22
|
import { tmpdir } from 'node:os';
|
|
23
23
|
import { join } from 'node:path';
|
|
24
24
|
import yaml from 'js-yaml';
|
|
25
|
+
import { applyPrBranding } from './pr-branding.js';
|
|
25
26
|
let GitPrService = class GitPrService {
|
|
26
27
|
execFile;
|
|
27
28
|
constructor(execFile) {
|
|
@@ -161,7 +162,7 @@ let GitPrService = class GitPrService {
|
|
|
161
162
|
const prYamlContent = readFileSync(prYamlPath, 'utf-8');
|
|
162
163
|
const prData = yaml.load(prYamlContent);
|
|
163
164
|
const title = prData.title ?? 'Untitled PR';
|
|
164
|
-
const body = prData.body ?? '';
|
|
165
|
+
const body = applyPrBranding(prData.body ?? '');
|
|
165
166
|
const args = ['pr', 'create', '--title', title, '--body', body];
|
|
166
167
|
if (prData.baseBranch) {
|
|
167
168
|
args.push('--base', prData.baseBranch);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PR Branding
|
|
3
|
+
*
|
|
4
|
+
* Centralizes the branding footer used in pull request bodies
|
|
5
|
+
* created by Shep. Ensures consistent attribution across all
|
|
6
|
+
* PR creation paths (agent-driven, fork-and-PR, etc.).
|
|
7
|
+
*/
|
|
8
|
+
/** The branding line to append to PR bodies. */
|
|
9
|
+
export declare const PR_BRANDING = "Built with Shep \uD83D\uDC11 [Shep Bot](https://github.com/shep-ai/cli)";
|
|
10
|
+
/**
|
|
11
|
+
* Ensure a PR body carries the correct Shep branding.
|
|
12
|
+
*
|
|
13
|
+
* 1. Strips any unwanted AI-tool attribution footers
|
|
14
|
+
* 2. Appends the Shep branding line if not already present
|
|
15
|
+
*/
|
|
16
|
+
export declare function applyPrBranding(body: string): string;
|
|
17
|
+
//# sourceMappingURL=pr-branding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-branding.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/pr-branding.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,gDAAgD;AAChD,eAAO,MAAM,WAAW,4EACmD,CAAC;AAS5E;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAapD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PR Branding
|
|
3
|
+
*
|
|
4
|
+
* Centralizes the branding footer used in pull request bodies
|
|
5
|
+
* created by Shep. Ensures consistent attribution across all
|
|
6
|
+
* PR creation paths (agent-driven, fork-and-PR, etc.).
|
|
7
|
+
*/
|
|
8
|
+
/** The branding line to append to PR bodies. */
|
|
9
|
+
export const PR_BRANDING = 'Built with Shep \uD83D\uDC11 [Shep Bot](https://github.com/shep-ai/cli)';
|
|
10
|
+
/**
|
|
11
|
+
* Pattern matching common AI-tool attribution footers that should be
|
|
12
|
+
* replaced (e.g. "Generated with Claude Code", "Co-Authored-By: Claude").
|
|
13
|
+
*/
|
|
14
|
+
const UNWANTED_BRANDING_PATTERN = /\n*(?:🤖\s*)?Generated with \[Claude Code\]\(https:\/\/claude\.com\/claude-code\)\s*/gi;
|
|
15
|
+
/**
|
|
16
|
+
* Ensure a PR body carries the correct Shep branding.
|
|
17
|
+
*
|
|
18
|
+
* 1. Strips any unwanted AI-tool attribution footers
|
|
19
|
+
* 2. Appends the Shep branding line if not already present
|
|
20
|
+
*/
|
|
21
|
+
export function applyPrBranding(body) {
|
|
22
|
+
// Strip unwanted branding
|
|
23
|
+
let cleaned = body.replace(UNWANTED_BRANDING_PATTERN, '');
|
|
24
|
+
// Trim trailing whitespace/newlines before appending branding
|
|
25
|
+
cleaned = cleaned.trimEnd();
|
|
26
|
+
// Only append if not already present
|
|
27
|
+
if (!cleaned.includes(PR_BRANDING)) {
|
|
28
|
+
cleaned = `${cleaned}\n\n${PR_BRANDING}`;
|
|
29
|
+
}
|
|
30
|
+
return cleaned;
|
|
31
|
+
}
|