@shepai/cli 1.163.0 → 1.164.0-pr514.db33061
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/README.md +12 -0
- package/dist/packages/core/src/application/ports/output/agents/interactive-agent-executor.interface.d.ts +3 -1
- package/dist/packages/core/src/application/ports/output/agents/interactive-agent-executor.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/repositories/interactive-session-repository.interface.d.ts +19 -0
- package/dist/packages/core/src/application/ports/output/repositories/interactive-session-repository.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/interactive-session-service.interface.d.ts +7 -1
- package/dist/packages/core/src/application/ports/output/services/interactive-session-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/interactive/send-interactive-message.use-case.d.ts +2 -0
- package/dist/packages/core/src/application/use-cases/interactive/send-interactive-message.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/interactive/send-interactive-message.use-case.js +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/051-add-session-usage-tracking.d.ts +18 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/051-add-session-usage-tracking.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/051-add-session-usage-tracking.js +32 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-interactive-session.repository.d.ts +12 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-interactive-session.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-interactive-session.repository.js +31 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.d.ts +38 -7
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.js +152 -45
- package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.d.ts +17 -1
- package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.js +131 -47
- package/dist/src/presentation/web/app/actions/get-git-log.d.ts +44 -0
- package/dist/src/presentation/web/app/actions/get-git-log.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/get-git-log.js +125 -0
- package/dist/src/presentation/web/app/actions/open-folder.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/open-folder.js +5 -2
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/messages/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/messages/route.js +3 -1
- package/dist/src/presentation/web/components/assistant-ui/thread.js +8 -1
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.js +1 -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 +46 -15
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.js +77 -5
- package/dist/src/presentation/web/components/common/control-center-drawer/use-drawer-sync.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/use-drawer-sync.js +11 -0
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.js +10 -9
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts +5 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +24 -13
- 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 +56 -81
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.js +11 -6
- package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatTab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatTab.js +13 -7
- package/dist/src/presentation/web/components/features/chat/useChatRuntime.d.ts +16 -0
- package/dist/src/presentation/web/components/features/chat/useChatRuntime.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/useChatRuntime.js +98 -7
- package/dist/src/presentation/web/components/features/settings/AgentModelPicker/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/AgentModelPicker/index.js +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +7 -2
- package/dist/src/presentation/web/hooks/use-animations-enabled.d.ts +6 -0
- package/dist/src/presentation/web/hooks/use-animations-enabled.d.ts.map +1 -0
- package/dist/src/presentation/web/hooks/use-animations-enabled.js +30 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- 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 +29 -29
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
- 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 +37 -37
- 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 +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +69 -54
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +69 -54
- 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)/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
- 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 +37 -37
- 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 +37 -37
- 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 +27 -27
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +69 -54
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +69 -54
- 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/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 +6 -6
- 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 +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +9 -9
- 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 +11 -11
- 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 +11 -11
- 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 +6 -6
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__2b71641f._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__2b71641f._.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]__beda892a._.js → [root-of-the-server]__c78383b1._.js} +2 -2
- package/web/.next/server/chunks/{[root-of-the-server]__beda892a._.js.map → [root-of-the-server]__c78383b1._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_ceb2fa1e._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +3 -3
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{7f428_lucide-react_dist_esm_icons_4b319ae6._.js → 7f428_lucide-react_dist_esm_icons_281e0ef8._.js} +2 -2
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_281e0ef8._.js.map +1 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_a593f310._.js +3 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_a593f310._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1abe77bb._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1abe77bb._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__23b5ca2c._.js +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]__563e4faf._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__563e4faf._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7528eb6f._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7562afc6._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7562afc6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__821a11c1._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__821a11c1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__86ff0bc5._.js +7 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__86ff0bc5._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8b0aac03._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__98740ee4._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__98740ee4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba9f9e11._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba9f9e11._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e0be67c7._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e0be67c7._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_8b57edb8._.js → _0020fddd._.js} +2 -2
- package/web/.next/server/chunks/ssr/_0020fddd._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_02e01240._.js +4 -0
- package/web/.next/server/chunks/ssr/_02e01240._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0727935d._.js +1 -1
- package/web/.next/server/chunks/ssr/_0727935d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_18886033._.js +4 -0
- package/web/.next/server/chunks/ssr/_18886033._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_22e00a14._.js +1 -1
- package/web/.next/server/chunks/ssr/_22e00a14._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_4d49a312._.js +3 -0
- package/web/.next/server/chunks/ssr/_4d49a312._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_7a6f6a76._.js +3 -0
- package/web/.next/server/chunks/ssr/_7a6f6a76._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_def82237._.js → _8276397a._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_def82237._.js.map → _8276397a._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_9215e9ec._.js +3 -0
- package/web/.next/server/chunks/ssr/_9215e9ec._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_a5a5901d._.js +1 -1
- package/web/.next/server/chunks/ssr/_a5a5901d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_ad09f271._.js +4 -0
- package/web/.next/server/chunks/ssr/_ad09f271._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_b7a43c05._.js +3 -0
- package/web/.next/server/chunks/ssr/_b7a43c05._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_c3f595c6._.js +1 -1
- package/web/.next/server/chunks/ssr/_c3f595c6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_c45aee16._.js +3 -0
- package/web/.next/server/chunks/ssr/_c45aee16._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_ce97386b._.js → _cc654b75._.js} +3 -3
- package/web/.next/server/chunks/ssr/_cc654b75._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ea9e1556._.js +4 -0
- package/web/.next/server/chunks/ssr/_ea9e1556._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_f1ba9be6._.js +2 -2
- package/web/.next/server/chunks/ssr/_f1ba9be6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f33cd07e._.js +2 -2
- package/web/.next/server/chunks/ssr/_f33cd07e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f8b45233._.js +1 -1
- package/web/.next/server/chunks/ssr/_f8b45233._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_b881a389._.js → _fdc356bf._.js} +2 -2
- package/web/.next/server/chunks/ssr/_fdc356bf._.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/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +3 -0
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_1300ae39._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_1300ae39._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.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/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.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 +190 -154
- package/web/.next/static/chunks/16eea21868510afd.js +5 -0
- package/web/.next/static/chunks/1ad664f7081cf4c0.js +1 -0
- package/web/.next/static/chunks/{0613d3829ce90fe9.js → 4788a37d8c608e30.js} +1 -1
- package/web/.next/static/chunks/4f7d9c08a205bc4e.js +1 -0
- package/web/.next/static/chunks/5d8c83c576ec1a7b.js +1 -0
- package/web/.next/static/chunks/779b5c49587b074e.js +1 -0
- package/web/.next/static/chunks/7cec51e9bd7d1f4f.js +1 -0
- package/web/.next/static/chunks/{780f688b8568331d.js → 7d40e79e524c8d18.js} +2 -2
- package/web/.next/static/chunks/{5f40b5c4f859b573.js → 8094762f5cda4934.js} +1 -1
- package/web/.next/static/chunks/9162bb869b3543e2.js +7 -0
- package/web/.next/static/chunks/940bca62e44f3e90.js +5 -0
- package/web/.next/static/chunks/966eb2688300b7f5.js +1 -0
- package/web/.next/static/chunks/971e52f3f386ccfd.js +1 -0
- package/web/.next/static/chunks/a760d5829014058d.js +1 -0
- package/web/.next/static/chunks/b63e6727c84f30e2.js +1 -0
- package/web/.next/static/chunks/d6a1a06ee3c12489.js +1 -0
- package/web/.next/static/chunks/dedf6ca63c5468fa.js +5 -0
- package/web/.next/static/chunks/e77d053610055e0c.js +1 -0
- package/web/.next/static/chunks/{0d9e3aa7e10cf6e6.js → ee9fe376b60c3cab.js} +2 -2
- package/web/.next/static/chunks/eeadf13c0ea6cbe0.css +1 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_4b319ae6._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e5ceba65._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e5ceba65._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e91ffd5e._.js +0 -7
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e91ffd5e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_075fae20._.js +0 -4
- package/web/.next/server/chunks/ssr/_075fae20._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_125c55af._.js +0 -4
- package/web/.next/server/chunks/ssr/_125c55af._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_391e499a._.js +0 -3
- package/web/.next/server/chunks/ssr/_391e499a._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_573caadf._.js +0 -3
- package/web/.next/server/chunks/ssr/_573caadf._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_628621c7._.js +0 -4
- package/web/.next/server/chunks/ssr/_628621c7._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_68996e5b._.js +0 -3
- package/web/.next/server/chunks/ssr/_68996e5b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_8b57edb8._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_9412b27f._.js +0 -4
- package/web/.next/server/chunks/ssr/_9412b27f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_ac4a3873._.js +0 -3
- package/web/.next/server/chunks/ssr/_ac4a3873._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_b881a389._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_ce97386b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_cfbd1d7e._.js +0 -3
- package/web/.next/server/chunks/ssr/_cfbd1d7e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_8ec2c790._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_8ec2c790._.js.map +0 -1
- package/web/.next/static/chunks/0a79dfbb8486b66e.js +0 -5
- package/web/.next/static/chunks/14d9d9181bb4e337.js +0 -1
- package/web/.next/static/chunks/4581eaf51543601d.js +0 -1
- package/web/.next/static/chunks/47477ed4c5871747.js +0 -1
- package/web/.next/static/chunks/74db65fa7bfb80bd.js +0 -1
- package/web/.next/static/chunks/8b64414cdb4a4dc7.js +0 -1
- package/web/.next/static/chunks/bf55fb50a69f7350.js +0 -5
- package/web/.next/static/chunks/c04ada25ace6f30c.js +0 -1
- package/web/.next/static/chunks/c3a67566f78b5bc3.js +0 -1
- package/web/.next/static/chunks/ca8752df0e809c1b.js +0 -7
- package/web/.next/static/chunks/d2cbeefbc8967b16.js +0 -1
- package/web/.next/static/chunks/d39ae882d080aa52.js +0 -1
- package/web/.next/static/chunks/d6e702c209c413ce.js +0 -5
- package/web/.next/static/chunks/dbfbd9d9ee5eb2d0.js +0 -1
- package/web/.next/static/chunks/dc39dd4276779dec.js +0 -1
- package/web/.next/static/chunks/e779296e738a812b.css +0 -1
- /package/web/.next/static/{qfCnoWSr4qmt2_dT28B-O → lQkUWQQS5aR4vq6WUZ2yr}/_buildManifest.js +0 -0
- /package/web/.next/static/{qfCnoWSr4qmt2_dT28B-O → lQkUWQQS5aR4vq6WUZ2yr}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{qfCnoWSr4qmt2_dT28B-O → lQkUWQQS5aR4vq6WUZ2yr}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -370,6 +370,18 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) for humans and [CONTRIBUTING-AGENTS.md]
|
|
|
370
370
|
|
|
371
371
|
---
|
|
372
372
|
|
|
373
|
+
## Star History
|
|
374
|
+
|
|
375
|
+
<a href="https://www.star-history.com/?repos=shep-ai%2Fshep&type=timeline&legend=top-left">
|
|
376
|
+
<picture>
|
|
377
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/image?repos=shep-ai/shep&type=timeline&theme=dark&legend=top-left" />
|
|
378
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/image?repos=shep-ai/shep&type=timeline&legend=top-left" />
|
|
379
|
+
<img alt="Star History Chart" src="https://api.star-history.com/image?repos=shep-ai/shep&type=timeline&legend=top-left" />
|
|
380
|
+
</picture>
|
|
381
|
+
</a>
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
373
385
|
## License
|
|
374
386
|
|
|
375
387
|
MIT — see [LICENSE](./LICENSE).
|
|
@@ -42,8 +42,10 @@ export interface InteractiveAgentSessionHandle {
|
|
|
42
42
|
send(message: string): Promise<void>;
|
|
43
43
|
/** Iterate response events from the agent */
|
|
44
44
|
stream(): AsyncIterable<InteractiveAgentEvent>;
|
|
45
|
-
/** Terminate the session */
|
|
45
|
+
/** Terminate the session gracefully */
|
|
46
46
|
close(): Promise<void>;
|
|
47
|
+
/** Abort the current operation immediately (kills the agent process) */
|
|
48
|
+
abort(): void;
|
|
47
49
|
}
|
|
48
50
|
/** Executor interface for interactive agent sessions. */
|
|
49
51
|
export interface IInteractiveAgentExecutor {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-agent-executor.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/agents/interactive-agent-executor.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,kEAAkE;AAClE,MAAM,WAAW,uBAAuB;IACtC,6CAA6C;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,4DAA4D;AAC5D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EACA,OAAO,GACP,UAAU,GACV,aAAa,GACb,QAAQ,GACR,MAAM,GACN,OAAO,GACP,MAAM,GACN,WAAW,GACX,YAAY,GACZ,cAAc,GACd,eAAe,GACf,WAAW,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,mDAAmD;IACnD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,6CAA6C;IAC7C,MAAM,IAAI,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAC/C,
|
|
1
|
+
{"version":3,"file":"interactive-agent-executor.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/agents/interactive-agent-executor.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,kEAAkE;AAClE,MAAM,WAAW,uBAAuB;IACtC,6CAA6C;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,4DAA4D;AAC5D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EACA,OAAO,GACP,UAAU,GACV,aAAa,GACb,QAAQ,GACR,MAAM,GACN,OAAO,GACP,MAAM,GACN,WAAW,GACX,YAAY,GACZ,cAAc,GACd,eAAe,GACf,WAAW,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,mDAAmD;IACnD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,6CAA6C;IAC7C,MAAM,IAAI,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAC/C,uCAAuC;IACvC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,wEAAwE;IACxE,KAAK,IAAI,IAAI,CAAC;CACf;AAED,yDAAyD;AACzD,MAAM,WAAW,yBAAyB;IACxC,aAAa,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;IACxF,aAAa,CACX,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,6BAA6B,CAAC,CAAC;CAC3C"}
|
|
@@ -74,5 +74,24 @@ export interface IInteractiveSessionRepository {
|
|
|
74
74
|
* Returns a map of featureId → turnStatus (only 'processing' | 'unread' entries).
|
|
75
75
|
*/
|
|
76
76
|
getAllActiveTurnStatuses(): Promise<Map<string, string>>;
|
|
77
|
+
/**
|
|
78
|
+
* Accumulate usage from a completed turn onto the session totals.
|
|
79
|
+
* All values are ADDED to the existing totals (not replaced).
|
|
80
|
+
*/
|
|
81
|
+
accumulateUsage(id: string, usage: {
|
|
82
|
+
costUsd: number;
|
|
83
|
+
inputTokens: number;
|
|
84
|
+
outputTokens: number;
|
|
85
|
+
turns: number;
|
|
86
|
+
}): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Get cumulative usage for a session.
|
|
89
|
+
*/
|
|
90
|
+
getUsage(id: string): Promise<{
|
|
91
|
+
totalCostUsd: number;
|
|
92
|
+
totalInputTokens: number;
|
|
93
|
+
totalOutputTokens: number;
|
|
94
|
+
totalTurns: number;
|
|
95
|
+
} | null>;
|
|
77
96
|
}
|
|
78
97
|
//# sourceMappingURL=interactive-session-repository.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-session-repository.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/repositories/interactive-session-repository.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,wCAAwC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IAEzD;;;;;OAKG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IAEvE;;;OAGG;IACH,aAAa,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAE/C;;OAEG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,wBAAwB,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5F;;OAEG;IACH,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpE;;;OAGG;IACH,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtC;;;OAGG;IACH,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAEvC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExE;;OAEG;IACH,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEtD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhE;;;OAGG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAEpE;;;OAGG;IACH,wBAAwB,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"interactive-session-repository.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/repositories/interactive-session-repository.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,wCAAwC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IAEzD;;;;;OAKG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IAEvE;;;OAGG;IACH,aAAa,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAE/C;;OAEG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,wBAAwB,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5F;;OAEG;IACH,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpE;;;OAGG;IACH,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtC;;;OAGG;IACH,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAEvC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExE;;OAEG;IACH,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEtD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhE;;;OAGG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAEpE;;;OAGG;IACH,wBAAwB,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAEzD;;;OAGG;IACH,eAAe,CACb,EAAE,EAAE,MAAM,EACV,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GACnF,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAC5B,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB,EAAE,MAAM,CAAC;QACzB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,IAAI,CAAC,CAAC;CACX"}
|
|
@@ -61,6 +61,12 @@ export interface SessionInfo {
|
|
|
61
61
|
startedAt: string;
|
|
62
62
|
idleTimeoutMinutes: number;
|
|
63
63
|
lastActivityAt: string;
|
|
64
|
+
/** Cumulative cost in USD for this session (null if not yet tracked) */
|
|
65
|
+
totalCostUsd: number | null;
|
|
66
|
+
/** Cumulative input tokens for this session */
|
|
67
|
+
totalInputTokens: number | null;
|
|
68
|
+
/** Cumulative output tokens for this session */
|
|
69
|
+
totalOutputTokens: number | null;
|
|
64
70
|
}
|
|
65
71
|
/**
|
|
66
72
|
* Service interface for interactive session lifecycle management.
|
|
@@ -151,7 +157,7 @@ export interface IInteractiveSessionService {
|
|
|
151
157
|
*
|
|
152
158
|
* @returns The persisted user message
|
|
153
159
|
*/
|
|
154
|
-
sendUserMessage(featureId: string, content: string, worktreePath: string): Promise<InteractiveMessage>;
|
|
160
|
+
sendUserMessage(featureId: string, content: string, worktreePath: string, model?: string, agentType?: string): Promise<InteractiveMessage>;
|
|
155
161
|
/**
|
|
156
162
|
* Get the complete chat state for a feature in a single call.
|
|
157
163
|
* Merges DB messages with any in-flight streaming content.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-session-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/interactive-session-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,wCAAwC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,IAAI,EAAE,OAAO,CAAC;IACd,oFAAoF;IACpF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,GAAG,aAAa,GAAG,UAAU,GAAG,QAAQ,CAAC;IACzD,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,wEAAwE;IACxE,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,+DAA+D;IAC/D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,iEAAiE;IACjE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,+DAA+D;IAC/D,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,kFAAkF;IAClF,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,sDAAsD;AACtD,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"interactive-session-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/interactive-session-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,wCAAwC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,IAAI,EAAE,OAAO,CAAC;IACd,oFAAoF;IACpF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,GAAG,aAAa,GAAG,UAAU,GAAG,QAAQ,CAAC;IACzD,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,wEAAwE;IACxE,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,+DAA+D;IAC/D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,iEAAiE;IACjE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,+DAA+D;IAC/D,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,kFAAkF;IAClF,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,sDAAsD;AACtD,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,wEAAwE;IACxE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,+CAA+C;IAC/C,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gDAAgD;IAChD,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;;;;;;;OAUG;IACH,YAAY,CACV,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,KAAK,CAAC,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAE/B;;;;;;OAMG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9C;;;;;;;;OAQG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAE7E;;;;;;OAMG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAE9E;;;;OAIG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IAElE;;;;OAIG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD;;;;;;;;OAQG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,aAAa,CAAC;IAInF;;;;;;;;OAQG;IACH,eAAe,CACb,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,KAAK,CAAC,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAE/B;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAEpD;;;OAGG;IACH,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,aAAa,CAAC;IAE5F;;;OAGG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3C;;;;OAIG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAEpE;;;OAGG;IACH,wBAAwB,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-interactive-message.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/interactive/send-interactive-message.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sEAAsE,CAAC;AACvH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"send-interactive-message.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/interactive/send-interactive-message.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sEAAsE,CAAC;AACvH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,qBACa,6BAA6B;IAGtC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,0BAA0B;IAGhD,OAAO,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAS/E"}
|
|
@@ -32,7 +32,7 @@ let SendInteractiveMessageUseCase = class SendInteractiveMessageUseCase {
|
|
|
32
32
|
this.service = service;
|
|
33
33
|
}
|
|
34
34
|
async execute(input) {
|
|
35
|
-
return this.service.sendUserMessage(input.featureId, input.content, input.worktreePath);
|
|
35
|
+
return this.service.sendUserMessage(input.featureId, input.content, input.worktreePath, input.model, input.agentType);
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
SendInteractiveMessageUseCase = __decorate([
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration 051: Add usage tracking columns to interactive_sessions.
|
|
3
|
+
*
|
|
4
|
+
* Tracks cumulative cost and token usage per session so users can see
|
|
5
|
+
* how much each chat session costs. Values are accumulated from the
|
|
6
|
+
* SDK's result messages on each turn completion.
|
|
7
|
+
*
|
|
8
|
+
* Columns:
|
|
9
|
+
* - total_cost_usd: cumulative cost in USD (REAL, default 0)
|
|
10
|
+
* - total_input_tokens: cumulative input tokens (INTEGER, default 0)
|
|
11
|
+
* - total_output_tokens: cumulative output tokens (INTEGER, default 0)
|
|
12
|
+
* - total_turns: cumulative SDK turns (INTEGER, default 0)
|
|
13
|
+
*/
|
|
14
|
+
import type { MigrationParams } from 'umzug';
|
|
15
|
+
import type Database from 'better-sqlite3';
|
|
16
|
+
export declare function up({ context: db }: MigrationParams<Database.Database>): Promise<void>;
|
|
17
|
+
export declare function down({ context: db }: MigrationParams<Database.Database>): Promise<void>;
|
|
18
|
+
//# sourceMappingURL=051-add-session-usage-tracking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"051-add-session-usage-tracking.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations/051-add-session-usage-tracking.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,wBAAsB,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB3F;AAED,wBAAsB,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7F"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration 051: Add usage tracking columns to interactive_sessions.
|
|
3
|
+
*
|
|
4
|
+
* Tracks cumulative cost and token usage per session so users can see
|
|
5
|
+
* how much each chat session costs. Values are accumulated from the
|
|
6
|
+
* SDK's result messages on each turn completion.
|
|
7
|
+
*
|
|
8
|
+
* Columns:
|
|
9
|
+
* - total_cost_usd: cumulative cost in USD (REAL, default 0)
|
|
10
|
+
* - total_input_tokens: cumulative input tokens (INTEGER, default 0)
|
|
11
|
+
* - total_output_tokens: cumulative output tokens (INTEGER, default 0)
|
|
12
|
+
* - total_turns: cumulative SDK turns (INTEGER, default 0)
|
|
13
|
+
*/
|
|
14
|
+
export async function up({ context: db }) {
|
|
15
|
+
const columns = db.pragma('table_info(interactive_sessions)');
|
|
16
|
+
const names = new Set(columns.map((c) => c.name));
|
|
17
|
+
if (!names.has('total_cost_usd')) {
|
|
18
|
+
db.exec('ALTER TABLE interactive_sessions ADD COLUMN total_cost_usd REAL NOT NULL DEFAULT 0');
|
|
19
|
+
}
|
|
20
|
+
if (!names.has('total_input_tokens')) {
|
|
21
|
+
db.exec('ALTER TABLE interactive_sessions ADD COLUMN total_input_tokens INTEGER NOT NULL DEFAULT 0');
|
|
22
|
+
}
|
|
23
|
+
if (!names.has('total_output_tokens')) {
|
|
24
|
+
db.exec('ALTER TABLE interactive_sessions ADD COLUMN total_output_tokens INTEGER NOT NULL DEFAULT 0');
|
|
25
|
+
}
|
|
26
|
+
if (!names.has('total_turns')) {
|
|
27
|
+
db.exec('ALTER TABLE interactive_sessions ADD COLUMN total_turns INTEGER NOT NULL DEFAULT 0');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export async function down({ context: db }) {
|
|
31
|
+
void db;
|
|
32
|
+
}
|
|
@@ -24,5 +24,17 @@ export declare class SQLiteInteractiveSessionRepository implements IInteractiveS
|
|
|
24
24
|
updateTurnStatus(id: string, turnStatus: string): Promise<void>;
|
|
25
25
|
getTurnStatuses(featureIds: string[]): Promise<Map<string, string>>;
|
|
26
26
|
getAllActiveTurnStatuses(): Promise<Map<string, string>>;
|
|
27
|
+
accumulateUsage(id: string, usage: {
|
|
28
|
+
costUsd: number;
|
|
29
|
+
inputTokens: number;
|
|
30
|
+
outputTokens: number;
|
|
31
|
+
turns: number;
|
|
32
|
+
}): Promise<void>;
|
|
33
|
+
getUsage(id: string): Promise<{
|
|
34
|
+
totalCostUsd: number;
|
|
35
|
+
totalInputTokens: number;
|
|
36
|
+
totalOutputTokens: number;
|
|
37
|
+
totalTurns: number;
|
|
38
|
+
} | null>;
|
|
27
39
|
}
|
|
28
40
|
//# sourceMappingURL=sqlite-interactive-session.repository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-interactive-session.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-interactive-session.repository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,yFAAyF,CAAC;AAC7I,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAO5E,qBACa,kCAAmC,YAAW,6BAA6B;IAC1E,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAE5C,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYlD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAOxD,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAStE,aAAa,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAO9C,YAAY,CAChB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,wBAAwB,EAChC,SAAS,CAAC,EAAE,IAAI,GACf,OAAO,CAAC,IAAI,CAAC;IAeV,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAUnE,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;IAUrC,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC;IAStC,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQvE,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAOrD,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ/D,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAyBnE,wBAAwB,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlite-interactive-session.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-interactive-session.repository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,yFAAyF,CAAC;AAC7I,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAO5E,qBACa,kCAAmC,YAAW,6BAA6B;IAC1E,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAE5C,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYlD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAOxD,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAStE,aAAa,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAO9C,YAAY,CAChB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,wBAAwB,EAChC,SAAS,CAAC,EAAE,IAAI,GACf,OAAO,CAAC,IAAI,CAAC;IAeV,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAUnE,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;IAUrC,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC;IAStC,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQvE,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAOrD,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ/D,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAyBnE,wBAAwB,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAmBxD,eAAe,CACnB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GACnF,OAAO,CAAC,IAAI,CAAC;IAqBV,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAClC,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB,EAAE,MAAM,CAAC;QACzB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,IAAI,CAAC;CAqBV"}
|
package/dist/packages/core/src/infrastructure/repositories/sqlite-interactive-session.repository.js
CHANGED
|
@@ -129,6 +129,37 @@ let SQLiteInteractiveSessionRepository = class SQLiteInteractiveSessionRepositor
|
|
|
129
129
|
}
|
|
130
130
|
return result;
|
|
131
131
|
}
|
|
132
|
+
async accumulateUsage(id, usage) {
|
|
133
|
+
this.db
|
|
134
|
+
.prepare(`UPDATE interactive_sessions SET
|
|
135
|
+
total_cost_usd = total_cost_usd + @cost_usd,
|
|
136
|
+
total_input_tokens = total_input_tokens + @input_tokens,
|
|
137
|
+
total_output_tokens = total_output_tokens + @output_tokens,
|
|
138
|
+
total_turns = total_turns + @turns,
|
|
139
|
+
updated_at = @updated_at
|
|
140
|
+
WHERE id = @id`)
|
|
141
|
+
.run({
|
|
142
|
+
id,
|
|
143
|
+
cost_usd: usage.costUsd,
|
|
144
|
+
input_tokens: usage.inputTokens,
|
|
145
|
+
output_tokens: usage.outputTokens,
|
|
146
|
+
turns: usage.turns,
|
|
147
|
+
updated_at: Date.now(),
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
async getUsage(id) {
|
|
151
|
+
const row = this.db
|
|
152
|
+
.prepare('SELECT total_cost_usd, total_input_tokens, total_output_tokens, total_turns FROM interactive_sessions WHERE id = ?')
|
|
153
|
+
.get(id);
|
|
154
|
+
if (!row)
|
|
155
|
+
return null;
|
|
156
|
+
return {
|
|
157
|
+
totalCostUsd: row.total_cost_usd,
|
|
158
|
+
totalInputTokens: row.total_input_tokens,
|
|
159
|
+
totalOutputTokens: row.total_output_tokens,
|
|
160
|
+
totalTurns: row.total_turns,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
132
163
|
};
|
|
133
164
|
SQLiteInteractiveSessionRepository = __decorate([
|
|
134
165
|
injectable(),
|
|
@@ -5,6 +5,28 @@
|
|
|
5
5
|
* @anthropic-ai/claude-agent-sdk V2 session API. This is the ONLY file
|
|
6
6
|
* that imports from the SDK.
|
|
7
7
|
*
|
|
8
|
+
* ## V2 API Stability Notice
|
|
9
|
+
*
|
|
10
|
+
* This file uses the `unstable_v2_*` session API. The V2 API is chosen over
|
|
11
|
+
* the stable V1 `query()` API because V2 maintains a persistent agent process
|
|
12
|
+
* across turns, providing near-instant turn responses. V1 `query()` spawns a
|
|
13
|
+
* new process per turn with `resume`, adding 5-15s latency — unacceptable
|
|
14
|
+
* for interactive chat.
|
|
15
|
+
*
|
|
16
|
+
* The SDK version is pinned exactly in package.json to prevent surprise
|
|
17
|
+
* breakage. If Anthropic removes the V2 API, migrate to V1 `query()` with
|
|
18
|
+
* `resume: sessionId` — the InteractiveAgentSessionHandle interface is
|
|
19
|
+
* designed to support either backend transparently.
|
|
20
|
+
*
|
|
21
|
+
* ## V2 Limitations (vs V1 query())
|
|
22
|
+
*
|
|
23
|
+
* SDKSessionOptions does NOT support: `cwd`, `maxTurns`, `maxBudgetUsd`,
|
|
24
|
+
* `abortController`, `settingSources`, `persistSession`, `effort`.
|
|
25
|
+
* These must be handled at the service layer:
|
|
26
|
+
* - cwd: Handled via process.chdir() mutex (see withCwd)
|
|
27
|
+
* - abort: Handled via SDKSession.close() which kills the process
|
|
28
|
+
* - maxTurns/maxBudgetUsd: Should be tracked by InteractiveSessionService
|
|
29
|
+
*
|
|
8
30
|
* Design decisions:
|
|
9
31
|
* - The CLAUDECODE env var is stripped to prevent nested-session detection
|
|
10
32
|
* errors when shep itself is running inside a Claude Code session.
|
|
@@ -16,14 +38,22 @@ export declare class ClaudeCodeInteractiveExecutor implements IInteractiveAgentE
|
|
|
16
38
|
createSession(options: InteractiveAgentOptions): Promise<InteractiveAgentSessionHandle>;
|
|
17
39
|
resumeSession(sessionId: string, options: InteractiveAgentOptions): Promise<InteractiveAgentSessionHandle>;
|
|
18
40
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
41
|
+
* Acquire a process-level mutex, change cwd, run the synchronous factory
|
|
42
|
+
* function, restore cwd, and release the mutex.
|
|
43
|
+
*
|
|
44
|
+
* This prevents concurrent session creations from seeing each other's cwd.
|
|
45
|
+
* The mutex is async to serialize across concurrent API request handlers.
|
|
23
46
|
*/
|
|
24
47
|
private withCwd;
|
|
25
48
|
private buildSdkOptions;
|
|
26
49
|
private wrapSession;
|
|
50
|
+
/**
|
|
51
|
+
* Map the SDK message stream to domain events.
|
|
52
|
+
*
|
|
53
|
+
* Tracks whether streaming deltas (`stream_event`) have been emitted for
|
|
54
|
+
* the current turn. When deltas are available, the `assistant` message's
|
|
55
|
+
* text blocks are skipped to prevent double-emission of the same content.
|
|
56
|
+
*/
|
|
27
57
|
private mapStream;
|
|
28
58
|
/**
|
|
29
59
|
* Map a single SDK message to zero or more InteractiveAgentEvents.
|
|
@@ -31,12 +61,13 @@ export declare class ClaudeCodeInteractiveExecutor implements IInteractiveAgentE
|
|
|
31
61
|
* SDK message types we handle:
|
|
32
62
|
* - stream_event (SDKPartialAssistantMessage): streaming content deltas
|
|
33
63
|
* - assistant (SDKAssistantMessage): complete assistant turn with tool_use blocks
|
|
34
|
-
* - result (SDKResultMessage): success or error result
|
|
35
|
-
* - system (SDKStatusMessage / SDKSystemMessage): status updates
|
|
64
|
+
* - result (SDKResultMessage): success or error result with distinct subtypes
|
|
65
|
+
* - system (SDKStatusMessage / SDKSystemMessage): status updates, compaction
|
|
36
66
|
* - tool_use_summary: tool execution summaries
|
|
37
67
|
* - tool_progress: tool execution progress
|
|
68
|
+
* - rate_limit_event: rate limit notifications
|
|
38
69
|
*
|
|
39
|
-
* Other message types are silently ignored (user replays, auth, etc.)
|
|
70
|
+
* Other message types are silently ignored (user replays, auth, hooks, etc.)
|
|
40
71
|
*/
|
|
41
72
|
private mapSdkMessage;
|
|
42
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-code-interactive-executor.service.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"claude-code-interactive-executor.service.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAOH,OAAO,KAAK,EACV,yBAAyB,EACzB,uBAAuB,EACvB,6BAA6B,EAE9B,MAAM,wFAAwF,CAAC;AAgBhG,qBAAa,6BAA8B,YAAW,yBAAyB;IACvE,aAAa,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,6BAA6B,CAAC;IAOvF,aAAa,CACjB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,6BAA6B,CAAC;IAOzC;;;;;;OAMG;IACH,OAAO,CAAC,OAAO;IAmBf,OAAO,CAAC,eAAe;IAkBvB,OAAO,CAAC,WAAW;IAoBnB;;;;;;OAMG;YACY,SAAS;IA6BxB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,aAAa;CAuPtB"}
|