@shepai/cli 1.129.3-pr416.3b08f4d → 1.129.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts +1 -1
- package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.js +5 -21
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.js +4 -20
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/implement.node.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/implement.node.js +10 -71
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +1 -2
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.d.ts +0 -8
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.js +0 -16
- package/dist/src/presentation/web/app/actions/get-feature-phase-timings.d.ts +0 -1
- package/dist/src/presentation/web/app/actions/get-feature-phase-timings.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/get-feature-phase-timings.js +0 -1
- 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 +4 -20
- package/dist/src/presentation/web/components/common/control-center-drawer/use-artifact-fetch.d.ts +1 -2
- package/dist/src/presentation/web/components/common/control-center-drawer/use-artifact-fetch.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/use-artifact-fetch.js +2 -3
- 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 +4 -17
- 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/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 +24 -24
- 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 +24 -24
- 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 +30 -30
- 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 +30 -30
- 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 +22 -22
- 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 +24 -24
- 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 +30 -30
- 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 +30 -30
- 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 +22 -22
- 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 +22 -22
- 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/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_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_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__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4e741df2.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4e741df2.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/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_026fdffa.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_026fdffa.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_8b91e197.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_8b91e197.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0e842eba._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0e842eba._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.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]__60684242._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__62cdea24._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__755cfe02._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__755cfe02._.js.map +1 -1
- 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]__99ab2519._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a628fb91._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a628fb91._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__bfba58e6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__bfba58e6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c3ab8422._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c3ab8422._.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/{_b72321da._.js → _324f08fa._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_b72321da._.js.map → _324f08fa._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_6887cba3._.js +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/_8302fcae._.js +3 -0
- package/web/.next/server/chunks/ssr/{_138cefc6._.js.map → _8302fcae._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_a9f57758._.js +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/_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_b109a66e._.js → src_presentation_web_79c5e358._.js} +2 -2
- package/web/.next/server/chunks/ssr/{src_presentation_web_b109a66e._.js.map → src_presentation_web_79c5e358._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_8e7fe0d1._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_8e7fe0d1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_ca051134.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_ca051134.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_b9023017._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_b9023017._.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 +38 -38
- package/web/.next/static/chunks/{529a4217fdc4f6db.js → 140810c2538c85aa.js} +2 -2
- package/web/.next/static/chunks/{552c80e4962ca213.js → 21a98ed37526a704.js} +1 -1
- package/web/.next/static/chunks/4d40135dc75a7412.js +1 -0
- package/web/.next/static/chunks/{9e8854e65e5fe39a.js → 75424b9eb679261a.js} +1 -1
- package/web/.next/static/chunks/{5c14c9f104309656.js → 97778646dde1a546.js} +1 -1
- package/web/.next/static/chunks/{a6a49a58bd4317d6.js → a36ddda5a860c371.js} +1 -1
- package/web/.next/static/chunks/{ac8f02ca9b692aa4.js → a4d0f5c8adbd573e.js} +1 -1
- package/web/.next/static/chunks/{76a83694252b8403.js → d0fb8a76a89bd016.js} +1 -1
- package/web/.next/static/chunks/{d410fa1cf4157a31.js → d1238d67f4b7fa61.js} +1 -1
- package/web/.next/static/chunks/{dfc26eaf9b0d2564.js → d2b3baac392d5097.js} +1 -1
- package/web/.next/static/chunks/da484d44874006a2.css +1 -0
- package/web/.next/static/chunks/dc314fb7519088cf.js +2 -0
- package/web/.next/static/chunks/{9d7b5f0670ea71e5.js → ef48a6beeb40b304.js} +1 -1
- package/web/.next/server/chunks/ssr/_138cefc6._.js +0 -3
- package/web/.next/static/chunks/31ddce9ebee38ab1.css +0 -1
- package/web/.next/static/chunks/3399a16b625c6b89.js +0 -1
- package/web/.next/static/chunks/ae156736eeab5da0.js +0 -2
- /package/web/.next/static/{46MyrhV7kXNpH5sAQ_WFC → 8qbj3kELZ61JA30sTIVee}/_buildManifest.js +0 -0
- /package/web/.next/static/{46MyrhV7kXNpH5sAQ_WFC → 8qbj3kELZ61JA30sTIVee}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{46MyrhV7kXNpH5sAQ_WFC → 8qbj3kELZ61JA30sTIVee}/_ssgManifest.js +0 -0
|
@@ -25,7 +25,7 @@ export interface IPhaseTimingRepository {
|
|
|
25
25
|
* @param id - The phase timing ID
|
|
26
26
|
* @param updates - Fields to update (timing + optional token usage, exit code, error)
|
|
27
27
|
*/
|
|
28
|
-
update(id: string, updates: Partial<Pick<PhaseTiming, 'completedAt' | 'durationMs' | 'inputTokens' | 'outputTokens' | 'cacheCreationInputTokens' | 'cacheReadInputTokens' | 'costUsd' | 'numTurns' | 'durationApiMs' | 'exitCode' | 'errorMessage'
|
|
28
|
+
update(id: string, updates: Partial<Pick<PhaseTiming, 'completedAt' | 'durationMs' | 'inputTokens' | 'outputTokens' | 'cacheCreationInputTokens' | 'cacheReadInputTokens' | 'costUsd' | 'numTurns' | 'durationApiMs' | 'exitCode' | 'errorMessage'>>): Promise<void>;
|
|
29
29
|
/**
|
|
30
30
|
* Update approval wait timing fields on a phase timing record.
|
|
31
31
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phase-timing-repository.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/agents/phase-timing-repository.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9C;;;;;OAKG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CACd,IAAI,CACF,WAAW,EACT,aAAa,GACb,YAAY,GACZ,aAAa,GACb,cAAc,GACd,0BAA0B,GAC1B,sBAAsB,GACtB,SAAS,GACT,UAAU,GACV,eAAe,GACf,UAAU,GACV,cAAc,
|
|
1
|
+
{"version":3,"file":"phase-timing-repository.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/agents/phase-timing-repository.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9C;;;;;OAKG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CACd,IAAI,CACF,WAAW,EACT,aAAa,GACb,YAAY,GACZ,aAAa,GACb,cAAc,GACd,0BAA0B,GAC1B,sBAAsB,GACtB,SAAS,GACT,UAAU,GACV,eAAe,GACf,UAAU,GACV,cAAc,CACjB,CACF,GACA,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;OAKG;IACH,kBAAkB,CAChB,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,mBAAmB,GAAG,gBAAgB,CAAC,CAAC,GAC1E,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;OAKG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAExD;;;;;OAKG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;CAC5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAEpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAerD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,IAG3C,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"evidence.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAEpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAerD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,IAG3C,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAkF7E"}
|
package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.js
CHANGED
|
@@ -48,14 +48,10 @@ export function createEvidenceNode(executor) {
|
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
const startTime = Date.now();
|
|
51
|
-
const
|
|
52
|
-
const prompt = buildEvidencePrompt(state, { commitEvidence });
|
|
53
|
-
const timingId = await recordPhaseStart('evidence', {
|
|
54
|
-
prompt,
|
|
55
|
-
modelId: state.model,
|
|
56
|
-
agentType: executor.agentType,
|
|
57
|
-
});
|
|
51
|
+
const timingId = await recordPhaseStart('evidence');
|
|
58
52
|
try {
|
|
53
|
+
const commitEvidence = hasSettings() && getSettings().workflow.commitEvidence;
|
|
54
|
+
const prompt = buildEvidencePrompt(state, { commitEvidence });
|
|
59
55
|
const options = buildExecutorOptions(state);
|
|
60
56
|
log.info(`Executing agent at cwd=${options.cwd}`);
|
|
61
57
|
log.info(`Prompt length: ${prompt.length} chars`);
|
|
@@ -83,16 +79,7 @@ export function createEvidenceNode(executor) {
|
|
|
83
79
|
validationMessages.push(`[evidence] Warning: ${warning}`);
|
|
84
80
|
}
|
|
85
81
|
}
|
|
86
|
-
await recordPhaseEnd(timingId, durationMs
|
|
87
|
-
inputTokens: result.usage?.inputTokens,
|
|
88
|
-
outputTokens: result.usage?.outputTokens,
|
|
89
|
-
cacheCreationInputTokens: result.usage?.cacheCreationInputTokens,
|
|
90
|
-
cacheReadInputTokens: result.usage?.cacheReadInputTokens,
|
|
91
|
-
costUsd: result.usage?.costUsd,
|
|
92
|
-
numTurns: result.usage?.numTurns,
|
|
93
|
-
durationApiMs: result.usage?.durationApiMs,
|
|
94
|
-
exitCode: 'success',
|
|
95
|
-
});
|
|
82
|
+
await recordPhaseEnd(timingId, durationMs);
|
|
96
83
|
markPhaseComplete(state.specDir, 'evidence', log);
|
|
97
84
|
return {
|
|
98
85
|
currentNode: 'evidence',
|
|
@@ -115,10 +102,7 @@ export function createEvidenceNode(executor) {
|
|
|
115
102
|
const durationMs = Date.now() - startTime;
|
|
116
103
|
const elapsed = (durationMs / 1000).toFixed(1);
|
|
117
104
|
log.error(`Evidence collection failed: ${message} (${elapsed}s)`);
|
|
118
|
-
await recordPhaseEnd(timingId, durationMs
|
|
119
|
-
exitCode: 'error',
|
|
120
|
-
errorMessage: message.slice(0, 1000),
|
|
121
|
-
});
|
|
105
|
+
await recordPhaseEnd(timingId, durationMs);
|
|
122
106
|
throw new Error(`[evidence] ${message}`);
|
|
123
107
|
}
|
|
124
108
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fast-implement.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAEpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAgBrD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,IAGhD,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"fast-implement.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAEpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAgBrD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,IAGhD,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CA0E7E"}
|
|
@@ -45,13 +45,9 @@ export function createFastImplementNode(executor) {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
const startTime = Date.now();
|
|
48
|
-
const
|
|
49
|
-
const timingId = await recordPhaseStart('fast-implement', {
|
|
50
|
-
prompt,
|
|
51
|
-
modelId: state.model,
|
|
52
|
-
agentType: executor.agentType,
|
|
53
|
-
});
|
|
48
|
+
const timingId = await recordPhaseStart('fast-implement');
|
|
54
49
|
try {
|
|
50
|
+
const prompt = buildFastImplementPrompt(state);
|
|
55
51
|
const options = buildExecutorOptions(state);
|
|
56
52
|
log.info(`Executing agent at cwd=${options.cwd}`);
|
|
57
53
|
log.info(`Prompt length: ${prompt.length} chars`);
|
|
@@ -70,16 +66,7 @@ export function createFastImplementNode(executor) {
|
|
|
70
66
|
if (!evidenceEnabled) {
|
|
71
67
|
log.info('Evidence collection disabled via settings — skipping');
|
|
72
68
|
}
|
|
73
|
-
await recordPhaseEnd(timingId, durationMs
|
|
74
|
-
inputTokens: result.usage?.inputTokens,
|
|
75
|
-
outputTokens: result.usage?.outputTokens,
|
|
76
|
-
cacheCreationInputTokens: result.usage?.cacheCreationInputTokens,
|
|
77
|
-
cacheReadInputTokens: result.usage?.cacheReadInputTokens,
|
|
78
|
-
costUsd: result.usage?.costUsd,
|
|
79
|
-
numTurns: result.usage?.numTurns,
|
|
80
|
-
durationApiMs: result.usage?.durationApiMs,
|
|
81
|
-
exitCode: 'success',
|
|
82
|
-
});
|
|
69
|
+
await recordPhaseEnd(timingId, durationMs);
|
|
83
70
|
// Mark phase complete so resume from error skips re-execution
|
|
84
71
|
markPhaseComplete(state.specDir, 'fast-implement', log);
|
|
85
72
|
return {
|
|
@@ -99,10 +86,7 @@ export function createFastImplementNode(executor) {
|
|
|
99
86
|
const durationMs = Date.now() - startTime;
|
|
100
87
|
const elapsed = (durationMs / 1000).toFixed(1);
|
|
101
88
|
log.error(`${message} (after ${elapsed}s)`);
|
|
102
|
-
await recordPhaseEnd(timingId, durationMs
|
|
103
|
-
exitCode: 'error',
|
|
104
|
-
errorMessage: message.slice(0, 1000),
|
|
105
|
-
});
|
|
89
|
+
await recordPhaseEnd(timingId, durationMs);
|
|
106
90
|
// Throw so LangGraph does NOT checkpoint this node as "completed".
|
|
107
91
|
throw new Error(`[fast-implement] ${message}`);
|
|
108
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implement.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/implement.node.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAEpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"implement.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/implement.node.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAEpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAwErD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,cAAc,IAG5C,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAyL7E"}
|
package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/implement.node.js
CHANGED
|
@@ -12,7 +12,7 @@ import { join, dirname } from 'node:path';
|
|
|
12
12
|
import { interrupt, isGraphBubbleUp } from '@langchain/langgraph';
|
|
13
13
|
import { createNodeLogger, readSpecFile, buildExecutorOptions, shouldInterrupt, safeYamlLoad, retryExecute, getCompletedPhases, markPhaseComplete, } from './node-helpers.js';
|
|
14
14
|
import { reportNodeStart } from '../heartbeat.js';
|
|
15
|
-
import { recordPhaseStart, recordPhaseEnd, recordApprovalWaitStart,
|
|
15
|
+
import { recordPhaseStart, recordPhaseEnd, recordApprovalWaitStart, } from '../phase-timing-context.js';
|
|
16
16
|
import { updateNodeLifecycle } from '../lifecycle-context.js';
|
|
17
17
|
import { buildImplementPhasePrompt, } from './prompts/implement.prompt.js';
|
|
18
18
|
import { buildEvidencePrompt } from './prompts/evidence-prompts.js';
|
|
@@ -59,16 +59,7 @@ export function createImplementNode(executor) {
|
|
|
59
59
|
const startTime = Date.now();
|
|
60
60
|
const messages = [];
|
|
61
61
|
// Record top-level implement phase timing (sub-phases are recorded individually below)
|
|
62
|
-
const implementTimingId = await recordPhaseStart('implement'
|
|
63
|
-
modelId: state.model,
|
|
64
|
-
agentType: executor.agentType,
|
|
65
|
-
});
|
|
66
|
-
// Accumulate token usage across all sub-phases for the top-level timing
|
|
67
|
-
let totalInputTokens = 0;
|
|
68
|
-
let totalOutputTokens = 0;
|
|
69
|
-
let totalCostUsd = 0;
|
|
70
|
-
let totalNumTurns = 0;
|
|
71
|
-
let totalDurationApiMs = 0;
|
|
62
|
+
const implementTimingId = await recordPhaseStart('implement');
|
|
72
63
|
try {
|
|
73
64
|
// --- Parse plan & tasks ---
|
|
74
65
|
const planContent = readSpecFile(state.specDir, 'plan.yaml');
|
|
@@ -117,69 +108,32 @@ export function createImplementNode(executor) {
|
|
|
117
108
|
const options = buildExecutorOptions(state);
|
|
118
109
|
const promptContext = { isLastPhase, phaseIndex: i, totalPhases };
|
|
119
110
|
const phaseStartTime = Date.now();
|
|
120
|
-
const phaseTimingId = await recordPhaseStart(`implement:${phase.id}
|
|
121
|
-
modelId: state.model,
|
|
122
|
-
agentType: executor.agentType,
|
|
123
|
-
});
|
|
124
|
-
// Collect usage from all executor calls in this phase
|
|
125
|
-
let phaseInputTokens = 0;
|
|
126
|
-
let phaseOutputTokens = 0;
|
|
127
|
-
let phaseCostUsd = 0;
|
|
128
|
-
let phaseNumTurns = 0;
|
|
129
|
-
let phaseDurationApiMs = 0;
|
|
111
|
+
const phaseTimingId = await recordPhaseStart(`implement:${phase.id}`);
|
|
130
112
|
if (phase.parallel && phaseTasks.length > 1) {
|
|
131
113
|
// Parallel: one executor call per task
|
|
132
114
|
log.info(`Spawning ${phaseTasks.length} parallel executor calls`);
|
|
133
|
-
|
|
134
|
-
const taskPrompts = phaseTasks.map((task) => {
|
|
115
|
+
const results = await Promise.all(phaseTasks.map((task) => {
|
|
135
116
|
const singleTaskPhase = {
|
|
136
117
|
...phase,
|
|
137
118
|
taskIds: [task.id],
|
|
138
119
|
};
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const results = await Promise.all(phaseTasks.map((task, idx) => {
|
|
143
|
-
log.info(` [parallel] Task ${task.id}: "${task.title}" — ${taskPrompts[idx].length} chars`);
|
|
144
|
-
return retryExecute(executor, taskPrompts[idx], options, retryOpts);
|
|
120
|
+
const prompt = buildImplementPhasePrompt(state, singleTaskPhase, [task], promptContext);
|
|
121
|
+
log.info(` [parallel] Task ${task.id}: "${task.title}" — ${prompt.length} chars`);
|
|
122
|
+
return retryExecute(executor, prompt, options, retryOpts);
|
|
145
123
|
}));
|
|
146
124
|
for (let j = 0; j < results.length; j++) {
|
|
147
125
|
log.info(` [parallel] Task ${phaseTasks[j].id} complete (${results[j].result.length} chars)`);
|
|
148
|
-
phaseInputTokens += results[j].usage?.inputTokens ?? 0;
|
|
149
|
-
phaseOutputTokens += results[j].usage?.outputTokens ?? 0;
|
|
150
|
-
phaseCostUsd += results[j].usage?.costUsd ?? 0;
|
|
151
|
-
phaseNumTurns += results[j].usage?.numTurns ?? 0;
|
|
152
|
-
phaseDurationApiMs += results[j].usage?.durationApiMs ?? 0;
|
|
153
126
|
}
|
|
154
127
|
}
|
|
155
128
|
else {
|
|
156
129
|
// Sequential: single executor call with all phase tasks
|
|
157
130
|
const prompt = buildImplementPhasePrompt(state, phase, phaseTasks, promptContext);
|
|
158
|
-
await updatePhasePrompt(phaseTimingId, prompt);
|
|
159
131
|
log.info(`Executing phase prompt — ${prompt.length} chars`);
|
|
160
132
|
const result = await retryExecute(executor, prompt, options, retryOpts);
|
|
161
133
|
log.info(`Phase complete (${result.result.length} chars)`);
|
|
162
|
-
phaseInputTokens = result.usage?.inputTokens ?? 0;
|
|
163
|
-
phaseOutputTokens = result.usage?.outputTokens ?? 0;
|
|
164
|
-
phaseCostUsd = result.usage?.costUsd ?? 0;
|
|
165
|
-
phaseNumTurns = result.usage?.numTurns ?? 0;
|
|
166
|
-
phaseDurationApiMs = result.usage?.durationApiMs ?? 0;
|
|
167
134
|
}
|
|
168
|
-
// Accumulate into top-level totals
|
|
169
|
-
totalInputTokens += phaseInputTokens;
|
|
170
|
-
totalOutputTokens += phaseOutputTokens;
|
|
171
|
-
totalCostUsd += phaseCostUsd;
|
|
172
|
-
totalNumTurns += phaseNumTurns;
|
|
173
|
-
totalDurationApiMs += phaseDurationApiMs;
|
|
174
135
|
const phaseDurationMs = Date.now() - phaseStartTime;
|
|
175
|
-
await recordPhaseEnd(phaseTimingId, phaseDurationMs
|
|
176
|
-
inputTokens: phaseInputTokens || undefined,
|
|
177
|
-
outputTokens: phaseOutputTokens || undefined,
|
|
178
|
-
costUsd: phaseCostUsd || undefined,
|
|
179
|
-
numTurns: phaseNumTurns || undefined,
|
|
180
|
-
durationApiMs: phaseDurationApiMs || undefined,
|
|
181
|
-
exitCode: 'success',
|
|
182
|
-
});
|
|
136
|
+
await recordPhaseEnd(phaseTimingId, phaseDurationMs);
|
|
183
137
|
completedTasks += phaseTasks.length;
|
|
184
138
|
markPhaseComplete(state.specDir, phase.id, log);
|
|
185
139
|
const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
|
|
@@ -199,14 +153,7 @@ export function createImplementNode(executor) {
|
|
|
199
153
|
}
|
|
200
154
|
messages.push(`[implement] Evidence: ${evidence.length} record(s) captured`);
|
|
201
155
|
// Record top-level implement phase completion
|
|
202
|
-
await recordPhaseEnd(implementTimingId, Date.now() - startTime
|
|
203
|
-
inputTokens: totalInputTokens || undefined,
|
|
204
|
-
outputTokens: totalOutputTokens || undefined,
|
|
205
|
-
costUsd: totalCostUsd || undefined,
|
|
206
|
-
numTurns: totalNumTurns || undefined,
|
|
207
|
-
durationApiMs: totalDurationApiMs || undefined,
|
|
208
|
-
exitCode: 'success',
|
|
209
|
-
});
|
|
156
|
+
await recordPhaseEnd(implementTimingId, Date.now() - startTime);
|
|
210
157
|
if (shouldInterrupt('implement', state.approvalGates)) {
|
|
211
158
|
log.info('Interrupting for human approval');
|
|
212
159
|
await recordApprovalWaitStart(implementTimingId);
|
|
@@ -224,15 +171,7 @@ export function createImplementNode(executor) {
|
|
|
224
171
|
const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
|
|
225
172
|
log.error(`${message} (after ${elapsed}s)`);
|
|
226
173
|
// Record phase end even on failure so timing shows duration, not "running"
|
|
227
|
-
await recordPhaseEnd(implementTimingId, Date.now() - startTime
|
|
228
|
-
inputTokens: totalInputTokens || undefined,
|
|
229
|
-
outputTokens: totalOutputTokens || undefined,
|
|
230
|
-
costUsd: totalCostUsd || undefined,
|
|
231
|
-
numTurns: totalNumTurns || undefined,
|
|
232
|
-
durationApiMs: totalDurationApiMs || undefined,
|
|
233
|
-
exitCode: 'error',
|
|
234
|
-
errorMessage: message.slice(0, 1000),
|
|
235
|
-
});
|
|
174
|
+
await recordPhaseEnd(implementTimingId, Date.now() - startTime);
|
|
236
175
|
// Throw so LangGraph does NOT checkpoint this node as "completed".
|
|
237
176
|
// The worker catch block marks the run as failed, and on resume
|
|
238
177
|
// LangGraph re-executes from the last successfully checkpointed node.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACd,MAAM,iEAAiE,CAAC;
|
|
1
|
+
{"version":3,"file":"merge.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACd,MAAM,iEAAiE,CAAC;AAmBzE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uEAAuE,CAAC;AAE3H,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,CAAC;IACzB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1E,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;IACnE;;OAEG;IACH,gBAAgB,EAAE,CAChB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,OAAO,KAChB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB;;;OAGG;IACH,WAAW,EAAE,CACX,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,KACrB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxD,YAAY,EAAE,aAAa,CAAC;IAC5B,6BAA6B,EAAE,IAAI,CAAC,6BAA6B,EAAE,SAAS,CAAC,CAAC;CAC/E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,IAGnC,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAgU7E"}
|
|
@@ -16,7 +16,7 @@ import { interrupt, isGraphBubbleUp } from '@langchain/langgraph';
|
|
|
16
16
|
import { SdlcLifecycle, PrStatus } from '../../../../../../domain/generated/output.js';
|
|
17
17
|
import { createNodeLogger, shouldInterrupt, retryExecute, buildExecutorOptions, } from '../node-helpers.js';
|
|
18
18
|
import { reportNodeStart } from '../../heartbeat.js';
|
|
19
|
-
import { recordPhaseStart, recordPhaseEnd, recordApprovalWaitStart,
|
|
19
|
+
import { recordPhaseStart, recordPhaseEnd, recordApprovalWaitStart, } from '../../phase-timing-context.js';
|
|
20
20
|
import { updateNodeLifecycle } from '../../lifecycle-context.js';
|
|
21
21
|
import { buildCommitPushPrPrompt } from '../prompts/merge-prompts.js';
|
|
22
22
|
import { parseCommitHash, parsePrUrl } from './merge-output-parser.js';
|
|
@@ -104,7 +104,6 @@ export function createMergeNode(deps) {
|
|
|
104
104
|
const effectiveState = remoteAvailable ? state : { ...state, push: false, openPr: false };
|
|
105
105
|
log.info('Agent call 1: commit + push + PR');
|
|
106
106
|
const commitPushPrPrompt = buildCommitPushPrPrompt(effectiveState, branch, baseBranch, repoUrl);
|
|
107
|
-
await updatePhasePrompt(mergeTimingId, commitPushPrPrompt);
|
|
108
107
|
const commitResult = await retryExecute(executor, commitPushPrPrompt, options, {
|
|
109
108
|
logger: log,
|
|
110
109
|
});
|
|
@@ -46,8 +46,6 @@ export interface PhaseEndMetadata {
|
|
|
46
46
|
durationApiMs?: number;
|
|
47
47
|
exitCode?: string;
|
|
48
48
|
errorMessage?: string;
|
|
49
|
-
/** Prompt can be recorded at end time when it's built after recordPhaseStart */
|
|
50
|
-
prompt?: string;
|
|
51
49
|
}
|
|
52
50
|
/**
|
|
53
51
|
* Record the end of a phase. Updates the timing record with completedAt, durationMs,
|
|
@@ -63,12 +61,6 @@ export declare function recordPhaseEnd(timingId: string | null, durationMs: numb
|
|
|
63
61
|
* e.g., from use cases like StopAgentRunUseCase or ResumeFeatureUseCase).
|
|
64
62
|
*/
|
|
65
63
|
export declare function recordLifecycleEvent(phase: string, explicitRunId?: string, explicitRepo?: IPhaseTimingRepository): Promise<void>;
|
|
66
|
-
/**
|
|
67
|
-
* Update a phase timing record with the prompt text.
|
|
68
|
-
* Useful when the prompt is built after recordPhaseStart (e.g. merge node).
|
|
69
|
-
* No-op if timingId is null or context is not set.
|
|
70
|
-
*/
|
|
71
|
-
export declare function updatePhasePrompt(timingId: string | null, prompt: string): Promise<void>;
|
|
72
64
|
/**
|
|
73
65
|
* Record the start of an approval wait. Sets waitingApprovalAt on the timing record.
|
|
74
66
|
* No-op if timingId is null or context is not set.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phase-timing-context.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wEAAwE,CAAC;AAMrH;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,sBAAsB,GAAG,IAAI,CAG7F;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAI9C;AA+BD,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,kBAAkB,GAC5B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyBxB;AAED,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"phase-timing-context.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wEAAwE,CAAC;AAMrH;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,sBAAsB,GAAG,IAAI,CAG7F;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAI9C;AA+BD,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,kBAAkB,GAC5B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyBxB;AAED,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAwBf;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,MAAM,EACtB,YAAY,CAAC,EAAE,sBAAsB,GACpC,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAUpF"}
|
package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.js
CHANGED
|
@@ -114,7 +114,6 @@ export async function recordPhaseEnd(timingId, durationMs, metadata) {
|
|
|
114
114
|
...(metadata?.durationApiMs != null && { durationApiMs: BigInt(metadata.durationApiMs) }),
|
|
115
115
|
...(metadata?.exitCode != null && { exitCode: metadata.exitCode }),
|
|
116
116
|
...(metadata?.errorMessage != null && { errorMessage: metadata.errorMessage }),
|
|
117
|
-
...(metadata?.prompt != null && { prompt: metadata.prompt }),
|
|
118
117
|
});
|
|
119
118
|
}
|
|
120
119
|
catch {
|
|
@@ -150,21 +149,6 @@ export async function recordLifecycleEvent(phase, explicitRunId, explicitRepo) {
|
|
|
150
149
|
// Swallow — lifecycle event recording is non-fatal
|
|
151
150
|
}
|
|
152
151
|
}
|
|
153
|
-
/**
|
|
154
|
-
* Update a phase timing record with the prompt text.
|
|
155
|
-
* Useful when the prompt is built after recordPhaseStart (e.g. merge node).
|
|
156
|
-
* No-op if timingId is null or context is not set.
|
|
157
|
-
*/
|
|
158
|
-
export async function updatePhasePrompt(timingId, prompt) {
|
|
159
|
-
if (!timingId || !contextRepository)
|
|
160
|
-
return;
|
|
161
|
-
try {
|
|
162
|
-
await contextRepository.update(timingId, { prompt });
|
|
163
|
-
}
|
|
164
|
-
catch {
|
|
165
|
-
// Swallow — prompt update failure is non-fatal
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
152
|
/**
|
|
169
153
|
* Record the start of an approval wait. Sets waitingApprovalAt on the timing record.
|
|
170
154
|
* No-op if timingId is null or context is not set.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-feature-phase-timings.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-feature-phase-timings.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"get-feature-phase-timings.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-feature-phase-timings.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,KAAK,qBAAqB,GACtB;IAAE,OAAO,EAAE,eAAe,EAAE,CAAC;IAAC,iBAAiB,EAAE,qBAAqB,EAAE,CAAA;CAAE,GAC1E;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtB,wBAAsB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAsC9F"}
|
|
@@ -24,7 +24,6 @@ export async function getFeaturePhaseTimings(featureId) {
|
|
|
24
24
|
durationApiMs: t.durationApiMs != null ? Number(t.durationApiMs) : undefined,
|
|
25
25
|
exitCode: t.exitCode ?? undefined,
|
|
26
26
|
errorMessage: t.errorMessage ?? undefined,
|
|
27
|
-
prompt: t.prompt ?? undefined,
|
|
28
27
|
}));
|
|
29
28
|
// Read rejection feedback from spec.yaml
|
|
30
29
|
const rejectionFeedback = await readRejectionFeedback(featureId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-drawer-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/feature-drawer-client.tsx"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI/D,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,CAAC;IACjB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"feature-drawer-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/feature-drawer-client.tsx"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI/D,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,CAAC;IACjB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,wBAAwB,2CAskB1F"}
|
package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js
CHANGED
|
@@ -113,22 +113,6 @@ export function FeatureDrawerClient({ view: initialView, urlTab }) {
|
|
|
113
113
|
useEffect(() => {
|
|
114
114
|
setChatInput('');
|
|
115
115
|
}, [initialTab]);
|
|
116
|
-
// ── Artifact refresh key ─────────────────────────────────────────────
|
|
117
|
-
// Increments whenever state or lifecycle changes (via SSE or background sync),
|
|
118
|
-
// forcing useArtifactFetch to re-fetch even when the featureId stays the same.
|
|
119
|
-
// This fixes race conditions where the first fetch fires too early (e.g. merge
|
|
120
|
-
// data requested before the PR is created) and subsequent state updates don't
|
|
121
|
-
// trigger a re-fetch because the featureId dep hasn't changed.
|
|
122
|
-
const artifactRefreshKeyRef = useRef(0);
|
|
123
|
-
const prevStateRef = useRef(featureNode?.state);
|
|
124
|
-
const prevLifecycleRef = useRef(featureNode?.lifecycle);
|
|
125
|
-
if (featureNode?.state !== prevStateRef.current ||
|
|
126
|
-
featureNode?.lifecycle !== prevLifecycleRef.current) {
|
|
127
|
-
prevStateRef.current = featureNode?.state;
|
|
128
|
-
prevLifecycleRef.current = featureNode?.lifecycle;
|
|
129
|
-
artifactRefreshKeyRef.current += 1;
|
|
130
|
-
}
|
|
131
|
-
const artifactRefreshKey = artifactRefreshKeyRef.current;
|
|
132
116
|
// ── Data fetching ─────────────────────────────────────────────────────
|
|
133
117
|
const prdFeatureId = featureNode?.lifecycle === 'requirements' && featureNode?.state === 'action-required'
|
|
134
118
|
? featureNode.featureId
|
|
@@ -153,7 +137,7 @@ export function FeatureDrawerClient({ view: initialView, urlTab }) {
|
|
|
153
137
|
setPrdSelections({});
|
|
154
138
|
setPrdDefaultSelections({});
|
|
155
139
|
setPrdData(null);
|
|
156
|
-
}, 'Failed to load questionnaire'
|
|
140
|
+
}, 'Failed to load questionnaire');
|
|
157
141
|
const techFeatureId = featureNode?.lifecycle === 'implementation' && featureNode?.state === 'action-required'
|
|
158
142
|
? featureNode.featureId
|
|
159
143
|
: null;
|
|
@@ -164,11 +148,11 @@ export function FeatureDrawerClient({ view: initialView, urlTab }) {
|
|
|
164
148
|
}
|
|
165
149
|
if (result.techDecisions)
|
|
166
150
|
setTechData(result.techDecisions);
|
|
167
|
-
}, () => setTechData(null), 'Failed to load tech decisions'
|
|
151
|
+
}, () => setTechData(null), 'Failed to load tech decisions');
|
|
168
152
|
const isLoadingTechProduct = useArtifactFetch(techFeatureId, getFeatureArtifact, (result) => {
|
|
169
153
|
if (result.productDecisions)
|
|
170
154
|
setTechProductData(result.productDecisions);
|
|
171
|
-
}, () => setTechProductData(undefined)
|
|
155
|
+
}, () => setTechProductData(undefined));
|
|
172
156
|
const mergeFeatureId = featureNode?.lifecycle === 'review' &&
|
|
173
157
|
(featureNode?.state === 'action-required' || featureNode?.state === 'error')
|
|
174
158
|
? featureNode.featureId
|
|
@@ -179,7 +163,7 @@ export function FeatureDrawerClient({ view: initialView, urlTab }) {
|
|
|
179
163
|
return;
|
|
180
164
|
}
|
|
181
165
|
setMergeData(result);
|
|
182
|
-
}, () => setMergeData(null), 'Failed to load merge review data'
|
|
166
|
+
}, () => setMergeData(null), 'Failed to load merge review data');
|
|
183
167
|
// ── Close guard ──────────────────────────────────────────────────────
|
|
184
168
|
const isChatDirty = chatInput.trim().length > 0;
|
|
185
169
|
const isPrdDirty = featureNode?.lifecycle === 'requirements' &&
|
package/dist/src/presentation/web/components/common/control-center-drawer/use-artifact-fetch.d.ts
CHANGED
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
* @param onSuccess - Called with the fetch result when successful and not cancelled.
|
|
8
8
|
* @param onReset - Called immediately when featureId changes (before fetching).
|
|
9
9
|
* @param errorMessage - Optional toast message shown on fetch failure.
|
|
10
|
-
* @param refreshKey - Optional key that forces a re-fetch when it changes (even if featureId is the same).
|
|
11
10
|
* @returns Whether the fetch is currently in progress.
|
|
12
11
|
*/
|
|
13
|
-
export declare function useArtifactFetch<TResult>(featureId: string | null, fetcher: (id: string) => Promise<TResult>, onSuccess: (result: TResult) => void, onReset: () => void, errorMessage?: string
|
|
12
|
+
export declare function useArtifactFetch<TResult>(featureId: string | null, fetcher: (id: string) => Promise<TResult>, onSuccess: (result: TResult) => void, onReset: () => void, errorMessage?: string): boolean;
|
|
14
13
|
//# sourceMappingURL=use-artifact-fetch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-artifact-fetch.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/use-artifact-fetch.ts"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"use-artifact-fetch.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/use-artifact-fetch.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EACtC,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,EACzC,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,EACpC,OAAO,EAAE,MAAM,IAAI,EACnB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAiCT"}
|
package/dist/src/presentation/web/components/common/control-center-drawer/use-artifact-fetch.js
CHANGED
|
@@ -10,10 +10,9 @@ import { toast } from 'sonner';
|
|
|
10
10
|
* @param onSuccess - Called with the fetch result when successful and not cancelled.
|
|
11
11
|
* @param onReset - Called immediately when featureId changes (before fetching).
|
|
12
12
|
* @param errorMessage - Optional toast message shown on fetch failure.
|
|
13
|
-
* @param refreshKey - Optional key that forces a re-fetch when it changes (even if featureId is the same).
|
|
14
13
|
* @returns Whether the fetch is currently in progress.
|
|
15
14
|
*/
|
|
16
|
-
export function useArtifactFetch(featureId, fetcher, onSuccess, onReset, errorMessage
|
|
15
|
+
export function useArtifactFetch(featureId, fetcher, onSuccess, onReset, errorMessage) {
|
|
17
16
|
const [isLoading, setIsLoading] = useState(false);
|
|
18
17
|
// Use refs to avoid stale callbacks in the effect without triggering re-runs.
|
|
19
18
|
const onSuccessRef = useRef(onSuccess);
|
|
@@ -42,6 +41,6 @@ export function useArtifactFetch(featureId, fetcher, onSuccess, onReset, errorMe
|
|
|
42
41
|
return () => {
|
|
43
42
|
cancelled = true;
|
|
44
43
|
};
|
|
45
|
-
}, [featureId, fetcher, errorMessage
|
|
44
|
+
}, [featureId, fetcher, errorMessage]);
|
|
46
45
|
return isLoading;
|
|
47
46
|
}
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/activity-tab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"activity-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/activity-tab.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;AAmEjD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAC7C;AAmED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8DAA8D;IAC9D,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,eAAe,EAAE,EAC1B,QAAQ,CAAC,EAAE,qBAAqB,EAAE,GACjC,iBAAiB,EAAE,CAgErB;AA6BD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,gBAAgB,2CAqE3F"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState, useEffect, useRef
|
|
4
|
-
import { Loader2, AlertCircle, Clock, Zap, DollarSign, Play, RotateCcw, CheckCircle2, XCircle, Square, Ban, MessageSquare, Timer, ArrowDownToLine, ArrowUpFromLine,
|
|
3
|
+
import { useState, useEffect, useRef } from 'react';
|
|
4
|
+
import { Loader2, AlertCircle, Clock, Zap, DollarSign, Play, RotateCcw, CheckCircle2, XCircle, Square, Ban, MessageSquare, Timer, ArrowDownToLine, ArrowUpFromLine, } from 'lucide-react';
|
|
5
5
|
import { InlineAttachments } from '../../common/inline-attachments/index.js';
|
|
6
6
|
import { formatDuration } from '../../../lib/format-duration.js';
|
|
7
7
|
/**
|
|
@@ -72,10 +72,6 @@ const NODE_TO_PHASE = {
|
|
|
72
72
|
research: 'Researching',
|
|
73
73
|
plan: 'Planning',
|
|
74
74
|
implement: 'Implementing',
|
|
75
|
-
'fast-implement': 'Fast Implement',
|
|
76
|
-
evidence: 'Evidence',
|
|
77
|
-
validate: 'Validating',
|
|
78
|
-
repair: 'Repairing',
|
|
79
75
|
merge: 'Merging',
|
|
80
76
|
};
|
|
81
77
|
const LIFECYCLE_EVENTS = {
|
|
@@ -309,20 +305,11 @@ function NodeTimingRow({ timing, maxDurationMs, now, }) {
|
|
|
309
305
|
const totalTokens = timing.inputTokens != null || timing.outputTokens != null
|
|
310
306
|
? (timing.inputTokens ?? 0) + (timing.outputTokens ?? 0)
|
|
311
307
|
: null;
|
|
312
|
-
|
|
313
|
-
const handleCopyPrompt = useCallback(() => {
|
|
314
|
-
if (!timing.prompt)
|
|
315
|
-
return;
|
|
316
|
-
navigator.clipboard.writeText(timing.prompt).then(() => {
|
|
317
|
-
setCopied(true);
|
|
318
|
-
setTimeout(() => setCopied(false), 1500);
|
|
319
|
-
});
|
|
320
|
-
}, [timing.prompt]);
|
|
321
|
-
return (_jsxs("div", { className: `group/phase relative flex flex-col gap-0.5 px-3 py-1.5 ${isSubPhase ? 'ml-4' : ''}`, children: [_jsxs("div", { "data-testid": `timing-bar-${timing.phase}`, className: "flex items-center gap-2", children: [_jsx("div", { className: "relative z-10 flex h-5 w-5 shrink-0 items-center justify-center", children: _jsx("div", { className: `rounded-full ${isRunning ? 'h-3 w-3 animate-pulse' : 'h-2.5 w-2.5'} ${isRunning
|
|
308
|
+
return (_jsxs("div", { className: `relative flex flex-col gap-0.5 px-3 py-1.5 ${isSubPhase ? 'ml-4' : ''}`, children: [_jsxs("div", { "data-testid": `timing-bar-${timing.phase}`, className: "flex items-center gap-2", children: [_jsx("div", { className: "relative z-10 flex h-5 w-5 shrink-0 items-center justify-center", children: _jsx("div", { className: `rounded-full ${isRunning ? 'h-3 w-3 animate-pulse' : 'h-2.5 w-2.5'} ${isRunning
|
|
322
309
|
? 'bg-blue-500'
|
|
323
310
|
: timing.completedAt
|
|
324
311
|
? 'bg-emerald-500'
|
|
325
|
-
: 'bg-muted-foreground/30'}` }) }), _jsx("span", { className: `w-28 shrink-0 truncate text-sm font-medium ${isSubPhase ? 'text-muted-foreground' : 'text-foreground/80'}`, children: label }),
|
|
312
|
+
: 'bg-muted-foreground/30'}` }) }), _jsx("span", { className: `w-28 shrink-0 truncate text-sm font-medium ${isSubPhase ? 'text-muted-foreground' : 'text-foreground/80'}`, children: label }), _jsx("div", { className: `bg-muted relative min-w-0 flex-1 overflow-hidden rounded-full ${isSubPhase ? 'h-1.5' : 'h-2'}`, children: isRunning ? (_jsx("div", { className: "absolute inset-0 rounded-full bg-blue-500/30", style: {
|
|
326
313
|
backgroundImage: 'linear-gradient(90deg, transparent 0%, rgb(59 130 246) 50%, transparent 100%)',
|
|
327
314
|
backgroundSize: '200% 100%',
|
|
328
315
|
animation: 'shimmer 1.5s ease-in-out infinite',
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-drawer-tabs.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAS9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAMxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAQ9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAC;AAkD3F,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,eAAe,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,gFAAgF;IAChF,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,mFAAmF;IACnF,SAAS,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAGzC,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;IAGvB,QAAQ,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC3E,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,WAAW,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAGjD,SAAS,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC5E,cAAc,CAAC,EAAE,OAAO,CAAC;IAGzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAwBD,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,SAAS,EACT,UAAU,EACV,MAAM,EACN,OAAO,EACP,aAAa,EACb,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,aAAa,EACb,WAAW,EACX,SAAS,EACT,cAAc,EACd,aAAa,EACb,cAAc,EACd,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,SAAS,GACV,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"feature-drawer-tabs.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAS9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAMxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAQ9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAC;AAkD3F,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,eAAe,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,gFAAgF;IAChF,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,mFAAmF;IACnF,SAAS,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAGzC,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;IAGvB,QAAQ,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC3E,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,WAAW,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAGjD,SAAS,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC5E,cAAc,CAAC,EAAE,OAAO,CAAC;IAGzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAwBD,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,SAAS,EACT,UAAU,EACV,MAAM,EACN,OAAO,EACP,aAAa,EACb,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,aAAa,EACb,WAAW,EACX,SAAS,EACT,cAAc,EACd,aAAa,EACb,cAAc,EACd,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,SAAS,GACV,EAAE,sBAAsB,2CA8UxB"}
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useEffect, useCallback, useRef, useMemo } from 'react';
|
|
4
4
|
import { usePathname } from 'next/navigation';
|
|
5
|
-
import { Loader2
|
|
5
|
+
import { Loader2 } from 'lucide-react';
|
|
6
6
|
import { Tabs, TabsList, TabsTrigger, TabsContent } from '../../ui/tabs.js';
|
|
7
7
|
import { getFeaturePhaseTimings } from '../../../app/actions/get-feature-phase-timings.js';
|
|
8
8
|
import { getFeaturePlan } from '../../../app/actions/get-feature-plan.js';
|
|
@@ -244,7 +244,7 @@ export function FeatureDrawerTabs({ featureNode, featureId, initialTab, urlTab,
|
|
|
244
244
|
fetchTab(tab);
|
|
245
245
|
}
|
|
246
246
|
}, [fetchTab]);
|
|
247
|
-
return (_jsx("div", { className: "flex min-h-0 flex-1 flex-col", children: _jsxs(Tabs, { value: activeTab, onValueChange: handleTabChange, className: "flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "shrink-0 overflow-x-auto px-4 pt-4", children: _jsx(TabsList, { className: "flex w-full", children: visibleTabDefs.map((tab) => (_jsx(TabsTrigger, { value: tab.key, className: "flex-1", children: tab.label }, tab.key))) }) }), _jsx(TabsContent, { value: "overview", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(OverviewTab, { data: featureNode }) }), _jsx(TabsContent, { value: "activity", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(ActivityTab, { timings: tabs.activity.data?.timings ?? null, loading: tabs.activity.loading, error: tabs.activity.error, rejectionFeedback: tabs.activity.data?.rejectionFeedback }) }), _jsx(TabsContent, { value: "log", className: "mt-0 flex-1 overflow-hidden", children: _jsx(LogTab, { content: featureLogs.content, isConnected: featureLogs.isConnected, error: featureLogs.error }) }), _jsx(TabsContent, { value: "plan", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(PlanTab, { plan: tabs.plan.data, loading: tabs.plan.loading, error: tabs.plan.error }) }), visibleTabs.includes('prd-review') ? (_jsx(TabsContent, { value: "prd-review", className: "mt-0 flex min-h-0 flex-1 flex-col", children: prdData ? (_jsx(PrdQuestionnaire, { data: prdData, selections: prdSelections ?? {}, onSelect: onPrdSelect ?? (() => undefined), onApprove: onPrdApprove ?? (() => undefined), onReject: onPrdReject, isProcessing: isPrdLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) })) : null, visibleTabs.includes('tech-decisions') ? (_jsx(TabsContent, { value: "tech-decisions", className: "mt-0 flex min-h-0 flex-1 flex-col", children: techData ? (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "flex-1 overflow-y-auto", children: _jsx(TechDecisionsContent, { data: techData }) }), _jsx(DrawerActionBarForTech, { onApprove: onTechApprove ?? (() => undefined), onReject: onTechReject, isProcessing: isTechLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })] })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) })) : null, visibleTabs.includes('product-decisions') ? (_jsx(TabsContent, { value: "product-decisions", className: "mt-0 flex-1 overflow-y-auto", children: productData === null ? (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) : productData ? (_jsx(ProductDecisionsSummary, { data: productData })) : (_jsx("p", { className: "text-muted-foreground p-4 text-center text-sm", children: "No product decisions available." })) })) : null, visibleTabs.includes('merge-review') ? (_jsx(TabsContent, { value: "merge-review", className: "mt-0 flex min-h-0 flex-1 flex-col", children: mergeData ? (_jsx(MergeReview, { data: mergeData, readOnly: featureNode.lifecycle === 'maintain', onApprove: onMergeApprove ?? (() => undefined), onReject: onMergeReject, isProcessing: isMergeLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })) : (_jsx("div", { className: "flex items-center justify-center p-8", children:
|
|
247
|
+
return (_jsx("div", { className: "flex min-h-0 flex-1 flex-col", children: _jsxs(Tabs, { value: activeTab, onValueChange: handleTabChange, className: "flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "shrink-0 overflow-x-auto px-4 pt-4", children: _jsx(TabsList, { className: "flex w-full", children: visibleTabDefs.map((tab) => (_jsx(TabsTrigger, { value: tab.key, className: "flex-1", children: tab.label }, tab.key))) }) }), _jsx(TabsContent, { value: "overview", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(OverviewTab, { data: featureNode }) }), _jsx(TabsContent, { value: "activity", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(ActivityTab, { timings: tabs.activity.data?.timings ?? null, loading: tabs.activity.loading, error: tabs.activity.error, rejectionFeedback: tabs.activity.data?.rejectionFeedback }) }), _jsx(TabsContent, { value: "log", className: "mt-0 flex-1 overflow-hidden", children: _jsx(LogTab, { content: featureLogs.content, isConnected: featureLogs.isConnected, error: featureLogs.error }) }), _jsx(TabsContent, { value: "plan", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(PlanTab, { plan: tabs.plan.data, loading: tabs.plan.loading, error: tabs.plan.error }) }), visibleTabs.includes('prd-review') ? (_jsx(TabsContent, { value: "prd-review", className: "mt-0 flex min-h-0 flex-1 flex-col", children: prdData ? (_jsx(PrdQuestionnaire, { data: prdData, selections: prdSelections ?? {}, onSelect: onPrdSelect ?? (() => undefined), onApprove: onPrdApprove ?? (() => undefined), onReject: onPrdReject, isProcessing: isPrdLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) })) : null, visibleTabs.includes('tech-decisions') ? (_jsx(TabsContent, { value: "tech-decisions", className: "mt-0 flex min-h-0 flex-1 flex-col", children: techData ? (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "flex-1 overflow-y-auto", children: _jsx(TechDecisionsContent, { data: techData }) }), _jsx(DrawerActionBarForTech, { onApprove: onTechApprove ?? (() => undefined), onReject: onTechReject, isProcessing: isTechLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })] })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) })) : null, visibleTabs.includes('product-decisions') ? (_jsx(TabsContent, { value: "product-decisions", className: "mt-0 flex-1 overflow-y-auto", children: productData === null ? (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) : productData ? (_jsx(ProductDecisionsSummary, { data: productData })) : (_jsx("p", { className: "text-muted-foreground p-4 text-center text-sm", children: "No product decisions available." })) })) : null, visibleTabs.includes('merge-review') ? (_jsx(TabsContent, { value: "merge-review", className: "mt-0 flex min-h-0 flex-1 flex-col", children: mergeData ? (_jsx(MergeReview, { data: mergeData, readOnly: featureNode.lifecycle === 'maintain', onApprove: onMergeApprove ?? (() => undefined), onReject: onMergeReject, isProcessing: isMergeLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) })) : null] }) }));
|
|
248
248
|
}
|
|
249
249
|
// ── Private helper ──────────────────────────────────────────────────────
|
|
250
250
|
function DrawerActionBarForTech({ onApprove, onReject, isProcessing, isRejecting, chatInput, onChatInputChange, }) {
|