@shepai/cli 1.120.0 → 1.121.0-pr375.de718bc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apis/json-schema/PhaseTiming.yaml +17 -0
- package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts +19 -5
- package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts.map +1 -1
- 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/application/use-cases/features/resume-feature.use-case.d.ts +3 -1
- package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.js +4 -2
- package/dist/packages/core/src/domain/generated/output.d.ts +22 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/039-add-phase-timing-extended-stats.d.ts +11 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/039-add-phase-timing-extended-stats.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/039-add-phase-timing-extended-stats.js +25 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.js +42 -2
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts +5 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.js +38 -13
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/dev-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/dev-executor.service.js +23 -2
- 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 +13 -1
- 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 +12 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +5 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.d.ts +5 -0
- 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 +9 -0
- package/dist/src/presentation/web/app/(dashboard)/get-graph-data.d.ts.map +1 -1
- package/dist/src/presentation/web/app/(dashboard)/get-graph-data.js +2 -43
- package/dist/src/presentation/web/app/actions/approve-feature.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/approve-feature.js +9 -0
- package/dist/src/presentation/web/app/actions/get-feature-phase-timings.d.ts +5 -0
- 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 +5 -0
- package/dist/src/presentation/web/app/actions/reject-feature.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/reject-feature.js +9 -0
- package/dist/src/presentation/web/app/actions/stop-feature.d.ts +5 -0
- package/dist/src/presentation/web/app/actions/stop-feature.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/stop-feature.js +30 -0
- package/dist/src/presentation/web/app/api/npm-version/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/npm-version/route.js +9 -1
- package/dist/src/presentation/web/app/api/sessions/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/sessions/route.js +43 -10
- 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 +15 -6
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.js +35 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +2 -2
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts +2 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.js +4 -0
- package/dist/src/presentation/web/components/common/feature-list-item/feature-list-item.stories.d.ts +1 -0
- package/dist/src/presentation/web/components/common/feature-list-item/feature-list-item.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-list-item/feature-list-item.stories.js +8 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +1 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-status-badges/feature-status-badges.stories.js +6 -6
- package/dist/src/presentation/web/components/common/feature-status-config.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-status-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-status-config.js +8 -1
- package/dist/src/presentation/web/components/common/feature-status-group/feature-status-group.stories.d.ts +1 -0
- package/dist/src/presentation/web/components/common/feature-status-group/feature-status-group.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-status-group/feature-status-group.stories.js +7 -0
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +3 -1
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts +1 -0
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +18 -0
- package/dist/src/presentation/web/hooks/sidebar-features-context.js +1 -1
- package/dist/src/presentation/web/lib/derive-graph.d.ts +2 -0
- package/dist/src/presentation/web/lib/derive-graph.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/derive-graph.js +5 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -5
- 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/create/page/server-reference-manifest.json +57 -42
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +69 -54
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +69 -54
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +53 -38
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +57 -42
- package/web/.next/server/app/(dashboard)/create/page.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +69 -54
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +69 -54
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +53 -38
- package/web/.next/server/app/(dashboard)/page.js +1 -1
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +53 -38
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.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 +1 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/api/sessions/route.js +1 -1
- package/web/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +6 -6
- 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 +6 -6
- 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 +6 -6
- 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 +1 -1
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
- package/web/.next/server/chunks/[externals]_node:fs_ddf6f167._.js +3 -0
- package/web/.next/server/chunks/[externals]_node:fs_ddf6f167._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__3b72e8b0._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__3b72e8b0._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__42b7ab55._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__42b7ab55._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a62bd945._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__a62bd945._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js +3 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js.map +1 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js +3 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2698e9f4._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__2698e9f4._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +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]__804c006d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8e3bf5d7._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8e3bf5d7._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a022445f._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a022445f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b724df9e._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b724df9e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c07f9f79._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c07f9f79._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c605a375._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c605a375._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0dc2cfd3._.js +3 -0
- package/web/.next/server/chunks/ssr/_0dc2cfd3._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_16e2ff25._.js → _0e2fa803._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_16e2ff25._.js.map → _0e2fa803._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
- package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_2f6f48b8._.js +1 -1
- package/web/.next/server/chunks/ssr/_2f6f48b8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_c93f4352._.js → _86bcd0cb._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_c93f4352._.js.map → _86bcd0cb._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_9cdb9131._.js +3 -0
- package/web/.next/server/chunks/ssr/{_503b26e9._.js.map → _9cdb9131._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
- package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_f605354c._.js → _f1a649e3._.js} +3 -3
- package/web/.next/server/chunks/ssr/_f1a649e3._.js.map +1 -0
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{src_presentation_web_0835b28e._.js → src_presentation_web_5f039db1._.js} +3 -3
- package/web/.next/server/chunks/ssr/{src_presentation_web_0835b28e._.js.map → src_presentation_web_5f039db1._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
- package/web/.next/server/chunks/ssr/{src_presentation_web_e8034a29._.js → src_presentation_web_c4337169._.js} +3 -3
- package/web/.next/server/chunks/ssr/{src_presentation_web_e8034a29._.js.map → src_presentation_web_c4337169._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.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 +311 -240
- package/web/.next/static/chunks/0d2af96e64960ef5.css +1 -0
- package/web/.next/static/chunks/{263497416e5198a3.js → 78227a8fa0b0a44f.js} +1 -1
- package/web/.next/static/chunks/7c121b87cbc3a987.js +1 -0
- package/web/.next/static/chunks/{51244236801cad96.js → 87e9e13dd05907a3.js} +1 -1
- package/web/.next/static/chunks/{71161130b2462279.js → 96eeeb28e06de78c.js} +1 -1
- package/web/.next/static/chunks/d1e8c0959d9e7e38.js +1 -0
- package/web/.next/static/chunks/{a5ff70a7709ec5af.js → d3ea72cbb1d42172.js} +1 -1
- package/web/.next/static/chunks/{700fc491c912dd68.js → e4b05f1dc8974236.js} +1 -1
- package/web/.next/static/chunks/f357d403bf61ec3c.js +2 -0
- package/web/.next/static/chunks/f4ae633779d5324c.js +11 -0
- package/web/.next/static/chunks/{57e0b981e00941e4.js → f62c2cfe34d12a8d.js} +1 -1
- package/web/.next/static/chunks/{abb2b485cb0da264.js → ff286f5ef499d263.js} +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0fe7788d._.js +0 -3
- package/web/.next/server/chunks/[root-of-the-server]__0fe7788d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_ed372306.js +0 -3
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_ed372306.js.map +0 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_32e26434.js +0 -3
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_32e26434.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3b14e5a0._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3b14e5a0._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8b59c03e._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8b59c03e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__994ad9fe._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__994ad9fe._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c9c1cfee._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c9c1cfee._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_503b26e9._.js +0 -3
- package/web/.next/server/chunks/ssr/_ab069e13._.js +0 -3
- package/web/.next/server/chunks/ssr/_ab069e13._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_f605354c._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_e99d78dd.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_e99d78dd.js.map +0 -1
- package/web/.next/static/chunks/027d779d1dd1535e.js +0 -1
- package/web/.next/static/chunks/844405e9e0f44c8b.js +0 -11
- package/web/.next/static/chunks/943a2b78e452a2fb.js +0 -2
- package/web/.next/static/chunks/d2739454715e5ef2.css +0 -1
- package/web/.next/static/chunks/f518c011aaa1941e.js +0 -1
- /package/web/.next/static/{oxdz8EAvGqpg8JW3gRSSs → FKhXOv4YGg6YioBqvMlGR}/_buildManifest.js +0 -0
- /package/web/.next/static/{oxdz8EAvGqpg8JW3gRSSs → FKhXOv4YGg6YioBqvMlGR}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{oxdz8EAvGqpg8JW3gRSSs → FKhXOv4YGg6YioBqvMlGR}/_ssgManifest.js +0 -0
|
@@ -70,6 +70,9 @@ export function createMergeNode(deps) {
|
|
|
70
70
|
const startTime = Date.now();
|
|
71
71
|
let totalInputTokens = 0;
|
|
72
72
|
let totalOutputTokens = 0;
|
|
73
|
+
let totalCostUsd = 0;
|
|
74
|
+
let totalNumTurns = 0;
|
|
75
|
+
let totalDurationApiMs = 0;
|
|
73
76
|
const { executor } = deps;
|
|
74
77
|
const mergeTimingId = await recordPhaseStart('merge', {
|
|
75
78
|
agentType: executor.agentType,
|
|
@@ -106,6 +109,9 @@ export function createMergeNode(deps) {
|
|
|
106
109
|
});
|
|
107
110
|
totalInputTokens += commitResult.usage?.inputTokens ?? 0;
|
|
108
111
|
totalOutputTokens += commitResult.usage?.outputTokens ?? 0;
|
|
112
|
+
totalCostUsd += commitResult.usage?.costUsd ?? 0;
|
|
113
|
+
totalNumTurns += commitResult.usage?.numTurns ?? 0;
|
|
114
|
+
totalDurationApiMs += commitResult.usage?.durationApiMs ?? 0;
|
|
109
115
|
commitHash = parseCommitHash(commitResult.result) ?? state.commitHash;
|
|
110
116
|
messages.push(`[merge] Agent completed commit/push/PR operations`);
|
|
111
117
|
if (effectiveState.openPr) {
|
|
@@ -183,6 +189,9 @@ export function createMergeNode(deps) {
|
|
|
183
189
|
await recordPhaseEnd(mergeTimingId, Date.now() - startTime, {
|
|
184
190
|
inputTokens: totalInputTokens || undefined,
|
|
185
191
|
outputTokens: totalOutputTokens || undefined,
|
|
192
|
+
costUsd: totalCostUsd || undefined,
|
|
193
|
+
numTurns: totalNumTurns || undefined,
|
|
194
|
+
durationApiMs: totalDurationApiMs || undefined,
|
|
186
195
|
exitCode: 'success',
|
|
187
196
|
});
|
|
188
197
|
await recordApprovalWaitStart(mergeTimingId);
|
|
@@ -294,6 +303,9 @@ export function createMergeNode(deps) {
|
|
|
294
303
|
await recordPhaseEnd(mergeTimingId, Date.now() - startTime, {
|
|
295
304
|
inputTokens: totalInputTokens || undefined,
|
|
296
305
|
outputTokens: totalOutputTokens || undefined,
|
|
306
|
+
costUsd: totalCostUsd || undefined,
|
|
307
|
+
numTurns: totalNumTurns || undefined,
|
|
308
|
+
durationApiMs: totalDurationApiMs || undefined,
|
|
297
309
|
exitCode: 'error',
|
|
298
310
|
errorMessage: message.slice(0, 1000),
|
|
299
311
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-helpers.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,+DAA+D,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAUrD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IAE7C,4DAA4D;gBAChD,IAAI;kBAGF,MAAM,GAAG,IAAI;mBAIZ,MAAM,GAAG,IAAI;EAK/B;AAED,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;A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B,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,UAAU,GAAG,IAAI,CAqB5F;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAOhG;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,UAAU,GAAG,IAAI,CAwB1F;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAa5F;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,GAAG,MAAM,CAiCT;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAa3E;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,cAAc,EACxB,WAAW,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,UAAU,KAAK,MAAM,GACjE,CAAC,KAAK,EAAE,iBAAiB,KAAK,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"node-helpers.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAM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AG,MAAM,CAa3E;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,cAAc,EACxB,WAAW,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,UAAU,KAAK,MAAM,GACjE,CAAC,KAAK,EAAE,iBAAiB,KAAK,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAqInE"}
|
package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js
CHANGED
|
@@ -427,6 +427,11 @@ export function executeNode(nodeName, executor, buildPrompt) {
|
|
|
427
427
|
await recordPhaseEnd(timingId, durationMs, {
|
|
428
428
|
inputTokens: result.usage?.inputTokens,
|
|
429
429
|
outputTokens: result.usage?.outputTokens,
|
|
430
|
+
cacheCreationInputTokens: result.usage?.cacheCreationInputTokens,
|
|
431
|
+
cacheReadInputTokens: result.usage?.cacheReadInputTokens,
|
|
432
|
+
costUsd: result.usage?.costUsd,
|
|
433
|
+
numTurns: result.usage?.numTurns,
|
|
434
|
+
durationApiMs: result.usage?.durationApiMs,
|
|
430
435
|
exitCode: 'success',
|
|
431
436
|
});
|
|
432
437
|
// Mark phase complete BEFORE interrupting so that on resume the
|
|
@@ -39,6 +39,11 @@ export declare function recordPhaseStart(phase: string, metadata?: PhaseStartMet
|
|
|
39
39
|
export interface PhaseEndMetadata {
|
|
40
40
|
inputTokens?: number;
|
|
41
41
|
outputTokens?: number;
|
|
42
|
+
cacheCreationInputTokens?: number;
|
|
43
|
+
cacheReadInputTokens?: number;
|
|
44
|
+
costUsd?: number;
|
|
45
|
+
numTurns?: number;
|
|
46
|
+
durationApiMs?: number;
|
|
42
47
|
exitCode?: string;
|
|
43
48
|
errorMessage?: string;
|
|
44
49
|
}
|
|
@@ -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,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,
|
|
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,GAA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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
|
@@ -103,6 +103,15 @@ export async function recordPhaseEnd(timingId, durationMs, metadata) {
|
|
|
103
103
|
durationMs: BigInt(durationMs),
|
|
104
104
|
...(metadata?.inputTokens != null && { inputTokens: BigInt(metadata.inputTokens) }),
|
|
105
105
|
...(metadata?.outputTokens != null && { outputTokens: BigInt(metadata.outputTokens) }),
|
|
106
|
+
...(metadata?.cacheCreationInputTokens != null && {
|
|
107
|
+
cacheCreationInputTokens: BigInt(metadata.cacheCreationInputTokens),
|
|
108
|
+
}),
|
|
109
|
+
...(metadata?.cacheReadInputTokens != null && {
|
|
110
|
+
cacheReadInputTokens: BigInt(metadata.cacheReadInputTokens),
|
|
111
|
+
}),
|
|
112
|
+
...(metadata?.costUsd != null && { costUsd: metadata.costUsd }),
|
|
113
|
+
...(metadata?.numTurns != null && { numTurns: metadata.numTurns }),
|
|
114
|
+
...(metadata?.durationApiMs != null && { durationApiMs: BigInt(metadata.durationApiMs) }),
|
|
106
115
|
...(metadata?.exitCode != null && { exitCode: metadata.exitCode }),
|
|
107
116
|
...(metadata?.errorMessage != null && { errorMessage: metadata.errorMessage }),
|
|
108
117
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-graph-data.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/(dashboard)/get-graph-data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-graph-data.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/(dashboard)/get-graph-data.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAE5E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,wBAAsB,YAAY,IAAI,OAAO,CAAC;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,CAAC,CA+CxF"}
|
|
@@ -1,55 +1,14 @@
|
|
|
1
1
|
import { resolve } from '../../lib/server-container.js';
|
|
2
|
-
import { CiStatus } from '../../../../../packages/core/src/domain/generated/output.js';
|
|
3
2
|
import { getSettings } from '../../../../../packages/core/src/infrastructure/services/settings.service.js';
|
|
4
3
|
import { layoutWithDagre, CANVAS_LAYOUT_DEFAULTS } from '../../lib/layout-with-dagre.js';
|
|
5
4
|
import { buildGraphNodes } from '../build-graph-nodes.js';
|
|
6
|
-
const CI_STATUS_MAP = {
|
|
7
|
-
success: CiStatus.Success,
|
|
8
|
-
failure: CiStatus.Failure,
|
|
9
|
-
pending: CiStatus.Pending,
|
|
10
|
-
};
|
|
11
5
|
export async function getGraphData() {
|
|
12
6
|
const listFeatures = resolve('ListFeaturesUseCase');
|
|
13
7
|
const listRepos = resolve('ListRepositoriesUseCase');
|
|
14
8
|
const agentRunRepo = resolve('IAgentRunRepository');
|
|
15
|
-
const gitPrService = resolve('IGitPrService');
|
|
16
|
-
const featureRepo = resolve('IFeatureRepository');
|
|
17
9
|
const [features, repositories] = await Promise.all([listFeatures.execute(), listRepos.execute()]);
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
await Promise.all(features
|
|
21
|
-
.filter((f) => f.pr?.number)
|
|
22
|
-
.map(async (feature) => {
|
|
23
|
-
try {
|
|
24
|
-
const updates = {};
|
|
25
|
-
// Live mergeable status (only if not yet known)
|
|
26
|
-
if (feature.pr.mergeable === undefined) {
|
|
27
|
-
const mergeable = await gitPrService.getMergeableStatus(feature.repositoryPath, feature.pr.number);
|
|
28
|
-
if (mergeable !== undefined)
|
|
29
|
-
updates.mergeable = mergeable;
|
|
30
|
-
}
|
|
31
|
-
// Live CI status
|
|
32
|
-
if (feature.branch) {
|
|
33
|
-
const ciResult = await gitPrService
|
|
34
|
-
.getCiStatus(feature.repositoryPath, feature.branch)
|
|
35
|
-
.catch(() => undefined);
|
|
36
|
-
if (ciResult) {
|
|
37
|
-
const ciStatus = CI_STATUS_MAP[ciResult.status] ?? CiStatus.Pending;
|
|
38
|
-
if (ciStatus !== feature.pr.ciStatus)
|
|
39
|
-
updates.ciStatus = ciStatus;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (Object.keys(updates).length > 0) {
|
|
43
|
-
feature.pr = { ...feature.pr, ...updates };
|
|
44
|
-
featureRepo.update(feature).catch(() => {
|
|
45
|
-
/* best-effort persist */
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
catch {
|
|
50
|
-
// GitHub fetch failed — use cached value
|
|
51
|
-
}
|
|
52
|
-
}));
|
|
10
|
+
// PR/CI status is kept fresh by PrSyncWatcher (30s background poll).
|
|
11
|
+
// No live GitHub calls here — use cached DB values for fast response.
|
|
53
12
|
const featuresWithRuns = await Promise.all(features.map(async (feature) => {
|
|
54
13
|
const run = feature.agentRunId ? await agentRunRepo.findById(feature.agentRunId) : null;
|
|
55
14
|
return { feature, run };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approve-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/approve-feature.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"approve-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/approve-feature.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAK/E,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAsChD"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use server';
|
|
2
2
|
import { resolve } from '../../lib/server-container.js';
|
|
3
|
+
import { AgentRunStatus } from '../../../../../packages/core/src/domain/generated/output.js';
|
|
4
|
+
const ERROR_STATUSES = new Set([AgentRunStatus.failed, AgentRunStatus.interrupted]);
|
|
3
5
|
export async function approveFeature(featureId, payload) {
|
|
4
6
|
if (!featureId.trim()) {
|
|
5
7
|
return { approved: false, error: 'Feature id is required' };
|
|
@@ -13,6 +15,13 @@ export async function approveFeature(featureId, payload) {
|
|
|
13
15
|
if (!feature.agentRunId) {
|
|
14
16
|
return { approved: false, error: 'Feature has no agent run' };
|
|
15
17
|
}
|
|
18
|
+
const runRepo = resolve('IAgentRunRepository');
|
|
19
|
+
const run = await runRepo.findById(feature.agentRunId);
|
|
20
|
+
if (run && ERROR_STATUSES.has(run.status)) {
|
|
21
|
+
const resumeUseCase = resolve('ResumeFeatureUseCase');
|
|
22
|
+
await resumeUseCase.execute(featureId, { promptPrefix: 'User approved. Please continue.' });
|
|
23
|
+
return { approved: true };
|
|
24
|
+
}
|
|
16
25
|
const approveUseCase = resolve('ApproveAgentRunUseCase');
|
|
17
26
|
const result = await approveUseCase.execute(feature.agentRunId, payload);
|
|
18
27
|
if (!result.approved) {
|
|
@@ -8,6 +8,11 @@ export interface PhaseTimingData {
|
|
|
8
8
|
approvalWaitMs?: number;
|
|
9
9
|
inputTokens?: number;
|
|
10
10
|
outputTokens?: number;
|
|
11
|
+
cacheCreationInputTokens?: number;
|
|
12
|
+
cacheReadInputTokens?: number;
|
|
13
|
+
costUsd?: number;
|
|
14
|
+
numTurns?: number;
|
|
15
|
+
durationApiMs?: number;
|
|
11
16
|
}
|
|
12
17
|
export interface RejectionFeedbackData {
|
|
13
18
|
iteration: number;
|
|
@@ -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;
|
|
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;CACxB;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,CAoC9F"}
|
|
@@ -17,6 +17,11 @@ export async function getFeaturePhaseTimings(featureId) {
|
|
|
17
17
|
approvalWaitMs: t.approvalWaitMs != null ? Number(t.approvalWaitMs) : undefined,
|
|
18
18
|
inputTokens: t.inputTokens != null ? Number(t.inputTokens) : undefined,
|
|
19
19
|
outputTokens: t.outputTokens != null ? Number(t.outputTokens) : undefined,
|
|
20
|
+
cacheCreationInputTokens: t.cacheCreationInputTokens != null ? Number(t.cacheCreationInputTokens) : undefined,
|
|
21
|
+
cacheReadInputTokens: t.cacheReadInputTokens != null ? Number(t.cacheReadInputTokens) : undefined,
|
|
22
|
+
costUsd: t.costUsd != null ? Number(t.costUsd) : undefined,
|
|
23
|
+
numTurns: t.numTurns ?? undefined,
|
|
24
|
+
durationApiMs: t.durationApiMs != null ? Number(t.durationApiMs) : undefined,
|
|
20
25
|
}));
|
|
21
26
|
// Read rejection feedback from spec.yaml
|
|
22
27
|
const rejectionFeedback = await readRejectionFeedback(featureId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reject-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/reject-feature.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reject-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/reject-feature.ts"],"names":[],"mappings":"AAWA,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC;IACT,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CA8CD"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use server';
|
|
2
2
|
import { resolve } from '../../lib/server-container.js';
|
|
3
|
+
import { AgentRunStatus } from '../../../../../packages/core/src/domain/generated/output.js';
|
|
4
|
+
const ERROR_STATUSES = new Set([AgentRunStatus.failed, AgentRunStatus.interrupted]);
|
|
3
5
|
export async function rejectFeature(featureId, feedback, attachments) {
|
|
4
6
|
if (!featureId.trim()) {
|
|
5
7
|
return { rejected: false, error: 'Feature id is required' };
|
|
@@ -16,6 +18,13 @@ export async function rejectFeature(featureId, feedback, attachments) {
|
|
|
16
18
|
if (!feature.agentRunId) {
|
|
17
19
|
return { rejected: false, error: 'Feature has no agent run' };
|
|
18
20
|
}
|
|
21
|
+
const runRepo = resolve('IAgentRunRepository');
|
|
22
|
+
const run = await runRepo.findById(feature.agentRunId);
|
|
23
|
+
if (run && ERROR_STATUSES.has(run.status)) {
|
|
24
|
+
const resumeUseCase = resolve('ResumeFeatureUseCase');
|
|
25
|
+
await resumeUseCase.execute(featureId, { promptPrefix: feedback });
|
|
26
|
+
return { rejected: true, iteration: 1 };
|
|
27
|
+
}
|
|
19
28
|
const rejectUseCase = resolve('RejectAgentRunUseCase');
|
|
20
29
|
const result = await rejectUseCase.execute(feature.agentRunId, feedback, attachments);
|
|
21
30
|
if (!result.rejected) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stop-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/stop-feature.ts"],"names":[],"mappings":"AAMA,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAiC/C"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use server';
|
|
2
|
+
import { resolve } from '../../lib/server-container.js';
|
|
3
|
+
export async function stopFeature(featureId) {
|
|
4
|
+
if (!featureId.trim()) {
|
|
5
|
+
return { stopped: false, error: 'Feature id is required' };
|
|
6
|
+
}
|
|
7
|
+
try {
|
|
8
|
+
// Find the active agent run for this feature
|
|
9
|
+
const runRepo = resolve('IAgentRunRepository');
|
|
10
|
+
const allRuns = await runRepo.list();
|
|
11
|
+
const activeRun = allRuns.find((r) => r.featureId === featureId &&
|
|
12
|
+
r.status !== 'completed' &&
|
|
13
|
+
r.status !== 'failed' &&
|
|
14
|
+
r.status !== 'interrupted' &&
|
|
15
|
+
r.status !== 'cancelled');
|
|
16
|
+
if (!activeRun) {
|
|
17
|
+
return { stopped: false, error: 'No active agent run found for this feature' };
|
|
18
|
+
}
|
|
19
|
+
const useCase = resolve('StopAgentRunUseCase');
|
|
20
|
+
const result = await useCase.execute(activeRun.id);
|
|
21
|
+
if (!result.stopped) {
|
|
22
|
+
return { stopped: false, error: result.reason };
|
|
23
|
+
}
|
|
24
|
+
return { stopped: true };
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
const message = error instanceof Error ? error.message : 'Failed to stop agent';
|
|
28
|
+
return { stopped: false, error: message };
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/app/api/npm-version/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/app/api/npm-version/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3C,wBAAsB,GAAG,IAAI,OAAO,CAAC,YAAY,CAAC,CAsBjD"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { NextResponse } from 'next/server';
|
|
2
|
+
const CACHE_TTL_MS = 5 * 60_000; // 5 minutes
|
|
3
|
+
let cachedVersion = null;
|
|
2
4
|
export async function GET() {
|
|
5
|
+
// Return cached value if fresh
|
|
6
|
+
if (cachedVersion && Date.now() - cachedVersion.fetchedAt < CACHE_TTL_MS) {
|
|
7
|
+
return NextResponse.json({ latest: cachedVersion.latest });
|
|
8
|
+
}
|
|
3
9
|
const packageName = '@shepai/cli';
|
|
4
10
|
try {
|
|
5
11
|
const res = await fetch(`https://registry.npmjs.org/${packageName}/latest`, {
|
|
@@ -9,7 +15,9 @@ export async function GET() {
|
|
|
9
15
|
return NextResponse.json({ error: `npm registry returned ${res.status}` }, { status: 502 });
|
|
10
16
|
}
|
|
11
17
|
const data = (await res.json());
|
|
12
|
-
|
|
18
|
+
const latest = data.version ?? null;
|
|
19
|
+
cachedVersion = { latest, fetchedAt: Date.now() };
|
|
20
|
+
return NextResponse.json({ latest });
|
|
13
21
|
}
|
|
14
22
|
catch (error) {
|
|
15
23
|
const message = error instanceof Error ? error.message : 'Failed to check npm version';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/app/api/sessions/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3C,eAAO,MAAM,OAAO,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/app/api/sessions/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3C,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAgTvC;;;;;GAKG;AACH,wBAAsB,GAAG,CAAC,OAAO,EAAE,OAAO;;;;YAnTpC,MAAM;mBACC,MAAM;iBACR,MAAM,GAAG,IAAI;sBACR,MAAM;wBACJ,MAAM,GAAG,IAAI;uBACd,MAAM,GAAG,IAAI;mBACjB,MAAM,GAAG,IAAI;qBACX,MAAM;kBACT,MAAM;;IAwUjB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NextResponse } from 'next/server';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { readdir, stat
|
|
4
|
+
import { readdir, stat } from 'node:fs/promises';
|
|
5
5
|
export const dynamic = 'force-dynamic';
|
|
6
6
|
// ── Path encoding helpers ─────────────────────────────────────────────
|
|
7
7
|
/**
|
|
@@ -49,14 +49,32 @@ async function scanClaudeSessions(repositoryPath, limit) {
|
|
|
49
49
|
.map((r) => r.value)
|
|
50
50
|
.filter((s) => s !== null);
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Read the first N bytes of a file to extract preview and timestamps
|
|
54
|
+
* without loading the entire (potentially multi-MB) session file.
|
|
55
|
+
*/
|
|
56
|
+
const PREVIEW_READ_BYTES = 8_192; // 8KB is enough for first few messages
|
|
52
57
|
async function parseClaudeSession(filePath, fileName, mtime, repositoryPath) {
|
|
53
|
-
const
|
|
54
|
-
const lines = content.split('\n').filter((l) => l.trim());
|
|
58
|
+
const { createReadStream } = await import('node:fs');
|
|
55
59
|
const id = fileName.replace('.jsonl', '');
|
|
60
|
+
// Read only the first chunk to extract preview and first timestamp
|
|
56
61
|
let preview = null;
|
|
57
|
-
let messageCount = 0;
|
|
58
62
|
let firstTimestamp = null;
|
|
59
|
-
let
|
|
63
|
+
let messageCount = 0;
|
|
64
|
+
const head = await new Promise((resolve) => {
|
|
65
|
+
const chunks = [];
|
|
66
|
+
let size = 0;
|
|
67
|
+
const stream = createReadStream(filePath, { end: PREVIEW_READ_BYTES - 1 });
|
|
68
|
+
stream.on('data', (chunk) => {
|
|
69
|
+
chunks.push(chunk);
|
|
70
|
+
size += chunk.length;
|
|
71
|
+
});
|
|
72
|
+
stream.on('end', () => resolve(Buffer.concat(chunks, size).toString('utf-8')));
|
|
73
|
+
stream.on('error', () => resolve(''));
|
|
74
|
+
});
|
|
75
|
+
if (!head)
|
|
76
|
+
return null;
|
|
77
|
+
const lines = head.split('\n').filter((l) => l.trim());
|
|
60
78
|
for (const line of lines) {
|
|
61
79
|
try {
|
|
62
80
|
const entry = JSON.parse(line);
|
|
@@ -66,7 +84,6 @@ async function parseClaudeSession(filePath, fileName, mtime, repositoryPath) {
|
|
|
66
84
|
messageCount++;
|
|
67
85
|
if (entry.timestamp) {
|
|
68
86
|
firstTimestamp ??= entry.timestamp;
|
|
69
|
-
lastTimestamp = entry.timestamp;
|
|
70
87
|
}
|
|
71
88
|
if (role === 'user' && preview === null) {
|
|
72
89
|
preview = extractText(entry.message?.content);
|
|
@@ -80,14 +97,16 @@ async function parseClaudeSession(filePath, fileName, mtime, repositoryPath) {
|
|
|
80
97
|
}
|
|
81
98
|
if (messageCount === 0)
|
|
82
99
|
return null;
|
|
100
|
+
// Use mtime as lastMessageAt — avoids reading entire file for last line
|
|
101
|
+
const mtimeIso = new Date(mtime).toISOString();
|
|
83
102
|
return {
|
|
84
103
|
id,
|
|
85
104
|
agentType: 'claude-code',
|
|
86
105
|
preview,
|
|
87
106
|
messageCount,
|
|
88
107
|
firstMessageAt: firstTimestamp,
|
|
89
|
-
lastMessageAt:
|
|
90
|
-
createdAt: firstTimestamp ??
|
|
108
|
+
lastMessageAt: mtimeIso,
|
|
109
|
+
createdAt: firstTimestamp ?? mtimeIso,
|
|
91
110
|
projectPath: repositoryPath,
|
|
92
111
|
filePath,
|
|
93
112
|
_mtime: mtime,
|
|
@@ -144,11 +163,25 @@ async function scanCursorSessions(repositoryPath, limit) {
|
|
|
144
163
|
.filter((s) => s !== null);
|
|
145
164
|
}
|
|
146
165
|
async function parseCursorSession(filePath, fileName, mtime, repositoryPath) {
|
|
147
|
-
const
|
|
148
|
-
const lines = content.split('\n').filter((l) => l.trim());
|
|
166
|
+
const { createReadStream } = await import('node:fs');
|
|
149
167
|
const id = fileName.replace('.jsonl', '');
|
|
168
|
+
// Read only the first chunk for preview extraction
|
|
169
|
+
const head = await new Promise((resolve) => {
|
|
170
|
+
const chunks = [];
|
|
171
|
+
let size = 0;
|
|
172
|
+
const stream = createReadStream(filePath, { end: PREVIEW_READ_BYTES - 1 });
|
|
173
|
+
stream.on('data', (chunk) => {
|
|
174
|
+
chunks.push(chunk);
|
|
175
|
+
size += chunk.length;
|
|
176
|
+
});
|
|
177
|
+
stream.on('end', () => resolve(Buffer.concat(chunks, size).toString('utf-8')));
|
|
178
|
+
stream.on('error', () => resolve(''));
|
|
179
|
+
});
|
|
180
|
+
if (!head)
|
|
181
|
+
return null;
|
|
150
182
|
let preview = null;
|
|
151
183
|
let messageCount = 0;
|
|
184
|
+
const lines = head.split('\n').filter((l) => l.trim());
|
|
152
185
|
for (const line of lines) {
|
|
153
186
|
try {
|
|
154
187
|
const entry = JSON.parse(line);
|
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":"AAIA,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"activity-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/activity-tab.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;AA4DjD,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;AA6BD;;;;;;;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;AAMD,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, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useEffect, useRef } from 'react';
|
|
4
|
-
import { Loader2, AlertCircle, Clock, Zap } from 'lucide-react';
|
|
4
|
+
import { Loader2, AlertCircle, Clock, Zap, DollarSign } from 'lucide-react';
|
|
5
5
|
import { InlineAttachments } from '../../common/inline-attachments/index.js';
|
|
6
6
|
import { formatDuration } from '../../../lib/format-duration.js';
|
|
7
7
|
/**
|
|
@@ -51,6 +51,14 @@ function formatTokens(count) {
|
|
|
51
51
|
return `${(count / 1_000).toFixed(1)}K`;
|
|
52
52
|
return String(count);
|
|
53
53
|
}
|
|
54
|
+
/** Format a USD cost with appropriate precision. */
|
|
55
|
+
function formatCost(usd) {
|
|
56
|
+
if (usd >= 1)
|
|
57
|
+
return `$${usd.toFixed(2)}`;
|
|
58
|
+
if (usd >= 0.01)
|
|
59
|
+
return `$${usd.toFixed(3)}`;
|
|
60
|
+
return `$${usd.toFixed(4)}`;
|
|
61
|
+
}
|
|
54
62
|
const NODE_TO_PHASE = {
|
|
55
63
|
analyze: 'Analyzing',
|
|
56
64
|
requirements: 'Requirements',
|
|
@@ -160,7 +168,8 @@ export function ActivityTab({ timings, loading, error, rejectionFeedback }) {
|
|
|
160
168
|
const totalWaitMs = nodeTimings.reduce((sum, t) => sum + (t.approvalWaitMs ?? 0), 0);
|
|
161
169
|
const totalInputTokens = nodeTimings.reduce((sum, t) => sum + (t.inputTokens ?? 0), 0);
|
|
162
170
|
const totalOutputTokens = nodeTimings.reduce((sum, t) => sum + (t.outputTokens ?? 0), 0);
|
|
163
|
-
|
|
171
|
+
const totalCostUsd = nodeTimings.reduce((sum, t) => sum + (t.costUsd ?? 0), 0);
|
|
172
|
+
return (_jsxs("div", { className: "flex flex-col gap-4 p-4", children: [_jsx("div", { "data-testid": "activity-timings", className: "flex flex-col gap-3", children: iterations.map((iteration) => (_jsx(IterationGroup, { iteration: iteration, showHeader: hasMultipleIterations, maxDurationMs: maxDurationMs, now: now }, iteration.number))) }), totalExecMs > 0 ? (_jsx(SummaryTotals, { totalExecMs: totalExecMs, totalWaitMs: totalWaitMs, totalInputTokens: totalInputTokens, totalOutputTokens: totalOutputTokens, totalCostUsd: totalCostUsd })) : null] }));
|
|
164
173
|
}
|
|
165
174
|
/* ---------------------------------------------------------------------------
|
|
166
175
|
* Iteration group — one cycle of work
|
|
@@ -208,16 +217,16 @@ function NodeTimingRow({ timing, maxDurationMs, now, }) {
|
|
|
208
217
|
const totalTokens = timing.inputTokens != null || timing.outputTokens != null
|
|
209
218
|
? (timing.inputTokens ?? 0) + (timing.outputTokens ?? 0)
|
|
210
219
|
: null;
|
|
211
|
-
return (_jsxs("div", { className: isSubPhase ? 'flex flex-col gap-1 pl-6' : 'flex flex-col gap-1', children: [_jsxs("div", { "data-testid": `timing-bar-${timing.phase}`, className: "flex items-center gap-2", children: [_jsx("span", { className: `text-muted-foreground shrink-0 text-xs ${isSubPhase ? 'w-18' : 'w-24'}`, children: label }), _jsx("div", { className: `bg-muted min-w-0 flex-1 overflow-hidden rounded-full ${isSubPhase ? 'h-2.5' : 'h-3'}`, children: _jsx("div", { className: `h-full rounded-full ${barColorClass}${isRunning ? 'animate-pulse' : ''}`, style: { width: `${Math.min(barPercent, 100)}%` } }) }), _jsx("span", { className: "text-muted-foreground w-10 shrink-0 text-right text-xs tabular-nums", children: formatDuration(durationMs) }), _jsx("span", { className: "text-muted-foreground w-12 shrink-0 text-right text-[10px] tabular-nums", children: totalTokens != null && totalTokens > 0 ? (_jsxs("span", { className: "inline-flex items-center gap-0.5", children: [_jsx(Zap, { className: "h-2 w-2 opacity-50" }), formatTokens(totalTokens)] })) : null })] }), timing.approvalWaitMs != null && timing.approvalWaitMs > 0 ? (_jsx(ApprovalWaitRow, { timing: timing, maxDurationMs: maxDurationMs })) : null] }));
|
|
220
|
+
return (_jsxs("div", { className: isSubPhase ? 'flex flex-col gap-1 pl-6' : 'flex flex-col gap-1', children: [_jsxs("div", { "data-testid": `timing-bar-${timing.phase}`, className: "flex items-center gap-2", children: [_jsx("span", { className: `text-muted-foreground shrink-0 text-xs ${isSubPhase ? 'w-18' : 'w-24'}`, children: label }), _jsx("div", { className: `bg-muted min-w-0 flex-1 overflow-hidden rounded-full ${isSubPhase ? 'h-2.5' : 'h-3'}`, children: _jsx("div", { className: `h-full rounded-full ${barColorClass}${isRunning ? 'animate-pulse' : ''}`, style: { width: `${Math.min(barPercent, 100)}%` } }) }), _jsx("span", { className: "text-muted-foreground w-10 shrink-0 text-right text-xs tabular-nums", children: formatDuration(durationMs) }), _jsx("span", { className: "text-muted-foreground w-12 shrink-0 text-right text-[10px] tabular-nums", children: totalTokens != null && totalTokens > 0 ? (_jsxs("span", { className: "inline-flex items-center gap-0.5", children: [_jsx(Zap, { className: "h-2 w-2 opacity-50" }), formatTokens(totalTokens)] })) : null }), _jsx("span", { className: "text-muted-foreground w-14 shrink-0 text-right text-[10px] tabular-nums", children: timing.costUsd != null && timing.costUsd > 0 ? (_jsxs("span", { className: "inline-flex items-center gap-0.5", children: [_jsx(DollarSign, { className: "h-2 w-2 opacity-50" }), formatCost(timing.costUsd)] })) : null })] }), timing.approvalWaitMs != null && timing.approvalWaitMs > 0 ? (_jsx(ApprovalWaitRow, { timing: timing, maxDurationMs: maxDurationMs })) : null] }));
|
|
212
221
|
}
|
|
213
222
|
function ApprovalWaitRow({ timing, maxDurationMs, }) {
|
|
214
223
|
const waitMs = timing.approvalWaitMs ?? 0;
|
|
215
224
|
const barPercent = maxDurationMs > 0 ? Math.max(2, (waitMs / maxDurationMs) * 100) : 2;
|
|
216
|
-
return (_jsxs("div", { "data-testid": `approval-wait-${timing.phase}`, className: "flex items-center gap-2 pl-4", children: [_jsx("span", { className: "text-muted-foreground w-20 shrink-0 text-xs", children: "approval" }), _jsx("div", { className: "bg-muted h-2.5 min-w-0 flex-1 overflow-hidden rounded-full", children: _jsx("div", { className: "h-full rounded-full bg-amber-500", style: { width: `${Math.min(barPercent, 100)}%` } }) }), _jsx("span", { className: "text-muted-foreground w-10 shrink-0 text-right text-xs tabular-nums", children: formatDuration(waitMs) }), _jsx("span", { className: "w-12 shrink-0" })] }));
|
|
225
|
+
return (_jsxs("div", { "data-testid": `approval-wait-${timing.phase}`, className: "flex items-center gap-2 pl-4", children: [_jsx("span", { className: "text-muted-foreground w-20 shrink-0 text-xs", children: "approval" }), _jsx("div", { className: "bg-muted h-2.5 min-w-0 flex-1 overflow-hidden rounded-full", children: _jsx("div", { className: "h-full rounded-full bg-amber-500", style: { width: `${Math.min(barPercent, 100)}%` } }) }), _jsx("span", { className: "text-muted-foreground w-10 shrink-0 text-right text-xs tabular-nums", children: formatDuration(waitMs) }), _jsx("span", { className: "w-12 shrink-0" }), _jsx("span", { className: "w-14 shrink-0" })] }));
|
|
217
226
|
}
|
|
218
|
-
function SummaryTotals({ totalExecMs, totalWaitMs, totalInputTokens, totalOutputTokens, }) {
|
|
227
|
+
function SummaryTotals({ totalExecMs, totalWaitMs, totalInputTokens, totalOutputTokens, totalCostUsd, }) {
|
|
219
228
|
const totalTokens = totalInputTokens + totalOutputTokens;
|
|
220
|
-
return (_jsxs("div", { "data-testid": "activity-summary", className: "border-border flex flex-col gap-1.5 border-t pt-3", children: [_jsx(SummaryRow, { label: "Total execution", value: formatDuration(totalExecMs) }), totalWaitMs > 0 ? (_jsxs(_Fragment, { children: [_jsx(SummaryRow, { label: "Total wait", value: formatDuration(totalWaitMs) }), _jsx(SummaryRow, { label: "Total wall-clock", value: formatDuration(totalExecMs + totalWaitMs) })] })) : null, totalTokens > 0 ? (_jsx(SummaryRow, { label: "Total tokens", value: `${formatTokens(totalTokens)} (${formatTokens(totalInputTokens)} in · ${formatTokens(totalOutputTokens)} out)` })) : null] }));
|
|
229
|
+
return (_jsxs("div", { "data-testid": "activity-summary", className: "border-border flex flex-col gap-1.5 border-t pt-3", children: [_jsx(SummaryRow, { label: "Total execution", value: formatDuration(totalExecMs) }), totalWaitMs > 0 ? (_jsxs(_Fragment, { children: [_jsx(SummaryRow, { label: "Total wait", value: formatDuration(totalWaitMs) }), _jsx(SummaryRow, { label: "Total wall-clock", value: formatDuration(totalExecMs + totalWaitMs) })] })) : null, totalTokens > 0 ? (_jsx(SummaryRow, { label: "Total tokens", value: `${formatTokens(totalTokens)} (${formatTokens(totalInputTokens)} in · ${formatTokens(totalOutputTokens)} out)` })) : null, totalCostUsd > 0 ? _jsx(SummaryRow, { label: "Total cost", value: formatCost(totalCostUsd) }) : null] }));
|
|
221
230
|
}
|
|
222
231
|
function SummaryRow({ label, value }) {
|
|
223
232
|
return (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: label }), _jsx("span", { className: "text-xs font-medium", children: value })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-tab.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAclC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"activity-tab.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAclC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAsM1C,2EAA2E;AAC3E,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,0CAA0C;AAC1C,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,aAAa,EAAE,KAsE3B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAwEhC,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAE,KAgC/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAiI3B,CAAC"}
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.js
CHANGED
|
@@ -29,6 +29,13 @@ const singleRunTimings = [
|
|
|
29
29
|
startedAt: '2025-01-15T10:00:01Z',
|
|
30
30
|
completedAt: '2025-01-15T10:00:15Z',
|
|
31
31
|
durationMs: 14000,
|
|
32
|
+
inputTokens: 28500,
|
|
33
|
+
outputTokens: 3200,
|
|
34
|
+
cacheCreationInputTokens: 22000,
|
|
35
|
+
cacheReadInputTokens: 0,
|
|
36
|
+
costUsd: 0.1245,
|
|
37
|
+
numTurns: 2,
|
|
38
|
+
durationApiMs: 8400,
|
|
32
39
|
},
|
|
33
40
|
{
|
|
34
41
|
agentRunId: 'run-1',
|
|
@@ -38,6 +45,13 @@ const singleRunTimings = [
|
|
|
38
45
|
durationMs: 90000,
|
|
39
46
|
waitingApprovalAt: '2025-01-15T10:01:00Z',
|
|
40
47
|
approvalWaitMs: 30000,
|
|
48
|
+
inputTokens: 45200,
|
|
49
|
+
outputTokens: 8100,
|
|
50
|
+
cacheCreationInputTokens: 12000,
|
|
51
|
+
cacheReadInputTokens: 22000,
|
|
52
|
+
costUsd: 0.2831,
|
|
53
|
+
numTurns: 5,
|
|
54
|
+
durationApiMs: 42000,
|
|
41
55
|
},
|
|
42
56
|
{
|
|
43
57
|
agentRunId: 'run-1',
|
|
@@ -45,6 +59,13 @@ const singleRunTimings = [
|
|
|
45
59
|
startedAt: '2025-01-15T10:01:45Z',
|
|
46
60
|
completedAt: '2025-01-15T10:03:30Z',
|
|
47
61
|
durationMs: 105000,
|
|
62
|
+
inputTokens: 92400,
|
|
63
|
+
outputTokens: 15600,
|
|
64
|
+
cacheCreationInputTokens: 8000,
|
|
65
|
+
cacheReadInputTokens: 34000,
|
|
66
|
+
costUsd: 0.5127,
|
|
67
|
+
numTurns: 8,
|
|
68
|
+
durationApiMs: 78000,
|
|
48
69
|
},
|
|
49
70
|
{
|
|
50
71
|
agentRunId: 'run-1',
|
|
@@ -54,6 +75,13 @@ const singleRunTimings = [
|
|
|
54
75
|
durationMs: 90000,
|
|
55
76
|
waitingApprovalAt: '2025-01-15T10:04:30Z',
|
|
56
77
|
approvalWaitMs: 15000,
|
|
78
|
+
inputTokens: 68300,
|
|
79
|
+
outputTokens: 12400,
|
|
80
|
+
cacheCreationInputTokens: 5000,
|
|
81
|
+
cacheReadInputTokens: 34000,
|
|
82
|
+
costUsd: 0.3892,
|
|
83
|
+
numTurns: 6,
|
|
84
|
+
durationApiMs: 55000,
|
|
57
85
|
},
|
|
58
86
|
{
|
|
59
87
|
agentRunId: 'run-1',
|
|
@@ -61,6 +89,13 @@ const singleRunTimings = [
|
|
|
61
89
|
startedAt: '2025-01-15T10:05:00Z',
|
|
62
90
|
completedAt: '2025-01-15T10:15:00Z',
|
|
63
91
|
durationMs: 600000,
|
|
92
|
+
inputTokens: 485000,
|
|
93
|
+
outputTokens: 128000,
|
|
94
|
+
cacheCreationInputTokens: 45000,
|
|
95
|
+
cacheReadInputTokens: 34000,
|
|
96
|
+
costUsd: 3.2451,
|
|
97
|
+
numTurns: 42,
|
|
98
|
+
durationApiMs: 385000,
|
|
64
99
|
},
|
|
65
100
|
{
|
|
66
101
|
agentRunId: 'run-1',
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/overview-tab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"overview-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/overview-tab.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAQxE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,gBAAgB,2CA+DrD"}
|